Browse Source

Merge pull request #4214 from chengshiwen/ui-eslint

[Improvement][UI] UI eslint support for better code quality and fewer bugs
pull/3/MERGE
xingchun-chen 4 years ago committed by GitHub
parent
commit
95d320d7da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      dolphinscheduler-ui/.eslintignore
  2. 11
      dolphinscheduler-ui/.eslintrc.yml
  3. 10
      dolphinscheduler-ui/build/config.js
  4. 43
      dolphinscheduler-ui/build/webpack.config.dev.js
  5. 9
      dolphinscheduler-ui/package.json
  6. 12
      dolphinscheduler-ui/src/components/Counter.vue
  7. 38
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  8. 12
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue
  9. 10
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue
  10. 7
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/workerGroups.vue
  11. 6
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue
  12. 54
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  13. 12
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue
  14. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue
  15. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
  16. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue
  17. 7
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue
  18. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue
  19. 7
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue
  20. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue
  21. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue
  22. 8
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue
  23. 16
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue
  24. 5
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue
  25. 72
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
  26. 7
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue
  27. 68
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
  28. 10
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue
  29. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue
  30. 64
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
  31. 64
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
  32. 64
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
  33. 23
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue
  34. 274
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue
  35. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue
  36. 89
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue
  37. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
  38. 11
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue
  39. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
  40. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue
  41. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue
  42. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue
  43. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue
  44. 33
      dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue
  45. 8
      dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
  46. 5
      dolphinscheduler-ui/src/js/conf/home/pages/home/index.vue
  47. 6
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue
  48. 30
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue
  49. 5
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
  50. 14
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue
  51. 5
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
  52. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue
  53. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue
  54. 14
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue
  55. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue
  56. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/create/index.vue
  57. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/details/index.vue
  58. 26
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue
  59. 21
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
  60. 1
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue
  61. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue
  62. 17
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue
  63. 7
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue
  64. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
  65. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
  66. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue
  67. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue
  68. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue
  69. 7
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue
  70. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue
  71. 150
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue
  72. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue
  73. 10
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue
  74. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue
  75. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue
  76. 10
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  77. 13
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
  78. 8
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue
  79. 34
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue
  80. 8
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue
  81. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue
  82. 3
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
  83. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue
  84. 13
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue
  85. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue
  86. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue
  87. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue
  88. 10
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue
  89. 10
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue
  90. 8
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
  91. 1
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue
  92. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue
  93. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue
  94. 7
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue
  95. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
  96. 1
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue
  97. 7
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue
  98. 9
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue
  99. 20
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue
  100. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue
  101. Some files were not shown because too many files have changed in this diff Show More

7
dolphinscheduler-ui/.eslintignore

