Skip to content

Commit 67c107a

Browse files
authored
Merge pull request #59263 from adellape/dynamicpluginref
2 parents 805de76 + 65c1f7e commit 67c107a

File tree

4 files changed

+92
-87
lines changed

4 files changed

+92
-87
lines changed

modules/dynamic-plug-in-api.adoc

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Module included in the following assemblies:
22
//
3-
// * web_console/dynamic-plug-ins-reference.adoc
3+
// * web_console/dynamic-plug-in/dynamic-plug-ins-reference.adoc
44

5-
:power-bi-url:
6-
https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_dom_d_.requestinit.html
5+
:power-bi-url: https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_dom_d_.requestinit.html
76
//needed to add an attribute for the url because escaping the underscore in the link would not work and the build was failing.
87

98
:_content-type: REFERENCE
@@ -48,7 +47,7 @@ Component for displaying a green check mark circle icon.
4847
|Parameter Name |Description
4948
|`className` |(optional) additional class name for the component
5049
|`title` |(optional) icon title
51-
|`size` |(optional) icon size: ('sm', 'md', 'lg', 'xl')
50+
|`size` |(optional) icon size: (`sm`, `md`, `lg`, `xl`)
5251
|===
5352

5453
[discrete]
@@ -67,7 +66,7 @@ Component for displaying a red exclamation mark circle icon.
6766
|Parameter Name |Description
6867
|`className` |(optional) additional class name for the component
6968
|`title` |(optional) icon title
70-
|`size` |(optional) icon size: ('sm', 'md', 'lg', 'xl')
69+
|`size` |(optional) icon size: (`sm`, `md`, `lg`, `xl`)
7170
|===
7271

7372
[discrete]
@@ -86,7 +85,7 @@ Component for displaying a yellow triangle exclamation icon.
8685
|Parameter Name |Description
8786
|`className` |(optional) additional class name for the component
8887
|`title` |(optional) icon title
89-
|`size` |(optional) icon size: ('sm', 'md', 'lg', 'xl')
88+
|`size` |(optional) icon size: (`sm`, `md`, `lg`, `xl`)
9089
|===
9190

9291
[discrete]
@@ -219,7 +218,11 @@ Hook that provides information about user access to a given resource. It returns
219218
[discrete]
220219
== `useResolvedExtensions`
221220

222-
React hook for consuming Console extensions with resolved `CodeRef` properties. This hook accepts the same argument(s) as `useExtensions` hook and returns an adapted list of extension instances, resolving all code references within each extension's properties. Initially, the hook returns an empty array. Once the resolution is complete, the React component is re-rendered with the hook returning an adapted list of extensions. When the list of matching extensions changes, the resolution is restarted. The hook will continue to return the previous result until the resolution completes. The hook's result elements are guaranteed to be referentially stable across re-renders. It returns a tuple containing a list of adapted extension instances with resolved code references, a boolean flag indicating whether the resolution is complete, and a list of errors detected during the resolution.
221+
React hook for consuming Console extensions with resolved `CodeRef` properties. This hook accepts the same argument(s) as `useExtensions` hook and returns an adapted list of extension instances, resolving all code references within each extension's properties.
222+
223+
Initially, the hook returns an empty array. After the resolution is complete, the React component is re-rendered with the hook returning an adapted list of extensions. When the list of matching extensions changes, the resolution is restarted. The hook will continue to return the previous result until the resolution completes.
224+
225+
The hook's result elements are guaranteed to be referentially stable across re-renders. It returns a tuple containing a list of adapted extension instances with resolved code references, a boolean flag indicating whether the resolution is complete, and a list of errors detected during the resolution.
223226

224227
.Example
225228
[source,ts]
@@ -239,7 +242,7 @@ not the extension meets desired type constraints
239242
[discrete]
240243
== `HorizontalNav`
241244

242-
A component that creates a Navigation bar for a page.- Routing is handled as part of the component.- `console.tab/horizontalNav` can be used to add additional content to any horizontal nav.
245+
A component that creates a Navigation bar for a page. Routing is handled as part of the component. `console.tab/horizontalNav` can be used to add additional content to any horizontal navigation.
243246

244247
.Example
245248

@@ -331,7 +334,7 @@ const PodRow: React.FC<RowProps<K8sResourceCommon>> = ({ obj, activeColumnIDs })
331334
[cols=",",options="header",]
332335
|===
333336
|Parameter Name |Description
334-
|`id` |unique id for table
337+
|`id` |unique ID for table
335338
|`activeColumnIDs` |active columns
336339
|`className` |(optional) option class name for styling
337340
|===
@@ -365,9 +368,9 @@ TableColumns
365368
namespace column will be included, regardless of column management
366369
selections
367370

368-
|`\{string} [options.columnManagementID]` |(optional) A unique id
371+
|`\{string} [options.columnManagementID]` |(optional) A unique ID
369372
used to persist and retrieve column management selections to and from
370-
user settings. Usually a 'group~verion~kind' string for a resource.
373+
user settings. Usually a group/version/kind (GVK) string for a resource.
371374
|===
372375

