Feature for adding capture version on the deatils page.
This commit is contained in:
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>
|
</Typography>
|
||||||
<Dot />
|
<Dot />
|
||||||
<Typography>
|
<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>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ const useHardwareMonitorsFetch = ({ monitorId, dateRange }) => {
|
|||||||
monitorId: monitorId,
|
monitorId: monitorId,
|
||||||
dateRange: dateRange,
|
dateRange: dateRange,
|
||||||
});
|
});
|
||||||
response.data.data;
|
|
||||||
setMonitor(response.data.data);
|
setMonitor(response.data.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setNetworkError(true);
|
setNetworkError(true);
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ const errorSchema = mongoose.Schema({
|
|||||||
err: { type: String, default: "" },
|
err: { type: String, default: "" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const captureSchema = mongoose.Schema({
|
||||||
|
version: { type: String, default: "" },
|
||||||
|
mode: { type: String, default: "" },
|
||||||
|
});
|
||||||
|
|
||||||
const HardwareCheckSchema = mongoose.Schema(
|
const HardwareCheckSchema = mongoose.Schema(
|
||||||
{
|
{
|
||||||
...BaseCheckSchema.obj,
|
...BaseCheckSchema.obj,
|
||||||
@@ -59,6 +64,11 @@ const HardwareCheckSchema = mongoose.Schema(
|
|||||||
type: [errorSchema],
|
type: [errorSchema],
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
capture: {
|
||||||
|
type: captureSchema,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ class StatusService {
|
|||||||
check.disk = disk ?? {};
|
check.disk = disk ?? {};
|
||||||
check.host = host ?? {};
|
check.host = host ?? {};
|
||||||
check.errors = errors ?? [];
|
check.errors = errors ?? [];
|
||||||
|
check.capture = payload?.capture ?? {};
|
||||||
}
|
}
|
||||||
return check;
|
return check;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user