@ -0,0 +1,7 @@
/_test_/
/build/
/dist/
/node/
/node_modules/
/target/
/*.js

11
dolphinscheduler-ui/.eslintrc.yml

@ -26,9 +26,18 @@ globals:
Atomics: readonly
SharedArrayBuffer: readonly
PUBLIC_PATH: readonly
$t: readonly
parserOptions:
ecmaVersion: 2018
sourceType: module
plugins:
- vue
rules: {}
rules:
vue/script-indent: ['error', 2, { 'baseIndent': 1, 'switchCase': 1 }]
prefer-promise-reject-errors: 'off'
no-prototype-builtins: 'off'
no-mixed-operators: 'off'
no-extend-native: 'off'
prefer-const: 'off'
overrides:
- { 'files': ['*.vue'], 'rules': { 'indent': 'off' }}

10
dolphinscheduler-ui/build/config.js

@ -125,6 +125,16 @@ const baseConfig = {
},
module: {
rules: [
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: true
}
},
{
test: /\.vue$/,
loader: 'vue-loader',

43
dolphinscheduler-ui/build/webpack.config.dev.js

@ -19,6 +19,8 @@ const merge = require('webpack-merge')
const { assetsDir, baseConfig } = require('./config')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const ProgressPlugin = require('progress-bar-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const getEnv = require('env-parse').getEnv
const config = merge.smart(baseConfig, {
@ -33,6 +35,7 @@ const config = merge.smart(baseConfig, {
port: getEnv('DEV_PORT', 8888),
host: getEnv('DEV_HOST', 'localhost'),
noInfo: false,
overlay: { warnings: false, errors: true },
historyApiFallback: true,
disableHostCheck: true,
proxy: {
@ -42,12 +45,12 @@ const config = merge.smart(baseConfig, {
changeOrigin: true
}
},
progress: false,
quiet: false,
progress: true,
quiet: true,
stats: {
colors: true
},
clientLogLevel: 'none'
clientLogLevel: 'warning'
},
plugins: [
new ProgressPlugin(),
@ -57,4 +60,36 @@ const config = merge.smart(baseConfig, {
mode: 'development'
})
module.exports = config
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.devServer.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
config.devServer.port = port
// Add FriendlyErrorsPlugin
config.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${config.devServer.host}:${port}`],
},
onErrors: () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || ''
})
}
}
}))
resolve(config)
}
})
})

9
dolphinscheduler-ui/package.json

@ -8,7 +8,7 @@
"dev": "cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.dev.js",
"clean": "rimraf dist",
"start": "npm run dev",
"lint": "eslint ./src --fix",
"lint": "eslint ./src --ext .js,.vue --fix",
"build:release": "npm run clean && cross-env NODE_ENV=production PUBLIC_PATH=/dolphinscheduler/ui webpack --config ./build/webpack.config.release.js"
},
"dependencies": {
@ -55,18 +55,23 @@
"env-parse": "^1.0.5",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.2",
"eslint-plugin-vue": "^7.2.0",
"file-loader": "^5.0.2",
"friendly-errors-webpack-plugin": "^1.7.0",
"globby": "^8.0.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.8.2",
"node-notifier": "^8.0.0",
"node-sass": "^4.14.1",
"pack": "^2.2.0",
"portfinder": "^1.0.28",
"postcss-loader": "^3.0.0",
"progress-bar-webpack-plugin": "^1.12.1",
"rimraf": "^2.6.2",

12
dolphinscheduler-ui/src/components/Counter.vue

@ -31,23 +31,23 @@ export default {
data () {
return {
count: 0
};
}
},
methods: {
inc () {
this.count++;
this.count++
},
dec () {
this.count--;
this.count--
},
reset () {
this.count = 0;
this.count = 0
}
},
computed: {
computedCount: function () {
return this.count * this.factor;
return this.count * this.factor
}
}
}
};
</script>

38
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@ -156,7 +156,7 @@
:visible.sync="nodeDrawer"
size="50%"
:with-header="false">
<m-form-model v-if="nodeDrawer" :nodeData = nodeData @addTaskInfo="addTaskInfo" @cacheTaskInfo="cacheTaskInfo" @close="close" @onSubProcess="onSubProcess"></m-form-model>
<m-form-model v-if="nodeDrawer" :nodeData=nodeData @seeHistory="seeHistory" @addTaskInfo="addTaskInfo" @cacheTaskInfo="cacheTaskInfo" @close="close" @onSubProcess="onSubProcess"></m-form-model>
</el-drawer>
<el-drawer
:visible.sync="lineDrawer"
@ -203,8 +203,8 @@
import { findComponentDownward } from '@/module/util/'
import disabledState from '@/module/mixin/disabledState'
import { mapActions, mapState, mapMutations } from 'vuex'
import mVersions from '../../projects/pages/definition/pages/list/_source/versions'
import mStart from '../../projects/pages/definition/pages/list/_source/start'
import mVersions from '../../projects/pages/definition/pages/list/_source/versions'
let eventModel
@ -270,7 +270,7 @@
...mapMutations('dag', ['addTasks', 'cacheTasks', 'resetParams', 'setIsEditDag', 'setName', 'addConnects']),
startRunning (item, startNodeList, sourceType) {
this.startData = item
this.startNodeList.startNodeList
this.startNodeList = startNodeList
this.sourceType = sourceType
this.startDialog = true
},
@ -345,7 +345,7 @@
* copy name
*/
_copyName () {
let clipboard = new Clipboard(`.copy-name`)
let clipboard = new Clipboard('.copy-name')
clipboard.on('success', e => {
this.$message.success(`${i18n.$t('Copy success')}`)
// Free memory
@ -384,7 +384,7 @@
let state = dom.find('.state-p')
let depState = ''
taskList.forEach(item => {
if(item.name==v1.name) {
if (item.name === v1.name) {
depState = item.state
}
})
@ -511,7 +511,7 @@
},
_closeDAG () {
let $name = this.$route.name
if($name && $name.indexOf("definition") != -1){
if ($name && $name.indexOf('definition') !== -1) {
this.$router.push({ name: 'projects-definition-list' })
} else {
this.$router.push({ name: 'projects-instance-list' })
@ -521,7 +521,7 @@
let tasks = value
let bool = true
tasks.map(v => {
if(v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] =='' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] =='' || v.conditionResult.failedNode[0] == null)) {
if (v.type === 'CONDITIONS' && (v.conditionResult.successNode[0] === '' || v.conditionResult.successNode[0] === null || v.conditionResult.failedNode[0] === '' || v.conditionResult.failedNode[0] === null)) {
bool = false
return false
}
@ -600,14 +600,14 @@
* View variables
*/
_toggleView () {
findComponentDownward(this.$root, `assist-dag-index`)._toggleView()
findComponentDownward(this.$root, 'assist-dag-index')._toggleView()
},
/**
* Starting parameters
*/
_toggleParam () {
findComponentDownward(this.$root, `starting-params-dag-index`)._toggleParam()
findComponentDownward(this.$root, 'starting-params-dag-index')._toggleParam()
},
addLineInfo ({ item, fromThis }) {
this.addConnects(item)
@ -628,6 +628,16 @@
this.lineDrawer = true
},
seeHistory (taskName) {
this.nodeData.self.$router.push({
name: 'task-instance',
query: {
processInstanceId: this.nodeData.self.$route.params.id,
taskName: taskName
}
})
},
addTaskInfo ({ item, fromThis }) {
this.addTasks(item)
this.nodeDrawer = false
@ -655,7 +665,7 @@
let rearNode = []
let rearList = []
$('div[data-targetarr*="' + id + '"]').each(function () {
rearNode.push($(this).attr("id"))
rearNode.push($(this).attr('id'))
})
if (rearNode.length > 0) {
@ -692,10 +702,9 @@
this.nodeData.instanceId = this.$route.params.id
this.nodeDrawer = true
},
removeEventModelById ($id) {
if(eventModel && this.taskId == $id){
if (eventModel && this.taskId === $id) {
eventModel.remove()
}
},
@ -748,7 +757,6 @@
* query the process definition pagination version
*/
_version (item) {
let self = this
this.getProcessDefinitionVersionsPage({
pageNo: 1,
pageSize: 10,
@ -766,17 +774,15 @@
this.versionData.pageNo = pageNo
this.versionData.pageSize = pageSize
this.drawer = true
}).catch(e => {
this.$message.error(e.msg || '')
})
}
},
watch: {
'tasks': {
tasks: {
deep: true,
handler (o) {
// Edit state does not allow deletion of node a...
this.setIsEditDag(true)
}

12
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue

@ -147,17 +147,17 @@
},
_verification () {
// Verification timeout policy
if (this.enable
&& (this.waitCompleteTimeout.enable && !this.waitCompleteTimeout.strategy.length)
|| (this.waitStartTimeout.enable && !this.waitStartTimeout.strategy.length)) {
if (this.enable &&
(this.waitCompleteTimeout.enable && !this.waitCompleteTimeout.strategy.length) ||
(this.waitStartTimeout.enable && !this.waitStartTimeout.strategy.length)) {
this.$message.warning(`${this.$t('Timeout strategy must be selected')}`)
return false
}
// Verify timeout duration Non 0 positive integer
const reg = /^[1-9]\d*$/
if (this.enable
&& (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval))
|| (this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) {
if (this.enable &&
(this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) ||
(this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) {
this.$message.warning(`${this.$t('Timeout must be a positive integer')}`)
return false
}

10
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue

@ -20,7 +20,7 @@
:disabled="isDetails"
size="small"
@change="_onChange"
v-model="value">
v-model="selectedValue">
<el-input
ref="input"
slot="trigger"
@ -53,6 +53,7 @@
name: 'form-select-input',
data () {
return {
selectedValue: this.value,
isIconState: false,
isInput: true
}
@ -88,7 +89,7 @@
}, 1)
},
_onBlur () {
let val = $(this.$refs['input'].$el).find('input')[0].value
let val = $(this.$refs.input.$el).find('input')[0].value
if (this._validation(val)) {
this.$emit('valueEvent', val)
this._setIconState(val)
@ -107,9 +108,12 @@
}
},
watch: {
value (val) {
this.selectedValue = val
}
},
created () {
this._setIconState(this.value)
this._setIconState(this.selectedValue)
},
mounted () {
},

7
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/workerGroups.vue

@ -18,7 +18,7 @@
<el-select
:disabled="isDetails"
@change="_onChange"
v-model="value"
v-model="selectedValue"
size="small"
style="width: 180px">
<el-option
@ -35,6 +35,7 @@
name: 'form-worker-group',
data () {
return {
selectedValue: this.value,
workerGroupsList: []
}
},
@ -51,11 +52,13 @@
},
methods: {
_onChange (o) {
this.value = o
this.$emit('workerGroupsEvent', o)
}
},
watch: {
value (val) {
this.selectedValue = val
}
},
created () {
let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || []

6
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue

@ -48,10 +48,6 @@
</div>
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import i18n from '@/module/i18n'
import JSP from './../plugIn/jsPlumbHandle'
import disabledState from '@/module/mixin/disabledState'
export default {
@ -61,7 +57,7 @@
// loading
spinnerLoading: false,
// node name
labelName: '',
labelName: ''
}
},
mixins: [disabledState],

54
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue

@ -342,8 +342,8 @@
successBranch: '',
failedBranch: '',
conditionResult: {
'successNode': [],
'failedNode': []
successNode: [],
failedNode: []
},
// dependence
dependence: {},
@ -382,7 +382,7 @@
// preTasks
preTaskIdsInWorkflow: [],
preTasksToAdd: [], // pre-taskIds to add, used in jsplumb connects
preTasksToDelete: [], // pre-taskIds to delete, used in jsplumb connects
preTasksToDelete: [] // pre-taskIds to delete, used in jsplumb connects
}
},
/**
@ -438,13 +438,7 @@
* Jump to task instance
*/
_seeHistory () {
this.nodeData.self.$router.push({
name: 'task-instance',
query: {
processInstanceId: this.nodeData.self.$route.params.id,
taskName: this.backfillItem.name
}
})
this.$emit('seeHistory', this.backfillItem.name)
},
/**
* Enter the child node to judge the process instance or the process definition
@ -522,7 +516,7 @@
this.$message.warning(`${i18n.$t('Please enter name (required)')}`)
return false
}
if (this.successBranch !='' && this.successBranch !=null && this.successBranch == this.failedBranch) {
if (this.successBranch !== '' && this.successBranch !== null && this.successBranch === this.failedBranch) {
this.$message.warning(`${i18n.$t('Cannot select the same node for successful branch flow and failed branch flow')}`)
return false
}
@ -538,11 +532,11 @@
},
_verifWorkGroup () {
let item = this.store.state.security.workerGroupsListAll.find(item => {
return item.id == this.workerGroup;
});
if(item==undefined) {
return item.id === this.workerGroup
})
if (item === undefined) {
this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`)
return false;
return false
}
return true
},
@ -560,11 +554,11 @@
}
// Verify task alarm parameters
if (this.nodeData.taskType === 'DEPENDENT') {
if (!this.$refs['dependentTimeout']._verification()) {
if (!this.$refs.dependentTimeout._verification()) {
return
}
} else {
if (!this.$refs['timeout']._verification()) {
if (!this.$refs.timeout._verification()) {
return
}
}
@ -574,11 +568,10 @@
return
}
// Verify preTasks and update dag-things
if (this.$refs['PRE_TASK']) {
if (!this.$refs['PRE_TASK']._verification()) {
if (this.$refs.PRE_TASK) {
if (!this.$refs.PRE_TASK._verification()) {
return
}
else {
} else {
// Sync data-targetarr
$(`#${this.nodeData.id}`).attr(
'data-targetarr', this.preTaskIdsInWorkflow ? this.preTaskIdsInWorkflow.join(',') : '')
@ -602,7 +595,7 @@
let currentConnects = plumbIns.getAllConnections()
let len = currentConnects.length
for (let i = 0; i < len; i++) {
if (this.preTasksToDelete.indexOf(currentConnects[i].sourceId) > -1 && currentConnects[i].targetId == targetId) {
if (this.preTasksToDelete.indexOf(currentConnects[i].sourceId) > -1 && currentConnects[i].targetId === targetId) {
plumbIns.deleteConnection(currentConnects[i])
i -= 1
len -= 1
@ -725,15 +718,13 @@
this.failedBranch = o.conditionResult.failedNode[0]
}
// If the workergroup has been deleted, set the default workergroup
var hasMatch = false;
for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) {
var workerGroup = this.store.state.security.workerGroupsListAll[i].id
if (o.workerGroup == workerGroup) {
hasMatch = true;
break;
if (o.workerGroup === workerGroup) {
break
}
}
if(o.workerGroup == undefined) {
if (o.workerGroup === undefined) {
this.store.dispatch('dag/getTaskInstanceList', {
pageSize: 10, pageNo: 1, processInstanceId: this.nodeData.instanceId, name: o.name
}).then(res => {
@ -746,7 +737,6 @@
this.params = o.params || {}
this.dependence = o.dependence || {}
this.cacheDependence = o.dependence || {}
} else {
this.workerGroup = this.store.state.security.workerGroupsListAll[0].id
}
@ -765,10 +755,10 @@
},
mounted () {
let self = this
$("#cancelBtn").mousedown(function(event){
event.preventDefault();
$('#cancelBtn').mousedown(function (event) {
event.preventDefault()
self.close()
});
})
},
updated () {
},
@ -826,7 +816,7 @@
mDependentTimeout,
mPriority,
mWorkerGroups,
mPreTasks,
mPreTasks
}
}
</script>

12
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue

@ -67,7 +67,7 @@
*/
const handerTextareaSize = (isH = 0) => {
$('body').find('.tooltip.fade.top.in').remove()
return $('.textarea-ft').css({ 'height': `${$('.content-log-box').height() - isH}px` })
return $('.textarea-ft').css({ height: `${$('.content-log-box').height() - isH}px` })
}
let content = ''
@ -89,7 +89,7 @@
props: {
item: {
type: Object,
default: {}
default: Object
},
source: {
type: String,
@ -179,8 +179,8 @@
this.loadingIndex = this.loadingIndex - 1
this._ckLog()
}, 1000, {
'leading': false,
'trailing': true
leading: false,
trailing: true
}),
/**
* down
@ -189,8 +189,8 @@
this.loadingIndex = this.loadingIndex + 1
this._ckLog()
}, 1000, {
'leading': false,
'trailing': true
leading: false,
trailing: true
}),
/**
* Monitor scroll bar

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue

@ -128,7 +128,7 @@
this.$emit('on-dsData', {
type: this.type,
datasource: val
});
})
}
},
created () {

3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue

@ -109,7 +109,6 @@
* remove task
*/
_remove (i) {
this.dependTaskList[this.index].dependItemList.splice(i,1)
this._removeTip()
if (!this.dependItemList.length || this.dependItemList.length === 0) {
this.$emit('on-delete-all', {
@ -212,7 +211,7 @@
depTasksList: depTasksList,
cycle: 'day',
dateValue: 'today',
dateValueList: _.cloneDeep(dateValueList['day']),
dateValueList: _.cloneDeep(dateValueList.day),
state: ''
}
},

3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue

@ -191,7 +191,7 @@
},
computed: {
inputStyle () {
return "width:30%"
return 'width:30%'
}
},
mounted () {
@ -240,4 +240,3 @@
}
}
</style>

7
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue

@ -31,7 +31,6 @@
</template>
<script>
import _ from 'lodash'
import i18n from '@/module/i18n'
import mListBox from './listBox'
import disabledState from '@/module/mixin/disabledState'
import codemirror from '@/conf/home/pages/resource/pages/file/pages/_source/codemirror'
@ -43,7 +42,7 @@
data () {
return {
// script
rawScript: '',
rawScript: ''
}
},
mixins: [disabledState],
@ -61,7 +60,7 @@
mode: 'shell',
readOnly: this.isDetails
})
editor.on("change",function(){
editor.on('change', function () {
self.$emit('getJsonBoxValue', editor.getValue())
})
@ -79,7 +78,7 @@
editor.setValue(this.rawScript)
return editor
},
}
},
watch: {},
created () {

4
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue

@ -45,7 +45,7 @@
</template>
<script>
import _ from 'lodash'
import { cycleList, dateValueList, nodeStatusList } from './commcon'
import { cycleList, nodeStatusList } from './commcon'
import disabledState from '@/module/mixin/disabledState'
export default {
name: 'node-status',
@ -87,7 +87,6 @@
* remove task
*/
_remove (i) {
this.dependTaskList[this.index].dependItemList.splice(i,1)
this._removeTip()
if (!this.dependItemList.length || this.dependItemList.length === 0) {
this.$emit('on-delete-all', {
@ -159,7 +158,6 @@
this.isInstance = this.router.history.current.name === 'projects-instance-details'
// get processlist
this._getProjectList().then(() => {
let projectId = this.projectList[0].value
if (!this.dependItemList.length) {
this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams()))
} else {

7
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue

@ -31,7 +31,6 @@
</template>
<script>
import _ from 'lodash'
import i18n from '@/module/i18n'
import mListBox from './listBox'
import disabledState from '@/module/mixin/disabledState'
import codemirror from '@/conf/home/pages/resource/pages/file/pages/_source/codemirror'
@ -43,7 +42,7 @@
data () {
return {
// script
rawScript: '',
rawScript: ''
}
},
mixins: [disabledState],
@ -61,7 +60,7 @@
mode: 'shell',
readOnly: this.isDetails
})
editor.on("change",function(){
editor.on('change', function () {
self.$emit('getSriptBoxValue', editor.getValue())
})
@ -79,7 +78,7 @@
editor.setValue(this.rawScript)
return editor
},
}
},
watch: {},
created () {

3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/sqlType.vue

@ -32,7 +32,6 @@
</div>
</template>
<script>
import _ from 'lodash'
import { sqlTypeList } from './commcon'
import disabledState from '@/module/mixin/disabledState'
export default {
@ -61,7 +60,7 @@
},
created () {
this.$nextTick(() => {
if (this.sqlType != 0) {
if (this.sqlType !== 0) {
this.sqlTypeId = this.sqlType
} else {
this.sqlTypeId = this.sqlTypeList[0].id

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue

@ -93,7 +93,7 @@
},
type (a) {
// The props parameter needs to be changed due to the scene.
this.udfs = ''
this.$emit('on-udfsData', '')
if (a === 'HIVE') {
this._getUdfList()
} else {

8
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue

@ -99,6 +99,7 @@
$('body').find('.tooltip.fade.top.in').remove()
},
_onDeleteAll (i) {
this.dependTaskList[this.index].dependItemList.splice(i, 1)
this.dependTaskList.map((item, i) => {
if (item.dependItemList.length === 0) {
this.dependTaskList.splice(i, 1)
@ -142,20 +143,17 @@
},
created () {
let o = this.backfillItem
let dependentResult = $(`#${o.id}`).data('dependent-result') || {}
// Does not represent an empty object backfill
if (!_.isEmpty(o)) {
this.relation = _.cloneDeep(o.dependence.relation) || 'AND'
this.dependTaskList = _.cloneDeep(o.dependence.dependTaskList) || []
let defaultState = this.isDetails ? 'WAITING' : ''
// Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
$(`#${o.id}`).siblings().each(function () {
if(v1.depTasks == $(this).text()) {
if (v1.depTasks === $(this).text()) {
v1.state = $(this).attr('data-dependent-depstate')
}
});
})
}))
}
},

16
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue

@ -219,7 +219,7 @@
// jvm memory xms
xmx: 1,
scriptBoxDialog: false,
item: '',
item: ''
}
},
mixins: [disabledState],
@ -335,7 +335,6 @@
return false
}
debugger
// storage
this.$emit('on-params', {
customConfig: this.customConfig,
@ -427,8 +426,8 @@
preStatements: this.preStatements,
postStatements: this.postStatements,
xms: +this.xms,
xmx: +this.xmx,
});
xmx: +this.xmx
})
},
_destroyEditor () {
if (editor) {
@ -450,12 +449,11 @@
// Non-null objects represent backfill
if (!_.isEmpty(o)) {
// set jvm memory
this.xms = o.params.xms || 1 ;
this.xmx = o.params.xmx || 1 ;
this.xms = o.params.xms || 1
this.xmx = o.params.xmx || 1
// backfill
if(o.params.customConfig == 0) {
if (o.params.customConfig === 0) {
this.customConfig = 0
this.enable = false
this.dsType = o.params.dsType || ''
@ -503,7 +501,7 @@
watch: {
// Watch the cacheParams
cacheParams (val) {
this._cacheParams();
this._cacheParams()
}
},
computed: {

5
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue

@ -97,6 +97,7 @@
$('body').find('.tooltip.fade.top.in').remove()
},
_onDeleteAll (i) {
this.dependTaskList[this.index].dependItemList.splice(i, 1)
this.dependTaskList.map((item, i) => {
if (item.dependItemList.length === 0) {
this.dependTaskList.splice(i, 1)
@ -147,7 +148,9 @@
this.dependTaskList = _.cloneDeep(o.dependence.dependTaskList) || []
let defaultState = this.isDetails ? 'WAITING' : ''
// Process instance return status display matches by key
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => v1.state = dependentResult[`${v1.definitionId}-${v1.depTasks}-${v1.cycle}-${v1.dateValue}`] || defaultState))
_.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => {
v1.state = dependentResult[`${v1.definitionId}-${v1.depTasks}-${v1.cycle}-${v1.dateValue}`] || defaultState
}))
}
},
mounted () {

72
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue

@ -184,7 +184,6 @@
import i18n from '@/module/i18n'
import mLocalParams from './_source/localParams'
import mListBox from './_source/listBox'
import mResources from './_source/resources'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import disabledState from '@/module/mixin/disabledState'
@ -236,7 +235,7 @@
}
},
allNoResources: [],
noRes: [],
noRes: []
}
},
props: {
@ -284,7 +283,6 @@
return false
}
if (!this.mainJar) {
this.$message.warning(`${i18n.$t('Please enter main jar package')}`)
return false
@ -345,8 +343,8 @@
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -357,17 +355,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -384,14 +382,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -415,7 +413,7 @@
this.mainJarList = this.mainJarList.concat(noResources)
}
}
},
}
},
watch: {
// Listening type
@ -426,11 +424,23 @@
},
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -445,23 +455,16 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
mainClass: this.mainClass,
mainJar: {
id: this.mainJar
},
deployMode: this.deployMode,
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams,
slot: this.slot,
taskManager: this.taskManager,
@ -486,7 +489,7 @@
this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res)
} else if(o.params.mainJar.res=='') {
} else if (o.params.mainJar.res === '') {
this.mainJar = ''
} else {
this.mainJar = o.params.mainJar.id || ''
@ -498,7 +501,6 @@
this.jobManagerMemory = o.params.jobManagerMemory || '1G'
this.taskManagerMemory = o.params.taskManagerMemory || '2G'
this.mainArgs = o.params.mainArgs || ''
this.others = o.params.others
this.programType = o.params.programType || 'SCALA'
@ -537,7 +539,7 @@
mounted () {
},
components: { mLocalParams, mListBox, mResources, Treeselect }
components: { mLocalParams, mListBox, Treeselect }
}
</script>

7
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue

@ -89,7 +89,6 @@
</div>
</m-list-box>
<m-list-box >
<div slot="text">{{$t('Timeout Settings')}}</div>
<div slot="content">
@ -154,7 +153,7 @@
httpMethod: 'GET',
httpMethodList: [{ code: 'GET' }, { code: 'POST' }, { code: 'HEAD' }, { code: 'PUT' }, { code: 'DELETE' }],
httpCheckCondition: 'STATUS_CODE_DEFAULT',
httpCheckConditionList: cookies.get('language') == 'en_US'? [{ code: 'STATUS_CODE_DEFAULT',value:'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM',value:'Custom response code' }, { code: 'BODY_CONTAINS',value:'Content includes' }, { code: 'BODY_NOT_CONTAINS',value:'Content does not contain' }]:[{ code: 'STATUS_CODE_DEFAULT',value:'默认响应码200' }, { code: 'STATUS_CODE_CUSTOM',value:'自定义响应码' }, { code: 'BODY_CONTAINS',value:'内容包含' }, { code: 'BODY_NOT_CONTAINS',value:'内容不包含' }]
httpCheckConditionList: cookies.get('language') === 'en_US' ? [{ code: 'STATUS_CODE_DEFAULT', value: 'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM', value: 'Custom response code' }, { code: 'BODY_CONTAINS', value: 'Content includes' }, { code: 'BODY_NOT_CONTAINS', value: 'Content does not contain' }] : [{ code: 'STATUS_CODE_DEFAULT', value: '默认响应码200' }, { code: 'STATUS_CODE_CUSTOM', value: '自定义响应码' }, { code: 'BODY_CONTAINS', value: '内容包含' }, { code: 'BODY_NOT_CONTAINS', value: '内容不包含' }]
}
},
props: {
@ -231,7 +230,7 @@
* @param val
*/
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
}
},
created () {
@ -244,7 +243,7 @@
this.condition = o.params.condition || ''
this.connectTimeout = o.params.connectTimeout
this.socketTimeout = o.params.socketTimeout
if(this.connectTimeout != 60000 || this.socketTimeout != 60000 ){
if (this.connectTimeout !== 60000 || this.socketTimeout !== 60000) {
this.timeoutSettings = true
}
// backfill localParams

68
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue

@ -100,7 +100,6 @@
import _ from 'lodash'
import i18n from '@/module/i18n'
import mListBox from './_source/listBox'
import mResources from './_source/resources'
import mLocalParams from './_source/localParams'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -178,8 +177,8 @@
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -190,17 +189,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -217,14 +216,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -288,7 +287,7 @@
programType: this.programType
})
return true
},
}
},
watch: {
@ -302,11 +301,23 @@
},
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -321,22 +332,15 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
mainClass: this.mainClass,
mainJar: {
id: this.mainJar
},
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams,
mainArgs: this.mainArgs,
others: this.others,
@ -358,7 +362,7 @@
this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res)
} else if(o.params.mainJar.res=='') {
} else if (o.params.mainJar.res === '') {
this.mainJar = ''
} else {
this.mainJar = o.params.mainJar.id || ''
@ -401,7 +405,7 @@
mounted () {
},
components: { mLocalParams, mListBox, mResources, Treeselect }
components: { mLocalParams, mListBox, Treeselect }
}
</script>

