11import { SearchLayout } from "@flanksource-ui/ui/Layout/SearchLayout" ;
2+ import IncidentDetailsPageSkeletonLoader from "@flanksource-ui/ui/SkeletonLoader/IncidentDetailsPageSkeletonLoader" ;
23import clsx from "clsx" ;
34import { useAtom } from "jotai" ;
45import { ReactNode } from "react" ;
@@ -9,6 +10,7 @@ import { Head } from "../../ui/Head";
910import { refreshButtonClickedTrigger } from "../../ui/SlidingSideBar/SlidingSideBar" ;
1011import TabbedLinks from "../../ui/Tabs/TabbedLinks" ;
1112import { ErrorBoundary } from "../ErrorBoundary" ;
13+ import { TopologyCard } from "../Topology/TopologyCard" ;
1214import { useConfigDetailsTabs } from "./ConfigTabsLinks" ;
1315import ConfigSidebar from "./Sidebar/ConfigSidebar" ;
1416
@@ -69,21 +71,31 @@ export function ConfigDetailsTabs({
6971 loading = { isLoading }
7072 contentClass = "p-0 h-full overflow-y-hidden"
7173 >
72- < div className = { `flex h-full flex-row` } >
73- < div className = "flex flex-1 flex-col" >
74- < TabbedLinks
75- activeTabName = { activeTabName }
76- tabLinks = { configTabList }
77- contentClassName = { clsx (
78- "bg-white border border-t-0 border-gray-300 flex-1 overflow-y-auto" ,
79- className
74+ { isLoadingConfig ? (
75+ < IncidentDetailsPageSkeletonLoader />
76+ ) : (
77+ < div className = { `flex h-full flex-row bg-gray-100` } >
78+ < div className = "flex flex-1 flex-col" >
79+ { configItem ?. components && configItem . components . length === 1 && (
80+ < div className = "flex w-full flex-row items-center justify-between p-4" >
81+ < TopologyCard topology = { configItem . components [ 0 ] } />
82+ </ div >
8083 ) }
81- >
82- < ErrorBoundary > { children } </ ErrorBoundary >
83- </ TabbedLinks >
84+
85+ < TabbedLinks
86+ activeTabName = { activeTabName }
87+ tabLinks = { configTabList }
88+ contentClassName = { clsx (
89+ "bg-white border border-t-0 border-gray-300 flex-1 overflow-y-auto" ,
90+ className
91+ ) }
92+ >
93+ < ErrorBoundary > { children } </ ErrorBoundary >
94+ </ TabbedLinks >
95+ </ div >
96+ < ConfigSidebar />
8497 </ div >
85- < ConfigSidebar />
86- </ div >
98+ ) }
8799 </ SearchLayout >
88100 </ >
89101 ) ;
0 commit comments