IP阈值动作增加WebHook

This commit is contained in:
刘祥超
2021-09-14 15:27:54 +08:00
parent ed2d577be0
commit 8db6a33e15
3 changed files with 44 additions and 41 deletions

View File

@@ -41,23 +41,7 @@ Vue.component("node-ip-address-thresholds-view", {
"code": "gte"
}
],
allActions: [
{
"name": "上线",
"code": "up",
"description": "上线当前IP。"
},
{
"name": "下线",
"code": "down",
"description": "下线当前IP。"
},
{
"name": "通知",
"code": "notify",
"description": "发送已达到阈值通知。"
}
]
allActions: window.IP_ADDR_THRESHOLD_ACTIONS
}
},
methods: {
@@ -123,6 +107,7 @@ Vue.component("node-ip-address-thresholds-view", {
->
<span v-for="(action, actionIndex) in threshold.actions">{{actionName(action.action)}}
<span v-if="action.action == 'switch'">到{{action.options.ips.join(", ")}}</span>
<span v-if="action.action == 'webHook'" class="small grey">({{action.options.url}})</span>
&nbsp;<span v-if="actionIndex != threshold.actions.length - 1" style="font-style: italic">AND &nbsp;</span></span>
</div>
</div>