Commit Graph

53 Commits

Author SHA1 Message Date
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
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
Phillip Rak ade3c9f4e7 Replace all instances of `v-tooltip` with `v-clean-tooltip`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-05-18 15:39:14 -07:00
Giuseppe Leo 99d617e6bc
Automation: Allow user to change the volume name when creating a workload (#8867)
* Add storage tests

* Correct comment
2023-05-16 16:15:25 +02:00
Shavindra ff6307ba34
Fix pod clone. (#8733)
* Fix pod clone.
* Fix saving workload name on clone.
2023-05-05 10:22:46 +01:00
Richard Cox 0bba39e62c
Merge pull request #8158 from richard-cox/pods-in-workload-list
Include oprhaned `POD`s in Workload list
2023-04-21 13:59:38 +01:00
richa 7c3b34d863
Fixed remove button style and alignments (#8122)
* Fixed remove button style and alignments

* Added column-gutter variable

* Removed imp from css
2023-04-14 13:14:36 +02:00
Phillip Rak 4e21f2338c Mount `clean-html` directive in tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-03-22 08:30:17 -07:00
Shavindra ca67df2d7f
Namespace changes on workload creation are not kept (#8279)
* Ensure namespace is set when creating a workload.
2023-02-28 09:49:30 +00:00
Alexandre Alves 7b0ddb522a
invalid error handling creating workload (#8263)
* change condition to check if buttons for scale up/scale down deployment are enabled

* revert changes

* fix error handling

* address PR comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-02-27 10:12:12 +00:00
Shavindra f482a59208
Remove Pod edit fields that are not editabble from PUT request. (#8192)
* Remove Pod creation fields that are not editabble from PUT request.
2023-02-21 14:10:14 +00:00
Richard Cox 6b242c17e8 Include oprhaned PODs in Workload list
- Fixes https://github.com/rancher/dashboard/issues/7506
- Show pods that aren't owned by another workload in the workload list
- Allow the user to create PODS from the workload list
2023-02-13 17:06:48 +00:00
Richard Cox 80e5c4f304 Fix broken workload `Add Container` button
- Also fixed text flush to icon
2023-02-03 13:51:18 +00:00
Phillip Rak fe58a9075c
Merge pull request #7990 from catherineluse/ingress-service-text
Add text to help with Services and Ingresses
2023-01-27 15:45:10 -07:00
Giuseppe Leo 7d699742fc
Home page not load in safari: positive lookhead unsupported (#8029)
* Add generic Workload view tests for error mapping

* Replace regular expression for supported browsers cases
2023-01-26 21:35:30 +01:00
Catherine Luse 1d885b8588 Add text to help with Services and Ingresses 2023-01-21 22:51:28 -07:00
Giuseppe Leo e03f28358d
Add support for Pod Security Admission in the Clusters and Workloads (#7787)
* Add PSA template dropdown to RKE2 cluster editor

* Add tests for RKE2 custom cluster editor to display options for PSA

* Remove TODO and hardcoded value for k8s PSA 1.25+

* Allow CRU editor to have error maps

* Fix linting on destructured arrays for unused values in Workloads erorr map

* Allow to change PSP and reset values accordingly

* Correct banner HTML for reprovisioning

* Replace default term with none in cluster creation policies

* Replace PSA ID with Name for the template in the cluster creation

* Remove extra condition for PSA options

* Add i18n with separated values for RKE default optins

* Restore default option for no PSP template in RKE2
2023-01-20 16:27:30 +01:00
LiuYan 8b559b1e97
fix(workload): fix duplicate add containers (#7400) 2023-01-13 09:52:38 +00:00
Shavindra 8072146758
Remove initial-empty-row from ArrayListGrouped. (#7669)
* Remove initial-empty-row from ArrayListGrouped.

* Fix merge conflicts.

* Fix tests.

* Fix tests.

* Fix linting.
2022-12-20 12:13:06 +01:00
Alexandre Alves ffb80a1e99
remove unused pvc request from ContainerMountPaths (#7706)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-12-19 14:47:06 +00:00
richa c792d21dd9
Fixed icon size (#7557)
* Fixed icon size

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed icon size in simplebox

* icon fix in GrowlManager.vue

* Add node inactive warning indicator (#7548)

* StringList, delete item on editing

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Bump @rancher/components version

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

* Add manage button to home page (#7546)

* Add manage button to home page

* Fix button spacing

* Make buttons smaller - looks better with extra button

* Fixed close icon size

* Fixed more icons sizes

* Fixed icon size in namespaces filter

* Reverd css changes in LabeledSelect component

* Fix on Header

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
Co-authored-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Richa Bisht <RBISHT@Richas-MacBook-Pro.local>
2022-12-08 16:52:53 +01:00
LiuYan f25957055e
fix(workload): select the newly added sidecar tab (#7403) 2022-12-05 09:10:23 -08:00
Nancy 6f8ade5765
set default container securityContext (#7539) 2022-11-30 14:15:55 -07:00
LiuYan 4dc413074c feat(workload/storage): support add emptyDir volume 2022-11-29 14:56:16 +08: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
Alexandre Alves b32d6549f5
remove secondary data config from the data prop (#7358)
* remove secondary data config from the data prop so that we dont have a huge config hindering code readability

* Sneaky fix
- Ensure PVC info is shown when looking at a PV, as well as when editing it
- Still won't show PVC section/load them when creating a PV

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-11-25 09:45:12 +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 d2d4122bc0
Review HTML formatting rules (#6805)
* Prevent ESLint to format generated paths

* Add HTML ESLint Rules

* Format all the Vue HTML templates except Harvester

* Exclude Harvester package from linting HTML, keeping old formatting rules
2022-11-11 17:04:22 +01:00
Giuseppe Leo 09b4e9580f
Replace styling with explicit configuration for flat cases as in nested tabs (#7136) 2022-10-10 23:36:18 +02:00
Shavindra 7fd3a742fe
Edit labels and annotations. (#7105)
* Edit labels and annotations.
2022-10-10 14:02:18 +02: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
Shavindra 447fe42cc4
Workload page updates (#7041)
Fixes #6800 - Workload storage mount point for volumes should be on containers
Fixes #7021 - Allow user to change the volume name
Fixes #7027 - Pod details page broken

These all works on 2.6.9 because PRs were merged after the branch separation. So this is applying the same changes to 2.7.0

For Release 2.6.9
#6800 -> release 2.6.9 PR fix #6886
#7021 -> release 2.6.9 PR fix #7022
#7027 -> release 2.6.9 PR fix #6952
2022-09-30 01:43:07 +02:00
Giuseppe Leo d709dcc9db
Allow to generate new yarn.lock by reviewing version (#7009)
* Pin all the dependencies versions to current use and generate new yarn.lock

* Update mismatching package versions with lock

* Update and pin libraries for dependencies

* Correct test linting complains
2022-09-28 18:54:57 +02:00
Shavindra cbfaaf7a3c
Set container to be the default tab in workload screens. (#6955)
* Set container to be the default tab in workload screens. #6644
2022-09-22 12:24:30 +01:00
Shavindra 0980ba4687
fix(workload): fix some forms are not updated when switching container tabs (#6841) 2022-09-12 11:11:16 +02:00
huacheng-git 681be22a2f
fix(imagePullSecrets): Fix the contents of the drop-down option (#6733)
Co-authored-by: huacheng <cheng@HuachengdeMacBook-Pro.local>
2022-09-12 10:09:32 +01:00
LiuYan eb0c53e941 fix(workload): fix some forms are not updated when switching container tabs 2022-09-09 15:58:56 +08:00
Jordon Leach 9adbff7b3e
Add parseInt to nvidiaGpuLimit input conditional (#6786) 2022-09-06 08:15:40 -04:00
Shavindra 35c51c7f47
Improve workload screens - #6455 (#6632)
* Make container tabs horizontal.

* Update cronjobs, DaemonSets, Jobs, StatefulSets to use same Workload component.

* Fix 6755 - Wrong sidecar config edit not shown in UI.

* Set Persistent Volume claim capacity as required.
2022-09-02 18:12:31 +02:00
Neil MacDougall 46374c2a60
Fix pod priority class name field (#6680) 2022-08-19 09:47:56 +01:00
Sean a2716dfdc9 Adds form-validation back in after deployments redesign 2022-07-28 08:29:38 -04:00
Shavindra 340e2af8d3
Deployment creation view - fix health check - #5734 (#6470) 2022-07-25 17:50:49 +02:00
Shavindra 2047f74c92
Improve Deployment creations screen - #5734 (#6214)
* Improve workload deployments view.
2022-07-22 18:04:53 +01:00
Sean ddab180ecc Adds in form validation mixin, error reporting on inputs, a few examples 2022-07-07 13:18:43 -04:00
Neil MacDougall 01cf6dcd46
Fix shell package with rancher components (#6200)
* Fix shell package with rancher components

* Fix tsconfig so it is parsable
2022-06-22 10:29:49 +01:00
Giuseppe Leo 6422c1de77
Fix issue with inputs not updating data inside multiple forms while typing (#6070)
* Use plugins globally in Jest configuration over single statements

* Add checkspell terms

* Add test id and cleanup code for Upgrading

* Create test for Upgrading input actually updating values while typing

* Handle missing terminationGracePeriodSeconds value in the spec qhile hanfling Upgrade value

* Replace Deployment Upgrading input event strategy with blur

* Remove container input listener, over single input emitters, to avoid issues in case of blur

* Extend tests to all the inputs to update the data in the Upgrading tab

* Removed deprecated components

* Correct vue-select import in Vue within Jest setup

* Add vue-select type

* Create form tests sample for input with custom select component

* Create unit tests for all the forms

* Create test for Upgrading without verify value

* Changed from component to query selectors in select input unit tests

* Prevent multiple events due inconsistent event input pattern in network update for Harvester

* Correct TS complain about Vue logic

* Add issue number to TODO
2022-06-20 11:25:49 +02:00
Richard Cox 371a7ab17f Only show field for `spec.serviceName` for StatefulSets
- This previously matched the original check for both isReplicable && isStatefulSet
- These work off of the `type` field which does not overlap between types
- It looks like the field `spec.serviceName` is only application to type StatefulSets
  - see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#statefulset-v1-apps
2022-06-14 09:44:24 +01:00
Richard Cox c8549c0d56 Align margin bottom of NameNsDescription and workload field rows
- Also ensure row (with margin) only shows when it has to
2022-06-13 12:52:28 +01:00
Richard Cox f70e512b89 Fix visibility of Replicase field
- Currently not shown for deployments
- Change to match original replaced code
  ```
      if (this.isCronJob) {
        out.push('schedule');
      } else if (this.isReplicable) {
        out.push('replicas');

        if (this.isStatefulSet) {
          out.push('service');
        }
      }
   ```
  (Not quite sure on the service clause, but it matches original functionality)

Also reduced size to align with components above
2022-06-13 12:44:38 +01:00
Catherine Luse 8709f99ba7 Can select or create a namespace in create resource forms 2022-06-02 19:49:16 -07:00