Feature for adding capture version on the deatils page.

This commit is contained in:
Owaise Imdad committed 2025-06-08 00:13:47 +05:30
1 parent 9c921896fd
commit ccc9faa892
4 files changed
+20 -2

No files matched your search

@@ -36,7 +36,15 @@ const MonitorStatusHeader = ({ path, isLoading = false, isAdmin, monitor }) => {
</Typography>
<Dot />
<Typography>
Checking every {formatDurationRounded(monitor?.interval)}.
Checking every {formatDurationRounded(monitor?.interval)}{" "}
{monitor?.stats?.aggregateData?.latestCheck?.capture?.version && (
<>
{" "}
with Capture agent{" "}
{monitor.stats.aggregateData.latestCheck.capture.version}
</>
)}
.
</Typography>
</Stack>
</Stack>
@@ -17,7 +17,6 @@ const useHardwareMonitorsFetch = ({ monitorId, dateRange }) => {
monitorId: monitorId,
dateRange: dateRange,
});
response.data.data;
setMonitor(response.data.data);
} catch (error) {
setNetworkError(true);
+10
View File
@@ -35,6 +35,11 @@ const errorSchema = mongoose.Schema({
err: { type: String, default: "" },
});
const captureSchema = mongoose.Schema({
version: { type: String, default: "" },
mode: { type: String, default: "" },
});
const HardwareCheckSchema = mongoose.Schema(
{
...BaseCheckSchema.obj,
@@ -59,6 +64,11 @@ const HardwareCheckSchema = mongoose.Schema(
type: [errorSchema],
default: () => [],
},
capture: {
type: captureSchema,
default: () => ({}),
},
},
{ timestamps: true }
);
+1
View File
@@ -254,6 +254,7 @@ class StatusService {
check.disk = disk ?? {};
check.host = host ?? {};
check.errors = errors ?? [];
check.capture = payload?.capture ?? {};
}
return check;
};