Commit Graph

52 Commits

Author SHA1 Message Date
Neil MacDougall c0ea22f63b
RKE1 Clusters unsupported (#14226)
* Make RKE1 Unsupported

* Fix for unit tests

* Update a11y test for removed RKE1 toggle switch

* Fix missing import

* Remove RKE templates and related tests

* Fix lint and tidy up

* Removed unused code

* Updates e2e tests

* Tidy up e2e tests

* Fix lint

* Prevent edit of RKE1 cluster

* Remove RKE1 settings

* Fix lint with removed settings

* Remove e2e test for removed setting

* Remove unused e2e po

* Remove toggle switch from a11y test
2025-05-29 13:07:00 +01:00
Neil MacDougall 5822b9e63c
Allow cluster create and import locations to be overridden (#14041)
* Allow cluster create and import locations to be overridden

* Wire into home page

* Bug fix on home page

* Update type declaration
2025-04-08 08:49:10 +01:00
Neil MacDougall c6af697018
Ensure long cluster names are truncated (#14017) 2025-04-04 17:09:55 +01:00
Alexandre Alves 7f84c3eabb
fix identical page title (#13850)
* fix identical page title

* fix e2e test

* fix e2e test

* fix e2e tests
2025-04-01 08:39:51 +01:00
Richard Cox 91486e17d4 Updates 2025-03-10 15:19:36 +00:00
Richard Cox 3afaaccaff Wire in sorting/filtering clusters on on new human name label 2025-03-10 15:19:10 +00:00
Richard Cox 7b11b852dd Update what's new links to use same current version const
- might need to delete `/v3/preferences/read-whatsnew` if banner doesn't show
2025-03-04 16:25:54 +00:00
Phillip Rak 5e5d95f7a1 Replace HeaderPageActionMenu dropdown with RcDropdownMenu
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-02-14 08:03:07 -07:00
Neil MacDougall 90d0fff96d
Remove close button from banner and move to a page action (#13255)
* Remove close button from banner and move to a page action

* Update home.vue to fix lint

* Update e2e tests and fix lint issue

* Ensure we wait for both PUTs

* Improve comments

* Change test order

* Improve e2e test

* Fix lint issue

* Improve e2e test reliability

* Fix lint

* Fix e2e test so it works for standard user
2025-02-07 12:22:28 +00:00
Richard Cox c19aabe62c Move PaginatedResourceTable and ResourceLabeledSelect to type file, improving naming 2025-01-23 17:06:08 +00:00
Richard Cox 09194418bf finish off functional stuff 2025-01-09 16:50:41 +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 9553614394
fix keyboard nav for home page (#12966)
* fix keyboard nav for home page

* minor fixes based on another PR comment

* add aria-sort to table column headers + remove space key bindings for links

* revert small change on Checkbox

* revert small change on Checkbox

* clear key space to trigger links

* change role for links that are in fact buttons + keep space key
2025-01-07 17:19:09 +00:00
Richard Cox b614082ce1
Add server-side pagination to home page cluster list (#11663)
* 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)

* 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)

* 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
2025-01-03 15:34:28 +00:00
Richard Cox daf98a56e1 Merge pull request #12050 from richard-cox/home-page-local-pag-2.9
Improve performance of home page when there are lots of clusters
2024-10-04 15:00:18 +01:00
Phillip Rak 64e9baf7f4 Update `vue-select` and fix `LabeledSelect` & `Select` components
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:07:03 -07:00
Cody Jackson 9b829c55ea Ran `yarn lint --fix` 2024-08-22 16:05:36 -07:00
Cody Jackson d5ce4fff2e Run the vue3 migration script
Commands run:

➤ yarn migrate
➤ git clean -fdx
➤ nvm use 20
➤ yarn
2024-08-22 16:05:36 -07:00
Richard Cox cef4876c26 Fix prv/mgmt cluster description issues
See #11588 for details

- mgmt cluster is a steve resource, so can inherit the steve model
  - this resolve the issue of mgmt cluster not having a description
- prv cluster uses it's own description, falls back on mgmt description
  - custom stuff on home screen not needed
  - fixes description on detail page of legacy clusters
- remove description from hybrid model
  - this contains steve references and isn't needed
2024-08-06 16:07:22 +01:00
Alexandre Alves 7be2f2e81a
add mgmt cluster description to prov cluster description as fallback in home cluster list and main side nav clusters (#10782)
* add mgmt cluster description to prov cluster description as fallbacks in home cluster list and main side nav clusters

* address pr comments

* add e2e to test description for rke1 cluster in home page

* address pr comments
2024-04-20 10:03:18 +01:00
Francesco Torchia 12f0c2feee
Add tooltip for mixed architecture
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-04-15 13:05:20 +02:00
Francesco Torchia e83eeb8812
Add architecture info in home page - clusters table
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-04-15 13:05:19 +02:00
Phillip Rak 7e703b4c74 Replace `nuxt-link` & `n-link` with `router-link`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-27 14:04:17 -07:00
Alexandre Alves 319a0a0af6
Add cluster description to cluster side menu and main menu (#10487)
* add cluster description to home page cluster list and side menu clusters

* working on tooltip for long descriptions

* add tooltip to description on side menu

* remove console logs

* add tooltip to description on side menu + fine tune tooltip position

* finish tests

* fix e2e

* address test flakiness of repeated use of toggling main nav menu and not waiting for transitions

* address failing e2e tests + add missing array brackets to tests that only had tag as string (were not running)

* fix bug where clicking on home link wouldn't close the main nav + fix e2e

* update home link e2e getter with correct structure

* address #8854

* break long strings to next line

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-03-01 16:39:59 +00:00
Cody Jackson 36a31a397e More informative page titles 2024-02-12 20:11:45 -07:00
Sean-McQ 80b0e11f59
Now uses the same data as the cluster homepage, delayed load not needed. (#9555)
* Now uses the same data as the cluster homepage, delayed load not needed.

* Auto stash before rebase of "master"

* Fix ready state
- the loading indiciator was only shown when the http request to fetch required data was happening
- in our world there's no http request, so no loading indicator
- this means for clusters that are `pending` there's no a forever loading indicicator

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-09-28 09:06:55 -04:00
wujun f4856ffccc fix circular dependency 2023-07-26 17:45:27 +08:00
Nancy 4584890499
Remove what's new page and link to release notes instead (#9327)
* update release notes url and whats-new test

* link to latest release notes for rc builds

* fix home page e2e test; update release notes version check to use existing util
2023-07-14 10:50:06 -07:00
Yonas Berhe 88631be592 made updates per change request 2023-06-26 10:50:10 -07:00
Yonas Berhe f0ba82c83f made updates per change request and fix merge conflict 2023-06-26 10:44:05 -07:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +02:00
wujun 717a2b2c14
HARVESTER: add bare-metal container and mcm support (#8754)
* HARVESTER: add bare-metal container and mcm support

* Harvester: Fix re-render old route component

* HARVESTER: fix services and hide repositories

* HARVESTER: add svg icon

* HARVESTER: add harvester version in explorer page

* HARVESTER: change openRancherManagerSupport => isRancherInHarvester

* HARVESTER: move method to models type

* HARVESTER: enhancement TopLevelMenu when use embedded rancher

* HARVESTER: polish harvester mode judgment

* HARVESTER: Add namespace resource quota help text

* HARVESTER: remove service filter

* HARVESTER: set harvester-baremetal-container-workload to false

* HARVESTER: fix svg & namespace component

---------

Co-authored-by: n313893254 <n313893254@126.com>
2023-06-15 13:28:08 -07:00
Neil MacDougall db8d42c1b3
Fix for incorrect cluster provider shown on home page (#8939) 2023-05-30 14:23:41 +01:00
Phillip Rak ade3c9f4e7 Replace all instances of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00
Phillip Rak 7cecbc0f62 Replace all instances of `v-html` with `v-clean-html`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-03-22 08:30:15 -07:00
Shavindra e12939115e
Allow basic fleet user to manage fleet without cluster permissions. (#7446)
* Allow basic fleet user to manage fleet without cluster permissions.

* Handle no workspaces.

* Add Fleet bundle namespace mapping - fleet.cattle.io.bundlenamespacemapping

* Add git repo restrictions.

* Handle auth errors for checkSchemasForFindAllHash.

* Fix workspace switcher and handle fleetworkspaces 401 issues.

* Update workspace switcher.

* Fix Gitrepo restriction creation from the Workspace create

* Disable workspace creation
* Fix workspace loading after creation

* Fix Bundle creation error.

* Remove redudant FLEET.TOKEN request.
2023-02-23 14:15:32 +00:00
richa 480f6f9e8d
Fixed preferences banner top margin (#8011) 2023-01-24 14:38:19 +01:00
richa 92f25d02bd
Re-worked on home page banner link alignment fix (#7929)
* Re-worked on home page banner link alignment fix

* Fixed GH auth banner
2023-01-23 18:22:10 +01:00
richa 38ad49d2f5
Fixed link alignment in home page whats new section (#7887)
* Fixed link alignment in home page whats new section

* Removed extra new added css properties
2023-01-13 11:53:50 +01:00
Neil MacDougall de1c8739d8
Add manage button to home page (#7546)
* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button
2022-11-30 21:45:19 +00:00
Neil MacDougall f0df19764f
Add node inactive warning indicator (#7548) 2022-11-28 09:15:15 +00:00
richa bb1aacb5ce
Removed btn-sm class to make button size nomal (#7135) 2022-11-15 14:16:38 +01:00
Giuseppe Leo d2d4122bc0
Review HTML formatting rules (#6805)
* Prevent ESLint to format generated paths

* Add HTML ESLint Rules

* Format all the Vue HTML templates except Harvester

* Exclude Harvester package from linting HTML, keeping old formatting rules
2022-11-11 17:04:22 +01:00
Cody Jackson 06b6f358fb Disabling explorer links if the cluster is in an error state
rancher/dashboard#7036
2022-10-04 08:51:30 -07:00
Shavindra 6ddc4d4c0b
Update support page and enable custom links. #6493 (#6720)
* Update support page and enable custom links.

* Update brand page.

* Fix links.

* Add docs.

* Fix PR Comments.

* Removed cancel button.

* Fix PR comments.

* Fix issues.

* Fix PR Comments.

* removed unused var.

* Fiux PR comments.

* Fix comment.

* Fix translations.

* Fix PR Comments.

* Fix links in homepage.

* Fix PR Comments.

* Update support page and enable custom links.

* Update brand page.

* Fix links.

* Add docs.

* Fix PR Comments.

* Removed cancel button.

* Fix PR comments.

* Fix issues.

* Fix PR Comments.

* removed unused var.

* Fiux PR comments.

* Fix comment.

* Fix translations.

* Fix PR Comments.

* Fix links in homepage.

* Fix PR Comments.

* Fixed margins.

* remove redundant code.

* Fix PR comments.

* Fix PR comments.

* Fix PR comments.

* Fix build.
2022-09-28 08:50:37 +01:00
Richard Cox 54546cd035 Use getters instead of `setPromiseResult` for known resource types 2022-08-04 16:42:21 +01:00
Richard Cox 8444068dce Address PR feedback
- Split calls to `setPromiseResult` into multiple lines
- Ensure label is correctly used (drop duplicate text)
- Improve beforeDestroy comment
- Add JSDoc to setPromiseResult
2022-08-04 16:42:21 +01:00
Richard Cox 168f809798 Improve initial load of Home and Cluster Dashboard pages
Home Page
- Don't block whole page on loading of mgmt and prov clusters
- Use table `loading` indicator when clusters are loading
- Use correct cluster count (with harv cluster filter) - To confirm

Cluster Dashboard
- EventsTable - use standard table loading indicator
- Don't block on fetch at all (or show page loading indicator)
  - Remove fetch for nodeTemplates and rke1NodePools. I went through a lot of code and don't think these are needed
  - Reminaing calls for Node and Metrics can happen at the same time
- Forget additional resource types when leaving page
- Optimise fetch of management nodes

Pre-Page optimisations
- Authentication Mixin
  - if applicable, fetch `principal` 'me' same time as `user` 'me'

Other tweaks
- Don't show AwsComplianceBanner or AzureWarning until management store ready
2022-08-04 16:42:20 +01:00
Giuseppe Leo b068e4e12c
e2e Tests: CI: Setup test to run for PR pointing to master (#5451)
* Configure E2E tests for CI

* Add Github CI configuration for E2E

* Write welcome and first login tests

* Add Docker initialization script

* Sort tests

* Allow to trigger input checkboxes from labels

* Run setup script in a single test to avoid server requirement restrictions with authentication in a single session

* Trigger E2E tests on PR to master only

* Correct password for E2E; extend documentation about authentication

* Allow E2E jobs to be excluded if present tag in the title

* Build and start project for E2E using SPA flag and prod env for CI

* Assure link presence while navigating in E2E tests; Improve readability

* Allow to skip setup E2E tests for remote initialized instances

* Update Cypress related libraries

* Replace class to id selections for E2E tests

* Create Page Actions PO; Move navigation related tests; Ensure Home page tests to be reliable

* Correct login redirection to include local

* Reset cards for E2E changelog

* E2E: Add manual waiting while opening the side navigation

* Change CI E2E skip exception from title to label

* E2E: Increase waiting time for side navigation racing condition issue

* Remove bootstrap setup assertion

* Allow to manually trigger E2E tests

* Disabling all flaky tests which cause race condition random failure

* Remove setup scripts and commands due opted out solution

* Rename files, tests and PO

* Remove libraries added while rebasing

* Replace ID with data-testid for E2E element selection

* Skip entirely E2E test Job on label in favor of single steps condition

* Use run ID and number for artifacts names

* Updated documentation related to E2E selectors and added best practice link

* Remove passed tests video after each test

* Add getId command to select elements by attribute

* Correct all the selections of all the existing tests; Add related data id for testing purpose

* Add terms and ignore log issue with TS

* Add missing ID to data conversion

* Replace password cases with new PO

* Restore locale login check in E2E

* Enable artifacts upload only on failure

* Disable video artifacts upload from E2E runs

* Correct linting issue with a TODO note

* Correct script naming and docker command to avoid killing other containers

* Remove unnecessary --spa flag from existing scripts

* Correct tests to do not rely spcifically to the version while testing changelog text

* Adjust documentation definitions

* Reference issue in the TODOs

* Allow failing if no container found while stopping docker

* Rephrase E2E commands reference in docs

* Correct Docker stop command typo with image name
2022-06-10 13:31:49 +02:00
Phillip Rak 72b36cb360
Create Rancher Component Library (#5504)
This adds a new project for Rancher Components under `pkg/rancher-components` and replaces components used throughout dashboard with the versions used here. All imports for the following components have been updated:

```
  |- BadgeState.vue
  |- Banner.vue
  |- Card.vue
  |- Form
    |- Checkbox.vue
    |- LabeledInput.vue
    |- LabeledTooltip.vue
    |- RadioButton.vue
    |- RadioGroup.vue
    |- TextAreaAutoGrow.vue
```
2022-05-24 15:09:53 -07:00