@rancher/shell 0.3.14 → 0.3.16
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 +84 -3
- package/assets/translations/zh-hans.yaml +68 -26
- 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/generic.vue +1 -1
- 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/BannerGraphic.vue +1 -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 +3 -2
- package/components/DashboardMetrics.vue +8 -0
- package/components/DetailTop.vue +1 -1
- package/components/EmberPage.vue +1 -0
- 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 +14 -2
- 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/SimpleBox.vue +1 -0
- 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 +14 -10
- 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 +7 -2
- 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 +5 -5
- package/config/product/explorer.js +14 -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/catalog.cattle.io.clusterrepo.vue +8 -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/__tests__/monitoring.coreos.com.prometheusrule.test.ts +56 -0
- 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.prometheusrule/index.vue +8 -3
- 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 +3 -2
- package/pages/about.vue +9 -9
- package/pages/account/index.vue +2 -2
- package/pages/auth/login.vue +25 -12
- package/pages/auth/setup.vue +4 -0
- 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 +10 -10
- 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 +8 -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 +25 -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/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 +10 -2
- 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/form/GithubPicker.vue +0 -390
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
// to choose from.
|
|
32
32
|
const allSecrets = await this.$store.dispatch('cluster/findAll', { type: SECRET });
|
|
33
33
|
|
|
34
|
-
const allSecretsInNamespace = allSecrets.filter(secret => this.types.includes(secret._type) && secret.namespace === this.namespace);
|
|
34
|
+
const allSecretsInNamespace = allSecrets.filter((secret) => this.types.includes(secret._type) && secret.namespace === this.namespace);
|
|
35
35
|
|
|
36
36
|
this.secrets = allSecretsInNamespace;
|
|
37
37
|
},
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
|
|
84
84
|
computed: {
|
|
85
85
|
secretNames() {
|
|
86
|
-
const mappedSecrets = this.secrets.map(secret => ({
|
|
86
|
+
const mappedSecrets = this.secrets.map((secret) => ({
|
|
87
87
|
label: secret.name,
|
|
88
88
|
value: secret.name
|
|
89
89
|
})).sort();
|
|
@@ -91,9 +91,9 @@ export default {
|
|
|
91
91
|
return [{ label: 'None', value: NONE }, ...sortBy(mappedSecrets, 'label')];
|
|
92
92
|
},
|
|
93
93
|
keys() {
|
|
94
|
-
const secret = this.secrets.find(secret => secret.name === this.name) || {};
|
|
94
|
+
const secret = this.secrets.find((secret) => secret.name === this.name) || {};
|
|
95
95
|
|
|
96
|
-
return Object.keys(secret.data || {}).map(key => ({
|
|
96
|
+
return Object.keys(secret.data || {}).map((key) => ({
|
|
97
97
|
label: key,
|
|
98
98
|
value: key
|
|
99
99
|
}));
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
129
129
|
if (this.namespaced) {
|
|
130
130
|
const map = this.$store.getters.namespaces();
|
|
131
131
|
|
|
132
|
-
return Object.keys(map).filter(key => map[key]);
|
|
132
|
+
return Object.keys(map).filter((key) => map[key]);
|
|
133
133
|
} else {
|
|
134
134
|
const inStore = this.$store.getters['currentStore'](NAMESPACE);
|
|
135
135
|
|
|
@@ -139,9 +139,9 @@ export default {
|
|
|
139
139
|
|
|
140
140
|
sourceOptions() {
|
|
141
141
|
if (this.type === 'configMapKeyRef' || this.type === 'configMapRef') {
|
|
142
|
-
return this.allConfigMaps.filter(map => this.namespaces.includes(map?.metadata?.namespace));
|
|
142
|
+
return this.allConfigMaps.filter((map) => this.namespaces.includes(map?.metadata?.namespace));
|
|
143
143
|
} else if (this.type === 'secretRef' || this.type === 'secretKeyRef') {
|
|
144
|
-
return this.allSecrets.filter(secret => this.namespaces.includes(secret?.metadata?.namespace));
|
|
144
|
+
return this.allSecrets.filter((secret) => this.namespaces.includes(secret?.metadata?.namespace));
|
|
145
145
|
} else {
|
|
146
146
|
return [];
|
|
147
147
|
}
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
// show host port column if existing port data has any host ports defined
|
|
59
|
-
const showHostPorts = !!rows.some(row => !!row.hostPort);
|
|
59
|
+
const showHostPorts = !!rows.some((row) => !!row.hostPort);
|
|
60
60
|
|
|
61
61
|
return {
|
|
62
62
|
rows,
|
|
@@ -110,15 +110,15 @@ export default {
|
|
|
110
110
|
},
|
|
111
111
|
|
|
112
112
|
clusterIPServicePorts() {
|
|
113
|
-
return ((this.services.filter(svc => svc.spec.type === 'ClusterIP') || [])[0] || {})?.spec?.ports;
|
|
113
|
+
return ((this.services.filter((svc) => svc.spec.type === 'ClusterIP') || [])[0] || {})?.spec?.ports;
|
|
114
114
|
},
|
|
115
115
|
|
|
116
116
|
loadBalancerServicePorts() {
|
|
117
|
-
return ((this.services.filter(svc => svc.spec.type === 'LoadBalancer') || [])[0] || {})?.spec?.ports;
|
|
117
|
+
return ((this.services.filter((svc) => svc.spec.type === 'LoadBalancer') || [])[0] || {})?.spec?.ports;
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
nodePortServicePorts() {
|
|
121
|
-
return ((this.services.filter(svc => svc.spec.type === 'NodePort') || [])[0] || {})?.spec?.ports;
|
|
121
|
+
return ((this.services.filter((svc) => svc.spec.type === 'NodePort') || [])[0] || {})?.spec?.ports;
|
|
122
122
|
},
|
|
123
123
|
|
|
124
124
|
ipamOptions() {
|
|
@@ -132,11 +132,11 @@ export default {
|
|
|
132
132
|
},
|
|
133
133
|
|
|
134
134
|
ipamIndex() {
|
|
135
|
-
return this.rows.findIndex(row => row._serviceType === 'LoadBalancer' && row.protocol === 'TCP');
|
|
135
|
+
return this.rows.findIndex((row) => row._serviceType === 'LoadBalancer' && row.protocol === 'TCP');
|
|
136
136
|
},
|
|
137
137
|
|
|
138
138
|
serviceWithIpam() {
|
|
139
|
-
return this.services.find(s => s?.metadata?.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_IPAM]);
|
|
139
|
+
return this.services.find((s) => s?.metadata?.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_IPAM]);
|
|
140
140
|
},
|
|
141
141
|
|
|
142
142
|
showIpam() {
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
},
|
|
160
160
|
|
|
161
161
|
provisioningCluster() {
|
|
162
|
-
const out = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER).find(c => c?.status?.clusterName === this.currentCluster.metadata.name);
|
|
162
|
+
const out = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER).find((c) => c?.status?.clusterName === this.currentCluster.metadata.name);
|
|
163
163
|
|
|
164
164
|
return out;
|
|
165
165
|
},
|
|
@@ -389,6 +389,7 @@ export default {
|
|
|
389
389
|
:mode="mode"
|
|
390
390
|
:options="ipamOptions"
|
|
391
391
|
:label="t('servicesPage.harvester.ipam.label')"
|
|
392
|
+
:disabled="mode === 'edit'"
|
|
392
393
|
@input="queueUpdate"
|
|
393
394
|
/>
|
|
394
395
|
</div>
|
|
@@ -26,7 +26,7 @@ describe('component: Error', () => {
|
|
|
26
26
|
});
|
|
27
27
|
it('should properly pass the component value property to test function', () => {
|
|
28
28
|
const value = 'testValue';
|
|
29
|
-
const rules: Rule[] = [val => val];
|
|
29
|
+
const rules: Rule[] = [(val) => val];
|
|
30
30
|
|
|
31
31
|
const wrapper = mount(Error, { propsData: { value, rules } });
|
|
32
32
|
const element = wrapper.find('[data-testid="error-span"]');
|
|
@@ -32,4 +32,25 @@ describe('component: KeyValue', () => {
|
|
|
32
32
|
expect(inputFieldTextArea).toBeUndefined();
|
|
33
33
|
expect(inputFieldMultiline).toBeDefined();
|
|
34
34
|
});
|
|
35
|
+
|
|
36
|
+
it('should have new lines in textarea', async() => {
|
|
37
|
+
const wrapper = mount(KeyValue, {
|
|
38
|
+
propsData: {
|
|
39
|
+
value: { foo: 'bar' },
|
|
40
|
+
valueMarkdownMultiline: false,
|
|
41
|
+
},
|
|
42
|
+
mocks: { $store: { getters: { 'i18n/t': jest.fn() } } },
|
|
43
|
+
directives: { t }
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const inputFieldTextArea = wrapper.find('[data-testid="text-area-auto-grow"]');
|
|
47
|
+
|
|
48
|
+
inputFieldTextArea.setValue('bar\n');
|
|
49
|
+
|
|
50
|
+
await inputFieldTextArea.trigger('keydown.enter');
|
|
51
|
+
|
|
52
|
+
const textArea = inputFieldTextArea.element as HTMLTextAreaElement;
|
|
53
|
+
|
|
54
|
+
expect(textArea.value).toBe('bar\n');
|
|
55
|
+
});
|
|
35
56
|
});
|
|
@@ -27,7 +27,7 @@ export default {
|
|
|
27
27
|
|
|
28
28
|
statusErrorConditions() {
|
|
29
29
|
if (this.row.hasError) {
|
|
30
|
-
return this.row?.status.conditions.filter(condition => condition.error === true);
|
|
30
|
+
return this.row?.status.conditions.filter((condition) => condition.error === true);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return false;
|
|
@@ -14,14 +14,25 @@ export default {
|
|
|
14
14
|
// This is the workaround.
|
|
15
15
|
isImported: props.row.mgmt?.providerForEmberParam === 'import'
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
18
|
};
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
22
|
<div>
|
|
23
23
|
<template v-if="row.machineProvider">
|
|
24
|
-
|
|
24
|
+
<span v-if="row.isHarvester && row.mgmt && row.mgmt.isReady && !row.hasError">
|
|
25
|
+
<a
|
|
26
|
+
v-if="row.mgmt.isReady && !row.hasError"
|
|
27
|
+
role="button"
|
|
28
|
+
@click="row.goToHarvesterCluster()"
|
|
29
|
+
>
|
|
30
|
+
{{ row.machineProviderDisplay }}
|
|
31
|
+
</a>
|
|
32
|
+
</span>
|
|
33
|
+
<span v-else>
|
|
34
|
+
{{ row.machineProviderDisplay }}
|
|
35
|
+
</span>
|
|
25
36
|
</template>
|
|
26
37
|
<template v-else-if="row.isCustom">
|
|
27
38
|
{{ t('cluster.provider.custom') }}
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
// value may be JSON from "field.cattle.io/publicEndpoints" label
|
|
25
25
|
parsed() {
|
|
26
26
|
const nodes = this.nodes;
|
|
27
|
-
const nodeWithExternal = nodes.find(node => !!node.externalIp) || {};
|
|
27
|
+
const nodeWithExternal = nodes.find((node) => !!node.externalIp) || {};
|
|
28
28
|
const externalIp = nodeWithExternal.externalIp;
|
|
29
29
|
|
|
30
30
|
if ( this.value && this.value.length ) {
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
stateParts() {
|
|
27
|
-
const keys = Object.keys(this.summary).filter(x => !x.startsWith('desired'));
|
|
27
|
+
const keys = Object.keys(this.summary).filter((x) => !x.startsWith('desired'));
|
|
28
28
|
|
|
29
29
|
const out = keys.map((key) => {
|
|
30
30
|
const textColor = colorForState(key);
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
value: this.summary[key],
|
|
37
37
|
sort: stateSort(textColor, key),
|
|
38
38
|
};
|
|
39
|
-
}).filter(x => x.value > 0);
|
|
39
|
+
}).filter((x) => x.value > 0);
|
|
40
40
|
|
|
41
41
|
return sortBy(out, 'sort:desc');
|
|
42
42
|
},
|
|
@@ -18,12 +18,12 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
async fetch() {
|
|
21
|
-
await Promise.all(Object.values(WORKLOAD_TYPES).map(type => this.$store.dispatch('cluster/findAll', { type })));
|
|
21
|
+
await Promise.all(Object.values(WORKLOAD_TYPES).map((type) => this.$store.dispatch('cluster/findAll', { type })));
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
computed: {
|
|
25
25
|
workloads() {
|
|
26
|
-
return Object.values(WORKLOAD_TYPES).flatMap(type => this.$store.getters['cluster/all'](type));
|
|
26
|
+
return Object.values(WORKLOAD_TYPES).flatMap((type) => this.$store.getters['cluster/all'](type));
|
|
27
27
|
},
|
|
28
28
|
paths() {
|
|
29
29
|
return this.row.createRulesForListPage(this.workloads);
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
},
|
|
46
46
|
mainImage() {
|
|
47
47
|
const images = this.images;
|
|
48
|
-
const filter = images.filter(image => !IGNORE_IMAGES.find(i => image.includes(i)));
|
|
48
|
+
const filter = images.filter((image) => !IGNORE_IMAGES.find((i) => image.includes(i)));
|
|
49
49
|
|
|
50
50
|
return filter.length > 0 ? filter[0] : images[0];
|
|
51
51
|
}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
|
|
17
17
|
return globalRoleBindings
|
|
18
18
|
// Bindings for this group
|
|
19
|
-
.filter(globalRoleBinding => globalRoleBinding.groupPrincipalName === principal.id)
|
|
19
|
+
.filter((globalRoleBinding) => globalRoleBinding.groupPrincipalName === principal.id)
|
|
20
20
|
// Display name of role associated with binding
|
|
21
21
|
.map((binding) => {
|
|
22
22
|
const role = this.$store.getters['management/byId'](MANAGEMENT.GLOBAL_ROLE, binding.globalRoleName);
|
|
@@ -59,14 +59,14 @@ export default {
|
|
|
59
59
|
}, {});
|
|
60
60
|
|
|
61
61
|
// if there are keys other than those defined in RECEIVERS_TYPES and 'name', assume they're custom types and sum them under "custom"
|
|
62
|
-
const expectedKeys = RECEIVERS_TYPES.map(type => type.key).filter(key => key !== 'custom');
|
|
62
|
+
const expectedKeys = RECEIVERS_TYPES.map((type) => type.key).filter((key) => key !== 'custom');
|
|
63
63
|
|
|
64
64
|
expectedKeys.push('name');
|
|
65
65
|
const customKeys = Object.keys(receiver)
|
|
66
|
-
.filter(key => !expectedKeys.includes(key));
|
|
66
|
+
.filter((key) => !expectedKeys.includes(key));
|
|
67
67
|
|
|
68
68
|
if (customKeys.length > 0) {
|
|
69
|
-
const customType = RECEIVERS_TYPES.find(type => type.name === 'custom');
|
|
69
|
+
const customType = RECEIVERS_TYPES.find((type) => type.name === 'custom');
|
|
70
70
|
const customLabel = this.t(customType.label);
|
|
71
71
|
|
|
72
72
|
types[customLabel] = { count: customKeys.length, logo: customType.logo };
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
cloned = 'headless';
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const match = DEFAULT_SERVICE_TYPES.find(s => s.id.toLowerCase() === cloned);
|
|
27
|
+
const match = DEFAULT_SERVICE_TYPES.find((s) => s.id.toLowerCase() === cloned);
|
|
28
28
|
const translationLabel = match?.label;
|
|
29
29
|
let translated;
|
|
30
30
|
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
// value may be JSON from "field.cattle.io/publicEndpoints" label
|
|
20
20
|
parsed() {
|
|
21
21
|
const nodes = this.nodes;
|
|
22
|
-
const nodeWithExternal = nodes.find(node => !!node.externalIp) || {};
|
|
22
|
+
const nodeWithExternal = nodes.find((node) => !!node.externalIp) || {};
|
|
23
23
|
const externalIp = nodeWithExternal.externalIp;
|
|
24
24
|
|
|
25
25
|
if ( this.value && this.value.length ) {
|
|
@@ -52,7 +52,7 @@ describe('component: LiveDate', () => {
|
|
|
52
52
|
let element = wrapper.find('span');
|
|
53
53
|
|
|
54
54
|
expect(element.text()).toContain('Just now');
|
|
55
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
55
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
56
56
|
await wrapper.vm.liveUpdate(Date.now());
|
|
57
57
|
|
|
58
58
|
element = wrapper.find('span');
|
package/components/graph/Bar.vue
CHANGED
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
return { backgroundColor: `var(${ this.secondaryColor })` };
|
|
30
30
|
},
|
|
31
31
|
sliceStyles() {
|
|
32
|
-
return this.slices.map(slice => ({
|
|
32
|
+
return this.slices.map((slice) => ({
|
|
33
33
|
left: `${ slice }%`,
|
|
34
34
|
visibility: slice < this.percentage ? 'visible' : 'hidden'
|
|
35
35
|
}));
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
},
|
|
39
39
|
// get size of largest data set to scale x-axis
|
|
40
40
|
largestSetSize() {
|
|
41
|
-
return this.dataSets.map(set => set.points.length).reduce((a, b) => Math.max(a, b));
|
|
41
|
+
return this.dataSets.map((set) => set.points.length).reduce((a, b) => Math.max(a, b));
|
|
42
42
|
},
|
|
43
43
|
lines() {
|
|
44
44
|
const vm = this;
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
const path = d3.line()
|
|
53
53
|
.x((d, i) => vm.scaleX(range, i))
|
|
54
|
-
.y(d => vm.scaleY(domain, d));
|
|
54
|
+
.y((d) => vm.scaleY(domain, d));
|
|
55
55
|
|
|
56
56
|
paths.push(path(dataSet));
|
|
57
57
|
}
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
const group = d3.selectAll(`.lines--${ i }`).selectAll('*').nodes();
|
|
69
69
|
|
|
70
70
|
if (group) {
|
|
71
|
-
group.forEach(element => vm.animateLine(element));
|
|
71
|
+
group.forEach((element) => vm.animateLine(element));
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
},
|
package/components/nav/Group.vue
CHANGED
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
|
|
109
109
|
// If there is a default type, use it
|
|
110
110
|
if (this.group.defaultType) {
|
|
111
|
-
const found = items.findIndex(i => i.name === this.group.defaultType);
|
|
111
|
+
const found = items.findIndex((i) => i.name === this.group.defaultType);
|
|
112
112
|
|
|
113
113
|
index = (found === -1) ? 0 : found;
|
|
114
114
|
}
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
146
146
|
return true;
|
|
147
147
|
} else if (item.route) {
|
|
148
148
|
const navLevels = ['cluster', 'product', 'resource'];
|
|
149
|
-
const matchesNavLevel = navLevels.filter(param => !this.$route.params[param] || this.$route.params[param] !== item.route.params[param]).length === 0;
|
|
149
|
+
const matchesNavLevel = navLevels.filter((param) => !this.$route.params[param] || this.$route.params[param] !== item.route.params[param]).length === 0;
|
|
150
150
|
const withoutHash = this.$route.hash ? this.$route.fullPath.slice(0, this.$route.fullPath.indexOf(this.$route.hash)) : this.$route.fullPath;
|
|
151
151
|
const withoutQuery = withoutHash.split('?')[0];
|
|
152
152
|
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
|
|
62
62
|
computed: {
|
|
63
63
|
...mapGetters(['clusterReady', 'isExplorer', 'isMultiCluster', 'isRancher', 'currentCluster',
|
|
64
|
-
'currentProduct', 'backToRancherLink', 'backToRancherGlobalLink', 'pageActions', 'isSingleProduct']),
|
|
64
|
+
'currentProduct', 'backToRancherLink', 'backToRancherGlobalLink', 'pageActions', 'isSingleProduct', 'isRancherInHarvester']),
|
|
65
65
|
...mapGetters('type-map', ['activeProducts']),
|
|
66
66
|
|
|
67
67
|
appName() {
|
|
@@ -292,7 +292,7 @@ export default {
|
|
|
292
292
|
// Make sure we wait at least 1 second so that the user can see the visual indication that the config has been copied
|
|
293
293
|
allHash({
|
|
294
294
|
copy: this.currentCluster.copyKubeConfig(),
|
|
295
|
-
minDelay: new Promise(resolve => setTimeout(resolve, 1000))
|
|
295
|
+
minDelay: new Promise((resolve) => setTimeout(resolve, 1000))
|
|
296
296
|
}).finally(() => {
|
|
297
297
|
this.kubeConfigCopying = false;
|
|
298
298
|
|
|
@@ -337,14 +337,14 @@ export default {
|
|
|
337
337
|
ref="header"
|
|
338
338
|
>
|
|
339
339
|
<div>
|
|
340
|
-
<TopLevelMenu v-if="isMultiCluster || !isSingleProduct" />
|
|
340
|
+
<TopLevelMenu v-if="isRancherInHarvester || isMultiCluster || !isSingleProduct" />
|
|
341
341
|
</div>
|
|
342
342
|
<div
|
|
343
343
|
class="menu-spacer"
|
|
344
344
|
:class="{'isSingleProduct': isSingleProduct }"
|
|
345
345
|
>
|
|
346
346
|
<n-link
|
|
347
|
-
v-if="isSingleProduct"
|
|
347
|
+
v-if="isSingleProduct && !isRancherInHarvester"
|
|
348
348
|
:to="singleProductLogoRoute"
|
|
349
349
|
>
|
|
350
350
|
<img
|
|
@@ -364,7 +364,7 @@ export default {
|
|
|
364
364
|
class="cluster cluster-clipped"
|
|
365
365
|
>
|
|
366
366
|
<div
|
|
367
|
-
v-if="isSingleProduct"
|
|
367
|
+
v-if="isSingleProduct && !isRancherInHarvester"
|
|
368
368
|
class="product-name"
|
|
369
369
|
>
|
|
370
370
|
{{ t(isSingleProduct.productNameKey) }}
|
|
@@ -61,11 +61,11 @@ export default {
|
|
|
61
61
|
if (this.namespaceFilterMode?.length) {
|
|
62
62
|
// We always show dividers, projects and namespaces
|
|
63
63
|
if (!forcedNamespaceValidTypes.includes(item.kind)) {
|
|
64
|
-
const validCustomType = this.namespaceFilterMode.find(prefix => item.kind.startsWith(prefix));
|
|
64
|
+
const validCustomType = this.namespaceFilterMode.find((prefix) => item.kind.startsWith(prefix));
|
|
65
65
|
|
|
66
66
|
if (!validCustomType) {
|
|
67
67
|
// Hide any invalid option that's not selected
|
|
68
|
-
return this.value.findIndex(v => v.id === item.id) >= 0;
|
|
68
|
+
return this.value.findIndex((v) => v.id === item.id) >= 0;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
96
96
|
// Are we in restricted resource type mode, if so is this an allowed type?
|
|
97
97
|
if (this.namespaceFilterMode?.length) {
|
|
98
98
|
const isLastSelected = i.selected && (i.id === ALL || this.value.length === 1);
|
|
99
|
-
const kindAllowed = this.namespaceFilterMode.find(f => f === i.kind);
|
|
99
|
+
const kindAllowed = this.namespaceFilterMode.find((f) => f === i.kind);
|
|
100
100
|
const isNotInProjectGroup = i.id === ALL_ORPHANS;
|
|
101
101
|
|
|
102
102
|
i.enabled = (!isLastSelected && kindAllowed) && !isNotInProjectGroup;
|
|
@@ -327,7 +327,7 @@ export default {
|
|
|
327
327
|
.map((value) => {
|
|
328
328
|
return findBy(options, 'id', value);
|
|
329
329
|
})
|
|
330
|
-
.filter(x => !!x);
|
|
330
|
+
.filter((x) => !!x);
|
|
331
331
|
|
|
332
332
|
return filters;
|
|
333
333
|
},
|
|
@@ -335,22 +335,22 @@ export default {
|
|
|
335
335
|
set(neu) {
|
|
336
336
|
const old = (this.value || []).slice();
|
|
337
337
|
|
|
338
|
-
neu = neu.filter(x => !!x.id);
|
|
338
|
+
neu = neu.filter((x) => !!x.id);
|
|
339
339
|
|
|
340
340
|
const last = neu[neu.length - 1];
|
|
341
341
|
const lastIsSpecial = last?.kind === NAMESPACE_FILTER_KINDS.SPECIAL;
|
|
342
|
-
const hadUser = !!old.find(x => x.id === ALL_USER);
|
|
343
|
-
const hadAll = !!old.find(x => x.id === ALL);
|
|
342
|
+
const hadUser = !!old.find((x) => x.id === ALL_USER);
|
|
343
|
+
const hadAll = !!old.find((x) => x.id === ALL);
|
|
344
344
|
|
|
345
345
|
if (lastIsSpecial) {
|
|
346
346
|
neu = [last];
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
if (neu.length > 1) {
|
|
350
|
-
neu = neu.filter(x => x.kind !== NAMESPACE_FILTER_KINDS.SPECIAL);
|
|
350
|
+
neu = neu.filter((x) => x.kind !== NAMESPACE_FILTER_KINDS.SPECIAL);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
if (neu.find(x => x.id === 'all')) {
|
|
353
|
+
if (neu.find((x) => x.id === 'all')) {
|
|
354
354
|
neu = [];
|
|
355
355
|
}
|
|
356
356
|
|
|
@@ -361,7 +361,7 @@ export default {
|
|
|
361
361
|
if (neu.length === 0 && !hadUser && !hadAll) {
|
|
362
362
|
ids = this.defaultOption();
|
|
363
363
|
} else {
|
|
364
|
-
ids = neu.map(x => x.id);
|
|
364
|
+
ids = neu.map((x) => x.id);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
this.$nextTick(() => {
|
|
@@ -522,7 +522,7 @@ export default {
|
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
524
|
mouseOver(event) {
|
|
525
|
-
const el = event?.path?.find(e => e.classList.contains('ns-option'));
|
|
525
|
+
const el = event?.path?.find((e) => e.classList.contains('ns-option'));
|
|
526
526
|
|
|
527
527
|
this.activeElement = el;
|
|
528
528
|
},
|
|
@@ -615,15 +615,15 @@ export default {
|
|
|
615
615
|
// Remove invalid
|
|
616
616
|
if (!!this.namespaceFilterMode?.length) {
|
|
617
617
|
this.value.forEach((v) => {
|
|
618
|
-
if (!this.namespaceFilterMode.find(f => f === v.kind)) {
|
|
619
|
-
const index = current.findIndex(c => c.id === v.id);
|
|
618
|
+
if (!this.namespaceFilterMode.find((f) => f === v.kind)) {
|
|
619
|
+
const index = current.findIndex((c) => c.id === v.id);
|
|
620
620
|
|
|
621
621
|
current.splice(index, 1);
|
|
622
622
|
}
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
const exists = current.findIndex(v => v.id === option.id);
|
|
626
|
+
const exists = current.findIndex((v) => v.id === option.id);
|
|
627
627
|
|
|
628
628
|
// Remove if it exists (or always add if in singleton mode - we've reset the list above)
|
|
629
629
|
if (exists !== -1) {
|