From fc28e634ab2dc82536c8d2a48f11c6af9ba27e83 Mon Sep 17 00:00:00 2001 From: djamaile Date: Mon, 13 Jun 2022 10:34:59 +0200 Subject: [PATCH] chore(cloud-insights): update readme with updated sidebar path Signed-off-by: djamaile --- plugins/cost-insights/README.md | 69 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/plugins/cost-insights/README.md b/plugins/cost-insights/README.md index 295cfcccd2..824cf6f9fe 100644 --- a/plugins/cost-insights/README.md +++ b/plugins/cost-insights/README.md @@ -72,37 +72,50 @@ import { CostInsightsPage } from '@backstage/plugin-cost-insights'; To expose the plugin to your users, you can integrate the `cost-insights` route anyway that suits your application, but most commonly it is added to the Sidebar. ```diff -// packages/app/src/sidebar.tsx +// packages/app/src/components/Root/Root.tsx + import MoneyIcon from '@material-ui/icons/MonetizationOn'; ... - export const AppSidebar = () => ( - - - } to="/search"> - - - - {/* Global nav, not org-specific */} - }> - - - - - - -+ - - {/* End global nav */} - - - - } to="/settings"> - - - - ); + export const Root = ({ children }: PropsWithChildren<{}>) => ( + + + + } to="/search"> + + {({ toggleModal }) => } + + + + + + + + {/* End global nav */} + + ++ + + + + + + + } + to="/settings" + > + + + + {children} + +); ``` ## Configuration @@ -157,7 +170,7 @@ costInsights: ### Currencies (Optional) -In the `Cost Overview` panel, users can choose from a dropdown of currencies to see costs in, such as Engineers or USD. Currencies must be defined as keys on the `currencies` field. A user-friendly label and unit are **required**. If not set, the `defaultCurrencies` in `currenc.ts` will be used. +In the `Cost Overview` panel, users can choose from a dropdown of currencies to see costs in, such as Engineers or USD. Currencies must be defined as keys on the `currencies` field. A user-friendly label and unit are **required**. If not set, the `defaultCurrencies` in `currency.ts` will be used. A currency without `kind` is reserved to calculate cost for `engineers`. There should only be one currency without `kind`.