10
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue

@ -55,11 +55,11 @@
return {
preTasksSelectorId: '_preTasksSelectorId', // Refresh target vue-component by changing id
preTasks: [],
preTasksOld: [],
preTasksOld: []
}
},
mounted () {
this.preTasks = this.backfillItem['preTasks'] || this.preTasks
this.preTasks = this.backfillItem.preTasks || this.preTasks
this.preTasksOld = this.preTasks
// Refresh target vue-component by changing id
@ -69,7 +69,7 @@
},
computed: {
preTaskList: function () {
let currentTaskId = this.backfillItem['id'] || this.id
let currentTaskId = this.backfillItem.id || this.id
let cacheTasks = Object.assign({}, this.store.state.dag.tasks)
let keys = Object.keys(cacheTasks)
for (let i = 0; i < keys.length; i++) {
@ -92,7 +92,7 @@
// preTaskIds used to delete connection
preTasksToDelete: function () {
return this.preTasksOld.filter(taskId => this.preTasks.indexOf(taskId) === -1)
},
}
},
methods: {
// Pass data to parent-level to process dag
@ -100,7 +100,7 @@
this.$emit('on-pre-tasks', {
preTasks: this.preTasks,
preTasksToAdd: this.preTasksToAdd,
preTasksToDelete: this.preTasksToDelete,
preTasksToDelete: this.preTasksToDelete
})
return true
}

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue

@ -124,7 +124,7 @@
watch: {
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
}
},
computed: {

64
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue

@ -61,7 +61,6 @@
import i18n from '@/module/i18n'
import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mResources from './_source/resources'
import mLocalParams from './_source/localParams'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -183,8 +182,8 @@
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -195,17 +194,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -222,14 +221,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -258,11 +257,23 @@
watch: {
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -277,18 +288,11 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams
}
}
@ -343,7 +347,7 @@
editor.toTextArea() // Uninstall
editor.off($('.code-python-mirror'), 'keypress', this.keypress)
},
components: { mLocalParams, mListBox, mResources,Treeselect, mScriptBox }
components: { mLocalParams, mListBox, Treeselect, mScriptBox }
}
</script>
<style lang="scss" rel="stylesheet/scss" scope>

64
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue

@ -63,7 +63,6 @@
import i18n from '@/module/i18n'
import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mResources from './_source/resources'
import mLocalParams from './_source/localParams'
import disabledState from '@/module/mixin/disabledState'
import Treeselect from '@riophae/vue-treeselect'
@ -192,8 +191,8 @@
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -204,17 +203,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -231,14 +230,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -267,11 +266,23 @@
watch: {
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -286,18 +297,11 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams
}
}
@ -354,7 +358,7 @@
editor.off($('.code-shell-mirror'), 'keypress', this.keypress)
}
},
components: { mLocalParams, mListBox, mResources, mScriptBox, Treeselect }
components: { mLocalParams, mListBox, mScriptBox, Treeselect }
}
</script>
<style lang="scss" rel="stylesheet/scss" scope>

64
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue

@ -195,7 +195,6 @@
import i18n from '@/module/i18n'
import mLocalParams from './_source/localParams'
import mListBox from './_source/listBox'
import mResources from './_source/resources'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import disabledState from '@/module/mixin/disabledState'
@ -289,8 +288,8 @@
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -301,17 +300,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -328,14 +327,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -457,10 +456,22 @@
// Watch the cacheParams
cacheParams (val) {
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -475,23 +486,16 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
mainClass: this.mainClass,
mainJar: {
id: this.mainJar
},
deployMode: this.deployMode,
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams,
driverCores: this.driverCores,
driverMemory: this.driverMemory,
@ -519,7 +523,7 @@
this.mainClass = o.params.mainClass || ''
if (o.params.mainJar.res) {
this.marjarId(o.params.mainJar.res)
} else if(o.params.mainJar.res=='') {
} else if (o.params.mainJar.res === '') {
this.mainJar = ''
} else {
this.mainJar = o.params.mainJar.id || ''
@ -569,7 +573,7 @@
mounted () {
},
components: { mLocalParams, mListBox, mResources, Treeselect }
components: { mLocalParams, mListBox, Treeselect }
}
</script>

23
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue

@ -214,7 +214,7 @@
*/
_onSqlType (a) {
this.sqlType = a
if(a==0) {
if (a === 0) {
this.showType = ['TABLE']
}
},
@ -262,24 +262,24 @@
if (!this.$refs.refDs._verifDatasource()) {
return false
}
if (this.sqlType==0 && !this.showType.length) {
if (this.sqlType === 0 && !this.showType.length) {
this.$message.warning(`${i18n.$t('One form or attachment must be selected')}`)
return false
}
if (this.sqlType==0 && !this.title) {
if (this.sqlType === 0 && !this.title) {
this.$message.warning(`${i18n.$t('Mail subject required')}`)
return false
}
if (this.sqlType==0 && !this.receivers.length) {
if (this.sqlType === 0 && !this.receivers.length) {
this.$message.warning(`${i18n.$t('Recipient required')}`)
return false
}
// receivers Subcomponent verification
if (this.sqlType==0 && !this.$refs.refEmail._manualEmail()) {
if (this.sqlType === 0 && !this.$refs.refEmail._manualEmail()) {
return false
}
// receiversCc Subcomponent verification
if (this.sqlType==0 && !this.$refs.refCc._manualEmail()) {
if (this.sqlType === 0 && !this.$refs.refCc._manualEmail()) {
return false
}
// udfs Subcomponent verification Verification only if the data type is HIVE
@ -390,7 +390,6 @@
receivers: this.receivers.join(','),
receiversCc: this.receiversCc.join(','),
showType: (() => {
let showType = this.showType
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
return [showType[1], showType[0]].join(',')
@ -402,7 +401,7 @@
connParams: this.connParams,
preStatements: this.preStatements,
postStatements: this.postStatements
});
})
},
_destroyEditor () {
if (editor) {
@ -415,10 +414,10 @@
watch: {
// Listening to sqlType
sqlType (val) {
if (val==0) {
if (val === 0) {
this.showType = []
}
if (val != 0) {
if (val !== 0) {
this.title = ''
this.receivers = []
this.receiversCc = []
@ -448,7 +447,7 @@
this.sqlType = o.params.sqlType
this.connParams = o.params.connParams || ''
this.localParams = o.params.localParams || []
if(o.params.showType == '') {
if (o.params.showType === '') {
this.showType = []
} else {
this.showType = o.params.showType.split(',') || []
@ -491,7 +490,6 @@
receivers: this.receivers.join(','),
receiversCc: this.receiversCc.join(','),
showType: (() => {
let showType = this.showType
if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
return [showType[1], showType[0]].join(',')
@ -520,4 +518,3 @@
top: -16px;
}
</style>

274
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue

@ -640,77 +640,77 @@
sourceTypeList: [
{
code: "MYSQL"
},
code: 'MYSQL'
}
],
targetTypeList: [
{
code:"HIVE"
code: 'HIVE'
},
{
code:"HDFS"
code: 'HDFS'
}
],
sourceType:"MYSQL",
targetType:"HDFS",
sourceType: 'MYSQL',
targetType: 'HDFS',
sourceMysqlParams: {
srcType:"MYSQL",
srcDatasource:"",
srcTable:"",
srcQueryType:"1",
srcType: 'MYSQL',
srcDatasource: '',
srcTable: '',
srcQueryType: '1',
srcQuerySql: '',
srcColumnType:"0",
srcColumns:"",
srcColumnType: '0',
srcColumns: '',
srcConditionList: [],
mapColumnHive: [],
mapColumnJava: []
},
sourceHdfsParams: {
exportDir:""
exportDir: ''
},
sourceHiveParams: {
hiveDatabase:"",
hiveTable:"",
hivePartitionKey:"",
hivePartitionValue:""
hiveDatabase: '',
hiveTable: '',
hivePartitionKey: '',
hivePartitionValue: ''
},
targetHdfsParams: {
targetPath:"",
targetPath: '',
deleteTargetDir: true,
fileType:"--as-avrodatafile",
compressionCodec:"snappy",
fieldsTerminated:"",
linesTerminated:"",
fileType: '--as-avrodatafile',
compressionCodec: 'snappy',
fieldsTerminated: '',
linesTerminated: ''
},
targetMysqlParams: {
targetType:"MYSQL",
targetDatasource:"",
targetTable:"",
targetColumns:"",
fieldsTerminated:"",
linesTerminated:"",
preQuery:"",
targetType: 'MYSQL',
targetDatasource: '',
targetTable: '',
targetColumns: '',
fieldsTerminated: '',
linesTerminated: '',
preQuery: '',
isUpdate: false,
targetUpdateKey:"",
targetUpdateMode:"allowinsert"
targetUpdateKey: '',
targetUpdateMode: 'allowinsert'
},
targetHiveParams: {
hiveDatabase:"",
hiveTable:"",
hiveDatabase: '',
hiveTable: '',
createHiveTable: false,
dropDelimiter: false,
hiveOverWrite: true,
replaceDelimiter:"",
hivePartitionKey:"",
hivePartitionValue:""
replaceDelimiter: '',
hivePartitionKey: '',
hivePartitionValue: ''
},
item: '',
scriptBoxDialog: false
@ -750,79 +750,79 @@
case 'import':
this.sourceTypeList = [
{
code:"MYSQL"
},
code: 'MYSQL'
}
]
break;
break
case 'export':
this.sourceTypeList = [
{
code: "HDFS"
code: 'HDFS'
},
{
code: "HIVE"
code: 'HIVE'
}
]
break;
break
default:
this.sourceTypeList = [
{
code:"MYSQL"
code: 'MYSQL'
},
{
code:"HIVE"
code: 'HIVE'
},
{
code:"HDFS"
code: 'HDFS'
}
]
break;
break
}
},
_getTargetTypeList (data) {
switch (data) {
case 'MYSQL':
if (this.srcQueryType === "1") {
if (this.srcQueryType === '1') {
this.targetTypeList = [
{
code: "HDFS"
code: 'HDFS'
}]
} else {
this.targetTypeList = [
{
code: "HIVE"
code: 'HIVE'
},
{
code: "HDFS"
code: 'HDFS'
}
]
}
break;
break
case 'HDFS':
this.targetTypeList = [
{
code:"MYSQL"
code: 'MYSQL'
}
]
break;
break
case 'HIVE':
this.targetTypeList = [
{
code:"MYSQL"
code: 'MYSQL'
}
]
break;
break
default:
this.targetTypeList = [
{
code:"HIVE"
code: 'HIVE'
},
{
code:"HDFS"
code: 'HDFS'
}
]
break;
break
}
},
@ -856,23 +856,23 @@
_handleSourceParams () {
var params = null
switch (this.sourceType) {
case "MYSQL":
this.sourceMysqlParams.srcQuerySql = this.sourceMysqlParams.srcQueryType === "1" && editor ?
editor.getValue() : this.sourceMysqlParams.srcQuerySql
case 'MYSQL':
this.sourceMysqlParams.srcQuerySql = this.sourceMysqlParams.srcQueryType === '1' && editor
? editor.getValue() : this.sourceMysqlParams.srcQuerySql
params = JSON.stringify(this.sourceMysqlParams)
break;
case "ORACLE":
break
case 'ORACLE':
params = JSON.stringify(this.sourceOracleParams)
break;
case "HDFS":
break
case 'HDFS':
params = JSON.stringify(this.sourceHdfsParams)
break;
case "HIVE":
break
case 'HIVE':
params = JSON.stringify(this.sourceHiveParams)
break;
break
default:
params = "";
break;
params = ''
break
}
return params
},
@ -883,18 +883,18 @@
_handleTargetParams () {
var params = null
switch (this.targetType) {
case "HIVE":
case 'HIVE':
params = JSON.stringify(this.targetHiveParams)
break;
case "HDFS":
break
case 'HDFS':
params = JSON.stringify(this.targetHdfsParams)
break;
case "MYSQL":
break
case 'MYSQL':
params = JSON.stringify(this.targetMysqlParams)
break;
break
default:
params = "";
break;
params = ''
break
}
return params
@ -905,21 +905,21 @@
*/
_getSourceParams (data) {
switch (this.sourceType) {
case "MYSQL":
case 'MYSQL':
this.sourceMysqlParams = JSON.parse(data)
this.srcDatasource = this.sourceMysqlParams.srcDatasource
break;
case "ORACLE":
break
case 'ORACLE':
this.sourceOracleParams = JSON.parse(data)
break;
case "HDFS":
break
case 'HDFS':
this.sourceHdfsParams = JSON.parse(data)
break;
case "HIVE":
break
case 'HIVE':
this.sourceHiveParams = JSON.parse(data)
break;
break
default:
break;
break
}
},
@ -928,22 +928,21 @@
*/
_getTargetParams (data) {
switch (this.targetType) {
case "HIVE":
case 'HIVE':
this.targetHiveParams = JSON.parse(data)
break;
case "HDFS":
break
case 'HDFS':
this.targetHdfsParams = JSON.parse(data)
break;
case "MYSQL":
break
case 'MYSQL':
this.targetMysqlParams = JSON.parse(data)
this.targetDatasource = this.targetMysqlParams.targetDatasource
break;
break
default:
break;
break
}
},
/**
* verification
*/
@ -957,7 +956,7 @@
this.$message.warning(`${i18n.$t('Please enter Custom Shell(required)')}`)
return false
}
sqoopParams['customShell'] = shellEditor.getValue()
sqoopParams.customShell = shellEditor.getValue()
} else {
if (!this.jobName) {
this.$message.warning(`${i18n.$t('Please enter Job Name(required)')}`)
@ -965,7 +964,7 @@
}
switch (this.sourceType) {
case "MYSQL":
case 'MYSQL':
if (!this.$refs.refSourceDs._verifDatasource()) {
return false
}
@ -974,84 +973,84 @@
this.$message.warning(`${i18n.$t('Please enter a SQL Statement(required)')}`)
return false
}
this.sourceMysqlParams.srcTable = ""
this.sourceMysqlParams.srcColumnType = "0"
this.sourceMysqlParams.srcColumns = ""
this.sourceMysqlParams.srcTable = ''
this.sourceMysqlParams.srcColumnType = '0'
this.sourceMysqlParams.srcColumns = ''
} else {
if (this.sourceMysqlParams.srcTable === "") {
if (this.sourceMysqlParams.srcTable === '') {
this.$message.warning(`${i18n.$t('Please enter Mysql Table(required)')}`)
return false
}
this.sourceMysqlParams.srcQuerySql = ""
if (this.sourceMysqlParams.srcColumnType === "1" && this.sourceMysqlParams.srcColumns === "") {
this.sourceMysqlParams.srcQuerySql = ''
if (this.sourceMysqlParams.srcColumnType === '1' && this.sourceMysqlParams.srcColumns === '') {
this.$message.warning(`${i18n.$t('Please enter Columns (Comma separated)')}`)
return false
}
if (this.sourceMysqlParams.srcColumnType === "0") {
this.sourceMysqlParams.srcColumns = ""
if (this.sourceMysqlParams.srcColumnType === '0') {
this.sourceMysqlParams.srcColumns = ''
}
}
break;
case "HDFS":
if (this.sourceHdfsParams.exportDir === "") {
break
case 'HDFS':
if (this.sourceHdfsParams.exportDir === '') {
this.$message.warning(`${i18n.$t('Please enter Export Dir(required)')}`)
return false
}
break;
case "HIVE":
if (this.sourceHiveParams.hiveDatabase === "") {
break
case 'HIVE':
if (this.sourceHiveParams.hiveDatabase === '') {
this.$message.warning(`${i18n.$t('Please enter Hive Database(required)')}`)
return false
}
if (this.sourceHiveParams.hiveTable === "") {
if (this.sourceHiveParams.hiveTable === '') {
this.$message.warning(`${i18n.$t('Please enter Hive Table(required)')}`)
return false
}
break;
break
default:
break;
break
}
switch (this.targetType) {
case "HIVE":
if (this.targetHiveParams.hiveDatabase === "") {
case 'HIVE':
if (this.targetHiveParams.hiveDatabase === '') {
this.$message.warning(`${i18n.$t('Please enter Hive Database(required)')}`)
return false
}
if (this.targetHiveParams.hiveTable === "") {
if (this.targetHiveParams.hiveTable === '') {
this.$message.warning(`${i18n.$t('Please enter Hive Table(required)')}`)
return false
}
break;
case "HDFS":
if (this.targetHdfsParams.targetPath === "") {
break
case 'HDFS':
if (this.targetHdfsParams.targetPath === '') {
this.$message.warning(`${i18n.$t('Please enter Target Dir(required)')}`)
return false
}
break;
case "MYSQL":
break
case 'MYSQL':
if (!this.$refs.refTargetDs._verifDatasource()) {
return false
}
if (this.targetMysqlParams.targetTable === "") {
if (this.targetMysqlParams.targetTable === '') {
this.$message.warning(`${i18n.$t('Please enter Mysql Table(required)')}`)
return false
}
break;
break
default:
break;
break
}
sqoopParams['jobName'] = this.jobName
sqoopParams['hadoopCustomParams'] = this.hadoopCustomParams
sqoopParams['sqoopAdvancedParams'] = this.sqoopAdvancedParams
sqoopParams['concurrency'] = this.concurrency
sqoopParams['modelType'] = this.modelType
sqoopParams['sourceType'] = this.sourceType
sqoopParams['targetType'] = this.targetType
sqoopParams['targetParams'] = this._handleTargetParams()
sqoopParams['sourceParams'] = this._handleSourceParams()
sqoopParams.jobName = this.jobName
sqoopParams.hadoopCustomParams = this.hadoopCustomParams
sqoopParams.sqoopAdvancedParams = this.sqoopAdvancedParams
sqoopParams.concurrency = this.concurrency
sqoopParams.modelType = this.modelType
sqoopParams.sourceType = this.sourceType
sqoopParams.targetType = this.targetType
sqoopParams.targetParams = this._handleTargetParams()
sqoopParams.sourceParams = this._handleSourceParams()
}
// storage
@ -1149,7 +1148,7 @@
sourceParams: this._handleSourceParams(),
targetParams: this._handleTargetParams(),
localParams: this.localParams
});
})
},
_destroyEditor () {
@ -1171,10 +1170,10 @@
watch: {
// Listening to sqlType
sqlType (val) {
if (val==0) {
if (val === 0) {
this.showType = []
}
if (val != 0) {
if (val !== 0) {
this.title = ''
this.receivers = []
this.receiversCc = []
@ -1276,4 +1275,3 @@
top: -16px;
}
</style>

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue

@ -119,7 +119,7 @@
this.wdiCurr = o.params.processDefinitionId
} else {
if (this.processDefinitionList.length) {
this.wdiCurr = this.processDefinitionList[0]['id']
this.wdiCurr = this.processDefinitionList[0].id
this.$emit('on-set-process-name', this._handleName(this.wdiCurr))
}
}

89
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue

@ -97,8 +97,6 @@
import _ from 'lodash'
import i18n from '@/module/i18n'
import mListBox from './_source/listBox'
import mScriptBox from './_source/scriptBox'
import mResources from './_source/resources'
import mLocalParams from './_source/localParams'
import disabledState from '@/module/mixin/disabledState'
import Treeselect from '@riophae/vue-treeselect'
@ -112,7 +110,7 @@
// script
rawScript: '',
// waterdrop script
baseScript: 'sh ${WATERDROP_HOME}/bin/start-waterdrop.sh',
baseScript: 'sh ${WATERDROP_HOME}/bin/start-waterdrop.sh', // eslint-disable-line
// resourceNameVal
resourceNameVal: [],
// Custom parameter
@ -186,7 +184,7 @@
this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`)
return false
}
if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length==0) {
if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length === 0) {
this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`)
return false
}
@ -201,7 +199,7 @@
let master = this.master
let masterUrl = this.masterUrl
if(this.deployMode == 'local'){
if (this.deployMode === 'local') {
master = 'local'
masterUrl = ''
deployMode = 'client'
@ -227,15 +225,15 @@
this.$emit('on-params', {
resourceList: dataProcessing,
localParams: this.localParams,
rawScript: tureScript,
rawScript: tureScript
})
return true
},
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?
this.operationTree(item) : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? this.operationTree(item) : this.diGuiTree(item.children)
})
},
operationTree (item) {
@ -246,17 +244,17 @@
},
searchTree (element, id) {
// id
if (element.id == id) {
return element;
} else if (element.children != null) {
var i;
var result = null;
for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id);
if (element.id === id) {
return element
} else if (element.children !== null) {
var i
var result = null
for (i = 0; result === null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id)
}
return result;
return result
}
return null;
return null
},
dataProcess (backResource) {
let isResourceId = []
@ -273,14 +271,14 @@
return item.id
})
Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
let diffSet = this.resourceList.diff(resourceIdArr);
return this.filter(function (i) { return a.indexOf(i) < 0 })
}
let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = []
if (diffSet.length > 0) {
diffSet.forEach(item => {
backResource.forEach(item1 => {
if(item==item1.id || item==item1.res) {
if (item === item1.id || item === item1.res) {
optionsCmp.push(item1)
}
})
@ -310,23 +308,35 @@
// Watch the cacheParams
cacheParams (val) {
this.resourceNameVal = val
this.$emit('on-cache-params', val);
this.$emit('on-cache-params', val)
},
resourceIdArr (arr) {
let result = []
arr.forEach(item => {
this.allNoResources.forEach(item1 => {
if (item.id === item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
},
"master": {
master: {
handler (code) {
if(code == 'spark://'){
this.masterUrlState = true;
}else if(code == 'mesos://'){
this.masterUrlState = true;
if (code === 'spark://') {
this.masterUrlState = true
} else if (code === 'mesos://') {
this.masterUrlState = true
} else {
this.masterUrlState = false;
this.masterUrlState = false
this.masterUrl = ''
}
}
},
}
},
computed: {
cacheParams () {
resourceIdArr () {
let isResourceId = []
let resourceIdArr = []
if (this.resourceList.length > 0) {
@ -341,23 +351,16 @@
return { id: item.id, name: item.name, res: item.fullName }
})
}
let result = []
resourceIdArr.forEach(item=>{
this.allNoResources.forEach(item1=>{
if(item.id==item1.id) {
// resultBool = true
result.push(item1)
}
})
})
this.noRes = result
return resourceIdArr
},
cacheParams () {
return {
resourceList: resourceIdArr,
resourceList: this.resourceIdArr,
localParams: this.localParams,
deployMode: this.deployMode,
master: this.master,
masterUrl: this.masterUrl,
queue:this.queue,
queue: this.queue
}
}
},
@ -408,7 +411,7 @@
},
destroyed () {
},
components: { mLocalParams, mListBox, mResources, mScriptBox, Treeselect }
components: { mLocalParams, mListBox, Treeselect }
}
</script>
<style lang="scss" rel="stylesheet/scss" scope>

3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue

@ -35,6 +35,7 @@
</div>
</template>
<script>
import _ from 'lodash'
import store from '@/conf/home/store'
import { runningType } from '@/conf/home/pages/dag/_source/config'
import { warningTypeList } from '@/conf/home/pages/projects/pages/definition/pages/list/_source/util'
@ -92,7 +93,7 @@
}
},
watch: {
'$route': {
$route: {
deep: true,
handler () {
this.isActive = false

11
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue

@ -18,7 +18,7 @@
<el-select
:disabled="isDetails"
@change="_onChange"
v-model="value"
v-model="selectedValue"
size="small"
style="width: 180px">
<el-option
@ -35,6 +35,7 @@
name: 'form-tenant',
data () {
return {
selectedValue: this.value,
itemList: []
}
},
@ -51,21 +52,23 @@
},
mounted () {
let result = this.itemList.some(item => {
if(item.id == this.value) {
if (item.id === this.value) {
return true
}
})
if (!result) {
this.value = 'default'
this.selectedValue = 'default'
}
},
methods: {
_onChange (o) {
this.value = o
this.$emit('tenantSelectEvent', o)
}
},
watch: {
value (val) {
this.selectedValue = val
}
},
created () {
let stateTenantAllList = this.store.state.security.tenantAllList || []

3
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

@ -91,7 +91,7 @@
import mLocalParams from '../formModel/tasks/_source/localParams'
import disabledState from '@/module/mixin/disabledState'
import Affirm from '../jumpAffirm'
import FormTenant from "./_source/selectTenant";
import FormTenant from './_source/selectTenant'
export default {
name: 'udp',
@ -210,7 +210,6 @@
this.tenantId = dag.tenantId
}
})
},
mounted () {},
components: { FormTenant, mLocalParams }

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue

@ -37,7 +37,7 @@
}
},
watch: {
'$route': {
$route: {
deep: true,
handler () {
this.isActive = false

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue

@ -89,7 +89,7 @@
},
watch: {
// Listening for routing changes
'$route': {
$route: {
deep: true,
handler () {
this.init()

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue

@ -74,7 +74,7 @@
}
},
watch: {
'$route': {
$route: {
deep: true,
handler () {
this.init()

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue

@ -101,7 +101,7 @@
}
},
watch: {
'$route': {
$route: {
deep: true,
handler () {
this.init()

33
dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue

@ -153,7 +153,6 @@
import i18n from '@/module/i18n'
import store from '@/conf/home/store'
import { isJson } from '@/module/util/util'
import mPopup from '@/module/components/popup/popup'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
export default {
@ -329,7 +328,7 @@
return false
}
if (!this.database && this.showdDatabase == false) {
if (!this.database && this.showdDatabase === false) {
this.$message.warning(`${i18n.$t('Please enter database name')}`)
return false
}
@ -352,7 +351,7 @@
if (this.item) {
param.id = this.item.id
}
this.store.dispatch(`datasource/${this.item ? `updateDatasource` : `createDatasources`}`, param).then(res => {
this.store.dispatch(`datasource/${this.item ? 'updateDatasource' : 'createDatasources'}`, param).then(res => {
this.$message.success(res.msg)
this.spinnerLoading = false
this.$emit('onUpdate')
@ -372,7 +371,6 @@
this.host = res.host
// When in Editpage, Prevent default value overwrite backfill value
let that = this;
setTimeout(() => {
this.port = res.port
}, 0)
@ -391,7 +389,6 @@
* Set default port for each type.
*/
_setDefaultValues (value) {
// Default type is MYSQL
let type = this.type || 'MYSQL'
@ -401,7 +398,6 @@
let mapperPort = this.prePortMapper[type]
this.port = mapperPort || defaultPort
},
/**
@ -439,10 +435,9 @@
break
default:
break
}
return defaultPort
},
}
},
created () {
// Backfill
@ -451,23 +446,22 @@
}
this._setDefaultValues()
},
watch: {
type (value) {
if(value == 'POSTGRESQL') {
this.showdDatabase = true;
if (value === 'POSTGRESQL') {
this.showdDatabase = true
} else {
this.showdDatabase = false;
this.showdDatabase = false
}
if (value== 'ORACLE' && !this.item.id) {
this.showConnectType = true;
if (value === 'ORACLE' && !this.item.id) {
this.showConnectType = true
this.connectType = 'ORACLE_SERVICE_NAME'
} else if(value== 'ORACLE' && this.item.id) {
this.showConnectType = true;
} else if (value === 'ORACLE' && this.item.id) {
this.showConnectType = true
} else {
this.showConnectType = false;
this.showConnectType = false
}
// Set default port for each type datasource
this._setDefaultValues(value)
@ -475,7 +469,7 @@
return new Promise((resolve, reject) => {
this.store.dispatch('datasource/getKerberosStartupState').then(res => {
this.isShowPrincipal = res
if((value =='HIVE'||value == 'SPARK')&&this.isShowPrincipal== true){
if ((value === 'HIVE' || value === 'SPARK') && this.isShowPrincipal === true) {
this.showPrincipal = false
} else {
this.showPrincipal = true
@ -497,7 +491,7 @@
mounted () {
},
components: { mPopup, mListBoxF }
components: { mListBoxF }
}
</script>
@ -539,5 +533,4 @@
}
}
</style>

8
dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue

@ -81,11 +81,11 @@
// Number of pages
pageNo: 1,
// Search value
searchVal: '',
searchVal: ''
},
dialogVisible: false,
item: {},
item: {}
}
},
mixins: [listUrlParamHandle],
@ -128,7 +128,7 @@
_getList (flag) {
this.isLoading = !flag
this.getDatasourcesListP(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.datasourcesList = []
@ -142,7 +142,7 @@
},
_onUpdate () {
this._debounceGET('false')
},
}
},
watch: {
// router

5
dolphinscheduler-ui/src/js/conf/home/pages/home/index.vue

@ -20,12 +20,11 @@
<script>
import mProjectHome from '@/conf/home/pages/projects/pages/index'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'home',
components: { mProjectHome, mListConstruction },
components: { mProjectHome },
mounted () {
},
}
}
</script>

6
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue

@ -49,11 +49,6 @@
<script>
export default {
name: 'zookeeper-list',
data () {
return {
list: []
}
},
props: {
list: Array
}
@ -77,4 +72,3 @@
}
}
</style>

30
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue

@ -79,41 +79,39 @@
</div>
</template>
<script>
import { mapActions } from "vuex";
import mList from "./_source/zookeeperList";
import mSpin from "@/module/components/spin/spin";
import mNoData from "@/module/components/noData/noData";
import themeData from "@/module/echarts/themeData.json";
import mListConstruction from "@/module/components/listConstruction/listConstruction";
import { mapActions } from 'vuex'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import themeData from '@/module/echarts/themeData.json'
export default {
name: "servers-mysql",
name: 'servers-mysql',
data () {
return {
isLoading: false,
mysqlList: [],
color: themeData.color
};
}
},
props: {},
methods: {
...mapActions("monitor", ["getDatabaseData"])
...mapActions('monitor', ['getDatabaseData'])
},
watch: {},
created () {
this.isLoading = true;
this.isLoading = true
this.getDatabaseData()
.then(res => {
this.mysqlList = res;
this.isLoading = false;
this.mysqlList = res
this.isLoading = false
})
.catch(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
mounted () {},
components: { mList, mListConstruction, mSpin, mNoData }
};
components: { mSpin, mNoData }
}
</script>
<style lang="scss" rel="stylesheet/scss">
@import "./servers";

5
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue

@ -68,7 +68,6 @@
import _ from 'lodash'
import { mapActions } from 'vuex'
import mGauge from './_source/gauge'
import mList from './_source/zookeeperList'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import themeData from '@/module/echarts/themeData.json'
@ -95,7 +94,7 @@
this.getMasterData().then(res => {
this.masterList = _.map(res, (v, i) => {
return _.assign(v, {
id: v.host + "_" + v.id,
id: v.host + '_' + v.id,
resInfo: JSON.parse(v.resInfo)
})
})
@ -104,7 +103,7 @@
this.isLoading = false
})
},
components: { mList, mListConstruction, mSpin, mNoData, mGauge }
components: { mListConstruction, mSpin, mNoData, mGauge }
}
</script>
<style lang="scss" rel="stylesheet/scss">

14
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue

@ -67,9 +67,9 @@
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import themeData from '@/module/echarts/themeData.json'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
@ -88,7 +88,7 @@
// ...mapActions('monitor', ['getDatabaseData'])
// ...mapActions('projects', ['getCommandStateCount']),
...mapActions('projects', ['getQueueCount']),
...mapActions('projects', ['getCommandStateCount']),
...mapActions('projects', ['getCommandStateCount'])
},
watch: {},
created () {
@ -105,24 +105,24 @@
let error = 0
_.forEach(res.data, (v, i) => {
let key = _.keys(v)
if(key[0] == 'errorCount') {
if (key[0] === 'errorCount') {
error = error + v.errorCount
}
if(key[1] == 'normalCount'){
if (key[1] === 'normalCount') {
normal = normal + v.normalCount
}
}
)
this.commandCountData = {
'normalCount': normal,
'errorCount' : error
normalCount: normal,
errorCount: error
}
}).catch(() => {
})
},
mounted () {
},
components: { mListConstruction, mSpin, mNoData }
components: { mListConstruction, mSpin }
}
</script>

5
dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue

@ -73,7 +73,6 @@
import _ from 'lodash'
import { mapActions } from 'vuex'
import mGauge from './_source/gauge'
import mList from './_source/zookeeperList'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import themeData from '@/module/echarts/themeData.json'
@ -112,7 +111,7 @@
this.getWorkerData().then(res => {
this.workerList = _.map(res, (v, i) => {
return _.assign(v, {
id: v.host + "_" + v.id,
id: v.host + '_' + v.id,
resInfo: JSON.parse(v.resInfo)
})
})
@ -121,7 +120,7 @@
this.isLoading = true
})
},
components: { mList, mListConstruction, mSpin, mNoData, mGauge, zookeeperDirectoriesPopup }
components: { mListConstruction, mSpin, mNoData, mGauge, zookeeperDirectoriesPopup }
}
</script>
<style lang="scss" rel="stylesheet/scss">

2
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue

@ -101,7 +101,7 @@
*/
_onChangeState (val) {
this.searchParams.stateType = val
},
}
},
watch: {
},

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue

@ -83,7 +83,7 @@
executorName: '',
processInstanceName: ''
},
dataTime: [],
dataTime: []
}
},
props: {},
@ -105,7 +105,7 @@
*/
_onChangeState (val) {
this.searchParams.stateType = val
},
}
},
watch: {
},

14
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue

@ -74,26 +74,26 @@
stateList: [
{
label: `${this.$t('none')}`,
code: ``
code: ''
},
{
label: `${this.$t('success')}`,
code: `成功`
code: '成功'
},
{
label: `${this.$t('waiting')}`,
code: `等待`
code: '等待'
},
{
label: `${this.$t('execution')}`,
code: `执行中`
code: '执行中'
},
{
label: `${this.$t('finish')}`,
code: `完成`
code: '完成'
}, {
label: `${this.$t('failed')}`,
code: `失败`
code: '失败'
}
],
searchParams: {
@ -105,7 +105,7 @@
startDate: '',
endDate: ''
},
dataTime: [],
dataTime: []
}
},
props: {},

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/index.vue

@ -51,7 +51,6 @@
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -119,6 +118,6 @@
},
mounted () {
},
components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
components: { mList, mConditions, mSpin, mListConstruction, mNoData }
}
</script>

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/create/index.vue

@ -19,9 +19,8 @@
</template>
<script>
import mCreateDag from '@/conf/home/pages/dag/index'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
export default {
name: 'definition-create-index',
components: { mCreateDag, mSecondaryMenu }
components: { mCreateDag }
}
</script>

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/details/index.vue

@ -18,10 +18,9 @@
<m-definition-details></m-definition-details>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mDefinitionDetails from '@/conf/home/pages/dag/definitionDetails.vue'
export default {
name: 'definition-details-index',
components: { mDefinitionDetails, mSecondaryMenu }
components: { mDefinitionDetails }
}
</script>

26
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue

@ -17,7 +17,7 @@
<template>
<div class="ans-input email-model">
<div class="clearfix input-element" :class="disabled ? 'disabled' : ''">
<span class="tag-wrapper" v-for="(item,$index) in activeList" :key="$index" :class="activeIndex === $index ? 'active' : ''">
<span class="tag-wrapper" v-for="(item,$index) in activeListL" :key="$index" :class="activeIndex === $index ? 'active' : ''">
<span class="tag-text">{{item}}</span>
<em class="remove-tag el-icon-close" @click.stop="_del($index)" v-if="!disabled"></em>
</span>
@ -74,6 +74,7 @@
tagModel: false,
email: '',
activeIndex: null,
activeListL: _.cloneDeep(this.activeList),
emailList: [],
index: 0,
emailWidth: 100,
@ -100,18 +101,18 @@
if (this.email === '') {
return true
}
this.email = _.trim(this.email).replace(/(;$)|(;$)/g, "")
this.email = _.trim(this.email).replace(/(;$)|(;$)/g, '')
let email = this.email
let is = (n) => {
return _.some(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)), v => v === n)
return _.some(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL)), v => v === n)
}
if (isEmial(email)) {
if (!is(email)) {
this.emailWidth = 0
this.activeList.push(email)
this.activeListL.push(email)
this.email = ''
this._handlerEmailWitch()
return true
@ -132,7 +133,7 @@
this.emailList = []
this.isEmail = false
} else {
let a = _.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList))
let a = _.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL))
let b = a.concat(emailList)
let list = fuzzyQuery(b, val)
this.emailList = _.uniqWith(list.length && list, _.isEqual)
@ -161,11 +162,11 @@
if (!this.isCn) {
this.emailWidth = 0
if (_.isInteger(this.activeIndex)) {
this.activeList.pop()
this.activeListL.pop()
this.activeIndex = null
} else {
if (!this.email) {
this.activeIndex = this.activeList.length - 1
this.activeIndex = this.activeListL.length - 1
}
}
this._handlerEmailWitch()
@ -176,7 +177,7 @@
*/
_del (i) {
this.emailWidth = 0
this.activeList.splice(i, 1)
this.activeListL.splice(i, 1)
this._handlerEmailWitch()
},
/**
@ -221,14 +222,14 @@
this.email = ''
// Non-existing data
if (_.filter(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)), v => v === item).length) {
if (_.filter(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeListL)), v => v === item).length) {
this.$message.warning(`${i18n.$t('Mailbox already exists! Recipients and copyers cannot repeat')}`)
return
}
// Width initialization
this.emailWidth = 0
// Insert data
this.activeList.push(item)
this.activeListL.push(item)
// Calculated width
this._handlerEmailWitch()
// Check mailbox index initialization
@ -264,8 +265,13 @@
this.activeIndex = null
},
activeList (val) {
this.activeListL = _.cloneDeep(val)
},
activeListL (val) {
if (!_.isEqual(val, this.activeList)) {
this.$emit('valueEvent', val)
}
}
},
created () {

21
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue

@ -239,11 +239,10 @@
* timing
*/
_timing (item) {
let self = this
this._getReceiver(item.id).then(res => {
this.timingData.item = item,
this.timingData.receiversD = res.receivers,
this.timingData.receiversCcD = res.receiversCc,
this.timingData.item = item
this.timingData.receiversD = res.receivers
this.timingData.receiversCcD = res.receiversCc
this.timingData.type = 'timing'
this.timingDialog = true
})
@ -410,7 +409,6 @@
})
},
_version (item) {
let self = this
this.getProcessDefinitionVersionsPage({
pageNo: 1,
pageSize: 10,
@ -421,13 +419,12 @@
let pageSize = res.data.pageSize
let pageNo = res.data.currentPage
this.versionData.processDefinition = item,
this.versionData.processDefinitionVersions = processDefinitionVersions,
this.versionData.total = total,
this.versionData.pageNo = pageNo,
this.versionData.processDefinition = item
this.versionData.processDefinitionVersions = processDefinitionVersions
this.versionData.total = total
this.versionData.pageNo = pageNo
this.versionData.pageSize = pageSize
this.drawer = true
}).catch(e => {
this.$message.error(e.msg || '')
})
@ -436,7 +433,7 @@
_batchExport () {
this.exportDefinition({
processDefinitionIds: this.strSelectIds,
fileName: "process_"+new Date().getTime()
fileName: 'process_' + new Date().getTime()
}).then(res => {
this._onUpdate()
this.checkAll = false
@ -492,7 +489,7 @@
*/
_arrDelChange (v) {
let arr = []
arr = _.map(v, 'id');
arr = _.map(v, 'id')
this.strSelectIds = _.join(arr, ',')
},
/**

1
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue

@ -40,7 +40,6 @@
</m-popup>
</template>
<script>
import _ from 'lodash'
import i18n from '@/module/i18n'
import store from '@/conf/home/store'
import mPopup from '@/module/components/popup/popup'

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue

@ -163,7 +163,6 @@
</div>
</template>
<script>
import _ from 'lodash'
import dayjs from 'dayjs'
import mEmail from './email.vue'
import store from '@/conf/home/store'
@ -214,7 +213,7 @@
scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '',
failureStrategy: this.failureStrategy,
warningType: this.warningType,
warningGroupId: this.warningGroupId=='' ? 0 : this.warningGroupId,
warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
execType: this.execType ? 'COMPLEMENT_DATA' : null,
startNodeList: this.startNodeList,
taskDependType: this.taskDependType,

17
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue

@ -228,7 +228,7 @@
failureStrategy: this.failureStrategy,
warningType: this.warningType,
processInstancePriority: this.processInstancePriority,
warningGroupId: this.warningGroupId =='' ? 0 : this.warningGroupId,
warningGroupId: this.warningGroupId === '' ? 0 : this.warningGroupId,
receivers: this.receivers.join(',') || '',
receiversCc: this.receiversCc.join(',') || '',
workerGroup: this.workerGroup
@ -265,7 +265,6 @@
crontab: this.crontab
})
}
let msg = ''
this.store.dispatch(api, searchParams).then(res => {
if (res.length) {
@ -319,19 +318,19 @@
if (this.timingData.item.crontab !== null) {
this.crontab = this.timingData.item.crontab
}
if(this.timingData.type == 'timing') {
if (this.timingData.type === 'timing') {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
if (month < 10) {
month = "0" + month;
month = '0' + month
}
if (day < 10) {
day = "0" + day;
day = '0' + day
}
let startDate = year + "-" + month + "-" + day + ' ' + '00:00:00'
let endDate = (year+100) + "-" + month + "-" + day + ' ' + '00:00:00'
let startDate = year + '-' + month + '-' + day + ' ' + '00:00:00'
let endDate = (year + 100) + '-' + month + '-' + day + ' ' + '00:00:00'
let times = []
times[0] = startDate
times[1] = endDate
@ -355,13 +354,13 @@
// let list = _.filter(this.notifyGroupList, v => v.id === item.warningGroupId)
this.warningGroupId = item.warningGroupId
})
}).catch(() => this.warningGroupId = '')
}).catch(() => { this.warningGroupId = '' })
} else {
this._getNotifyGroupList().then(() => {
this.$nextTick(() => {
this.warningGroupId = ''
})
}).catch(() => this.warningGroupId = '')
}).catch(() => { this.warningGroupId = '' })
}
},
components: { vCrontab, mEmail, mPriority, mWorkerGroups }

7
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue

@ -58,7 +58,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import { findComponentDownward } from '@/module/util/'
@ -109,14 +108,14 @@
* get data list
*/
_getList (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this.isLoading = !flag
this.getProcessListP(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.processListP = []
@ -152,7 +151,7 @@
beforeDestroy () {
sessionStorage.setItem('isLeft', 1)
},
components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
components: { mList, mConditions, mSpin, mListConstruction, mNoData }
}
</script>

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue

@ -82,7 +82,6 @@
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import { tasksType, tasksState } from '@/conf/home/pages/dag/_source/config'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -203,7 +202,7 @@
},
mounted () {
},
components: { mSpin, mSecondaryMenu, mListConstruction, mNoData }
components: { mSpin, mListConstruction, mNoData }
}
</script>
@ -265,5 +264,4 @@
}
}
</style>

2
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue

@ -260,7 +260,7 @@
},
closeTiming () {
this.timingDialog = false
},
}
},
watch: {},
created () {

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue

@ -28,7 +28,6 @@
</template>
<script>
import mList from './_source/list'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'definition-timing-index',
@ -37,6 +36,6 @@
this.$router.go(-1)
}
},
components: { mList, mListConstruction, mSecondaryMenu }
components: { mList, mListConstruction }
}
</script>

2
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue

@ -70,7 +70,7 @@
},
watch: {
'searchParams': {
searchParams: {
deep: true,
immediate: true,
handler (o) {

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue

@ -71,9 +71,9 @@
},
created () {
this.isSpin = true
this.parameter.projectId = this.projectId;
this.parameter.projectId = this.projectId
this.getDefineUserCount(this.parameter).then(res => {
this.msg = res.data.count > 0 ? true : false
this.msg = res.data.count > 0
this.defineUserList = []
this._handleDefineUser(res)
this.isSpin = false

7
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue

@ -53,7 +53,6 @@
import { pie } from './chartConfig'
import Chart from '@/module/ana-charts'
import echarts from 'echarts'
import store from '@/conf/home/store'
import mNoData from '@/module/components/noData/noData'
import { stateType } from '@/conf/home/pages/projects/pages/_source/conditions/instance/common'
export default {
@ -75,7 +74,7 @@
this.$router.push({
name: 'projects-instance-list',
query: {
stateType: _.find(stateType, ['label', name])['code'],
stateType: _.find(stateType, ['label', name]).code,
startDate: this.searchParams.startDate,
endDate: this.searchParams.endDate
}
@ -85,7 +84,7 @@
let data = res.data.taskCountDtos
this.processStateList = _.map(data, v => {
return {
key: _.find(stateType, ['code', v.taskStateType])['label'],
key: _.find(stateType, ['code', v.taskStateType]).label,
value: v.count
}
})
@ -100,7 +99,7 @@
}
},
watch: {
'searchParams': {
searchParams: {
deep: true,
immediate: true,
handler (o) {

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue

@ -29,7 +29,7 @@
<th>{{$t('Number')}}</th>
<th>{{$t('State')}}</th>
</tr>
<tr v-for="(item,$index) in queueList">
<tr :key="$index" v-for="(item,$index) in queueList">
<td><span>{{$index+1}}</span></td>
<td><span><a href="javascript:" >{{item.value}}</a></span></td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
@ -76,7 +76,7 @@
}
},
watch: {
'searchParams': {
searchParams: {
deep: true,
immediate: true,
handler (o) {

150
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue

@ -1,150 +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.
*/
<template>
<div class="task-ctatus-count-model">
<div v-show="!msg">
<div class="data-area" v-spin="isSpin" style="height: 430px;">
<div class="col-md-7">
<div id="task-status-pie" style="width:100%;height:260px;margin-top: 100px;"></div>
</div>
<div class="col-md-5">
<div class="table-small-model">
<table>
<tr>
<th width="40">{{$t('#')}}</th>
<th>{{$t('Number')}}</th>
<th>{{$t('State')}}</th>
</tr>
<tr v-for="(item,$index) in taskCtatusList" :key="$index">
<td><span>{{$index+1}}</span></td>
<td>
<a v-if="currentName === 'home'" style="cursor: default">{{item.value}}</a>
<span v-else>
<a href="javascript:" @click="searchParams.projectId && _goTask(item.key)">{{item.value}}</a>
</span>
</td>
<td><span class="ellipsis" style="width: 98%;" :title="item.key">{{item.key}}</span></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div v-show="msg">
<m-no-data :msg="msg" v-if="msg" :height="430"></m-no-data>
</div>
</div>
</template>
<script>
import _ from 'lodash'
import { mapActions } from 'vuex'
import { pie } from './chartConfig'
import Chart from '@/module/ana-charts'
import echarts from 'echarts'
import store from '@/conf/home/store'
import mNoData from '@/module/components/noData/noData'
import { stateType } from '@/conf/home/pages/projects/pages/_source/conditions/instance/common'
export default {
name: 'task-ctatus-count',
data () {
return {
isSpin: true,
msg: '',
taskCtatusList: [],
currentName: ''
}
},
props: {
searchParams: Object
},
methods: {
...mapActions('projects', ['getTaskCtatusCount']),
_goTask (name) {
this.$router.push({
name: 'task-instance',
query: {
stateType: _.find(stateType, ['label', name])['code'],
startDate: this.searchParams.startDate,
endDate: this.searchParams.endDate
}
})
},
_handleTaskCtatus (res) {
let data = res.data.taskCountDtos
this.taskCtatusList = _.map(data, v => {
return {
key: _.find(stateType, ['code', v.taskStateType])['label'],
value: v.count,
type: 'type'
}
})
const myChart = Chart.pie('#task-status-pie', this.taskCtatusList, { title: '' })
myChart.echart.setOption(pie)
//
if (this.searchParams.projectId) {
myChart.echart.on('click', e => {
this._goTask(e.data.name)
})
}
}
},
watch: {
'searchParams': {
deep: true,
immediate: true,
handler (o) {
this.isSpin = true
this.getTaskCtatusCount(o).then(res => {
this.taskCtatusList = []
this._handleTaskCtatus(res)
this.isSpin = false
}).catch(e => {
this.msg = e.msg || 'error'
this.isSpin = false
})
}
},
'$store.state.projects.sideBar': function() {
echarts.init(document.getElementById('task-status-pie')).resize()
}
},
beforeCreate () {
},
created () {
this.currentName = this.$router.currentRoute.name
},
beforeMount () {
},
mounted () {
},
beforeUpdate () {
},
updated () {
},
beforeDestroy () {
},
destroyed () {
},
computed: {},
components: { mNoData }
}
</script>
<style lang="scss" rel="stylesheet/scss">
</style>

6
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue

@ -74,7 +74,7 @@
this.$router.push({
name: 'task-instance',
query: {
stateType: _.find(stateType, ['label', name])['code'],
stateType: _.find(stateType, ['label', name]).code,
startDate: this.searchParams.startDate,
endDate: this.searchParams.endDate
}
@ -85,7 +85,7 @@
this.taskStatusList = _.map(data, v => {
return {
// CHECK!!
key: _.find(stateType, ['code', v.taskStateType])['label'],
key: _.find(stateType, ['code', v.taskStateType]).label,
value: v.count,
type: 'type'
}
@ -102,7 +102,7 @@
}
},
watch: {
'searchParams': {
searchParams: {
deep: true,
immediate: true,
handler (o) {

10
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue

@ -68,12 +68,9 @@
<script>
import dayjs from 'dayjs'
import mDefineUserCount from './_source/defineUserCount'
import mCommandStateCount from './_source/commandStateCount'
import mTaskStatusCount from './_source/taskStatusCount'
import mProcessStateCount from './_source/processStateCount'
import mQueueCount from './_source/queueCount'
import localStore from '@/module/util/localStorage'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -85,7 +82,7 @@
startDate: '',
endDate: ''
},
dataTime: [],
dataTime: []
}
},
props: {
@ -103,13 +100,10 @@
this.dataTime[1] = dayjs().format('YYYY-MM-DD HH:mm:ss')
},
components: {
mSecondaryMenu,
mListConstruction,
mDefineUserCount,
mCommandStateCount,
mTaskStatusCount,
mProcessStateCount,
mQueueCount
mProcessStateCount
}
}
</script>

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue

@ -18,13 +18,12 @@
<m-instance-details></m-instance-details>
</template>
<script>
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mInstanceDetails from '@/conf/home/pages/dag/instanceDetails.vue'
export default {
name: 'instance-details-index',
data () {
return {}
},
components: { mInstanceDetails, mSecondaryMenu }
components: { mInstanceDetails }
}
</script>

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue

@ -47,8 +47,6 @@
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import { tasksState } from '@/conf/home/pages/dag/_source/config'
import mConditions from '@/module/components/conditions/conditions'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -111,7 +109,7 @@
destroyed () {
},
computed: {},
components: { mConditions, mSecondaryMenu, mListConstruction, mSpin, mNoData }
components: { mListConstruction, mSpin, mNoData }
}
</script>

10
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -78,7 +78,7 @@
</span>
</el-tooltip>
<el-tooltip :content="scope.row.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')" placement="top" :enterable="false">
<span><el-button type="warning" size="mini" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state != 'STOP'" :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" circle></el-button></span>
<span><el-button type="warning" size="mini" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'STOP'" :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" circle></el-button></span>
</el-tooltip>
<el-tooltip :content="scope.row.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')" placement="top" :enterable="false">
<span><el-button type="error" size="mini" :icon="scope.row.state === 'PAUSE' ? 'el-icon-video-play' : 'el-icon-video-pause'" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'PAUSE'" @click="_suspend(scope.row,scope.$index)" circle></el-button></span>
@ -154,7 +154,7 @@
<span>
<el-button
style="padding: 0 3px"
v-show="(scope.row.state === 'PAUSE' || scope.row.state == 'STOP') && buttonType === 'suspend'"
v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType === 'suspend'"
type="warning"
size="mini"
circle
@ -165,7 +165,7 @@
<!--Recovery Suspend-->
<el-button
v-show="(scope.row.state === 'PAUSE' || scope.row.state == 'STOP') && buttonType !== 'suspend'"
v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType !== 'suspend'"
type="warning"
size="mini"
circle
@ -312,7 +312,7 @@
* @param STOP
*/
_stop (item, index) {
if(item.state == 'STOP') {
if (item.state === 'STOP') {
this._countDownFn({
id: item.id,
executeType: 'RECOVER_SUSPENDED_PROCESS',
@ -443,7 +443,7 @@
// },
_arrDelChange (v) {
let arr = []
arr = _.map(v, 'id');
arr = _.map(v, 'id')
console.log(arr)
this.strDelete = _.join(arr, ',')
},

13
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue

@ -53,7 +53,6 @@
import localStore from '@/module/util/localStorage'
import { setUrlParams } from '@/module/util/routerUtil'
import mNoData from '@/module/components/noData/noData'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mInstanceConditions from '@/conf/home/pages/projects/pages/_source/conditions/instance/processInstance'
@ -119,7 +118,7 @@
_getProcessInstanceListP (flag) {
this.isLoading = !flag
this.getProcessInstance(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.processInstanceList = []
@ -148,15 +147,15 @@
* @desc Prevent functions from being called multiple times
*/
_debounceGET: _.debounce(function (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this._getProcessInstanceListP(flag)
}, 100, {
'leading': false,
'trailing': true
leading: false,
trailing: true
})
},
watch: {
@ -169,7 +168,7 @@
this.searchParams.pageNo = !_.isEmpty(a.query) && a.query.pageNo || 1
}
},
'searchParams': {
searchParams: {
deep: true,
handler () {
this._debounceGET()
@ -201,7 +200,7 @@
clearInterval(this.setIntervalP)
sessionStorage.setItem('isLeft', 1)
},
components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
components: { mList, mInstanceConditions, mSpin, mListConstruction, mNoData }
}
</script>

8
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue

@ -19,7 +19,7 @@
</template>
<script>
import echarts from 'echarts'
import { mapActions, mapState, mapMutations } from 'vuex'
import { mapState } from 'vuex'
import graphGridOption from './graphGridOption'
export default {
@ -35,7 +35,7 @@
},
methods: {
init () {
},
}
},
created () {
},
@ -45,12 +45,12 @@
graphGrid.on('click', (params) => {
// Jump to the definition page
this.$router.push({ path: `/projects/definition/list/${params.data.id}` })
});
})
},
components: {},
computed: {
...mapState('kinship', ['locations', 'connects', 'sourceWorkFlowId'])
},
}
}
</script>

34
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue

@ -55,15 +55,11 @@
</div>
</template>
<script>
import _ from 'lodash'
import { mapActions, mapState } from 'vuex'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import graphGrid from './_source/graphGrid.vue'
export default {
name: 'projects-kinship-index',
components: { graphGrid, mSpin, mNoData },
@ -71,7 +67,7 @@
return {
isLoading: true,
isShowLabel: true,
currentItemName: '',
currentItemName: ''
}
},
props: {},
@ -86,7 +82,7 @@
Promise.all([
// get process definition
this.getWorkFlowList(),
this.getWorkFlowDAG(),
this.getWorkFlowDAG()
]).then((data) => {
this.isLoading = false
}).catch(() => {
@ -97,21 +93,21 @@
* reset
*/
reset () {
this.isLoading = true;
this.isLoading = true
this.$nextTick(() => {
this.isLoading = false;
this.isLoading = false
})
},
async onChange (item) {
const { value, label } = item || {};
this.isLoading = true;
this.currentItemName = label;
const { value, label } = item || {}
this.isLoading = true
this.currentItemName = label
try {
await this.getWorkFlowDAG(value);
await this.getWorkFlowDAG(value)
} catch (error) {
this.$message.error(error.msg || '')
}
this.isLoading = false;
this.isLoading = false
},
tooltipOption (text) {
return {
@ -120,14 +116,14 @@
placement: 'top',
theme: 'dark',
triggerEvent: 'mouseenter',
large: false,
large: false
}
},
changeLabel () {
this.isLoading = true;
this.isShowLabel = !this.isShowLabel;
this.isLoading = true
this.isShowLabel = !this.isShowLabel
this.$nextTick(() => {
this.isLoading = false;
this.isLoading = false
})
}
},
@ -143,8 +139,8 @@
computed: {
...mapState('kinship', ['locations', 'workList']),
inputFocusStyle () {
return `width:280px`
},
return 'width:280px'
}
},
mounted () {
}

8
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue

@ -80,7 +80,7 @@
param.projectId = this.item.id
}
this.$refs['popup'].spinnerLoading = true
this.$refs.popup.spinnerLoading = true
this.store.dispatch(`projects/${this.item ? 'updateProjects' : 'createProjects'}`, param).then(res => {
this.$emit('_onUpdate')
@ -88,13 +88,13 @@
message: res.msg,
type: 'success',
offset: 70
});
})
setTimeout(() => {
this.$refs['popup'].spinnerLoading = false
this.$refs.popup.spinnerLoading = false
}, 800)
}).catch(e => {
this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false
this.$refs.popup.spinnerLoading = false
})
},
_verification () {

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue

@ -90,7 +90,7 @@
this.setProjectName(item.name)
localStore.setItem('projectName', `${item.name}`)
localStore.setItem('projectId', `${item.id}`)
this.$router.push({ path: `/projects/index` })
this.$router.push({ path: '/projects/index' })
},
/**
* Delete Project
@ -113,7 +113,7 @@
*/
_edit (item) {
findComponentDownward(this.$root, 'projects-list')._create(item)
},
}
},
watch: {

3
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue

@ -62,7 +62,6 @@
import mConditions from '@/module/components/conditions/conditions'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'projects-list',
data () {
@ -108,7 +107,7 @@
_getList (flag) {
this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.projectsList = []

2
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue

@ -134,7 +134,7 @@
},
_go (item) {
this.$router.push({ path: `/projects/instance/list/${item.processInstanceId}` })
},
}
},
watch: {
taskInstanceList (a) {

13
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue

@ -53,7 +53,6 @@
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
import mInstanceConditions from '@/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance'
@ -114,8 +113,8 @@
*/
_getList (flag) {
this.isLoading = !flag
if(this.searchParams.pageNo == undefined) {
this.$router.push({ path: `/projects/index` })
if (this.searchParams.pageNo === undefined) {
this.$router.push({ path: '/projects/index' })
return false
}
this.getTaskInstanceList(this.searchParams).then(res => {
@ -132,15 +131,15 @@
* @desc Prevent functions from being called multiple times
*/
_debounceGET: _.debounce(function (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this._getList(flag)
}, 100, {
'leading': false,
'trailing': true
leading: false,
trailing: true
})
},
watch: {
@ -166,7 +165,7 @@
clearInterval(this.setIntervalP)
sessionStorage.setItem('isLeft', 1)
},
components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData }
components: { mList, mInstanceConditions, mSpin, mListConstruction, mNoData }
}
</script>

2
dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue

@ -26,6 +26,6 @@
name: 'resource-index',
components: { mSecondaryMenu },
mounted () {
},
}
}
</script>

2
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue

@ -21,6 +21,6 @@
export default {
name: 'file-manage-index',
mounted () {
},
}
}
</script>

4
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue

@ -82,8 +82,6 @@
import { handlerSuffix } from '../details/_source/utils'
import codemirror from '../_source/codemirror'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
let editor
@ -179,7 +177,7 @@
editor.off($('.code-create-mirror'), 'keypress', this.keypress)
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

10
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue

@ -60,11 +60,7 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import { folderList } from '../_source/common'
import { handlerSuffix } from '../details/_source/utils'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import localStore from '@/module/util/localStorage'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -94,7 +90,7 @@
this.$message.success(res.msg)
setTimeout(() => {
this.spinnerLoading = false
this.$router.push({ path: `/resource/file`})
this.$router.push({ path: '/resource/file' })
}, 800)
}).catch(e => {
this.$message.error(e.msg || '')
@ -109,7 +105,7 @@
}
return true
},
}
},
watch: {},
created () {
@ -119,7 +115,7 @@
destroyed () {
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

10
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue

@ -60,11 +60,7 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import { folderList } from '../_source/common'
import { handlerSuffix } from '../details/_source/utils'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import localStore from '@/module/util/localStorage'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -94,7 +90,7 @@
this.$message.success(res.msg)
setTimeout(() => {
this.spinnerLoading = false
this.$router.push({ path: `/resource/udf/resource`})
this.$router.push({ path: '/resource/udf/resource' })
}, 800)
}).catch(e => {
this.$message.error(e.msg || '')
@ -108,7 +104,7 @@
return false
}
return true
},
}
},
watch: {},
created () {
@ -118,7 +114,7 @@
destroyed () {
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

8
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue

@ -130,8 +130,8 @@
this._getViewResources()
}, 1000, {
'leading': false,
'trailing': true
leading: false,
trailing: true
}),
/**
* down
@ -143,8 +143,8 @@
this._getViewResources()
}, 1000, {
'leading': false,
'trailing': true
leading: false,
trailing: true
}),
/**
* off handle

1
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue

@ -47,7 +47,6 @@
<script>
import i18n from '@/module/i18n'
import store from '@/conf/home/store'
import localStore from '@/module/util/localStorage'
import mPopup from '@/module/components/popup/popup'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
export default {

4
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue

@ -101,14 +101,14 @@
this.searchParams.pageSize = val
},
_getList (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.fileResourcesList = res.totalList

4
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue

@ -83,8 +83,6 @@
import { handlerSuffix } from '../details/_source/utils'
import codemirror from '../_source/codemirror'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import localStore from '@/module/util/localStorage'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
@ -181,7 +179,7 @@
editor.off($('.code-create-mirror'), 'keypress', this.keypress)
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

7
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue

@ -60,10 +60,7 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import { folderList } from '../_source/common'
import { handlerSuffix } from '../details/_source/utils'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import localStore from '@/module/util/localStorage'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
@ -109,7 +106,7 @@
}
return true
},
}
},
watch: {},
created () {
@ -119,7 +116,7 @@
destroyed () {
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

2
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue

@ -168,7 +168,7 @@
setTimeout(() => {
this.list = a
})
},
}
// Listening for routing changes
// '$route': {
// deep: false,

1
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue

@ -101,7 +101,6 @@
} else {
resolve()
}
})
},
close () {

7
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue

@ -66,7 +66,6 @@
import mNoData from '@/module/components/noData/noData'
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import mConditions from '@/module/components/conditions/conditions'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
name: 'resource-list-index-FILE',
@ -107,14 +106,14 @@
this.searchParams.pageSize = val
},
_getList (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.fileResourcesList = res.totalList
@ -176,7 +175,7 @@
beforeDestroy () {
sessionStorage.setItem('isLeft', 1)
},
components: { mListConstruction, mConditions, mList, mSpin, mNoData }
components: { mConditions, mList, mSpin, mNoData }
}
</script>
<style lang="scss" rel="stylesheet/scss">

9
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue

@ -60,9 +60,6 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
import mSpin from '@/module/components/spin/spin'
import mConditions from '@/module/components/conditions/conditions'
import localStore from '@/module/util/localStorage'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@ -91,7 +88,7 @@
this.$message.success(res.msg)
setTimeout(() => {
this.spinnerLoading = false
this.$router.push({ path: `/resource/udf`})
this.$router.push({ path: '/resource/udf' })
}, 800)
}).catch(e => {
this.$message.error(e.msg || '')
@ -106,7 +103,7 @@
}
return true
},
}
},
watch: {},
created () {
@ -116,7 +113,7 @@
destroyed () {
},
computed: {},
components: { mListConstruction, mConditions, mSpin, mListBoxF }
components: { mListConstruction, mListBoxF }
}
</script>

20
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue

@ -123,7 +123,7 @@
return {
label: node.name
}
},
}
}
},
props: {
@ -131,19 +131,19 @@
},
methods: {
_ok () {
this.$refs['popup'].spinnerLoading = true
this.$refs.popup.spinnerLoading = true
if (this._validation()) {
this._verifyUdfFuncName().then(res => {
this._createUdfFunc().then()
}).then(res => {
setTimeout(() => {
this.$refs['popup'].spinnerLoading = false
this.$refs.popup.spinnerLoading = false
}, 800)
}).catch(e => {
this.$refs['popup'].spinnerLoading = false
this.$refs.popup.spinnerLoading = false
})
} else {
this.$refs['popup'].spinnerLoading = false
this.$refs.popup.spinnerLoading = false
}
},
_createUdfFunc () {
@ -166,7 +166,7 @@
param.id = id
}
// api
this.store.dispatch(`resource/${id ? `updateUdfFunc` : `createUdfFunc`}`, param).then(res => {
this.store.dispatch(`resource/${id ? 'updateUdfFunc' : 'createUdfFunc'}`, param).then(res => {
this.$emit('onUpdate', param)
this.$message.success(res.msg)
resolve()
@ -203,7 +203,7 @@
if (item.dirctory) {
return item
}
});
})
this.udfResourceList = item
this.udfResourceDirList = item1
resolve()
@ -217,7 +217,7 @@
this.filterEmptyDirectory(item.children)
}
}
return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length==0) || (!/\.jar$/.test(n.name) && n.children.length>0)))
return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length === 0) || (!/\.jar$/.test(n.name) && n.children.length > 0)))
},
// filterJarFile
filterJarFile (array) {
@ -231,8 +231,8 @@
// diGuiTree
diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?        
delete item.children : this.diGuiTree(item.children);
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
? delete item.children : this.diGuiTree(item.children)
})
},
/**

4
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue

@ -112,14 +112,14 @@
this._debounceGET()
},
_getList (flag) {
if(sessionStorage.getItem('isLeft')==0) {
if (sessionStorage.getItem('isLeft') === 0) {
this.isLeft = false
} else {
this.isLeft = true
}
this.isLoading = !flag
this.getUdfFuncListP(this.searchParams).then(res => {
if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
this.udfFuncList = []

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save