Browse Source

add tenant id in process definition

pull/2/head
lenboo 5 years ago
parent
commit
a67bc60872
  1. 11
      escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
  2. 5
      escheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue
  3. 7
      escheduler-ui/src/js/conf/home/pages/dag/index.vue
  4. 7
      escheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue
  5. 6
      escheduler-ui/src/js/conf/home/store/dag/actions.js
  6. 7
      escheduler-ui/src/js/conf/home/store/dag/mutations.js
  7. 2
      escheduler-ui/src/js/conf/home/store/dag/state.js
  8. 8
      escheduler-ui/src/js/conf/home/store/security/actions.js
  9. 3
      escheduler-ui/src/js/conf/home/store/security/state.js
  10. 1
      escheduler-ui/src/js/module/i18n/locale/en_US.js
  11. 1
      escheduler-ui/src/js/module/i18n/locale/zh_CN.js

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

@ -26,6 +26,10 @@
</div>
</template>
<div class="title" style="padding-top: 6px;">
<span class="text-b">{{$t('select tenant')}}</span>
<form-tenant v-model="tenantId"></form-tenant>
</div>
<div class="title" style="padding-top: 6px;">
<span>超时告警</span>
<span style="padding-left: 6px;">
@ -73,6 +77,7 @@
import mLocalParams from '../formModel/tasks/_source/localParams'
import disabledState from '@/module/mixin/disabledState'
import Affirm from '../jumpAffirm'
import FormTenant from "./_source/selectTenant";
export default {
name: 'udp',
@ -90,6 +95,8 @@
syncDefine: true,
// Timeout alarm
timeout: 0,
tenantId: -1,
// checked Timeout alarm
checkedTimeout: true
}
@ -116,6 +123,7 @@
this.store.commit('dag/setGlobalParams', _.cloneDeep(this.udpList))
this.store.commit('dag/setName', _.cloneDeep(this.name))
this.store.commit('dag/setTimeout', _.cloneDeep(this.timeout))
this.store.commit('dag/setTenantId', _.cloneDeep(this.tenantId))
this.store.commit('dag/setDesc', _.cloneDeep(this.desc))
this.store.commit('dag/setSyncDefine', this.syncDefine)
},
@ -181,9 +189,10 @@
this.syncDefine = dag.syncDefine
this.timeout = dag.timeout || 0
this.checkedTimeout = this.timeout !== 0
this.tenantId = dag.tenantId || -1
},
mounted () {},
components: { mLocalParams }
components: {FormTenant, mLocalParams }
}
</script>

5
escheduler-ui/src/js/conf/home/pages/dag/definitionDetails.vue

@ -26,7 +26,7 @@
methods: {
...mapMutations('dag', ['resetParams', 'setIsDetails']),
...mapActions('dag', ['getProcessList', 'getResourcesList', 'getProcessDetails']),
...mapActions('security', ['getWorkerGroupsAll']),
...mapActions('security', ['getTenantList','getWorkerGroupsAll']),
/**
* init
*/
@ -43,7 +43,8 @@
// get resource
this.getResourcesList(),
// get worker group list
this.getWorkerGroupsAll()
this.getWorkerGroupsAll(),
this.getTenantList()
]).then((data) => {
let item = data[0]
this.setIsDetails(item.releaseState === 'ONLINE')

7
escheduler-ui/src/js/conf/home/pages/dag/index.vue

@ -25,7 +25,7 @@
methods: {
...mapMutations('dag', ['resetParams']),
...mapActions('dag', ['getProcessList', 'getResourcesList']),
...mapActions('security', ['getWorkerGroupsAll']),
...mapActions('security', ['getTenantList','getWorkerGroupsAll']),
/**
* init
*/
@ -40,7 +40,8 @@
// get resource
this.getResourcesList(),
// get worker group list
this.getWorkerGroupsAll()
this.getWorkerGroupsAll(),
this.getTenantList()
]).then((data) => {
this.isLoading = false
// Whether to pop up the box?
@ -65,4 +66,4 @@
},
components: { mDag, mSpin }
}
</script>
</script>

7
escheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue

@ -26,7 +26,7 @@
methods: {
...mapMutations('dag', ['setIsDetails', 'resetParams']),
...mapActions('dag', ['getProcessList', 'getResourcesList', 'getInstancedetail']),
...mapActions('security', ['getWorkerGroupsAll']),
...mapActions('security', ['getTenantList','getWorkerGroupsAll']),
/**
* init
*/
@ -43,7 +43,8 @@
// get resources
this.getResourcesList(),
// get worker group list
this.getWorkerGroupsAll()
this.getWorkerGroupsAll(),
this.getTenantList()
]).then((data) => {
let item = data[0]
let flag = false
@ -92,4 +93,4 @@
},
components: { mDag, mSpin, mVariable }
}
</script>
</script>

