From a9e37927eb2d326cb7e938f5fe0fb6fc610bb6ad Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Fri, 4 Sep 2020 14:06:04 +0800 Subject: [PATCH 01/28] [feature-3665][ui]Add element-ui (#3666) * [feature-3665][ui]Add element-ui * add license --- dolphinscheduler-dist/release-docs/LICENSE | 1 + .../licenses/ui-licenses/LICENSE-element-ui | 21 +++++++++++++++++++ dolphinscheduler-ui/build/config.js | 2 +- dolphinscheduler-ui/package.json | 1 + dolphinscheduler-ui/src/js/conf/home/index.js | 4 ++++ .../src/js/conf/login/index.js | 4 ++++ 6 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-element-ui diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE index 707ea5cab1aa..95cd7009709b 100644 --- a/dolphinscheduler-dist/release-docs/LICENSE +++ b/dolphinscheduler-dist/release-docs/LICENSE @@ -491,6 +491,7 @@ MIT licenses clipboard 2.0.1: https://github.com/zenorocha/clipboard.js MIT codemirror 5.43.0: https://github.com/codemirror/CodeMirror MIT dayjs 1.7.8: https://github.com/iamkun/dayjs MIT + element-ui 2.13.2: https://github.com/ElemeFE/element MIT html2canvas 0.5.0-beta4: https://github.com/niklasvh/html2canvas MIT jquery 3.3.1: https://github.com/jquery/jquery MIT jquery-ui 1.12.1: https://github.com/jquery/jquery-ui MIT diff --git a/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-element-ui b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-element-ui new file mode 100644 index 000000000000..d4462f3dcf11 --- /dev/null +++ b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-element-ui @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-present ElemeFE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/dolphinscheduler-ui/build/config.js b/dolphinscheduler-ui/build/config.js index 2800115d8055..11bbec550f60 100644 --- a/dolphinscheduler-ui/build/config.js +++ b/dolphinscheduler-ui/build/config.js @@ -207,7 +207,7 @@ const baseConfig = { 'jquery':'jquery/dist/jquery.min.js', 'jquery-ui': 'jquery-ui' }, - extensions: ['.js', 'json', '.vue', '.scss'] + extensions: ['*', '.js', 'json', '.vue', '.scss'] }, plugins: [ new VueLoaderPlugin(), diff --git a/dolphinscheduler-ui/package.json b/dolphinscheduler-ui/package.json index 9624fa6212ad..af6f2cd242ea 100644 --- a/dolphinscheduler-ui/package.json +++ b/dolphinscheduler-ui/package.json @@ -22,6 +22,7 @@ "d3": "^3.5.17", "dagre": "^0.8.5", "dayjs": "^1.7.8", + "element-ui": "2.13.2", "echarts": "4.1.0", "html2canvas": "^0.5.0-beta4", "jquery": "3.3.1", diff --git a/dolphinscheduler-ui/src/js/conf/home/index.js b/dolphinscheduler-ui/src/js/conf/home/index.js index efec218b30f7..bfa786cdec8f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/index.js +++ b/dolphinscheduler-ui/src/js/conf/home/index.js @@ -18,6 +18,8 @@ // The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' import App from './App' import router from './router' import store from './store' @@ -39,6 +41,8 @@ import 'canvg/dist/browser/canvg.min.js' // Component internationalization const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: en_US } : {} +Vue.use(ElementUI) + // Vue.use(ans) Vue.use(ans, useOpt) diff --git a/dolphinscheduler-ui/src/js/conf/login/index.js b/dolphinscheduler-ui/src/js/conf/login/index.js index d9b93539bb7d..55ca0d4876ee 100644 --- a/dolphinscheduler-ui/src/js/conf/login/index.js +++ b/dolphinscheduler-ui/src/js/conf/login/index.js @@ -19,6 +19,8 @@ // (runtime-only or standalone) has been set in webpack.base.conf with an alias. // import $ from 'jquery' import Vue from 'vue' +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' import App from './App' import i18n from '@/module/i18n' import 'ans-ui/lib/ans-ui.min.css' @@ -27,6 +29,8 @@ import ans from 'ans-ui/lib/ans-ui.min' import 'sass/conf/login/index.scss' import 'bootstrap/dist/js/bootstrap.min.js' +Vue.use(ElementUI) + Vue.use(ans) Vue.config.devtools = true From 2e117bb8265ac0778a022a40f5c8adbefb0b77aa Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Mon, 7 Sep 2020 15:06:08 +0800 Subject: [PATCH 02/28] Add form-create plug-in and alarm group management add sample demo --- dolphinscheduler-dist/release-docs/LICENSE | 1 + .../LICENSE-@form-create-element-ui | 21 ++++++++ dolphinscheduler-ui/package.json | 5 +- dolphinscheduler-ui/src/js/conf/home/index.js | 4 ++ .../pages/warningGroups/_source/list.vue | 51 ++++++++++++++++++- .../src/js/conf/login/index.js | 4 ++ 6 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE index 95cd7009709b..9a0fdae64956 100644 --- a/dolphinscheduler-dist/release-docs/LICENSE +++ b/dolphinscheduler-dist/release-docs/LICENSE @@ -484,6 +484,7 @@ The text of each license is also included at licenses/ui-licenses/LICENSE-[proje ======================================== MIT licenses ======================================== + @form-create/element-ui 1.0.18: https://github.com/xaboy/form-create MIT ans-UI 1.1.7: https://github.com/analysys/ans-ui MIT axios 0.16.2: https://github.com/axios/axios MIT bootstrap 3.3.7: https://github.com/twbs/bootstrap MIT diff --git a/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui new file mode 100644 index 000000000000..5609421fb8bb --- /dev/null +++ b/dolphinscheduler-dist/release-docs/licenses/ui-licenses/LICENSE-@form-create-element-ui @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 xaboy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/dolphinscheduler-ui/package.json b/dolphinscheduler-ui/package.json index af6f2cd242ea..af0ac54b0c02 100644 --- a/dolphinscheduler-ui/package.json +++ b/dolphinscheduler-ui/package.json @@ -12,6 +12,7 @@ "build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js" }, "dependencies": { + "@form-create/element-ui": "^1.0.18", "@riophae/vue-treeselect": "^0.4.0", "ans-ui": "1.1.9", "axios": "^0.16.2", @@ -22,8 +23,8 @@ "d3": "^3.5.17", "dagre": "^0.8.5", "dayjs": "^1.7.8", - "element-ui": "2.13.2", "echarts": "4.1.0", + "element-ui": "2.13.2", "html2canvas": "^0.5.0-beta4", "jquery": "3.3.1", "jquery-ui": "^1.12.1", @@ -32,7 +33,7 @@ "lodash": "^4.17.11", "normalize.css": "^8.0.1", "vue": "^2.5.17", - "vue-router": "2.7.0", + "vue-router": "^2.7.0", "vuex": "^3.0.0", "vuex-router-sync": "^5.0.0" }, diff --git a/dolphinscheduler-ui/src/js/conf/home/index.js b/dolphinscheduler-ui/src/js/conf/home/index.js index bfa786cdec8f..d62ac4750d15 100644 --- a/dolphinscheduler-ui/src/js/conf/home/index.js +++ b/dolphinscheduler-ui/src/js/conf/home/index.js @@ -38,6 +38,8 @@ import 'bootstrap/dist/css/bootstrap.min.css' import 'bootstrap/dist/js/bootstrap.min.js' import 'canvg/dist/browser/canvg.min.js' +import formCreate, {maker} from '@form-create/element-ui' + // Component internationalization const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: en_US } : {} @@ -46,6 +48,8 @@ Vue.use(ElementUI) // Vue.use(ans) Vue.use(ans, useOpt) +Vue.use(formCreate) + sync(store, router) Vue.config.devtools = true diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue index 528693af7d49..71e6aa528f60 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue @@ -16,6 +16,9 @@ */