@rancher/shell 3.0.12-rc.1 → 3.0.12-rc.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/entraid-black.svg +4 -0
- package/assets/images/providers/entraid.svg +9 -0
- package/assets/images/vendor/entraid.svg +9 -0
- package/assets/styles/app.scss +0 -1
- package/assets/translations/en-us.yaml +19 -17
- package/assets/translations/zh-hans.yaml +4 -8
- package/chart/__tests__/S3.test.ts +10 -3
- package/components/CountBox.vue +20 -0
- package/components/CreateDriver.vue +0 -12
- package/components/DetailText.vue +12 -3
- package/components/SelectIconGrid.vue +5 -0
- package/components/__tests__/CountBox.test.ts +72 -0
- package/components/__tests__/DetailText.test.ts +113 -0
- package/components/fleet/FleetClusterTargets/index.vue +18 -1
- package/components/form/InputWithSelect.vue +18 -10
- package/components/form/KeyValue.vue +17 -1
- package/components/form/LabeledSelect.vue +82 -24
- package/components/form/Select.vue +73 -56
- package/components/form/ServiceNameSelect.vue +13 -11
- package/components/form/__tests__/KeyValue.test.ts +66 -0
- package/components/form/__tests__/NodeScheduling.test.ts +9 -0
- package/components/form/labeled-select-utils/useLabeledSelectPagination.ts +138 -0
- package/components/nav/Group.vue +7 -6
- package/components/nav/Header.vue +24 -3
- package/components/nav/NotificationCenter/Notification.vue +4 -1
- package/components/nav/NotificationCenter/NotificationHeader.vue +20 -8
- package/components/nav/NotificationCenter/__tests__/NotificationHeader.test.ts +80 -0
- package/components/nav/Type.vue +8 -7
- package/components/nav/WindowManager/index.vue +2 -1
- package/components/nav/WorkspaceSwitcher.vue +13 -0
- package/components/nav/__tests__/Group.test.ts +67 -0
- package/components/nav/__tests__/Header.test.ts +235 -0
- package/components/nav/__tests__/Type.test.ts +20 -3
- package/components/templates/default.vue +34 -4
- package/components/templates/home.vue +12 -25
- package/components/templates/plain.vue +13 -26
- package/composables/useLabeledFormElement.ts +10 -2
- package/composables/useLabeledSelect.ts +60 -0
- package/composables/useUserRetentionValidation.ts +1 -49
- package/config/cookies.js +0 -1
- package/config/labels-annotations.js +1 -0
- package/config/query-params.js +1 -0
- package/config/router/routes.js +0 -8
- package/core/__tests__/plugin-products.test.ts +616 -25
- package/core/plugin-products-base.ts +31 -14
- package/core/plugin-products-helpers.ts +5 -4
- package/core/plugin-types.ts +18 -3
- package/core/types.ts +3 -1
- package/detail/__tests__/management.cattle.io.fleetworkspace.test.ts +128 -0
- package/detail/management.cattle.io.fleetworkspace.vue +49 -0
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +9 -0
- package/edit/__tests__/kontainerDriver.test.ts +0 -13
- package/edit/__tests__/nodeDriver.test.ts +5 -11
- package/edit/__tests__/resources.cattle.io.restore.test.ts +9 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/General.test.ts.snap +6 -0
- package/edit/auth/__tests__/oidc.test.ts +54 -0
- package/edit/auth/azuread.vue +1 -1
- package/edit/auth/oidc.vue +8 -0
- package/edit/kontainerDriver.vue +1 -2
- package/edit/nodeDriver.vue +0 -2
- package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/AgentEnv.test.ts +25 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +70 -99
- package/initialize/App.vue +29 -2
- package/initialize/install-plugins.js +0 -2
- package/list/__tests__/management.cattle.io.feature.test.ts +105 -0
- package/list/catalog.cattle.io.app.vue +25 -5
- package/list/management.cattle.io.feature.vue +1 -1
- package/list/management.cattle.io.fleetworkspace.vue +8 -0
- package/machine-config/amazonec2.vue +1 -0
- package/mixins/chart.js +40 -9
- package/models/__tests__/catalog.cattle.io.app.test.ts +15 -1
- package/models/__tests__/catalog.cattle.io.clusterrepo.test.ts +84 -0
- package/models/__tests__/chart.test.ts +99 -6
- package/models/__tests__/management.cattle.io.feature.test.ts +131 -0
- package/models/__tests__/monitoring.coreos.com.alertmanagerconfig.test.ts +98 -0
- package/models/catalog.cattle.io.app.js +21 -17
- package/models/catalog.cattle.io.clusterrepo.js +39 -11
- package/models/chart.js +33 -19
- package/models/fleet-application.js +1 -1
- package/models/fleet.cattle.io.bundle.js +1 -1
- package/models/kontainerdriver.js +11 -0
- package/models/management.cattle.io.authconfig.js +5 -1
- package/models/management.cattle.io.cluster.js +0 -53
- package/models/management.cattle.io.feature.js +3 -3
- package/models/management.cattle.io.kontainerdriver.js +1 -26
- package/models/monitoring.coreos.com.alertmanagerconfig.js +31 -17
- package/models/nodedriver.js +7 -0
- package/package.json +13 -12
- package/pages/c/_cluster/apps/charts/__tests__/chart.test.ts +189 -0
- package/pages/c/_cluster/apps/charts/__tests__/index.test.ts +55 -0
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +53 -0
- package/pages/c/_cluster/apps/charts/chart.vue +217 -33
- package/pages/c/_cluster/apps/charts/index.vue +2 -2
- package/pages/c/_cluster/apps/charts/install.vue +8 -3
- package/pages/c/_cluster/auth/user.retention/index.vue +55 -22
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -7
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +39 -2
- package/pages/c/_cluster/uiplugins/__tests__/PluginInfoPanel.test.ts +61 -0
- package/pages/c/_cluster/uiplugins/__tests__/index.test.ts +15 -10
- package/pages/c/_cluster/uiplugins/index.vue +23 -25
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +205 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +82 -4
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -1
- package/scripts/test-plugins-build.sh +5 -2
- package/server/server-middleware.js +2 -2
- package/static/humans.txt +1 -0
- package/static/robots.txt +34 -0
- package/static/welcome-cow.svg +18 -0
- package/store/__tests__/catalog.test.ts +161 -11
- package/store/auth.js +0 -3
- package/store/catalog.js +60 -8
- package/types/shell/index.d.ts +26 -22
- package/utils/__tests__/git.test.ts +270 -0
- package/utils/__tests__/inactivity.test.ts +316 -0
- package/utils/__tests__/object.test.ts +77 -0
- package/utils/__tests__/time.test.ts +14 -1
- package/utils/__tests__/url.test.ts +246 -0
- package/utils/object.js +33 -2
- package/utils/time.ts +5 -0
- package/vue.config.js +0 -9
- package/assets/images/providers/azuread-black.svg +0 -22
- package/assets/images/providers/azuread.svg +0 -25
- package/assets/images/vendor/azuread.svg +0 -18
- package/assets/styles/fonts/_dots.scss +0 -18
- package/components/EmberPage.vue +0 -622
- package/components/EmberPageView.vue +0 -39
- package/components/form/labeled-select-utils/labeled-select-pagination.ts +0 -116
- package/mixins/labeled-form-element.ts +0 -225
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +0 -28
- package/pages/c/_cluster/manager/pages/_page.vue +0 -22
- package/pages/c/_cluster/mcapps/pages/_page.vue +0 -22
- package/plugins/ember-cookie.js +0 -17
- package/utils/ember-page.js +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
2
|
import { useStore } from 'vuex';
|
|
3
3
|
|
|
4
4
|
import { SETTING } from '@shell/config/settings';
|
|
@@ -10,24 +10,12 @@ import dayjs from 'dayjs';
|
|
|
10
10
|
import duration from 'dayjs/plugin/duration';
|
|
11
11
|
dayjs.extend(duration);
|
|
12
12
|
|
|
13
|
-
type SettingValidation = 'user-retention-cron' | 'disable-inactive-user-after' | 'delete-inactive-user-after';
|
|
14
|
-
|
|
15
|
-
type Validation = {
|
|
16
|
-
[SETTING.DISABLE_INACTIVE_USER_AFTER]?: boolean;
|
|
17
|
-
[SETTING.DELETE_INACTIVE_USER_AFTER]?: boolean;
|
|
18
|
-
[SETTING.USER_RETENTION_CRON]?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
13
|
interface UseUserRetentionValidation {
|
|
22
14
|
validateUserRetentionCron: (cronSetting: string | null) => string | undefined;
|
|
23
15
|
validateDisableInactiveUserAfterDuration: (duration: string) => string | undefined;
|
|
24
16
|
validateDeleteInactiveUserAfterDuration: (duration: string) => string | undefined;
|
|
25
17
|
validateDeleteInactiveUserAfter: (duration: string) => string | undefined;
|
|
26
18
|
validateDurationAgainstAuthUserSession: (duration: string) => string | undefined;
|
|
27
|
-
setValidation: (formField: SettingValidation, isValid: boolean) => void;
|
|
28
|
-
removeValidation : (setting: SettingValidation) => void;
|
|
29
|
-
addValidation: (setting: SettingValidation) => void;
|
|
30
|
-
isFormValid: ComputedRef<boolean>;
|
|
31
19
|
}
|
|
32
20
|
|
|
33
21
|
class ExpectedValidationError extends Error {
|
|
@@ -42,38 +30,6 @@ export const useUserRetentionValidation = (disableAfterPeriod: Ref<boolean>, del
|
|
|
42
30
|
const store = useStore();
|
|
43
31
|
const { t } = useI18n(store);
|
|
44
32
|
|
|
45
|
-
/**
|
|
46
|
-
* Tracks the validation state for user retention fields
|
|
47
|
-
*/
|
|
48
|
-
const validation = ref<Validation>({
|
|
49
|
-
[SETTING.DISABLE_INACTIVE_USER_AFTER]: true,
|
|
50
|
-
[SETTING.DELETE_INACTIVE_USER_AFTER]: true,
|
|
51
|
-
[SETTING.USER_RETENTION_CRON]: true,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const isFormValid = computed(() => {
|
|
55
|
-
const validations = validation.value;
|
|
56
|
-
|
|
57
|
-
return !Object.values(validations).includes(false);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
const setValidation = (formField: SettingValidation, isValid: boolean) => {
|
|
61
|
-
validation.value[formField] = isValid;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const removeValidation = (setting: SettingValidation) => {
|
|
65
|
-
const { [setting]: _, ...rest } = validation.value;
|
|
66
|
-
|
|
67
|
-
validation.value = rest;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const addValidation = (setting: SettingValidation) => {
|
|
71
|
-
validation.value = {
|
|
72
|
-
...validation.value,
|
|
73
|
-
[setting]: true,
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
|
|
77
33
|
/**
|
|
78
34
|
* Takes a duration string and produces a dayjs duration object.
|
|
79
35
|
* @param duration Duration string in {h|m|s} (e.g. 6h3m2s)
|
|
@@ -193,9 +149,5 @@ export const useUserRetentionValidation = (disableAfterPeriod: Ref<boolean>, del
|
|
|
193
149
|
validateDeleteInactiveUserAfterDuration,
|
|
194
150
|
validateDeleteInactiveUserAfter,
|
|
195
151
|
validateDurationAgainstAuthUserSession,
|
|
196
|
-
setValidation,
|
|
197
|
-
removeValidation,
|
|
198
|
-
addValidation,
|
|
199
|
-
isFormValid,
|
|
200
152
|
};
|
|
201
153
|
};
|
package/config/cookies.js
CHANGED
|
@@ -87,6 +87,7 @@ export const CATALOG = {
|
|
|
87
87
|
|
|
88
88
|
PRIME_ONLY: 'catalog.cattle.io/prime-only',
|
|
89
89
|
EXPERIMENTAL: 'catalog.cattle.io/experimental',
|
|
90
|
+
DEPRECATED: 'catalog.cattle.io/deprecated',
|
|
90
91
|
NAMESPACE: 'catalog.cattle.io/namespace',
|
|
91
92
|
RELEASE_NAME: 'catalog.cattle.io/release-name',
|
|
92
93
|
FEATURED: 'catalog.cattle.io/featured',
|
package/config/query-params.js
CHANGED
|
@@ -72,6 +72,7 @@ export const DEPRECATED = 'deprecated';
|
|
|
72
72
|
export const HIDDEN = 'hidden';
|
|
73
73
|
export const FROM_TOOLS = 'tools';
|
|
74
74
|
export const FROM_CLUSTER = 'cluster';
|
|
75
|
+
export const NEW_APP_INSTANCE = 'new-instance';
|
|
75
76
|
export const HIDE_SIDE_NAV = 'hide-side-nav';
|
|
76
77
|
|
|
77
78
|
// Cluster provisioning
|
package/config/router/routes.js
CHANGED
|
@@ -432,10 +432,6 @@ export default [
|
|
|
432
432
|
path: '/c/:cluster/monitoring/route-receiver/create',
|
|
433
433
|
component: () => interopDefault(import('@shell/pages/c/_cluster/monitoring/route-receiver/create.vue')),
|
|
434
434
|
name: 'c-cluster-monitoring-route-receiver-create'
|
|
435
|
-
}, {
|
|
436
|
-
path: '/c/:cluster/explorer/tools/pages/:page?',
|
|
437
|
-
component: () => interopDefault(import('@shell/pages/c/_cluster/explorer/tools/pages/_page.vue')),
|
|
438
|
-
name: 'c-cluster-explorer-tools-pages-page'
|
|
439
435
|
}, {
|
|
440
436
|
path: '/c/:cluster/auth/config/:id',
|
|
441
437
|
component: () => interopDefault(import('@shell/pages/c/_cluster/auth/config/_id.vue')),
|
|
@@ -452,10 +448,6 @@ export default [
|
|
|
452
448
|
path: '/c/:cluster/manager/nodeDriver/:id',
|
|
453
449
|
component: () => interopDefault(import('@shell/pages/c/_cluster/manager/drivers/nodeDriver/_id.vue')),
|
|
454
450
|
name: 'c-cluster-manager-driver-nodedriver-id'
|
|
455
|
-
}, {
|
|
456
|
-
path: '/c/:cluster/manager/pages/:page?',
|
|
457
|
-
component: () => interopDefault(import('@shell/pages/c/_cluster/manager/pages/_page.vue')),
|
|
458
|
-
name: 'c-cluster-manager-pages-page'
|
|
459
451
|
}, {
|
|
460
452
|
path: '/c/:cluster/monitoring/alertmanagerconfig/:alertmanagerconfigid',
|
|
461
453
|
component: () => interopDefault(import('@shell/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/index.vue')),
|