feat: Add onViewPage function to Metrics component

This commit is contained in:
Simon Larsen 2024-05-08 16:48:44 +01:00
parent f84bec7e66
commit b5407b47b2
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA

View File

@ -6,6 +6,7 @@ import DashboardNavigation from '../../../../../Utils/Navigation';
import Navigation from 'CommonUI/src/Utils/Navigation';
import ObjectID from 'Common/Types/ObjectID';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import Route from 'Common/Types/API/Route';
const ServiceDelete: FunctionComponent<PageComponentProps> = (
_props: PageComponentProps
@ -30,11 +31,14 @@ const ServiceDelete: FunctionComponent<PageComponentProps> = (
description:
'Metrics are the individual data points that make up a service. They are the building blocks of a service and represent the work done by a single service.',
}}
onViewPage={async (_item: Metric)=>{
return Promise.resolve(new Route(""));
}}
query={{
projectId: DashboardNavigation.getProjectId(),
serviceId: modelId,
}}
showViewIdButton={true}
showViewIdButton={false}
noItemsMessage={'No metrics found for this service.'}
showRefreshButton={true}
viewPageRoute={Navigation.getCurrentRoute()}