@rancher/shell 3.0.2-rc.5 → 3.0.2
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/images/providers/nutanix.svg +12 -1
- package/assets/styles/base/_basic.scss +2 -1
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_variables.scss +2 -0
- package/assets/styles/global/_labeled-input.scss +5 -13
- package/assets/styles/global/_layout.scss +4 -1
- package/assets/styles/global/_select.scss +5 -0
- package/assets/styles/themes/_dark.scss +1 -3
- package/assets/styles/themes/_light.scss +5 -1
- package/assets/translations/en-us.yaml +130 -23
- package/assets/translations/zh-hans.yaml +0 -3
- package/cloud-credential/azure.vue +1 -1
- package/components/ActionMenuShell.vue +105 -0
- package/components/AppModal.vue +2 -2
- package/components/AsyncButton.vue +2 -0
- package/components/ButtonGroup.vue +9 -2
- package/components/ClusterBadge.vue +1 -0
- package/components/ClusterIconMenu.vue +3 -0
- package/components/ClusterProviderIcon.vue +14 -1
- package/components/CodeMirror.vue +96 -5
- package/components/Collapse.vue +16 -3
- package/components/CruResource.vue +9 -0
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerMembers.vue +2 -1
- package/components/FixedBanner.vue +19 -12
- package/components/Import.vue +14 -1
- package/components/LandingPagePreference.vue +4 -2
- package/components/PodSecurityAdmission.vue +8 -6
- package/components/PromptChangePassword.vue +1 -0
- package/components/PromptRemove.vue +23 -21
- package/components/ResourceDetail/Masthead.vue +30 -11
- package/components/ResourceDetail/__tests__/Masthead.test.ts +61 -0
- package/components/ResourceDetail/index.vue +6 -0
- package/components/ResourceTable.vue +6 -1
- package/components/ResourceYaml.vue +1 -0
- package/components/Setting.vue +115 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +7 -12
- package/components/StatusBadge.vue +71 -0
- package/components/Tabbed/index.vue +16 -15
- package/components/Wizard.vue +108 -104
- package/components/YamlEditor.vue +12 -2
- package/components/__tests__/Collapse.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/auth/Principal.vue +29 -17
- package/components/auth/__tests__/Principal.test.ts +40 -0
- package/components/auth/login/ldap.vue +7 -0
- package/components/fleet/FleetBundles.vue +1 -1
- package/components/fleet/FleetRepos.vue +1 -1
- package/components/fleet/FleetResources.vue +0 -2
- package/components/fleet/FleetSummary.vue +60 -65
- package/components/fleet/ForceDirectedTreeChart/index.vue +5 -1
- package/components/fleet/__tests__/FleetSummary.test.ts +49 -9
- package/components/form/ArrayList.vue +6 -2
- package/components/form/ColorInput.vue +1 -0
- package/components/form/KeyValue.vue +11 -12
- package/components/form/LabeledSelect.vue +15 -3
- package/components/form/Labels.vue +8 -1
- package/components/form/Members/MembershipEditor.vue +230 -222
- package/components/form/Members/__tests__/MembershipEditor.test.ts +62 -0
- package/components/form/Password.vue +3 -0
- package/components/form/ProjectMemberEditor.vue +6 -3
- package/components/form/ResourceTabs/index.vue +15 -13
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +5 -4
- package/components/form/SchedulingCustomization.vue +85 -0
- package/components/form/Select.vue +3 -2
- package/components/form/SelectOrCreateAuthSecret.vue +2 -1
- package/components/form/UnitInput.vue +3 -4
- package/components/form/__tests__/ArrayList.test.ts +9 -6
- package/components/form/__tests__/LabeledSelect.test.ts +37 -0
- package/components/form/__tests__/SelectOrCreateAuthSecret.test.ts +34 -0
- package/components/form/__tests__/UnitInput.test.ts +4 -5
- package/components/formatter/LiveDate.vue +3 -1
- package/components/formatter/ServiceType.vue +12 -4
- package/components/formatter/WorkloadHealthScale.vue +2 -1
- package/components/nav/Header.vue +35 -2
- package/components/nav/HeaderPageActionMenu.vue +11 -40
- package/components/nav/Jump.vue +8 -2
- package/components/nav/NamespaceFilter.vue +5 -4
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.helper.ts +5 -5
- package/components/nav/TopLevelMenu.vue +1 -12
- package/components/nav/WindowManager/ContainerLogs.vue +96 -58
- package/components/nav/WindowManager/ContainerShell.vue +99 -18
- package/components/nav/WindowManager/index.vue +74 -6
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/components/templates/default.vue +2 -47
- package/config/features.js +1 -0
- package/config/labels-annotations.js +11 -1
- package/config/router/navigation-guards/index.js +2 -1
- package/config/router/navigation-guards/record-last-route.js +24 -0
- package/config/settings.ts +66 -98
- package/config/version.js +1 -1
- package/core/types-provisioning.ts +7 -0
- package/detail/fleet.cattle.io.bundle.vue +7 -0
- package/detail/fleet.cattle.io.cluster.vue +0 -3
- package/detail/fleet.cattle.io.gitrepo.vue +8 -15
- package/detail/provisioning.cattle.io.cluster.vue +8 -2
- package/dialog/DeactivateDriverDialog.vue +5 -5
- package/dialog/GitRepoForceUpdateDialog.vue +132 -0
- package/directives/strip-html-aria-label.js +19 -0
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +87 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +217 -37
- package/edit/auth/__tests__/oidc.test.ts +60 -12
- package/edit/auth/ldap/__tests__/config.test.ts +40 -0
- package/edit/auth/ldap/config.vue +67 -89
- package/edit/auth/oidc.vue +16 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +12 -8
- package/edit/cis.cattle.io.clusterscan.vue +13 -1
- package/edit/fleet.cattle.io.gitrepo.vue +198 -72
- package/edit/logging-flow/Match.vue +0 -21
- package/edit/management.cattle.io.project.vue +1 -1
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +10 -3
- package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +5 -1
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +5 -2
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +8 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -2
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +55 -15
- package/edit/provisioning.cattle.io.cluster/index.vue +28 -30
- package/edit/provisioning.cattle.io.cluster/rke2.vue +64 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +37 -2
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +3 -2
- package/edit/resources.cattle.io.backup.vue +150 -15
- package/edit/secret/__tests__/ssh.test.ts +79 -0
- package/edit/secret/ssh.vue +7 -1
- package/edit/service.vue +0 -3
- package/edit/workload/Job.vue +8 -8
- package/edit/workload/__tests__/Job.test.ts +0 -1
- package/edit/workload/index.vue +3 -1
- package/initialize/install-directives.js +2 -0
- package/initialize/install-plugins.js +6 -1
- package/list/catalog.cattle.io.app.vue +21 -4
- package/list/fleet.cattle.io.bundle.vue +1 -1
- package/list/management.cattle.io.setting.vue +34 -132
- package/list/provisioning.cattle.io.cluster.vue +11 -3
- package/machine-config/vmwarevsphere.vue +15 -8
- package/mixins/__tests__/auth-config.test.ts +74 -0
- package/mixins/__tests__/chart.test.ts +5 -4
- package/mixins/__tests__/create-edit-view.test.ts +38 -0
- package/mixins/auth-config.js +8 -0
- package/mixins/chart.js +2 -2
- package/mixins/create-edit-view/impl.js +4 -1
- package/mixins/vue-select-overrides.js +10 -0
- package/models/__tests__/catalog.cattle.io.app.test.ts +148 -0
- package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +157 -0
- package/models/__tests__/secret.test.ts +56 -13
- package/models/catalog.cattle.io.app.js +112 -37
- package/models/cluster.js +11 -0
- package/models/fleet.cattle.io.bundle.js +40 -2
- package/models/fleet.cattle.io.gitrepo.js +169 -109
- package/models/management.cattle.io.fleetworkspace.js +4 -0
- package/models/management.cattle.io.kontainerdriver.js +7 -0
- package/models/nodedriver.js +4 -1
- package/models/provisioning.cattle.io.cluster.js +24 -0
- package/models/secret.js +1 -1
- package/package.json +5 -5
- package/pages/auth/login.vue +5 -11
- package/pages/auth/verify.vue +11 -1
- package/pages/c/_cluster/apps/charts/index.vue +6 -4
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/explorer/ConfigBadge.vue +3 -5
- package/pages/c/_cluster/explorer/EventsTable.vue +3 -2
- package/pages/c/_cluster/explorer/__tests__/index.test.ts +9 -9
- package/pages/c/_cluster/explorer/index.vue +33 -35
- package/pages/c/_cluster/explorer/tools/index.vue +3 -3
- package/pages/c/_cluster/fleet/index.vue +0 -5
- package/pages/c/_cluster/legacy/project/index.vue +1 -1
- package/pages/c/_cluster/settings/performance.vue +52 -53
- package/pages/c/_cluster/uiplugins/index.vue +19 -22
- package/pages/home.vue +17 -12
- package/pages/prefs.vue +5 -1
- package/plugins/shortkey.js +10 -1
- package/plugins/steve/steve-pagination-utils.ts +58 -8
- package/promptRemove/management.cattle.io.fleetworkspace.vue +98 -0
- package/promptRemove/management.cattle.io.globalrole.vue +1 -1
- package/promptRemove/management.cattle.io.project.vue +2 -8
- package/promptRemove/management.cattle.io.roletemplate.vue +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +1 -7
- package/promptRemove/pod.vue +7 -28
- package/rancher-components/Card/Card.vue +9 -1
- package/rancher-components/Form/Checkbox/Checkbox.vue +42 -6
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +30 -3
- package/rancher-components/Form/Radio/RadioButton.vue +18 -3
- package/rancher-components/Form/Radio/RadioGroup.vue +39 -5
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +13 -1
- package/rancher-components/RcButton/RcButton.test.ts +97 -0
- package/rancher-components/RcButton/RcButton.vue +14 -9
- package/rancher-components/RcDropdown/RcDropdown.vue +3 -1
- package/rancher-components/RcDropdown/RcDropdownItem.vue +8 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +66 -0
- package/rancher-components/RcDropdown/index.ts +1 -0
- package/rancher-components/RcDropdown/types.ts +27 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +5 -2
- package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +2 -2
- package/scripts/typegen.sh +1 -0
- package/store/__tests__/auth.test.ts +120 -0
- package/store/action-menu.js +13 -3
- package/store/auth.js +14 -9
- package/store/aws.js +9 -2
- package/store/catalog.js +14 -7
- package/store/features.js +1 -0
- package/store/prefs.js +9 -28
- package/store/type-map.utils.ts +4 -0
- package/types/resources/settings.d.ts +27 -20
- package/types/shell/index.d.ts +18 -12
- package/utils/__tests__/array.test.ts +13 -1
- package/utils/__tests__/string.test.ts +80 -1
- package/utils/array.ts +13 -0
- package/utils/auth.js +4 -0
- package/utils/banners.js +0 -45
- package/utils/cluster.js +1 -1
- package/{edit/monitoring.coreos.com.prometheusrule → utils}/duration.js +5 -3
- package/utils/object.js +0 -3
- package/utils/pagination-utils.ts +15 -2
- package/utils/string.js +31 -7
- package/utils/validators/formRules/__tests__/index.test.ts +27 -0
- package/utils/validators/formRules/index.ts +16 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +0 -198
|
@@ -20,14 +20,12 @@ import AwsComplianceBanner from '@shell/components/AwsComplianceBanner';
|
|
|
20
20
|
import AzureWarning from '@shell/components/auth/AzureWarning';
|
|
21
21
|
import DraggableZone from '@shell/components/DraggableZone';
|
|
22
22
|
import { MANAGEMENT } from '@shell/config/types';
|
|
23
|
-
import isEqual from 'lodash/isEqual';
|
|
24
23
|
import { markSeenReleaseNotes } from '@shell/utils/version';
|
|
25
24
|
import PageHeaderActions from '@shell/mixins/page-actions';
|
|
26
25
|
import BrowserTabVisibility from '@shell/mixins/browser-tab-visibility';
|
|
27
26
|
import { getClusterFromRoute, getProductFromRoute } from '@shell/utils/router';
|
|
28
27
|
import { BOTTOM } from '@shell/utils/position';
|
|
29
28
|
import SideNav from '@shell/components/SideNav';
|
|
30
|
-
import { BLANK_CLUSTER } from '@shell/store/store-types.js';
|
|
31
29
|
|
|
32
30
|
const SET_LOGIN_ACTION = 'set-as-login';
|
|
33
31
|
|
|
@@ -85,8 +83,8 @@ export default {
|
|
|
85
83
|
|
|
86
84
|
if (canSetAsHome) {
|
|
87
85
|
pageActions.push({
|
|
88
|
-
|
|
89
|
-
action:
|
|
86
|
+
label: this.t('nav.header.setLoginPage'),
|
|
87
|
+
action: SET_LOGIN_ACTION
|
|
90
88
|
});
|
|
91
89
|
}
|
|
92
90
|
|
|
@@ -115,35 +113,6 @@ export default {
|
|
|
115
113
|
|
|
116
114
|
},
|
|
117
115
|
|
|
118
|
-
watch: {
|
|
119
|
-
clusterId(a, b) {
|
|
120
|
-
if ( !isEqual(a, b) ) {
|
|
121
|
-
// Store the last visited route when the cluster changes
|
|
122
|
-
this.setClusterAsLastRoute();
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
async currentProduct(a, b) {
|
|
127
|
-
if ( !isEqual(a, b) ) {
|
|
128
|
-
if ((a.inStore !== b.inStore || a.inStore !== 'cluster') && this.clusterId && a.name) {
|
|
129
|
-
const route = {
|
|
130
|
-
name: 'c-cluster-product',
|
|
131
|
-
params: {
|
|
132
|
-
cluster: this.clusterId,
|
|
133
|
-
product: a.name,
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
await this.$store.dispatch('prefs/setLastVisited', route);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
async created() {
|
|
144
|
-
await this.$store.dispatch('prefs/setLastVisited', this.$route);
|
|
145
|
-
},
|
|
146
|
-
|
|
147
116
|
mounted() {
|
|
148
117
|
this.wmPin = window.localStorage.getItem('wm-pin') || BOTTOM;
|
|
149
118
|
|
|
@@ -159,20 +128,6 @@ export default {
|
|
|
159
128
|
},
|
|
160
129
|
|
|
161
130
|
methods: {
|
|
162
|
-
async setClusterAsLastRoute() {
|
|
163
|
-
if (!this.clusterId || this.clusterId === BLANK_CLUSTER) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
const route = {
|
|
167
|
-
name: this.$route.name,
|
|
168
|
-
params: {
|
|
169
|
-
...this.$route.params,
|
|
170
|
-
cluster: this.clusterId,
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
await this.$store.dispatch('prefs/setLastVisited', route);
|
|
175
|
-
},
|
|
176
131
|
|
|
177
132
|
handlePageAction(action) {
|
|
178
133
|
if (action.action === SET_LOGIN_ACTION) {
|
package/config/features.js
CHANGED
|
@@ -16,6 +16,7 @@ export const RESOURCE_QUOTA = 'field.cattle.io/resourceQuota';
|
|
|
16
16
|
export const AZURE_MIGRATED = 'auth.cattle.io/azuread-endpoint-migrated';
|
|
17
17
|
export const WORKSPACE_ANNOTATION = 'objectset.rio.cattle.io/id';
|
|
18
18
|
export const NODE_ARCHITECTURE = 'kubernetes.io/arch';
|
|
19
|
+
export const IMPORTED_CLUSTER_VERSION_MANAGEMENT = 'rancher.io/imported-cluster-version-management';
|
|
19
20
|
|
|
20
21
|
export const KUBERNETES = {
|
|
21
22
|
SERVICE_ACCOUNT_UID: 'kubernetes.io/service-account.uid',
|
|
@@ -55,6 +56,12 @@ export const CAPI = {
|
|
|
55
56
|
MACHINE_NAME: 'cluster.x-k8s.io/machine',
|
|
56
57
|
DELETE_MACHINE: 'cluster.x-k8s.io/delete-machine',
|
|
57
58
|
PROVIDER: 'provider.cattle.io',
|
|
59
|
+
/**
|
|
60
|
+
* RKE2 - metadata.name is human name
|
|
61
|
+
* RKE1 and some others - metadata.name is v1 mgmt id and it's the v1 mgmt cluster that contains human name
|
|
62
|
+
* This label ensures something is in the v1 prov cluster that can be sorted/filtered on
|
|
63
|
+
*/
|
|
64
|
+
HUMAN_NAME: 'provisioning.cattle.io/management-cluster-display-name',
|
|
58
65
|
SECRET_AUTH: 'v2prov-secret-authorized-for-cluster',
|
|
59
66
|
SECRET_WILL_DELETE: 'v2prov-authorized-secret-deletes-on-cluster-removal',
|
|
60
67
|
/**
|
|
@@ -109,6 +116,7 @@ export const CATALOG = {
|
|
|
109
116
|
};
|
|
110
117
|
|
|
111
118
|
export const FLEET = {
|
|
119
|
+
REPO_NAME: 'fleet.cattle.io/repo-name',
|
|
112
120
|
CLUSTER_DISPLAY_NAME: 'management.cattle.io/cluster-display-name',
|
|
113
121
|
CLUSTER_NAME: 'management.cattle.io/cluster-name',
|
|
114
122
|
BUNDLE_ID: 'fleet.cattle.io/bundle-id',
|
|
@@ -116,7 +124,9 @@ export const FLEET = {
|
|
|
116
124
|
BUNDLE_NAMESPACE: 'fleet.cattle.io/bundle-namespace',
|
|
117
125
|
MANAGED: 'fleet.cattle.io/managed',
|
|
118
126
|
CLUSTER_NAMESPACE: 'fleet.cattle.io/cluster-namespace',
|
|
119
|
-
CLUSTER: 'fleet.cattle.io/cluster'
|
|
127
|
+
CLUSTER: 'fleet.cattle.io/cluster',
|
|
128
|
+
CREATED_BY_USER_ID: 'fleet.cattle.io/created-by-user-id',
|
|
129
|
+
CREATED_BY_USER_NAME: 'fleet.cattle.io/created-by-display-name',
|
|
120
130
|
};
|
|
121
131
|
|
|
122
132
|
export const RBAC = { PRODUCT: 'management.cattle.io/ui-product' };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { install as installLoadInitialSettings } from '@shell/config/router/navigation-guards/load-initial-settings';
|
|
2
|
+
import { install as installRecordLastRoute } from '@shell/config/router/navigation-guards/record-last-route';
|
|
2
3
|
import { install as installAttemptFirstLogin } from '@shell/config/router/navigation-guards/attempt-first-login';
|
|
3
4
|
import { install as installAuthentication } from '@shell/config/router/navigation-guards/authentication';
|
|
4
5
|
import { install as installRuntimeExtensionRoute } from '@shell/config/router/navigation-guards/runtime-extension-route';
|
|
@@ -16,7 +17,7 @@ export function installNavigationGuards(router, context) {
|
|
|
16
17
|
// NOTE: the order of the installation matters.
|
|
17
18
|
// Be intentional when adding, removing or modifying the guards that are installed.
|
|
18
19
|
|
|
19
|
-
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installProducts, installClusters, installRuntimeExtensionRoute, installI18N, installHandleInstallRedirect, installPageTitle, installServerUpgradeGrowl];
|
|
20
|
+
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installProducts, installClusters, installRuntimeExtensionRoute, installI18N, installHandleInstallRedirect, installPageTitle, installRecordLastRoute, installServerUpgradeGrowl];
|
|
20
21
|
|
|
21
22
|
navigationGuardInstallers.forEach((installer) => installer(router, context));
|
|
22
23
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function install(router, context) {
|
|
2
|
+
router.beforeEach(async(to, from, next) => await recordLastRoute(to, from, next, context));
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export async function recordLastRoute(to, from, next, { store }) {
|
|
6
|
+
try {
|
|
7
|
+
// - We don't want to record for auth because these handle logging in and logging out
|
|
8
|
+
// - We don't want to record for index or home because these are the default pages on login and they handle the redirect given the route recorded here.
|
|
9
|
+
// If we record then we never actually redirect outside of the home page
|
|
10
|
+
if (to && !to.name.includes('auth') && to.name !== 'home' && to.name !== 'index') {
|
|
11
|
+
const route = {
|
|
12
|
+
name: to.name,
|
|
13
|
+
params: to.params,
|
|
14
|
+
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
store.dispatch('prefs/setLastVisited', route);
|
|
18
|
+
}
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.error('Failed record last route', e); // eslint-disable-line no-console
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
next();
|
|
24
|
+
}
|
package/config/settings.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
// Settings
|
|
2
2
|
import { GC_DEFAULTS, GC_PREFERENCES } from '@shell/utils/gc/gc-types';
|
|
3
3
|
import { PaginationSettings } from '@shell/types/resources/settings';
|
|
4
|
-
import {
|
|
5
|
-
CAPI, MANAGEMENT, EVENT, CATALOG, HPA, INGRESS, SERVICE,
|
|
6
|
-
CONFIG_MAP,
|
|
7
|
-
SECRET,
|
|
8
|
-
POD, NODE,
|
|
9
|
-
STORAGE_CLASS,
|
|
10
|
-
PVC,
|
|
11
|
-
PV,
|
|
12
|
-
WORKLOAD_TYPES
|
|
13
|
-
} from '@shell/config/types';
|
|
14
4
|
|
|
15
5
|
interface GlobalSettingRuleset {
|
|
16
6
|
name: string,
|
|
@@ -51,73 +41,76 @@ export const SETTING = {
|
|
|
51
41
|
CA_CERTS: 'cacerts',
|
|
52
42
|
|
|
53
43
|
// Allow the local cluster to be hidden
|
|
54
|
-
HIDE_LOCAL_CLUSTER:
|
|
55
|
-
AUTH_TOKEN_MAX_TTL_MINUTES:
|
|
56
|
-
KUBECONFIG_GENERATE_TOKEN:
|
|
57
|
-
KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES:
|
|
58
|
-
ENGINE_URL:
|
|
59
|
-
ENGINE_ISO_URL:
|
|
60
|
-
FIRST_LOGIN:
|
|
61
|
-
INGRESS_IP_DOMAIN:
|
|
62
|
-
SERVER_URL:
|
|
63
|
-
RKE_METADATA_CONFIG:
|
|
64
|
-
EULA_AGREED:
|
|
65
|
-
AUTH_USER_INFO_MAX_AGE_SECONDS:
|
|
66
|
-
AUTH_USER_SESSION_TTL_MINUTES:
|
|
67
|
-
AUTH_USER_INFO_RESYNC_CRON:
|
|
68
|
-
AUTH_LOCAL_VALIDATE_DESC:
|
|
69
|
-
PASSWORD_MIN_LENGTH:
|
|
70
|
-
CLUSTER_TEMPLATE_ENFORCEMENT:
|
|
71
|
-
UI_INDEX:
|
|
72
|
-
UI_DASHBOARD_INDEX:
|
|
73
|
-
UI_DASHBOARD_HARVESTER_LEGACY_PLUGIN:
|
|
74
|
-
UI_OFFLINE_PREFERRED:
|
|
75
|
-
SYSTEM_DEFAULT_REGISTRY:
|
|
76
|
-
UI_ISSUES:
|
|
77
|
-
PL:
|
|
78
|
-
PL_RANCHER_VALUE:
|
|
79
|
-
SUPPORTED:
|
|
80
|
-
BANNERS:
|
|
81
|
-
ISSUES:
|
|
82
|
-
BRAND:
|
|
83
|
-
LOGO_LIGHT:
|
|
84
|
-
LOGO_DARK:
|
|
85
|
-
BANNER_LIGHT:
|
|
86
|
-
BANNER_DARK:
|
|
87
|
-
LOGIN_BACKGROUND_LIGHT:
|
|
88
|
-
LOGIN_BACKGROUND_DARK:
|
|
89
|
-
PRIMARY_COLOR:
|
|
90
|
-
LINK_COLOR:
|
|
91
|
-
COMMUNITY_LINKS:
|
|
92
|
-
FAVICON:
|
|
93
|
-
UI_PERFORMANCE:
|
|
94
|
-
UI_CUSTOM_LINKS:
|
|
95
|
-
UI_SUPPORTED_K8S_VERSIONS:
|
|
44
|
+
HIDE_LOCAL_CLUSTER: 'hide-local-cluster',
|
|
45
|
+
AUTH_TOKEN_MAX_TTL_MINUTES: 'auth-token-max-ttl-minutes',
|
|
46
|
+
KUBECONFIG_GENERATE_TOKEN: 'kubeconfig-generate-token',
|
|
47
|
+
KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES: 'kubeconfig-default-token-ttl-minutes',
|
|
48
|
+
ENGINE_URL: 'engine-install-url',
|
|
49
|
+
ENGINE_ISO_URL: 'engine-iso-url',
|
|
50
|
+
FIRST_LOGIN: 'first-login',
|
|
51
|
+
INGRESS_IP_DOMAIN: 'ingress-ip-domain',
|
|
52
|
+
SERVER_URL: 'server-url',
|
|
53
|
+
RKE_METADATA_CONFIG: 'rke-metadata-config',
|
|
54
|
+
EULA_AGREED: 'eula-agreed',
|
|
55
|
+
AUTH_USER_INFO_MAX_AGE_SECONDS: 'auth-user-info-max-age-seconds',
|
|
56
|
+
AUTH_USER_SESSION_TTL_MINUTES: 'auth-user-session-ttl-minutes',
|
|
57
|
+
AUTH_USER_INFO_RESYNC_CRON: 'auth-user-info-resync-cron',
|
|
58
|
+
AUTH_LOCAL_VALIDATE_DESC: 'auth-password-requirements-description',
|
|
59
|
+
PASSWORD_MIN_LENGTH: 'password-min-length', // CATTLE_PASSWORD_MIN_LENGTH
|
|
60
|
+
CLUSTER_TEMPLATE_ENFORCEMENT: 'cluster-template-enforcement',
|
|
61
|
+
UI_INDEX: 'ui-index',
|
|
62
|
+
UI_DASHBOARD_INDEX: 'ui-dashboard-index',
|
|
63
|
+
UI_DASHBOARD_HARVESTER_LEGACY_PLUGIN: 'ui-dashboard-harvester-legacy-plugin',
|
|
64
|
+
UI_OFFLINE_PREFERRED: 'ui-offline-preferred',
|
|
65
|
+
SYSTEM_DEFAULT_REGISTRY: 'system-default-registry',
|
|
66
|
+
UI_ISSUES: 'ui-issues',
|
|
67
|
+
PL: 'ui-pl',
|
|
68
|
+
PL_RANCHER_VALUE: 'rancher',
|
|
69
|
+
SUPPORTED: 'has-support',
|
|
70
|
+
BANNERS: 'ui-banners',
|
|
71
|
+
ISSUES: 'ui-issues',
|
|
72
|
+
BRAND: 'ui-brand',
|
|
73
|
+
LOGO_LIGHT: 'ui-logo-light',
|
|
74
|
+
LOGO_DARK: 'ui-logo-dark',
|
|
75
|
+
BANNER_LIGHT: 'ui-banner-light',
|
|
76
|
+
BANNER_DARK: 'ui-banner-dark',
|
|
77
|
+
LOGIN_BACKGROUND_LIGHT: 'ui-login-background-light',
|
|
78
|
+
LOGIN_BACKGROUND_DARK: 'ui-login-background-dark',
|
|
79
|
+
PRIMARY_COLOR: 'ui-primary-color',
|
|
80
|
+
LINK_COLOR: 'ui-link-color',
|
|
81
|
+
COMMUNITY_LINKS: 'ui-community-links',
|
|
82
|
+
FAVICON: 'ui-favicon',
|
|
83
|
+
UI_PERFORMANCE: 'ui-performance',
|
|
84
|
+
UI_CUSTOM_LINKS: 'ui-custom-links',
|
|
85
|
+
UI_SUPPORTED_K8S_VERSIONS: 'ui-k8s-supported-versions-range',
|
|
96
86
|
/**
|
|
97
87
|
* Allow the backend to force a light/dark theme. Used in non-rancher world and results in the theme used
|
|
98
88
|
* both pre and post log in. If not present defaults to the usual process
|
|
99
89
|
*/
|
|
100
|
-
THEME:
|
|
101
|
-
SYSTEM_NAMESPACES:
|
|
90
|
+
THEME: 'ui-theme',
|
|
91
|
+
SYSTEM_NAMESPACES: 'system-namespaces',
|
|
102
92
|
/**
|
|
103
93
|
* Cluster Agent configuration
|
|
104
94
|
*/
|
|
105
|
-
CLUSTER_AGENT_DEFAULT_AFFINITY:
|
|
106
|
-
FLEET_AGENT_DEFAULT_AFFINITY:
|
|
95
|
+
CLUSTER_AGENT_DEFAULT_AFFINITY: 'cluster-agent-default-affinity',
|
|
96
|
+
FLEET_AGENT_DEFAULT_AFFINITY: 'fleet-agent-default-affinity',
|
|
107
97
|
/**
|
|
108
98
|
* manage rancher repositories in extensions (official, partners repos)
|
|
109
99
|
*/
|
|
110
|
-
ADD_EXTENSION_REPOS_BANNER_DISPLAY:
|
|
111
|
-
AGENT_TLS_MODE:
|
|
100
|
+
ADD_EXTENSION_REPOS_BANNER_DISPLAY: 'display-add-extension-repos-banner',
|
|
101
|
+
AGENT_TLS_MODE: 'agent-tls-mode',
|
|
112
102
|
/**
|
|
113
103
|
* User retention settings
|
|
114
104
|
*/
|
|
115
|
-
USER_RETENTION_CRON:
|
|
116
|
-
USER_RETENTION_DRY_RUN:
|
|
117
|
-
USER_LAST_LOGIN_DEFAULT:
|
|
118
|
-
DISABLE_INACTIVE_USER_AFTER:
|
|
119
|
-
DELETE_INACTIVE_USER_AFTER:
|
|
120
|
-
K3S_UPGRADER_UNINSTALL_CONCURRENCY:
|
|
105
|
+
USER_RETENTION_CRON: 'user-retention-cron',
|
|
106
|
+
USER_RETENTION_DRY_RUN: 'user-retention-dry-run',
|
|
107
|
+
USER_LAST_LOGIN_DEFAULT: 'user-last-login-default',
|
|
108
|
+
DISABLE_INACTIVE_USER_AFTER: 'disable-inactive-user-after',
|
|
109
|
+
DELETE_INACTIVE_USER_AFTER: 'delete-inactive-user-after',
|
|
110
|
+
K3S_UPGRADER_UNINSTALL_CONCURRENCY: 'k3s-based-upgrader-uninstall-concurrency',
|
|
111
|
+
IMPORTED_CLUSTER_VERSION_MANAGEMENT: 'imported-cluster-version-management',
|
|
112
|
+
CLUSTER_AGENT_DEFAULT_PRIORITY_CLASS: 'cluster-agent-default-priority-class',
|
|
113
|
+
CLUSTER_AGENT_DEFAULT_POD_DISTRIBUTION_BUDGET: 'cluster-agent-default-pod-disruption-budget'
|
|
121
114
|
} as const;
|
|
122
115
|
|
|
123
116
|
// These are the settings that are allowed to be edited via the UI
|
|
@@ -174,9 +167,14 @@ export const ALLOWED_SETTINGS: GlobalSetting = {
|
|
|
174
167
|
[SETTING.K3S_UPGRADER_UNINSTALL_CONCURRENCY]: {
|
|
175
168
|
kind: 'integer',
|
|
176
169
|
ruleSet: [{ name: 'minValue', factoryArg: 1 }]
|
|
177
|
-
}
|
|
170
|
+
},
|
|
171
|
+
[SETTING.IMPORTED_CLUSTER_VERSION_MANAGEMENT]: { kind: 'boolean' },
|
|
172
|
+
[SETTING.CLUSTER_AGENT_DEFAULT_PRIORITY_CLASS]: { kind: 'json' },
|
|
173
|
+
[SETTING.CLUSTER_AGENT_DEFAULT_POD_DISTRIBUTION_BUDGET]: { kind: 'json' }
|
|
174
|
+
|
|
178
175
|
};
|
|
179
176
|
|
|
177
|
+
export const PROVISIONING_SETTINGS = ['engine-iso-url', 'engine-install-url', 'imported-cluster-version-management', 'cluster-agent-default-priority-class', 'cluster-agent-default-pod-disruption-budget'];
|
|
180
178
|
/**
|
|
181
179
|
* Settings on how to handle warnings returning in api responses, specifically which to show as growls
|
|
182
180
|
*/
|
|
@@ -253,38 +251,8 @@ export const DEFAULT_PERF_SETTING: PerfSettings = {
|
|
|
253
251
|
}
|
|
254
252
|
},
|
|
255
253
|
serverPagination: {
|
|
256
|
-
enabled:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
resources: {
|
|
260
|
-
enableAll: false,
|
|
261
|
-
enableSome: {
|
|
262
|
-
// if a resource list is shown by a custom resource list component or has specific list headers then it's not generically shown
|
|
263
|
-
// and must be included here.
|
|
264
|
-
enabled: [
|
|
265
|
-
NODE, EVENT,
|
|
266
|
-
WORKLOAD_TYPES.CRON_JOB, WORKLOAD_TYPES.DAEMON_SET, WORKLOAD_TYPES.DEPLOYMENT, WORKLOAD_TYPES.JOB, WORKLOAD_TYPES.STATEFUL_SET, POD,
|
|
267
|
-
CATALOG.APP, CATALOG.CLUSTER_REPO, CATALOG.OPERATION,
|
|
268
|
-
HPA, INGRESS, SERVICE,
|
|
269
|
-
PV, CONFIG_MAP, STORAGE_CLASS, PVC, SECRET,
|
|
270
|
-
WORKLOAD_TYPES.REPLICA_SET, WORKLOAD_TYPES.REPLICATION_CONTROLLER
|
|
271
|
-
],
|
|
272
|
-
generic: true,
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
management: {
|
|
277
|
-
resources: {
|
|
278
|
-
enableAll: false,
|
|
279
|
-
enableSome: {
|
|
280
|
-
enabled: [
|
|
281
|
-
{ resource: CAPI.RANCHER_CLUSTER, context: ['home', 'side-bar'] },
|
|
282
|
-
{ resource: MANAGEMENT.CLUSTER, context: ['side-bar'] },
|
|
283
|
-
],
|
|
284
|
-
generic: false,
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
254
|
+
enabled: false,
|
|
255
|
+
useDefaultStores: true,
|
|
256
|
+
stores: undefined,
|
|
289
257
|
}
|
|
290
258
|
};
|
package/config/version.js
CHANGED
|
@@ -150,6 +150,13 @@ export interface IClusterProvisioner {
|
|
|
150
150
|
* Text to show top right on the cluster provider card. For example `Experimental`
|
|
151
151
|
*/
|
|
152
152
|
tag?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Hide the provider card in the cluster creation flow.
|
|
155
|
+
* By default we show providers in create wizard, however, there are some providers we want to only show on import.
|
|
156
|
+
* For that case, we should set hideCreate to true and showImport to true.
|
|
157
|
+
* If not set, the card will be shown in the cluster creation page
|
|
158
|
+
*/
|
|
159
|
+
hideCreate?: boolean
|
|
153
160
|
|
|
154
161
|
/**
|
|
155
162
|
* Also show the provider card in the cluster importing flow
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import { MANAGEMENT } from '@shell/config/types';
|
|
2
3
|
import FleetBundleResources from '@shell/components/fleet/FleetBundleResources.vue';
|
|
3
4
|
import FleetUtils from '@shell/utils/fleet';
|
|
4
5
|
|
|
@@ -13,6 +14,12 @@ export default {
|
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
|
|
17
|
+
async fetch() {
|
|
18
|
+
if (this.value.authorId && this.$store.getters['management/schemaFor'](MANAGEMENT.USER)) {
|
|
19
|
+
await this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.USER }, { root: true });
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
|
|
16
23
|
computed: {
|
|
17
24
|
bundleResources() {
|
|
18
25
|
return FleetUtils.resourcesFromBundleStatus(this.value?.status);
|
|
@@ -5,10 +5,9 @@ import FleetSummary from '@shell/components/fleet/FleetSummary';
|
|
|
5
5
|
import { Banner } from '@components/Banner';
|
|
6
6
|
import FleetResources from '@shell/components/fleet/FleetResources';
|
|
7
7
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
8
|
-
import { FLEET } from '@shell/config/types';
|
|
8
|
+
import { FLEET, MANAGEMENT } from '@shell/config/types';
|
|
9
9
|
import { isHarvesterCluster } from '@shell/utils/cluster';
|
|
10
10
|
import FleetBundles from '@shell/components/fleet/FleetBundles.vue';
|
|
11
|
-
import { resourceCounts } from '@shell/components/ResourceSummary.vue';
|
|
12
11
|
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
13
12
|
|
|
14
13
|
export default {
|
|
@@ -35,14 +34,13 @@ export default {
|
|
|
35
34
|
|
|
36
35
|
data() {
|
|
37
36
|
return {
|
|
38
|
-
allFleetClusters:
|
|
39
|
-
allBundles:
|
|
40
|
-
allBundleDeployments: [],
|
|
37
|
+
allFleetClusters: [],
|
|
38
|
+
allBundles: [],
|
|
41
39
|
};
|
|
42
40
|
},
|
|
43
41
|
computed: {
|
|
44
42
|
gitRepoHasClusters() {
|
|
45
|
-
return this.value.status
|
|
43
|
+
return this.value.status?.desiredReadyClusters;
|
|
46
44
|
},
|
|
47
45
|
clusterSchema() {
|
|
48
46
|
return this.$store.getters['management/schemaFor'](FLEET.CLUSTER);
|
|
@@ -58,9 +56,6 @@ export default {
|
|
|
58
56
|
|
|
59
57
|
return harvester;
|
|
60
58
|
},
|
|
61
|
-
bundleCounts() {
|
|
62
|
-
return resourceCounts(this.$store, FLEET.BUNDLE);
|
|
63
|
-
},
|
|
64
59
|
bundles() {
|
|
65
60
|
const harvester = this.harvesterClusters;
|
|
66
61
|
|
|
@@ -86,11 +81,6 @@ export default {
|
|
|
86
81
|
opt: { excludeFields: ['metadata.managedFields', 'spec.resources'] },
|
|
87
82
|
},
|
|
88
83
|
|
|
89
|
-
allBundleDeployments: {
|
|
90
|
-
inStoreType: 'management',
|
|
91
|
-
type: FLEET.BUNDLE_DEPLOYMENT
|
|
92
|
-
},
|
|
93
|
-
|
|
94
84
|
allFleetClusters: {
|
|
95
85
|
inStoreType: 'management',
|
|
96
86
|
type: FLEET.CLUSTER
|
|
@@ -101,7 +91,10 @@ export default {
|
|
|
101
91
|
}
|
|
102
92
|
}, this.$store);
|
|
103
93
|
|
|
104
|
-
this.
|
|
94
|
+
if (this.value.authorId && this.$store.getters['management/schemaFor'](MANAGEMENT.USER)) {
|
|
95
|
+
await this.$store.dispatch(`management/findAll`, { type: MANAGEMENT.USER }, { root: true });
|
|
96
|
+
}
|
|
97
|
+
|
|
105
98
|
this.allBundles = allDispatches.allBundles || [];
|
|
106
99
|
this.allFleetClusters = allDispatches.allFleetClusters || [];
|
|
107
100
|
},
|
|
@@ -745,6 +745,12 @@ export default {
|
|
|
745
745
|
color="error"
|
|
746
746
|
:label="$fetchState.error"
|
|
747
747
|
/>
|
|
748
|
+
|
|
749
|
+
<Banner
|
|
750
|
+
v-if="value.isRke1"
|
|
751
|
+
color="warning"
|
|
752
|
+
label-key="cluster.banner.rke1DeprecationMessage"
|
|
753
|
+
/>
|
|
748
754
|
<ResourceTabs
|
|
749
755
|
:value="value"
|
|
750
756
|
:default-tab="defaultTab"
|
|
@@ -766,11 +772,11 @@ export default {
|
|
|
766
772
|
:schema="machineSchema"
|
|
767
773
|
:headers="machineHeaders"
|
|
768
774
|
default-sort-by="name"
|
|
769
|
-
:groupable="false"
|
|
770
775
|
:group-by="value.isCustom ? null : 'poolId'"
|
|
771
776
|
group-ref="pool"
|
|
772
777
|
:group-sort="['pool.nameDisplay']"
|
|
773
778
|
:sort-generation-fn="machineSortGenerationFn"
|
|
779
|
+
:hide-grouping-controls="true"
|
|
774
780
|
>
|
|
775
781
|
<template #main-row:isFake="{fullColspan}">
|
|
776
782
|
<tr class="main-row">
|
|
@@ -853,11 +859,11 @@ export default {
|
|
|
853
859
|
:schema="mgmtNodeSchema"
|
|
854
860
|
:headers="mgmtNodeSchemaHeaders"
|
|
855
861
|
:rows="nodes"
|
|
856
|
-
:groupable="false"
|
|
857
862
|
:group-by="value.isCustom ? null : 'spec.nodePoolName'"
|
|
858
863
|
group-ref="pool"
|
|
859
864
|
:group-sort="['pool.nameDisplay']"
|
|
860
865
|
:sort-generation-fn="nodeSortGenerationFn"
|
|
866
|
+
:hide-grouping-controls="true"
|
|
861
867
|
>
|
|
862
868
|
<template #main-row:isFake="{fullColspan}">
|
|
863
869
|
<tr class="main-row">
|
|
@@ -31,15 +31,15 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
computed: {
|
|
33
33
|
formattedText() {
|
|
34
|
-
const namesSliced = this.drivers.map((obj) => obj.nameDisplay)
|
|
35
|
-
const
|
|
34
|
+
const namesSliced = this.drivers.map((obj) => obj.nameDisplay);
|
|
35
|
+
const count = namesSliced.length;
|
|
36
|
+
const remaining = namesSliced.length > 5 ? namesSliced.length - 5 : 0;
|
|
36
37
|
|
|
37
38
|
const plusMore = this.t('drivers.deactivate.andOthers', { count: remaining });
|
|
38
|
-
const names = resourceNames(namesSliced, plusMore,
|
|
39
|
-
const count = remaining || namesSliced.length;
|
|
39
|
+
const names = resourceNames(namesSliced, this.t, { plusMore, endString: false });
|
|
40
40
|
const warningDrivers = this.t('drivers.deactivate.warningDrivers', { names, count });
|
|
41
41
|
|
|
42
|
-
return this.t('drivers.deactivate.warning', { warningDrivers, count
|
|
42
|
+
return this.t('drivers.deactivate.warning', { warningDrivers, count });
|
|
43
43
|
},
|
|
44
44
|
...mapGetters({ t: 'i18n/t' }),
|
|
45
45
|
},
|