Commit Graph

30 Commits

Author SHA1 Message Date
Neil MacDougall 0df4379238
Dynamic content (Part 1) (#15343)
* Initial version

* Fix lint issues

* Tidy ups and lint fixes

* Add some notes

* Localisations

* Avoid using general 'actions' class name

* Further fixes

* Remove test code

* Address feedback from walk through

* Add test ids and updated e2e tests, fix lint

* Work around version issues

* Update .gitignore

* Remove dev readme file

* Add simple developer docs, update type comments, bump icon package version number

* Address PR feedback

* Address PR feedback 2nd round

* Fix lint

* Use user id hash in the local storage key

* FIrst version of dynamic content

* Revert merge errors

* Fix merge errors

* Fix bad merge

* Proper merge revert

* Factor out system info for clearer code

* Tweak

* Tweaks to config

* Fix lint

* Tidy ups, better types and more documentation

* Add support for settings

* Improve docs

* Remove unnecessary try catches around window.localStorage

* Tidy up config and settings types

* Update config to allow us to test this, off by default

* Addm LTS, remove debug content (will do this differently)

* Add unit tests

* Update unis tests

* Fix unit tests

* Tidy ups

* Add check for release info being an array

* Use CDN endpoint

* Update to use final endpoint and updates comments for yaml or json

* Add server version type

* Fix first round of PR feedback and update tests

* Address PR feedback

* Ensure content is always returned as text

* Address PR feedback

* Unit test updates
2025-10-22 11:05:46 +01:00
Cody Jackson 031056a406 Switching from $cookies to a cookies store to make data flow more consistent
fixes #11392
2025-09-11 16:13:48 -07:00
momesgin c0f279ee14
Charts/Apps sorting and header items (#14516)
* app card component

* cover upgradable and installed statuses

* support tags

* comment out handle clicks

* add matching chart logic

* add unit tests

* add unit tests for chart model

* fix e2e tests

* fix e2e test

* add secondary text link in css

* change AppCard to a generic ItemCard

* continue making itemcard more generic

* fix reference issue

* title slot + variant styling

* code cleanup + minor refactor

* new icons

* update icon lib + minor refactor and styling

* unit tests

* more unit tests for chart model

* refactor some slots + finishing touches

* some accessibility updates

* minor styling

* move image div inside slot

* uncomment e2e tests

* fix charts selector

* fix test

* fix statuses alignment

* more robust header styling

* remove PropType

* updated translation key

* update key

* rename

* improve aria labels + minor cleanup

* fix import

* replace deep targetting lazyimage css with style attr

* remove deep for actions + fix small header alignment

* rename component

* remove extra check

* add comments

* add comments to model

* use id instead of chartName

* remove todos

* fix matching app logic not including the latest version

* create RcFilterPanel component and use it in charts page

* fix repo click + minor styling

* update checkbox styling + fix unnecessary render for extra slot

* revert checkbox styling changes

* wrapper styling

* imporve performance

* debounce search query

* update e2e tests

* support actions as prop

* resolve conflicts

* update filter component + add statuses filter

* dynamic card layout when variant is not set

* fixed unit tests + lint

* removed unnecessary default props

* fix e2e test

* improve aria label message + remove unnecessary ones

* move component

* separate status filtering

* status tooltips

* fix export component

* Only calc variant twice

* lint

* fix unset debouncedSearchQuery

* resolve conflict

* add requestAnimationFrame to optimize observer

* fix resolve conflicts

* support both v-model and value + fix sluggish checkboxes + comments

* move RcFilterPanel to pkg

* unit tests

* remove unused carousel related code

* remove unused carousel related code

* remove unused carousel related code

* update card po and its usage

* rename

* resolve merge conflicts

* replace .no-card-click with RcItemCardAction component

* minor styling

* add po for rc-filter-panel and update e2e tests

* update unit tests

* refactor e2e test for disabled repo

* accessibility changes

* add translation + minor refactor

* add keydown handlers + minor refactor

* Revert ResizeObserver, also cache filteredCharts map result

* fix resolve conflicts

* fix resolve conflicts

* revert removed data-testid

* minor styling

* messages for total charts + implement clear all filters

* initial sorting setup + styling

* styling

* sorting

* remove unused code

* lint

* update sorting logic by adding durationSinceRelease

* update css space variables

* fix e2e test

* remove type description + minor styling

* update index.d.ts

* update refresh button and search input

* search input placeholder

* update arrow icon position in vue-select

* update logic to remove value prop

* rename footer item click

* add screen reader message for opening on a new tab

* check for option.label

* revert space variable changes and update .outlet padding instead

* revert spacing change

* fix using modelValue

* fix checkbox value type

* converted rc component to regular

* fix import

* fix type

* single card styling

* fix item card focus styling

* charts empty state

* rename

* minor refactor + rename

* fix reference issue when resetting filters

* new sort option + create enum

* change minimum width

* no new tab for add repo link

* update status messages

* fix header title pushing right items

* styling

* add isFilterUpdating status for syncing the render + styling the sort dropdown

* fix e2e test

* fix e2e test

* styling

* add e2e tests

* rename

* update repo link in translation

* fix e2e test

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
Co-authored-by: Richard Cox <ricox@suse.com>
2025-06-27 09:22:29 -07: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
Francesco Torchia 71dd2d9364
Add prefs/dev getter
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 15:38:38 +01:00
cnotv ff08d80e0e Lint: Manually fixed issues related to vueApp variable added by the script 2024-08-22 16:07:03 -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 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 92d810399a
[FEAT] Removed all mentions of Pod Security Policies (#9962) 2023-11-01 11:02:43 -07: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
Sorin bfe8d995c4
Feat/app bar init (#9560)
* feat: app-bar initial implementation (without pinning functionality)
2023-09-08 18:52:47 +02:00
richa 8c60009a2b
Removed cluster tools banner from dashboard page (#9240)
* Removed cluster tools banner from dashboard page

* Removed banner text from translation files
2023-07-10 08:56:02 +02: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
n313893254 c578ff4565 HARVESTER: Fix compatibility with Rancher v2.6.x 2023-02-09 20:43:37 +08:00
richa eeb8fa1d86
Added scale down promt confirmation on RKE clusters (#7926)
* Added scale down promt confirmation on RKE clusters

* Removed extra test code

* Modify toggleScaleDownModal function

* Added promt to RKE cluster
2023-01-19 13:34:16 +01:00
richa b89bcb595f
Prompt node pool (#7772)
* Added prompt in machinedeployment

* Save users promptConfirmation in cookies

* Changed pormpt size

* Added comments to the code, replace mounted function with create

* Fixed review comments

* Removed cookies added scale pool promt variable in prefs file

* Corrected pref variable name format and update comments

* Added confirmation prompt option in pref page
2023-01-11 15:51:47 +01:00
Francesco Torchia 9b4af328f7
Charts, handle chart-mode as a preference
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-16 17:35:42 +01:00
Richard Cox 0e4007f392 Change default provisioning type from RKE1 to RKE2 2022-12-14 11:17:45 +00:00
Neil MacDougall 54cb013029
Only set last visited page if needed (#7303) 2022-11-23 13:59:35 +00:00
Bastian Hofmann d7a969d366
Add UI for PodDisruptionBudgets
This also adds a new menu group "Policy" which includes all policy related resources
* LimitRange
* NetworkPolicy
* PodDisruptionBudget
* ResourceQuota

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
2022-11-14 15:21:02 +01:00
Neil MacDougall 80eeacfb41
Plugins: Add UI to manage plugins (#6973)
* WIP: Working version

* Further refinement

* Working version

* Refactor to a product

* i18n

* Fix lint and tidy comments

* Empty-Commit

* Bump e2e

* Latest fixes, i18n

* Fix lint

* Fix lint issues

* Fix imports for standlone plugin build

* Only load plugins in dev

* Fix lint issue

* Fix template errors

* Fix operator setup

* Fix menu actions

* Address PR feedback

* Address PR feedback

* Add new preference for plugin developer

* Update icon support

* Add third-party and experimental banners to slide-in

* Add support for update/rollback of a plugin

* Address PR feedback - i18n

* i18n - one more string localised

* i18n - one more string localised

* Minor visual tidy ups

* Use banner for install warning

* Fix saefMode

* Fix lint

* Add some responsiveness to the cards page

* Fix lint

* Bump PR

* Add debug to list coverage reports
2022-10-04 13:16:54 +01:00
richa cd3a06269c
Featured carousel (#5585)
* Created featured carousel

* Created dummy data for Featured chart

* Added style

* Added toggle button

* Added slider width dynamically

* Fixed review comments

* Removed not used code

* Added link to Carousel slides

* Created featured carousel

* Created dummy data for Featured chart

* Added style

* Added toggle button

* Added slider width dynamically

* Fixed review comments

* Removed not used code

* Added link to Carousel slides

* Merged master

* Added featured annotation

* Added auto scroll on page load

* Fixed filtering of featured charts data

* Removed duplicate keys
2022-09-29 14:03:48 +02:00
Alexandre Alves 84e9894fd3
remove the user preference Enable Language Selection keyboard shortcut toggle (shift+L) as it's only meant to be used by developers and gate it to be available on DEV builds only (#7016)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-09-27 18:03:54 +01:00
Alexandre Alves 13bc1ab57a
improve psp removal banner by adding a dismiss action and a smaller indication of the warning with a hoverable tooltip message (#7013)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-09-27 15:29:29 +01:00
Alexandre Alves 93fd50d807
'View in API' preference is not obvious (#6947)
* splitting up user settings belonging to DEV and updating references on rancher + update settings page to individually control each of the splitted settings

* move view in api to advanced features

* update copy of option in user prefs + update logic for inheriting value from another pref when one is not set on the server/api side + add toggleLocale shortcut to missing layouts + other minor changes

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-09-27 10:07:00 +01:00
richa 4134c1a9dd
Locale preference login page (#6597)
* Created LocaleSelector component

* Updated backend on lacal changes

* Hide none option in language list

* Fixed hovered state and added down arrow to dropdown list

* Fixed preferences error on login screen

* Corrected order of check

* Added variable to stor value before login

* Fix locale saving when not logged in

* Removed commented code and add comments for variable

* Added loginc in commit for settign user Preference

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
2022-09-07 18:01:09 +02:00
Richard Cox d8f1ed1376 Lower the maximum number of table rows a user can choose to display
- This removes the options for 250, 500 and 1000
- Note - this does NOT change user preferences that have already
  been set to one of the removed options. For those cases the value
  will remain, however the user will not be able to return to it if
  changed
2022-07-05 09:44:43 +01:00
Richard Cox d9757195ff Fix linting 2022-05-30 17:46:49 +01:00
Richard Cox 771f168a5b Allow the backend to override the theme
- Used in non-rancher world where the ability to select theme isn't supported
- If no `ui-theme` present resort to previous method of working out theme
- https://github.com/epinio/ui/issues/125
2022-05-30 17:40:26 +01:00
Richard Cox 25acc1f8eb Plugins: Rejig files to new shell locations (#5623)
* Doc

* v0.7.0

* v0.7.1

* v0.7.2

* Add creators

* v0.1.14

* v0.1.17

* Add Yarn link

* Tidy ups and typos

* Allow models to be loaded from plugins

* v0.1.15

* v0.1.18

* v0.6.6

* Improve readme, fix cyperss log msg

* v0.1.17

* v0.1.19

* v0.6.7

* v0.6.8

* Fix logo ref when in shell

* Fix lint issues

* Fix error in example

* Fix script to work on linux

* Add ability to revert moves without losing changes

* Fix bug with custom models in a plugin

* Fix build of UI packages

* Add dist-pkg to .eslintignore

* Pull out util from extend-router to prevent router being pulled in UI packages

* Update PLUGINS.md

* Remove duplicate dependency

* Reduce size of built UI packages

* Share codemirror. Other tidy ups

* Further improvements

* Tidy ups to support i18n in plugins

* Clen up add comments

* More clean-ups and comments added

* Rename from extension to plugin

* Missed file in rename

* v0.6.9

* TIdy ups following rename

* v0.1.20

* v0.1.21

* More refactor and tidy up

* v0.1.22

* v0.1.18

* v0.1.19

* v0.1.23

* v0.6.10

* Version Packages. Improve naming. Unload.

* v0.6.11

* v0.1.20

* v0.1.21

* v0.1.24

* v0.6.12

* v0.1.25

* v0.1.22

* v0.6.13

* Fix issues when plugin is builtin

* Add missing files

* Fix lint issues and watcher ignores

* Fixes following review

* v0.1.28

* v0.1.31

* v0.6.20

* Fix coer.js version

* Fix bug where plugins included via npm don't work

* Changes post merge

* Move plugins doc to dev guide, add note at top of README

* Update cypress version

* Add note about the reset --hard in rejig -d

* Fixes post merge

* Rename @ranch to @rancher and ad plugins

* Improve routes support, add package assets support

* Add uninstall hooks and pass interal opts

* Fix rejig script

* Minor fixes

* Routing tweaks
- attempted to improve `addRoutes` typing, failed a lot
- improved typings in plugins.ts
- added "@pkg/*" entry and vue-shim (for importing components) to the pkg creator
- fixed some linting
- safely fail when Verdaccio isn't running
- fixed some typos

* Remove frontmatter-markdown-loader reference from nuxt-config

* Revert "Remove frontmatter-markdown-loader reference from nuxt-config"

This reverts commit 29ef6f2f7b.

* Exclude creators from dashboard build

* Revert "Exclude creators from dashboard build"

This reverts commit 8ede93ee7c.

* Ingore creators via tsconfig
- We're still susceptible with vue shims in multiple packages
- Need to determine why packages can't use shim from route
- Probably need to move `./vue-shim.d.ts` in to `./shell`. Needs testing with a pkg that imports a component

* After rejig

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
2022-05-10 10:04:02 +01:00