@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
|
@@ -24,8 +24,9 @@ import {
|
|
|
24
24
|
COUNT,
|
|
25
25
|
CATALOG,
|
|
26
26
|
POD,
|
|
27
|
+
PSP,
|
|
27
28
|
} from '@shell/config/types';
|
|
28
|
-
import { mapPref, CLUSTER_TOOLS_TIP } from '@shell/store/prefs';
|
|
29
|
+
import { mapPref, CLUSTER_TOOLS_TIP, PSP_DEPRECATION_BANNER } from '@shell/store/prefs';
|
|
29
30
|
import { haveV1Monitoring, monitoringStatus } from '@shell/utils/monitoring';
|
|
30
31
|
import Tabbed from '@shell/components/Tabbed';
|
|
31
32
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
@@ -111,12 +112,12 @@ export default {
|
|
|
111
112
|
|
|
112
113
|
return {
|
|
113
114
|
nodeHeaders,
|
|
114
|
-
constraints:
|
|
115
|
-
events:
|
|
116
|
-
nodeMetrics:
|
|
117
|
-
showClusterMetrics:
|
|
118
|
-
showK8sMetrics:
|
|
119
|
-
showEtcdMetrics:
|
|
115
|
+
constraints: [],
|
|
116
|
+
events: [],
|
|
117
|
+
nodeMetrics: [],
|
|
118
|
+
showClusterMetrics: false,
|
|
119
|
+
showK8sMetrics: false,
|
|
120
|
+
showEtcdMetrics: false,
|
|
120
121
|
CLUSTER_METRICS_DETAIL_URL,
|
|
121
122
|
CLUSTER_METRICS_SUMMARY_URL,
|
|
122
123
|
K8S_METRICS_DETAIL_URL,
|
|
@@ -124,7 +125,7 @@ export default {
|
|
|
124
125
|
ETCD_METRICS_DETAIL_URL,
|
|
125
126
|
ETCD_METRICS_SUMMARY_URL,
|
|
126
127
|
clusterCounts,
|
|
127
|
-
selectedTab:
|
|
128
|
+
selectedTab: 'cluster-events',
|
|
128
129
|
};
|
|
129
130
|
},
|
|
130
131
|
|
|
@@ -142,6 +143,20 @@ export default {
|
|
|
142
143
|
...mapGetters(['currentCluster']),
|
|
143
144
|
...monitoringStatus(),
|
|
144
145
|
|
|
146
|
+
displayPspDeprecationBanner() {
|
|
147
|
+
const cluster = this.currentCluster;
|
|
148
|
+
const major = cluster.status?.version?.major ? parseInt(cluster.status?.version?.major) : 0;
|
|
149
|
+
const minor = cluster.status?.version?.minor ? parseInt(cluster.status?.version?.minor) : 0;
|
|
150
|
+
|
|
151
|
+
if (major === 1 && minor >= 21 && minor < 25) {
|
|
152
|
+
const clusterCounts = this.$store.getters[`cluster/all`](COUNT)?.[0]?.counts;
|
|
153
|
+
|
|
154
|
+
return !!clusterCounts?.[PSP]?.summary?.count;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return false;
|
|
158
|
+
},
|
|
159
|
+
|
|
145
160
|
nodes() {
|
|
146
161
|
return this.$store.getters['cluster/all'](NODE);
|
|
147
162
|
},
|
|
@@ -150,7 +165,8 @@ export default {
|
|
|
150
165
|
return this.$store.getters['management/all'](MANAGEMENT.CLUSTER);
|
|
151
166
|
},
|
|
152
167
|
|
|
153
|
-
hideClusterToolsTip:
|
|
168
|
+
hideClusterToolsTip: mapPref(CLUSTER_TOOLS_TIP),
|
|
169
|
+
hidePspDeprecationBanner: mapPref(PSP_DEPRECATION_BANNER),
|
|
154
170
|
|
|
155
171
|
hasV1Monitoring() {
|
|
156
172
|
return haveV1Monitoring(this.$store.getters);
|
|
@@ -324,6 +340,16 @@ export default {
|
|
|
324
340
|
|
|
325
341
|
hasDescription() {
|
|
326
342
|
return !!this.currentCluster?.spec?.description;
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
allEventsLink() {
|
|
346
|
+
return {
|
|
347
|
+
name: 'c-cluster-product-resource',
|
|
348
|
+
params: {
|
|
349
|
+
product: 'explorer',
|
|
350
|
+
resource: 'event',
|
|
351
|
+
}
|
|
352
|
+
};
|
|
327
353
|
}
|
|
328
354
|
},
|
|
329
355
|
|
|
@@ -378,6 +404,14 @@ export default {
|
|
|
378
404
|
</div>
|
|
379
405
|
</div>
|
|
380
406
|
</header>
|
|
407
|
+
<Banner
|
|
408
|
+
v-if="displayPspDeprecationBanner && !hidePspDeprecationBanner"
|
|
409
|
+
:closable="true"
|
|
410
|
+
color="warning"
|
|
411
|
+
@close="hidePspDeprecationBanner = true"
|
|
412
|
+
>
|
|
413
|
+
<t k="landing.deprecatedPsp" :raw="true" />
|
|
414
|
+
</Banner>
|
|
381
415
|
<Banner
|
|
382
416
|
v-if="!hideClusterToolsTip"
|
|
383
417
|
:closable="true"
|
|
@@ -403,6 +437,14 @@ export default {
|
|
|
403
437
|
<label>{{ t('glance.created') }}: </label>
|
|
404
438
|
<span><LiveDate :value="currentCluster.metadata.creationTimestamp" :add-suffix="true" :show-tooltip="true" /></span>
|
|
405
439
|
</div>
|
|
440
|
+
<p
|
|
441
|
+
v-if="displayPspDeprecationBanner && hidePspDeprecationBanner"
|
|
442
|
+
v-tooltip="t('landing.deprecatedPsp')"
|
|
443
|
+
class="alt-psp-deprecation-info"
|
|
444
|
+
>
|
|
445
|
+
<span>{{ t('landing.psps') }}</span>
|
|
446
|
+
<i class="icon icon-warning" />
|
|
447
|
+
</p>
|
|
406
448
|
<div :style="{'flex':1}" />
|
|
407
449
|
<div v-if="!monitoringStatus.v2 && !monitoringStatus.v1">
|
|
408
450
|
<n-link :to="{name: 'c-cluster-explorer-tools'}" class="monitoring-install">
|
|
@@ -446,6 +488,11 @@ export default {
|
|
|
446
488
|
<div class="mt-30">
|
|
447
489
|
<Tabbed @changed="tabChange">
|
|
448
490
|
<Tab name="cluster-events" :label="t('clusterIndexPage.sections.events.label')" :weight="2">
|
|
491
|
+
<span class="events-table-link">
|
|
492
|
+
<n-link :to="allEventsLink">
|
|
493
|
+
<span>{{ t('glance.eventsTable') }}</span>
|
|
494
|
+
</n-link>
|
|
495
|
+
</span>
|
|
449
496
|
<EventsTable />
|
|
450
497
|
</Tab>
|
|
451
498
|
<Tab v-if="hasMonitoring" name="cluster-alerts" :label="t('clusterIndexPage.sections.alerts.label')" :weight="1">
|
|
@@ -534,6 +581,16 @@ export default {
|
|
|
534
581
|
margin-top: 0;
|
|
535
582
|
}
|
|
536
583
|
|
|
584
|
+
.alt-psp-deprecation-info {
|
|
585
|
+
display: flex;
|
|
586
|
+
align-items: center;
|
|
587
|
+
color: var(--warning);
|
|
588
|
+
|
|
589
|
+
span {
|
|
590
|
+
margin-right: 4px;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
537
594
|
.monitoring-install {
|
|
538
595
|
display: flex;
|
|
539
596
|
margin-left: 10px;
|
|
@@ -548,6 +605,12 @@ export default {
|
|
|
548
605
|
}
|
|
549
606
|
}
|
|
550
607
|
|
|
608
|
+
.events-table-link {
|
|
609
|
+
display: flex;
|
|
610
|
+
justify-content: flex-end;
|
|
611
|
+
margin-bottom: 20px;
|
|
612
|
+
}
|
|
613
|
+
|
|
551
614
|
.k8s-component-status {
|
|
552
615
|
align-items: center;
|
|
553
616
|
display: inline-flex;
|
|
@@ -121,13 +121,15 @@ export default {
|
|
|
121
121
|
showTypes: [CATALOG_ANNOTATIONS._CLUSTER_TOOL],
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
+
charts = charts.filter(c => c.sideLabel !== 'Experimental');
|
|
125
|
+
|
|
124
126
|
// If legacy support is enabled, show V1 charts for some V1 Cluster tools
|
|
125
127
|
if (this.legacyEnabled) {
|
|
126
128
|
charts = charts.concat(this.legacyCharts);
|
|
127
129
|
charts = sortBy(charts, ['certifiedSort', 'chartNameDisplay']);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
let chartsWithApps = charts.map((chart) => {
|
|
131
133
|
return {
|
|
132
134
|
chart,
|
|
133
135
|
app: this.installedAppForChart[chart.id],
|
|
@@ -136,9 +138,9 @@ export default {
|
|
|
136
138
|
|
|
137
139
|
// V1 Legacy support
|
|
138
140
|
if (this.legacyEnabled) {
|
|
139
|
-
this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-monitoring', 'rancher-monitoring', 'cluster-monitoring');
|
|
140
|
-
this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-istio', 'rancher-istio', 'cluster-istio');
|
|
141
|
-
this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-logging', 'rancher-logging', 'rancher-logging');
|
|
141
|
+
chartsWithApps = this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-monitoring', 'rancher-monitoring', 'cluster-monitoring', false);
|
|
142
|
+
chartsWithApps = this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-istio', 'rancher-istio', 'cluster-istio', true);
|
|
143
|
+
chartsWithApps = this.checkLegacyApp(chartsWithApps, this.v1Apps, 'v1-logging', 'rancher-logging', 'rancher-logging', true);
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
return chartsWithApps;
|
|
@@ -231,7 +233,7 @@ export default {
|
|
|
231
233
|
return versions;
|
|
232
234
|
},
|
|
233
235
|
|
|
234
|
-
checkLegacyApp(chartsWithApps, v1Apps, v1ChartName, v2ChartName, v1AppName) {
|
|
236
|
+
checkLegacyApp(chartsWithApps, v1Apps, v1ChartName, v2ChartName, v1AppName, showOnlyIfInstalled) {
|
|
235
237
|
const v1 = chartsWithApps.find(a => a.chart.chartName === v1ChartName);
|
|
236
238
|
const v2 = chartsWithApps.find(a => a.chart.chartName === v2ChartName);
|
|
237
239
|
|
|
@@ -251,6 +253,9 @@ export default {
|
|
|
251
253
|
v1.app.upgradeAvailable = latest;
|
|
252
254
|
}
|
|
253
255
|
}
|
|
256
|
+
} else if (showOnlyIfInstalled) {
|
|
257
|
+
// Remove the v1 chart if it is not already installed for charts which we no longer support
|
|
258
|
+
chartsWithApps = chartsWithApps.filter(c => c !== v1);
|
|
254
259
|
}
|
|
255
260
|
|
|
256
261
|
if (v2) {
|
|
@@ -262,6 +267,8 @@ export default {
|
|
|
262
267
|
}
|
|
263
268
|
}
|
|
264
269
|
}
|
|
270
|
+
|
|
271
|
+
return chartsWithApps;
|
|
265
272
|
}
|
|
266
273
|
}
|
|
267
274
|
};
|
|
@@ -17,7 +17,6 @@ import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
|
17
17
|
import { setFavIcon } from '@shell/utils/favicon';
|
|
18
18
|
|
|
19
19
|
const Color = require('color');
|
|
20
|
-
const parse = require('url-parse');
|
|
21
20
|
|
|
22
21
|
export default {
|
|
23
22
|
layout: 'authenticated',
|
|
@@ -29,12 +28,10 @@ export default {
|
|
|
29
28
|
async fetch() {
|
|
30
29
|
const hash = await allHash({
|
|
31
30
|
uiPLSetting: this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.PL }),
|
|
32
|
-
uiIssuesSetting: this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.ISSUES }),
|
|
33
31
|
uiLogoDarkSetting: fetchOrCreateSetting(this.$store, SETTING.LOGO_DARK, ''),
|
|
34
32
|
uiLogoLightSetting: fetchOrCreateSetting(this.$store, SETTING.LOGO_LIGHT, ''),
|
|
35
33
|
uiColorSetting: fetchOrCreateSetting(this.$store, SETTING.PRIMARY_COLOR, ''),
|
|
36
34
|
uiLinkColorSetting: fetchOrCreateSetting(this.$store, SETTING.LINK_COLOR, ''),
|
|
37
|
-
uiCommunitySetting: fetchOrCreateSetting(this.$store, SETTING.COMMUNITY_LINKS, 'true'),
|
|
38
35
|
uiFaviconSetting: fetchOrCreateSetting(this.$store, SETTING.FAVICON, ''),
|
|
39
36
|
});
|
|
40
37
|
|
|
@@ -75,8 +72,6 @@ export default {
|
|
|
75
72
|
vendor: getVendor(),
|
|
76
73
|
uiPLSetting: {},
|
|
77
74
|
|
|
78
|
-
uiIssuesSetting: {},
|
|
79
|
-
|
|
80
75
|
uiLogoDarkSetting: {},
|
|
81
76
|
uiLogoDark: '',
|
|
82
77
|
uiLogoLightSetting: {},
|
|
@@ -94,8 +89,6 @@ export default {
|
|
|
94
89
|
uiLinkColor: null,
|
|
95
90
|
customizeLinkColor: false,
|
|
96
91
|
|
|
97
|
-
uiCommunitySetting: {},
|
|
98
|
-
|
|
99
92
|
errors: [],
|
|
100
93
|
|
|
101
94
|
};
|
|
@@ -134,22 +127,7 @@ export default {
|
|
|
134
127
|
this.errors.push(e);
|
|
135
128
|
},
|
|
136
129
|
|
|
137
|
-
validateUrl(url) {
|
|
138
|
-
const parsed = parse(url, {});
|
|
139
|
-
|
|
140
|
-
if (!parsed.protocol) {
|
|
141
|
-
this.errors.push(this.t('branding.uiIssues.invalidUrl'));
|
|
142
|
-
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return true;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
130
|
async save(btnCB) {
|
|
150
|
-
if (this.uiIssuesSetting.value && !this.validateUrl(this.uiIssuesSetting.value)) {
|
|
151
|
-
return btnCB(false);
|
|
152
|
-
}
|
|
153
131
|
this.uiPLSetting.value = this.uiPLSetting.value.replaceAll(/[\<>&=#()"]/gm, '');
|
|
154
132
|
|
|
155
133
|
if (this.customizeLogo) {
|
|
@@ -183,12 +161,10 @@ export default {
|
|
|
183
161
|
try {
|
|
184
162
|
await Promise.all([
|
|
185
163
|
this.uiPLSetting.save(),
|
|
186
|
-
this.uiIssuesSetting.save(),
|
|
187
164
|
this.uiLogoDarkSetting.save(),
|
|
188
165
|
this.uiLogoLightSetting.save(),
|
|
189
166
|
this.uiColorSetting.save(),
|
|
190
167
|
this.uiLinkColorSetting.save(),
|
|
191
|
-
this.uiCommunitySetting.save(),
|
|
192
168
|
this.uiFaviconSetting.save()
|
|
193
169
|
]);
|
|
194
170
|
if (this.uiPLSetting.value !== this.vendor) {
|
|
@@ -219,22 +195,6 @@ export default {
|
|
|
219
195
|
<LabeledInput v-model="uiPLSetting.value" :label="t('branding.uiPL.label')" :mode="mode" :maxlength="100" />
|
|
220
196
|
</div>
|
|
221
197
|
</div>
|
|
222
|
-
|
|
223
|
-
<h3 class="mt-20 mb-5 pb-5">
|
|
224
|
-
{{ t('branding.uiIssues.label') }}
|
|
225
|
-
</h3>
|
|
226
|
-
<label class="text-label">
|
|
227
|
-
{{ t(`advancedSettings.descriptions.${ 'ui-issues' }`, {}, true) }}
|
|
228
|
-
</label>
|
|
229
|
-
<div :style="{'align-items':'center'}" class="row mt-10">
|
|
230
|
-
<div class="col span-6 pb-5">
|
|
231
|
-
<LabeledInput v-model="uiIssuesSetting.value" :label="t('branding.uiIssues.issuesUrl')" :mode="mode" />
|
|
232
|
-
</div>
|
|
233
|
-
<div class="col span-6">
|
|
234
|
-
<Checkbox :value="uiCommunitySetting.value === 'true'" :label="t('branding.uiIssues.communityLinks')" :mode="mode" @input="e=>$set(uiCommunitySetting, 'value', e.toString())" />
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
|
|
238
198
|
<h3 class="mt-20 mb-5 pb-5">
|
|
239
199
|
{{ t('branding.logos.label') }}
|
|
240
200
|
</h3>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Loading from '@shell/components/Loading';
|
|
3
|
+
import AsyncButton from '@shell/components/AsyncButton';
|
|
4
|
+
import Banner from '@components/Banner/Banner.vue';
|
|
5
|
+
import { MANAGEMENT } from '@shell/config/types';
|
|
6
|
+
import { fetchOrCreateSetting, SETTING } from '@shell/config/settings';
|
|
7
|
+
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
8
|
+
import KeyValue from '@shell/components/form/KeyValue';
|
|
9
|
+
import { allHash } from '@shell/utils/promise';
|
|
10
|
+
import { mapGetters } from 'vuex';
|
|
11
|
+
|
|
12
|
+
const DEFAULT_CUSTOM_LINKS = [
|
|
13
|
+
{
|
|
14
|
+
order: 1,
|
|
15
|
+
key: 'customLinks.defaults.docs',
|
|
16
|
+
value: 'https://rancher.com/docs/rancher/v2.6/en'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
order: 2,
|
|
20
|
+
key: 'customLinks.defaults.forums',
|
|
21
|
+
value: 'https://forums.rancher.com/'
|
|
22
|
+
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
order: 3,
|
|
26
|
+
key: 'customLinks.defaults.slack',
|
|
27
|
+
value: 'https://slack.rancher.io/'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
order: 5,
|
|
31
|
+
key: 'customLinks.defaults.getStarted',
|
|
32
|
+
value: '/docs/getting-started'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const DEFAULT_SUPPORT_LINK = {
|
|
38
|
+
order: 4,
|
|
39
|
+
key: 'customLinks.defaults.issues',
|
|
40
|
+
value: 'https://github.com/rancher/dashboard/issues/new'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const COMMUNITY_LINKS = [
|
|
44
|
+
{
|
|
45
|
+
order: 99,
|
|
46
|
+
key: 'customLinks.defaults.commercialSupport',
|
|
47
|
+
value: '/support'
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
layout: 'authenticated',
|
|
53
|
+
components: {
|
|
54
|
+
KeyValue,
|
|
55
|
+
Loading,
|
|
56
|
+
AsyncButton,
|
|
57
|
+
Banner,
|
|
58
|
+
},
|
|
59
|
+
async fetch() {
|
|
60
|
+
try {
|
|
61
|
+
const { uiIssuesSetting, uiCommunitySetting } = await allHash({
|
|
62
|
+
uiIssuesSetting: this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.ISSUES }),
|
|
63
|
+
uiCommunitySetting: this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.COMMUNITY_LINKS })
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
this.uiIssuesSetting = uiIssuesSetting;
|
|
67
|
+
this.uiCommunitySetting = uiCommunitySetting;
|
|
68
|
+
} catch {}
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
const defaultIssueLink = !!this.uiIssuesSetting.value ? { key: this.t('customLinks.defaults.issues'), value: this.uiIssuesSetting.value } : DEFAULT_SUPPORT_LINK;
|
|
72
|
+
const defaultLinks = this.multiWithFallback([...DEFAULT_CUSTOM_LINKS, defaultIssueLink, ...COMMUNITY_LINKS]);
|
|
73
|
+
|
|
74
|
+
this.uiCustomLinks = await fetchOrCreateSetting(this.$store, SETTING.UI_CUSTOM_LINKS, JSON.stringify(defaultLinks));
|
|
75
|
+
|
|
76
|
+
await this.deprecateIssueLinks();
|
|
77
|
+
} catch {}
|
|
78
|
+
|
|
79
|
+
const sValue = this.uiCustomLinks?.value || JSON.stringify(this.multiWithFallback([...DEFAULT_CUSTOM_LINKS]));
|
|
80
|
+
|
|
81
|
+
this.value = JSON.parse(sValue);
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
data() {
|
|
85
|
+
return {
|
|
86
|
+
uiCustomLinks: {},
|
|
87
|
+
defaultValues: undefined,
|
|
88
|
+
bannerVal: {},
|
|
89
|
+
value: {},
|
|
90
|
+
errors: [],
|
|
91
|
+
showRestoredBanner: false
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
...mapGetters({ multiWithFallback: 'i18n/multiWithFallback' }),
|
|
96
|
+
|
|
97
|
+
mode() {
|
|
98
|
+
const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING);
|
|
99
|
+
|
|
100
|
+
return schema?.resourceMethods?.includes('PUT') ? _EDIT : _VIEW;
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
useDefaults() {
|
|
105
|
+
const nonCommercialRancherLinks = this.isCommercial ? [] : COMMUNITY_LINKS;
|
|
106
|
+
|
|
107
|
+
this.defaultValues = this.multiWithFallback([...DEFAULT_CUSTOM_LINKS, DEFAULT_SUPPORT_LINK, ...nonCommercialRancherLinks]);
|
|
108
|
+
|
|
109
|
+
this.showRestoredBanner = true;
|
|
110
|
+
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
this.showRestoredBanner = false;
|
|
113
|
+
}, 10000);
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
deprecateIssueLinks() {
|
|
117
|
+
if (this.uiIssuesSetting.value || this.uiIssuesSetting.value) {
|
|
118
|
+
this.uiIssuesSetting.value = '';
|
|
119
|
+
this.uiCommunitySetting.value = '';
|
|
120
|
+
|
|
121
|
+
return this.uiIssuesSetting.save();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
async save(btnCB) {
|
|
126
|
+
this.uiCustomLinks.value = JSON.stringify(this.value);
|
|
127
|
+
this.errors = [];
|
|
128
|
+
try {
|
|
129
|
+
await this.uiCustomLinks.save();
|
|
130
|
+
btnCB(true);
|
|
131
|
+
} catch (err) {
|
|
132
|
+
this.errors.push(err);
|
|
133
|
+
btnCB(false);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
</script>
|
|
139
|
+
<template>
|
|
140
|
+
<Loading v-if="$fetchState.pending" />
|
|
141
|
+
<div v-else>
|
|
142
|
+
<Banner v-if="showRestoredBanner" :color="'success'" label="Default restored" :closable="true" :label-key="'customLinks.restoreSuccess'" />
|
|
143
|
+
<h1
|
|
144
|
+
class="mb-20"
|
|
145
|
+
>
|
|
146
|
+
{{ t("customLinks.label") }}
|
|
147
|
+
</h1>
|
|
148
|
+
<div>
|
|
149
|
+
<label class="text-label">
|
|
150
|
+
{{ t(`customLinks.description`, {}, true) }}
|
|
151
|
+
</label>
|
|
152
|
+
<div class="ui-links-setting mt-20">
|
|
153
|
+
<KeyValue
|
|
154
|
+
v-model="value"
|
|
155
|
+
:default-value="defaultValues"
|
|
156
|
+
:as-map="false"
|
|
157
|
+
:key-label="t('customLinks.settings.keyLabel')"
|
|
158
|
+
:value-label="t('customLinks.settings.valueLabel')"
|
|
159
|
+
:add-label="t('customLinks.addLink')"
|
|
160
|
+
:mode="mode"
|
|
161
|
+
:read-allowed="false"
|
|
162
|
+
:protip="false"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<template v-for="err in errors">
|
|
167
|
+
<Banner :key="err" color="error" :label="err" />
|
|
168
|
+
</template>
|
|
169
|
+
<div v-if="mode === 'edit'" class="mt-20">
|
|
170
|
+
<AsyncButton class="pull-right" mode="apply" @click="save" />
|
|
171
|
+
<button class="pull-right btn role-secondary mr-10" @click="useDefaults">
|
|
172
|
+
{{ t('customLinks.restoreDefaults') }}
|
|
173
|
+
</button>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
<style scoped lang='scss'>
|
|
178
|
+
.overlay {
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 100%;
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: 0;
|
|
183
|
+
left: 0;
|
|
184
|
+
background-color: var(--overlay-bg);
|
|
185
|
+
z-index: 1;
|
|
186
|
+
}
|
|
187
|
+
.ui-links-setting {
|
|
188
|
+
P {
|
|
189
|
+
line-height: 1.25;
|
|
190
|
+
margin-bottom: 10px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.underline {
|
|
194
|
+
text-decoration: underline;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.input {
|
|
198
|
+
max-width: 25%;
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
@@ -5,18 +5,8 @@ import AsyncButton from '@shell/components/AsyncButton';
|
|
|
5
5
|
import { Banner } from '@components/Banner';
|
|
6
6
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
7
7
|
import { MANAGEMENT } from '@shell/config/types';
|
|
8
|
-
import { SETTING } from '@shell/config/settings';
|
|
8
|
+
import { DEFAULT_PERF_SETTING, SETTING } from '@shell/config/settings';
|
|
9
9
|
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
10
|
-
const DEFAULT_PERF_SETTING = {
|
|
11
|
-
incrementalLoading: {
|
|
12
|
-
enabled: false,
|
|
13
|
-
threshold: 2500,
|
|
14
|
-
},
|
|
15
|
-
manualRefresh: {
|
|
16
|
-
enabled: false,
|
|
17
|
-
threshold: 2500,
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
10
|
|
|
21
11
|
export default {
|
|
22
12
|
layout: 'authenticated',
|
|
@@ -27,6 +17,7 @@ export default {
|
|
|
27
17
|
Banner,
|
|
28
18
|
LabeledInput,
|
|
29
19
|
},
|
|
20
|
+
|
|
30
21
|
async fetch() {
|
|
31
22
|
try {
|
|
32
23
|
this.uiPerfSetting = await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.UI_PERFORMANCE });
|
|
@@ -41,6 +32,7 @@ export default {
|
|
|
41
32
|
|
|
42
33
|
this.value = JSON.parse(sValue);
|
|
43
34
|
},
|
|
35
|
+
|
|
44
36
|
data() {
|
|
45
37
|
return {
|
|
46
38
|
uiPerfSetting: DEFAULT_PERF_SETTING,
|
|
@@ -49,6 +41,7 @@ export default {
|
|
|
49
41
|
errors: [],
|
|
50
42
|
};
|
|
51
43
|
},
|
|
44
|
+
|
|
52
45
|
computed: {
|
|
53
46
|
mode() {
|
|
54
47
|
const schema = this.$store.getters[`management/schemaFor`](MANAGEMENT.SETTING);
|
|
@@ -56,10 +49,12 @@ export default {
|
|
|
56
49
|
return schema?.resourceMethods?.includes('PUT') ? _EDIT : _VIEW;
|
|
57
50
|
},
|
|
58
51
|
},
|
|
52
|
+
|
|
59
53
|
methods: {
|
|
60
54
|
async save(btnCB) {
|
|
61
55
|
this.uiPerfSetting.value = JSON.stringify(this.value);
|
|
62
56
|
this.errors = [];
|
|
57
|
+
|
|
63
58
|
try {
|
|
64
59
|
await this.uiPerfSetting.save();
|
|
65
60
|
btnCB(true);
|
|
@@ -78,12 +73,19 @@ export default {
|
|
|
78
73
|
{{ t('performance.label') }}
|
|
79
74
|
</h1>
|
|
80
75
|
<div>
|
|
81
|
-
<label class="text-label">
|
|
82
|
-
{{ t(`performance.description`, {}, true) }}
|
|
83
|
-
</label>
|
|
84
|
-
<Banner color="error" label-key="performance.banner" />
|
|
85
|
-
<!-- Incremental Loading -->
|
|
86
76
|
<div class="ui-perf-setting">
|
|
77
|
+
<!-- Websocket Notifications -->
|
|
78
|
+
<div class="mt-40">
|
|
79
|
+
<h2>{{ t('performance.websocketNotification.label') }}</h2>
|
|
80
|
+
<p>{{ t('performance.websocketNotification.description') }}</p>
|
|
81
|
+
<Checkbox
|
|
82
|
+
v-model="value.disableWebsocketNotification"
|
|
83
|
+
:label="t('performance.websocketNotification.checkboxLabel')"
|
|
84
|
+
class="mt-10 mb-20"
|
|
85
|
+
:primary="true"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
<!-- Incremental Loading -->
|
|
87
89
|
<div class="mt-40">
|
|
88
90
|
<h2>{{ t('performance.incrementalLoad.label') }}</h2>
|
|
89
91
|
<p>{{ t('performance.incrementalLoad.description') }}</p>
|
|
@@ -111,6 +113,7 @@ export default {
|
|
|
111
113
|
<div class="mt-40">
|
|
112
114
|
<h2 v-t="'performance.manualRefresh.label'" />
|
|
113
115
|
<p>{{ t('performance.manualRefresh.description') }}</p>
|
|
116
|
+
<Banner color="error" label-key="performance.manualRefresh.banner" />
|
|
114
117
|
<Checkbox
|
|
115
118
|
v-model="value.manualRefresh.enabled"
|
|
116
119
|
:label="t('performance.manualRefresh.checkboxLabel')"
|