Commit Graph

61 Commits

Author SHA1 Message Date
Cody Jackson e5da676207 Making the call to i18n/init blocking to resolve a race condition
rancher/dashboard#11203
2024-06-12 16:29:38 -07:00
Cody Jackson b81a1f8522 Extracted the authentication portion of the authenticated middleware into a navigation guard 2024-06-10 14:03:48 -07: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 731f5e6f8a Revert "Removing two pieces of code in app-extended because they're not needed"
This reverts commit ef603d23e6.
2024-06-05 07:34:07 -07:00
codyrancher 78f10c1c9f
Merge pull request #11165 from codyrancher/nav-guards
Pulling out authentication code into router navigation guards
2024-06-04 17:30:22 -07:00
Cody Jackson f707aefe81 Pulling out authentication code into router navigation guards 2024-06-03 17:26:14 -07:00
codyrancher fe397b5140
Merge pull request #11156 from codyrancher/title-fix
Fixing a race condition with how we update/reset the title to "Rancher" if a page doesn't set the title.
2024-06-03 16:56:09 -07:00
Cody Jackson ef603d23e6 Removing two pieces of code in app-extended because they're not needed 2024-05-31 17:57:47 -07:00
Cody Jackson ae9eb1ed08 Fixing a race condition with how we update/reset the title to "Rancher" if a page doesn't set the title. 2024-05-31 14:52:31 -07:00
Giuseppe Leo 43ef5fc390
Clean up entry logic for vue.config (#11048)
* Cleanup entry for vue configuration

Rename reserved function terms

Correct extendApp initialization by passing Vue attribute

Avoid reserved name Vue

Set more unique and meaningful file names

Remove deprecated code added with rebase

Add vue instance to mountApp

Add comments and references to TODO issue

Restore function declaration over binding issue

Rename apps and correct issue with the render

Rebase residual cleanup

Remove unnecessary env var related to Nuxt

Remove deprecated confit assignment

Revert render function refactoring

* Fix Dashboard version issue
2024-05-29 11:09:43 +02:00
codyrancher daa137a6b0
Merge pull request #11076 from codyrancher/app-component
Convert App.js to App.vue to make a standard component with a template
2024-05-22 16:57:13 -07:00
Cody Jackson 65b5a417c5 Removing a few more pieces of dead code that I noticed 2024-05-21 09:57:13 -07:00
Cody Jackson dcd0d50016 Convert App.js to App.vue to make a standard component with a template 2024-05-21 09:39:34 -07:00
Cody Jackson 8777ea9601 Removing component normalization 2024-05-20 13:08:57 -07:00
Cody Jackson d6b5a231bd Splitting up the route definitions from the router config and creation 2024-05-16 11:10:04 -07:00
Phillip Rak 705d125332 Supply context and instance via higher order function
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-15 10:15:31 -07:00
Phillip Rak b9d92756fa Disable `no-undef` lint warnings
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-14 10:27:58 -07:00
Phillip Rak 5041f67f62 Document `inject()` behavior
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-14 09:48:34 -07:00
Phillip Rak 238b6a1465 Group utils and update import to use alias
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-14 09:48:34 -07:00
Phillip Rak 5a7e1b00be Inject runtime config as ``
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-14 09:48:34 -07:00
Phillip Rak 1250e41b5a Move inject() into `shell/initialize/plugins.js`
Moving inject into `shell/initialize/plugins.js` helps to better isolate the scoping of variables that are mutated by inject. This change also helps us to better prepare for utilizing `inject()` in Vue3, as the function now accepts a Vue instance. Finally, `inject()` is conceptually related to plugin installation, so it makes more sense to have this function more closely located to the root of the plugin install code.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-14 09:48:34 -07:00
Evgeniya Vashkevich e055771611
[INT] Moved directives into a separate folder (#10981)
* [INT] Moved directives into a separate folder
2024-05-09 13:29:44 -07:00
Cody Jackson 9e60418725 Initialize i18n after plugins load more
We previously initialized i18n on every middleware invocation. This happened to be called after harvester was loaded by the authenticated middleware which loaded it's i18n keys.

This will now call i18n/init after the plugin locales have been loaded. This will be non-blocking so I don't see it as being an issue that we call it once for each plugin.
2024-05-09 04:06:48 -07:00
Evgeniya Vashkevich ff7b13696d
[INT] Refactored some of the plugins - 2 (#10944)
[INT] Refactored some of the plugins - 2
2024-05-07 14:37:36 -07:00
Evgeniya Vashkevich 9fffaffd4e
[INT] Refactored some of the plugins (#10943)
* [INT] Refactored some of the plugins
Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-05-06 08:36:04 -07:00
Cody Jackson 5312b64817 Removing the i18n middleware from the application 2024-05-02 15:10:03 -07:00
Cody Jackson 545dddd8cf Some dead code unraveling and removal 2024-04-29 16:56:39 -07:00
Cody Jackson a9e9ceae68 Removing asyncData references and unused hot module reload code 2024-04-29 10:45:44 -07:00
Phillip Rak 2fa472afbd Refactor i18n plugin to use install function
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-04-25 08:18:55 -07:00
Phillip Rak 5ac36f3268 Replace `nuxt-link` with an alias
`nuxt-link` will be removed from Dashboard and will print a deprecation warning when it is used.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-27 14:03:36 -07:00
Francesco Torchia e4a437f227
Revert vue-js-modal removal as required in Harvester
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-03-25 10:34:21 +01:00
Francesco Torchia e422c21114
Merge pull request #10682 from torchiaf/harvester-fix-warning-messages
Fix warning messages in Harvester embedded view
2024-03-25 09:58:09 +01:00
Francesco Torchia 37ea6b7901
Remove window.$nuxt deprecation for Harvester
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-03-21 18:18:36 +01:00
Cody Jackson 9e5cce37da Factoring plugin installation out of index.js.
One of a series of changes to simplify the bootstrapping and authentication code.
2024-03-20 12:37:11 -07:00
Phillip Rak 4a9ce08614
Merge pull request #10591 from rak-phillip/feature/8207-modal-replace
Replace `vue-js-modal` with `app-modal`
2024-03-13 09:58:02 -07:00
Phillip Rak 15de4b701c Remove `vue-js-modal` dependency
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-12 15:37:44 -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
Cody Jackson 0cb47c5c97 Removal a small chunk of code that doesn't preform any authentication from the authenticated middleware 2024-02-21 14:53:23 -07:00
Cody Jackson 36a31a397e More informative page titles 2024-02-12 20:11:45 -07:00
Cody Jackson 48e1b0b3bb Layout removal
fixes #10059
2024-01-22 06:30:17 -07:00
Alexandre Alves aa76d2d46c
remove page transitions from Dashboard (#10126)
* remove page transitions from Dashboard

* fix lint errors

* rename component rendered + fix issue where navigating from workloads to pods list view wasn't adjusting scroll

* rebase fixes

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-15 16:45:09 +00:00
Alexandre Alves 541684f511
remove argument "ssrContext" from "createApp" function and it's subsequent calls (#10131)
* remove ssrcontext arg from createapp function

* remove all mentions to beforeRenderFns and ssrContext + bonus to remove another function related to ssr

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-15 11:51:22 +00:00
Alexandre Alves 3b953ac6ab
remove components don't need to exist on shell/initialize/index.js (#10129)
* remove vue-client-only component and package

* gremove vue-no-ssr package and component

* remove unused fetch.server

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-15 10:08:52 +00: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
Evgeniya Vashkevich e2149a4798
[INT] Removed vue-meta library (#9952)
* [INT] Removed vue-meta library
2023-12-05 09:42:23 -08:00
Evgeniya Vashkevich 25618ad4a0
[INT] Replaced vue-clipboard2 library with clipboard-polyfill (#10072)
* [INT] Replaced vue-clipboard2 library with clipboard-polyfill
2023-11-30 16:31:35 -08:00
Neil MacDougall d5dccb4de4
Support "target=_blank" in A links via clean-html directive (#9928)
* Allow target=_blank on A tags through DOMPurify

* Remove unused params

* Fix lint issue

* Prevent directives from being overwritten

* Fix lint issues
2023-11-23 09:33:48 +00:00
Dai Yuzeng f2e0b6d304
Implement the directive of positive number (#9451) 2023-09-27 14:06:23 -07:00
Richard Cox f97025c647 Remove console output from diagnostic page
- Follows on from
  - https://github.com/rancher/dashboard/pull/6603
  - https://github.com/rancher/dashboard/pull/6700
- To track messages the console methods were overwritten
- When the console methods were called, we would track message and then call the original console method
- Output into the standard browser console window was broken though
  - the inline stack trace for all logs is the place where the original console method is called
  - this was always `console.js`
- This causes issues whilst in development but also for logs coming from customers
- Investigate ways around this, but couldn't find anything nice
- short term solution is to remove the feature
2023-09-08 13:38:33 +01:00
Richard Cox 8aef0252fe Remove process.x webpack config, add comments 2023-08-31 11:11:11 +01:00