2021-05-19 19:03:03 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.$delay(function () {
|
|
|
|
|
teaweb.datepicker("day-from-picker")
|
|
|
|
|
teaweb.datepicker("day-to-picker")
|
|
|
|
|
})
|
2021-10-15 12:54:23 +08:00
|
|
|
|
|
|
|
|
this.updateRead = function (logId) {
|
|
|
|
|
this.$post(".readLogs")
|
|
|
|
|
.params({
|
|
|
|
|
logIds: [logId]
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.updatePageRead = function () {
|
|
|
|
|
let logIds = this.logs.map(function (v) {
|
|
|
|
|
return v.id
|
|
|
|
|
})
|
2022-03-23 17:31:53 +08:00
|
|
|
this.$post(".readLogs")
|
|
|
|
|
.params({
|
|
|
|
|
logIds: logIds
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-25 18:27:15 +08:00
|
|
|
this.updateNodeRead = function (nodeId) {
|
|
|
|
|
this.$post(".readLogs")
|
|
|
|
|
.params({
|
|
|
|
|
nodeId: nodeId
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-23 17:31:53 +08:00
|
|
|
this.updateAllRead = function () {
|
|
|
|
|
this.$post(".readAllLogs")
|
|
|
|
|
.params({})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.changeCluster = function (clusterId) {
|
|
|
|
|
this.clusterId = clusterId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.fixLog = function (logId) {
|
2022-03-25 09:32:35 +08:00
|
|
|
this.$post(".fix")
|
2022-03-23 17:31:53 +08:00
|
|
|
.params({
|
|
|
|
|
logIds: [logId]
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.fixPageLogs = function () {
|
|
|
|
|
let logIds = this.logs.map(function (v) {
|
|
|
|
|
return v.id
|
|
|
|
|
})
|
|
|
|
|
teaweb.confirm("确定已修复并消除当前页的问题?", function () {
|
|
|
|
|
this.$post(".fix")
|
2021-11-15 11:31:54 +08:00
|
|
|
.params({
|
|
|
|
|
logIds: logIds
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-23 17:31:53 +08:00
|
|
|
this.fixAllLogs = function () {
|
|
|
|
|
teaweb.confirm("确定已修复并消除所有的问题?", function () {
|
|
|
|
|
this.$post(".fixAll")
|
2021-11-15 11:31:54 +08:00
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
2021-10-15 12:54:23 +08:00
|
|
|
}
|
2023-03-09 16:20:09 +08:00
|
|
|
|
|
|
|
|
this.deleteLogs = function () {
|
|
|
|
|
teaweb.confirm("确定要删除当前关键词\"" + this.searchedKeyword + "\"匹配的" + this.countLogs + "个运行日志?", function () {
|
|
|
|
|
this.$post(".deleteAll")
|
|
|
|
|
.params({
|
|
|
|
|
dayFrom: this.dayFrom,
|
|
|
|
|
dayTo: this.dayTo,
|
|
|
|
|
keyword: this.keyword,
|
|
|
|
|
level: this.level,
|
|
|
|
|
type: this.type,
|
|
|
|
|
tag: this.tag,
|
|
|
|
|
clusterId: this.clusterId,
|
|
|
|
|
nodeId: this.nodeId
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2021-05-19 19:03:03 +08:00
|
|
|
})
|