Commit Graph

73 Commits

Author SHA1 Message Date
Richard Cox 75afc17979
Handle new vai-on updates to resources (#13150)
* port of wip

* asdassad

* Update vai / sql cache based api filtering to match latest changes

* Revert "Pin Rancher version to v2.11-2053ce644a31cd8053d1f58e2487154b0b8513b6-head for e2e tests"

This reverts commit 60f62107e7.

* sdfdsf

* dsfdsf

* asdsad

* fix dynamic hide local cluster changes

* improvements

* aaaa

* Working through todo's/tidys

* Remove debug / tidy up

* resolving todos

* remove some debug

* Tidying up #1

* Make manual refresh and auto-refresh visible on perf setting, disabled by default

* Remove dev stuff

* Fix some e2e tests

* Updated comment

* Wire in resource.changes debounce, clearer label for feature `listAutoRefreshToggle`

* Temporarily disable all watches when vai enable
- remove once rancher/rancher#40773 is resolved, which will then finally fix #12734

* Revert "Temporarily disable all watches when vai enable"

This reverts commit c708f468e4.

* Fix nextResourceVersion
- Ensure it handles resource revisions (in both LIST or individual resources) that are strings
- add unit tests

* Update after review
2025-06-11 18:11:35 +01:00
Alexandre Alves cb7cb52dbe
add role 'none' to hr elements in TopLevelMenu (#14121)
* add role 'none' to hr elements in TopLevelMenu

* add missing role and label to SideNav

* add aria-label to show/hide button in the Password component

* add role 'none' to hr elements

* add missing alt to user avatar image
2025-04-16 10:23:38 +01:00
Phillip Rak fd0ce57380
Remove deleted props from tooltips (#14054)
This change removes warnings that were printed to the console when hovering over primary navigation items. The `popperOptions` props was removed from floating-vue[^1] and hasn't done anything since we migrated to Vue3.

[^1]: https://floating-vue.starpad.dev/migration/migration-from-v3#removed-props

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-04-15 10:29:50 -07:00
Cody Jackson 7847d5cd07 Fix FixedBanner so that we can show the appropriate stylized text also fix multi-line functionality
Fixes https://github.com/rancher/dashboard/issues/11951
2025-03-17 14:41:53 -07:00
Alexandre Alves 8a5cd702a4
fix keyboard nav for app bar (#12958)
* fix keyboard nav for app bar

* remove dones

* minor fixes based on another PR comment

* removed all space key for links + move floating-vue config to plugin definition

* rename tabbing-index to tab-order + add aria-label to main menu
2025-01-07 09:28:29 +00:00
Richard Cox 8dcc72299b Two side nav improvements
- Reduce the flicker of cluster icons when the top level menu component is recreated given a change to the page's layout
- Add finer changes and comments to reduce churn from user / system changes to resources
2025-01-06 13:48:43 +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
Neil MacDougall 6fd149c8d2
Fix top-level burger menu keyboard navigation (#12876)
* Fix top-level burger menu keyboard navigation

* Ensure we can differentiate between focus and focus-visited

* Revert change to focus style
2024-12-18 15:34:54 +00:00
Evgeniya Vashkevich 92d77386dc
[FIX] Fixed app icon aligntment for extensions with image icon (#12827) 2024-12-05 11:14:04 -08:00
Evgeniya Vashkevich 907875fbf9
Fixed cluster list in burger menu having unnecessary horizontal scroll (#12591) 2024-11-15 17:09:22 -08:00
Phillip Rak 479aa652d5 Replace all usages of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-11-11 08:59:47 -07:00
Neil MacDougall 1a4db954f3
Remove legacy global configuration (#12346)
* Remove embedded DNS pages under 'Global Configuration'

* Remove the top-level legacy pages

* Fix redirect for the legacy route on refresh

* Fix URl in test - alerts no longer exists anyway
2024-10-27 12:02:25 +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
Mo Mesgin 567a1e4613 lint 2024-09-11 11:51:30 -07:00
Mo Mesgin 85110f5f86 fix pinned cluster tooltip 2024-09-11 10:29:24 -07:00
Mo Mesgin e226f51b46 change classes to popperClass 2024-09-10 17:11:59 -07:00
Alexandre Alves 60026587c3 fixing tooltips and metions of tooltips and dropdowns wherever I could find them 2024-08-30 15:49:34 +01:00
Phillip Rak b68adb3833 Revert "Refactoring the plain element <input> data bindings"
This reverts commit 7f1536d9cf.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-27 15:39:02 -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
Cody Jackson 7f1536d9cf Refactoring the plain element <input> data bindings
Performing this change so the vue3 migration script can modify all @input, @v-model of components without changing plain elements. This will reduce the number of vue3 compiler errors.
2024-08-22 16:04:52 -07:00
Alexandre Alves 526f329802
update css to get SVG icon added from extension with the correct alignment in the top level menu (#11366) 2024-07-05 17:46:12 +01:00
Neil MacDougall bb02892585
Add support for Individual banner settings (#11200)
* Add support for individual banners

* Fixes

* Add tags to e2e tests

* Update e2e tests

* Revert changed

* Fix lint issues with trailing spaces

* Update e2e tests for login consent banner

* Update test for re-factor

* Fix lint

* Fix e2e banner tests

* Don't run individual banner tests for the standard user

* Ensure after hook runs after the standard tests, not the individual banner tests

* Fix updating existing ui-banners setting
2024-06-12 15:05:11 +01:00
Neil MacDougall 826f68fb8a
Remove version number from side nav and update app bar to show it instead (#11143)
* Tweaks

* Add automated tests

* Fix merge issue

* Fix lint issues
2024-06-03 09:51:03 +01:00
Alexandre Alves 3bbf0cafbc
Local cluster does not appear at the top of the app bar (#11058)
* Update shell/components/nav/TopLevelMenu.vue

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>

* fix lint error with Trailing spaces not allowed in TopLevelMenu + add sneaky fix for cluster and project members side nav item not being highlighted

* make sure local cluster appears always on top of pinned and unpinned cluster lists in main nav menu + add unit tests

---------

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-22 10:12:35 +01:00
Alexandre Alves 7af0c0b473
The highlighted cluster in the App Bar retains its highlighting even when clicking on an item from the bottom category of the App Bar (#11055)
* fix issue with double active main menu items in app bar + add e2e test to prevent regression

* Update shell/components/nav/TopLevelMenu.vue

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>

* fix lint error with Trailing spaces not allowed in TopLevelMenu + add sneaky fix for cluster and project members side nav item not being highlighted

---------

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-21 18:01:08 +01:00
Sorin 08f11a5d81
fixes i18n, new Cluster Appearance UX (#10677)
* fixes i18n and small UX
* new layout design for the modal
* enables edit badge from cluster explorer

---------

Signed-off-by: scures <scurescu@suse.com>
2024-04-29 17:12:16 +02: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
Alexandre Alves 7cc94dcf44
fix visual bug with cluster description on main side nav (#10767) 2024-04-08 16:22:05 +01:00
Alexandre Alves bf435d691d
add missing translation to hardcoded string and adjust of copy + change key shortcut to ALT key only + remove lodash usage (#10707) 2024-04-01 17:00:59 +01:00
Phillip Rak 6206f9763c
Merge pull request #10716 from rak-phillip/chore/remove-nuxt-link
Replace `nuxt-link` with `router-link`
2024-04-01 08:00:12 -07: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
Francesco Torchia 294e7bc741
Merge pull request #10596 from torchiaf/10561-navlinks
Remove Vue `getMatchedComponents`
2024-03-27 11:13:23 +01:00
Alexandre Alves 05d4cea23a
Allow switching between down stream clusters with a dropdown menu (#10535)
* add logic to handle key combos + add route change on key combo press

* fix issue with tooltip position + add correct icon for when key combo pressed + added all logic to make key combo capture and route change work

* final adjustments + bug fix with width of text in side nav which caused horizontal scroll

* add e2e test

* finish key combo logic + finish e2e tests

* fix icon in dark mode

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-03-21 14:00:44 +00:00
Francesco Torchia 8f62c2e930
Remove getMatchedComponents as deprecated
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-03-11 18:38:58 +01: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
Richard Cox b464d15ee0
Integrate new schemaDefinitions endpoint (#10141)
* resource edit AS yaml

* fix cruresource (yaml from form)
- lazy load the schemaDefinitions when needed, avoids sync all to createYaml before we have an async chance to fetch schemaDefinitions

* Fix questions
- there are only four places we use questions, none of which use schema, this is just to be safe

* cluster scan, plugins/fieldsForDriver, defaultFor, validationErrors

* pathExistsInSchema
- used to optionally show conditions tab/list in resource detail view
- logs of things in ingress list/edit

* createPopulated / defaultFor
defaultFor requires resourceFields, it's only used by createPopulated in one place to support machine configs without components

* wip

* WIP MONITORING.SPOOFED
- these aren't spoofed types, but secondary schemas
- testing fix blocked, primary schema's have resourceFields

* Move steve specific (resourceField) code to steve models
- create models for steve schemas and apply to cluster and management stores
- move resoureField based validationto steve model
- move pathExistsInSchema to steve store getter
- don't fetch schemaDefinitions on start up when saving prefs (not needed and blocking)

* comments / improvements

* (untested) refactoring

* Fix alertmanager definitions, add retry definition fetch

* Fix pathExistsInSchema for path length > 2

* Fix questions that accept schemas
- tested by adding Questions to random page and the node schema

* Fix to saving configmap part 1
- the save works but doesn't show data. the yaml is the same as before. debug info added

* Validation by resourceFields is a norman specific thing, so make it such

* small refactor

* Tidying up

* Remove rebase junk

* fix linting and unit tests

* fix unit tests

* fix linting from fix for test....

* Tidying up, fix alertmanagerconfig

* Remove unit test todos

* add unit tests for resource fields

* sdssdf

* Add unit tests for pathExistsInSchema

* JS --> TS

* Store schemas in local singleton cache to avoid hitting store

* fix minor changes from review

* cruresource changes following review
- improvement - remove spurious canDiff
- createResourceYaml - pass in resource to use instead of calc in code

* WIP changes to parseType

* Fix generic cloud credential and node driver forms

* handle missing reactivity given schema definitions not in store

* fix and add unit tests for `parseType`

* Fix create-yaml test

* Changes following review
- improved comments
- SchemaDefinitionCache is now per store (and is reset as such)
- typeRef now uses parseType

* Fix dep loop by moving route based helps in auth out to utils file

* fix unit tests

* Changes following review
2024-02-28 17:08:35 +00:00
Sorin 8052619f61
APP Bar fixes (#10074)
* feat: app-bar fixes
2024-02-05 11:04:29 +01:00
yonasberhe23 3099aefcab
ui automation: global settings (#9458)
* ui automation: global settings

---------

Co-authored-by: Yonas Berhe <yberhe@Yonass-MacBook-Pro.local>
2024-02-01 15:06:03 -08:00
Alexandre Alves a35ebb2c2b
Fix for custom banner header without fontSize breaks top navigation (old obj structure) (#10242)
* support old ui-banner setting structure + update unit test to cover this scenario

* fix lint issue

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-01-24 09:55:28 +00:00
Cody Jackson 48e1b0b3bb Layout removal
fixes #10059
2024-01-22 06:30:17 -07:00
Alexandre Alves f475841448
Fix highlight main nav menu items (#10212)
* add method to add class to highlight main menu items based on current route + make fleet routes use 'blank' cluster

* update e2e tests to check for active class on main nav menu in strategic specs that cover the main nav

* fix merge conflicts

* fix lint issue

* move higlight check to burguer menu po + remove duplicate condition check

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-01-15 14:10:49 +00:00
Giuseppe Leo 50aac73712
Automation: No matching clusters msg fix (#9864)
* Remove conditional chaining in template

* Prevent app to break if no setting available

* Prevent to break if no mgmt cluster

* Prevent sidebar to break if no kube cluster

* Prevent breaking if no product available

* Prevent sort utils to break if no value is provided

* Add markup comments

* Replace getter mapping

* Prevent error if missing label for the inspected cluster

* Add tests for sidebar
2023-10-11 11:03:39 +02:00
Alexandre Alves 60b15ad429 fix bug with mispelled isRke2 + sneaky fix for id error on prov cluster screen when deleting clusters 2023-09-29 17:04:16 +01:00
Sorin 0e4e93a36b
fix: Adds margins to the app-bar when the global banner is enabled (#9768)
* fix: Adds margins to the app-bar when the global banner is enabled

* chore: reuses functionality

* chore: renames fn

* fix: initial feedback

* fix: dynamic height refactor

* chore: removes unused var

* chore: removes unused code
2023-09-28 09:08:07 +01:00
richa 1aa51c717d
No matching clusters msg fix (#9705)
* Fixed No matching clusters message condition

* Fix category line condition
2023-09-15 09:15:32 +02:00
Richard Cox 810369e741
Merge pull request #9681 from richard-cox/fix-preventOverflow-warn-spam
Fix issue where popperjs spammed console warnings
2023-09-14 11:14:57 +01:00
richa 2ffe8d3170
App bar pin cluster (#9674)
* feat: app-bar init implementation

* fix: users e2e test

* chore: removes extra code

* fix: adds the correct width for the app-bar

* fix: addressing feedback

* fix: cleans up max-items preference, layout improvements

* chore: removes extra file

* feedback

* fixes issue with extra padding in standalone

* fix: loading overlay

* fix: spaces

* fix: missing content

* Added pin clusetr list

* Removed commented code

* Fixed sorted list order

* fix: fedback

* removes the 2px top

* fix: brings back the local cluster icon

* fix: adds cluster filter badge & cluster count

* Fix pin cluster test

* Rename pinned-clusters in pref

* Added pin methoded in cluster model

* Added test for unpinning cluster

* Fixed test

* Fixed lint

* Clean up css

* Resolved feedback

* Fixed lint

* Removed local cluster badge test

* Removed model

---------

Co-authored-by: scures <scurescu@suse.com>
2023-09-13 15:45:39 +02:00
Richard Cox f729e001c7 Fix issue where popperjs spammed console warnings
```
`preventOverflow` modifier is required by `hide` modifier in order to work, be sure to include it before `hide`!
```

- Needed `hide` - https://popper.js.org/docs/v2/modifiers/hide/
2023-09-12 11:10:42 +01:00
Sorin bfe8d995c4
Feat/app bar init (#9560)
* feat: app-bar initial implementation (without pinning functionality)
2023-09-08 18:52:47 +02:00