diff --git a/App/FeatureSet/Dashboard/src/App.tsx b/App/FeatureSet/Dashboard/src/App.tsx index 67a3dd5a3a..86347016f4 100644 --- a/App/FeatureSet/Dashboard/src/App.tsx +++ b/App/FeatureSet/Dashboard/src/App.tsx @@ -92,6 +92,15 @@ const ExceptionsRoutes: React.LazyExoticComponent< }; }); }); +const ProfilesRoutes: React.LazyExoticComponent< + AllRoutesModule["ProfilesRoutes"] +> = lazy(() => { + return import("./Routes/AllRoutes").then((m: AllRoutesModule) => { + return { + default: m.ProfilesRoutes, + }; + }); +}); const IncidentsRoutes: React.LazyExoticComponent< AllRoutesModule["IncidentsRoutes"] > = lazy(() => { @@ -507,6 +516,12 @@ const App: () => JSX.Element = () => { element={} /> + {/* Profiles */} + } + /> + {/* Monitors */} = ( } return ( -
- -
- {multiQueryConfigs.length === 0 && ( -

- No additional queries yet. Add one to overlay multiple metrics - on the same chart. -

- )} +
+ {multiQueryConfigs.map( + (queryConfig: MetricQueryConfigData, index: number) => { + return ( +
+
+ + Query {index + 2} + +
+ { + const updated: Array = [ + ...multiQueryConfigs, + ]; + updated[index] = data; + setMultiQueryConfigs(updated); + setComponent({ + ...component, + arguments: { + ...((component.arguments as JSONObject) || {}), + metricQueryConfigs: updated as any, + }, + }); + }} + /> +
+ ); + }, + )} - {multiQueryConfigs.map( - (queryConfig: MetricQueryConfigData, index: number) => { - return ( -
-
- - Query {index + 2} - -
- { - const updated: Array = [ - ...multiQueryConfigs, - ]; - updated[index] = data; - setMultiQueryConfigs(updated); - setComponent({ - ...component, - arguments: { - ...((component.arguments as JSONObject) || {}), - metricQueryConfigs: updated as any, - }, - }); - }} - /> -
- ); +
- + }; + const updated: Array = [ + ...multiQueryConfigs, + newQuery, + ]; + setMultiQueryConfigs(updated); + setComponent({ + ...component, + arguments: { + ...((component.arguments as JSONObject) || {}), + metricQueryConfigs: updated as any, + }, + }); + }} + />
); }; @@ -392,18 +376,19 @@ const ArgumentsForm: FunctionComponent = ( variant="bordered" defaultCollapsed={shouldCollapse} > -
{renderSectionForm(sectionGroup)}
+
+ {renderSectionForm(sectionGroup)} + {/* Render multi-query UI inside the Data Source section */} + {sectionGroup.section.name === "Data Source" && + renderMultiQuerySection()} +
- - {/* Render multi-query section after the Data Source section */} - {sectionGroup.section.name === "Data Source" && - renderMultiQuerySection()}
); }, )} - {/* If no Data Source section but has multi-query, render at end */} + {/* If no Data Source section exists, render multi-query at end */} {!sectionGroups.some( (g: SectionGroup) => g.section.name === "Data Source", ) && renderMultiQuerySection()} diff --git a/App/FeatureSet/Dashboard/src/Components/Dashboard/DashboardView.tsx b/App/FeatureSet/Dashboard/src/Components/Dashboard/DashboardView.tsx index 5c14118c67..9ffc309eaa 100644 --- a/App/FeatureSet/Dashboard/src/Components/Dashboard/DashboardView.tsx +++ b/App/FeatureSet/Dashboard/src/Components/Dashboard/DashboardView.tsx @@ -274,7 +274,7 @@ const DashboardViewer: FunctionComponent = ( width: `calc(100% - ${sideBarWidth}px)`, background: isEditMode ? "linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)" - : "#fafbfc", + : "#f8f9fb", }} > = ( return (
- {/* Accent top bar */} -
{/* Top row: Dashboard name + action buttons */} -
+
-

+

{props.dashboardName}

{isEditMode && ( @@ -84,7 +75,7 @@ const DashboardToolbar: FunctionComponent = ( )} {hasComponents && !isEditMode && ( - + {props.dashboardViewConfig.components.length} widget {props.dashboardViewConfig.components.length !== 1 ? "s" : ""} @@ -100,7 +91,7 @@ const DashboardToolbar: FunctionComponent = (
{!isSaving && ( -
+
{isEditMode ? ( <> @@ -229,7 +220,7 @@ const DashboardToolbar: FunctionComponent = ( tooltip="Full Screen" /> -
+