Commit 44d71725 authored by kewei.jia's avatar kewei.jia

pipeline 功能修改 增加机器人和显示创建者

parent 48195e22
......@@ -29,8 +29,8 @@ export function deleteApplication(data) {
}
export function updateApplication(data) {
return request({
url: '/manage/application',
method: 'put',
url: '/pipeline/save',
method: 'post',
data
})
}
......
......@@ -31,6 +31,7 @@
</el-table-column>
<el-table-column prop="new_user" label="创建者" align="center"/>
<el-table-column prop="update_user" label="更新者" align="center"/>
<el-table-column prop="create_time" label="创建时间" align="center"/>
<el-table-column :label="$t('table.actions')" align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -212,11 +213,18 @@ export default {
}
})
}
getMaster({ name: repo }).then(res => {
// 拿出gitlab地址信息
const gitlabAddress = this.screen(repo, this.repos)
getMaster({ name: repo, gitlabAddress }).then(res => {
if (res.data.code === '0001') {
console.log('无法获取分支')
this.$notify({
title: 'error',
message: '因权限问题,获取分支失败',
type: 'error',
duration: 2000
})
} else {
this.$set(this.refs, repo, res.data.data.map(item => {
this.$set(this.refs, repo, res.data.map(item => {
return {
id: item.commit.id,
name: item.name
......@@ -227,7 +235,14 @@ export default {
}
})
},
screen(name, list) {
const data = list.filter(item => {
if (name === item.project_name) {
return item
}
})
return data[0].git_lab
},
createData() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
......@@ -270,7 +285,6 @@ export default {
},
handleUpdate(row) {
console.log(row)
this.temp = Object.assign({}, row) // copy obj
this.dialogStatus = '编辑'
this.dialogFormVisible = true
......@@ -280,13 +294,12 @@ export default {
return s1.project_name.localeCompare(s2.project_name)
})
this.listLoading = false
})
row.repos.forEach(item => {
this.getRefs(item.repository)
row.repos.forEach(item => {
this.getRefs(item.repository)
})
})
},
handleDelete(row) {
console.log(row)
this.temp = row
this.dialogDeleteVisible = true
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment