diff --git a/client/src/Components/Inputs/Search/index.jsx b/client/src/Components/Inputs/Search/index.jsx index a3b75161c..86ce57779 100644 --- a/client/src/Components/Inputs/Search/index.jsx +++ b/client/src/Components/Inputs/Search/index.jsx @@ -155,6 +155,7 @@ const Search = ({ renderOption={(props, option) => { const { key, ...optionProps } = props; const hasSecondaryLabel = secondaryLabel && option[secondaryLabel] !== undefined; + const port = option["port"]; return ( {option[filteredBy] + - (hasSecondaryLabel ? ` (${option[secondaryLabel]})` : "")} + (hasSecondaryLabel + ? ` (${option[secondaryLabel]}${port ? `: ${port}` : ""})` + : "")} ); }} diff --git a/client/src/Pages/Maintenance/CreateMaintenance/index.jsx b/client/src/Pages/Maintenance/CreateMaintenance/index.jsx index 714d57f13..f3754c6b0 100644 --- a/client/src/Pages/Maintenance/CreateMaintenance/index.jsx +++ b/client/src/Pages/Maintenance/CreateMaintenance/index.jsx @@ -137,7 +137,7 @@ const CreateMaintenance = () => { const response = await networkService.getMonitorsByTeamId({ teamId: user.teamId, limit: null, - types: ["http", "ping", "pagespeed"], + types: ["http", "ping", "pagespeed", "port"], }); const monitors = response.data.data.monitors; setMonitors(monitors); diff --git a/server/db/mongo/modules/monitorModuleQueries.js b/server/db/mongo/modules/monitorModuleQueries.js index 0ffaaf6f1..4af3f8985 100755 --- a/server/db/mongo/modules/monitorModuleQueries.js +++ b/server/db/mongo/modules/monitorModuleQueries.js @@ -490,6 +490,7 @@ const buildMonitorsByTeamIdPipeline = ({ matchStage, field, order }) => { _id: 1, name: 1, type: 1, + port: 1, }, }, ];