mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-05 11:50:25 +08:00
增加健康检查定时任务/健康检查可以发送消息
This commit is contained in:
@@ -6,20 +6,20 @@ import (
|
|||||||
"github.com/iwind/TeaGo/actions"
|
"github.com/iwind/TeaGo/actions"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HealthRunAction struct {
|
type HealthRunPopupAction struct {
|
||||||
actionutils.ParentAction
|
actionutils.ParentAction
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HealthRunAction) Init() {
|
func (this *HealthRunPopupAction) Init() {
|
||||||
this.Nav("", "", "")
|
this.Nav("", "", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HealthRunAction) RunGet(params struct{}) {
|
func (this *HealthRunPopupAction) RunGet(params struct{}) {
|
||||||
|
|
||||||
this.Show()
|
this.Show()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HealthRunAction) RunPost(params struct {
|
func (this *HealthRunPopupAction) RunPost(params struct {
|
||||||
ClusterId int64
|
ClusterId int64
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
@@ -14,7 +14,7 @@ func init() {
|
|||||||
Prefix("/clusters/cluster/settings").
|
Prefix("/clusters/cluster/settings").
|
||||||
GetPost("", new(IndexAction)).
|
GetPost("", new(IndexAction)).
|
||||||
GetPost("/health", new(HealthAction)).
|
GetPost("/health", new(HealthAction)).
|
||||||
GetPost("/healthRun", new(HealthRunAction)).
|
GetPost("/healthRunPopup", new(HealthRunPopupAction)).
|
||||||
EndAll()
|
EndAll()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ Tea.context(function () {
|
|||||||
|
|
||||||
this.run = function () {
|
this.run = function () {
|
||||||
teaweb.confirm("确定要对当前集群下的所有节点进行健康检查吗?", function () {
|
teaweb.confirm("确定要对当前集群下的所有节点进行健康检查吗?", function () {
|
||||||
teaweb.popup("/clusters/cluster/settings/healthRun?clusterId=" + this.clusterId, {
|
teaweb.popup("/clusters/cluster/settings/healthRunPopup?clusterId=" + this.clusterId, {
|
||||||
|
height: "25em"
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>节点</th>
|
<th>节点</th>
|
||||||
<th>结果</th>
|
<th>结果</th>
|
||||||
<th>耗时</th>
|
<th nowrap="">耗时</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="result in results">
|
<tr v-for="result in results">
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Tea.context(function () {
|
Tea.context(function () {
|
||||||
this.success = NotifyPopup
|
this.success = NotifyPopup
|
||||||
|
|
||||||
this.isRequesting = false
|
this.isRequesting = true
|
||||||
this.results = []
|
this.results = []
|
||||||
this.countSuccess = 0
|
this.countSuccess = 0
|
||||||
this.countFail = 0
|
this.countFail = 0
|
||||||
Reference in New Issue
Block a user