|
@@ -68,16 +68,6 @@
|
|
|
width="210"
|
|
width="210"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- @click="handleStart(scope.$index, scope.row)"
|
|
|
|
|
- >启动</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="danger"
|
|
|
|
|
- @click="handleStop(scope.$index, scope.row)"
|
|
|
|
|
- >停止</el-button>
|
|
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="danger"
|
|
type="danger"
|
|
@@ -263,40 +253,6 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleStart(index, row) {
|
|
|
|
|
- const formData = new FormData()
|
|
|
|
|
- formData.append('opsType', 1)
|
|
|
|
|
- formData.append('containerId', row.containerId)
|
|
|
|
|
-
|
|
|
|
|
- const jsonPayload = {}
|
|
|
|
|
- jsonPayload.machineId = this.machine
|
|
|
|
|
- jsonPayload.ops = 'containerStart'
|
|
|
|
|
- jsonPayload.payload = row.containerId
|
|
|
|
|
- this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
|
|
- /* handleDockerContainer(formData).then(resp => {
|
|
|
|
|
- this.$message.info(resp.msg)
|
|
|
|
|
- this.getData()
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
- this.$message.error(error.message)
|
|
|
|
|
- })*/
|
|
|
|
|
- },
|
|
|
|
|
- handleStop(index, row) {
|
|
|
|
|
- const formData = new FormData()
|
|
|
|
|
- formData.append('opsType', 2)
|
|
|
|
|
- formData.append('containerId', row.containerId)
|
|
|
|
|
-
|
|
|
|
|
- const jsonPayload = {}
|
|
|
|
|
- jsonPayload.machineId = this.machine
|
|
|
|
|
- jsonPayload.ops = 'containerStop'
|
|
|
|
|
- jsonPayload.payload = row.containerId
|
|
|
|
|
- this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
|
|
- /* handleDockerContainer(formData).then(resp => {
|
|
|
|
|
- this.$message.info(resp.msg)
|
|
|
|
|
- this.getData()
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
- this.$message.error(error.message)
|
|
|
|
|
- })*/
|
|
|
|
|
- },
|
|
|
|
|
handleDelete(index, row) {
|
|
handleDelete(index, row) {
|
|
|
this.$confirm('确定要删除选择的容器?', '提示', {
|
|
this.$confirm('确定要删除选择的容器?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -330,13 +286,15 @@ export default {
|
|
|
const jsonPayload = {}
|
|
const jsonPayload = {}
|
|
|
jsonPayload.machineId = this.machine
|
|
jsonPayload.machineId = this.machine
|
|
|
jsonPayload.ops = 'containerList'
|
|
jsonPayload.ops = 'containerList'
|
|
|
- // this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
|
|
|
|
+ this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
},
|
|
},
|
|
|
onGetImages() {
|
|
onGetImages() {
|
|
|
const jsonPayload = {}
|
|
const jsonPayload = {}
|
|
|
jsonPayload.machineId = this.machine
|
|
jsonPayload.machineId = this.machine
|
|
|
jsonPayload.ops = 'imageList'
|
|
jsonPayload.ops = 'imageList'
|
|
|
|
|
+ jsonPayload.payload = this.queryInfo
|
|
|
this.sendMessage(JSON.stringify(jsonPayload))
|
|
this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
|
|
+ this.showImageDialog = true
|
|
|
|
|
|
|
|
/* this.dataList1 = []
|
|
/* this.dataList1 = []
|
|
|
getDockerImageList(this.queryInfo).then(resp => {
|
|
getDockerImageList(this.queryInfo).then(resp => {
|
|
@@ -416,8 +374,10 @@ export default {
|
|
|
processMessage(message) {
|
|
processMessage(message) {
|
|
|
const ops = message.ops
|
|
const ops = message.ops
|
|
|
if (ops === 'containerList') {
|
|
if (ops === 'containerList') {
|
|
|
|
|
+ this.dataList = []
|
|
|
this.dataList = message.resultList
|
|
this.dataList = message.resultList
|
|
|
} else if (ops === 'imageList') {
|
|
} else if (ops === 'imageList') {
|
|
|
|
|
+ this.dataList1 = []
|
|
|
this.dataList1 = message.resultList
|
|
this.dataList1 = message.resultList
|
|
|
} else {
|
|
} else {
|
|
|
console.log(message)
|
|
console.log(message)
|