提交 932fc727 编写于 作者: T Technoboy-

Merge branch 'refactor-worker' of...

Merge branch 'refactor-worker' of github.com:Technoboy-/incubator-dolphinscheduler into refactor-worker
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
mixins: [disabledState], mixins: [disabledState],
props: { props: {
value: { value: {
type: Number, type: String,
default: -1 default: 'default'
} }
}, },
model: { model: {
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<m-priority v-model="taskInstancePriority"></m-priority> <m-priority v-model="taskInstancePriority"></m-priority>
</span> </span>
<span class="text-b">{{$t('Worker group')}}</span> <span class="text-b">{{$t('Worker group')}}</span>
<m-worker-groups v-model="workerGroupId"></m-worker-groups> <m-worker-groups v-model="workerGroup"></m-worker-groups>
</div> </div>
</div> </div>
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
// Task priority // Task priority
taskInstancePriority: 'MEDIUM', taskInstancePriority: 'MEDIUM',
// worker group id // worker group id
workerGroupId: -1 workerGroup: 'default'
} }
}, },
/** /**
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
retryInterval: this.retryInterval, retryInterval: this.retryInterval,
timeout: this.timeout, timeout: this.timeout,
taskInstancePriority: this.taskInstancePriority, taskInstancePriority: this.taskInstancePriority,
workerGroupId: this.workerGroupId workerGroup: this.workerGroup
}, },
fromThis: this fromThis: this
}) })
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
retryInterval: this.retryInterval, retryInterval: this.retryInterval,
timeout: this.timeout, timeout: this.timeout,
taskInstancePriority: this.taskInstancePriority, taskInstancePriority: this.taskInstancePriority,
workerGroupId: this.workerGroupId workerGroup: this.workerGroup
}, },
fromThis: this fromThis: this
}) })
...@@ -522,17 +522,17 @@ ...@@ -522,17 +522,17 @@
// If the workergroup has been deleted, set the default workergroup // If the workergroup has been deleted, set the default workergroup
var hasMatch = false; var hasMatch = false;
for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) { for (let i = 0; i < this.store.state.security.workerGroupsListAll.length; i++) {
var workerGroupId = this.store.state.security.workerGroupsListAll[i].id var workerGroup = this.store.state.security.workerGroupsListAll[i].id
if (o.workerGroupId == workerGroupId) { if (o.workerGroup == workerGroup) {
hasMatch = true; hasMatch = true;
break; break;
} }
} }
if(!hasMatch){ if(!hasMatch){
this.workerGroupId = -1 this.workerGroup = 'default'
}else{ }else{
this.workerGroupId = o.workerGroupId this.workerGroup = o.workerGroup
} }
this.params = o.params || {} this.params = o.params || {}
...@@ -572,7 +572,7 @@ ...@@ -572,7 +572,7 @@
retryInterval: this.retryInterval, retryInterval: this.retryInterval,
timeout: this.timeout, timeout: this.timeout,
taskInstancePriority: this.taskInstancePriority, taskInstancePriority: this.taskInstancePriority,
workerGroupId: this.workerGroupId workerGroup: this.workerGroup
} }
} }
}, },
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<li><span class="tab">{{$t('Complement range')}}</span><span class="content" v-if="startupParam.commandParam && startupParam.commandParam.complementStartDate">{{startupParam.commandParam.complementStartDate}}-{{startupParam.commandParam.complementEndDate}}</span><span class="content" v-else>-</span></li> <li><span class="tab">{{$t('Complement range')}}</span><span class="content" v-if="startupParam.commandParam && startupParam.commandParam.complementStartDate">{{startupParam.commandParam.complementStartDate}}-{{startupParam.commandParam.complementEndDate}}</span><span class="content" v-else>-</span></li>
<li><span class="tab">{{$t('Failure Strategy')}}</span><span class="content">{{startupParam.failureStrategy === 'END' ? $t('End') : $t('Continue')}}</span></li> <li><span class="tab">{{$t('Failure Strategy')}}</span><span class="content">{{startupParam.failureStrategy === 'END' ? $t('End') : $t('Continue')}}</span></li>
<li><span class="tab">{{$t('Process priority')}}</span><span class="content">{{startupParam.processInstancePriority}}</span></li> <li><span class="tab">{{$t('Process priority')}}</span><span class="content">{{startupParam.processInstancePriority}}</span></li>
<li><span class="tab">{{$t('Worker group')}}</span><span class="content" v-if="workerGroupList.length">{{_rtWorkerGroupName(startupParam.workerGroupId)}}</span></li> <li><span class="tab">{{$t('Worker group')}}</span><span class="content" v-if="workerGroupList.length">{{_rtWorkerGroupName(startupParam.workerGroup)}}</span></li>
<li><span class="tab">{{$t('Notification strategy')}}</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li> <li><span class="tab">{{$t('Notification strategy')}}</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li>
<li><span class="tab">{{$t('Notification group')}}</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li> <li><span class="tab">{{$t('Notification group')}}</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li>
<li><span class="tab">{{$t('Recipient')}}</span><span class="content">{{startupParam.receivers || '-'}}</span></li> <li><span class="tab">{{$t('Recipient')}}</span><span class="content">{{startupParam.receivers || '-'}}</span></li>
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
mixins: [disabledState], mixins: [disabledState],
props: { props: {
value: { value: {
type: Number, type: String,
default: -1 default: 'default'
} }
}, },
model: { model: {
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
} }
}) })
if(!result) { if(!result) {
this.value = -1 this.value = 'default'
} }
}, },
methods: { methods: {
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
{{$t('Worker group')}} {{$t('Worker group')}}
</div> </div>
<div class="cont"> <div class="cont">
<m-worker-groups v-model="workerGroupId"></m-worker-groups> <m-worker-groups v-model="workerGroup"></m-worker-groups>
</div> </div>
</div> </div>
<div class="clearfix list"> <div class="clearfix list">
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
receiversCc: [], receiversCc: [],
runMode: 'RUN_MODE_SERIAL', runMode: 'RUN_MODE_SERIAL',
processInstancePriority: 'MEDIUM', processInstancePriority: 'MEDIUM',
workerGroupId: -1 workerGroup: 'default'
} }
}, },
props: { props: {
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
processInstancePriority: this.processInstancePriority, processInstancePriority: this.processInstancePriority,
receivers: this.receivers.join(',') || '', receivers: this.receivers.join(',') || '',
receiversCc: this.receiversCc.join(',') || '', receiversCc: this.receiversCc.join(',') || '',
workerGroupId: this.workerGroupId workerGroup: this.workerGroup
} }
// Executed from the specified node // Executed from the specified node
if (this.sourceType === 'contextmenu') { if (this.sourceType === 'contextmenu') {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
{{$t('Worker group')}} {{$t('Worker group')}}
</div> </div>
<div class="cont"> <div class="cont">
<m-worker-groups v-model="workerGroupId"></m-worker-groups> <m-worker-groups v-model="workerGroup"></m-worker-groups>
</div> </div>
</div> </div>
<div class="clearfix list"> <div class="clearfix list">
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
receiversCc: [], receiversCc: [],
i18n: i18n.globalScope.LOCALE, i18n: i18n.globalScope.LOCALE,
processInstancePriority: 'MEDIUM', processInstancePriority: 'MEDIUM',
workerGroupId: -1, workerGroup: 'default',
previewTimes: [] previewTimes: []
} }
}, },
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
warningGroupId: this.warningGroupId =='' ? 0 : this.warningGroupId, warningGroupId: this.warningGroupId =='' ? 0 : this.warningGroupId,
receivers: this.receivers.join(',') || '', receivers: this.receivers.join(',') || '',
receiversCc: this.receiversCc.join(',') || '', receiversCc: this.receiversCc.join(',') || '',
workerGroupId: this.workerGroupId workerGroup: this.workerGroup
} }
let msg = '' let msg = ''
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
this.failureStrategy = item.failureStrategy this.failureStrategy = item.failureStrategy
this.warningType = item.warningType this.warningType = item.warningType
this.processInstancePriority = item.processInstancePriority this.processInstancePriority = item.processInstancePriority
this.workerGroupId = item.workerGroupId || -1 this.workerGroup = item.workerGroup || 'default'
this._getNotifyGroupList().then(() => { this._getNotifyGroupList().then(() => {
this.$nextTick(() => { this.$nextTick(() => {
// let list = _.filter(this.notifyGroupList, v => v.id === item.warningGroupId) // let list = _.filter(this.notifyGroupList, v => v.id === item.warningGroupId)
......
...@@ -318,14 +318,6 @@ const router = new Router({ ...@@ -318,14 +318,6 @@ const router = new Router({
title: `${i18n.$t('Queue manage')}` title: `${i18n.$t('Queue manage')}`
} }
}, },
{
path: '/security/worker-groups',
name: 'worker-groups-manage',
component: resolve => require(['../pages/security/pages/workerGroups/index'], resolve),
meta: {
title: `${i18n.$t('Worker group manage')}`
}
},
{ {
path: '/security/token', path: '/security/token',
name: 'token-manage', name: 'token-manage',
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
state.tenantId = processInstanceJson.tenantId state.tenantId = processInstanceJson.tenantId
//startup parameters //startup parameters
state.startup = _.assign(state.startup, _.pick(res.data, ['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroupId', 'warningType', 'warningGroupId', 'receivers', 'receiversCc'])) state.startup = _.assign(state.startup, _.pick(res.data, ['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroup', 'warningType', 'warningGroupId', 'receivers', 'receiversCc']))
state.startup.commandParam = JSON.parse(res.data.commandParam) state.startup.commandParam = JSON.parse(res.data.commandParam)
resolve(res.data) resolve(res.data)
......
...@@ -452,7 +452,7 @@ export default { ...@@ -452,7 +452,7 @@ export default {
io.get(`worker-group/all-groups`, payload, res => { io.get(`worker-group/all-groups`, payload, res => {
let list = res.data let list = res.data
list.unshift({ list.unshift({
id: -1, id: 'default',
name: 'Default' name: 'Default'
}) })
state.workerGroupsListAll = list state.workerGroupsListAll = list
......
...@@ -109,15 +109,6 @@ let menu = { ...@@ -109,15 +109,6 @@ let menu = {
icon: 'ans-icon-recycle', icon: 'ans-icon-recycle',
children: [] children: []
}, },
{
name: `${i18n.$t('Worker group manage')}`,
id: 4,
path: 'worker-groups-manage',
isOpen: true,
disabled: true,
icon: 'ans-icon-diary',
children: []
},
{ {
name: `${i18n.$t('Token manage')}`, name: `${i18n.$t('Token manage')}`,
id: 2, id: 2,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册