|
|
@@ -178,22 +178,9 @@ export default {
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.message)
|
|
|
})
|
|
|
- // this.getData()
|
|
|
this.initWebSocket()
|
|
|
},
|
|
|
methods: {
|
|
|
- getData() {
|
|
|
- this.dataList = []
|
|
|
- getDockerContainerList().then(resp => {
|
|
|
- if (resp.code === 0) {
|
|
|
- this.dataList = resp.data
|
|
|
- } else {
|
|
|
- this.$message.error(resp.msg)
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error(error.message)
|
|
|
- })
|
|
|
- },
|
|
|
getMachineList(env) {
|
|
|
getMachineSessions(env).then(resp => {
|
|
|
if (resp.code === 0) {
|
|
|
@@ -240,12 +227,6 @@ export default {
|
|
|
jsonPayload.ops = 'imageRm'
|
|
|
jsonPayload.payload = imageIds
|
|
|
this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
- /* deleteDockerImages(formData).then(resp => {
|
|
|
- this.$message.info(resp.msg)
|
|
|
- this.onGetImages()
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error(error.message)
|
|
|
- })*/
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
@@ -263,17 +244,13 @@ export default {
|
|
|
formData.append('opsType', 3)
|
|
|
formData.append('containerId', row.containerId)
|
|
|
|
|
|
+ const containerIds = []
|
|
|
+ containerIds.push(row.containerId)
|
|
|
const jsonPayload = {}
|
|
|
jsonPayload.machineId = this.machine
|
|
|
jsonPayload.ops = 'containerRm'
|
|
|
- jsonPayload.payload = row.containerId
|
|
|
+ jsonPayload.payload = containerIds
|
|
|
this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
- /* handleDockerContainer(formData).then(resp => {
|
|
|
- this.$message.info(resp.msg)
|
|
|
- this.getData()
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error(error.message)
|
|
|
- })*/
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
@@ -282,7 +259,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
onRefresh() {
|
|
|
- // this.getData()
|
|
|
const jsonPayload = {}
|
|
|
jsonPayload.machineId = this.machine
|
|
|
jsonPayload.ops = 'containerList'
|
|
|
@@ -292,21 +268,9 @@ export default {
|
|
|
const jsonPayload = {}
|
|
|
jsonPayload.machineId = this.machine
|
|
|
jsonPayload.ops = 'imageList'
|
|
|
- jsonPayload.payload = this.queryInfo
|
|
|
+ jsonPayload.dockerQuery = this.queryInfo
|
|
|
this.sendMessage(JSON.stringify(jsonPayload))
|
|
|
this.showImageDialog = true
|
|
|
-
|
|
|
- /* this.dataList1 = []
|
|
|
- getDockerImageList(this.queryInfo).then(resp => {
|
|
|
- if (resp.code === 0) {
|
|
|
- this.dataList1 = resp.data
|
|
|
- this.showImageDialog = true
|
|
|
- } else {
|
|
|
- this.$message.error(resp.msg)
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error(error.message)
|
|
|
- })*/
|
|
|
},
|
|
|
onSelectChange() {
|
|
|
this.machine = ''
|