Loading escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/localParams.vue +46 −27 Original line number Diff line number Diff line Loading @@ -11,13 +11,14 @@ :placeholder="$t('prop(required)')" maxlength="64" @on-blur="_verifProp()" style="width: 164px;"> :style="inputStyle"> </x-input> <template v-if="hide"> <x-select style="width: 80px;" @change="_handleDirectChanged" v-model="localParamsList[$index].direct" :disabled="isDetails || !hide"> :disabled="isDetails"> <x-option v-for="city in directList" :key="city.code" Loading @@ -29,7 +30,7 @@ style="width: 118px;" @change="_handleTypeChanged" v-model="localParamsList[$index].type" :disabled="isDetails || !hide"> :disabled="isDetails"> <x-option v-for="city in typeList" :key="city.code" Loading @@ -37,6 +38,7 @@ :label="city.code"> </x-option> </x-select> </template> <x-input :disabled="isDetails" type="text" Loading @@ -44,7 +46,7 @@ :placeholder="$t('value(optional)')" maxlength="64" @on-blur="_handleValue()" style="width: 150px;position: relative;margin-bottom: -2px;"> :style="inputStyle"> </x-input> <span class="lt-add"> <a href="javascript:" style="color:red;" @click="!isDetails && _removeUdp($index)" > Loading @@ -57,7 +59,7 @@ </a> </span> </div> <span class="add" v-if="!localParamsList.length"> <span class="add-dp" v-if="!localParamsList.length"> <a href="javascript:" @click="!isDetails && _addUdp()" > <i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i> </a> Loading Loading @@ -173,6 +175,11 @@ created () { this.localParamsList = this.udpList }, computed: { inputStyle () { return `width:${this.hide ? 160 : 262}px` } }, mounted () { }, components: { } Loading @@ -197,6 +204,7 @@ } .add { a { color: #000; .iconfont { font-size: 18px; vertical-align: middle; Loading @@ -205,5 +213,16 @@ } } } .add-dp{ a { color: #0097e0; .iconfont { font-size: 18px; vertical-align: middle; display: inline-block; margin-top: 2px; } } } } </style> escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +3 −9 Original line number Diff line number Diff line Loading @@ -668,26 +668,21 @@ JSP.prototype.saveStore = function () { /** * Event processing */ JSP.prototype.handleEvent = function () { this.JspInstance.bind('beforeDrop', function (info) { let sourceId = info['sourceId']// 出 let targetId = info['targetId']// 入 /** * Recursive search for nodes */ let recursiveVal const recursiveTargetarr = (arr, targetId) => { for (var i in arr) { for (let i in arr) { if (arr[i] === targetId) { recursiveVal = targetId } else { let recTargetarrArr = rtTargetarrArr(arr[i]) if (recTargetarrArr.length) { recursiveTargetarr(recTargetarrArr, targetId) } else { return recursiveTargetarr(targetId) } recursiveTargetarr(rtTargetarrArr(arr[i]), targetId) } } return recursiveVal Loading @@ -700,7 +695,6 @@ JSP.prototype.handleEvent = function () { // Recursive form to find if the target Targetarr has a sourceId if (recursiveTargetarr(rtTargetarrArr(sourceId), targetId)) { // setRecursiveVal(null) return false } Loading escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import store from '@/conf/home/store' * Node, to array */ const rtTargetarrArr = (id) => { let a = $(`#${id}`).attr('data-targetarr') return a ? a.split(',') : [] let ids = $(`#${id}`).attr('data-targetarr') return ids ? ids.split(',') : [] } /** Loading escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue +10 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ <style lang="scss" rel="stylesheet/scss"> .udp-model { width: 616px; min-height: 326px; width: 624px; min-height: 420px; background: #fff; border-radius: 3px; padding:20px 0 ; Loading Loading @@ -182,6 +182,14 @@ } .content { padding-bottom: 50px; .user-def-params-model { .add { a { color: #0097e0; } } } } } </style> escheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue +34 −8 Original line number Diff line number Diff line <template> <div class="variable-model"> <template v-if="list"> <div class="list"> <div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('Global parameters')}}</b></div> <div class="var-cont"> <x-button size="xsmall" type="ghost" v-for="(item,$index) in list.globalParams" @click="_copy('gbudp-' + $index)" :data-clipboard-text="item.prop + ' = ' +item.value" :class="'gbudp-' + $index"><b style="color: #2A455B;">{{item.prop}}</b> = {{item.value}}</x-button> <template v-for="(item,$index) in list.globalParams"> <x-button size="xsmall" type="ghost" @click="_copy('gbudp-' + $index)" :data-clipboard-text="item.prop + ' = ' +item.value" :class="'gbudp-' + $index"> <b style="color: #2A455B;">{{item.prop}}</b> = {{item.value}} </x-button> </template> </div> </div> <div class="list" style="height: 30px;"> Loading @@ -14,14 +24,24 @@ </div> <div class="list list-t" v-for="(item,key,$index) in list.localParams"> <div class="task-name">Task({{$index}}):{{key}}</div> <div class="var-cont" v-if="item.length"> <template v-for="(el,index) in item"> <x-button size="xsmall" type="ghost" @click="_copy('copy-part-' + index)" :data-clipboard-text="_rtClipboard(el)" :class="'copy-part-' + index"> <span v-for="(e,k,i) in el"><b style="color: #2A455B;">{{k}}</b> = {{e}} </span> <div class="var-cont" v-if="item.localParamsList.length"> <template v-for="(el,index) in item.localParamsList"> <x-button size="xsmall" type="ghost" @click="_copy('copy-part-' + index)" :data-clipboard-text="_rtClipboard(el,item.taskType)" :class="'copy-part-' + index"> <span v-for="(e,k,i) in el"> <template v-if="item.taskType === 'SQL' || item.taskType === 'PROCEDURE'"> <template v-if="(k !== 'direct' && k !== 'type')"> <b style="color: #2A455B;">{{k}}</b> = {{e}} </template> </template> <template v-else> <b style="color: #2A455B;">{{k}}</b> = {{e}} </template> </span> </x-button> </template> </div> </div> </template> </div> </template> <script> Loading Loading @@ -71,10 +91,16 @@ /** * Copyed text processing */ _rtClipboard (el) { _rtClipboard (el, taskType) { let arr = [] Object.keys(el).forEach((key) => { if (taskType === 'SQL' || taskType === 'PROCEDURE') { if (key !== 'direct' && key !== 'type') { arr.push(`${key}=${el[key]}`) } } else { arr.push(`${key}=${el[key]}`) } }) return arr.join(' ') } Loading Loading
escheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/localParams.vue +46 −27 Original line number Diff line number Diff line Loading @@ -11,13 +11,14 @@ :placeholder="$t('prop(required)')" maxlength="64" @on-blur="_verifProp()" style="width: 164px;"> :style="inputStyle"> </x-input> <template v-if="hide"> <x-select style="width: 80px;" @change="_handleDirectChanged" v-model="localParamsList[$index].direct" :disabled="isDetails || !hide"> :disabled="isDetails"> <x-option v-for="city in directList" :key="city.code" Loading @@ -29,7 +30,7 @@ style="width: 118px;" @change="_handleTypeChanged" v-model="localParamsList[$index].type" :disabled="isDetails || !hide"> :disabled="isDetails"> <x-option v-for="city in typeList" :key="city.code" Loading @@ -37,6 +38,7 @@ :label="city.code"> </x-option> </x-select> </template> <x-input :disabled="isDetails" type="text" Loading @@ -44,7 +46,7 @@ :placeholder="$t('value(optional)')" maxlength="64" @on-blur="_handleValue()" style="width: 150px;position: relative;margin-bottom: -2px;"> :style="inputStyle"> </x-input> <span class="lt-add"> <a href="javascript:" style="color:red;" @click="!isDetails && _removeUdp($index)" > Loading @@ -57,7 +59,7 @@ </a> </span> </div> <span class="add" v-if="!localParamsList.length"> <span class="add-dp" v-if="!localParamsList.length"> <a href="javascript:" @click="!isDetails && _addUdp()" > <i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i> </a> Loading Loading @@ -173,6 +175,11 @@ created () { this.localParamsList = this.udpList }, computed: { inputStyle () { return `width:${this.hide ? 160 : 262}px` } }, mounted () { }, components: { } Loading @@ -197,6 +204,7 @@ } .add { a { color: #000; .iconfont { font-size: 18px; vertical-align: middle; Loading @@ -205,5 +213,16 @@ } } } .add-dp{ a { color: #0097e0; .iconfont { font-size: 18px; vertical-align: middle; display: inline-block; margin-top: 2px; } } } } </style>
escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/jsPlumbHandle.js +3 −9 Original line number Diff line number Diff line Loading @@ -668,26 +668,21 @@ JSP.prototype.saveStore = function () { /** * Event processing */ JSP.prototype.handleEvent = function () { this.JspInstance.bind('beforeDrop', function (info) { let sourceId = info['sourceId']// 出 let targetId = info['targetId']// 入 /** * Recursive search for nodes */ let recursiveVal const recursiveTargetarr = (arr, targetId) => { for (var i in arr) { for (let i in arr) { if (arr[i] === targetId) { recursiveVal = targetId } else { let recTargetarrArr = rtTargetarrArr(arr[i]) if (recTargetarrArr.length) { recursiveTargetarr(recTargetarrArr, targetId) } else { return recursiveTargetarr(targetId) } recursiveTargetarr(rtTargetarrArr(arr[i]), targetId) } } return recursiveVal Loading @@ -700,7 +695,6 @@ JSP.prototype.handleEvent = function () { // Recursive form to find if the target Targetarr has a sourceId if (recursiveTargetarr(rtTargetarrArr(sourceId), targetId)) { // setRecursiveVal(null) return false } Loading
escheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import store from '@/conf/home/store' * Node, to array */ const rtTargetarrArr = (id) => { let a = $(`#${id}`).attr('data-targetarr') return a ? a.split(',') : [] let ids = $(`#${id}`).attr('data-targetarr') return ids ? ids.split(',') : [] } /** Loading
escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue +10 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,8 @@ <style lang="scss" rel="stylesheet/scss"> .udp-model { width: 616px; min-height: 326px; width: 624px; min-height: 420px; background: #fff; border-radius: 3px; padding:20px 0 ; Loading Loading @@ -182,6 +182,14 @@ } .content { padding-bottom: 50px; .user-def-params-model { .add { a { color: #0097e0; } } } } } </style>
escheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue +34 −8 Original line number Diff line number Diff line <template> <div class="variable-model"> <template v-if="list"> <div class="list"> <div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('Global parameters')}}</b></div> <div class="var-cont"> <x-button size="xsmall" type="ghost" v-for="(item,$index) in list.globalParams" @click="_copy('gbudp-' + $index)" :data-clipboard-text="item.prop + ' = ' +item.value" :class="'gbudp-' + $index"><b style="color: #2A455B;">{{item.prop}}</b> = {{item.value}}</x-button> <template v-for="(item,$index) in list.globalParams"> <x-button size="xsmall" type="ghost" @click="_copy('gbudp-' + $index)" :data-clipboard-text="item.prop + ' = ' +item.value" :class="'gbudp-' + $index"> <b style="color: #2A455B;">{{item.prop}}</b> = {{item.value}} </x-button> </template> </div> </div> <div class="list" style="height: 30px;"> Loading @@ -14,14 +24,24 @@ </div> <div class="list list-t" v-for="(item,key,$index) in list.localParams"> <div class="task-name">Task({{$index}}):{{key}}</div> <div class="var-cont" v-if="item.length"> <template v-for="(el,index) in item"> <x-button size="xsmall" type="ghost" @click="_copy('copy-part-' + index)" :data-clipboard-text="_rtClipboard(el)" :class="'copy-part-' + index"> <span v-for="(e,k,i) in el"><b style="color: #2A455B;">{{k}}</b> = {{e}} </span> <div class="var-cont" v-if="item.localParamsList.length"> <template v-for="(el,index) in item.localParamsList"> <x-button size="xsmall" type="ghost" @click="_copy('copy-part-' + index)" :data-clipboard-text="_rtClipboard(el,item.taskType)" :class="'copy-part-' + index"> <span v-for="(e,k,i) in el"> <template v-if="item.taskType === 'SQL' || item.taskType === 'PROCEDURE'"> <template v-if="(k !== 'direct' && k !== 'type')"> <b style="color: #2A455B;">{{k}}</b> = {{e}} </template> </template> <template v-else> <b style="color: #2A455B;">{{k}}</b> = {{e}} </template> </span> </x-button> </template> </div> </div> </template> </div> </template> <script> Loading Loading @@ -71,10 +91,16 @@ /** * Copyed text processing */ _rtClipboard (el) { _rtClipboard (el, taskType) { let arr = [] Object.keys(el).forEach((key) => { if (taskType === 'SQL' || taskType === 'PROCEDURE') { if (key !== 'direct' && key !== 'type') { arr.push(`${key}=${el[key]}`) } } else { arr.push(`${key}=${el[key]}`) } }) return arr.join(' ') } Loading