@backstage/plugin-catalog-react 1.1.2-next.1 → 1.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/CHANGELOG.md +119 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +29 -0
- package/dist/index.beta.d.ts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.esm.js +121 -40
- package/dist/index.esm.js.map +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,124 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 72622d9143: Updated dependency `yaml` to `^2.0.0`.
|
|
8
|
+
- be26d95141: Added new `EntityProcessingStatusPicker` that will filter for entities with orphans and/or errors.
|
|
9
|
+
|
|
10
|
+
If you are using the default Catalog page this picker will be added automatically. For those who have customized their Catalog page you'll need to add this manually by doing something like this:
|
|
11
|
+
|
|
12
|
+
```diff
|
|
13
|
+
...
|
|
14
|
+
import {
|
|
15
|
+
CatalogFilterLayout,
|
|
16
|
+
EntityTypePicker,
|
|
17
|
+
UserListPicker,
|
|
18
|
+
EntityTagPicker
|
|
19
|
+
+ EntityProcessingStatusPicker,
|
|
20
|
+
} from '@backstage/plugin-catalog-react';
|
|
21
|
+
...
|
|
22
|
+
export const CustomCatalogPage = ({
|
|
23
|
+
columns,
|
|
24
|
+
actions,
|
|
25
|
+
initiallySelectedFilter = 'owned',
|
|
26
|
+
}: CatalogPageProps) => {
|
|
27
|
+
return (
|
|
28
|
+
...
|
|
29
|
+
<EntityListProvider>
|
|
30
|
+
<CatalogFilterLayout>
|
|
31
|
+
<CatalogFilterLayout.Filters>
|
|
32
|
+
<EntityKindPicker initialFilter="component" hidden />
|
|
33
|
+
<EntityTypePicker />
|
|
34
|
+
<UserListPicker initialFilter={initiallySelectedFilter} />
|
|
35
|
+
<EntityTagPicker />
|
|
36
|
+
+ <EntityProcessingStatusPicker />
|
|
37
|
+
<CatalogFilterLayout.Filters>
|
|
38
|
+
<CatalogFilterLayout.Content>
|
|
39
|
+
<CatalogTable columns={columns} actions={actions} />
|
|
40
|
+
</CatalogFilterLayout.Content>
|
|
41
|
+
</CatalogFilterLayout>
|
|
42
|
+
</EntityListProvider>
|
|
43
|
+
...
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Updated dependencies
|
|
48
|
+
- @backstage/core-components@0.10.0
|
|
49
|
+
- @backstage/catalog-model@1.1.0
|
|
50
|
+
- @backstage/core-plugin-api@1.0.4
|
|
51
|
+
- @backstage/integration@1.2.2
|
|
52
|
+
- @backstage/catalog-client@1.0.4
|
|
53
|
+
- @backstage/plugin-permission-common@0.6.3
|
|
54
|
+
- @backstage/theme@0.2.16
|
|
55
|
+
- @backstage/errors@1.1.0
|
|
56
|
+
- @backstage/plugin-catalog-common@1.0.4
|
|
57
|
+
- @backstage/plugin-permission-react@0.4.3
|
|
58
|
+
|
|
59
|
+
## 1.1.2-next.3
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- 72622d9143: Updated dependency `yaml` to `^2.0.0`.
|
|
64
|
+
- Updated dependencies
|
|
65
|
+
- @backstage/core-plugin-api@1.0.4-next.0
|
|
66
|
+
- @backstage/core-components@0.10.0-next.3
|
|
67
|
+
- @backstage/catalog-client@1.0.4-next.2
|
|
68
|
+
- @backstage/integration@1.2.2-next.3
|
|
69
|
+
- @backstage/plugin-permission-common@0.6.3-next.1
|
|
70
|
+
- @backstage/catalog-model@1.1.0-next.3
|
|
71
|
+
- @backstage/plugin-permission-react@0.4.3-next.1
|
|
72
|
+
|
|
73
|
+
## 1.1.2-next.2
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- be26d95141: Added new `EntityProcessingStatusPicker` that will filter for entities with orphans and/or errors.
|
|
78
|
+
|
|
79
|
+
If you are using the default Catalog page this picker will be added automatically. For those who have customized their Catalog page you'll need to add this manually by doing something like this:
|
|
80
|
+
|
|
81
|
+
```diff
|
|
82
|
+
...
|
|
83
|
+
import {
|
|
84
|
+
CatalogFilterLayout,
|
|
85
|
+
EntityTypePicker,
|
|
86
|
+
UserListPicker,
|
|
87
|
+
EntityTagPicker
|
|
88
|
+
+ EntityProcessingStatusPicker,
|
|
89
|
+
} from '@backstage/plugin-catalog-react';
|
|
90
|
+
...
|
|
91
|
+
export const CustomCatalogPage = ({
|
|
92
|
+
columns,
|
|
93
|
+
actions,
|
|
94
|
+
initiallySelectedFilter = 'owned',
|
|
95
|
+
}: CatalogPageProps) => {
|
|
96
|
+
return (
|
|
97
|
+
...
|
|
98
|
+
<EntityListProvider>
|
|
99
|
+
<CatalogFilterLayout>
|
|
100
|
+
<CatalogFilterLayout.Filters>
|
|
101
|
+
<EntityKindPicker initialFilter="component" hidden />
|
|
102
|
+
<EntityTypePicker />
|
|
103
|
+
<UserListPicker initialFilter={initiallySelectedFilter} />
|
|
104
|
+
<EntityTagPicker />
|
|
105
|
+
+ <EntityProcessingStatusPicker />
|
|
106
|
+
<CatalogFilterLayout.Filters>
|
|
107
|
+
<CatalogFilterLayout.Content>
|
|
108
|
+
<CatalogTable columns={columns} actions={actions} />
|
|
109
|
+
</CatalogFilterLayout.Content>
|
|
110
|
+
</CatalogFilterLayout>
|
|
111
|
+
</EntityListProvider>
|
|
112
|
+
...
|
|
113
|
+
};
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- Updated dependencies
|
|
117
|
+
- @backstage/core-components@0.10.0-next.2
|
|
118
|
+
- @backstage/catalog-model@1.1.0-next.2
|
|
119
|
+
- @backstage/theme@0.2.16-next.1
|
|
120
|
+
- @backstage/integration@1.2.2-next.2
|
|
121
|
+
|
|
3
122
|
## 1.1.2-next.1
|
|
4
123
|
|
|
5
124
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export declare type CatalogReactComponentsNameToClassKey = {
|
|
|
83
83
|
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
|
|
84
84
|
CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey;
|
|
85
85
|
CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey;
|
|
86
|
+
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
/** @public */
|
|
@@ -91,6 +92,9 @@ export declare type CatalogReactEntityLifecyclePickerClassKey = 'input';
|
|
|
91
92
|
/** @public */
|
|
92
93
|
export declare type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
93
94
|
|
|
95
|
+
/** @public */
|
|
96
|
+
export declare type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
|
|
97
|
+
|
|
94
98
|
/** @public */
|
|
95
99
|
export declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
96
100
|
|
|
@@ -130,8 +134,20 @@ export declare type DefaultEntityFilters = {
|
|
|
130
134
|
lifecycles?: EntityLifecycleFilter;
|
|
131
135
|
tags?: EntityTagFilter;
|
|
132
136
|
text?: EntityTextFilter;
|
|
137
|
+
orphan?: EntityOrphanFilter;
|
|
138
|
+
error?: EntityErrorFilter;
|
|
133
139
|
};
|
|
134
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Filters entities based on if it has errors or not.
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare class EntityErrorFilter implements EntityFilter {
|
|
146
|
+
readonly value: boolean;
|
|
147
|
+
constructor(value: boolean);
|
|
148
|
+
filterEntity(entity: Entity): boolean;
|
|
149
|
+
}
|
|
150
|
+
|
|
135
151
|
/** @public */
|
|
136
152
|
export declare type EntityFilter = {
|
|
137
153
|
/**
|
|
@@ -241,6 +257,16 @@ export declare type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
|
241
257
|
refresh?: VoidFunction;
|
|
242
258
|
};
|
|
243
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Filters entities based if it is an orphan or not.
|
|
262
|
+
* @public
|
|
263
|
+
*/
|
|
264
|
+
export declare class EntityOrphanFilter implements EntityFilter {
|
|
265
|
+
readonly value: boolean;
|
|
266
|
+
constructor(value: boolean);
|
|
267
|
+
filterEntity(entity: Entity): boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
244
270
|
/**
|
|
245
271
|
* Filter matching entities that are owned by group.
|
|
246
272
|
* @public
|
|
@@ -255,6 +281,9 @@ export declare class EntityOwnerFilter implements EntityFilter {
|
|
|
255
281
|
/** @public */
|
|
256
282
|
export declare const EntityOwnerPicker: () => JSX.Element | null;
|
|
257
283
|
|
|
284
|
+
/** @public */
|
|
285
|
+
export declare const EntityProcessingStatusPicker: () => JSX.Element;
|
|
286
|
+
|
|
258
287
|
/**
|
|
259
288
|
* Provides an entity to be picked up by the `useEntity` hook.
|
|
260
289
|
*
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export declare type CatalogReactComponentsNameToClassKey = {
|
|
|
83
83
|
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
|
|
84
84
|
CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey;
|
|
85
85
|
CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey;
|
|
86
|
+
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
/** @public */
|
|
@@ -91,6 +92,9 @@ export declare type CatalogReactEntityLifecyclePickerClassKey = 'input';
|
|
|
91
92
|
/** @public */
|
|
92
93
|
export declare type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
93
94
|
|
|
95
|
+
/** @public */
|
|
96
|
+
export declare type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
|
|
97
|
+
|
|
94
98
|
/** @public */
|
|
95
99
|
export declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
96
100
|
|
|
@@ -130,8 +134,20 @@ export declare type DefaultEntityFilters = {
|
|
|
130
134
|
lifecycles?: EntityLifecycleFilter;
|
|
131
135
|
tags?: EntityTagFilter;
|
|
132
136
|
text?: EntityTextFilter;
|
|
137
|
+
orphan?: EntityOrphanFilter;
|
|
138
|
+
error?: EntityErrorFilter;
|
|
133
139
|
};
|
|
134
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Filters entities based on if it has errors or not.
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare class EntityErrorFilter implements EntityFilter {
|
|
146
|
+
readonly value: boolean;
|
|
147
|
+
constructor(value: boolean);
|
|
148
|
+
filterEntity(entity: Entity): boolean;
|
|
149
|
+
}
|
|
150
|
+
|
|
135
151
|
/** @public */
|
|
136
152
|
export declare type EntityFilter = {
|
|
137
153
|
/**
|
|
@@ -241,6 +257,16 @@ export declare type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
|
241
257
|
refresh?: VoidFunction;
|
|
242
258
|
};
|
|
243
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Filters entities based if it is an orphan or not.
|
|
262
|
+
* @public
|
|
263
|
+
*/
|
|
264
|
+
export declare class EntityOrphanFilter implements EntityFilter {
|
|
265
|
+
readonly value: boolean;
|
|
266
|
+
constructor(value: boolean);
|
|
267
|
+
filterEntity(entity: Entity): boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
244
270
|
/**
|
|
245
271
|
* Filter matching entities that are owned by group.
|
|
246
272
|
* @public
|
|
@@ -255,6 +281,9 @@ export declare class EntityOwnerFilter implements EntityFilter {
|
|
|
255
281
|
/** @public */
|
|
256
282
|
export declare const EntityOwnerPicker: () => JSX.Element | null;
|
|
257
283
|
|
|
284
|
+
/** @public */
|
|
285
|
+
export declare const EntityProcessingStatusPicker: () => JSX.Element;
|
|
286
|
+
|
|
258
287
|
/**
|
|
259
288
|
* Provides an entity to be picked up by the `useEntity` hook.
|
|
260
289
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export declare type CatalogReactComponentsNameToClassKey = {
|
|
|
83
83
|
CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey;
|
|
84
84
|
CatalogReactEntityTagPicker: CatalogReactEntityTagPickerClassKey;
|
|
85
85
|
CatalogReactEntityOwnerPicker: CatalogReactEntityOwnerPickerClassKey;
|
|
86
|
+
CatalogReactEntityProcessingStatusPicker: CatalogReactEntityProcessingStatusPickerClassKey;
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
/** @public */
|
|
@@ -91,6 +92,9 @@ export declare type CatalogReactEntityLifecyclePickerClassKey = 'input';
|
|
|
91
92
|
/** @public */
|
|
92
93
|
export declare type CatalogReactEntityOwnerPickerClassKey = 'input';
|
|
93
94
|
|
|
95
|
+
/** @public */
|
|
96
|
+
export declare type CatalogReactEntityProcessingStatusPickerClassKey = 'input';
|
|
97
|
+
|
|
94
98
|
/** @public */
|
|
95
99
|
export declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
|
|
96
100
|
|
|
@@ -130,8 +134,20 @@ export declare type DefaultEntityFilters = {
|
|
|
130
134
|
lifecycles?: EntityLifecycleFilter;
|
|
131
135
|
tags?: EntityTagFilter;
|
|
132
136
|
text?: EntityTextFilter;
|
|
137
|
+
orphan?: EntityOrphanFilter;
|
|
138
|
+
error?: EntityErrorFilter;
|
|
133
139
|
};
|
|
134
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Filters entities based on if it has errors or not.
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare class EntityErrorFilter implements EntityFilter {
|
|
146
|
+
readonly value: boolean;
|
|
147
|
+
constructor(value: boolean);
|
|
148
|
+
filterEntity(entity: Entity): boolean;
|
|
149
|
+
}
|
|
150
|
+
|
|
135
151
|
/** @public */
|
|
136
152
|
export declare type EntityFilter = {
|
|
137
153
|
/**
|
|
@@ -241,6 +257,16 @@ export declare type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
|
|
241
257
|
refresh?: VoidFunction;
|
|
242
258
|
};
|
|
243
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Filters entities based if it is an orphan or not.
|
|
262
|
+
* @public
|
|
263
|
+
*/
|
|
264
|
+
export declare class EntityOrphanFilter implements EntityFilter {
|
|
265
|
+
readonly value: boolean;
|
|
266
|
+
constructor(value: boolean);
|
|
267
|
+
filterEntity(entity: Entity): boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
244
270
|
/**
|
|
245
271
|
* Filter matching entities that are owned by group.
|
|
246
272
|
* @public
|
|
@@ -255,6 +281,9 @@ export declare class EntityOwnerFilter implements EntityFilter {
|
|
|
255
281
|
/** @public */
|
|
256
282
|
export declare const EntityOwnerPicker: () => JSX.Element | null;
|
|
257
283
|
|
|
284
|
+
/** @public */
|
|
285
|
+
export declare const EntityProcessingStatusPicker: () => JSX.Element;
|
|
286
|
+
|
|
258
287
|
/**
|
|
259
288
|
* Provides an entity to be picked up by the `useEntity` hook.
|
|
260
289
|
*
|