Feat/monitor endpoint refactor (#463)
* Moved all methods to modules * removed old mongoDB file * Refactored endpoints to take query params, removed duplicate methods, updated routes, updated Client queries * Added comment * Add model differentiation * Add sort order, fix minor bug, add validation for query params
This commit is contained in:
1 parent
e47d3685ce
commit
477cad7cc9
11 files changed
+132
-166
No files matched your search
@@ -100,6 +100,9 @@ const Monitors = () => {
|
||||
: "var(--env-var-color-19)",
|
||||
};
|
||||
|
||||
// Reverse checks so latest check is on the right
|
||||
const reversedChecks = monitor.checks.slice().reverse();
|
||||
|
||||
return {
|
||||
id: monitor._id,
|
||||
handleClick: () => navigate(`/monitors/${monitor._id}`),
|
||||
@@ -117,7 +120,7 @@ const Monitors = () => {
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ id: idx + 2, data: <ResponseTimeChart checks={monitor.checks} /> },
|
||||
{ id: idx + 2, data: <ResponseTimeChart checks={reversedChecks} /> },
|
||||
{ id: idx + 3, data: monitor.type },
|
||||
{ id: idx + 4, data: "TODO" },
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user