Commit Graph

12 Commits

Author SHA1 Message Date
Richard Cox 9fe21d8143 Fix disabled extension test involving PaginatedResourceTable
- this previously failed, re-enabled and resolved issues
2025-09-25 12:24:36 +01:00
Jordon Leach 562c32df73
Add internal api scaffolding and documentation (#13839)
* Add internal api scaffolding and documentation

* Fix docs build

* Refactor `apiName` to a static method for proper enforcement

* Restructure idea around ts augmentation for internal apis
2025-04-14 13:11:47 -04:00
Richard Cox de82273de8 Address failing plugin builds TS failure
error  in ../../shell/plugins/steve/steve-pagination-utils.ts:37:50

TS2339: Property 'name' does not exist on type 'Namespace'.
    35 |       if (hideObscure || hideSystem) {
    36 |         res.push(PaginationParamFilter.createSingleField({
  > 37 |           field: 'metadata.namespace', value: ns.name, equals: false
       |                                                  ^^^^
    38 |         }));
    39 |       }
2025-02-27 09:00:38 +00:00
Neil MacDougall 1e18d03f4c
Add support for modifying doc links and add support for different links for Rancher Prime (#13020)
* Add support for different doc links

* Adding missing e2e test tags

* Auth page not accessible to standard user (admin tests seem sufficient)

* Ensure types are generated for version file

* Update doc links

* Update to remove plugin remove for builtin extensions

* Change the plugin load status back to how it was

* Fix i18n issue

* Fix translation load for built-in extensions
2025-02-07 10:38:41 +00:00
Neil MacDougall 8001967416
Extensions: Add hooks to support virtual clusters (#11064)
* Add hooks to support virtual clusters

* Fix lint issues

* Refinements

* Update for Vue 3 changes

* Fix import

* Minor tweaks

* Fix bug causing e2e tests to fail

* Fix lint issue

* Rename internal properties and ensure they don't break clone/save

* Ensure we generate types for the plugins package to give us access to mapDriver

* Simpler approach

* Fix lint issues and add type

* Remove unused code

* Revery unnecessary changes

* Bug fix for finding model extension

* Factor out string constant and add provider display method

* Add experimental to API

* Update typegen.sh to use SHELL_DIR var

* Move type def

* Fix lint issue

* Address PR feedback

* Update steve-class.js so we always get an array

* Fix type definition
2025-01-31 08:51:58 +00:00
Richard Cox f980283813
Add server-side pagination to cluster explorer lists (#11672)
* cluster list now uses resource table

* New PaginatedResourceTable

* WIP

* add context to pag setting

* tidying up

* Add server-side pagination to cluster explorer events and general events list

* Servier-side pagination for catalog apps, cluster repo and operation

* Servier-side pagination for Service --> HPA, inmgress, services

* Server-side pagination for home page clusters list and side bar clusters

- Functional Changes
  - SSP now works after vue3 bump
  - Home Page Clusters list now uses server-side pagination
  - Side Bar clusters list now uses server-side pagination
  - Wire in now supported sorting / filtering by id and name used for table columns
  - Allow pagination to be enabled given a specific context
  - Call findPage without persisting to store

- New Pagination Tools
  - PaginatedResourceTable - Convenience Component, wraps ResourceTable with pagination specific props
  - PaginationWrapper - Convenience class to handle requests for resources and updates to them (avoiding store)

- Regressions
  - Side Nav menu ready state was `mgmtCluster.isReady && !pCluster?.hasError`, now ???

* fixes after merge. apply PagResTable to node list, vue3 fixes

* - Fix issue where list components containing PaginatedResourceTables would incorrectly fetch all resources anyway
- convert reminaing storage lists

* policy section

* fix async button in manual refresh mode

* fgh

* aaaaa

* Server-side pagination for home page clusters list and side bar clusters

- Functional Changes
  - SSP now works after vue3 bump
  - Home Page Clusters list now uses server-side pagination
  - Side Bar clusters list now uses server-side pagination
  - Wire in now supported sorting / filtering by id and name used for table columns
  - Allow pagination to be enabled given a specific context
  - Call findPage without persisting to store

- New Pagination Tools
  - PaginatedResourceTable - Convenience Component, wraps ResourceTable with pagination specific props
  - PaginationWrapper - Convenience class to handle requests for resources and updates to them (avoiding store)

- Regressions
  - Side Nav menu ready state was `mgmtCluster.isReady && !pCluster?.hasError`, now ???

* Iteration

Note - prov clusters is broken (only fetches local) due to blocking pr. breals
- notPinned list

* Fix dupe inStore
- remove from resource list, put in resource-fetch (used also by pag res table)

* Fix dupe inStore
- remove from resource list, put in resource-fetch (used also by pag res table)

* Two fixes
- changes namespaces kicked of side nav cluster requests (thought pinnedIds changed)
- fix generic lists re-fetching given ns filter changes (they don't have namespaced arg)

* fixes / updates

* testing/tidying

* WIP - Rest of workload lists

* finish off workloads

* tidying up

* fix non-generic list filtering by namespace

* remove comment, backport fix

* test fixes

* E2E: Ensure we wait for cluster entries to exist before clicking on them

* backport fix for local/api filtering

* Remove debug code

* Changes after review

* e2e fixes / debugging

* More e2e fixes

* More e2e fixes

* More e2e fixes

* Fix generic pages that filter on pagination

* Attempt to fix flaky vai test

* Fix after merge from master

* Updates following new indexed files

* Fix lint and test

* Changes given real cluster tests
- general fixes
- correct issue were sorting prov clusters on mgmt cluster props (issue in master as well...)
- bit the bullet, we now don't fetch all mgmt clusters on dashboard visit.
  - there could be knock on affects, but we'd need to remove it sometime in 2.11....

* Fix issues with diplaying rke1 data in home page
- includes https://github.com/rancher/dashboard/pull/12881

* Fix unit tests

* remove invalid sort/filter type

* Running through new indexed fields

* fix unit tests

* lint fixes

* Fixes after small review

* lint

* Test for check-plugin-gates pkg build from shell

* e2e fixes

* Testing new indexed fields with dev image

* tidyuing up imports in hope to fix ts error in check-plugins gate

* Fix failing check-plugin-gates
- caused by shell/scripts/test-plugins-build.sh importing list/catalog.cattle.io.clusterrepo.vue
- the component had been updated to a TS component
- check-plugin build outputs TS errors for a component file imports
- vs code shows no errors for imported file

* tidying up a smidge

* Many tweaks
- Remove final todo's
  - includes fix for service type clusterip/headless overlap
- Removed ununused ENDPOINT column (note ENDPOINT formatter used in other columns)
- Testing freshly added index fields

* Improve location of new place where componentWillFetch is set

* fix lint, comment updated

* Fix failing e2e tests
- fix cluster dashboard events test
- fix and greatly improve flaky events test
- fix hpa test
- functional fixes
  - fix sorting/filtering events by object type
  - fix hpa columns
2025-01-07 15:13:42 -07:00
Alexandre Alves df7e954baa
small fixes to workflow test runs (#12676)
* small fixes to workflow test runs

* move retrieve-versions script to better location

* update paths for retrieve-versions script

* fix slack messages

* fix slack messages

* fix parse-tag-name to allow for release of both catalog and charts for extensions

* add mising type definitions
2024-11-26 17:19:55 +00:00
Jordon Leach 72eea24b3e
Fix typegen script shell directory paths (#12211)
* Determine BASE_DIR with git rev-parse
Ensure relative shell directory is accessible
Log declaration files before combining

* Bump @rancher/shell 3.0.0-rc.6
2024-10-11 11:29:39 +01:00
Jordon Leach 8c18250f37
Fix reference to tsc binary when publishing shell (#12176)
* Fix BASE_DIR path

* Add pipefail for proper error handling
2024-10-09 09:18:43 -04:00
Richard Cox 77d65c9c9b Add additional types for extensions, fix other typing errors 2023-07-25 15:51:31 +01:00
Neil MacDougall c9e1a19396
Extension support for custom provisioning (#9246)
* Extension support for custom provisioning

* FIx lint issues

* Discovery / Tweaks
- fix issue where namespacesOverride was lost
- tidy up PROVIDER
- try to handle missing provider=type url param (could be missing extension-params)
- added a few comments to comments to come back to

* Names and typings
- change param --> customParam to make it clearer it's not url params
- add labels-annotations to shell types

* Wire in provider detailTabs
- as per original readme this should be made generic (extension point working directly with ResourceTabs)

* Update IClusterProvisioner & docs

* Improvements / Changes to support proving out DO extension
- cluster hooks optional
- buff up save hook (and pass in cluster when calling apply fn)
- move normalizeName into generic place
- bring back async create machine config
- hack for do extension (map example provider to do provider)

* updates, add optional saveCluster, add missing kube file
- saveCluster complements hooks, doesn't skip handling of addons, etc
- ensure register hooks take the `this` context in all worlds

* Adding docs

* Updates
- location config based changes
  - change customParams to context
  - add query param
- add new extention point to add tabs to cluster create cluster config section
- fixed some typing
- fixed issue where cluster was not passed to before / after hooks (only important if 'this' changes

* Changes following review, fix `t` in plugins

* Fix linting

* Docs updates, pass through more edit/view things

* Conditionally show the namespace grouping in the cluster list
- means users can differentiate between clusters with same name in different namespaces
- useful when clusters created via extension provisioner where ns can be selected

* docs tweaks, actually include the provisioning page in docs

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-07-11 22:17:57 +01:00
Neil MacDougall 4abc94a940
Fix plugin pkg tsconfig (#6930)
* Fix pkg tsconfig

* Ensure test package is removed

* Fix package versions

* Add update package and refine typescript configuration

* Fix lint issues

* Fix issues with creators

* Install dependencies

* Fix e2e

* Include components for standalone app build

* Fix issue with yarn linking shell

* Fix for yarn linking

* Fix for lstat on non-existing file

* Fix lint issue when running with yarn link

* Update TextAreaAutoGrow.vue

* Fix test script build

* Fix test script issue

* Fix script on mac
2022-11-24 10:03:42 +00:00