@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
|
@@ -88,7 +88,7 @@ export default {
|
|
|
88
88
|
filteredRows() {
|
|
89
89
|
// If Harvester feature is enabled, hide Harvester Clusters
|
|
90
90
|
if (this.harvesterEnabled) {
|
|
91
|
-
return filterHiddenLocalCluster(filterOnlyKubernetesClusters(this.rows), this.$store);
|
|
91
|
+
return filterHiddenLocalCluster(filterOnlyKubernetesClusters(this.rows, this.$store), this.$store);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Otherwise, show Harvester clusters - these will be shown with a warning
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
return 0;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
return this.rows.length - filterOnlyKubernetesClusters(this.rows).length;
|
|
107
|
+
return this.rows.length - filterOnlyKubernetesClusters(this.rows, this.$store).length;
|
|
108
108
|
},
|
|
109
109
|
|
|
110
110
|
createLocation() {
|
|
@@ -131,7 +131,7 @@ export default {
|
|
|
131
131
|
canImport() {
|
|
132
132
|
const schema = this.$store.getters['management/schemaFor'](CAPI.RANCHER_CLUSTER);
|
|
133
133
|
|
|
134
|
-
return !!schema?.collectionMethods.find(x => x.toLowerCase() === 'post');
|
|
134
|
+
return !!schema?.collectionMethods.find((x) => x.toLowerCase() === 'post');
|
|
135
135
|
},
|
|
136
136
|
|
|
137
137
|
harvesterEnabled: mapFeature(HARVESTER_FEATURE),
|
|
@@ -220,9 +220,8 @@ export default {
|
|
|
220
220
|
<span v-if="!row.stateParts.length">{{ row.nodes.length }}</span>
|
|
221
221
|
</template>
|
|
222
222
|
<template #cell:explorer="{row}">
|
|
223
|
-
<span v-if="row.mgmt && row.mgmt.isHarvester" />
|
|
224
223
|
<n-link
|
|
225
|
-
v-
|
|
224
|
+
v-if="row.mgmt && row.mgmt.isReady && !row.hasError"
|
|
226
225
|
data-testid="cluster-manager-list-explore-management"
|
|
227
226
|
class="btn btn-sm role-secondary"
|
|
228
227
|
:to="{name: 'c-cluster', params: {cluster: row.mgmt.id}}"
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
212
212
|
const subnetsByVpc = {};
|
|
213
213
|
|
|
214
214
|
for ( const obj of this.vpcInfo.Vpcs ) {
|
|
215
|
-
const name = obj.Tags && obj.Tags?.length ? obj.Tags.find(t => t.Key === 'Name')?.Value : null;
|
|
215
|
+
const name = obj.Tags && obj.Tags?.length ? obj.Tags.find((t) => t.Key === 'Name')?.Value : null;
|
|
216
216
|
|
|
217
217
|
vpcs.push({
|
|
218
218
|
label: name || obj.VpcId,
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
237
237
|
subnetsByVpc[obj.VpcId] = entry;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
const name = obj.Tags && obj.Tags?.length ? obj.Tags.find(t => t.Key === 'Name')?.Value : null;
|
|
240
|
+
const name = obj.Tags && obj.Tags?.length ? obj.Tags.find((t) => t.Key === 'Name')?.Value : null;
|
|
241
241
|
|
|
242
242
|
entry.push({
|
|
243
243
|
label: name || obj.SubnetId,
|
|
@@ -44,7 +44,7 @@ export default {
|
|
|
44
44
|
|
|
45
45
|
let defaultRegion = 'sfo3';
|
|
46
46
|
|
|
47
|
-
if ( !this.regionOptions.find(x => x.value === defaultRegion) ) {
|
|
47
|
+
if ( !this.regionOptions.find((x) => x.value === defaultRegion) ) {
|
|
48
48
|
defaultRegion = this.regionOptions[0]?.value;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -58,8 +58,8 @@ export default {
|
|
|
58
58
|
|
|
59
59
|
let defaultSize = 's-2vcpu-4gb';
|
|
60
60
|
|
|
61
|
-
if ( !this.instanceOptions.find(x => x.value === defaultSize) ) {
|
|
62
|
-
defaultSize = this.instanceOptions.find(x => x.memoryGb >= 4)?.value;
|
|
61
|
+
if ( !this.instanceOptions.find((x) => x.value === defaultSize) ) {
|
|
62
|
+
defaultSize = this.instanceOptions.find((x) => x.memoryGb >= 4)?.value;
|
|
63
63
|
|
|
64
64
|
if ( !defaultSize ) {
|
|
65
65
|
defaultSize = this.instanceOptions[0].value;
|
|
@@ -74,7 +74,7 @@ export default {
|
|
|
74
74
|
|
|
75
75
|
let defaultImage = 'ubuntu-20-04-x64';
|
|
76
76
|
|
|
77
|
-
if ( !this.imageOptions.find(x => x.value === defaultImage) ) {
|
|
77
|
+
if ( !this.imageOptions.find((x) => x.value === defaultImage) ) {
|
|
78
78
|
defaultImage = this.imageOptions[0].value;
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
|
|
46
46
|
let defaultRegion = 'us-west';
|
|
47
47
|
|
|
48
|
-
if ( !this.regionOptions.find(x => x.value === defaultRegion) ) {
|
|
48
|
+
if ( !this.regionOptions.find((x) => x.value === defaultRegion) ) {
|
|
49
49
|
defaultRegion = this.regionOptions[0]?.value;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -59,8 +59,8 @@ export default {
|
|
|
59
59
|
|
|
60
60
|
let defaultInstanceType = 'g6-standard-2';
|
|
61
61
|
|
|
62
|
-
if ( !this.instanceOptions.find(x => x.value === defaultInstanceType) ) {
|
|
63
|
-
defaultInstanceType = this.instanceOptions.find(x => x.memoryGb >= 4)?.value;
|
|
62
|
+
if ( !this.instanceOptions.find((x) => x.value === defaultInstanceType) ) {
|
|
63
|
+
defaultInstanceType = this.instanceOptions.find((x) => x.memoryGb >= 4)?.value;
|
|
64
64
|
|
|
65
65
|
if ( !defaultInstanceType ) {
|
|
66
66
|
defaultInstanceType = this.instanceOptions[0].value;
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
|
|
76
76
|
let defaultImage = 'linode/ubuntu20.04';
|
|
77
77
|
|
|
78
|
-
if ( !this.imageOptions.find(x => x.value === defaultImage) ) {
|
|
78
|
+
if ( !this.imageOptions.find((x) => x.value === defaultImage) ) {
|
|
79
79
|
defaultImage = this.imageOptions[0].value;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -364,8 +364,8 @@ export default {
|
|
|
364
364
|
dataCenter,
|
|
365
365
|
library
|
|
366
366
|
})
|
|
367
|
-
.filter(entry => entry[1])
|
|
368
|
-
.map(entry => `${ entry[0] }=${ entry[1] }`)
|
|
367
|
+
.filter((entry) => entry[1])
|
|
368
|
+
.map((entry) => `${ entry[0] }=${ entry[1] }`)
|
|
369
369
|
.join('&');
|
|
370
370
|
|
|
371
371
|
const url = `/meta/vsphere/${ resource }?${ queryParams }`;
|
|
@@ -381,7 +381,7 @@ export default {
|
|
|
381
381
|
async loadDataCenters() {
|
|
382
382
|
const options = await this.requestOptions('data-centers');
|
|
383
383
|
const content = this.mapPathOptionsToContent(options);
|
|
384
|
-
const valueInContent = content.find(c => c.value === this.value.datacenter );
|
|
384
|
+
const valueInContent = content.find((c) => c.value === this.value.datacenter );
|
|
385
385
|
|
|
386
386
|
if (!valueInContent) {
|
|
387
387
|
set(this.value, 'datacenter', options[0]);
|
|
@@ -400,9 +400,9 @@ export default {
|
|
|
400
400
|
const optionsPromise = this.requestOptions('tags');
|
|
401
401
|
|
|
402
402
|
const [categories, options] = await Promise.all([categoriesPromise, optionsPromise]);
|
|
403
|
-
const content = this.mapTagsToContent(options).map(option => ({
|
|
403
|
+
const content = this.mapTagsToContent(options).map((option) => ({
|
|
404
404
|
...option,
|
|
405
|
-
category: categories.find(c => c.name === option.category)
|
|
405
|
+
category: categories.find((c) => c.name === option.category)
|
|
406
406
|
}));
|
|
407
407
|
|
|
408
408
|
this.resetValueIfNecessary('tag', content, options, true);
|
|
@@ -499,7 +499,7 @@ export default {
|
|
|
499
499
|
|
|
500
500
|
const options = await this.requestOptions('content-libraries', this.value.datacenter);
|
|
501
501
|
const content = this.mapPathOptionsToContent(options)
|
|
502
|
-
.filter(item => item.value !== '');
|
|
502
|
+
.filter((item) => item.value !== '');
|
|
503
503
|
|
|
504
504
|
this.resetValueIfNecessary('contentLibrary', content, options);
|
|
505
505
|
|
|
@@ -575,10 +575,10 @@ export default {
|
|
|
575
575
|
resetValueIfNecessary(key, content, options, isArray = false) {
|
|
576
576
|
const isValueInContent = () => {
|
|
577
577
|
if (isArray) {
|
|
578
|
-
return this.value[key].every(value => content.find(c => c.value === value));
|
|
578
|
+
return this.value[key].every((value) => content.find((c) => c.value === value));
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
return content.find(c => c.value === this.value[key] );
|
|
581
|
+
return content.find((c) => c.value === this.value[key] );
|
|
582
582
|
};
|
|
583
583
|
|
|
584
584
|
if (!isValueInContent()) {
|
|
@@ -603,14 +603,14 @@ export default {
|
|
|
603
603
|
|
|
604
604
|
mapHostOptionsToContent(hostOptions) {
|
|
605
605
|
return this.mapPathOptionsToContent(hostOptions)
|
|
606
|
-
.map(c => c.value === '' ? {
|
|
606
|
+
.map((c) => c.value === '' ? {
|
|
607
607
|
label: this.t('cluster.machineConfig.vsphere.hostOptions.any'),
|
|
608
608
|
value: SENTINEL
|
|
609
609
|
} : c);
|
|
610
610
|
},
|
|
611
611
|
|
|
612
612
|
mapFolderOptionsToContent(folderOptions) {
|
|
613
|
-
return folderOptions.map(option => ({
|
|
613
|
+
return folderOptions.map((option) => ({
|
|
614
614
|
label: option || '\u00A0',
|
|
615
615
|
value: option || ''
|
|
616
616
|
}));
|
|
@@ -629,14 +629,14 @@ export default {
|
|
|
629
629
|
},
|
|
630
630
|
|
|
631
631
|
mapCustomAttributesToContent(customAttributes) {
|
|
632
|
-
return customAttributes.map(customAttribute => ({
|
|
632
|
+
return customAttributes.map((customAttribute) => ({
|
|
633
633
|
label: customAttribute.name,
|
|
634
634
|
value: customAttribute.key.toString()
|
|
635
635
|
}));
|
|
636
636
|
},
|
|
637
637
|
|
|
638
638
|
mapTagsToContent(tags) {
|
|
639
|
-
return tags.map(tag => ({
|
|
639
|
+
return tags.map((tag) => ({
|
|
640
640
|
...tag,
|
|
641
641
|
label: `${ tag.category } / ${ tag.name }`,
|
|
642
642
|
value: tag.id
|
|
@@ -23,7 +23,7 @@ const getPackageFromRoute = (route) => {
|
|
|
23
23
|
// Sometimes meta is an array... sometimes not
|
|
24
24
|
const arraySafe = Array.isArray(route.meta) ? route.meta : [route.meta];
|
|
25
25
|
|
|
26
|
-
return arraySafe.find(m => !!m.pkg)?.pkg;
|
|
26
|
+
return arraySafe.find((m) => !!m.pkg)?.pkg;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
let beforeEachSetup = false;
|
|
@@ -320,7 +320,7 @@ export default async function({
|
|
|
320
320
|
const oldProduct = getProductFromRoute(from);
|
|
321
321
|
|
|
322
322
|
// Leave an old pkg where we weren't before?
|
|
323
|
-
const oldPkgPlugin = oldPkg ? Object.values($plugin.getPlugins()).find(p => p.name === oldPkg) : null;
|
|
323
|
+
const oldPkgPlugin = oldPkg ? Object.values($plugin.getPlugins()).find((p) => p.name === oldPkg) : null;
|
|
324
324
|
|
|
325
325
|
if (oldPkg && oldPkg !== pkg ) {
|
|
326
326
|
// Execute anything optional the plugin wants to. For example resetting it's store to remove data
|
|
@@ -338,7 +338,7 @@ export default async function({
|
|
|
338
338
|
];
|
|
339
339
|
|
|
340
340
|
// Entering a new package where we weren't before?
|
|
341
|
-
const newPkgPlugin = pkg ? Object.values($plugin.getPlugins()).find(p => p.name === pkg) : null;
|
|
341
|
+
const newPkgPlugin = pkg ? Object.values($plugin.getPlugins()).find((p) => p.name === pkg) : null;
|
|
342
342
|
|
|
343
343
|
// Note - We can't block on oldPkg !== newPkg because on a fresh load the `from` route equals the `to` route
|
|
344
344
|
if (pkg && (oldPkg !== pkg || from.fullPath === route.fullPath)) {
|
|
@@ -388,11 +388,12 @@ export default async function({
|
|
|
388
388
|
await Promise.all([
|
|
389
389
|
...always,
|
|
390
390
|
store.dispatch('loadCluster', {
|
|
391
|
-
id:
|
|
392
|
-
oldPkg:
|
|
393
|
-
newPkg:
|
|
391
|
+
id: clusterId,
|
|
392
|
+
oldPkg: oldPkgPlugin,
|
|
393
|
+
newPkg: newPkgPlugin,
|
|
394
394
|
product,
|
|
395
395
|
oldProduct,
|
|
396
|
+
targetRoute: route
|
|
396
397
|
})
|
|
397
398
|
]);
|
|
398
399
|
|
package/mixins/brand.js
CHANGED
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
if (url) {
|
|
104
104
|
this.$store.dispatch('management/create', {
|
|
105
105
|
type: MANAGEMENT.SETTING, metadata: { name: SETTING.BRAND }, value: 'csp', default: ''
|
|
106
|
-
}).then(setting => setting.save());
|
|
106
|
+
}).then((setting) => setting.save());
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
} else if (!neu) {
|
package/mixins/chart.js
CHANGED
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
out.push(nue);
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
-
const selectedMatch = out.find(v => v.id === selectedVersion);
|
|
100
|
+
const selectedMatch = out.find((v) => v.id === selectedVersion);
|
|
101
101
|
|
|
102
102
|
if (!selectedMatch) {
|
|
103
103
|
out.unshift({
|
|
@@ -111,7 +111,7 @@ export default {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
const currentVersion = out.find(v => v.originalVersion === this.currentVersion);
|
|
114
|
+
const currentVersion = out.find((v) => v.originalVersion === this.currentVersion);
|
|
115
115
|
|
|
116
116
|
if (currentVersion) {
|
|
117
117
|
currentVersion.label = this.t('catalog.install.versions.current', { ver: this.currentVersion });
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
|
|
123
123
|
// Conditionally filter out prerelease versions of the chart.
|
|
124
124
|
filteredVersions() {
|
|
125
|
-
return this.showPreRelease ? this.mappedVersions : this.mappedVersions.filter(v => !v.isPre);
|
|
125
|
+
return this.showPreRelease ? this.mappedVersions : this.mappedVersions.filter((v) => !v.isPre);
|
|
126
126
|
},
|
|
127
127
|
|
|
128
128
|
query() {
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
requires() {
|
|
192
192
|
const requires = [];
|
|
193
193
|
|
|
194
|
-
const required = (this.version?.annotations?.[CATALOG_ANNOTATIONS.REQUIRES_GVK] || '').split(/\s*,\s*/).filter(x => !!x).reverse();
|
|
194
|
+
const required = (this.version?.annotations?.[CATALOG_ANNOTATIONS.REQUIRES_GVK] || '').split(/\s*,\s*/).filter((x) => !!x).reverse();
|
|
195
195
|
|
|
196
196
|
if ( required.length ) {
|
|
197
197
|
for ( const gvr of required ) {
|
|
@@ -297,7 +297,7 @@ export default {
|
|
|
297
297
|
if (this.showPreRelease) {
|
|
298
298
|
this.query.versionName = this.chart.versions[0].version;
|
|
299
299
|
} else {
|
|
300
|
-
const firstRelease = this.chart.versions.find(v => !isPrerelease(v.version));
|
|
300
|
+
const firstRelease = this.chart.versions.find((v) => !isPrerelease(v.version));
|
|
301
301
|
|
|
302
302
|
this.query.versionName = firstRelease?.version || this.chart.versions[0].version;
|
|
303
303
|
}
|
|
@@ -357,7 +357,7 @@ export default {
|
|
|
357
357
|
It is an array of chart names that lets Rancher know of other
|
|
358
358
|
charts that should be auto-installed at the same time.
|
|
359
359
|
*/
|
|
360
|
-
const auto = (this.version?.annotations?.[CATALOG_ANNOTATIONS.AUTO_INSTALL] || '').split(/\s*,\s*/).filter(x => !!x).reverse();
|
|
360
|
+
const auto = (this.version?.annotations?.[CATALOG_ANNOTATIONS.AUTO_INSTALL] || '').split(/\s*,\s*/).filter((x) => !!x).reverse();
|
|
361
361
|
|
|
362
362
|
for ( const constraint of auto ) {
|
|
363
363
|
const provider = this.$store.getters['catalog/versionSatisfying']({
|
package/mixins/fetch.client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import { hasFetch, normalizeError, addLifecycleHook } from '../utils/nuxt';
|
|
3
3
|
|
|
4
|
-
const isSsrHydration = vm => vm.$vnode && vm.$vnode.elm && vm.$vnode.elm.dataset && vm.$vnode.elm.dataset.fetchKey;
|
|
4
|
+
const isSsrHydration = (vm) => vm.$vnode && vm.$vnode.elm && vm.$vnode.elm.dataset && vm.$vnode.elm.dataset.fetchKey;
|
|
5
5
|
const nuxtState = window.__NUXT__;
|
|
6
6
|
|
|
7
7
|
export default {
|
|
@@ -84,7 +84,7 @@ async function $_fetch() { // eslint-disable-line camelcase
|
|
|
84
84
|
const delayLeft = this._fetchDelay - (Date.now() - startTime);
|
|
85
85
|
|
|
86
86
|
if (delayLeft > 0) {
|
|
87
|
-
await new Promise(resolve => setTimeout(resolve, delayLeft));
|
|
87
|
+
await new Promise((resolve) => setTimeout(resolve, delayLeft));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
this.$fetchState.error = error;
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
* @returns
|
|
44
44
|
*/
|
|
45
45
|
fvGetPathRules(path) {
|
|
46
|
-
return this.fvRulesets.find(ruleset => ruleset.path === path)?.rules || [];
|
|
46
|
+
return this.fvRulesets.find((ruleset) => ruleset.path === path)?.rules || [];
|
|
47
47
|
},
|
|
48
48
|
|
|
49
49
|
/**
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
fvGetPathValues(path) { //
|
|
72
72
|
// returns even single values as an array to simplify validation logic since
|
|
73
73
|
// some fields may have multiple values
|
|
74
|
-
const relevantRuleset = this.fvRulesets.find(ruleset => ruleset.path === path);
|
|
74
|
+
const relevantRuleset = this.fvRulesets.find((ruleset) => ruleset.path === path);
|
|
75
75
|
|
|
76
76
|
if (!relevantRuleset) {
|
|
77
77
|
return [];
|
|
@@ -146,11 +146,11 @@ export default {
|
|
|
146
146
|
|
|
147
147
|
return {
|
|
148
148
|
...ruleset,
|
|
149
|
-
rules: ruleset.rules.map(rule => formRules[rule] || nullValidator),
|
|
149
|
+
rules: ruleset.rules.map((rule) => formRules[rule] || nullValidator),
|
|
150
150
|
formValidationRule: true
|
|
151
151
|
};
|
|
152
152
|
}),
|
|
153
|
-
...(this?.value?.modelValidationRules || []).map(rule => ({
|
|
153
|
+
...(this?.value?.modelValidationRules || []).map((rule) => ({
|
|
154
154
|
...rule,
|
|
155
155
|
formValidationRule: false
|
|
156
156
|
}))
|
|
@@ -165,8 +165,8 @@ export default {
|
|
|
165
165
|
*/
|
|
166
166
|
fvUnreportedValidationErrors() { //
|
|
167
167
|
const paths = this.fvRulesets
|
|
168
|
-
.filter(ruleset => !!ruleset.formValidationRule && !this.fvReportedValidationPaths.includes(ruleset.path))
|
|
169
|
-
.map(ruleset => ruleset.path);
|
|
168
|
+
.filter((ruleset) => !!ruleset.formValidationRule && !this.fvReportedValidationPaths.includes(ruleset.path))
|
|
169
|
+
.map((ruleset) => ruleset.path);
|
|
170
170
|
|
|
171
171
|
const formErrors = this.fvGetPathErrors(paths);
|
|
172
172
|
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
* @returns
|
|
182
182
|
*/
|
|
183
183
|
fvValidationErrors() {
|
|
184
|
-
const paths = this.fvRulesets.filter(ruleset => !!ruleset.formValidationRule).map(ruleset => ruleset.path);
|
|
184
|
+
const paths = this.fvRulesets.filter((ruleset) => !!ruleset.formValidationRule).map((ruleset) => ruleset.path);
|
|
185
185
|
const formErrors = this.fvGetPathErrors(paths);
|
|
186
186
|
|
|
187
187
|
// the model already has a means of producing errors, not reinventing the wheel... yet...
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
* If the Project/Namespace filter from the header contains a valid ns / project filter ... return it
|
|
34
34
|
*/
|
|
35
35
|
__validFilter() {
|
|
36
|
-
const valid = this.namespaceFilters.length && this.namespaceFilters.every(f => f.startsWith(NAMESPACE_FILTER_NS_PREFIX) || f.startsWith(NAMESPACE_FILTER_P_PREFIX));
|
|
36
|
+
const valid = this.namespaceFilters.length && this.namespaceFilters.every((f) => f.startsWith(NAMESPACE_FILTER_NS_PREFIX) || f.startsWith(NAMESPACE_FILTER_P_PREFIX));
|
|
37
37
|
|
|
38
38
|
return valid ? this.namespaceFilters : null;
|
|
39
39
|
},
|
package/mixins/resource-fetch.js
CHANGED
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
computed: {
|
|
56
56
|
...mapGetters({ refreshFlag: 'resource-fetch/refreshFlag' }),
|
|
57
57
|
rows() {
|
|
58
|
-
const currResource = this.fetchedResourceType.find(item => item.type === this.resource);
|
|
58
|
+
const currResource = this.fetchedResourceType.find((item) => item.type === this.resource);
|
|
59
59
|
|
|
60
60
|
if (currResource) {
|
|
61
61
|
return this.$store.getters[`${ currResource.currStore }/all`](this.resource);
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
|
|
103
103
|
this.$initializeFetchData(type, multipleResources, currStore);
|
|
104
104
|
|
|
105
|
-
if (!this.fetchedResourceType.find(item => item.type === type)) {
|
|
105
|
+
if (!this.fetchedResourceType.find((item) => item.type === type)) {
|
|
106
106
|
this.fetchedResourceType.push({
|
|
107
107
|
type,
|
|
108
108
|
currStore
|
|
@@ -26,7 +26,7 @@ export default class StatefulSet extends Workload {
|
|
|
26
26
|
// done on the parent model "workload" is not correct
|
|
27
27
|
get pods() {
|
|
28
28
|
const relationships = this.metadata?.relationships || [];
|
|
29
|
-
const podRelationship = relationships.filter(relationship => relationship.toType === POD)[0];
|
|
29
|
+
const podRelationship = relationships.filter((relationship) => relationship.toType === POD)[0];
|
|
30
30
|
|
|
31
31
|
if (podRelationship) {
|
|
32
32
|
const pods = this.$getters['podsByNamespace'](this.metadata.namespace);
|
|
@@ -34,7 +34,7 @@ export default class StatefulSet extends Workload {
|
|
|
34
34
|
return pods.filter((pod) => {
|
|
35
35
|
// a bit of a duplication of podRelationship, but always safe to check...
|
|
36
36
|
if (pod.metadata?.ownerReferences?.length) {
|
|
37
|
-
const ownerReferencesStatefulSet = pod.metadata?.ownerReferences?.find(own => own.kind === WORKLOAD_TYPE_TO_KIND_MAPPING[WORKLOAD_TYPES.STATEFUL_SET]);
|
|
37
|
+
const ownerReferencesStatefulSet = pod.metadata?.ownerReferences?.find((own) => own.kind === WORKLOAD_TYPE_TO_KIND_MAPPING[WORKLOAD_TYPES.STATEFUL_SET]);
|
|
38
38
|
|
|
39
39
|
if (ownerReferencesStatefulSet) {
|
|
40
40
|
return `${ pod.metadata.namespace }/${ ownerReferencesStatefulSet.name }` === this.id;
|
package/models/batch.cronjob.js
CHANGED
|
@@ -18,7 +18,7 @@ export default class CronJob extends Workload {
|
|
|
18
18
|
const suspended = this.spec?.suspend || false;
|
|
19
19
|
|
|
20
20
|
const jobSchema = this.$getters['schemaFor'](WORKLOAD_TYPES.JOB);
|
|
21
|
-
const canRunNow = !!jobSchema?.collectionMethods.find(x => ['blocked-post', 'post'].includes(x.toLowerCase()));
|
|
21
|
+
const canRunNow = !!jobSchema?.collectionMethods.find((x) => ['blocked-post', 'post'].includes(x.toLowerCase()));
|
|
22
22
|
|
|
23
23
|
insertAt(out, 0, {
|
|
24
24
|
action: 'runNow',
|
|
@@ -89,7 +89,7 @@ export default class CatalogApp extends SteveModel {
|
|
|
89
89
|
let versions = chart.versions;
|
|
90
90
|
|
|
91
91
|
if (!showPreRelease) {
|
|
92
|
-
versions = chart.versions.filter(v => !isPrerelease(v.version));
|
|
92
|
+
versions = chart.versions.filter((v) => !isPrerelease(v.version));
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
versions = compatibleVersionsFor(chart, workerOSs, showPreRelease);
|
|
@@ -128,14 +128,14 @@ export default class CatalogApp extends SteveModel {
|
|
|
128
128
|
return true;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
const versionInChart = chart.versions.find(version => version.version === thisVersion);
|
|
131
|
+
const versionInChart = chart.versions.find((version) => version.version === thisVersion);
|
|
132
132
|
|
|
133
133
|
if (!versionInChart) {
|
|
134
134
|
return true;
|
|
135
135
|
}
|
|
136
136
|
const compatibleVersions = compatibleVersionsFor(chart, workerOSs, true) || [];
|
|
137
137
|
|
|
138
|
-
const thisVersionCompatible = !!compatibleVersions.find(version => version.version === thisVersion);
|
|
138
|
+
const thisVersionCompatible = !!compatibleVersions.find((version) => version.version === thisVersion);
|
|
139
139
|
|
|
140
140
|
return thisVersionCompatible;
|
|
141
141
|
}
|
|
@@ -263,7 +263,7 @@ export default class CatalogApp extends SteveModel {
|
|
|
263
263
|
});
|
|
264
264
|
|
|
265
265
|
if (mcapps) {
|
|
266
|
-
return mcapps.find(mcapp => mcapp.spec?.targets?.find(target => target.appName === this.metadata?.name));
|
|
266
|
+
return mcapps.find((mcapp) => mcapp.spec?.targets?.find((target) => target.appName === this.metadata?.name));
|
|
267
267
|
}
|
|
268
268
|
} catch (e) {}
|
|
269
269
|
|
|
@@ -93,7 +93,7 @@ export default class ClusterScan extends SteveModel {
|
|
|
93
93
|
async getReports() {
|
|
94
94
|
const owned = await this.findOwned();
|
|
95
95
|
|
|
96
|
-
const reports = owned.filter(obj => obj.type === CIS.REPORT) || [];
|
|
96
|
+
const reports = owned.filter((obj) => obj.type === CIS.REPORT) || [];
|
|
97
97
|
|
|
98
98
|
return sortBy(reports, 'metadata.creationTimestamp', true);
|
|
99
99
|
}
|
|
@@ -14,7 +14,7 @@ export default class CISReport extends SteveModel {
|
|
|
14
14
|
return all;
|
|
15
15
|
}, []) : null;
|
|
16
16
|
|
|
17
|
-
const sortableId = id => (id || '').split('.').map(n => +n + 1000).join('.');
|
|
17
|
+
const sortableId = (id) => (id || '').split('.').map((n) => +n + 1000).join('.');
|
|
18
18
|
const sortableState = (state) => {
|
|
19
19
|
const SORT_ORDER = {
|
|
20
20
|
other: 7,
|
|
@@ -37,7 +37,7 @@ export default class CloudCredential extends NormanModel {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
get configKey() {
|
|
40
|
-
return Object.keys(this).find( k => k.endsWith('credentialConfig'));
|
|
40
|
+
return Object.keys(this).find( (k) => k.endsWith('credentialConfig'));
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
get provider() {
|
package/models/cluster/node.js
CHANGED
|
@@ -95,13 +95,13 @@ export default class ClusterNode extends SteveModel {
|
|
|
95
95
|
get internalIp() {
|
|
96
96
|
const addresses = this.status?.addresses || [];
|
|
97
97
|
|
|
98
|
-
return findLast(addresses, address => address.type === 'InternalIP')?.address;
|
|
98
|
+
return findLast(addresses, (address) => address.type === 'InternalIP')?.address;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
get externalIp() {
|
|
102
102
|
const addresses = this.status?.addresses || [];
|
|
103
103
|
const annotationAddress = this.metadata.annotations[RKE.EXTERNAL_IP];
|
|
104
|
-
const statusAddress = findLast(addresses, address => address.type === 'ExternalIP')?.address;
|
|
104
|
+
const statusAddress = findLast(addresses, (address) => address.type === 'ExternalIP')?.address;
|
|
105
105
|
|
|
106
106
|
return statusAddress || annotationAddress;
|
|
107
107
|
}
|
|
@@ -230,7 +230,7 @@ export default class ClusterNode extends SteveModel {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
get podConsumed() {
|
|
233
|
-
const runningPods = this.pods.filter(pod => pod.state === 'running');
|
|
233
|
+
const runningPods = this.pods.filter((pod) => pod.state === 'running');
|
|
234
234
|
|
|
235
235
|
return runningPods.length || 0;
|
|
236
236
|
}
|
|
@@ -260,7 +260,7 @@ export default class ClusterNode extends SteveModel {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
get drainedState() {
|
|
263
|
-
const sNodeCondition = this.managementNode?.status.conditions.find(c => c.type === 'Drained');
|
|
263
|
+
const sNodeCondition = this.managementNode?.status.conditions.find((c) => c.type === 'Drained');
|
|
264
264
|
|
|
265
265
|
if (sNodeCondition) {
|
|
266
266
|
if (sNodeCondition.status === 'True') {
|
|
@@ -409,7 +409,7 @@ export default class ClusterNode extends SteveModel {
|
|
|
409
409
|
get pods() {
|
|
410
410
|
const allPods = this.$rootGetters['cluster/all'](POD);
|
|
411
411
|
|
|
412
|
-
return allPods.filter(pod => pod.spec.nodeName === this.name);
|
|
412
|
+
return allPods.filter((pod) => pod.spec.nodeName === this.name);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
get confirmRemove() {
|
|
@@ -102,7 +102,7 @@ export default class CapiMachineDeployment extends SteveModel {
|
|
|
102
102
|
const machineConfigName = this.template?.metadata?.annotations['rke.cattle.io/cloned-from-name'];
|
|
103
103
|
const machinePools = this.cluster.spec.rkeConfig.machinePools;
|
|
104
104
|
|
|
105
|
-
return machinePools.find(pool => pool.machineConfigRef.name === machineConfigName);
|
|
105
|
+
return machinePools.find((pool) => pool.machineConfigRef.name === machineConfigName);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
scalePool(delta, save = true, depth = 0) {
|
|
@@ -207,7 +207,7 @@ export default class CapiMachineDeployment extends SteveModel {
|
|
|
207
207
|
value: this.ready,
|
|
208
208
|
sort: 4,
|
|
209
209
|
},
|
|
210
|
-
].filter(x => x.value > 0);
|
|
210
|
+
].filter((x) => x.value > 0);
|
|
211
211
|
|
|
212
212
|
return sortBy(out, 'sort:desc');
|
|
213
213
|
}
|
|
@@ -305,14 +305,14 @@ export default class GitRepo extends SteveModel {
|
|
|
305
305
|
get bundles() {
|
|
306
306
|
const all = this.$getters['all'](FLEET.BUNDLE);
|
|
307
307
|
|
|
308
|
-
return all.filter(bundle => bundle.name.startsWith(`${ this.name }-`) &&
|
|
308
|
+
return all.filter((bundle) => bundle.name.startsWith(`${ this.name }-`) &&
|
|
309
309
|
bundle.namespace === this.namespace &&
|
|
310
310
|
bundle.namespacedName.startsWith(`${ this.namespace }:${ this.name }`));
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
get bundlesReady() {
|
|
314
314
|
if (this.bundles && this.bundles.length) {
|
|
315
|
-
return this.bundles.filter(bundle => bundle.state === 'active');
|
|
315
|
+
return this.bundles.filter((bundle) => bundle.state === 'active');
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
return 0;
|
|
@@ -321,7 +321,7 @@ export default class GitRepo extends SteveModel {
|
|
|
321
321
|
get bundleDeployments() {
|
|
322
322
|
const bds = this.$getters['all'](FLEET.BUNDLE_DEPLOYMENT);
|
|
323
323
|
|
|
324
|
-
return bds.filter(bd => bd.metadata?.labels?.['fleet.cattle.io/repo-name'] === this.name);
|
|
324
|
+
return bds.filter((bd) => bd.metadata?.labels?.['fleet.cattle.io/repo-name'] === this.name);
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
get clustersList() {
|
|
@@ -27,7 +27,7 @@ export default class Group extends Principal {
|
|
|
27
27
|
|
|
28
28
|
get globalRoleBindings() {
|
|
29
29
|
return this.$rootGetters['management/all'](MANAGEMENT.GLOBAL_ROLE_BINDING)
|
|
30
|
-
.filter(globalRoleBinding => this.id === globalRoleBinding.groupPrincipalName);
|
|
30
|
+
.filter((globalRoleBinding) => this.id === globalRoleBinding.groupPrincipalName);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
get _availableActions() {
|
|
@@ -53,7 +53,7 @@ export default class Group extends Principal {
|
|
|
53
53
|
promptUnassignGroupRoles(resources = this) {
|
|
54
54
|
const principals = Array.isArray(resources) ? resources : [resources];
|
|
55
55
|
const globalRoleBindings = this.$rootGetters['management/all'](MANAGEMENT.GLOBAL_ROLE_BINDING)
|
|
56
|
-
.filter(globalRoleBinding => principals.find(principal => principal.id === globalRoleBinding.groupPrincipalName));
|
|
56
|
+
.filter((globalRoleBinding) => principals.find((principal) => principal.id === globalRoleBinding.groupPrincipalName));
|
|
57
57
|
|
|
58
58
|
this.$dispatch('promptRemove', globalRoleBindings);
|
|
59
59
|
}
|
|
@@ -61,9 +61,9 @@ export default class Group extends Principal {
|
|
|
61
61
|
async unassignGroupRoles(resources = this) {
|
|
62
62
|
const principals = Array.isArray(resources) ? resources : [resources];
|
|
63
63
|
const globalRoleBindings = this.$rootGetters['management/all'](MANAGEMENT.GLOBAL_ROLE_BINDING)
|
|
64
|
-
.filter(globalRoleBinding => principals.find(principal => principal.id === globalRoleBinding.groupPrincipalName));
|
|
64
|
+
.filter((globalRoleBinding) => principals.find((principal) => principal.id === globalRoleBinding.groupPrincipalName));
|
|
65
65
|
|
|
66
|
-
await Promise.all(globalRoleBindings.map(resource => resource.remove()));
|
|
66
|
+
await Promise.all(globalRoleBindings.map((resource) => resource.remove()));
|
|
67
67
|
|
|
68
68
|
// There is no dialog to close, but this can be watched and used to refresh the group principles
|
|
69
69
|
this.$dispatch('promptRemove', null);
|
|
@@ -13,7 +13,7 @@ export default class ProjectHelmChart extends SteveModel {
|
|
|
13
13
|
get projectId() {
|
|
14
14
|
const inStore = this.$rootGetters['currentProduct'].inStore;
|
|
15
15
|
const all = this.$rootGetters[`${ inStore }/all`](NAMESPACE);
|
|
16
|
-
const { projectId } = all.find(namespace => namespace.id === this.metadata.namespace);
|
|
16
|
+
const { projectId } = all.find((namespace) => namespace.id === this.metadata.namespace);
|
|
17
17
|
|
|
18
18
|
return projectId;
|
|
19
19
|
}
|
|
@@ -28,7 +28,7 @@ export default class ProjectHelmChart extends SteveModel {
|
|
|
28
28
|
get namespaces() {
|
|
29
29
|
const inStore = this.$rootGetters['currentProduct'].inStore;
|
|
30
30
|
const all = this.$rootGetters[`${ inStore }/all`](NAMESPACE);
|
|
31
|
-
const namespaces = all.filter(namespace => namespace.projectId === this.projectId);
|
|
31
|
+
const namespaces = all.filter((namespace) => namespace.projectId === this.projectId);
|
|
32
32
|
|
|
33
33
|
return [...namespaces];
|
|
34
34
|
}
|