mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Uptime] Display project ID in monitor management and details page (#140574)
Co-authored-by: Abdul Zahid <awahab07@yahoo.com>
This commit is contained in:
parent
87ed2a12a5
commit
5eea638cea
4 changed files with 23 additions and 1 deletions
|
@ -106,6 +106,10 @@ export const MonitorType = t.intersection([
|
|||
lt: t.string,
|
||||
}),
|
||||
fleet_managed: t.boolean,
|
||||
project: t.type({
|
||||
id: t.string,
|
||||
name: t.string,
|
||||
}),
|
||||
}),
|
||||
]);
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@ export const TAGS_LABEL = i18n.translate('xpack.synthetics.monitorList.table.tag
|
|||
defaultMessage: 'Tags',
|
||||
});
|
||||
|
||||
export const PROJECT_LABEL = i18n.translate('xpack.synthetics.monitorList.table.project.name', {
|
||||
defaultMessage: 'Project ID',
|
||||
});
|
||||
|
||||
export const STATUS_UP_LABEL = i18n.translate('xpack.synthetics.monitorList.statusColumn.upLabel', {
|
||||
defaultMessage: 'Up',
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ import * as labels from '../translations';
|
|||
import { StatusByLocations } from './status_by_location';
|
||||
import { useStatusBar } from './use_status_bar';
|
||||
import { MonitorIDLabel, OverallAvailability } from '../translations';
|
||||
import { TAGS_LABEL, URL_LABEL } from '../../../common/translations';
|
||||
import { PROJECT_LABEL, TAGS_LABEL, URL_LABEL } from '../../../common/translations';
|
||||
import { MonitorLocations } from '../../../../../../common/runtime_types/monitor';
|
||||
import { formatAvailabilityValue } from '../availability_reporting/availability_reporting';
|
||||
import { MonitorRedirects } from './monitor_redirects';
|
||||
|
@ -118,6 +118,12 @@ export const MonitorStatusBar: React.FC = () => {
|
|||
<MonListDescription>
|
||||
<MonitorTags ping={monitorStatus} />
|
||||
</MonListDescription>
|
||||
{monitorStatus?.monitor?.project?.id && (
|
||||
<>
|
||||
<MonListTitle>{PROJECT_LABEL}</MonListTitle>
|
||||
<MonListDescription>{monitorStatus?.monitor?.project.id}</MonListDescription>
|
||||
</>
|
||||
)}
|
||||
<MonitorSSLCertificate tls={monitorStatus?.tls} />
|
||||
<MonitorRedirects monitorStatus={monitorStatus} />
|
||||
</EuiDescriptionList>
|
||||
|
|
|
@ -11,11 +11,13 @@ import {
|
|||
EuiLink,
|
||||
EuiPanel,
|
||||
EuiSpacer,
|
||||
EuiText,
|
||||
} from '@elastic/eui';
|
||||
import { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import React, { useCallback, useContext, useMemo } from 'react';
|
||||
import { useKibana } from '@kbn/kibana-react-plugin/public';
|
||||
import { PROJECT_LABEL } from '../../common/translations';
|
||||
import {
|
||||
CommonFields,
|
||||
ConfigKey,
|
||||
|
@ -157,6 +159,12 @@ export const MonitorManagementList = ({
|
|||
render: (locations: ServiceLocations) =>
|
||||
locations ? <MonitorLocations locations={locations} /> : null,
|
||||
},
|
||||
{
|
||||
align: 'left' as const,
|
||||
field: ConfigKey.PROJECT_ID,
|
||||
name: PROJECT_LABEL,
|
||||
render: (value: string) => (value ? <EuiText size="s">{value}</EuiText> : null),
|
||||
},
|
||||
{
|
||||
align: 'left' as const,
|
||||
field: ConfigKey.SCHEDULE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue