Skip to content

Commit

Permalink
Refactor MonitorResourceUtil and MonitorChart components
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Oct 28, 2024
1 parent df08f2b commit 809f9a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Common/Server/Utils/Monitor/MonitorResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,13 +653,18 @@ export default class MonitorResourceUtil {
}
}

if ((data.dataToProcess as ProbeMonitorResponse).customCodeMonitorResponse?.executionTimeInMS) {
if (
(data.dataToProcess as ProbeMonitorResponse).customCodeMonitorResponse
?.executionTimeInMS
) {
const monitorMetricsByMinute: MonitorMetricsByMinute =
new MonitorMetricsByMinute();
monitorMetricsByMinute.monitorId = data.monitorId;
monitorMetricsByMinute.projectId = data.projectId;
monitorMetricsByMinute.metricType = CheckOn.ExecutionTime;
monitorMetricsByMinute.metricValue = (data.dataToProcess as ProbeMonitorResponse).customCodeMonitorResponse?.executionTimeInMS
monitorMetricsByMinute.metricValue = (
data.dataToProcess as ProbeMonitorResponse
).customCodeMonitorResponse?.executionTimeInMS;
monitorMetricsByMinute.miscData = {
probeId: (
data.dataToProcess as ProbeMonitorResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,7 @@ export class MonitorCharts {
},
},
};
} else if(
data.checkOn === CheckOn.ExecutionTime
){
} else if (data.checkOn === CheckOn.ExecutionTime) {
return {
legend: "Execution Time (in ms)",
options: {
Expand Down

0 comments on commit 809f9a3

Please sign in to comment.