@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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NAME as PRODUCT_NAME } from '@shell/config/product/cis';
|
|
2
2
|
import { CIS } from '@shell/config/types';
|
|
3
3
|
import { findBy } from '@shell/utils/array';
|
|
4
4
|
import { downloadFile, generateZip } from '@shell/utils/download';
|
|
5
|
-
import { get, isEmpty
|
|
5
|
+
import { get, isEmpty } from '@shell/utils/object';
|
|
6
6
|
import { sortBy } from '@shell/utils/sort';
|
|
7
7
|
import day from 'dayjs';
|
|
8
8
|
import SteveModel from '@shell/plugins/steve/steve-class';
|
|
@@ -77,20 +77,6 @@ export default class ClusterScan extends SteveModel {
|
|
|
77
77
|
return out;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
applyDefaults(vm, mode) {
|
|
81
|
-
if (mode === _CREATE || mode === _EDIT) {
|
|
82
|
-
const includeScheduling = this.canBeScheduled();
|
|
83
|
-
const spec = this.spec || {};
|
|
84
|
-
|
|
85
|
-
spec.scanProfileName = null;
|
|
86
|
-
if (includeScheduling) {
|
|
87
|
-
spec.scoreWarning = 'pass';
|
|
88
|
-
spec.scheduledScanConfig = { scanAlertRule: {}, retentionCount: 3 };
|
|
89
|
-
}
|
|
90
|
-
set(this, 'spec', spec);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
80
|
canBeScheduled() {
|
|
95
81
|
return hasSpecsScheduledScanConfig(this.$getters['schemaFor'](this.type));
|
|
96
82
|
}
|
|
@@ -166,6 +152,21 @@ export default class ClusterScan extends SteveModel {
|
|
|
166
152
|
});
|
|
167
153
|
}
|
|
168
154
|
}
|
|
155
|
+
|
|
156
|
+
get scanProfileLink() {
|
|
157
|
+
if (this.status?.lastRunScanProfileName) {
|
|
158
|
+
return {
|
|
159
|
+
name: 'c-cluster-product-resource-id',
|
|
160
|
+
params: {
|
|
161
|
+
resource: CIS.CLUSTER_SCAN_PROFILE,
|
|
162
|
+
product: PRODUCT_NAME,
|
|
163
|
+
id: this.status?.lastRunScanProfileName
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {};
|
|
169
|
+
}
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
const labelFor = (report) => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import SteveModel from '@shell/plugins/steve/steve-class';
|
|
3
|
+
import { NAME as PRODUCT_NAME } from '@shell/config/product/cis';
|
|
4
|
+
import { CIS } from '@shell/config/types';
|
|
3
5
|
|
|
4
6
|
export default class CISProfile extends SteveModel {
|
|
5
7
|
warnDeletionMessage(toRemove = []) {
|
|
@@ -11,4 +13,19 @@ export default class CISProfile extends SteveModel {
|
|
|
11
13
|
|
|
12
14
|
return skipTests.length;
|
|
13
15
|
}
|
|
16
|
+
|
|
17
|
+
get benchmarkVersionLink() {
|
|
18
|
+
if (this.spec?.benchmarkVersion) {
|
|
19
|
+
return {
|
|
20
|
+
name: 'c-cluster-product-resource-id',
|
|
21
|
+
params: {
|
|
22
|
+
resource: CIS.BENCHMARK,
|
|
23
|
+
product: PRODUCT_NAME,
|
|
24
|
+
id: this.spec?.benchmarkVersion
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
14
31
|
}
|
|
@@ -118,7 +118,7 @@ export default class MgmtCluster extends SteveModel {
|
|
|
118
118
|
// Provisioner is the "<something>Config" in the model
|
|
119
119
|
const provisioner = KONTAINER_TO_DRIVER[(this.provisioner || '').toLowerCase()] || this.provisioner;
|
|
120
120
|
|
|
121
|
-
if ( provisioner === 'rancherKubernetesEngine' ) {
|
|
121
|
+
if ( provisioner === 'rancherKubernetesEngine' || provisioner === 'rke') {
|
|
122
122
|
// Look for a cloud provider in one of the node templates
|
|
123
123
|
if ( this.machinePools?.[0] ) {
|
|
124
124
|
provider = this.machinePools[0]?.nodeTemplate?.spec?.driver || null;
|
|
@@ -105,7 +105,7 @@ export default class User extends HybridModel {
|
|
|
105
105
|
* @returns {number}
|
|
106
106
|
*/
|
|
107
107
|
get userLastLogin() {
|
|
108
|
-
return this.metadata?.labels?.['cattle.io/last-login'] * 1000;
|
|
108
|
+
return this.metadata?.labels?.['cattle.io/last-login'] * 1000 || 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
@@ -113,7 +113,7 @@ export default class User extends HybridModel {
|
|
|
113
113
|
* @returns {number}
|
|
114
114
|
*/
|
|
115
115
|
get userDisabledIn() {
|
|
116
|
-
return this.metadata?.labels?.['cattle.io/disable-after'] * 1000;
|
|
116
|
+
return this.metadata?.labels?.['cattle.io/disable-after'] * 1000 || 0;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
@@ -129,7 +129,7 @@ export default class User extends HybridModel {
|
|
|
129
129
|
* @returns {number}
|
|
130
130
|
*/
|
|
131
131
|
get userDeletedIn() {
|
|
132
|
-
return this.metadata?.labels?.['cattle.io/delete-after'] * 1000;
|
|
132
|
+
return this.metadata?.labels?.['cattle.io/delete-after'] * 1000 || 0;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
get state() {
|
|
@@ -885,7 +885,8 @@ export default class ProvCluster extends SteveModel {
|
|
|
885
885
|
get agentConfig() {
|
|
886
886
|
// The one we want is the first one with no selector.
|
|
887
887
|
// If there are multiple with no selector, that will fall under the unsupported message below.
|
|
888
|
-
return this.spec.rkeConfig
|
|
888
|
+
return this.spec.rkeConfig?.machineSelectorConfig
|
|
889
|
+
.find((x) => !x.machineLabelSelector)?.config || { };
|
|
889
890
|
}
|
|
890
891
|
|
|
891
892
|
get cloudProvider() {
|
package/models/steve-schema.ts
CHANGED
|
@@ -160,7 +160,7 @@ export default class SteveSchema extends Schema {
|
|
|
160
160
|
url
|
|
161
161
|
});
|
|
162
162
|
} catch (e: any) {
|
|
163
|
-
if ( e?._status ===
|
|
163
|
+
if (e?._status === 500 || e?._status === 503) {
|
|
164
164
|
// Rancher could be updating it's definition cache, attempt a few times
|
|
165
165
|
await wait(2000);
|
|
166
166
|
|
package/models/workload.js
CHANGED
|
@@ -15,7 +15,8 @@ export const defaultContainer = {
|
|
|
15
15
|
readOnlyRootFilesystem: false,
|
|
16
16
|
privileged: false,
|
|
17
17
|
allowPrivilegeEscalation: false,
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
volumeMounts: []
|
|
19
20
|
};
|
|
20
21
|
export default class Workload extends WorkloadService {
|
|
21
22
|
// remove clone as yaml/edit as yaml until API supported
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rancher/shell",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.5",
|
|
4
4
|
"description": "Rancher Dashboard Shell",
|
|
5
5
|
"repository": "https://github.com/rancherlabs/dashboard",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"e2e:dev": "start-server-and-test dev https://localhost:8005 cy:open"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/client-ec2": "3.1
|
|
30
|
+
"@aws-sdk/client-ec2": "3.658.1",
|
|
31
31
|
"@aws-sdk/client-eks": "3.1.0",
|
|
32
|
-
"@aws-sdk/client-iam": "3.
|
|
32
|
+
"@aws-sdk/client-iam": "3.658.1",
|
|
33
33
|
"@aws-sdk/client-kms": "3.8.1",
|
|
34
34
|
"@babel/plugin-proposal-optional-chaining": "7.14.5",
|
|
35
35
|
"@babel/plugin-proposal-private-methods": "7.18.6",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"babel-eslint": "10.1.0",
|
|
54
54
|
"babel-plugin-module-resolver": "4.0.0",
|
|
55
55
|
"babel-preset-vue": "2.0.2",
|
|
56
|
-
"browser-env": "3.3.0",
|
|
57
56
|
"clipboard-polyfill": "4.0.1",
|
|
58
57
|
"codemirror": ">=5.64.0 <6",
|
|
59
58
|
"codemirror-editor-vue3": "2.7.1",
|
|
@@ -99,7 +98,6 @@
|
|
|
99
98
|
"js-yaml": "4.1.0",
|
|
100
99
|
"js-yaml-loader": "1.2.2",
|
|
101
100
|
"jsdiff": "1.1.1",
|
|
102
|
-
"jsdom-global": "3.0.2",
|
|
103
101
|
"jsonpath-plus": "6.0.1",
|
|
104
102
|
"jsrsasign": "10.5.25",
|
|
105
103
|
"jszip": "3.8.0",
|
|
@@ -123,13 +121,13 @@
|
|
|
123
121
|
"unfetch": "4.2.0",
|
|
124
122
|
"url-parse": "1.5.10",
|
|
125
123
|
"vue": "~3.2.13",
|
|
126
|
-
"vue-resize": "0.4.5",
|
|
127
124
|
"vue-router": "4.4.3",
|
|
128
125
|
"vue-select": "4.0.0-beta.6",
|
|
129
126
|
"vue-server-renderer": "2.7.16",
|
|
130
127
|
"vue-template-compiler": "2.7.16",
|
|
128
|
+
"vue3-resize": "0.2.0",
|
|
131
129
|
"vue3-virtual-scroll-list": "0.2.1",
|
|
132
|
-
"vuedraggable": "
|
|
130
|
+
"vuedraggable": "4.1.0",
|
|
133
131
|
"vuex": "~4.0.0",
|
|
134
132
|
"webpack-bundle-analyzer": "4.5.0",
|
|
135
133
|
"webpack-virtual-modules": "0.4.3",
|
|
@@ -115,7 +115,9 @@ export default {
|
|
|
115
115
|
|
|
116
116
|
watch: {
|
|
117
117
|
'$route.query'(neu, old) {
|
|
118
|
-
|
|
118
|
+
// If the query changes, refetch the chart
|
|
119
|
+
// When going back to app list, the query is empty and we don't want to refetch
|
|
120
|
+
if ( !isEqual(neu, old) && Object.keys(neu).length > 0 ) {
|
|
119
121
|
this.$fetch();
|
|
120
122
|
}
|
|
121
123
|
},
|
|
@@ -5,6 +5,7 @@ import isEqual from 'lodash/isEqual';
|
|
|
5
5
|
import { mapPref, DIFF } from '@shell/store/prefs';
|
|
6
6
|
import { mapFeature, MULTI_CLUSTER, LEGACY } from '@shell/store/features';
|
|
7
7
|
import { mapGetters } from 'vuex';
|
|
8
|
+
import { markRaw } from 'vue';
|
|
8
9
|
import { Banner } from '@components/Banner';
|
|
9
10
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
10
11
|
import ChartReadme from '@shell/components/ChartReadme';
|
|
@@ -260,14 +261,6 @@ export default {
|
|
|
260
261
|
await this.loadValuesComponent();
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
/*
|
|
264
|
-
Check if the Helm chart has indicated
|
|
265
|
-
that the user should fill out the chart values
|
|
266
|
-
through a wizard-style workflow. If so, load
|
|
267
|
-
the chart steps.
|
|
268
|
-
*/
|
|
269
|
-
await this.loadChartSteps();
|
|
270
|
-
|
|
271
264
|
/*
|
|
272
265
|
this.loadedVersion will only be true if you select a non-defalut
|
|
273
266
|
option from the "Version" dropdown menu in Apps & Marketplace
|
|
@@ -451,10 +444,6 @@ export default {
|
|
|
451
444
|
weight: 10
|
|
452
445
|
},
|
|
453
446
|
|
|
454
|
-
customSteps: [
|
|
455
|
-
|
|
456
|
-
],
|
|
457
|
-
|
|
458
447
|
isPlainLayout: isPlainLayout(this.$route.query),
|
|
459
448
|
|
|
460
449
|
legacyDefs: {
|
|
@@ -674,7 +663,6 @@ export default {
|
|
|
674
663
|
steps.push(
|
|
675
664
|
this.stepBasic,
|
|
676
665
|
this.stepValues,
|
|
677
|
-
...this.customSteps
|
|
678
666
|
);
|
|
679
667
|
}
|
|
680
668
|
|
|
@@ -744,7 +732,9 @@ export default {
|
|
|
744
732
|
|
|
745
733
|
watch: {
|
|
746
734
|
'$route.query'(neu, old) {
|
|
747
|
-
|
|
735
|
+
// If the query changes, refetch the chart
|
|
736
|
+
// When going back to app list, the query is empty and we don't want to refetch
|
|
737
|
+
if ( !isEqual(neu, old) && Object.keys(neu).length > 0 ) {
|
|
748
738
|
this.$fetch();
|
|
749
739
|
this.showSlideIn = false;
|
|
750
740
|
}
|
|
@@ -824,10 +814,6 @@ export default {
|
|
|
824
814
|
// for editing values
|
|
825
815
|
await this.loadValuesComponent();
|
|
826
816
|
|
|
827
|
-
// Load Helm chart info used for showing
|
|
828
|
-
// wizard steps
|
|
829
|
-
await this.loadChartSteps();
|
|
830
|
-
|
|
831
817
|
window.scrollTop = 0;
|
|
832
818
|
|
|
833
819
|
this.preFormYamlOption = this.valuesComponent || this.hasQuestions ? VALUES_STATE.FORM : VALUES_STATE.YAML;
|
|
@@ -908,7 +894,7 @@ export default {
|
|
|
908
894
|
const hasChartComponent = this.$store.getters['type-map/hasCustomChart'](component);
|
|
909
895
|
|
|
910
896
|
if ( hasChartComponent ) {
|
|
911
|
-
this.valuesComponent = this.$store.getters['type-map/importChart'](component);
|
|
897
|
+
this.valuesComponent = markRaw(this.$store.getters['type-map/importChart'](component));
|
|
912
898
|
this.showValuesComponent = true;
|
|
913
899
|
} else {
|
|
914
900
|
this.valuesComponent = null;
|
|
@@ -920,32 +906,6 @@ export default {
|
|
|
920
906
|
}
|
|
921
907
|
},
|
|
922
908
|
|
|
923
|
-
async loadChartSteps() {
|
|
924
|
-
const component = this.version?.annotations?.[CATALOG_ANNOTATIONS.COMPONENT];
|
|
925
|
-
|
|
926
|
-
if ( component ) {
|
|
927
|
-
const steps = await this.$store.getters['catalog/chartSteps'](component);
|
|
928
|
-
|
|
929
|
-
this.customSteps = await Promise.all( steps.map((cs) => this.loadChartStep(cs)));
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
|
|
933
|
-
async loadChartStep(customStep) {
|
|
934
|
-
const loaded = await customStep.component();
|
|
935
|
-
const withFallBack = this.$store.getters['i18n/withFallback'];
|
|
936
|
-
|
|
937
|
-
return {
|
|
938
|
-
name: customStep.name,
|
|
939
|
-
label: withFallBack(loaded?.default?.label, null, customStep.name),
|
|
940
|
-
subtext: withFallBack(loaded?.default?.subtext, null, ''),
|
|
941
|
-
weight: loaded?.default?.weight,
|
|
942
|
-
ready: false,
|
|
943
|
-
hidden: true,
|
|
944
|
-
loading: true,
|
|
945
|
-
component: customStep.component,
|
|
946
|
-
};
|
|
947
|
-
},
|
|
948
|
-
|
|
949
909
|
selectChart(chart) {
|
|
950
910
|
if ( !chart ) {
|
|
951
911
|
return;
|
|
@@ -1345,17 +1305,6 @@ export default {
|
|
|
1345
1305
|
@cancel="cancel"
|
|
1346
1306
|
@finish="finish"
|
|
1347
1307
|
>
|
|
1348
|
-
<template
|
|
1349
|
-
v-for="customStep of customSteps"
|
|
1350
|
-
v-slot:[customStep.name]
|
|
1351
|
-
:key="customStep.name"
|
|
1352
|
-
>
|
|
1353
|
-
<component
|
|
1354
|
-
:is="customStep.component"
|
|
1355
|
-
@update="updateStep(customStep.name, $event)"
|
|
1356
|
-
@errors="e=>errors.push(...e)"
|
|
1357
|
-
/>
|
|
1358
|
-
</template>
|
|
1359
1308
|
<template #bannerTitleImage>
|
|
1360
1309
|
<div>
|
|
1361
1310
|
<div class="logo-bg">
|
|
@@ -318,7 +318,7 @@ export default {
|
|
|
318
318
|
{{ t('performance.manualRefresh.setting') }}
|
|
319
319
|
</p>
|
|
320
320
|
<LabeledInput
|
|
321
|
-
v-model.number="value.manualRefresh.threshold"
|
|
321
|
+
v-model:value.number="value.manualRefresh.threshold"
|
|
322
322
|
:mode="mode"
|
|
323
323
|
:label="t('performance.manualRefresh.inputLabel')"
|
|
324
324
|
:disabled="!value.manualRefresh.enabled"
|
|
@@ -397,7 +397,7 @@ export default {
|
|
|
397
397
|
{{ t('performance.gc.howRun.count.description') }}
|
|
398
398
|
</p>
|
|
399
399
|
<LabeledInput
|
|
400
|
-
v-model.number="value.garbageCollection.countThreshold"
|
|
400
|
+
v-model:value.number="value.garbageCollection.countThreshold"
|
|
401
401
|
:mode="mode"
|
|
402
402
|
:label="t('performance.gc.howRun.count.inputLabel')"
|
|
403
403
|
:disabled="!value.garbageCollection.enabled"
|
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
import { CATALOG } from '@shell/config/types';
|
|
3
3
|
import Dialog from '@shell/components/Dialog.vue';
|
|
4
4
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
5
|
-
import {
|
|
6
|
-
UI_PLUGINS_REPO_NAME,
|
|
7
|
-
UI_PLUGINS_REPO_URL,
|
|
8
|
-
UI_PLUGINS_REPO_BRANCH,
|
|
9
|
-
UI_PLUGINS_PARTNERS_REPO_NAME,
|
|
10
|
-
UI_PLUGINS_PARTNERS_REPO_URL,
|
|
11
|
-
UI_PLUGINS_PARTNERS_REPO_BRANCH,
|
|
12
|
-
} from '@shell/config/uiplugins';
|
|
5
|
+
import { UI_PLUGINS_REPOS } from '@shell/config/uiplugins';
|
|
13
6
|
import { isRancherPrime } from '@shell/config/version';
|
|
14
7
|
|
|
15
8
|
export default {
|
|
9
|
+
emits: ['done'],
|
|
10
|
+
|
|
16
11
|
components: {
|
|
17
12
|
Checkbox,
|
|
18
13
|
Dialog,
|
|
@@ -36,15 +31,15 @@ export default {
|
|
|
36
31
|
reposInfo: {
|
|
37
32
|
official: {
|
|
38
33
|
repo: undefined,
|
|
39
|
-
name:
|
|
40
|
-
url:
|
|
41
|
-
branch:
|
|
34
|
+
name: UI_PLUGINS_REPOS.OFFICIAL.NAME,
|
|
35
|
+
url: UI_PLUGINS_REPOS.OFFICIAL.URL,
|
|
36
|
+
branch: UI_PLUGINS_REPOS.OFFICIAL.BRANCH,
|
|
42
37
|
},
|
|
43
38
|
partners: {
|
|
44
39
|
repo: undefined,
|
|
45
|
-
name:
|
|
46
|
-
url:
|
|
47
|
-
branch:
|
|
40
|
+
name: UI_PLUGINS_REPOS.PARTNERS.NAME,
|
|
41
|
+
url: UI_PLUGINS_REPOS.PARTNERS.URL,
|
|
42
|
+
branch: UI_PLUGINS_REPOS.PARTNERS.BRANCH,
|
|
48
43
|
}
|
|
49
44
|
},
|
|
50
45
|
isDialogActive: false,
|
|
@@ -53,10 +48,10 @@ export default {
|
|
|
53
48
|
|
|
54
49
|
computed: {
|
|
55
50
|
hasRancherUIPluginsRepo() {
|
|
56
|
-
return !!this.repos.find((r) => r.urlDisplay ===
|
|
51
|
+
return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_REPOS.OFFICIAL.URL);
|
|
57
52
|
},
|
|
58
53
|
hasRancherUIPartnersPluginsRepo() {
|
|
59
|
-
return !!this.repos.find((r) => r.urlDisplay ===
|
|
54
|
+
return !!this.repos.find((r) => r.urlDisplay === UI_PLUGINS_REPOS.PARTNERS.URL);
|
|
60
55
|
}
|
|
61
56
|
},
|
|
62
57
|
|
|
@@ -10,6 +10,8 @@ import { UI_PLUGIN_CATALOG } from '@shell/config/table-headers';
|
|
|
10
10
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
|
+
emits: ['showCatalogUninstallDialog', 'showCatalogLoadDialog'],
|
|
14
|
+
|
|
13
15
|
name: 'CatalogList',
|
|
14
16
|
|
|
15
17
|
components: { ResourceTable },
|
|
@@ -4,9 +4,11 @@ import AppModal from '@shell/components/AppModal.vue';
|
|
|
4
4
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
5
5
|
import Checkbox from '@components/Form/Checkbox/Checkbox.vue';
|
|
6
6
|
import { UI_PLUGIN } from '@shell/config/types';
|
|
7
|
-
import { UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
|
|
7
|
+
import { UI_PLUGIN_CHART_ANNOTATIONS, UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
+
emits: ['closed'],
|
|
11
|
+
|
|
10
12
|
components: {
|
|
11
13
|
AsyncButton,
|
|
12
14
|
Checkbox,
|
|
@@ -105,8 +107,9 @@ export default {
|
|
|
105
107
|
endpoint: url,
|
|
106
108
|
noCache: true,
|
|
107
109
|
metadata: {
|
|
108
|
-
developer:
|
|
109
|
-
direct:
|
|
110
|
+
developer: 'true',
|
|
111
|
+
direct: 'true',
|
|
112
|
+
[UI_PLUGIN_CHART_ANNOTATIONS.EXTENSIONS_VERSION]: '>= 3',
|
|
110
113
|
},
|
|
111
114
|
noAuth: true
|
|
112
115
|
}
|
|
@@ -65,10 +65,9 @@ export default {
|
|
|
65
65
|
async loadPluginVersionInfo(version) {
|
|
66
66
|
const versionName = version || this.info.displayVersion;
|
|
67
67
|
|
|
68
|
-
const
|
|
69
|
-
const isVersionNotCompatibleWithKubeVersion = this.info.versions?.find((v) => v.version === versionName && !v.isCompatibleWithKubeVersion);
|
|
68
|
+
const isVersionNotCompatible = this.info.versions?.find((v) => v.version === versionName && !v.isVersionCompatible);
|
|
70
69
|
|
|
71
|
-
if (!this.info.chart ||
|
|
70
|
+
if (!this.info.chart || isVersionNotCompatible) {
|
|
72
71
|
return;
|
|
73
72
|
}
|
|
74
73
|
|
|
@@ -107,18 +106,15 @@ export default {
|
|
|
107
106
|
},
|
|
108
107
|
|
|
109
108
|
handleVersionBtnTooltip(version) {
|
|
110
|
-
if (version.
|
|
111
|
-
return this.t(
|
|
112
|
-
}
|
|
113
|
-
if (version.requiredKubeVersion) {
|
|
114
|
-
return this.t('plugins.info.requiresKubeVersion', { version: version.requiredKubeVersion });
|
|
109
|
+
if (!version.isVersionCompatible && Object.keys(version.versionIncompatibilityData).length) {
|
|
110
|
+
return this.t(version.versionIncompatibilityData?.tooltipKey, { required: version.versionIncompatibilityData?.required, mainHost: version.versionIncompatibilityData?.mainHost });
|
|
115
111
|
}
|
|
116
112
|
|
|
117
113
|
return '';
|
|
118
114
|
},
|
|
119
115
|
|
|
120
116
|
handleVersionBtnClass(version) {
|
|
121
|
-
return { 'version-active': version.version === this.infoVersion, disabled: !version.
|
|
117
|
+
return { 'version-active': version.version === this.infoVersion, disabled: !version.isVersionCompatible };
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
};
|
|
@@ -185,12 +181,6 @@ export default {
|
|
|
185
181
|
</div>
|
|
186
182
|
</div>
|
|
187
183
|
<div>
|
|
188
|
-
<Banner
|
|
189
|
-
v-if="info.error"
|
|
190
|
-
color="error"
|
|
191
|
-
:label="info.error"
|
|
192
|
-
class="mt-10"
|
|
193
|
-
/>
|
|
194
184
|
<Banner
|
|
195
185
|
v-if="info.builtin"
|
|
196
186
|
color="warning"
|
|
@@ -218,8 +208,8 @@ export default {
|
|
|
218
208
|
</h3>
|
|
219
209
|
<div class="plugin-versions mb-10">
|
|
220
210
|
<div
|
|
221
|
-
v-for="
|
|
222
|
-
:key="
|
|
211
|
+
v-for="v in info.versions"
|
|
212
|
+
:key="`${v.name}-${v.version}`"
|
|
223
213
|
>
|
|
224
214
|
<a
|
|
225
215
|
v-clean-tooltip="handleVersionBtnTooltip(v)"
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
2
|
import { mount } from '@vue/test-utils';
|
|
3
|
-
import {
|
|
4
|
-
UI_PLUGINS_REPO_URL,
|
|
5
|
-
UI_PLUGINS_PARTNERS_REPO_URL,
|
|
6
|
-
} from '@shell/config/uiplugins';
|
|
3
|
+
import { UI_PLUGINS_REPOS } from '@shell/config/uiplugins';
|
|
7
4
|
import AddExtensionRepos from '@shell/pages/c/_cluster/uiplugins/AddExtensionRepos.vue';
|
|
8
5
|
const mockedStore = () => {
|
|
9
6
|
return {
|
|
@@ -13,8 +10,8 @@ const mockedStore = () => {
|
|
|
13
10
|
t: (text: string) => text,
|
|
14
11
|
'management/schemaFor': () => true,
|
|
15
12
|
'management/findAll': () => [
|
|
16
|
-
{ urlDisplay:
|
|
17
|
-
{ urlDisplay:
|
|
13
|
+
{ urlDisplay: UI_PLUGINS_REPOS.OFFICIAL.URL },
|
|
14
|
+
{ urlDisplay: UI_PLUGINS_REPOS.PARTNERS.URL },
|
|
18
15
|
]
|
|
19
16
|
}
|
|
20
17
|
};
|