From 533470359344d737bfde9acc34736f64a25a89dc Mon Sep 17 00:00:00 2001 From: chengshiwen Date: Fri, 11 Dec 2020 23:20:08 +0800 Subject: [PATCH] fix eslint: fix syntax by npm run lint automatically --- .../src/components/Counter.vue | 46 +- .../src/components/Message.vue | 14 +- .../js/conf/home/pages/dag/_source/dag.vue | 125 +++--- .../formModel/_source/dependentTimeout.vue | 36 +- .../_source/formModel/_source/selectInput.vue | 4 +- .../formModel/_source/timeoutAlarm.vue | 2 +- .../dag/_source/formModel/formLineModel.vue | 50 +-- .../pages/dag/_source/formModel/formModel.vue | 78 ++-- .../home/pages/dag/_source/formModel/log.vue | 10 +- .../formModel/tasks/_source/datasource.vue | 2 +- .../tasks/_source/dependItemList.vue | 12 +- .../formModel/tasks/_source/httpParams.vue | 9 +- .../formModel/tasks/_source/jsonBox.vue | 10 +- .../formModel/tasks/_source/nodeStatus.vue | 8 +- .../formModel/tasks/_source/scriptBox.vue | 10 +- .../_source/formModel/tasks/_source/udfs.vue | 2 +- .../_source/formModel/tasks/conditions.vue | 16 +- .../dag/_source/formModel/tasks/datax.vue | 43 +- .../dag/_source/formModel/tasks/dependent.vue | 8 +- .../dag/_source/formModel/tasks/flink.vue | 218 +++++----- .../dag/_source/formModel/tasks/http.vue | 59 ++- .../pages/dag/_source/formModel/tasks/mr.vue | 202 ++++----- .../dag/_source/formModel/tasks/pre_tasks.vue | 14 +- .../dag/_source/formModel/tasks/procedure.vue | 4 +- .../dag/_source/formModel/tasks/python.vue | 110 ++--- .../dag/_source/formModel/tasks/shell.vue | 114 ++--- .../dag/_source/formModel/tasks/spark.vue | 210 +++++----- .../pages/dag/_source/formModel/tasks/sql.vue | 27 +- .../dag/_source/formModel/tasks/sqoop.vue | 392 +++++++++--------- .../_source/formModel/tasks/sub_process.vue | 4 +- .../dag/_source/formModel/tasks/waterdrop.vue | 154 +++---- .../pages/dag/_source/startingParam/index.vue | 12 +- .../dag/_source/udp/_source/selectTenant.vue | 10 +- .../conf/home/pages/dag/_source/udp/udp.vue | 7 +- .../home/pages/dag/_source/variable/index.vue | 2 +- .../conf/home/pages/dag/definitionDetails.vue | 6 +- .../src/js/conf/home/pages/dag/index.vue | 6 +- .../conf/home/pages/dag/instanceDetails.vue | 6 +- .../pages/list/_source/createDataSource.vue | 63 ++- .../pages/datasource/pages/list/index.vue | 12 +- .../src/js/conf/home/pages/home/index.vue | 18 +- .../src/js/conf/home/pages/monitor/index.vue | 6 +- .../pages/servers/_source/zookeeperList.vue | 1 - .../home/pages/monitor/pages/servers/db.vue | 70 ++-- .../pages/monitor/pages/servers/master.vue | 2 +- .../monitor/pages/servers/statistics.vue | 22 +- .../pages/monitor/pages/servers/worker.vue | 2 +- .../conditions/instance/processInstance.vue | 4 +- .../conditions/instance/taskInstance.vue | 6 +- .../taskRecordList/_source/conditions.vue | 18 +- .../_source/taskRecordList/_source/list.vue | 2 +- .../definition/pages/list/_source/email.vue | 2 +- .../definition/pages/list/_source/list.vue | 55 ++- .../pages/list/_source/relatedItems.vue | 36 +- .../definition/pages/list/_source/start.vue | 14 +- .../definition/pages/list/_source/timing.vue | 74 ++-- .../pages/definition/pages/list/index.vue | 14 +- .../pages/definition/pages/tree/index.vue | 3 +- .../pages/definition/timing/_source/list.vue | 4 +- .../pages/definition/timing/index.vue | 4 +- .../pages/index/_source/commandStateCount.vue | 4 +- .../pages/index/_source/defineUserCount.vue | 6 +- .../pages/index/_source/processStateCount.vue | 10 +- .../pages/index/_source/queueCount.vue | 4 +- .../pages/index/_source/taskCtatusCount.vue | 8 +- .../pages/index/_source/taskStatusCount.vue | 6 +- .../home/pages/projects/pages/index/index.vue | 2 +- .../pages/projects/pages/instance/index.vue | 2 +- .../pages/instance/pages/details/index.vue | 2 +- .../instance/pages/list/_source/list.vue | 6 +- .../pages/instance/pages/list/index.vue | 16 +- .../pages/kinship/_source/graphGrid.vue | 10 +- .../pages/projects/pages/kinship/index.vue | 44 +- .../pages/list/_source/createProject.vue | 8 +- .../projects/pages/list/_source/list.vue | 4 +- .../home/pages/projects/pages/list/index.vue | 5 +- .../pages/taskInstance/_source/list.vue | 6 +- .../projects/pages/taskInstance/index.vue | 14 +- .../pages/projects/pages/timing/index.vue | 2 +- .../src/js/conf/home/pages/resource/index.vue | 4 +- .../home/pages/resource/pages/file/index.vue | 4 +- .../pages/file/pages/create/index.vue | 2 +- .../pages/file/pages/createFolder/index.vue | 4 +- .../file/pages/createUdfFolder/index.vue | 4 +- .../pages/file/pages/details/index.vue | 8 +- .../resource/pages/file/pages/edit/index.vue | 6 +- .../pages/file/pages/list/_source/list.vue | 6 +- .../pages/file/pages/list/_source/rename.vue | 12 +- .../resource/pages/file/pages/list/index.vue | 10 +- .../pages/file/pages/subFile/index.vue | 4 +- .../pages/file/pages/subFileFolder/index.vue | 4 +- .../file/pages/subdirectory/_source/list.vue | 8 +- .../pages/subdirectory/_source/rename.vue | 13 +- .../pages/file/pages/subdirectory/index.vue | 24 +- .../pages/udf/pages/createUdfFolder/index.vue | 4 +- .../udf/pages/function/_source/createUdf.vue | 38 +- .../pages/udf/pages/function/index.vue | 8 +- .../pages/udf/pages/resource/_source/list.vue | 4 +- .../udf/pages/resource/_source/rename.vue | 12 +- .../pages/udf/pages/resource/index.vue | 8 +- .../pages/subUdfDirectory/_source/list.vue | 2 +- .../pages/subUdfDirectory/_source/rename.vue | 8 +- .../pages/udf/pages/subUdfDirectory/index.vue | 22 +- .../pages/udf/pages/subUdfFolder/index.vue | 4 +- .../src/js/conf/home/pages/security/index.vue | 2 +- .../pages/queue/_source/createQueue.vue | 22 +- .../home/pages/security/pages/queue/index.vue | 8 +- .../pages/tenement/_source/createTenement.vue | 14 +- .../security/pages/tenement/_source/list.vue | 1 - .../pages/security/pages/tenement/index.vue | 8 +- .../home/pages/security/pages/token/index.vue | 2 +- .../pages/users/_source/createUser.vue | 37 +- .../security/pages/users/_source/list.vue | 30 +- .../home/pages/security/pages/users/index.vue | 12 +- .../warningGroups/_source/createWarning.vue | 14 +- .../pages/warningGroups/_source/list.vue | 2 +- .../security/pages/warningGroups/index.vue | 8 +- .../workerGroups/_source/createWorker.vue | 24 +- .../pages/workerGroups/_source/list.vue | 4 +- .../security/pages/workerGroups/index.vue | 4 +- .../src/js/conf/home/pages/user/index.vue | 4 +- .../home/pages/user/pages/account/index.vue | 4 +- .../user/pages/password/_source/info.vue | 2 +- .../home/pages/user/pages/password/index.vue | 4 +- .../user/pages/token/_source/createToken.vue | 18 +- .../pages/user/pages/token/_source/list.vue | 2 +- .../home/pages/user/pages/token/index.vue | 10 +- dolphinscheduler-ui/src/js/conf/login/App.vue | 14 +- .../components/crontab/source/_times/day.vue | 28 +- .../components/crontab/source/_times/year.vue | 2 +- .../fileUpdate/definitionUpdate.vue | 14 +- .../fileUpdate/fileChildReUpdate.vue | 60 +-- .../components/fileUpdate/fileChildUpdate.vue | 22 +- .../components/fileUpdate/fileReUpload.vue | 62 +-- .../components/fileUpdate/fileUpdate.vue | 20 +- .../fileUpdate/resourceChildUpdate.vue | 18 +- .../components/fileUpdate/udfUpdate.vue | 8 +- .../js/module/components/layout/layout.vue | 2 +- .../src/js/module/components/nav/nav.vue | 20 +- .../secondaryMenu/secondaryMenu.vue | 6 +- .../module/components/transfer/resource.vue | 112 +++-- .../module/components/transfer/transfer.vue | 24 +- 142 files changed, 1735 insertions(+), 1769 deletions(-) diff --git a/dolphinscheduler-ui/src/components/Counter.vue b/dolphinscheduler-ui/src/components/Counter.vue index 6fafb5a54e..74dbfcd8de 100644 --- a/dolphinscheduler-ui/src/components/Counter.vue +++ b/dolphinscheduler-ui/src/components/Counter.vue @@ -24,30 +24,30 @@ \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/components/Message.vue b/dolphinscheduler-ui/src/components/Message.vue index 95f5236b6e..aba5ea6a56 100644 --- a/dolphinscheduler-ui/src/components/Message.vue +++ b/dolphinscheduler-ui/src/components/Message.vue @@ -19,10 +19,10 @@ \ No newline at end of file + export default { + name: 'message', + props: [ + 'msg' + ] + } + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue index a47d729baa..48043c094d 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue @@ -268,54 +268,54 @@ methods: { ...mapActions('dag', ['saveDAGchart', 'updateInstance', 'updateDefinition', 'getTaskState', 'switchProcessDefinitionVersion', 'getProcessDefinitionVersionsPage', 'deleteProcessDefinitionVersion']), ...mapMutations('dag', ['addTasks', 'cacheTasks', 'resetParams', 'setIsEditDag', 'setName', 'addConnects']), - startRunning(item,startNodeList,sourceType) { + startRunning (item, startNodeList, sourceType) { this.startData = item this.startNodeList.startNodeList this.sourceType = sourceType this.startDialog = true }, - onUpdateStart() { + onUpdateStart () { this.startDialog = false }, - closeStart() { + closeStart () { this.startDialog = false }, // DAG automatic layout - dagAutomaticLayout() { - if(this.store.state.dag.isEditDag) { + dagAutomaticLayout () { + if (this.store.state.dag.isEditDag) { this.$message.warning(`${i18n.$t('Please save the DAG before formatting')}`) return false } $('#canvas').html('') - // Destroy round robin + // Destroy round robin Dag.init({ - dag: this, - instance: jsPlumb.getInstance({ - Endpoint: [ - 'Dot', { radius: 1, cssClass: 'dot-style' } - ], - Connector: 'Bezier', - PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style - ConnectionOverlays: [ - [ - 'Arrow', - { - location: 1, - id: 'arrow', - length: 12, - foldback: 0.8 - } + dag: this, + instance: jsPlumb.getInstance({ + Endpoint: [ + 'Dot', { radius: 1, cssClass: 'dot-style' } ], - ['Label', { + Connector: 'Bezier', + PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style + ConnectionOverlays: [ + [ + 'Arrow', + { + location: 1, + id: 'arrow', + length: 12, + foldback: 0.8 + } + ], + ['Label', { location: 0.5, id: 'label' - }] - ], - Container: 'canvas', - ConnectionsDetachable: true + }] + ], + Container: 'canvas', + ConnectionsDetachable: true + }) }) - }) if (this.tasks.length) { Dag.backfill(true) if (this.type === 'instance') { @@ -344,8 +344,8 @@ /** * copy name */ - _copyName(){ - let clipboard = new Clipboard(`.copy-name`) + _copyName () { + let clipboard = new Clipboard('.copy-name') clipboard.on('success', e => { this.$message.success(`${i18n.$t('Copy success')}`) // Free memory @@ -383,8 +383,8 @@ let dom = $(`#${v2.id}`) let state = dom.find('.state-p') let depState = '' - taskList.forEach(item=>{ - if(item.name==v1.name) { + taskList.forEach(item => { + if (item.name == v1.name) { depState = item.state } }) @@ -460,7 +460,7 @@ this.spinnerLoading = true // Storage store Dag.saveStore().then(res => { - if(this._verifConditions(res.tasks)) { + if (this._verifConditions(res.tasks)) { if (this.urlParam.id) { /** * Edit @@ -509,24 +509,24 @@ }) }) }, - _closeDAG(){ + _closeDAG () { let $name = this.$route.name - if($name && $name.indexOf("definition") != -1){ - this.$router.push({ name: 'projects-definition-list'}) - }else{ - this.$router.push({ name: 'projects-instance-list'}) + if ($name && $name.indexOf('definition') != -1) { + this.$router.push({ name: 'projects-definition-list' }) + } else { + this.$router.push({ name: 'projects-instance-list' }) } }, _verifConditions (value) { let tasks = value let bool = true - tasks.map(v=>{ - if(v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] =='' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] =='' || v.conditionResult.failedNode[0] == null)) { + tasks.map(v => { + if (v.type == 'CONDITIONS' && (v.conditionResult.successNode[0] == '' || v.conditionResult.successNode[0] == null || v.conditionResult.failedNode[0] == '' || v.conditionResult.failedNode[0] == null)) { bool = false return false } }) - if(!bool) { + if (!bool) { this.$message.warning(`${i18n.$t('Successful branch flow and failed branch flow are required')}`) this.spinnerLoading = false return false @@ -600,20 +600,20 @@ * View variables */ _toggleView () { - findComponentDownward(this.$root, `assist-dag-index`)._toggleView() + findComponentDownward(this.$root, 'assist-dag-index')._toggleView() }, /** * Starting parameters */ _toggleParam () { - findComponentDownward(this.$root, `starting-params-dag-index`)._toggleParam() + findComponentDownward(this.$root, 'starting-params-dag-index')._toggleParam() }, addLineInfo ({ item, fromThis }) { this.addConnects(item) this.lineDrawer = false }, - cancel ({fromThis}) { + cancel ({ fromThis }) { this.lineDrawer = false }, @@ -621,7 +621,7 @@ * Create a node popup layer * @param Object id */ - _createLineLabel({id, sourceId, targetId}) { + _createLineLabel ({ id, sourceId, targetId }) { this.lineData.id = id this.lineData.sourceId = sourceId this.lineData.targetId = targetId @@ -633,11 +633,11 @@ this.nodeDrawer = false }, - cacheTaskInfo({item, fromThis}) { + cacheTaskInfo ({ item, fromThis }) { this.cacheTasks(item) }, - close ({ item,flag, fromThis }) { + close ({ item, flag, fromThis }) { this.addTasks(item) // Edit status does not allow deletion of nodes if (flag) { @@ -654,11 +654,11 @@ let preNode = [] let rearNode = [] let rearList = [] - $('div[data-targetarr*="' + id + '"]').each(function(){ - rearNode.push($(this).attr("id")) + $('div[data-targetarr*="' + id + '"]').each(function () { + rearNode.push($(this).attr('id')) }) - if (rearNode.length>0) { + if (rearNode.length > 0) { rearNode.forEach(v => { let rearobj = {} rearobj.value = $(`#${v}`).find('.name-p').text() @@ -690,12 +690,11 @@ this.nodeData.preNode = preNode this.nodeData.rearList = rearList this.nodeData.instanceId = this.$route.params.id - + this.nodeDrawer = true - }, removeEventModelById ($id) { - if(eventModel && this.taskId == $id){ + if (eventModel && this.taskId == $id) { eventModel.remove() } }, @@ -707,12 +706,12 @@ * @param processDefinitionId the process definition id * @param fromThis fromThis */ - mVersionSwitchProcessDefinitionVersion({ version, processDefinitionId, fromThis }) { + mVersionSwitchProcessDefinitionVersion ({ version, processDefinitionId, fromThis }) { this.$store.state.dag.isSwitchVersion = true this.switchProcessDefinitionVersion({ version: version, processDefinitionId: processDefinitionId - }).then(res=>{ + }).then(res => { this.$message.success($t('Switch Version Successfully')) this.$router.push({ path: `/projects/definition/list/${processDefinitionId}?_t=${new Date().getTime()}` }) }).catch(e => { @@ -720,7 +719,7 @@ this.$message.error(e.msg || '') }) }, - + /** * Paging event of process definition versions * @@ -729,17 +728,17 @@ * @param processDefinitionId the process definition id of page version * @param fromThis fromThis */ - mVersionGetProcessDefinitionVersionsPage({ pageNo, pageSize, processDefinitionId, fromThis }) { + mVersionGetProcessDefinitionVersionsPage ({ pageNo, pageSize, processDefinitionId, fromThis }) { this.getProcessDefinitionVersionsPage({ pageNo: pageNo, pageSize: pageSize, processDefinitionId: processDefinitionId - }).then(res=>{ + }).then(res => { this.versionData.processDefinitionVersions = res.data.lists this.versionData.total = res.data.totalCount this.versionData.pageSize = res.data.pageSize this.versionData.pageNo = res.data.currentPage - }).catch(e=>{ + }).catch(e => { this.$message.error(e.msg || '') }) }, @@ -766,17 +765,15 @@ this.versionData.pageNo = pageNo this.versionData.pageSize = pageSize this.drawer = true - }).catch(e => { this.$message.error(e.msg || '') }) } }, watch: { - 'tasks': { + tasks: { deep: true, handler (o) { - // Edit state does not allow deletion of node a... this.setIsEditDag(true) } @@ -809,8 +806,8 @@ } ], ['Label', { - location: 0.5, - id: 'label' + location: 0.5, + id: 'label' }] ], Container: 'canvas', diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue index 7d2c711b47..8d8f13cfee 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/dependentTimeout.vue @@ -143,21 +143,21 @@ if (p === 2 || p === 0) { this.waitCompleteTimeout.strategy = is ? ['WARN'] : [] this.waitCompleteTimeout.interval = is ? 30 : null - } + } }, _verification () { // Verification timeout policy - if (this.enable - && (this.waitCompleteTimeout.enable && !this.waitCompleteTimeout.strategy.length) - || (this.waitStartTimeout.enable && !this.waitStartTimeout.strategy.length)) { + if (this.enable && + (this.waitCompleteTimeout.enable && !this.waitCompleteTimeout.strategy.length) || + (this.waitStartTimeout.enable && !this.waitStartTimeout.strategy.length)) { this.$message.warning(`${this.$t('Timeout strategy must be selected')}`) return false } // Verify timeout duration Non 0 positive integer const reg = /^[1-9]\d*$/ - if (this.enable - && (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) - || (this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) { + if (this.enable && + (this.waitCompleteTimeout.enable && !reg.test(this.waitCompleteTimeout.interval)) || + (this.waitStartTimeout.enable && (!reg.test(this.waitStartTimeout.interval || !reg.test(this.waitStartTimeout.checkInterval))))) { this.$message.warning(`${this.$t('Timeout must be a positive integer')}`) return false } @@ -175,16 +175,16 @@ }, waitCompleteTimeout: { strategy: (() => { - // Handling checkout sequence - let strategy = this.waitCompleteTimeout.strategy - if (strategy.length === 2 && strategy[0] === 'FAILED') { - return [strategy[1], strategy[0]].join(',') - } else { - return strategy.join(',') - } - })(), - interval: parseInt(this.waitCompleteTimeout.interval), - enable: this.waitCompleteTimeout.enable + // Handling checkout sequence + let strategy = this.waitCompleteTimeout.strategy + if (strategy.length === 2 && strategy[0] === 'FAILED') { + return [strategy[1], strategy[0]].join(',') + } else { + return strategy.join(',') + } + })(), + interval: parseInt(this.waitCompleteTimeout.interval), + enable: this.waitCompleteTimeout.enable } }) return true @@ -215,4 +215,4 @@ }, components: {} } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue index 297cfaa892..a2e120972d 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/selectInput.vue @@ -88,7 +88,7 @@ }, 1) }, _onBlur () { - let val = $(this.$refs['input'].$el).find('input')[0].value + let val = $(this.$refs.input.$el).find('input')[0].value if (this._validation(val)) { this.$emit('valueEvent', val) this._setIconState(val) @@ -115,4 +115,4 @@ }, components: {} } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/timeoutAlarm.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/timeoutAlarm.vue index 0d11a1edd9..2fece25675 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/timeoutAlarm.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/_source/timeoutAlarm.vue @@ -127,4 +127,4 @@ }, components: {} } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue index a46057c3ae..414e361107 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formLineModel.vue @@ -58,10 +58,10 @@ name: 'form-line-model', data () { return { - // loading + // loading spinnerLoading: false, // node name - labelName: '', + labelName: '' } }, mixins: [disabledState], @@ -69,38 +69,38 @@ lineData: Object }, methods: { - cancel() { - this.$emit('cancel', { - fromThis: this - }) - }, - ok() { - if($(`#${this.lineData.id}`).prev().attr('class')==='jtk-overlay') { - $(`#${this.lineData.id}`).prev().empty() - } - $(`#${this.lineData.id}`).text(this.labelName) - this.$emit('addLineInfo', { - item: { - labelName: this.labelName, - sourceId: this.lineData.sourceId, - targetId: this.lineData.targetId - }, - fromThis: this - }) + cancel () { + this.$emit('cancel', { + fromThis: this + }) + }, + ok () { + if ($(`#${this.lineData.id}`).prev().attr('class') === 'jtk-overlay') { + $(`#${this.lineData.id}`).prev().empty() } - }, + $(`#${this.lineData.id}`).text(this.labelName) + this.$emit('addLineInfo', { + item: { + labelName: this.labelName, + sourceId: this.lineData.sourceId, + targetId: this.lineData.targetId + }, + fromThis: this + }) + } + }, watch: { - + }, created () { - if($(`#${this.lineData.id}`).prev().attr('class').indexOf('jtk-overlay')!==-1) { + if ($(`#${this.lineData.id}`).prev().attr('class').indexOf('jtk-overlay') !== -1) { this.labelName = $(`#${this.lineData.id}`).prev().text() } else { this.labelName = $(`#${this.lineData.id}`).text() } }, mounted () { - + }, updated () { }, @@ -109,7 +109,7 @@ destroyed () { }, computed: { - + }, components: {} } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue index b6026584a9..c6b93463be 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/formModel.vue @@ -342,8 +342,8 @@ successBranch: '', failedBranch: '', conditionResult: { - 'successNode': [], - 'failedNode': [] + successNode: [], + failedNode: [] }, // dependence dependence: {}, @@ -369,7 +369,7 @@ taskInstancePriority: 'MEDIUM', // worker group id workerGroup: 'default', - stateList:[ + stateList: [ { value: 'success', label: `${i18n.$t('success')}` @@ -381,8 +381,8 @@ ], // preTasks preTaskIdsInWorkflow: [], - preTasksToAdd: [], // pre-taskIds to add, used in jsplumb connects - preTasksToDelete: [], // pre-taskIds to delete, used in jsplumb connects + preTasksToAdd: [], // pre-taskIds to add, used in jsplumb connects + preTasksToDelete: [] // pre-taskIds to delete, used in jsplumb connects } }, /** @@ -463,12 +463,12 @@ } this.store.dispatch('dag/getSubProcessId', { taskId: stateId }).then(res => { this.$emit('onSubProcess', { - subProcessId: res.data.subProcessInstanceId, - fromThis: this - }) - }).catch(e => { + subProcessId: res.data.subProcessInstanceId, + fromThis: this + }) + }).catch(e => { this.$message.error(e.msg || '') - }) + }) } else { this.$emit('onSubProcess', { subProcessId: this.backfillItem.params.processDefinitionId, @@ -522,7 +522,7 @@ this.$message.warning(`${i18n.$t('Please enter name (required)')}`) return false } - if (this.successBranch !='' && this.successBranch !=null && this.successBranch == this.failedBranch) { + if (this.successBranch != '' && this.successBranch != null && this.successBranch == this.failedBranch) { this.$message.warning(`${i18n.$t('Cannot select the same node for successful branch flow and failed branch flow')}`) return false } @@ -536,13 +536,13 @@ } return true }, - _verifWorkGroup() { + _verifWorkGroup () { let item = this.store.state.security.workerGroupsListAll.find(item => { - return item.id == this.workerGroup; - }); - if(item==undefined) { + return item.id == this.workerGroup + }) + if (item == undefined) { this.$message.warning(`${i18n.$t('The Worker group no longer exists, please select the correct Worker group!')}`) - return false; + return false } return true }, @@ -555,30 +555,29 @@ return } // verif workGroup - if(!this._verifWorkGroup()) { + if (!this._verifWorkGroup()) { return } // Verify task alarm parameters if (this.nodeData.taskType === 'DEPENDENT') { - if (!this.$refs['dependentTimeout']._verification()) { + if (!this.$refs.dependentTimeout._verification()) { return } } else { - if (!this.$refs['timeout']._verification()) { + if (!this.$refs.timeout._verification()) { return } } - + // Verify node parameters if (!this.$refs[this.nodeData.taskType]._verification()) { return } // Verify preTasks and update dag-things - if (this.$refs['PRE_TASK']) { - if (!this.$refs['PRE_TASK']._verification()) { + if (this.$refs.PRE_TASK) { + if (!this.$refs.PRE_TASK._verification()) { return - } - else { + } else { // Sync data-targetarr $(`#${this.nodeData.id}`).attr( 'data-targetarr', this.preTaskIdsInWorkflow ? this.preTaskIdsInWorkflow.join(',') : '') @@ -594,7 +593,7 @@ target: targetId, type: 'basic', paintStyle: { strokeWidth: 2, stroke: '#2d8cf0' }, - HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3} + HoverPaintStyle: { stroke: '#ccc', strokeWidth: 3 } }) }) @@ -680,7 +679,7 @@ fromThis: this }) } - }, + }, watch: { /** * Watch the item change, cache the value it changes @@ -695,7 +694,7 @@ // Backfill data let taskList = this.store.state.dag.tasks - //fillback use cacheTasks + // fillback use cacheTasks let cacheTasks = this.store.state.dag.cacheTasks let o = {} if (cacheTasks[this.nodeData.id]) { @@ -720,21 +719,21 @@ this.maxRetryTimes = o.maxRetryTimes this.retryInterval = o.retryInterval this.delayTime = o.delayTime - if(o.conditionResult) { + if (o.conditionResult) { this.successBranch = o.conditionResult.successNode[0] this.failedBranch = o.conditionResult.failedNode[0] } - // If the workergroup has been deleted, set the default workergroup - var hasMatch = false; + // If the workergroup has been deleted, set the default workergroup + var hasMatch = false for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) { var workerGroup = this.store.state.security.workerGroupsListAll[i].id if (o.workerGroup == workerGroup) { - hasMatch = true; - break; + hasMatch = true + break } } - if(o.workerGroup == undefined) { - this.store.dispatch('dag/getTaskInstanceList',{ + if (o.workerGroup == undefined) { + this.store.dispatch('dag/getTaskInstanceList', { pageSize: 10, pageNo: 1, processInstanceId: this.nodeData.instanceId, name: o.name }).then(res => { this.workerGroup = res.totalList[0].workerGroup @@ -746,7 +745,6 @@ this.params = o.params || {} this.dependence = o.dependence || {} this.cacheDependence = o.dependence || {} - } else { this.workerGroup = this.store.state.security.workerGroupsListAll[0].id } @@ -765,10 +763,10 @@ }, mounted () { let self = this - $("#cancelBtn").mousedown(function(event){ - event.preventDefault(); + $('#cancelBtn').mousedown(function (event) { + event.preventDefault() self.close() - }); + }) }, updated () { }, @@ -784,7 +782,7 @@ return this.nodeData.taskType === 'SUB_PROCESS' && this.name }, - //Define the item model + // Define the item model _item () { return { type: this.nodeData.taskType, @@ -826,7 +824,7 @@ mDependentTimeout, mPriority, mWorkerGroups, - mPreTasks, + mPreTasks } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue index aa869c6a2b..16e03c8bed 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/log.vue @@ -67,7 +67,7 @@ */ const handerTextareaSize = (isH = 0) => { $('body').find('.tooltip.fade.top.in').remove() - return $('.textarea-ft').css({ 'height': `${$('.content-log-box').height() - isH}px` }) + return $('.textarea-ft').css({ height: `${$('.content-log-box').height() - isH}px` }) } let content = '' @@ -179,8 +179,8 @@ this.loadingIndex = this.loadingIndex - 1 this._ckLog() }, 1000, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }), /** * down @@ -189,8 +189,8 @@ this.loadingIndex = this.loadingIndex + 1 this._ckLog() }, 1000, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }), /** * Monitor scroll bar diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue index 1344666e42..0a3f17b059 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/datasource.vue @@ -128,7 +128,7 @@ this.$emit('on-dsData', { type: this.type, datasource: val - }); + }) } }, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue index ead747edc2..a613521d7c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/dependItemList.vue @@ -74,7 +74,7 @@ props: { dependItemList: Array, index: Number, - dependTaskList:Array + dependTaskList: Array }, model: { prop: 'dependItemList', @@ -109,7 +109,7 @@ * remove task */ _remove (i) { - this.dependTaskList[this.index].dependItemList.splice(i,1) + this.dependTaskList[this.index].dependItemList.splice(i, 1) this._removeTip() if (!this.dependItemList.length || this.dependItemList.length === 0) { this.$emit('on-delete-all', { @@ -176,14 +176,14 @@ */ _onChangeProjectId (value) { this._getProcessByProjectId(value).then(definitionList => { - /*this.$set(this.dependItemList, this.itemIndex, this._dlOldParams(value, definitionList, item))*/ + /* this.$set(this.dependItemList, this.itemIndex, this._dlOldParams(value, definitionList, item)) */ let definitionId = definitionList[0].value this._getDependItemList(definitionId).then(depTasksList => { let item = this.dependItemList[this.itemIndex] // init set depTasks All item.depTasks = 'ALL' // set dependItemList item data - this.$set(this.dependItemList, this.itemIndex, this._cpOldParams(value,definitionId, definitionList,depTasksList, item)) + this.$set(this.dependItemList, this.itemIndex, this._cpOldParams(value, definitionId, definitionList, depTasksList, item)) }) }) }, @@ -212,7 +212,7 @@ depTasksList: depTasksList, cycle: 'day', dateValue: 'today', - dateValueList: _.cloneDeep(dateValueList['day']), + dateValueList: _.cloneDeep(dateValueList.day), state: '' } }, @@ -231,7 +231,7 @@ } }, - _cpOldParams (value,definitionId, definitionList,depTasksList, item) { + _cpOldParams (value, definitionId, definitionList, depTasksList, item) { return { projectId: value, definitionList: definitionList, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue index 7f9724c782..82d3d1944d 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/httpParams.vue @@ -83,7 +83,7 @@ // Current execution index httpParamsIndex: null, // 参数位置的下拉框 - positionList:positionList + positionList: positionList } }, mixins: [disabledState], @@ -142,7 +142,7 @@ if (!v.prop) { flag = false } - if(v.value === ''){ + if (v.value === '') { this.$message.warning(`${i18n.$t('value is empty')}`) return false } @@ -173,7 +173,7 @@ } }) if (!flag) { - this.$message.warning(`${i18n.$t('value is empty')}`) + this.$message.warning(`${i18n.$t('value is empty')}`) return false } this.$emit('on-http-params', _.cloneDeep(this.httpParamsList)) @@ -191,7 +191,7 @@ }, computed: { inputStyle () { - return "width:30%" + return 'width:30%' } }, mounted () { @@ -240,4 +240,3 @@ } } - diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue index 71e4d80f7a..f58c98457b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/jsonBox.vue @@ -43,7 +43,7 @@ data () { return { // script - rawScript: '', + rawScript: '' } }, mixins: [disabledState], @@ -56,13 +56,13 @@ */ _handlerEditor () { // editor - let self =this + let self = this editor = codemirror('code-shell-mirror1', { mode: 'shell', readOnly: this.isDetails }) - editor.on("change",function(){ - self.$emit('getJsonBoxValue',editor.getValue()) + editor.on('change', function () { + self.$emit('getJsonBoxValue', editor.getValue()) }) this.keypress = () => { @@ -79,7 +79,7 @@ editor.setValue(this.rawScript) return editor - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue index 3d6d0e6327..43164cc2bf 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue @@ -64,7 +64,7 @@ props: { dependItemList: Array, index: Number, - dependTaskList:Array, + dependTaskList: Array, preNode: Array }, model: { @@ -78,7 +78,7 @@ _add () { // btn loading this.isLoading = true - this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams())) + this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams())) // remove tooltip this._removeTip() @@ -87,7 +87,7 @@ * remove task */ _remove (i) { - this.dependTaskList[this.index].dependItemList.splice(i,1) + this.dependTaskList[this.index].dependItemList.splice(i, 1) this._removeTip() if (!this.dependItemList.length || this.dependItemList.length === 0) { this.$emit('on-delete-all', { @@ -137,7 +137,7 @@ status: '' } }, - _rtOldParams (value,depTasksList, item) { + _rtOldParams (value, depTasksList, item) { return { depTasks: '', status: '' diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue index c986448057..0de941413b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/scriptBox.vue @@ -43,7 +43,7 @@ data () { return { // script - rawScript: '', + rawScript: '' } }, mixins: [disabledState], @@ -56,13 +56,13 @@ */ _handlerEditor () { // editor - let self =this + let self = this editor = codemirror('code-shell-mirror1', { mode: 'shell', readOnly: this.isDetails }) - editor.on("change",function(){ - self.$emit('getSriptBoxValue',editor.getValue()) + editor.on('change', function () { + self.$emit('getSriptBoxValue', editor.getValue()) }) this.keypress = () => { @@ -79,7 +79,7 @@ editor.setValue(this.rawScript) return editor - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue index c67f34464a..6f8b52f42a 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/udfs.vue @@ -25,7 +25,7 @@ v-for="city in udfsList" :key="city.id" :value="city.id" - :label="city.code"> + :label="city.code"> diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue index e475441454..75eac7e074 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/conditions.vue @@ -99,9 +99,9 @@ $('body').find('.tooltip.fade.top.in').remove() }, _onDeleteAll (i) { - this.dependTaskList.map((item,i)=>{ - if(item.dependItemList.length === 0){ - this.dependTaskList.splice(i,1) + this.dependTaskList.map((item, i) => { + if (item.dependItemList.length === 0) { + this.dependTaskList.splice(i, 1) } }) // this._deleteDep(i) @@ -109,7 +109,7 @@ _setGlobalRelation () { this.relation = this.relation === 'AND' ? 'OR' : 'AND' }, - getDependTaskList(i){ + getDependTaskList (i) { // console.log('getDependTaskList',i) }, _setRelation (i) { @@ -143,7 +143,7 @@ created () { let o = this.backfillItem let dependentResult = $(`#${o.id}`).data('dependent-result') || {} - + // Does not represent an empty object backfill if (!_.isEmpty(o)) { this.relation = _.cloneDeep(o.dependence.relation) || 'AND' @@ -151,11 +151,11 @@ let defaultState = this.isDetails ? 'WAITING' : '' // Process instance return status display matches by key _.map(this.dependTaskList, v => _.map(v.dependItemList, v1 => { - $(`#${o.id}`).siblings().each(function(){ - if(v1.depTasks == $(this).text()) { + $(`#${o.id}`).siblings().each(function () { + if (v1.depTasks == $(this).text()) { v1.state = $(this).attr('data-dependent-depstate') } - }); + }) })) } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue index 56898d3dc5..0ba6bf7bb0 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/datax.vue @@ -214,12 +214,12 @@ // Custom parameter localParams: [], customConfig: 0, - //jvm memory xms + // jvm memory xms xms: 1, - //jvm memory xms + // jvm memory xms xmx: 1, scriptBoxDialog: false, - item: '', + item: '' } }, mixins: [disabledState], @@ -228,7 +228,7 @@ createNodeId: Number }, methods: { - setEditorVal() { + setEditorVal () { this.item = editor.getValue() this.scriptBoxDialog = true }, @@ -236,7 +236,7 @@ editor.setValue(val) }, _onSwitch (is) { - if(is) { + if (is) { this.customConfig = 1 setTimeout(() => { this._handlerJsonEditor() @@ -284,7 +284,7 @@ * verification */ _verification () { - if(this.customConfig) { + if (this.customConfig) { if (!jsonEditor.getValue()) { this.$message.warning(`${i18n.$t('Please enter a JSON Statement(required)')}`) return false @@ -300,8 +300,8 @@ customConfig: this.customConfig, json: jsonEditor.getValue(), localParams: this.localParams, - xms:+this.xms, - xmx:+this.xmx + xms: +this.xms, + xmx: +this.xmx }) return true } else { @@ -349,8 +349,8 @@ jobSpeedRecord: this.jobSpeedRecord, preStatements: this.preStatements, postStatements: this.postStatements, - xms:+this.xms, - xmx:+this.xmx + xms: +this.xms, + xmx: +this.xmx }) return true } @@ -420,25 +420,25 @@ dataSource: this.rtDatasource, dtType: this.dtType, dataTarget: this.rtDatatarget, - sql: editor?editor.getValue():'', + sql: editor ? editor.getValue() : '', targetTable: this.targetTable, jobSpeedByte: this.jobSpeedByte * 1024, jobSpeedRecord: this.jobSpeedRecord, preStatements: this.preStatements, postStatements: this.postStatements, xms: +this.xms, - xmx: +this.xmx, - }); + xmx: +this.xmx + }) }, _destroyEditor () { - if (editor) { + if (editor) { editor.toTextArea() // Uninstall editor.off($('.code-sql-mirror'), 'keypress', this.keypress) editor.off($('.code-sql-mirror'), 'changes', this.changes) } }, _destroyJsonEditor () { - if (jsonEditor) { + if (jsonEditor) { jsonEditor.toTextArea() // Uninstall jsonEditor.off($('.code-json-mirror'), 'keypress', this.keypress) jsonEditor.off($('.code-json-mirror'), 'changes', this.changes) @@ -450,12 +450,11 @@ // Non-null objects represent backfill if (!_.isEmpty(o)) { - // set jvm memory - this.xms = o.params.xms || 1 ; - this.xmx = o.params.xmx || 1 ; + this.xms = o.params.xms || 1 + this.xmx = o.params.xmx || 1 // backfill - if(o.params.customConfig == 0) { + if (o.params.customConfig == 0) { this.customConfig = 0 this.enable = false this.dsType = o.params.dsType || '' @@ -477,7 +476,7 @@ } }, mounted () { - if(this.customConfig) { + if (this.customConfig) { setTimeout(() => { this._handlerJsonEditor() }, 200) @@ -501,9 +500,9 @@ } }, watch: { - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this._cacheParams(); + this._cacheParams() } }, computed: { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue index 46c1c83dd1..1ad69a7dbe 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/dependent.vue @@ -97,9 +97,9 @@ $('body').find('.tooltip.fade.top.in').remove() }, _onDeleteAll (i) { - this.dependTaskList.map((item,i)=>{ - if(item.dependItemList.length === 0){ - this.dependTaskList.splice(i,1) + this.dependTaskList.map((item, i) => { + if (item.dependItemList.length === 0) { + this.dependTaskList.splice(i, 1) } }) // this._deleteDep(i) @@ -107,7 +107,7 @@ _setGlobalRelation () { this.relation = this.relation === 'AND' ? 'OR' : 'AND' }, - getDependTaskList(i){ + getDependTaskList (i) { // console.log('getDependTaskList',i) }, _setRelation (i) { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue index c81f3e6278..2c68e1906e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/flink.vue @@ -226,17 +226,17 @@ // Program type(List) programTypeList: [{ code: 'JAVA' }, { code: 'SCALA' }, { code: 'PYTHON' }], - flinkVersion:'<1.10', + flinkVersion: '<1.10', // Flink Versions(List) flinkVersionList: [{ code: '<1.10' }, { code: '>=1.10' }], - normalizer(node) { + normalizer (node) { return { label: node.name } }, allNoResources: [], - noRes: [], + noRes: [] } }, props: { @@ -247,10 +247,10 @@ /** * getResourceId */ - marjarId(name) { - this.store.dispatch('dag/getResourceId',{ + marjarId (name) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+name + fullName: '/' + name }).then(res => { this.mainJar = res.id }).catch(e => { @@ -284,7 +284,6 @@ return false } - if (!this.mainJar) { this.$message.warning(`${i18n.$t('Please enter main jar package')}`) return false @@ -311,7 +310,7 @@ } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } @@ -329,7 +328,7 @@ }, deployMode: this.deployMode, resourceList: _.map(this.resourceList, v => { - return {id: v} + return { id: v } }), localParams: this.localParams, flinkVersion: this.flinkVersion, @@ -343,55 +342,55 @@ }) return true }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -400,22 +399,22 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp this.mainJarList = this.mainJarList.concat(noResources) } } - }, + } }, watch: { // Listening type @@ -424,33 +423,33 @@ this.mainClass = '' } }, - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, computed: { cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true - result.push(item1) + result.push(item1) } }) }) @@ -474,65 +473,64 @@ } }, created () { - let item = this.store.state.dag.resourcesListS - let items = this.store.state.dag.resourcesListJar - this.diGuiTree(item) - this.diGuiTree(items) - this.mainJarList = item - this.mainJarLists = items - let o = this.backfillItem - // Non-null objects represent backfill - if (!_.isEmpty(o)) { - this.mainClass = o.params.mainClass || '' - if(o.params.mainJar.res) { - this.marjarId(o.params.mainJar.res) - } else if(o.params.mainJar.res=='') { - this.mainJar = '' - } else { - this.mainJar = o.params.mainJar.id || '' - } - this.deployMode = o.params.deployMode || '' - this.flinkVersion = o.params.flinkVersion || '<1.10' - this.slot = o.params.slot || 1 - this.taskManager = o.params.taskManager || '2' - this.jobManagerMemory = o.params.jobManagerMemory || '1G' - this.taskManagerMemory = o.params.taskManagerMemory || '2G' - + let item = this.store.state.dag.resourcesListS + let items = this.store.state.dag.resourcesListJar + this.diGuiTree(item) + this.diGuiTree(items) + this.mainJarList = item + this.mainJarLists = items + let o = this.backfillItem + // Non-null objects represent backfill + if (!_.isEmpty(o)) { + this.mainClass = o.params.mainClass || '' + if (o.params.mainJar.res) { + this.marjarId(o.params.mainJar.res) + } else if (o.params.mainJar.res == '') { + this.mainJar = '' + } else { + this.mainJar = o.params.mainJar.id || '' + } + this.deployMode = o.params.deployMode || '' + this.flinkVersion = o.params.flinkVersion || '<1.10' + this.slot = o.params.slot || 1 + this.taskManager = o.params.taskManager || '2' + this.jobManagerMemory = o.params.jobManagerMemory || '1G' + this.taskManagerMemory = o.params.taskManagerMemory || '2G' - this.mainArgs = o.params.mainArgs || '' - this.others = o.params.others - this.programType = o.params.programType || 'SCALA' + this.mainArgs = o.params.mainArgs || '' + this.others = o.params.others + this.programType = o.params.programType || 'SCALA' - // backfill resourceList - let backResource = o.params.resourceList || [] - let resourceList = o.params.resourceList || [] - if (resourceList.length) { - _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ - type: 'FILE', - fullName: '/'+v.res - }).then(res => { - this.resourceList.push(res.id) - this.dataProcess(backResource) - }).catch(e => { - this.resourceList.push(v.res) - this.dataProcess(backResource) - }) - } else { - this.resourceList.push(v.id) + // backfill resourceList + let backResource = o.params.resourceList || [] + let resourceList = o.params.resourceList || [] + if (resourceList.length) { + _.map(resourceList, v => { + if (!v.id) { + this.store.dispatch('dag/getResourceId', { + type: 'FILE', + fullName: '/' + v.res + }).then(res => { + this.resourceList.push(res.id) this.dataProcess(backResource) - } - }) - this.cacheResourceList = resourceList - } + }).catch(e => { + this.resourceList.push(v.res) + this.dataProcess(backResource) + }) + } else { + this.resourceList.push(v.id) + this.dataProcess(backResource) + } + }) + this.cacheResourceList = resourceList + } - // backfill localParams - let localParams = o.params.localParams || [] - if (localParams.length) { - this.localParams = localParams - } + // backfill localParams + let localParams = o.params.localParams || [] + if (localParams.length) { + this.localParams = localParams } + } }, mounted () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue index 50a9a28962..9dc83503ba 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/http.vue @@ -89,7 +89,6 @@ -
{{$t('Timeout Settings')}}
@@ -144,8 +143,8 @@ data () { return { timeoutSettings: false, - connectTimeout : 60000 , - socketTimeout : 60000 , + connectTimeout: 60000, + socketTimeout: 60000, url: '', condition: '', @@ -154,7 +153,7 @@ httpMethod: 'GET', httpMethodList: [{ code: 'GET' }, { code: 'POST' }, { code: 'HEAD' }, { code: 'PUT' }, { code: 'DELETE' }], httpCheckCondition: 'STATUS_CODE_DEFAULT', - httpCheckConditionList: cookies.get('language') == 'en_US'? [{ code: 'STATUS_CODE_DEFAULT',value:'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM',value:'Custom response code' }, { code: 'BODY_CONTAINS',value:'Content includes' }, { code: 'BODY_NOT_CONTAINS',value:'Content does not contain' }]:[{ code: 'STATUS_CODE_DEFAULT',value:'默认响应码200' }, { code: 'STATUS_CODE_CUSTOM',value:'自定义响应码' }, { code: 'BODY_CONTAINS',value:'内容包含' }, { code: 'BODY_NOT_CONTAINS',value:'内容不包含' }] + httpCheckConditionList: cookies.get('language') == 'en_US' ? [{ code: 'STATUS_CODE_DEFAULT', value: 'Default response code 200' }, { code: 'STATUS_CODE_CUSTOM', value: 'Custom response code' }, { code: 'BODY_CONTAINS', value: 'Content includes' }, { code: 'BODY_NOT_CONTAINS', value: 'Content does not contain' }] : [{ code: 'STATUS_CODE_DEFAULT', value: '默认响应码200' }, { code: 'STATUS_CODE_CUSTOM', value: '自定义响应码' }, { code: 'BODY_CONTAINS', value: '内容包含' }, { code: 'BODY_NOT_CONTAINS', value: '内容不包含' }] } }, props: { @@ -205,8 +204,8 @@ httpMethod: this.httpMethod, httpCheckCondition: this.httpCheckCondition, condition: this.condition, - connectTimeout : this.connectTimeout , - socketTimeout : this.socketTimeout + connectTimeout: this.connectTimeout, + socketTimeout: this.socketTimeout }) return true } @@ -220,8 +219,8 @@ httpMethod: this.httpMethod, httpCheckCondition: this.httpCheckCondition, condition: this.condition, - connectTimeout : this.connectTimeout , - socketTimeout : this.socketTimeout + connectTimeout: this.connectTimeout, + socketTimeout: this.socketTimeout } } }, @@ -231,32 +230,32 @@ * @param val */ cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, created () { - let o = this.backfillItem - // Non-null objects represent backfill - if (!_.isEmpty(o)) { - this.url = o.params.url || '' - this.httpMethod = o.params.httpMethod || 'GET' - this.httpCheckCondition = o.params.httpCheckCondition || 'DEFAULT' - this.condition = o.params.condition || '' - this.connectTimeout = o.params.connectTimeout - this.socketTimeout = o.params.socketTimeout - if(this.connectTimeout != 60000 || this.socketTimeout != 60000 ){ - this.timeoutSettings = true - } - // backfill localParams - let localParams = o.params.localParams || [] - if (localParams.length) { - this.localParams = localParams - } - let httpParams = o.params.httpParams || [] - if (httpParams.length) { - this.httpParams = httpParams - } + let o = this.backfillItem + // Non-null objects represent backfill + if (!_.isEmpty(o)) { + this.url = o.params.url || '' + this.httpMethod = o.params.httpMethod || 'GET' + this.httpCheckCondition = o.params.httpCheckCondition || 'DEFAULT' + this.condition = o.params.condition || '' + this.connectTimeout = o.params.connectTimeout + this.socketTimeout = o.params.socketTimeout + if (this.connectTimeout != 60000 || this.socketTimeout != 60000) { + this.timeoutSettings = true + } + // backfill localParams + let localParams = o.params.localParams || [] + if (localParams.length) { + this.localParams = localParams } + let httpParams = o.params.httpParams || [] + if (httpParams.length) { + this.httpParams = httpParams + } + } }, mounted () { }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue index ffeba7c75f..6cd1a8d862 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/mr.vue @@ -131,7 +131,7 @@ programType: 'JAVA', // Program type(List) programTypeList: [{ code: 'JAVA' }, { code: 'PYTHON' }], - normalizer(node) { + normalizer (node) { return { label: node.name } @@ -148,10 +148,10 @@ /** * getResourceId */ - marjarId(name) { - this.store.dispatch('dag/getResourceId',{ + marjarId (name) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+name + fullName: '/' + name }).then(res => { this.mainJar = res.id }).catch(e => { @@ -176,55 +176,55 @@ _onCacheResourcesData (a) { this.cacheResourceList = a }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -233,15 +233,15 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp @@ -264,7 +264,7 @@ } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } @@ -280,7 +280,7 @@ id: this.mainJar }, resourceList: _.map(this.resourceList, v => { - return {id: v} + return { id: v } }), localParams: this.localParams, mainArgs: this.mainArgs, @@ -288,8 +288,8 @@ programType: this.programType }) return true - }, - + } + }, watch: { /** @@ -300,33 +300,33 @@ this.mainClass = '' } }, - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, computed: { cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true - result.push(item1) + result.push(item1) } }) }) @@ -345,58 +345,58 @@ } }, created () { - let item = this.store.state.dag.resourcesListS - let items = this.store.state.dag.resourcesListJar - this.diGuiTree(item) - this.diGuiTree(items) - this.mainJarList = item - this.mainJarLists = items - let o = this.backfillItem + let item = this.store.state.dag.resourcesListS + let items = this.store.state.dag.resourcesListJar + this.diGuiTree(item) + this.diGuiTree(items) + this.mainJarList = item + this.mainJarLists = items + let o = this.backfillItem - // Non-null objects represent backfill - if (!_.isEmpty(o)) { - this.mainClass = o.params.mainClass || '' - if(o.params.mainJar.res) { - this.marjarId(o.params.mainJar.res) - } else if(o.params.mainJar.res=='') { - this.mainJar = '' - } else { - this.mainJar = o.params.mainJar.id || '' - } - this.mainArgs = o.params.mainArgs || '' - this.others = o.params.others - this.programType = o.params.programType || 'JAVA' + // Non-null objects represent backfill + if (!_.isEmpty(o)) { + this.mainClass = o.params.mainClass || '' + if (o.params.mainJar.res) { + this.marjarId(o.params.mainJar.res) + } else if (o.params.mainJar.res == '') { + this.mainJar = '' + } else { + this.mainJar = o.params.mainJar.id || '' + } + this.mainArgs = o.params.mainArgs || '' + this.others = o.params.others + this.programType = o.params.programType || 'JAVA' - // backfill resourceList - let resourceList = o.params.resourceList || [] - if (resourceList.length) { - _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ - type: 'FILE', - fullName: '/'+v.res - }).then(res => { - this.resourceList.push(res.id) - this.dataProcess(backResource) - }).catch(e => { - this.resourceList.push(v.res) - this.dataProcess(backResource) - }) - } else { - this.resourceList.push(v.id) + // backfill resourceList + let resourceList = o.params.resourceList || [] + if (resourceList.length) { + _.map(resourceList, v => { + if (!v.id) { + this.store.dispatch('dag/getResourceId', { + type: 'FILE', + fullName: '/' + v.res + }).then(res => { + this.resourceList.push(res.id) this.dataProcess(backResource) - } - }) - this.cacheResourceList = resourceList - } + }).catch(e => { + this.resourceList.push(v.res) + this.dataProcess(backResource) + }) + } else { + this.resourceList.push(v.id) + this.dataProcess(backResource) + } + }) + this.cacheResourceList = resourceList + } - // backfill localParams - let backResource = o.params.resourceList || [] - let localParams = o.params.localParams || [] - if (localParams.length) { - this.localParams = localParams - } + // backfill localParams + let backResource = o.params.resourceList || [] + let localParams = o.params.localParams || [] + if (localParams.length) { + this.localParams = localParams } + } }, mounted () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue index cb3aedc002..c922f98943 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/pre_tasks.vue @@ -53,15 +53,15 @@ }, data () { return { - preTasksSelectorId: '_preTasksSelectorId', // Refresh target vue-component by changing id + preTasksSelectorId: '_preTasksSelectorId', // Refresh target vue-component by changing id preTasks: [], - preTasksOld: [], + preTasksOld: [] } }, mounted () { - this.preTasks = this.backfillItem['preTasks'] || this.preTasks + this.preTasks = this.backfillItem.preTasks || this.preTasks this.preTasksOld = this.preTasks - + // Refresh target vue-component by changing id this.$nextTick(() => { this.preTasksSelectorId = 'preTasksSelectorId' @@ -69,7 +69,7 @@ }, computed: { preTaskList: function () { - let currentTaskId = this.backfillItem['id'] || this.id + let currentTaskId = this.backfillItem.id || this.id let cacheTasks = Object.assign({}, this.store.state.dag.tasks) let keys = Object.keys(cacheTasks) for (let i = 0; i < keys.length; i++) { @@ -92,7 +92,7 @@ // preTaskIds used to delete connection preTasksToDelete: function () { return this.preTasksOld.filter(taskId => this.preTasks.indexOf(taskId) === -1) - }, + } }, methods: { // Pass data to parent-level to process dag @@ -100,7 +100,7 @@ this.$emit('on-pre-tasks', { preTasks: this.preTasks, preTasksToAdd: this.preTasksToAdd, - preTasksToDelete: this.preTasksToDelete, + preTasksToDelete: this.preTasksToDelete }) return true } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue index be881118d9..857e7a7571 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/procedure.vue @@ -122,9 +122,9 @@ } }, watch: { - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, computed: { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue index d9aa4ce959..3bef9fb056 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/python.vue @@ -84,7 +84,7 @@ // Cache ResourceList cacheResourceList: [], resourceOptions: [], - normalizer(node) { + normalizer (node) { return { label: node.name } @@ -106,7 +106,7 @@ _onLocalParams (a) { this.localParams = a }, - setEditorVal() { + setEditorVal () { this.item = editor.getValue() this.scriptBoxDialog = true }, @@ -141,7 +141,7 @@ } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } @@ -149,7 +149,7 @@ // storage this.$emit('on-params', { resourceList: _.map(this.resourceList, v => { - return {id: v} + return { id: v } }), localParams: this.localParams, rawScript: editor.getValue() @@ -181,55 +181,55 @@ return editor }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.resourceOptions.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.resourceOptions.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -238,15 +238,15 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp @@ -256,33 +256,33 @@ } }, watch: { - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, computed: { cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.resourceOptions.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.resourceOptions.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true - result.push(item1) + result.push(item1) } }) }) @@ -308,10 +308,10 @@ let resourceList = o.params.resourceList || [] if (resourceList.length) { _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ + if (!v.id) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+v.res + fullName: '/' + v.res }).then(res => { this.resourceList.push(res.id) this.dataProcess(backResource) @@ -343,7 +343,7 @@ editor.toTextArea() // Uninstall editor.off($('.code-python-mirror'), 'keypress', this.keypress) }, - components: { mLocalParams, mListBox, mResources,Treeselect, mScriptBox } + components: { mLocalParams, mListBox, mResources, Treeselect, mScriptBox } } \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue index 3d099d4a54..4f34089d17 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/shell.vue @@ -87,7 +87,7 @@ cacheResourceList: [], // define options options: [], - normalizer(node) { + normalizer (node) { return { label: node.name } @@ -109,7 +109,7 @@ _onLocalParams (a) { this.localParams = a }, - setEditorVal() { + setEditorVal () { this.item = editor.getValue() this.scriptBoxDialog = true }, @@ -118,7 +118,7 @@ // this.scriptBoxDialog = false }, closeAble () { - // this.scriptBoxDialog = false + // this.scriptBoxDialog = false }, /** * return resourceList @@ -148,12 +148,12 @@ return false } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } // Process resourcelist - let dataProcessing= _.map(this.resourceList, v => { + let dataProcessing = _.map(this.resourceList, v => { return { id: v } @@ -190,55 +190,55 @@ return editor }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.options.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.options.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -247,15 +247,15 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp @@ -265,33 +265,33 @@ } }, watch: { - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) } }, computed: { cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.options.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.options.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true - result.push(item1) + result.push(item1) } }) }) @@ -307,7 +307,7 @@ this.diGuiTree(item) this.options = item let o = this.backfillItem - + // Non-null objects represent backfill if (!_.isEmpty(o)) { this.rawScript = o.params.rawScript || '' @@ -316,11 +316,11 @@ let backResource = o.params.resourceList || [] let resourceList = o.params.resourceList || [] if (resourceList.length) { - _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ + _.map(resourceList, v => { + if (!v.id) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+v.res + fullName: '/' + v.res }).then(res => { this.resourceList.push(res.id) this.dataProcess(backResource) @@ -335,7 +335,7 @@ }) this.cacheResourceList = resourceList } - + // backfill localParams let localParams = o.params.localParams || [] if (localParams.length) { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue index ac37727aec..85b58a37c7 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/spark.vue @@ -242,7 +242,7 @@ sparkVersion: 'SPARK2', // Spark version(LIst) sparkVersionList: [{ code: 'SPARK2' }, { code: 'SPARK1' }], - normalizer(node) { + normalizer (node) { return { label: node.name } @@ -259,10 +259,10 @@ /** * getResourceId */ - marjarId(name) { - this.store.dispatch('dag/getResourceId',{ + marjarId (name) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+name + fullName: '/' + name }).then(res => { this.mainJar = res.id }).catch(e => { @@ -287,55 +287,55 @@ _onCacheResourcesData (a) { this.cacheResourceList = a }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -344,15 +344,15 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp @@ -380,7 +380,7 @@ } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } @@ -419,7 +419,7 @@ return false } // Process resourcelist - let dataProcessing= _.map(this.resourceList, v => { + let dataProcessing = _.map(this.resourceList, v => { return { id: v } @@ -454,7 +454,7 @@ this.mainClass = '' } }, - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { this.$emit('on-cache-params', val) } @@ -463,24 +463,24 @@ cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.mainJarList.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.mainJarList.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true - result.push(item1) + result.push(item1) } }) }) @@ -506,65 +506,65 @@ } }, created () { - let item = this.store.state.dag.resourcesListS - let items = this.store.state.dag.resourcesListJar - this.diGuiTree(item) - this.diGuiTree(items) - this.mainJarList = item - this.mainJarLists = items - let o = this.backfillItem + let item = this.store.state.dag.resourcesListS + let items = this.store.state.dag.resourcesListJar + this.diGuiTree(item) + this.diGuiTree(items) + this.mainJarList = item + this.mainJarLists = items + let o = this.backfillItem - // Non-null objects represent backfill - if (!_.isEmpty(o)) { - this.mainClass = o.params.mainClass || '' - if(o.params.mainJar.res) { - this.marjarId(o.params.mainJar.res) - } else if(o.params.mainJar.res=='') { - this.mainJar = '' - } else { - this.mainJar = o.params.mainJar.id || '' - } - this.deployMode = o.params.deployMode || '' - this.driverCores = o.params.driverCores || 1 - this.driverMemory = o.params.driverMemory || '512M' - this.numExecutors = o.params.numExecutors || 2 - this.executorMemory = o.params.executorMemory || '2G' - this.executorCores = o.params.executorCores || 2 - this.mainArgs = o.params.mainArgs || '' - this.others = o.params.others - this.programType = o.params.programType || 'SCALA' - this.sparkVersion = o.params.sparkVersion || 'SPARK2' + // Non-null objects represent backfill + if (!_.isEmpty(o)) { + this.mainClass = o.params.mainClass || '' + if (o.params.mainJar.res) { + this.marjarId(o.params.mainJar.res) + } else if (o.params.mainJar.res == '') { + this.mainJar = '' + } else { + this.mainJar = o.params.mainJar.id || '' + } + this.deployMode = o.params.deployMode || '' + this.driverCores = o.params.driverCores || 1 + this.driverMemory = o.params.driverMemory || '512M' + this.numExecutors = o.params.numExecutors || 2 + this.executorMemory = o.params.executorMemory || '2G' + this.executorCores = o.params.executorCores || 2 + this.mainArgs = o.params.mainArgs || '' + this.others = o.params.others + this.programType = o.params.programType || 'SCALA' + this.sparkVersion = o.params.sparkVersion || 'SPARK2' - // backfill resourceList - let backResource = o.params.resourceList || [] - let resourceList = o.params.resourceList || [] - if (resourceList.length) { - _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ - type: 'FILE', - fullName: '/'+v.res - }).then(res => { - this.resourceList.push(res.id) - this.dataProcess(backResource) - }).catch(e => { - this.resourceList.push(v.res) - this.dataProcess(backResource) - }) - } else { - this.resourceList.push(v.id) + // backfill resourceList + let backResource = o.params.resourceList || [] + let resourceList = o.params.resourceList || [] + if (resourceList.length) { + _.map(resourceList, v => { + if (!v.id) { + this.store.dispatch('dag/getResourceId', { + type: 'FILE', + fullName: '/' + v.res + }).then(res => { + this.resourceList.push(res.id) this.dataProcess(backResource) - } - }) - this.cacheResourceList = resourceList - } + }).catch(e => { + this.resourceList.push(v.res) + this.dataProcess(backResource) + }) + } else { + this.resourceList.push(v.id) + this.dataProcess(backResource) + } + }) + this.cacheResourceList = resourceList + } - // backfill localParams - let localParams = o.params.localParams || [] - if (localParams.length) { - this.localParams = localParams - } + // backfill localParams + let localParams = o.params.localParams || [] + if (localParams.length) { + this.localParams = localParams } + } }, mounted () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue index f0542f88eb..309a111ea7 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sql.vue @@ -202,7 +202,7 @@ createNodeId: Number }, methods: { - setEditorVal() { + setEditorVal () { this.item = editor.getValue() this.scriptBoxDialog = true }, @@ -214,7 +214,7 @@ */ _onSqlType (a) { this.sqlType = a - if(a==0) { + if (a == 0) { this.showType = ['TABLE'] } }, @@ -262,24 +262,24 @@ if (!this.$refs.refDs._verifDatasource()) { return false } - if (this.sqlType==0 && !this.showType.length) { + if (this.sqlType == 0 && !this.showType.length) { this.$message.warning(`${i18n.$t('One form or attachment must be selected')}`) return false } - if (this.sqlType==0 && !this.title) { + if (this.sqlType == 0 && !this.title) { this.$message.warning(`${i18n.$t('Mail subject required')}`) return false } - if (this.sqlType==0 && !this.receivers.length) { + if (this.sqlType == 0 && !this.receivers.length) { this.$message.warning(`${i18n.$t('Recipient required')}`) return false } // receivers Subcomponent verification - if (this.sqlType==0 && !this.$refs.refEmail._manualEmail()) { + if (this.sqlType == 0 && !this.$refs.refEmail._manualEmail()) { return false } // receiversCc Subcomponent verification - if (this.sqlType==0 && !this.$refs.refCc._manualEmail()) { + if (this.sqlType == 0 && !this.$refs.refCc._manualEmail()) { return false } // udfs Subcomponent verification Verification only if the data type is HIVE @@ -390,7 +390,6 @@ receivers: this.receivers.join(','), receiversCc: this.receiversCc.join(','), showType: (() => { - let showType = this.showType if (showType.length === 2 && showType[0] === 'ATTACHMENT') { return [showType[1], showType[0]].join(',') @@ -402,10 +401,10 @@ connParams: this.connParams, preStatements: this.preStatements, postStatements: this.postStatements - }); + }) }, _destroyEditor () { - if (editor) { + if (editor) { editor.toTextArea() // Uninstall editor.off($('.code-sql-mirror'), 'keypress', this.keypress) editor.off($('.code-sql-mirror'), 'changes', this.changes) @@ -415,7 +414,7 @@ watch: { // Listening to sqlType sqlType (val) { - if (val==0) { + if (val == 0) { this.showType = [] } if (val != 0) { @@ -430,7 +429,7 @@ this.connParams = '' } }, - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { this._cacheParams() } @@ -448,7 +447,7 @@ this.sqlType = o.params.sqlType this.connParams = o.params.connParams || '' this.localParams = o.params.localParams || [] - if(o.params.showType == '') { + if (o.params.showType == '') { this.showType = [] } else { this.showType = o.params.showType.split(',') || [] @@ -491,7 +490,6 @@ receivers: this.receivers.join(','), receiversCc: this.receiversCc.join(','), showType: (() => { - let showType = this.showType if (showType.length === 2 && showType[0] === 'ATTACHMENT') { return [showType[1], showType[0]].join(',') @@ -520,4 +518,3 @@ top: -16px; } - diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue index 0686a4e598..733d4949d3 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue @@ -614,103 +614,103 @@ /** * mysql query type */ - srcQueryType:'1', + srcQueryType: '1', /** * source data source */ - srcDatasource:'', + srcDatasource: '', /** * target data source */ - targetDatasource:'', + targetDatasource: '', /** * concurrency */ - concurrency:1, + concurrency: 1, /** * default job type */ - jobType:'TEMPLATE', + jobType: 'TEMPLATE', /** * direct model type */ - modelType:'import', + modelType: 'import', modelTypeList: [{ code: 'import' }, { code: 'export' }], sourceTypeList: [ { - code: "MYSQL" - }, + code: 'MYSQL' + } ], - targetTypeList:[ + targetTypeList: [ { - code:"HIVE" + code: 'HIVE' }, { - code:"HDFS" + code: 'HDFS' } ], - sourceType:"MYSQL", - targetType:"HDFS", - - sourceMysqlParams:{ - srcType:"MYSQL", - srcDatasource:"", - srcTable:"", - srcQueryType:"1", - srcQuerySql:'', - srcColumnType:"0", - srcColumns:"", - srcConditionList:[], - mapColumnHive:[], - mapColumnJava:[] + sourceType: 'MYSQL', + targetType: 'HDFS', + + sourceMysqlParams: { + srcType: 'MYSQL', + srcDatasource: '', + srcTable: '', + srcQueryType: '1', + srcQuerySql: '', + srcColumnType: '0', + srcColumns: '', + srcConditionList: [], + mapColumnHive: [], + mapColumnJava: [] }, - sourceHdfsParams:{ - exportDir:"" + sourceHdfsParams: { + exportDir: '' }, - sourceHiveParams:{ - hiveDatabase:"", - hiveTable:"", - hivePartitionKey:"", - hivePartitionValue:"" + sourceHiveParams: { + hiveDatabase: '', + hiveTable: '', + hivePartitionKey: '', + hivePartitionValue: '' }, - targetHdfsParams:{ - targetPath:"", - deleteTargetDir:true, - fileType:"--as-avrodatafile", - compressionCodec:"snappy", - fieldsTerminated:"", - linesTerminated:"", + targetHdfsParams: { + targetPath: '', + deleteTargetDir: true, + fileType: '--as-avrodatafile', + compressionCodec: 'snappy', + fieldsTerminated: '', + linesTerminated: '' }, - targetMysqlParams:{ - targetType:"MYSQL", - targetDatasource:"", - targetTable:"", - targetColumns:"", - fieldsTerminated:"", - linesTerminated:"", - preQuery:"", - isUpdate:false, - targetUpdateKey:"", - targetUpdateMode:"allowinsert" + targetMysqlParams: { + targetType: 'MYSQL', + targetDatasource: '', + targetTable: '', + targetColumns: '', + fieldsTerminated: '', + linesTerminated: '', + preQuery: '', + isUpdate: false, + targetUpdateKey: '', + targetUpdateMode: 'allowinsert' }, - targetHiveParams:{ - hiveDatabase:"", - hiveTable:"", - createHiveTable:false, - dropDelimiter:false, - hiveOverWrite:true, - replaceDelimiter:"", - hivePartitionKey:"", - hivePartitionValue:"" + targetHiveParams: { + hiveDatabase: '', + hiveTable: '', + createHiveTable: false, + dropDelimiter: false, + hiveOverWrite: true, + replaceDelimiter: '', + hivePartitionKey: '', + hivePartitionValue: '' }, item: '', scriptBoxDialog: false @@ -721,108 +721,108 @@ backfillItem: Object }, methods: { - setEditorVal() { + setEditorVal () { this.item = editor.getValue() this.scriptBoxDialog = true }, getSriptBoxValue (val) { editor.setValue(val) }, - _handleQueryType(o){ + _handleQueryType (o) { this.sourceMysqlParams.srcQueryType = this.srcQueryType this._getTargetTypeList(this.sourceType) this.targetType = this.targetTypeList[0].code }, - _handleModelTypeChange(a){ + _handleModelTypeChange (a) { this._getSourceTypeList(a) this.sourceType = this.sourceTypeList[0].code - this._handleSourceTypeChange({label: this.sourceType, value: this.sourceType}) + this._handleSourceTypeChange({ label: this.sourceType, value: this.sourceType }) }, - _handleSourceTypeChange(a){ + _handleSourceTypeChange (a) { this._getTargetTypeList(a.label) this.targetType = this.targetTypeList[0].code }, - _getSourceTypeList(data){ - switch(data){ + _getSourceTypeList (data) { + switch (data) { case 'import': this.sourceTypeList = [ { - code:"MYSQL" - }, + code: 'MYSQL' + } ] - break; + break case 'export': this.sourceTypeList = [ { - code: "HDFS" + code: 'HDFS' }, { - code: "HIVE" + code: 'HIVE' } ] - break; + break default: this.sourceTypeList = [ { - code:"MYSQL" + code: 'MYSQL' }, { - code:"HIVE" + code: 'HIVE' }, { - code:"HDFS" + code: 'HDFS' } ] - break; + break } }, - _getTargetTypeList(data){ - switch(data){ + _getTargetTypeList (data) { + switch (data) { case 'MYSQL': - if (this.srcQueryType === "1") { + if (this.srcQueryType === '1') { this.targetTypeList = [ { - code: "HDFS" + code: 'HDFS' }] } else { this.targetTypeList = [ { - code: "HIVE" + code: 'HIVE' }, { - code: "HDFS" + code: 'HDFS' } ] } - break; + break case 'HDFS': this.targetTypeList = [ { - code:"MYSQL" + code: 'MYSQL' } ] - break; + break case 'HIVE': this.targetTypeList = [ { - code:"MYSQL" + code: 'MYSQL' } ] - break; + break default: this.targetTypeList = [ { - code:"HIVE" + code: 'HIVE' }, { - code:"HDFS" + code: 'HDFS' } ] - break; + break } }, @@ -853,26 +853,26 @@ /** * stringify the source params */ - _handleSourceParams() { + _handleSourceParams () { var params = null - switch(this.sourceType){ - case "MYSQL": - this.sourceMysqlParams.srcQuerySql = this.sourceMysqlParams.srcQueryType === "1" && editor ? - editor.getValue() : this.sourceMysqlParams.srcQuerySql + switch (this.sourceType) { + case 'MYSQL': + this.sourceMysqlParams.srcQuerySql = this.sourceMysqlParams.srcQueryType === '1' && editor + ? editor.getValue() : this.sourceMysqlParams.srcQuerySql params = JSON.stringify(this.sourceMysqlParams) - break; - case "ORACLE": + break + case 'ORACLE': params = JSON.stringify(this.sourceOracleParams) - break; - case "HDFS": + break + case 'HDFS': params = JSON.stringify(this.sourceHdfsParams) - break; - case "HIVE": + break + case 'HIVE': params = JSON.stringify(this.sourceHiveParams) - break; + break default: - params = ""; - break; + params = '' + break } return params }, @@ -880,21 +880,21 @@ /** * stringify the target params */ - _handleTargetParams() { + _handleTargetParams () { var params = null - switch(this.targetType){ - case "HIVE": + switch (this.targetType) { + case 'HIVE': params = JSON.stringify(this.targetHiveParams) - break; - case "HDFS": + break + case 'HDFS': params = JSON.stringify(this.targetHdfsParams) - break; - case "MYSQL": + break + case 'MYSQL': params = JSON.stringify(this.targetMysqlParams) - break; + break default: - params = ""; - break; + params = '' + break } return params @@ -903,47 +903,46 @@ /** * get source params by source type */ - _getSourceParams(data) { - switch(this.sourceType){ - case "MYSQL": + _getSourceParams (data) { + switch (this.sourceType) { + case 'MYSQL': this.sourceMysqlParams = JSON.parse(data) this.srcDatasource = this.sourceMysqlParams.srcDatasource - break; - case "ORACLE": + break + case 'ORACLE': this.sourceOracleParams = JSON.parse(data) - break; - case "HDFS": + break + case 'HDFS': this.sourceHdfsParams = JSON.parse(data) - break; - case "HIVE": + break + case 'HIVE': this.sourceHiveParams = JSON.parse(data) - break; + break default: - break; + break } }, /** * get target params by target type */ - _getTargetParams(data) { - switch(this.targetType){ - case "HIVE": + _getTargetParams (data) { + switch (this.targetType) { + case 'HIVE': this.targetHiveParams = JSON.parse(data) - break; - case "HDFS": + break + case 'HDFS': this.targetHdfsParams = JSON.parse(data) - break; - case "MYSQL": + break + case 'MYSQL': this.targetMysqlParams = JSON.parse(data) this.targetDatasource = this.targetMysqlParams.targetDatasource - break; + break default: - break; + break } }, - /** * verification */ @@ -957,7 +956,7 @@ this.$message.warning(`${i18n.$t('Please enter Custom Shell(required)')}`) return false } - sqoopParams['customShell'] = shellEditor.getValue() + sqoopParams.customShell = shellEditor.getValue() } else { if (!this.jobName) { this.$message.warning(`${i18n.$t('Please enter Job Name(required)')}`) @@ -965,7 +964,7 @@ } switch (this.sourceType) { - case "MYSQL": + case 'MYSQL': if (!this.$refs.refSourceDs._verifDatasource()) { return false } @@ -974,84 +973,84 @@ this.$message.warning(`${i18n.$t('Please enter a SQL Statement(required)')}`) return false } - this.sourceMysqlParams.srcTable = "" - this.sourceMysqlParams.srcColumnType = "0" - this.sourceMysqlParams.srcColumns = "" + this.sourceMysqlParams.srcTable = '' + this.sourceMysqlParams.srcColumnType = '0' + this.sourceMysqlParams.srcColumns = '' } else { - if (this.sourceMysqlParams.srcTable === "") { + if (this.sourceMysqlParams.srcTable === '') { this.$message.warning(`${i18n.$t('Please enter Mysql Table(required)')}`) return false } - this.sourceMysqlParams.srcQuerySql = "" - if (this.sourceMysqlParams.srcColumnType === "1" && this.sourceMysqlParams.srcColumns === "") { + this.sourceMysqlParams.srcQuerySql = '' + if (this.sourceMysqlParams.srcColumnType === '1' && this.sourceMysqlParams.srcColumns === '') { this.$message.warning(`${i18n.$t('Please enter Columns (Comma separated)')}`) return false } - if (this.sourceMysqlParams.srcColumnType === "0") { - this.sourceMysqlParams.srcColumns = "" + if (this.sourceMysqlParams.srcColumnType === '0') { + this.sourceMysqlParams.srcColumns = '' } } - break; - case "HDFS": - if (this.sourceHdfsParams.exportDir === "") { + break + case 'HDFS': + if (this.sourceHdfsParams.exportDir === '') { this.$message.warning(`${i18n.$t('Please enter Export Dir(required)')}`) return false } - break; - case "HIVE": - if (this.sourceHiveParams.hiveDatabase === "") { + break + case 'HIVE': + if (this.sourceHiveParams.hiveDatabase === '') { this.$message.warning(`${i18n.$t('Please enter Hive Database(required)')}`) return false } - if (this.sourceHiveParams.hiveTable === "") { + if (this.sourceHiveParams.hiveTable === '') { this.$message.warning(`${i18n.$t('Please enter Hive Table(required)')}`) return false } - break; + break default: - break; + break } switch (this.targetType) { - case "HIVE": - if (this.targetHiveParams.hiveDatabase === "") { + case 'HIVE': + if (this.targetHiveParams.hiveDatabase === '') { this.$message.warning(`${i18n.$t('Please enter Hive Database(required)')}`) return false } - if (this.targetHiveParams.hiveTable === "") { + if (this.targetHiveParams.hiveTable === '') { this.$message.warning(`${i18n.$t('Please enter Hive Table(required)')}`) return false } - break; - case "HDFS": - if (this.targetHdfsParams.targetPath === "") { + break + case 'HDFS': + if (this.targetHdfsParams.targetPath === '') { this.$message.warning(`${i18n.$t('Please enter Target Dir(required)')}`) return false } - break; - case "MYSQL": + break + case 'MYSQL': if (!this.$refs.refTargetDs._verifDatasource()) { return false } - if (this.targetMysqlParams.targetTable === "") { + if (this.targetMysqlParams.targetTable === '') { this.$message.warning(`${i18n.$t('Please enter Mysql Table(required)')}`) return false } - break; + break default: - break; + break } - sqoopParams['jobName'] = this.jobName - sqoopParams['hadoopCustomParams'] = this.hadoopCustomParams - sqoopParams['sqoopAdvancedParams'] = this.sqoopAdvancedParams - sqoopParams['concurrency'] = this.concurrency - sqoopParams['modelType'] = this.modelType - sqoopParams['sourceType'] = this.sourceType - sqoopParams['targetType'] = this.targetType - sqoopParams['targetParams'] = this._handleTargetParams() - sqoopParams['sourceParams'] = this._handleSourceParams() + sqoopParams.jobName = this.jobName + sqoopParams.hadoopCustomParams = this.hadoopCustomParams + sqoopParams.sqoopAdvancedParams = this.sqoopAdvancedParams + sqoopParams.concurrency = this.concurrency + sqoopParams.modelType = this.modelType + sqoopParams.sourceType = this.sourceType + sqoopParams.targetType = this.targetType + sqoopParams.targetParams = this._handleTargetParams() + sqoopParams.sourceParams = this._handleSourceParams() } // storage @@ -1142,14 +1141,14 @@ _cacheParams () { this.$emit('on-cache-params', { - concurrency:this.concurrency, - modelType:this.modelType, - sourceType:this.sourceType, - targetType:this.targetType, - sourceParams:this._handleSourceParams(), - targetParams:this._handleTargetParams(), - localParams:this.localParams - }); + concurrency: this.concurrency, + modelType: this.modelType, + sourceType: this.sourceType, + targetType: this.targetType, + sourceParams: this._handleSourceParams(), + targetParams: this._handleTargetParams(), + localParams: this.localParams + }) }, _destroyEditor () { @@ -1171,7 +1170,7 @@ watch: { // Listening to sqlType sqlType (val) { - if (val==0) { + if (val == 0) { this.showType = [] } if (val != 0) { @@ -1186,7 +1185,7 @@ this.connParams = '' } }, - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { this._cacheParams() } @@ -1248,21 +1247,21 @@ computed: { cacheParams () { return { - concurrency:this.concurrency, - modelType:this.modelType, - sourceType:this.sourceType, - targetType:this.targetType, - localParams:this.localParams, - sourceMysqlParams:this.sourceMysqlParams, - sourceHdfsParams:this.sourceHdfsParams, - sourceHiveParams:this.sourceHiveParams, - targetHdfsParams:this.targetHdfsParams, - targetMysqlParams:this.targetMysqlParams, - targetHiveParams:this.targetHiveParams + concurrency: this.concurrency, + modelType: this.modelType, + sourceType: this.sourceType, + targetType: this.targetType, + localParams: this.localParams, + sourceMysqlParams: this.sourceMysqlParams, + sourceHdfsParams: this.sourceHdfsParams, + sourceHiveParams: this.sourceHiveParams, + targetHdfsParams: this.targetHdfsParams, + targetMysqlParams: this.targetMysqlParams, + targetHiveParams: this.targetHiveParams } } }, - components: { mListBox, mDatasource, mLocalParams, mScriptBox} + components: { mListBox, mDatasource, mLocalParams, mScriptBox } } - diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue index 1f59bfcc3d..23fe4ceb42 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sub_process.vue @@ -97,7 +97,7 @@ created () { let processListS = _.cloneDeep(this.store.state.dag.processListS) let id = null - if(this.router.history.current.name==='projects-instance-details') { + if (this.router.history.current.name === 'projects-instance-details') { id = this.router.history.current.query.id || null } else { id = this.router.history.current.params.id || null @@ -119,7 +119,7 @@ this.wdiCurr = o.params.processDefinitionId } else { if (this.processDefinitionList.length) { - this.wdiCurr = this.processDefinitionList[0]['id'] + this.wdiCurr = this.processDefinitionList[0].id this.$emit('on-set-process-name', this._handleName(this.wdiCurr)) } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue index 9d2feb47ce..2099b076d2 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/waterdrop.vue @@ -114,7 +114,7 @@ // waterdrop script baseScript: 'sh ${WATERDROP_HOME}/bin/start-waterdrop.sh', // resourceNameVal - resourceNameVal : [], + resourceNameVal: [], // Custom parameter localParams: [], // resource(list) @@ -128,14 +128,14 @@ // Spark version(LIst) masterType: [{ code: 'yarn' }, { code: 'local' }, { code: 'spark://' }, { code: 'mesos://' }], // Deployment masterUrl state - masterUrlState:false, + masterUrlState: false, // Deployment masterUrl masterUrl: '', // Cache ResourceList cacheResourceList: [], // define options options: [], - normalizer(node) { + normalizer (node) { return { label: node.name } @@ -177,7 +177,7 @@ return false } // noRes - if (this.noRes.length>0) { + if (this.noRes.length > 0) { this.$message.warning(`${i18n.$t('Please delete all non-existent resources')}`) return false } @@ -186,40 +186,40 @@ this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`) return false } - if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length==0) { + if (this.resourceNameVal.resourceList && this.resourceNameVal.resourceList.length == 0) { this.$message.warning(`${i18n.$t('Please select the waterdrop resources')}`) return false } // Process resourcelist - let dataProcessing= _.map(this.resourceList, v => { + let dataProcessing = _.map(this.resourceList, v => { return { id: v } }) - //verify deploy mode + // verify deploy mode let deployMode = this.deployMode let master = this.master let masterUrl = this.masterUrl - - if(this.deployMode == 'local'){ + + if (this.deployMode == 'local') { master = 'local' masterUrl = '' deployMode = 'client' } // get local params let locparams = '' - this.localParams.forEach(v=>{ - locparams = locparams + ' --variable ' + v.prop + '=' + v.value - } + this.localParams.forEach(v => { + locparams = locparams + ' --variable ' + v.prop + '=' + v.value + } ) // get waterdrop script let tureScript = '' - this.resourceNameVal.resourceList.forEach(v=>{ + this.resourceNameVal.resourceList.forEach(v => { tureScript = tureScript + this.baseScript + - ' --master '+ master + masterUrl + - ' --deploy-mode '+ deployMode + - ' --queue '+ this.queue + - ' --config ' + v.res + + ' --master ' + master + masterUrl + + ' --deploy-mode ' + deployMode + + ' --queue ' + this.queue + + ' --config ' + v.res + locparams + ' \n' }) @@ -227,60 +227,60 @@ this.$emit('on-params', { resourceList: dataProcessing, localParams: this.localParams, - rawScript: tureScript, + rawScript: tureScript }) return true }, - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0? - this.operationTree(item) : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? this.operationTree(item) : this.diGuiTree(item.children) }) }, - operationTree(item) { - if(item.dirctory) { - item.isDisabled =true + operationTree (item) { + if (item.dirctory) { + item.isDisabled = true } delete item.children }, - searchTree(element, id) { + searchTree (element, id) { // 根据id查找节点 if (element.id == id) { - return element; + return element } else if (element.children != null) { - var i; - var result = null; + var i + var result = null 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 resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.options.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.options.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ + resourceIdArr = isResourceId.map(item => { return item.id }) - Array.prototype.diff = function(a) { - return this.filter(function(i) {return a.indexOf(i) < 0;}); - }; - let diffSet = this.resourceList.diff(resourceIdArr); + Array.prototype.diff = function (a) { + return this.filter(function (i) { return a.indexOf(i) < 0 }) + } + let diffSet = this.resourceList.diff(resourceIdArr) let optionsCmp = [] - if(diffSet.length>0) { - diffSet.forEach(item=>{ - backResource.forEach(item1=>{ - if(item==item1.id || item==item1.res) { + if (diffSet.length > 0) { + diffSet.forEach(item => { + backResource.forEach(item1 => { + if (item == item1.id || item == item1.res) { optionsCmp.push(item1) } }) @@ -289,15 +289,15 @@ let noResources = [{ id: -1, name: $t('Unauthorized or deleted resources'), - fullName: '/'+$t('Unauthorized or deleted resources'), + fullName: '/' + $t('Unauthorized or deleted resources'), children: [] }] - if(optionsCmp.length>0) { + if (optionsCmp.length > 0) { this.allNoResources = optionsCmp - optionsCmp = optionsCmp.map(item=>{ - return {id: item.id,name: item.name,fullName: item.res} + optionsCmp = optionsCmp.map(item => { + return { id: item.id, name: item.name, fullName: item.res } }) - optionsCmp.forEach(item=>{ + optionsCmp.forEach(item => { item.isNew = true }) noResources[0].children = optionsCmp @@ -307,44 +307,44 @@ } }, watch: { - //Watch the cacheParams + // Watch the cacheParams cacheParams (val) { this.resourceNameVal = val - this.$emit('on-cache-params', val); + this.$emit('on-cache-params', val) }, - "master": { - handler(code) { - if(code == 'spark://'){ - this.masterUrlState = true; - }else if(code == 'mesos://'){ - this.masterUrlState = true; - }else{ - this.masterUrlState = false; + master: { + handler (code) { + if (code == 'spark://') { + this.masterUrlState = true + } else if (code == 'mesos://') { + this.masterUrlState = true + } else { + this.masterUrlState = false this.masterUrl = '' } } - }, + } }, computed: { cacheParams () { let isResourceId = [] let resourceIdArr = [] - if(this.resourceList.length>0) { - this.resourceList.forEach(v=>{ - this.options.forEach(v1=>{ - if(this.searchTree(v1,v)) { - isResourceId.push(this.searchTree(v1,v)) + if (this.resourceList.length > 0) { + this.resourceList.forEach(v => { + this.options.forEach(v1 => { + if (this.searchTree(v1, v)) { + isResourceId.push(this.searchTree(v1, v)) } }) }) - resourceIdArr = isResourceId.map(item=>{ - return {id: item.id,name: item.name,res: item.fullName} + resourceIdArr = isResourceId.map(item => { + return { id: item.id, name: item.name, res: item.fullName } }) } let result = [] - resourceIdArr.forEach(item=>{ - this.allNoResources.forEach(item1=>{ - if(item.id==item1.id) { + resourceIdArr.forEach(item => { + this.allNoResources.forEach(item1 => { + if (item.id == item1.id) { // resultBool = true result.push(item1) } @@ -357,7 +357,7 @@ deployMode: this.deployMode, master: this.master, masterUrl: this.masterUrl, - queue:this.queue, + queue: this.queue } } }, @@ -370,7 +370,7 @@ // Non-null objects represent backfill if (!_.isEmpty(o)) { this.master = o.params.master || 'yarn' - this.deployMode = o.params.deployMode || 'client' + this.deployMode = o.params.deployMode || 'client' this.masterUrl = o.params.masterUrl || '' this.queue = o.params.queue || 'default' this.rawScript = o.params.rawScript || '' @@ -380,10 +380,10 @@ let resourceList = o.params.resourceList || [] if (resourceList.length) { _.map(resourceList, v => { - if(!v.id) { - this.store.dispatch('dag/getResourceId',{ + if (!v.id) { + this.store.dispatch('dag/getResourceId', { type: 'FILE', - fullName: '/'+v.res + fullName: '/' + v.res }).then(res => { this.resourceList.push(res.id) this.dataProcess(backResource) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue index 07b2774a9e..5a67ac8e65 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue @@ -38,7 +38,7 @@ import store from '@/conf/home/store' import { runningType } from '@/conf/home/pages/dag/_source/config' import { warningTypeList } from '@/conf/home/pages/projects/pages/definition/pages/list/_source/util' - + export default { name: 'starting-params-dag-index', data () { @@ -69,16 +69,16 @@ return '-' }, _rtWorkerGroupName (id) { - let o = _.filter(this.workerGroupList, v => v.id === id) + let o = _.filter(this.workerGroupList, v => v.id === id) if (o && o.length) { return o[0].name } return '-' }, _getNotifyGroupList () { - this.store.dispatch('dag/getNotifyGroupList').then(res => { - this.notifyGroupList = res - }) + this.store.dispatch('dag/getNotifyGroupList').then(res => { + this.notifyGroupList = res + }) }, _getWorkerGroupList () { let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || [] @@ -92,7 +92,7 @@ } }, watch: { - '$route': { + $route: { deep: true, handler () { this.isActive = false diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue index bb98bec7d9..9cc85f1616 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue @@ -49,13 +49,13 @@ prop: 'value', event: 'tenantSelectEvent' }, - mounted() { - let result = this.itemList.some(item=>{ - if(item.id == this.value) { + mounted () { + let result = this.itemList.some(item => { + if (item.id == this.value) { return true } - }) - if(!result) { + }) + if (!result) { this.value = 'default' } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue index b4ce0399c6..74dbf3fc6b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue @@ -91,7 +91,7 @@ import mLocalParams from '../formModel/tasks/_source/localParams' import disabledState from '@/module/mixin/disabledState' import Affirm from '../jumpAffirm' - import FormTenant from "./_source/selectTenant"; + import FormTenant from './_source/selectTenant' export default { name: 'udp', @@ -134,7 +134,7 @@ } return true }, - _accuStore(){ + _accuStore () { this.store.commit('dag/setGlobalParams', _.cloneDeep(this.udpList)) this.store.commit('dag/setName', _.cloneDeep(this.name)) this.store.commit('dag/setTimeout', _.cloneDeep(this.timeout)) @@ -210,10 +210,9 @@ this.tenantId = dag.tenantId } }) - }, mounted () {}, - components: {FormTenant, mLocalParams } + components: { FormTenant, mLocalParams } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue index 33be9e096f..9f6ed83d4a 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/index.vue @@ -37,7 +37,7 @@ } }, watch: { - '$route': { + $route: { deep: true, handler () { this.isActive = false diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue index b1d7a7b1e2..d9acb38453 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue @@ -41,8 +41,8 @@ props: {}, methods: { ...mapMutations('dag', ['resetParams', 'setIsDetails']), - ...mapActions('dag', ['getProcessList','getProjectList', 'getResourcesList', 'getProcessDetails','getResourcesListJar']), - ...mapActions('security', ['getTenantList','getWorkerGroupsAll']), + ...mapActions('dag', ['getProcessList', 'getProjectList', 'getResourcesList', 'getProcessDetails', 'getResourcesListJar']), + ...mapActions('security', ['getTenantList', 'getWorkerGroupsAll']), /** * init */ @@ -89,7 +89,7 @@ }, watch: { // Listening for routing changes - '$route': { + $route: { deep: true, handler () { this.init() diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue index eedf741b6e..d232e2dd86 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/index.vue @@ -40,8 +40,8 @@ props: {}, methods: { ...mapMutations('dag', ['resetParams']), - ...mapActions('dag', ['getProcessList','getProjectList', 'getResourcesList','getResourcesListJar','getResourcesListJar']), - ...mapActions('security', ['getTenantList','getWorkerGroupsAll']), + ...mapActions('dag', ['getProcessList', 'getProjectList', 'getResourcesList', 'getResourcesListJar', 'getResourcesListJar']), + ...mapActions('security', ['getTenantList', 'getWorkerGroupsAll']), /** * init */ @@ -74,7 +74,7 @@ } }, watch: { - '$route': { + $route: { deep: true, handler () { this.init() diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue index daa30d7c44..0727d12eed 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue @@ -43,8 +43,8 @@ props: {}, methods: { ...mapMutations('dag', ['setIsDetails', 'resetParams']), - ...mapActions('dag', ['getProcessList','getProjectList', 'getResourcesList', 'getInstancedetail','getResourcesListJar']), - ...mapActions('security', ['getTenantList','getWorkerGroupsAll']), + ...mapActions('dag', ['getProcessList', 'getProjectList', 'getResourcesList', 'getInstancedetail', 'getResourcesListJar']), + ...mapActions('security', ['getTenantList', 'getWorkerGroupsAll']), /** * init */ @@ -101,7 +101,7 @@ } }, watch: { - '$route': { + $route: { deep: true, handler () { this.init() diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue index f578f02346..a38c475c9c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/createDataSource.vue @@ -152,7 +152,7 @@ diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/index.vue index c1ad81fd2f..60af1187f7 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/index.vue @@ -25,9 +25,9 @@ import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu' export default { name: 'monitor-index', - mounted() { - + mounted () { + }, components: { mSecondaryMenu } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue index 88fcfb025b..943a9da1f6 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue @@ -77,4 +77,3 @@ } } - diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue index 123d47bf13..a2d9b46a37 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/db.vue @@ -79,41 +79,41 @@
\ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue index 8182dac639..0ce9f96a6d 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue @@ -95,7 +95,7 @@ this.getMasterData().then(res => { this.masterList = _.map(res, (v, i) => { return _.assign(v, { - id: v.host + "_" + v.id, + id: v.host + '_' + v.id, resInfo: JSON.parse(v.resInfo) }) }) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue index e47c163c78..a38e543aa9 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/statistics.vue @@ -74,7 +74,7 @@ import mListConstruction from '@/module/components/listConstruction/listConstruction' export default { - name: 'statistics', + name: 'statistics', data () { return { isLoading: false, @@ -83,12 +83,12 @@ color: themeData.color } }, - props:{}, + props: {}, methods: { - //...mapActions('monitor', ['getDatabaseData']) + // ...mapActions('monitor', ['getDatabaseData']) // ...mapActions('projects', ['getCommandStateCount']), ...mapActions('projects', ['getQueueCount']), - ...mapActions('projects', ['getCommandStateCount']), + ...mapActions('projects', ['getCommandStateCount']) }, watch: {}, created () { @@ -98,26 +98,26 @@ this.isLoading = false }).catch(() => { this.isLoading = false - }) + }) this.getCommandStateCount().then(res => { let normal = 0 let error = 0 _.forEach(res.data, (v, i) => { let key = _.keys(v) - if(key[0] == 'errorCount') { + if (key[0] == 'errorCount') { error = error + v.errorCount } - if(key[1] == 'normalCount'){ + if (key[1] == 'normalCount') { normal = normal + v.normalCount } - } + } ) this.commandCountData = { - 'normalCount': normal, - 'errorCount' : error + normalCount: normal, + errorCount: error } - }).catch( () => { + }).catch(() => { }) }, mounted () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue index c4e2abd96e..02b063a77b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue @@ -112,7 +112,7 @@ this.getWorkerData().then(res => { this.workerList = _.map(res, (v, i) => { return _.assign(v, { - id: v.host + "_" + v.id, + id: v.host + '_' + v.id, resInfo: JSON.parse(v.resInfo) }) }) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue index 9f32fcf2b6..37566e517e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue @@ -94,14 +94,14 @@ this.searchParams.startDate = val[0] this.searchParams.endDate = val[1] this.dataTime[0] = val[0] - this.dataTime[1]= val[1] + this.dataTime[1] = val[1] }, /** * change state */ _onChangeState (val) { this.searchParams.stateType = val - }, + } }, watch: { }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue index 9e206a3172..ed754f6dde 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/taskInstance.vue @@ -83,7 +83,7 @@ executorName: '', processInstanceName: '' }, - dataTime: [], + dataTime: [] } }, props: {}, @@ -98,14 +98,14 @@ this.searchParams.startDate = val[0] this.searchParams.endDate = val[1] this.dataTime[0] = val[0] - this.dataTime[1]= val[1] + this.dataTime[1] = val[1] }, /** * change state */ _onChangeState (val) { this.searchParams.stateType = val - }, + } }, watch: { }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue index fcae664af5..5178bfaf05 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/conditions.vue @@ -74,26 +74,26 @@ stateList: [ { label: `${this.$t('none')}`, - code: `` + code: '' }, { label: `${this.$t('success')}`, - code: `成功` + code: '成功' }, { label: `${this.$t('waiting')}`, - code: `等待` + code: '等待' }, { label: `${this.$t('execution')}`, - code: `执行中` + code: '执行中' }, { label: `${this.$t('finish')}`, - code: `完成` + code: '完成' }, { label: `${this.$t('failed')}`, - code: `失败` + code: '失败' } ], searchParams: { @@ -105,7 +105,7 @@ startDate: '', endDate: '' }, - dataTime: [], + dataTime: [] } }, props: {}, @@ -118,7 +118,7 @@ */ _onChangeStartStop (val) { this.searchParams.startDate = val[0] - this.searchParams.endDate = val[1] + this.searchParams.endDate = val[1] }, /** * change state @@ -148,4 +148,4 @@ }, components: { mConditions } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue index b3173b037b..5e71cb3667 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue @@ -88,4 +88,4 @@ }, components: { } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue index 94fb9b481d..94b6b80556 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/email.vue @@ -100,7 +100,7 @@ if (this.email === '') { return true } - this.email = _.trim(this.email).replace(/(;$)|(;$)/g, "") + this.email = _.trim(this.email).replace(/(;$)|(;$)/g, '') let email = this.email diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue index f1d5bef5cb..ece818c7d4 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue @@ -190,8 +190,8 @@ ...mapActions('dag', ['editProcessState', 'getStartCheck', 'getReceiver', 'deleteDefinition', 'batchDeleteDefinition', 'exportDefinition', 'getProcessDefinitionVersionsPage', 'copyProcess', 'switchProcessDefinitionVersion', 'deleteProcessDefinitionVersion', 'moveProcess']), ...mapActions('security', ['getWorkerGroupsAll']), - selectable(row,index) { - if(row.releaseState === 'ONLINE') { + selectable (row, index) { + if (row.releaseState === 'ONLINE') { return false } else { return true @@ -209,8 +209,8 @@ _start (item) { this.getWorkerGroupsAll() this.getStartCheck({ processDefinitionId: item.id }).then(res => { - this.startData = item - this.startDialog = true + this.startData = item + this.startDialog = true }).catch(e => { this.$message.error(e.msg || '') }) @@ -353,11 +353,11 @@ * @param processDefinitionId the process definition id * @param fromThis fromThis */ - mVersionSwitchProcessDefinitionVersion({ version, processDefinitionId, fromThis }) { + mVersionSwitchProcessDefinitionVersion ({ version, processDefinitionId, fromThis }) { this.switchProcessDefinitionVersion({ version: version, processDefinitionId: processDefinitionId - }).then(res=>{ + }).then(res => { this.$message.success($t('Switch Version Successfully')) this.$router.push({ path: `/projects/definition/list/${processDefinitionId}` }) }).catch(e => { @@ -372,19 +372,19 @@ * @param processDefinitionId the process definition id of page version * @param fromThis fromThis */ - mVersionGetProcessDefinitionVersionsPage({ pageNo, pageSize, processDefinitionId, fromThis }) { + mVersionGetProcessDefinitionVersionsPage ({ pageNo, pageSize, processDefinitionId, fromThis }) { this.getProcessDefinitionVersionsPage({ - pageNo: pageNo, - pageSize: pageSize, - processDefinitionId: processDefinitionId - }).then(res=>{ - this.versionData.processDefinitionVersions = res.data.lists - this.versionData.total = res.data.totalCount - this.versionData.pageSize = res.data.pageSize - this.versionData.pageNo = res.data.currentPage - }).catch(e=>{ - this.$message.error(e.msg || '') - }) + pageNo: pageNo, + pageSize: pageSize, + processDefinitionId: processDefinitionId + }).then(res => { + this.versionData.processDefinitionVersions = res.data.lists + this.versionData.total = res.data.totalCount + this.versionData.pageSize = res.data.pageSize + this.versionData.pageNo = res.data.currentPage + }).catch(e => { + this.$message.error(e.msg || '') + }) }, /** * delete one version of process definition @@ -393,11 +393,11 @@ * @param processDefinitionId the process definition id user want to delete * @param fromThis fromThis */ - mVersionDeleteProcessDefinitionVersion({ version, processDefinitionId, fromThis }) { + mVersionDeleteProcessDefinitionVersion ({ version, processDefinitionId, fromThis }) { this.deleteProcessDefinitionVersion({ version: version, processDefinitionId: processDefinitionId - }).then(res=>{ + }).then(res => { this.$message.success(res.msg || '') this.mVersionGetProcessDefinitionVersionsPage({ pageNo: 1, @@ -420,14 +420,13 @@ let total = res.data.totalCount let pageSize = res.data.pageSize let pageNo = res.data.currentPage - + this.versionData.processDefinition = item, this.versionData.processDefinitionVersions = processDefinitionVersions, this.versionData.total = total, this.versionData.pageNo = pageNo, this.versionData.pageSize = pageSize this.drawer = true - }).catch(e => { this.$message.error(e.msg || '') }) @@ -436,7 +435,7 @@ _batchExport () { this.exportDefinition({ processDefinitionIds: this.strSelectIds, - fileName: "process_"+new Date().getTime() + fileName: 'process_' + new Date().getTime() }).then(res => { this._onUpdate() this.checkAll = false @@ -451,11 +450,11 @@ * Batch Copy */ _batchCopy () { - this.relatedItemsDialog= true + this.relatedItemsDialog = true this.tmp = false }, onBatchCopy (item) { - this._copyProcess({id: this.strSelectIds,projectId: item}) + this._copyProcess({ id: this.strSelectIds, projectId: item }) this.relatedItemsDialog = false }, closeRelatedItems () { @@ -464,12 +463,12 @@ /** * _batchMove */ - _batchMove() { + _batchMove () { this.tmp = true this.relatedItemsDialog = true }, onBatchMove (item) { - this._moveProcess({id: this.strSelectIds,projectId: item}) + this._moveProcess({ id: this.strSelectIds, projectId: item }) this.relatedItemsDialog = false }, /** @@ -492,7 +491,7 @@ */ _arrDelChange (v) { let arr = [] - arr = _.map(v, 'id'); + arr = _.map(v, 'id') this.strSelectIds = _.join(arr, ',') }, /** diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue index 89fd761132..5eb61369b6 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/relatedItems.vue @@ -56,39 +56,39 @@ } }, props: { - tmp: Boolean + tmp: Boolean }, methods: { _ok () { - if(this._verification()) { - if(this.tmp) { - this.$emit('onBatchMove',this.itemId) - } else { - this.$emit('onBatchCopy',this.itemId) - } + if (this._verification()) { + if (this.tmp) { + this.$emit('onBatchMove', this.itemId) + } else { + this.$emit('onBatchCopy', this.itemId) + } } }, - _verification() { - if(!this.itemId) { - this.$message.warning(`${i18n.$t('Project name is required')}`) - return false + _verification () { + if (!this.itemId) { + this.$message.warning(`${i18n.$t('Project name is required')}`) + return false } return true } - + }, watch: { }, created () { - this.store.dispatch('dag/getAllItems', {}).then(res => { - if(res.data.length> 0) { - this.itemList = res.data - } - }) + this.store.dispatch('dag/getAllItems', {}).then(res => { + if (res.data.length > 0) { + this.itemList = res.data + } + }) }, mounted () { }, components: { mPopup, mListBoxF } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue index e0fc482687..a4657bd9de 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/start.vue @@ -85,7 +85,7 @@ style="width: 200px;" size="small" v-model="warningGroupId" - :disabled="!notifyGroupList.length"> + :disabled="!notifyGroupList.length"> @@ -214,7 +214,7 @@ scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '', failureStrategy: this.failureStrategy, warningType: this.warningType, - warningGroupId: this.warningGroupId=='' ? 0 : this.warningGroupId, + warningGroupId: this.warningGroupId == '' ? 0 : this.warningGroupId, execType: this.execType ? 'COMPLEMENT_DATA' : null, startNodeList: this.startNodeList, taskDependType: this.taskDependType, @@ -242,10 +242,10 @@ }, _getNotifyGroupList () { return new Promise((resolve, reject) => { - this.store.dispatch('dag/getNotifyGroupList').then(res => { - this.notifyGroupList = res - resolve() - }) + this.store.dispatch('dag/getNotifyGroupList').then(res => { + this.notifyGroupList = res + resolve() + }) }) }, _getReceiver () { @@ -277,7 +277,7 @@ } else { this.store.dispatch('security/getWorkerGroupsAll').then(res => { this.$nextTick(() => { - if(res.length>0) { + if (res.length > 0) { this.workerGroup = res[0].id } }) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue index 94214f4760..b33ed67c43 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue @@ -228,7 +228,7 @@ failureStrategy: this.failureStrategy, warningType: this.warningType, processInstancePriority: this.processInstancePriority, - warningGroupId: this.warningGroupId =='' ? 0 : this.warningGroupId, + warningGroupId: this.warningGroupId == '' ? 0 : this.warningGroupId, receivers: this.receivers.join(',') || '', receiversCc: this.receiversCc.join(',') || '', workerGroup: this.workerGroup @@ -256,37 +256,37 @@ }, _preview () { - if (this._verification()) { - let api = 'dag/previewSchedule' - let searchParams = { - schedule: JSON.stringify({ - startTime: this.scheduleTime[0], - endTime: this.scheduleTime[1], - crontab: this.crontab - }) - } - let msg = '' + if (this._verification()) { + let api = 'dag/previewSchedule' + let searchParams = { + schedule: JSON.stringify({ + startTime: this.scheduleTime[0], + endTime: this.scheduleTime[1], + crontab: this.crontab + }) + } + let msg = '' - this.store.dispatch(api, searchParams).then(res => { - if (res.length) { - this.previewTimes = res - } else { - this.$message.warning(`${i18n.$t('There is no data for this period of time')}`) - } - }) - } - }, + this.store.dispatch(api, searchParams).then(res => { + if (res.length) { + this.previewTimes = res + } else { + this.$message.warning(`${i18n.$t('There is no data for this period of time')}`) + } + }) + } + }, _getNotifyGroupList () { return new Promise((resolve, reject) => { - this.store.dispatch('dag/getNotifyGroupList').then(res => { - this.notifyGroupList = res - if (this.notifyGroupList.length) { - resolve() - } else { - reject(new Error(0)) - } - }) + this.store.dispatch('dag/getNotifyGroupList').then(res => { + this.notifyGroupList = res + if (this.notifyGroupList.length) { + resolve() + } else { + reject(new Error(0)) + } + }) }) }, ok () { @@ -302,7 +302,7 @@ watch: { }, created () { - if(this.timingData.item.workerGroup===undefined) { + if (this.timingData.item.workerGroup === undefined) { let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || [] if (stateWorkerGroupsList.length) { this.workerGroup = stateWorkerGroupsList[0].id @@ -316,22 +316,22 @@ } else { this.workerGroup = this.timingData.item.workerGroup } - if(this.timingData.item.crontab !== null){ + if (this.timingData.item.crontab !== null) { this.crontab = this.timingData.item.crontab } - if(this.timingData.type == 'timing') { + if (this.timingData.type == 'timing') { let date = new Date() let year = date.getFullYear() let month = date.getMonth() + 1 let day = date.getDate() if (month < 10) { - month = "0" + month; + month = '0' + month } if (day < 10) { - day = "0" + day; + day = '0' + day } - let startDate = year + "-" + month + "-" + day + ' ' + '00:00:00' - let endDate = (year+100) + "-" + month + "-" + day + ' ' + '00:00:00' + let startDate = year + '-' + month + '-' + day + ' ' + '00:00:00' + let endDate = (year + 100) + '-' + month + '-' + day + ' ' + '00:00:00' let times = [] times[0] = startDate times[1] = endDate @@ -419,10 +419,10 @@ } } .x-date-packer-panel .x-date-packer-day .lattice label.bg-hover { - background: #00BFFF!important; + background: #00BFFF!important; margin-top: -4px; } .x-date-packer-panel .x-date-packer-day .lattice em:hover { - background: #0098e1!important; + background: #0098e1!important; } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue index fabd736ecc..bab85bb8a0 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/index.vue @@ -109,15 +109,15 @@ * get data list */ _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getProcessListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.processListP = [] this.processListP = res.totalList @@ -146,11 +146,11 @@ created () { localStore.removeItem('subProcessId') }, - mounted() { - + mounted () { + }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mList, mConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData } } @@ -185,4 +185,4 @@ } } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue index 0c80d1892e..b77ed1f9f9 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue @@ -106,7 +106,7 @@ props: {}, methods: { ...mapActions('dag', ['getViewTree']), - _close(){ + _close () { this.$router.go(-1) }, /** @@ -265,5 +265,4 @@ } } - diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue index 68ec207399..cf308f7238 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue @@ -133,7 +133,7 @@ props: { }, methods: { - ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver','deleteTiming']), + ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver', 'deleteTiming']), /** * delete */ @@ -260,7 +260,7 @@ }, closeTiming () { this.timingDialog = false - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue index 17a49643a5..3e664af823 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/index.vue @@ -32,8 +32,8 @@ import mListConstruction from '@/module/components/listConstruction/listConstruction' export default { name: 'definition-timing-index', - methods :{ - _close(){ + methods: { + _close () { this.$router.go(-1) } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue index f640a1e3c4..ab615e141c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/commandStateCount.vue @@ -70,7 +70,7 @@ }, watch: { - 'searchParams': { + searchParams: { deep: true, immediate: true, handler (o) { @@ -91,4 +91,4 @@ computed: {}, components: { mNoData } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue index d509d50cf4..07e734987c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/defineUserCount.vue @@ -38,7 +38,7 @@ return { isSpin: true, msg: true, - parameter: {projectId: 0} + parameter: { projectId: 0 } } }, props: { @@ -71,9 +71,9 @@ }, created () { this.isSpin = true - this.parameter.projectId = this.projectId; + this.parameter.projectId = this.projectId this.getDefineUserCount(this.parameter).then(res => { - this.msg = res.data.count > 0 ? true : false + this.msg = res.data.count > 0 this.defineUserList = [] this._handleDefineUser(res) this.isSpin = false diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue index 34ba8265d5..8a293f99d8 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/processStateCount.vue @@ -75,7 +75,7 @@ this.$router.push({ name: 'projects-instance-list', query: { - stateType: _.find(stateType, ['label', name])['code'], + stateType: _.find(stateType, ['label', name]).code, startDate: this.searchParams.startDate, endDate: this.searchParams.endDate } @@ -85,11 +85,11 @@ let data = res.data.taskCountDtos this.processStateList = _.map(data, v => { return { - key: _.find(stateType, ['code', v.taskStateType])['label'], + key: _.find(stateType, ['code', v.taskStateType]).label, value: v.count } }) - const myChart = Chart.pie('#process-state-pie', this.processStateList, { title: '' }) + const myChart = Chart.pie('#process-state-pie', this.processStateList, { title: '' }) myChart.echart.setOption(pie) // 首页不允许跳转 if (this.searchParams.projectId) { @@ -100,7 +100,7 @@ } }, watch: { - 'searchParams': { + searchParams: { deep: true, immediate: true, handler (o) { @@ -115,7 +115,7 @@ }) } }, - '$store.state.projects.sideBar': function() { + '$store.state.projects.sideBar': function () { echarts.init(document.getElementById('process-state-pie')).resize() } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue index 00eef39ea2..4c3cce4155 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/queueCount.vue @@ -76,7 +76,7 @@ } }, watch: { - 'searchParams': { + searchParams: { deep: true, immediate: true, handler (o) { @@ -98,4 +98,4 @@ }, components: { mNoData } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue index 27b576575f..c474255294 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskCtatusCount.vue @@ -78,7 +78,7 @@ this.$router.push({ name: 'task-instance', query: { - stateType: _.find(stateType, ['label', name])['code'], + stateType: _.find(stateType, ['label', name]).code, startDate: this.searchParams.startDate, endDate: this.searchParams.endDate } @@ -88,7 +88,7 @@ let data = res.data.taskCountDtos this.taskCtatusList = _.map(data, v => { return { - key: _.find(stateType, ['code', v.taskStateType])['label'], + key: _.find(stateType, ['code', v.taskStateType]).label, value: v.count, type: 'type' } @@ -105,7 +105,7 @@ } }, watch: { - 'searchParams': { + searchParams: { deep: true, immediate: true, handler (o) { @@ -120,7 +120,7 @@ }) } }, - '$store.state.projects.sideBar': function() { + '$store.state.projects.sideBar': function () { echarts.init(document.getElementById('task-status-pie')).resize() } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue index e752bf4889..9fd45418f9 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/taskStatusCount.vue @@ -74,7 +74,7 @@ this.$router.push({ name: 'task-instance', query: { - stateType: _.find(stateType, ['label', name])['code'], + stateType: _.find(stateType, ['label', name]).code, startDate: this.searchParams.startDate, endDate: this.searchParams.endDate } @@ -85,7 +85,7 @@ this.taskStatusList = _.map(data, v => { return { // CHECK!! - key: _.find(stateType, ['code', v.taskStateType])['label'], + key: _.find(stateType, ['code', v.taskStateType]).label, value: v.count, type: 'type' } @@ -102,7 +102,7 @@ } }, watch: { - 'searchParams': { + searchParams: { deep: true, immediate: true, handler (o) { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue index 560b72e857..4725ca0ff9 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/index/index.vue @@ -85,7 +85,7 @@ startDate: '', endDate: '' }, - dataTime: [], + dataTime: [] } }, props: { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/index.vue index 0836a52f1c..b02b297709 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/index.vue @@ -21,4 +21,4 @@ export default { name: 'process-instance-index' } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue index 88c88e079f..6b4e6fc98e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/details/index.vue @@ -27,4 +27,4 @@ }, components: { mInstanceDetails, mSecondaryMenu } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue index 9e869f5770..6d3e7caadb 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue @@ -162,7 +162,7 @@ {{scope.row.count}} - + { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.processInstanceList = [] this.processInstanceList = res.totalList @@ -148,15 +148,15 @@ * @desc Prevent functions from being called multiple times */ _debounceGET: _.debounce(function (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this._getProcessInstanceListP(flag) }, 100, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }) }, watch: { @@ -169,7 +169,7 @@ this.searchParams.pageNo = !_.isEmpty(a.query) && a.query.pageNo || 1 } }, - 'searchParams': { + searchParams: { deep: true, handler () { this._debounceGET() @@ -199,7 +199,7 @@ beforeDestroy () { // Destruction wheel clearInterval(this.setIntervalP) - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue index eb5ced5dd0..606a07f812 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/_source/graphGrid.vue @@ -35,7 +35,7 @@ }, methods: { init () { - }, + } }, created () { }, @@ -43,14 +43,14 @@ const graphGrid = echarts.init(this.$refs['graph-grid']) graphGrid.setOption(graphGridOption(this.locations, this.connects, this.sourceWorkFlowId, this.isShowLabel), true) graphGrid.on('click', (params) => { - // Jump to the definition page - this.$router.push({ path: `/projects/definition/list/${params.data.id}`}) - }); + // Jump to the definition page + this.$router.push({ path: `/projects/definition/list/${params.data.id}` }) + }) }, components: {}, computed: { ...mapState('kinship', ['locations', 'connects', 'sourceWorkFlowId']) - }, + } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue index ebfb74af40..f48fecd787 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue @@ -39,7 +39,7 @@ v-tooltip.small.top.start="$t('Reset')" @click="reset" > - { this.isLoading = false }).catch(() => { @@ -96,38 +94,38 @@ /** * reset */ - reset() { - this.isLoading = true; + reset () { + this.isLoading = true this.$nextTick(() => { - this.isLoading = false; + this.isLoading = false }) }, - async onChange(item) { - const { value, label } = item || {}; - this.isLoading = true; - this.currentItemName = label; + async onChange (item) { + const { value, label } = item || {} + this.isLoading = true + this.currentItemName = label try { - await this.getWorkFlowDAG(value); + await this.getWorkFlowDAG(value) } catch (error) { this.$message.error(error.msg || '') } - this.isLoading = false; + this.isLoading = false }, - tooltipOption(text) { + tooltipOption (text) { return { text, maxWidth: '500px', placement: 'top', theme: 'dark', triggerEvent: 'mouseenter', - large: false, + large: false } }, - changeLabel() { - this.isLoading = true; - this.isShowLabel = !this.isShowLabel; + changeLabel () { + this.isLoading = true + this.isShowLabel = !this.isShowLabel this.$nextTick(() => { - this.isLoading = false; + this.isLoading = false }) } }, @@ -142,9 +140,9 @@ }, computed: { ...mapState('kinship', ['locations', 'workList']), - inputFocusStyle() { + inputFocusStyle () { return `width:280px` - }, + } }, mounted () { } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue index 8398076f08..6fb69516e8 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/createProject.vue @@ -80,7 +80,7 @@ param.projectId = this.item.id } - this.$refs['popup'].spinnerLoading = true + this.$refs.popup.spinnerLoading = true this.store.dispatch(`projects/${this.item ? 'updateProjects' : 'createProjects'}`, param).then(res => { this.$emit('_onUpdate') @@ -88,13 +88,13 @@ message: res.msg, type: 'success', offset: 70 - }); + }) setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) }).catch(e => { this.$message.error(e.msg || '') - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }) }, _verification () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue index 72c0d82195..21ba3a7d88 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/_source/list.vue @@ -90,7 +90,7 @@ this.setProjectName(item.name) localStore.setItem('projectName', `${item.name}`) localStore.setItem('projectId', `${item.id}`) - this.$router.push({ path: `/projects/index` }) + this.$router.push({ path: '/projects/index' }) }, /** * Delete Project @@ -113,7 +113,7 @@ */ _edit (item) { findComponentDownward(this.$root, 'projects-list')._create(item) - }, + } }, watch: { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue index db92e46cdc..90116c14c3 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue @@ -62,7 +62,6 @@ import mConditions from '@/module/components/conditions/conditions' import mListConstruction from '@/module/components/listConstruction/listConstruction' - export default { name: 'projects-list', data () { @@ -108,8 +107,8 @@ _getList (flag) { this.isLoading = !flag this.getProjectsList(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.projectsList = [] this.projectsList = res.totalList diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue index 596afcfecb..649c8b5121 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/_source/list.vue @@ -122,7 +122,7 @@ }, _forceSuccess (item) { - this.forceTaskSuccess({taskInstanceId: item.id}).then(res => { + this.forceTaskSuccess({ taskInstanceId: item.id }).then(res => { if (res.code === 0) { this.$message.success(res.msg) } else { @@ -134,7 +134,7 @@ }, _go (item) { this.$router.push({ path: `/projects/instance/list/${item.processInstanceId}` }) - }, + } }, watch: { taskInstanceList (a) { @@ -149,6 +149,6 @@ mounted () { this.list = this.taskInstanceList }, - components: { mLog} + components: { mLog } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue index 00c7b5e7c2..2b8327762c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue @@ -106,7 +106,7 @@ _page (val) { this.searchParams.pageNo = val }, - _pageSize(val) { + _pageSize (val) { this.searchParams.pageSize = val }, /** @@ -114,8 +114,8 @@ */ _getList (flag) { this.isLoading = !flag - if(this.searchParams.pageNo == undefined) { - this.$router.push({ path: `/projects/index` }) + if (this.searchParams.pageNo == undefined) { + this.$router.push({ path: '/projects/index' }) return false } this.getTaskInstanceList(this.searchParams).then(res => { @@ -132,15 +132,15 @@ * @desc Prevent functions from being called multiple times */ _debounceGET: _.debounce(function (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this._getList(flag) }, 100, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }) }, watch: { @@ -164,7 +164,7 @@ beforeDestroy () { // Destruction wheel clearInterval(this.setIntervalP) - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mList, mInstanceConditions, mSpin, mListConstruction, mSecondaryMenu, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/timing/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/timing/index.vue index b9d8ab566f..71c2569b9b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/timing/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/timing/index.vue @@ -28,4 +28,4 @@ name: 'timing-index', components: { mList, mListConstruction } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue index afed41677c..ce4e3bbc5e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/index.vue @@ -25,7 +25,7 @@ export default { name: 'resource-index', components: { mSecondaryMenu }, - mounted() { - }, + mounted () { + } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue index 3a89a53877..2eb4e6b441 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/index.vue @@ -20,7 +20,7 @@ diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue index 9477373ae4..da616df5af 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/create/index.vue @@ -136,7 +136,7 @@ this.$message.warning(`${i18n.$t('Please enter the resource content')}`) return false } - if (editor.doc.size>3000) { + if (editor.doc.size > 3000) { this.$message.warning(`${i18n.$t('Resource content cannot exceed 3000 lines')}`) return false } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue index 7982f6bffb..da313d2514 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createFolder/index.vue @@ -94,7 +94,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/file`}) + this.$router.push({ path: '/resource/file' }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -109,7 +109,7 @@ } return true - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue index 0cee78904f..82c50d8991 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/createUdfFolder/index.vue @@ -94,7 +94,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/udf/resource`}) + this.$router.push({ path: '/resource/udf/resource' }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -108,7 +108,7 @@ return false } return true - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue index 6f7dbe1e36..e3df62b8cf 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/details/index.vue @@ -130,8 +130,8 @@ this._getViewResources() }, 1000, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }), /** * down @@ -143,8 +143,8 @@ this._getViewResources() }, 1000, { - 'leading': false, - 'trailing': true + leading: false, + trailing: true }), /** * off handle diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue index 30e960f784..428d7aaf85 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/edit/index.vue @@ -80,8 +80,8 @@ ...mapActions('resource', ['getViewResources', 'updateContent']), ok () { if (this._validation()) { - this.spinnerLoading = true - this.updateContent({ + this.spinnerLoading = true + this.updateContent({ id: this.$route.params.id, content: editor.getValue() }).then(res => { @@ -97,7 +97,7 @@ } }, _validation () { - if (editor.doc.size>3000) { + if (editor.doc.size > 3000) { this.$message.warning(`${i18n.$t('Resource content cannot exceed 3000 lines')}`) return false } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue index 8536e09dbb..46021eeadf 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/list.vue @@ -111,7 +111,7 @@ }, _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) - if(item.directory) { + if (item.directory) { localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/file/subdirectory/${item.id}` }) } else { @@ -142,12 +142,12 @@ this.renameDialog = true }, - onUpDate(item) { + onUpDate (item) { this.$set(this.list, this.index, item) this.renameDialog = false }, - close() { + close () { this.renameDialog = false }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue index a83cc42e65..ff25a43274 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue @@ -66,12 +66,12 @@ _ok (fn) { this._verification().then(res => { if (this.name === this.item.alias) { - return new Promise((resolve,reject) => { - this.description === this.item.description ? reject({msg:'内容未修改'}) : resolve() + return new Promise((resolve, reject) => { + this.description === this.item.description ? reject({ msg: '内容未修改' }) : resolve() }) - }else{ + } else { return this.store.dispatch('resource/resourceVerifyName', { - fullName: '/'+this.name, + fullName: '/' + this.name, type: 'FILE' }) } @@ -102,7 +102,7 @@ } }) }, - close() { + close () { this.$emit('close') } }, @@ -118,4 +118,4 @@ }, components: { mPopup, mListBoxF } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue index 899ba8f608..b8e98b10a9 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/index.vue @@ -101,15 +101,15 @@ this.searchParams.pageSize = val }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getResourcesListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.fileResourcesList = res.totalList this.total = res.total @@ -124,7 +124,7 @@ this.searchParams.searchVal = '' this._debounceGET() }, - _onUpdate () { + _onUpdate () { this._debounceGET() } }, @@ -140,7 +140,7 @@ mounted () { }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mListConstruction, mConditions, mList, mSpin, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue index 78b9715956..28ad326732 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFile/index.vue @@ -121,7 +121,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/file/subdirectory/${this.$route.params.id}`}) + this.$router.push({ path: `/resource/file/subdirectory/${this.$route.params.id}` }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -138,7 +138,7 @@ this.$message.warning(`${i18n.$t('Please enter the resource content')}`) return false } - if (editor.doc.size>3000) { + if (editor.doc.size > 3000) { this.$message.warning(`${i18n.$t('Resource content cannot exceed 3000 lines')}`) return false } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue index 4f3dbf6a6a..6d22f619e7 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subFileFolder/index.vue @@ -94,7 +94,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/file/subdirectory/${this.$route.params.id}`}) + this.$router.push({ path: `/resource/file/subdirectory/${this.$route.params.id}` }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -109,7 +109,7 @@ } return true - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue index c6f04b58f0..c7d739acc0 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue @@ -110,7 +110,7 @@ }, _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) - if(item.directory) { + if (item.directory) { localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/file/subdirectory/${item.id}` }) } else { @@ -141,12 +141,12 @@ this.renameDialog = true }, - onUpDate(item) { + onUpDate (item) { this.$set(this.list, this.index, item) this.renameDialog = false }, - close() { + close () { this.renameDialog = false }, @@ -168,7 +168,7 @@ setTimeout(() => { this.list = a }) - }, + } // Listening for routing changes // '$route': { // deep: false, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue index 72c4178070..d649a1551d 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/rename.vue @@ -67,12 +67,12 @@ _ok (fn) { this._verification().then(res => { if (this.name === this.item.alias) { - return new Promise((resolve,reject) => { - this.description === this.item.description ? reject({msg:'内容未修改'}) : resolve() + return new Promise((resolve, reject) => { + this.description === this.item.description ? reject({ msg: '内容未修改' }) : resolve() }) - }else{ + } else { return this.store.dispatch('resource/resourceVerifyName', { - fullName: localStore.getItem('currentDir')+'/'+this.name, + fullName: localStore.getItem('currentDir') + '/' + this.name, type: 'FILE' }) } @@ -101,10 +101,9 @@ } else { resolve() } - }) }, - close() { + close () { this.$emit('close') } }, @@ -120,4 +119,4 @@ }, components: { mPopup, mListBoxF } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue index 7864dcf4fc..baa4276d5c 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/index.vue @@ -89,12 +89,12 @@ mixins: [listUrlParamHandle], props: {}, methods: { - ...mapActions('resource', ['getResourcesListP','getResourceId']), + ...mapActions('resource', ['getResourcesListP', 'getResourceId']), /** * File Upload */ _uploading () { - findComponentDownward(this.$root, 'roof-nav')._fileChildUpdate('FILE',this.searchParams.id) + findComponentDownward(this.$root, 'roof-nav')._fileChildUpdate('FILE', this.searchParams.id) }, _onConditions (o) { this.searchParams = _.assign(this.searchParams, o) @@ -107,15 +107,15 @@ this.searchParams.pageSize = val }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getResourcesListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.fileResourcesList = res.totalList this.total = res.total @@ -131,20 +131,20 @@ this.searchParams.searchVal = '' this._debounceGET() }, - _onUpdate () { + _onUpdate () { this.searchParams.id = this.$route.params.id this._debounceGET() }, - _ckOperation(index) { - let breadName ='' + _ckOperation (index) { + let breadName = '' this.breadList.forEach((item, i) => { - if(i<=index) { - breadName = breadName+'/'+item + if (i <= index) { + breadName = breadName + '/' + item } }) this.transferApi(breadName) }, - transferApi(api) { + transferApi (api) { this.getResourceId({ type: 'FILE', fullName: api @@ -174,7 +174,7 @@ this.breadList = dir }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mListConstruction, mConditions, mList, mSpin, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue index 28e5694e38..037591e334 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/createUdfFolder/index.vue @@ -91,7 +91,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/udf`}) + this.$router.push({ path: '/resource/udf' }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -106,7 +106,7 @@ } return true - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue index be6eab4fd7..acfadb1226 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/_source/createUdf.vue @@ -119,11 +119,11 @@ udfResourceList: [], isUpdate: false, upDisabled: false, - normalizer(node) { + normalizer (node) { return { label: node.name } - }, + } } }, props: { @@ -131,19 +131,19 @@ }, methods: { _ok () { - this.$refs['popup'].spinnerLoading = true + this.$refs.popup.spinnerLoading = true if (this._validation()) { this._verifyUdfFuncName().then(res => { this._createUdfFunc().then() }).then(res => { setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) }).catch(e => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }) } else { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false } }, _createUdfFunc () { @@ -166,7 +166,7 @@ param.id = id } // api - this.store.dispatch(`resource/${id ? `updateUdfFunc` : `createUdfFunc`}`, param).then(res => { + this.store.dispatch(`resource/${id ? 'updateUdfFunc' : 'createUdfFunc'}`, param).then(res => { this.$emit('onUpdate', param) this.$message.success(res.msg) resolve() @@ -183,8 +183,8 @@ this.upDisabled = true }, // selTree - selTree(node) { - this.$refs.assignment.receivedValue(node.id,node.fullName) + selTree (node) { + this.$refs.assignment.receivedValue(node.id, node.fullName) }, /** * get udf resources @@ -197,13 +197,13 @@ item = this.filterEmptyDirectory(item) let item1 = _.cloneDeep(res.data) this.diGuiTree(item) - + this.diGuiTree(this.filterJarFile(item1)) - item1 = item1.filter( item => { - if(item.dirctory) { + item1 = item1.filter(item => { + if (item.dirctory) { return item } - }); + }) this.udfResourceList = item this.udfResourceDirList = item1 resolve() @@ -211,13 +211,13 @@ }) }, // filterEmptyDirectory - filterEmptyDirectory(array) { + filterEmptyDirectory (array) { for (const item of array) { if (item.children) { this.filterEmptyDirectory(item.children) } } - return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length==0) || (!/\.jar$/.test(n.name) && n.children.length>0))) + return array.filter(n => ((/\.jar$/.test(n.name) && n.children.length == 0) || (!/\.jar$/.test(n.name) && n.children.length > 0))) }, // filterJarFile filterJarFile (array) { @@ -229,10 +229,10 @@ return array.filter(n => !/\.jar$/.test(n.name)) }, // diGuiTree - diGuiTree(item) { // Recursive convenience tree structure + diGuiTree (item) { // Recursive convenience tree structure item.forEach(item => { - item.children === '' || item.children === undefined || item.children === null || item.children.length === 0?         - delete item.children : this.diGuiTree(item.children); + item.children === '' || item.children === undefined || item.children === null || item.children.length === 0 + ? delete item.children : this.diGuiTree(item.children) }) }, /** @@ -288,7 +288,7 @@ } }) }, - close() { + close () { this.$emit('close') } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue index 346968aca4..00318c69ba 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/function/index.vue @@ -112,15 +112,15 @@ this._debounceGET() }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getUdfFuncListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.udfFuncList = [] this.udfFuncList = res.totalList @@ -144,7 +144,7 @@ mounted () { }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mListConstruction, mConditions, mList, mSpin, mCreateUdf, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue index e12ac9da93..e38c66565b 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue @@ -111,7 +111,7 @@ }, _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) - if(item.directory) { + if (item.directory) { localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` }) } @@ -158,4 +158,4 @@ }, components: { mRename } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue index 6b44bdf6b1..a888cf0bf4 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue @@ -67,12 +67,12 @@ _ok (fn) { this._verification().then(res => { if (this.name === this.item.alias) { - return new Promise((resolve,reject) => { - this.description === this.item.description ? reject({msg:'内容未修改'}) : resolve() + return new Promise((resolve, reject) => { + this.description === this.item.description ? reject({ msg: '内容未修改' }) : resolve() }) - }else{ + } else { return this.store.dispatch('resource/resourceVerifyName', { - fullName: '/'+this.name, + fullName: '/' + this.name, type: 'UDF' }) } @@ -103,7 +103,7 @@ } }) }, - close() { + close () { this.$emit('close') } }, @@ -119,4 +119,4 @@ }, components: { mPopup, mListBoxF } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue index 00f291f0f5..a383286f93 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/index.vue @@ -107,15 +107,15 @@ this._debounceGET() }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getResourcesListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.udfResourcesList = [] this.udfResourcesList = res.totalList @@ -139,7 +139,7 @@ mounted () { }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mListConstruction, mConditions, mList, mSpin, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue index 8a412b36cf..d1f9e0b3a7 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue @@ -112,7 +112,7 @@ }, _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) - if(item.directory) { + if (item.directory) { localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` }) } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/rename.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/rename.vue index a45b2fc4a2..8b1af07ef1 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/rename.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/rename.vue @@ -68,12 +68,12 @@ _ok (fn) { this._verification().then(res => { if (this.name === this.item.alias) { - return new Promise((resolve,reject) => { - this.description === this.item.description ? reject({msg:'内容未修改'}) : resolve() + return new Promise((resolve, reject) => { + this.description === this.item.description ? reject({ msg: '内容未修改' }) : resolve() }) - }else{ + } else { return this.store.dispatch('resource/resourceVerifyName', { - fullName: localStore.getItem('currentDir')+'/'+this.name, + fullName: localStore.getItem('currentDir') + '/' + this.name, type: 'UDF' }) } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue index 8aaf219209..bb72245ac5 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue @@ -88,12 +88,12 @@ mixins: [listUrlParamHandle], props: {}, methods: { - ...mapActions('resource', ['getResourcesListP','getResourceId']), + ...mapActions('resource', ['getResourcesListP', 'getResourceId']), /** * File Upload */ _uploading () { - findComponentDownward(this.$root, 'roof-nav')._resourceChildUpdate('UDF',this.searchParams.id) + findComponentDownward(this.$root, 'roof-nav')._resourceChildUpdate('UDF', this.searchParams.id) }, _onConditions (o) { this.searchParams = _.assign(this.searchParams, o) @@ -116,15 +116,15 @@ this._debounceGET() }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getResourcesListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.udfResourcesList = [] this.udfResourcesList = res.totalList @@ -135,16 +135,16 @@ this.isLoading = false }) }, - _ckOperation(index) { - let breadName ='' + _ckOperation (index) { + let breadName = '' this.breadList.forEach((item, i) => { - if(i<=index) { - breadName = breadName+'/'+item + if (i <= index) { + breadName = breadName + '/' + item } }) this.transferApi(breadName) }, - transferApi(api) { + transferApi (api) { this.getResourceId({ type: 'UDF', fullName: api @@ -175,7 +175,7 @@ this.breadList = dir }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mListConstruction, mConditions, mList, mSpin, mNoData } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfFolder/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfFolder/index.vue index 793621e2c2..773b2d19cc 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfFolder/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfFolder/index.vue @@ -91,7 +91,7 @@ this.$message.success(res.msg) setTimeout(() => { this.spinnerLoading = false - this.$router.push({ path: `/resource/udf/subUdfDirectory/${this.$route.params.id}`}) + this.$router.push({ path: `/resource/udf/subUdfDirectory/${this.$route.params.id}` }) }, 800) }).catch(e => { this.$message.error(e.msg || '') @@ -106,7 +106,7 @@ } return true - }, + } }, watch: {}, created () { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/index.vue index 0679126a9f..d756dd44eb 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/index.vue @@ -24,7 +24,7 @@ import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu' export default { name: 'security-index', - mounted() { + mounted () { }, components: { mSecondaryMenu } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue index a2fcc5ac1f..6ddf25af8a 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue @@ -90,26 +90,26 @@ this.$emit('onUpdate') this.$message.success(res.msg) setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) } let $catch = (e) => { this.$message.error(e.msg || '') - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false } if (this.item) { - this.$refs['popup'].spinnerLoading = true - this.store.dispatch(`security/updateQueueQ`, param).then(res => { + this.$refs.popup.spinnerLoading = true + this.store.dispatch('security/updateQueueQ', param).then(res => { $then(res) }).catch(e => { $catch(e) }) } else { this._verifyName(param).then(() => { - this.$refs['popup'].spinnerLoading = true - this.store.dispatch(`security/createQueueQ`, param).then(res => { + this.$refs.popup.spinnerLoading = true + this.store.dispatch('security/createQueueQ', param).then(res => { $then(res) }).catch(e => { $catch(e) @@ -120,11 +120,11 @@ } }, _verification () { - if (!this.queueName.replace(/\s*/g,"")) { + if (!this.queueName.replace(/\s*/g, '')) { this.$message.warning(`${i18n.$t('Please enter name')}`) return false } - if (!this.queue.replace(/\s*/g,"")) { + if (!this.queue.replace(/\s*/g, '')) { this.$message.warning(`${i18n.$t('Please enter queue value')}`) return false } @@ -132,14 +132,14 @@ }, _verifyName (param) { return new Promise((resolve, reject) => { - this.store.dispatch(`security/verifyQueueQ`, param).then(res => { + this.store.dispatch('security/verifyQueueQ', param).then(res => { resolve() }).catch(e => { reject(e) }) }) }, - close() { + close () { this.$emit('close') } }, @@ -156,4 +156,4 @@ }, components: { mPopup, mListBoxF } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue index 1b19aaab24..6c986497cc 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue @@ -121,15 +121,15 @@ }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getQueueListP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.queueList = [] this.queueList = res.totalList @@ -153,7 +153,7 @@ mounted () { }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mList, mListConstruction, mConditions, mSpin, mNoData, mCreateQueue } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue index a0702a661b..f9d1dcb6bc 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue @@ -78,7 +78,7 @@ queueList: [], queueId: '', tenantCode: '', - description: '', + description: '' } }, props: { @@ -93,7 +93,7 @@ return } // Verify username - this.store.dispatch(`security/verifyName`, { + this.store.dispatch('security/verifyName', { type: 'tenant', tenantCode: this.tenantCode }).then(res => { @@ -121,7 +121,7 @@ }, _verification () { 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')}`) return false } @@ -141,19 +141,19 @@ if (this.item) { 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.$emit('onUpdate') this.$message.success(res.msg) setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) }).catch(e => { this.$message.error(e.msg || '') - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }) }, - close() { + close () { this.$emit('close') } }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue index 50c26f4330..da8bd51568 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/list.vue @@ -59,7 +59,6 @@ \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue index 8932e248fa..ce9ef00749 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue @@ -168,4 +168,4 @@ }, components: { mTransfer } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue index 2ab6ea1407..cc5b1a709e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue @@ -124,15 +124,15 @@ }, _getList (flag) { - if(sessionStorage.getItem('isLeft')==0) { + if (sessionStorage.getItem('isLeft') == 0) { this.isLeft = false } else { this.isLeft = true } this.isLoading = !flag this.getAlertgroupP(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.alertgroupList = [] this.alertgroupList = res.totalList @@ -156,7 +156,7 @@ mounted () { }, beforeDestroy () { - sessionStorage.setItem('isLeft',1) + sessionStorage.setItem('isLeft', 1) }, components: { mList, mListConstruction, mConditions, mSpin, mNoData, mCreateWarning } } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue index 1951b532c6..a5e467fdd5 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/createWorker.vue @@ -79,13 +79,13 @@ this._submit() } }, - 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 valdata = ips.split(','); - for(let i=0;i { + this.$refs.popup.spinnerLoading = true + this.store.dispatch('security/saveWorkerGroups', param).then(res => { this.$emit('onUpdate') this.$message.success(res.msg) setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) }).catch(e => { this.$message.error(e.msg || '') - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }) } }, @@ -148,4 +148,4 @@ display: block; } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue index 733e79ce30..596729c070 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue @@ -82,6 +82,6 @@ this.list = this.workerGroupList }, mounted () {}, - components: {}, + components: {} } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue index 6bbf94c8d7..2b2ca4abcf 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue @@ -100,8 +100,8 @@ _getList (flag) { this.isLoading = !flag this.getWorkerGroups(this.searchParams).then(res => { - if(this.searchParams.pageNo>1 && res.totalList.length == 0) { - this.searchParams.pageNo = this.searchParams.pageNo -1 + if (this.searchParams.pageNo > 1 && res.totalList.length == 0) { + this.searchParams.pageNo = this.searchParams.pageNo - 1 } else { this.workerGroupList = [] this.workerGroupList = res.totalList diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/index.vue index 197f903b35..8219a5f17f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/index.vue @@ -25,8 +25,8 @@ import mSecondaryMenu from '@/module/components/secondaryMenu/secondaryMenu' export default { name: 'user-index', - mounted() { + mounted () { }, components: { mSecondaryMenu } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue index c2ae1ed80f..69796705fb 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/account/index.vue @@ -27,8 +27,8 @@ export default { name: 'account-index', - mounted() { + mounted () { }, components: { mListConstruction, mInfo } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue index 053954a1d7..f195b6f277 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/_source/info.vue @@ -107,7 +107,7 @@ * 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 if (!regPassword.test(this.userPassword)) { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue index 5ec1bb86ce..2ec45785fc 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/password/index.vue @@ -27,8 +27,8 @@ export default { name: 'password-index', - mounted() { + mounted () { }, components: { mListConstruction, mInfo } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue index 5aec68af61..36d8009a6a 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue @@ -89,9 +89,9 @@ tokenLoading: false, auth: !Permissions.getAuth(), pickerOptions: { - disabledDate(time) { - return time.getTime() < Date.now() - 8.64e7 //当前时间以后可以选择当前时间 - }, + disabledDate (time) { + return time.getTime() < Date.now() - 8.64e7 // 当前时间以后可以选择当前时间 + } } } }, @@ -120,21 +120,21 @@ if (this.item) { 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.$emit('onUpdate') this.$message.success(res.msg) setTimeout(() => { - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }, 800) }).catch(e => { this.$message.error(e.msg || '') - this.$refs['popup'].spinnerLoading = false + this.$refs.popup.spinnerLoading = false }) }, _generateToken () { this.tokenLoading = true - this.store.dispatch(`user/generateToken`, { + this.store.dispatch('user/generateToken', { userId: this.userId, expireTime: this.expireTime }).then(res => { @@ -151,7 +151,7 @@ _onChange () { this.token = '' }, - close() { + close () { this.$emit('close') } }, @@ -167,7 +167,7 @@ } } 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'])) d(this.userIdList[0].id) }) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue index 7d92953283..4f9a37316e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue @@ -105,4 +105,4 @@ }, components: { } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue index b46daadfc8..1129aeef9c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/user/pages/token/index.vue @@ -30,7 +30,7 @@