diff --git a/web/src/api/prometheus.ts b/web/src/api/prometheus.ts index 08c71c5dfc34147ef33ac114082b0e2781c4bb51..a5367c1203a91c0457611e3240038ebaa2267d35 100644 --- a/web/src/api/prometheus.ts +++ b/web/src/api/prometheus.ts @@ -53,7 +53,7 @@ export function addConfigRule(data: object) { // 编辑告警告警规则 export function updateConfigRule(data: object) { return request({ - url: "/alert/update", + url: " /plugin/prometheus/ruleUpdate", method: "post", data, }); @@ -63,7 +63,7 @@ export function updateConfigRule(data: object) { // 删除告警告警规则 export function delConfigRule(data: { id: number }) { return request({ - url: "/alert/delete", + url: "/plugin/prometheus/ruleDelete", method: "get", params: data, }); diff --git a/web/src/router/index.ts b/web/src/router/index.ts index f425bf0f022c1bc3176b0225d77baef780fa370a..e3c4d0a5afc8bcdd2e488a21dc0c4ff9cb081162 100644 --- a/web/src/router/index.ts +++ b/web/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router' import HomeView from '../views/HomeView.vue' import RuleList from '../views/ruleList.vue' +import AlertList from '../views/alertList.vue' const routes: Array = [ { @@ -13,6 +14,11 @@ const routes: Array = [ name: 'rule', component: RuleList }, + { + path: '/alert', + name: 'alert', + component: AlertList + }, ] const router = createRouter({ diff --git a/web/src/views/alertList.vue b/web/src/views/alertList.vue new file mode 100644 index 0000000000000000000000000000000000000000..526f7c03cf40d687326e1d50129db93427acb840 --- /dev/null +++ b/web/src/views/alertList.vue @@ -0,0 +1,157 @@ + + + + +