Commit Graph

328 Commits

Author SHA1 Message Date
Richard Cox 985ca0f055 Wire in 2.9.0 settings for server-side pagination
- Everything is gated on `on-disk-steve-cache` feature flag
  - There's a backend in progress item to resolve a `revision` issue, until then disable watching a resource given it
- Global Settings - Performance
  - Added new setting to enable server side pagination
  - this is incompatible with two other performance settings
2024-05-09 16:14:41 +01:00
Richard Cox f136df3962
Merge pull request #10853 from richard-cox/fix-chart-performance
Improve Performance of many helm chart based pages
2024-05-08 07:37:35 +01:00
Neil MacDougall f5431cbbaf
Add i18n string usage checker script (#10805)
* Add i18n string usage checker script

* Fix lint issues

* Add i18n check to GH Action workflow

* Update to node 16

* Update workflow to run script properly

* Allow script to return okay if when there are errors

* Add documentation

* Remove commented code
2024-05-02 20:52:15 +01:00
Richard Cox 01219b751e
Merge pull request #10761 from richard-cox/pagination-node
Update Node list to support server-side pagination
2024-05-02 11:54:01 +01:00
Richard Cox af71daed1d Revert "This fixes an issue where catalog/charts were stale after a repo was updated"
This reverts commit 90ca1209f4.
2024-05-01 14:20:01 +01:00
Richard Cox 0dfe5d5ccd Beef up validation 2024-04-30 11:04:06 +01:00
Richard Cox f0c397c001 Update Node list to support server-side pagination
- Setup pagination headers for the node type
- Define a pattern for fetching custom list secondary resources
- Major improvements to the way pagination settings are defined and created
- Lots of docs improvements
- Handle calling fetch again once fetch is in progress (nuxt caches running request)
- Validate filter fields (not all are supported by the vai cache
- General pagination fixes
2024-04-30 11:04:06 +01: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
Nancy 557d0280fb
EKS Provisioning (#10581)
* eks initial

* k8s options

* eks node group component

* add config and networking components

* fix default region on initial load

* use .sync modifier in network tab

* launch templates

* node group styling

* spot instances/launch template instance type

* fix selectcredential footer when not showing the rest of the form

* cluster name description and options

* iam listRoles

* subnets

* k8s version dropdown custom

* logging tab

* agent deployment customization, labels and annotations

* working default values

* fix edit eks/aks

* instance types dropdown improvements and spot instance type filtering

* validation;

localization

* todos

* tests

* move diffUpstreamSpec

* clean up

* improve launch template loading appearance

* fix kms key fetch

* fix custom role radio

* fix failing nodegroup test

* fix lint

* fix typescript errors in crueks

* nodegroup ts

* cache ec2 instance types

* cache instance types in vuex

* nodegroup ts

* ts errors in eks networking

* eks config ts errors

* tweak nodegroup input sizing

* reset nodegroup default values if the launch template is cleared

* add tooltips and userdata file upload button to node groups

* add networking tooltips; make credential dropdown half width when not showing credential form controls

* fix rancher managed launch template detection

* fix networking tooltip

* show when a node group has a rancher-managed launch template

* fix error filtering for ec2 iam roles

* add system labels and annotations for norman clusters

* lint

* lint

* fix labels and annotations getters in norman cluster model

* added tests for norman cluster system labels and annotations

* fix some eks typescript and hide cluster name when no credential

* fix userdata sublabel link

* fix networking info banner translation typo

* node group size labels and tags should be editable
2024-04-26 09:06:48 -07:00
Giuseppe Leo 793f7c6023
Initial migration of Vue3 for compatible fixes (#10858)
* Correct file naming and small TS issues

Correct TS related issues

* Manual replacement of :is on standard HTML tags

* Add missing required in the code dependencies

* Correct SCSS import

* Correct test file naming

* Correct typo in markup

* Use alias for types import
2024-04-23 20:16:46 +02:00
Cody Jackson e205b568ee Updating <router-link> to no longer use the deprecated :tag property 2024-04-18 04:23:04 -07:00
Phillip Rak 6c96a5bdce Default to unlimited line width when dumping yaml blocks
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-04-09 09:49:08 -07:00
Francesco Torchia 6525a5b069
Fix type errors in create-yaml.test.ts
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-04-09 12:20:18 +02:00
Richard Cox 0862b80433 Changes following review
- General changes following review comments
- Fix issue where in local cluster the systen classed namespace associated with a project would get muddled with selecting user resources in mathing project
  - Part of this is a big refacture, most of the code to create pag filter params is now in a helper filer
  - Added much improved typing
- Fixed issue where the dynamic namespaces (c-, p-, etc) weren't correctly hidden
- Move user to previous page if last entry on last page deleted (and there is a previous page)
- Fix confusing preference to hide dynamic namespaces (c-, p-, etc)
2024-04-02 14:22:24 +01:00
Richard Cox 9c65c1e045 small refactor 2024-04-02 13:34:36 +01:00
Richard Cox de131f8a26 Remove paginationEquals from store, and move steve compare to generic utils file 2024-04-02 13:34:36 +01:00
Richard Cox d25ec477ae Update comments 2024-04-02 13:34:36 +01:00
Richard Cox 09614b0136 Server-side pagination
Polish and fixes from alpha
2024-04-02 13:34:36 +01:00
Richard Cox ae7eb102ad Pagination Alpha 2024-04-02 13:34:36 +01:00
Richard Cox d6122779a2
Merge pull request #10669 from richard-cox/fix-node-spam
Handle resources that cannot be watched
2024-03-27 11:03:52 +00: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
Evgeniya Vashkevich 47ff3ddac6
[FEAT] Moved driver pages from Ember (#10557)
* [FEAT] Moved driver pages from Ember
2024-03-26 16:33:15 -07:00
Richard Cox 230ad4d8f0 Handle resources that cannot be watched
- examples metrics.k8s.io.podmetrics, metrics.k8s.io.nodemetrics, componentstatus
- change 1
  - when these are watched the BE now sends an error... which we ignore and try to watch again
  - so handle the error
- change 2
  - avoid this scenario though by stopping watches that don't have the watch verb
  - because of this change 1 can only be tested by changing code
2024-03-26 16:00:08 +00:00
Alexandre Alves 5409f2b23a
remove v1 monitoring code (#10539)
* remove v1 monitoring code

* fix lint issue

* remove monitoring v1 uninstall code + remove v1 uninstall translation strings + simple checks for detail pages in e2e tests to verify integrition of work done

* address pr comments

* fix unit tests

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2024-03-22 17:39:32 +00:00
Richard Cox f5ab831f37 Changes after review 2024-03-22 15:36:55 +00:00
Alexandre Alves 3df4e9dd53 Reintroduce "Replace `Vue.extend` with `defineComponent` in shell"
This reverts commit 1eacbdea40.
2024-03-13 10:10:26 -07:00
Sorin a54edec8b6
Merge pull request #10522 from scures/9810/incorrect-abbreviation
9810/incorrect-cluster-name-abbreviation
2024-03-12 14:44:30 +01: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
scures 27889b0dbf
feat: cluster abbreviation to 3 chars, shows customisation on cluster creation 2024-03-11 14:43:28 +01:00
Richard Cox 097a220225 Fix new, revealed issues. See PR for description 2024-02-29 17:30:26 +00:00
Richard Cox b464d15ee0
Integrate new schemaDefinitions endpoint (#10141)
* resource edit AS yaml

* fix cruresource (yaml from form)
- lazy load the schemaDefinitions when needed, avoids sync all to createYaml before we have an async chance to fetch schemaDefinitions

* Fix questions
- there are only four places we use questions, none of which use schema, this is just to be safe

* cluster scan, plugins/fieldsForDriver, defaultFor, validationErrors

* pathExistsInSchema
- used to optionally show conditions tab/list in resource detail view
- logs of things in ingress list/edit

* createPopulated / defaultFor
defaultFor requires resourceFields, it's only used by createPopulated in one place to support machine configs without components

* wip

* WIP MONITORING.SPOOFED
- these aren't spoofed types, but secondary schemas
- testing fix blocked, primary schema's have resourceFields

* Move steve specific (resourceField) code to steve models
- create models for steve schemas and apply to cluster and management stores
- move resoureField based validationto steve model
- move pathExistsInSchema to steve store getter
- don't fetch schemaDefinitions on start up when saving prefs (not needed and blocking)

* comments / improvements

* (untested) refactoring

* Fix alertmanager definitions, add retry definition fetch

* Fix pathExistsInSchema for path length > 2

* Fix questions that accept schemas
- tested by adding Questions to random page and the node schema

* Fix to saving configmap part 1
- the save works but doesn't show data. the yaml is the same as before. debug info added

* Validation by resourceFields is a norman specific thing, so make it such

* small refactor

* Tidying up

* Remove rebase junk

* fix linting and unit tests

* fix unit tests

* fix linting from fix for test....

* Tidying up, fix alertmanagerconfig

* Remove unit test todos

* add unit tests for resource fields

* sdssdf

* Add unit tests for pathExistsInSchema

* JS --> TS

* Store schemas in local singleton cache to avoid hitting store

* fix minor changes from review

* cruresource changes following review
- improvement - remove spurious canDiff
- createResourceYaml - pass in resource to use instead of calc in code

* WIP changes to parseType

* Fix generic cloud credential and node driver forms

* handle missing reactivity given schema definitions not in store

* fix and add unit tests for `parseType`

* Fix create-yaml test

* Changes following review
- improved comments
- SchemaDefinitionCache is now per store (and is reset as such)
- typeRef now uses parseType

* Fix dep loop by moving route based helps in auth out to utils file

* fix unit tests

* Changes following review
2024-02-28 17:08:35 +00:00
codyrancher 1dfd3c0c2c
Merge pull request #10333 from codyrancher/title
More informative page titles
2024-02-15 09:43:57 -07:00
Cody Jackson 36a31a397e More informative page titles 2024-02-12 20:11:45 -07:00
Mo Mesgin e934c8bd55 check string type before creating blocks in dumpBlock 2024-02-07 10:59:28 -08:00
Richard Cox f4c39fcb6c Wire in cleanForDownload per resource customisation to existing model cleanForX pattern
- base resource model has cleanForX style functions which specific resources override with their own custom neads
- wire in the cleanForDownload into this pattern
- add cleanForDownload override for secrets
2024-02-02 09:03:08 +08:00
Alexandre Alves 64e20bb50f
Revert "Replace `Vue.extend` with `defineComponent` in shell" (#10344) 2024-01-29 17:22:06 +00:00
Nancy 4cca5faf81
AKS provisioning extension (#9669)
Adds a built-in AKS provisioning extension to replace the embedded ember pages, as well as modifications to the provisioning UI to support other non-rke2 provisioning extensions
2024-01-11 07:52:45 -08:00
Phillip Rak 610b826319 Replace `Vue.extend` with `defineComponent` in shell
Replace the usage of `Vue.extend` with `defineComponent` throughout multiple components located under `shell/components/`. `defineComponent` provides better type inference, improved TypeScript support, and will be the recommended way to define components when Dashboard migrates to Vue 3.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-01-10 09:06:46 -07:00
Richard Cox 0368f657f0
Merge pull request #10037 from Shavindra/9371-remove-unwatned-properties
Removed unwanted properties from steve resources
2024-01-08 15:48:08 +00:00
Richard Cox d1a8b2f33b Refactoring and many fixes 2023-12-20 15:26:23 +00:00
Phillip Rak a9d7d4bf4d Prevent mutating yaml when a header isn't found
This prevents `dumpBlock()` from mutating parsed yaml when a header can't be located. More investigation might be warranted to discover why the regex used by `getBlockHeader()` isn't matching the keys when parsing the example yaml:

```
 apiVersion: v1
data:
  a: "a\nb\tc"
  b: "a\nb\tc"
kind: ConfigMap
metadata:
  name: yaml-tab-test
```

but the crux of the issue still comes down to the fact that `dumpBlock()` will indiscriminately mutate yaml output when a key can't be located; it's important that this behavior is corrected.  

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-12-15 11:38:17 -07:00
Phillip Rak 0292e1182d
Merge pull request #10142 from rak-phillip/bugfix/10044-config-maps
Allow for `jsyaml.dump()` Options in `dumpBlock`
2023-12-15 07:16:21 -07: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
Shavindra b750d776f7 Remove type. 2023-12-14 23:30:33 +01:00
Shavindra de550a86d4 Merge branch 'master' into 9371-remove-unwatned-properties 2023-12-14 23:17:59 +01: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
Phillip Rak 2b482f8293 Add new unit test for `create-yaml` `dumpBlock()`
This unit test asserts that `dumpBlock()` can properly accept dump options for `jsyaml` and will output the expected string when long lines (over 80 characters) are present in a block.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-12-12 10:58:42 -07:00
Phillip Rak 01c043099e Allow for `jsyaml.dump` options in `dumpBlock`
Introduce the capability to customize `jsyaml.dump` options in the `dumpBlock` function, allowing developers to supply all of the dump options specified by `jsyaml.dump()`.

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-12-12 10:52:37 -07:00
Richard Cox 8f0c769b60
Merge pull request #10054 from richard-cox/squash-findAll-secret-monitoring-chart
Avoid fetching all secrets and workloads when installing Monitoring Chart
2023-12-12 13:03:41 +00:00
Richard Cox c9b2f79053
Merge pull request #10024 from richard-cox/cluster-cert-view
Add certificates view to cluster dashboard
2023-12-12 11:57:20 +00: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
Richard Cox fd9285ea4d Remove use of findAll secrets - Monitoring Chart
- Contributes to #9964
- Monitorign chart fetched all secrets, then all usages of it filtered down to a single namespace
- So we now only fetch

Related
- Fix scenario where fetching all then fetching namespaced would return all results

Improvement
Also improve spacingin a placeholder
2023-11-17 17:58:43 +00:00
Shavindra 3436e4271c Fix linting errors. 2023-11-14 10:51:46 +01:00
Richard Cox 4e3a282b79 Add certificates view to cluster dashboard
- Add a new tab, next to events, in the cluster dashboard
- Tab shows a list of all secrets of cert type
- List allows users to see which certs are expiring soon, how long they've lived etc
- Tab also shows a notification if certs are expiring or have expired
- Related fixes
  - plumb in option list paging params (so we can show X of Y Certificates in pagination controls)
  - fix usages of from = from || now
  - Count requests to kube steve as steve requests (alongside local steve requests)
2023-11-08 11:52:23 +00:00
Shavindra 9ac7eb2360 Removed unwanted properties from pod, secret and workload 2023-11-02 11:05:55 +01:00
Richard Cox a4aa9f7f4d
Merge pull request #9941 from richard-cox/fix-supplement-error-handling
Allow extentions to redirect the user to another location if authentication fails
2023-10-27 11:34:25 +01: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 48d0807181 Revert "App upgrade notification shown for incorrect app (#9806)"
This reverts commit eec4a46fdb.
2023-10-20 15:13:52 +01:00
Nancy a498e1754a
hide embedded grafana graphs on cluster index when the user cant view grafana endpoint (#9942)
* only show cluster embedded grafana dashboards when user has permission to view the grafana endpoint

* Remove unsed var ENDPOINTS

---------

Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
2023-10-19 08:43:24 -07:00
Richard Cox 8fdadee8e3 Allow extentions to redirect the user to another location if authentication fails
- if entering the product, loading cluster, etc fails extensions can now throw a `RedirectToError` error
- this avoids the user being redirect to the dashboard home or fail-whale page
- example - epinio auth fails and we want to return user to the epinio cluster list

In theory we should be able to to instanceof with something that extends error and has a `name`,
unfortunately this does not work, so gone for something more manual.

Also bump shell so we can publish a new version
2023-10-17 18:47:21 +01:00
Sean-McQ 39adb0880a
was incorrectly checking for apiGroups on the missingOneResource error. (#9916) 2023-10-13 15:46:18 -04:00
Giuseppe Leo 50aac73712
Automation: No matching clusters msg fix (#9864)
* Remove conditional chaining in template

* Prevent app to break if no setting available

* Prevent to break if no mgmt cluster

* Prevent sidebar to break if no kube cluster

* Prevent breaking if no product available

* Prevent sort utils to break if no value is provided

* Add markup comments

* Replace getter mapping

* Prevent error if missing label for the inspected cluster

* Add tests for sidebar
2023-10-11 11:03:39 +02:00
Giuseppe Leo eec4a46fdb
App upgrade notification shown for incorrect app (#9806)
* Heavy code cleanup: move function to utils, config and types to their own file

* Add fallback and tests for version comparison not retrieving values

* Fix refactoring

* Add partial case of array filterBy

* Replace multiple functions handling the same case with single getter; add covering tests

* Add no parameter case to be correctly handled

* Add case with different chart values, e.g. Epinio issue case

* Prevent issues if retrieved version is undefined; Add unit tests for upgrade cases

* Filter out charts if lack parameters
2023-10-10 11:14:24 +02:00
momesgin 4892bb7c95
updated support link (#9870)
* updated support link

* revert mistakenly removed test

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-10-06 13:40:35 -07:00
Sean-McQ 86a448b0e5
now properly escaping key names prior to diffing objects (#9865) 2023-10-06 12:48:57 -06:00
Nancy 702c54e96f
check if a user can list apps before trying to fetch the monitoring app (#9826) 2023-10-06 09:13:14 -07:00
Giuseppe Leo d2d6139496
Add test for version dev detection (#9848) 2023-10-04 19:42:53 +02:00
Sean-McQ 6f0a3d436a
save method in model fixes payload, validator catches the rest (#9758) 2023-09-27 13:40:36 -04:00
wujun 0ae35023b8
show harvester cluster in fleet page (#9652) 2023-09-27 09:49:19 -07:00
Richard Cox a70fe1b431
Merge pull request #9598 from richard-cox/fix-modified-resource
Fix resource modified handler
2023-09-27 17:36:49 +01:00
Nancy Butler d3b6ec72e8 update isdevbuild to include -alpha versions 2023-09-20 14:08:27 -07:00
Sorin 67e6691934
fix: some scenarios with the smallIdentifier() (#9706)
* fix: some scenarios with the smallIdentifier()
* Minor refactor, add unit test
- Move bulk of smallIdentifier out to custom abbreviateClusterName
- Made `case 1` easier to read
- Added a bunch of unit tests
  - need to discuss some results

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-09-15 11:06:44 +02:00
Shavindra 2c3801e6e3
Fix custom rke2 cluster registration command ipaddress (#9664)
- Fix ip address sanitization in custom rke2 cluster registration.
2023-09-11 17:58:41 +02:00
Richard Cox abaa2d0adc Add unit tests for sortBy 2023-09-06 15:41:56 +01:00
Evgeniya Vashkevich 97ec5827cd
Filtered out non-opaque secrets in backup/restore (#9449) 2023-08-31 12:24:31 -07:00
Alexandre Alves 9d27823a4a
add growl message to display warning messages from response headers (#9581)
* add growl message to display warning messages from response headers

* update growl styling based on feedback from Eden

* Many updates
- Move functionality into it's own file
- Add unit tests
- Fix issue where YAML PUTs weren't included in check (bug in master)
- Fix issue with separating warnings (bug in master)
  - previously this was done via `,`, however that appears in the messages themselves
  - add configuration which allows this to be customised
- Add configuration which would allow us to disable or expand how growls are shown

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-08-29 09:54:25 +01:00
Richard Cox f9aa1f38bb Fix resource modified handler
- fixes issue in handleConflict that meant
  - conflicts were not detected
  - non-conflicting changes were not applied to users resource
- see #9597 issue description for more detail
2023-08-25 18:41:04 +01:00
Bastian Hofmann dcb8b2542b Fix tests
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
Bastian Hofmann 1ff5df01fd Add tests 2023-08-24 13:58:29 +01:00
Richard Cox 4b8e30cdae Wire in canViewResourceto the check in authenticated 2023-08-22 17:16:44 +01:00
LiuYan 56cb64da58 fix(LinkName): add node schema checking 2023-08-22 16:54:13 +01:00
Sean-McQ 5c2f28b4dc
this was a older line that got relocated up into the getSocketUrl method (#9462)
* this was a older line that got relocated up into the getSocketUrl method

* Fixes compiler warnings
2023-08-02 11:04:18 -04:00
Alexandre Alves e70abeb82c
UI says "Matches no existing clusters" when there is a null value for cluster selector in cluster groups (#9441)
* fix bug with matchexpression

* clear console logs

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-07-31 11:46:08 +01:00
Neil MacDougall 02e6e84f41
When execing into a container, try linux and windows commands when we can't determine if the node is windows (#9241)
* When execing into a container, try linux and windows commands when we can't determine if the node is windows

* Fix lint

* Lint: Remove trailing white space

* Use error message rather than last error

* extra failover, caching last working os against pod, errors, tests

* add __mocks__ folders to eslint ignore patterns

* standard user test fix

* removed unnecessary try/catch logic

* Revert "removed unnecessary try/catch logic"

This reverts commit c263131927.

---------

Co-authored-by: Sean <sean.mchugh@suse.com>
2023-07-28 21:28:03 -04:00
Richard Cox 77d65c9c9b Add additional types for extensions, fix other typing errors 2023-07-25 15:51:31 +01:00
Bastian Hofmann df28349726
Merge branch 'master' into embed-project-monitoring-dashboards 2023-07-13 15:37:34 +02:00
Neil MacDougall c9e1a19396
Extension support for custom provisioning (#9246)
* Extension support for custom provisioning

* FIx lint issues

* Discovery / Tweaks
- fix issue where namespacesOverride was lost
- tidy up PROVIDER
- try to handle missing provider=type url param (could be missing extension-params)
- added a few comments to comments to come back to

* Names and typings
- change param --> customParam to make it clearer it's not url params
- add labels-annotations to shell types

* Wire in provider detailTabs
- as per original readme this should be made generic (extension point working directly with ResourceTabs)

* Update IClusterProvisioner & docs

* Improvements / Changes to support proving out DO extension
- cluster hooks optional
- buff up save hook (and pass in cluster when calling apply fn)
- move normalizeName into generic place
- bring back async create machine config
- hack for do extension (map example provider to do provider)

* updates, add optional saveCluster, add missing kube file
- saveCluster complements hooks, doesn't skip handling of addons, etc
- ensure register hooks take the `this` context in all worlds

* Adding docs

* Updates
- location config based changes
  - change customParams to context
  - add query param
- add new extention point to add tabs to cluster create cluster config section
- fixed some typing
- fixed issue where cluster was not passed to before / after hooks (only important if 'this' changes

* Changes following review, fix `t` in plugins

* Fix linting

* Docs updates, pass through more edit/view things

* Conditionally show the namespace grouping in the cluster list
- means users can differentiate between clusters with same name in different namespaces
- useful when clusters created via extension provisioner where ns can be selected

* docs tweaks, actually include the provisioning page in docs

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-07-11 22:17:57 +01:00
Cody Jackson 1b1f7dae33 Add the ability to import layouts from extensions
Addresses one facet of https://github.com/rancher/dashboard/issues/9216
2023-07-07 13:53:57 -07:00
Richard Cox 0245a8cb93 Merge remote-tracking branch 'upstream/master' into epinio/resolve-conflicts-with-master 2023-06-23 18:00:14 +01:00
momesgin d3302399f2
8657 - added unit tests for generateSupportLink (#9180)
* added unit tests for generateSupportLink

* added one more test case for generateSupportLink

* use it.each method to combine separate tests that are related

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-06-23 09:35:25 -07: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
Alexandre Alves fe8b75e816
fix bug with svg icon in header action extension point where colors for icon were being grabbed incorrectly (#9157)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-06-22 15:18:19 +01:00
Nancy Butler e00489165a use projecthelmchart dashboardValues for grafana url 2023-06-21 13:44:17 -07:00
Richard Cox 7feb5ca222 Move isGitRepo which depends on epinio stuff out of generic utils 2023-06-21 15:02:10 +01:00
Richard Cox 487ffad91c Fix build of epinio as an extension 2023-06-21 15:02:10 +01:00
Richard Cox 48f1114006 Merge remote-tracking branch 'upstream/master' into epinio-dev 2023-06-19 15:40:07 +01:00
wujun 717a2b2c14
HARVESTER: add bare-metal container and mcm support (#8754)
* HARVESTER: add bare-metal container and mcm support

* Harvester: Fix re-render old route component

* HARVESTER: fix services and hide repositories

* HARVESTER: add svg icon

* HARVESTER: add harvester version in explorer page

* HARVESTER: change openRancherManagerSupport => isRancherInHarvester

* HARVESTER: move method to models type

* HARVESTER: enhancement TopLevelMenu when use embedded rancher

* HARVESTER: polish harvester mode judgment

* HARVESTER: Add namespace resource quota help text

* HARVESTER: remove service filter

* HARVESTER: set harvester-baremetal-container-workload to false

* HARVESTER: fix svg & namespace component

---------

Co-authored-by: n313893254 <n313893254@126.com>
2023-06-15 13:28:08 -07:00
Bastian Hofmann 6c72d379d8
Embed project monitoring metric dashboards
This embeds the project monitoring Grafana metric dashboards if they are present and user has no access to cluster monitoring.

Fixes https://github.com/rancher/dashboard/issues/7286

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-06-09 16:29:23 +02:00
Richard Cox 9eea1852c3 Merge remote-tracking branch 'upstream/master' into master-epinio-dev 2023-06-08 14:54:40 +01:00
Shavindra 1c88aa9f8c
Handle Stringified Error Messages. (#9036)
* Update error handler to handle stringified JSON.
2023-06-05 19:31:09 +02:00
Richard Cox 1f17d72da0 Fix favicon
- fix for isSingleProduct
  - two link elements on page, we set the second one, browser showed first one
- not sure why this worked in normal mode
  - two link elements on page, we set the second one, browser showed second one
2023-06-02 18:25:45 +01:00
Nancy a9276ea340
fix grafana url utility (#9019)
fix grafana url on monitoring index

recompute grafana dashboard iframe url if monitoring version changes
2023-06-01 11:07:47 -07:00
Richard Cox d90ba881a6 Merge remote-tracking branch 'upstream/master' into merge-master-2 2023-05-25 16:51:00 +01:00
Qingyang Nong c0cdc2dbf3
HARVESTER: Cloud provider enhancement (#8935)
* HARVESTER: Cloud provider enhancement

* fix labels-annotations.js linting

* fix missing comma in labels.vue

* fix labels.vue missing bracket

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-05-22 16:49:19 -07:00
Richard Cox aa34bd3e29 Fix churn issue
- Moving the store setting to enable/disable filtering in the store to a function in a computed property caused havoc for churn
- Make this much neater by moving flag to the setup stage for both ns filter
2023-05-18 14:28:28 +01:00
Richard Cox 9fada7f0b6 Remove richards-logger 2023-05-18 14:28:28 +01:00
Richard Cox 6fffc0d36a Fix linting 2023-05-18 14:28:28 +01:00
Richard Cox 281fb6672c Simplify forced filtering setting
- Given forced filtering is now not resource dependent have a high level utils function to determine if enabled
- This should have opened up the door to setting a nicer default then ALL_USER, however it's actually initially applied somewhere other than ns filter
- Fixed a bug where the all option [] was valid
2023-05-18 14:28:28 +01:00
Richard Cox 15bc1cd036 Changes following BE update and testing 2023-05-18 14:28:28 +01:00
Richard Cox 7e5ad5de34 Expand enforced namespace filtering to multiple namespaces and projects
> This uses a new endpoint that has yet to merge. See https://github.com/rancher/rancher/issues/40140

WIP
- Contains console.warns (via custom logger, can be disabled)
- Waiting for final BE endpoint changes to merge
- Contains TODOs to resolve on final enpoint changes delivered

Pertinent Points
- Incompatible with incremental loading / manual refresh
  - Harder to get counts (need to sum up from different namespaces)
  - Requires use of new steve pagination
- Enforced NS threshold has been removed
  - The threshold only applies to the primary resource. This has issues when loading a low count primary (daemon sets) which depends on a very high count secondary (pods)
  - Fixing this would involve knowing all secondary resources a list uses, which isn't currently possible (each resource is requested individually, need to know them all first)
- There is no way to subscribe to multiple namespaces (one or all)
  - We mock this in subscribe by only persisting changes to resources from within target namespaces
- Everything should work with Advanced Worker enabled
2023-05-18 14:28:28 +01:00
Francesco Torchia 646f2a1159
Merge pull request #8853 from torchiaf/fix/8655
Test automation around YAML chomping
2023-05-16 10:34:02 +02:00
Francesco Torchia 4da0da96a0
Clean create-yaml.js code
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-16 10:09:31 +02:00
Francesco Torchia 12f2f1d290
[create-yaml] add unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-11 17:12:08 +02:00
Alexandre Alves c876a2ecf6
Agent configuration RKE2 (#8643)
* porting Neils poc work

* add all namespaces to pod affinity ui + add banners to for windows warning and no defaults for limits area + set namespaces as input as default for agent configuration + add node selector to agent configuration

* update banner copy in affinity section for windows + add visual separator between node and pod affinity

* added weight input for node affinity - preferred + made weight input for pod affinity appear only for preferred + changed MatchExpressions component to cover matchFields and matchExpressions  in node affinityupdate banner copy in affinity section for windows + add visual separator between node and pod affinity

* fix lint errors

* working on e2e tests for agent configuration on rke2

* e2e tests work in progress

* working on e2e tests

* fix issue with Tolerations component where data wasnt being propagated because some inputs were missing a connection with the update method

* finish missing bits of e2e tests + fix height of inputs + revert back default affinity fetch

* disable no arbitrary waits in cypress

* fix broken e2e and unit tests

* fix e2e tests again

* fix lint issue

* set timeout for intercepting request to 10 seconds

* update path for default setting in agent configuration

* fix issue in dark mode in group panel + update strings to match rke1 interface + remove label from namespace input on pod affinity + clean up agent config data on save and restore it if it fails + change order of ui blocks in agent config interface

* address low hanging fruit PR comments

* remove console log

* move agent config po to components folder

* remove select.po in favour of labeledselect.po + fix data-testid in arrayList component and also its unit tests + make unit-input po leverage the use of LabeledInputPo + fix title assertion

* address final comments on e2e tests

* fix issues with PodAffinity component + update e2e test payload check

* final PR fixes

* addressing PR comments

* remove log

* reverting changes to ClusterManagerCreateRke2CustomPagePo as it was impacting other tests + add a method to go to custom cluster creation page

* e2e test updates

* updating banners copy

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-05-11 12:00:22 +01:00
Francesco Torchia 0ae05b59a9
Merge pull request #8552 from torchiaf/fix/5958
`ConfigMap`, handle chomping
2023-05-10 12:42:58 +02:00
Francesco Torchia 6a7362f5e3
calculate indentation in yaml creation
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-09 20:35:25 +02:00
Neil MacDougall da0d60720d
Auth Provider: Support Okta with LDAP search (#8679)
* Auth Provider: Support Okta with LDAP search

* Minor fixes

* Update UX and add detail of LDAP configuration

* Fix issues when logging out

* Fix i18n key
2023-05-03 10:07:58 +01:00
LiuYan 19e3217381
fix(grafana.js):add try-catch block to monitoring version request (#8722) 2023-05-02 11:05:23 +01:00
Francesco Torchia 98c91ce5a3
improve code comments
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-28 09:48:13 +02:00
Francesco Torchia 8f6b8c30df
Merge pull request #8271 from torchiaf/fix/5070-5
Remove jquery from SortableTable
2023-04-20 19:18:31 +02:00
Cody Jackson 487cf0d6a4 Migrating all of the files out of the nuxt directory into reasonable places within shell 2023-04-20 11:56:58 +02:00
Francesco Torchia 61adce9898
dom util, getParent function refactoring for readability
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-19 16:18:19 +02:00
Francesco Torchia eb1b97da1e
remove jquery, SortableTable
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-04-19 16:17:58 +02:00
Richard Cox cdc96df61d
Merge pull request #8347 from bashofmann/fix-grafana-url
Fix Grafana URLs in local cluster for new monitoring version
2023-04-18 10:44:01 +01:00
Francesco Torchia c3eedb3b31
Handle block styles in yaml files
- add the possibility to specify what Scalar Style to use in the yaml blocks ('|' or '>') and what Chomping style ('+' , '-' or empty)
  see https://yaml-multiline.info
- set default to style to '|+' (keep all newlines)
- adapt CruResource to get in input the new yaml options

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-03-29 15:59:42 +02:00
Giuseppe Leo da037a946e
Modify PSP deprecation warning message when upgrading a K3s custom cluster to v1.25 (#8464)
* Add decode utils for escaped HTML

* Allow to inject HTML in the markup as for i18n

* Correct wording and markup for PSP modal confirmation
2023-03-21 11:47:20 +01:00
Cody Jackson eecefff26a Moving the route files outside of the nuxt subfolder 2023-03-14 17:00:42 -07:00
Francesco Torchia 82ec6a4eda
Merge pull request #8220 from torchiaf/fix/5070-2
Remove jquery from position.js, select.js
2023-03-14 11:41:19 +01:00
Francesco Torchia fe2370db43
Merge pull request #8214 from torchiaf/fix/7758
Jobs, fix Duration field format
2023-03-14 11:26:55 +01:00
Richard Cox cc8b824be3
Use custom `storeName` instead of hardocoded 'cluster' 2023-03-10 14:17:39 +01:00
Bastian Hofmann c7dfbe5c5d
Make grafana urls version dependent, so that they work correctly in the local cluster with old and new monitoring versions
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-03-10 12:15:17 +01:00
Bastian Hofmann 2b235e159c
Fix Grafana URLs in local cluster for new monitoring version
Fixes https://github.com/rancher/dashboard/issues/8346

Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-03-10 12:15:15 +01:00
wujun bcfeb79d98 enhancement use dynamic store 2023-02-28 21:09:30 +08:00
Shavindra e12939115e
Allow basic fleet user to manage fleet without cluster permissions. (#7446)
* Allow basic fleet user to manage fleet without cluster permissions.

* Handle no workspaces.

* Add Fleet bundle namespace mapping - fleet.cattle.io.bundlenamespacemapping

* Add git repo restrictions.

* Handle auth errors for checkSchemasForFindAllHash.

* Fix workspace switcher and handle fleetworkspaces 401 issues.

* Update workspace switcher.

* Fix Gitrepo restriction creation from the Workspace create

* Disable workspace creation
* Fix workspace loading after creation

* Fix Bundle creation error.

* Remove redudant FLEET.TOKEN request.
2023-02-23 14:15:32 +00:00
Francesco Torchia d1e7734ece
jquery from position.js, select.js
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-02-22 13:05:42 +01:00
Richard Cox e73c55c782 Fix issue where gap between resource.stop and resource.start lead to missed resource changes
- changes cover create, change and remove
- resource.stop events happen
  - we unusb
  - after socket errors (that rancher sends, like revision `too old`)
  - after resource type permissions change
- there would be a gap between resource.stop (fetch latest revision, wait 5 seconds) and resource.start
- this could lead to missed resource changes and stale info on screen

Linking a couple of pertinent changes

- forceWatch partially implemented - 14862b2924 (diff-42632b5ed3c30e60abade8a67748b16d45e0778091713dd71a46d4bbe9211d2c)
- too old originally removed https://github.com/rancher/dashboard/pull/3743/files
  - this was implemented before the backend fixed their spam

Note - resource.stop can be forced with CATTLE_WATCH_TIMEOUT_SECONDS=300 (on v1 will resource.stop every 5 mins)
Note - Too old can be forced by editing resource.stop with
      // const revision = type === '' ? undefined : 1;
      // dispatch('watch', { ...obj, revision });
2023-02-21 16:56:31 +00:00
Francesco Torchia 6e36eed511
elapsedTime, calculate days
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-02-21 09:24:00 +01:00
Giuseppe Leo 54b484fce4
Add integer test case for decimal with zero (#8006) 2023-01-24 11:26:43 +01:00
Giuseppe Leo 942c0442b9
Feature/6633 min password again (#7930)
* Change key for min password due inconsistency with the server value

* Allow to edit env var in settings model

* Allow to pass simple validators in the global settings editor

* Add validation for integer values on global settings password

* Add integer validation

* Add simple validators tests

* Allow integer validation to allow strings from inputs

* Simplify function and extend naming for settings rules

* Add further validations for the min password setting

* Replace logic with regular expression
2023-01-23 17:56:55 +01:00
Francesco Torchia d8422f29b6
Merge pull request #7936 from torchiaf/fix/7902
[type-map.js], fix pluralize function
2023-01-23 16:46:15 +01:00
wujun 41300c7d07
support multi nic (#7899) 2023-01-20 12:19:03 -07:00
Giuseppe Leo 8497f587d7
Add PSA custom resource in Cluster Manager (#7678)
* Add PSA resource model, edit, list, types, config, utils and navigation

* Remove controls sorting from config file in PSA form due unnecessary added logic

* Add missing type to exemptions

* Remove component specific grid alignment styling

* Add meaningful values on PSA form tests

* Add prefix for the namespace PSA form

* Correct PSA form test

* Revert RKE cluster erroneous changes

* Rename all the PSA form values to match specification and avoid issues

* Create function to convert array to dictionary

* Add types and replace function with utility in PSA form

* Trim exemptions values for PSA form

* Correct util test and function

* Enable YAML editor for PSA resource
2023-01-20 16:26:43 +01:00
Francesco Torchia 9a40885420
fix pluralize() function
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-01-17 16:15:34 +01:00
Sean-McQ ca1b810c7b
Moves sockets into the advanced worker (#7760)
* Moves sockets into the advanced worker

* worker can die peacefully now, making switching between cluster work.

* Make waitFor generic, wire in to waitForTestFn

* General Changes
- Fixes for switching cluster
  - includes using common getPerformanceSetting
  - avoid new code to unsub before socket disconnect
- handle `watch` `stop` requests
- lots of TODO's (questions, work, checks, test, etc)
- use common

* Switch socket fixes
- isAdvancedWorker should only be true for cluster store
- advancedWorker to be wired in

* Fix socket id for cluster workers
- sockets use an incremented local var for id
- when we nuke the socket file within the worker this resets, so they all ahve id of 1
- work around this by applying the unix time

* Fix handling of new partical counts response
- seen in dex cluster explorer dashboard
- count cards would be removed when partial counts response received

* Make resourceWatcher the sole location for watch state
- getters canWatch, watchStarted now are worked around (they look at state in the UI thread)
  - we now don't call resource.stop or restart.start in subscription
- tidied up `forgetType`
- moved clearFromQueue from steve mutations into subscription mutations (better location)
- added and removed some TODOs
- fixed watch (stop handler should be higher up, include force watch handling)

* pushes the csrf value into worker and adds it to fetch request headers.

* refactors batchChanges to address ref concerns and be more performant

* Maintain schema reference whilst updating
- This change mutates input in a function, which is bad...
- but ensures the reference isn't broken, which is needed to maintain similar functionality as before

* Fix waitForTestFn
- Seen when creating or viewing clusters

* On unwatch ensure any pending watch requests are removed from the queue
- the probably would have been a problem if the worker wasn't nuked
- however as the codes there lets make it safe

Also added `trace` feature in advanced worker, will probably bring out to other places as well

* Fix navigation from cluster manager world to any cluster
- Ensure that we handle the case where the advanced worker was created but the resource watcher wasn't
- ... but fix case where this was happening (aka ensure that a blank cluster context is ignored)

* Tidy some TODOs

* Add perf settings page
- This will help test normal flow (when advanced worker is disabled)
- Note - setting is now in a bag. This may help us better support further settings (enable client side pagination, etc)
  ```
  advancedWorker: { enabled: false },
  ```

* FIX - Nav from cluster dashboard --> specific event --> cluster dashboard and events not re-subbed
- Ensure we block default handling of resource.start (keep state in resource watcher)

* Tidying up some TODOs

* Adds in a cache and uses it to validate SCHEMA messages before batching.

* Forgot to actually save CSRF to the resourceWatcher when instantiated.

* an empty resource in a batchChange to signal remove

* Move addSchemaIndexFields to and created removeSchemaIndexFields in new file
- this avoids bringing class files into the worker

* Fix disconnect/reconnect
- Remove `syncWatch` (do the watch/unwatch straight away)
- Test/Fix re-sub on reconnect
- Test/Fix growls on disconnect

* Tidying up some TODO's
- including clean of workerQueue on resource.stop (this is SUPER defensive)

* batchChanges will now handle aliases

* Fix pods list - WIP
- ensure podsByNamespace is updated on batchChange

TODO
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works

* Fix pods list - fixes
- ensure podsByNamespace is updated on batchChange

Tested / Fixed
- the final update to the pod is ignored
- removing a namespace cleans the cache correctly
- disabling advanced worker still works

* Tidying TODOs

* Remove default same-origin header
- https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials

* Fixed TODO description

* Refactor subscribe, make it clear which vuex feature relates to what

* Lots of Fixes
- batchChanges fixes
  - fix index is 0 issues (!/!!index)
  - only `set` if we have to
  - ensure we set the correct index after pushing to list
  - ensure map is updated after reducing list size with limit
- podsByNamespace fixes
  - ensure when ew replace... we don't use the same referenced object
- general service resource fixes
  - ensure service's pods list stays up to date with store

* Multiple improvements/fixes
- resourceCache - store the hash instead of the whole object. This means longer load time be reduces memory footprint
- resourceWatcher
  - don't re-sub on socket reconnect if watcher is in error
  - don't sub if watcher is in error
  - don't unwatch for 'failed to find schema' and 'too old' errors
    - this clears the error, we won't to keep it to ensure we don't watch
- Remove #5997 comments, follow on work #7917

* toggle debug, remap alias types, cleaned up comments and console

* Unit tests for batchChanges
Much more scope for some crazy content

* Logging tweaks
- disable logging by default
- initWorker comes in too late to affect initial trace, so just rely on the `debug` to toggle at runtime

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-13 16:03:00 -05:00
Neil MacDougall 9f3922424a
Add support for svg icons (#7769)
* Fix lint

* Fix bad merge

* Fix bad merge

* Fix issue with custom color
2023-01-13 12:59:59 +00:00
Richard Cox d4b9840d28
Merge pull request #7207 from mantis-toboggan-md/plugins-harvester-manager
Create a Harvester Manager plugin
2023-01-11 10:19:57 +00:00
Nancy 14afb83a72
Revert "get docs base url version from getVersionInfo (#7436)" (#7863)
This reverts commit 129568d991.
2023-01-10 11:12:13 -07:00
Nancy Butler 7500405cf5 fix cloud-credential and machine-config imports 2023-01-09 10:48:42 -07:00
Giuseppe Leo 3e31e9f138
Add support for Pod Security Admission in the Namespace resource (#7619)
* Create models, config and utils for PSA

* Create PSA tab form view

* Create custom labels for Namespace

* Add icon option for Namespace detail view

* Add icon for Namespace list

* Add PSA tab for Namespace edit view

* Add i18n for all the PSA parts

* Separate PSA labels between mode and versions

* Filter DetailTop Namespace labels from PSA versions

* Correct unit test

* Correct Namespace tooltips for details, to be created after fetching the resources

* Remove unnecessary model

* Add todo for PSA implementation

* Add TODO for tests with checkbox and select

* Correct namespace list link with model method

* Add TODO

* Move i18n key for PSA

* Align Namespace detail view chips icon to the top

* Restore labels and annotation to the Namespace view

* Merge LabelsPSA features to existing Labels component

* Move all the PSA logic from the view to the model

* Tweaks following review

DetailTop
- Remove PSA specific code from generic component

ResourceDetail
- Remove PSA specific code from generic component
- Remove plumbing for descriptions and icons from parent component to DetailTop

Labels&Annotations component
- Default `show system labels` to off
- Ensure size of `Labels` and `Annotations` titles are the same
- Improve padding
- Remove PSA specific code from generic component
- Removed un-needed margin-bottom

Project/Namespace List
- Improve padlock icon alignment
- Improve spacing around PSA list in tooltip (this will pop up often)

PodSecurtyAdmission settings component
- Improved alignment on PSA checkbox

General Improvements
- Always show Labels&Annotations on Namespace config (view) page

* Changes following testing
- Fix display of show/hide system labels when there are no system labels
- Ensure PSA order shown in project/namespaces list PSA tooltip matches PSA controls in Namespace edit/config page
- Remove two usages of lodash
  - pickBy --> new common pickBy
  - values --> Object.values

* Fix unit tests

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-06 16:01:40 +01:00