add util methods

This commit is contained in:
Alex Holliday
2025-06-20 14:27:22 +08:00
parent 0a0c84b7f4
commit d8573be7ac
2 changed files with 21 additions and 0 deletions
+12
View File
@@ -1022,6 +1022,18 @@ class NetworkService {
const { id, notification } = config;
return this.axiosInstance.put(`/notifications/${id}`, notification);
}
async getQueueData() {
return this.axiosInstance.get(`/queue/all-metrics`, {
headers: {
"Content-Type": "application/json",
},
});
}
async flushQueue() {
return this.axiosInstance.post(`/queue/flush`);
}
}
export default NetworkService;
+9
View File
@@ -36,3 +36,12 @@ export const parseDomainName = (url) => {
return url;
};
export const TypeToPathMap = {
http: "uptime",
port: "uptime",
docker: "uptime",
ping: "uptime",
hardware: "infrastructure",
pagespeed: "pagespeed",
};