@rancher/shell 0.1.2 → 0.1.4
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/brand/suse/dark/rancher-logo.svg +1 -148
- package/assets/brand/suse/rancher-logo.svg +1 -130
- package/assets/images/featured/img1.jpg +0 -0
- package/assets/images/featured.jpg +0 -0
- package/assets/images/generic-plugin.svg +7 -0
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +3 -0
- package/assets/styles/themes/_suse.scss +1 -1
- package/assets/translations/en-us.yaml +209 -813
- package/assets/translations/zh-hans.yaml +28 -792
- package/components/ActionMenu.vue +3 -3
- package/components/AsyncButton.vue +17 -2
- package/components/ButtonDropdown.vue +4 -0
- package/components/Carousel.vue +291 -0
- package/components/CodeMirror.vue +6 -8
- package/components/CommunityLinks.vue +70 -19
- package/components/ContainerResourceLimit.vue +14 -0
- package/components/CruResource.vue +11 -3
- package/components/Dialog.vue +102 -0
- package/components/ExplorerMembers.vue +121 -0
- package/components/ExplorerProjectsNamespaces.vue +404 -0
- package/components/GrafanaDashboard.vue +17 -2
- package/components/IconMessage.vue +9 -1
- package/components/LocaleSelector.vue +114 -0
- package/components/PromptModal.vue +2 -3
- package/components/ResourceList/index.vue +1 -1
- package/components/ResourceTable.vue +9 -7
- package/components/SimpleBox.vue +6 -4
- package/components/SingleClusterInfo.vue +1 -1
- package/components/SortableTable/index.vue +18 -25
- package/components/SortableTable/selection.js +1 -0
- package/components/Tabbed/Tab.vue +5 -0
- package/components/Tabbed/index.vue +29 -2
- package/components/auth/AzureWarning.vue +5 -1
- package/components/auth/Principal.vue +2 -1
- package/components/auth/RoleDetailEdit.vue +18 -11
- package/components/fleet/FleetBundles.vue +8 -3
- package/components/fleet/FleetRepos.vue +0 -2
- package/components/fleet/FleetSummary.vue +6 -0
- package/components/form/KeyValue.vue +80 -58
- package/components/form/NameNsDescription.vue +12 -8
- package/components/form/NodeScheduling.vue +1 -1
- package/components/form/ResourceTabs/index.vue +5 -1
- package/components/form/WorkloadPorts.vue +1 -1
- package/components/formatter/ClusterLink.vue +3 -7
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/nav/Header.vue +9 -9
- package/components/nav/NamespaceFilter.vue +10 -7
- package/components/nav/TopLevelMenu.vue +10 -65
- package/components/nav/WindowManager/ContainerLogs.vue +1 -1
- package/config/footer.js +13 -14
- package/config/labels-annotations.js +2 -1
- package/config/product/explorer.js +5 -4
- package/config/product/harvester-manager.js +64 -2
- package/config/product/legacy.js +0 -47
- package/config/product/manager.js +9 -0
- package/config/product/multi-cluster-apps.js +0 -12
- package/config/product/settings.js +12 -1
- package/config/product/uiplugins.js +17 -0
- package/config/settings.js +37 -72
- package/config/table-headers.js +0 -1
- package/config/types.js +9 -25
- package/config/uiplugins.js +60 -0
- package/content/docs/en-us/getting-started.md +1 -26
- package/core/plugin-routes.ts +34 -22
- package/core/plugin.ts +15 -3
- package/core/plugins-loader.js +2 -0
- package/core/plugins.js +91 -36
- package/core/types.ts +7 -1
- package/detail/provisioning.cattle.io.cluster.vue +15 -2
- package/detail/workload/index.vue +11 -5
- package/{components/dialog → dialog}/AddClusterMemberDialog.vue +0 -0
- package/{components/dialog → dialog}/AddCustomBadgeDialog.vue +0 -0
- package/{components/dialog → dialog}/AddProjectMemberDialog.vue +0 -0
- package/{components/dialog → dialog}/AddonConfigConfirmationDialog.vue +0 -0
- package/dialog/DiagnosticTimingsDialog.vue +116 -0
- package/{components/dialog → dialog}/DrainNode.vue +0 -0
- package/{components/dialog → dialog}/ForceMachineRemoveDialog.vue +0 -0
- package/{components/dialog → dialog}/GenericPrompt.vue +0 -0
- package/{components/dialog → dialog}/RollbackWorkloadDialog.vue +0 -0
- package/{components/dialog → dialog}/RotateCertificatesDialog.vue +9 -3
- package/{components/dialog → dialog}/RotateEncryptionKeyDialog.vue +0 -0
- package/{components/dialog → dialog}/SaveAsRKETemplateDialog.vue +0 -0
- package/{components/dialog → dialog}/ScaleMachineDownDialog.vue +0 -0
- package/edit/auth/azuread.vue +44 -6
- package/edit/management.cattle.io.project.vue +2 -2
- package/edit/namespace.vue +17 -10
- package/edit/networking.k8s.io.ingress/index.vue +2 -2
- package/edit/persistentvolume/index.vue +3 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/pod.vue +27 -0
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +33 -5
- package/edit/provisioning.cattle.io.cluster/rke2.vue +76 -5
- package/edit/service.vue +8 -6
- package/edit/workload/__tests__/Upgrading.test.ts +1 -0
- package/edit/workload/index.vue +375 -15
- package/edit/workload/mixins/workload.js +62 -7
- package/edit/workload/storage/ContainerMountPaths.vue +240 -0
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +20 -1
- package/edit/workload/storage/azureDisk.vue +22 -2
- package/edit/workload/storage/azureFile.vue +20 -2
- package/edit/workload/storage/csi/index.vue +23 -1
- package/edit/workload/storage/gcePersistentDisk.vue +20 -2
- package/edit/workload/storage/index.vue +23 -49
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +11 -1
- package/layouts/default.vue +63 -32
- package/layouts/error.vue +5 -1
- package/layouts/home.vue +14 -5
- package/layouts/plain.vue +10 -5
- package/list/harvesterhci.io.management.cluster.vue +74 -33
- package/list/management.cattle.io.setting.vue +3 -3
- package/list/namespace.vue +3 -5
- package/list/provisioning.cattle.io.cluster.vue +1 -1
- package/machine-config/amazonec2.vue +2 -0
- package/machine-config/harvester.vue +100 -51
- package/middleware/authenticated.js +56 -52
- package/mixins/form-validation.js +1 -1
- package/mixins/resource-fetch.js +3 -1
- package/models/catalog.cattle.io.uiplugin.js +34 -0
- package/models/cluster/node.js +25 -2
- package/models/fleet.cattle.io.bundle.js +27 -20
- package/models/harvesterhci.io.management.cluster.js +200 -5
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.clusterroletemplatebinding.js +9 -0
- package/models/management.cattle.io.project.js +23 -2
- package/models/namespace.js +19 -3
- package/models/pod.js +19 -2
- package/models/provisioning.cattle.io.cluster.js +16 -6
- package/models/workload.js +9 -246
- package/models/workload.service.js +314 -0
- package/nuxt.config.js +80 -34
- package/package.json +107 -108
- package/pages/auth/login.vue +11 -2
- package/pages/auth/setup.vue +1 -1
- package/pages/c/_cluster/_product/members/index.vue +3 -93
- package/pages/c/_cluster/_product/projectsnamespaces.vue +6 -403
- package/pages/c/_cluster/apps/charts/index.vue +46 -1
- package/pages/c/_cluster/apps/charts/install.vue +10 -9
- package/pages/c/_cluster/explorer/index.vue +72 -9
- package/pages/c/_cluster/explorer/tools/index.vue +12 -5
- package/pages/c/_cluster/mcapps/index.vue +1 -1
- package/pages/c/_cluster/settings/brand.vue +0 -40
- package/pages/c/_cluster/settings/links.vue +200 -0
- package/pages/c/_cluster/settings/performance.vue +19 -16
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +232 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +242 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +284 -0
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +130 -0
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +253 -0
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +115 -0
- package/pages/c/_cluster/uiplugins/index.vue +694 -0
- package/pages/diagnostic.vue +185 -101
- package/pages/docs/_doc.vue +3 -1
- package/pages/fail-whale.vue +1 -10
- package/pages/home.vue +21 -56
- package/pages/index.vue +18 -4
- package/pages/prefs.vue +108 -86
- package/pages/safeMode.vue +17 -0
- package/pages/support/index.vue +23 -15
- package/pkg/auto-import.js +44 -7
- package/pkg/dynamic-importer.lib.js +4 -0
- package/pkg/dynamic-plugin-loader.js +28 -0
- package/pkg/import.js +2 -2
- package/pkg/model-loader-require.lib.js +3 -0
- package/pkg/vue.config.js +9 -6
- package/plugins/dashboard-store/model-loader-require.js +12 -0
- package/plugins/dashboard-store/model-loader.js +4 -1
- package/plugins/dashboard-store/resource-class.js +12 -5
- package/plugins/formatters.js +15 -0
- package/plugins/plugin.js +56 -4
- package/plugins/steve/actions.js +1 -1
- package/plugins/steve/index.js +6 -4
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/subscribe.js +89 -56
- package/plugins/steve/web-worker.steve-sub-worker.js +24 -15
- package/promptRemove/management.cattle.io.globalrole.vue +47 -0
- package/promptRemove/management.cattle.io.roletemplate.vue +47 -0
- package/promptRemove/mixin/roleDeletionCheck.js +97 -0
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +77 -0
- package/rancher-components/Form/Checkbox/Checkbox.vue +12 -2
- package/scripts/build-pkg.sh +48 -2
- package/scripts/drone-build-pkg.sh +31 -0
- package/scripts/publish-shell.sh +11 -12
- package/scripts/serve-pkgs +17 -10
- package/scripts/sync-shell-deps +37 -0
- package/store/catalog.js +12 -9
- package/store/i18n.js +26 -12
- package/store/index.js +4 -181
- package/store/prefs.js +46 -2
- package/store/type-map.js +47 -33
- package/store/uiplugins.ts +15 -61
- package/utils/__tests__/object.test.ts +0 -24
- package/utils/__tests__/selector.test.ts +1 -1
- package/utils/cluster.js +1 -1
- package/utils/custom-validators.js +1 -12
- package/utils/dynamic-importer.js +5 -1
- package/utils/grafana.js +2 -6
- package/utils/socket.js +41 -20
- package/utils/string.js +1 -7
- package/utils/validators/formRules/__tests__/index.test.ts +108 -0
- package/utils/validators/formRules/index.ts +9 -1
- package/utils/validators/setting.js +0 -35
- package/yarn-error.log +195 -0
- package/components/FilterLabel.vue +0 -254
- package/components/HarvesterUpgradeProgressBarList.vue +0 -109
- package/components/VMConsoleBar.vue +0 -87
- package/components/dialog/harvester/AddHotplugModal.vue +0 -159
- package/components/dialog/harvester/BackupModal.vue +0 -117
- package/components/dialog/harvester/CloneTemplate.vue +0 -125
- package/components/dialog/harvester/EjectCDROMDialog.vue +0 -157
- package/components/dialog/harvester/ExportImageDialog.vue +0 -152
- package/components/dialog/harvester/MaintenanceDialog.vue +0 -94
- package/components/dialog/harvester/MigrationDialog.vue +0 -154
- package/components/dialog/harvester/RestoreDialog.vue +0 -153
- package/components/dialog/harvester/SupportBundle.vue +0 -217
- package/components/dialog/harvester/UnplugVolume.vue +0 -108
- package/components/form/SerialConsole/index.vue +0 -267
- package/components/formatter/AttachVMWithName.vue +0 -46
- package/components/formatter/CloudInitType.vue +0 -27
- package/components/formatter/HarvesterBackupTargetValidation.vue +0 -43
- package/components/formatter/HarvesterCPUUsed.vue +0 -122
- package/components/formatter/HarvesterDiskState.vue +0 -66
- package/components/formatter/HarvesterHostName.vue +0 -66
- package/components/formatter/HarvesterIpAddress.vue +0 -90
- package/components/formatter/HarvesterMemoryUsed.vue +0 -140
- package/components/formatter/HarvesterMigrationState.vue +0 -85
- package/components/formatter/HarvesterNodeName.vue +0 -49
- package/components/formatter/HarvesterStorageUsed.vue +0 -194
- package/components/formatter/HarvesterVmState.vue +0 -123
- package/components/nav/HarvesterUpgrade.vue +0 -232
- package/components/novnc/NovncConsole.vue +0 -93
- package/components/novnc/NovncConsoleItem.vue +0 -89
- package/components/novnc/NovncConsoleWrapper.vue +0 -243
- package/config/harvester-map.js +0 -44
- package/config/harvester-table-headers.js +0 -27
- package/config/product/harvester.js +0 -305
- package/detail/harvesterhci.io.host/HarvesterHostBasic.vue +0 -364
- package/detail/harvesterhci.io.host/HarvesterHostDisk.vue +0 -200
- package/detail/harvesterhci.io.host/HarvesterHostNetwork.vue +0 -89
- package/detail/harvesterhci.io.host/VirtualMachineInstance.vue +0 -134
- package/detail/harvesterhci.io.host/index.vue +0 -243
- package/detail/harvesterhci.io.virtualmachinebackup/index.vue +0 -221
- package/detail/harvesterhci.io.virtualmachineimage.vue +0 -118
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineBasics.vue +0 -279
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineEvents.vue +0 -75
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineKeypairs.vue +0 -114
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineMigration.vue +0 -79
- package/detail/kubevirt.io.virtualmachine/index.vue +0 -213
- package/edit/harvesterhci.io.cloudtemplate.vue +0 -123
- package/edit/harvesterhci.io.host/HarvesterDisk.vue +0 -262
- package/edit/harvesterhci.io.host/index.vue +0 -533
- package/edit/harvesterhci.io.keypair.vue +0 -112
- package/edit/harvesterhci.io.managedchart/index.vue +0 -25
- package/edit/harvesterhci.io.managedchart/rancher-monitoring.vue +0 -172
- package/edit/harvesterhci.io.networkattachmentdefinition.vue +0 -210
- package/edit/harvesterhci.io.setting/additional-ca.vue +0 -36
- package/edit/harvesterhci.io.setting/backup-target.vue +0 -182
- package/edit/harvesterhci.io.setting/http-proxy.vue +0 -79
- package/edit/harvesterhci.io.setting/index.vue +0 -201
- package/edit/harvesterhci.io.setting/overcommit-config.vue +0 -94
- package/edit/harvesterhci.io.setting/ssl-certificates.vue +0 -117
- package/edit/harvesterhci.io.setting/ssl-parameters.vue +0 -161
- package/edit/harvesterhci.io.setting/support-bundle-image.vue +0 -134
- package/edit/harvesterhci.io.setting/support-bundle-namespaces.vue +0 -73
- package/edit/harvesterhci.io.setting/vip-pools.vue +0 -244
- package/edit/harvesterhci.io.setting/vm-force-reset-policy.vue +0 -81
- package/edit/harvesterhci.io.virtualmachinebackup.vue +0 -256
- package/edit/harvesterhci.io.virtualmachineimage.vue +0 -364
- package/edit/harvesterhci.io.virtualmachinetemplateversion.vue +0 -340
- package/edit/harvesterhci.io.volume.vue +0 -195
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/AccessCredentialsUsers.vue +0 -190
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/index.vue +0 -212
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/type/basicAuth.vue +0 -94
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/type/sshkey.vue +0 -85
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig/DataTemplate.vue +0 -153
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig/index.vue +0 -279
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCpuMemory.vue +0 -113
- package/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/__tests__/HarvesterEditNetwork.test.ts +0 -41
- package/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue +0 -281
- package/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/index.vue +0 -142
- package/edit/kubevirt.io.virtualmachine/VirtualMachineReserved.vue +0 -54
- package/edit/kubevirt.io.virtualmachine/VirtualMachineSSHKey.vue +0 -256
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/index.vue +0 -391
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/__tests__/HarvesterEditContainer.test.ts +0 -40
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/__tests__/HarvesterEditExisting.test.ts +0 -102
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/__tests__/HarvesterEditVMImage.test.ts +0 -117
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/__tests__/HarvesterEditVolume.test.ts +0 -74
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/container.vue +0 -132
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/existing.vue +0 -303
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/vmImage.vue +0 -285
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/volume.vue +0 -188
- package/edit/kubevirt.io.virtualmachine/index.vue +0 -642
- package/edit/network.harvesterhci.io.clusternetwork/index.vue +0 -19
- package/edit/network.harvesterhci.io.clusternetwork/vlan.vue +0 -134
- package/edit/workload/types/Deployment.vue +0 -377
- package/edit/workload/types/Generic.vue +0 -295
- package/list/harvesterhci.io.cloudtemplate.vue +0 -78
- package/list/harvesterhci.io.dashboard/HarvesterUpgrade.vue +0 -211
- package/list/harvesterhci.io.dashboard/UpgradeInfo.vue +0 -40
- package/list/harvesterhci.io.dashboard/index.vue +0 -752
- package/list/harvesterhci.io.host/index.vue +0 -186
- package/list/harvesterhci.io.networkattachmentdefinition.vue +0 -167
- package/list/harvesterhci.io.setting.vue +0 -241
- package/list/harvesterhci.io.virtualmachinebackup.vue +0 -172
- package/list/harvesterhci.io.virtualmachineimage.vue +0 -80
- package/list/harvesterhci.io.virtualmachinetemplateversion.vue +0 -173
- package/list/harvesterhci.io.volume.vue +0 -122
- package/list/kubevirt.io.virtualmachine.vue +0 -193
- package/mixins/harvester-vm/impl.js +0 -267
- package/mixins/harvester-vm/index.js +0 -1357
- package/models/harvester/configmap.js +0 -32
- package/models/harvester/harvesterhci.io.blockdevice.js +0 -55
- package/models/harvester/harvesterhci.io.keypair.js +0 -12
- package/models/harvester/harvesterhci.io.setting.js +0 -127
- package/models/harvester/harvesterhci.io.supportbundle.js +0 -35
- package/models/harvester/harvesterhci.io.upgrade.js +0 -226
- package/models/harvester/harvesterhci.io.virtualmachinebackup.js +0 -116
- package/models/harvester/harvesterhci.io.virtualmachineimage.js +0 -255
- package/models/harvester/harvesterhci.io.virtualmachinerestore.js +0 -43
- package/models/harvester/harvesterhci.io.virtualmachinetemplate.js +0 -69
- package/models/harvester/harvesterhci.io.virtualmachinetemplateversion.js +0 -227
- package/models/harvester/k8s.cni.cncf.io.networkattachmentdefinition.js +0 -32
- package/models/harvester/kubevirt.io.virtualmachine.js +0 -850
- package/models/harvester/kubevirt.io.virtualmachineinstance.js +0 -142
- package/models/harvester/management.cattle.io.managedchart.js +0 -191
- package/models/harvester/management.cattle.io.setting.js +0 -40
- package/models/harvester/network.harvesterhci.io.clusternetwork.js +0 -100
- package/models/harvester/network.harvesterhci.io.nodenetwork.js +0 -34
- package/models/harvester/node.js +0 -255
- package/models/harvester/persistentvolumeclaim.js +0 -166
- package/models/harvester/pod.js +0 -185
- package/pages/c/_cluster/harvester/airgapupgrade/index.vue +0 -309
- package/pages/c/_cluster/harvester/console/_uid/serial.vue +0 -51
- package/pages/c/_cluster/harvester/console/_uid/vnc.vue +0 -52
- package/pages/c/_cluster/harvester/index.vue +0 -24
- package/pages/c/_cluster/harvester/support/index.vue +0 -154
- package/pages/plugins.vue +0 -387
- package/pkg/model-loader.lib.js +0 -3
- package/promptRemove/kubevirt.io.virtualmachine.vue +0 -164
- package/server/verdaccio-middleware.js +0 -56
- package/store/harvester-common.js +0 -126
- package/utils/validators/vm-datavolumes.js +0 -38
- package/utils/validators/vm-image.js +0 -32
- package/utils/validators/vm.js +0 -221
|
@@ -12,6 +12,8 @@ import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
|
12
12
|
import { asciiLike } from '@shell/utils/string';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
|
+
name: 'KeyValue',
|
|
16
|
+
|
|
15
17
|
components: {
|
|
16
18
|
Select,
|
|
17
19
|
TextAreaAutoGrow,
|
|
@@ -22,6 +24,10 @@ export default {
|
|
|
22
24
|
type: [Array, Object],
|
|
23
25
|
default: null,
|
|
24
26
|
},
|
|
27
|
+
defaultValue: {
|
|
28
|
+
type: [Array, Object],
|
|
29
|
+
default: null,
|
|
30
|
+
},
|
|
25
31
|
// If the user supplies this array, then it indicates which keys should be shown as binary
|
|
26
32
|
binaryValueKeys: {
|
|
27
33
|
type: [Array, Object],
|
|
@@ -223,68 +229,13 @@ export default {
|
|
|
223
229
|
}
|
|
224
230
|
},
|
|
225
231
|
data() {
|
|
226
|
-
const rows =
|
|
227
|
-
|
|
228
|
-
if ( this.asMap ) {
|
|
229
|
-
const input = this.value || {};
|
|
230
|
-
|
|
231
|
-
Object.keys(input).forEach((key) => {
|
|
232
|
-
let value = input[key];
|
|
233
|
-
const decodedValue = base64Decode(input[key]);
|
|
234
|
-
const asciiValue = asciiLike(decodedValue);
|
|
235
|
-
|
|
236
|
-
if ( this.handleBase64 && asciiValue) {
|
|
237
|
-
value = base64Decode(value);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
rows.push({
|
|
241
|
-
key,
|
|
242
|
-
value,
|
|
243
|
-
binary: this.displayValuesAsBinary || (this.handleBase64 && !asciiValue),
|
|
244
|
-
canEncode: this.handleBase64 && asciiValue,
|
|
245
|
-
supported: true,
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
} else {
|
|
249
|
-
const input = this.value || [];
|
|
250
|
-
|
|
251
|
-
for ( const row of input ) {
|
|
252
|
-
let value = row[this.valueName] || '';
|
|
253
|
-
const decodedValue = base64Decode(row[this.valueName]);
|
|
254
|
-
const asciiValue = asciiLike(decodedValue);
|
|
255
|
-
|
|
256
|
-
if ( this.handleBase64 && asciiValue) {
|
|
257
|
-
value = base64Decode(value);
|
|
258
|
-
}
|
|
259
|
-
const entry = {
|
|
260
|
-
[this.keyName]: row[this.keyName] || '',
|
|
261
|
-
[this.valueName]: value,
|
|
262
|
-
binary: this.displayValuesAsBinary || (this.handleBase64 && !asciiValue),
|
|
263
|
-
canEncode: this.handleBase64 && asciiValue,
|
|
264
|
-
supported: this.supported(row),
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
this.preserveKeys?.map((k) => {
|
|
268
|
-
if ( typeof row[k] !== 'undefined' ) {
|
|
269
|
-
entry[k] = row[k];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
rows.push(entry);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
if ( !rows.length && this.initialEmptyRow ) {
|
|
276
|
-
rows.push({
|
|
277
|
-
[this.keyName]: '',
|
|
278
|
-
[this.valueName]: '',
|
|
279
|
-
binary: false,
|
|
280
|
-
canEncode: this.handleBase64,
|
|
281
|
-
supported: true
|
|
282
|
-
});
|
|
283
|
-
}
|
|
232
|
+
const rows = this.getRows(this.value);
|
|
284
233
|
|
|
285
234
|
return { rows };
|
|
286
235
|
},
|
|
236
|
+
|
|
287
237
|
computed: {
|
|
238
|
+
|
|
288
239
|
isView() {
|
|
289
240
|
return this.mode === _VIEW;
|
|
290
241
|
},
|
|
@@ -315,7 +266,78 @@ export default {
|
|
|
315
266
|
created() {
|
|
316
267
|
this.queueUpdate = debounce(this.update, 500);
|
|
317
268
|
},
|
|
269
|
+
watch: {
|
|
270
|
+
defaultValue(neu) {
|
|
271
|
+
if (Array.isArray(neu)) {
|
|
272
|
+
this.rows = this.getRows(neu);
|
|
273
|
+
this.$emit('input', neu);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
318
277
|
methods: {
|
|
278
|
+
getRows(value) {
|
|
279
|
+
const rows = [];
|
|
280
|
+
|
|
281
|
+
if ( this.asMap ) {
|
|
282
|
+
const input = value || {};
|
|
283
|
+
|
|
284
|
+
Object.keys(input).forEach((key) => {
|
|
285
|
+
let value = input[key];
|
|
286
|
+
const decodedValue = base64Decode(input[key]);
|
|
287
|
+
const asciiValue = asciiLike(decodedValue);
|
|
288
|
+
|
|
289
|
+
if ( this.handleBase64 && asciiValue) {
|
|
290
|
+
value = base64Decode(value);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
rows.push({
|
|
294
|
+
key,
|
|
295
|
+
value,
|
|
296
|
+
binary: this.displayValuesAsBinary || (this.handleBase64 && !asciiValue),
|
|
297
|
+
canEncode: this.handleBase64 && asciiValue,
|
|
298
|
+
supported: true,
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
} else {
|
|
302
|
+
const input = value || [];
|
|
303
|
+
|
|
304
|
+
for ( const row of input ) {
|
|
305
|
+
let value = row[this.valueName] || '';
|
|
306
|
+
const decodedValue = base64Decode(row[this.valueName]);
|
|
307
|
+
const asciiValue = asciiLike(decodedValue);
|
|
308
|
+
|
|
309
|
+
if ( this.handleBase64 && asciiValue) {
|
|
310
|
+
value = base64Decode(value);
|
|
311
|
+
}
|
|
312
|
+
const entry = {
|
|
313
|
+
[this.keyName]: row[this.keyName] || '',
|
|
314
|
+
[this.valueName]: value,
|
|
315
|
+
binary: this.displayValuesAsBinary || (this.handleBase64 && !asciiValue),
|
|
316
|
+
canEncode: this.handleBase64 && asciiValue,
|
|
317
|
+
supported: this.supported(row),
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
this.preserveKeys?.map((k) => {
|
|
321
|
+
if ( typeof row[k] !== 'undefined' ) {
|
|
322
|
+
entry[k] = row[k];
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
rows.push(entry);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if ( !rows.length && this.initialEmptyRow ) {
|
|
329
|
+
rows.push({
|
|
330
|
+
[this.keyName]: '',
|
|
331
|
+
[this.valueName]: '',
|
|
332
|
+
binary: false,
|
|
333
|
+
canEncode: this.handleBase64,
|
|
334
|
+
supported: true
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return rows;
|
|
339
|
+
},
|
|
340
|
+
|
|
319
341
|
add(key = '', value = '') {
|
|
320
342
|
const obj = {
|
|
321
343
|
...this.defaultAddData,
|
|
@@ -5,7 +5,7 @@ import { get, set } from '@shell/utils/object';
|
|
|
5
5
|
import { sortBy } from '@shell/utils/sort';
|
|
6
6
|
import { NAMESPACE } from '@shell/config/types';
|
|
7
7
|
import { DESCRIPTION } from '@shell/config/labels-annotations';
|
|
8
|
-
import { _VIEW, _EDIT } from '@shell/config/query-params';
|
|
8
|
+
import { _VIEW, _EDIT, _CREATE } from '@shell/config/query-params';
|
|
9
9
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
10
10
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
11
11
|
|
|
@@ -208,7 +208,7 @@ export default {
|
|
|
208
208
|
},
|
|
209
209
|
|
|
210
210
|
computed: {
|
|
211
|
-
...mapGetters(['
|
|
211
|
+
...mapGetters(['currentProduct', 'currentCluster']),
|
|
212
212
|
namespaceReallyDisabled() {
|
|
213
213
|
return (
|
|
214
214
|
!!this.forceNamespace || this.namespaceDisabled || this.mode === _EDIT
|
|
@@ -224,17 +224,21 @@ export default {
|
|
|
224
224
|
const namespaces = this.namespacesOverride || this.$store.getters[`${ currentStore }/all`](this.namespaceType);
|
|
225
225
|
|
|
226
226
|
const filtered = namespaces.filter( this.namespaceFilter || ((namespace) => {
|
|
227
|
-
|
|
227
|
+
// By default, include the namespace in the dropdown.
|
|
228
|
+
let out = true;
|
|
228
229
|
|
|
229
|
-
if (this.
|
|
230
|
-
//
|
|
230
|
+
if (this.currentProduct?.hideSystemResources) {
|
|
231
|
+
// Filter out the namespace
|
|
231
232
|
// if it is a system namespace or if it is managed by
|
|
232
233
|
// Fleet.
|
|
233
|
-
|
|
234
|
+
out = !namespace.isSystem && !namespace.isFleetManaged;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
if (this.mode === _CREATE) {
|
|
238
|
+
out = out && !!namespace.links.update;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return out;
|
|
238
242
|
}));
|
|
239
243
|
|
|
240
244
|
const withLabels = filtered.map(this.namespaceMapper || ((obj) => {
|
|
@@ -3,7 +3,7 @@ import { mapGetters } from 'vuex';
|
|
|
3
3
|
import { RadioGroup } from '@components/Form/Radio';
|
|
4
4
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
5
|
import NodeAffinity from '@shell/components/form/NodeAffinity';
|
|
6
|
-
import {
|
|
6
|
+
import { HARVESTER_NAME as VIRTUAL } from '@shell/config/product/harvester-manager';
|
|
7
7
|
import { _VIEW } from '@shell/config/query-params';
|
|
8
8
|
import { isEmpty } from '@shell/utils/object';
|
|
9
9
|
import { HOSTNAME } from '@shell/config/labels-annotations';
|
|
@@ -85,7 +85,11 @@ export default {
|
|
|
85
85
|
showConditions() {
|
|
86
86
|
const inStore = this.$store.getters['currentStore'](this.value.type);
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
if ( this.$store.getters[`${ inStore }/schemaFor`](this.value.type) ) {
|
|
89
|
+
return this.isView && this.needConditions && this.value?.type && this.$store.getters[`${ inStore }/pathExistsInSchema`](this.value.type, 'status.conditions');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return false;
|
|
89
93
|
},
|
|
90
94
|
showEvents() {
|
|
91
95
|
return this.isView && this.needEvents && this.hasEvents && (this.events.length || this.alwaysShowEvents);
|
|
@@ -8,7 +8,7 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
8
8
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
9
9
|
import { HCI as HCI_LABELS_ANNOTATIONS } from '@shell/config/labels-annotations';
|
|
10
10
|
import { isHarvesterSatisfiesVersion } from '@shell/utils/cluster';
|
|
11
|
-
import {
|
|
11
|
+
import { HARVESTER_NAME as HARVESTER } from '@shell/config/product/harvester-manager';
|
|
12
12
|
import { CAPI, SERVICE } from '@shell/config/types';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
@@ -25,12 +25,8 @@ export default {
|
|
|
25
25
|
return this.row?.detailLocation;
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
clusterHasIssues() {
|
|
29
|
-
return this.row.status?.conditions?.some(condition => condition.error === true);
|
|
30
|
-
},
|
|
31
|
-
|
|
32
28
|
statusErrorConditions() {
|
|
33
|
-
if (this.
|
|
29
|
+
if (this.row.hasError) {
|
|
34
30
|
return this.row?.status.conditions.filter(condition => condition.error === true);
|
|
35
31
|
}
|
|
36
32
|
|
|
@@ -38,7 +34,7 @@ export default {
|
|
|
38
34
|
},
|
|
39
35
|
|
|
40
36
|
formattedConditions() {
|
|
41
|
-
if (this.
|
|
37
|
+
if (this.row.hasError) {
|
|
42
38
|
const filteredConditions = this.statusErrorConditions;
|
|
43
39
|
const formattedTooltip = [];
|
|
44
40
|
|
|
@@ -69,7 +65,7 @@ export default {
|
|
|
69
65
|
class="template-upgrade-icon icon-alert icon"
|
|
70
66
|
/>
|
|
71
67
|
<i
|
|
72
|
-
v-if="
|
|
68
|
+
v-if="row.hasError"
|
|
73
69
|
v-tooltip="{ content: `<div>${formattedConditions}</div>`, html: true }"
|
|
74
70
|
class="conditions-alert-icon icon-error icon-lg"
|
|
75
71
|
/>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Vue from 'vue';
|
|
3
3
|
import ProgressBarMulti from '@shell/components/ProgressBarMulti';
|
|
4
4
|
import PlusMinus from '@shell/components/form/PlusMinus';
|
|
5
|
-
import { SCALABLE_WORKLOAD_TYPES } from '
|
|
5
|
+
import { SCALABLE_WORKLOAD_TYPES } from '@shell/config/types';
|
|
6
6
|
import { ucFirst } from '@shell/utils/string';
|
|
7
7
|
|
|
8
8
|
const SCALABLE_TYPES = Object.values(SCALABLE_WORKLOAD_TYPES);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { mapGetters } from 'vuex';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
4
|
import { NORMAN, STEVE } from '@shell/config/types';
|
|
5
|
-
import { NAME as VIRTUAL } from '@shell/config/product/harvester';
|
|
6
5
|
import { ucFirst } from '@shell/utils/string';
|
|
7
6
|
import { isMac } from '@shell/utils/platform';
|
|
8
7
|
import Import from '@shell/components/Import';
|
|
@@ -13,7 +12,6 @@ import ClusterBadge from '@shell/components/ClusterBadge';
|
|
|
13
12
|
import { LOGGED_OUT } from '@shell/config/query-params';
|
|
14
13
|
import NamespaceFilter from './NamespaceFilter';
|
|
15
14
|
import WorkspaceSwitcher from './WorkspaceSwitcher';
|
|
16
|
-
import HarvesterUpgrade from './HarvesterUpgrade.vue';
|
|
17
15
|
import TopLevelMenu from './TopLevelMenu';
|
|
18
16
|
import Jump from './Jump';
|
|
19
17
|
import { allHash } from '@shell/utils/promise';
|
|
@@ -31,7 +29,6 @@ export default {
|
|
|
31
29
|
BrandImage,
|
|
32
30
|
ClusterBadge,
|
|
33
31
|
ClusterProviderIcon,
|
|
34
|
-
HarvesterUpgrade
|
|
35
32
|
},
|
|
36
33
|
|
|
37
34
|
props: {
|
|
@@ -51,14 +48,14 @@ export default {
|
|
|
51
48
|
kubeConfigCopying: false,
|
|
52
49
|
searchShortcut,
|
|
53
50
|
shellShortcut,
|
|
54
|
-
VIRTUAL,
|
|
55
51
|
LOGGED_OUT,
|
|
52
|
+
navHeaderRight: null
|
|
56
53
|
};
|
|
57
54
|
},
|
|
58
55
|
|
|
59
56
|
computed: {
|
|
60
57
|
...mapGetters(['clusterReady', 'isExplorer', 'isMultiCluster', 'isRancher', 'currentCluster',
|
|
61
|
-
'currentProduct', 'backToRancherLink', 'backToRancherGlobalLink', 'pageActions', 'isSingleProduct'
|
|
58
|
+
'currentProduct', 'backToRancherLink', 'backToRancherGlobalLink', 'pageActions', 'isSingleProduct']),
|
|
62
59
|
...mapGetters('type-map', ['activeProducts']),
|
|
63
60
|
|
|
64
61
|
appName() {
|
|
@@ -94,12 +91,12 @@ export default {
|
|
|
94
91
|
},
|
|
95
92
|
|
|
96
93
|
showPreferencesLink() {
|
|
97
|
-
return (this.$store.getters['management/schemaFor'](STEVE.PREFERENCE)?.resourceMethods || []).includes('PUT');
|
|
94
|
+
return (this.$store.getters['management/schemaFor'](STEVE.PREFERENCE, false, false)?.resourceMethods || []).includes('PUT');
|
|
98
95
|
},
|
|
99
96
|
|
|
100
97
|
showAccountAndApiKeyLink() {
|
|
101
98
|
// Keep this simple for the moment and only check if the user can see tokens... plus the usual isRancher/isSingleProduct
|
|
102
|
-
const canSeeTokens = this.$store.getters['rancher/schemaFor'](NORMAN.TOKEN);
|
|
99
|
+
const canSeeTokens = this.$store.getters['rancher/schemaFor'](NORMAN.TOKEN, false, false);
|
|
103
100
|
|
|
104
101
|
return canSeeTokens && (this.isRancher || this.isSingleProduct);
|
|
105
102
|
},
|
|
@@ -152,6 +149,7 @@ export default {
|
|
|
152
149
|
}
|
|
153
150
|
};
|
|
154
151
|
},
|
|
152
|
+
|
|
155
153
|
},
|
|
156
154
|
|
|
157
155
|
watch: {
|
|
@@ -168,6 +166,8 @@ export default {
|
|
|
168
166
|
window.addEventListener('resize', this.debouncedLayoutHeader);
|
|
169
167
|
|
|
170
168
|
this.$nextTick(() => this.layoutHeader(null, true));
|
|
169
|
+
|
|
170
|
+
this.navHeaderRight = this.$plugin?.getDynamic('component', 'NavHeaderRight');
|
|
171
171
|
},
|
|
172
172
|
|
|
173
173
|
beforeDestroy() {
|
|
@@ -329,7 +329,8 @@ export default {
|
|
|
329
329
|
<div class="spacer"></div>
|
|
330
330
|
|
|
331
331
|
<div class="rd-header-right">
|
|
332
|
-
<
|
|
332
|
+
<component :is="navHeaderRight" />
|
|
333
|
+
|
|
333
334
|
<div
|
|
334
335
|
v-if="(currentCluster || (currentProduct && currentProduct.customNamespaceFilter)) && !simple && (currentProduct.showNamespaceFilter || currentProduct.showWorkspaceSwitcher)"
|
|
335
336
|
class="top"
|
|
@@ -457,7 +458,6 @@ export default {
|
|
|
457
458
|
</div>
|
|
458
459
|
|
|
459
460
|
<div class="header-spacer"></div>
|
|
460
|
-
|
|
461
461
|
<div
|
|
462
462
|
v-if="showUserMenu"
|
|
463
463
|
class="user user-menu"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { mapGetters } from 'vuex';
|
|
3
|
-
import { NAMESPACE_FILTERS,
|
|
3
|
+
import { NAMESPACE_FILTERS, ALL_NAMESPACES } from '@shell/store/prefs';
|
|
4
4
|
import { NAMESPACE, MANAGEMENT } from '@shell/config/types';
|
|
5
5
|
import { sortBy } from '@shell/utils/sort';
|
|
6
6
|
import { isArray, addObjects, findBy, filterBy } from '@shell/utils/array';
|
|
7
|
-
|
|
8
7
|
import {
|
|
9
8
|
NAMESPACE_FILTER_SPECIAL as SPECIAL,
|
|
10
9
|
NAMESPACE_FILTER_ALL_USER as ALL_USER,
|
|
@@ -29,7 +28,7 @@ export default {
|
|
|
29
28
|
},
|
|
30
29
|
|
|
31
30
|
computed: {
|
|
32
|
-
...mapGetters(['
|
|
31
|
+
...mapGetters(['currentProduct']),
|
|
33
32
|
|
|
34
33
|
hasFilter() {
|
|
35
34
|
return this.filter.length > 0;
|
|
@@ -97,7 +96,7 @@ export default {
|
|
|
97
96
|
});
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
if (!this.
|
|
99
|
+
if (!this.currentProduct?.hideSystemResources) {
|
|
101
100
|
out = [
|
|
102
101
|
{
|
|
103
102
|
id: ALL,
|
|
@@ -137,12 +136,16 @@ export default {
|
|
|
137
136
|
|
|
138
137
|
namespaces = this.filterNamespaces(namespaces);
|
|
139
138
|
|
|
140
|
-
|
|
139
|
+
// isRancher = mgmt schemas are loaded and there's a project schema
|
|
140
|
+
if (this.$store.getters['isRancher']) {
|
|
141
141
|
const cluster = this.$store.getters['currentCluster'];
|
|
142
142
|
let projects = this.$store.getters['management/all'](
|
|
143
143
|
MANAGEMENT.PROJECT
|
|
144
144
|
);
|
|
145
145
|
|
|
146
|
+
projects = projects.filter((p) => {
|
|
147
|
+
return this.currentProduct?.hideSystemResources ? !p.isSystem && p.spec.clusterName === cluster.id : p.spec.clusterName === cluster.id;
|
|
148
|
+
});
|
|
146
149
|
projects = sortBy(filterBy(projects, 'spec.clusterName', cluster.id), [
|
|
147
150
|
'nameDisplay',
|
|
148
151
|
]);
|
|
@@ -319,8 +322,8 @@ export default {
|
|
|
319
322
|
|
|
320
323
|
methods: {
|
|
321
324
|
filterNamespaces(namespaces) {
|
|
322
|
-
if (this.$store.getters['prefs/get'](
|
|
323
|
-
// If
|
|
325
|
+
if (this.$store.getters['prefs/get'](ALL_NAMESPACES)) {
|
|
326
|
+
// If all namespaces options are turned on in the user preferences,
|
|
324
327
|
// return all namespaces including system namespaces and RBAC
|
|
325
328
|
// management namespaces.
|
|
326
329
|
return namespaces;
|
|
@@ -4,7 +4,7 @@ import ClusterProviderIcon from '@shell/components/ClusterProviderIcon';
|
|
|
4
4
|
import { mapGetters } from 'vuex';
|
|
5
5
|
import $ from 'jquery';
|
|
6
6
|
import { CAPI, MANAGEMENT } from '@shell/config/types';
|
|
7
|
-
import { mapPref,
|
|
7
|
+
import { mapPref, MENU_MAX_CLUSTERS } from '@shell/store/prefs';
|
|
8
8
|
import { sortBy } from '@shell/utils/sort';
|
|
9
9
|
import { ucFirst } from '@shell/utils/string';
|
|
10
10
|
import { KEY } from '@shell/utils/platform';
|
|
@@ -46,7 +46,6 @@ export default {
|
|
|
46
46
|
...mapGetters(['clusterId']),
|
|
47
47
|
...mapGetters(['clusterReady', 'isRancher', 'currentCluster', 'currentProduct']),
|
|
48
48
|
...mapGetters('type-map', ['activeProducts']),
|
|
49
|
-
...mapGetters('i18n', ['selectedLocaleLabel', 'availableLocales']),
|
|
50
49
|
...mapGetters({ features: 'features/get' }),
|
|
51
50
|
|
|
52
51
|
value: {
|
|
@@ -66,9 +65,10 @@ export default {
|
|
|
66
65
|
clusters() {
|
|
67
66
|
const all = this.$store.getters['management/all'](MANAGEMENT.CLUSTER);
|
|
68
67
|
let kubeClusters = filterHiddenLocalCluster(filterOnlyKubernetesClusters(all), this.$store);
|
|
68
|
+
let pClusters = null;
|
|
69
69
|
|
|
70
70
|
if (this.hasProvCluster) {
|
|
71
|
-
|
|
71
|
+
pClusters = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER);
|
|
72
72
|
const available = pClusters.reduce((p, c) => {
|
|
73
73
|
p[c.mgmt] = true;
|
|
74
74
|
|
|
@@ -82,10 +82,12 @@ export default {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
return kubeClusters.map((x) => {
|
|
85
|
+
const pCluster = pClusters?.find(c => c.mgmt.id === x.id);
|
|
86
|
+
|
|
85
87
|
return {
|
|
86
88
|
id: x.id,
|
|
87
89
|
label: x.nameDisplay,
|
|
88
|
-
ready: x.isReady,
|
|
90
|
+
ready: x.isReady && !pCluster?.hasError,
|
|
89
91
|
osLogo: x.providerOsLogo,
|
|
90
92
|
providerNavLogo: x.providerMenuLogo,
|
|
91
93
|
badge: x.badge,
|
|
@@ -99,23 +101,13 @@ export default {
|
|
|
99
101
|
|
|
100
102
|
const out = search ? this.clusters.filter(item => item.label.toLowerCase().includes(search)) : this.clusters;
|
|
101
103
|
|
|
102
|
-
const sorted = sortBy(out, ['
|
|
104
|
+
const sorted = sortBy(out, ['name:desc', 'label']);
|
|
103
105
|
|
|
104
106
|
return sorted;
|
|
105
107
|
},
|
|
106
108
|
|
|
107
|
-
dev: mapPref(DEV),
|
|
108
|
-
|
|
109
109
|
maxClustersToShow: mapPref(MENU_MAX_CLUSTERS),
|
|
110
110
|
|
|
111
|
-
showLocale() {
|
|
112
|
-
return Object.keys(this.availableLocales).length > 1 || this.dev;
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
showNone() {
|
|
116
|
-
return !!process.env.dev && this.dev;
|
|
117
|
-
},
|
|
118
|
-
|
|
119
111
|
multiClusterApps() {
|
|
120
112
|
const options = this.options;
|
|
121
113
|
|
|
@@ -131,27 +123,12 @@ export default {
|
|
|
131
123
|
configurationApps() {
|
|
132
124
|
const options = this.options;
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
// Add plugin page
|
|
137
|
-
// Ony when developing for now
|
|
138
|
-
if (process.env.dev) {
|
|
139
|
-
items.push({
|
|
140
|
-
label: 'Plugins',
|
|
141
|
-
inStore: 'management',
|
|
142
|
-
icon: 'icon-gear',
|
|
143
|
-
value: 'plugins',
|
|
144
|
-
weight: 1,
|
|
145
|
-
to: { name: 'plugins' },
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return items;
|
|
126
|
+
return options.filter(opt => opt.category === 'configuration');
|
|
150
127
|
},
|
|
151
128
|
|
|
152
129
|
options() {
|
|
153
130
|
const cluster = this.clusterId || this.$store.getters['defaultClusterId'];
|
|
154
|
-
|
|
131
|
+
// TODO plugin routes
|
|
155
132
|
const entries = this.activeProducts.map((p) => {
|
|
156
133
|
// Try product-specific index first
|
|
157
134
|
const to = p.to || {
|
|
@@ -192,7 +169,7 @@ export default {
|
|
|
192
169
|
watch: {
|
|
193
170
|
$route() {
|
|
194
171
|
this.shown = false;
|
|
195
|
-
}
|
|
172
|
+
}
|
|
196
173
|
},
|
|
197
174
|
|
|
198
175
|
mounted() {
|
|
@@ -232,10 +209,6 @@ export default {
|
|
|
232
209
|
this.setClusterListHeight(this.maxClustersToShow);
|
|
233
210
|
});
|
|
234
211
|
},
|
|
235
|
-
|
|
236
|
-
switchLocale(locale) {
|
|
237
|
-
this.$store.dispatch('i18n/switchTo', locale);
|
|
238
|
-
},
|
|
239
212
|
}
|
|
240
213
|
};
|
|
241
214
|
</script>
|
|
@@ -359,34 +332,6 @@ export default {
|
|
|
359
332
|
v-html="displayVersion"
|
|
360
333
|
/>
|
|
361
334
|
</div>
|
|
362
|
-
<div v-if="showLocale">
|
|
363
|
-
<v-popover
|
|
364
|
-
popover-class="localeSelector"
|
|
365
|
-
placement="top"
|
|
366
|
-
trigger="click"
|
|
367
|
-
>
|
|
368
|
-
<a
|
|
369
|
-
data-testid="locale-selector"
|
|
370
|
-
class="locale-chooser"
|
|
371
|
-
>
|
|
372
|
-
{{ selectedLocaleLabel }}
|
|
373
|
-
</a>
|
|
374
|
-
|
|
375
|
-
<template slot="popover">
|
|
376
|
-
<ul class="list-unstyled dropdown" style="margin: -1px;">
|
|
377
|
-
<li v-if="showNone" v-t="'locale.none'" class="hand" @click="switchLocale('none')" />
|
|
378
|
-
<li
|
|
379
|
-
v-for="(label, name) in availableLocales"
|
|
380
|
-
:key="name"
|
|
381
|
-
class="hand"
|
|
382
|
-
@click="switchLocale(name)"
|
|
383
|
-
>
|
|
384
|
-
{{ label }}
|
|
385
|
-
</li>
|
|
386
|
-
</ul>
|
|
387
|
-
</template>
|
|
388
|
-
</v-popover>
|
|
389
|
-
</div>
|
|
390
335
|
</div>
|
|
391
336
|
</div>
|
|
392
337
|
</transition>
|
|
@@ -13,7 +13,7 @@ import Select from '@shell/components/form/Select';
|
|
|
13
13
|
import day from 'dayjs';
|
|
14
14
|
|
|
15
15
|
import { escapeHtml, escapeRegex } from '@shell/utils/string';
|
|
16
|
-
import {
|
|
16
|
+
import { HARVESTER_NAME as VIRTUAL } from '@shell/config/product/harvester-manager';
|
|
17
17
|
|
|
18
18
|
import Socket, {
|
|
19
19
|
EVENT_CONNECTED,
|
package/config/footer.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { DOCS_BASE } from '@shell/config/private-label';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
// Deprecated
|
|
4
|
+
export function options(isSupport, issuesUrl) {
|
|
5
|
+
const links = {
|
|
6
|
+
docs: DOCS_BASE,
|
|
7
|
+
forums: 'https://forums.rancher.com/',
|
|
8
|
+
slack: 'https://slack.rancher.io',
|
|
9
|
+
issues: !!issuesUrl ? issuesUrl : 'https://github.com/rancher/dashboard/issues/new',
|
|
10
|
+
getStarted: '/docs/getting-started'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
if (!isSupport) {
|
|
14
|
+
links['commercialSupport'] = '/support';
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
return
|
|
14
|
-
'footer.docs': DOCS_BASE,
|
|
15
|
-
'footer.forums': 'https://forums.rancher.com/',
|
|
16
|
-
'footer.slack': 'https://slack.rancher.io',
|
|
17
|
-
'footer.issue': issues,
|
|
18
|
-
};
|
|
17
|
+
return links;
|
|
19
18
|
}
|
|
@@ -65,6 +65,7 @@ export const CATALOG = {
|
|
|
65
65
|
EXPERIMENTAL: 'catalog.cattle.io/experimental',
|
|
66
66
|
NAMESPACE: 'catalog.cattle.io/namespace',
|
|
67
67
|
RELEASE_NAME: 'catalog.cattle.io/release-name',
|
|
68
|
+
FEATURED: 'catalog.cattle.io/featured',
|
|
68
69
|
|
|
69
70
|
REQUIRES_GVK: 'catalog.cattle.io/requires-gvr',
|
|
70
71
|
PROVIDES: 'catalog.cattle.io/provides-gvr',
|
|
@@ -94,7 +95,7 @@ export const CATALOG = {
|
|
|
94
95
|
DEPLOYED_OS: 'catalog.cattle.io/deploys-on-os',
|
|
95
96
|
|
|
96
97
|
MIGRATED: 'apps.cattle.io/migrated',
|
|
97
|
-
MANAGED: 'catalog.cattle.io/managed'
|
|
98
|
+
MANAGED: 'catalog.cattle.io/managed',
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
export const FLEET = {
|