Merge pull request #2335 from sonvir249/feature/show-port-monitors
Show port monitors with port numbers.
This commit is contained in:
3 files changed
+6
-2
No files matched your search
@@ -155,6 +155,7 @@ const Search = ({
|
|||||||
renderOption={(props, option) => {
|
renderOption={(props, option) => {
|
||||||
const { key, ...optionProps } = props;
|
const { key, ...optionProps } = props;
|
||||||
const hasSecondaryLabel = secondaryLabel && option[secondaryLabel] !== undefined;
|
const hasSecondaryLabel = secondaryLabel && option[secondaryLabel] !== undefined;
|
||||||
|
const port = option["port"];
|
||||||
return (
|
return (
|
||||||
<ListItem
|
<ListItem
|
||||||
key={key}
|
key={key}
|
||||||
@@ -169,7 +170,9 @@ const Search = ({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{option[filteredBy] +
|
{option[filteredBy] +
|
||||||
(hasSecondaryLabel ? ` (${option[secondaryLabel]})` : "")}
|
(hasSecondaryLabel
|
||||||
|
? ` (${option[secondaryLabel]}${port ? `: ${port}` : ""})`
|
||||||
|
: "")}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ const CreateMaintenance = () => {
|
|||||||
const response = await networkService.getMonitorsByTeamId({
|
const response = await networkService.getMonitorsByTeamId({
|
||||||
teamId: user.teamId,
|
teamId: user.teamId,
|
||||||
limit: null,
|
limit: null,
|
||||||
types: ["http", "ping", "pagespeed"],
|
types: ["http", "ping", "pagespeed", "port"],
|
||||||
});
|
});
|
||||||
const monitors = response.data.data.monitors;
|
const monitors = response.data.data.monitors;
|
||||||
setMonitors(monitors);
|
setMonitors(monitors);
|
||||||
|
|||||||
@@ -490,6 +490,7 @@ const buildMonitorsByTeamIdPipeline = ({ matchStage, field, order }) => {
|
|||||||
_id: 1,
|
_id: 1,
|
||||||
name: 1,
|
name: 1,
|
||||||
type: 1,
|
type: 1,
|
||||||
|
port: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in new issue
Block a user