Commit Graph

17 Commits

Author SHA1 Message Date
Alexandre Alves 50e1daccd5
Refactor AssignTo, MoveModal and feature flag modal as prompt modals (#14187)
* refactor AssignTo, MoveModal and feature flag modal as prompt modals + add unit tests + remove store mechanisms that were dedicated to these modals

* fix small issues with FeatureFlagListDialog and MoveNamespaceDialog

* fix merge conflicts + remove code comments

* address merge conflicts + remove text from template
2025-05-06 17:34:55 +01:00
Jordon Leach 7e58161982
Initial `$shell` api - add `ModalManager` and `SlideInPanelManager` (#13840)
* Initial $shell internal-api - Add ModalManager and SlideInPanelManager components

* Use Teleport for Modal and SlideIn managers - Add unit tests

Unit test fix

* Add focus trap and tabindex to Modal and SlideIn managers
2025-04-16 15:09:05 -04:00
Alexandre Alves 4af23f6d6a
working on issues reported in the a11y tests (#13609) 2025-04-02 09:57:46 +01:00
Cody Jackson 1c360d659f Adding a after login redirect for the case when a user enters a url but gets redirected to the login page
Fixes https://github.com/rancher/dashboard/issues/11224
2025-02-24 08:02:45 -07: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
Cody Jackson a5ff16ef5f Removing the templates/error template
This template was no longer being used and can now be removed as dead code.

Fixes https://github.com/rancher/dashboard/issues/11384
2024-11-25 23:54:34 -07:00
Cody Jackson 68be8d4bc0 Removing code that's no longer necessary around back-button usage
Fixes https://github.com/rancher/dashboard/issues/11274
2024-11-25 16:31:44 -07:00
Alexandre Alves 340d41031e
SAML SLO support (#11182)
* wip

* add logout action according to logic (SAML - logoutAll) + add modal to prompt user to select SLO logout type when logging out of Dashboard

* update authProvidersInfo method to allow for a getter usage in order to make it store reactive

* wip - missing final plumbing for the finalRedirectUrl

* bug fix for non-reactive header logout when auth provider is enabled

* adjust slo UI elements to match expected UI/UX

* minor adjustments + pr cleanup

* cleanup

* handle promise rejection for standard users (apparently they cannot get the schema)

* Updates
- Tweaked text (to be reviewed)
- Removed some code smells
- Ensure rancher logout via modal uses same process as normal logout
- Use async buttons in logout modal
- Add cancel to log out modal
- Fix logout on fail-whale page

* Add error handling (WIP with Andreas, does not currently reach final redirct / verify route)

* Fix check for IS_SLO

* Only allow optional auth provider log out if logged in auth provider

* Fix error message (SLO failures still result in rancher log out)

* check complete slo flow + add special copy when doing a slo logout

* Update shell/dialog/SloDialog.vue

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

* Update shell/edit/auth/saml.vue

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

* update syntax from phil pr review

* Fix logout modal on diangostics, about, etc pages that use plain template

* Remove PromptRemove from diagnostic page
- it uses the plain template which now contains it
- caused x2 modals to show

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 19:16:06 +01:00
Cody Jackson fdf7018b7e Removing the rest of authenticated middleware. Primarily cluster loading. 2024-07-10 11:23:42 -07:00
Giuseppe Leo c36b071e40
Remove every reference to .nuxt global option (#11265)
* Remove unused rehydratation plugin

* Remove any reference to the .nuxt folders

* Remove globalApp nuxt and any reference or use case to nuxt.error

* Replace errors handling with existing fail-whale logic
2024-06-21 11:15:05 +02:00
Cody Jackson 6f7c29626c Removing the unauthenticated middleware 2024-04-30 13:36:40 -07: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
Neil MacDougall f6c80b295f
Add root product to improve performance of nav change within inExplorer products (#10447)
* Fix race condition in loadCluster

* Revert new error and comments

* Improve navigation performance for products within the explorer product

* Remove unused getter

* Fix issue with not loading nwe cluster when changing clusters

* Fix bug where sidenav take a short time to update (was using queueUpdate)

* Fix lint issues

* Address PR feedback
2024-03-28 09:28:23 +00: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
codyrancher b0d2dcbeb4
Vue 3 Nuxtism Removal (#10533)
* Removing everything related to scrollTrigger.

The latest vue router seems to behave exactly as it does with the modified scrollBehavior so it can all be removed.

* Removing unused $nuxt.{suffixes} that I found
- routeChanged  (didn't find any watches of this event)
- nbFetching (The only place reading this was a computed property which wasn't used anywhere)

* Replace the use of Vue[installKey]

* Removing some ssr rehydration code since we're not doing ssr

* Remove the remaining $nuxt.$on,$off,$emit and replace with the use of our primary store which already had related code

* Replacing usages of the .$nuxt on vue instances with globalApp references

* Removing SSR dead code

* Fixing an issue where extensions could still be referencing window.$nuxt. This now provides a deprecation warning.

* Migrating another $nuxt over to the window.$globalApp

* Removed the usage of Vue.config.$nux

* Removed the usage of Vue.util.defineReactive

- Saw that the Nuxt component wasn't needed any longer so I removed it instead of trying to work around Vue.util.defineReactive

* Re-run missing check

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2024-03-11 18:38:25 +01: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
Cody Jackson 48e1b0b3bb Layout removal
fixes #10059
2024-01-22 06:30:17 -07:00