Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docusaurus/docs/extensions/api/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ _Arguments_

`where` string parameter admissable values for this method:

| Key | Type | Description |
|---|---|---|
|`ActionLocation.HEADER`| String | Location for an action on the Header of Rancher Dashboard |
|`ActionLocation.TABLE`| String | Location for an action on a List View Table of Rancher Dashboard |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`ActionLocation.HEADER`| String | v2.7.2 | Location for an action on the Header of Rancher Dashboard |
|`ActionLocation.TABLE`| String | v2.7.2 | Location for an action on a List View Table of Rancher Dashboard |

<br/>

Expand Down
6 changes: 3 additions & 3 deletions docusaurus/docs/extensions/api/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ _Arguments_

`where` string parameter admissable values for this method:

| Key | Type | Description |
|---|---|---|
|`CardLocation.CLUSTER_DASHBOARD_CARD`| String | Location for a card on the Cluster Dashboard page |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`CardLocation.CLUSTER_DASHBOARD_CARD`| String | v2.7.2 | Location for a card on the Cluster Dashboard page |

<br/>

Expand Down
12 changes: 6 additions & 6 deletions docusaurus/docs/extensions/api/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ The admissable string values for the `where` are:
|---|---|---|---|
|`ActionLocation.HEADER`| String | 2.7.2 | Location for an action on the Header of Rancher Dashboard. Check [screenshot](./actions/#actionlocationheader-options) for location. |
|`ActionLocation.TABLE`| String | 2.7.2 | Location for an action on a List View Table of Rancher Dashboard. Check [screenshot](./actions/#actionlocationtable-options) for location. |
|`TabLocation.RESOURCE_SHOW_CONFIGURATION`| String | 2.14.0 | Location for a Tab on the "Show configuration" slide-in panel in Resource Detail page. Check [screenshot](./tabs/#tablocationresource_show_configuration-options) for location. |
|`TabLocation.RESOURCE_CREATE_PAGE`| String | 2.14.0 | Location for a Tab on a Resource Create page. Check [screenshot](./tabs/#tablocationresource_create_page-options) for location. |
|`TabLocation.RESOURCE_EDIT_PAGE`| String | 2.14.0 | Location for a Tab on a Resource Edit page. Check [screenshot](./tabs/#tablocationresource_edit_page-options) for location. |
|`TabLocation.RESOURCE_DETAIL_PAGE`| String | 2.14.0 | Location for a Tab on a Resource Detail page. Check [screenshot](./tabs/#tablocationresource_detail_page-options) for location. |
|`TabLocation.ALL`| String | 2.14.0 | Generic location for a Tab on any given page. Can be further specified with the appropriate `LocationConfig` params. |
|`TabLocation.RESOURCE_SHOW_CONFIGURATION`| String | 2.12.6, 2.13.2, 2.14.0 | Location for a Tab on the "Show configuration" slide-in panel in Resource Detail page. Check [screenshot](./tabs/#tablocationresource_show_configuration-options) for location. |
|`TabLocation.RESOURCE_CREATE_PAGE`| String | 2.12.6, 2.13.2, 2.14.0 | Location for a Tab on a Resource Create page. Check [screenshot](./tabs/#tablocationresource_create_page-options) for location. |
|`TabLocation.RESOURCE_EDIT_PAGE`| String | 2.12.6, 2.13.2, 2.14.0 | Location for a Tab on a Resource Edit page. Check [screenshot](./tabs/#tablocationresource_edit_page-options) for location. |
|`TabLocation.RESOURCE_DETAIL_PAGE`| String | 2.12.6, 2.13.2, 2.14.0 | Location for a Tab on a Resource Detail page. Check [screenshot](./tabs/#tablocationresource_detail_page-options) for location. |
|`TabLocation.CLUSTER_CREATE_RKE2`| String | 2.13.0 | Location for a Tab on the Cluster Configuration area in Cluster Provisioning |
|`TabLocation.OTHER`| String | 2.12.6, 2.13.2, 2.14.0 | Other Tab locations different than the ones specified above in order to cover different scenarios. Can be further specified with the appropriate `LocationConfig` params. |
|`TabLocation.RESOURCE_DETAIL`| String | 2.7.2 (deprecated from 2.14.0) | Location for a Tab on a Resource Detail page. Check [screenshot](./tabs/#tablocationresource_detail-options) for location. |
|`PanelLocation.DETAILS_MASTHEAD`| String | 2.7.2 | Location for a panel on the Details Masthead area of a Resource Detail page. Check [screenshot](./panels/#panellocationdetails_masthead-options) for location. |
|`PanelLocation.DETAIL_TOP`| String | 2.7.2 | Location for a panel on the Detail Top area of a Resource Detail page. Check [screenshot](./panels/#panellocationdetail_top-options) for location. |
Expand Down Expand Up @@ -63,7 +63,7 @@ With this it's then possible to easily identify the parameters needed to populat

The admissible parameters for the `LocationConfig` object are:

| Key | Compatible Version | Type | Description |
| Key | Rancher Version | Type | Description |
|---|---|---|---|
|`product`| `v2.7.2` | Array | Array of the product identifier. Ex: `fleet`, `manager` (Cluster Management), `harvesterManager` (Virtualization Management), `explorer` (Cluster Explorer) or `home` (Homepage) |
|`resource`| `v2.7.2` + `v2.8.0` | Array | Array of the identifier of the kubernetes resource to be bound to. Ex: `apps.deployment`, `storage.k8s.io.storageclass` or `secret` (v2.7.2). You can also define a wildcard, ex: `['*']`, which will match any resource page (v2.8.0) |
Expand Down
19 changes: 10 additions & 9 deletions docusaurus/docs/extensions/api/panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Panels are added to Rancher via the `addPanel` method.

## addPanel

*(Rancher version v2.7.2)*
*(From Rancher version v2.7.2)*

This method adds a panel/content to the UI.

Expand All @@ -20,11 +20,12 @@ _Arguments_

`where` string parameter admissable values for this method:

| Key | Type | Description |
|---|---|---|
|`PanelLocation.DETAILS_MASTHEAD`| String | Location for a panel on the Details Masthead area of a Resource Detail page (only for modes `detail` (v2.7.2), `edit` (v2.7.2), `config` (v2.7.2) and `create` (v2.7.7)) |
|`PanelLocation.DETAIL_TOP`| String | Location for a panel on the Detail Top area of a Resource Detail page (only for modes `detail` (v2.7.2), `edit` (v2.7.2), `config` (v2.7.) and `create` (v2.7.7)) |
|`PanelLocation.RESOURCE_LIST`| String | Location for a panel on a Resource List View page (above the table area - only for mode `list` (v2.7.2)) |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`PanelLocation.DETAILS_MASTHEAD`| String | v2.7.2 | Location for a panel on the Details Masthead area of a Resource Detail page (only for modes `detail`, `edit`, `config` and `create` (v2.7.7)) |
|`PanelLocation.DETAIL_TOP`| String | v2.7.2 | Location for a panel on the Detail Top area of a Resource Detail page (only for modes `detail`, `edit`, `config` and `create` (v2.7.7)) |
|`PanelLocation.RESOURCE_LIST`| String | v2.7.2 | Location for a panel on a Resource List View page (above the table area - only for mode `list` (v2.7.2)) |
|`PanelLocation.ABOUT_TOP`| String | v2.13.0 | Location for a panel on the About page of Rancher Dashboard |

<br/>

Expand Down Expand Up @@ -93,9 +94,9 @@ plugin.addPanel(

`options` config object. Admissable parameters for the `options` with `'PanelLocation.RESOURCE_LIST'` are:

| Key | Type | Description |
|---|---|---|
|`component`| Function | Component to be rendered as content above a table on a "list view" |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`component`| Function | v2.7.2 | Component to be rendered as content above a table on a "list view" |

Usage example for `'PanelLocation.RESOURCE_LIST'`:

Expand Down
14 changes: 8 additions & 6 deletions docusaurus/docs/extensions/api/table-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Table Columns are added to Rancher via the `addTableColumn` method.

## addTableColumn

*(Rancher version v2.7.2)*
*(From Rancher version v2.7.2)*

This method adds a table column to a `ResourceTable` element-based table on the UI.

Expand All @@ -18,21 +18,21 @@ _Arguments_

`where` string parameter admissible values for this method:

| Key | Type | Description |
|---|---|---|
|`TableColumnLocation.RESOURCE`| String | Location for a table column on a Resource List View page |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`TableColumnLocation.RESOURCE`| String | v2.7.2 | Location for a table column on a Resource List View page |

<br/>

`when` Object admissible values:

`LocationConfig` as described above for the [LocationConfig object](./common#locationconfig).

*(From Rancher version v2.13.0)*
*(**From Rancher version v2.13.0**)*

An addition parameter can be provided which will be used to support the column when server-side pagination is enabled. For more information and other changes required to server-side pagination see [here](../performance/scaling/lists.md).

*(From Rancher version v2.14.0)*
*(**From Rancher version v2.14.0**)*

when adding a new column to a table on Rancher Dashboard, the default is for the table column to be added just before the `Age` column.

Expand All @@ -44,6 +44,8 @@ plugin.addTableColumn(where: String, when: LocationConfig, column: TableColumn,

### TableColumnLocation.RESOURCE column

*(From Rancher version v2.7.2)*

![Table Col](../screenshots/table-cols.png)

`column` config object. Admissible parameters for the `column` with `'TableColumnLocation.RESOURCE'` are:
Expand Down
10 changes: 6 additions & 4 deletions docusaurus/docs/extensions/api/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Table extension points in Rancher Dashboard.

## addTableHook

*(Rancher version v2.14.0)*
*(From Rancher version v2.14.0)*

This method adds a hook to a `ResourceTable` element-based table on the UI. This allows to react to table events like changing page, sorting or filtering.

Expand All @@ -18,9 +18,9 @@ _Arguments_

`where` string parameter admissible values for this method:

| Key | Type | Description |
|---|---|---|
|`TableLocation.RESOURCE`| String | Location for a table on a Resource List View page |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`TableLocation.RESOURCE`| String | v2.14.0 | Location for a table on a Resource List View page |

<br/>

Expand All @@ -30,6 +30,8 @@ _Arguments_

### TableLocation.RESOURCE action

*(From Rancher version v2.14.0)*

`action` config object. Admissible parameters for the `action` with `'TableLocation.RESOURCE'` are:

| Key | Type | Description |
Expand Down
64 changes: 32 additions & 32 deletions docusaurus/docs/extensions/api/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tabs are added to Rancher via the `addTab` method.

## addTab

*(Rancher version v2.7.2)*
*(From Rancher version v2.7.2)*

This method adds a tab to the UI.

Expand All @@ -21,15 +21,15 @@ _Arguments_

`where` string parameter admissable values for this method:

| Key | Type | Description |
|---|---|---|
|`TabLocation.RESOURCE_SHOW_CONFIGURATION`| String | Location for a Tab on a Resource Show Configuration *(From Rancher version v2.14.0)* |
|`TabLocation.RESOURCE_CREATE_PAGE`| String | Location for a Tab on a Resource Create page |
|`TabLocation.RESOURCE_EDIT_PAGE`| String | Location for a Tab on a Resource Edit page |
|`TabLocation.RESOURCE_DETAIL_PAGE`| String | Location for a Tab on a Resource Detail page |
|`TabLocation.ALL`| String | Generic location for a Tab on any given page. Can be further specified with the appropriate `LocationConfig` params. |
|`TabLocation.CLUSTER_CREATE_RKE2`| String | Location for a Tab on the Cluster Configuration area in Cluster Provisioning |
|`TabLocation.RESOURCE_DETAIL`| String | Location for a Tab on a Resource Detail page |
| Key | Type | Rancher Version | Description |
|---|---|---|---|
|`TabLocation.RESOURCE_SHOW_CONFIGURATION`| String | v2.12.6, v2.13.2, v2.14.0 | Location for a Tab on a Resource Show Configuration |
|`TabLocation.RESOURCE_CREATE_PAGE`| String | v2.12.6, v2.13.2, v2.14.0 | Location for a Tab on a Resource Create page |
|`TabLocation.RESOURCE_EDIT_PAGE`| String | v2.12.6, v2.13.2, v2.14.0 | Location for a Tab on a Resource Edit page |
|`TabLocation.RESOURCE_DETAIL_PAGE`| String | v2.12.6, v2.13.2, v2.14.0 | Location for a Tab on a Resource Detail page |
|`TabLocation.CLUSTER_CREATE_RKE2`| String | v2.13.0 | Location for a Tab on the Cluster Configuration area in Cluster Provisioning |
|`TabLocation.OTHER`| String | v2.12.6, v2.13.2, v2.14.0 | Other Tab locations different than the ones specified above in order to cover different scenarios. Can be further specified with the appropriate `LocationConfig` params. |
|`TabLocation.RESOURCE_DETAIL`| String | v2.7.2 - **deprecated from v2.14.0** | Location for a Tab on a Resource Detail page |

<br/>

Expand All @@ -43,7 +43,7 @@ _Arguments_

### TabLocation.RESOURCE_SHOW_CONFIGURATION options

*(From Rancher version v2.14.0)*
*(From Rancher versions v2.12.6, v2.13.2, v2.14.0)*

![Tabs](../screenshots/add-tab-show-configuration.png)

Expand Down Expand Up @@ -79,7 +79,7 @@ plugin.addTab(

### TabLocation.RESOURCE_CREATE_PAGE options

*(From Rancher version v2.14.0)*
*(From Rancher versions v2.12.6, v2.13.2, v2.14.0)*

![Tabs](../screenshots/add-tab-create.png)

Expand Down Expand Up @@ -115,7 +115,7 @@ plugin.addTab(

### TabLocation.RESOURCE_EDIT_PAGE options

*(From Rancher version v2.14.0)*
*(From Rancher versions v2.12.6, v2.13.2, v2.14.0)*

![Tabs](../screenshots/add-tab-edit.png)

Expand Down Expand Up @@ -151,7 +151,7 @@ plugin.addTab(

### TabLocation.RESOURCE_DETAIL_PAGE options

*(From Rancher version v2.14.0)*
*(From Rancher versions v2.12.6, v2.13.2, v2.14.0)*

![Tabs](../screenshots/add-tab-detail.png)

Expand Down Expand Up @@ -186,11 +186,15 @@ plugin.addTab(
```


### TabLocation.ALL options
### TabLocation.CLUSTER_CREATE_RKE2 options

*(From Rancher version v2.13.0)*

*(From Rancher version v2.14.0)*
![Tabs](../screenshots/cluster-config-tab-create.png)

`options` config object. Admissible parameters for the `options` with `'TabLocation.ALL'` are:
> NOTE: this tab will be added in the CREATE cluster interface, Cluster Configuration. If you want to target a specific provider and rke type use the `queryParam` in the location config. Ex: `queryParam: { type: 'digitalocean', rkeType: 'rke2' }`

`options` config object. Admissable parameters for the `options` with `'TabLocation.CLUSTER_CREATE_RKE2'` are:

| Key | Type | Description |
|---|---|---|
Expand All @@ -206,8 +210,11 @@ Usage example:

```ts
plugin.addTab(
TabLocation.ALL,
{ resource: ['pod'] },
TabLocation.CLUSTER_CREATE_RKE2,
{
resource: ['provisioning.cattle.io.cluster'],
queryParam: { type: 'digitalocean', rkeType: 'rke2' }
},
{
name: 'some-name',
labelKey: 'plugin-examples.tab-label',
Expand All @@ -220,15 +227,11 @@ plugin.addTab(
);
```

### TabLocation.CLUSTER_CREATE_RKE2 options

*(From Rancher version v2.13.0)*
### TabLocation.OTHER options

![Tabs](../screenshots/cluster-config-tab-create.png)

> NOTE: this tab will be added in the CREATE cluster interface, Cluster Configuration. If you want to target a specific provider and rke type use the `queryParam` in the location config. Ex: `queryParam: { type: 'digitalocean', rkeType: 'rke2' }`
*(From Rancher versions v2.12.6, v2.13.2, v2.14.0)*

`options` config object. Admissable parameters for the `options` with `'TabLocation.CLUSTER_CREATE_RKE2'` are:
`options` config object. Admissible parameters for the `options` with `'TabLocation.OTHER'` are:

| Key | Type | Description |
|---|---|---|
Expand All @@ -244,11 +247,8 @@ Usage example:

```ts
plugin.addTab(
TabLocation.CLUSTER_CREATE_RKE2,
{
resource: ['provisioning.cattle.io.cluster'],
queryParam: { type: 'digitalocean', rkeType: 'rke2' }
},
TabLocation.OTHER,
{ resource: ['pod'] },
{
name: 'some-name',
labelKey: 'plugin-examples.tab-label',
Expand All @@ -265,7 +265,7 @@ plugin.addTab(

*(From Rancher version v2.7.2)*

**deprecated from Rancher version 2.14.0 and onwards - use TabLocation.ALL**
**deprecated from Rancher version 2.14.0 and onwards - use TabLocation.OTHER**

![Tabs](../screenshots/add-tab.png)

Expand Down
2 changes: 1 addition & 1 deletion shell/components/Tabbed/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export default {
} else if (this.isInResourceCreatePage) {
return TabLocation.RESOURCE_CREATE_PAGE;
} else {
return TabLocation.ALL;
return TabLocation.OTHER;
}
},
hasIcon(tab) {
Expand Down
2 changes: 1 addition & 1 deletion shell/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export enum PanelLocation {
/** Enum regarding tab locations that are extensible in the UI */
export enum TabLocation {
RESOURCE_DETAIL = 'tab', // eslint-disable-line no-unused-vars
ALL = 'tab-all-pages', // eslint-disable-line no-unused-vars
OTHER = 'other-tab-locations', // eslint-disable-line no-unused-vars
RESOURCE_DETAIL_PAGE = 'resource-detail-page', // eslint-disable-line no-unused-vars
RESOURCE_CREATE_PAGE = 'resource-create-page', // eslint-disable-line no-unused-vars
RESOURCE_EDIT_PAGE = 'resource-edit-page', // eslint-disable-line no-unused-vars
Expand Down