@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
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
|
|
44
44
|
computed: {
|
|
45
45
|
...mapGetters(['clusterId']),
|
|
46
|
-
...mapGetters(['clusterReady', 'isRancher', 'currentCluster', 'currentProduct']),
|
|
46
|
+
...mapGetters(['clusterReady', 'isRancher', 'currentCluster', 'currentProduct', 'isRancherInHarvester']),
|
|
47
47
|
...mapGetters('type-map', ['activeProducts']),
|
|
48
48
|
...mapGetters({ features: 'features/get' }),
|
|
49
49
|
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
|
|
64
64
|
clusters() {
|
|
65
65
|
const all = this.$store.getters['management/all'](MANAGEMENT.CLUSTER);
|
|
66
|
-
let kubeClusters = filterHiddenLocalCluster(filterOnlyKubernetesClusters(all), this.$store);
|
|
66
|
+
let kubeClusters = filterHiddenLocalCluster(filterOnlyKubernetesClusters(all, this.$store), this.$store);
|
|
67
67
|
let pClusters = null;
|
|
68
68
|
|
|
69
69
|
if (this.hasProvCluster) {
|
|
@@ -77,11 +77,11 @@ export default {
|
|
|
77
77
|
// Filter to only show mgmt clusters that exist for the available provisionning clusters
|
|
78
78
|
// Addresses issue where a mgmt cluster can take some time to get cleaned up after the corresponding
|
|
79
79
|
// provisionning cluster has been deleted
|
|
80
|
-
kubeClusters = kubeClusters.filter(c => !!available[c]);
|
|
80
|
+
kubeClusters = kubeClusters.filter((c) => !!available[c]);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
return kubeClusters.map((x) => {
|
|
84
|
-
const pCluster = pClusters?.find(c => c.mgmt.id === x.id);
|
|
84
|
+
const pCluster = pClusters?.find((c) => c.mgmt.id === x.id);
|
|
85
85
|
|
|
86
86
|
return {
|
|
87
87
|
id: x.id,
|
|
@@ -90,7 +90,8 @@ export default {
|
|
|
90
90
|
osLogo: x.providerOsLogo,
|
|
91
91
|
providerNavLogo: x.providerMenuLogo,
|
|
92
92
|
badge: x.badge,
|
|
93
|
-
isLocal: x.isLocal
|
|
93
|
+
isLocal: x.isLocal,
|
|
94
|
+
isHarvester: x.isHarvester
|
|
94
95
|
};
|
|
95
96
|
});
|
|
96
97
|
},
|
|
@@ -98,7 +99,7 @@ export default {
|
|
|
98
99
|
clustersFiltered() {
|
|
99
100
|
const search = (this.clusterFilter || '').toLowerCase();
|
|
100
101
|
|
|
101
|
-
const out = search ? this.clusters.filter(item => item.label.toLowerCase().includes(search)) : this.clusters;
|
|
102
|
+
const out = search ? this.clusters.filter((item) => item.label.toLowerCase().includes(search)) : this.clusters;
|
|
102
103
|
|
|
103
104
|
const sorted = sortBy(out, ['name:desc', 'label']);
|
|
104
105
|
|
|
@@ -110,23 +111,39 @@ export default {
|
|
|
110
111
|
multiClusterApps() {
|
|
111
112
|
const options = this.options;
|
|
112
113
|
|
|
113
|
-
return options.filter(
|
|
114
|
+
return options.filter((opt) => {
|
|
115
|
+
const filterApps = (opt.inStore === 'management' || opt.isMultiClusterApp) && opt.category !== 'configuration' && opt.category !== 'legacy';
|
|
116
|
+
|
|
117
|
+
if (this.isRancherInHarvester) {
|
|
118
|
+
return filterApps && opt.category !== 'hci';
|
|
119
|
+
} else {
|
|
120
|
+
// We expect the location of Virtualization Management to remain the same when rancher-manage-support is not enabled
|
|
121
|
+
return filterApps;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
114
124
|
},
|
|
115
125
|
|
|
116
126
|
legacyApps() {
|
|
117
127
|
const options = this.options;
|
|
118
128
|
|
|
119
|
-
return options.filter(opt => opt.inStore === 'management' && opt.category === 'legacy');
|
|
129
|
+
return options.filter((opt) => opt.inStore === 'management' && opt.category === 'legacy');
|
|
120
130
|
},
|
|
121
131
|
|
|
122
132
|
configurationApps() {
|
|
123
133
|
const options = this.options;
|
|
124
134
|
|
|
125
|
-
return options.filter(opt => opt.category === 'configuration');
|
|
135
|
+
return options.filter((opt) => opt.category === 'configuration');
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
hciApps() {
|
|
139
|
+
const options = this.options;
|
|
140
|
+
|
|
141
|
+
return options.filter((opt) => this.isRancherInHarvester && opt.category === 'hci');
|
|
126
142
|
},
|
|
127
143
|
|
|
128
144
|
options() {
|
|
129
145
|
const cluster = this.clusterId || this.$store.getters['defaultClusterId'];
|
|
146
|
+
|
|
130
147
|
// TODO plugin routes
|
|
131
148
|
const entries = this.activeProducts.map((p) => {
|
|
132
149
|
// Try product-specific index first
|
|
@@ -163,7 +180,7 @@ export default {
|
|
|
163
180
|
|
|
164
181
|
hasSupport() {
|
|
165
182
|
return isRancherPrime() || this.$store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.SUPPORTED )?.value === 'true';
|
|
166
|
-
}
|
|
183
|
+
}
|
|
167
184
|
},
|
|
168
185
|
|
|
169
186
|
watch: {
|
|
@@ -209,6 +226,15 @@ export default {
|
|
|
209
226
|
this.setClusterListHeight(this.maxClustersToShow);
|
|
210
227
|
});
|
|
211
228
|
},
|
|
229
|
+
|
|
230
|
+
async goToHarvesterCluster() {
|
|
231
|
+
const localCluster = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER).find((C) => C.id === 'fleet-local/local');
|
|
232
|
+
|
|
233
|
+
try {
|
|
234
|
+
await localCluster.goToHarvesterCluster();
|
|
235
|
+
} catch {
|
|
236
|
+
}
|
|
237
|
+
}
|
|
212
238
|
}
|
|
213
239
|
};
|
|
214
240
|
</script>
|
|
@@ -269,10 +295,49 @@ export default {
|
|
|
269
295
|
</div>
|
|
270
296
|
</nuxt-link>
|
|
271
297
|
</div>
|
|
298
|
+
|
|
299
|
+
<template v-if="hciApps.length">
|
|
300
|
+
<div class="category">
|
|
301
|
+
{{ t('nav.categories.hci') }}
|
|
302
|
+
</div>
|
|
303
|
+
<div>
|
|
304
|
+
<a
|
|
305
|
+
v-if="isRancherInHarvester"
|
|
306
|
+
class="option"
|
|
307
|
+
@click="goToHarvesterCluster()"
|
|
308
|
+
>
|
|
309
|
+
<i
|
|
310
|
+
class="icon icon-dashboard"
|
|
311
|
+
/>
|
|
312
|
+
<div>
|
|
313
|
+
{{ t('nav.harvesterDashboard') }}
|
|
314
|
+
</div>
|
|
315
|
+
</a>
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
<div
|
|
319
|
+
v-for="a in hciApps"
|
|
320
|
+
:key="a.label"
|
|
321
|
+
@click="hide()"
|
|
322
|
+
>
|
|
323
|
+
<nuxt-link
|
|
324
|
+
class="option"
|
|
325
|
+
:to="a.to"
|
|
326
|
+
>
|
|
327
|
+
<IconOrSvg
|
|
328
|
+
:icon="a.icon"
|
|
329
|
+
:src="a.svg"
|
|
330
|
+
/>
|
|
331
|
+
<div>{{ a.label }}</div>
|
|
332
|
+
</nuxt-link>
|
|
333
|
+
</div>
|
|
334
|
+
</template>
|
|
335
|
+
|
|
272
336
|
<template v-if="clusters && !!clusters.length">
|
|
273
337
|
<div class="category">
|
|
274
338
|
{{ t('nav.categories.explore') }}
|
|
275
339
|
</div>
|
|
340
|
+
|
|
276
341
|
<div
|
|
277
342
|
v-if="showClusterSearch"
|
|
278
343
|
class="search"
|
|
@@ -300,7 +365,7 @@ export default {
|
|
|
300
365
|
<nuxt-link
|
|
301
366
|
v-if="c.ready"
|
|
302
367
|
class="cluster selector option"
|
|
303
|
-
:to="{ name: 'c-cluster', params: { cluster: c.id } }"
|
|
368
|
+
:to="{ name: 'c-cluster-explorer', params: { cluster: c.id } }"
|
|
304
369
|
>
|
|
305
370
|
<ClusterProviderIcon
|
|
306
371
|
:small="true"
|
|
@@ -106,8 +106,8 @@ export default {
|
|
|
106
106
|
containerChoices() {
|
|
107
107
|
const isHarvester = this.$store.getters['currentProduct'].inStore === VIRTUAL;
|
|
108
108
|
|
|
109
|
-
const containers = (this.pod?.spec?.containers || []).map(x => x.name);
|
|
110
|
-
const initContainers = (this.pod?.spec?.initContainers || []).map(x => x.name);
|
|
109
|
+
const containers = (this.pod?.spec?.containers || []).map((x) => x.name);
|
|
110
|
+
const initContainers = (this.pod?.spec?.initContainers || []).map((x) => x.name);
|
|
111
111
|
|
|
112
112
|
return isHarvester ? [] : [...containers, ...initContainers];
|
|
113
113
|
},
|
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
this.value = '';
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const currentExists = curr.find(item => item.value === this.value);
|
|
58
|
+
const currentExists = curr.find((item) => item.value === this.value);
|
|
59
59
|
|
|
60
60
|
if (curr.length && !currentExists) {
|
|
61
61
|
this.value = curr[0]?.value;
|
package/config/home-links.js
CHANGED
|
@@ -64,7 +64,7 @@ export async function fetchLinks(store, hasSupport, isSupportPage, t) {
|
|
|
64
64
|
|
|
65
65
|
// Map the link name stored to the default link, if it exists
|
|
66
66
|
defaults.forEach((link) => {
|
|
67
|
-
const enabled = uiLinks.defaults.find(linkName => linkName === link.key);
|
|
67
|
+
const enabled = uiLinks.defaults.find((linkName) => linkName === link.key);
|
|
68
68
|
|
|
69
69
|
link.enabled = !!enabled;
|
|
70
70
|
});
|
|
@@ -95,7 +95,7 @@ export async function fetchLinks(store, hasSupport, isSupportPage, t) {
|
|
|
95
95
|
// Should we show the default set of links?
|
|
96
96
|
if (uiCommunitySetting?.value === 'false') {
|
|
97
97
|
// Hide all of the default links
|
|
98
|
-
links.defaults.forEach(link => (link.enabled = false));
|
|
98
|
+
links.defaults.forEach((link) => (link.enabled = false));
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// Do we have a custom 'File an issue' link ?
|
|
@@ -106,7 +106,7 @@ export async function fetchLinks(store, hasSupport, isSupportPage, t) {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
// Hide the default 'File an issue' link
|
|
109
|
-
const issueLink = links.defaults?.find(link => link.key === 'issues');
|
|
109
|
+
const issueLink = links.defaults?.find((link) => link.key === 'issues');
|
|
110
110
|
|
|
111
111
|
if (issueLink) {
|
|
112
112
|
issueLink.enabled = false;
|
|
@@ -123,7 +123,7 @@ export async function fetchLinks(store, hasSupport, isSupportPage, t) {
|
|
|
123
123
|
// Ensure the support link is added if needed
|
|
124
124
|
function ensureSupportLink(links, hasSupport, isSupportPage, t) {
|
|
125
125
|
if (!hasSupport && !isSupportPage) {
|
|
126
|
-
const supportLink = links.defaults?.find(link => link.key === 'commercialSupport');
|
|
126
|
+
const supportLink = links.defaults?.find((link) => link.key === 'commercialSupport');
|
|
127
127
|
|
|
128
128
|
if (!supportLink) {
|
|
129
129
|
links.defaults.push(SUPPORT_LINK);
|
|
@@ -97,6 +97,8 @@ export const CATALOG = {
|
|
|
97
97
|
|
|
98
98
|
MIGRATED: 'apps.cattle.io/migrated',
|
|
99
99
|
MANAGED: 'catalog.cattle.io/managed',
|
|
100
|
+
|
|
101
|
+
HIDDEN_REPO: 'clusterrepo.cattle.io/hidden'
|
|
100
102
|
};
|
|
101
103
|
|
|
102
104
|
export const FLEET = {
|
|
@@ -130,15 +132,12 @@ export const ANNOTATIONS_TO_FOLD = [
|
|
|
130
132
|
];
|
|
131
133
|
|
|
132
134
|
export const HCI = {
|
|
133
|
-
CLOUD_INIT:
|
|
134
|
-
CLOUD_PROVIDER_IPAM:
|
|
135
|
-
NETWORK_ROUTE:
|
|
136
|
-
IMAGE_NAME:
|
|
137
|
-
NETWORK_TYPE:
|
|
138
|
-
|
|
139
|
-
CLOUD_PROVIDER_NETWORK: 'cloudprovider.harvesterhci.io/network',
|
|
140
|
-
CLOUD_PROVIDER_PROJECT: 'cloudprovider.harvesterhci.io/project',
|
|
141
|
-
PRIMARY_SERVICE: 'cloudprovider.harvesterhci.io/primary-service',
|
|
135
|
+
CLOUD_INIT: 'harvesterhci.io/cloud-init-template',
|
|
136
|
+
CLOUD_PROVIDER_IPAM: 'cloudprovider.harvesterhci.io/ipam',
|
|
137
|
+
NETWORK_ROUTE: 'network.harvesterhci.io/route',
|
|
138
|
+
IMAGE_NAME: 'harvesterhci.io/image-name',
|
|
139
|
+
NETWORK_TYPE: 'network.harvesterhci.io/type',
|
|
140
|
+
PRIMARY_SERVICE: 'cloudprovider.harvesterhci.io/primary-service',
|
|
142
141
|
};
|
|
143
142
|
|
|
144
143
|
// Annotations that can be on management.cattle.io.cluster to configure a custom badge
|
|
@@ -79,4 +79,4 @@ export const PSALabelsNamespaces: string[] = [...PSALabelsNamespaceMode, ...PSAL
|
|
|
79
79
|
/**
|
|
80
80
|
* Generated table of icons with or hardcoded generated PSA labels
|
|
81
81
|
*/
|
|
82
|
-
export const PSAIconsDisplay: Record<string, string> = Object.assign({}, ...PSALabelsNamespaces.map(psa => ({ [psa]: 'icon-pod_security' })));
|
|
82
|
+
export const PSAIconsDisplay: Record<string, string> = Object.assign({}, ...PSALabelsNamespaces.map((psa) => ({ [psa]: 'icon-pod_security' })));
|
package/config/product/auth.js
CHANGED
|
@@ -104,8 +104,8 @@ export function init(store) {
|
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
const uniquePrincipalIds = uniq(globalRoleBindings
|
|
107
|
-
.filter(grb => !!grb.groupPrincipalName)
|
|
108
|
-
.map(grb => grb.groupPrincipalName)
|
|
107
|
+
.filter((grb) => !!grb.groupPrincipalName)
|
|
108
|
+
.map((grb) => grb.groupPrincipalName)
|
|
109
109
|
);
|
|
110
110
|
|
|
111
111
|
const allPrincipalsP = uniquePrincipalIds
|
|
@@ -125,8 +125,8 @@ export function init(store) {
|
|
|
125
125
|
const allPrincipals = await Promise.all(allPrincipalsP);
|
|
126
126
|
|
|
127
127
|
return allPrincipals
|
|
128
|
-
.filter(p => !!p)
|
|
129
|
-
.map(p => ({
|
|
128
|
+
.filter((p) => !!p)
|
|
129
|
+
.map((p) => ({
|
|
130
130
|
...p,
|
|
131
131
|
type: NORMAN.SPOOFED.GROUP_PRINCIPAL
|
|
132
132
|
}));
|
|
@@ -30,6 +30,7 @@ export function init(store) {
|
|
|
30
30
|
product,
|
|
31
31
|
basicType,
|
|
32
32
|
ignoreType,
|
|
33
|
+
ignoreGroup,
|
|
33
34
|
mapGroup,
|
|
34
35
|
weightGroup,
|
|
35
36
|
weightType,
|
|
@@ -110,6 +111,19 @@ export function init(store) {
|
|
|
110
111
|
ignoreType(MANAGEMENT.CLUSTER_ROLE_TEMPLATE_BINDING);
|
|
111
112
|
ignoreType(MANAGEMENT.PROJECT_ROLE_TEMPLATE_BINDING);
|
|
112
113
|
|
|
114
|
+
ignoreGroup('harvesterhci.io', (getters) => {
|
|
115
|
+
return getters['currentCluster']?.isHarvester && getters['isExplorer'];
|
|
116
|
+
});
|
|
117
|
+
ignoreGroup('kubevirt.io', (getters) => {
|
|
118
|
+
return getters['currentCluster']?.isHarvester && getters['isExplorer'];
|
|
119
|
+
});
|
|
120
|
+
ignoreGroup('network.harvesterhci.io', (getters) => {
|
|
121
|
+
return getters['currentCluster']?.isHarvester && getters['isExplorer'];
|
|
122
|
+
});
|
|
123
|
+
ignoreGroup('node.harvesterhci.io', (getters) => {
|
|
124
|
+
return getters['currentCluster']?.isHarvester && getters['isExplorer'];
|
|
125
|
+
});
|
|
126
|
+
|
|
113
127
|
mapGroup(/^(core)?$/, 'core');
|
|
114
128
|
mapGroup('apps', 'apps');
|
|
115
129
|
mapGroup('batch', 'Batch');
|
package/config/router.js
CHANGED
|
@@ -17,6 +17,11 @@ export const routerOptions = {
|
|
|
17
17
|
scrollBehavior,
|
|
18
18
|
|
|
19
19
|
routes: [{
|
|
20
|
+
path: '/verify-auth',
|
|
21
|
+
redirect: (to) => {
|
|
22
|
+
return 'auth/verify';
|
|
23
|
+
},
|
|
24
|
+
}, {
|
|
20
25
|
path: '/about',
|
|
21
26
|
component: () => interopDefault(import('../pages/about.vue' /* webpackChunkName: "pages/about" */)),
|
|
22
27
|
name: 'about'
|
package/config/store.js
CHANGED
|
@@ -26,6 +26,7 @@ let store = {};
|
|
|
26
26
|
resolveStoreModules(require('../store/digitalocean.js'), 'digitalocean.js');
|
|
27
27
|
resolveStoreModules(require('../store/features.js'), 'features.js');
|
|
28
28
|
resolveStoreModules(require('../store/github.js'), 'github.js');
|
|
29
|
+
resolveStoreModules(require('../store/gitlab.js'), 'gitlab.js');
|
|
29
30
|
resolveStoreModules(require('../store/growl.js'), 'growl.js');
|
|
30
31
|
resolveStoreModules(require('../store/i18n.js'), 'i18n.js');
|
|
31
32
|
resolveStoreModules(require('../store/linode.js'), 'linode.js');
|
|
@@ -49,6 +50,7 @@ let store = {};
|
|
|
49
50
|
'../store/digitalocean.js',
|
|
50
51
|
'../store/features.js',
|
|
51
52
|
'../store/github.js',
|
|
53
|
+
'../store/gitlab.js',
|
|
52
54
|
'../store/growl.js',
|
|
53
55
|
'../store/i18n.js',
|
|
54
56
|
'../store/index.js',
|
package/config/table-headers.js
CHANGED
|
@@ -9,7 +9,7 @@ export const STATE = {
|
|
|
9
9
|
labelKey: 'tableHeaders.state',
|
|
10
10
|
sort: ['stateSort', 'nameSort'],
|
|
11
11
|
value: 'stateDisplay',
|
|
12
|
-
getValue: row => row.stateDisplay,
|
|
12
|
+
getValue: (row) => row.stateDisplay,
|
|
13
13
|
width: 100,
|
|
14
14
|
default: 'unknown',
|
|
15
15
|
formatter: 'BadgeStateFormatter',
|
|
@@ -38,7 +38,7 @@ export const NAME = {
|
|
|
38
38
|
name: 'name',
|
|
39
39
|
labelKey: 'tableHeaders.name',
|
|
40
40
|
value: 'nameDisplay',
|
|
41
|
-
getValue: row => row.nameDisplay,
|
|
41
|
+
getValue: (row) => row.nameDisplay,
|
|
42
42
|
sort: ['nameSort'],
|
|
43
43
|
formatter: 'LinkDetail',
|
|
44
44
|
canBeVariable: true,
|
|
@@ -144,7 +144,7 @@ export const NAMESPACE = {
|
|
|
144
144
|
name: 'namespace',
|
|
145
145
|
labelKey: 'tableHeaders.namespace',
|
|
146
146
|
value: 'namespace',
|
|
147
|
-
getValue: row => row.namespace,
|
|
147
|
+
getValue: (row) => row.namespace,
|
|
148
148
|
sort: 'namespace',
|
|
149
149
|
dashIfEmpty: true,
|
|
150
150
|
};
|
|
@@ -153,7 +153,7 @@ export const NODE = {
|
|
|
153
153
|
name: 'node',
|
|
154
154
|
labelKey: 'tableHeaders.node',
|
|
155
155
|
value: 'spec.nodeName',
|
|
156
|
-
getValue: row => row.spec?.nodeName,
|
|
156
|
+
getValue: (row) => row.spec?.nodeName,
|
|
157
157
|
sort: 'spec.nodeName',
|
|
158
158
|
formatter: 'LinkName',
|
|
159
159
|
formatterOpts: { type: NODE_TYPE },
|
|
@@ -164,7 +164,7 @@ export const NODE_NAME = {
|
|
|
164
164
|
labelKey: 'tableHeaders.nodeName',
|
|
165
165
|
sort: 'name',
|
|
166
166
|
value: 'name',
|
|
167
|
-
getValue: row => row.name,
|
|
167
|
+
getValue: (row) => row.name,
|
|
168
168
|
formatter: 'LinkDetail',
|
|
169
169
|
};
|
|
170
170
|
|
|
@@ -180,7 +180,7 @@ export const VERSION = {
|
|
|
180
180
|
labelKey: 'tableHeaders.version',
|
|
181
181
|
sort: 'version',
|
|
182
182
|
value: 'version',
|
|
183
|
-
getValue: row => row.version
|
|
183
|
+
getValue: (row) => row.version
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
export const CPU = {
|
|
@@ -216,7 +216,7 @@ export const PODS = {
|
|
|
216
216
|
labelKey: 'tableHeaders.pods',
|
|
217
217
|
sort: 'podConsumed',
|
|
218
218
|
search: false,
|
|
219
|
-
value: row => row.podConsumedUsage,
|
|
219
|
+
value: (row) => row.podConsumedUsage,
|
|
220
220
|
formatter: 'PercentageBar',
|
|
221
221
|
width: 120,
|
|
222
222
|
};
|
|
@@ -225,7 +225,7 @@ export const AGE = {
|
|
|
225
225
|
name: 'age',
|
|
226
226
|
labelKey: 'tableHeaders.age',
|
|
227
227
|
value: 'creationTimestamp',
|
|
228
|
-
getValue: row => row.creationTimestamp,
|
|
228
|
+
getValue: (row) => row.creationTimestamp,
|
|
229
229
|
sort: 'creationTimestamp:desc',
|
|
230
230
|
search: false,
|
|
231
231
|
formatter: 'LiveDate',
|
|
@@ -235,7 +235,7 @@ export const AGE = {
|
|
|
235
235
|
|
|
236
236
|
export const AGE_NORMAN = {
|
|
237
237
|
...AGE,
|
|
238
|
-
getValue: row => row.created,
|
|
238
|
+
getValue: (row) => row.created,
|
|
239
239
|
value: 'created',
|
|
240
240
|
sort: 'created:desc',
|
|
241
241
|
};
|
|
@@ -275,7 +275,7 @@ export const POD_IMAGES = {
|
|
|
275
275
|
name: 'pod_images',
|
|
276
276
|
labelKey: 'tableHeaders.podImages',
|
|
277
277
|
value: 'imageNames',
|
|
278
|
-
getValue: row => row.imageNames,
|
|
278
|
+
getValue: (row) => row.imageNames,
|
|
279
279
|
sort: 'imageNames',
|
|
280
280
|
// search: 'imageNames',
|
|
281
281
|
formatter: 'PodImages'
|
|
@@ -287,7 +287,7 @@ export const POD_RESTARTS = {
|
|
|
287
287
|
formatter: 'LivePodRestarts',
|
|
288
288
|
delayLoading: true,
|
|
289
289
|
value: 'restartCount',
|
|
290
|
-
getValue: row => row.restartCount,
|
|
290
|
+
getValue: (row) => row.restartCount,
|
|
291
291
|
// This column is expensive to compute, so don't make it searchable
|
|
292
292
|
search: false,
|
|
293
293
|
liveUpdates: true
|
|
@@ -433,7 +433,7 @@ export const TYPE = {
|
|
|
433
433
|
name: 'type',
|
|
434
434
|
labelKey: 'tableHeaders.type',
|
|
435
435
|
value: 'typeDisplay',
|
|
436
|
-
getValue: row => row.typeDisplay,
|
|
436
|
+
getValue: (row) => row.typeDisplay,
|
|
437
437
|
sort: ['typeDisplay'],
|
|
438
438
|
width: 100,
|
|
439
439
|
};
|
|
@@ -674,7 +674,7 @@ export const WORKLOAD_ENDPOINTS = {
|
|
|
674
674
|
name: 'workloadEndpoints',
|
|
675
675
|
labelKey: 'tableHeaders.endpoints',
|
|
676
676
|
value: `$['metadata']['annotations']['${ CATTLE_PUBLIC_ENDPOINTS }']`,
|
|
677
|
-
getValue: row => row.metadata?.annotations?.[CATTLE_PUBLIC_ENDPOINTS],
|
|
677
|
+
getValue: (row) => row.metadata?.annotations?.[CATTLE_PUBLIC_ENDPOINTS],
|
|
678
678
|
formatter: 'Endpoints',
|
|
679
679
|
dashIfEmpty: true,
|
|
680
680
|
breakpoint: COLUMN_BREAKPOINTS.DESKTOP,
|
package/config/uiplugins.js
CHANGED
|
@@ -78,7 +78,7 @@ export function uiPluginAnnotation(chart, name) {
|
|
|
78
78
|
|
|
79
79
|
// Should we load a plugin, based on the metadata returned by the backend?
|
|
80
80
|
// Returns error key string or false
|
|
81
|
-
export function shouldNotLoadPlugin(plugin, rancherVersion) {
|
|
81
|
+
export function shouldNotLoadPlugin(plugin, rancherVersion, loadedPlugins) {
|
|
82
82
|
if (!plugin.name || !plugin.version || !plugin.endpoint) {
|
|
83
83
|
return 'plugins.error.generic';
|
|
84
84
|
}
|
|
@@ -106,6 +106,13 @@ export function shouldNotLoadPlugin(plugin, rancherVersion) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// check if a builtin extension has been loaded before - improve developer experience
|
|
110
|
+
const checkLoaded = loadedPlugins.find((p) => p?.name === plugin?.name);
|
|
111
|
+
|
|
112
|
+
if (checkLoaded && checkLoaded.builtin) {
|
|
113
|
+
return 'plugins.error.developerPkg';
|
|
114
|
+
}
|
|
115
|
+
|
|
109
116
|
if (plugin.metadata?.[UI_PLUGIN_LABELS.CATALOG]) {
|
|
110
117
|
return true;
|
|
111
118
|
}
|
package/core/plugin-routes.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
1
2
|
import Router, { RouteConfig } from 'vue-router';
|
|
2
3
|
|
|
3
4
|
interface RouteInfo {
|
|
@@ -67,7 +68,7 @@ export class PluginRoutes {
|
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
// Remove routes from pluginRoutes, update matcher (to avoid dupes when re-adding plugin routes)
|
|
70
|
-
this.pluginRoutes = this.pluginRoutes.filter(pR => !plugin.routes.find((r: any) => pR === r.route));
|
|
71
|
+
this.pluginRoutes = this.pluginRoutes.filter((pR) => !plugin.routes.find((r: any) => pR === r.route));
|
|
71
72
|
this.updateMatcher([], [
|
|
72
73
|
...this.pluginRoutes,
|
|
73
74
|
...(this.router.options.routes || [])
|
|
@@ -162,7 +163,7 @@ export class PluginRoutes {
|
|
|
162
163
|
let foundParentRoute;
|
|
163
164
|
|
|
164
165
|
if (r.parent) {
|
|
165
|
-
foundParentRoute = allRoutes.find(route => route.name === r.parent);
|
|
166
|
+
foundParentRoute = allRoutes.find((route) => route.name === r.parent);
|
|
166
167
|
|
|
167
168
|
if (foundParentRoute) {
|
|
168
169
|
pluginRoutesWithParents.push(r);
|
package/core/plugin.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
1
2
|
import { RouteConfig } from 'vue-router';
|
|
2
3
|
import { DSL as STORE_DSL } from '@shell/store/type-map';
|
|
3
4
|
import {
|
|
@@ -10,11 +11,10 @@ import {
|
|
|
10
11
|
IPlugin,
|
|
11
12
|
LocationConfig,
|
|
12
13
|
ExtensionPoint,
|
|
14
|
+
|
|
15
|
+
PluginRouteConfig, RegisterStore, UnregisterStore, CoreStoreSpecifics, CoreStoreConfig, OnNavToPackage, OnNavAwayFromPackage, OnLogOut
|
|
13
16
|
} from './types';
|
|
14
17
|
import coreStore, { coreStoreModule, coreStoreState } from '@shell/plugins/dashboard-store';
|
|
15
|
-
import {
|
|
16
|
-
PluginRouteConfig, RegisterStore, UnregisterStore, CoreStoreSpecifics, CoreStoreConfig, OnNavToPackage, OnNavAwayFromPackage, OnLogOut
|
|
17
|
-
} from '@shell/core/types';
|
|
18
18
|
|
|
19
19
|
export type ProductFunction = (plugin: IPlugin, store: any) => void;
|
|
20
20
|
|
package/core/plugins.js
CHANGED
|
@@ -72,7 +72,7 @@ export default function({
|
|
|
72
72
|
element.async = true;
|
|
73
73
|
|
|
74
74
|
// id is `<product>-<version>`.
|
|
75
|
-
const oldPlugin = Object.values(plugins).find(p => id.startsWith(p.name));
|
|
75
|
+
const oldPlugin = Object.values(plugins).find((p) => id.startsWith(p.name));
|
|
76
76
|
|
|
77
77
|
let removed = Promise.resolve();
|
|
78
78
|
|
|
@@ -188,7 +188,7 @@ export default function({
|
|
|
188
188
|
|
|
189
189
|
// Remove the plugin
|
|
190
190
|
async removePlugin(name) {
|
|
191
|
-
const plugin = Object.values(plugins).find(p => p.name === name);
|
|
191
|
+
const plugin = Object.values(plugins).find((p) => p.name === name);
|
|
192
192
|
|
|
193
193
|
if (!plugin) {
|
|
194
194
|
return;
|
|
@@ -226,13 +226,13 @@ export default function({
|
|
|
226
226
|
pluginRoutes.uninstall(plugin);
|
|
227
227
|
|
|
228
228
|
// Call plugin uninstall hooks
|
|
229
|
-
plugin.uninstallHooks.forEach(fn => fn(plugin, this.internal()));
|
|
229
|
+
plugin.uninstallHooks.forEach((fn) => fn(plugin, this.internal()));
|
|
230
230
|
|
|
231
231
|
// Remove the plugin itself
|
|
232
232
|
promises.push( store.dispatch('uiplugins/removePlugin', name));
|
|
233
233
|
|
|
234
234
|
// Unregister vuex stores
|
|
235
|
-
plugin.stores.forEach(pStore => pStore.unregister(store));
|
|
235
|
+
plugin.stores.forEach((pStore) => pStore.unregister(store));
|
|
236
236
|
|
|
237
237
|
// Remove validators
|
|
238
238
|
Object.keys(plugin.validators).forEach((key) => {
|
|
@@ -246,7 +246,7 @@ export default function({
|
|
|
246
246
|
},
|
|
247
247
|
|
|
248
248
|
removeTypeFromStore(store, storeName, types) {
|
|
249
|
-
return (types || []).map(type => store.commit(`${ storeName }/forgetType`, type));
|
|
249
|
+
return (types || []).map((type) => store.commit(`${ storeName }/forgetType`, type));
|
|
250
250
|
},
|
|
251
251
|
|
|
252
252
|
// Apply the plugin based on its metadata
|
|
@@ -283,7 +283,7 @@ export default function({
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
// Register vuex stores
|
|
286
|
-
plugin.stores.forEach(pStore => pStore.register()(store));
|
|
286
|
+
plugin.stores.forEach((pStore) => pStore.register()(store));
|
|
287
287
|
|
|
288
288
|
// Locales
|
|
289
289
|
plugin.locales.forEach((localeObj) => {
|
|
@@ -325,7 +325,7 @@ export default function({
|
|
|
325
325
|
unregister(type, name, fn) {
|
|
326
326
|
if (type === 'l10n') {
|
|
327
327
|
if (dynamic[type]?.[name]) {
|
|
328
|
-
const index = dynamic[type][name].find(func => func === fn);
|
|
328
|
+
const index = dynamic[type][name].find((func) => func === fn);
|
|
329
329
|
|
|
330
330
|
if (index !== -1) {
|
|
331
331
|
dynamic[type][name].splice(index, 1);
|
|
@@ -2,7 +2,7 @@ import { importTypes } from '@rancher/auto-import';
|
|
|
2
2
|
import { IPlugin } from '@shell/core/types';
|
|
3
3
|
|
|
4
4
|
// Init the package
|
|
5
|
-
export default function(plugin: IPlugin) {
|
|
5
|
+
export default function(plugin: IPlugin): void {
|
|
6
6
|
// Auto-import model, detail, edit from the folders
|
|
7
7
|
importTypes(plugin);
|
|
8
8
|
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
if (!!check.node_type) {
|
|
62
62
|
const nodeRows = check.node_type.reduce((nodes, type) => {
|
|
63
63
|
if (this.reportNodes[type]) {
|
|
64
|
-
this.reportNodes[type].forEach(name => nodes.push({
|
|
64
|
+
this.reportNodes[type].forEach((name) => nodes.push({
|
|
65
65
|
type, name, id: randomStr(4), state: this.nodeState(check, name, check.nodes), testStateSort: this.testStateSort(this.nodeState(check, name, check.nodes))
|
|
66
66
|
})
|
|
67
67
|
);
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
127
127
|
];
|
|
128
128
|
|
|
129
129
|
if (!this.canBeScheduled) {
|
|
130
|
-
return out.filter(each => each.label !== this.t('cis.scan.warn'));
|
|
130
|
+
return out.filter((each) => each.label !== this.t('cis.scan.warn'));
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
return out;
|
|
@@ -230,7 +230,7 @@ export default {
|
|
|
230
230
|
testIdSort(test) {
|
|
231
231
|
const { id = '' } = test;
|
|
232
232
|
|
|
233
|
-
return id.split('.').map(n => +n + 1000).join('.');
|
|
233
|
+
return id.split('.').map((n) => +n + 1000).join('.');
|
|
234
234
|
},
|
|
235
235
|
|
|
236
236
|
remediationDisplay(row) {
|