@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
|
@@ -5,7 +5,6 @@ import Tab from '@shell/components/Tabbed/Tab';
|
|
|
5
5
|
import DashboardMetrics from '@shell/components/DashboardMetrics';
|
|
6
6
|
import AlertTable from '@shell/components/AlertTable';
|
|
7
7
|
import { Banner } from '@components/Banner';
|
|
8
|
-
import { parse as parseUrl } from '@shell/utils/url';
|
|
9
8
|
import { ENDPOINTS } from '@shell/config/types';
|
|
10
9
|
import { allHash } from '@shell/utils/promise';
|
|
11
10
|
|
|
@@ -33,33 +32,34 @@ export default {
|
|
|
33
32
|
};
|
|
34
33
|
},
|
|
35
34
|
computed: {
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
// there is a since-fixed bug in some versions of prom federator where this url is missing the trailing slash, which causes a redirect to an invalid grafana url
|
|
36
|
+
grafanaURL() {
|
|
37
|
+
const { grafanaURL } = this.value.status.dashboardValues;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
if (!grafanaURL.endsWith('/')) {
|
|
40
|
+
return `${ grafanaURL }/`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return grafanaURL;
|
|
44
44
|
},
|
|
45
45
|
monitoringNamespace() {
|
|
46
46
|
// picking the prometheusURL here, they're all going to be the same, but alertmanager and grafana can be deactivated
|
|
47
|
-
return this.pullKeyFromUrl(this.
|
|
47
|
+
return this.pullKeyFromUrl(this.value.status.dashboardValues.prometheusURL, 'namespaces');
|
|
48
48
|
},
|
|
49
49
|
alertServiceEndpoint() {
|
|
50
|
-
return this.pullServiceEndpointFromUrl(this.
|
|
50
|
+
return this.pullServiceEndpointFromUrl(this.value.status.dashboardValues.alertmanagerURL);
|
|
51
51
|
},
|
|
52
52
|
alertServiceEndpointEnabled() {
|
|
53
53
|
return this.checkEndpointEnabled(this.alertServiceEndpoint);
|
|
54
54
|
},
|
|
55
55
|
grafanaServiceEndpoint() {
|
|
56
|
-
return this.pullServiceEndpointFromUrl(this.
|
|
56
|
+
return this.pullServiceEndpointFromUrl(this.value.status.dashboardValues.grafanaURL);
|
|
57
57
|
},
|
|
58
58
|
grafanaServiceEndpointEnabled() {
|
|
59
59
|
return this.checkEndpointEnabled(this.grafanaServiceEndpoint);
|
|
60
60
|
},
|
|
61
61
|
prometheusServiceEndpoint() {
|
|
62
|
-
return this.pullServiceEndpointFromUrl(this.
|
|
62
|
+
return this.pullServiceEndpointFromUrl(this.value.status.dashboardValues.prometheusURL);
|
|
63
63
|
},
|
|
64
64
|
prometheusServiceEndpointEnabled() {
|
|
65
65
|
return this.checkEndpointEnabled(this.prometheusServiceEndpoint);
|
|
@@ -83,21 +83,7 @@ export default {
|
|
|
83
83
|
|
|
84
84
|
return !isEmpty(endpoint) && !isEmpty(endpoint?.subsets);
|
|
85
85
|
},
|
|
86
|
-
makeRelativeURL(url) {
|
|
87
|
-
if (!url) {
|
|
88
|
-
return '';
|
|
89
|
-
}
|
|
90
86
|
|
|
91
|
-
// most of the downstream components that use these URL expect the everything before and including the clusterid stripped out of the URL
|
|
92
|
-
const parsedUrl = parseUrl(url);
|
|
93
|
-
// we really just need the remaining bit of the url but the destructure makes it clear what we're leaving behind
|
|
94
|
-
// eslint-disable-next-line no-unused-vars
|
|
95
|
-
const [_empty, _k8s, _clusters, _clusterId, ...restUrl] = parsedUrl.relative.split('/');
|
|
96
|
-
// the above processing strips out the leading '/' which we need
|
|
97
|
-
const relativeUrl = `/${ restUrl.join('/') }`;
|
|
98
|
-
|
|
99
|
-
return relativeUrl;
|
|
100
|
-
},
|
|
101
87
|
pullKeyFromUrl(url = '', key) {
|
|
102
88
|
const splitUrl = url.split('/');
|
|
103
89
|
const keyIndex = splitUrl.indexOf(key);
|
|
@@ -138,10 +124,11 @@ export default {
|
|
|
138
124
|
<template #default="props">
|
|
139
125
|
<DashboardMetrics
|
|
140
126
|
v-if="props.active && grafanaServiceEndpointEnabled"
|
|
141
|
-
:detail-url="`${
|
|
142
|
-
:summary-url="`${
|
|
127
|
+
:detail-url="`${value.status.dashboardValues.grafanaURL}/d/rancher-pod-1/rancher-pod?orgId=1&kiosk`"
|
|
128
|
+
:summary-url="`${value.status.dashboardValues.grafanaURL}/d/rancher-workload-1/rancher-workload?orgId=1&kiosk`"
|
|
143
129
|
graph-height="825px"
|
|
144
130
|
project
|
|
131
|
+
:modify-prefix="false"
|
|
145
132
|
/>
|
|
146
133
|
</template>
|
|
147
134
|
</Tab>
|
|
@@ -211,7 +198,7 @@ export default {
|
|
|
211
198
|
</div>
|
|
212
199
|
<a
|
|
213
200
|
:class="{disabled: !grafanaServiceEndpointEnabled}"
|
|
214
|
-
:href="
|
|
201
|
+
:href="grafanaURL"
|
|
215
202
|
target="_blank"
|
|
216
203
|
> {{ t('monitoring.overview.linkedList.grafana.label') }} <i class="icon icon-external-link" /></a>
|
|
217
204
|
<a
|
|
@@ -123,8 +123,8 @@ export default {
|
|
|
123
123
|
const roles = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.GLOBAL_ROLE });
|
|
124
124
|
|
|
125
125
|
const out = await Promise.all(roles
|
|
126
|
-
.filter(r => !r.isSpecial)
|
|
127
|
-
.map(r => this.$store.dispatch(`rancher/clone`, { resource: r }))
|
|
126
|
+
.filter((r) => !r.isSpecial)
|
|
127
|
+
.map((r) => this.$store.dispatch(`rancher/clone`, { resource: r }))
|
|
128
128
|
);
|
|
129
129
|
|
|
130
130
|
out.forEach((r) => {
|
|
@@ -134,9 +134,9 @@ export default {
|
|
|
134
134
|
const globalRoleBindings = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.GLOBAL_ROLE_BINDING });
|
|
135
135
|
|
|
136
136
|
globalRoleBindings
|
|
137
|
-
.filter(binding => binding.userName === userId)
|
|
137
|
+
.filter((binding) => binding.userName === userId)
|
|
138
138
|
.forEach((binding) => {
|
|
139
|
-
const globalRole = roles.find(r => r.id === binding.globalRoleName);
|
|
139
|
+
const globalRole = roles.find((r) => r.id === binding.globalRoleName);
|
|
140
140
|
|
|
141
141
|
if (globalRole.id === 'admin') {
|
|
142
142
|
this.isAdmin = true;
|
|
@@ -148,7 +148,7 @@ export default {
|
|
|
148
148
|
r.bound = binding?.metadata.creationTimestamp;
|
|
149
149
|
});
|
|
150
150
|
} else {
|
|
151
|
-
const entry = out.find(o => o.id === binding.globalRoleName);
|
|
151
|
+
const entry = out.find((o) => o.id === binding.globalRoleName);
|
|
152
152
|
|
|
153
153
|
if (entry) {
|
|
154
154
|
entry.hasBound = true;
|
|
@@ -166,20 +166,20 @@ export default {
|
|
|
166
166
|
|
|
167
167
|
fetchClusterRoles(userId) {
|
|
168
168
|
const templateBindings = this.$store.getters['management/all'](MANAGEMENT.CLUSTER_ROLE_TEMPLATE_BINDING);
|
|
169
|
-
const userTemplateBindings = templateBindings.filter(binding => binding.userName === userId);
|
|
169
|
+
const userTemplateBindings = templateBindings.filter((binding) => binding.userName === userId);
|
|
170
170
|
|
|
171
171
|
// Upfront load clusters
|
|
172
|
-
userTemplateBindings.map(b => this.$store.dispatch('management/find', { type: MANAGEMENT.CLUSTER, id: b.clusterName }));
|
|
172
|
+
userTemplateBindings.map((b) => this.$store.dispatch('management/find', { type: MANAGEMENT.CLUSTER, id: b.clusterName }));
|
|
173
173
|
|
|
174
174
|
return userTemplateBindings;
|
|
175
175
|
},
|
|
176
176
|
|
|
177
177
|
fetchProjectRoles(userId) {
|
|
178
178
|
const templateBindings = this.$store.getters['management/all'](MANAGEMENT.PROJECT_ROLE_TEMPLATE_BINDING );
|
|
179
|
-
const userTemplateBindings = templateBindings.filter(binding => binding.userName === userId);
|
|
179
|
+
const userTemplateBindings = templateBindings.filter((binding) => binding.userName === userId);
|
|
180
180
|
|
|
181
181
|
// Upfront load projects
|
|
182
|
-
userTemplateBindings.map(b => this.$store.dispatch('management/find', { type: MANAGEMENT.PROJECT, id: b.projectId }));
|
|
182
|
+
userTemplateBindings.map((b) => this.$store.dispatch('management/find', { type: MANAGEMENT.PROJECT, id: b.projectId }));
|
|
183
183
|
|
|
184
184
|
return userTemplateBindings;
|
|
185
185
|
},
|
|
@@ -199,13 +199,13 @@ export default {
|
|
|
199
199
|
const verbs = (rule.verbs || []);
|
|
200
200
|
const permissions = [];
|
|
201
201
|
|
|
202
|
-
apiGroups.forEach(apiGroup => resources.forEach(resource => verbs.forEach(verb => permissions.push({
|
|
202
|
+
apiGroups.forEach((apiGroup) => resources.forEach((resource) => verbs.forEach((verb) => permissions.push({
|
|
203
203
|
apiGroup,
|
|
204
204
|
resource,
|
|
205
205
|
verb
|
|
206
206
|
}))));
|
|
207
207
|
|
|
208
|
-
return permissions.every(permission => this.hasPermission(globalRoleRules, permission));
|
|
208
|
+
return permissions.every((permission) => this.hasPermission(globalRoleRules, permission));
|
|
209
209
|
},
|
|
210
210
|
getEnabledRoles(globalRole, out) {
|
|
211
211
|
const globalRoleRules = globalRole.rules || [];
|
|
@@ -216,7 +216,7 @@ export default {
|
|
|
216
216
|
return false;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
return r.rules.every(rule => this.containsRule(globalRoleRules, rule));
|
|
219
|
+
return r.rules.every((rule) => this.containsRule(globalRoleRules, rule));
|
|
220
220
|
});
|
|
221
221
|
},
|
|
222
222
|
|
package/detail/namespace.vue
CHANGED
|
@@ -156,7 +156,7 @@ export default {
|
|
|
156
156
|
workloadRows() {
|
|
157
157
|
const params = this.$route.params;
|
|
158
158
|
const { id } = params;
|
|
159
|
-
const rows = flatten(compact(this.allWorkloads)).filter(row => !row.ownedByWorkload);
|
|
159
|
+
const rows = flatten(compact(this.allWorkloads)).filter((row) => !row.ownedByWorkload);
|
|
160
160
|
const namespacedRows = filter(rows, ({ metadata: { namespace } }) => namespace === id);
|
|
161
161
|
|
|
162
162
|
return namespacedRows;
|
|
@@ -175,7 +175,7 @@ export default {
|
|
|
175
175
|
} else {
|
|
176
176
|
const genericStateKey = findKey(
|
|
177
177
|
this.statesByType,
|
|
178
|
-
stateNames => stateNames.includes(state)
|
|
178
|
+
(stateNames) => stateNames.includes(state)
|
|
179
179
|
);
|
|
180
180
|
|
|
181
181
|
if (genericStateKey) {
|
|
@@ -195,8 +195,8 @@ export default {
|
|
|
195
195
|
getAllWorkloads() {
|
|
196
196
|
return Promise.all(values(WORKLOAD_TYPES)
|
|
197
197
|
// You may not have RBAC to see some of the types
|
|
198
|
-
.filter(type => Boolean(this.schemaFor(type)))
|
|
199
|
-
.map(type => this.$store.dispatch('cluster/findAll', { type }))
|
|
198
|
+
.filter((type) => Boolean(this.schemaFor(type)))
|
|
199
|
+
.map((type) => this.$store.dispatch('cluster/findAll', { type }))
|
|
200
200
|
);
|
|
201
201
|
},
|
|
202
202
|
|
|
@@ -30,17 +30,17 @@ export default {
|
|
|
30
30
|
computed: {
|
|
31
31
|
serviceTargets() {
|
|
32
32
|
return this.filterByCurrentResourceNamespace(this.allServices)
|
|
33
|
-
.map(service => ({
|
|
33
|
+
.map((service) => ({
|
|
34
34
|
label: service.metadata.name,
|
|
35
35
|
value: service.metadata.name,
|
|
36
|
-
ports: service.spec.ports?.map(p => p.port)
|
|
36
|
+
ports: service.spec.ports?.map((p) => p.port)
|
|
37
37
|
}));
|
|
38
38
|
},
|
|
39
39
|
firstTabLabel() {
|
|
40
40
|
return this.isView ? this.t('ingress.rulesAndCertificates.title') : this.t('ingress.rules.title');
|
|
41
41
|
},
|
|
42
42
|
certificates() {
|
|
43
|
-
return this.filterByCurrentResourceNamespace(this.allSecrets.filter(secret => secret._type === TYPES.TLS)).map((secret) => {
|
|
43
|
+
return this.filterByCurrentResourceNamespace(this.allSecrets.filter((secret) => secret._type === TYPES.TLS)).map((secret) => {
|
|
44
44
|
const { id } = secret;
|
|
45
45
|
|
|
46
46
|
return id.slice(id.indexOf('/') + 1);
|
package/detail/node.vue
CHANGED
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
|
|
140
140
|
infoTableRows() {
|
|
141
141
|
return Object.keys(this.value.status.nodeInfo)
|
|
142
|
-
.map(key => ({
|
|
142
|
+
.map((key) => ({
|
|
143
143
|
key: this.t(`node.detail.tab.info.key.${ key }`),
|
|
144
144
|
value: this.value.status.nodeInfo[key]
|
|
145
145
|
}));
|
|
@@ -148,7 +148,7 @@ export default {
|
|
|
148
148
|
imageTableRows() {
|
|
149
149
|
const images = this.value.status.images || [];
|
|
150
150
|
|
|
151
|
-
return images.map(image => ({
|
|
151
|
+
return images.map((image) => ({
|
|
152
152
|
// image.names[1] typically has the user friendly name but on occasion there's only one name and we should use that
|
|
153
153
|
name: image.names ? (image.names[1] || image.names[0]) : '---',
|
|
154
154
|
sizeBytes: image.sizeBytes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Loading from '@shell/components/Loading';
|
|
3
3
|
import { Banner } from '@components/Banner';
|
|
4
|
-
import ResourceTable from '@shell/components/ResourceTable';
|
|
4
|
+
import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/ResourceTable';
|
|
5
5
|
import ResourceTabs from '@shell/components/form/ResourceTabs';
|
|
6
6
|
import SortableTable from '@shell/components/SortableTable';
|
|
7
7
|
import CopyCode from '@shell/components/CopyCode';
|
|
@@ -31,7 +31,6 @@ import Socket, {
|
|
|
31
31
|
import { get } from '@shell/utils/object';
|
|
32
32
|
import CapiMachineDeployment from '@shell/models/cluster.x-k8s.io.machinedeployment';
|
|
33
33
|
import { isAlternate } from '@shell/utils/platform';
|
|
34
|
-
import { defaultTableSortGenerationFn } from '@shell/components/ResourceTable.vue';
|
|
35
34
|
|
|
36
35
|
let lastId = 1;
|
|
37
36
|
const ansiup = new AnsiUp();
|
|
@@ -122,7 +121,7 @@ export default {
|
|
|
122
121
|
|
|
123
122
|
if (fetchOneRes.normanClusters) {
|
|
124
123
|
// Does the user have access to the local cluster? Need to in order to be able to show the 'Related Resources' tab
|
|
125
|
-
this.hasLocalAccess = !!fetchOneRes.normanClusters.find(c => c.internal);
|
|
124
|
+
this.hasLocalAccess = !!fetchOneRes.normanClusters.find((c) => c.internal);
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
const fetchTwo = {};
|
|
@@ -303,7 +302,7 @@ export default {
|
|
|
303
302
|
const templateNamePrefix = `${ pool.metadata.name }-`;
|
|
304
303
|
|
|
305
304
|
// All of these properties are needed to ensure the pool displays correctly and that we can scale up and down
|
|
306
|
-
pool._template = this.machineTemplates.find(t => t.metadata.name.startsWith(templateNamePrefix));
|
|
305
|
+
pool._template = this.machineTemplates.find((t) => t.metadata.name.startsWith(templateNamePrefix));
|
|
307
306
|
pool._cluster = this.value;
|
|
308
307
|
pool._clusterSpec = mp;
|
|
309
308
|
|
|
@@ -320,16 +319,16 @@ export default {
|
|
|
320
319
|
},
|
|
321
320
|
|
|
322
321
|
nodes() {
|
|
323
|
-
const nodes = this.allNodes.filter(x => x.mgmtClusterId === this.value.mgmtClusterId);
|
|
322
|
+
const nodes = this.allNodes.filter((x) => x.mgmtClusterId === this.value.mgmtClusterId);
|
|
324
323
|
|
|
325
324
|
return [...nodes, ...this.fakeNodes];
|
|
326
325
|
},
|
|
327
326
|
|
|
328
327
|
fakeNodes() {
|
|
329
328
|
// When a pool has no nodes it's not shown.... so add a fake node to it
|
|
330
|
-
const emptyNodePools = this.allNodePools.filter(x => x.spec.clusterName === this.value.mgmtClusterId && x.spec.quantity === 0);
|
|
329
|
+
const emptyNodePools = this.allNodePools.filter((x) => x.spec.clusterName === this.value.mgmtClusterId && x.spec.quantity === 0);
|
|
331
330
|
|
|
332
|
-
return emptyNodePools.map(np => ({
|
|
331
|
+
return emptyNodePools.map((np) => ({
|
|
333
332
|
spec: { nodePoolName: np.id.replace('/', ':') },
|
|
334
333
|
mainRowKey: 'isFake',
|
|
335
334
|
pool: np,
|
|
@@ -356,7 +355,7 @@ export default {
|
|
|
356
355
|
|
|
357
356
|
showEksNodeGroupWarning() {
|
|
358
357
|
if ( this.value.provisioner === 'EKS' && this.value.state !== STATES_ENUM.ACTIVE) {
|
|
359
|
-
const desiredTotal = this.value.eksNodeGroups.filter(g => g.desiredSize === 0);
|
|
358
|
+
const desiredTotal = this.value.eksNodeGroups.filter((g) => g.desiredSize === 0);
|
|
360
359
|
|
|
361
360
|
if ( desiredTotal.length === this.value.eksNodeGroups.length ) {
|
|
362
361
|
return true;
|
|
@@ -412,7 +411,7 @@ export default {
|
|
|
412
411
|
return [];
|
|
413
412
|
}
|
|
414
413
|
|
|
415
|
-
return (this.etcdBackups || []).filter(x => x.clusterId === mgmtId);
|
|
414
|
+
return (this.etcdBackups || []).filter((x) => x.clusterId === mgmtId);
|
|
416
415
|
},
|
|
417
416
|
|
|
418
417
|
rke2Snapshots() {
|
|
@@ -510,7 +509,7 @@ export default {
|
|
|
510
509
|
},
|
|
511
510
|
|
|
512
511
|
hasWindowsMachine() {
|
|
513
|
-
return this.machines.some(machine => get(machine, 'status.nodeInfo.operatingSystem') === 'windows');
|
|
512
|
+
return this.machines.some((machine) => get(machine, 'status.nodeInfo.operatingSystem') === 'windows');
|
|
514
513
|
},
|
|
515
514
|
|
|
516
515
|
snapshotsGroupBy() {
|
package/detail/service.vue
CHANGED
|
@@ -132,7 +132,7 @@ export default {
|
|
|
132
132
|
return this.$store.getters['cluster/schemaFor'](POD);
|
|
133
133
|
},
|
|
134
134
|
selectorTableRows() {
|
|
135
|
-
return Object.keys(this.value.spec?.selector || {}).map(key => ({
|
|
135
|
+
return Object.keys(this.value.spec?.selector || {}).map((key) => ({
|
|
136
136
|
key,
|
|
137
137
|
value: this.value.spec.selector[key],
|
|
138
138
|
}));
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
200
200
|
},
|
|
201
201
|
|
|
202
202
|
podHeaders() {
|
|
203
|
-
return this.$store.getters['type-map/headersFor'](this.podSchema).filter(h => h !== NAMESPACE_COL);
|
|
203
|
+
return this.$store.getters['type-map/headersFor'](this.podSchema).filter((h) => h !== NAMESPACE_COL);
|
|
204
204
|
},
|
|
205
205
|
|
|
206
206
|
graphVarsWorkload() {
|
|
@@ -219,14 +219,14 @@ export default {
|
|
|
219
219
|
const podGauges = Object.values(this.value.podGauges);
|
|
220
220
|
const total = this.value.pods.length;
|
|
221
221
|
|
|
222
|
-
return !podGauges.find(pg => pg.count === total);
|
|
222
|
+
return !podGauges.find((pg) => pg.count === total);
|
|
223
223
|
},
|
|
224
224
|
|
|
225
225
|
showJobGaugeCircles() {
|
|
226
226
|
const jobGauges = Object.values(this.value.jobGauges);
|
|
227
227
|
const total = this.isCronJob ? this.totalRuns : this.value.pods.length;
|
|
228
228
|
|
|
229
|
-
return !jobGauges.find(jg => jg.count === total);
|
|
229
|
+
return !jobGauges.find((jg) => jg.count === total);
|
|
230
230
|
},
|
|
231
231
|
|
|
232
232
|
canScale() {
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
|
|
78
78
|
async createBindings() {
|
|
79
79
|
const principalProperty = await this.principalProperty();
|
|
80
|
-
const promises = this.member.roleTemplateIds.map(roleTemplateId => this.$store.dispatch(`rancher/create`, {
|
|
80
|
+
const promises = this.member.roleTemplateIds.map((roleTemplateId) => this.$store.dispatch(`rancher/create`, {
|
|
81
81
|
type: NORMAN.PROJECT_ROLE_TEMPLATE_BINDING,
|
|
82
82
|
roleTemplateId,
|
|
83
83
|
[principalProperty]: this.member.principalId,
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
this.error = null;
|
|
92
92
|
this.createBindings()
|
|
93
93
|
.then((bindings) => {
|
|
94
|
-
return Promise.all(bindings.map(b => b.save()));
|
|
94
|
+
return Promise.all(bindings.map((b) => b.save()));
|
|
95
95
|
})
|
|
96
96
|
.then(() => {
|
|
97
97
|
btnCB(true);
|
package/dialog/DrainNode.vue
CHANGED
|
@@ -114,7 +114,7 @@ export default {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
try {
|
|
117
|
-
await Promise.all(this.kubeNodes.map(node => node.norman?.doAction('drain', parsedBody)));
|
|
117
|
+
await Promise.all(this.kubeNodes.map((node) => node.norman?.doAction('drain', parsedBody)));
|
|
118
118
|
this.close();
|
|
119
119
|
} catch (e) {
|
|
120
120
|
this.errors = exceptionToErrorsArray(e);
|
package/dialog/GenericPrompt.vue
CHANGED
|
@@ -68,11 +68,15 @@ export default {
|
|
|
68
68
|
class="prompt-restore"
|
|
69
69
|
:show-highlight-border="false"
|
|
70
70
|
>
|
|
71
|
-
<
|
|
72
|
-
slot="title"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
<template slot="title">
|
|
72
|
+
<slot name="title">
|
|
73
|
+
<h4
|
|
74
|
+
slot="title"
|
|
75
|
+
v-clean-html="title"
|
|
76
|
+
class="text-default-text"
|
|
77
|
+
/>
|
|
78
|
+
</slot>
|
|
79
|
+
</template>
|
|
76
80
|
|
|
77
81
|
<template slot="body">
|
|
78
82
|
<slot name="body">
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
if ( this.cluster.isRke1) {
|
|
66
66
|
let etcdBackups = await this.$store.dispatch('rancher/findAll', { type: NORMAN.ETCD_BACKUP });
|
|
67
67
|
|
|
68
|
-
etcdBackups = etcdBackups.filter(backup => backup.clusterId === this.cluster.metadata.name);
|
|
68
|
+
etcdBackups = etcdBackups.filter((backup) => backup.clusterId === this.cluster.metadata.name);
|
|
69
69
|
|
|
70
70
|
return etcdBackups;
|
|
71
71
|
}
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
if (this.cluster.isRke2) {
|
|
74
74
|
let etcdBackups = await this.$store.dispatch('management/findAll', { type: SNAPSHOT });
|
|
75
75
|
|
|
76
|
-
etcdBackups = etcdBackups.filter(backup => backup.clusterId === this.cluster.id);
|
|
76
|
+
etcdBackups = etcdBackups.filter((backup) => backup.clusterId === this.cluster.id);
|
|
77
77
|
|
|
78
78
|
return etcdBackups;
|
|
79
79
|
}
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
// This isn't optimisied, there may be cases that retaining a single machine with both roles would be better than retaining two with single roles
|
|
30
30
|
const [ignoredControlPlane, safeControlePlaneMachinesToDelete] = this.deleteType('isControlPlane', allToDelete, cluster);
|
|
31
31
|
const [ignoredEtcd, safeMachinesToDelete] = this.deleteType('isEtcd', safeControlePlaneMachinesToDelete, cluster);
|
|
32
|
-
const ignored = [ignoredControlPlane, ignoredEtcd].filter(i => !!i);
|
|
32
|
+
const ignored = [ignoredControlPlane, ignoredEtcd].filter((i) => !!i);
|
|
33
33
|
|
|
34
34
|
return {
|
|
35
35
|
cluster,
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
return res;
|
|
58
58
|
}, { typed: [], others: [] });
|
|
59
59
|
|
|
60
|
-
const totalTypes = cluster.machines.filter(m => m[type]).length;
|
|
60
|
+
const totalTypes = cluster.machines.filter((m) => m[type]).length;
|
|
61
61
|
const typesToDelete = allToDeleteByType.typed.length;
|
|
62
62
|
// If we're attempting to remove all control plan machines.... ignore one
|
|
63
63
|
const ignoredType = totalTypes - typesToDelete === 0 ? allToDeleteByType.typed.pop() : undefined;
|
package/edit/auth/azuread.vue
CHANGED
|
@@ -179,7 +179,7 @@ export default {
|
|
|
179
179
|
|
|
180
180
|
setInitialEndpoint(endpoint) {
|
|
181
181
|
const newEndpointKey = this.determineEndpointKeyType(ENDPOINT_MAPPING);
|
|
182
|
-
const oldEndpointKey = Object.keys(OLD_ENDPOINTS).find(key => OLD_ENDPOINTS[key].graphEndpoint === endpoint);
|
|
182
|
+
const oldEndpointKey = Object.keys(OLD_ENDPOINTS).find((key) => OLD_ENDPOINTS[key].graphEndpoint === endpoint);
|
|
183
183
|
|
|
184
184
|
if ( oldEndpointKey ) {
|
|
185
185
|
this.endpoint = this.determineEndpointKeyType(OLD_ENDPOINTS);
|
|
@@ -193,8 +193,8 @@ export default {
|
|
|
193
193
|
let out = 'custom';
|
|
194
194
|
|
|
195
195
|
for ( const [endpointKey, endpointKeyValues] of Object.entries(endpointTypes) ) {
|
|
196
|
-
const mappedValues = Object.values(endpointKeyValues).map(endpoint => endpoint.replace(TENANT_ID_TOKEN, this.model?.tenantId));
|
|
197
|
-
const valuesToCheck = Object.keys(endpointKeyValues).map(key => this.value[key]);
|
|
196
|
+
const mappedValues = Object.values(endpointKeyValues).map((endpoint) => endpoint.replace(TENANT_ID_TOKEN, this.model?.tenantId));
|
|
197
|
+
const valuesToCheck = Object.keys(endpointKeyValues).map((key) => this.value[key]);
|
|
198
198
|
|
|
199
199
|
if ( isEqual(mappedValues, valuesToCheck) ) {
|
|
200
200
|
out = endpointKey;
|
|
@@ -68,19 +68,19 @@ export default {
|
|
|
68
68
|
allWorkloadsFiltered() {
|
|
69
69
|
return (
|
|
70
70
|
Object.values(SCALABLE_WORKLOAD_TYPES)
|
|
71
|
-
.flatMap(type => this.$store.getters['cluster/all'](type))
|
|
71
|
+
.flatMap((type) => this.$store.getters['cluster/all'](type))
|
|
72
72
|
.filter(
|
|
73
73
|
// Filter out anything that has an owner, which should probably be the one with the HPA
|
|
74
74
|
// For example ReplicaSets can be associated with a HPA (https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#replicaset-as-a-horizontal-pod-autoscaler-target)
|
|
75
75
|
// but wouldn't make sense if it's owned by a deployment
|
|
76
|
-
wl => wl.metadata.namespace === this.value.metadata.namespace && !wl.ownedByWorkload
|
|
76
|
+
(wl) => wl.metadata.namespace === this.value.metadata.namespace && !wl.ownedByWorkload
|
|
77
77
|
)
|
|
78
78
|
);
|
|
79
79
|
},
|
|
80
80
|
allWorkloadsMapped() {
|
|
81
81
|
return this.allWorkloadsFiltered
|
|
82
82
|
// Update to type OBJECT_REFERENCE which can be stored directly as scaleTargetRef
|
|
83
|
-
.map(workload => ({
|
|
83
|
+
.map((workload) => ({
|
|
84
84
|
kind: workload.kind,
|
|
85
85
|
name: workload.metadata.name,
|
|
86
86
|
apiVersion: workload.apiVersion,
|
|
@@ -95,7 +95,7 @@ export default {
|
|
|
95
95
|
return !isEmpty(
|
|
96
96
|
find(
|
|
97
97
|
allServices,
|
|
98
|
-
api => api.name.split('.').length === 4 &&
|
|
98
|
+
(api) => api.name.split('.').length === 4 &&
|
|
99
99
|
endsWith(api.name, RESOURCE_METRICS_API_GROUP)
|
|
100
100
|
)
|
|
101
101
|
);
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
},
|
|
134
134
|
async loadWorkloads() {
|
|
135
135
|
await Promise.all(
|
|
136
|
-
Object.values(SCALABLE_WORKLOAD_TYPES).map(type => this.$store.dispatch('cluster/findAll', { type })
|
|
136
|
+
Object.values(SCALABLE_WORKLOAD_TYPES).map((type) => this.$store.dispatch('cluster/findAll', { type })
|
|
137
137
|
)
|
|
138
138
|
);
|
|
139
139
|
},
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
// if mode is _CREATE and scanProfileName is defined, this is a clone
|
|
54
54
|
// check if the profile referred to in the original spec still exists
|
|
55
55
|
if (scanProfileName && this.mode === _CREATE) {
|
|
56
|
-
const proxyObj = this.allProfiles.filter(profile => profile.id === scanProfileName)[0];
|
|
56
|
+
const proxyObj = this.allProfiles.filter((profile) => profile.id === scanProfileName)[0];
|
|
57
57
|
|
|
58
58
|
if (!proxyObj) {
|
|
59
59
|
this.$set(this.value.spec, 'scanProfileName', '');
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
if (name) {
|
|
137
|
-
const profile = this.allProfiles.find(profile => profile.id === name);
|
|
137
|
+
const profile = this.allProfiles.find((profile) => profile.id === name);
|
|
138
138
|
const benchmarkVersion = profile?.spec?.benchmarkVersion;
|
|
139
139
|
const benchmark = this.$store.getters['cluster/byId'](CIS.BENCHMARK, benchmarkVersion);
|
|
140
140
|
|
|
@@ -142,12 +142,12 @@ export default {
|
|
|
142
142
|
return profile;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const cis16 = this.validProfiles.find(profile => profile.value === 'cis-1.6-profile');
|
|
145
|
+
const cis16 = this.validProfiles.find((profile) => profile.value === 'cis-1.6-profile');
|
|
146
146
|
|
|
147
147
|
if (cis16) {
|
|
148
|
-
return this.allProfiles.find(profile => profile.id === 'cis-1.6-profile');
|
|
148
|
+
return this.allProfiles.find((profile) => profile.id === 'cis-1.6-profile');
|
|
149
149
|
} else {
|
|
150
|
-
return this.allProfiles.find(profile => profile.id === 'cis-1.5-profile');
|
|
150
|
+
return this.allProfiles.find((profile) => profile.id === 'cis-1.5-profile');
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
package/edit/cloudcredential.vue
CHANGED
|
@@ -106,13 +106,13 @@ export default {
|
|
|
106
106
|
const out = [];
|
|
107
107
|
|
|
108
108
|
const drivers = [...this.nodeDrivers, ...this.kontainerDrivers]
|
|
109
|
-
.filter(x => x.spec.active && x.id !== 'rancherkubernetesengine')
|
|
110
|
-
.map(x => x.spec.displayName || x.id);
|
|
109
|
+
.filter((x) => x.spec.active && x.id !== 'rancherkubernetesengine')
|
|
110
|
+
.map((x) => x.spec.displayName || x.id);
|
|
111
111
|
|
|
112
|
-
let types = uniq(drivers.map(x => this.$store.getters['plugins/credentialDriverFor'](x)));
|
|
112
|
+
let types = uniq(drivers.map((x) => this.$store.getters['plugins/credentialDriverFor'](x)));
|
|
113
113
|
|
|
114
114
|
if ( !this.rke2Enabled ) {
|
|
115
|
-
types = types.filter(x => rke1Supports.includes(x));
|
|
115
|
+
types = types.filter((x) => rke1Supports.includes(x));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
const schema = this.$store.getters['rancher/schemaFor'](NORMAN.CLOUD_CREDENTIAL);
|
|
@@ -21,12 +21,12 @@ import Scope, { SCOPE_OPTIONS } from './Scope';
|
|
|
21
21
|
|
|
22
22
|
function findConstraintTypes(schemas) {
|
|
23
23
|
return schemas
|
|
24
|
-
.filter(schema => schema?.attributes?.group === 'constraints.gatekeeper.sh');
|
|
24
|
+
.filter((schema) => schema?.attributes?.group === 'constraints.gatekeeper.sh');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function findConstraintTypesIds(schemas) {
|
|
28
28
|
return findConstraintTypes(schemas)
|
|
29
|
-
.map(schema => schema.id);
|
|
29
|
+
.map((schema) => schema.id);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const CONSTRAINT_PREFIX = 'constraints.gatekeeper.sh.';
|
|
@@ -145,8 +145,8 @@ export default {
|
|
|
145
145
|
},
|
|
146
146
|
systemNamespaceIds() {
|
|
147
147
|
return this.$store.getters['cluster/all'](NAMESPACE)
|
|
148
|
-
.filter(namespace => namespace.isSystem)
|
|
149
|
-
.map(namespace => namespace.id);
|
|
148
|
+
.filter((namespace) => namespace.isSystem)
|
|
149
|
+
.map((namespace) => namespace.id);
|
|
150
150
|
},
|
|
151
151
|
emptyDefaults() {
|
|
152
152
|
return {
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
185
185
|
.filter((x) => {
|
|
186
186
|
return x.metadata.namespace === this.value.metadata.namespace;
|
|
187
187
|
})
|
|
188
|
-
.filter(x => !isHarvesterCluster(x))
|
|
188
|
+
.filter((x) => !isHarvesterCluster(x))
|
|
189
189
|
.map((x) => {
|
|
190
190
|
return { label: x.nameDisplay, value: `cluster://${ x.metadata.name }` };
|
|
191
191
|
});
|
|
@@ -202,7 +202,7 @@ export default {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
const groups = this.allClusterGroups
|
|
205
|
-
.filter(x => x.metadata.namespace === this.value.metadata.namespace)
|
|
205
|
+
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
206
206
|
.map((x) => {
|
|
207
207
|
return { label: x.nameDisplay, value: `group://${ x.metadata.name }` };
|
|
208
208
|
});
|
|
@@ -223,16 +223,16 @@ export default {
|
|
|
223
223
|
|
|
224
224
|
clusterNames() {
|
|
225
225
|
const out = this.allClusters
|
|
226
|
-
.filter(x => x.metadata.namespace === this.value.metadata.namespace)
|
|
227
|
-
.map(x => x.metadata.name);
|
|
226
|
+
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
227
|
+
.map((x) => x.metadata.name);
|
|
228
228
|
|
|
229
229
|
return out;
|
|
230
230
|
},
|
|
231
231
|
|
|
232
232
|
clusterGroupNames() {
|
|
233
233
|
const out = this.allClusterGroups
|
|
234
|
-
.filter(x => x.metadata.namespace === this.value.metadata.namespace)
|
|
235
|
-
.map(x => x.metadata.name);
|
|
234
|
+
.filter((x) => x.metadata.namespace === this.value.metadata.namespace)
|
|
235
|
+
.map((x) => x.metadata.name);
|
|
236
236
|
|
|
237
237
|
return out;
|
|
238
238
|
},
|