Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PagePo from '@/cypress/e2e/po/pages/page.po';
*/
export default class FleetApplicationDetailsPo extends PagePo {
private static createPath(fleetWorkspace: string, appName: string, type: string) {
return `/c/_/fleet/application/${ type }/${ fleetWorkspace }/${ appName }`;
return `/c/_/fleet/${ type }/${ fleetWorkspace }/${ appName }`;
}

static goTo(path: string): Cypress.Chainable<Cypress.AUTWindow> {
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/po/pages/fleet/fleet.cattle.io.application.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ResourceTablePo from '@/cypress/e2e/po/components/resource-table.po';
import RadioGroupInputPo from '@/cypress/e2e/po/components/radio-group-input.po';

export class FleetApplicationListPagePo extends BaseListPagePo {
static url = `/c/_/fleet/application`;
static url = `/c/_/fleet`;

constructor() {
super(FleetApplicationListPagePo.url);
Expand Down Expand Up @@ -41,7 +41,7 @@ export class FleetApplicationCreatePo extends BaseDetailPagePo {
}

constructor() {
super('/c/_/fleet/application/create');
super('/c/_/fleet/create');
}

createGitRepo() {
Expand All @@ -55,7 +55,7 @@ export class FleetApplicationCreatePo extends BaseDetailPagePo {

export class FleetGitRepoCreateEditPo extends BaseDetailPagePo {
private static createPath(fleetWorkspace?: string, gitRepoName?: string) {
const root = `/c/_/fleet/application/fleet.cattle.io.gitrepo`;
const root = `/c/_/fleet/fleet.cattle.io.gitrepo`;

return fleetWorkspace ? `${ root }/${ fleetWorkspace }/${ gitRepoName }` : `${ root }/create`;
}
Expand Down Expand Up @@ -139,7 +139,7 @@ export class FleetGitRepoCreateEditPo extends BaseDetailPagePo {

export class FleetGitRepoDetailsPo extends BaseDetailPagePo {
private static createPath(fleetWorkspace: string, gitRepoName: string) {
return `/c/_/fleet/application/fleet.cattle.io.gitrepo/${ fleetWorkspace }/${ gitRepoName }`;
return `/c/_/fleet/fleet.cattle.io.gitrepo/${ fleetWorkspace }/${ gitRepoName }`;
}

static goTo(path: string): Cypress.Chainable<Cypress.AUTWindow> {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/po/pages/fleet/fleet.cattle.io.helmop.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import RadioGroupInputPo from '@/cypress/e2e/po/components/radio-group-input.po'

export class FleetHelmOpCreateEditPo extends BaseDetailPagePo {
private static createPath(fleetWorkspace?: string, helmOpName?: string) {
const root = `/c/_/fleet/application/fleet.cattle.io.helmop`;
const root = `/c/_/fleet/fleet.cattle.io.helmop`;

return fleetWorkspace ? `${ root }/${ fleetWorkspace }/${ helmOpName }` : `${ root }/create`;
}
Expand Down
34 changes: 33 additions & 1 deletion docusaurus/docs/extensions/api/nav/product-registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,20 @@ A page inside a product that renders a Vue component you provide. Equivalent to
| `labelKey` | `string` | Yes* | Translation key for the label |
| `component` | `RouteComponent` | Yes | Vue component to render |
| `weight` | `number` | No | Side-menu ordering (bigger number on top) |
| `config` | [`CustomPageConfiguration`](#CustomPageConfiguration) | No | Optional configuration for the page |

### `CustomPageConfiguration`

Configuration options for a custom page, passed via the `config` property of `ProductChildCustomPage`. These control visibility conditions, routing, and navigation behavior.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `ifHave` | `boolean` | No | Display only if a condition is met (relates to `IF_HAVE` in the store) |
| `ifFeature` | `string` | No | Display only if the specified feature flag is present |
| `ifHaveType` | `string` | No | Display only if the specified resource type exists |
| `ifHaveVerb` | `string` | No | Used with `ifHaveType` — display only if the resource type allows this verb (`GET`, `POST`, `PUT`, `DELETE`) |
| `namespaced` | `boolean` | No | Whether this custom page is namespaced |
| `exact` | `boolean` | No | Whether this custom page requires an exact route match |

### `ProductChildResourcePage`

Expand All @@ -350,13 +364,31 @@ A page that displays a Kubernetes resource type using Rancher Dashboard's built-
| --- | --- | --- | --- |
| `type` | `string` | Yes | Kubernetes resource type (e.g. `'provisioning.cattle.io.cluster'`) |
| `weight` | `number` | No | Side-menu ordering (bigger number on top) |
| `config` | `ConfigureTypeConfiguration` | No | Resource page options (creatable, editable, removable, etc.) |
| `config` | [`ResourcePageConfiguration`](#ResourcePageConfiguration) | No | Resource page options (creatable, editable, removable, etc.) |
| `headers` | `HeaderOptions[]` | No | Custom table column headers for the list view (client-side pagination). See [Table headers](#table-headers-headers) |
| `sspHeaders` | `PaginationHeaderOptions[]` | No | Custom table column headers for the list view (server-side pagination). See [Server-side pagination headers](#server-side-pagination-headers-sspheaders) |
| `overrideListResourceName` | `string` | No | Override the display name for this resource type in the list view. See [Renaming types](#renaming-types-overridelistresourcename) |
| `hideFromNav` | `boolean` | No | Hide this resource type from the side-menu entirely. See [Hiding types](#hiding-types-from-navigation-hidefromnav) |
| `hideBulkActions` | `boolean` | No | Hide bulk action buttons (e.g. delete) for this resource type in the list view. See [Hiding bulk actions](#hiding-bulk-actions-hidebulkactions) |

### `ResourcePageConfiguration`

Configuration options for a resource page, passed via the `config` property of `ProductChildResourcePage`. These control how the resource behaves in list, detail, and edit views.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `listCreateButtonLabelKey` | `string` | No | Translation key to override the "Create" button label in the list view |
| `isCreatable` | `boolean` | No | If `false`, disable creation even if the schema allows it |
| `isEditable` | `boolean` | No | If `false`, disable editing |
| `isRemovable` | `boolean` | No | If `false`, disable remove/delete |
| `showState` | `boolean` | No | If `false`, hide state in columns and masthead |
| `showAge` | `boolean` | No | If `false`, hide age in columns and masthead |
| `showConfigView` | `boolean` | No | If `false`, hide the config button in the masthead when in view mode |
| `showListMasthead` | `boolean` | No | If `false`, hide the masthead in the list view |
| `canYaml` | `boolean` | No | If `false`, disable YAML editing and viewing |
| `resourceEditMasthead` | `boolean` | No | Show the masthead in the edit resource component |
| `localOnly` | `boolean` | No | Hide this type from the nav/search bar on downstream clusters (only show in the `local` cluster) |
| `namespaced` | `boolean` | No | Whether this resource page is namespaced |

### `ProductChildGroup`

Expand Down
4 changes: 3 additions & 1 deletion shell/components/ResourceList/Masthead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ export default {
}
});

if (currPluginName && plugins[currPluginName]?.topLevelProduct) {
// the flag "topLevelProduct" only exists in the V2 product registration model
// same for the flag "startRouteWithProduct", we want to make sure both flags are true before we change the route structure
if (currPluginName && plugins[currPluginName]?.topLevelProduct && plugins[currPluginName]?.startRouteWithProduct) {
// override create route for extension resource lists
formRoute = { name: `${ this.$route.name }-create`, params: { ...params, product: this.$store.getters['productId'] } };
overrideCreateLocationByExtension = true;
Expand Down
156 changes: 0 additions & 156 deletions shell/config/product/fleet.js

This file was deleted.

Loading
Loading