@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
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
// you want to preserve but not support editing
|
|
168
168
|
supported: {
|
|
169
169
|
type: Function,
|
|
170
|
-
default: v => true,
|
|
170
|
+
default: (v) => true,
|
|
171
171
|
},
|
|
172
172
|
// For asMap=false, preserve (copy) these keys from the original value into the emitted value.
|
|
173
173
|
// Also useful for valueFrom as above.
|
|
@@ -247,6 +247,10 @@ export default {
|
|
|
247
247
|
default: false,
|
|
248
248
|
type: Boolean
|
|
249
249
|
},
|
|
250
|
+
parseValueFromFile: {
|
|
251
|
+
default: false,
|
|
252
|
+
type: Boolean
|
|
253
|
+
},
|
|
250
254
|
disabled: {
|
|
251
255
|
default: false,
|
|
252
256
|
type: Boolean
|
|
@@ -272,12 +276,12 @@ export default {
|
|
|
272
276
|
return `grid-template-columns: repeat(${ size }, 1fr)${ gap };`;
|
|
273
277
|
},
|
|
274
278
|
usedKeyOptions() {
|
|
275
|
-
return this.rows.map(row => row[this.keyName]);
|
|
279
|
+
return this.rows.map((row) => row[this.keyName]);
|
|
276
280
|
},
|
|
277
281
|
filteredKeyOptions() {
|
|
278
282
|
if (this.keyOptionUnique) {
|
|
279
283
|
return this.keyOptions
|
|
280
|
-
.filter(option => !this.usedKeyOptions.includes(option.value));
|
|
284
|
+
.filter((option) => !this.usedKeyOptions.includes(option.value));
|
|
281
285
|
}
|
|
282
286
|
|
|
283
287
|
return this.keyOptions;
|
|
@@ -292,7 +296,7 @@ export default {
|
|
|
292
296
|
* Filter rows based on toggler, keeping to still emit all the values
|
|
293
297
|
*/
|
|
294
298
|
filteredRows() {
|
|
295
|
-
return this.rows.filter(row => !(this.isProtected(row.key) && !this.toggleFilter));
|
|
299
|
+
return this.rows.filter((row) => !(this.isProtected(row.key) && !this.toggleFilter));
|
|
296
300
|
}
|
|
297
301
|
},
|
|
298
302
|
created() {
|
|
@@ -505,7 +509,7 @@ export default {
|
|
|
505
509
|
return;
|
|
506
510
|
}
|
|
507
511
|
event.preventDefault();
|
|
508
|
-
const keyValues = splits.map(split => ({
|
|
512
|
+
const keyValues = splits.map((split) => ({
|
|
509
513
|
[this.keyName]: (split[0] || '').trim(),
|
|
510
514
|
[this.valueName]: (split[1] || '').trim(),
|
|
511
515
|
supported: true,
|
|
@@ -517,7 +521,7 @@ export default {
|
|
|
517
521
|
this.queueUpdate();
|
|
518
522
|
},
|
|
519
523
|
calculateOptions(value) {
|
|
520
|
-
const valueOption = this.keyOptions.find(o => o.value === value);
|
|
524
|
+
const valueOption = this.keyOptions.find((o) => o.value === value);
|
|
521
525
|
|
|
522
526
|
if (valueOption) {
|
|
523
527
|
return [valueOption, ...this.filteredKeyOptions];
|
|
@@ -544,6 +548,17 @@ export default {
|
|
|
544
548
|
*/
|
|
545
549
|
onFocusMarkdownMultiline(idx, value) {
|
|
546
550
|
this.$set(this.codeMirrorFocus, idx, value);
|
|
551
|
+
},
|
|
552
|
+
onValueFileSelected(idx, file) {
|
|
553
|
+
const { name, value } = file;
|
|
554
|
+
|
|
555
|
+
if (!this.rows[idx][this.keyName]) {
|
|
556
|
+
this.rows[idx][this.keyName] = name;
|
|
557
|
+
}
|
|
558
|
+
this.rows[idx][this.valueName] = value;
|
|
559
|
+
},
|
|
560
|
+
isValueFieldEmpty(value) {
|
|
561
|
+
return !value || value.trim().length === 0;
|
|
547
562
|
}
|
|
548
563
|
}
|
|
549
564
|
};
|
|
@@ -662,39 +677,53 @@ export default {
|
|
|
662
677
|
<div v-else-if="row.binary">
|
|
663
678
|
{{ binaryTextSize(row.value) }}
|
|
664
679
|
</div>
|
|
665
|
-
<
|
|
666
|
-
v-else-if="valueMarkdownMultiline"
|
|
667
|
-
ref="cm"
|
|
668
|
-
data-testid="code-mirror-multiline-field"
|
|
669
|
-
:class="{['focus']: codeMirrorFocus[i]}"
|
|
670
|
-
:value="row[valueName]"
|
|
671
|
-
:as-text-area="true"
|
|
672
|
-
:mode="mode"
|
|
673
|
-
@onInput="onInputMarkdownMultiline(i, $event)"
|
|
674
|
-
@onFocus="onFocusMarkdownMultiline(i, $event)"
|
|
675
|
-
/>
|
|
676
|
-
<TextAreaAutoGrow
|
|
677
|
-
v-else-if="valueMultiline"
|
|
678
|
-
v-model="row[valueName]"
|
|
679
|
-
:class="{'conceal': valueConcealed}"
|
|
680
|
-
:disabled="disabled || isProtected(row.key)"
|
|
681
|
-
:mode="mode"
|
|
682
|
-
:placeholder="valuePlaceholder"
|
|
683
|
-
:min-height="40"
|
|
684
|
-
:spellcheck="false"
|
|
685
|
-
@input="queueUpdate"
|
|
686
|
-
/>
|
|
687
|
-
<input
|
|
680
|
+
<div
|
|
688
681
|
v-else
|
|
689
|
-
|
|
690
|
-
:
|
|
691
|
-
:type="valueConcealed ? 'password' : 'text'"
|
|
692
|
-
:placeholder="valuePlaceholder"
|
|
693
|
-
autocorrect="off"
|
|
694
|
-
autocapitalize="off"
|
|
695
|
-
spellcheck="false"
|
|
696
|
-
@input="queueUpdate"
|
|
682
|
+
class="value-container"
|
|
683
|
+
:class="{ 'upload-button': parseValueFromFile }"
|
|
697
684
|
>
|
|
685
|
+
<CodeMirror
|
|
686
|
+
v-if="valueMarkdownMultiline"
|
|
687
|
+
ref="cm"
|
|
688
|
+
data-testid="code-mirror-multiline-field"
|
|
689
|
+
:class="{['focus']: codeMirrorFocus[i]}"
|
|
690
|
+
:value="row[valueName]"
|
|
691
|
+
:as-text-area="true"
|
|
692
|
+
:mode="mode"
|
|
693
|
+
@onInput="onInputMarkdownMultiline(i, $event)"
|
|
694
|
+
@onFocus="onFocusMarkdownMultiline(i, $event)"
|
|
695
|
+
/>
|
|
696
|
+
<TextAreaAutoGrow
|
|
697
|
+
v-else-if="valueMultiline"
|
|
698
|
+
v-model="row[valueName]"
|
|
699
|
+
data-testid="value-multiline"
|
|
700
|
+
:class="{'conceal': valueConcealed}"
|
|
701
|
+
:disabled="disabled || isProtected(row.key)"
|
|
702
|
+
:mode="mode"
|
|
703
|
+
:placeholder="valuePlaceholder"
|
|
704
|
+
:min-height="40"
|
|
705
|
+
:spellcheck="false"
|
|
706
|
+
@input="queueUpdate"
|
|
707
|
+
/>
|
|
708
|
+
<input
|
|
709
|
+
v-else
|
|
710
|
+
v-model="row[valueName]"
|
|
711
|
+
:disabled="isView || disabled || isProtected(row.key)"
|
|
712
|
+
:type="valueConcealed ? 'password' : 'text'"
|
|
713
|
+
:placeholder="valuePlaceholder"
|
|
714
|
+
autocorrect="off"
|
|
715
|
+
autocapitalize="off"
|
|
716
|
+
spellcheck="false"
|
|
717
|
+
@input="queueUpdate"
|
|
718
|
+
>
|
|
719
|
+
<FileSelector
|
|
720
|
+
v-if="parseValueFromFile && readAllowed && !isView && isValueFieldEmpty(row[valueName])"
|
|
721
|
+
class="btn btn-sm role-secondary file-selector"
|
|
722
|
+
:label="t('generic.upload')"
|
|
723
|
+
:include-file-name="true"
|
|
724
|
+
@selected="onValueFileSelected(i, $event)"
|
|
725
|
+
/>
|
|
726
|
+
</div>
|
|
698
727
|
</slot>
|
|
699
728
|
</div>
|
|
700
729
|
<div
|
|
@@ -772,7 +801,7 @@ export default {
|
|
|
772
801
|
text-transform: initial;
|
|
773
802
|
padding: 0;
|
|
774
803
|
}
|
|
775
|
-
.kv-container{
|
|
804
|
+
.kv-container {
|
|
776
805
|
display: grid;
|
|
777
806
|
align-items: center;
|
|
778
807
|
column-gap: 20px;
|
|
@@ -785,7 +814,19 @@ export default {
|
|
|
785
814
|
&.key, &.extra {
|
|
786
815
|
align-self: flex-start;
|
|
787
816
|
}
|
|
788
|
-
&.value
|
|
817
|
+
&.value .value-container {
|
|
818
|
+
&.upload-button {
|
|
819
|
+
position: relative;
|
|
820
|
+
display: flex;
|
|
821
|
+
justify-content: right;
|
|
822
|
+
align-items: center;
|
|
823
|
+
}
|
|
824
|
+
.file-selector {
|
|
825
|
+
position: absolute;
|
|
826
|
+
margin-right: 5px;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
&.value textarea {
|
|
789
830
|
padding: 10px 10px 10px 10px;
|
|
790
831
|
}
|
|
791
832
|
|
|
@@ -796,7 +837,7 @@ export default {
|
|
|
796
837
|
}
|
|
797
838
|
.remove {
|
|
798
839
|
text-align: center;
|
|
799
|
-
BUTTON{
|
|
840
|
+
BUTTON {
|
|
800
841
|
padding: 0px;
|
|
801
842
|
}
|
|
802
843
|
}
|
|
@@ -819,7 +860,7 @@ export default {
|
|
|
819
860
|
.download {
|
|
820
861
|
text-align: right;
|
|
821
862
|
}
|
|
822
|
-
.copy-value{
|
|
863
|
+
.copy-value {
|
|
823
864
|
padding: 0px 0px 0px 10px;
|
|
824
865
|
}
|
|
825
866
|
}
|
|
@@ -150,10 +150,10 @@ export default {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// Force to update the option label if prop has been changed
|
|
153
|
-
const isOutdated = !this.options.find(opt => option[this.optionLabel] === opt[this.optionLabel]);
|
|
153
|
+
const isOutdated = !this.options.find((opt) => option[this.optionLabel] === opt[this.optionLabel]);
|
|
154
154
|
|
|
155
155
|
if (isOutdated && this.options) {
|
|
156
|
-
const newOption = this.options.find(opt => isEqual(this.reduce(option), this.reduce(opt)));
|
|
156
|
+
const newOption = this.options.find((opt) => isEqual(this.reduce(option), this.reduce(opt)));
|
|
157
157
|
|
|
158
158
|
if (newOption) {
|
|
159
159
|
const label = get(newOption, this.optionLabel);
|
|
@@ -223,11 +223,11 @@ export default {
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
if ( val !== null ) {
|
|
226
|
-
expression.values = val.split(/\s*,\s*/).filter(x => !!x);
|
|
226
|
+
expression.values = val.split(/\s*,\s*/).filter((x) => !!x);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
return expression;
|
|
230
|
-
}).filter(x => !!x);
|
|
230
|
+
}).filter((x) => !!x);
|
|
231
231
|
|
|
232
232
|
if ( isArray(this.value) || this.matchingSelectorDisplay ) {
|
|
233
233
|
this.$emit('input', out);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { NORMAN } from '@shell/config/types';
|
|
3
3
|
import { _CREATE, _VIEW } from '@shell/config/query-params';
|
|
4
|
-
import MembershipEditor from '@shell/components/form/Members/MembershipEditor';
|
|
5
|
-
import { canViewMembershipEditor } from '@shell/components/form/Members/MembershipEditor.vue';
|
|
4
|
+
import MembershipEditor, { canViewMembershipEditor } from '@shell/components/form/Members/MembershipEditor';
|
|
6
5
|
|
|
7
6
|
export function canViewClusterMembershipEditor(store) {
|
|
8
7
|
return canViewMembershipEditor(store);
|
|
@@ -134,14 +134,14 @@ export default {
|
|
|
134
134
|
|
|
135
135
|
if (this.permissionGroup === 'custom') {
|
|
136
136
|
return this.customPermissions
|
|
137
|
-
.filter(permission => permission.value)
|
|
138
|
-
.map(permission => permission.key);
|
|
137
|
+
.filter((permission) => permission.value)
|
|
138
|
+
.map((permission) => permission.key);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
return [this.permissionGroup];
|
|
142
142
|
},
|
|
143
143
|
options() {
|
|
144
|
-
const customRoles = this.customRoles.map(role => ({
|
|
144
|
+
const customRoles = this.customRoles.map((role) => ({
|
|
145
145
|
label: role.nameDisplay,
|
|
146
146
|
description: role.description || role.metadata?.annotations?.[DESCRIPTION] || this.t('members.clusterPermissions.noDescription'),
|
|
147
147
|
value: role.id
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
177
177
|
},
|
|
178
178
|
customPermissionsUpdate() {
|
|
179
179
|
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
180
|
-
const lockedExist = this.roleTemplates.find(roleTemplateItem => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
180
|
+
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
181
181
|
|
|
182
182
|
if (lockedExist.locked) {
|
|
183
183
|
customPermissionsItem['locked'] = true;
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
async updateBindings() {
|
|
210
210
|
if (this.principalId) {
|
|
211
211
|
const principalProperty = await this.principalProperty();
|
|
212
|
-
const bindingPromises = this.roleTemplateIds.map(id => this.$store.dispatch(`rancher/create`, {
|
|
212
|
+
const bindingPromises = this.roleTemplateIds.map((id) => this.$store.dispatch(`rancher/create`, {
|
|
213
213
|
type: NORMAN.CLUSTER_ROLE_TEMPLATE_BINDING,
|
|
214
214
|
clusterId: this.clusterName,
|
|
215
215
|
roleTemplateId: id,
|
|
@@ -237,6 +237,7 @@ export default {
|
|
|
237
237
|
class="mb-20"
|
|
238
238
|
:mode="mode"
|
|
239
239
|
:retain-selection="true"
|
|
240
|
+
data-testid="cluster-member-select"
|
|
240
241
|
@add="onAdd"
|
|
241
242
|
/>
|
|
242
243
|
</div>
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
const [allBindings] = await Promise.all(userHydration);
|
|
66
66
|
|
|
67
67
|
const bindings = allBindings
|
|
68
|
-
.filter(b => normalizeId(get(b, this.parentKey)) === normalizeId(this.parentId));
|
|
68
|
+
.filter((b) => normalizeId(get(b, this.parentKey)) === normalizeId(this.parentId));
|
|
69
69
|
|
|
70
70
|
this.$set(this, 'lastSavedBindings', [...bindings]);
|
|
71
71
|
|
|
@@ -91,11 +91,11 @@ export default {
|
|
|
91
91
|
computed: {
|
|
92
92
|
newBindings() {
|
|
93
93
|
return this.bindings
|
|
94
|
-
.filter(binding => !binding.id && !this.lastSavedBindings.includes(binding) && !binding.isDefaultBinding);
|
|
94
|
+
.filter((binding) => !binding.id && !this.lastSavedBindings.includes(binding) && !binding.isDefaultBinding);
|
|
95
95
|
},
|
|
96
96
|
removedBindings() {
|
|
97
97
|
return this.lastSavedBindings
|
|
98
|
-
.filter(binding => !this.bindings.includes(binding));
|
|
98
|
+
.filter((binding) => !this.bindings.includes(binding));
|
|
99
99
|
},
|
|
100
100
|
membershipUpdate() {
|
|
101
101
|
const newBindings = this.newBindings;
|
|
@@ -111,7 +111,7 @@ export default {
|
|
|
111
111
|
return binding.save();
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
-
const removedPromises = removedBindings.map(binding => binding.remove());
|
|
114
|
+
const removedPromises = removedBindings.map((binding) => binding.remove());
|
|
115
115
|
|
|
116
116
|
return Promise.all([...savedPromises, ...removedPromises]);
|
|
117
117
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { NORMAN } from '@shell/config/types';
|
|
3
3
|
import { _CREATE, _VIEW } from '@shell/config/query-params';
|
|
4
|
-
import MembershipEditor from '@shell/components/form/Members/MembershipEditor';
|
|
5
|
-
import { canViewMembershipEditor } from '@shell/components/form/Members/MembershipEditor.vue';
|
|
4
|
+
import MembershipEditor, { canViewMembershipEditor } from '@shell/components/form/Members/MembershipEditor';
|
|
6
5
|
|
|
7
6
|
export function canViewProjectMembershipEditor(store) {
|
|
8
7
|
return canViewMembershipEditor(store, true);
|
|
@@ -105,6 +105,10 @@ export default {
|
|
|
105
105
|
type: Array,
|
|
106
106
|
default: null,
|
|
107
107
|
},
|
|
108
|
+
createNamespaceOverride: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false,
|
|
111
|
+
},
|
|
108
112
|
descriptionLabel: {
|
|
109
113
|
type: String,
|
|
110
114
|
default: 'nameNsDescription.description.label',
|
|
@@ -224,9 +228,11 @@ export default {
|
|
|
224
228
|
* Map namespaces from the store to options, adding divider and create button
|
|
225
229
|
*/
|
|
226
230
|
options() {
|
|
227
|
-
const
|
|
228
|
-
.
|
|
229
|
-
|
|
231
|
+
const namespaces = this.namespacesOverride ||
|
|
232
|
+
(Object.keys(this.isCreate ? this.allowedNamespaces() : this.namespaces()));
|
|
233
|
+
const options = namespaces
|
|
234
|
+
.map((namespace) => ({ nameDisplay: namespace, id: namespace }))
|
|
235
|
+
.map(this.namespaceMapper || ((obj) => ({
|
|
230
236
|
label: obj.nameDisplay,
|
|
231
237
|
value: obj.id,
|
|
232
238
|
})));
|
|
@@ -251,7 +257,7 @@ export default {
|
|
|
251
257
|
kind: 'divider'
|
|
252
258
|
};
|
|
253
259
|
|
|
254
|
-
const createOverhead = this.canCreateNamespace ? [createButton, divider] : [];
|
|
260
|
+
const createOverhead = this.canCreateNamespace || this.createNamespaceOverride ? [createButton, divider] : [];
|
|
255
261
|
|
|
256
262
|
return [
|
|
257
263
|
...createOverhead,
|
|
@@ -330,7 +336,7 @@ export default {
|
|
|
330
336
|
}
|
|
331
337
|
|
|
332
338
|
if (this.namespaced) {
|
|
333
|
-
this.$emit('isNamespaceNew', !val || (this.options && !this.options.find(n => n.value === val)));
|
|
339
|
+
this.$emit('isNamespaceNew', !val || (this.options && !this.options.find((n) => n.value === val)));
|
|
334
340
|
}
|
|
335
341
|
|
|
336
342
|
if (this.namespaceKey) {
|
|
@@ -348,7 +354,8 @@ export default {
|
|
|
348
354
|
cancelCreateNamespace(e) {
|
|
349
355
|
this.createNamespace = false;
|
|
350
356
|
this.$parent.$emit('createNamespace', false);
|
|
351
|
-
|
|
357
|
+
// In practise we should always have a defaultNamespace... unless we're in non-kube extension world, so fall back on options
|
|
358
|
+
this.namespace = this.$store.getters['defaultNamespace'] || this.options.find((o) => !!o.value)?.value ;
|
|
352
359
|
},
|
|
353
360
|
|
|
354
361
|
selectNamespace(e) {
|
|
@@ -113,10 +113,10 @@ export default {
|
|
|
113
113
|
updateHostAliases(neu) {
|
|
114
114
|
this.hostAliases = neu.map((entry) => {
|
|
115
115
|
const ip = entry.ip.trim();
|
|
116
|
-
const hostnames = entry.hostnames.trim().split(/[\s,]+/).filter(x => !!x);
|
|
116
|
+
const hostnames = entry.hostnames.trim().split(/[\s,]+/).filter((x) => !!x);
|
|
117
117
|
|
|
118
118
|
return { ip, hostnames };
|
|
119
|
-
}).filter(entry => entry.ip && entry.hostnames.length);
|
|
119
|
+
}).filter((entry) => entry.ip && entry.hostnames.length);
|
|
120
120
|
this.update();
|
|
121
121
|
},
|
|
122
122
|
|
|
@@ -333,7 +333,7 @@ export default {
|
|
|
333
333
|
|
|
334
334
|
// namespaces would be String if there is no namespace
|
|
335
335
|
if (typeof namespaces === 'string') {
|
|
336
|
-
nsArray = namespaces.split(',').map(ns => ns.trim()).filter(ns => ns?.length);
|
|
336
|
+
nsArray = namespaces.split(',').map((ns) => ns.trim()).filter((ns) => ns?.length);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
this.$set(term, 'namespaces', nsArray);
|
|
@@ -160,7 +160,7 @@ export default {
|
|
|
160
160
|
},
|
|
161
161
|
|
|
162
162
|
options() {
|
|
163
|
-
const customRoles = this.customRoles.map(role => ({
|
|
163
|
+
const customRoles = this.customRoles.map((role) => ({
|
|
164
164
|
label: this.purifyOption(role.nameDisplay),
|
|
165
165
|
description: this.purifyOption(role.description || role.metadata?.annotations?.[DESCRIPTION] || this.t('projectMembers.projectPermissions.noDescription')),
|
|
166
166
|
value: this.purifyOption(role.id),
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
},
|
|
193
193
|
customPermissionsUpdate() {
|
|
194
194
|
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
195
|
-
const lockedExist = this.roleTemplates.find(roleTemplateItem => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
195
|
+
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.displayName === customPermissionsItem.label);
|
|
196
196
|
|
|
197
197
|
if (lockedExist.locked) {
|
|
198
198
|
customPermissionsItem['locked'] = true;
|
|
@@ -241,8 +241,8 @@ export default {
|
|
|
241
241
|
|
|
242
242
|
if (permissionGroup === 'custom') {
|
|
243
243
|
return this.customPermissions
|
|
244
|
-
.filter(permission => permission.value)
|
|
245
|
-
.map(permission => permission.key);
|
|
244
|
+
.filter((permission) => permission.value)
|
|
245
|
+
.map((permission) => permission.key);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
return [permissionGroup];
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
return this.project?.spec?.resourceQuota?.limit || {};
|
|
39
39
|
},
|
|
40
40
|
namespaceResourceQuotaLimits() {
|
|
41
|
-
return this.project.namespaces.map(namespace => ({
|
|
41
|
+
return this.project.namespaces.map((namespace) => ({
|
|
42
42
|
...namespace.resourceQuota.limit,
|
|
43
43
|
id: namespace.id
|
|
44
44
|
}));
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
methods: {
|
|
55
55
|
remainingTypes(currentType) {
|
|
56
56
|
return this.mappedTypes
|
|
57
|
-
.filter(type => !this.types.includes(type.value) || type.value === currentType);
|
|
57
|
+
.filter((type) => !this.types.includes(type.value) || type.value === currentType);
|
|
58
58
|
},
|
|
59
59
|
update(key, value) {
|
|
60
60
|
const resourceQuota = {
|
|
@@ -83,8 +83,8 @@ export default {
|
|
|
83
83
|
},
|
|
84
84
|
namespaceLimits() {
|
|
85
85
|
return this.namespaceResourceQuotaLimits
|
|
86
|
-
.filter(resourceQuota => resourceQuota[this.type] && resourceQuota.id !== this.namespace.id)
|
|
87
|
-
.map(resourceQuota => parseSi(resourceQuota[this.type], this.siOptions));
|
|
86
|
+
.filter((resourceQuota) => resourceQuota[this.type] && resourceQuota.id !== this.namespace.id)
|
|
87
|
+
.map((resourceQuota) => parseSi(resourceQuota[this.type], this.siOptions));
|
|
88
88
|
},
|
|
89
89
|
namespaceContribution() {
|
|
90
90
|
return this.namespaceLimits.reduce((sum, limit) => sum + limit, 0);
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
},
|
|
42
42
|
remainingTypes(currentType) {
|
|
43
43
|
return this.mappedTypes
|
|
44
|
-
.filter(mappedType => !this.typeValues.includes(mappedType.value) || mappedType.value === currentType);
|
|
44
|
+
.filter((mappedType) => !this.typeValues.includes(mappedType.value) || mappedType.value === currentType);
|
|
45
45
|
},
|
|
46
46
|
emitRemove(data) {
|
|
47
47
|
this.$emit('remove', data.row?.value);
|
|
@@ -130,14 +130,14 @@ export const HARVESTER_TYPES = [
|
|
|
130
130
|
|
|
131
131
|
export const ROW_COMPUTED = {
|
|
132
132
|
typeOption() {
|
|
133
|
-
return this.types.find(type => type.value === this.type);
|
|
133
|
+
return this.types.find((type) => type.value === this.type);
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export const QUOTA_COMPUTED = {
|
|
138
138
|
mappedTypes() {
|
|
139
139
|
return this.types
|
|
140
|
-
.map(type => ({
|
|
140
|
+
.map((type) => ({
|
|
141
141
|
label: this.t(type.labelKey),
|
|
142
142
|
baseUnit: type.baseUnitKey ? this.t(type.baseUnitKey) : undefined,
|
|
143
143
|
placeholder: this.t(type.placeholderKey),
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
|
|
91
91
|
methods: {
|
|
92
92
|
updateMatchingResources: throttle(function() {
|
|
93
|
-
this.allResourcesInScope = this.namespace ? this.allResources.filter(res => res.metadata.namespace === this.namespace) : this.allResources;
|
|
93
|
+
this.allResourcesInScope = this.namespace ? this.allResources.filter((res) => res.metadata.namespace === this.namespace) : this.allResources;
|
|
94
94
|
const match = matching(this.allResourcesInScope, this.selectorExpressions);
|
|
95
95
|
const matched = match.length || 0;
|
|
96
96
|
const sample = match[0]?.nameDisplay;
|
|
@@ -93,10 +93,10 @@ export default {
|
|
|
93
93
|
const allSecrets = this.$store.getters[`${ this.inStore }/all`](SECRET);
|
|
94
94
|
|
|
95
95
|
return allSecrets
|
|
96
|
-
.filter(secret => this.types.includes(secret._type) && secret.namespace === this.namespace);
|
|
96
|
+
.filter((secret) => this.types.includes(secret._type) && secret.namespace === this.namespace);
|
|
97
97
|
},
|
|
98
98
|
secretNames() {
|
|
99
|
-
const mappedSecrets = this.secrets.map(secret => ({
|
|
99
|
+
const mappedSecrets = this.secrets.map((secret) => ({
|
|
100
100
|
label: secret.name,
|
|
101
101
|
value: secret.name
|
|
102
102
|
})).sort();
|
|
@@ -104,9 +104,9 @@ export default {
|
|
|
104
104
|
return [{ label: 'None', value: NONE }, ...sortBy(mappedSecrets, 'label')];
|
|
105
105
|
},
|
|
106
106
|
keys() {
|
|
107
|
-
const secret = this.secrets.find(secret => secret.name === this.name) || {};
|
|
107
|
+
const secret = this.secrets.find((secret) => secret.name === this.name) || {};
|
|
108
108
|
|
|
109
|
-
return Object.keys(secret.data || {}).map(key => ({
|
|
109
|
+
return Object.keys(secret.data || {}).map((key) => ({
|
|
110
110
|
label: key,
|
|
111
111
|
value: key
|
|
112
112
|
}));
|
|
@@ -155,11 +155,11 @@ export default {
|
|
|
155
155
|
computed: {
|
|
156
156
|
requiredField() {
|
|
157
157
|
// using "any" for a type on "rule" here is dirty but the use of the optional chaining operator makes it safe for what we're doing here.
|
|
158
|
-
return (this.required || this.rules.some(rule => rule?.name === 'required'));
|
|
158
|
+
return (this.required || this.rules.some((rule) => rule?.name === 'required'));
|
|
159
159
|
},
|
|
160
160
|
validationMessage() {
|
|
161
161
|
// we want to grab the required rule passed in if we can but if it's not there then we can just grab it from the formRulesGenerator
|
|
162
|
-
const requiredRule = this.rules.find(rule => rule?.name === 'required');
|
|
162
|
+
const requiredRule = this.rules.find((rule) => rule?.name === 'required');
|
|
163
163
|
const ruleMessages = [];
|
|
164
164
|
const value = this?.value;
|
|
165
165
|
|
|
@@ -208,7 +208,7 @@ export default {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
const out = this.allSecrets
|
|
211
|
-
.filter(x => this.namespace && this.limitToNamespace ? x.metadata.namespace === this.namespace : true)
|
|
211
|
+
.filter((x) => this.namespace && this.limitToNamespace ? x.metadata.namespace === this.namespace : true)
|
|
212
212
|
.filter((x) => {
|
|
213
213
|
// Must match one of the types if given
|
|
214
214
|
if ( types.length && !types.includes(x._type) ) {
|
|
@@ -219,7 +219,7 @@ export default {
|
|
|
219
219
|
if ( keys.length ) {
|
|
220
220
|
const dataKeys = Object.keys(x.data || {});
|
|
221
221
|
|
|
222
|
-
if ( !keys.every(key => dataKeys.includes(key)) ) {
|
|
222
|
+
if ( !keys.every((key) => dataKeys.includes(key)) ) {
|
|
223
223
|
return false;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
@@ -235,7 +235,7 @@ export default {
|
|
|
235
235
|
|
|
236
236
|
if ( this.allowS3 ) {
|
|
237
237
|
const more = this.allCloudCreds
|
|
238
|
-
.filter(x => ['aws', 's3'].includes(x.provider) )
|
|
238
|
+
.filter((x) => ['aws', 's3'].includes(x.provider) )
|
|
239
239
|
.map((x) => {
|
|
240
240
|
return {
|
|
241
241
|
label: `${ x.nameDisplay } (${ x.providerDisplay })`,
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
default: () => [],
|
|
34
34
|
type: Array,
|
|
35
35
|
// we only want functions in the rules array
|
|
36
|
-
validator: rules => rules.every(rule => ['function'].includes(typeof rule))
|
|
36
|
+
validator: (rules) => rules.every((rule) => ['function'].includes(typeof rule))
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
let out = null;
|
|
43
43
|
|
|
44
44
|
if ( userValue ) {
|
|
45
|
-
out = userValue.match(/('[^']+')|("[^"]+")|\S+/g).map(string => string.replace(/^'|'$|^"|"$/g, ''));
|
|
45
|
+
out = userValue.match(/('[^']+')|("[^"]+")|\S+/g).map((string) => string.replace(/^'|'$|^"|"$/g, ''));
|
|
46
46
|
}
|
|
47
47
|
this.$emit('input', out);
|
|
48
48
|
},
|