Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 3.9.x #3218

Merged
merged 10 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist/

# Dependency directories
node_modules/

yarn.lock
# Typescript v1 declaration files
typings/

Expand Down
74 changes: 38 additions & 36 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,41 @@
"scripts": {
"test": "echo test",
"dev": "webpack serve --hot --env development --env mode=development --config ./webpack.config.js",
"dev-external": "webpack serve --https --hot --env development --env mode=external --config ./webpack.config.js",
"dev-external": "webpack serve --server-type https --hot --env development --env mode=external --config ./webpack.config.js",
"build": "webpack --env --config ./webpack.config.js",
"lint:js": "eslint ./src --fix --ext .js --ext .vue",
"lint:style": "stylelint --fix ./src/**/*.{vue,css} --custom-syntax"
},
"keywords": [],
"license": "ISC",
"dependencies": {
"@blueking/ip-selector": "0.3.0-beta.30",
"@blueking/login-modal": "1.0.4",
"@blueking/ai-blueking": "0.2.7",
"@blueking/ip-selector": "0.3.0-beta.33",
"@blueking/login-modal": "1.0.5",
"@blueking/notice-component-vue2": "2.0.0-beta.2",
"@blueking/paas-login": "0.0.11",
"@blueking/platform-config": "1.0.5",
"@blueking/sub-saas": "0.0.0-beta.6",
"@blueking/user-selector": "1.0.12",
"@blueking/user-selector": "1.0.14",
"@vue/babel-preset-jsx": "1.4.0",
"@vue/composition-api": "1.7.2",
"ace-builds": "1.32.9",
"axios": "1.7.4",
"ace-builds": "1.36.2",
"axios": "1.7.7",
"bk-magic-vue": "2.5.9-beta.35",
"core-js": "3.36.1",
"core-js": "3.38.1",
"cron-parser-custom": "2.13.0",
"dayjs": "1.11.13",
"diff": "5.2.0",
"diff2html": "3.4.48",
"echarts": "5.5.0",
"highlight.js": "11.9.0",
"echarts": "5.5.1",
"highlight.js": "11.10.0",
"html2canvas": "1.4.1",
"js-base64": "3.7.7",
"js-cookie": "3.0.5",
"lodash": "4.17.21",
"marked": "5.1.1",
"marked-gfm-heading-id": "3.1.3",
"marked-mangle": "1.1.7",
"marked-mangle": "1.1.9",
"tippy.js": "6.3.7",
"vue": "2.7.8",
"vue-content-loader": "0.2.2",
Expand All @@ -50,55 +52,55 @@
"xss": "1.0.15"
},
"devDependencies": {
"@babel/core": "7.24.4",
"@babel/eslint-parser": "7.24.1",
"@babel/core": "7.25.2",
"@babel/eslint-parser": "7.25.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-jsx": "7.24.1",
"@babel/plugin-transform-modules-commonjs": "7.24.1",
"@babel/plugin-transform-runtime": "7.24.3",
"@babel/preset-env": "7.24.4",
"@babel/plugin-syntax-jsx": "7.24.7",
"@babel/plugin-transform-modules-commonjs": "7.24.8",
"@babel/plugin-transform-runtime": "7.25.4",
"@babel/preset-env": "7.25.4",
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
"@vue/babel-plugin-transform-vue-jsx": "1.4.0",
"@vue/babel-sugar-inject-h": "1.4.0",
"@vue/eslint-config-standard": "8.0.1",
"ajv": "8.12.0",
"ajv": "8.17.1",
"babel-loader": "9.1.3",
"babel-plugin-import-bk-magic-vue": "2.1.11",
"babel-plugin-lodash": "3.3.4",
"copy-webpack-plugin": "12.0.2",
"css-loader": "7.1.0",
"css-minimizer-webpack-plugin": "6.0.0",
"css-loader": "7.1.2",
"css-minimizer-webpack-plugin": "7.0.0",
"dotenv": "16.4.5",
"eslint": "8.53.0",
"eslint-config-standard": "17.1.0",
"eslint-config-tencent": "1.0.4",
"eslint-plugin-html": "8.0.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-n": "17.1.0",
"eslint-plugin-html": "8.1.1",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-n": "17.10.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-simple-import-sort": "12.0.0",
"eslint-plugin-vue": "9.24.1",
"eslint-webpack-plugin": "4.1.0",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-vue": "9.28.0",
"eslint-webpack-plugin": "4.2.0",
"figlet": "1.7.0",
"html-loader": "5.0.0",
"html-loader": "5.1.0",
"html-webpack-plugin": "5.6.0",
"lodash-webpack-plugin": "0.11.6",
"markdown-loader": "8.0.0",
"mini-css-extract-plugin": "2.8.1",
"node-xlsx": "0.23.0",
"postcss": "8.4.38",
"mini-css-extract-plugin": "2.9.1",
"node-xlsx": "0.24.0",
"postcss": "8.4.44",
"postcss-advanced-variables": "4.0.0",
"postcss-atroot": "0.2.4",
"postcss-extend-rule": "4.0.0",
"postcss-html": "1.6.0",
"postcss-html": "1.7.0",
"postcss-import": "16.1.0",
"postcss-import-webpack-resolver": "~1.0.1",
"postcss-loader": "8.1.1",
"postcss-mixins": "10.0.0",
"postcss-nested": "6.0.1",
"postcss-mixins": "10.0.1",
"postcss-nested": "6.2.0",
"postcss-preset-env": "9.5.4",
"postcss-property-lookup": "3.0.0",
"postcss-syntax": "0.36.2",
Expand All @@ -107,17 +109,17 @@
"style-loader": "4.0.0",
"stylelint": "15.11.0",
"stylelint-config-standard": "34.0.0",
"stylelint-order": "6.0.3",
"stylelint-order": "6.0.4",
"stylelint-scss": "5.3.1",
"stylelint-webpack-plugin": "4.1.1",
"terser-webpack-plugin": "5.3.10",
"thread-loader": "4.0.2",
"vue-loader": "15.10.0",
"vue-style-loader": "4.1.3",
"webpack": "5.91.0",
"webpack": "5.94.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.0.4",
"webpack-merge": "5.10.0"
"webpack-dev-server": "5.1.0",
"webpack-merge": "6.0.1"
},
"engines": {
"node": ">= 16.6.0",
Expand Down
10 changes: 10 additions & 0 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@
</template>
<router-view />
<system-log v-model="showSystemLog" />
<jb-ai v-if="isAiEnable" />
</layout>
</template>
<script>
import Cookie from 'js-cookie';

import AiService from '@service/ai';
import EnvService from '@service/env';
import LogoutService from '@service/logout';
import QueryGlobalSettingService from '@service/query-global-setting';
Expand Down Expand Up @@ -153,6 +155,7 @@
'esb.url': '',
bkDomain: '',
},
isAiEnable: false,
};
},
computed: {
Expand All @@ -175,6 +178,7 @@
this.fetchUserInfo();
this.fetchRelatedSystemUrls();
this.fetchEnv();
this.fetchAiConfig();
},
/**
* @desc 页面渲染完成
Expand Down Expand Up @@ -229,6 +233,12 @@
this.envConfig = data;
});
},
fetchAiConfig() {
AiService.fetchConfig()
.then((data) => {
this.isAiEnable = data.enabled;
});
},
/**
* @desc 更新网站title
*/
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/src/common/fully-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import ElementTeleport from '@components/element-teleport';
import Empty from '@components/empty';
import Exception from '@components/exception';
import Icon from '@components/icon';
import JbAi from '@components/jb-ai';
import JbBreadcrumb from '@components/jb-breadcrumb';
import JbBreadcrumbItem from '@components/jb-breadcrumb/jb-breadcrumb-item';
import JbDialog from '@components/jb-dialog';
Expand Down Expand Up @@ -71,6 +72,7 @@ import i18n from '@/i18n';
import 'bk-magic-vue/dist/bk-magic-vue.min.css';
import '@blueking/ip-selector/dist/styles/vue2.6.x.css';


const IpSelector = createIpSelector({
version: '8',
// panelList: ['staticTopo', 'dynamicTopo', 'dynamicGroup', 'manualInput', 'containerStaticTopo', 'containerManualInput'],
Expand Down Expand Up @@ -160,6 +162,7 @@ Vue.component('SmartAction', SmartAction);
Vue.component('ElementTeleport', ElementTeleport);
Vue.component('ResizeableBox', ResizeableBox);
Vue.component('IpSelector', IpSelector);
Vue.component('JbAi', JbAi);

Vue.use(Cursor);
Vue.use(Request);
Expand Down
Loading
Loading