charts
This commit is contained in:
1 parent
8a1fc94c31
commit
29fbf0a362
11 files changed
+587
-20
No files matched your search
@@ -18,6 +18,16 @@ export const getStatusColor = (status: MonitorStatus, theme: any): string => {
|
||||
return statusColors[status];
|
||||
};
|
||||
|
||||
export const getResponseTimeColor = (responseTime: number): PaletteKey => {
|
||||
if (responseTime < 200) {
|
||||
return "success";
|
||||
} else if (responseTime < 300) {
|
||||
return "warning";
|
||||
} else {
|
||||
return "error";
|
||||
}
|
||||
};
|
||||
|
||||
export const formatUrl = (url: string, maxLength: number = 55) => {
|
||||
if (!url) return "";
|
||||
|
||||
|
||||
Reference in new issue
Block a user