Commit Graph

43 Commits

Author SHA1 Message Date
Richard Cox 66f73dab5b fixes / updates 2024-12-04 11:54:28 +00:00
Richard Cox 475aaef2eb Merge branch 'pagination-home-page' into pagination-cluster-explorer 2024-12-02 17:45:16 +00:00
Richard Cox f1858b6f02 Iteration
Note - prov clusters is broken (only fetches local) due to blocking pr. breals
- notPinned list
2024-12-02 17:32:41 +00:00
Richard Cox 419cc30fd1 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 ???
2024-12-02 15:48:23 +00:00
Richard Cox 8e0fabc8ed 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 ???
2024-11-14 16:01:32 +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
Neil MacDougall ef3e26bb4a
Make side nav and home page cluster lists be consistent with provisioning list (#5833)
* Fix rebase issues

* Fix lint issues

* Address PR feedback
2022-05-24 11:58:31 +01:00
Richard Cox 25acc1f8eb Plugins: Rejig files to new shell locations (#5623)
* Doc

* v0.7.0

* v0.7.1

* v0.7.2

* Add creators

* v0.1.14

* v0.1.17

* Add Yarn link

* Tidy ups and typos

* Allow models to be loaded from plugins

* v0.1.15

* v0.1.18

* v0.6.6

* Improve readme, fix cyperss log msg

* v0.1.17

* v0.1.19

* v0.6.7

* v0.6.8

* Fix logo ref when in shell

* Fix lint issues

* Fix error in example

* Fix script to work on linux

* Add ability to revert moves without losing changes

* Fix bug with custom models in a plugin

* Fix build of UI packages

* Add dist-pkg to .eslintignore

* Pull out util from extend-router to prevent router being pulled in UI packages

* Update PLUGINS.md

* Remove duplicate dependency

* Reduce size of built UI packages

* Share codemirror. Other tidy ups

* Further improvements

* Tidy ups to support i18n in plugins

* Clen up add comments

* More clean-ups and comments added

* Rename from extension to plugin

* Missed file in rename

* v0.6.9

* TIdy ups following rename

* v0.1.20

* v0.1.21

* More refactor and tidy up

* v0.1.22

* v0.1.18

* v0.1.19

* v0.1.23

* v0.6.10

* Version Packages. Improve naming. Unload.

* v0.6.11

* v0.1.20

* v0.1.21

* v0.1.24

* v0.6.12

* v0.1.25

* v0.1.22

* v0.6.13

* Fix issues when plugin is builtin

* Add missing files

* Fix lint issues and watcher ignores

* Fixes following review

* v0.1.28

* v0.1.31

* v0.6.20

* Fix coer.js version

* Fix bug where plugins included via npm don't work

* Changes post merge

* Move plugins doc to dev guide, add note at top of README

* Update cypress version

* Add note about the reset --hard in rejig -d

* Fixes post merge

* Rename @ranch to @rancher and ad plugins

* Improve routes support, add package assets support

* Add uninstall hooks and pass interal opts

* Fix rejig script

* Minor fixes

* Routing tweaks
- attempted to improve `addRoutes` typing, failed a lot
- improved typings in plugins.ts
- added "@pkg/*" entry and vue-shim (for importing components) to the pkg creator
- fixed some linting
- safely fail when Verdaccio isn't running
- fixed some typos

* Remove frontmatter-markdown-loader reference from nuxt-config

* Revert "Remove frontmatter-markdown-loader reference from nuxt-config"

This reverts commit 29ef6f2f7b.

* Exclude creators from dashboard build

* Revert "Exclude creators from dashboard build"

This reverts commit 8ede93ee7c.

* Ingore creators via tsconfig
- We're still susceptible with vue shims in multiple packages
- Need to determine why packages can't use shim from route
- Probably need to move `./vue-shim.d.ts` in to `./shell`. Needs testing with a pkg that imports a component

* After rejig

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
2022-05-10 10:04:02 +01:00