Use a proper React file import for the OpenCost logo

Fixes https://github.com/backstage/backstage/issues/20333

Signed-off-by: Matt Ray <github@mattray.dev>
This commit is contained in:
Matt Ray
2023-10-05 21:11:25 +11:00
parent 6e741ac823
commit 777b9a16a4
3 changed files with 11 additions and 8 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-opencost': minor
---
Fix for broken image reference.
Fixed https://github.com/backstage/backstage/issues/20333
+2 -2
View File
@@ -28,7 +28,7 @@ and
</FlatRoutes>
```
3. Add link to OpenCost to your sidebar
3. Import the `MoneyIcon` and add link to OpenCost to your sidebar
```typescript
// packages/app/src/components/Root/Root.tsx
@@ -58,7 +58,7 @@ If you haven't set up an ingress rule, you can port-forward the API with
kubectl -n opencost port-forward deployment/opencost 9003
```
Add the following to your `app-config.yaml`:
Add the following to your `app-config.local.yaml`:
```yaml
opencost:
@@ -17,6 +17,7 @@ import React from 'react';
import { Grid } from '@material-ui/core';
import { Header, Page, Content } from '@backstage/core-components';
import { OpenCostReport } from '../OpenCostReport';
import logo from '../../images/pig.png';
export const OpenCostPage = () => (
<Page themeId="tool">
@@ -25,12 +26,7 @@ export const OpenCostPage = () => (
subtitle="Open source Kubernetes cloud cost monitoring"
>
<a href="https://opencost.io">
<img
width={68}
height={64}
src={require('../../images/pig.png')}
alt="OpenCost"
/>
<img width={68} height={64} src={logo} alt="OpenCost" />
</a>
</Header>
<Content>