Commit 9e05e5b9 authored by 智勇's avatar 智勇
parents 077b7acb 188854a5
......@@ -8,7 +8,7 @@
</el-select>
</el-form-item>
<el-form-item label="服务名" prop="mysqlName">
<el-select v-model="temp.mysqlName" placeholder="此环境下拥有两个数据库服务,请选择" filterable clearable style="width: 300px">
<el-select v-model="temp.mysqlName" placeholder="请选择数据库环境" filterable clearable style="width: 300px">
<el-option v-for="item in sqlList" :value="item.serviceName" :label="item.serviceName" :key="item.serviceName" />
</el-select>
</el-form-item>
......@@ -89,6 +89,9 @@ export default {
created() {
this.temp.namespace = this.$route.query.namespace === undefined ? '' : this.$route.query.namespace
this.getNamespace()
if (this.temp.namespace !== '') {
this.getMysql()
}
this.getDBName()
},
methods: {
......@@ -96,6 +99,7 @@ export default {
this.$router.go(-1)
},
getMysql() {
this.temp.mysqlName = ''
fetchK8sdetail({ 'namespace': this.temp.namespace }).then(res => {
const servicelist = res.data.services
const mysqlList = servicelist.filter((item) => {
......
......@@ -581,7 +581,7 @@ export default {
})
},
restartService(data) {
redeployClusterService({ namespace: this.namespace, podName: data.podName }).then(res => {
redeployClusterService({ namespace: this.namespace, podName: data.podName, serviceName: data.serviceName }).then(res => {
this.$message({
type: 'success',
message: `服务${data.serviceName}重置成功!`
......
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