Browse Source

fix eslint: fix syntax by npm run lint automatically

pull/3/MERGE
chengshiwen 4 years ago
parent
commit
5334703593
  1. 12
      dolphinscheduler-ui/src/components/Counter.vue
  2. 15
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  3. 12
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue
  4. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue
  5. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue
  6. 38
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue
  7. 10
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue
  8. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue
  9. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue
  10. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue
  11. 6
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue
  12. 6
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue
  13. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue
  14. 13
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue
  15. 30
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue
  16. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue
  17. 26
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue
  18. 10
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue
  19. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue
  20. 24
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue
  21. 24
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue
  22. 22
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue
  23. 5
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue
  24. 270
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue
  25. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue
  26. 38
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue
  27. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
  28. 3
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
  29. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue
  30. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue
  31. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue
  32. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue
  33. 21
      dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue
  34. 6
      dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/index.vue
  35. 2
      dolphinscheduler-ui/src/js/conf/home/pages/home/index.vue
  36. 1
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue
  37. 30
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue
  38. 2
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
  39. 6
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue
  40. 2
      dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
  41. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue
  42. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue
  43. 14
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue
  44. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue
  45. 5
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
  46. 8
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue
  47. 1
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
  48. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
  49. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue
  50. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue
  51. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue
  52. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue
  53. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue
  54. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue
  55. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue
  56. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  57. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/index.vue
  58. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue
  59. 30
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue
  60. 8
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue
  61. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue
  62. 1
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
  63. 2
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue
  64. 6
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue
  65. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue
  66. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue
  67. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue
  68. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue
  69. 8
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue
  70. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue
  71. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue
  72. 1
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue
  73. 4
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue
  74. 18
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue
  75. 2
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfFolder/index.vue
  76. 18
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue
  77. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
  78. 1
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue
  79. 15
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue
  80. 10
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
  81. 12
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue
  82. 2
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue
  83. 2
      dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue
  84. 12
      dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue
  85. 8
      dolphinscheduler-ui/src/js/conf/login/App.vue
  86. 28
      dolphinscheduler-ui/src/js/module/components/crontab/source/_times/day.vue
  87. 2
      dolphinscheduler-ui/src/js/module/components/crontab/source/_times/year.vue
  88. 10
      dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue
  89. 20
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue
  90. 16
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
  91. 20
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue
  92. 14
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue
  93. 14
      dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
  94. 2
      dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue
  95. 2
      dolphinscheduler-ui/src/js/module/components/nav/nav.vue
  96. 44
      dolphinscheduler-ui/src/js/module/components/transfer/resource.vue
  97. 6
      dolphinscheduler-ui/src/js/module/components/transfer/transfer.vue

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

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

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

