_id -> id
This commit is contained in:
1 parent
c0e4893f96
commit
c1b2bda623
3 files changed
+10
-7
No files matched your search
@@ -150,7 +150,9 @@ const IncidentTable = ({
|
|||||||
{
|
{
|
||||||
id: "monitorName",
|
id: "monitorName",
|
||||||
content: t("incidentsTableMonitorName"),
|
content: t("incidentsTableMonitorName"),
|
||||||
render: (row) => monitors[row.monitorId]?.name ?? "N/A",
|
render: (row) => {
|
||||||
|
return monitors?.[row.metadata?.monitorId]?.name || "N/A";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "status",
|
id: "status",
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ const OptionsHeader = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
console.log(monitors);
|
||||||
const monitorNames = typeof monitors !== "undefined" ? Object.values(monitors) : [];
|
const monitorNames = typeof monitors !== "undefined" ? Object.values(monitors) : [];
|
||||||
const filterOptions = [
|
const filterOptions = [
|
||||||
{ _id: "all", name: t("incidentsOptionsHeaderFilterAll") },
|
{ id: "all", name: t("incidentsOptionsHeaderFilterAll") },
|
||||||
{ _id: "down", name: t("incidentsOptionsHeaderFilterDown") },
|
{ id: "down", name: t("incidentsOptionsHeaderFilterDown") },
|
||||||
{ _id: "resolve", name: t("incidentsOptionsHeaderFilterCannotResolve") },
|
{ id: "resolve", name: t("incidentsOptionsHeaderFilterCannotResolve") },
|
||||||
{ _id: "resolved", name: t("incidentsOptionsHeaderFilterResolved") },
|
{ id: "resolved", name: t("incidentsOptionsHeaderFilterResolved") },
|
||||||
];
|
];
|
||||||
|
|
||||||
// The stacks below which are three in number have the same style so
|
// The stacks below which are three in number have the same style so
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ const Checks = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const monitorLookup = monitors?.reduce((acc, monitor) => {
|
const monitorLookup = monitors?.reduce((acc, monitor) => {
|
||||||
acc[monitor._id] = {
|
acc[monitor.id] = {
|
||||||
_id: monitor._id,
|
id: monitor.id,
|
||||||
name: monitor.name,
|
name: monitor.name,
|
||||||
type: monitor.type,
|
type: monitor.type,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user