@rancher/shell 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/providers/nutanix.svg +1 -0
- package/assets/translations/en-us.yaml +83 -2
- package/chart/gatekeeper.vue +2 -2
- package/chart/monitoring/alerting/index.vue +3 -3
- package/chart/monitoring/index.vue +2 -2
- package/chart/monitoring/prometheus/index.vue +1 -1
- package/chart/rancher-backup/index.vue +2 -2
- package/cloud-credential/harvester.vue +2 -2
- package/components/AssignTo.vue +1 -1
- package/components/AwsComplianceBanner.vue +1 -1
- package/components/BackLink.vue +7 -0
- package/components/BrandImage.vue +3 -3
- package/components/ClusterProviderIcon.vue +1 -1
- package/components/CommunityLinks.vue +2 -2
- package/components/ConsumptionGauge.vue +17 -2
- package/components/CruResource.vue +2 -1
- package/components/DashboardMetrics.vue +8 -0
- package/components/DetailTop.vue +1 -1
- package/components/ExplorerMembers.vue +8 -8
- package/components/ExplorerProjectsNamespaces.vue +9 -9
- package/components/FixedBanner.vue +1 -1
- package/components/GlobalRoleBindings.vue +11 -11
- package/components/GrafanaDashboard.vue +7 -1
- package/components/GrowlManager.vue +1 -1
- package/components/HarvesterServiceAddOnConfig.vue +4 -3
- package/components/IconOrSvg.vue +10 -3
- package/components/LandingPagePreference.vue +2 -2
- package/components/MoveModal.vue +1 -1
- package/components/PodSecurityAdmission.vue +3 -3
- package/components/ProgressBarMulti.vue +2 -2
- package/components/PromptRemove.vue +52 -28
- package/components/PromptRestore.vue +3 -3
- package/components/Questions/index.vue +5 -5
- package/components/RelatedWorkloadsTable.vue +1 -1
- package/components/ResourceList/Masthead.vue +1 -1
- package/components/ResourceTable.vue +3 -3
- package/components/ResourceYaml.vue +1 -1
- package/components/RoleBindings.vue +2 -2
- package/components/SingleClusterInfo.vue +1 -1
- package/components/SortableTable/actions.js +3 -3
- package/components/SortableTable/advanced-filtering.js +7 -7
- package/components/SortableTable/filtering.js +1 -1
- package/components/SortableTable/index.vue +9 -9
- package/components/SortableTable/selection.js +5 -5
- package/components/SortableTable/sorting.js +5 -5
- package/components/Tabbed/index.vue +7 -7
- package/components/TableSparkLine.vue +1 -1
- package/components/Wizard.vue +11 -23
- package/components/__tests__/Collapse.spec.ts +1 -1
- package/components/__tests__/CruResource.test.ts +74 -0
- package/components/__tests__/SimpleBox.spec.ts +1 -1
- package/components/auth/RoleDetailEdit.vue +7 -3
- package/components/auth/SelectPrincipal.vue +3 -3
- package/components/fleet/FleetResources.vue +1 -1
- package/components/fleet/FleetStatus.vue +4 -4
- package/components/fleet/FleetSummary.vue +1 -1
- package/components/fleet/ForceDirectedTreeChart/chartIcons.js +1 -1
- package/components/fleet/ForceDirectedTreeChart/index.vue +1 -1
- package/components/form/ArrayList.vue +11 -3
- package/components/form/ArrayListSelect.vue +2 -2
- package/components/form/FileSelector.vue +6 -0
- package/components/form/GitPicker.vue +528 -0
- package/components/form/KeyValue.vue +82 -41
- package/components/form/LabeledSelect.vue +2 -2
- package/components/form/MatchExpressions.vue +2 -2
- package/components/form/Members/ClusterMembershipEditor.vue +1 -2
- package/components/form/Members/ClusterPermissionsEditor.vue +6 -5
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -2
- package/components/form/NameNsDescription.vue +13 -6
- package/components/form/Networking.vue +2 -2
- package/components/form/NodeScheduling.vue +1 -1
- package/components/form/PodAffinity.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +4 -4
- package/components/form/ResourceQuota/Namespace.vue +2 -2
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -2
- package/components/form/ResourceQuota/Project.vue +1 -1
- package/components/form/ResourceQuota/shared.js +2 -2
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/ResourceTabs/index.vue +1 -1
- package/components/form/RuleSelector.vue +1 -1
- package/components/form/SecretSelector.vue +4 -4
- package/components/form/Select.vue +2 -2
- package/components/form/SelectOrCreateAuthSecret.vue +3 -3
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/ServicePorts.vue +1 -1
- package/components/form/ShellInput.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +4 -4
- package/components/form/Taints.vue +1 -1
- package/components/form/ValueFromResource.vue +3 -3
- package/components/form/WorkloadPorts.vue +8 -7
- package/components/form/__tests__/Error.test.ts +1 -1
- package/components/form/__tests__/KeyValue.test.ts +21 -0
- package/components/formatter/ClusterLink.vue +1 -1
- package/components/formatter/ClusterProvider.vue +13 -2
- package/components/formatter/Endpoints.vue +1 -1
- package/components/formatter/FleetSummaryGraph.vue +2 -2
- package/components/formatter/IngressTarget.vue +2 -2
- package/components/formatter/PodImages.vue +1 -1
- package/components/formatter/PrincipalGroupBindings.vue +1 -1
- package/components/formatter/ReceiverIcons.vue +3 -3
- package/components/formatter/ServiceType.vue +1 -1
- package/components/formatter/WorkloadDetailEndpoints.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/formatter/__tests__/LiveDate.test.ts +1 -1
- package/components/graph/Bar.vue +1 -1
- package/components/graph/LinePlot.vue +3 -3
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +5 -5
- package/components/nav/NamespaceFilter.vue +14 -14
- package/components/nav/TopLevelMenu.vue +76 -11
- package/components/nav/WindowManager/ContainerLogs.vue +2 -2
- package/components/nav/WindowManager/ContainerShell.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +1 -1
- package/config/home-links.js +4 -4
- package/config/labels-annotations.js +8 -9
- package/config/pod-security-admission.ts +1 -1
- package/config/product/auth.js +4 -4
- package/config/product/explorer.js +14 -0
- package/config/router.js +5 -0
- package/config/store.js +2 -0
- package/config/table-headers.js +13 -13
- package/config/uiplugins.js +8 -1
- package/core/plugin-routes.ts +3 -2
- package/core/plugin.ts +3 -3
- package/core/plugins.js +7 -7
- package/creators/pkg/files/index.ts +1 -1
- package/detail/cis.cattle.io.clusterscan.vue +3 -3
- package/detail/fleet.cattle.io.bundle.vue +1 -1
- package/detail/helm.cattle.io.projecthelmchart.vue +16 -29
- package/detail/management.cattle.io.user.vue +12 -12
- package/detail/namespace.vue +4 -4
- package/detail/networking.k8s.io.ingress.vue +3 -3
- package/detail/node.vue +2 -2
- package/detail/provisioning.cattle.io.cluster.vue +9 -10
- package/detail/service.vue +1 -1
- package/detail/workload/index.vue +3 -3
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/DrainNode.vue +1 -1
- package/dialog/GenericPrompt.vue +9 -5
- package/dialog/RotateEncryptionKeyDialog.vue +2 -2
- package/dialog/ScaleMachineDownDialog.vue +2 -2
- package/edit/auth/azuread.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +5 -5
- package/edit/cis.cattle.io.clusterscan.vue +5 -5
- package/edit/cloudcredential.vue +4 -4
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +1 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +4 -4
- package/edit/fleet.cattle.io.gitrepo.vue +6 -6
- package/edit/helm.cattle.io.projecthelmchart.vue +3 -3
- package/edit/logging-flow/index.vue +4 -4
- package/edit/logging.banzaicloud.io.output/index.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +1 -1
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -1
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +1 -1
- package/edit/management.cattle.io.project.vue +3 -3
- package/edit/management.cattle.io.projectroletemplatebinding.vue +2 -2
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/management.cattle.io.user.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +2 -2
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +5 -5
- package/edit/monitoring.coreos.com.prometheusrule/duration.js +1 -1
- package/edit/monitoring.coreos.com.receiver/auth.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +3 -4
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +53 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +3 -3
- package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +2 -2
- package/edit/namespace.vue +21 -13
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -2
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/RulePath.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rules.vue +2 -2
- package/edit/networking.k8s.io.ingress/index.vue +4 -4
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +4 -4
- package/edit/persistentvolumeclaim.vue +3 -3
- package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +7 -7
- package/edit/provisioning.cattle.io.cluster/rke2.vue +28 -29
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/resources.cattle.io.restore.vue +3 -3
- package/edit/secret/generic.vue +1 -1
- package/edit/secret/index.vue +3 -3
- package/edit/service.vue +3 -21
- package/edit/serviceaccount.vue +2 -2
- package/edit/storage.k8s.io.storageclass/index.vue +4 -4
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +1 -1
- package/edit/token.vue +5 -5
- package/edit/workload/index.vue +1 -1
- package/edit/workload/mixins/workload.js +8 -8
- package/edit/workload/storage/ContainerMountPaths.vue +9 -9
- package/edit/workload/storage/Mount.vue +2 -2
- package/edit/workload/storage/csi/index.vue +1 -1
- package/edit/workload/storage/ephemeralVolume/index.vue +1 -1
- package/edit/workload/storage/index.vue +6 -6
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +2 -2
- package/initialize/client.js +8 -8
- package/initialize/index.js +1 -4
- package/layouts/default.vue +38 -11
- package/list/catalog.cattle.io.clusterrepo.vue +9 -1
- package/list/cis.cattle.io.clusterscan.vue +1 -1
- package/list/fleet.cattle.io.cluster.vue +2 -2
- package/list/group.principal.vue +1 -1
- package/list/helm.cattle.io.projecthelmchart.vue +2 -2
- package/list/management.cattle.io.cluster.vue +1 -1
- package/list/management.cattle.io.feature.vue +1 -1
- package/list/management.cattle.io.user.vue +2 -2
- package/list/node.vue +5 -5
- package/list/provisioning.cattle.io.cluster.vue +4 -5
- package/machine-config/amazonec2.vue +2 -2
- package/machine-config/digitalocean.vue +4 -4
- package/machine-config/linode.vue +4 -4
- package/machine-config/vmwarevsphere.vue +12 -12
- package/middleware/authenticated.js +7 -6
- package/mixins/brand.js +1 -1
- package/mixins/chart.js +6 -6
- package/mixins/fetch.client.js +2 -2
- package/mixins/form-validation.js +7 -7
- package/mixins/resource-fetch-namespaced.js +1 -1
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +2 -2
- package/models/batch.cronjob.js +1 -1
- package/models/catalog.cattle.io.app.js +4 -4
- package/models/cis.cattle.io.clusterscan.js +1 -1
- package/models/cis.cattle.io.clusterscanbenchmark.js +1 -1
- package/models/cis.cattle.io.clusterscanreport.js +1 -1
- package/models/cloudcredential.js +1 -1
- package/models/cluster/node.js +5 -5
- package/models/cluster.x-k8s.io.machinedeployment.js +2 -2
- package/models/fleet.cattle.io.gitrepo.js +3 -3
- package/models/group.principal.js +4 -4
- package/models/helm.cattle.io.projecthelmchart.js +2 -2
- package/models/logging.banzaicloud.io.clusterflow.js +2 -2
- package/models/logging.banzaicloud.io.flow.js +5 -5
- package/models/logging.banzaicloud.io.output.js +2 -2
- package/models/management.cattle.io.cluster.js +10 -14
- package/models/management.cattle.io.globalrole.js +4 -4
- package/models/management.cattle.io.node.js +2 -2
- package/models/management.cattle.io.nodepool.js +3 -3
- package/models/management.cattle.io.nodetemplate.js +4 -4
- package/models/management.cattle.io.project.js +2 -2
- package/models/management.cattle.io.roletemplate.js +1 -1
- package/models/management.cattle.io.setting.js +1 -1
- package/models/management.cattle.io.user.js +5 -5
- package/models/monitoring.coreos.com.receiver.js +9 -9
- package/models/namespace.js +1 -1
- package/models/networking.k8s.io.ingress.js +5 -5
- package/models/persistentvolume.js +3 -3
- package/models/pod.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +39 -27
- package/models/rbac.authorization.k8s.io.clusterrole.js +2 -2
- package/models/rbac.authorization.k8s.io.role.js +3 -3
- package/models/secret.js +1 -1
- package/models/service.js +2 -2
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/token.js +1 -1
- package/models/workload.js +6 -6
- package/models/workload.service.js +5 -21
- package/package.json +2 -1
- package/pages/about.vue +9 -9
- package/pages/account/index.vue +2 -2
- package/pages/auth/login.vue +15 -12
- package/pages/auth/verify.vue +6 -0
- package/pages/c/_cluster/apps/charts/index.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.vue +28 -20
- package/pages/c/_cluster/auth/roles/index.vue +9 -9
- package/pages/c/_cluster/explorer/index.vue +41 -16
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +1 -1
- package/pages/c/_cluster/fleet/index.vue +11 -11
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/settings/links.vue +3 -3
- package/pages/c/_cluster/settings/performance.vue +1 -1
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +6 -6
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +3 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +3 -3
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +3 -3
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +6 -6
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +4 -4
- package/pages/c/_cluster/uiplugins/index.vue +22 -19
- package/pages/diagnostic.vue +6 -6
- package/pages/home.vue +3 -3
- package/pages/prefs.vue +2 -2
- package/pages/rio/mesh.vue +3 -3
- package/pages/support/index.vue +10 -1
- package/pkg/auto-import.js +1 -1
- package/pkg/tsconfig.json +1 -0
- package/pkg/vue.config.js +1 -1
- package/plugins/axios.js +1 -1
- package/plugins/clean-html-directive.js +1 -1
- package/plugins/dashboard-store/__tests__/mutations.spec.js +4 -4
- package/plugins/dashboard-store/actions.js +4 -4
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/dashboard-store/mutations.js +2 -2
- package/plugins/dashboard-store/resource-class.js +8 -8
- package/plugins/i18n.js +1 -1
- package/plugins/plugin.js +5 -1
- package/plugins/steve/actions.js +3 -3
- package/plugins/steve/getters.js +3 -3
- package/plugins/steve/hybrid-class.js +1 -1
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/performanceTesting.js +1 -1
- package/plugins/steve/resourceWatcher.js +1 -1
- package/plugins/steve/subscribe.js +6 -6
- package/plugins/steve/worker/web-worker.basic.js +1 -1
- package/promptRemove/management.cattle.io.project.vue +3 -3
- package/promptRemove/mixin/roleDeletionCheck.js +4 -4
- package/promptRemove/pod.vue +1 -1
- package/rancher-components/StringList/StringList.vue +34 -50
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +2 -2
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +1 -1
- package/rancher-components/components/Form/Radio/RadioButton.vue +2 -2
- package/rancher-components/components/Form/Radio/RadioGroup.vue +2 -2
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +1 -1
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +7 -7
- package/rancher-components/components/StringList/StringList.test.ts +10 -9
- package/rancher-components/components/StringList/StringList.vue +5 -5
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/store/action-menu.js +4 -4
- package/store/auth.js +40 -7
- package/store/aws.js +1 -1
- package/store/catalog.js +12 -11
- package/store/digitalocean.js +4 -4
- package/store/features.js +1 -0
- package/store/github.js +70 -213
- package/store/gitlab.js +159 -0
- package/store/growl.js +1 -1
- package/store/i18n.js +7 -7
- package/store/index.js +63 -22
- package/store/linode.js +1 -1
- package/store/plugins.js +5 -5
- package/store/pnap.js +1 -1
- package/store/prefs.js +6 -6
- package/store/resource-fetch.js +3 -3
- package/store/type-map.js +61 -42
- package/store/uiplugins.ts +2 -1
- package/store/wm.js +5 -4
- package/tsconfig.default.json +10 -0
- package/tsconfig.json +2 -9
- package/types/shell/index.d.ts +21 -13
- package/utils/__tests__/version.test.ts +28 -0
- package/utils/alertmanagerconfig.js +4 -4
- package/utils/array.ts +4 -4
- package/utils/async.ts +1 -1
- package/utils/auth.js +3 -3
- package/utils/axios.js +5 -5
- package/utils/cluster.js +4 -3
- package/utils/color.js +10 -0
- package/utils/create-yaml.js +4 -4
- package/utils/crypto/browserHashUtils.js +1 -1
- package/utils/crypto/browserMd5.js +1 -1
- package/utils/crypto/browserSha1.js +1 -1
- package/utils/crypto/browserSha256.js +1 -1
- package/utils/crypto/index.js +3 -3
- package/utils/favicon.js +2 -3
- package/utils/gatekeeper/util.js +3 -3
- package/utils/gc/gc.ts +2 -2
- package/utils/git.ts +92 -0
- package/utils/grafana.js +4 -4
- package/utils/monitoring.js +2 -2
- package/utils/nuxt.js +2 -2
- package/utils/object.js +5 -5
- package/utils/pod-security-admission.ts +1 -1
- package/utils/projectAndNamespaceFiltering.utils.ts +1 -1
- package/utils/select.js +2 -2
- package/utils/selector.js +2 -2
- package/utils/settings.ts +17 -2
- package/utils/socket.js +30 -6
- package/utils/sort.js +1 -1
- package/utils/string.js +1 -1
- package/utils/url.ts +1 -1
- package/utils/validators/formRules/index.ts +3 -3
- package/utils/validators/role-template.js +4 -4
- package/utils/version.js +14 -1
- package/vue.config.js +19 -13
- package/components/.DS_Store +0 -0
- package/components/__tests__/.DS_Store +0 -0
- package/components/form/GithubPicker.vue +0 -390
- package/creators/pkg/package-lock.json +0 -37
- package/yarn-error.log +0 -196
package/plugins/steve/getters.js
CHANGED
|
@@ -94,7 +94,7 @@ export default {
|
|
|
94
94
|
return url;
|
|
95
95
|
},
|
|
96
96
|
|
|
97
|
-
defaultModel: state => (obj) => {
|
|
97
|
+
defaultModel: (state) => (obj) => {
|
|
98
98
|
const which = state.config.modelBaseClass || STEVE_MODEL_TYPES.BY_TYPE.STEVE;
|
|
99
99
|
|
|
100
100
|
if ( which === STEVE_MODEL_TYPES.BY_TYPE ) {
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
154
154
|
},
|
|
155
155
|
|
|
156
156
|
// Return all the pods for a given namespace
|
|
157
|
-
podsByNamespace: state => (namespace) => {
|
|
157
|
+
podsByNamespace: (state) => (namespace) => {
|
|
158
158
|
const map = state.podsByNamespace[namespace];
|
|
159
159
|
|
|
160
160
|
return map?.list || [];
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
164
164
|
return GC_IGNORE_TYPES;
|
|
165
165
|
},
|
|
166
166
|
|
|
167
|
-
currentGeneration: state => (type) => {
|
|
167
|
+
currentGeneration: (state) => (type) => {
|
|
168
168
|
type = normalizeType(type);
|
|
169
169
|
|
|
170
170
|
const cache = state.types[type];
|
|
@@ -9,7 +9,7 @@ import Resource from '@shell/plugins/dashboard-store/resource-class';
|
|
|
9
9
|
export function cleanHybridResources(data) {
|
|
10
10
|
const potentialNormanHoldovers = ['state', 'name', 'description', 'labels', 'annotations'];
|
|
11
11
|
|
|
12
|
-
potentialNormanHoldovers.forEach(key => delete data[key]);
|
|
12
|
+
potentialNormanHoldovers.forEach((key) => delete data[key]);
|
|
13
13
|
|
|
14
14
|
return data;
|
|
15
15
|
}
|
|
@@ -66,7 +66,7 @@ function cleanPodsByNamespaceCache(state, resource) {
|
|
|
66
66
|
|
|
67
67
|
// Extra defensive check that the cache exists for the namespace being removed
|
|
68
68
|
if (cache) {
|
|
69
|
-
const inList = cache.list.findIndex(p => p.id === resource.id);
|
|
69
|
+
const inList = cache.list.findIndex((p) => p.id === resource.id);
|
|
70
70
|
|
|
71
71
|
if ( inList >= 0 ) {
|
|
72
72
|
cache.list.splice(inList, 1);
|
|
@@ -40,7 +40,7 @@ export const keyForSubscribe = ({
|
|
|
40
40
|
resourceType, type, namespace, id, selector
|
|
41
41
|
} = {}) => {
|
|
42
42
|
return [(resourceType || type), namespace, id, selector] // each watch param in an array
|
|
43
|
-
.filter(param => !!param) // filter out all the empty ones // the filter makes these keys neater
|
|
43
|
+
.filter((param) => !!param) // filter out all the empty ones // the filter makes these keys neater
|
|
44
44
|
.join('/'); // join into a string so we can use it as an object key
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -661,7 +661,7 @@ const defaultActions = {
|
|
|
661
661
|
have = getters['all'](resourceType).slice();
|
|
662
662
|
|
|
663
663
|
if ( namespace ) {
|
|
664
|
-
have = have.filter(x => x.metadata?.namespace === namespace);
|
|
664
|
+
have = have.filter((x) => x.metadata?.namespace === namespace);
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
want = await dispatch('findAll', {
|
|
@@ -1012,7 +1012,7 @@ const defaultMutations = {
|
|
|
1012
1012
|
},
|
|
1013
1013
|
|
|
1014
1014
|
setWatchStarted(state, obj) {
|
|
1015
|
-
const existing = state.started.find(entry => equivalentWatch(obj, entry));
|
|
1015
|
+
const existing = state.started.find((entry) => equivalentWatch(obj, entry));
|
|
1016
1016
|
|
|
1017
1017
|
if ( !existing ) {
|
|
1018
1018
|
addObject(state.started, obj);
|
|
@@ -1022,7 +1022,7 @@ const defaultMutations = {
|
|
|
1022
1022
|
},
|
|
1023
1023
|
|
|
1024
1024
|
setWatchStopped(state, obj) {
|
|
1025
|
-
const existing = state.started.find(entry => equivalentWatch(obj, entry));
|
|
1025
|
+
const existing = state.started.find((entry) => equivalentWatch(obj, entry));
|
|
1026
1026
|
|
|
1027
1027
|
if ( existing ) {
|
|
1028
1028
|
removeObject(state.started, existing);
|
|
@@ -1066,12 +1066,12 @@ const defaultMutations = {
|
|
|
1066
1066
|
* Getters that cover cases 1 & 2 (see file description)
|
|
1067
1067
|
*/
|
|
1068
1068
|
const defaultGetters = {
|
|
1069
|
-
inError: state => (obj) => {
|
|
1069
|
+
inError: (state) => (obj) => {
|
|
1070
1070
|
return state.inError[keyForSubscribe(obj)];
|
|
1071
1071
|
},
|
|
1072
1072
|
|
|
1073
|
-
watchStarted: state => (obj) => {
|
|
1074
|
-
return !!state.started.find(entry => equivalentWatch(obj, entry));
|
|
1073
|
+
watchStarted: (state) => (obj) => {
|
|
1074
|
+
return !!state.started.find((entry) => equivalentWatch(obj, entry));
|
|
1075
1075
|
},
|
|
1076
1076
|
|
|
1077
1077
|
nextResourceVersion: (state, getters) => (type, id) => {
|
|
@@ -105,7 +105,7 @@ const workerActions = {
|
|
|
105
105
|
// Remove the cached schema
|
|
106
106
|
removeSchema: (id) => {
|
|
107
107
|
// Remove anything in the queue related to the schema - we don't want to send any pending updates later for a schema that has been removed
|
|
108
|
-
state.queue = state.queue.filter(schema => schema.id !== id);
|
|
108
|
+
state.queue = state.queue.filter((schema) => schema.id !== id);
|
|
109
109
|
|
|
110
110
|
// Delete the schema from the map, so if it comes back we don't ignore it if the hash is the same
|
|
111
111
|
delete state.schemas[id];
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
|
|
53
53
|
filteredNamespaces() {
|
|
54
54
|
if (this.currentProject) {
|
|
55
|
-
return this.allNamespaces.filter(n => n.metadata.labels[PROJECT] === this.currentProject.metadata?.name);
|
|
55
|
+
return this.allNamespaces.filter((n) => n.metadata.labels[PROJECT] === this.currentProject.metadata?.name);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
return [];
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
names() {
|
|
72
|
-
return this.filteredNamespaces.map(obj => obj.nameDisplay).slice(0, 5);
|
|
72
|
+
return this.filteredNamespaces.map((obj) => obj.nameDisplay).slice(0, 5);
|
|
73
73
|
},
|
|
74
74
|
// Only admins and cluster owners can see namespaces outside of projects
|
|
75
75
|
canSeeProjectlessNamespaces() {
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
// Delete all of thre namespaces and return false - this tells the prompt remove dialog to continue and delete the project
|
|
83
83
|
// Delete all namespaces if the user wouldn't be able to see them after deleting the project
|
|
84
84
|
if (this.deleteProjectNamespaces || !this.canSeeProjectlessNamespaces) {
|
|
85
|
-
return Promise.all(this.filteredNamespaces.map(n => n.remove())).then(() => false);
|
|
85
|
+
return Promise.all(this.filteredNamespaces.map((n) => n.remove())).then(() => false);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// Return false so that the main promptRemoval will continue to remove the project
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
...mapGetters({ t: 'i18n/t' }),
|
|
18
18
|
|
|
19
19
|
names() {
|
|
20
|
-
return this.toRemove.map(obj => obj.nameDisplay).slice(0, 5);
|
|
20
|
+
return this.toRemove.map((obj) => obj.nameDisplay).slice(0, 5);
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
plusMore() {
|
|
@@ -82,14 +82,14 @@ export default {
|
|
|
82
82
|
|
|
83
83
|
if (request.data && request.data.length) {
|
|
84
84
|
rolesToRemove.forEach((toRemove) => {
|
|
85
|
-
const usedRoles = request.data.filter(item => item[propToMatch] === toRemove.id);
|
|
85
|
+
const usedRoles = request.data.filter((item) => item[propToMatch] === toRemove.id);
|
|
86
86
|
|
|
87
87
|
if (usedRoles.length) {
|
|
88
|
-
const uniqueUsers = [...new Set(usedRoles.map(item => item.userName).filter(user => userMap[user]))];
|
|
88
|
+
const uniqueUsers = [...new Set(usedRoles.map((item) => item.userName).filter((user) => userMap[user]))];
|
|
89
89
|
|
|
90
90
|
if (uniqueUsers.length) {
|
|
91
91
|
numberOfRolesWithBinds++;
|
|
92
|
-
uniqueUsers.forEach(user => uniqueUsersWithBinds.add(user));
|
|
92
|
+
uniqueUsers.forEach((user) => uniqueUsersWithBinds.add(user));
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
});
|
package/promptRemove/pod.vue
CHANGED
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
try {
|
|
82
|
-
await Promise.all(this.value.map(resource => this.removePod(resource)));
|
|
82
|
+
await Promise.all(this.value.map((resource) => this.removePod(resource)));
|
|
83
83
|
if ( goTo && !isEmpty(goTo) ) {
|
|
84
84
|
parentComponent.currentRouter.push(goTo);
|
|
85
85
|
}
|
|
@@ -87,7 +87,7 @@ export default Vue.extend({
|
|
|
87
87
|
return {
|
|
88
88
|
value: null as string | null,
|
|
89
89
|
selected: null as string | null,
|
|
90
|
-
|
|
90
|
+
isEditItem: null as string | null,
|
|
91
91
|
isCreateItem: false,
|
|
92
92
|
errors: { duplicate: false } as Record<Error, boolean>
|
|
93
93
|
};
|
|
@@ -100,7 +100,7 @@ export default Vue.extend({
|
|
|
100
100
|
*/
|
|
101
101
|
errorMessagesArray(): string[] {
|
|
102
102
|
return (Object.keys(this.errors) as Error[])
|
|
103
|
-
.filter(f => this.errors[f]
|
|
103
|
+
.filter(f => !!(this.errors)[f])
|
|
104
104
|
.map(k => this.errorMessages[k]);
|
|
105
105
|
},
|
|
106
106
|
},
|
|
@@ -113,32 +113,23 @@ export default Vue.extend({
|
|
|
113
113
|
this.toggleEditMode(false);
|
|
114
114
|
this.toggleCreateMode(false);
|
|
115
115
|
},
|
|
116
|
-
errors: {
|
|
117
|
-
handler(val) {
|
|
118
|
-
this.$emit('errors', val);
|
|
119
|
-
},
|
|
120
|
-
deep: true
|
|
121
|
-
}
|
|
122
116
|
},
|
|
123
117
|
|
|
124
118
|
methods: {
|
|
125
119
|
onChange(value: string) {
|
|
126
120
|
this.value = value;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.value
|
|
131
|
-
];
|
|
132
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Remove duplicate error when a new value is typed
|
|
123
|
+
*/
|
|
133
124
|
this.toggleError(
|
|
134
125
|
'duplicate',
|
|
135
|
-
|
|
136
|
-
this.isCreateItem ? INPUT.create : INPUT.edit
|
|
126
|
+
false,
|
|
127
|
+
this.isCreateItem ? INPUT.create : INPUT.edit,
|
|
137
128
|
);
|
|
138
129
|
},
|
|
139
130
|
|
|
140
131
|
onSelect(item: string) {
|
|
141
|
-
if (this.
|
|
132
|
+
if (this.isCreateItem || this.isEditItem === item) {
|
|
142
133
|
return;
|
|
143
134
|
}
|
|
144
135
|
this.selected = item;
|
|
@@ -169,7 +160,7 @@ export default Vue.extend({
|
|
|
169
160
|
},
|
|
170
161
|
|
|
171
162
|
onClickEmptyBody() {
|
|
172
|
-
if (!this.isCreateItem && !this.
|
|
163
|
+
if (!this.isCreateItem && !this.isEditItem) {
|
|
173
164
|
this.toggleCreateMode(true);
|
|
174
165
|
}
|
|
175
166
|
},
|
|
@@ -185,7 +176,7 @@ export default Vue.extend({
|
|
|
185
176
|
|
|
186
177
|
return;
|
|
187
178
|
}
|
|
188
|
-
if (this.
|
|
179
|
+
if (this.isEditItem) {
|
|
189
180
|
this.toggleEditMode(false);
|
|
190
181
|
|
|
191
182
|
return;
|
|
@@ -238,7 +229,6 @@ export default Vue.extend({
|
|
|
238
229
|
*/
|
|
239
230
|
toggleError(type: Error, val: boolean, refId?: string) {
|
|
240
231
|
this.errors[type] = val;
|
|
241
|
-
|
|
242
232
|
if (refId) {
|
|
243
233
|
this.toggleErrorClass(refId, val);
|
|
244
234
|
}
|
|
@@ -260,11 +250,7 @@ export default Vue.extend({
|
|
|
260
250
|
* Show/Hide the input line to create new item
|
|
261
251
|
*/
|
|
262
252
|
toggleCreateMode(show: boolean) {
|
|
263
|
-
if (this.readonly) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
253
|
if (show) {
|
|
267
|
-
this.toggleEditMode(false);
|
|
268
254
|
this.value = '';
|
|
269
255
|
|
|
270
256
|
this.isCreateItem = true;
|
|
@@ -282,21 +268,18 @@ export default Vue.extend({
|
|
|
282
268
|
* Show/Hide the in-line editing to edit an existing item
|
|
283
269
|
*/
|
|
284
270
|
toggleEditMode(show: boolean, item?: string) {
|
|
285
|
-
if (this.readonly) {
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
271
|
if (show) {
|
|
289
272
|
this.toggleCreateMode(false);
|
|
290
|
-
this.value = this.
|
|
273
|
+
this.value = this.isEditItem;
|
|
291
274
|
|
|
292
|
-
this.
|
|
275
|
+
this.isEditItem = item || '';
|
|
293
276
|
this.setFocus(INPUT.edit);
|
|
294
277
|
} else {
|
|
295
278
|
this.value = null;
|
|
296
279
|
this.toggleError('duplicate', false);
|
|
297
280
|
this.onSelectLeave();
|
|
298
281
|
|
|
299
|
-
this.
|
|
282
|
+
this.isEditItem = null;
|
|
300
283
|
}
|
|
301
284
|
},
|
|
302
285
|
|
|
@@ -309,7 +292,7 @@ export default Vue.extend({
|
|
|
309
292
|
/**
|
|
310
293
|
* Create a new item and insert in the items list
|
|
311
294
|
*/
|
|
312
|
-
saveItem(
|
|
295
|
+
saveItem() {
|
|
313
296
|
const value = this.value?.trim();
|
|
314
297
|
|
|
315
298
|
if (value) {
|
|
@@ -318,20 +301,21 @@ export default Vue.extend({
|
|
|
318
301
|
value,
|
|
319
302
|
];
|
|
320
303
|
|
|
321
|
-
if (
|
|
322
|
-
this.
|
|
304
|
+
if (hasDuplicatedStrings(items, this.caseSensitive)) {
|
|
305
|
+
this.toggleError('duplicate', true, INPUT.create);
|
|
306
|
+
|
|
307
|
+
return;
|
|
323
308
|
}
|
|
324
|
-
}
|
|
325
309
|
|
|
326
|
-
|
|
327
|
-
this.toggleCreateMode(false);
|
|
310
|
+
this.updateItems(items);
|
|
328
311
|
}
|
|
312
|
+
this.toggleCreateMode(false);
|
|
329
313
|
},
|
|
330
314
|
|
|
331
315
|
/**
|
|
332
316
|
* Update an existing item in the items list
|
|
333
317
|
*/
|
|
334
|
-
updateItem(item: string
|
|
318
|
+
updateItem(item: string) {
|
|
335
319
|
const value = this.value?.trim();
|
|
336
320
|
|
|
337
321
|
if (value) {
|
|
@@ -342,14 +326,15 @@ export default Vue.extend({
|
|
|
342
326
|
items[index] = value;
|
|
343
327
|
}
|
|
344
328
|
|
|
345
|
-
if (
|
|
346
|
-
this.
|
|
329
|
+
if (hasDuplicatedStrings(items, this.caseSensitive)) {
|
|
330
|
+
this.toggleError('duplicate', true, INPUT.edit);
|
|
331
|
+
|
|
332
|
+
return;
|
|
347
333
|
}
|
|
348
|
-
}
|
|
349
334
|
|
|
350
|
-
|
|
351
|
-
this.toggleEditMode(false);
|
|
335
|
+
this.updateItems(items);
|
|
352
336
|
}
|
|
337
|
+
this.toggleEditMode(false);
|
|
353
338
|
},
|
|
354
339
|
|
|
355
340
|
/**
|
|
@@ -402,19 +387,19 @@ export default Vue.extend({
|
|
|
402
387
|
@blur="onSelectLeave(item)"
|
|
403
388
|
>
|
|
404
389
|
<span
|
|
405
|
-
v-if="!
|
|
390
|
+
v-if="!isEditItem || isEditItem !== item"
|
|
406
391
|
class="label static"
|
|
407
392
|
>
|
|
408
393
|
{{ item }}
|
|
409
394
|
</span>
|
|
410
395
|
<LabeledInput
|
|
411
|
-
v-if="
|
|
396
|
+
v-if="isEditItem && isEditItem === item"
|
|
412
397
|
ref="item-edit"
|
|
413
398
|
class="edit-input static"
|
|
414
399
|
:value="value != null ? value : item"
|
|
415
400
|
@input="onChange($event)"
|
|
416
|
-
@blur.prevent="
|
|
417
|
-
@keydown.native.enter="updateItem(item
|
|
401
|
+
@blur.prevent="toggleEditMode(false)"
|
|
402
|
+
@keydown.native.enter="updateItem(item)"
|
|
418
403
|
/>
|
|
419
404
|
</div>
|
|
420
405
|
<div
|
|
@@ -428,8 +413,7 @@ export default Vue.extend({
|
|
|
428
413
|
:value="value"
|
|
429
414
|
:placeholder="placeholder"
|
|
430
415
|
@input="onChange($event)"
|
|
431
|
-
@
|
|
432
|
-
@keydown.native.enter="saveItem(!errors.duplicate)"
|
|
416
|
+
@keydown.native.enter="saveItem"
|
|
433
417
|
/>
|
|
434
418
|
</div>
|
|
435
419
|
</div>
|
|
@@ -444,14 +428,14 @@ export default Vue.extend({
|
|
|
444
428
|
>
|
|
445
429
|
<button
|
|
446
430
|
class="btn btn-sm role-tertiary remove-button"
|
|
447
|
-
:disabled="!selected && !isCreateItem && !
|
|
431
|
+
:disabled="!selected && !isCreateItem && !isEditItem"
|
|
448
432
|
@mousedown.prevent="onClickMinusButton"
|
|
449
433
|
>
|
|
450
434
|
<span class="icon icon-minus icon-sm" />
|
|
451
435
|
</button>
|
|
452
436
|
<button
|
|
453
437
|
class="btn btn-sm role-tertiary add-button"
|
|
454
|
-
:disabled="isCreateItem
|
|
438
|
+
:disabled="isCreateItem"
|
|
455
439
|
@click.prevent="onClickPlusButton"
|
|
456
440
|
>
|
|
457
441
|
<span class="icon icon-plus icon-sm" />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowMount, Wrapper } from '@vue/test-utils';
|
|
2
2
|
import { Checkbox } from './index';
|
|
3
3
|
|
|
4
|
-
describe('
|
|
4
|
+
describe('checkbox.vue', () => {
|
|
5
5
|
const event = {
|
|
6
6
|
target: { tagName: 'input', href: null },
|
|
7
7
|
stopPropagation: () => { },
|
|
@@ -63,6 +63,6 @@ describe('Checkbox.vue', () => {
|
|
|
63
63
|
wrapper.vm.clicked(event);
|
|
64
64
|
await wrapper.vm.$nextTick();
|
|
65
65
|
|
|
66
|
-
expect(wrapper.emitted().input?.[0][0]).
|
|
66
|
+
expect(wrapper.emitted().input?.[0][0]).toBeNull();
|
|
67
67
|
});
|
|
68
68
|
});
|
|
@@ -202,7 +202,7 @@ export default Vue.extend({
|
|
|
202
202
|
* @param value A collection of values for the checkbox.
|
|
203
203
|
*/
|
|
204
204
|
findTrueValues(value: boolean[]): boolean {
|
|
205
|
-
return value.find(v => v === this.valueWhenTrue) || false;
|
|
205
|
+
return value.find((v) => v === this.valueWhenTrue) || false;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
});
|
|
@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
|
|
|
2
2
|
import { RadioButton } from './index';
|
|
3
3
|
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
|
4
4
|
|
|
5
|
-
describe('
|
|
5
|
+
describe('radioButton.vue', () => {
|
|
6
6
|
it('renders label slot contents', () => {
|
|
7
7
|
const wrapper = shallowMount(RadioButton, { slots: { label: 'Test Label' } });
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ export default Vue.extend({
|
|
|
17
17
|
*/
|
|
18
18
|
val: {
|
|
19
19
|
required: true,
|
|
20
|
-
validator:
|
|
20
|
+
validator: () => true
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -25,7 +25,7 @@ export default Vue.extend({
|
|
|
25
25
|
*/
|
|
26
26
|
value: {
|
|
27
27
|
required: true,
|
|
28
|
-
validator:
|
|
28
|
+
validator: () => true
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -152,7 +152,7 @@ export default Vue.extend({
|
|
|
152
152
|
*/
|
|
153
153
|
clickNext(direction: number): void {
|
|
154
154
|
const opts = this.normalizedOptions;
|
|
155
|
-
const selected = opts.find(x => x.value === this.value);
|
|
155
|
+
const selected = opts.find((x) => x.value === this.value);
|
|
156
156
|
let newIndex = (selected ? opts.indexOf(selected) : -1) + direction;
|
|
157
157
|
|
|
158
158
|
if (newIndex >= opts.length) {
|
|
@@ -209,7 +209,7 @@ export default Vue.extend({
|
|
|
209
209
|
<slot
|
|
210
210
|
:listeners="$listeners"
|
|
211
211
|
:option="option"
|
|
212
|
-
:
|
|
212
|
+
:is-disabled="isDisabled"
|
|
213
213
|
:name="i"
|
|
214
214
|
>
|
|
215
215
|
<RadioButton
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowMount, Wrapper } from '@vue/test-utils';
|
|
2
2
|
import { ToggleSwitch } from './index';
|
|
3
3
|
|
|
4
|
-
describe('
|
|
4
|
+
describe('toggleSwitch.vue', () => {
|
|
5
5
|
it('renders falsy by default', () => {
|
|
6
6
|
const wrapper = shallowMount(ToggleSwitch);
|
|
7
7
|
|
|
@@ -31,13 +31,6 @@ export default Vue.extend({
|
|
|
31
31
|
return { state: false as boolean | string | number };
|
|
32
32
|
},
|
|
33
33
|
|
|
34
|
-
methods: {
|
|
35
|
-
toggle(neu: boolean | string | number) {
|
|
36
|
-
this.state = neu === null ? !this.state : neu;
|
|
37
|
-
this.$emit('input', this.state ? this.onValue : this.offValue);
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
|
|
41
34
|
watch: {
|
|
42
35
|
value: {
|
|
43
36
|
handler() {
|
|
@@ -45,6 +38,13 @@ export default Vue.extend({
|
|
|
45
38
|
},
|
|
46
39
|
immediate: true
|
|
47
40
|
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
methods: {
|
|
44
|
+
toggle(neu: boolean | string | number) {
|
|
45
|
+
this.state = neu === null ? !this.state : neu;
|
|
46
|
+
this.$emit('input', this.state ? this.onValue : this.offValue);
|
|
47
|
+
}
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
</script>
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
/* eslint-disable jest/no-hooks */
|
|
1
2
|
import { mount, Wrapper } from '@vue/test-utils';
|
|
2
3
|
import { StringList } from './index';
|
|
3
4
|
|
|
4
|
-
describe('
|
|
5
|
+
describe('stringList.vue', () => {
|
|
5
6
|
let wrapper: Wrapper<InstanceType<typeof StringList>>;
|
|
6
7
|
|
|
7
8
|
beforeEach(() => {
|
|
8
9
|
wrapper = mount(StringList, { propsData: { items: [] } });
|
|
9
10
|
});
|
|
10
11
|
|
|
11
|
-
describe('
|
|
12
|
+
describe('list box', () => {
|
|
12
13
|
it('is empty', () => {
|
|
13
14
|
const box = wrapper.find('[data-testid="div-string-list-box"]').element as HTMLElement;
|
|
14
15
|
|
|
15
|
-
expect(box.children
|
|
16
|
+
expect(box.children).toHaveLength(0);
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
it('show multiple items', async() => {
|
|
@@ -22,7 +23,7 @@ describe('StringList.vue', () => {
|
|
|
22
23
|
|
|
23
24
|
const elements = wrapper.findAll('[data-testid^="div-item"]');
|
|
24
25
|
|
|
25
|
-
expect(elements
|
|
26
|
+
expect(elements).toHaveLength(10);
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
it('double click triggers inline edit mode', async() => {
|
|
@@ -130,7 +131,7 @@ describe('StringList.vue', () => {
|
|
|
130
131
|
});
|
|
131
132
|
});
|
|
132
133
|
|
|
133
|
-
describe('
|
|
134
|
+
describe('buttons', () => {
|
|
134
135
|
it('are visible by default', () => {
|
|
135
136
|
const actionButtons = wrapper.find('[data-testid="div-action-buttons"]');
|
|
136
137
|
|
|
@@ -144,7 +145,7 @@ describe('StringList.vue', () => {
|
|
|
144
145
|
expect(actionButtons.element).toBeUndefined();
|
|
145
146
|
});
|
|
146
147
|
|
|
147
|
-
describe('
|
|
148
|
+
describe('add button', () => {
|
|
148
149
|
it('is enabled by default', () => {
|
|
149
150
|
const addButton = wrapper.find('[data-testid="button-add"]')?.element as HTMLButtonElement;
|
|
150
151
|
|
|
@@ -176,7 +177,7 @@ describe('StringList.vue', () => {
|
|
|
176
177
|
});
|
|
177
178
|
});
|
|
178
179
|
|
|
179
|
-
describe('
|
|
180
|
+
describe('remove button', () => {
|
|
180
181
|
it('is disabled by default', () => {
|
|
181
182
|
const removeButton = wrapper.find('[data-testid="button-remove"]');
|
|
182
183
|
const buttonElem = removeButton.element as HTMLButtonElement;
|
|
@@ -279,7 +280,7 @@ describe('StringList.vue', () => {
|
|
|
279
280
|
});
|
|
280
281
|
});
|
|
281
282
|
|
|
282
|
-
describe('
|
|
283
|
+
describe('list edit', () => {
|
|
283
284
|
const validItem = ' item name ';
|
|
284
285
|
const emptyItem = ' ';
|
|
285
286
|
|
|
@@ -397,7 +398,7 @@ describe('StringList.vue', () => {
|
|
|
397
398
|
});
|
|
398
399
|
});
|
|
399
400
|
|
|
400
|
-
describe('
|
|
401
|
+
describe('errors handling', () => {
|
|
401
402
|
it('show duplicate warning icon when errorMessages is defined', async() => {
|
|
402
403
|
const items = ['test'];
|
|
403
404
|
|
|
@@ -30,9 +30,9 @@ const CLASS = {
|
|
|
30
30
|
* Manage a list of strings
|
|
31
31
|
*/
|
|
32
32
|
export default Vue.extend({
|
|
33
|
-
components: { LabeledInput },
|
|
34
33
|
|
|
35
|
-
name:
|
|
34
|
+
name: 'StringList',
|
|
35
|
+
components: { LabeledInput },
|
|
36
36
|
|
|
37
37
|
props: {
|
|
38
38
|
/**
|
|
@@ -100,8 +100,8 @@ export default Vue.extend({
|
|
|
100
100
|
*/
|
|
101
101
|
errorMessagesArray(): string[] {
|
|
102
102
|
return (Object.keys(this.errors) as Error[])
|
|
103
|
-
.filter(f => this.errors[f] && this.errorMessages[f])
|
|
104
|
-
.map(k => this.errorMessages[k]);
|
|
103
|
+
.filter((f) => this.errors[f] && this.errorMessages[f])
|
|
104
|
+
.map((k) => this.errorMessages[k]);
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
107
|
|
|
@@ -364,7 +364,7 @@ export default Vue.extend({
|
|
|
364
364
|
* Remove an item from items list
|
|
365
365
|
*/
|
|
366
366
|
deleteItem(item?: string) {
|
|
367
|
-
const items = this.items.filter(f => f !== item);
|
|
367
|
+
const items = this.items.filter((f) => f !== item);
|
|
368
368
|
|
|
369
369
|
this.updateItems(items);
|
|
370
370
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
annotations:
|
|
2
2
|
catalog.cattle.io/certified: rancher # Any application we are adding as a helm chart
|
|
3
|
-
catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.
|
|
3
|
+
catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0'
|
|
4
4
|
catalog.cattle.io/namespace: cattle-ui-plugin-system # Must prefix with cattle- and suffix with -system=
|
|
5
5
|
catalog.cattle.io/os: linux
|
|
6
6
|
catalog.cattle.io/permits-os: linux, windows
|
package/store/action-menu.js
CHANGED
|
@@ -22,10 +22,10 @@ export const state = function() {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const getters = {
|
|
25
|
-
showing: state => state.show,
|
|
26
|
-
elem: state => state.elem,
|
|
27
|
-
event: state => state.event,
|
|
28
|
-
resources: state => state.resources,
|
|
25
|
+
showing: (state) => state.show,
|
|
26
|
+
elem: (state) => state.elem,
|
|
27
|
+
event: (state) => state.event,
|
|
28
|
+
resources: (state) => state.resources,
|
|
29
29
|
|
|
30
30
|
options(state) {
|
|
31
31
|
let selected = state.resources;
|