@rancher/shell 2.0.1 → 2.0.2-rc.1
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/translations/en-us.yaml +51 -26
- package/assets/translations/zh-hans.yaml +1 -0
- package/components/AssignTo.vue +2 -0
- package/components/Questions/index.vue +2 -2
- package/components/auth/RoleDetailEdit.vue +5 -4
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/ProjectMemberEditor.vue +1 -1
- package/components/form/ResourceLabeledSelect.vue +11 -3
- package/components/form/labeled-select-utils/labeled-select.utils.ts +1 -1
- package/config/pagination-table-headers.js +5 -4
- package/config/roles.ts +34 -19
- package/config/router/navigation-guards/attempt-first-login.js +1 -1
- package/config/router/navigation-guards/authentication.js +1 -1
- package/config/router/navigation-guards/i18n.js +1 -1
- package/config/router/navigation-guards/index.js +2 -1
- package/config/router/navigation-guards/load-initial-settings.js +1 -1
- package/config/router/navigation-guards/runtime-extension-route.js +31 -0
- package/config/router/routes.js +10 -1
- package/config/uiplugins.js +130 -61
- package/core/plugin.ts +5 -0
- package/core/plugins.js +7 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +86 -13
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +3 -134
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +209 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +8 -4
- package/edit/provisioning.cattle.io.cluster/rke2.vue +115 -17
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +50 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +29 -64
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +42 -3
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +22 -86
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +8 -2
- package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +61 -0
- package/initialize/entry-helpers.js +4 -21
- package/mixins/__tests__/chart.test.ts +4 -1
- package/mixins/chart.js +30 -14
- package/models/__tests__/apps.deployment.test.ts +93 -0
- package/models/apps.deployment.js +18 -4
- package/models/management.cattle.io.cluster.js +2 -2
- package/models/management.cattle.io.user.js +3 -3
- package/models/nodedriver.js +5 -0
- package/models/provisioning.cattle.io.cluster.js +4 -0
- package/package.json +1 -1
- package/pages/404.vue +15 -0
- package/pages/auth/login.vue +4 -1
- package/pages/auth/setup.vue +4 -1
- package/pages/c/_cluster/explorer/index.vue +5 -0
- package/pages/c/_cluster/manager/jwt.authentication/index.vue +10 -4
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -10
- package/pages/c/_cluster/uiplugins/index.vue +24 -16
- package/pages/home.vue +1 -13
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/getters.js +1 -1
- package/plugins/steve/__tests__/getters.test.ts +5 -5
- package/plugins/steve/getters.js +6 -4
- package/plugins/steve/hybrid-class.js +1 -5
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +1 -1
- package/scripts/publish-shell.sh +53 -55
- package/scripts/test-plugins-build.sh +45 -39
- package/shell/types/shell/index.d.ts +2 -0
- package/store/type-map.js +4 -2
- package/types/store/pagination.types.ts +1 -1
- package/utils/cluster.js +9 -0
- package/utils/settings.ts +3 -1
- package/creators/app/app.package.json +0 -14
- package/creators/app/files/.eslintignore +0 -16
- package/creators/app/files/.eslintrc.js +0 -173
- package/creators/app/files/.gitignore +0 -70
- package/creators/app/files/.gitlab-ci.yml +0 -14
- package/creators/app/files/.vscode/settings.json +0 -21
- package/creators/app/files/babel.config.js +0 -1
- package/creators/app/files/tsconfig.json +0 -42
- package/creators/app/files/vue.config.js +0 -6
- package/creators/app/init +0 -120
- package/creators/app/package.json +0 -25
- package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +0 -24
- package/creators/pkg/files/.github/workflows/build-extension-charts.yml +0 -22
- package/creators/pkg/files/babel.config.js +0 -1
- package/creators/pkg/files/index.ts +0 -14
- package/creators/pkg/files/tsconfig.json +0 -53
- package/creators/pkg/files/vue.config.js +0 -1
- package/creators/pkg/init +0 -286
- package/creators/pkg/package.json +0 -19
- package/creators/pkg/pkg.package.json +0 -21
- package/creators/pkg/vue-shim.ts +0 -4
- package/creators/update/init +0 -56
- package/creators/update/package.json +0 -20
- package/creators/update/upgrade +0 -56
- package/types/shell/index.d.ts +0 -4585
|
@@ -1186,17 +1186,39 @@ cluster:
|
|
|
1186
1186
|
banner: "Service Account access with JWT authentication can be configured after cluster creation from <br>
|
|
1187
1187
|
<code>Cluster Management > Advanced > JWT Authentication</code>"
|
|
1188
1188
|
addonChart:
|
|
1189
|
-
rancher-vsphere-cpi:
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
rke2-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
rke2-
|
|
1199
|
-
|
|
1189
|
+
rancher-vsphere-cpi:
|
|
1190
|
+
label: vSphere CPI
|
|
1191
|
+
configuration: vSphere CPI Configuration
|
|
1192
|
+
rancher-vsphere-csi:
|
|
1193
|
+
label: vSphere CSI
|
|
1194
|
+
configuration: vSphere CSI Configuration
|
|
1195
|
+
rke2-calico:
|
|
1196
|
+
label: Calico
|
|
1197
|
+
configuration: Calico Configuration
|
|
1198
|
+
rke2-calico-crd:
|
|
1199
|
+
label: Calico
|
|
1200
|
+
configuration: Calico Configuration
|
|
1201
|
+
rke2-canal:
|
|
1202
|
+
label: Canal
|
|
1203
|
+
configuration: Canal Configuration
|
|
1204
|
+
rke2-cilium:
|
|
1205
|
+
label: Cilium
|
|
1206
|
+
configuration: Cilium Configuration
|
|
1207
|
+
rke2-coredns:
|
|
1208
|
+
label: CoreDNS
|
|
1209
|
+
configuration: CoreDNS Configuration
|
|
1210
|
+
rke2-ingress-nginx:
|
|
1211
|
+
label: NGINX
|
|
1212
|
+
configuration: NGINX Ingress Configuration
|
|
1213
|
+
rke2-kube-proxy:
|
|
1214
|
+
label: Kube Proxy
|
|
1215
|
+
configuration: Kube Proxy Configuration
|
|
1216
|
+
rke2-metrics-server:
|
|
1217
|
+
label: Metrics Server
|
|
1218
|
+
configuration: Metrics Server Configuration
|
|
1219
|
+
rke2-multus:
|
|
1220
|
+
label: Multus
|
|
1221
|
+
configuration: Multus Configuration
|
|
1200
1222
|
agentEnvVars:
|
|
1201
1223
|
label: Agent Environment
|
|
1202
1224
|
detail: Add additional environment variables to the agent container. This is most commonly useful for configuring a HTTP proxy.
|
|
@@ -1443,10 +1465,6 @@ cluster:
|
|
|
1443
1465
|
placeholder: A unique name for the cluster
|
|
1444
1466
|
directoryConfig:
|
|
1445
1467
|
title: Data directory configuration
|
|
1446
|
-
checkboxText: Use the same path for System-agent, Provisioning and K8s Distro data directories configuration
|
|
1447
|
-
common:
|
|
1448
|
-
label: Data directory configuration path
|
|
1449
|
-
tooltip: Data directory configuration for System-agent, Provisioning and K8s Distro
|
|
1450
1468
|
systemAgent:
|
|
1451
1469
|
label: System-agent directory path
|
|
1452
1470
|
tooltip: Data directory for the system-agent connection info and plans
|
|
@@ -1782,7 +1800,9 @@ cluster:
|
|
|
1782
1800
|
rke2-k3-reprovisioning: 'Making changes to cluster configuration may result in nodes reprovisioning. For more information see the <a href="{docsBase}/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/rke1-vs-rke2-differences#cluster-api" target="_blank" rel="noopener nofollow">documentation</a>.'
|
|
1783
1801
|
desiredNodeGroupWarning: There are 0 nodes available to run the cluster agent. The cluster will not become active until at least one node is available.
|
|
1784
1802
|
haveArgInfo: Configuration information is not available for the selected Kubernetes version. The options available on this screen will be limited; you may want to use the YAML editor.
|
|
1785
|
-
cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the Amazon Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
1803
|
+
cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the <b>Amazon</b> Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
1804
|
+
cloudProviderUnsupportedAzure: 'On Kubernetes 1.30 or greater, the <b>Azure</b> Cloud Provider has been removed. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
1805
|
+
cloudProviderMigrateAzure: 'On Kubernetes 1.30 or greater, the <b>Azure</b> Cloud Provider has been removed. To upgrade Kubernetes, the cluster should be migrated to External provider first.<br> See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
1786
1806
|
machinePoolError: |-
|
|
1787
1807
|
{count, plural,
|
|
1788
1808
|
=1 { {pool_name}: The provided value for {fields} was not found in the list of expected values. This can happen with clusters provisioned outside of Rancher or when options for the provider have changed. }
|
|
@@ -1920,6 +1940,7 @@ cluster:
|
|
|
1920
1940
|
oracleoke: Oracle OKE
|
|
1921
1941
|
otc: Open Telekom Cloud
|
|
1922
1942
|
other: Other
|
|
1943
|
+
ovhcloudmks: OVHcloud MKS
|
|
1923
1944
|
packet: Equinix Metal
|
|
1924
1945
|
pinganyunecs: Pinganyun ECS
|
|
1925
1946
|
pnap: phoenixNAP
|
|
@@ -2082,7 +2103,7 @@ cluster:
|
|
|
2082
2103
|
s3: s3
|
|
2083
2104
|
tabs:
|
|
2084
2105
|
ace: Authorized Endpoint
|
|
2085
|
-
|
|
2106
|
+
addOnAdditionalManifest: Additional Manifest
|
|
2086
2107
|
advanced: Advanced
|
|
2087
2108
|
agentEnv: Agent Environment Vars
|
|
2088
2109
|
basic: Basics
|
|
@@ -4250,8 +4271,10 @@ inactivity:
|
|
|
4250
4271
|
|
|
4251
4272
|
# Rancher Extensions
|
|
4252
4273
|
plugins:
|
|
4253
|
-
incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({
|
|
4254
|
-
incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({
|
|
4274
|
+
incompatibleRancherVersion: "The latest version of this extension ({ version }) is not compatible with the current Rancher version ({ required })."
|
|
4275
|
+
incompatibleKubeVersion: "The latest version of this extension ({ version }) is not compatible with the current Kube version ({ required })."
|
|
4276
|
+
incompatibleUiExtensionsApiVersion: "The latest version of this extension ({ version }) is not compatible with the current Extensions API version ({ required })."
|
|
4277
|
+
incompatibleHost: 'The latest version of this extension ({ version }) has a host of "{ required }" which is not compatible with this application "{ mainHost }".'
|
|
4255
4278
|
currentInstalledVersionBlockedByKubeVersion: "This version is not compatible with the current Kubernetes version ({ kubeVersion } Vs { kubeVersionToCheck })."
|
|
4256
4279
|
labels:
|
|
4257
4280
|
builtin: Built-in
|
|
@@ -4289,8 +4312,10 @@ plugins:
|
|
|
4289
4312
|
detail: Detail
|
|
4290
4313
|
versions: Versions
|
|
4291
4314
|
versionError: Could not load version information
|
|
4292
|
-
requiresRancherVersion: "Requires Rancher {
|
|
4293
|
-
requiresKubeVersion: "Requires Kube version {
|
|
4315
|
+
requiresRancherVersion: "Requires Rancher {required}"
|
|
4316
|
+
requiresKubeVersion: "Requires Kube version {required}"
|
|
4317
|
+
requiresExtensionApiVersion: "Requires Extensions API version {required}"
|
|
4318
|
+
requiresHost: 'Requires a host that matches "{required}"'
|
|
4294
4319
|
empty:
|
|
4295
4320
|
all: Extensions are neither installed nor available
|
|
4296
4321
|
available: No Extensions available
|
|
@@ -7402,7 +7427,7 @@ performance:
|
|
|
7402
7427
|
When enabled, resources will appear more quickly, but it may take slightly longer to load the entire set of resources. This setting only applies to resources that come from the Kubernetes API
|
|
7403
7428
|
checkboxLabel: Enable incremental loading
|
|
7404
7429
|
inputLabel: Resource Threshold
|
|
7405
|
-
incompatibleDescription: "Incremental Loading is
|
|
7430
|
+
incompatibleDescription: "Incremental Loading is incompatible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
|
|
7406
7431
|
manualRefresh:
|
|
7407
7432
|
label: Manual Refresh
|
|
7408
7433
|
setting: You can configure a threshold above which manual refresh will be enabled.
|
|
@@ -7411,7 +7436,7 @@ performance:
|
|
|
7411
7436
|
When enabled, list data will not auto-update but instead the user must manually trigger a list-view refresh. This setting only applies to resources that come from the Kubernetes API
|
|
7412
7437
|
checkboxLabel: Enable manual refresh of data for lists
|
|
7413
7438
|
inputLabel: Resource Threshold
|
|
7414
|
-
incompatibleDescription: "Manual Refresh is
|
|
7439
|
+
incompatibleDescription: "Manual Refresh is incompatible with Namespace/Project filtering and Server-side Pagination. Enabling this will disable them."
|
|
7415
7440
|
websocketNotification:
|
|
7416
7441
|
label: Websocket Notifications
|
|
7417
7442
|
description: |-
|
|
@@ -7442,7 +7467,7 @@ performance:
|
|
|
7442
7467
|
label: Require Namespace / Project Filtering
|
|
7443
7468
|
description: Require the user to select namespaces and/or projects. This restricts the number of resources fetched when viewing lists and should help the responsiveness of the UI in systems with a lot of resources.
|
|
7444
7469
|
checkboxLabel: Enable Required Namespace / Project Filtering
|
|
7445
|
-
incompatibleDescription: "Required Namespace / Project Filtering is
|
|
7470
|
+
incompatibleDescription: "Required Namespace / Project Filtering is incompatible with Manual Refresh and Incremental Loading. Enabling this will disable them."
|
|
7446
7471
|
advancedWorker:
|
|
7447
7472
|
label: Websocket Web Worker
|
|
7448
7473
|
description: Updates to resources pushed to the UI come via WebSocket and are handled in the UI thread. Enable this option to handle cluster WebSocket updates in a Web Worker in a separate thread. This should help the responsiveness of the UI in systems where resources change often.
|
|
@@ -7459,7 +7484,7 @@ performance:
|
|
|
7459
7484
|
description: By default Lists will fetch all resources and paginate in the browser (create the page given sorting and filtering settings). Change this setting to enable pagination server-side. This should help the responsiveness of the UI in systems with a lot of resources.
|
|
7460
7485
|
checkboxLabel: Enable Server-side Pagination
|
|
7461
7486
|
applicable: "This applies to the following resource types"
|
|
7462
|
-
incompatibleDescription: "Server-side Pagination is
|
|
7487
|
+
incompatibleDescription: "Server-side Pagination is incompatible with Manual Refresh and Incremental Loading. Enabling this will disable them."
|
|
7463
7488
|
featureFlag: The <a href="{ffUrl}">Feature Flag</a> `ui-sql-cache` must be enabled to use this feature
|
|
7464
7489
|
resources:
|
|
7465
7490
|
generic: most resources in the cluster's 'More Resources' section
|
|
@@ -7789,4 +7814,4 @@ gitPicker:
|
|
|
7789
7814
|
|
|
7790
7815
|
networkAttachmentDefinition:
|
|
7791
7816
|
tabs:
|
|
7792
|
-
config: Config
|
|
7817
|
+
config: Config
|
package/components/AssignTo.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { FLEET, NORMAN } from '@shell/config/types';
|
|
|
4
4
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
5
|
import KeyValue from '@shell/components/form/KeyValue';
|
|
6
6
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
7
|
+
import AppModal from '@shell/components/AppModal.vue';
|
|
7
8
|
import { Card } from '@components/Card';
|
|
8
9
|
import { Banner } from '@components/Banner';
|
|
9
10
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
@@ -16,6 +17,7 @@ export default {
|
|
|
16
17
|
KeyValue,
|
|
17
18
|
AsyncButton,
|
|
18
19
|
Banner,
|
|
20
|
+
AppModal
|
|
19
21
|
},
|
|
20
22
|
|
|
21
23
|
data() {
|
|
@@ -45,9 +45,9 @@ export function componentForQuestion(q) {
|
|
|
45
45
|
|
|
46
46
|
if ( knownTypes[type] ) {
|
|
47
47
|
return type;
|
|
48
|
-
} else if ( type.startsWith('array
|
|
48
|
+
} else if ( type.startsWith('array') ) { // This only really works for array[string|multiline], but close enough for now.
|
|
49
49
|
return ArrayType;
|
|
50
|
-
} else if ( type.startsWith('map
|
|
50
|
+
} else if ( type.startsWith('map') ) { // Same, only works with map[string|multiline]
|
|
51
51
|
return MapType;
|
|
52
52
|
} else if ( type.startsWith('reference[') ) { // Same, only works with map[string|multiline]
|
|
53
53
|
return ReferenceType;
|
|
@@ -14,7 +14,7 @@ import Tabbed from '@shell/components/Tabbed';
|
|
|
14
14
|
import { ucFirst } from '@shell/utils/string';
|
|
15
15
|
import SortableTable from '@shell/components/SortableTable';
|
|
16
16
|
import { _CLONE, _DETAIL } from '@shell/config/query-params';
|
|
17
|
-
import { SCOPED_RESOURCES } from '@shell/config/roles';
|
|
17
|
+
import { SCOPED_RESOURCES, SCOPED_RESOURCE_GROUPS } from '@shell/config/roles';
|
|
18
18
|
import { Banner } from '@components/Banner';
|
|
19
19
|
|
|
20
20
|
import { SUBTYPE_MAPPING, VERBS } from '@shell/models/management.cattle.io.roletemplate';
|
|
@@ -195,16 +195,17 @@ export default {
|
|
|
195
195
|
const scopes = Object.keys(this.scopedResources);
|
|
196
196
|
|
|
197
197
|
scopes.forEach((scope) => {
|
|
198
|
-
if (scope ===
|
|
198
|
+
if (scope === SCOPED_RESOURCE_GROUPS.GLOBAL && this.value.type !== MANAGEMENT.GLOBAL_ROLE) {
|
|
199
199
|
// If we are not in the global role creation form,
|
|
200
200
|
// skip adding the global-scoped resources.
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
if (scope ===
|
|
203
|
+
if (scope === SCOPED_RESOURCE_GROUPS.CLUSTER && (this.value.type === RBAC.ROLE || this.value.subtype === NAMESPACE)) {
|
|
204
204
|
// If we are in a project/namespace role creation form,
|
|
205
205
|
// additionally skip adding the cluster-scoped resources.
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
+
|
|
208
209
|
const apiGroupsInScope = this.scopedResources[scope];
|
|
209
210
|
|
|
210
211
|
const apiGroupNames = Object.keys(apiGroupsInScope);
|
|
@@ -237,7 +238,7 @@ export default {
|
|
|
237
238
|
const labelForNamespaceScoped = this.t('rbac.roletemplate.tabs.grantResources.neuvector.labelNamespaceScoped');
|
|
238
239
|
|
|
239
240
|
apiGroupLabel = scope.includes('cluster') ? labelForClusterScoped : labelForNamespaceScoped;
|
|
240
|
-
apiGroupValue = '
|
|
241
|
+
apiGroupValue = 'permission.neuvector.com';
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
options.push({
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
177
177
|
},
|
|
178
178
|
customPermissionsUpdate() {
|
|
179
179
|
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
180
|
-
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.
|
|
180
|
+
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
|
|
181
181
|
|
|
182
182
|
if (lockedExist.locked) {
|
|
183
183
|
customPermissionsItem['locked'] = true;
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
},
|
|
193
193
|
customPermissionsUpdate() {
|
|
194
194
|
return this.customPermissions.reduce((acc, customPermissionsItem) => {
|
|
195
|
-
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.
|
|
195
|
+
const lockedExist = this.roleTemplates.find((roleTemplateItem) => roleTemplateItem.id === customPermissionsItem.key);
|
|
196
196
|
|
|
197
197
|
if (lockedExist.locked) {
|
|
198
198
|
customPermissionsItem['locked'] = true;
|
|
@@ -126,11 +126,17 @@ export default defineComponent({
|
|
|
126
126
|
|
|
127
127
|
computed: {
|
|
128
128
|
labelSelectAttributes() {
|
|
129
|
+
// This component is a wrapper for LabelSelect, so pass through everything
|
|
130
|
+
const allAttrs = {
|
|
131
|
+
...this.$attrs, // Attributes (other than props)
|
|
132
|
+
...this.$props, // Attributes that are props
|
|
133
|
+
};
|
|
134
|
+
|
|
129
135
|
return this.paginate ? {
|
|
130
|
-
...
|
|
136
|
+
...allAttrs,
|
|
131
137
|
...this.paginatedResourceSettings?.labelSelectOptions || {}
|
|
132
138
|
} : {
|
|
133
|
-
...
|
|
139
|
+
...allAttrs,
|
|
134
140
|
...this.allResourcesSettings?.labelSelectOptions || {}
|
|
135
141
|
};
|
|
136
142
|
},
|
|
@@ -156,7 +162,9 @@ export default defineComponent({
|
|
|
156
162
|
}
|
|
157
163
|
|
|
158
164
|
const { filter } = opts;
|
|
159
|
-
const filters = !!filter ? [PaginationParamFilter.createSingleField({
|
|
165
|
+
const filters = !!filter ? [PaginationParamFilter.createSingleField({
|
|
166
|
+
field: 'metadata.name', value: filter, exact: false
|
|
167
|
+
})] : [];
|
|
160
168
|
const defaultOptions: LabelSelectPaginationFunctionOptions = {
|
|
161
169
|
opts,
|
|
162
170
|
filters,
|
|
@@ -17,15 +17,16 @@ export const STEVE_ID_COL = {
|
|
|
17
17
|
name: 'steve-id',
|
|
18
18
|
labelKey: 'tableHeaders.id',
|
|
19
19
|
value: 'id',
|
|
20
|
-
sort: ['id'],
|
|
21
|
-
search: 'id',
|
|
20
|
+
sort: false, // sort: ['id'], // Pending API support
|
|
21
|
+
search: false, // search: 'id', // Pending API support
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const STEVE_STATE_COL = {
|
|
25
25
|
...STATE,
|
|
26
|
-
//
|
|
26
|
+
// Note, we're show the 'state' as per model, not the 'metadata.state.name' that's available in the model to remotely sort/filter
|
|
27
|
+
// Need to investigate whether we should 'dumb down' the state we show to the native one (tracked via https://github.com/rancher/dashboard/issues/8527)
|
|
27
28
|
// This means we'll show something different to what we sort and filter on.
|
|
28
|
-
sort:
|
|
29
|
+
sort: false, // ['metadata.state.name'], // Pending API support
|
|
29
30
|
search: false, // 'metadata.state.name', // Pending API support
|
|
30
31
|
};
|
|
31
32
|
|
package/config/roles.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export const enum SCOPED_RESOURCE_GROUPS {
|
|
2
|
+
GLOBAL = 'globalScopedApiGroups', // eslint-disable-line no-unused-vars
|
|
3
|
+
CLUSTER = 'clusterScopedApiGroups', // eslint-disable-line no-unused-vars
|
|
4
|
+
PROJECT_NAMESPACE = 'projectScopedApiGroups', // eslint-disable-line no-unused-vars
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Resources users can select when creating grants when managing global, cluster and project/namespace roles
|
|
9
|
+
*
|
|
10
|
+
* **************NOTE*****************
|
|
11
|
+
* Global roles will show ALL entries
|
|
12
|
+
* Cluster roles will show cluster AND project/namespace entries
|
|
13
|
+
* Project/Namespace roles will show ONLY project/namespace entries
|
|
14
|
+
*/
|
|
1
15
|
export const SCOPED_RESOURCES = {
|
|
2
16
|
// With this hardcoded list, it will be easier to curate a more useful
|
|
3
17
|
// and human-understandable list of resources to choose from
|
|
@@ -13,7 +27,7 @@ export const SCOPED_RESOURCES = {
|
|
|
13
27
|
// the global scoped list, and the project role creation form includes a
|
|
14
28
|
// subset of the cluster scoped list.
|
|
15
29
|
|
|
16
|
-
|
|
30
|
+
[SCOPED_RESOURCE_GROUPS.GLOBAL]: {
|
|
17
31
|
// Global scoped resources are resources for
|
|
18
32
|
// Rancher's global apps, mainly Cluster
|
|
19
33
|
// Management and Continuous Delivery.
|
|
@@ -130,9 +144,9 @@ export const SCOPED_RESOURCES = {
|
|
|
130
144
|
resources: [
|
|
131
145
|
'Clusters'
|
|
132
146
|
]
|
|
133
|
-
}
|
|
147
|
+
},
|
|
134
148
|
},
|
|
135
|
-
|
|
149
|
+
[SCOPED_RESOURCE_GROUPS.CLUSTER]: {
|
|
136
150
|
// Cluster scoped resources are for non-namespaced
|
|
137
151
|
// resources at the cluster level, for example,
|
|
138
152
|
// storage resources.
|
|
@@ -201,15 +215,16 @@ export const SCOPED_RESOURCES = {
|
|
|
201
215
|
},
|
|
202
216
|
neuvectorApi: {
|
|
203
217
|
resources: [
|
|
204
|
-
'
|
|
205
|
-
'
|
|
206
|
-
'
|
|
207
|
-
'
|
|
208
|
-
'
|
|
218
|
+
'AdmissionControl',
|
|
219
|
+
'Authentication',
|
|
220
|
+
'CIScan',
|
|
221
|
+
'Cluster',
|
|
222
|
+
'Federation',
|
|
223
|
+
'Vulnerability',
|
|
209
224
|
]
|
|
210
225
|
}
|
|
211
226
|
},
|
|
212
|
-
|
|
227
|
+
[SCOPED_RESOURCE_GROUPS.PROJECT_NAMESPACE]: {
|
|
213
228
|
// Project scoped resources include all other namespaced
|
|
214
229
|
// resources.
|
|
215
230
|
coreKubernetesApi: {
|
|
@@ -378,16 +393,16 @@ export const SCOPED_RESOURCES = {
|
|
|
378
393
|
},
|
|
379
394
|
neuvectorApi: {
|
|
380
395
|
resources: [
|
|
381
|
-
'
|
|
382
|
-
'
|
|
383
|
-
'
|
|
384
|
-
'
|
|
385
|
-
'
|
|
386
|
-
'
|
|
387
|
-
'
|
|
388
|
-
'
|
|
389
|
-
'
|
|
390
|
-
'
|
|
396
|
+
'AuditEvents',
|
|
397
|
+
'Authorization',
|
|
398
|
+
'Compliance',
|
|
399
|
+
'Events',
|
|
400
|
+
'Namespace',
|
|
401
|
+
'RegistryScan',
|
|
402
|
+
'RuntimePolicy',
|
|
403
|
+
'RuntimeScan',
|
|
404
|
+
'SecurityEvents',
|
|
405
|
+
'SystemConfig',
|
|
391
406
|
]
|
|
392
407
|
}
|
|
393
408
|
}
|
|
@@ -5,7 +5,7 @@ import { tryInitialSetup } from '@shell/utils/auth';
|
|
|
5
5
|
import { routeRequiresAuthentication } from '@shell/utils/router';
|
|
6
6
|
|
|
7
7
|
export function install(router, context) {
|
|
8
|
-
router.beforeEach((to, from, next) => attemptFirstLogin(to, from, next, context));
|
|
8
|
+
router.beforeEach(async(to, from, next) => await attemptFirstLogin(to, from, next, context));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export async function attemptFirstLogin(to, from, next, { store }) {
|
|
@@ -2,7 +2,7 @@ import { routeRequiresAuthentication } from '@shell/utils/router';
|
|
|
2
2
|
import { isLoggedIn, notLoggedIn, noAuth, findMe } from '@shell/utils/auth';
|
|
3
3
|
|
|
4
4
|
export function install(router, context) {
|
|
5
|
-
router.beforeEach((to, from, next) => authenticate(to, from, next, context));
|
|
5
|
+
router.beforeEach(async(to, from, next) => await authenticate(to, from, next, context));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export async function authenticate(to, from, next, { store }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function install(router, context) {
|
|
2
|
-
router.beforeEach((to, from, next) => loadI18n(to, from, next, context));
|
|
2
|
+
router.beforeEach(async(to, from, next) => await loadI18n(to, from, next, context));
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
export async function loadI18n(to, from, next, { store }) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { install as installLoadInitialSettings } from '@shell/config/router/navigation-guards/load-initial-settings';
|
|
2
2
|
import { install as installAttemptFirstLogin } from '@shell/config/router/navigation-guards/attempt-first-login';
|
|
3
3
|
import { install as installAuthentication } from '@shell/config/router/navigation-guards/authentication';
|
|
4
|
+
import { install as installRuntimeExtensionRoute } from '@shell/config/router/navigation-guards/runtime-extension-route';
|
|
4
5
|
import { install as installI18N } from '@shell/config/router/navigation-guards/i18n';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -10,7 +11,7 @@ export function installNavigationGuards(router, context) {
|
|
|
10
11
|
// NOTE: the order of the installation matters.
|
|
11
12
|
// Be intentional when adding, removing or modifying the guards that are installed.
|
|
12
13
|
|
|
13
|
-
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installI18N];
|
|
14
|
+
const navigationGuardInstallers = [installLoadInitialSettings, installAttemptFirstLogin, installAuthentication, installRuntimeExtensionRoute, installI18N];
|
|
14
15
|
|
|
15
16
|
navigationGuardInstallers.forEach((installer) => installer(router, context));
|
|
16
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fetchInitialSettings } from '@shell/utils/settings';
|
|
2
2
|
|
|
3
3
|
export function install(router, context) {
|
|
4
|
-
router.beforeEach((to, from, next) => loadInitialSettings(to, from, next, context));
|
|
4
|
+
router.beforeEach(async(to, from, next) => await loadInitialSettings(to, from, next, context));
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export async function loadInitialSettings(to, from, next, { store }) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dynamicPluginLoader from '@shell/pkg/dynamic-plugin-loader';
|
|
2
|
+
import { routeRequiresAuthentication } from '@shell/utils/router';
|
|
3
|
+
|
|
4
|
+
export function install(router, context) {
|
|
5
|
+
router.beforeEach((to, from, next) => runtimeExtensionRoute(to, from, next, context));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export async function runtimeExtensionRoute(to, from, next, { store }) {
|
|
9
|
+
if (!routeRequiresAuthentication(to) || to.name !== '404') {
|
|
10
|
+
return next();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
// Handle the loading of dynamic plugins (Harvester) because we only want to attempt to load those plugins and routes if we first couldn't find a page.
|
|
15
|
+
// We should probably get rid of this concept entirely and just load plugins at the start.
|
|
16
|
+
await store.dispatch('loadManagement');
|
|
17
|
+
const newLocation = await dynamicPluginLoader.check({ route: { path: window.location.pathname }, store });
|
|
18
|
+
|
|
19
|
+
// If we have a new location, double check that it's actually valid
|
|
20
|
+
const resolvedRoute = newLocation?.path ? store.app.router.resolve({ path: newLocation.path.replace(/^\/{0,1}dashboard/, '') }) : null;
|
|
21
|
+
|
|
22
|
+
if (resolvedRoute?.route.matched.length) {
|
|
23
|
+
// Note - don't use `redirect` or `store.app.route` (breaks feature by failing to run middleware in default layout)
|
|
24
|
+
return next(resolvedRoute.resolved.path);
|
|
25
|
+
}
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error('Failed to load harvester', e); // eslint-disable-line no-console
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
next();
|
|
31
|
+
}
|
package/config/router/routes.js
CHANGED
|
@@ -41,6 +41,7 @@ export default [
|
|
|
41
41
|
path: '',
|
|
42
42
|
component: () => interopDefault(import('@shell/components/templates/home.vue')),
|
|
43
43
|
meta: { requiresAuthentication: true },
|
|
44
|
+
name: 'home_layout',
|
|
44
45
|
children: [
|
|
45
46
|
{
|
|
46
47
|
path: '/home',
|
|
@@ -484,4 +485,12 @@ export default [
|
|
|
484
485
|
component: () => interopDefault(import('@shell/pages/c/_cluster/_product/_resource/_namespace/_id.vue')),
|
|
485
486
|
name: 'c-cluster-product-resource-namespace-id'
|
|
486
487
|
}]
|
|
487
|
-
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
path: '*',
|
|
491
|
+
name: '404',
|
|
492
|
+
component: () => interopDefault(import('@shell/pages/404.vue')),
|
|
493
|
+
meta: { requiresAuthentication: true },
|
|
494
|
+
},
|
|
495
|
+
|
|
496
|
+
];
|