未验证 提交 949b8ef1 编写于 作者: X xingchun-chen 提交者: GitHub

Merge pull request #2354 from break60/dev

Corrections to historical jar packages and resource data 
...@@ -218,6 +218,19 @@ ...@@ -218,6 +218,19 @@
}, },
mixins: [disabledState], mixins: [disabledState],
methods: { methods: {
/**
* getResourceId
*/
marjarId(name) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+name
}).then(res => {
this.mainJar = res.id
}).catch(e => {
this.$message.error(e.msg || '')
})
},
/** /**
* return localParams * return localParams
*/ */
...@@ -366,7 +379,13 @@ ...@@ -366,7 +379,13 @@
// Non-null objects represent backfill // Non-null objects represent backfill
if (!_.isEmpty(o)) { if (!_.isEmpty(o)) {
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
this.mainJar = o.params.mainJar && o.params.mainJar.id ? o.params.mainJar.id : '' 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.deployMode = o.params.deployMode || ''
this.slot = o.params.slot || 1 this.slot = o.params.slot || 1
this.taskManager = o.params.taskManager || '2' this.taskManager = o.params.taskManager || '2'
...@@ -380,8 +399,19 @@ ...@@ -380,8 +399,19 @@
// backfill resourceList // backfill resourceList
let resourceList = o.params.resourceList || [] let resourceList = o.params.resourceList || []
if (resourceList.length) { if (resourceList.length) {
this.resourceList = _.map(resourceList, v => { _.map(resourceList, v => {
return v.id if(v.res) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+v.res
}).then(res => {
this.resourceList.push(res.id)
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
this.resourceList.push(v.id)
}
}) })
this.cacheResourceList = resourceList this.cacheResourceList = resourceList
} }
......
...@@ -142,6 +142,19 @@ ...@@ -142,6 +142,19 @@
}, },
mixins: [disabledState], mixins: [disabledState],
methods: { methods: {
/**
* getResourceId
*/
marjarId(name) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+name
}).then(res => {
this.mainJar = res.id
}).catch(e => {
this.$message.error(e.msg || '')
})
},
/** /**
* return localParams * return localParams
*/ */
...@@ -245,7 +258,13 @@ ...@@ -245,7 +258,13 @@
// Non-null objects represent backfill // Non-null objects represent backfill
if (!_.isEmpty(o)) { if (!_.isEmpty(o)) {
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
this.mainJar = o.params.mainJar.id || '' 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.mainArgs = o.params.mainArgs || ''
this.others = o.params.others this.others = o.params.others
this.programType = o.params.programType || 'JAVA' this.programType = o.params.programType || 'JAVA'
...@@ -253,8 +272,19 @@ ...@@ -253,8 +272,19 @@
// backfill resourceList // backfill resourceList
let resourceList = o.params.resourceList || [] let resourceList = o.params.resourceList || []
if (resourceList.length) { if (resourceList.length) {
this.resourceList = _.map(resourceList, v => { _.map(resourceList, v => {
return v.id if(v.res) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+v.res
}).then(res => {
this.resourceList.push(res.id)
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
this.resourceList.push(v.id)
}
}) })
this.cacheResourceList = resourceList this.cacheResourceList = resourceList
} }
......
...@@ -176,8 +176,19 @@ ...@@ -176,8 +176,19 @@
// backfill resourceList // backfill resourceList
let resourceList = o.params.resourceList || [] let resourceList = o.params.resourceList || []
if (resourceList.length) { if (resourceList.length) {
this.resourceList = _.map(resourceList, v => { _.map(resourceList, v => {
return v.id if(v.res) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+v.res
}).then(res => {
this.resourceList.push(res.id)
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
this.resourceList.push(v.id)
}
}) })
this.cacheResourceList = resourceList this.cacheResourceList = resourceList
} }
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
return { return {
label: node.name label: node.name
} }
}, }
} }
}, },
mixins: [disabledState], mixins: [disabledState],
...@@ -238,12 +238,22 @@ ...@@ -238,12 +238,22 @@
// backfill resourceList // backfill resourceList
let resourceList = o.params.resourceList || [] let resourceList = o.params.resourceList || []
if (resourceList.length) { if (resourceList.length) {
this.resourceList = _.map(resourceList, v => { _.map(resourceList, v => {
return v.id if(v.res) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+v.res
}).then(res => {
this.resourceList.push(res.id)
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
this.resourceList.push(v.id)
}
}) })
this.cacheResourceList = resourceList this.cacheResourceList = resourceList
} }
// backfill localParams // backfill localParams
let localParams = o.params.localParams || [] let localParams = o.params.localParams || []
if (localParams.length) { if (localParams.length) {
......
...@@ -261,6 +261,19 @@ ...@@ -261,6 +261,19 @@
}, },
mixins: [disabledState], mixins: [disabledState],
methods: { methods: {
/**
* getResourceId
*/
marjarId(name) {
this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+name
}).then(res => {
this.mainJar = res.id
}).catch(e => {
this.$message.error(e.msg || '')
})
},
/** /**
* return localParams * return localParams
*/ */
...@@ -414,7 +427,13 @@ ...@@ -414,7 +427,13 @@
// Non-null objects represent backfill // Non-null objects represent backfill
if (!_.isEmpty(o)) { if (!_.isEmpty(o)) {
this.mainClass = o.params.mainClass || '' this.mainClass = o.params.mainClass || ''
this.mainJar = o.params.mainJar && o.params.mainJar.id ? o.params.mainJar.id : '' 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.deployMode = o.params.deployMode || ''
this.driverCores = o.params.driverCores || 1 this.driverCores = o.params.driverCores || 1
this.driverMemory = o.params.driverMemory || '512M' this.driverMemory = o.params.driverMemory || '512M'
...@@ -429,9 +448,20 @@ ...@@ -429,9 +448,20 @@
// backfill resourceList // backfill resourceList
let resourceList = o.params.resourceList || [] let resourceList = o.params.resourceList || []
if (resourceList.length) { if (resourceList.length) {
this.resourceList = _.map(resourceList, v => { _.map(resourceList, v => {
return v.id if(v.res) {
}) this.store.dispatch('dag/getResourceId',{
type: 'FILE',
fullName: '/'+v.res
}).then(res => {
this.resourceList.push(res.id)
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
this.resourceList.push(v.id)
}
})
this.cacheResourceList = resourceList this.cacheResourceList = resourceList
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<th scope="col" width="50"> <th scope="col" width="50">
<x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox> <x-checkbox @on-change="_topCheckBoxClick" v-model="checkAll"></x-checkbox>
</th> </th>
<th scope="col"> <th scope="col" width="30">
<span>{{$t('#')}}</span> <span>{{$t('#')}}</span>
</th> </th>
<th scope="col" width="70"> <th scope="col" width="70">
......
...@@ -715,5 +715,14 @@ export default { ...@@ -715,5 +715,14 @@ export default {
reject(e) reject(e)
}) })
}) })
} },
} getResourceId ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`resources/queryResource`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
}
\ No newline at end of file
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
'SQL Type': 'sql类型', 'SQL Type': 'sql类型',
'Title': '主题', 'Title': '主题',
'Please enter the title of email': '请输入邮件主题', 'Please enter the title of email': '请输入邮件主题',
'Table': '', 'Table': '',
'Attachment': '附件', 'Attachment': '附件',
'SQL Parameter': 'sql参数', 'SQL Parameter': 'sql参数',
'SQL Statement': 'sql语句', 'SQL Statement': 'sql语句',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册