@rancher/shell 3.0.5-rc.5 → 3.0.5-rc.6
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/data/aws-regions.json +1 -0
- package/assets/images/key.svg +17 -0
- package/assets/styles/base/_spacing.scss +2 -2
- package/assets/styles/global/_form.scss +1 -1
- package/assets/styles/global/_labeled-input.scss +1 -1
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +3 -0
- package/assets/styles/vendor/vue-select.scss +1 -1
- package/assets/translations/en-us.yaml +404 -64
- package/assets/translations/zh-hans.yaml +3 -4
- package/cloud-credential/gcp.vue +9 -1
- package/components/AppModal.vue +2 -0
- package/components/CodeMirror.vue +1 -1
- package/components/ConfigMapSettings/Settings.vue +377 -0
- package/components/ConfigMapSettings/index.vue +354 -0
- package/components/CruResource.vue +1 -2
- package/components/DetailText.vue +61 -11
- package/components/Drawer/Chrome.vue +116 -0
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +61 -0
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +48 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/ConfigTab.test.ts +54 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/YamlTab.test.ts +80 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +82 -0
- package/components/Drawer/ResourceDetailDrawer/__tests__/helpers.test.ts +42 -0
- package/components/Drawer/ResourceDetailDrawer/composables.ts +50 -0
- package/components/Drawer/ResourceDetailDrawer/helpers.ts +10 -0
- package/components/Drawer/ResourceDetailDrawer/index.vue +110 -0
- package/components/GrowlManager.vue +16 -15
- package/components/IconOrSvg.vue +5 -0
- package/components/KeyValueView.vue +1 -1
- package/components/LocaleSelector.vue +9 -1
- package/components/ProgressBarMulti.vue +1 -0
- package/components/PromptModal.vue +6 -1
- package/components/RelatedResources.vue +4 -12
- package/components/Resource/Detail/Additional.vue +46 -0
- package/components/Resource/Detail/Metadata/Annotations/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Annotations/index.vue +5 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +223 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +37 -254
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +298 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +27 -5
- package/components/Resource/Detail/Metadata/KeyValue.vue +25 -17
- package/components/Resource/Detail/Metadata/Labels/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/Metadata/Labels/index.vue +4 -0
- package/components/Resource/Detail/Metadata/__tests__/KeyValue.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/Rectangle.test.ts +1 -1
- package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +75 -0
- package/components/Resource/Detail/Metadata/composables.ts +60 -11
- package/components/Resource/Detail/Metadata/index.vue +12 -5
- package/components/Resource/Detail/Page.vue +15 -0
- package/components/Resource/Detail/ResourceRow.vue +37 -18
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/composables.test.ts +29 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/__tests__/index.test.ts +48 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/composables.ts +31 -0
- package/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/index.vue +50 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/__tests__/composables.test.ts +66 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/composables.ts +21 -0
- package/components/Resource/Detail/ResourceTabs/KnownHostsTab/index.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Basic.vue +45 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/BasicAuth.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Certificate.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Registry.vue +22 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/ServiceAccountToken.vue +31 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/Ssh.vue +32 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Basic.test.ts +40 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/BasicAuth.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Certificate.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Registry.test.ts +27 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/ServiceAccountToken.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/Ssh.test.ts +33 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/auth-types.test.ts +186 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/__tests__/composables.test.ts +102 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/auth-types.ts +109 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/composeables.ts +52 -0
- package/components/Resource/Detail/ResourceTabs/SecretDataTab/index.vue +71 -0
- package/components/Resource/Detail/TitleBar/Title.vue +2 -1
- package/components/Resource/Detail/TitleBar/__tests__/Title.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/Top.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +63 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +1 -1
- package/components/Resource/Detail/TitleBar/composables.ts +44 -0
- package/components/Resource/Detail/TitleBar/index.vue +83 -11
- package/components/Resource/Detail/composables.ts +45 -0
- package/components/ResourceDetail/Masthead/__tests__/index.test.ts +70 -0
- package/components/ResourceDetail/{__tests__/Masthead.test.ts → Masthead/__tests__/legacy.test.ts} +3 -3
- package/components/ResourceDetail/Masthead/index.vue +65 -0
- package/components/ResourceDetail/Masthead/latest.vue +44 -0
- package/components/ResourceDetail/__tests__/index.test.ts +26 -5
- package/components/ResourceDetail/index.vue +30 -16
- package/components/ResourceDetail/legacy.vue +18 -1
- package/components/ResourceList/Masthead.vue +6 -0
- package/components/ResourceYaml.vue +14 -1
- package/components/SlideInPanelManager.vue +46 -7
- package/components/StateDot/index.vue +28 -0
- package/components/Tabbed/index.vue +11 -15
- package/components/Wizard.vue +4 -2
- package/components/__tests__/ConfigMapSettings.test.ts +376 -0
- package/components/__tests__/GrowlManager.test.ts +0 -25
- package/components/auth/login/ldap.vue +1 -1
- package/components/fleet/FleetApplications.vue +0 -7
- package/components/fleet/FleetClusterTargets/TargetsList.vue +66 -0
- package/components/fleet/FleetClusterTargets/index.vue +455 -0
- package/components/fleet/FleetClusters.vue +25 -6
- package/components/fleet/FleetGitRepoPaths.vue +476 -0
- package/components/fleet/FleetHelmOps.vue +8 -0
- package/components/fleet/FleetRepos.vue +1 -6
- package/components/fleet/FleetResources.vue +4 -5
- package/components/fleet/FleetValuesFrom.vue +295 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +1224 -0
- package/components/fleet/__tests__/FleetGitRepoPaths.test.ts +265 -0
- package/components/fleet/__tests__/FleetOCIStorageSecret.test.ts +13 -13
- package/components/fleet/__tests__/FleetValuesFrom.test.ts +300 -0
- package/components/fleet/dashboard/ResourceCard.vue +1 -0
- package/components/fleet/dashboard/ResourceCardSummary.vue +1 -5
- package/components/fleet/dashboard/ResourceDetails.vue +8 -10
- package/components/fleet/dashboard/ResourcePanel.vue +15 -8
- package/components/form/ArrayList.vue +13 -2
- package/components/form/ChangePassword.vue +3 -1
- package/components/form/Footer.vue +10 -4
- package/components/form/KeyValue.vue +81 -43
- package/components/form/LabeledSelect.vue +56 -16
- package/components/form/Labels.vue +90 -17
- package/components/form/MatchExpressions.vue +46 -5
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/ResourceSelector.vue +1 -0
- package/components/form/ResourceTabs/index.vue +5 -0
- package/components/form/SecretSelector.vue +9 -2
- package/components/form/Select.vue +57 -19
- package/components/form/SimpleSecretSelector.vue +9 -2
- package/components/form/Taints.vue +21 -2
- package/components/form/UnitInput.vue +8 -0
- package/components/form/ValueFromResource.vue +1 -1
- package/components/form/__tests__/LabeledSelect.test.ts +8 -4
- package/components/form/__tests__/Labels.test.ts +360 -0
- package/components/form/__tests__/MatchExpressions.test.ts +16 -13
- package/components/form/__tests__/Select.test.ts +5 -2
- package/components/formatter/FleetApplicationSource.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +1 -1
- package/components/google/AccountAccess.vue +211 -0
- package/components/google/types/gcp.d.ts +136 -0
- package/components/google/types/index.d.ts +101 -0
- package/components/google/util/__mocks__/gcp.ts +465 -0
- package/components/google/util/formatter.ts +82 -0
- package/components/google/util/gcp.ts +134 -0
- package/components/google/util/index.d.ts +11 -0
- package/components/nav/Favorite.vue +1 -1
- package/components/nav/Group.vue +70 -47
- package/components/nav/Header.vue +5 -1
- package/components/nav/NamespaceFilter.vue +13 -1
- package/components/nav/NotificationCenter/Notification.vue +510 -0
- package/components/nav/NotificationCenter/NotificationHeader.vue +112 -0
- package/components/nav/NotificationCenter/index.vue +148 -0
- package/composables/drawer.ts +26 -0
- package/composables/resources.test.ts +63 -0
- package/composables/resources.ts +38 -0
- package/composables/useIsNewDetailPageEnabled.ts +17 -0
- package/config/labels-annotations.js +6 -0
- package/config/product/auth.js +16 -1
- package/config/product/{cis.js → compliance.js} +23 -26
- package/config/product/explorer.js +5 -1
- package/config/product/fleet.js +7 -0
- package/config/product/settings.js +22 -11
- package/config/query-params.js +3 -0
- package/config/roles.ts +1 -1
- package/config/router/navigation-guards/authentication.js +51 -2
- package/config/router/routes.js +27 -31
- package/config/settings.ts +21 -3
- package/config/store.js +2 -0
- package/config/system-namespaces.js +1 -1
- package/config/table-headers.js +2 -2
- package/config/types.js +15 -6
- package/core/plugin.ts +32 -7
- package/core/types.ts +18 -1
- package/detail/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +22 -18
- package/detail/management.cattle.io.fleetworkspace.vue +18 -27
- package/detail/management.cattle.io.oidcclient.vue +369 -0
- package/detail/node.vue +2 -2
- package/detail/pod.vue +2 -2
- package/detail/service.vue +10 -1
- package/detail/workload/index.vue +8 -2
- package/dialog/ExtensionCatalogUninstallDialog.vue +7 -4
- package/dialog/GenericPrompt.vue +1 -1
- package/dialog/ImportDialog.vue +8 -8
- package/dialog/OidcClientSecretDialog.vue +117 -0
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +3 -3
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +5 -2
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -1
- package/edit/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +30 -31
- package/edit/{cis.cattle.io.clusterscanbenchmark.vue → compliance.cattle.io.clusterscanbenchmark.vue} +4 -4
- package/edit/{cis.cattle.io.clusterscanprofile.vue → compliance.cattle.io.clusterscanprofile.vue} +5 -5
- package/edit/configmap.vue +4 -1
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +1 -0
- package/edit/fleet.cattle.io.gitrepo.vue +44 -222
- package/edit/fleet.cattle.io.helmop.vue +44 -269
- package/edit/helm.cattle.io.projecthelmchart.vue +1 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +1 -0
- package/edit/logging-flow/index.vue +1 -0
- package/edit/logging.banzaicloud.io.output/index.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +1 -0
- package/edit/management.cattle.io.oidcclient.vue +162 -0
- package/edit/management.cattle.io.project.vue +4 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +5 -0
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/auth.vue +30 -30
- package/edit/monitoring.coreos.com.receiver/index.vue +1 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -1
- package/edit/monitoring.coreos.com.route.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.istio.io.destinationrule/index.vue +4 -1
- package/edit/networking.k8s.io.ingress/index.vue +4 -1
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +7 -2
- package/edit/networking.k8s.io.networkpolicy/index.vue +6 -2
- package/edit/node.vue +1 -0
- package/edit/persistentvolume/index.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +418 -382
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +27 -27
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +5 -0
- package/edit/resources.cattle.io.restore.vue +1 -1
- package/edit/secret/index.vue +1 -0
- package/edit/service.vue +4 -1
- package/edit/serviceaccount.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +4 -1
- package/edit/workload/index.vue +5 -0
- package/list/{cis.cattle.io.clusterscan.vue → compliance.cattle.io.clusterscan.vue} +2 -2
- package/list/management.cattle.io.oidcclient.vue +108 -0
- package/list/node.vue +2 -0
- package/machine-config/amazonec2.vue +3 -24
- package/machine-config/components/GCEImage.vue +374 -0
- package/machine-config/google.vue +617 -0
- package/mixins/__tests__/brand.spec.ts +170 -0
- package/mixins/brand.js +16 -17
- package/mixins/create-edit-view/index.js +5 -0
- package/mixins/resource-fetch-api-pagination.js +16 -0
- package/mixins/vue-select-overrides.js +1 -0
- package/models/{cis.cattle.io.clusterscan.js → compliance.cattle.io.clusterscan.js} +8 -8
- package/models/{cis.cattle.io.clusterscanbenchmark.js → compliance.cattle.io.clusterscanbenchmark.js} +1 -1
- package/models/{cis.cattle.io.clusterscanprofile.js → compliance.cattle.io.clusterscanprofile.js} +5 -5
- package/models/{cis.cattle.io.clusterscanreport.js → compliance.cattle.io.clusterscanreport.js} +1 -1
- package/models/fleet-application.js +8 -79
- package/models/fleet.cattle.io.cluster.js +11 -0
- package/models/fleet.cattle.io.gitrepo.js +2 -2
- package/models/fleet.cattle.io.helmop.js +9 -39
- package/models/management.cattle.io.fleetworkspace.js +2 -1
- package/models/management.cattle.io.oidcclient.js +18 -0
- package/models/management.cattle.io.registration.js +3 -0
- package/models/provisioning.cattle.io.cluster.js +5 -5
- package/models/service.js +4 -0
- package/models/workload.js +5 -0
- package/package.json +1 -1
- package/pages/about.vue +4 -58
- package/pages/auth/login.vue +1 -1
- package/pages/c/_cluster/apps/charts/AddRepoLink.vue +0 -1
- package/pages/c/_cluster/apps/charts/index.vue +285 -81
- package/pages/c/_cluster/auth/user.retention/index.vue +87 -78
- package/pages/c/_cluster/explorer/index.vue +3 -3
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +0 -1
- package/pages/c/_cluster/fleet/application/create.vue +3 -2
- package/pages/c/_cluster/fleet/index.vue +94 -56
- package/pages/c/_cluster/fleet/settings/index.vue +229 -0
- package/pages/c/_cluster/longhorn/index.vue +5 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +16 -1
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +2 -2
- package/pages/explorer/resource/detail/configmap.vue +30 -7
- package/pages/explorer/resource/detail/secret.vue +50 -0
- package/pages/home.vue +9 -55
- package/pages/support/index.vue +4 -6
- package/plugins/dashboard-store/actions.js +19 -5
- package/plugins/dashboard-store/getters.js +4 -0
- package/plugins/dashboard-store/resource-class.js +16 -2
- package/plugins/steve/steve-pagination-utils.ts +26 -18
- package/plugins/steve/subscribe.js +6 -1
- package/rancher-components/Banner/Banner.vue +13 -0
- package/rancher-components/Form/Checkbox/Checkbox.vue +9 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +1 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +1 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +8 -3
- package/store/auth.js +2 -0
- package/store/catalog.js +23 -1
- package/store/growl.js +97 -8
- package/store/index.js +6 -0
- package/store/notifications.ts +426 -0
- package/store/prefs.js +0 -1
- package/store/type-map.js +19 -16
- package/store/uiplugins.ts +15 -1
- package/types/fleet.d.ts +24 -0
- package/types/notifications/index.ts +74 -0
- package/types/shell/index.d.ts +46 -32
- package/types/store/dashboard-store.types.ts +16 -0
- package/utils/__tests__/fleet.test.ts +148 -0
- package/utils/__tests__/object.test.ts +54 -1
- package/utils/__tests__/string.test.ts +273 -1
- package/utils/__tests__/time.test.ts +31 -0
- package/utils/auth.js +9 -2
- package/utils/crypto/encryption.ts +103 -0
- package/utils/cspAdaptor.ts +51 -0
- package/utils/fleet.ts +54 -65
- package/utils/object.js +36 -0
- package/utils/pagination-utils.ts +1 -1
- package/utils/release-notes.ts +48 -0
- package/utils/selector-typed.ts +7 -2
- package/utils/string.js +24 -0
- package/utils/{time.js → time.ts} +25 -6
- package/utils/uiplugins.ts +22 -0
- package/utils/validators/formRules/index.ts +3 -0
- package/components/Resource/Detail/TitleBar/composable.ts +0 -31
- package/config/product/legacy.js +0 -62
- package/pages/c/_cluster/legacy/pages/_page.vue +0 -29
- package/pages/c/_cluster/legacy/project/_page.vue +0 -57
- package/pages/c/_cluster/legacy/project/index.vue +0 -32
- package/pages/c/_cluster/legacy/project/pipelines.vue +0 -96
- /package/components/ResourceDetail/{Masthead.vue → Masthead/legacy.vue} +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ConfigMapSettings, { Group, Setting } from '@shell/components/ConfigMapSettings/index.vue';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
|
|
6
|
+
name: 'FleetSettings',
|
|
7
|
+
|
|
8
|
+
components: { ConfigMapSettings },
|
|
9
|
+
|
|
10
|
+
computed: {
|
|
11
|
+
settings(): Record<string, Setting> {
|
|
12
|
+
return {
|
|
13
|
+
// 'general' group
|
|
14
|
+
nodeSelector: {
|
|
15
|
+
weight: 0,
|
|
16
|
+
type: 'object',
|
|
17
|
+
handler: 'KeyValue',
|
|
18
|
+
path: 'nodeSelector',
|
|
19
|
+
default: {},
|
|
20
|
+
class: 'span-8',
|
|
21
|
+
},
|
|
22
|
+
tolerations: {
|
|
23
|
+
weight: 1,
|
|
24
|
+
type: 'object',
|
|
25
|
+
handler: 'Taints',
|
|
26
|
+
path: 'tolerations',
|
|
27
|
+
default: [],
|
|
28
|
+
class: 'span-8',
|
|
29
|
+
},
|
|
30
|
+
garbageCollectionInterval: {
|
|
31
|
+
weight: 2,
|
|
32
|
+
type: 'number',
|
|
33
|
+
handler: 'UnitInput',
|
|
34
|
+
path: 'garbageCollectionInterval',
|
|
35
|
+
default: '15m',
|
|
36
|
+
},
|
|
37
|
+
priorityClassName: {
|
|
38
|
+
weight: 3,
|
|
39
|
+
type: 'string',
|
|
40
|
+
path: 'priorityClassName',
|
|
41
|
+
default: '',
|
|
42
|
+
},
|
|
43
|
+
gitClientTimeout: {
|
|
44
|
+
weight: 4,
|
|
45
|
+
type: 'number',
|
|
46
|
+
handler: 'UnitInput',
|
|
47
|
+
path: 'gitClientTimeout',
|
|
48
|
+
default: '30s',
|
|
49
|
+
},
|
|
50
|
+
proxy: {
|
|
51
|
+
weight: 5,
|
|
52
|
+
type: 'string',
|
|
53
|
+
path: 'proxy',
|
|
54
|
+
default: '',
|
|
55
|
+
placeholder: true,
|
|
56
|
+
class: 'span-8',
|
|
57
|
+
},
|
|
58
|
+
noProxy: {
|
|
59
|
+
weight: 6,
|
|
60
|
+
type: 'string',
|
|
61
|
+
path: 'noProxy',
|
|
62
|
+
default: '127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local',
|
|
63
|
+
class: 'span-8',
|
|
64
|
+
},
|
|
65
|
+
clusterEnqueueDelay: {
|
|
66
|
+
weight: 7,
|
|
67
|
+
type: 'number',
|
|
68
|
+
handler: 'UnitInput',
|
|
69
|
+
path: 'clusterEnqueueDelay',
|
|
70
|
+
default: '120s',
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
// 'replicas' group
|
|
74
|
+
controllerReplicas: {
|
|
75
|
+
weight: 0,
|
|
76
|
+
type: 'number',
|
|
77
|
+
path: 'controller.replicas',
|
|
78
|
+
default: 1,
|
|
79
|
+
},
|
|
80
|
+
agentReplicas: {
|
|
81
|
+
weight: 1,
|
|
82
|
+
type: 'number',
|
|
83
|
+
path: 'agent.replicas',
|
|
84
|
+
default: 1,
|
|
85
|
+
},
|
|
86
|
+
gitjobReplicas: {
|
|
87
|
+
weight: 2,
|
|
88
|
+
type: 'number',
|
|
89
|
+
path: 'gitjob.replicas',
|
|
90
|
+
default: 1,
|
|
91
|
+
},
|
|
92
|
+
helmopsReplicas: {
|
|
93
|
+
weight: 3,
|
|
94
|
+
type: 'number',
|
|
95
|
+
path: 'helmops.replicas',
|
|
96
|
+
default: 1,
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// 'agent' group
|
|
100
|
+
agentTLSMode: {
|
|
101
|
+
weight: 1,
|
|
102
|
+
type: 'string',
|
|
103
|
+
items: [{
|
|
104
|
+
type: 'string',
|
|
105
|
+
value: 'strict'
|
|
106
|
+
}, {
|
|
107
|
+
type: 'string',
|
|
108
|
+
value: 'system-store'
|
|
109
|
+
}],
|
|
110
|
+
path: 'agentTLSMode',
|
|
111
|
+
default: 'system-store',
|
|
112
|
+
},
|
|
113
|
+
agentCheckinInterval: {
|
|
114
|
+
weight: 2,
|
|
115
|
+
type: 'number',
|
|
116
|
+
handler: 'UnitInput',
|
|
117
|
+
path: 'agentCheckinInterval',
|
|
118
|
+
default: '15m',
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
// 'annotations' group
|
|
122
|
+
controllerAnnotations: {
|
|
123
|
+
weight: 0,
|
|
124
|
+
type: 'object',
|
|
125
|
+
handler: 'KeyValue',
|
|
126
|
+
path: 'extraAnnotations.fleetController',
|
|
127
|
+
default: {},
|
|
128
|
+
class: 'span-8',
|
|
129
|
+
},
|
|
130
|
+
gitjobAnnotations: {
|
|
131
|
+
weight: 1,
|
|
132
|
+
type: 'object',
|
|
133
|
+
handler: 'KeyValue',
|
|
134
|
+
path: 'extraAnnotations.gitjob',
|
|
135
|
+
default: {},
|
|
136
|
+
class: 'span-8',
|
|
137
|
+
},
|
|
138
|
+
helmopsAnnotations: {
|
|
139
|
+
weight: 2,
|
|
140
|
+
type: 'object',
|
|
141
|
+
handler: 'KeyValue',
|
|
142
|
+
path: 'extraAnnotations.helmops',
|
|
143
|
+
default: {},
|
|
144
|
+
class: 'span-8',
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
// 'developer' group
|
|
148
|
+
metrics: {
|
|
149
|
+
weight: 0,
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
path: 'metrics.enabled',
|
|
152
|
+
default: false,
|
|
153
|
+
},
|
|
154
|
+
debug: {
|
|
155
|
+
weight: 1,
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
path: 'debug',
|
|
158
|
+
default: false,
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
groups(): Group[] {
|
|
164
|
+
return [{
|
|
165
|
+
name: 'general',
|
|
166
|
+
children: [
|
|
167
|
+
'garbageCollectionInterval',
|
|
168
|
+
'gitClientTimeout',
|
|
169
|
+
'proxy',
|
|
170
|
+
'noProxy',
|
|
171
|
+
'clusterEnqueueDelay',
|
|
172
|
+
'nodeSelector',
|
|
173
|
+
'priorityClassName',
|
|
174
|
+
'tolerations',
|
|
175
|
+
],
|
|
176
|
+
expanded: true,
|
|
177
|
+
weight: 0
|
|
178
|
+
}, {
|
|
179
|
+
name: 'agent',
|
|
180
|
+
children: [
|
|
181
|
+
'agentTLSMode',
|
|
182
|
+
'agentCheckinInterval'
|
|
183
|
+
],
|
|
184
|
+
weight: 1
|
|
185
|
+
}, {
|
|
186
|
+
name: 'replicas',
|
|
187
|
+
children: [
|
|
188
|
+
'controllerReplicas',
|
|
189
|
+
'gitjobReplicas',
|
|
190
|
+
'helmopsReplicas',
|
|
191
|
+
'agentReplicas',
|
|
192
|
+
],
|
|
193
|
+
weight: 2
|
|
194
|
+
}, {
|
|
195
|
+
name: 'annotations',
|
|
196
|
+
children: [
|
|
197
|
+
'controllerAnnotations',
|
|
198
|
+
'gitjobAnnotations',
|
|
199
|
+
'helmopsAnnotations'
|
|
200
|
+
],
|
|
201
|
+
weight: 3
|
|
202
|
+
}, {
|
|
203
|
+
name: 'developer',
|
|
204
|
+
children: [
|
|
205
|
+
'metrics',
|
|
206
|
+
'debug'
|
|
207
|
+
],
|
|
208
|
+
weight: 4
|
|
209
|
+
}];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
</script>
|
|
214
|
+
|
|
215
|
+
<template>
|
|
216
|
+
<ConfigMapSettings
|
|
217
|
+
:settings="settings"
|
|
218
|
+
:groups="groups"
|
|
219
|
+
:namespace="'cattle-system'"
|
|
220
|
+
:name="'rancher-config'"
|
|
221
|
+
:data-key="'fleet'"
|
|
222
|
+
:in-store="'management'"
|
|
223
|
+
:label-key-prefix="'fleet.settings'"
|
|
224
|
+
:show-info="true"
|
|
225
|
+
/>
|
|
226
|
+
</template>
|
|
227
|
+
|
|
228
|
+
<style scoped lang='scss'>
|
|
229
|
+
</style>
|
|
@@ -12,10 +12,13 @@ export default {
|
|
|
12
12
|
|
|
13
13
|
async fetch() {
|
|
14
14
|
if ( this.$store.getters['cluster/schemaFor'](SERVICE) ) {
|
|
15
|
-
|
|
15
|
+
const response = await this.$store.dispatch('cluster/findLabelSelector', {
|
|
16
16
|
type: SERVICE,
|
|
17
|
-
matching: { labelSelector: { matchLabels: { app: 'longhorn-ui' } } }
|
|
17
|
+
matching: { labelSelector: { matchLabels: { app: 'longhorn-ui' } } },
|
|
18
|
+
opt: { transient: true }
|
|
18
19
|
});
|
|
20
|
+
|
|
21
|
+
this.uiServices = response.data;
|
|
19
22
|
}
|
|
20
23
|
},
|
|
21
24
|
|
|
@@ -3,11 +3,12 @@ import { mapGetters } from 'vuex';
|
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
4
|
|
|
5
5
|
import ResourceManager from '@shell/mixins/resource-manager';
|
|
6
|
-
import { SERVICE, WORKLOAD_TYPES } from '@shell/config/types';
|
|
6
|
+
import { SERVICE, SERVICE_ACCOUNT, WORKLOAD_TYPES } from '@shell/config/types';
|
|
7
7
|
import { UI_PLUGIN_LABELS, UI_PLUGIN_NAMESPACE } from '@shell/config/uiplugins';
|
|
8
8
|
import { UI_PLUGIN_CATALOG } from '@shell/config/table-headers';
|
|
9
9
|
|
|
10
10
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
11
|
+
import { allHash } from '@shell/utils/promise';
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
14
|
emits: ['showCatalogUninstallDialog', 'showCatalogLoadDialog'],
|
|
@@ -32,6 +33,20 @@ export default {
|
|
|
32
33
|
};
|
|
33
34
|
},
|
|
34
35
|
|
|
36
|
+
async fetch() {
|
|
37
|
+
const hash = {};
|
|
38
|
+
|
|
39
|
+
if ( this.$store.getters['management/canList'](WORKLOAD_TYPES.DEPLOYMENT) ) {
|
|
40
|
+
hash.deployments = this.$store.dispatch('management/findAll', { type: WORKLOAD_TYPES.DEPLOYMENT });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if ( this.$store.getters['management/canList'](SERVICE_ACCOUNT) ) {
|
|
44
|
+
hash.services = this.$store.dispatch('management/findAll', { type: SERVICE });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
await allHash(hash);
|
|
48
|
+
},
|
|
49
|
+
|
|
35
50
|
computed: {
|
|
36
51
|
...mapGetters({ allRepos: 'catalog/repos' }),
|
|
37
52
|
|
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
@after-enter="onEnter"
|
|
168
168
|
@after-leave="onLeave"
|
|
169
169
|
>
|
|
170
|
-
<
|
|
170
|
+
<aside
|
|
171
171
|
v-if="showSlideIn"
|
|
172
172
|
id="slide-in-content-element"
|
|
173
173
|
class="slideIn"
|
|
@@ -293,7 +293,7 @@ export default {
|
|
|
293
293
|
</div>
|
|
294
294
|
</div>
|
|
295
295
|
</div>
|
|
296
|
-
</
|
|
296
|
+
</aside>
|
|
297
297
|
</transition>
|
|
298
298
|
</div>
|
|
299
299
|
</template>
|
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import DetailPage from '@shell/components/Resource/Detail/Page.vue';
|
|
3
|
+
import TitleBar from '@shell/components/Resource/Detail/TitleBar/index.vue';
|
|
4
|
+
import { useDefaultTitleBarProps } from '@shell/components/Resource/Detail/TitleBar/composables';
|
|
5
|
+
import Metadata from '@shell/components/Resource/Detail/Metadata/index.vue';
|
|
6
|
+
import { useDefaultMetadataProps } from '@shell/components/Resource/Detail/Metadata/composables';
|
|
3
7
|
import { CONFIG_MAP } from '@shell/config/types';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
import { useFetchResourceWithId, useResourceIdentifiers } from '@shell/composables/resources';
|
|
9
|
+
import ResourceTabs from '@shell/components/form/ResourceTabs/index.vue';
|
|
10
|
+
import ConfigMapDataTab from '@shell/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/index.vue';
|
|
11
|
+
import { useGetConfigMapDataTabProps } from '@shell/components/Resource/Detail/ResourceTabs/ConfigMapDataTab/composables';
|
|
8
12
|
|
|
13
|
+
const { id, schema } = useResourceIdentifiers(CONFIG_MAP);
|
|
14
|
+
const configMap = await useFetchResourceWithId(CONFIG_MAP, id);
|
|
15
|
+
const titleBarProps = useDefaultTitleBarProps(configMap);
|
|
16
|
+
const metadataProps = useDefaultMetadataProps(configMap);
|
|
17
|
+
const configMapDataTabProps = useGetConfigMapDataTabProps(configMap);
|
|
9
18
|
</script>
|
|
19
|
+
|
|
10
20
|
<template>
|
|
11
21
|
<DetailPage>
|
|
12
22
|
<template #top-area>
|
|
13
|
-
|
|
23
|
+
<TitleBar
|
|
24
|
+
v-bind="titleBarProps"
|
|
25
|
+
/>
|
|
26
|
+
<Metadata
|
|
27
|
+
class="mmt-6"
|
|
28
|
+
v-bind="metadataProps"
|
|
29
|
+
/>
|
|
14
30
|
</template>
|
|
15
|
-
<template #
|
|
16
|
-
|
|
31
|
+
<template #bottom-area>
|
|
32
|
+
<ResourceTabs
|
|
33
|
+
:value="configMap"
|
|
34
|
+
:schema="schema"
|
|
35
|
+
>
|
|
36
|
+
<ConfigMapDataTab
|
|
37
|
+
v-bind="configMapDataTabProps"
|
|
38
|
+
/>
|
|
39
|
+
</ResourceTabs>
|
|
17
40
|
</template>
|
|
18
41
|
</DetailPage>
|
|
19
42
|
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import DetailPage from '@shell/components/Resource/Detail/Page.vue';
|
|
3
|
+
import TitleBar from '@shell/components/Resource/Detail/TitleBar/index.vue';
|
|
4
|
+
import { useDefaultTitleBarProps } from '@shell/components/Resource/Detail/TitleBar/composables';
|
|
5
|
+
import Metadata from '@shell/components/Resource/Detail/Metadata/index.vue';
|
|
6
|
+
import { useDefaultMetadataProps } from '@shell/components/Resource/Detail/Metadata/composables';
|
|
7
|
+
import { SECRET } from '@shell/config/types';
|
|
8
|
+
import { useFetchResourceWithId, useResourceIdentifiers } from '@shell/composables/resources';
|
|
9
|
+
import ResourceTabs from '@shell/components/form/ResourceTabs/index.vue';
|
|
10
|
+
import SecretDataTab from '@shell/components/Resource/Detail/ResourceTabs/SecretDataTab/index.vue';
|
|
11
|
+
import KnownHostsTab from '@shell/components/Resource/Detail/ResourceTabs/KnownHostsTab/index.vue';
|
|
12
|
+
import { useGetKnownHostsTabProps } from '@shell/components/Resource/Detail/ResourceTabs/KnownHostsTab/composables';
|
|
13
|
+
import { useSecretDataTabDefaultProps } from '@shell/components/Resource/Detail/ResourceTabs/SecretDataTab/composeables';
|
|
14
|
+
import { useSecretIdentifyingInformation } from '@shell/components/Resource/Detail/Metadata/IdentifyingInformation/composable';
|
|
15
|
+
|
|
16
|
+
const { id, schema } = useResourceIdentifiers(SECRET);
|
|
17
|
+
const secret = await useFetchResourceWithId(SECRET, id);
|
|
18
|
+
const titleBarProps = useDefaultTitleBarProps(secret);
|
|
19
|
+
const additionalIdentifyingInformation = useSecretIdentifyingInformation(secret);
|
|
20
|
+
const metaDataProps = useDefaultMetadataProps(secret, additionalIdentifyingInformation);
|
|
21
|
+
const knownHostsTabProps = useGetKnownHostsTabProps(secret);
|
|
22
|
+
const secretDataTabProps = useSecretDataTabDefaultProps(secret);
|
|
23
|
+
</script>
|
|
24
|
+
<template>
|
|
25
|
+
<DetailPage>
|
|
26
|
+
<template #top-area>
|
|
27
|
+
<TitleBar v-bind="titleBarProps" />
|
|
28
|
+
<Metadata
|
|
29
|
+
class="mmt-6"
|
|
30
|
+
v-bind="metaDataProps"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
<template #bottom-area>
|
|
34
|
+
<ResourceTabs
|
|
35
|
+
:value="secret"
|
|
36
|
+
:schema="schema"
|
|
37
|
+
>
|
|
38
|
+
<SecretDataTab
|
|
39
|
+
v-bind="secretDataTabProps"
|
|
40
|
+
:weight="1"
|
|
41
|
+
/>
|
|
42
|
+
<KnownHostsTab
|
|
43
|
+
v-if="knownHostsTabProps"
|
|
44
|
+
v-bind="knownHostsTabProps"
|
|
45
|
+
:weight="0"
|
|
46
|
+
/>
|
|
47
|
+
</ResourceTabs>
|
|
48
|
+
</template>
|
|
49
|
+
</DetailPage>
|
|
50
|
+
</template>
|
package/pages/home.vue
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
|
-
import { mapPref, AFTER_LOGIN_ROUTE,
|
|
4
|
-
import { Banner } from '@components/Banner';
|
|
3
|
+
import { mapPref, AFTER_LOGIN_ROUTE, HIDE_HOME_PAGE_CARDS } from '@shell/store/prefs';
|
|
5
4
|
import BannerGraphic from '@shell/components/BannerGraphic.vue';
|
|
6
5
|
import IndentedPanel from '@shell/components/IndentedPanel.vue';
|
|
7
6
|
import PaginatedResourceTable from '@shell/components/PaginatedResourceTable.vue';
|
|
@@ -14,7 +13,7 @@ import { NAME as MANAGER } from '@shell/config/product/manager';
|
|
|
14
13
|
import { STATE } from '@shell/config/table-headers';
|
|
15
14
|
import { MODE, _IMPORT } from '@shell/config/query-params';
|
|
16
15
|
import { createMemoryFormat, formatSi, parseSi, createMemoryValues } from '@shell/utils/units';
|
|
17
|
-
import {
|
|
16
|
+
import { markSeenReleaseNotes } from '@shell/utils/version';
|
|
18
17
|
import PageHeaderActions from '@shell/mixins/page-actions';
|
|
19
18
|
import { getVendor } from '@shell/config/private-label';
|
|
20
19
|
import { mapFeature, MULTI_CLUSTER } from '@shell/store/features';
|
|
@@ -36,7 +35,6 @@ export default defineComponent({
|
|
|
36
35
|
name: 'Home',
|
|
37
36
|
layout: 'home',
|
|
38
37
|
components: {
|
|
39
|
-
Banner,
|
|
40
38
|
BannerGraphic,
|
|
41
39
|
IndentedPanel,
|
|
42
40
|
PaginatedResourceTable,
|
|
@@ -66,7 +64,6 @@ export default defineComponent({
|
|
|
66
64
|
|
|
67
65
|
return {
|
|
68
66
|
HIDE_HOME_PAGE_CARDS,
|
|
69
|
-
fullVersion: getVersionInfo(this.$store).fullVersion,
|
|
70
67
|
// Page actions don't change on the Home Page
|
|
71
68
|
pageActions: [
|
|
72
69
|
{
|
|
@@ -213,7 +210,7 @@ export default defineComponent({
|
|
|
213
210
|
|
|
214
211
|
computed: {
|
|
215
212
|
...mapState(['managementReady']),
|
|
216
|
-
...mapGetters(['currentCluster', 'defaultClusterId'
|
|
213
|
+
...mapGetters(['currentCluster', 'defaultClusterId']),
|
|
217
214
|
mcm: mapFeature(MULTI_CLUSTER),
|
|
218
215
|
|
|
219
216
|
canCreateCluster() {
|
|
@@ -223,14 +220,16 @@ export default defineComponent({
|
|
|
223
220
|
afterLoginRoute: mapPref(AFTER_LOGIN_ROUTE),
|
|
224
221
|
homePageCards: mapPref(HIDE_HOME_PAGE_CARDS),
|
|
225
222
|
|
|
226
|
-
readWhatsNewAlready() {
|
|
227
|
-
return readReleaseNotes(this.$store);
|
|
228
|
-
},
|
|
229
223
|
},
|
|
230
224
|
|
|
231
225
|
async created() {
|
|
232
226
|
// Update last visited on load
|
|
233
227
|
await this.$store.dispatch('prefs/setLastVisited', { name: 'home' });
|
|
228
|
+
|
|
229
|
+
// We mark the release notes as seen still - the user has visited the home page, which will show the
|
|
230
|
+
// notification centre containing the release notes notification
|
|
231
|
+
// If we do not, then if they set the landing page, that won't work unless the release notes are marked read
|
|
232
|
+
// otherwise we always take them to the home page to see the release notes
|
|
234
233
|
markSeenReleaseNotes(this.$store);
|
|
235
234
|
},
|
|
236
235
|
|
|
@@ -406,19 +405,12 @@ export default defineComponent({
|
|
|
406
405
|
return `${ memValues.useful }/${ memValues.total } ${ memValues.units }`;
|
|
407
406
|
},
|
|
408
407
|
|
|
409
|
-
showWhatsNew() {
|
|
410
|
-
// Update the value, so that the message goes away
|
|
411
|
-
markReadReleaseNotes(this.$store);
|
|
412
|
-
},
|
|
413
|
-
|
|
414
408
|
async resetCards() {
|
|
415
409
|
const value = this.$store.getters['prefs/get'](HIDE_HOME_PAGE_CARDS) || {};
|
|
416
410
|
|
|
417
411
|
delete value.setLoginPage;
|
|
418
412
|
|
|
419
413
|
await this.$store.dispatch('prefs/set', { key: HIDE_HOME_PAGE_CARDS, value });
|
|
420
|
-
|
|
421
|
-
await this.$store.dispatch('prefs/set', { key: READ_WHATS_NEW, value: '' });
|
|
422
414
|
},
|
|
423
415
|
|
|
424
416
|
async toggleBanner() {
|
|
@@ -499,31 +491,6 @@ export default defineComponent({
|
|
|
499
491
|
data-testid="home-banner-graphic"
|
|
500
492
|
/>
|
|
501
493
|
<IndentedPanel class="mt-20 mb-20">
|
|
502
|
-
<div
|
|
503
|
-
v-if="!readWhatsNewAlready"
|
|
504
|
-
class="row"
|
|
505
|
-
>
|
|
506
|
-
<div class="col span-12">
|
|
507
|
-
<Banner
|
|
508
|
-
data-testid="changelog-banner"
|
|
509
|
-
color="info whats-new"
|
|
510
|
-
>
|
|
511
|
-
<div>
|
|
512
|
-
{{ t('landing.seeWhatsNew', { version: CURRENT_RANCHER_VERSION }) }}
|
|
513
|
-
</div>
|
|
514
|
-
<a
|
|
515
|
-
class="hand banner-link"
|
|
516
|
-
:href="releaseNotesUrl"
|
|
517
|
-
role="link"
|
|
518
|
-
target="_blank"
|
|
519
|
-
rel="noopener noreferrer nofollow"
|
|
520
|
-
:aria-label="t('landing.whatsNewLink', { version: CURRENT_RANCHER_VERSION })"
|
|
521
|
-
@click.stop="showWhatsNew"
|
|
522
|
-
@keyup.stop.enter="showWhatsNew"
|
|
523
|
-
><span v-clean-html="t('landing.whatsNewLink', { version: CURRENT_RANCHER_VERSION })" /></a>
|
|
524
|
-
</Banner>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
494
|
<div class="row home-panels">
|
|
528
495
|
<div class="col main-panel">
|
|
529
496
|
<div class="row panel">
|
|
@@ -711,19 +678,6 @@ export default defineComponent({
|
|
|
711
678
|
}
|
|
712
679
|
}
|
|
713
680
|
|
|
714
|
-
.whats-new {
|
|
715
|
-
> :deep() .banner__content {
|
|
716
|
-
display: flex;
|
|
717
|
-
|
|
718
|
-
> div {
|
|
719
|
-
flex: 1;
|
|
720
|
-
}
|
|
721
|
-
> a {
|
|
722
|
-
align-self: flex-end;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
681
|
.table-heading {
|
|
728
682
|
align-items: center;
|
|
729
683
|
display: flex;
|
|
@@ -761,7 +715,7 @@ export default defineComponent({
|
|
|
761
715
|
align-items: center;
|
|
762
716
|
|
|
763
717
|
// Ensure long cluster names truncate with ellipsis
|
|
764
|
-
> A {
|
|
718
|
+
> A, > span {
|
|
765
719
|
overflow: hidden;
|
|
766
720
|
text-overflow: ellipsis;
|
|
767
721
|
}
|
package/pages/support/index.vue
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import BannerGraphic from '@shell/components/BannerGraphic';
|
|
3
3
|
import IndentedPanel from '@shell/components/IndentedPanel';
|
|
4
4
|
import CommunityLinks from '@shell/components/CommunityLinks';
|
|
5
|
-
import {
|
|
5
|
+
import { MANAGEMENT } from '@shell/config/types';
|
|
6
6
|
import { getVendor } from '@shell/config/private-label';
|
|
7
7
|
import { SETTING } from '@shell/config/settings';
|
|
8
8
|
import { addParam } from '@shell/utils/url';
|
|
9
9
|
import { isRancherPrime } from '@shell/config/version';
|
|
10
|
-
import { hasCspAdapter } from '@shell/mixins/brand';
|
|
11
10
|
import TabTitle from '@shell/components/TabTitle';
|
|
11
|
+
import CspAdapterUtils from '@shell/utils/cspAdaptor';
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
|
|
@@ -42,9 +42,7 @@ export default {
|
|
|
42
42
|
return setting;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
this.apps = await this.$store.dispatch('management/findAll', { type: CATALOG.APP });
|
|
47
|
-
}
|
|
45
|
+
this.apps = await CspAdapterUtils.fetchCspAdaptorApp(this.$store);
|
|
48
46
|
this.brandSetting = await fetchOrCreateSetting(SETTING.BRAND, '');
|
|
49
47
|
this.serverUrlSetting = await fetchOrCreateSetting(SETTING.SERVER_URL, '');
|
|
50
48
|
this.uiIssuesSetting = await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.ISSUES });
|
|
@@ -75,7 +73,7 @@ export default {
|
|
|
75
73
|
|
|
76
74
|
computed: {
|
|
77
75
|
cspAdapter() {
|
|
78
|
-
return hasCspAdapter(this.apps);
|
|
76
|
+
return CspAdapterUtils.hasCspAdapter({ $store: this.$store, apps: this.apps });
|
|
79
77
|
},
|
|
80
78
|
|
|
81
79
|
hasSupport() {
|
|
@@ -408,10 +408,12 @@ export default {
|
|
|
408
408
|
*
|
|
409
409
|
* @param {*} ctx
|
|
410
410
|
* @param { {type: string, opt: ActionFindPageArgs} } opt
|
|
411
|
+
* @returns @ActionFindPageResponse
|
|
411
412
|
*/
|
|
412
413
|
async findPage(ctx, { type, opt }) {
|
|
413
414
|
const { getters, commit, dispatch } = ctx;
|
|
414
415
|
|
|
416
|
+
// of type @ActionFindPageArgs
|
|
415
417
|
opt = opt || {};
|
|
416
418
|
|
|
417
419
|
if (!opt.pagination) {
|
|
@@ -443,7 +445,7 @@ export default {
|
|
|
443
445
|
return findAllGetter(getters, type, opt);
|
|
444
446
|
}
|
|
445
447
|
|
|
446
|
-
console.log(`Find Page: [${ ctx.state.config.namespace }] ${ type }. Page: ${ opt.pagination.page }. Size: ${ opt.pagination.pageSize }`); // eslint-disable-line no-console
|
|
448
|
+
console.log(`Find Page: [${ ctx.state.config.namespace }] ${ type }. Page: ${ opt.pagination.page }. Size: ${ opt.pagination.pageSize }. Sort: ${ opt.pagination.sort.map((s) => s.field).join(', ') }`); // eslint-disable-line no-console
|
|
447
449
|
opt = opt || {};
|
|
448
450
|
opt.url = getters.urlFor(type, null, opt);
|
|
449
451
|
|
|
@@ -512,6 +514,9 @@ export default {
|
|
|
512
514
|
* b) Pagination Disabled - use the old 'native kube api' - findMatching
|
|
513
515
|
*
|
|
514
516
|
* Filter is defined via the kube labelSelector object (see KubeLabelSelector)
|
|
517
|
+
*
|
|
518
|
+
* opt: @ActionFindLabelSelectorArgs
|
|
519
|
+
* @returns @ActionFindMatchingResponse (resources[], or if transient { data: resources[], pagination: StorePagination })
|
|
515
520
|
*/
|
|
516
521
|
async findLabelSelector(ctx, {
|
|
517
522
|
type,
|
|
@@ -528,6 +533,8 @@ export default {
|
|
|
528
533
|
context,
|
|
529
534
|
};
|
|
530
535
|
|
|
536
|
+
opt = opt || {};
|
|
537
|
+
|
|
531
538
|
if (getters[`paginationEnabled`]?.(args)) {
|
|
532
539
|
if (isLabelSelectorEmpty(labelSelector)) {
|
|
533
540
|
throw new Error(`labelSelector must not be empty when using findLabelSelector (avoid fetching all resources)`);
|
|
@@ -537,21 +544,28 @@ export default {
|
|
|
537
544
|
return dispatch('findPage', {
|
|
538
545
|
type,
|
|
539
546
|
opt: {
|
|
540
|
-
...
|
|
547
|
+
...opt,
|
|
541
548
|
namespaced: namespace,
|
|
542
549
|
pagination: new FilterArgs({ labelSelector }),
|
|
550
|
+
transient: opt?.transient !== undefined ? opt.transient : false // Call this out explicitly here, as by default findX methods ar eusually be cached AND watched
|
|
543
551
|
}
|
|
544
552
|
});
|
|
545
553
|
}
|
|
546
554
|
|
|
547
|
-
|
|
555
|
+
// opt of type ActionFindPageArgs
|
|
556
|
+
const findMatching = await dispatch('findMatching', {
|
|
548
557
|
type,
|
|
549
558
|
selector: labelSelectorToSelector(labelSelector),
|
|
550
559
|
opt,
|
|
551
560
|
namespace,
|
|
552
561
|
});
|
|
562
|
+
|
|
563
|
+
return opt.transient ? { data: findMatching } : findMatching;
|
|
553
564
|
},
|
|
554
565
|
|
|
566
|
+
/**
|
|
567
|
+
* opt: @ActionFindMatchingArgs
|
|
568
|
+
*/
|
|
555
569
|
async findMatching(ctx, {
|
|
556
570
|
type,
|
|
557
571
|
selector,
|
|
@@ -796,9 +810,9 @@ export default {
|
|
|
796
810
|
|
|
797
811
|
// Forget a type in the store
|
|
798
812
|
// Remove all entries for that type and stop watching it
|
|
799
|
-
forgetType({ commit, dispatch, state }, type) {
|
|
813
|
+
forgetType({ commit, dispatch, state }, type, compareWatches) {
|
|
800
814
|
state.started
|
|
801
|
-
.filter((entry) => entry.type === type)
|
|
815
|
+
.filter((entry) => compareWatches ? compareWatches(entry) : entry.type === type)
|
|
802
816
|
.forEach((entry) => dispatch('unwatch', entry));
|
|
803
817
|
|
|
804
818
|
commit('forgetType', type);
|
|
@@ -152,6 +152,10 @@ export default {
|
|
|
152
152
|
return getters.all(type);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
if (getters['havePage'](type)) {
|
|
156
|
+
return getters.all(type);
|
|
157
|
+
}
|
|
158
|
+
|
|
155
159
|
// Does the store have all and we can pretend like it contains a result of a labelSelector?
|
|
156
160
|
if (getters['haveAll'](type)) {
|
|
157
161
|
return getters.matching( type, selector, namespace );
|