Commit Graph

52 Commits

Author SHA1 Message Date
Richard Cox b88ceb6e5a Fix project/namespace --> cluster manager blank page bug
- caused by circular dependency of
  - index.vue --> resource-fetch mixin --> resource-fetch-namespaced mixin --> index.vue
- not sure why the works on most pages... but bugs out for this one... but the fix makes sense
2022-12-23 11:34:12 +00:00
Alexandre Alves c6a790929d
add disable auth provider prompt modal (#7729)
* working on disable auth provider prompt modal

* finish adding modal for confirming disable of auth provider

* cleanup

* address PR comments

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-12-22 15:34:32 +00:00
Francesco Torchia 07683d34a6
Merge pull request #7639 from torchiaf/fix/7484
fix Delete button when trying to delete users
2022-12-12 09:48:47 +01:00
Cody Jackson 90ca1209f4 This fixes an issue where catalog/charts were stale after a repo was updated
The catalog.cattle.io.clusterrepos/{repo} resource doesn't subscribe to updates. We now force a full request in the areas where it's appropriate to do so.

fixes #7668
2022-12-09 08:38:28 -07:00
Francesco Torchia 2740af2df5
visibilityChange, replace findAll to bypass wss subscribe
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-07 12:43:25 +01:00
Francesco Torchia 208d306b31
setTabVisibilityListener, refactoring
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2022-12-07 12:40:41 +01:00
Richard Cox 762b3e4163 Updates following review
- Tweak settings text
- Use new filter icon
- Tweak "too many" text
- Allow only selecting a single namespace when in 'too many' mode
2022-12-02 12:37:35 +00:00
Richard Cox 8924b34888 Disable ns filtering for fleet / workspace world
- This might be possible (as fleet workspaces are similar to namespaces
- To address though would need to re-fetch resources when workspace changes
  - Currently when ns changes we always go to an invalid state first
  - Single NS (show list & fetch resources) --> Multiple NS (hide list) --> Single NS (show list & fetch resources)
  - For workspace we skip the middle part and don't fetch with latest
2022-12-02 12:30:13 +00:00
Richard Cox e448505b3c Fixes following review
- Ensure that the correct threshold if fetched from config (was previously always enabled)
- Don't pass additional `namespace` value to `loadDataPage`
2022-12-02 12:30:13 +00:00
Richard Cox 75aa51fab9 Enforce Namespace Filter
- When there are over a configurable amount of resources to display in a list force the user to select a single namespace and use it to fetch resources related to the list
- Disabled by default, this can be enabled via the usual Global Settings --> Performance setting as usual

Functional Comments
- Gates for forcing the filter (count, resource type is namespaced, etc) apply only to the resources shown in the list.
  - For example PV's aren't namespaced, so no enforced filtering. However they fetch PVC's which are namespaced
  - For example we could have 10 resources to show in the list, but the resource types list component fetches 10000 other resources. The secondary resources are not taken in to account
- If we're under the threshold and have fetched all resources, if in that session we go over the threshold we won't fetch NS specific resources (because we have them all already)
- If we're over the threshold and have fetched namespaced resources, if in that session we go under the threshold we will fetch all resources
- If we're over the threshold and have fetched namespaced resources, going to a page that needs them all will result in us fetching them all (for instance from `events` to `cluster dashboard`)
- Deselecting a namespace and selecting it again should not kick off another http request

General Commit Comments
- The threshold to enforce the filter is set at 1500 as per manual fresh and incremental loading
- Optimised some code in ResourceList, resource-fetch and $loadingResources
2022-12-02 12:30:13 +00:00
Alexandre Alves 1a9fea755c
update url for namespaced requests for secondary data (#7365)
* update url for namespaced requests for secondary data

* remove unnecessary type and id setting on resource-manager as for all requests now come from Steve api + fix issue where changing namespace on workload creation would cause an error on PVC because of undefined value

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-11-25 16:51:57 +00:00
Phillip Rak 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07:00
Giuseppe Leo 75c01c7ab7
Validation for the minimum length requirement for user password setting (#6897)
* Convert Rancher settings into Typescript and add interface

* Allow Rancher settings to be validated

* Add Rancher Settings min password length validation

* Replace settings number input with labeled input of type number for validation; Added missing required, focus, locale and labels attributes

* Add min/max/between value/length cases to global validation cases

* Correct validation syntax

* Add tests for the global settings

* Correct naming and assign directly rules to the inputs

* Create initial tests for CreateEditView

* Prevent Settings view to break if no setting is found for given ID

* Add max password length validation

* Add i18n to settings validation

* Add form validation to the CRUD component

* Prevent form to fail for resource types without validation

* Add test for no validation cases

* Remove form validation in favor of local view logic, due complexity issues

* Correct validator linting issue

* Correct i18n; Add types; Correct min/max/between validations i18n and combine the last

* Add translation type

* Correct validation translation types and definitions

* Replace custom validations with predefined rules

* Reintroduce form validation in abstracted configuration to pass settings through

* Add tests for new generic form validations

* Correct between values and length validation

* Split tests to use pre-existing rulesets due complexity and different cases

* Cleanup jsdoc in form validation

* Cleanup form validation mixin

* Add global settings test for generating rules from config

* Replace value.value with value for validating the resource

* Correct validation call and test instantiation

* Add note about value.value exception

* Disable faulty test due lacks of information

* Replace min/max value validation with between

* Add missing type for settings getter

* Move type folder within shell

* Move settings logic from config to utils
2022-11-15 15:32:02 +01:00
Neil MacDougall 6d15349c45
Fix brand for csp (#7428) 2022-11-14 16:28:41 +00:00
Neil MacDougall fcbdf97706
Fix issue where brand is not set on authenticated pages (#7311) 2022-11-01 11:24:37 +00:00
Alexandre Alves df41dc2f58
store 'type' prop before overwriting it for classify (#7225)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-10-19 11:59:33 +01:00
Shavindra e94b5a26ba
Prevent blocking effect secondary resources on workloads (#6860)
* move secondary data requests to a non-blocking ui method + pass loading props to the correct labeled selects

* main data loading procedure for secondary data done

* use pvcs from secondary resource fetch on storage component

* rename loading props to asyncDataLoading for better context

* cleanup

* move secondary resources data loading logic to a mixin

* cleaning up resource-manager mixin

* fix issue where namespace  wasnt being updated on secondary requests

* add doc description for data structure for resourceData

* minor change

* add plural option to resource-manager + remove loading var from workloads for sec resources + optimise persistentvolume edit view

* improve persistentvolumeclaim edit view

* add loading flag

* addressing PR comments

* fix latest PR comments

* doc on classify option for resourceManagerFetchSecondaryResources param

* Ensure reponse for namespace resources mimics non-namespaced
- The resources returned when requesting namespaced types do not contain id, type and links properties.
- This isn't perfect, or universally applicable, but will work for the current set of use cases

* working on merge conflicts

* Remove files from bad merge

* Handle new namespaces
- The secondary resource manager fetches some resources by namespace
- The user however can supply a new namespace
- When in `new namespace` mode we need to
  - avoid trying to fetch namespaced resource
  - clear any cached namespaced resource
- this only currently applies to workloads, PV and PVC pages don't fetch namespaced resources

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-10-09 10:40:32 +01:00
Alexandre Alves 866f4d8032
Add manual refresh + incremental loading to all list views (#6908)
* removing check for restriction of types on incremental+manual + update masthead to incorportate directly the ResourceLoadingIndicator so that it can used by list views with custom mastheads + move catalog.clusterrepo typedescription to its rightful component and delete custom list view + updating custom list views to use resource-fetch mixin

* continue updating custom list views to use resource-fetch mixin

* finish updating custom list views to use resource-fetch mixin + prevent error on loadAdd mutation where type is not set in store yet + code cleanup

* address PR comments

* update all custom list views to use loading prop on ResourceTable rather than Loading component + use getter to get incremental updates propagated from the store into the table itself + other minor fixes

* revert changes to mutation loadAdd as check is not needed

* revert all changes to shell/list/harvesterhci.io.management.cluster.vue

* revert deletion of clusterrepo due to CI/CD validation of plugin

* add manual + refresh to namespaces list + fix issue where switching between workspaces results in the manual refresh button continually spinning

* move rows and loading flag to resource-fetch and do necessary changes to custom lists to minimize code changes for the future

* Minor fixes
- Match existing loading check in projectnamespace list (had a check for currentCluster, probably not needed but added just in case)
- Fixed masthead loading indicator for management users and features

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-10-09 10:37:38 +01:00
Alexandre Alves 270e18c8e0
Enable incremental loading by default (#6866)
* add logic to login function to make sure incremental loading is enabled by default for all users who dont have the setting yet populated

* lower default threshold for performance settings to 1500

* simplify way we enable incremental loading by default when no setting is set

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-09-14 15:13:48 +01:00
Richard Cox 43d338fac2
Harvester Plugin (#6729)
* routing maybe

* remove nested edit views

* harvester custom routes

* fix loading imported dev cluster

* move harvester-manager hci.cluster type out of harvester pkg

* fixes for build-pkg

* fix harvester custom dialogs

* fix harvester pkg routing

* generateDynamicTypeImport hyphenated dirs

rename cloud_credential and machine_config back to cloud-credential and machine-config

* Appease linting

* Fix epinio pkg build
- Includes fixes for some dashboard component references

* Revert "Receiver credential secrets are deleted when secret is set to none"

This reverts commit 836460e2998959bcda0b14a9f6511f248980b7b5.

* Fix plugin modal cancel button in dark mode

* Ensure correct components loaded when a new version of a plugin is loaded
- The route matcher was never updated with new route-->component values
- This was due to `this.router.options.routes` not containing the result of `router.add`
- See https://github.com/vuejs/vue-router/issues/2280

* Revert "Revert "Receiver credential secrets are deleted when secret is set to none""

This reverts commit e524bb3d40ea7adfe35c38ec7870560625965d25.

* fix harvester manager->harvester routing

* rename dialogs

* move harvester-manager files out of harvester pkg

* Revert "remove nested edit views"

This reverts commit e835835943d63e74c50942884fec3706f8703047.

* plugin validators dynamic import - not working

* fix merge conflict

* fix harvester members

* fix conflict

* custom validators

* harvester table formatters

* members routing

* import path fixes

* harvester mutli load

* Port across tweaks made during dynamic plugin work
- harvester plugin can be bundled with the dashboard until dynamic work has been completed
- Nav directly to virt cluster dashboard instead of via /harvester-c-cluster
- Fix missing bottom border on virt cluster list, hide actions (as they're never populated)

* move config/settings and config/harvester-map

fix hci setting custom components

* fix harvester setting import path

* Move over SerialConsole and Novnc, remove harvester.notifications
- These components were so 1-1 with harvester in the end i moved them over
- Also removed the like-for-like generic.notification `harvester.notification` strings

* Remove isSingleVirtualCluster, most of isMultiVirtualCluster

* Fix two nav issues
- harv cluster members --> prefs --> click on-screen back
- dashboard --> prefs --> click on-screen back

Both of these would be better fixed by an incoming change to the default layout (don't show old content before switching page)

* Fix reload of project/namespace page

* Split out project namespace into it's own component (1 or 2)

* Split out project namespace into it's own component (2 or 2)

* use product hideSystemResources opt instead of isVirtual/product===virtual

* fix missing prop in header

* Move FilterLabel and CloudInitType to harv pkg + two other references

* Move Harvester Upgrade components to harv pkg
- Needs a review with Neil regarding generics

* rebase build+load not working

* fix harvester route in authenticated

* Experimental Changes

* Fix merge conflicts

* WIP Fix routing
- includes project/namespace and namespace pages

* Tidying up

* Move harvester core store to plugin, remove harvester code from authenticated flow
- harvester store is a steve store that now lives in the plugin
- harvester `loadVirtual` replaced with a shortened `loadCluster` in it's own store
- Also fix xterm css import

* Fix three routing related bugs
- Fix project/namespace create/edit/cancel/done flows
- Update harvester's loadCluster to better match loadCluster
- Make edit namespace page project resource agnostic

* Build fixes

* Fix create namespace button and other tweaks

* fix two issues with nav out of imported harvester cluster

* Fix alignment of action menu button
- Used in many places
  - all generic table action menus
  - global settings --> settings
  - rke1 cluster detail page machine pool group actions
  - project/namespace list project group actions
  - resource detail page action menu

* Revert changes to app and pkg creators
- This should fix `check-plugins-build` gate
- It does hide the underlying issue, but that won't have been brought in by this PR?

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2022-09-01 08:57:05 -07:00
Richard Cox 733caceb36
Fix application of branding, color and theme from settings (#6706)
- The watchers for settings apply them
- This was not happening as they never changed from the initial value
- Caused by 771f168a5b
- Revert to the initial way. This may break epinio but that can be fixed later on
2022-08-29 10:12:47 -07:00
Neil MacDougall 5193cf42af
Remove window.v debugging code (#6684)
* Remove window.v debugging code

* Remove lookup debugging tool which also added items to the global window object
2022-08-23 10:04:21 +01:00
Richard Cox 29e74a0e35 Tweaks to the performance settings & loading indicator
- Following UX review this is the first set of changes
- The text on the settings page has been improved
- The background of the incremental loader has been removed
- Fixed a typo (`UI_PERFORNMANCE`)
2022-08-04 11:39:21 +01:00
Nancy 55b0564490
Merge pull request #6560 from n313893254/pr
HARVESTER: Fix HARVESTER v1.0.3 VM issues
2022-08-03 10:34:46 -07:00
Alexandre Alves 0a78a85ab2
fix-issue-multiple-resource-counts-on-resource-fetch-mixin (#6589)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-08-03 16:05:20 +01:00
Alexandre Alves 94d8becc64
Incremental loading and manual refresh features (#6543)
- Add manual refresh experimental feature to specific list views
- Add incremental loading experimental feature to specific list views

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-08-03 12:02:19 +01:00
wujun eaf75d13f0 HARVESTER: fix template OSType not automatically filled 2022-08-01 15:39:16 +08:00
n313893254 86a0487e92 Harvester: Fix reserved memory edit issue 2022-08-01 15:39:03 +08:00
Sean 41ba49b6c2 Adds in UI-side validation for Ingress Form plus additional fixes.
Fixes #4575 Add in validator injection to form-validation mixin, add in "allTabsExtraContent" slot to "tabbed" for messaging that should span all tabs, Error component optionally displays as banner, InputWithSelect can now show validationMessage on text-box without a label, LabeledSelect can now show tooltip and validationMessage at the same time, Select component can now show validation message, adding and removing rules and rulepaths displays correct content, removing does not reload page (fixes #6319), ingress form shows proper validation messages for the following states: invalid "name" field, invalid request host, invalid rule path, invalid rule target service, invalid rule port, invalid default backend target service, invalid default backend port, either rules or default backend must be present. Ingress form is validated and "Create" button is disabled if payload is not validated as correct.
2022-07-21 13:55:38 -04:00
Neil MacDougall c614af2173
Plugins fixes and check GitHub action (#6370)
* Plugins fixes and check GitHub action

* Update check-plugins.yaml

* Update check-plugins.yaml

* Debug script

* Debug script

* Make sure verdaccio check does not fail script

* Allow errors when checking

* Fixes for CI

* Fix directory cleanup

* Debug

* Add yarn install for in-tree check

* Fix lint issues
2022-07-20 13:07:38 +01:00
wujun 0a46b6e5f6 HARVESTER: Fix cloud-config undefined,enhancement window OS case 2022-07-15 09:16:08 -07:00
wujun 15f5065392 HARVESTER: filter labels 2022-07-15 09:16:07 -07:00
Sean 3939a6b8fc Server errors should no longer disable save functionality on forms 2022-07-15 10:44:55 -04:00
n313893254 5ea3887233 Update for review 2022-07-08 22:00:59 +08:00
wujun 707d63f957 HARVESTER: cloud-init enhancement 2022-07-08 18:34:50 +08:00
yuzeng bb55635df4 Harvester: Image volume can be empty in VM template 2022-07-08 18:34:50 +08:00
Sean ddab180ecc Adds in form validation mixin, error reporting on inputs, a few examples 2022-07-07 13:18:43 -04:00
Alexandre Alves 5ab9084f28
UI expired session doesn't redirect us to the login page (#5872)
* add logic to handle expired sessions by redirecting user to login page

* clear console logs

* fix import paths

* move logic of listeners for tab vis to BrowserTabVisibility mixin + add check to see if we are in a single prod realm (wont run in epinio/harvester world where BE is not available)

* minor rebase changes + add option enabled by default for single apps to check is session is alive

* exclude desktop prods from session check

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2022-06-20 09:32:44 +01:00
Nancy Butler e4e13261c2 update csp-adapter name, generateSupportConfig url 2022-06-17 14:42:00 -07:00
Neil MacDougall 13e4564eec
Fixes for setting custom favicon (#6185) 2022-06-17 07:40:03 +01:00
Richard Cox e0922917de Fix `globalSettings` error in console
- caused by bad merge from epinio-dev --> master
- globalSetting was moved to a `computed` property but wasn't removed from `data`
2022-06-10 12:29:24 +01:00
Phillip Rak 3c23d90b0d
Port rancher components to TypeScript (#6073)
Summary

This ports the components under pkg/rancher-components to TypeScript. Take note that this change also touches some areas outside of pkg/rancher-components, including

    shell/mixins/labeled-form-element.ts
    shell/mixins/compact-input.ts
    shell/components/form/LabeledSelect.vue
    shell/components/form/Select.vue

Making changes to these components was required to properly work with the mixins used for pkg/rancher-components/src/components/Form/LabeledInput/LabeledInput.vue. Perhaps these would be good candidates to port to Rancher Components next..

Fixes #5932
Areas or cases that should be tested

We'll need to review a good range of usages for the modified components to check for regressions. I'm mostly concerned about type errors or warnings that might be raised during runtime.
2022-06-07 10:36:37 -07:00
Richard Cox 3ed383c83e Merge remote-tracking branch 'upstream/epinio-dev' into merge-epinio-dev 2022-06-06 09:35:32 +01:00
Nancy Butler 52c495aab7 aws support generate config 2022-06-01 11:35:17 -07:00
Catherine Luse da72a9c4b5
Merge pull request #6068 from catherineluse/helm-values-docs
Add docs and comments on how Rancher handles Helm chart values
2022-05-31 17:38:48 -07:00
Catherine Luse cfc3753c2c Add docs and comments on how Rancher handles Helm chart values 2022-05-31 17:08:41 -07:00
Phillip Rak dbe845bae8 Move get/setWidth functions to utils
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-05-31 08:39:54 -07: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
Phillip Rak 0518f7e9f8 Replace jquery in labeled-form-element.js
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-05-26 10:55:35 -07:00
Richard Cox 95166ae3dc Fixes after rebase 2022-05-10 10:04:04 +01:00