Repository navigation
Upgrade dashboard to Vue 3 and vue-router 5 - #156
Merged
Merged
Conversation
Vue 2 reached end of life in 2023. The dashboard still uses in-DOM and x-template templates with no build step, so we serve the global builds that include the template compiler. - Switch to createApp/createRouter, keeping hash history so existing URLs and bookmarks still work - Register date-range and period on the app instead of globally, and move their v-model to modelValue/update:modelValue - Replace the vendored vue-router 2.0.0 with a webjar, excluding the transitive webjars we don't serve - Router 4+ only marks a link active for parent routes, so set the active class explicitly for the collection links and the Access Rules tab to keep the old highlighting
When only one end of a date range was picked, the other was formatted from an empty picker as the string "Invalid date" and sent to the server on save. Emit null for an unset date instead, which the server treats as open-ended. Also check value.end rather than value.start before setting the end picker's date.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Vue 2 reached end of life at the end of 2023. This upgrades the dashboard from Vue 2.0.1 to 3.5.43 and vue-router from 2.0.0 to 5.0.7.
Changes
resources/outbackcdx/lib. Both webjars have their transitive webjars excluded since we only serve the prebuilt global builds. The shaded jar grows by under 1 MB.createApp/createRouter. Hash history is kept, so existing#/...URLs and bookmarks still work.date-rangeandperiodare registered on the app and usemodelValue/update:modelValueforv-model.activeexplicitly to keep the old highlighting."Invalid date"for the other end. It now sendsnull, which the server treats as open-ended.Testing
mvn testpasses.EXPERIMENTAL_ACCESS_CONTROL=1and tested query, the rule list (search, sort, pinned icon), the rule editor (date ranges, period, policy; create, edit, delete) and the policy list. No console errors.initKeycloaknow receives the app instance viathis.