Commit Graph

79 Commits

Author SHA1 Message Date
andy.lee 3a61b7fa7f
update the logic to hide localeSelector in login page for harvester 2024-11-25 22:06:30 +08:00
Francesco Torchia c88cb80857
Clean up code
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 16:24:09 +01:00
Francesco Torchia eac3deaa4b
Add harvester features
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 15:38:36 +01:00
Francesco Torchia b4c98cf490
Merge pull request #12352 from torchiaf/feature/harvester-shell-integration-4
Harvester shell integration - remove LocaleSelector when is Harvester standalone UI
2024-11-13 10:12:57 +01:00
Francesco Torchia 2defb34187
Code clean-up
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-04 16:17:01 +01:00
Alexandre Alves 1ed167d2ab
Support standard user handling SAML SLO feature (#12360)
* fix styling issue for logout link on avatar menu

* adapt saml logout logic to rely on info from public authprovider for SLO feature
2024-10-29 16:33:00 +00:00
Francesco Torchia 10f9dd165a
Remove LocaleSelector when is Harvester standalone UI
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-10-24 16:53:23 +02:00
Richard Cox 28969b85ef Changes after review 2024-10-21 15:09:29 +01:00
Richard Cox 47d0157eed Ensure the vertical scroll bar on setup page is flush with graphic 2024-10-04 17:11:49 +01:00
Phillip Rak 7f12ba8557 Use `markRaw()` on each member of `providerComponents`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-13 16:04:22 -07:00
Cody Jackson ba792a8087 Switching back to using <form> elements on login and setup
This prevents us from redirecting to another page using @submit.prevent but still allows the user to press enter to submit the form
2024-08-22 21:42:28 -07:00
Cody Jackson f8029bb51f Fixing databinding where v-model.trim needed to instead be v-model:value.trim 2024-08-22 16:09:55 -07:00
Cody Jackson 8622668ff8 Just testing 2024-08-22 16:09:54 -07:00
Cody Jackson 7d3856cf52 Fix setup page data binding 2024-08-22 16:07:04 -07:00
Cody Jackson 7268a2b8f3 Fixing a missing v-model:value that was excluded by trim 2024-08-22 16:07:03 -07:00
Phillip Rak 8b64b8f3bb Fix router redirect to home after login
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
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 250b9ab0ee Removing all of middleware merged from my other prs 2024-07-29 14:19:38 -07:00
Cody Jackson a1bb5b226a Relative mode for the loading component will make it appear full screen
We want it to be relative in these two areas because they aren't a part of our clusters.

This was introduced in 7d282bf1d0
2024-07-09 07:57:42 -07: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
Cody Jackson ccfc473c13 Found a few issues with navigation guards and fixed them
- The from/to routes were transposed so I flipped them
- Load initial settings wasn't receiving the store and the error was swallowed.
- Fixed some error reporting instead of just swallowing exceptions
2024-06-06 12:10:30 -07:00
Cody Jackson a5e98056fb Resolve an issue where we weren't allowing users to login with other auth providers
https://github.com/rancher/dashboard/issues/10974
2024-05-08 16:07:53 -07:00
momesgin 381a15b9ba
Add e2e test for server-url validation (#10937)
* e2e to test server-url validation

* refactor po and test

* e2e test for server-url validation in setup page

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-05-08 12:02:07 -07:00
Cody Jackson f163191243 Only logout if the user is logged in
This prevents us from redirecting multiple times when visiting the index on login
https://github.com/rancher/dashboard/issues/10926
2024-05-02 17:46:20 -07:00
Cody Jackson 7d282bf1d0 Migrate the usage of asyncData to fetch
After the migration we will then remove all of the initialization code. This is motivated by the Vue3 migration.
2024-04-26 16:38:13 -07:00
Francesco Torchia 274391f838
Add e2e tests - login backgrounds and banners
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-03-28 17:52:39 +01:00
Richard Cox 89d4eab4ca
Merge pull request #10455 from richard-cox/fix-dup-mgmt-setting-requests
Remove duplicate calls to mgmt settings on fresh load
2024-03-27 11:03:21 +00:00
Alexandre Alves cd4882c683
Improve logout message for SSO (#10537)
* add logic to change copy of logout screen when logging out with an auth provider different than local

* fex e2e test

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-03-01 17:09:54 +00:00
Richard Cox 58ee04cf23 Add e2e tests
- Test count of settings requests
  - during setup flow
  - login page
  - home page
  - login page --> home page

In addition
- Fix issue where now populated fromHeader can be `false`
- Don't mix up CATTLE_BOOTSTRAP_PASSWORD and TEST_PASSWORD, this causes issues in the setup flow when they're different
- Refactor setup test, re-enable check at end
2024-02-29 17:31:20 +00:00
Richard Cox 097a220225 Fix new, revealed issues. See PR for description 2024-02-29 17:30:26 +00:00
Richard Cox 582ba19ae4 Remove duplicate calls to mgmt settings on fresh load
- when findAll runs we cache running results with key `JSON.stringify(headers) + method + opt.url`
- if a request is made with a matching key we return the first result as the second result (avoiding duplicate requests)
- when mgmt settings were fetched with a hardcoded url ... url contains singular `setting`
- when mgmt settings are fetched without hardcoded url ... url contains plural `settings`
- therefore the second request was not using the cached first request

Also
- replaced findBy with .find
2024-02-29 17:30:26 +00:00
Cody Jackson 48e1b0b3bb Layout removal
fixes #10059
2024-01-22 06:30:17 -07:00
Alexandre Alves 6637583874
remove "process." mentions from Dashboard and adjust code (#10119)
* remove process.client and process.server mentions and adjust code

* fix a couple of missing conditions for process.server

* remove commented line

* remove process.static

* fix lint errors

* uncomment code

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-13 08:41:26 +00:00
Richard Cox 95dc76521c
Merge pull request #9950 from richard-cox/fix-saml-configure
Ensure SAML providers popup closes correctly
2023-12-12 11:22:32 +00:00
momesgin 5919915b29
Validating server url on Setup & Global Settings pages (#9701)
* added more validations for server-url on Setup and Global Settings pages

* handling server-url 'use default value' case

* consistent error messages

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-10-26 11:17:45 -07:00
Richard Cox 0c0009236f Ensure SAML providers popup closes correctly
- When configuring a SAML auth provider a popup window is shown
- The popup window allows the user to log in to the SAML provider
- It then redirects to auth/verify to check response of log in
- If OIDC there will be a state. Code was added to error if htis was missing
- However for SAML there is no state, so we would incorrectly return user to log in page with an error
- Note - the auth provider was enabled, so closing the popup and refreshing the core page would continue as normal
2023-10-19 16:44:22 +01:00
Francesco Torchia eb59543c0f
Wait for login completed
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-09-11 17:31:14 +02:00
Nancy a0a86e8cb8
Forwardport ad migration (#9505)
* display 3rd party auth error messages when login fails

* improve login error message display
2023-08-09 11:34:31 -07:00
Richard Cox 494acb68d1 First off... fix annoying `logging out` position 2023-07-12 12:38:29 +01:00
Francesco Torchia 02e7f7fd35
Fix auth provider link position
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-07-04 17:31:33 +02:00
Francesco Torchia f2fc4fa23a
Revert "Merge pull request #9261 from torchiaf/fix/auth-provider-button"
This reverts commit ffd8e71796, reversing
changes made to f349ca1a07.

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-07-04 17:30:31 +02:00
Francesco Torchia 2e837966f7
Fix auth provider button position
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-07-04 13:15:12 +02:00
Sorin d02feb4274
Merge pull request #9154 from scures/fix/vertical-scroll-login
fix: missing scroll behavior on login/setup page
2023-06-28 09:57:13 +02:00
Richard Cox 0245a8cb93 Merge remote-tracking branch 'upstream/master' into epinio/resolve-conflicts-with-master 2023-06-23 18:00:14 +01: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
scures c3b5d8d449
fix: missing scroll on login/setup page 2023-06-20 12:53:04 +02:00
Richard Cox 8a05df2d31 Merge remote-tracking branch 'upstream/master' into merge-master-2 2023-06-01 17:37:47 +01:00
richa 3ef8f63b92
Added BrandImage component in setup page (#8969)
* Added BrandImage component in setup page

* Fixed css for image

* Fixed lint
2023-05-26 10:34:53 +02:00