-
Notifications
You must be signed in to change notification settings - Fork 49
feat: add cost insights summary cards, move finops reports tab to cost insights view and do minor UX improvements #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| '@openchoreo/backstage-plugin-openchoreo-observability': minor | ||
| '@openchoreo/backstage-plugin-react': minor | ||
| '@openchoreo/backstage-portal-app': minor | ||
| --- | ||
|
|
||
| Reorganise the Cost Insights view into tabs and improve the graph/tooltip UX. | ||
|
|
||
| - **Tabs**: the Cost Insights page now hosts two tabs — **Insights** (the | ||
| existing table/graph views) and **Cost Analysis** (the FinOps report list, | ||
| moved here from the project catalog entity page). The Cost Analysis tab | ||
| reuses the existing `CostAnalysisPage` via a synthesised entity context and | ||
| only enables its reports once a project scope is selected. The route is now | ||
| `/cost-insights/*`, and the Incidents "View Cost Analysis" deep link points | ||
| to the new location. The Cost Analysis tab was removed from the catalog | ||
| system page (both the legacy `EntityPage` and the new-frontend-system | ||
| `alpha` registration). | ||
| - **Consistent header**: extracted the catalog entity header's gradient bar | ||
| into a reusable `GradientPageHeader` (exported from | ||
| `@openchoreo/backstage-plugin-react`), and used it for the Cost Insights | ||
| header so its purple bar, title sizing and tab seam match the catalog. | ||
| `CompactEntityHeader` now consumes the same shell. Breadcrumb level labels | ||
| are pluralised (`namespaces` / `projects` / `components`) to match the | ||
| catalog. | ||
| - **Overview summary card**: the catalog Overview tab now shows a Cost | ||
| Insights summary card at both the project and component levels, | ||
| displaying the last-24-hour total cost (reusing the Total Cost card and, | ||
| for a component, summed across its environments) with a "Go to Cost | ||
| Insights" button that deep-links into the full view. | ||
| - **Chart tooltips**: the stacked bar chart and the line chart tooltips now | ||
| show the **Total** of the visible series and **highlight the row** for the | ||
| segment/line under the pointer. | ||
| - **Forecast clarity**: the "Forecast this month" summary card and the spend | ||
| forecast chart gained an info tooltip explaining that the forecast projects | ||
| the selected time window's rate across the month, so it can change with the | ||
| chosen range and the amount of data available. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,7 +141,7 @@ import { | |
| ObservabilityAlerts, | ||
| ObservabilityWirelogs, | ||
| ObservabilityProjectIncidents, | ||
| ObservabilityCostAnalysis, | ||
| ObservabilityCostInsightsSummaryCard, | ||
| useComponentHasAnyCiliumEnabledEnvironment, | ||
| type RenderLogRowAction, | ||
| } from '@openchoreo/backstage-plugin-openchoreo-observability'; | ||
|
|
@@ -327,6 +327,15 @@ function OverviewContent() { | |
| <Grid item md={6} xs={12}> | ||
| <EntityCatalogGraphCard height={400} renderNode={CustomGraphNode} /> | ||
| </Grid> | ||
| <EntitySwitch> | ||
| <EntitySwitch.Case if={isKind('component')}> | ||
| <FeatureGate feature="observability"> | ||
| <Grid item md={3} sm={6} xs={12}> | ||
| <ObservabilityCostInsightsSummaryCard /> | ||
| </Grid> | ||
| </FeatureGate> | ||
| </EntitySwitch.Case> | ||
| </EntitySwitch> | ||
| </Grid> | ||
| ); | ||
| } | ||
|
|
@@ -735,6 +744,13 @@ const systemPage = ( | |
| <Grid item xs={12}> | ||
| <EntityCatalogGraphCard height={400} renderNode={CustomGraphNode} /> | ||
| </Grid> | ||
|
|
||
| {/* Row 4: Cost Insights summary */} | ||
| <FeatureGate feature="observability"> | ||
| <Grid item md={3} sm={6} xs={12}> | ||
| <ObservabilityCostInsightsSummaryCard /> | ||
| </Grid> | ||
| </FeatureGate> | ||
| </Grid> | ||
| </EntityLayout.Route> | ||
| <EntityLayout.Route path="/definition" title="Definition"> | ||
|
|
@@ -787,11 +803,6 @@ const systemPage = ( | |
| <ObservabilityRCA /> | ||
| </FeatureGatedContent> | ||
| </EntityLayout.Route> | ||
| <EntityLayout.Route path="/cost-analysis" title="Cost Analysis"> | ||
| <FeatureGatedContent feature="observability"> | ||
| <ObservabilityCostAnalysis /> | ||
| </FeatureGatedContent> | ||
| </EntityLayout.Route> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we check whether we have not referred to this path from any other pages ? AFAIR there was a link in Alerts Page
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This had been missed. Only the path from the incidents page had been updated. I'll fix it |
||
| </EntityLayoutWithDelete> | ||
| ); | ||
|
|
||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.