@harnessio/backstage-plugin-harness-ccm 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -5
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Notes:
|
|
|
45
45
|
|
|
46
46
|
- Set the value of target to your on-prem URL if you are using the Harness on-prem offering
|
|
47
47
|
|
|
48
|
-
3.
|
|
48
|
+
3. In your Backstage `EntityPage.tsx` file, import `EntityCcmContent`, `isHarnessCcmAvailable`, and `EntityCcmOverviewCard` from `@harnessio/backstage-plugin-harness-ccm`:
|
|
49
49
|
|
|
50
50
|
```tsx
|
|
51
51
|
// In packages/app/src/components/catalog/EntityPage.tsx
|
|
@@ -53,17 +53,34 @@ Notes:
|
|
|
53
53
|
import {
|
|
54
54
|
isHarnessCcmAvailable,
|
|
55
55
|
EntityCcmContent,
|
|
56
|
+
EntityCcmOverviewCard,
|
|
56
57
|
} from '@harnessio/backstage-plugin-harness-ccm';
|
|
58
|
+
```
|
|
57
59
|
|
|
60
|
+
#### Add EntityCcmContent
|
|
61
|
+
Use the imported components to add the Harness CCM content to your entity page:
|
|
62
|
+
```tsx
|
|
58
63
|
const ccmContent = (
|
|
59
|
-
// ...
|
|
60
64
|
<EntitySwitch.Case if={isHarnessCcmAvailable}>
|
|
61
|
-
<
|
|
65
|
+
<EntityCcmContent />
|
|
62
66
|
</EntitySwitch.Case>
|
|
63
|
-
// ...
|
|
64
67
|
);
|
|
65
68
|
```
|
|
66
69
|
|
|
70
|
+
#### Add EntityCcmOverviewCard Widget
|
|
71
|
+
Add the EntityCcmOverviewCard to display an overview card:
|
|
72
|
+
```tsx
|
|
73
|
+
const overviewContent = (
|
|
74
|
+
<Grid container spacing={3}>
|
|
75
|
+
<Grid item md={6} xs={12}>
|
|
76
|
+
<EntityCcmOverviewCard variant="gridItem" />
|
|
77
|
+
</Grid>
|
|
78
|
+
</Grid>
|
|
79
|
+
);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
67
84
|
4. Add required harness specific annotations to your software component's respective `catalog-info.yaml` file.
|
|
68
85
|
|
|
69
86
|
Here is an example: [catalog-info-new.yaml](../../examples/catalog-harness-ccm.yaml)
|
|
@@ -79,6 +96,7 @@ metadata:
|
|
|
79
96
|
|
|
80
97
|
## Features
|
|
81
98
|
|
|
82
|
-
-
|
|
99
|
+
- Link a Backstage service to a Harness Perspective to view resources in ways that better align with your business needs.
|
|
100
|
+
|
|
83
101
|
|
|
84
102
|
|
package/dist/index.d.ts
CHANGED
|
@@ -20,4 +20,6 @@ declare const isHarnessCcmAvailable: (entity: Entity) => boolean;
|
|
|
20
20
|
/** @public */
|
|
21
21
|
declare const Router: () => React__default.JSX.Element;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
declare const rootRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
24
|
+
|
|
25
|
+
export { EntityCcmContent, EntityCcmOverviewCard, Router, harnessCcmPlugin, isHarnessCcmAvailable, rootRouteRef };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EntityCcmContent, l as EntityCcmOverviewCard, R as Router, m as harnessCcmPlugin, j as isHarnessCcmAvailable } from './esm/index-44451033.esm.js';
|
|
1
|
+
export { E as EntityCcmContent, l as EntityCcmOverviewCard, R as Router, m as harnessCcmPlugin, j as isHarnessCcmAvailable, r as rootRouteRef } from './esm/index-44451033.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-router';
|
package/package.json
CHANGED
package/src/index.ts
CHANGED