diff --git a/src/Components/Assets/AssetManage.tsx b/src/Components/Assets/AssetManage.tsx index b7197dd0562..661043ba697 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/Components/Assets/AssetManage.tsx @@ -503,6 +503,10 @@ const AssetManage = (props: AssetManageProps) => { Availability History + } + parentClassNames="mt-8 flex w-full flex-col bg-white p-4 shadow-sm sm:rounded-lg" /> )}
Service History
diff --git a/src/Components/Common/Uptime.tsx b/src/Components/Common/Uptime.tsx index e7272e2e1f4..4b12a13bd17 100644 --- a/src/Components/Common/Uptime.tsx +++ b/src/Components/Common/Uptime.tsx @@ -169,6 +169,9 @@ export default function Uptime( props: Readonly<{ route: QueryRoute>; params?: Record; + header?: React.ReactNode; + parentClassNames?: string; + centerInfoPanel?: boolean; }> ) { const [summary, setSummary] = useState<{ @@ -191,6 +194,8 @@ export default function Uptime( setNumDays(Math.min(newNumDays, 100)); }; + const centerInfoPanel = props.centerInfoPanel ?? false; + const setUptimeRecord = (records: AvailabilityRecord[]): void => { const recordsByDayBefore: { [key: number]: AvailabilityRecord[] } = {}; @@ -361,10 +366,10 @@ export default function Uptime( ); } else if (summary) { return ( -
-
+
+
-
Availability History
+ {props.header}
@@ -407,15 +412,13 @@ export default function Uptime( }`} >
- {hoveredDay === index && ( - <> - - + {hoveredDay === index && !centerInfoPanel && ( + )} ); @@ -432,7 +435,7 @@ export default function Uptime(
{hoveredDay !== -1 && ( -
+
import("../Common/Loading")); @@ -19,6 +20,7 @@ interface Props { } interface LocationProps extends LocationModel { + facilityId: string; setShowDeletePopup: (e: { open: boolean; name: string; id: string }) => void; } @@ -109,7 +111,11 @@ export default function LocationManagement({ facilityId }: Props) { className="my-8 grid gap-3 @4xl:grid-cols-2 @6xl:grid-cols-3 @[100rem]:grid-cols-4 lg:mx-8"> {(item) => ( - + )}
@@ -208,6 +214,7 @@ const Location = ({ modified_date, id, setShowDeletePopup, + facilityId, }: LocationProps) => (
@@ -241,6 +248,16 @@ const Location = ({ > {middleware_address || "-"}

+ + Middleware Uptime +

+ } + centerInfoPanel + />
>(), }, - getFacilityAssetLocationAvailability: { + listFacilityAssetLocationAvailability: { path: "/api/v1/facility/{facility_external_id}/asset_location/{external_id}/availability/", method: "GET", TRes: Type>(),