UNPKG

41.7 kBMarkdownView Raw
1# OpenShift Console Extension Types
2
31. [`console.action/filter`](#console.action/filter)
42. [`console.action/group`](#console.action/group)
53. [`console.action/provider`](#console.action/provider)
64. [`console.action/resource-provider`](#console.action/resource-provider)
75. [`console.alert-action`](#console.alert-action)
86. [`console.catalog/item-filter`](#console.catalog/item-filter)
97. [`console.catalog/item-provider`](#console.catalog/item-provider)
108. [`console.catalog/item-type`](#console.catalog/item-type)
119. [`console.context-provider`](#console.context-provider)
1210. [`console.dashboards/card`](#console.dashboards/card)
1311. [`console.dashboards/overview/activity/resource`](#console.dashboards/overview/activity/resource)
1412. [`console.dashboards/overview/health/operator`](#console.dashboards/overview/health/operator)
1513. [`console.dashboards/overview/health/prometheus`](#console.dashboards/overview/health/prometheus)
1614. [`console.dashboards/overview/health/resource`](#console.dashboards/overview/health/resource)
1715. [`console.dashboards/overview/health/url`](#console.dashboards/overview/health/url)
1816. [`console.dashboards/overview/inventory/item`](#console.dashboards/overview/inventory/item)
1917. [`console.dashboards/overview/inventory/item/group`](#console.dashboards/overview/inventory/item/group)
2018. [`console.dashboards/tab`](#console.dashboards/tab)
2119. [`console.file-upload`](#console.file-upload)
2220. [`console.flag`](#console.flag)
2321. [`console.flag/model`](#console.flag/model)
2422. [`console.global-config`](#console.global-config)
2523. [`console.navigation/href`](#console.navigation/href)
2624. [`console.navigation/resource-cluster`](#console.navigation/resource-cluster)
2725. [`console.navigation/resource-ns`](#console.navigation/resource-ns)
2826. [`console.navigation/section`](#console.navigation/section)
2927. [`console.navigation/separator`](#console.navigation/separator)
3028. [`console.page/resource/details`](#console.page/resource/details)
3129. [`console.page/resource/list`](#console.page/resource/list)
3230. [`console.page/resource/tab`](#console.page/resource/tab)
3331. [`console.page/route`](#console.page/route)
3432. [`console.page/route/standalone`](#console.page/route/standalone)
3533. [`console.perspective`](#console.perspective)
3634. [`console.pvc/alert`](#console.pvc/alert)
3735. [`console.pvc/create-prop`](#console.pvc/create-prop)
3836. [`console.pvc/delete`](#console.pvc/delete)
3937. [`console.pvc/status`](#console.pvc/status)
4038. [`console.redux-reducer`](#console.redux-reducer)
4139. [`console.resource-metadata`](#console.resource-metadata)
4240. [`console.resource/create`](#console.resource/create)
4341. [`console.storage-provider`](#console.storage-provider)
4442. [`console.tab/horizontalNav`](#console.tab/horizontalNav)
4543. [`console.telemetry/listener`](#console.telemetry/listener)
4644. [`console.topology/adapter/build`](#console.topology/adapter/build)
4745. [`console.topology/adapter/network`](#console.topology/adapter/network)
4846. [`console.topology/adapter/pod`](#console.topology/adapter/pod)
4947. [`console.topology/component/factory`](#console.topology/component/factory)
5048. [`console.topology/create/connector`](#console.topology/create/connector)
5149. [`console.topology/data/factory`](#console.topology/data/factory)
5250. [`console.topology/decorator/provider`](#console.topology/decorator/provider)
5351. [`console.topology/details/resource-alert`](#console.topology/details/resource-alert)
5452. [`console.topology/details/resource-link`](#console.topology/details/resource-link)
5553. [`console.topology/details/tab`](#console.topology/details/tab)
5654. [`console.topology/details/tab-section`](#console.topology/details/tab-section)
5755. [`console.topology/display/filters`](#console.topology/display/filters)
5856. [`console.topology/relationship/provider`](#console.topology/relationship/provider)
5957. [`console.user-preference/group`](#console.user-preference/group)
6058. [`console.user-preference/item`](#console.user-preference/item)
6159. [`console.yaml-template`](#console.yaml-template)
6260. [`dev-console.add/action`](#dev-console.add/action)
6361. [`dev-console.add/action-group`](#dev-console.add/action-group)
64
65---
66
67## `console.action/filter`
68
69### Summary
70
71ActionFilter can be used to filter an action
72
73### Properties
74
75| Name | Value Type | Optional | Description |
76| ---- | ---------- | -------- | ----------- |
77| `contextId` | `string` | no | The context ID helps to narrow the scope of contributed actions to a particular area of the application. Ex - topology, helm |
78| `filter` | `CodeRef<(scope: any, action: Action) => boolean>` | no | A function which will filter actions based on some conditions.<br/>scope: The scope in which actions should be provided for.<br/>Note: hook may be required if we want to remove the ModifyCount action from a deployment with HPA |
79
80---
81
82## `console.action/group`
83
84### Summary
85
86ActionGroup contributes an action group that can also be a submenu
87
88### Properties
89
90| Name | Value Type | Optional | Description |
91| ---- | ---------- | -------- | ----------- |
92| `id` | `string` | no | ID used to identify the action section. |
93| `label` | `string` | yes | The label to display in the UI.<br/>Required for submenus. |
94| `submenu` | `boolean` | yes | Whether this group should be displayed as submenu |
95| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here.<br/>For arrays, the first one found in order is used. |
96| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here.<br/>For arrays, the first one found in order is used.<br/>insertBefore takes precedence. |
97
98---
99
100## `console.action/provider`
101
102### Summary
103
104ActionProvider contributes a hook that returns list of actions for specific context
105
106### Properties
107
108| Name | Value Type | Optional | Description |
109| ---- | ---------- | -------- | ----------- |
110| `contextId` | `string` | no | The context ID helps to narrow the scope of contributed actions to a particular area of the application. Ex - topology, helm |
111| `provider` | `CodeRef<ExtensionHook<Action[], any>>` | no | A react hook which returns actions for the given scope.<br/>If contextId = `resource` then the scope will always be a K8s resource object |
112
113---
114
115## `console.action/resource-provider`
116
117### Summary
118
119ResourceActionProvider contributes a hook that returns list of actions for specific resource model
120
121### Properties
122
123| Name | Value Type | Optional | Description |
124| ---- | ---------- | -------- | ----------- |
125| `model` | `ExtensionK8sKindVersionModel` | no | The model for which this provider provides actions for. |
126| `provider` | `CodeRef<ExtensionHook<Action[], any>>` | no | A react hook which returns actions for the given resource model |
127
128---
129
130## `console.alert-action`
131
132### Summary
133
134(not available)
135
136### Properties
137
138| Name | Value Type | Optional | Description |
139| ---- | ---------- | -------- | ----------- |
140| `alert` | `string` | no | |
141| `text` | `string` | no | |
142| `action` | `CodeRef<(alert: any) => void>` | no | |
143
144---
145
146## `console.catalog/item-filter`
147
148### Summary
149
150(not available)
151
152### Properties
153
154| Name | Value Type | Optional | Description |
155| ---- | ---------- | -------- | ----------- |
156| `catalogId` | `string \| string[]` | no | The unique identifier for the catalog this provider contributes to. |
157| `type` | `string` | no | Type ID for the catalog item type. |
158| `filter` | `CodeRef<(item: CatalogItem) => boolean>` | no | Filters items of a specific type. Value is a function that takes CatalogItem[] and returns a subset based on the filter criteria. |
159
160---
161
162## `console.catalog/item-provider`
163
164### Summary
165
166(not available)
167
168### Properties
169
170| Name | Value Type | Optional | Description |
171| ---- | ---------- | -------- | ----------- |
172| `catalogId` | `string \| string[]` | no | The unique identifier for the catalog this provider contributes to. |
173| `type` | `string` | no | Type ID for the catalog item type. |
174| `provider` | `CodeRef<ExtensionHook<CatalogItem<any>[], CatalogExtensionHookOptions>>` | no | Fetch items and normalize it for the catalog. Value is a react effect hook. |
175| `priority` | `number` | yes | Priority for this provider. Defaults to 0. Higher priority providers may override catalog<br/>items provided by other providers. |
176
177---
178
179## `console.catalog/item-type`
180
181### Summary
182
183(not available)
184
185### Properties
186
187| Name | Value Type | Optional | Description |
188| ---- | ---------- | -------- | ----------- |
189| `type` | `string` | no | Type for the catalog item. |
190| `title` | `string` | no | Title for the catalog item. |
191| `catalogDescription` | `string` | yes | Description for the type specific catalog. |
192| `typeDescription` | `string` | yes | Description for the catalog item type. |
193| `filters` | `CatalogItemAttribute[]` | yes | Custom filters specific to the catalog item. |
194| `groupings` | `CatalogItemAttribute[]` | yes | Custom groupings specific to the catalog item. |
195
196---
197
198## `console.context-provider`
199
200### Summary
201
202Adds new React context provider to Console application root.
203
204### Properties
205
206| Name | Value Type | Optional | Description |
207| ---- | ---------- | -------- | ----------- |
208| `provider` | `CodeRef<Provider<T>>` | no | Context Provider component. |
209| `useValueHook` | `CodeRef<() => T>` | no | Hook for the Context value. |
210
211---
212
213## `console.dashboards/card`
214
215### Summary
216
217Adds a new dashboard card.
218
219### Properties
220
221| Name | Value Type | Optional | Description |
222| ---- | ---------- | -------- | ----------- |
223| `tab` | `string` | no | The id of the dashboard tab to which the card will be added. |
224| `position` | `'LEFT' \| 'RIGHT' \| 'MAIN'` | no | The grid position of the card on the dashboard. |
225| `component` | `CodeRef<React.ComponentType<{}>>` | no | Dashboard card component. |
226| `span` | `DashboardCardSpan` | yes | Card's vertical span in the column. Ignored for small screens, defaults to 12. |
227
228---
229
230## `console.dashboards/overview/activity/resource`
231
232### Summary
233
234Adds an activity to the Activity Card of Overview Dashboard where the triggering of activity is based on watching a K8s resource.
235
236### Properties
237
238| Name | Value Type | Optional | Description |
239| ---- | ---------- | -------- | ----------- |
240| `k8sResource` | `CodeRef<FirehoseResource & { isList: true; }>` | no | The utilization item to be replaced. |
241| `component` | `CodeRef<React.ComponentType<K8sActivityProps<T>>>` | no | The action component. |
242| `isActivity` | `CodeRef<(resource: T) => boolean>` | yes | Function which determines if the given resource represents the action. If not defined, every resource represents activity. |
243| `getTimestamp` | `CodeRef<(resource: T) => Date>` | yes | Timestamp for the given action, which will be used for ordering. |
244
245---
246
247## `console.dashboards/overview/health/operator`
248
249### Summary
250
251Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s REST API.
252
253### Properties
254
255| Name | Value Type | Optional | Description |
256| ---- | ---------- | -------- | ----------- |
257| `title` | `string` | no | Title of operators section in the popup. |
258| `resources` | `CodeRef<FirehoseResource[]>` | no | Kubernetes resources which will be fetched and passed to `healthHandler`. |
259| `getOperatorsWithStatuses` | `CodeRef<GetOperatorsWithStatuses<T>>` | yes | Resolves status for the operators. |
260| `operatorRowLoader` | `CodeRef<React.ComponentType<OperatorRowProps<T>>>` | yes | Loader for popup row component. |
261| `viewAllLink` | `string` | yes | Links to all resources page. If not provided then a list page of the first resource from resources prop is used. |
262
263---
264
265## `console.dashboards/overview/health/prometheus`
266
267### Summary
268
269Adds a health subsystem to the status card of Overview dashboard where the source of status is Prometheus.
270
271### Properties
272
273| Name | Value Type | Optional | Description |
274| ---- | ---------- | -------- | ----------- |
275| `title` | `string` | no | The display name of the subsystem. |
276| `queries` | `string[]` | no | The Prometheus queries |
277| `healthHandler` | `CodeRef<PrometheusHealthHandler>` | no | Resolve the subsystem's health. |
278| `additionalResource` | `CodeRef<FirehoseResource>` | yes | Additional resource which will be fetched and passed to `healthHandler`. |
279| `popupComponent` | `CodeRef<React.ComponentType<PrometheusHealthPopupProps>>` | yes | Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. |
280| `popupTitle` | `string` | yes | The title of the popover. |
281| `disallowedProviders` | `string[]` | yes | Cloud providers which for which the subsystem should be hidden. |
282
283---
284
285## `console.dashboards/overview/health/resource`
286
287### Summary
288
289Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s Resource.
290
291### Properties
292
293| Name | Value Type | Optional | Description |
294| ---- | ---------- | -------- | ----------- |
295| `title` | `string` | no | The display name of the subsystem. |
296| `resources` | `CodeRef<WatchK8sResources<T>>` | no | Kubernetes resources which will be fetched and passed to `healthHandler`. |
297| `healthHandler` | `CodeRef<ResourceHealthHandler<T>>` | no | Resolve the subsystem's health. |
298| `popupComponent` | `CodeRef<WatchK8sResults<T>>` | yes | Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. |
299| `popupTitle` | `string` | yes | The title of the popover. |
300
301---
302
303## `console.dashboards/overview/health/url`
304
305### Summary
306
307Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s REST API.
308
309### Properties
310
311| Name | Value Type | Optional | Description |
312| ---- | ---------- | -------- | ----------- |
313| `title` | `string` | no | The display name of the subsystem. |
314| `url` | `string` | no | The URL to fetch data from. It will be prefixed with base k8s URL. |
315| `healthHandler` | `CodeRef<URLHealthHandler<T, K8sResourceCommon \| K8sResourceCommon[]>>` | no | Resolve the subsystem's health. |
316| `additionalResource` | `CodeRef<FirehoseResource>` | yes | Additional resource which will be fetched and passed to `healthHandler`. |
317| `popupComponent` | `CodeRef<React.ComponentType<{ healthResult?: T; healthResultError?: any; k8sResult?: FirehoseResult<R>; }>>` | yes | Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. |
318| `popupTitle` | `string` | yes | The title of the popover. |
319
320---
321
322## `console.dashboards/overview/inventory/item`
323
324### Summary
325
326Adds a resource tile to the overview inventory card.
327
328### Properties
329
330| Name | Value Type | Optional | Description |
331| ---- | ---------- | -------- | ----------- |
332| `model` | `CodeRef<T>` | no | The model for `resource` which will be fetched. Used to get the model's `label` or `abbr`. |
333| `mapper` | `CodeRef<StatusGroupMapper<T, R>>` | yes | Function which maps various statuses to groups. |
334| `additionalResources` | `CodeRef<WatchK8sResources<R>>` | yes | Additional resources which will be fetched and passed to the `mapper` function. |
335
336---
337
338## `console.dashboards/overview/inventory/item/group`
339
340### Summary
341
342Adds an inventory status group.
343
344### Properties
345
346| Name | Value Type | Optional | Description |
347| ---- | ---------- | -------- | ----------- |
348| `id` | `string` | no | The id of the status group. |
349| `icon` | `CodeRef<React.ReactElement<any, string \| React.JSXElementConstructor<any>>>` | no | React component representing the status group icon. |
350
351---
352
353## `console.dashboards/tab`
354
355### Summary
356
357Adds a new dashboard tab, placed after the Overview tab.
358
359### Properties
360
361| Name | Value Type | Optional | Description |
362| ---- | ---------- | -------- | ----------- |
363| `id` | `string` | no | A unique tab identifier, used as tab link `href` and when adding cards to this tab. |
364| `navSection` | `'home' \| 'storage'` | no | NavSection to which the tab belongs to |
365| `title` | `string` | no | The title of the tab. |
366
367---
368
369## `console.file-upload`
370
371### Summary
372
373(not available)
374
375### Properties
376
377| Name | Value Type | Optional | Description |
378| ---- | ---------- | -------- | ----------- |
379| `fileExtensions` | `string[]` | no | Supported file extensions. |
380| `handler` | `CodeRef<FileUploadHandler>` | no | Function which handles the file drop action. |
381
382---
383
384## `console.flag`
385
386### Summary
387
388Gives full control over Console feature flags.
389
390### Properties
391
392| Name | Value Type | Optional | Description |
393| ---- | ---------- | -------- | ----------- |
394| `handler` | `CodeRef<(callback: SetFeatureFlag) => void>` | no | Used to set/unset arbitrary feature flags. |
395
396---
397
398## `console.flag/model`
399
400### Summary
401
402Adds new Console feature flag driven by the presence of a CRD on the cluster.
403
404### Properties
405
406| Name | Value Type | Optional | Description |
407| ---- | ---------- | -------- | ----------- |
408| `flag` | `string` | no | The name of the flag to set once the CRD is detected. |
409| `model` | `ExtensionK8sModel` | no | The model which refers to a `CustomResourceDefinition`. |
410
411---
412
413## `console.global-config`
414
415### Summary
416
417(not available)
418
419### Properties
420
421| Name | Value Type | Optional | Description |
422| ---- | ---------- | -------- | ----------- |
423| `id` | `string` | no | Unique identifier for the cluster config resource instance. |
424| `name` | `string` | no | The name of the cluster config resource instance. |
425| `model` | `ExtensionK8sModel` | no | The model which refers to a cluster config resource. |
426| `namespace` | `string` | no | The namespace of the cluster config resource instance. |
427
428---
429
430## `console.navigation/href`
431
432### Summary
433
434(not available)
435
436### Properties
437
438| Name | Value Type | Optional | Description |
439| ---- | ---------- | -------- | ----------- |
440| `id` | `string` | no | A unique identifier for this item. |
441| `name` | `string` | no | The name of this item. |
442| `href` | `string` | no | The link href value. |
443| `perspective` | `string` | yes | The perspective ID to which this item belongs to. If not specified, contributes to the default perspective. |
444| `section` | `string` | yes | Navigation section to which this item belongs to. If not specified, render this item as a top level link. |
445| `dataAttributes` | `{ [key: string]: string; }` | yes | Adds data attributes to the DOM. |
446| `startsWith` | `string[]` | yes | Mark this item as active when the URL starts with one of these paths. |
447| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here. For arrays, the first one found in order is used. |
448| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here. For arrays, the first one found in order is used. `insertBefore` takes precedence. |
449| `namespaced` | `boolean` | yes | if true, adds /ns/active-namespace to the end |
450| `prefixNamespaced` | `boolean` | yes | if true, adds /k8s/ns/active-namespace to the begining |
451
452---
453
454## `console.navigation/resource-cluster`
455
456### Summary
457
458(not available)
459
460### Properties
461
462| Name | Value Type | Optional | Description |
463| ---- | ---------- | -------- | ----------- |
464| `id` | `string` | no | A unique identifier for this item. |
465| `model` | `ExtensionK8sModel` | no | The model for which this nav item links to. |
466| `perspective` | `string` | yes | The perspective ID to which this item belongs to. If not specified, contributes to the default perspective. |
467| `section` | `string` | yes | Navigation section to which this item belongs to. If not specified, render this item as a top level link. |
468| `dataAttributes` | `{ [key: string]: string; }` | yes | Adds data attributes to the DOM. |
469| `startsWith` | `string[]` | yes | Mark this item as active when the URL starts with one of these paths. |
470| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here. For arrays, the first one found in order is used. |
471| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here. For arrays, the first one found in order is used. `insertBefore` takes precedence. |
472| `name` | `string` | yes | Overrides the default name. If not supplied the name of the link will equal the plural value of the model. |
473
474---
475
476## `console.navigation/resource-ns`
477
478### Summary
479
480(not available)
481
482### Properties
483
484| Name | Value Type | Optional | Description |
485| ---- | ---------- | -------- | ----------- |
486| `id` | `string` | no | A unique identifier for this item. |
487| `model` | `ExtensionK8sModel` | no | The model for which this nav item links to. |
488| `perspective` | `string` | yes | The perspective ID to which this item belongs to. If not specified, contributes to the default perspective. |
489| `section` | `string` | yes | Navigation section to which this item belongs to. If not specified, render this item as a top level link. |
490| `dataAttributes` | `{ [key: string]: string; }` | yes | Adds data attributes to the DOM. |
491| `startsWith` | `string[]` | yes | Mark this item as active when the URL starts with one of these paths. |
492| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here. For arrays, the first one found in order is used. |
493| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here. For arrays, the first one found in order is used. `insertBefore` takes precedence. |
494| `name` | `string` | yes | Overrides the default name. If not supplied the name of the link will equal the plural value of the model. |
495
496---
497
498## `console.navigation/section`
499
500### Summary
501
502(not available)
503
504### Properties
505
506| Name | Value Type | Optional | Description |
507| ---- | ---------- | -------- | ----------- |
508| `id` | `string` | no | A unique identifier for this item. |
509| `perspective` | `string` | yes | The perspective ID to which this item belongs to. If not specified, contributes to the default perspective. |
510| `dataAttributes` | `{ [key: string]: string; }` | yes | Adds data attributes to the DOM. |
511| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here. For arrays, the first one found in order is used. |
512| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here. For arrays, the first one found in order is used. `insertBefore` takes precedence. |
513| `name` | `string` | yes | Name of this section. If not supplied, only a separator will be shown above the section. |
514
515---
516
517## `console.navigation/separator`
518
519### Summary
520
521(not available)
522
523### Properties
524
525| Name | Value Type | Optional | Description |
526| ---- | ---------- | -------- | ----------- |
527| `id` | `string` | no | A unique identifier for this item. |
528| `perspective` | `string` | yes | The perspective ID to which this item belongs to. If not specified, contributes to the default perspective. |
529| `section` | `string` | yes | Navigation section to which this item belongs to. If not specified, render this item as a top level link. |
530| `dataAttributes` | `{ [key: string]: string; }` | yes | Adds data attributes to the DOM. |
531| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here. For arrays, the first one found in order is used. |
532| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here. For arrays, the first one found in order is used. `insertBefore` takes precedence. |
533
534---
535
536## `console.page/resource/details`
537
538### Summary
539
540Adds new resource details page to Console router.
541
542### Properties
543
544| Name | Value Type | Optional | Description |
545| ---- | ---------- | -------- | ----------- |
546| `model` | `ExtensionK8sGroupKindModel` | no | The model for which this resource page links to. |
547| `component` | `CodeRef<React.ComponentType<{ match: match<{}>; namespace: string; model: ExtensionK8sModel; }>>` | no | The component to be rendered when the route matches. |
548
549---
550
551## `console.page/resource/list`
552
553### Summary
554
555Adds new resource list page to Console router.
556
557### Properties
558
559| Name | Value Type | Optional | Description |
560| ---- | ---------- | -------- | ----------- |
561| `model` | `ExtensionK8sGroupKindModel` | no | The model for which this resource page links to. |
562| `component` | `CodeRef<React.ComponentType<{ match: match<{}>; namespace: string; model: ExtensionK8sModel; }>>` | no | The component to be rendered when the route matches. |
563
564---
565
566## `console.page/resource/tab`
567
568### Summary
569
570Adds new resource tab page to Console router.
571
572### Properties
573
574| Name | Value Type | Optional | Description |
575| ---- | ---------- | -------- | ----------- |
576| `model` | `ExtensionK8sGroupKindModel` | no | The model for which this resource page links to. |
577| `component` | `CodeRef<React.ComponentType<RouteComponentProps<{}, StaticContext, any>>>` | no | The component to be rendered when the route matches. |
578| `name` | `string` | no | The name of the tab. |
579| `href` | `string` | yes | The optional href for the tab link. If not provided, the first `path` is used. |
580| `exact` | `boolean` | yes | When true, will only match if the path matches the `location.pathname` exactly. |
581
582---
583
584## `console.page/route`
585
586### Summary
587
588Adds new page to Console router.
589
590### Properties
591
592| Name | Value Type | Optional | Description |
593| ---- | ---------- | -------- | ----------- |
594| `component` | `CodeRef<React.ComponentType<RouteComponentProps<{}, StaticContext, any>>>` | no | The component to be rendered when the route matches. |
595| `path` | `string \| string[]` | no | Valid URL path or array of paths that `path-to-regexp@^1.7.0` understands. |
596| `perspective` | `string` | yes | The perspective to which this page belongs to. If not specified, contributes to all perspectives. |
597| `exact` | `boolean` | yes | When true, will only match if the path matches the `location.pathname` exactly. |
598
599---
600
601## `console.page/route/standalone`
602
603### Summary
604
605Adds new standalone page (rendered outside the common page layout) to Console router.
606
607### Properties
608
609| Name | Value Type | Optional | Description |
610| ---- | ---------- | -------- | ----------- |
611| `component` | `CodeRef<React.ComponentType<RouteComponentProps<{}, StaticContext, any>>>` | no | The component to be rendered when the route matches. |
612| `path` | `string \| string[]` | no | Valid URL path or array of paths that `path-to-regexp@^1.7.0` understands. |
613| `exact` | `boolean` | yes | When true, will only match if the path matches the `location.pathname` exactly. |
614
615---
616
617## `console.perspective`
618
619### Summary
620
621(not available)
622
623### Properties
624
625| Name | Value Type | Optional | Description |
626| ---- | ---------- | -------- | ----------- |
627| `id` | `string` | no | The perspective identifier. |
628| `name` | `string` | no | The perspective display name. |
629| `icon` | `CodeRef<LazyComponent>` | no | The perspective display icon. |
630| `landingPageURL` | `CodeRef<(flags: { [key: string]: boolean; }, isFirstVisit: boolean) => string>` | no | The function to get perspective landing page URL. |
631| `importRedirectURL` | `CodeRef<(namespace: string) => string>` | no | The function to get redirect URL for import flow. |
632| `default` | `boolean` | yes | Whether the perspective is the default. There can only be one default. |
633| `defaultPins` | `ExtensionK8sModel[]` | yes | Default pinned resources on the nav |
634| `usePerspectiveDetection` | `CodeRef<() => [boolean, boolean]>` | yes | The hook to detect default perspective |
635
636---
637
638## `console.pvc/alert`
639
640### Summary
641
642(not available)
643
644### Properties
645
646| Name | Value Type | Optional | Description |
647| ---- | ---------- | -------- | ----------- |
648| `alert` | `CodeRef<React.ComponentType<{ pvc: K8sResourceCommon; }>>` | no | The alert component. |
649
650---
651
652## `console.pvc/create-prop`
653
654### Summary
655
656(not available)
657
658### Properties
659
660| Name | Value Type | Optional | Description |
661| ---- | ---------- | -------- | ----------- |
662| `label` | `string` | no | Label for the create prop action. |
663| `path` | `string` | no | Path for the create prop action. |
664
665---
666
667## `console.pvc/delete`
668
669### Summary
670
671(not available)
672
673### Properties
674
675| Name | Value Type | Optional | Description |
676| ---- | ---------- | -------- | ----------- |
677| `predicate` | `CodeRef<(pvc: K8sResourceCommon) => boolean>` | no | Predicate that tells whether to use the extension or not. |
678| `onPVCKill` | `CodeRef<(pvc: K8sResourceCommon) => Promise<void>>` | no | Method for the PVC delete operation. |
679| `alert` | `CodeRef<React.ComponentType<{ pvc: K8sResourceCommon; }>>` | no | Alert component to show additional information. |
680
681---
682
683## `console.pvc/status`
684
685### Summary
686
687(not available)
688
689### Properties
690
691| Name | Value Type | Optional | Description |
692| ---- | ---------- | -------- | ----------- |
693| `priority` | `number` | no | Priority for the status component. Bigger value means higher priority. |
694| `status` | `CodeRef<React.ComponentType<{ pvc: K8sResourceCommon; }>>` | no | The status component. |
695| `predicate` | `CodeRef<(pvc: K8sResourceCommon) => boolean>` | no | Predicate that tells whether to render the status component or not. |
696
697---
698
699## `console.redux-reducer`
700
701### Summary
702
703Adds new reducer to Console Redux store which operates on `plugins.<scope>` substate.
704
705### Properties
706
707| Name | Value Type | Optional | Description |
708| ---- | ---------- | -------- | ----------- |
709| `scope` | `string` | no | The key to represent the reducer-managed substate within the Redux state object. |
710| `reducer` | `CodeRef<Reducer<any, AnyAction>>` | no | The reducer function, operating on the reducer-managed substate. |
711
712---
713
714## `console.resource-metadata`
715
716### Summary
717
718Customize the display of models by overriding values retrieved and generated through API discovery.
719
720### Properties
721
722| Name | Value Type | Optional | Description |
723| ---- | ---------- | -------- | ----------- |
724| `model` | `ExtensionK8sGroupModel` | no | The model to customize. May specify only a group, or optional version and kind. |
725| `badge` | `'tech' \| 'dev'` | yes | Whether to consider this model reference as tech preview or dev preview. |
726| `color` | `string` | yes | The color to associate to this model. |
727| `label` | `string` | yes | Override the label. Requires `kind` be provided. |
728| `labelPlural` | `string` | yes | Override the plural label. Requires `kind` be provided. |
729| `abbr` | `string` | yes | Customize the abbreviation. Defaults to All uppercase chars in the kind up to 4 characters long. Requires `kind` be provided. |
730
731---
732
733## `console.resource/create`
734
735### Summary
736
737(not available)
738
739### Properties
740
741| Name | Value Type | Optional | Description |
742| ---- | ---------- | -------- | ----------- |
743| `model` | `ExtensionK8sModel` | no | The model for which this create resource page will be rendered. |
744| `component` | `CodeRef<React.ComponentType<CreateResourceComponentProps>>` | no | The component to be rendered when the model matches |
745
746---
747
748## `console.storage-provider`
749
750### Summary
751
752(not available)
753
754### Properties
755
756| Name | Value Type | Optional | Description |
757| ---- | ---------- | -------- | ----------- |
758| `name` | `string` | no | |
759| `Component` | `CodeRef<React.ComponentType<Partial<RouteComponentProps<{}, StaticContext, any>>>>` | no | |
760
761---
762
763## `console.tab/horizontalNav`
764
765### Summary
766
767(not available)
768
769### Properties
770
771| Name | Value Type | Optional | Description |
772| ---- | ---------- | -------- | ----------- |
773| `model` | `ExtensionK8sKindVersionModel` | no | The model for which this provider show tab. |
774| `page` | `{ name: string; href: string; }` | no | The page to be show in horizontal tab. It takes tab name as name and href of the tab |
775| `component` | `CodeRef<React.ComponentType<PageComponentProps<K8sResourceCommon>>>` | no | The component to be rendered when the route matches. |
776
777---
778
779## `console.telemetry/listener`
780
781### Summary
782
783(not available)
784
785### Properties
786
787| Name | Value Type | Optional | Description |
788| ---- | ---------- | -------- | ----------- |
789| `listener` | `CodeRef<TelemetryEventListener>` | no | Listen for telemetry events |
790
791---
792
793## `console.topology/adapter/build`
794
795### Summary
796
797BuildAdapter contributes an adapter to adapt element to data that can be used by Build component
798
799### Properties
800
801| Name | Value Type | Optional | Description |
802| ---- | ---------- | -------- | ----------- |
803| `adapt` | `CodeRef<(element: GraphElement) => AdapterDataType<BuildConfigData> \| undefined>` | no | |
804
805---
806
807## `console.topology/adapter/network`
808
809### Summary
810
811NetworkAdpater contributes an adapter to adapt element to data that can be used by Networking component
812
813### Properties
814
815| Name | Value Type | Optional | Description |
816| ---- | ---------- | -------- | ----------- |
817| `adapt` | `CodeRef<(element: GraphElement) => NetworkAdapterType \| undefined>` | no | |
818
819---
820
821## `console.topology/adapter/pod`
822
823### Summary
824
825PodAdapter contributes an adapter to adapt element to data that can be used by Pod component
826
827### Properties
828
829| Name | Value Type | Optional | Description |
830| ---- | ---------- | -------- | ----------- |
831| `adapt` | `CodeRef<(element: GraphElement) => AdapterDataType<PodsAdapterDataType> \| undefined>` | no | |
832
833---
834
835## `console.topology/component/factory`
836
837### Summary
838
839Getter for a ViewComponentFactory
840
841### Properties
842
843| Name | Value Type | Optional | Description |
844| ---- | ---------- | -------- | ----------- |
845| `getFactory` | `CodeRef<ViewComponentFactory>` | no | Getter for a ViewComponentFactory |
846
847---
848
849## `console.topology/create/connector`
850
851### Summary
852
853Getter for the create connector function
854
855### Properties
856
857| Name | Value Type | Optional | Description |
858| ---- | ---------- | -------- | ----------- |
859| `getCreateConnector` | `CodeRef<CreateConnectionGetter>` | no | Getter for the create connector function |
860
861---
862
863## `console.topology/data/factory`
864
865### Summary
866
867Topology Data Model Factory Extension
868
869### Properties
870
871| Name | Value Type | Optional | Description |
872| ---- | ---------- | -------- | ----------- |
873| `id` | `string` | no | Unique ID for the factory. |
874| `priority` | `number` | no | Priority for the factory |
875| `resources` | `WatchK8sResourcesGeneric` | yes | Resources to be fetched from useK8sWatchResources hook. |
876| `workloadKeys` | `string[]` | yes | Keys in resources containing workloads. |
877| `getDataModel` | `CodeRef<TopologyDataModelGetter>` | yes | Getter for the data model factory |
878| `isResourceDepicted` | `CodeRef<TopologyDataModelDepicted>` | yes | Getter for function to determine if a resource is depicted by this model factory |
879| `getDataModelReconciler` | `CodeRef<TopologyDataModelReconciler>` | yes | Getter for function to reconcile data model after all extensions' models have loaded |
880
881---
882
883## `console.topology/decorator/provider`
884
885### Summary
886
887Topology Decorator Provider Extension
888
889### Properties
890
891| Name | Value Type | Optional | Description |
892| ---- | ---------- | -------- | ----------- |
893| `id` | `string` | no | |
894| `priority` | `number` | no | |
895| `quadrant` | `TopologyDecoratorQuadrant` | no | |
896| `decorator` | `CodeRef<TopologyDecoratorGetter>` | no | |
897
898---
899
900## `console.topology/details/resource-alert`
901
902### Summary
903
904DetailsResourceAlert contributes an alert for specific topology context or graph element.
905
906### Properties
907
908| Name | Value Type | Optional | Description |
909| ---- | ---------- | -------- | ----------- |
910| `id` | `string` | no | The ID of this alert. Used to save state if the alert shouldn't be shown after dismissed. |
911| `contentProvider` | `CodeRef<(element: GraphElement) => DetailsResourceAlertContent \| null>` | no | Hook to return the contents of the Alert. |
912
913---
914
915## `console.topology/details/resource-link`
916
917### Summary
918
919DetailsResourceLink contributes a link for specific topology context or graph element.
920
921### Properties
922
923| Name | Value Type | Optional | Description |
924| ---- | ---------- | -------- | ----------- |
925| `link` | `CodeRef<(element: GraphElement) => React.Component \| undefined>` | no | Return the resource link if provided, otherwise undefined.<br/>Use ResourceIcon and ResourceLink for styles. |
926| `priority` | `number` | yes | A higher priority factory will get the first chance to create the link. |
927
928---
929
930## `console.topology/details/tab`
931
932### Summary
933
934DetailsTab contributes a tab for the topology details panel.
935
936### Properties
937
938| Name | Value Type | Optional | Description |
939| ---- | ---------- | -------- | ----------- |
940| `id` | `string` | no | A unique identifier for this details tab. |
941| `label` | `string` | no | The tab label to display in the UI. |
942| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here.<br/>For arrays, the first one found in order is used. |
943| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here.<br/>For arrays, the first one found in order is used.<br/>insertBefore takes precedence. |
944
945---
946
947## `console.topology/details/tab-section`
948
949### Summary
950
951DetailsTabSection contributes a section for a specific tab in topology details panel.
952
953### Properties
954
955| Name | Value Type | Optional | Description |
956| ---- | ---------- | -------- | ----------- |
957| `id` | `string` | no | A unique identifier for this details tab section. |
958| `tab` | `string` | no | The parent tab ID that this section should contribute to. |
959| `section` | `CodeRef<(element: GraphElement, renderNull?: () => null) => React.Component \| undefined>` | no | Returns a section for the graph element or undefined if not provided.<br/>SDK component: <Section title={<optional>}>... padded area </Section> |
960| `insertBefore` | `string \| string[]` | yes | Insert this item before the item referenced here.<br/>For arrays, the first one found in order is used. |
961| `insertAfter` | `string \| string[]` | yes | Insert this item after the item referenced here.<br/>For arrays, the first one found in order is used.<br/>insertBefore takes precedence. |
962
963---
964
965## `console.topology/display/filters`
966
967### Summary
968
969Topology Display Filters Extension
970
971### Properties
972
973| Name | Value Type | Optional | Description |
974| ---- | ---------- | -------- | ----------- |
975| `getTopologyFilters` | `CodeRef<() => TopologyDisplayOption[]>` | no | |
976| `applyDisplayOptions` | `CodeRef<TopologyApplyDisplayOptions>` | no | |
977
978---
979
980## `console.topology/relationship/provider`
981
982### Summary
983
984Topology relationship provider connector extension
985
986### Properties
987
988| Name | Value Type | Optional | Description |
989| ---- | ---------- | -------- | ----------- |
990| `provides` | `CodeRef<RelationshipProviderProvides>` | no | |
991| `tooltip` | `string` | no | |
992| `create` | `CodeRef<RelationshipProviderCreate>` | no | |
993| `priority` | `number` | no | |
994
995---
996
997## `console.user-preference/group`
998
999### Summary
1000
1001(not available)
1002
1003### Properties
1004
1005| Name | Value Type | Optional | Description |
1006| ---- | ---------- | -------- | ----------- |
1007| `id` | `string` | no | ID used to identify the user preference group. |
1008| `label` | `string` | no | The label of the user preference group |
1009| `insertBefore` | `string` | yes | ID of user preference group before which this group should be placed |
1010| `insertAfter` | `string` | yes | ID of user preference group after which this group should be placed |
1011
1012---
1013
1014## `console.user-preference/item`
1015
1016### Summary
1017
1018(not available)
1019
1020### Properties
1021
1022| Name | Value Type | Optional | Description |
1023| ---- | ---------- | -------- | ----------- |
1024| `id` | `string` | no | ID used to identify the user preference item and referenced in insertAfter and insertBefore to define the item order. |
1025| `label` | `string` | no | The label of the user preference |
1026| `description` | `string` | no | The description of the user preference. |
1027| `field` | `UserPreferenceField` | no | The input field options used to render the values to set the user preference. |
1028| `groupId` | `string` | yes | IDs used to identify the user preference groups the item would belong to. |
1029| `insertBefore` | `string` | yes | ID of user preference item before which this item should be placed |
1030| `insertAfter` | `string` | yes | ID of user preference item after which this item should be placed |
1031
1032---
1033
1034## `console.yaml-template`
1035
1036### Summary
1037
1038YAML templates for editing resources via the yaml editor.
1039
1040### Properties
1041
1042| Name | Value Type | Optional | Description |
1043| ---- | ---------- | -------- | ----------- |
1044| `model` | `ExtensionK8sModel` | no | Model associated with the template. |
1045| `template` | `CodeRef<string>` | no | The YAML template. |
1046| `name` | `string` | no | The name of the template. Use the name `default` to mark this as the default template. |
1047
1048---
1049
1050## `dev-console.add/action`
1051
1052### Summary
1053
1054(not available)
1055
1056### Properties
1057
1058| Name | Value Type | Optional | Description |
1059| ---- | ---------- | -------- | ----------- |
1060| `id` | `string` | no | ID used to identify the action. |
1061| `label` | `string` | no | The label of the action |
1062| `description` | `string` | no | The description of the action. |
1063| `href` | `string` | no | The href to navigate to. |
1064| `groupId` | `string` | yes | IDs used to identify the action groups the action would belong to. |
1065| `icon` | `CodeRef<React.ReactNode>` | yes | The perspective display icon. |
1066| `accessReview` | `AccessReviewResourceAttributes[]` | yes | Optional access review to control visibility / enablement of the action. |
1067
1068---
1069
1070## `dev-console.add/action-group`
1071
1072### Summary
1073
1074(not available)
1075
1076### Properties
1077
1078| Name | Value Type | Optional | Description |
1079| ---- | ---------- | -------- | ----------- |
1080| `id` | `string` | no | ID used to identify the action group. |
1081| `name` | `string` | no | The title of the action group |
1082| `insertBefore` | `string` | yes | ID of action group before which this group should be placed |
1083| `insertAfter` | `string` | yes | ID of action group after which this group should be placed |
1084