@@ -73,7 +73,7 @@
>
>
停止
停止
</el-button>
</el-button>
<el-button slot="reference" type="text" @click="get NotebookInfo(scope.row)">
<el-button slot="reference" type="text" @click="show NotebookInfo(scope.row)">
信息
信息
</el-button>
</el-button>
</template>
</template>
@@ -93,7 +93,7 @@
<notebookInfo
<notebookInfo
v-if="notebookInfoVisible"
v-if="notebookInfoVisible"
:init-info="initInfo "
:notebook-data="notebookData "
@confirm="confirm"
@confirm="confirm"
@cancel="cancel"
@cancel="cancel"
@close="close"
@close="close"
@@ -106,7 +106,7 @@
import notebookCreation from "./notebookCreation.vue"
import notebookCreation from "./notebookCreation.vue"
import notebookInfo from "./notebookInfo.vue"
import notebookInfo from "./notebookInfo.vue"
import searchForm from '@/components/search/index.vue'
import searchForm from '@/components/search/index.vue'
import { getNotebookInfo, getNotebook List, stopNotebook, deleteNotebook, startNotebook } from "@/api/modelDev";
import { getNotebookList, stopNotebook, deleteNotebook, startNotebook } from "@/api/modelDev";
import { parseTime } from '@/utils/index'
import { parseTime } from '@/utils/index'
import { getResourceList } from "@/api/trainingManager"
import { getResourceList } from "@/api/trainingManager"
import { getErrorMsg } from '@/error/index'
import { getErrorMsg } from '@/error/index'
@@ -126,7 +126,7 @@
data() {
data() {
return {
return {
row: {},
row: {},
initInfo: "" ,
notebookData: {} ,
notebookVisible: false,
notebookVisible: false,
notebookInfoVisible: false,
notebookInfoVisible: false,
total: undefined,
total: undefined,
@@ -277,45 +277,9 @@
});
});
});
});
},
},
getNotebookInfo(row) {
getNotebookInfo(row.id).then(response => {
if (response.success) {
this.notebookInfoVisible = true
const notebookDialogString = response.payload.notebook.initInfo ? response.payload.notebook.initInfo.replace(/\n/g, "<br>") : ''
const notebookDialogData = JSON.parse(notebookDialogString)
for (const pid in notebookDialogData['podEvents']) {
const eventList = notebookDialogData['podEvents'][pid]
const roleName = notebookDialogData['podRoleName'][pid]
if (roleName == "") {
continue
}
let message = ""
for (const key in eventList) {
const event = eventList[key]
if (event['reason'] == "" && event['message'] == "") {
continue
}
message += "[" + event['reason'] + "]" + "<br>"
message += event['message'] + "<br><br>"
}
for (const key in notebookDialogData['extras']) {
const event = notebookDialogData['extras'][key]
if (event['reason'] == "" && event['message'] == "") {
continue
}
message += "[" + event['reason'] + "]" + "<br>"
message += event['message'] + "<br><br>"
}
message += "<br>"
this.initInfo = message
}
} else {
this.$message({
message: this.getErrorMsg(response.error.subcode),
type: 'warning'
})
}
})
showNotebookInfo(row) {
this.notebookInfoVisible = true
this.notebookData = row
},
},
handleStop(row) {
handleStop(row) {
stopNotebook(row.id).then(response => {
stopNotebook(row.id).then(response => {
@@ -368,19 +332,16 @@
close(val) {
close(val) {
this.notebookVisible = val;
this.notebookVisible = val;
this.notebookInfoVisible = val;
this.notebookInfoVisible = val;
this.initInfo = ""
this.getNotebookList(this.searchData);
this.getNotebookList(this.searchData);
},
},
cancel(val) {
cancel(val) {
this.notebookVisible = val;
this.notebookVisible = val;
this.notebookInfoVisible = val;
this.notebookInfoVisible = val;
this.initInfo = ""
this.getNotebookList(this.searchData);
this.getNotebookList(this.searchData);
},
},
confirm(val) {
confirm(val) {
this.notebookVisible = val
this.notebookVisible = val
this.notebookInfoVisible = val;
this.notebookInfoVisible = val;
this.initInfo = ""
this.getNotebookList(this.searchData);
this.getNotebookList(this.searchData);
}
}
}
}