@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
|
@@ -225,7 +225,7 @@ export default {
|
|
|
225
225
|
|
|
226
226
|
// If only one namespace is selected, hide the namespace column
|
|
227
227
|
if ( !showNamespace ) {
|
|
228
|
-
const idx = headers.findIndex(header => header.name === NAMESPACE.name);
|
|
228
|
+
const idx = headers.findIndex((header) => header.name === NAMESPACE.name);
|
|
229
229
|
|
|
230
230
|
if ( idx >= 0 ) {
|
|
231
231
|
headers.splice(idx, 1);
|
|
@@ -236,7 +236,7 @@ export default {
|
|
|
236
236
|
const custom = this.listGroupMapped[this.group];
|
|
237
237
|
|
|
238
238
|
if (custom?.hideColumn) {
|
|
239
|
-
const idx = headers.findIndex(header => header.name === custom.hideColumn);
|
|
239
|
+
const idx = headers.findIndex((header) => header.name === custom.hideColumn);
|
|
240
240
|
|
|
241
241
|
if ( idx >= 0 ) {
|
|
242
242
|
headers.splice(idx, 1);
|
|
@@ -291,7 +291,7 @@ export default {
|
|
|
291
291
|
group: {
|
|
292
292
|
get() {
|
|
293
293
|
// Check group is valid
|
|
294
|
-
const exists = this.groupOptions.find(g => g.value === this._group);
|
|
294
|
+
const exists = this.groupOptions.find((g) => g.value === this._group);
|
|
295
295
|
|
|
296
296
|
if (!exists) {
|
|
297
297
|
return DEFAULT_GROUP;
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
try {
|
|
167
167
|
const parsed = jsyaml.load(this.currentYaml);
|
|
168
168
|
const annotations = Object.keys(parsed?.metadata?.annotations || {});
|
|
169
|
-
const regexes = ANNOTATIONS_TO_FOLD.map(x => ensureRegex(x));
|
|
169
|
+
const regexes = ANNOTATIONS_TO_FOLD.map((x) => ensureRegex(x));
|
|
170
170
|
|
|
171
171
|
let foldAnnotations = false;
|
|
172
172
|
|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
179
179
|
},
|
|
180
180
|
|
|
181
181
|
existingBindings() {
|
|
182
|
-
const roles = this.roles.map(x => x.name);
|
|
182
|
+
const roles = this.roles.map((x) => x.name);
|
|
183
183
|
|
|
184
184
|
const out = this.allBindings.filter((binding) => {
|
|
185
185
|
if ( binding.roleRef.kind !== this.roleScope || !binding.roleRef?.name) {
|
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
},
|
|
198
198
|
|
|
199
199
|
unremovedRows() {
|
|
200
|
-
return this.rows.filter(x => x.remove !== true);
|
|
200
|
+
return this.rows.filter((x) => x.remove !== true);
|
|
201
201
|
},
|
|
202
202
|
},
|
|
203
203
|
|
package/components/SimpleBox.vue
CHANGED
|
@@ -37,7 +37,7 @@ export default {
|
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
accessibleResources() {
|
|
40
|
-
return RESOURCES.filter(resource => this.$store.getters['cluster/schemaFor'](resource));
|
|
40
|
+
return RESOURCES.filter((resource) => this.$store.getters['cluster/schemaFor'](resource));
|
|
41
41
|
},
|
|
42
42
|
|
|
43
43
|
totalCountGaugeInput() {
|
|
@@ -38,11 +38,11 @@ export default {
|
|
|
38
38
|
|
|
39
39
|
computed: {
|
|
40
40
|
availableActions() {
|
|
41
|
-
return this.bulkActionsForSelection.filter(act => !act.external);
|
|
41
|
+
return this.bulkActionsForSelection.filter((act) => !act.external);
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
keyedAvailableActions() {
|
|
45
|
-
return this.availableActions.map(aa => aa.action);
|
|
45
|
+
return this.availableActions.map((aa) => aa.action);
|
|
46
46
|
},
|
|
47
47
|
|
|
48
48
|
selectedRowsText() {
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
// Collate the actions in an array and hide in the normal row
|
|
140
140
|
const id = ba.attributes.getNamedItem('id').value;
|
|
141
141
|
|
|
142
|
-
this.hiddenActions.push(this.availableActions.find(aa => aa.action === id));
|
|
142
|
+
this.hiddenActions.push(this.availableActions.find((aa) => aa.action === id));
|
|
143
143
|
ba.style.display = 'none';
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -83,7 +83,7 @@ export default {
|
|
|
83
83
|
|
|
84
84
|
computed: {
|
|
85
85
|
advFilterSelectOptions() {
|
|
86
|
-
return this.columnOptions.filter(c => c.isFilter && !c.preventFiltering);
|
|
86
|
+
return this.columnOptions.filter((c) => c.isFilter && !c.preventFiltering);
|
|
87
87
|
},
|
|
88
88
|
|
|
89
89
|
advGroupOptions() {
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
|
|
103
103
|
this.columnOptions.forEach((advCol) => {
|
|
104
104
|
if (advCol.isTableOption) {
|
|
105
|
-
const index = allCols.findIndex(col => col.name === advCol.name);
|
|
105
|
+
const index = allCols.findIndex((col) => col.name === advCol.name);
|
|
106
106
|
|
|
107
107
|
if (index !== -1) {
|
|
108
108
|
allCols[index].isColVisible = advCol.isColVisible;
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
const headerProps = [];
|
|
123
123
|
|
|
124
124
|
// Filter out any columns that are too heavy to show for large page sizes
|
|
125
|
-
const filteredHeaders = this.headers.slice().filter(c => (!c.maxPageSize || (c.maxPageSize && c.maxPageSize >= this.perPage)));
|
|
125
|
+
const filteredHeaders = this.headers.slice().filter((c) => (!c.maxPageSize || (c.maxPageSize && c.maxPageSize >= this.perPage)));
|
|
126
126
|
|
|
127
127
|
// add table cols from config (headers)
|
|
128
128
|
filteredHeaders.forEach((prop) => {
|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
152
152
|
|
|
153
153
|
// maintain current visibility of cols if they exist already
|
|
154
154
|
if (this.columnOptions?.length) {
|
|
155
|
-
const opt = this.columnOptions.find(colOpt => colOpt.name === name && colOpt.label === label);
|
|
155
|
+
const opt = this.columnOptions.find((colOpt) => colOpt.name === name && colOpt.label === label);
|
|
156
156
|
|
|
157
157
|
if (opt) {
|
|
158
158
|
isColVisible = opt.isColVisible;
|
|
@@ -188,14 +188,14 @@ export default {
|
|
|
188
188
|
|
|
189
189
|
// maintain current visibility of cols if they exist already
|
|
190
190
|
if (this.columnOptions?.length) {
|
|
191
|
-
const opt = this.columnOptions.find(colOpt => colOpt.name === label && colOpt.label === label);
|
|
191
|
+
const opt = this.columnOptions.find((colOpt) => colOpt.name === label && colOpt.label === label);
|
|
192
192
|
|
|
193
193
|
if (opt) {
|
|
194
194
|
res.isColVisible = opt.isColVisible;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
if (!rowLabels.filter(row => row.label === label).length) {
|
|
198
|
+
if (!rowLabels.filter((row) => row.label === label).length) {
|
|
199
199
|
rowLabels.push(res);
|
|
200
200
|
}
|
|
201
201
|
});
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
|
|
263
263
|
// cols visibility
|
|
264
264
|
changeColVisibility(colData) {
|
|
265
|
-
const index = this.columnOptions.findIndex(col => col.label === colData.label);
|
|
265
|
+
const index = this.columnOptions.findIndex((col) => col.label === colData.label);
|
|
266
266
|
|
|
267
267
|
if (index !== -1) {
|
|
268
268
|
this.columnOptions[index].isColVisible = colData.value;
|
|
@@ -487,10 +487,10 @@ export default {
|
|
|
487
487
|
|
|
488
488
|
columns() {
|
|
489
489
|
// Filter out any columns that are too heavy to show for large page sizes
|
|
490
|
-
const out = this.headers.slice().filter(c => !c.maxPageSize || (c.maxPageSize && c.maxPageSize >= this.perPage));
|
|
490
|
+
const out = this.headers.slice().filter((c) => !c.maxPageSize || (c.maxPageSize && c.maxPageSize >= this.perPage));
|
|
491
491
|
|
|
492
492
|
if ( this.groupBy ) {
|
|
493
|
-
const entry = out.find(x => x.name === this.groupBy);
|
|
493
|
+
const entry = out.find((x) => x.name === this.groupBy);
|
|
494
494
|
|
|
495
495
|
if ( entry ) {
|
|
496
496
|
removeObject(out, entry);
|
|
@@ -498,10 +498,10 @@ export default {
|
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
// If all columns have a width, try to remove it from a column that can be variable (name)
|
|
501
|
-
const missingWidth = out.find(x => !x.width);
|
|
501
|
+
const missingWidth = out.find((x) => !x.width);
|
|
502
502
|
|
|
503
503
|
if ( !missingWidth ) {
|
|
504
|
-
const variable = out.find(x => x.canBeVariable);
|
|
504
|
+
const variable = out.find((x) => x.canBeVariable);
|
|
505
505
|
|
|
506
506
|
if ( variable ) {
|
|
507
507
|
const neu = clone(variable);
|
|
@@ -547,13 +547,13 @@ export default {
|
|
|
547
547
|
|
|
548
548
|
// Do we have any live columns?
|
|
549
549
|
hasLiveColumns() {
|
|
550
|
-
const liveColumns = this.columns.find(c => c.formatter?.startsWith('Live') || c.liveUpdates);
|
|
550
|
+
const liveColumns = this.columns.find((c) => c.formatter?.startsWith('Live') || c.liveUpdates);
|
|
551
551
|
|
|
552
552
|
return !!liveColumns;
|
|
553
553
|
},
|
|
554
554
|
|
|
555
555
|
hasDelayedColumns() {
|
|
556
|
-
const delaeydColumns = this.columns.find(c => c.delayLoading);
|
|
556
|
+
const delaeydColumns = this.columns.find((c) => c.delayLoading);
|
|
557
557
|
|
|
558
558
|
return !!delaeydColumns;
|
|
559
559
|
},
|
|
@@ -683,7 +683,7 @@ export default {
|
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
const delayedColumns = this.$refs.column.filter(c => c.startDelayedLoading && !c.__delayedLoading);
|
|
686
|
+
const delayedColumns = this.$refs.column.filter((c) => c.startDelayedLoading && !c.__delayedLoading);
|
|
687
687
|
// We add 100 pixels here - so we will render the delayed columns for a few extra rows below what is visible
|
|
688
688
|
// This way if you scroll slowly, you won't see the columns being loaded
|
|
689
689
|
const clientHeight = (window.innerHeight || document.documentElement.clientHeight) + 100;
|
|
@@ -718,7 +718,7 @@ export default {
|
|
|
718
718
|
}
|
|
719
719
|
|
|
720
720
|
const clientHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
721
|
-
const liveColumns = this.$refs.column.filter(c => !!c.liveUpdate);
|
|
721
|
+
const liveColumns = this.$refs.column.filter((c) => !!c.liveUpdate);
|
|
722
722
|
const now = day();
|
|
723
723
|
let next = Number.MAX_SAFE_INTEGER;
|
|
724
724
|
|
|
@@ -805,7 +805,7 @@ export default {
|
|
|
805
805
|
return false;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
-
const matchingResourceAction = resource.availableActions.find(a => a.action === this.actionOfInterest.action);
|
|
808
|
+
const matchingResourceAction = resource.availableActions.find((a) => a.action === this.actionOfInterest.action);
|
|
809
809
|
|
|
810
810
|
return matchingResourceAction?.enabled;
|
|
811
811
|
},
|
|
@@ -903,7 +903,10 @@ export default {
|
|
|
903
903
|
</script>
|
|
904
904
|
|
|
905
905
|
<template>
|
|
906
|
-
<div
|
|
906
|
+
<div
|
|
907
|
+
ref="container"
|
|
908
|
+
data-testid="cluster-list-container"
|
|
909
|
+
>
|
|
907
910
|
<div
|
|
908
911
|
:class="{'titled': $slots.title && $slots.title.length}"
|
|
909
912
|
class="sortable-table-header"
|
|
@@ -1001,6 +1004,7 @@ export default {
|
|
|
1001
1004
|
<div
|
|
1002
1005
|
v-if="search || hasAdvancedFiltering || isTooManyItemsToAutoUpdate || ($slots['header-right'] && $slots['header-right'].length)"
|
|
1003
1006
|
class="search row"
|
|
1007
|
+
data-testid="search-box-filter-row"
|
|
1004
1008
|
>
|
|
1005
1009
|
<ul
|
|
1006
1010
|
v-if="hasAdvancedFiltering"
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
const actionEnabledForSomeSelected = this.selectedRows.some((node) => {
|
|
100
100
|
const availableActions = node.availableActions || [];
|
|
101
101
|
|
|
102
|
-
return availableActions.some(action => action.action === bulkAction.action && action.enabled);
|
|
102
|
+
return availableActions.some((action) => action.action === bulkAction.action && action.enabled);
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
bulkAction.enabled = this.selectedRows.length > 0 && actionEnabledForSomeSelected;
|
|
@@ -218,7 +218,7 @@ export default {
|
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
const node = this.pagedRows.find( x => get(x, this.keyField) === nodeId );
|
|
221
|
+
const node = this.pagedRows.find( (x) => get(x, this.keyField) === nodeId );
|
|
222
222
|
|
|
223
223
|
return node;
|
|
224
224
|
},
|
|
@@ -401,7 +401,7 @@ export default {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
// check if there is already duplicate content selected (selectedRows) on the list to toggle...
|
|
404
|
-
toToggle = toToggle.filter(item => !this.selectedRows.includes(item));
|
|
404
|
+
toToggle = toToggle.filter((item) => !this.selectedRows.includes(item));
|
|
405
405
|
|
|
406
406
|
return toToggle;
|
|
407
407
|
},
|
|
@@ -440,7 +440,7 @@ export default {
|
|
|
440
440
|
|
|
441
441
|
update(toAdd, toRemove) {
|
|
442
442
|
toRemove.forEach((row) => {
|
|
443
|
-
const index = this.selectedRows.findIndex(r => r === row);
|
|
443
|
+
const index = this.selectedRows.findIndex((r) => r === row);
|
|
444
444
|
|
|
445
445
|
if (index !== -1) {
|
|
446
446
|
this.selectedRows.splice(index, 1);
|
|
@@ -516,7 +516,7 @@ export default {
|
|
|
516
516
|
|
|
517
517
|
// Go through the table selection and filter out those actions that can't run the chosen action
|
|
518
518
|
const executableSelection = this.selectedRows.filter((row) => {
|
|
519
|
-
const matchingResourceAction = row.availableActions.find(a => a.action === action.action);
|
|
519
|
+
const matchingResourceAction = row.availableActions.find((a) => a.action === action.action);
|
|
520
520
|
|
|
521
521
|
return matchingResourceAction?.enabled;
|
|
522
522
|
});
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
let fromGroup = ( this.groupBy ? this.groupSort || this.groupBy : null) || [];
|
|
8
8
|
let fromColumn = [];
|
|
9
9
|
|
|
10
|
-
const column = (this.columns || this.headers).find(x => x && x.name && x.name.toLowerCase() === this.sortBy.toLowerCase());
|
|
10
|
+
const column = (this.columns || this.headers).find((x) => x && x.name && x.name.toLowerCase() === this.sortBy.toLowerCase());
|
|
11
11
|
|
|
12
12
|
if ( this.sortBy && column && column.sort ) {
|
|
13
13
|
fromColumn = column.sort;
|
|
@@ -58,8 +58,8 @@ export default {
|
|
|
58
58
|
|
|
59
59
|
// Try to find a reasonable default sort
|
|
60
60
|
if ( !this._defaultSortBy ) {
|
|
61
|
-
const markedColumn = this.headers.find(x => !!x.defaultSort);
|
|
62
|
-
const nameColumn = this.headers.find( x => x.name === 'name');
|
|
61
|
+
const markedColumn = this.headers.find((x) => !!x.defaultSort);
|
|
62
|
+
const nameColumn = this.headers.find( (x) => x.name === 'name');
|
|
63
63
|
|
|
64
64
|
if ( markedColumn ) {
|
|
65
65
|
this._defaultSortBy = markedColumn.name;
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
this._defaultSortBy = nameColumn.name;
|
|
69
69
|
} else {
|
|
70
70
|
// The first column that isn't state
|
|
71
|
-
const first = this.headers.filter( x => x.name !== 'state' )[0];
|
|
71
|
+
const first = this.headers.filter( (x) => x.name !== 'state' )[0];
|
|
72
72
|
|
|
73
73
|
if ( first ) {
|
|
74
74
|
this._defaultSortBy = first.name;
|
|
@@ -80,7 +80,7 @@ export default {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// If the sort column doesn't exist or isn't specified, use default
|
|
83
|
-
if ( !sortBy || !this.headers.find(x => x.name === sortBy ) ) {
|
|
83
|
+
if ( !sortBy || !this.headers.find((x) => x.name === sortBy ) ) {
|
|
84
84
|
sortBy = this._defaultSortBy;
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -94,17 +94,17 @@ export default {
|
|
|
94
94
|
defaultTab,
|
|
95
95
|
useHash
|
|
96
96
|
} = this;
|
|
97
|
-
const activeTab = tabs.find(t => t.active);
|
|
97
|
+
const activeTab = tabs.find((t) => t.active);
|
|
98
98
|
|
|
99
99
|
const hash = useHash ? this.$route.hash : undefined;
|
|
100
100
|
const windowHash = useHash ? hash.slice(1) : undefined;
|
|
101
|
-
const windowHashTabMatch = tabs.find(t => t.name === windowHash && !t.active);
|
|
101
|
+
const windowHashTabMatch = tabs.find((t) => t.name === windowHash && !t.active);
|
|
102
102
|
const firstTab = head(tabs) || null;
|
|
103
103
|
|
|
104
104
|
if (isEmpty(activeTab)) {
|
|
105
105
|
if (useHash && !isEmpty(windowHashTabMatch)) {
|
|
106
106
|
this.select(windowHashTabMatch.name);
|
|
107
|
-
} else if (!isEmpty(defaultTab) && !isEmpty(tabs.find(t => t.name === defaultTab))) {
|
|
107
|
+
} else if (!isEmpty(defaultTab) && !isEmpty(tabs.find((t) => t.name === defaultTab))) {
|
|
108
108
|
this.select(defaultTab);
|
|
109
109
|
} else if (firstTab?.name) {
|
|
110
110
|
this.select(firstTab.name);
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
find(name) {
|
|
147
|
-
return this.sortedTabs.find(x => x.name === name );
|
|
147
|
+
return this.sortedTabs.find((x) => x.name === name );
|
|
148
148
|
},
|
|
149
149
|
|
|
150
150
|
select(name/* , event */) {
|
|
@@ -184,7 +184,7 @@ export default {
|
|
|
184
184
|
|
|
185
185
|
selectNext(direction) {
|
|
186
186
|
const { sortedTabs } = this;
|
|
187
|
-
const currentIdx = sortedTabs.findIndex(x => x.active);
|
|
187
|
+
const currentIdx = sortedTabs.findIndex((x) => x.active);
|
|
188
188
|
const nextIdx = getCyclicalIdx(currentIdx, direction, sortedTabs.length);
|
|
189
189
|
const nextName = sortedTabs[nextIdx].name;
|
|
190
190
|
|
|
@@ -208,13 +208,13 @@ export default {
|
|
|
208
208
|
},
|
|
209
209
|
|
|
210
210
|
tabAddClicked() {
|
|
211
|
-
const activeTabIndex = findIndex(this.tabs, tab => tab.active);
|
|
211
|
+
const activeTabIndex = findIndex(this.tabs, (tab) => tab.active);
|
|
212
212
|
|
|
213
213
|
this.$emit('addTab', activeTabIndex);
|
|
214
214
|
},
|
|
215
215
|
|
|
216
216
|
tabRemoveClicked() {
|
|
217
|
-
const activeTabIndex = findIndex(this.tabs, tab => tab.active);
|
|
217
|
+
const activeTabIndex = findIndex(this.tabs, (tab) => tab.active);
|
|
218
218
|
|
|
219
219
|
this.$emit('removeTab', activeTabIndex);
|
|
220
220
|
},
|
package/components/Wizard.vue
CHANGED
|
@@ -117,11 +117,11 @@ export default {
|
|
|
117
117
|
|
|
118
118
|
computed: {
|
|
119
119
|
errorStrings() {
|
|
120
|
-
return ( this.errors || [] ).map(x => stringify(x));
|
|
120
|
+
return ( this.errors || [] ).map((x) => stringify(x));
|
|
121
121
|
},
|
|
122
122
|
|
|
123
123
|
activeStepIndex() {
|
|
124
|
-
return this.visibleSteps.findIndex(s => s.name === this.activeStep.name);
|
|
124
|
+
return this.visibleSteps.findIndex((s) => s.name === this.activeStep.name);
|
|
125
125
|
},
|
|
126
126
|
|
|
127
127
|
showPrevious() {
|
|
@@ -153,7 +153,7 @@ export default {
|
|
|
153
153
|
},
|
|
154
154
|
|
|
155
155
|
readySteps() {
|
|
156
|
-
return this.visibleSteps.filter(step => step.ready);
|
|
156
|
+
return this.visibleSteps.filter((step) => step.ready);
|
|
157
157
|
},
|
|
158
158
|
|
|
159
159
|
showSteps() {
|
|
@@ -161,11 +161,11 @@ export default {
|
|
|
161
161
|
},
|
|
162
162
|
|
|
163
163
|
stepsLoaded() {
|
|
164
|
-
return !this.steps.some(step => step.loading === true);
|
|
164
|
+
return !this.steps.some((step) => step.loading === true);
|
|
165
165
|
},
|
|
166
166
|
|
|
167
167
|
visibleSteps() {
|
|
168
|
-
return this.steps.filter(step => !step.hidden);
|
|
168
|
+
return this.steps.filter((step) => !step.hidden);
|
|
169
169
|
},
|
|
170
170
|
|
|
171
171
|
nextButtonStyle() {
|
|
@@ -234,7 +234,7 @@ export default {
|
|
|
234
234
|
return false;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
const idx = this.visibleSteps.findIndex(s => s.name === step.name);
|
|
237
|
+
const idx = this.visibleSteps.findIndex((s) => s.name === step.name);
|
|
238
238
|
|
|
239
239
|
if (idx === 0 && !this.editFirstStep) {
|
|
240
240
|
return false;
|
|
@@ -478,6 +478,7 @@ $spacer: 10px;
|
|
|
478
478
|
display: flex;
|
|
479
479
|
align-content: space-between;
|
|
480
480
|
align-items: center;
|
|
481
|
+
margin-bottom: 2*$spacer;
|
|
481
482
|
|
|
482
483
|
border-bottom: var(--header-border-size) solid var(--header-border);
|
|
483
484
|
|
|
@@ -525,20 +526,12 @@ $spacer: 10px;
|
|
|
525
526
|
align-items: center;
|
|
526
527
|
width: 40px;
|
|
527
528
|
overflow: visible;
|
|
528
|
-
padding-top:
|
|
529
|
+
padding-top: 7px;
|
|
529
530
|
|
|
530
|
-
.cru__content & {
|
|
531
|
-
padding-top: 0;
|
|
532
|
-
|
|
533
|
-
}
|
|
534
531
|
& > span {
|
|
535
|
-
padding-bottom:
|
|
532
|
+
padding-bottom: 3px;
|
|
536
533
|
margin-bottom: 5px;
|
|
537
534
|
white-space: nowrap;
|
|
538
|
-
|
|
539
|
-
.cru__content & {
|
|
540
|
-
padding-bottom: 3px;
|
|
541
|
-
}
|
|
542
535
|
}
|
|
543
536
|
}
|
|
544
537
|
|
|
@@ -565,7 +558,7 @@ $spacer: 10px;
|
|
|
565
558
|
flex-basis: 100%;
|
|
566
559
|
border-top: 1px solid var(--border);
|
|
567
560
|
position: relative;
|
|
568
|
-
top:
|
|
561
|
+
top: 17px;
|
|
569
562
|
|
|
570
563
|
.cru__content & {
|
|
571
564
|
top: 13px;
|
|
@@ -595,6 +588,7 @@ $spacer: 10px;
|
|
|
595
588
|
display: flex;
|
|
596
589
|
align-items: center;
|
|
597
590
|
justify-content: space-evenly;
|
|
591
|
+
position: relative;
|
|
598
592
|
|
|
599
593
|
& > .subtitle {
|
|
600
594
|
margin-right: 20px;
|
|
@@ -677,10 +671,4 @@ $spacer: 10px;
|
|
|
677
671
|
}
|
|
678
672
|
}
|
|
679
673
|
|
|
680
|
-
.wizard {
|
|
681
|
-
.header {
|
|
682
|
-
margin-bottom: 2*$spacer;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
674
|
</style>
|
|
@@ -2,6 +2,7 @@ import { mount } from '@vue/test-utils';
|
|
|
2
2
|
import CruResource from '@shell/components/CruResource.vue';
|
|
3
3
|
import { _EDIT, _YAML } from '@shell/config/query-params';
|
|
4
4
|
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
|
|
5
|
+
import TextAreaAutoGrow from '@components/Form/TextArea/TextAreaAutoGrow.vue';
|
|
5
6
|
|
|
6
7
|
describe('component: CruResource', () => {
|
|
7
8
|
it('should hide Cancel button', () => {
|
|
@@ -66,4 +67,77 @@ describe('component: CruResource', () => {
|
|
|
66
67
|
expect(node.text()).toContain(errors[0]);
|
|
67
68
|
expect(node.text()).toContain(errors[1]);
|
|
68
69
|
});
|
|
70
|
+
|
|
71
|
+
it('should prevent default events on keypress Enter', async() => {
|
|
72
|
+
const event = { preventDefault: jest.fn() };
|
|
73
|
+
const wrapper = mount(CruResource, {
|
|
74
|
+
propsData: {
|
|
75
|
+
canYaml: true,
|
|
76
|
+
mode: _EDIT,
|
|
77
|
+
resource: {},
|
|
78
|
+
preventEnterSubmit: true
|
|
79
|
+
},
|
|
80
|
+
slots: { default: TextAreaAutoGrow },
|
|
81
|
+
stubs: { TextAreaAutoGrow },
|
|
82
|
+
mocks: {
|
|
83
|
+
$store: {
|
|
84
|
+
getters: {
|
|
85
|
+
currentStore: () => 'current_store',
|
|
86
|
+
'current_store/schemaFor': jest.fn(),
|
|
87
|
+
'current_store/all': jest.fn(),
|
|
88
|
+
'i18n/t': jest.fn(),
|
|
89
|
+
'i18n/exists': jest.fn(),
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
$route: { query: { AS: _YAML } },
|
|
93
|
+
$router: { applyQuery: jest.fn() },
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const textAreaField = wrapper.find('[data-testid="text-area-auto-grow"]');
|
|
98
|
+
|
|
99
|
+
await textAreaField.trigger('focus');
|
|
100
|
+
await textAreaField.trigger('keydown.enter', event);
|
|
101
|
+
|
|
102
|
+
expect(event.preventDefault).toHaveBeenCalledWith();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('should not prevent default events on keypress Enter', async() => {
|
|
106
|
+
const event = { preventDefault: jest.fn() };
|
|
107
|
+
const wrapper = mount(CruResource, {
|
|
108
|
+
directives: { cleanHtmlDirective },
|
|
109
|
+
propsData: {
|
|
110
|
+
canYaml: false,
|
|
111
|
+
mode: _EDIT,
|
|
112
|
+
resource: {},
|
|
113
|
+
preventEnterSubmit: false
|
|
114
|
+
},
|
|
115
|
+
components: {
|
|
116
|
+
ResourceYaml: { template: '<div></div> ' },
|
|
117
|
+
ResourceCancelModal: { template: '<div></div> ' },
|
|
118
|
+
},
|
|
119
|
+
slots: { default: TextAreaAutoGrow },
|
|
120
|
+
stubs: { TextAreaAutoGrow },
|
|
121
|
+
mocks: {
|
|
122
|
+
$store: {
|
|
123
|
+
getters: {
|
|
124
|
+
currentStore: () => 'current_store',
|
|
125
|
+
'current_store/schemaFor': jest.fn(),
|
|
126
|
+
'current_store/all': jest.fn(),
|
|
127
|
+
'i18n/t': jest.fn(),
|
|
128
|
+
'i18n/exists': jest.fn(),
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
$route: { query: { AS: _YAML } },
|
|
132
|
+
$router: { applyQuery: jest.fn() },
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const textAreaField = wrapper.find('[data-testid="text-area-auto-grow"]');
|
|
137
|
+
|
|
138
|
+
await textAreaField.trigger('focus');
|
|
139
|
+
await textAreaField.trigger('keydown.enter', event);
|
|
140
|
+
|
|
141
|
+
expect(event.preventDefault).not.toHaveBeenCalled();
|
|
142
|
+
});
|
|
69
143
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils';
|
|
2
1
|
import SimpleBox from '@shell/components/SimpleBox.vue';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
3
|
|
|
4
4
|
describe('component: SimpleBox.vue', () => {
|
|
5
5
|
const wrapper = mount(SimpleBox, { propsData: { title: 'Simple box title' } });
|
|
@@ -319,7 +319,7 @@ export default {
|
|
|
319
319
|
return this.createRules(this.value);
|
|
320
320
|
},
|
|
321
321
|
ruleHeaders() {
|
|
322
|
-
const verbHeaders = VERBS.map(verb => ({
|
|
322
|
+
const verbHeaders = VERBS.map((verb) => ({
|
|
323
323
|
name: verb,
|
|
324
324
|
key: ucFirst(verb),
|
|
325
325
|
value: this.verbKey(verb),
|
|
@@ -485,7 +485,7 @@ export default {
|
|
|
485
485
|
const key = this.verbKey(verb);
|
|
486
486
|
|
|
487
487
|
tableRule[key] = rule.verbs[0] === '*' || rule.verbs.includes(verb);
|
|
488
|
-
tableRule.hasCustomVerbs = rule.verbs.some(verb => !VERBS.includes(verb));
|
|
488
|
+
tableRule.hasCustomVerbs = rule.verbs.some((verb) => !VERBS.includes(verb));
|
|
489
489
|
});
|
|
490
490
|
|
|
491
491
|
return tableRule;
|
|
@@ -497,7 +497,7 @@ export default {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
parent.roleTemplateNames
|
|
500
|
-
.map(rtn => this.$store.getters[`management/byId`](MANAGEMENT.ROLE_TEMPLATE, rtn))
|
|
500
|
+
.map((rtn) => this.$store.getters[`management/byId`](MANAGEMENT.ROLE_TEMPLATE, rtn))
|
|
501
501
|
.forEach((rt) => {
|
|
502
502
|
// Add Self
|
|
503
503
|
res.push({
|
|
@@ -659,6 +659,7 @@ export default {
|
|
|
659
659
|
:options="verbOptions"
|
|
660
660
|
:multiple="true"
|
|
661
661
|
:mode="mode"
|
|
662
|
+
:data-testid="`grant-resources-verbs${props.i}`"
|
|
662
663
|
@input="updateSelectValue(props.row.value, 'verbs', $event)"
|
|
663
664
|
/>
|
|
664
665
|
</div>
|
|
@@ -670,6 +671,7 @@ export default {
|
|
|
670
671
|
:searchable="true"
|
|
671
672
|
:taggable="true"
|
|
672
673
|
:mode="mode"
|
|
674
|
+
:data-testid="`grant-resources-resources${props.i}`"
|
|
673
675
|
@input="setRule('resources', props.row.value, $event)"
|
|
674
676
|
@createdListItem="setRule('resources', props.row.value, $event)"
|
|
675
677
|
/>
|
|
@@ -679,6 +681,7 @@ export default {
|
|
|
679
681
|
:value="getRule('apiGroups', props.row.value)"
|
|
680
682
|
:disabled="isBuiltin"
|
|
681
683
|
:mode="mode"
|
|
684
|
+
:data-testid="`grant-resources-api-groups${props.i}`"
|
|
682
685
|
@input="setRule('apiGroups', props.row.value, $event.target.value)"
|
|
683
686
|
>
|
|
684
687
|
</div>
|
|
@@ -690,6 +693,7 @@ export default {
|
|
|
690
693
|
:value="getRule('nonResourceURLs', props.row.value)"
|
|
691
694
|
:disabled="isBuiltin"
|
|
692
695
|
:mode="mode"
|
|
696
|
+
:data-testid="`grant-resources-non-resource-urls${props.i}`"
|
|
693
697
|
@input="setRule('nonResourceURLs', props.row.value, $event.target.value)"
|
|
694
698
|
>
|
|
695
699
|
</div>
|