@rancher/shell 3.0.0-rc.3 → 3.0.0-rc.5
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/styles/base/_variables.scss +12 -4
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/global/_tooltip.scss +1 -1
- package/assets/translations/en-us.yaml +61 -26
- package/assets/translations/zh-hans.yaml +6 -5
- package/chart/istio.vue +2 -0
- package/chart/monitoring/ClusterSelector.vue +2 -0
- package/chart/monitoring/StorageClassSelector.vue +4 -1
- package/chart/monitoring/index.vue +2 -0
- package/chart/rancher-backup/S3.vue +2 -0
- package/chart/rancher-backup/index.vue +2 -0
- package/cloud-credential/aws.vue +2 -0
- package/cloud-credential/azure.vue +2 -0
- package/cloud-credential/digitalocean.vue +2 -0
- package/cloud-credential/gcp.vue +2 -0
- package/cloud-credential/generic.vue +2 -0
- package/cloud-credential/harvester.vue +2 -0
- package/cloud-credential/linode.vue +2 -0
- package/cloud-credential/pnap.vue +2 -0
- package/cloud-credential/s3.vue +2 -0
- package/cloud-credential/vmwarevsphere.vue +2 -0
- package/components/ActionMenu.vue +4 -1
- package/components/AppModal.vue +4 -1
- package/components/ButtonDropdown.vue +3 -0
- package/components/ButtonGroup.vue +2 -0
- package/components/ButtonMultiAction.vue +41 -0
- package/components/Carousel.vue +3 -0
- package/components/CodeMirror.vue +6 -4
- package/components/Collapse.vue +4 -1
- package/components/CollapsibleCard.vue +4 -1
- package/components/ContainerResourceLimit.vue +2 -0
- package/components/CopyCode.vue +8 -4
- package/components/CopyToClipboardText.vue +2 -0
- package/components/CruResource.vue +2 -0
- package/components/CruResourceFooter.vue +2 -0
- package/components/Dialog.vue +2 -0
- package/components/DisableAuthProviderModal.vue +4 -1
- package/components/EmberPage.vue +2 -0
- package/components/ExplorerProjectsNamespaces.vue +11 -8
- package/components/GlobalRoleBindings.vue +2 -0
- package/components/Import.vue +2 -0
- package/components/InputOrDisplay.vue +23 -18
- package/components/Loading.vue +4 -1
- package/components/Markdown.vue +2 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +2 -0
- package/components/PodSecurityAdmission.vue +2 -0
- package/components/Questions/Array.vue +2 -0
- package/components/Questions/Boolean.vue +2 -0
- package/components/Questions/CloudCredential.vue +2 -0
- package/components/Questions/Enum.vue +2 -0
- package/components/Questions/Float.vue +2 -0
- package/components/Questions/Int.vue +2 -0
- package/components/Questions/QuestionMap.vue +4 -1
- package/components/Questions/Radio.vue +2 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +2 -0
- package/components/Questions/Yaml.vue +2 -0
- package/components/Questions/index.vue +2 -0
- package/components/ResourceCancelModal.vue +2 -0
- package/components/ResourceDetail/Masthead.vue +4 -3
- package/components/ResourceDetail/index.vue +17 -15
- package/components/ResourceTable.vue +2 -0
- package/components/ResourceYaml.vue +2 -0
- package/components/SelectIconGrid.vue +2 -0
- package/components/SimpleBox.vue +2 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +15 -19
- package/components/StatusTable.vue +2 -0
- package/components/Tabbed/Tab.vue +2 -0
- package/components/Tabbed/index.vue +2 -0
- package/components/Wizard.vue +2 -0
- package/components/YamlEditor.vue +2 -0
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/auth/RoleDetailEdit.vue +2 -0
- package/components/auth/SelectPrincipal.vue +2 -0
- package/components/auth/login/ldap.vue +2 -0
- package/components/fleet/FleetStatus.vue +3 -2
- package/components/form/ArrayList.vue +16 -1
- package/components/form/ArrayListSelect.vue +2 -0
- package/components/form/ChangePassword.vue +2 -0
- package/components/form/ColorInput.vue +2 -0
- package/components/form/Command.vue +2 -0
- package/components/form/FileImageSelector.vue +2 -0
- package/components/form/FileSelector.vue +2 -0
- package/components/form/Footer.vue +2 -0
- package/components/form/GitPicker.vue +1 -0
- package/components/form/HealthCheck.vue +5 -3
- package/components/form/HookOption.vue +22 -18
- package/components/form/InputWithSelect.vue +3 -1
- package/components/form/KeyValue.vue +2 -0
- package/components/form/LabeledSelect.vue +13 -3
- package/components/form/LifecycleHooks.vue +2 -0
- package/components/form/MatchExpressions.vue +2 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
- package/components/form/Members/MembershipEditor.vue +2 -0
- package/components/form/NameNsDescription.vue +4 -1
- package/components/form/Networking.vue +2 -0
- package/components/form/NodeAffinity.vue +4 -1
- package/components/form/Password.vue +2 -0
- package/components/form/PlusMinus.vue +2 -0
- package/components/form/PodAffinity.vue +4 -1
- package/components/form/Ports.vue +2 -0
- package/components/form/Probe.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
- package/components/form/ResourceQuota/Project.vue +2 -0
- package/components/form/ResourceQuota/ProjectRow.vue +2 -0
- package/components/form/RuleSelector.vue +2 -0
- package/components/form/SecretSelector.vue +1 -0
- package/components/form/Security.vue +5 -2
- package/components/form/Select.vue +2 -1
- package/components/form/SelectOrCreateAuthSecret.vue +2 -0
- package/components/form/ServiceNameSelect.vue +2 -0
- package/components/form/ServicePorts.vue +2 -0
- package/components/form/ShellInput.vue +2 -0
- package/components/form/SimpleSecretSelector.vue +2 -0
- package/components/form/Taints.vue +2 -0
- package/components/form/Tolerations.vue +2 -0
- package/components/form/ValueFromResource.vue +2 -0
- package/components/form/WorkloadPorts.vue +5 -3
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/LabeledSelect.test.ts +42 -0
- package/components/form/__tests__/Probe.test.ts +12 -0
- package/components/nav/Header.vue +26 -128
- package/components/nav/HeaderPageActionMenu.vue +151 -0
- package/components/nav/Jump.vue +2 -0
- package/components/nav/NamespaceFilter.vue +5 -1
- package/components/nav/Type.vue +28 -2
- package/components/nav/WindowManager/ContainerShell.vue +6 -12
- package/components/nav/WindowManager/index.vue +2 -0
- package/components/nav/__tests__/Type.test.ts +68 -24
- package/composables/useClickOutside.ts +81 -0
- package/config/product/cis.js +4 -3
- package/config/product/manager.js +1 -0
- package/config/router/routes.js +1 -1
- package/config/table-headers.js +0 -10
- package/config/uiplugins.js +186 -143
- package/config/version.js +10 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
- package/detail/configmap.vue +2 -0
- package/detail/fleet.cattle.io.cluster.vue +2 -0
- package/detail/fleet.cattle.io.clustergroup.vue +2 -0
- package/detail/fleet.cattle.io.gitrepo.vue +2 -0
- package/detail/harvesterhci.io.management.cluster.vue +2 -0
- package/detail/management.cattle.io.roletemplate.vue +4 -4
- package/detail/management.cattle.io.user.vue +2 -0
- package/detail/namespace.vue +2 -0
- package/detail/networking.k8s.io.ingress.vue +1 -0
- package/detail/node.vue +2 -0
- package/detail/provisioning.cattle.io.cluster.vue +2 -0
- package/detail/secret.vue +2 -0
- package/detail/service.vue +2 -0
- package/detail/workload/index.vue +1 -1
- package/dialog/AddClusterMemberDialog.vue +2 -0
- package/dialog/AddCustomBadgeDialog.vue +3 -1
- package/dialog/AddProjectMemberDialog.vue +2 -0
- package/dialog/AddonConfigConfirmationDialog.vue +2 -0
- package/dialog/DeactivateDriverDialog.vue +2 -0
- package/dialog/DiagnosticTimingsDialog.vue +2 -0
- package/dialog/DrainNode.vue +2 -0
- package/dialog/ForceMachineRemoveDialog.vue +2 -0
- package/dialog/GenericPrompt.vue +2 -0
- package/dialog/RollbackWorkloadDialog.vue +2 -0
- package/dialog/RotateCertificatesDialog.vue +2 -0
- package/dialog/RotateEncryptionKeyDialog.vue +2 -0
- package/dialog/SaveAsRKETemplateDialog.vue +2 -0
- package/dialog/ScaleMachineDownDialog.vue +2 -0
- package/dialog/ScalePoolDownDialog.vue +2 -0
- package/dialog/SloDialog.vue +2 -0
- package/edit/auth/ldap/config.vue +2 -0
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
- package/edit/cis.cattle.io.clusterscan.vue +38 -18
- package/edit/cloudcredential.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
- package/edit/fleet.cattle.io.cluster.vue +2 -0
- package/edit/fleet.cattle.io.clustergroup.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
- package/edit/logging-flow/Match.vue +2 -0
- package/edit/logging-flow/index.vue +10 -8
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
- package/edit/management.cattle.io.fleetworkspace.vue +4 -1
- package/edit/management.cattle.io.project.vue +2 -0
- package/edit/management.cattle.io.roletemplate.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +2 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/policy.poddisruptionbudget.vue +3 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/secret/index.vue +2 -0
- package/edit/service.vue +2 -1
- package/edit/ui.cattle.io.navlink.vue +1 -0
- package/edit/workload/Job.vue +3 -2
- package/edit/workload/Upgrading.vue +1 -0
- package/edit/workload/index.vue +18 -7
- package/edit/workload/storage/ContainerMountPaths.vue +37 -97
- package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
- package/edit/workload/storage/azureDisk.vue +1 -1
- package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
- package/edit/workload/storage/gcePersistentDisk.vue +1 -1
- package/edit/workload/storage/index.vue +38 -22
- package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +1 -1
- package/initialize/install-components.js +0 -12
- package/initialize/install-plugins.js +4 -5
- package/machine-config/azure.vue +2 -0
- package/machine-config/generic.vue +2 -0
- package/machine-config/vmwarevsphere.vue +2 -0
- package/mixins/resource-manager.js +1 -1
- package/models/cis.cattle.io.clusterscan.js +17 -16
- package/models/cis.cattle.io.clusterscanprofile.js +17 -0
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.user.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +2 -1
- package/models/steve-schema.ts +1 -1
- package/models/workload.js +2 -1
- package/package.json +5 -7
- package/pages/c/_cluster/apps/charts/chart.vue +3 -1
- package/pages/c/_cluster/apps/charts/install.vue +5 -56
- package/pages/c/_cluster/fleet/index.vue +0 -1
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +11 -16
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
- package/pages/c/_cluster/uiplugins/index.vue +93 -92
- package/pkg/vue.config.js +2 -0
- package/plugins/plugin.js +27 -19
- package/plugins/version.js +3 -13
- package/promptRemove/pod.vue +2 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
- package/rancher-components/Form/Radio/RadioButton.vue +0 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
- package/rancher-components/StringList/StringList.vue +6 -15
- package/scripts/extension/bundle +1 -1
- package/scripts/extension/publish +174 -99
- package/scripts/publish-shell.sh +3 -4
- package/scripts/typegen.sh +1 -1
- package/store/catalog.js +0 -26
- package/store/growl.js +8 -5
- package/types/shell/index.d.ts +22 -0
- package/utils/cluster.js +9 -0
- package/utils/versions.ts +39 -0
- package/vue.config.js +5 -0
- package/components/form/PodSecurity.vue +0 -168
- package/components/formatter/Weight.vue +0 -147
- package/components/nuxt/nuxt-build-indicator.vue +0 -170
- package/components/nuxt/nuxt-child.js +0 -52
- package/components/nuxt/nuxt-error.vue +0 -128
- package/components/nuxt/nuxt-link.client.js +0 -17
- package/components/nuxt/nuxt-loading.vue +0 -165
- package/shell/types/shell/index.d.ts +0 -2
package/config/uiplugins.js
CHANGED
|
@@ -3,44 +3,36 @@ import semver from 'semver';
|
|
|
3
3
|
// Version of the plugin API supported
|
|
4
4
|
// here we inject the current shell version that we read in vue.config
|
|
5
5
|
export const UI_EXTENSIONS_API_VERSION = process.env.UI_EXTENSIONS_API_VERSION;
|
|
6
|
+
|
|
6
7
|
export const UI_PLUGIN_HOST_APP = 'rancher-manager';
|
|
7
8
|
|
|
8
9
|
export const UI_PLUGIN_BASE_URL = '/v1/uiplugins';
|
|
9
|
-
|
|
10
10
|
export const UI_PLUGIN_NAMESPACE = 'cattle-ui-plugin-system';
|
|
11
11
|
|
|
12
12
|
// Annotation name and value that indicate a chart is a UI plugin
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export const UI_PLUGIN_OPERATOR_CHART_NAME = 'ui-plugin-operator';
|
|
18
|
-
|
|
19
|
-
export const UI_PLUGIN_CHARTS = [
|
|
20
|
-
UI_PLUGIN_OPERATOR_CHART_NAME,
|
|
21
|
-
UI_PLUGIN_OPERATOR_CRD_CHART_NAME,
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
// Expected chart repo name for the UI Plugins operator
|
|
25
|
-
export const UI_PLUGIN_OPERATOR_REPO_NAME = 'rancher-charts';
|
|
26
|
-
|
|
27
|
-
// Info for the Helm Chart Repository that we will add
|
|
28
|
-
export const UI_PLUGINS_REPO_NAME = 'rancher-ui-plugins';
|
|
29
|
-
|
|
30
|
-
export const UI_PLUGINS_REPO_URL = 'https://github.com/rancher/ui-plugin-charts';
|
|
31
|
-
export const UI_PLUGINS_REPO_BRANCH = 'main';
|
|
32
|
-
|
|
33
|
-
// Info for the Helm Chart Repo for Partner Extensions
|
|
34
|
-
export const UI_PLUGINS_PARTNERS_REPO_NAME = 'partner-extensions';
|
|
35
|
-
|
|
36
|
-
export const UI_PLUGINS_PARTNERS_REPO_URL = 'https://github.com/rancher/partner-extensions';
|
|
37
|
-
export const UI_PLUGINS_PARTNERS_REPO_BRANCH = 'main';
|
|
38
|
-
|
|
39
|
-
// Info for the Helm Chart Repo for Community Extensions
|
|
40
|
-
export const UI_PLUGINS_COMMUNITY_REPO_NAME = 'community-extensions';
|
|
13
|
+
export const UI_PLUGIN_ANNOTATION = {
|
|
14
|
+
NAME: 'catalog.cattle.io/ui-component',
|
|
15
|
+
VALUE: 'plugins',
|
|
16
|
+
};
|
|
41
17
|
|
|
42
|
-
|
|
43
|
-
export const
|
|
18
|
+
// Info for the Helm Chart Repositories
|
|
19
|
+
export const UI_PLUGINS_REPOS = {
|
|
20
|
+
OFFICIAL: {
|
|
21
|
+
NAME: 'rancher-ui-plugins',
|
|
22
|
+
URL: 'https://github.com/rancher/ui-plugin-charts',
|
|
23
|
+
BRANCH: 'main',
|
|
24
|
+
},
|
|
25
|
+
PARTNERS: {
|
|
26
|
+
NAME: 'partner-extensions',
|
|
27
|
+
URL: 'https://github.com/rancher/partner-extensions',
|
|
28
|
+
BRANCH: 'main',
|
|
29
|
+
},
|
|
30
|
+
COMMUNITY: {
|
|
31
|
+
NAME: 'community-extensions',
|
|
32
|
+
URL: 'https://github.com/rancher/community-extensions',
|
|
33
|
+
BRANCH: 'main',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
44
36
|
|
|
45
37
|
// Chart annotations
|
|
46
38
|
export const UI_PLUGIN_CHART_ANNOTATIONS = {
|
|
@@ -57,171 +49,222 @@ export const UI_PLUGIN_CHART_ANNOTATIONS = {
|
|
|
57
49
|
export const UI_PLUGIN_LABELS = {
|
|
58
50
|
CATALOG_IMAGE: 'catalog.cattle.io/ui-extensions-catalog-image',
|
|
59
51
|
REPOSITORY: 'catalog.cattle.io/ui-extensions-repository',
|
|
60
|
-
CATALOG: 'catalog.cattle.io/ui-extensions-catalog'
|
|
52
|
+
CATALOG: 'catalog.cattle.io/ui-extensions-catalog',
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const EXTENSIONS_INCOMPATIBILITY_TYPES = {
|
|
56
|
+
UI: 'uiVersion',
|
|
57
|
+
EXTENSIONS_API_MISSING: 'extensionsApiVersionMissing',
|
|
58
|
+
EXTENSIONS_API: 'extensionsApiVersion',
|
|
59
|
+
KUBE: 'kubeVersion',
|
|
60
|
+
HOST: 'host',
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
export const EXTENSIONS_INCOMPATIBILITY_DATA = {
|
|
64
|
+
UI: {
|
|
65
|
+
type: EXTENSIONS_INCOMPATIBILITY_TYPES.UI,
|
|
66
|
+
cardMessageKey: 'plugins.incompatibleRancherVersion',
|
|
67
|
+
tooltipKey: 'plugins.info.requiresRancherVersion',
|
|
68
|
+
},
|
|
69
|
+
EXTENSIONS_API_MISSING: {
|
|
70
|
+
type: EXTENSIONS_INCOMPATIBILITY_TYPES.EXTENSIONS_API_MISSING,
|
|
71
|
+
cardMessageKey: 'plugins.incompatibleUiExtensionsApiVersionMissing',
|
|
72
|
+
tooltipKey: 'plugins.info.requiresExtensionApiVersionMissing',
|
|
73
|
+
},
|
|
74
|
+
EXTENSIONS_API: {
|
|
75
|
+
type: EXTENSIONS_INCOMPATIBILITY_TYPES.EXTENSIONS_API,
|
|
76
|
+
cardMessageKey: 'plugins.incompatibleUiExtensionsApiVersion',
|
|
77
|
+
tooltipKey: 'plugins.info.requiresExtensionApiVersion',
|
|
78
|
+
},
|
|
79
|
+
KUBE: {
|
|
80
|
+
type: EXTENSIONS_INCOMPATIBILITY_TYPES.KUBE,
|
|
81
|
+
cardMessageKey: 'plugins.incompatibleKubeVersion',
|
|
82
|
+
tooltipKey: 'plugins.info.requiresKubeVersion',
|
|
83
|
+
},
|
|
84
|
+
HOST: {
|
|
85
|
+
type: EXTENSIONS_INCOMPATIBILITY_TYPES.HOST,
|
|
86
|
+
cardMessageKey: 'plugins.incompatibleHost',
|
|
87
|
+
tooltipKey: 'plugins.info.requiresHost',
|
|
88
|
+
mainHost: UI_PLUGIN_HOST_APP,
|
|
89
|
+
},
|
|
69
90
|
};
|
|
70
91
|
|
|
71
92
|
export function isUIPlugin(chart) {
|
|
72
|
-
return !!chart?.versions.find((v) =>
|
|
73
|
-
return v.annotations && v.annotations[UI_PLUGIN_ANNOTATION_NAME] === UI_PLUGIN_ANNOTATION_VALUE;
|
|
74
|
-
});
|
|
93
|
+
return !!chart?.versions.find((v) => v.annotations?.[UI_PLUGIN_ANNOTATION.NAME] === UI_PLUGIN_ANNOTATION.VALUE);
|
|
75
94
|
}
|
|
76
95
|
|
|
77
96
|
export function uiPluginHasAnnotation(chart, name, value) {
|
|
78
|
-
return !!chart?.versions.find((v) =>
|
|
79
|
-
return v.annotations && v.annotations[name] === value;
|
|
80
|
-
});
|
|
97
|
+
return !!chart?.versions.find((v) => v.annotations?.[name] === value);
|
|
81
98
|
}
|
|
82
99
|
|
|
83
100
|
/**
|
|
84
|
-
* Get value of the annotation from
|
|
101
|
+
* Get value of the annotation from the latest version for a chart
|
|
85
102
|
*/
|
|
86
103
|
export function uiPluginAnnotation(chart, name) {
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
return chart?.versions?.[0]?.annotations?.[name];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Parse the Rancher version string
|
|
109
|
+
*/
|
|
110
|
+
function parseRancherVersion(v) {
|
|
111
|
+
let parsedVersion = semver.coerce(v)?.version;
|
|
112
|
+
const splitArr = parsedVersion?.split('.');
|
|
113
|
+
|
|
114
|
+
// this is a scenario where we are on a "head" version of some sort... we can't infer the patch version from it
|
|
115
|
+
// so we apply a big patch version number to make sure we follow through with the minor
|
|
116
|
+
if (v.includes('-') && splitArr?.length === 3) {
|
|
117
|
+
parsedVersion = `${ splitArr[0] }.${ splitArr[1] }.999`;
|
|
89
118
|
}
|
|
90
119
|
|
|
91
|
-
return
|
|
120
|
+
return parsedVersion;
|
|
92
121
|
}
|
|
93
122
|
|
|
94
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Check if a version is incompatible with the current environment
|
|
125
|
+
*/
|
|
126
|
+
function checkIncompatibility(currentVersion, requiredVersion, incompatibilityData, returnObj, versionObj) {
|
|
127
|
+
if ((incompatibilityData.type === EXTENSIONS_INCOMPATIBILITY_TYPES.EXTENSIONS_API_MISSING && !requiredVersion) || (requiredVersion && !semver.satisfies(currentVersion, requiredVersion))) {
|
|
128
|
+
if (!returnObj) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
versionObj.isVersionCompatible = false;
|
|
132
|
+
versionObj.versionIncompatibilityData = { ...incompatibilityData, required: requiredVersion };
|
|
133
|
+
|
|
134
|
+
return versionObj;
|
|
135
|
+
}
|
|
95
136
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// i18n-uses plugins.error.generic, plugins.error.api, plugins.error.host, plugins.error.kubeVersion, plugins.error.version, plugins.error.developerPkg, plugins.error.apiAnnotationMissing
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Whether an extension should be loaded based on the metadata returned by the backend in the UIPlugins resource instance
|
|
144
|
+
* The output will be used to PREVENT loading of an extension that is already installed but isn't compatible with the system
|
|
145
|
+
*
|
|
146
|
+
* String output will display a message on the extension card to notify users on why the extension was not loaded
|
|
147
|
+
*
|
|
148
|
+
* @returns String | Boolean
|
|
149
|
+
*/
|
|
150
|
+
export function shouldNotLoadPlugin(UIPluginResource, { rancherVersion, kubeVersion }, loadedPlugins) {
|
|
151
|
+
if (!UIPluginResource.name || !UIPluginResource.version || !UIPluginResource.endpoint) {
|
|
100
152
|
return 'plugins.error.generic';
|
|
101
153
|
}
|
|
102
154
|
|
|
103
|
-
//
|
|
155
|
+
// Extension chart specified a required extension API version
|
|
104
156
|
// we are propagating the annotations in pkg/package.json for any extension
|
|
105
157
|
// inside the "spec.plugin.metadata" property of UIPlugin resource
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
158
|
+
const requiredUiExtensionsVersion = UIPluginResource.metadata?.[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_VERSION];
|
|
159
|
+
// semver.coerce will get rid of any suffix on the version numbering (-rc, -head, etc)
|
|
160
|
+
const parsedUiExtensionsApiVersion = semver.coerce(UI_EXTENSIONS_API_VERSION)?.version;
|
|
161
|
+
const parsedRancherVersion = rancherVersion ? parseRancherVersion(rancherVersion) : '';
|
|
162
|
+
const parsedKubeVersion = kubeVersion ? semver.coerce(kubeVersion)?.version : '';
|
|
163
|
+
|
|
164
|
+
if (!requiredUiExtensionsVersion) {
|
|
165
|
+
return 'plugins.error.apiAnnotationMissing';
|
|
166
|
+
} else if (requiredUiExtensionsVersion && !semver.satisfies(parsedUiExtensionsApiVersion, requiredUiExtensionsVersion)) {
|
|
109
167
|
return 'plugins.error.api';
|
|
110
168
|
}
|
|
111
169
|
|
|
112
170
|
// Host application
|
|
113
|
-
const requiredHost =
|
|
171
|
+
const requiredHost = UIPluginResource.metadata?.[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_HOST];
|
|
114
172
|
|
|
115
173
|
if (requiredHost && requiredHost !== UI_PLUGIN_HOST_APP) {
|
|
116
174
|
return 'plugins.error.host';
|
|
117
175
|
}
|
|
118
176
|
|
|
177
|
+
// Kube version
|
|
178
|
+
if (parsedKubeVersion) {
|
|
179
|
+
const requiredKubeVersion = UIPluginResource.metadata?.[UI_PLUGIN_CHART_ANNOTATIONS.KUBE_VERSION];
|
|
180
|
+
|
|
181
|
+
if (requiredKubeVersion && !semver.satisfies(parsedKubeVersion, requiredKubeVersion)) {
|
|
182
|
+
return 'plugins.error.kubeVersion';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
119
186
|
// Rancher version
|
|
120
|
-
if (
|
|
121
|
-
const requiredRancherVersion =
|
|
187
|
+
if (parsedRancherVersion) {
|
|
188
|
+
const requiredRancherVersion = UIPluginResource.metadata?.[UI_PLUGIN_CHART_ANNOTATIONS.RANCHER_VERSION];
|
|
122
189
|
|
|
123
|
-
if (requiredRancherVersion && !semver.satisfies(
|
|
190
|
+
if (requiredRancherVersion && !semver.satisfies(parsedRancherVersion, requiredRancherVersion)) {
|
|
124
191
|
return 'plugins.error.version';
|
|
125
192
|
}
|
|
126
193
|
}
|
|
127
194
|
|
|
128
195
|
// check if a builtin extension has been loaded before - improve developer experience
|
|
129
|
-
const checkLoaded = loadedPlugins.find((p) => p?.name ===
|
|
196
|
+
const checkLoaded = loadedPlugins.find((p) => p?.name === UIPluginResource?.name);
|
|
130
197
|
|
|
131
198
|
if (checkLoaded && checkLoaded.builtin) {
|
|
132
199
|
return 'plugins.error.developerPkg';
|
|
133
200
|
}
|
|
134
201
|
|
|
135
|
-
if (
|
|
202
|
+
if (UIPluginResource.metadata?.[UI_PLUGIN_LABELS.CATALOG]) {
|
|
136
203
|
return true;
|
|
137
204
|
}
|
|
138
205
|
|
|
139
206
|
return false;
|
|
140
207
|
}
|
|
141
208
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
versionObj.isCompatibleWithUi = false;
|
|
200
|
-
versionObj.requiredUiVersion = requiredUiVersion;
|
|
201
|
-
|
|
202
|
-
if (returnObj) {
|
|
203
|
-
return versionObj;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// check kube version
|
|
208
|
-
if (kubeVersion && requiredKubeVersion && !semver.satisfies(kubeVersion, requiredKubeVersion)) {
|
|
209
|
-
if (!returnObj) {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
versionObj.isCompatibleWithKubeVersion = false;
|
|
213
|
-
versionObj.requiredKubeVersion = requiredKubeVersion;
|
|
214
|
-
|
|
215
|
-
if (returnObj) {
|
|
216
|
-
return versionObj;
|
|
209
|
+
/**
|
|
210
|
+
* Wether an extension version is available to be installed, based on the annotations present in the Helm chart version
|
|
211
|
+
* backend may not automatically "limit" a particular version but dashboard will disable that version for install with this check
|
|
212
|
+
*
|
|
213
|
+
* The output will be used to display a message on the extension card to notify users if a LATEST version of an extension is available but isn't compatible (cardMessageKey)
|
|
214
|
+
* The output will also disable the buttons in the slide-in panel with extension details, displaying a tooltip message with the reason (tooltipKey)
|
|
215
|
+
*
|
|
216
|
+
* @returns Boolean | Object
|
|
217
|
+
*/
|
|
218
|
+
export function isSupportedChartVersion(versionData, returnObj = false) {
|
|
219
|
+
const { version, rancherVersion, kubeVersion } = versionData;
|
|
220
|
+
const versionObj = {
|
|
221
|
+
...version, isVersionCompatible: true, versionIncompatibilityData: {}
|
|
222
|
+
};
|
|
223
|
+
const parsedRancherVersion = rancherVersion ? parseRancherVersion(rancherVersion) : '';
|
|
224
|
+
const parsedUiExtensionsApiVersion = semver.coerce(UI_EXTENSIONS_API_VERSION)?.version;
|
|
225
|
+
|
|
226
|
+
const checks = [
|
|
227
|
+
{
|
|
228
|
+
currentVersion: kubeVersion,
|
|
229
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.KUBE_VERSION],
|
|
230
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.KUBE,
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
currentVersion: parsedRancherVersion,
|
|
234
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.RANCHER_VERSION],
|
|
235
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.UI,
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
currentVersion: parsedRancherVersion,
|
|
239
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.UI_VERSION],
|
|
240
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.UI,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
currentVersion: parsedUiExtensionsApiVersion,
|
|
244
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_VERSION],
|
|
245
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.EXTENSIONS_API_MISSING,
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
currentVersion: parsedUiExtensionsApiVersion,
|
|
249
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_VERSION],
|
|
250
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.EXTENSIONS_API,
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
currentVersion: UI_PLUGIN_HOST_APP,
|
|
254
|
+
requiredVersion: version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_HOST],
|
|
255
|
+
incompatibilityData: EXTENSIONS_INCOMPATIBILITY_DATA.HOST,
|
|
256
|
+
},
|
|
257
|
+
];
|
|
258
|
+
|
|
259
|
+
for (const { currentVersion, requiredVersion, incompatibilityData } of checks) {
|
|
260
|
+
const result = checkIncompatibility(currentVersion, requiredVersion, incompatibilityData, returnObj, versionObj);
|
|
261
|
+
|
|
262
|
+
if (result !== true) {
|
|
263
|
+
return result;
|
|
217
264
|
}
|
|
218
265
|
}
|
|
219
266
|
|
|
220
|
-
|
|
221
|
-
return versionObj;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return true;
|
|
267
|
+
return returnObj ? versionObj : true;
|
|
225
268
|
}
|
|
226
269
|
|
|
227
270
|
export function isChartVersionHigher(versionA, versionB) {
|
package/config/version.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Store version data retrieved from the backend /rancherversion API
|
|
3
3
|
*/
|
|
4
4
|
let _versionData = { RancherPrime: 'false' };
|
|
5
|
+
let _kubeVersionData = {};
|
|
5
6
|
|
|
6
7
|
export function isRancherPrime() {
|
|
7
8
|
return _versionData.RancherPrime?.toLowerCase() === 'true';
|
|
@@ -15,3 +16,12 @@ export function setVersionData(v) {
|
|
|
15
16
|
// Remove any properties on 'v' we don't want
|
|
16
17
|
_versionData = JSON.parse(JSON.stringify(v));
|
|
17
18
|
}
|
|
19
|
+
|
|
20
|
+
export function getKubeVersionData() {
|
|
21
|
+
return _kubeVersionData;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function setKubeVersionData(v) {
|
|
25
|
+
// Remove any properties on 'v' we don't want
|
|
26
|
+
_kubeVersionData = JSON.parse(JSON.stringify(v));
|
|
27
|
+
}
|
package/detail/configmap.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import RoleDetailEdit from '@shell/components/auth/RoleDetailEdit';
|
|
3
3
|
|
|
4
|
-
export default { components: { RoleDetailEdit } };
|
|
4
|
+
export default { emits: ['set-subtype'], components: { RoleDetailEdit } };
|
|
5
5
|
</script>
|
|
6
6
|
<template>
|
|
7
|
-
<RoleDetailEdit
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
@set-subtype="$emit('set-subtype', $event)"
|
|
7
|
+
<RoleDetailEdit
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
@set-subtype="$emit('set-subtype', $event)"
|
|
10
10
|
/>
|
|
11
11
|
</template>
|
package/detail/namespace.vue
CHANGED
package/detail/node.vue
CHANGED
package/detail/secret.vue
CHANGED
package/detail/service.vue
CHANGED
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
},
|
|
198
198
|
|
|
199
199
|
podHeaders() {
|
|
200
|
-
return this.$store.getters['type-map/headersFor'](this.podSchema).filter((h) => h !== NAMESPACE_COL);
|
|
200
|
+
return this.$store.getters['type-map/headersFor'](this.podSchema).filter((h) => !h.name || h.name !== NAMESPACE_COL.name);
|
|
201
201
|
},
|
|
202
202
|
|
|
203
203
|
graphVarsWorkload() {
|
|
@@ -17,7 +17,9 @@ import { _CREATE, _EDIT } from '@shell/config/query-params';
|
|
|
17
17
|
import ClusterIconMenu from '@shell/components/ClusterIconMenu';
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
|
-
name:
|
|
20
|
+
name: 'AddCustomBadgeDialog',
|
|
21
|
+
emits: ['close'],
|
|
22
|
+
|
|
21
23
|
components: {
|
|
22
24
|
Card,
|
|
23
25
|
AsyncButton,
|