2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
import{h as t}from"./index-CwVkcMR-.js";const n={getAlerts:async e=>t.get("/alerts",e),getRules:async()=>t.get("/alerts/rules"),createRule:async e=>t.post("/alerts/rules",e),updateRule:async(e,s)=>t.put(`/alerts/rules/${e}`,s),deleteRule:async e=>t.delete(`/alerts/rules/${e}`),batchDeleteRules:async e=>t.delete("/alerts/rules/batch-delete",{ids:e}),toggleRule:async e=>t.post(`/alerts/rules/${e}/toggle`),acknowledge:async e=>t.post(`/alerts/${e}/ack`),getNotifyChannels:async()=>t.get("/alerts/notify-channels"),createNotifyChannel:async e=>t.post("/alerts/notify-channels",e),updateNotifyChannel:async(e,s)=>t.put(`/alerts/notify-channels/${e}`,s),deleteNotifyChannel:async e=>t.delete(`/alerts/notify-channels/${e}`),testNotifyChannel:async e=>t.post(`/alerts/notify-channels/${e}/test`),getContacts:async()=>t.get("/alerts/contacts"),createContact:async e=>t.post("/alerts/contacts",e),updateContact:async(e,s)=>t.put(`/alerts/contacts/${e}`,s),deleteContact:async e=>t.delete(`/alerts/contacts/${e}`),getContactGroups:async()=>t.get("/alerts/contact-groups"),createContactGroup:async e=>t.post("/alerts/contact-groups",e),updateContactGroup:async(e,s)=>t.put(`/alerts/contact-groups/${e}`,s),deleteContactGroup:async e=>t.delete(`/alerts/contact-groups/${e}`)},c={getAlerts:async e=>t.get("/alerts",e),getRules:async()=>t.get("/alerts/rules"),getChannels:async()=>t.get("/alerts/notify-channels"),acknowledge:async e=>t.post(`/alerts/${e}/ack`),resolve:async e=>t.post(`/alerts/${e}/ack`),getSilences:async e=>t.get("/alerts/silences",e),createSilence:async e=>t.post("/alerts/silences",e),updateSilence:async(e,s)=>t.put(`/alerts/silences/${e}`,s),deleteSilence:async e=>t.delete(`/alerts/silences/${e}`),toggleSilence:async e=>t.post(`/alerts/silences/${e}/toggle`),toggleRule:async e=>t.post(`/alerts/rules/${e}/toggle`),createRule:async e=>t.post("/alerts/rules",e),deleteRule:async e=>t.delete(`/alerts/rules/${e}`),quickSetup:async(e="ecs")=>t.post("/alerts/quick-setup",{type:e})},o={getStats:async()=>t.get("/site/stats"),getTasks:async()=>t.get("/site/tasks"),createTask:async e=>t.post("/site/tasks",e),deleteTask:async e=>t.delete(`/site/tasks/${e}`),toggleTask:async(e,s)=>t.put(`/site/tasks/${e}`,{enabled:s})},l={getTraces:async e=>({data:[],total:0}),getServices:async e=>({data:[],total:0}),getTraceDetail:async e=>({data:{spans:[]}})},u={getDashboards:async()=>({data:[],total:0}),getDatasources:async()=>({data:[],total:0}),createDashboard:async e=>({success:!1}),updateDashboard:async(e,s)=>({success:!1}),deleteDashboard:async e=>({success:!1}),createDatasource:async e=>({success:!1})},p={list:()=>t.get("/prometheus-datasources"),get:e=>t.get(`/prometheus-datasources/${e}`),create:e=>t.post("/prometheus-datasources",e),update:(e,s)=>t.put(`/prometheus-datasources/${e}`,s),delete:e=>t.delete(`/prometheus-datasources/${e}`),setDefault:e=>t.post(`/prometheus-datasources/${e}/default`),testConnection:e=>t.post("/prometheus-datasources/test",e)},d={list:()=>t.get("/zabbix-datasources"),get:e=>t.get(`/zabbix-datasources/${e}`),create:e=>t.post("/zabbix-datasources",e),update:(e,s)=>t.put(`/zabbix-datasources/${e}`,s),delete:e=>t.delete(`/zabbix-datasources/${e}`),setDefault:e=>t.post(`/zabbix-datasources/${e}/default`),testConnection:e=>t.post("/zabbix-datasources/test",e)},i={getTargets:e=>t.get("/metrics/targets",e),getNames:()=>t.get("/metrics/names"),query:e=>t.get("/metrics/query",e)},g={getStats:()=>t.get("/snmp/stats"),getDevices:()=>t.get("/snmp/devices"),createDevice:e=>t.post("/snmp/devices",e),deleteDevice:e=>t.delete(`/snmp/devices/${e}`)},y={connect:e=>t.post("/prometheus/connect",{url:e}),dashboard:(e,s)=>t.post("/prometheus/dashboard",{url:e,type:s})},h={connect:(e,s,a)=>t.post("/zabbix/connect",{url:e,username:s,password:a})};export{n as a,c as b,g as c,u as d,y as e,h as f,i as m,p,o as s,l as t,d as z};
|