@ -345,7 +345,7 @@
* copy name * copy name
*/ */
_copyName () { _copyName () {
let clipboard = new Clipboard(`.copy-name`) let clipboard = new Clipboard('.copy-name')
clipboard.on('success', e => { clipboard.on('success', e => {
this.$message.success(`${i18n.$t('Copy success')}`) this.$message.success(`${i18n.$t('Copy success')}`)
// Free memory // Free memory
@ -511,7 +511,7 @@
}, },
_closeDAG () { _closeDAG () {
let $name = this.$route.name let $name = this.$route.name
if($name && $name.indexOf("definition") != -1){ if ($name && $name.indexOf('definition') != -1) {
this.$router.push({ name: 'projects-definition-list' }) this.$router.push({ name: 'projects-definition-list' })
} else { } else {
this.$router.push({ name: 'projects-instance-list' }) this.$router.push({ name: 'projects-instance-list' })
@ -600,14 +600,14 @@
* View variables * View variables
*/ */
_toggleView () { _toggleView () {
findComponentDownward(this.$root, `assist-dag-index`)._toggleView() findComponentDownward(this.$root, 'assist-dag-index')._toggleView()
}, },
/** /**
* Starting parameters * Starting parameters
*/ */
_toggleParam () { _toggleParam () {
findComponentDownward(this.$root, `starting-params-dag-index`)._toggleParam() findComponentDownward(this.$root, 'starting-params-dag-index')._toggleParam()
}, },
addLineInfo ({ item, fromThis }) { addLineInfo ({ item, fromThis }) {
this.addConnects(item) this.addConnects(item)
@ -655,7 +655,7 @@
let rearNode = [] let rearNode = []
let rearList = [] let rearList = []
$('div[data-targetarr*="' + id + '"]').each(function () { $('div[data-targetarr*="' + id + '"]').each(function () {
rearNode.push($(this).attr("id")) rearNode.push($(this).attr('id'))
}) })
if (rearNode.length > 0) { if (rearNode.length > 0) {
@ -692,7 +692,6 @@
this.nodeData.instanceId = this.$route.params.id this.nodeData.instanceId = this.$route.params.id
this.nodeDrawer = true this.nodeDrawer = true
}, },
removeEventModelById ($id) { removeEventModelById ($id) {
if (eventModel && this.taskId == $id) { if (eventModel && this.taskId == $id) {
@ -766,17 +765,15 @@
this.versionData.pageNo = pageNo this.versionData.pageNo = pageNo
this.versionData.pageSize = pageSize this.versionData.pageSize = pageSize
this.drawer = true this.drawer = true
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
}) })
} }
}, },
watch: { watch: {
'tasks': { tasks: {
deep: true, deep: true,
handler (o) { handler (o) {
// Edit state does not allow deletion of node a... // Edit state does not allow deletion of node a...
this.setIsEditDag(true) this.setIsEditDag(true)
} }

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

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

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

@ -88,7 +88,7 @@
}, 1) }, 1)
}, },
_onBlur () { _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)) { if (this._validation(val)) {
this.$emit('valueEvent', val) this.$emit('valueEvent', val)
this._setIconState(val) this._setIconState(val)

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

@ -61,7 +61,7 @@
// loading // loading
spinnerLoading: false, spinnerLoading: false,
// node name // node name
labelName: '', labelName: ''
} }
}, },
mixins: [disabledState], mixins: [disabledState],

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

@ -342,8 +342,8 @@
successBranch: '', successBranch: '',
failedBranch: '', failedBranch: '',
conditionResult: { conditionResult: {
'successNode': [], successNode: [],
'failedNode': [] failedNode: []
}, },
// dependence // dependence
dependence: {}, dependence: {},
@ -382,7 +382,7 @@
// preTasks // preTasks
preTaskIdsInWorkflow: [], preTaskIdsInWorkflow: [],
preTasksToAdd: [], // pre-taskIds to add, used in jsplumb connects 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
} }
}, },
/** /**
@ -538,11 +538,11 @@
}, },
_verifWorkGroup () { _verifWorkGroup () {
let item = this.store.state.security.workerGroupsListAll.find(item => { let item = this.store.state.security.workerGroupsListAll.find(item => {
return item.id == this.workerGroup; return item.id == this.workerGroup
}); })
if (item == undefined) { if (item == undefined) {
this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`) this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`)
return false; return false
} }
return true return true
}, },
@ -560,11 +560,11 @@
} }
// Verify task alarm parameters // Verify task alarm parameters
if (this.nodeData.taskType === 'DEPENDENT') { if (this.nodeData.taskType === 'DEPENDENT') {
if (!this.$refs['dependentTimeout']._verification()) { if (!this.$refs.dependentTimeout._verification()) {
return return
} }
} else { } else {
if (!this.$refs['timeout']._verification()) { if (!this.$refs.timeout._verification()) {
return return
} }
} }
@ -574,11 +574,10 @@
return return
} }
// Verify preTasks and update dag-things // Verify preTasks and update dag-things
if (this.$refs['PRE_TASK']) { if (this.$refs.PRE_TASK) {
if (!this.$refs['PRE_TASK']._verification()) { if (!this.$refs.PRE_TASK._verification()) {
return return
} } else {
else {
// Sync data-targetarr // Sync data-targetarr
$(`#${this.nodeData.id}`).attr( $(`#${this.nodeData.id}`).attr(
'data-targetarr', this.preTaskIdsInWorkflow ? this.preTaskIdsInWorkflow.join(',') : '') 'data-targetarr', this.preTaskIdsInWorkflow ? this.preTaskIdsInWorkflow.join(',') : '')
@ -725,12 +724,12 @@
this.failedBranch = o.conditionResult.failedNode[0] this.failedBranch = o.conditionResult.failedNode[0]
} }
// If the workergroup has been deleted, set the default workergroup // If the workergroup has been deleted, set the default workergroup
var hasMatch = false; var hasMatch = false
for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) { for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) {
var workerGroup = this.store.state.security.workerGroupsListAll[i].id var workerGroup = this.store.state.security.workerGroupsListAll[i].id
if (o.workerGroup == workerGroup) { if (o.workerGroup == workerGroup) {
hasMatch = true; hasMatch = true
break; break
} }
} }
if (o.workerGroup == undefined) { if (o.workerGroup == undefined) {
@ -746,7 +745,6 @@
this.params = o.params || {} this.params = o.params || {}
this.dependence = o.dependence || {} this.dependence = o.dependence || {}
this.cacheDependence = o.dependence || {} this.cacheDependence = o.dependence || {}
} else { } else {
this.workerGroup = this.store.state.security.workerGroupsListAll[0].id this.workerGroup = this.store.state.security.workerGroupsListAll[0].id
} }
@ -765,10 +763,10 @@
}, },
mounted () { mounted () {
let self = this let self = this
$("#cancelBtn").mousedown(function(event){ $('#cancelBtn').mousedown(function (event) {
event.preventDefault(); event.preventDefault()
self.close() self.close()
}); })
}, },
updated () { updated () {
}, },
@ -826,7 +824,7 @@
mDependentTimeout, mDependentTimeout,
mPriority, mPriority,
mWorkerGroups, mWorkerGroups,
mPreTasks, mPreTasks
} }
} }
</script> </script>

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

@ -67,7 +67,7 @@
*/ */
const handerTextareaSize = (isH = 0) => { const handerTextareaSize = (isH = 0) => {
$('body').find('.tooltip.fade.top.in').remove() $('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 = '' let content = ''
@ -179,8 +179,8 @@
this.loadingIndex = this.loadingIndex - 1 this.loadingIndex = this.loadingIndex - 1
this._ckLog() this._ckLog()
}, 1000, { }, 1000, {
'leading': false, leading: false,
'trailing': true trailing: true
}), }),
/** /**
* down * down
@ -189,8 +189,8 @@
this.loadingIndex = this.loadingIndex + 1 this.loadingIndex = this.loadingIndex + 1
this._ckLog() this._ckLog()
}, 1000, { }, 1000, {
'leading': false, leading: false,
'trailing': true trailing: true
}), }),
/** /**
* Monitor scroll bar * 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', { this.$emit('on-dsData', {
type: this.type, type: this.type,
datasource: val datasource: val
}); })
} }
}, },
created () { created () {

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

@ -212,7 +212,7 @@
depTasksList: depTasksList, depTasksList: depTasksList,
cycle: 'day', cycle: 'day',
dateValue: 'today', dateValue: 'today',
dateValueList: _.cloneDeep(dateValueList['day']), dateValueList: _.cloneDeep(dateValueList.day),
state: '' state: ''
} }
}, },

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

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

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

@ -43,7 +43,7 @@
data () { data () {
return { return {
// script // script
rawScript: '', rawScript: ''
} }
}, },
mixins: [disabledState], mixins: [disabledState],
@ -61,7 +61,7 @@
mode: 'shell', mode: 'shell',
readOnly: this.isDetails readOnly: this.isDetails
}) })
editor.on("change",function(){ editor.on('change', function () {
self.$emit('getJsonBoxValue', editor.getValue()) self.$emit('getJsonBoxValue', editor.getValue())
}) })
@ -79,7 +79,7 @@
editor.setValue(this.rawScript) editor.setValue(this.rawScript)
return editor return editor
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

@ -43,7 +43,7 @@
data () { data () {
return { return {
// script // script
rawScript: '', rawScript: ''
} }
}, },
mixins: [disabledState], mixins: [disabledState],
@ -61,7 +61,7 @@
mode: 'shell', mode: 'shell',
readOnly: this.isDetails readOnly: this.isDetails
}) })
editor.on("change",function(){ editor.on('change', function () {
self.$emit('getSriptBoxValue', editor.getValue()) self.$emit('getSriptBoxValue', editor.getValue())
}) })
@ -79,7 +79,7 @@
editor.setValue(this.rawScript) editor.setValue(this.rawScript)
return editor return editor
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

@ -155,7 +155,7 @@
if (v1.depTasks == $(this).text()) { if (v1.depTasks == $(this).text()) {
v1.state = $(this).attr('data-dependent-depstate') v1.state = $(this).attr('data-dependent-depstate')
} }
}); })
})) }))
} }
}, },

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

@ -219,7 +219,7 @@
// jvm memory xms // jvm memory xms
xmx: 1, xmx: 1,
scriptBoxDialog: false, scriptBoxDialog: false,
item: '', item: ''
} }
}, },
mixins: [disabledState], mixins: [disabledState],
@ -427,8 +427,8 @@
preStatements: this.preStatements, preStatements: this.preStatements,
postStatements: this.postStatements, postStatements: this.postStatements,
xms: +this.xms, xms: +this.xms,
xmx: +this.xmx, xmx: +this.xmx
}); })
}, },
_destroyEditor () { _destroyEditor () {
if (editor) { if (editor) {
@ -450,10 +450,9 @@
// Non-null objects represent backfill // Non-null objects represent backfill
if (!_.isEmpty(o)) { if (!_.isEmpty(o)) {
// set jvm memory // set jvm memory
this.xms = o.params.xms || 1 ; this.xms = o.params.xms || 1
this.xmx = o.params.xmx || 1 ; this.xmx = o.params.xmx || 1
// backfill // backfill
if (o.params.customConfig == 0) { if (o.params.customConfig == 0) {
this.customConfig = 0 this.customConfig = 0
@ -503,7 +502,7 @@
watch: { watch: {
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this._cacheParams(); this._cacheParams()
} }
}, },
computed: { computed: {

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

@ -236,7 +236,7 @@
} }
}, },
allNoResources: [], allNoResources: [],
noRes: [], noRes: []
} }
}, },
props: { props: {
@ -284,7 +284,6 @@
return false return false
} }
if (!this.mainJar) { if (!this.mainJar) {
this.$message.warning(`${i18n.$t('Please enter main jar package')}`) this.$message.warning(`${i18n.$t('Please enter main jar package')}`)
return false return false
@ -345,8 +344,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -358,16 +357,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -384,9 +383,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
@ -415,7 +414,7 @@
this.mainJarList = this.mainJarList.concat(noResources) this.mainJarList = this.mainJarList.concat(noResources)
} }
} }
}, }
}, },
watch: { watch: {
// Listening type // Listening type
@ -426,7 +425,7 @@
}, },
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
} }
}, },
computed: { computed: {
@ -498,7 +497,6 @@
this.jobManagerMemory = o.params.jobManagerMemory || '1G' this.jobManagerMemory = o.params.jobManagerMemory || '1G'
this.taskManagerMemory = o.params.taskManagerMemory || '2G' this.taskManagerMemory = o.params.taskManagerMemory || '2G'
this.mainArgs = o.params.mainArgs || '' this.mainArgs = o.params.mainArgs || ''
this.others = o.params.others this.others = o.params.others
this.programType = o.params.programType || 'SCALA' this.programType = o.params.programType || 'SCALA'

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

@ -89,7 +89,6 @@
</div> </div>
</m-list-box> </m-list-box>
<m-list-box > <m-list-box >
<div slot="text">{{$t('Timeout Settings')}}</div> <div slot="text">{{$t('Timeout Settings')}}</div>
<div slot="content"> <div slot="content">
@ -231,7 +230,7 @@
* @param val * @param val
*/ */
cacheParams (val) { cacheParams (val) {
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
} }
}, },
created () { created () {

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

@ -178,8 +178,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -191,16 +191,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -217,9 +217,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
@ -288,7 +288,7 @@
programType: this.programType programType: this.programType
}) })
return true return true
}, }
}, },
watch: { watch: {
@ -302,7 +302,7 @@
}, },
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
} }
}, },
computed: { computed: {

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

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

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

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

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

@ -183,8 +183,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -196,16 +196,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -222,9 +222,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
@ -258,7 +258,7 @@
watch: { watch: {
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
} }
}, },
computed: { computed: {

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

@ -192,8 +192,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -205,16 +205,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -231,9 +231,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
@ -267,7 +267,7 @@
watch: { watch: {
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
} }
}, },
computed: { computed: {

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

@ -289,8 +289,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -302,16 +302,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -328,9 +328,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {

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

@ -390,7 +390,6 @@
receivers: this.receivers.join(','), receivers: this.receivers.join(','),
receiversCc: this.receiversCc.join(','), receiversCc: this.receiversCc.join(','),
showType: (() => { showType: (() => {
let showType = this.showType let showType = this.showType
if (showType.length === 2 && showType[0] === 'ATTACHMENT') { if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
return [showType[1], showType[0]].join(',') return [showType[1], showType[0]].join(',')
@ -402,7 +401,7 @@
connParams: this.connParams, connParams: this.connParams,
preStatements: this.preStatements, preStatements: this.preStatements,
postStatements: this.postStatements postStatements: this.postStatements
}); })
}, },
_destroyEditor () { _destroyEditor () {
if (editor) { if (editor) {
@ -491,7 +490,6 @@
receivers: this.receivers.join(','), receivers: this.receivers.join(','),
receiversCc: this.receiversCc.join(','), receiversCc: this.receiversCc.join(','),
showType: (() => { showType: (() => {
let showType = this.showType let showType = this.showType
if (showType.length === 2 && showType[0] === 'ATTACHMENT') { if (showType.length === 2 && showType[0] === 'ATTACHMENT') {
return [showType[1], showType[0]].join(',') return [showType[1], showType[0]].join(',')
@ -520,4 +518,3 @@
top: -16px; top: -16px;
} }
</style> </style>

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

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

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

@ -227,15 +227,15 @@
this.$emit('on-params', { this.$emit('on-params', {
resourceList: dataProcessing, resourceList: dataProcessing,
localParams: this.localParams, localParams: this.localParams,
rawScript: tureScript, rawScript: tureScript
}) })
return true return true
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0? item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item) : this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {
@ -247,16 +247,16 @@
searchTree (element, id) { searchTree (element, id) {
// id // id
if (element.id == id) { if (element.id == id) {
return element; return element
} else if (element.children != null) { } else if (element.children != null) {
var i; var i
var result = null; var result = null
for (i = 0; result == null && i < element.children.length; i++) { for (i = 0; result == null && i < element.children.length; i++) {
result = this.searchTree(element.children[i], id); result = this.searchTree(element.children[i], id)
} }
return result; return result
} }
return null; return null
}, },
dataProcess (backResource) { dataProcess (backResource) {
let isResourceId = [] let isResourceId = []
@ -273,9 +273,9 @@
return item.id return item.id
}) })
Array.prototype.diff = function (a) { Array.prototype.diff = function (a) {
return this.filter(function(i) {return a.indexOf(i) < 0;}); return this.filter(function (i) { return a.indexOf(i) < 0 })
}; }
let diffSet = this.resourceList.diff(resourceIdArr); let diffSet = this.resourceList.diff(resourceIdArr)
let optionsCmp = [] let optionsCmp = []
if (diffSet.length > 0) { if (diffSet.length > 0) {
diffSet.forEach(item => { diffSet.forEach(item => {
@ -310,20 +310,20 @@
// Watch the cacheParams // Watch the cacheParams
cacheParams (val) { cacheParams (val) {
this.resourceNameVal = val this.resourceNameVal = val
this.$emit('on-cache-params', val); this.$emit('on-cache-params', val)
}, },
"master": { master: {
handler (code) { handler (code) {
if (code == 'spark://') { if (code == 'spark://') {
this.masterUrlState = true; this.masterUrlState = true
} else if (code == 'mesos://') { } else if (code == 'mesos://') {
this.masterUrlState = true; this.masterUrlState = true
} else { } else {
this.masterUrlState = false; this.masterUrlState = false
this.masterUrl = '' this.masterUrl = ''
} }
} }
}, }
}, },
computed: { computed: {
cacheParams () { cacheParams () {
@ -357,7 +357,7 @@
deployMode: this.deployMode, deployMode: this.deployMode,
master: this.master, master: this.master,
masterUrl: this.masterUrl, masterUrl: this.masterUrl,
queue:this.queue, queue: this.queue
} }
} }
}, },

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

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

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

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

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

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

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

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

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

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

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

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

@ -352,7 +352,7 @@
if (this.item) { if (this.item) {
param.id = this.item.id 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.$message.success(res.msg)
this.spinnerLoading = false this.spinnerLoading = false
this.$emit('onUpdate') this.$emit('onUpdate')
@ -372,7 +372,7 @@
this.host = res.host this.host = res.host
// When in Editpage, Prevent default value overwrite backfill value // When in Editpage, Prevent default value overwrite backfill value
let that = this; let that = this
setTimeout(() => { setTimeout(() => {
this.port = res.port this.port = res.port
}, 0) }, 0)
@ -391,7 +391,6 @@
* Set default port for each type. * Set default port for each type.
*/ */
_setDefaultValues (value) { _setDefaultValues (value) {
// Default type is MYSQL // Default type is MYSQL
let type = this.type || 'MYSQL' let type = this.type || 'MYSQL'
@ -401,7 +400,6 @@
let mapperPort = this.prePortMapper[type] let mapperPort = this.prePortMapper[type]
this.port = mapperPort || defaultPort this.port = mapperPort || defaultPort
}, },
/** /**
@ -439,10 +437,9 @@
break break
default: default:
break break
} }
return defaultPort return defaultPort
}, }
}, },
created () { created () {
// Backfill // Backfill
@ -451,23 +448,22 @@
} }
this._setDefaultValues() this._setDefaultValues()
}, },
watch: { watch: {
type (value) { type (value) {
if (value == 'POSTGRESQL') { if (value == 'POSTGRESQL') {
this.showdDatabase = true; this.showdDatabase = true
} else { } else {
this.showdDatabase = false; this.showdDatabase = false
} }
if (value == 'ORACLE' && !this.item.id) { if (value == 'ORACLE' && !this.item.id) {
this.showConnectType = true; this.showConnectType = true
this.connectType = 'ORACLE_SERVICE_NAME' this.connectType = 'ORACLE_SERVICE_NAME'
} else if (value == 'ORACLE' && this.item.id) { } else if (value == 'ORACLE' && this.item.id) {
this.showConnectType = true; this.showConnectType = true
} else { } else {
this.showConnectType = false; this.showConnectType = false
} }
// Set default port for each type datasource // Set default port for each type datasource
this._setDefaultValues(value) this._setDefaultValues(value)
@ -539,5 +535,4 @@
} }
} }
</style> </style>

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

@ -81,11 +81,11 @@
// Number of pages // Number of pages
pageNo: 1, pageNo: 1,
// Search value // Search value
searchVal: '', searchVal: ''
}, },
dialogVisible: false, dialogVisible: false,
item: {}, item: {}
} }
}, },
mixins: [listUrlParamHandle], mixins: [listUrlParamHandle],
@ -142,7 +142,7 @@
}, },
_onUpdate () { _onUpdate () {
this._debounceGET('false') this._debounceGET('false')
}, }
}, },
watch: { watch: {
// router // router

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

@ -26,6 +26,6 @@ export default {
components: { mProjectHome, mListConstruction }, components: { mProjectHome, mListConstruction },
mounted () { mounted () {
}, }
} }
</script> </script>

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

@ -77,4 +77,3 @@
} }
} }
</style> </style>

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

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

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

@ -95,7 +95,7 @@
this.getMasterData().then(res => { this.getMasterData().then(res => {
this.masterList = _.map(res, (v, i) => { this.masterList = _.map(res, (v, i) => {
return _.assign(v, { return _.assign(v, {
id: v.host + "_" + v.id, id: v.host + '_' + v.id,
resInfo: JSON.parse(v.resInfo) resInfo: JSON.parse(v.resInfo)
}) })
}) })

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

@ -88,7 +88,7 @@
// ...mapActions('monitor', ['getDatabaseData']) // ...mapActions('monitor', ['getDatabaseData'])
// ...mapActions('projects', ['getCommandStateCount']), // ...mapActions('projects', ['getCommandStateCount']),
...mapActions('projects', ['getQueueCount']), ...mapActions('projects', ['getQueueCount']),
...mapActions('projects', ['getCommandStateCount']), ...mapActions('projects', ['getCommandStateCount'])
}, },
watch: {}, watch: {},
created () { created () {
@ -114,8 +114,8 @@
} }
) )
this.commandCountData = { this.commandCountData = {
'normalCount': normal, normalCount: normal,
'errorCount' : error errorCount: error
} }
}).catch(() => { }).catch(() => {
}) })

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

@ -112,7 +112,7 @@
this.getWorkerData().then(res => { this.getWorkerData().then(res => {
this.workerList = _.map(res, (v, i) => { this.workerList = _.map(res, (v, i) => {
return _.assign(v, { return _.assign(v, {
id: v.host + "_" + v.id, id: v.host + '_' + v.id,
resInfo: JSON.parse(v.resInfo) resInfo: JSON.parse(v.resInfo)
}) })
}) })

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

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

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

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

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

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

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

@ -100,7 +100,7 @@
if (this.email === '') { if (this.email === '') {
return true return true
} }
this.email = _.trim(this.email).replace(/(;$)|(;$)/g, "") this.email = _.trim(this.email).replace(/(;$)|(;$)/g, '')
let email = this.email let email = this.email

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

@ -427,7 +427,6 @@
this.versionData.pageNo = pageNo, this.versionData.pageNo = pageNo,
this.versionData.pageSize = pageSize this.versionData.pageSize = pageSize
this.drawer = true this.drawer = true
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
}) })
@ -436,7 +435,7 @@
_batchExport () { _batchExport () {
this.exportDefinition({ this.exportDefinition({
processDefinitionIds: this.strSelectIds, processDefinitionIds: this.strSelectIds,
fileName: "process_"+new Date().getTime() fileName: 'process_' + new Date().getTime()
}).then(res => { }).then(res => {
this._onUpdate() this._onUpdate()
this.checkAll = false this.checkAll = false
@ -492,7 +491,7 @@
*/ */
_arrDelChange (v) { _arrDelChange (v) {
let arr = [] let arr = []
arr = _.map(v, 'id'); arr = _.map(v, 'id')
this.strSelectIds = _.join(arr, ',') this.strSelectIds = _.join(arr, ',')
}, },
/** /**

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

@ -325,13 +325,13 @@
let month = date.getMonth() + 1 let month = date.getMonth() + 1
let day = date.getDate() let day = date.getDate()
if (month < 10) { if (month < 10) {
month = "0" + month; month = '0' + month
} }
if (day < 10) { if (day < 10) {
day = "0" + day; day = '0' + day
} }
let startDate = year + "-" + month + "-" + day + ' ' + '00:00:00' let startDate = year + '-' + month + '-' + day + ' ' + '00:00:00'
let endDate = (year+100) + "-" + month + "-" + day + ' ' + '00:00:00' let endDate = (year + 100) + '-' + month + '-' + day + ' ' + '00:00:00'
let times = [] let times = []
times[0] = startDate times[0] = startDate
times[1] = endDate times[1] = endDate

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

@ -265,5 +265,4 @@
} }
} }
</style> </style>

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

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

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

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

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

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

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

@ -75,7 +75,7 @@
this.$router.push({ this.$router.push({
name: 'projects-instance-list', name: 'projects-instance-list',
query: { query: {
stateType: _.find(stateType, ['label', name])['code'], stateType: _.find(stateType, ['label', name]).code,
startDate: this.searchParams.startDate, startDate: this.searchParams.startDate,
endDate: this.searchParams.endDate endDate: this.searchParams.endDate
} }
@ -85,7 +85,7 @@
let data = res.data.taskCountDtos let data = res.data.taskCountDtos
this.processStateList = _.map(data, v => { this.processStateList = _.map(data, v => {
return { return {
key: _.find(stateType, ['code', v.taskStateType])['label'], key: _.find(stateType, ['code', v.taskStateType]).label,
value: v.count value: v.count
} }
}) })
@ -100,7 +100,7 @@
} }
}, },
watch: { watch: {
'searchParams': { searchParams: {
deep: true, deep: true,
immediate: true, immediate: true,
handler (o) { handler (o) {

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

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

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

@ -78,7 +78,7 @@
this.$router.push({ this.$router.push({
name: 'task-instance', name: 'task-instance',
query: { query: {
stateType: _.find(stateType, ['label', name])['code'], stateType: _.find(stateType, ['label', name]).code,
startDate: this.searchParams.startDate, startDate: this.searchParams.startDate,
endDate: this.searchParams.endDate endDate: this.searchParams.endDate
} }
@ -88,7 +88,7 @@
let data = res.data.taskCountDtos let data = res.data.taskCountDtos
this.taskCtatusList = _.map(data, v => { this.taskCtatusList = _.map(data, v => {
return { return {
key: _.find(stateType, ['code', v.taskStateType])['label'], key: _.find(stateType, ['code', v.taskStateType]).label,
value: v.count, value: v.count,
type: 'type' type: 'type'
} }
@ -105,7 +105,7 @@
} }
}, },
watch: { watch: {
'searchParams': { searchParams: {
deep: true, deep: true,
immediate: true, immediate: true,
handler (o) { handler (o) {

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

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

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

@ -85,7 +85,7 @@
startDate: '', startDate: '',
endDate: '' endDate: ''
}, },
dataTime: [], dataTime: []
} }
}, },
props: { props: {

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

@ -443,7 +443,7 @@
// }, // },
_arrDelChange (v) { _arrDelChange (v) {
let arr = [] let arr = []
arr = _.map(v, 'id'); arr = _.map(v, 'id')
console.log(arr) console.log(arr)
this.strDelete = _.join(arr, ',') this.strDelete = _.join(arr, ',')
}, },

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

@ -155,8 +155,8 @@
} }
this._getProcessInstanceListP(flag) this._getProcessInstanceListP(flag)
}, 100, { }, 100, {
'leading': false, leading: false,
'trailing': true trailing: true
}) })
}, },
watch: { watch: {
@ -169,7 +169,7 @@
this.searchParams.pageNo = !_.isEmpty(a.query) && a.query.pageNo || 1 this.searchParams.pageNo = !_.isEmpty(a.query) && a.query.pageNo || 1
} }
}, },
'searchParams': { searchParams: {
deep: true, deep: true,
handler () { handler () {
this._debounceGET() this._debounceGET()

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

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

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

@ -62,8 +62,6 @@
import listUrlParamHandle from '@/module/mixin/listUrlParamHandle' import listUrlParamHandle from '@/module/mixin/listUrlParamHandle'
import graphGrid from './_source/graphGrid.vue' import graphGrid from './_source/graphGrid.vue'
export default { export default {
name: 'projects-kinship-index', name: 'projects-kinship-index',
components: { graphGrid, mSpin, mNoData }, components: { graphGrid, mSpin, mNoData },
@ -71,7 +69,7 @@
return { return {
isLoading: true, isLoading: true,
isShowLabel: true, isShowLabel: true,
currentItemName: '', currentItemName: ''
} }
}, },
props: {}, props: {},
@ -86,7 +84,7 @@
Promise.all([ Promise.all([
// get process definition // get process definition
this.getWorkFlowList(), this.getWorkFlowList(),
this.getWorkFlowDAG(), this.getWorkFlowDAG()
]).then((data) => { ]).then((data) => {
this.isLoading = false this.isLoading = false
}).catch(() => { }).catch(() => {
@ -97,21 +95,21 @@
* reset * reset
*/ */
reset () { reset () {
this.isLoading = true; this.isLoading = true
this.$nextTick(() => { this.$nextTick(() => {
this.isLoading = false; this.isLoading = false
}) })
}, },
async onChange (item) { async onChange (item) {
const { value, label } = item || {}; const { value, label } = item || {}
this.isLoading = true; this.isLoading = true
this.currentItemName = label; this.currentItemName = label
try { try {
await this.getWorkFlowDAG(value); await this.getWorkFlowDAG(value)
} catch (error) { } catch (error) {
this.$message.error(error.msg || '') this.$message.error(error.msg || '')
} }
this.isLoading = false; this.isLoading = false
}, },
tooltipOption (text) { tooltipOption (text) {
return { return {
@ -120,14 +118,14 @@
placement: 'top', placement: 'top',
theme: 'dark', theme: 'dark',
triggerEvent: 'mouseenter', triggerEvent: 'mouseenter',
large: false, large: false
} }
}, },
changeLabel () { changeLabel () {
this.isLoading = true; this.isLoading = true
this.isShowLabel = !this.isShowLabel; this.isShowLabel = !this.isShowLabel
this.$nextTick(() => { this.$nextTick(() => {
this.isLoading = false; this.isLoading = false
}) })
} }
}, },
@ -144,7 +142,7 @@
...mapState('kinship', ['locations', 'workList']), ...mapState('kinship', ['locations', 'workList']),
inputFocusStyle () { inputFocusStyle () {
return `width:280px` return `width:280px`
}, }
}, },
mounted () { mounted () {
} }

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

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

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

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

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

@ -62,7 +62,6 @@
import mConditions from '@/module/components/conditions/conditions' import mConditions from '@/module/components/conditions/conditions'
import mListConstruction from '@/module/components/listConstruction/listConstruction' import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default { export default {
name: 'projects-list', name: 'projects-list',
data () { data () {

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

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

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

@ -115,7 +115,7 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
if (this.searchParams.pageNo == undefined) { if (this.searchParams.pageNo == undefined) {
this.$router.push({ path: `/projects/index` }) this.$router.push({ path: '/projects/index' })
return false return false
} }
this.getTaskInstanceList(this.searchParams).then(res => { this.getTaskInstanceList(this.searchParams).then(res => {
@ -139,8 +139,8 @@
} }
this._getList(flag) this._getList(flag)
}, 100, { }, 100, {
'leading': false, leading: false,
'trailing': true trailing: true
}) })
}, },
watch: { watch: {

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

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

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

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

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

@ -94,7 +94,7 @@
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.spinnerLoading = false this.spinnerLoading = false
this.$router.push({ path: `/resource/file`}) this.$router.push({ path: '/resource/file' })
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
@ -109,7 +109,7 @@
} }
return true return true
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

@ -94,7 +94,7 @@
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.spinnerLoading = false this.spinnerLoading = false
this.$router.push({ path: `/resource/udf/resource`}) this.$router.push({ path: '/resource/udf/resource' })
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
@ -108,7 +108,7 @@
return false return false
} }
return true return true
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

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

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

@ -109,7 +109,7 @@
} }
return true return true
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

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

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

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

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

@ -91,7 +91,7 @@
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.spinnerLoading = false this.spinnerLoading = false
this.$router.push({ path: `/resource/udf`}) this.$router.push({ path: '/resource/udf' })
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
@ -106,7 +106,7 @@
} }
return true return true
}, }
}, },
watch: {}, watch: {},
created () { created () {

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

@ -123,7 +123,7 @@
return { return {
label: node.name label: node.name
} }
}, }
} }
}, },
props: { props: {
@ -131,19 +131,19 @@
}, },
methods: { methods: {
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
this._verifyUdfFuncName().then(res => { this._verifyUdfFuncName().then(res => {
this._createUdfFunc().then() this._createUdfFunc().then()
}).then(res => { }).then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
_createUdfFunc () { _createUdfFunc () {
@ -166,7 +166,7 @@
param.id = id param.id = id
} }
// api // 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.$emit('onUpdate', param)
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
@ -203,7 +203,7 @@
if (item.dirctory) { if (item.dirctory) {
return item return item
} }
}); })
this.udfResourceList = item this.udfResourceList = item
this.udfResourceDirList = item1 this.udfResourceDirList = item1
resolve() resolve()
@ -231,8 +231,8 @@
// diGuiTree // diGuiTree
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
delete item.children : this.diGuiTree(item.children); ? delete item.children : this.diGuiTree(item.children)
}) })
}, },
/** /**

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

@ -106,7 +106,7 @@
} }
return true return true
}, }
}, },
watch: {}, watch: {},
created () { created () {

18
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue

@ -90,26 +90,26 @@
this.$emit('onUpdate') this.$emit('onUpdate')
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
} }
let $catch = (e) => { let $catch = (e) => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
if (this.item) { if (this.item) {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`security/updateQueueQ`, param).then(res => { this.store.dispatch('security/updateQueueQ', param).then(res => {
$then(res) $then(res)
}).catch(e => { }).catch(e => {
$catch(e) $catch(e)
}) })
} else { } else {
this._verifyName(param).then(() => { this._verifyName(param).then(() => {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`security/createQueueQ`, param).then(res => { this.store.dispatch('security/createQueueQ', param).then(res => {
$then(res) $then(res)
}).catch(e => { }).catch(e => {
$catch(e) $catch(e)
@ -120,11 +120,11 @@
} }
}, },
_verification () { _verification () {
if (!this.queueName.replace(/\s*/g,"")) { if (!this.queueName.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter name')}`) this.$message.warning(`${i18n.$t('Please enter name')}`)
return false return false
} }
if (!this.queue.replace(/\s*/g,"")) { if (!this.queue.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter queue value')}`) this.$message.warning(`${i18n.$t('Please enter queue value')}`)
return false return false
} }
@ -132,7 +132,7 @@
}, },
_verifyName (param) { _verifyName (param) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.store.dispatch(`security/verifyQueueQ`, param).then(res => { this.store.dispatch('security/verifyQueueQ', param).then(res => {
resolve() resolve()
}).catch(e => { }).catch(e => {
reject(e) reject(e)

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue

@ -78,7 +78,7 @@
queueList: [], queueList: [],
queueId: '', queueId: '',
tenantCode: '', tenantCode: '',
description: '', description: ''
} }
}, },
props: { props: {
@ -93,7 +93,7 @@
return return
} }
// Verify username // Verify username
this.store.dispatch(`security/verifyName`, { this.store.dispatch('security/verifyName', {
type: 'tenant', type: 'tenant',
tenantCode: this.tenantCode tenantCode: this.tenantCode
}).then(res => { }).then(res => {
@ -121,7 +121,7 @@
}, },
_verification () { _verification () {
let isEn = /^[0-9a-zA-Z_.-]{1,}$/ let isEn = /^[0-9a-zA-Z_.-]{1,}$/
if (!this.tenantCode.replace(/\s*/g,"")) { if (!this.tenantCode.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter the tenant code in English')}`) this.$message.warning(`${i18n.$t('Please enter the tenant code in English')}`)
return false return false
} }
@ -141,16 +141,16 @@
if (this.item) { if (this.item) {
param.id = this.item.id param.id = this.item.id
} }
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`security/${this.item ? 'updateQueue' : 'createQueue'}`, param).then(res => { this.store.dispatch(`security/${this.item ? 'updateQueue' : 'createQueue'}`, param).then(res => {
this.$emit('onUpdate') this.$emit('onUpdate')
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
}, },
close () { close () {

1
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue

@ -60,7 +60,6 @@
<script> <script>
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
export default { export default {
name: 'tenement-list', name: 'tenement-list',
data () { data () {

15
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue

@ -146,7 +146,7 @@
return return
} }
// Verify username // Verify username
this.store.dispatch(`security/verifyName`, { this.store.dispatch('security/verifyName', {
type: 'user', type: 'user',
userName: this.userName userName: this.userName
}).then(res => { }).then(res => {
@ -162,7 +162,7 @@
// Mobile phone number regular // Mobile phone number regular
let regPhone = /^1(3|4|5|6|7|8)\d{9}$/; // eslint-disable-line let regPhone = /^1(3|4|5|6|7|8)\d{9}$/; // eslint-disable-line
let regPassword = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]+$)[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、0-9A-Za-z]{6,22}$/; let regPassword = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]+$)[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、0-9A-Za-z]{6,22}$/
let userNameLength = this.userName.length let userNameLength = this.userName.length
// user name // user name
@ -170,7 +170,7 @@
this.$message.warning(`${i18n.$t('User name length is between 3 and 39')}`) this.$message.warning(`${i18n.$t('User name length is between 3 and 39')}`)
return false return false
} }
if (!this.userName.replace(/\s*/g,"")) { if (!this.userName.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter user name')}`) this.$message.warning(`${i18n.$t('Please enter user name')}`)
return false return false
} }
@ -210,7 +210,6 @@
_getQueueList () { _getQueueList () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.store.dispatch('security/getQueueList').then(res => { this.store.dispatch('security/getQueueList').then(res => {
this.queueList = _.map(res, v => { this.queueList = _.map(res, v => {
return { return {
id: v.id, id: v.id,
@ -244,9 +243,9 @@
}) })
}, },
_submit () { _submit () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
let queueCode = ''; let queueCode = ''
// get queue code // get queue code
if (this.queueName != '') { if (this.queueName != '') {
queueCode = this.queueList.length > 0 ? _.find(this.queueList, ['id', this.queueName]).code : '' queueCode = this.queueList.length > 0 ? _.find(this.queueList, ['id', this.queueName]).code : ''
@ -267,13 +266,13 @@
this.store.dispatch(`security/${this.item ? 'updateUser' : 'createUser'}`, param).then(res => { this.store.dispatch(`security/${this.item ? 'updateUser' : 'createUser'}`, param).then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
this.$emit('onUpdate', param) this.$emit('onUpdate', param)
this.$message.success(res.msg) this.$message.success(res.msg)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
}, },
close () { close () {

10
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue

@ -93,7 +93,7 @@
} }
// Verify username // Verify username
this.store.dispatch(`security/verifyName`, { this.store.dispatch('security/verifyName', {
type: 'alertgroup', type: 'alertgroup',
groupName: this.groupName groupName: this.groupName
}).then(res => { }).then(res => {
@ -105,7 +105,7 @@
}, },
_verification () { _verification () {
// group name // group name
if (!this.groupName.replace(/\s*/g,"")) { if (!this.groupName.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter group name')}`) this.$message.warning(`${i18n.$t('Please enter group name')}`)
return false return false
} }
@ -120,16 +120,16 @@
if (this.item) { if (this.item) {
param.id = this.item.id param.id = this.item.id
} }
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`security/${this.item ? 'updateAlertgrou' : 'createAlertgrou'}`, param).then(res => { this.store.dispatch(`security/${this.item ? 'updateAlertgrou' : 'createAlertgrou'}`, param).then(res => {
this.$emit('onUpdate') this.$emit('onUpdate')
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
}, },
close () { close () {

12
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue

@ -81,10 +81,10 @@
}, },
checkIsIps (ips) { checkIsIps (ips) {
let reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/ let reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
let valdata = ips.split(','); let valdata = ips.split(',')
for (let i = 0; i < valdata.length; i++) { for (let i = 0; i < valdata.length; i++) {
if (reg.test(valdata[i]) == false) { if (reg.test(valdata[i]) == false) {
return false; return false
} }
} }
return true return true
@ -114,16 +114,16 @@
if (this.item) { if (this.item) {
param.id = this.item.id param.id = this.item.id
} }
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`security/saveWorkerGroups`, param).then(res => { this.store.dispatch('security/saveWorkerGroups', param).then(res => {
this.$emit('onUpdate') this.$emit('onUpdate')
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} }
}, },

2
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue

@ -82,6 +82,6 @@
this.list = this.workerGroupList this.list = this.workerGroupList
}, },
mounted () {}, mounted () {},
components: {}, components: {}
} }
</script> </script>

2
dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue

@ -107,7 +107,7 @@
* verification * verification
*/ */
_verification () { _verification () {
let regPassword = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]+$)[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、0-9A-Za-z]{6,22}$/; let regPassword = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?![`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]+$)[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、0-9A-Za-z]{6,22}$/
// password // password
if (!regPassword.test(this.userPassword)) { if (!regPassword.test(this.userPassword)) {

12
dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue

@ -91,7 +91,7 @@
pickerOptions: { pickerOptions: {
disabledDate (time) { disabledDate (time) {
return time.getTime() < Date.now() - 8.64e7 // return time.getTime() < Date.now() - 8.64e7 //
}, }
} }
} }
}, },
@ -120,21 +120,21 @@
if (this.item) { if (this.item) {
param.id = this.item.id param.id = this.item.id
} }
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
this.store.dispatch(`user/${this.item ? 'updateToken' : 'createToken'}`, param).then(res => { this.store.dispatch(`user/${this.item ? 'updateToken' : 'createToken'}`, param).then(res => {
this.$emit('onUpdate') this.$emit('onUpdate')
this.$message.success(res.msg) this.$message.success(res.msg)
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
}, },
_generateToken () { _generateToken () {
this.tokenLoading = true this.tokenLoading = true
this.store.dispatch(`user/generateToken`, { this.store.dispatch('user/generateToken', {
userId: this.userId, userId: this.userId,
expireTime: this.expireTime expireTime: this.expireTime
}).then(res => { }).then(res => {
@ -167,7 +167,7 @@
} }
} }
if (this.auth) { if (this.auth) {
this.store.dispatch(`security/getUsersAll`).then(res => { this.store.dispatch('security/getUsersAll').then(res => {
this.userIdList = _.map(res, v => _.pick(v, ['id', 'userName'])) this.userIdList = _.map(res, v => _.pick(v, ['id', 'userName']))
d(this.userIdList[0].id) d(this.userIdList[0].id)
}) })

8
dolphinscheduler-ui/src/js/conf/login/App.vue

@ -82,10 +82,10 @@
this._gLogin().then(res => { this._gLogin().then(res => {
setTimeout(() => { setTimeout(() => {
this.spinnerLoading = false this.spinnerLoading = false
sessionStorage.setItem('isLeft',1); sessionStorage.setItem('isLeft', 1)
if (res.data.hasOwnProperty("sessionId")) { if (res.data.hasOwnProperty('sessionId')) {
let sessionId = res.data.sessionId let sessionId = res.data.sessionId
sessionStorage.setItem("sessionId", sessionId) sessionStorage.setItem('sessionId', sessionId)
cookies.set('sessionId', sessionId, { path: '/' }) cookies.set('sessionId', sessionId, { path: '/' })
} }
@ -118,7 +118,7 @@
}, },
_gLogin () { _gLogin () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
io.post(`login`, { io.post('login', {
userName: this.userName, userName: this.userName,
userPassword: this.userPassword userPassword: this.userPassword
}, res => { }, res => {

28
dolphinscheduler-ui/src/js/module/components/crontab/source/_times/day.vue

@ -147,7 +147,7 @@
everyDayVal: '*', everyDayVal: '*',
WkintervalWeekPerformVal: 2, // Every few days WkintervalWeekPerformVal: 2, // Every few days
WkintervalWeekStartVal: 2, // What day of the week WkintervalWeekStartVal: 2, // What day of the week
selectWeekList: _.map(_.cloneDeep(selectList['week']), v => { selectWeekList: _.map(_.cloneDeep(selectList.week), v => {
return { return {
value: v.value, value: v.value,
label: `${this.$t(v.label)}` label: `${this.$t(v.label)}`
@ -156,13 +156,13 @@
intervalDayPerformVal: 1, // Every other day intervalDayPerformVal: 1, // Every other day
intervalDayStartVal: 1, // From the day intervalDayStartVal: 1, // From the day
WkspecificWeekVal: [], // Specific day of the week WkspecificWeekVal: [], // Specific day of the week
selectSpecificWeekList: selectList['specificWeek'], selectSpecificWeekList: selectList.specificWeek,
WkspecificDayVal: [], // Specific day of the week WkspecificDayVal: [], // Specific day of the week
selectSpecificDayList: selectList['day'], selectSpecificDayList: selectList.day,
monthLastDaysVal: 'L', monthLastDaysVal: 'L',
monthLastWorkingDays: 'LW', monthLastWorkingDays: 'LW',
monthLastWeeksVal: '?', monthLastWeeksVal: '?',
monthLastWeeksList: _.map(_.cloneDeep(selectList['lastWeeks']), v => { monthLastWeeksList: _.map(_.cloneDeep(selectList.lastWeeks), v => {
return { return {
value: v.value, value: v.value,
label: `${this.$t(v.label)}` label: `${this.$t(v.label)}`
@ -172,7 +172,7 @@
recentlyWorkingDaysMonthVal: 1, recentlyWorkingDaysMonthVal: 1,
WkmonthNumWeeksDayVal: 1, WkmonthNumWeeksDayVal: 1,
WkmonthNumWeeksWeekVal: 1, WkmonthNumWeeksWeekVal: 1,
WkmonthNumWeeksWeekList: _.map(_.cloneDeep(selectList['week']), v => { WkmonthNumWeeksWeekList: _.map(_.cloneDeep(selectList.week), v => {
return { return {
value: v.value, value: v.value,
label: `${this.$t(v.label)}` label: `${this.$t(v.label)}`
@ -189,7 +189,7 @@
onWkintervalWeekPerform (val) { onWkintervalWeekPerform (val) {
this.WkintervalWeekPerformVal = val this.WkintervalWeekPerformVal = val
if (this.radioDay === 'WkintervalWeek') { if (this.radioDay === 'WkintervalWeek') {
this.dayValue = `?` this.dayValue = '?'
this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}` this.weekValue = `${this.WkintervalWeekStartVal}/${this.WkintervalWeekPerformVal}`
} }
}, },
@ -332,33 +332,33 @@
}, },
WkintervalWeekStartVal (val) { WkintervalWeekStartVal (val) {
if (this.radioDay === 'WkintervalWeek') { if (this.radioDay === 'WkintervalWeek') {
this.dayValue = `?` this.dayValue = '?'
this.weekValue = `${val}/${this.WkintervalWeekPerformVal}` this.weekValue = `${val}/${this.WkintervalWeekPerformVal}`
} }
}, },
// Specific day of the week (multiple choice) // Specific day of the week (multiple choice)
WkspecificWeekVal (val) { WkspecificWeekVal (val) {
if (this.radioDay === 'WkspecificWeek') { if (this.radioDay === 'WkspecificWeek') {
this.dayValue = `?` this.dayValue = '?'
this.weekValue = val.join(',') this.weekValue = val.join(',')
} }
}, },
// Specific days (multiple choices) // Specific days (multiple choices)
WkspecificDayVal (val) { WkspecificDayVal (val) {
if (this.radioDay === 'specificDay') { if (this.radioDay === 'specificDay') {
this.weekValue = `?` this.weekValue = '?'
this.dayValue = val.join(',') this.dayValue = val.join(',')
} }
}, },
monthLastWeeksVal (val) { monthLastWeeksVal (val) {
if (this.radioDay === 'monthLastWeeks') { if (this.radioDay === 'monthLastWeeks') {
this.weekValue = val this.weekValue = val
this.dayValue = `?` this.dayValue = '?'
} }
}, },
WkmonthNumWeeksWeekVal (val) { WkmonthNumWeeksWeekVal (val) {
if (this.radioDay === 'WkmonthNumWeeks') { if (this.radioDay === 'WkmonthNumWeeks') {
this.dayValue = `?` this.dayValue = '?'
this.weekValue = `${val}#${this.WkmonthNumWeeksDayVal}` this.weekValue = `${val}#${this.WkmonthNumWeeksDayVal}`
} }
} }
@ -380,7 +380,7 @@
// week // week
if (isWeek1 || isWeek2 || isWeek($weekVal)) { if (isWeek1 || isWeek2 || isWeek($weekVal)) {
this.dayValue = `?` this.dayValue = '?'
/** /**
* Processing by sequence number (excluding days) * Processing by sequence number (excluding days)
@ -395,7 +395,7 @@
let a = isStr($weekVal, '/') let a = isStr($weekVal, '/')
this.WkintervalWeekStartVal = parseInt(a[0]) this.WkintervalWeekStartVal = parseInt(a[0])
this.WkintervalWeekPerformVal = parseInt(a[1]) this.WkintervalWeekPerformVal = parseInt(a[1])
this.dayValue = `?` this.dayValue = '?'
this.weekValue = `${this.WkintervalWeekPerformVal}/${this.WkintervalWeekStartVal}` this.weekValue = `${this.WkintervalWeekPerformVal}/${this.WkintervalWeekStartVal}`
this.radioDay = 'WkintervalWeek' this.radioDay = 'WkintervalWeek'
} }
@ -423,7 +423,7 @@
hanleWeekTwo() hanleWeekTwo()
} }
} else { } else {
this.weekValue = `?` this.weekValue = '?'
/** /**
* Processing by sequence number (excluding week) * Processing by sequence number (excluding week)

2
dolphinscheduler-ui/src/js/module/components/crontab/source/_times/year.vue

@ -71,7 +71,7 @@
return { return {
yearValue: '*', yearValue: '*',
radioYear: 'everyYear', radioYear: 'everyYear',
selectYearList: selectList['year'], selectYearList: selectList.year,
intervalPerformVal: 1, intervalPerformVal: 1,
intervalStartVal: 2019, intervalStartVal: 2019,
specificYearVal: [], specificYearVal: [],

10
dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue

@ -107,18 +107,18 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
name: this.name name: this.name
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -140,7 +140,7 @@
let formData = new FormData() let formData = new FormData()
formData.append('file', this.file) formData.append('file', this.file)
formData.append('projectName', this.store.state.dag.projectName) formData.append('projectName', this.store.state.dag.projectName)
io.post(`projects/import-definition`, res => { io.post('projects/import-definition', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdateDefinition') self.$emit('onUpdateDefinition')

20
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue

@ -123,21 +123,21 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
if (this.fileName === this.name) { if (this.fileName === this.name) {
const isLt1024M = this.file.size / 1024 / 1024 < 1024 const isLt1024M = this.file.size / 1024 / 1024 < 1024
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
} else { } else {
this.store.dispatch('resource/resourceVerifyName', { this.store.dispatch('resource/resourceVerifyName', {
@ -148,22 +148,22 @@
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} }
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -192,7 +192,7 @@
formData.append('description', this.description) formData.append('description', this.description)
formData.append('id', this.id) formData.append('id', this.id)
formData.append('type', this.type) formData.append('type', this.type)
io.post(`resources/update`, res => { io.post('resources/update', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdate') self.$emit('onUpdate')

16
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue

@ -123,7 +123,7 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
this.store.dispatch('resource/resourceVerifyName', { this.store.dispatch('resource/resourceVerifyName', {
fullName: this.currentDir + '/' + this.name, fullName: this.currentDir + '/' + this.name,
@ -133,21 +133,21 @@
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -177,7 +177,7 @@
formData.append('pid', this.pid) formData.append('pid', this.pid)
formData.append('currentDir', this.currentDir) formData.append('currentDir', this.currentDir)
formData.append('description', this.description) formData.append('description', this.description)
io.post(`resources/create`, res => { io.post('resources/create', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdateFileChildUpdate') self.$emit('onUpdateFileChildUpdate')
@ -217,7 +217,7 @@
}, },
close () { close () {
this.$emit('closeFileChildUpdate') this.$emit('closeFileChildUpdate')
}, }
}, },
mounted () { mounted () {
$('#file').change(() => { $('#file').change(() => {

20
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue

@ -122,21 +122,21 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
if (this.fileName === this.name) { if (this.fileName === this.name) {
const isLt1024M = this.file.size / 1024 / 1024 < 1024 const isLt1024M = this.file.size / 1024 / 1024 < 1024
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
} else { } else {
this.store.dispatch('resource/resourceVerifyName', { this.store.dispatch('resource/resourceVerifyName', {
@ -147,22 +147,22 @@
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} }
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -191,7 +191,7 @@
formData.append('description', this.description) formData.append('description', this.description)
formData.append('id', this.id) formData.append('id', this.id)
formData.append('type', this.type) formData.append('type', this.type)
io.post(`resources/update`, res => { io.post('resources/update', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdate') self.$emit('onUpdate')

14
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue

@ -124,7 +124,7 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
this.store.dispatch('resource/resourceVerifyName', { this.store.dispatch('resource/resourceVerifyName', {
fullName: '/' + this.name, fullName: '/' + this.name,
@ -134,21 +134,21 @@
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -178,7 +178,7 @@
formData.append('pid', this.pid) formData.append('pid', this.pid)
formData.append('currentDir', this.currentDir) formData.append('currentDir', this.currentDir)
formData.append('description', this.description) formData.append('description', this.description)
io.post(`resources/create`, res => { io.post('resources/create', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdateFileUpdate') self.$emit('onUpdateFileUpdate')

14
dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue

@ -123,7 +123,7 @@
* submit * submit
*/ */
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
if (this._validation()) { if (this._validation()) {
this.store.dispatch('resource/resourceVerifyName', { this.store.dispatch('resource/resourceVerifyName', {
fullName: this.currentDir + '/' + this.name, fullName: this.currentDir + '/' + this.name,
@ -133,21 +133,21 @@
if (isLt1024M) { if (isLt1024M) {
this._formDataUpdate().then(res => { this._formDataUpdate().then(res => {
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}, 800) }, 800)
}).catch(e => { }).catch(e => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$message.warning(`${i18n.$t('Upload File Size')}`) this.$message.warning(`${i18n.$t('Upload File Size')}`)
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}).catch(e => { }).catch(e => {
this.$message.error(e.msg || '') this.$message.error(e.msg || '')
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
}) })
} else { } else {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
} }
}, },
/** /**
@ -177,7 +177,7 @@
formData.append('pid', this.pid) formData.append('pid', this.pid)
formData.append('currentDir', this.currentDir) formData.append('currentDir', this.currentDir)
formData.append('description', this.description) formData.append('description', this.description)
io.post(`resources/create`, res => { io.post('resources/create', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
resolve() resolve()
self.$emit('onUpdateResourceChildUpdate') self.$emit('onUpdateResourceChildUpdate')

2
dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue

@ -119,7 +119,7 @@
formData.append('description', this.udfDesc) formData.append('description', this.udfDesc)
this.spinnerLoading = true this.spinnerLoading = true
this.$emit('on-update-present', false) this.$emit('on-update-present', false)
io.post(`resources/create`, res => { io.post('resources/create', res => {
this.$message.success(res.msg) this.$message.success(res.msg)
this.spinnerLoading = false this.spinnerLoading = false
this.progress = 0 this.progress = 0

2
dolphinscheduler-ui/src/js/module/components/nav/nav.vue

@ -245,7 +245,7 @@
}, },
onUpdateDefinition () { onUpdateDefinition () {
let self = this let self = this
findComponentDownward(self.$root, `definition-list-index`)._updateList() findComponentDownward(self.$root, 'definition-list-index')._updateList()
this.isUpdate = false this.isUpdate = false
this.progress = 0 this.progress = 0
this.definitionUpdateDialog = false this.definitionUpdateDialog = false

44
dolphinscheduler-ui/src/js/module/components/transfer/resource.vue

@ -41,7 +41,6 @@
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
name: 'transfer', name: 'transfer',
data () { data () {
@ -69,7 +68,7 @@
return { return {
label: node.name label: node.name
} }
}, }
} }
}, },
props: { props: {
@ -90,31 +89,30 @@
getParent getParent
*/ */
getParent (data2, nodeId2) { getParent (data2, nodeId2) {
var arrRes = []; var arrRes = []
if (data2.length == 0) { if (data2.length == 0) {
if (!!nodeId2) { if (nodeId2) {
arrRes.unshift(data2) arrRes.unshift(data2)
} }
return arrRes; return arrRes
} }
let rev = (data, nodeId) => { let rev = (data, nodeId) => {
for (var i = 0, length = data.length; i < length; i++) { for (var i = 0, length = data.length; i < length; i++) {
let node = data[i]; let node = data[i]
if (node.id == nodeId) { if (node.id == nodeId) {
arrRes.unshift(node) arrRes.unshift(node)
rev(data2, node.pid); rev(data2, node.pid)
break; break
} else {
if (node.children) {
rev(node.children, nodeId)
} }
else {
if (!!node.children) {
rev(node.children, nodeId);
} }
} }
return arrRes
} }
return arrRes; arrRes = rev(data2, nodeId2)
}; return arrRes
arrRes = rev(data2, nodeId2);
return arrRes;
}, },
_ok () { _ok () {
let fullPathId = [] let fullPathId = []
@ -146,21 +144,21 @@
}) })
}) })
let selAllSource = pathId.concat(pathUdfId) let selAllSource = pathId.concat(pathUdfId)
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
this.$emit('onUpdateAuthResource', _.map(selAllSource, v => v).join(',')) this.$emit('onUpdateAuthResource', _.map(selAllSource, v => v).join(','))
}, 800) }, 800)
}, },
_ckFile () { _ckFile () {
this.checkedValue = "fileResource" this.checkedValue = 'fileResource'
this.sourceList = this.fileSource this.sourceList = this.fileSource
this.targetList = this.fileTarget this.targetList = this.fileTarget
this.cacheSourceList = this.fileSource this.cacheSourceList = this.fileSource
this.cacheTargetList = this.fileTarget this.cacheTargetList = this.fileTarget
}, },
_ckUDf () { _ckUDf () {
this.checkedValue = "udfResource" this.checkedValue = 'udfResource'
this.sourceList = this.udfSource this.sourceList = this.udfSource
this.targetList = this.udfTarget this.targetList = this.udfTarget
this.cacheSourceList = this.udfSource this.cacheSourceList = this.udfSource
@ -182,7 +180,7 @@
if (i2 !== -1) { if (i2 !== -1) {
this.cacheSourceList.splice(i2, 1) this.cacheSourceList.splice(i2, 1)
} }
if(this.checkedValue == "fileResource") { if (this.checkedValue == 'fileResource') {
this.fileTarget = this.targetList this.fileTarget = this.targetList
this.fileSource = this.sourceList this.fileSource = this.sourceList
} else { } else {
@ -200,7 +198,7 @@
if (i2 !== -1) { if (i2 !== -1) {
this.cacheTargetList.splice(i2, 1) this.cacheTargetList.splice(i2, 1)
} }
if(this.checkedValue == "fileResource") { if (this.checkedValue == 'fileResource') {
this.fileSource = this.sourceList this.fileSource = this.sourceList
this.fileTarget = this.targetList this.fileTarget = this.targetList
} else { } else {
@ -210,8 +208,8 @@
}, },
diGuiTree (item) { // Recursive convenience tree structure diGuiTree (item) { // Recursive convenience tree structure
item.forEach(item => { item.forEach(item => {
item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         item.children === '' || item.children === undefined || item.children === null || item.children.length === 0
this.operationTree(item): this.diGuiTree(item.children); ? this.operationTree(item) : this.diGuiTree(item.children)
}) })
}, },
operationTree (item) { operationTree (item) {

6
dolphinscheduler-ui/src/js/module/components/transfer/transfer.vue

@ -71,9 +71,9 @@
}, },
methods: { methods: {
_ok () { _ok () {
this.$refs['popup'].spinnerLoading = true this.$refs.popup.spinnerLoading = true
setTimeout(() => { setTimeout(() => {
this.$refs['popup'].spinnerLoading = false this.$refs.popup.spinnerLoading = false
if (this.transferData.type.name === `${i18n.$t('Managing Users')}`) { if (this.transferData.type.name === `${i18n.$t('Managing Users')}`) {
this.$emit('onUpdate', _.map(this.targetList, v => v.id).join(',')) this.$emit('onUpdate', _.map(this.targetList, v => v.id).join(','))
} else if (this.transferData.type.name === `${i18n.$t('Project')}`) { } else if (this.transferData.type.name === `${i18n.$t('Project')}`) {
@ -83,7 +83,6 @@
} else if (this.transferData.type.name === `${i18n.$t('UDF Function')}`) { } else if (this.transferData.type.name === `${i18n.$t('UDF Function')}`) {
this.$emit('onUpdateAuthUdfFunc', _.map(this.targetList, v => v.id).join(',')) this.$emit('onUpdateAuthUdfFunc', _.map(this.targetList, v => v.id).join(','))
} }
}, 800) }, 800)
}, },
_sourceQuery () { _sourceQuery () {
@ -124,7 +123,6 @@
} else if (this.transferData.type.name === `${i18n.$t('UDF Function')}`) { } else if (this.transferData.type.name === `${i18n.$t('UDF Function')}`) {
this.$emit('closeAuthUdfFunc') this.$emit('closeAuthUdfFunc')
} }
} }
}, },
mounted () { mounted () {

Loading…
Cancel
Save