6
escheduler-ui/src/js/conf/home/store/dag/actions.js

@ -115,6 +115,7 @@ export default {
// timeout
state.timeout = processDefinitionJson.timeout
state.tenantId = processDefinitionJson.tenantId
resolve(res.data)
}).catch(res => {
reject(res)
@ -146,6 +147,8 @@ export default {
// timeout
state.timeout = processInstanceJson.timeout
state.tenantId = processInstanceJson.tenantId
resolve(res.data)
}).catch(res => {
reject(res)
@ -160,6 +163,7 @@ export default {
let data = {
globalParams: state.globalParams,
tasks: state.tasks,
tenantId: state.tenantId,
timeout: state.timeout
}
io.post(`projects/${state.projectName}/process/save`, {
@ -183,6 +187,7 @@ export default {
let data = {
globalParams: state.globalParams,
tasks: state.tasks,
tenantId: state.tenantId,
timeout: state.timeout
}
io.post(`projects/${state.projectName}/process/update`, {
@ -207,6 +212,7 @@ export default {
let data = {
globalParams: state.globalParams,
tasks: state.tasks,
tenantId: state.tenantId,
timeout: state.timeout
}
io.post(`projects/${state.projectName}/instance/update`, {

7
escheduler-ui/src/js/conf/home/store/dag/mutations.js

@ -58,6 +58,12 @@ export default {
setTimeout (state, payload) {
state.timeout = payload
},
/**
* set tenantId
*/
setTenantId (state, payload) {
state.tenantId = payload
},
/**
* set global params
*/
@ -100,6 +106,7 @@ export default {
state.name = payload && payload.name || ''
state.desc = payload && payload.desc || ''
state.timeout = payload && payload.timeout || 0
state.tenantId = payload && payload.tenantId || -1
state.processListS = payload && payload.processListS || []
state.resourcesListS = payload && payload.resourcesListS || []
state.isDetails = payload && payload.isDetails || false

2
escheduler-ui/src/js/conf/home/store/dag/state.js

@ -31,6 +31,8 @@ export default {
tasks: [],
// Timeout alarm
timeout: 0,
// tenant id
tenantId:-1,
// Node location information
locations: {},
// Node-to-node connection

8
escheduler-ui/src/js/conf/home/store/security/actions.js

@ -240,7 +240,13 @@ export default {
getTenantList ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`tenant/list`, payload, res => {
resolve(res.data)
let list=res.data
list.unshift({
id: -1,
tenantName: 'Default'
})
state.tenantAllList = list
resolve(list)
}).catch(e => {
reject(e)
})

3
escheduler-ui/src/js/conf/home/store/security/state.js

@ -15,5 +15,6 @@
* limitations under the License.
*/
export default {
workerGroupsListAll: []
workerGroupsListAll: [],
tenantAllList : []
}

1
escheduler-ui/src/js/module/i18n/locale/en_US.js

@ -465,4 +465,5 @@ export default {
'task number of ready to kill': '待杀死任务数',
'Statistics manage': 'Statistics manage',
'statistics': 'statistics',
'select tenant':'select tenant',
}

1
escheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -466,4 +466,5 @@ export default {
'task number of ready to kill': '待杀死任务数',
'Statistics manage': '统计管理',
'statistics': '统计',
'select tenant':'选择租户',
}

Loading…
Cancel
Save