373376
A tuple containing the current user selected active columns (a subset of options.columns), and a boolean flag indicating whether user settings have been loaded.
@@ -692,7 +695,7 @@ const Component: React.FC = () => {
692695
|Parameter Name |Description
693696
|`groupVersionKind` |group, version, kind of k8s resource
694697
K8sGroupVersionKind is preferred alternatively can pass reference for
695-
group, version, kind which is deprecated i.e `group~version~kind` K8sResourceKindReference.
698+
group, version, kind which is deprecated, i.e, group/version/kind (GVK) K8sResourceKindReference.
696699
|===
697700

698701
[discrete]
@@ -754,7 +757,7 @@ const Component: React.FC = () => {
754757
[cols=",",options="header",]
755758
|===
756759
|Parameter Name |Description
757-
|`initResources` |resources need to be watched as key-value pair,
760+
|`initResources` |Resources must be watched as key-value pair,
758761
wherein key will be unique to resource and value will be options needed
759762
to watch for the respective resource.
760763
|===
@@ -813,12 +816,12 @@ the active cluster the user has selected
813816
[discrete]
814817
== `getConsoleRequestHeaders`
815818

816-
A function that creates impersonation and multicluster related headers for API requests using current redux state. it returns an object containing the appropriate impersonation and clustr requst headers, based on redux state.
819+
A function that creates impersonation and multicluster related headers for API requests using current redux state. It returns an object containing the appropriate impersonation and clustr requst headers, based on redux state.
817820

818821
[cols=",",options="header",]
819822
|===
820823
|Parameter Name |Description
821-
|`targetCluster` |override the current active cluster with the provided
824+
|`targetCluster` |Override the current active cluster with the provided
822825
targetCluster
823826
|===
824827

@@ -835,7 +838,7 @@ model. In case of failure, the promise gets rejected with HTTP error response.
835838

836839
|`options.model` |k8s model
837840

838-
|`options.name` |The name of the resource, if not provided then it'll
841+
|`options.name` |The name of the resource, if not provided then it will
839842
look for all the resources matching the model.
840843

841844
|`options.ns` | The namespace to look into, should not be specified
@@ -847,7 +850,7 @@ for cluster-scoped resources.
847850
URL.
848851

849852
|`options.requestInit` |The fetch init object to use. This can have
850-
request headers, method, redirect, etc. See more link:{power-bi-url}[Interface RequestInit]
853+
request headers, method, redirect, etc. See link:{power-bi-url}[Interface RequestInit] for more.
851854
|===
852855

853856
[discrete]
@@ -862,7 +865,7 @@ It creates a resource in the cluster, based on the provided options. It returns
862865

863866
|`options.model` |k8s model
864867

865-
|`options.data` |payload for the resource to be created
868+
|`options.data` |Payload for the resource to be created
866869

867870
|`options.path` |Appends as subpath if provided
868871

@@ -878,16 +881,16 @@ It updates the entire resource in the cluster, based on providedoptions. When a
878881
[cols=",",options="header",]
879882
|===
880883
|Parameter Name |Description
881-
|`options` |which are passed as key-value pair in the map
884+
|`options` |Which are passed as key-value pair in the map
882885

883886
|`options.model` | k8s model
884887

885-
|`options.data` |payload for the k8s resource to be updated
888+
|`options.data` |Payload for the k8s resource to be updated
886889

887-
|`options.ns` |namespace to look into, it should not be specified for
890+
|`options.ns` |Namespace to look into, it should not be specified for
888891
cluster-scoped resources.
889892

890-
|`options.name` |resource name to be updated.
893+
|`options.name` |Resource name to be updated.
891894

892895
|`options.path` | Appends as subpath if provided
893896

@@ -899,7 +902,7 @@ URL.
899902
== `k8sPatchResource`
900903

901904
It patches any resource in the cluster, based on provided options. When a client needs to perform the partial update, they can use
902-
k8sPatch. Alternatively can use k8sUpdate to replace an existing resource entirely. See more link:https://datatracker.ietf.org/doc/html/rfc6902[Data Tracker]. It returns a promise that resolves to the response of the resource patched. In case of failure promise gets rejected with HTTP error response.
905+
k8sPatch. Alternatively can use k8sUpdate to replace an existing resource entirely. See link:https://datatracker.ietf.org/doc/html/rfc6902[Data Tracker] for more. It returns a promise that resolves to the response of the resource patched. In case of failure promise gets rejected with HTTP error response.
903906

904907
[cols=",",options="header",]
905908
|===
@@ -922,7 +925,7 @@ URL.
922925
[discrete]
923926
== `k8sDeleteResource`
924927

925-
It deletes resources from the cluster, based on the provided model, resource. The garbage collection works based on 'Foreground'|'Background', can be configured with propagationPolicy property in provided model or passed in json. It returns a promise that resolves to the response of kind Status. In case of failure promise gets rejected with HTTP error response.
928+
It deletes resources from the cluster, based on the provided model, resource. The garbage collection works based on `Foreground`|`Background` can be configured with propagationPolicy property in provided model or passed in json. It returns a promise that resolves to the response of kind Status. In case of failure promise gets rejected with HTTP error response.
926929

927930
.Example
928931
`kind: 'DeleteOptions', apiVersion: 'v1', propagationPolicy`
@@ -931,7 +934,7 @@ It deletes resources from the cluster, based on the provided model, resource. Th
931934
[cols=",",options="header",]
932935
|===
933936
|Parameter Name |Description
934-
|`options` |which are passed as key-value pair in the map.
937+
|`options` |Which are passed as key-value pair in the map.
935938

936939
|`options.model` | k8s model
937940

@@ -943,7 +946,7 @@ It deletes resources from the cluster, based on the provided model, resource. Th
943946
URL.
944947

945948
|`options.requestInit` |The fetch init object to use. This can have
946-
request headers, method, redirect, etc. See more link:{power-bi-url}[Interface Request Init]
949+
request headers, method, redirect, etc. See link:{power-bi-url}[Interface RequestInit] for more.
947950

948951

949952
|`options.json` |Can control garbage collection of resources
@@ -966,13 +969,13 @@ Lists the resources as an array in the cluster, based on provided options. It re
966969
URL and can pass label selector's as well with key "labelSelector".
967970

968971
|`options.requestInit` |The fetch init object to use. This can have
969-
request headers, method, redirect, etc. See more link:{power-bi-url}[Interface RequestInit]
972+
request headers, method, redirect, etc. See link:{power-bi-url}[Interface RequestInit] for more.
970973
|===
971974

972975
[discrete]
973976
== `k8sListResourceItems`
974977

975-
Same interface as k8sListResource but returns the sub items. It returns the apiVersion for the model i.e `group/version`.
978+
Same interface as k8sListResource but returns the sub items. It returns the apiVersion for the model, i.e., `group/version`.
976979

977980
[discrete]
978981
== `getAPIVersionForModel`
@@ -988,7 +991,7 @@ Provides apiVersion for a k8s model.
988991
[discrete]
989992
== `getGroupVersionKindForResource`
990993

991-
Provides a group, version, and kind for a resource. It returns the group, version, kind for the provided resource. If the resource does not have an API group, group "core" will be returned.If the resource has an invalid apiVersion then it'll throw Error.
994+
Provides a group, version, and kind for a resource. It returns the group, version, kind for the provided resource. If the resource does not have an API group, group "core" will be returned. If the resource has an invalid apiVersion, then it will throw an Error.
992995

993996
[cols=",",options="header",]
994997
|===
@@ -1270,14 +1273,14 @@ section on top of the editor.
12701273
|`onSave` |Callback called when the command CTRL / CMD + S is triggered.
12711274

12721275
|`ref` |React reference to `{ editor?: IStandaloneCodeEditor }`. Using
1273-
the 'editor' property, you are able to access to all methods to control
1276+
the `editor` property, you are able to access to all methods to control
12741277
the editor.
12751278
|===
12761279

12771280
[discrete]
12781281
== `ResourceYAMLEditor`
12791282

1280-
A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality likeresource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless `onSave` callback is provided, the resource update is automatically handled.It should be wrapped in a React.Suspense component.
1283+
A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality likeresource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless `onSave` callback is provided, the resource update is automatically handled.It should be wrapped in a `React.Suspense` component.
12811284

12821285
.Example
12831286
[source,text]
@@ -1476,7 +1479,7 @@ Creates full page ErrorBoundaryFallbackPage component to display the "Oh no! Som
14761479
[discrete]
14771480
== `PerspectiveContext`
14781481

1479-
@deprecated - use the provided `usePerspectiveContext` insteadCreates the perspective context.
1482+
Deprecated: Use the provided `usePerspectiveContext` instead. Creates the perspective context.
14801483

14811484
[cols=",",options="header",]
14821485
|===
@@ -1487,8 +1490,7 @@ Creates full page ErrorBoundaryFallbackPage component to display the "Oh no! Som
14871490
[discrete]
14881491
== `useAccessReviewAllowed`
14891492

1490-
@deprecated - Use useAccessReview from @console/dynamic-plugin-sdk instead.Hook that provides allowed status about user access to a given
1491-
resource. It returns the `isAllowed` boolean value.
1493+
Deprecated: Use `useAccessReview` from `@console/dynamic-plugin-sdk` instead. Hook that provides allowed status about user access to a given resource. It returns the `isAllowed` boolean value.
14921494

14931495
[cols=",",options="header",]
14941496
|===
@@ -1500,11 +1502,12 @@ resource. It returns the `isAllowed` boolean value.
15001502
[discrete]
15011503
== `useSafetyFirst`
15021504

1503-
@deprecated - This hook is not related to console functionality.Hook that ensures a safe asynchronnous setting of React state in case a given
1504-
component could be unmounted. It returns an array with a pair of state value and it's set function.
1505+
Deprecated: This hook is not related to console functionality. Hook that ensures a safe asynchronnous setting of React state in case a given component could be unmounted. It returns an array with a pair of state value and its set function.
15051506

15061507
[cols=",",options="header",]
15071508
|===
15081509
|Parameter Name |Description
15091510
|`initialState` |initial state value
15101511
|===
1512+
1513+
:!power-bi-url:

0 commit comments

Comments
 (0)