add util methods
This commit is contained in:
1 parent
0a0c84b7f4
commit
d8573be7ac
2 files changed
+21
No files matched your search
@@ -1022,6 +1022,18 @@ class NetworkService {
|
|||||||
const { id, notification } = config;
|
const { id, notification } = config;
|
||||||
return this.axiosInstance.put(`/notifications/${id}`, notification);
|
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;
|
export default NetworkService;
|
||||||
|
|||||||
@@ -36,3 +36,12 @@ export const parseDomainName = (url) => {
|
|||||||
|
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const TypeToPathMap = {
|
||||||
|
http: "uptime",
|
||||||
|
port: "uptime",
|
||||||
|
docker: "uptime",
|
||||||
|
ping: "uptime",
|
||||||
|
hardware: "infrastructure",
|
||||||
|
pagespeed: "pagespeed",
|
||||||
|
};
|
||||||
Reference in new issue
Block a user