From 24f362de5ac9f4b780cba6df8ac80b87db68b1bc Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Mon, 13 Jan 2020 10:12:09 +0800 Subject: [PATCH] fix udfs assignment and task instance page jump #1789 (#1792) * fix udfs assignment and task instance page jump #1789 * jest add coverage display * Fix data echo, style, popup cannot be closed and license * Fix data echo, style, popup cannot be closed and license * fix --- dolphinscheduler-ui/.editorconfig | 18 +++- dolphinscheduler-ui/.env | 15 +++ dolphinscheduler-ui/_test_/package.json | 14 ++- .../build/webpack.config.test.js | 100 ------------------ .../js/conf/home/pages/dag/_source/dag.scss | 3 + .../pages/dag/_source/formModel/formModel.vue | 1 - .../_source/formModel/tasks/_source/udfs.vue | 5 +- .../pages/monitor/pages/servers/servers.scss | 2 +- .../_source/instanceConditions/index.vue | 4 +- .../projects/pages/taskInstance/index.vue | 2 + .../crontab/source/_source/input-number.vue | 2 +- .../src/sass/common/index.scss | 6 +- 12 files changed, 58 insertions(+), 114 deletions(-) delete mode 100644 dolphinscheduler-ui/build/webpack.config.test.js diff --git a/dolphinscheduler-ui/.editorconfig b/dolphinscheduler-ui/.editorconfig index 073296e858..beb8ed2185 100644 --- a/dolphinscheduler-ui/.editorconfig +++ b/dolphinscheduler-ui/.editorconfig @@ -1,5 +1,19 @@ -# editorconfig.org -# author: axin + # Licensed to the Apache Software Foundation (ASF) under one or more + # contributor license agreements. See the NOTICE file distributed with + # this work for additional information regarding copyright ownership. + # The ASF licenses this file to You under the Apache License, Version 2.0 + # (the "License"); you may not use this file except in compliance with + # the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + + root = true [*] diff --git a/dolphinscheduler-ui/.env b/dolphinscheduler-ui/.env index 6da217b45e..4c7e96e795 100644 --- a/dolphinscheduler-ui/.env +++ b/dolphinscheduler-ui/.env @@ -1,3 +1,18 @@ + # Licensed to the Apache Software Foundation (ASF) under one or more + # contributor license agreements. See the NOTICE file distributed with + # this work for additional information regarding copyright ownership. + # The ASF licenses this file to You under the Apache License, Version 2.0 + # (the "License"); you may not use this file except in compliance with + # the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # back end interface address API_BASE = http://192.168.xx.xx:12345 diff --git a/dolphinscheduler-ui/_test_/package.json b/dolphinscheduler-ui/_test_/package.json index df47d10c0a..0848d1c185 100644 --- a/dolphinscheduler-ui/_test_/package.json +++ b/dolphinscheduler-ui/_test_/package.json @@ -19,12 +19,18 @@ "^@/(.*)$": "/src/$1" }, "transform": { - "^.+\\.js$": "/node_modules/babel-jest", - ".*\\.(vue)$": "/node_modules/vue-jest" + "^.+\\.js$": "/_test_/node_modules/babel-jest", + ".*\\.(vue)$": "/_test_/node_modules/vue-jest" }, "snapshotSerializers": [ - "/node_modules/jest-serializer-vue" - ] + "/_test_/node_modules/jest-serializer-vue" + ], + "collectCoverage": true, + "collectCoverageFrom": [ + "src/**/*.{js,vue}", + "!**/node_modules/**" + ], + "rootDir": "../" }, "devDependencies": { "@vue/test-utils": "^1.0.0-beta.30", diff --git a/dolphinscheduler-ui/build/webpack.config.test.js b/dolphinscheduler-ui/build/webpack.config.test.js deleted file mode 100644 index 3193ca3d73..0000000000 --- a/dolphinscheduler-ui/build/webpack.config.test.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const webpack = require('webpack') -const merge = require('webpack-merge') -const { baseConfig } = require('./config') -const ExtractTextPlugin = require('extract-text-webpack-plugin') - -const config = merge.smart(baseConfig, { - devtool: 'inline-source-map', - output: { - filename: 'js/[name].js' - }, - module: { - rules: [ - { - test: /\.vue$/, - loader: 'vue-loader', - options: { - hotReload: true // Open hot overload - } - }, - { - test: /\.css$/, - loader: ExtractTextPlugin.extract({ - use: [ - 'css-loader', - { - loader: 'postcss-loader', - options: { - plugins: (loader) => [ - require('autoprefixer')({ - overrideBrowserslist: [ - "Android 4.1", - "iOS 7.1", - "Chrome > 31", - "ff > 31", - "ie >= 8" - ] - }), - require('cssnano') - ] - } - } - ], - fallback: ['vue-style-loader'] - }) - }, - { - test: /\.scss$/, - loader: ExtractTextPlugin.extract({ - use: [ - 'css-loader', - 'sass-loader', - { - loader: 'postcss-loader', - options: { - plugins: (loader) => [ - require('autoprefixer')({ - overrideBrowserslist: [ - "Android 4.1", - "iOS 7.1", - "Chrome > 31", - "ff > 31", - "ie >= 8" - ] - }), - require('cssnano') - ] - } - } - ], - fallback: ['vue-style-loader'] - }) - } - ] - }, - externals: '', - plugins: [ - new webpack.HotModuleReplacementPlugin(), - new ExtractTextPlugin({ filename: 'css/[name].css', allChunks: true }), - new webpack.optimize.OccurrenceOrderPlugin() - ] -}) - -module.exports = config diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss index 237e6f5cd9..a63157d809 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.scss @@ -157,6 +157,9 @@ background: #F2F3F7; position: relative; border-radius: 0 3px 0 0; + .ans-btn-text { + color: #337ab7; + } .assist-btn { position: absolute; left: 10px; diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue index 9d6a10f545..bca4eec636 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue @@ -347,7 +347,6 @@ type: this.taskType, id: this.id, name: this.name, - params: this.params, description: this.description, runFlag: this.runFlag, dependence: this.dependence, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue index 87ede38b73..e27a683f39 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue @@ -24,7 +24,7 @@ v-for="city in udfsList" :key="city.id" :value="city.id" - :label="city.code"> + :label="city.code"> @@ -74,11 +74,12 @@ _.map(udfs, v => { _.map(this.udfsList, v1 => { if (parseInt(v) === v1.id) { - arr.push(v1) + arr.push(parseInt(v)) } }) }) this.$nextTick(() => { + _.map(_.cloneDeep(this.udfsList), v => v.res) this.udfsStr = arr }) } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss index 2c100e2d98..fd3c6c4378 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss @@ -85,7 +85,7 @@ font-size: 72px; } >.state { - >i { + >em { font-size: 50px; } .success { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue index bbade46f2c..2f30f0bea4 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/index.vue @@ -52,10 +52,10 @@
- +
- +
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue index f966d868f6..a23eee5fa0 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue @@ -81,6 +81,7 @@ */ _onQuery (o) { this.searchParams = _.assign(this.searchParams, o) + this.searchParams.processInstanceId = '' if (this.searchParams.taskName) { this.searchParams.taskName = '' } @@ -134,6 +135,7 @@ created () { }, mounted () { + this.$modal.destroy() // Cycle acquisition status this.setIntervalP = setInterval(() => { this._debounceGET('false') diff --git a/dolphinscheduler-ui/src/js/module/components/crontab/source/_source/input-number.vue b/dolphinscheduler-ui/src/js/module/components/crontab/source/_source/input-number.vue index f53194264f..ad13327377 100755 --- a/dolphinscheduler-ui/src/js/module/components/crontab/source/_source/input-number.vue +++ b/dolphinscheduler-ui/src/js/module/components/crontab/source/_source/input-number.vue @@ -109,7 +109,7 @@ } } .ans-input { - width: 60px; + width: 80px; margin:0 -2px 0 -1px; input { text-align: center; diff --git a/dolphinscheduler-ui/src/sass/common/index.scss b/dolphinscheduler-ui/src/sass/common/index.scss index ba0f93ac3b..a957e71f44 100644 --- a/dolphinscheduler-ui/src/sass/common/index.scss +++ b/dolphinscheduler-ui/src/sass/common/index.scss @@ -26,7 +26,11 @@ font-weight: 400; } } - +.ans-radio { + .ans-radio-inner { + border: 1px solid #B3B3B3; + } +} .ans-poptip { min-width: 158px; }