@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
package/store/type-map.js
CHANGED
|
@@ -140,13 +140,14 @@ import {
|
|
|
140
140
|
ensureRegex, escapeHtml, escapeRegex, ucFirst, pluralize
|
|
141
141
|
} from '@shell/utils/string';
|
|
142
142
|
import {
|
|
143
|
-
importChart, importList, importDetail, importEdit, listProducts, loadProduct, importCustomPromptRemove, resolveList, resolveEdit, resolveWindowComponent, importWindowComponent, resolveChart, resolveDetail, importDialog, importMachineConfig, resolveMachineConfigComponent, resolveCloudCredentialComponent, importCloudCredential
|
|
143
|
+
importChart, importList, importDetail, importEdit, listProducts, loadProduct, importCustomPromptRemove, resolveList, resolveEdit, resolveWindowComponent, importWindowComponent, importLogin, resolveChart, resolveDetail, importDialog, importMachineConfig, resolveMachineConfigComponent, resolveCloudCredentialComponent, importCloudCredential
|
|
144
144
|
} from '@shell/utils/dynamic-importer';
|
|
145
145
|
|
|
146
146
|
import { NAME as EXPLORER } from '@shell/config/product/explorer';
|
|
147
147
|
import isObject from 'lodash/isObject';
|
|
148
148
|
import { normalizeType } from '@shell/plugins/dashboard-store/normalize';
|
|
149
149
|
import { sortBy } from '@shell/utils/sort';
|
|
150
|
+
|
|
150
151
|
import { haveV1Monitoring, haveV2Monitoring } from '@shell/utils/monitoring';
|
|
151
152
|
import { NEU_VECTOR_NAMESPACE } from '@shell/config/product/neuvector';
|
|
152
153
|
|
|
@@ -172,14 +173,16 @@ const graphConfigMap = {};
|
|
|
172
173
|
const FIELD_REGEX = /^\$\.metadata\.fields\[([0-9]*)\]/;
|
|
173
174
|
|
|
174
175
|
export const IF_HAVE = {
|
|
175
|
-
V1_MONITORING:
|
|
176
|
-
V2_MONITORING:
|
|
177
|
-
PROJECT:
|
|
178
|
-
NO_PROJECT:
|
|
179
|
-
NOT_V1_ISTIO:
|
|
180
|
-
MULTI_CLUSTER:
|
|
181
|
-
NEUVECTOR_NAMESPACE:
|
|
182
|
-
ADMIN:
|
|
176
|
+
V1_MONITORING: 'v1-monitoring',
|
|
177
|
+
V2_MONITORING: 'v2-monitoring',
|
|
178
|
+
PROJECT: 'project',
|
|
179
|
+
NO_PROJECT: 'no-project',
|
|
180
|
+
NOT_V1_ISTIO: 'not-v1-istio',
|
|
181
|
+
MULTI_CLUSTER: 'multi-cluster',
|
|
182
|
+
NEUVECTOR_NAMESPACE: 'neuvector-namespace',
|
|
183
|
+
ADMIN: 'admin-user',
|
|
184
|
+
MCM_DISABLED: 'mcm-disabled',
|
|
185
|
+
NOT_STANDALONE_HARVESTER: 'not-standalone-harvester',
|
|
183
186
|
};
|
|
184
187
|
|
|
185
188
|
export function DSL(store, product, module = 'type-map') {
|
|
@@ -287,8 +290,8 @@ export function DSL(store, product, module = 'type-map') {
|
|
|
287
290
|
store.commit(`${ module }/ignoreType`, regexOrString);
|
|
288
291
|
},
|
|
289
292
|
|
|
290
|
-
ignoreGroup(regexOrString) {
|
|
291
|
-
store.commit(`${ module }/ignoreGroup`, regexOrString);
|
|
293
|
+
ignoreGroup(regexOrString, cb) {
|
|
294
|
+
store.commit(`${ module }/ignoreGroup`, { regexOrString, cb });
|
|
292
295
|
},
|
|
293
296
|
|
|
294
297
|
weightGroup(input, weight, forBasic) {
|
|
@@ -473,7 +476,7 @@ export const getters = {
|
|
|
473
476
|
const match = group.match(/^(.*)\.k8s\.io$/);
|
|
474
477
|
|
|
475
478
|
if ( match ) {
|
|
476
|
-
return match[1].split(/\./).map(x => ucFirst(x)).join('.');
|
|
479
|
+
return match[1].split(/\./).map((x) => ucFirst(x)).join('.');
|
|
477
480
|
}
|
|
478
481
|
|
|
479
482
|
return group;
|
|
@@ -775,7 +778,7 @@ export const getters = {
|
|
|
775
778
|
product = product || rootGetters['productId'];
|
|
776
779
|
const productSpoofedTypes = state.spoofedTypes[product] || [];
|
|
777
780
|
|
|
778
|
-
return productSpoofedTypes.some(st => st.type === type);
|
|
781
|
+
return productSpoofedTypes.some((st) => st.type === type);
|
|
779
782
|
};
|
|
780
783
|
},
|
|
781
784
|
|
|
@@ -808,7 +811,7 @@ export const getters = {
|
|
|
808
811
|
return async(type, product, id) => {
|
|
809
812
|
const productInstances = await getters.getSpoofedInstances(type, product);
|
|
810
813
|
|
|
811
|
-
return productInstances.find( instance => instance.id === id);
|
|
814
|
+
return productInstances.find( (instance) => instance.id === id);
|
|
812
815
|
};
|
|
813
816
|
},
|
|
814
817
|
|
|
@@ -823,7 +826,7 @@ export const getters = {
|
|
|
823
826
|
return types.flatMap((type) => {
|
|
824
827
|
const schemas = type.schemas || [];
|
|
825
828
|
|
|
826
|
-
return schemas.map(schema => ({
|
|
829
|
+
return schemas.map((schema) => ({
|
|
827
830
|
...schema,
|
|
828
831
|
isSpoofed: true
|
|
829
832
|
}));
|
|
@@ -835,7 +838,7 @@ export const getters = {
|
|
|
835
838
|
return getters.allSpoofedTypes.flatMap((type) => {
|
|
836
839
|
const schemas = type.schemas || [];
|
|
837
840
|
|
|
838
|
-
return schemas.map(schema => ({
|
|
841
|
+
return schemas.map((schema) => ({
|
|
839
842
|
...schema,
|
|
840
843
|
isSpoofed: true
|
|
841
844
|
}));
|
|
@@ -918,7 +921,7 @@ export const getters = {
|
|
|
918
921
|
const targetedSchemas = typeof item.ifHaveType === 'string' ? schemas : rootGetters[`${ item.ifHaveType.store }/all`](SCHEMA);
|
|
919
922
|
const type = typeof item.ifHaveType === 'string' ? item.ifHaveType : item.ifHaveType?.type;
|
|
920
923
|
|
|
921
|
-
const haveIds = filterBy(targetedSchemas, 'id', normalizeType(type)).map(s => s.id);
|
|
924
|
+
const haveIds = filterBy(targetedSchemas, 'id', normalizeType(type)).map((s) => s.id);
|
|
922
925
|
|
|
923
926
|
if (!haveIds.length) {
|
|
924
927
|
continue;
|
|
@@ -1001,7 +1004,7 @@ export const getters = {
|
|
|
1001
1004
|
} else {
|
|
1002
1005
|
return entry;
|
|
1003
1006
|
}
|
|
1004
|
-
}).filter(col => !!col);
|
|
1007
|
+
}).filter((col) => !!col);
|
|
1005
1008
|
}
|
|
1006
1009
|
|
|
1007
1010
|
// Otherwise make one up from schema
|
|
@@ -1055,7 +1058,7 @@ export const getters = {
|
|
|
1055
1058
|
formatter = 'Number';
|
|
1056
1059
|
}
|
|
1057
1060
|
|
|
1058
|
-
const colName = col.name.includes(' ') ? col.name.split(' ').map(word => word.charAt(0).toUpperCase() + word.substring(1) ).join('') : col.name;
|
|
1061
|
+
const colName = col.name.includes(' ') ? col.name.split(' ').map((word) => word.charAt(0).toUpperCase() + word.substring(1) ).join('') : col.name;
|
|
1059
1062
|
|
|
1060
1063
|
const exists = rootGetters['i18n/exists'];
|
|
1061
1064
|
const t = rootGetters['i18n/t'];
|
|
@@ -1089,7 +1092,7 @@ export const getters = {
|
|
|
1089
1092
|
return (rawType) => {
|
|
1090
1093
|
const key = getters.componentFor(rawType);
|
|
1091
1094
|
|
|
1092
|
-
return hasCustom(state, rootState, 'list', key, key => resolveList(key));
|
|
1095
|
+
return hasCustom(state, rootState, 'list', key, (key) => resolveList(key));
|
|
1093
1096
|
};
|
|
1094
1097
|
},
|
|
1095
1098
|
|
|
@@ -1097,7 +1100,7 @@ export const getters = {
|
|
|
1097
1100
|
return (rawType) => {
|
|
1098
1101
|
const key = getters.componentFor(rawType);
|
|
1099
1102
|
|
|
1100
|
-
return hasCustom(state, rootState, 'chart', key, key => resolveChart(key));
|
|
1103
|
+
return hasCustom(state, rootState, 'chart', key, (key) => resolveChart(key));
|
|
1101
1104
|
};
|
|
1102
1105
|
},
|
|
1103
1106
|
|
|
@@ -1105,7 +1108,7 @@ export const getters = {
|
|
|
1105
1108
|
return (rawType, subType) => {
|
|
1106
1109
|
const key = getters.componentFor(rawType, subType);
|
|
1107
1110
|
|
|
1108
|
-
return hasCustom(state, rootState, 'detail', key, key => resolveDetail(key));
|
|
1111
|
+
return hasCustom(state, rootState, 'detail', key, (key) => resolveDetail(key));
|
|
1109
1112
|
};
|
|
1110
1113
|
},
|
|
1111
1114
|
|
|
@@ -1125,13 +1128,13 @@ export const getters = {
|
|
|
1125
1128
|
return (rawType, subType) => {
|
|
1126
1129
|
const key = getters.componentFor(rawType, subType);
|
|
1127
1130
|
|
|
1128
|
-
return hasCustom(state, rootState, 'edit', key, key => resolveEdit(key));
|
|
1131
|
+
return hasCustom(state, rootState, 'edit', key, (key) => resolveEdit(key));
|
|
1129
1132
|
};
|
|
1130
1133
|
},
|
|
1131
1134
|
|
|
1132
1135
|
hasComponent(state, getters, rootState) {
|
|
1133
1136
|
return (path) => {
|
|
1134
|
-
return hasCustom(state, rootState, 'edit', path, path => resolveEdit(path));
|
|
1137
|
+
return hasCustom(state, rootState, 'edit', path, (path) => resolveEdit(path));
|
|
1135
1138
|
};
|
|
1136
1139
|
},
|
|
1137
1140
|
|
|
@@ -1147,7 +1150,7 @@ export const getters = {
|
|
|
1147
1150
|
return (rawType, subType) => {
|
|
1148
1151
|
const key = getters.componentFor(rawType, subType);
|
|
1149
1152
|
|
|
1150
|
-
return hasCustom(state, rootState, 'windowComponents', key, key => resolveWindowComponent(key));
|
|
1153
|
+
return hasCustom(state, rootState, 'windowComponents', key, (key) => resolveWindowComponent(key));
|
|
1151
1154
|
};
|
|
1152
1155
|
},
|
|
1153
1156
|
|
|
@@ -1155,7 +1158,7 @@ export const getters = {
|
|
|
1155
1158
|
return (rawType, subType) => {
|
|
1156
1159
|
const key = getters.componentFor(rawType, subType);
|
|
1157
1160
|
|
|
1158
|
-
return hasCustom(state, rootState, 'machine-config', key, key => resolveMachineConfigComponent(key));
|
|
1161
|
+
return hasCustom(state, rootState, 'machine-config', key, (key) => resolveMachineConfigComponent(key));
|
|
1159
1162
|
};
|
|
1160
1163
|
},
|
|
1161
1164
|
|
|
@@ -1163,7 +1166,7 @@ export const getters = {
|
|
|
1163
1166
|
return (rawType, subType) => {
|
|
1164
1167
|
const key = getters.componentFor(rawType, subType);
|
|
1165
1168
|
|
|
1166
|
-
return hasCustom(state, rootState, 'cloud-credential', key, key => resolveCloudCredentialComponent(key));
|
|
1169
|
+
return hasCustom(state, rootState, 'cloud-credential', key, (key) => resolveCloudCredentialComponent(key));
|
|
1167
1170
|
};
|
|
1168
1171
|
},
|
|
1169
1172
|
|
|
@@ -1215,6 +1218,12 @@ export const getters = {
|
|
|
1215
1218
|
};
|
|
1216
1219
|
},
|
|
1217
1220
|
|
|
1221
|
+
importLogin(state, getters, rootState) {
|
|
1222
|
+
return (authType) => {
|
|
1223
|
+
return loadExtension(rootState, 'login', authType, importLogin);
|
|
1224
|
+
};
|
|
1225
|
+
},
|
|
1226
|
+
|
|
1218
1227
|
importMachineConfig(state, getters, rootState) {
|
|
1219
1228
|
return (rawType, subType) => {
|
|
1220
1229
|
return loadExtension(rootState, 'machine-config', getters.componentFor(rawType, subType), importMachineConfig);
|
|
@@ -1260,18 +1269,19 @@ export const getters = {
|
|
|
1260
1269
|
};
|
|
1261
1270
|
},
|
|
1262
1271
|
|
|
1263
|
-
isIgnored(state) {
|
|
1272
|
+
isIgnored(state, getters, rootState, rootGetters) {
|
|
1264
1273
|
return (schema) => {
|
|
1265
|
-
if ( state.cache.ignore[schema.id] !== undefined ) {
|
|
1266
|
-
return state.cache.ignore[schema.id];
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
1274
|
let out = false;
|
|
1270
1275
|
|
|
1271
1276
|
for ( const rule of state.groupIgnore ) {
|
|
1272
1277
|
const group = schema?.attributes?.group;
|
|
1273
1278
|
|
|
1274
|
-
if (
|
|
1279
|
+
if (group && group.match(stringToRegex(rule.type) && isObject(rule) && rule.type)) {
|
|
1280
|
+
out = rule.cb(rootGetters);
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
if ( group && typeof rule === 'string' && group.match(stringToRegex(rule)) ) {
|
|
1275
1285
|
out = true;
|
|
1276
1286
|
break;
|
|
1277
1287
|
}
|
|
@@ -1344,7 +1354,7 @@ export const getters = {
|
|
|
1344
1354
|
}
|
|
1345
1355
|
|
|
1346
1356
|
if ( p.ifHaveType ) {
|
|
1347
|
-
const haveIds = knownTypes[module].filter(t => t.match(stringToRegex(p.ifHaveType)) );
|
|
1357
|
+
const haveIds = knownTypes[module].filter((t) => t.match(stringToRegex(p.ifHaveType)) );
|
|
1348
1358
|
|
|
1349
1359
|
if ( !haveIds.length ) {
|
|
1350
1360
|
return false;
|
|
@@ -1355,7 +1365,7 @@ export const getters = {
|
|
|
1355
1365
|
}
|
|
1356
1366
|
}
|
|
1357
1367
|
|
|
1358
|
-
if ( p.ifHaveGroup && !knownGroups[module].find(t => t.match(stringToRegex(p.ifHaveGroup)) ) ) {
|
|
1368
|
+
if ( p.ifHaveGroup && !knownGroups[module].find((t) => t.match(stringToRegex(p.ifHaveGroup)) ) ) {
|
|
1359
1369
|
return false;
|
|
1360
1370
|
}
|
|
1361
1371
|
|
|
@@ -1389,7 +1399,7 @@ export const mutations = {
|
|
|
1389
1399
|
|
|
1390
1400
|
// Remove the specified product
|
|
1391
1401
|
remove(state, { product, plugin }) {
|
|
1392
|
-
const existing = state.products.findIndex(p => p.name === product);
|
|
1402
|
+
const existing = state.products.findIndex((p) => p.name === product);
|
|
1393
1403
|
|
|
1394
1404
|
// Remove the product
|
|
1395
1405
|
if (existing !== -1) {
|
|
@@ -1518,10 +1528,13 @@ export const mutations = {
|
|
|
1518
1528
|
}
|
|
1519
1529
|
},
|
|
1520
1530
|
|
|
1521
|
-
ignoreGroup(state, match) {
|
|
1531
|
+
ignoreGroup(state, { regexOrString: match, cb }) {
|
|
1522
1532
|
match = ensureRegex(match);
|
|
1523
1533
|
// State shouldn't contain actual RegExp objects, because they don't serialize
|
|
1524
|
-
state.groupIgnore.push(
|
|
1534
|
+
cb ? state.groupIgnore.push({
|
|
1535
|
+
type: regexToString(match),
|
|
1536
|
+
cb
|
|
1537
|
+
}) : state.groupIgnore.push(regexToString(match));
|
|
1525
1538
|
},
|
|
1526
1539
|
|
|
1527
1540
|
ignoreType(state, match) {
|
|
@@ -1628,7 +1641,7 @@ export const mutations = {
|
|
|
1628
1641
|
configureType(state, options) {
|
|
1629
1642
|
const match = regexToString(ensureRegex(options.match));
|
|
1630
1643
|
|
|
1631
|
-
const idx = state.typeOptions.findIndex(obj => obj.match === match);
|
|
1644
|
+
const idx = state.typeOptions.findIndex((obj) => obj.match === match);
|
|
1632
1645
|
let obj = { ...options, match };
|
|
1633
1646
|
|
|
1634
1647
|
if ( idx >= 0 ) {
|
|
@@ -1818,11 +1831,17 @@ function ifHave(getters, option) {
|
|
|
1818
1831
|
return getters.isMultiCluster;
|
|
1819
1832
|
}
|
|
1820
1833
|
case IF_HAVE.NEUVECTOR_NAMESPACE: {
|
|
1821
|
-
return getters[`cluster/all`](NAMESPACE).find(n => n.metadata.name === NEU_VECTOR_NAMESPACE);
|
|
1834
|
+
return getters[`cluster/all`](NAMESPACE).find((n) => n.metadata.name === NEU_VECTOR_NAMESPACE);
|
|
1822
1835
|
}
|
|
1823
1836
|
case IF_HAVE.ADMIN: {
|
|
1824
1837
|
return isAdminUser(getters);
|
|
1825
1838
|
}
|
|
1839
|
+
case IF_HAVE.MCM_DISABLED: {
|
|
1840
|
+
return !getters['isRancherInHarvester'];
|
|
1841
|
+
}
|
|
1842
|
+
case IF_HAVE.NOT_STANDALONE_HARVESTER: {
|
|
1843
|
+
return !getters['isStandaloneHarvester'];
|
|
1844
|
+
}
|
|
1826
1845
|
default:
|
|
1827
1846
|
return false;
|
|
1828
1847
|
}
|
|
@@ -1858,7 +1877,7 @@ function _rowValueGetter(col) {
|
|
|
1858
1877
|
if (found && found.length === 2) {
|
|
1859
1878
|
const fieldIndex = parseInt(found[1], 10);
|
|
1860
1879
|
|
|
1861
|
-
return row => row.metadata?.fields?.[fieldIndex];
|
|
1880
|
+
return (row) => row.metadata?.fields?.[fieldIndex];
|
|
1862
1881
|
}
|
|
1863
1882
|
}
|
|
1864
1883
|
|
|
@@ -1878,7 +1897,7 @@ function ifHaveVerb(rootGetters, module, verb, haveIds) {
|
|
|
1878
1897
|
const want = verb.toLowerCase();
|
|
1879
1898
|
const collectionMethods = schema.collectionMethods || [];
|
|
1880
1899
|
const resourceMethods = schema.resourceMethods || [];
|
|
1881
|
-
const have = [...collectionMethods, ...resourceMethods].map(x => x.toLowerCase());
|
|
1900
|
+
const have = [...collectionMethods, ...resourceMethods].map((x) => x.toLowerCase());
|
|
1882
1901
|
|
|
1883
1902
|
if ( !have.includes(want) && !have.includes(`blocked-${ want }`) ) {
|
|
1884
1903
|
return false;
|
package/store/uiplugins.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
1
2
|
// We already have a 'plugins' store, which is for cluster drivers
|
|
2
3
|
// This store is for the instsall UI plugins
|
|
3
4
|
|
|
@@ -43,7 +44,7 @@ export const mutations = {
|
|
|
43
44
|
},
|
|
44
45
|
|
|
45
46
|
removePlugin(state: UIPluginState, pluginName: string) {
|
|
46
|
-
const index = state.plugins.findIndex(p => p.name === pluginName);
|
|
47
|
+
const index = state.plugins.findIndex((p) => p.name === pluginName);
|
|
47
48
|
|
|
48
49
|
if (index !== -1) {
|
|
49
50
|
state.plugins.splice(index, 1);
|
package/store/wm.js
CHANGED
|
@@ -12,14 +12,15 @@ export const state = function() {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const getters = {
|
|
15
|
-
byId: state => (id) => {
|
|
16
|
-
return state.tabs.find(x => x.id === id);
|
|
17
|
-
}
|
|
15
|
+
byId: (state) => (id) => {
|
|
16
|
+
return state.tabs.find((x) => x.id === id);
|
|
17
|
+
},
|
|
18
|
+
allTabs: (state) => state.tabs,
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export const mutations = {
|
|
21
22
|
addTab(state, tab) {
|
|
22
|
-
const existing = state.tabs.find(x => x.id === tab.id);
|
|
23
|
+
const existing = state.tabs.find((x) => x.id === tab.id);
|
|
23
24
|
|
|
24
25
|
if ( !existing ) {
|
|
25
26
|
addObject(state.tabs, tab);
|
package/tsconfig.default.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -4,20 +4,13 @@
|
|
|
4
4
|
"types": [
|
|
5
5
|
"@types/node",
|
|
6
6
|
"@types/jest",
|
|
7
|
+
"@nuxt/types",
|
|
7
8
|
]
|
|
8
9
|
},
|
|
9
10
|
"exclude": [
|
|
10
|
-
"node_modules",
|
|
11
|
-
".nuxt",
|
|
12
|
-
"dist",
|
|
13
|
-
"dist-pkg",
|
|
14
|
-
"cypress",
|
|
15
|
-
"shell/creators",
|
|
16
|
-
"shell/scripts",
|
|
17
11
|
"cypress",
|
|
18
12
|
"./cypress.config.ts",
|
|
19
|
-
"
|
|
20
|
-
"script/standalone",
|
|
13
|
+
"**/*.test.ts",
|
|
21
14
|
"**/*.spec.ts"
|
|
22
15
|
]
|
|
23
16
|
}
|
package/types/shell/index.d.ts
CHANGED
|
@@ -1923,7 +1923,7 @@ export default _default;
|
|
|
1923
1923
|
// @shell/mixins/create-edit-view
|
|
1924
1924
|
|
|
1925
1925
|
declare module '@shell/mixins/create-edit-view' {
|
|
1926
|
-
declare var _default: import("vue/types/vue").ExtendedVue<Vue, {
|
|
1926
|
+
declare var _default: import("vue/types/vue").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>, {
|
|
1927
1927
|
errors: any[];
|
|
1928
1928
|
}, {
|
|
1929
1929
|
done(): any;
|
|
@@ -1949,7 +1949,7 @@ declare var _default: import("vue/types/vue").ExtendedVue<Vue, {
|
|
|
1949
1949
|
initialValue: any;
|
|
1950
1950
|
liveValue: any;
|
|
1951
1951
|
doneEvent: boolean;
|
|
1952
|
-
}>;
|
|
1952
|
+
}, {}, any, import("vue/types/v3-component-options").ComponentOptionsMixin>;
|
|
1953
1953
|
export default _default;
|
|
1954
1954
|
import Vue from "vue";
|
|
1955
1955
|
}
|
|
@@ -2356,6 +2356,7 @@ export const RKE2: any;
|
|
|
2356
2356
|
export const UNSUPPORTED_STORAGE_DRIVERS: any;
|
|
2357
2357
|
export const FLEET: any;
|
|
2358
2358
|
export const HARVESTER: any;
|
|
2359
|
+
export const HARVESTER_CONTAINER: any;
|
|
2359
2360
|
export namespace getters {
|
|
2360
2361
|
function get(state: any, getters: any, rootState: any, rootGetters: any): (name: any) => any;
|
|
2361
2362
|
}
|
|
@@ -2426,7 +2427,7 @@ export default _default;
|
|
|
2426
2427
|
// @shell/utils/cluster
|
|
2427
2428
|
|
|
2428
2429
|
declare module '@shell/utils/cluster' {
|
|
2429
|
-
export function filterOnlyKubernetesClusters(mgmtClusters: any): any;
|
|
2430
|
+
export function filterOnlyKubernetesClusters(mgmtClusters: any, store: any): any;
|
|
2430
2431
|
export function isHarvesterCluster(mgmtCluster: any): boolean;
|
|
2431
2432
|
export function isHarvesterSatisfiesVersion(version?: string): any;
|
|
2432
2433
|
export function filterHiddenLocalCluster(mgmtClusters: any, store: any): any;
|
|
@@ -2460,6 +2461,7 @@ export function colorToRgb(color: any): {
|
|
|
2460
2461
|
g: number;
|
|
2461
2462
|
b: number;
|
|
2462
2463
|
};
|
|
2464
|
+
export function normalizeHex(hex: any): any;
|
|
2463
2465
|
}
|
|
2464
2466
|
|
|
2465
2467
|
// @shell/utils/computed
|
|
@@ -2638,7 +2640,7 @@ export function setFavIcon(store: any): void;
|
|
|
2638
2640
|
|
|
2639
2641
|
declare module '@shell/utils/grafana' {
|
|
2640
2642
|
export function getClusterPrefix(monitoringVersion: any, clusterId: any): string;
|
|
2641
|
-
export function computeDashboardUrl(monitoringVersion: any, embedUrl: any, clusterId: any, params: any):
|
|
2643
|
+
export function computeDashboardUrl(monitoringVersion: any, embedUrl: any, clusterId: any, params: any, modifyPrefix?: boolean): any;
|
|
2642
2644
|
export function dashboardExists(monitoringVersion: any, store: any, clusterId: any, embedUrl: any, storeName?: string): Promise<boolean>;
|
|
2643
2645
|
export function allDashboardsExist(store: any, clusterId: any, embeddedUrls: any, storeName?: string): Promise<boolean>;
|
|
2644
2646
|
export function queryGrafana(monitoringVersion: any, dispatch: any, clusterId: any, query: any, range: any, step: any): any;
|
|
@@ -2844,35 +2846,35 @@ export namespace KEY {
|
|
|
2844
2846
|
}
|
|
2845
2847
|
}
|
|
2846
2848
|
|
|
2847
|
-
// @shell/utils/poller
|
|
2849
|
+
// @shell/utils/poller
|
|
2848
2850
|
|
|
2849
|
-
declare module '@shell/utils/poller
|
|
2850
|
-
export default class
|
|
2851
|
+
declare module '@shell/utils/poller' {
|
|
2852
|
+
export default class Poller {
|
|
2851
2853
|
constructor(fn: any, pollRateMs: any, maxRetries?: number);
|
|
2852
2854
|
fn: any;
|
|
2853
2855
|
pollRateMs: any;
|
|
2854
2856
|
maxRetries: number;
|
|
2855
|
-
|
|
2857
|
+
intervalId: any;
|
|
2856
2858
|
tryCount: number;
|
|
2857
2859
|
start(): void;
|
|
2858
2860
|
stop(): void;
|
|
2859
|
-
_poll(): void;
|
|
2860
2861
|
_intervalMethod(): Promise<void>;
|
|
2861
2862
|
}
|
|
2862
2863
|
}
|
|
2863
2864
|
|
|
2864
|
-
// @shell/utils/poller
|
|
2865
|
+
// @shell/utils/poller-sequential
|
|
2865
2866
|
|
|
2866
|
-
declare module '@shell/utils/poller' {
|
|
2867
|
-
export default class
|
|
2867
|
+
declare module '@shell/utils/poller-sequential' {
|
|
2868
|
+
export default class PollerSequential {
|
|
2868
2869
|
constructor(fn: any, pollRateMs: any, maxRetries?: number);
|
|
2869
2870
|
fn: any;
|
|
2870
2871
|
pollRateMs: any;
|
|
2871
2872
|
maxRetries: number;
|
|
2872
|
-
|
|
2873
|
+
timeoutId: any;
|
|
2873
2874
|
tryCount: number;
|
|
2874
2875
|
start(): void;
|
|
2875
2876
|
stop(): void;
|
|
2877
|
+
_poll(): void;
|
|
2876
2878
|
_intervalMethod(): Promise<void>;
|
|
2877
2879
|
}
|
|
2878
2880
|
}
|
|
@@ -3011,6 +3013,7 @@ export default class Socket extends Socket_base {
|
|
|
3011
3013
|
disconnectCallBacks: any[];
|
|
3012
3014
|
disconnectedAt: number;
|
|
3013
3015
|
closingId: number;
|
|
3016
|
+
autoReconnectUrl: any;
|
|
3014
3017
|
setUrl(url: any): void;
|
|
3015
3018
|
connect(metadata?: {}): void;
|
|
3016
3019
|
send(data: any): boolean;
|
|
@@ -3020,6 +3023,10 @@ export default class Socket extends Socket_base {
|
|
|
3020
3023
|
getId(): any;
|
|
3021
3024
|
isConnected(): boolean;
|
|
3022
3025
|
setAutoReconnect(autoReconnect: any): void;
|
|
3026
|
+
/**
|
|
3027
|
+
* Supply an async fn that will provide a new url to reconnect to
|
|
3028
|
+
*/
|
|
3029
|
+
setAutoReconnectUrl(autoReconnectUrl: any): void;
|
|
3023
3030
|
_close(): void;
|
|
3024
3031
|
_opened(): void;
|
|
3025
3032
|
_onmessage(event: any): void;
|
|
@@ -3313,6 +3320,7 @@ export function seenReleaseNotes(store: any): boolean;
|
|
|
3313
3320
|
export function markSeenReleaseNotes(store: any): Promise<void>;
|
|
3314
3321
|
export function readReleaseNotes(store: any): boolean;
|
|
3315
3322
|
export function markReadReleaseNotes(store: any): Promise<void>;
|
|
3323
|
+
export function generateSupportLink(version: any): string;
|
|
3316
3324
|
}
|
|
3317
3325
|
|
|
3318
3326
|
// @shell/utils/width
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { generateSupportLink } from '@shell/utils/version';
|
|
2
|
+
|
|
3
|
+
describe('fx: generateSupportLink', () => {
|
|
4
|
+
it('should generate support link corresponding to the installed Rancher version', () => {
|
|
5
|
+
const version = 'v2.7.5';
|
|
6
|
+
const expectation = 'https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/rancher-v2-7-5';
|
|
7
|
+
|
|
8
|
+
const result = generateSupportLink(version);
|
|
9
|
+
|
|
10
|
+
expect(result).toStrictEqual(expectation);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const latestVersionSupportURL = 'https://rancher.com/support-maintenance-terms';
|
|
14
|
+
const testCases = [
|
|
15
|
+
['v2.7-0bcf068e1237acafd4aca01385c7c6b432e22fd7-head', latestVersionSupportURL],
|
|
16
|
+
['v2.7.5-rc4', latestVersionSupportURL],
|
|
17
|
+
[undefined, latestVersionSupportURL],
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
it.each(testCases)(
|
|
21
|
+
'should generate support link corresponding to the latest Rancher version when version is unknown or for dev build',
|
|
22
|
+
(version, expected) => {
|
|
23
|
+
const result = generateSupportLink(version);
|
|
24
|
+
|
|
25
|
+
expect(result).toBe(expected);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
});
|
|
@@ -71,7 +71,7 @@ export async function updateConfig(dispatch, path, type, updateFn) {
|
|
|
71
71
|
set(config, path, newValue);
|
|
72
72
|
|
|
73
73
|
const routes = config.route.routes;
|
|
74
|
-
const rootIndex = routes.findIndex(route => route.name === ROOT_NAME);
|
|
74
|
+
const rootIndex = routes.findIndex((route) => route.name === ROOT_NAME);
|
|
75
75
|
|
|
76
76
|
routes.forEach((route) => {
|
|
77
77
|
if (route.name) {
|
|
@@ -97,8 +97,8 @@ export async function getAllReceivers(dispatch) {
|
|
|
97
97
|
try {
|
|
98
98
|
const { config, secret } = await loadConfig(dispatch);
|
|
99
99
|
const receivers = config.receivers || [];
|
|
100
|
-
const receiversWithName = receivers.filter(receiver => receiver.name);
|
|
101
|
-
const mapped = receiversWithName.map(receiver => dispatch('cluster/create', {
|
|
100
|
+
const receiversWithName = receivers.filter((receiver) => receiver.name);
|
|
101
|
+
const mapped = receiversWithName.map((receiver) => dispatch('cluster/create', {
|
|
102
102
|
id: receiver.name,
|
|
103
103
|
spec: receiver,
|
|
104
104
|
type: MONITORING.SPOOFED.RECEIVER,
|
|
@@ -123,7 +123,7 @@ export async function getAllRoutes(dispatch) {
|
|
|
123
123
|
|
|
124
124
|
routes.push(config.route);
|
|
125
125
|
|
|
126
|
-
const mapped = routes.map(route => dispatch('cluster/create', {
|
|
126
|
+
const mapped = routes.map((route) => dispatch('cluster/create', {
|
|
127
127
|
id: route.name,
|
|
128
128
|
spec: route,
|
|
129
129
|
type: MONITORING.SPOOFED.ROUTE,
|
package/utils/array.ts
CHANGED
|
@@ -160,7 +160,7 @@ export function findStringIndex(items: string[], item: string, trim = true): num
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
export function hasDuplicatedStrings(items: string[], caseSensitive = true): boolean {
|
|
163
|
-
const normalizedItems = items.map(i => (caseSensitive ? i : i.toLowerCase()).trim());
|
|
163
|
+
const normalizedItems = items.map((i) => (caseSensitive ? i : i.toLowerCase()).trim());
|
|
164
164
|
|
|
165
165
|
for (let i = 0; i < items.length; i++) {
|
|
166
166
|
const index = findStringIndex(
|
|
@@ -188,14 +188,14 @@ export function uniq<T>(ary: T[]): T[] {
|
|
|
188
188
|
return out;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
export function concatStrings(a: string[], b: string[]) {
|
|
192
|
-
return [...a.map(aa => b.map(bb => aa.concat(bb)))].reduce((acc, arr) => [...arr, ...acc], []);
|
|
191
|
+
export function concatStrings(a: string[], b: string[]): string[] {
|
|
192
|
+
return [...a.map((aa) => b.map((bb) => aa.concat(bb)))].reduce((acc, arr) => [...arr, ...acc], []);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
interface KubeResource { metadata: { labels: { [name: string]: string} } } // Migrate to central kube types resource when those are brought in
|
|
196
196
|
export function getUniqueLabelKeys<T extends KubeResource>(aryResources: T[]): string[] {
|
|
197
197
|
const uniqueObj = aryResources.reduce((res, r) => {
|
|
198
|
-
Object.keys(r.metadata.labels).forEach(l => (res[l] = true));
|
|
198
|
+
Object.keys(r.metadata.labels).forEach((l) => (res[l] = true));
|
|
199
199
|
|
|
200
200
|
return res;
|
|
201
201
|
}, {} as {[label: string]: boolean});
|
package/utils/async.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const waitFor = (testFn: Function, msg = '', timeoutMs = 3000000, intervalMs = 500, log = false) => {
|
|
1
|
+
export const waitFor = (testFn: Function, msg = '', timeoutMs = 3000000, intervalMs = 500, log = false): Promise<unknown> => {
|
|
2
2
|
gatedLog('Starting wait for', msg);
|
|
3
3
|
|
|
4
4
|
return new Promise((resolve, reject) => {
|
package/utils/auth.js
CHANGED
|
@@ -63,10 +63,10 @@ export function returnTo(opt, vm) {
|
|
|
63
63
|
*/
|
|
64
64
|
export const authProvidersInfo = async(store) => {
|
|
65
65
|
const rows = await store.dispatch(`management/findAll`, { type: MANAGEMENT.AUTH_CONFIG });
|
|
66
|
-
const nonLocal = rows.filter(x => x.name !== 'local');
|
|
66
|
+
const nonLocal = rows.filter((x) => x.name !== 'local');
|
|
67
67
|
// Generic OIDC is returned via API but not supported (and will be removed or fixed in future)
|
|
68
|
-
const supportedNonLocal = nonLocal.filter(x => x.id !== 'oidc');
|
|
69
|
-
const enabled = nonLocal.filter(x => x.enabled === true );
|
|
68
|
+
const supportedNonLocal = nonLocal.filter((x) => x.id !== 'oidc');
|
|
69
|
+
const enabled = nonLocal.filter((x) => x.enabled === true );
|
|
70
70
|
|
|
71
71
|
const enabledLocation = enabled.length === 1 ? {
|
|
72
72
|
name: 'c-cluster-auth-config-id',
|
package/utils/axios.js
CHANGED
|
@@ -23,16 +23,16 @@ const axiosExtra = {
|
|
|
23
23
|
this.setHeader('Authorization', value, scopes);
|
|
24
24
|
},
|
|
25
25
|
onRequest(fn) {
|
|
26
|
-
this.interceptors.request.use(config => fn(config) || config);
|
|
26
|
+
this.interceptors.request.use((config) => fn(config) || config);
|
|
27
27
|
},
|
|
28
28
|
onResponse(fn) {
|
|
29
|
-
this.interceptors.response.use(response => fn(response) || response);
|
|
29
|
+
this.interceptors.response.use((response) => fn(response) || response);
|
|
30
30
|
},
|
|
31
31
|
onRequestError(fn) {
|
|
32
|
-
this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error));
|
|
32
|
+
this.interceptors.request.use(undefined, (error) => fn(error) || Promise.reject(error));
|
|
33
33
|
},
|
|
34
34
|
onResponseError(fn) {
|
|
35
|
-
this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error));
|
|
35
|
+
this.interceptors.response.use(undefined, (error) => fn(error) || Promise.reject(error));
|
|
36
36
|
},
|
|
37
37
|
onError(fn) {
|
|
38
38
|
this.onRequestError(fn);
|
|
@@ -46,7 +46,7 @@ const axiosExtra = {
|
|
|
46
46
|
// Request helpers ($get, $post, ...)
|
|
47
47
|
for (const method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) {
|
|
48
48
|
axiosExtra[`$${ method }`] = function() {
|
|
49
|
-
return this[method].apply(this, arguments).then(res => res && res.data);
|
|
49
|
+
return this[method].apply(this, arguments).then((res) => res && res.data);
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
package/utils/cluster.js
CHANGED
|
@@ -4,10 +4,11 @@ import { MANAGEMENT, VIRTUAL_HARVESTER_PROVIDER } from '@shell/config/types';
|
|
|
4
4
|
import { SETTING } from '@shell/config/settings';
|
|
5
5
|
|
|
6
6
|
// Filter out any clusters that are not Kubernetes Clusters
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
export function filterOnlyKubernetesClusters(mgmtClusters, store) {
|
|
8
|
+
const openHarvesterContainerWorkload = store.getters['features/get']('harvester-baremetal-container-workload');
|
|
9
|
+
|
|
9
10
|
return mgmtClusters.filter((c) => {
|
|
10
|
-
return !c.isHarvester;
|
|
11
|
+
return openHarvesterContainerWorkload ? true : !c.isHarvester;
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
|