@rancher/shell 3.0.11 → 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/styles/base/_mixins.scss +31 -0
- package/assets/styles/base/_variables.scss +2 -0
- package/assets/styles/themes/_modern.scss +6 -5
- package/assets/translations/en-us.yaml +24 -21
- package/assets/translations/zh-hans.yaml +4 -11
- 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/EmptyProductPage.vue +76 -0
- package/components/Resource/Detail/CopyToClipboard.vue +1 -2
- package/components/Resource/Detail/Metadata/KeyValueRow.vue +9 -3
- package/components/Resource/Detail/TitleBar/__tests__/__snapshots__/index.test.ts.snap +31 -0
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +45 -1
- package/components/Resource/Detail/TitleBar/index.vue +1 -1
- package/components/Resource/Detail/ViewOptions/__tests__/__snapshots__/index.test.ts.snap +9 -0
- package/components/Resource/Detail/ViewOptions/__tests__/index.test.ts +62 -0
- package/components/Resource/Detail/ViewOptions/index.vue +2 -1
- package/components/ResourceList/Masthead.vue +25 -2
- package/components/SelectIconGrid.vue +5 -0
- package/components/SideNav.vue +13 -0
- package/components/__tests__/CountBox.test.ts +72 -0
- package/components/__tests__/DetailText.test.ts +113 -0
- package/components/__tests__/PromptModal.test.ts +2 -0
- package/components/fleet/FleetClusterTargets/index.vue +18 -1
- package/components/fleet/FleetClusters.vue +1 -0
- package/components/fleet/__tests__/FleetClusters.test.ts +71 -0
- package/components/form/InputWithSelect.vue +18 -10
- package/components/form/KeyValue.vue +17 -1
- package/components/form/LabeledSelect.vue +82 -24
- package/components/form/NodeScheduling.vue +17 -3
- package/components/form/PrivateRegistry.vue +69 -0
- 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/__tests__/PrivateRegistry.test.ts +133 -0
- package/components/form/labeled-select-utils/useLabeledSelectPagination.ts +138 -0
- package/components/formatter/WorkloadHealthScale.vue +3 -1
- package/components/nav/Group.vue +33 -9
- package/components/nav/Header.vue +56 -10
- 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/TopLevelMenu.vue +15 -1
- 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/pagination-table-headers.js +8 -1
- package/config/product/apps.js +2 -1
- package/config/product/auth.js +1 -0
- package/config/product/backup.js +1 -0
- package/config/product/compliance.js +1 -1
- package/config/product/explorer.js +25 -6
- package/config/product/fleet.js +1 -0
- package/config/product/gatekeeper.js +1 -0
- package/config/product/istio.js +1 -0
- package/config/product/logging.js +1 -0
- package/config/product/longhorn.js +2 -1
- package/config/product/manager.js +1 -0
- package/config/product/monitoring.js +1 -0
- package/config/product/navlinks.js +1 -0
- package/config/product/neuvector.js +2 -1
- package/config/product/settings.js +1 -0
- package/config/product/uiplugins.js +1 -0
- package/config/query-params.js +1 -0
- package/config/router/routes.js +0 -8
- package/core/__tests__/plugin-products-helpers.test.ts +454 -0
- package/core/__tests__/plugin-products.test.ts +3810 -0
- package/core/extension-manager-impl.js +30 -1
- package/core/plugin-products-base.ts +392 -0
- package/core/plugin-products-extending.ts +44 -0
- package/core/plugin-products-helpers.ts +263 -0
- package/core/plugin-products-top-level.ts +66 -0
- package/core/plugin-products-type-guards.ts +33 -0
- package/core/plugin-products.ts +50 -0
- package/core/plugin-types.ts +237 -0
- package/core/plugin.ts +45 -10
- package/core/productDebugger.js +48 -0
- package/core/types.ts +97 -11
- package/detail/__tests__/__snapshots__/fleet.cattle.io.bundle.test.ts.snap +52 -0
- package/detail/__tests__/fleet.cattle.io.bundle.test.ts +171 -0
- package/detail/__tests__/management.cattle.io.fleetworkspace.test.ts +128 -0
- package/detail/fleet.cattle.io.bundle.vue +21 -34
- package/detail/management.cattle.io.fleetworkspace.vue +49 -0
- package/dialog/ExtensionCatalogInstallDialog.vue +1 -1
- package/dialog/InstallExtensionDialog.vue +6 -27
- package/dialog/UninstallExistingExtensionDialog.vue +141 -0
- package/dialog/UninstallExtensionDialog.vue +4 -26
- package/dialog/__tests__/UninstallExistingExtensionDialog.test.ts +114 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +1 -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/__tests__/Ingress.test.ts +176 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +70 -99
- package/edit/provisioning.cattle.io.cluster/rke2.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +6 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +7 -2
- 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/list/provisioning.cattle.io.cluster.vue +0 -1
- package/list/workload.vue +11 -4
- package/machine-config/amazonec2.vue +1 -0
- package/mixins/chart.js +40 -9
- package/mixins/resource-fetch.js +12 -3
- 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/models/pod.js +18 -0
- package/models/workload.js +20 -2
- package/package.json +13 -13
- package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +0 -1
- 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/settings/brand.vue +4 -4
- 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 +246 -23
- package/pages/c/_cluster/uiplugins/index.vue +166 -62
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +1 -0
- package/plugins/dashboard-store/actions.js +3 -2
- package/plugins/dashboard-store/resource-class.js +62 -6
- package/plugins/plugin.js +16 -0
- package/plugins/steve/steve-pagination-utils.ts +7 -0
- 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/scripts/typegen.sh +13 -1
- 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/__tests__/type-map.test.ts +84 -24
- package/store/auth.js +0 -3
- package/store/catalog.js +60 -8
- package/store/type-map.js +42 -3
- package/tsconfig.paths.json +1 -0
- package/types/resources/pod.ts +18 -0
- package/types/shell/index.d.ts +8539 -2938
- package/types/store/dashboard-store.types.ts +5 -0
- package/types/store/pagination.types.ts +6 -0
- 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/axios.js +1 -4
- package/utils/dynamic-importer.js +3 -2
- package/utils/object.js +33 -2
- package/utils/pagination-utils.ts +1 -1
- package/utils/time.ts +5 -0
- package/utils/uiplugins.ts +12 -16
- package/utils/validators/__tests__/private-registry.test.ts +76 -0
- package/utils/validators/private-registry.ts +28 -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
|
@@ -14,7 +14,6 @@ import BrowserTabVisibility from '@shell/mixins/browser-tab-visibility';
|
|
|
14
14
|
import Inactivity from '@shell/components/Inactivity';
|
|
15
15
|
import { mapGetters } from 'vuex';
|
|
16
16
|
import PromptModal from '@shell/components/PromptModal';
|
|
17
|
-
import WindowManager from '@shell/components/nav/WindowManager';
|
|
18
17
|
import { Layout } from '@shell/types/window-manager';
|
|
19
18
|
|
|
20
19
|
export default {
|
|
@@ -31,17 +30,17 @@ export default {
|
|
|
31
30
|
SlideInPanelManager,
|
|
32
31
|
AwsComplianceBanner,
|
|
33
32
|
Inactivity,
|
|
34
|
-
WindowManager
|
|
35
33
|
},
|
|
36
34
|
|
|
37
35
|
mixins: [Brand, BrowserTabVisibility],
|
|
38
36
|
|
|
37
|
+
inject: ['notifyWmContainerReady'],
|
|
38
|
+
|
|
39
39
|
data() {
|
|
40
40
|
return {
|
|
41
41
|
// Assume home pages have routes where the name is the key to use for string lookup
|
|
42
42
|
name: this.$route.name,
|
|
43
|
-
noLocaleShortcut: process.env.dev || false
|
|
44
|
-
layout: Layout.plain,
|
|
43
|
+
noLocaleShortcut: process.env.dev || false
|
|
45
44
|
};
|
|
46
45
|
},
|
|
47
46
|
|
|
@@ -50,6 +49,10 @@ export default {
|
|
|
50
49
|
...mapGetters(['showTopLevelMenu']),
|
|
51
50
|
},
|
|
52
51
|
|
|
52
|
+
mounted() {
|
|
53
|
+
this.notifyWmContainerReady(Layout.plain);
|
|
54
|
+
},
|
|
55
|
+
|
|
53
56
|
methods: {
|
|
54
57
|
toggleTheme() {
|
|
55
58
|
this.$store.dispatch('prefs/toggleTheme');
|
|
@@ -98,7 +101,12 @@ export default {
|
|
|
98
101
|
@shortkey="toggleNoneLocale()"
|
|
99
102
|
/>
|
|
100
103
|
</main>
|
|
101
|
-
|
|
104
|
+
<!-- Teleport target for WindowManager (unique per layout) -->
|
|
105
|
+
<!-- display: contents makes child panels become grid items of the parent grid -->
|
|
106
|
+
<div
|
|
107
|
+
id="wm-container-plain"
|
|
108
|
+
style="display: contents;"
|
|
109
|
+
/>
|
|
102
110
|
</div>
|
|
103
111
|
|
|
104
112
|
<FixedBanner :footer="true" />
|
|
@@ -130,27 +138,6 @@ export default {
|
|
|
130
138
|
}
|
|
131
139
|
}
|
|
132
140
|
|
|
133
|
-
.wm {
|
|
134
|
-
grid-area: wm;
|
|
135
|
-
overflow-y: hidden;
|
|
136
|
-
z-index: z-index('windowsManager');
|
|
137
|
-
position: relative;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.wm-vr {
|
|
141
|
-
grid-area: wm-vr;
|
|
142
|
-
overflow-y: hidden;
|
|
143
|
-
z-index: z-index('windowsManager');
|
|
144
|
-
position: relative;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.wm-vl {
|
|
148
|
-
grid-area: wm-vl;
|
|
149
|
-
overflow-y: hidden;
|
|
150
|
-
z-index: z-index('windowsManager');
|
|
151
|
-
position: relative;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
141
|
MAIN {
|
|
155
142
|
grid-area: main;
|
|
156
143
|
overflow: auto;
|
|
@@ -6,7 +6,7 @@ import { _VIEW, _EDIT } from '@shell/config/query-params';
|
|
|
6
6
|
|
|
7
7
|
interface LabeledFormElementProps {
|
|
8
8
|
mode: string;
|
|
9
|
-
value: string | number | Record<string, any>
|
|
9
|
+
value: string | number | Record<string, any> | null
|
|
10
10
|
required: boolean;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
rules: Array<any>;
|
|
@@ -18,6 +18,8 @@ interface UseLabeledFormElement {
|
|
|
18
18
|
focused: Ref<boolean>;
|
|
19
19
|
blurred: Ref<number | null>;
|
|
20
20
|
requiredField: ComputedRef<any>;
|
|
21
|
+
empty: ComputedRef<boolean>;
|
|
22
|
+
isView: ComputedRef<boolean>;
|
|
21
23
|
isDisabled: ComputedRef<any>;
|
|
22
24
|
validationMessage: ComputedRef<any>;
|
|
23
25
|
onFocusLabeled: () => void;
|
|
@@ -46,7 +48,7 @@ export const labeledFormElementProps = {
|
|
|
46
48
|
default: null
|
|
47
49
|
},
|
|
48
50
|
value: {
|
|
49
|
-
type: [String, Number, Object],
|
|
51
|
+
type: [String, Number, Object, null],
|
|
50
52
|
default: ''
|
|
51
53
|
},
|
|
52
54
|
mode: {
|
|
@@ -82,6 +84,10 @@ export const useLabeledFormElement = (props: LabeledFormElementProps, emit: Emit
|
|
|
82
84
|
return props.required || props.rules?.some((rule: any) => rule?.name === 'required');
|
|
83
85
|
});
|
|
84
86
|
|
|
87
|
+
const empty = computed(() => {
|
|
88
|
+
return !!`${ props.value }`;
|
|
89
|
+
});
|
|
90
|
+
|
|
85
91
|
const isView = computed(() => {
|
|
86
92
|
return props.mode === _VIEW;
|
|
87
93
|
});
|
|
@@ -143,6 +149,8 @@ export const useLabeledFormElement = (props: LabeledFormElementProps, emit: Emit
|
|
|
143
149
|
raised,
|
|
144
150
|
focused,
|
|
145
151
|
blurred,
|
|
152
|
+
empty,
|
|
153
|
+
isView,
|
|
146
154
|
onFocusLabeled,
|
|
147
155
|
onBlurLabeled,
|
|
148
156
|
isDisabled,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { computed, ComputedRef, Ref, nextTick } from 'vue';
|
|
2
|
+
import { getWidth, setWidth } from '@shell/utils/width';
|
|
3
|
+
|
|
4
|
+
interface LabeledSelectProps {
|
|
5
|
+
options?: Array<any>;
|
|
6
|
+
searchable?: boolean;
|
|
7
|
+
filterable?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface UseLabeledSelect {
|
|
11
|
+
isSearchable: ComputedRef<boolean>;
|
|
12
|
+
isFilterable: ComputedRef<boolean>;
|
|
13
|
+
resizeHandler: (selectRef: Ref<HTMLElement | null>) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const useLabeledSelect = (props: LabeledSelectProps, canPaginate?: ComputedRef<boolean>): UseLabeledSelect => {
|
|
17
|
+
const isSearchable = computed(() => {
|
|
18
|
+
if (canPaginate?.value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
const options = props.options || [];
|
|
22
|
+
|
|
23
|
+
if (props.searchable || options.length >= 10) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return false;
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const isFilterable = computed(() => {
|
|
31
|
+
if (canPaginate?.value) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return props.filterable ?? true;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const resizeHandler = (selectRef: Ref<HTMLElement | null>) => {
|
|
39
|
+
// since the DD is positioned there is no way to 'inherit' the size of the input, this calcs the size of the parent and set the dd width if it is smaller. If not let it grow with the regular styles
|
|
40
|
+
nextTick(() => {
|
|
41
|
+
if (!selectRef.value) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const DD = selectRef.value.querySelector('ul.vs__dropdown-menu');
|
|
46
|
+
const selectWidth = getWidth(selectRef.value) || 0;
|
|
47
|
+
const dropWidth = getWidth(DD as Element) || 0;
|
|
48
|
+
|
|
49
|
+
if (dropWidth < selectWidth) {
|
|
50
|
+
setWidth(DD as Element, selectWidth);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
isSearchable,
|
|
57
|
+
isFilterable,
|
|
58
|
+
resizeHandler
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -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',
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
EVENT_LAST_SEEN_TIME,
|
|
5
5
|
EVENT_TYPE,
|
|
6
6
|
SECRET_ORIGIN,
|
|
7
|
-
EVENT_FIRST_SEEN_TIME
|
|
7
|
+
EVENT_FIRST_SEEN_TIME,
|
|
8
|
+
WORKLOAD_HEALTH_SCALE
|
|
8
9
|
} from '@shell/config/table-headers';
|
|
9
10
|
|
|
10
11
|
// This file contains table headers
|
|
@@ -95,3 +96,9 @@ export const STEVE_SECRET_ORIGIN = {
|
|
|
95
96
|
// So we sort by the 'UI_PROJECT_SECRET_COPY' annotation (management.cattle.io/project-scoped-secret-copy) which at least groups the copies.
|
|
96
97
|
sort: `metadata.annotations[${ UI_PROJECT_SECRET_COPY }]:desc`,
|
|
97
98
|
};
|
|
99
|
+
|
|
100
|
+
export const STEVE_WORKLOAD_HEALTH_SCALE = {
|
|
101
|
+
...WORKLOAD_HEALTH_SCALE,
|
|
102
|
+
sort: false,
|
|
103
|
+
search: false,
|
|
104
|
+
};
|
package/config/product/apps.js
CHANGED
package/config/product/auth.js
CHANGED
package/config/product/backup.js
CHANGED
|
@@ -14,7 +14,7 @@ export function init(store) {
|
|
|
14
14
|
headers
|
|
15
15
|
} = DSL(store, NAME);
|
|
16
16
|
|
|
17
|
-
product({ ifHaveGroup: /^(.*\.)*compliance\.cattle\.io
|
|
17
|
+
product({ ifHaveGroup: /^(.*\.)*compliance\.cattle\.io$/, extendable: true });
|
|
18
18
|
|
|
19
19
|
weightType(COMPLIANCE.CLUSTER_SCAN, 3, true);
|
|
20
20
|
weightType(COMPLIANCE.CLUSTER_SCAN_PROFILE, 2, true);
|
|
@@ -27,13 +27,15 @@ import {
|
|
|
27
27
|
|
|
28
28
|
import { DSL } from '@shell/store/type-map';
|
|
29
29
|
import {
|
|
30
|
-
STEVE_AGE_COL, STEVE_EVENT_FIRST_SEEN, STEVE_EVENT_LAST_SEEN, STEVE_EVENT_OBJECT, STEVE_EVENT_TYPE, STEVE_LIST_GROUPS, STEVE_NAMESPACE_COL, STEVE_NAME_COL, STEVE_STATE_COL
|
|
30
|
+
STEVE_AGE_COL, STEVE_EVENT_FIRST_SEEN, STEVE_EVENT_LAST_SEEN, STEVE_EVENT_OBJECT, STEVE_EVENT_TYPE, STEVE_LIST_GROUPS, STEVE_NAMESPACE_COL, STEVE_NAME_COL, STEVE_STATE_COL,
|
|
31
|
+
STEVE_WORKLOAD_HEALTH_SCALE
|
|
31
32
|
} from '@shell/config/pagination-table-headers';
|
|
32
33
|
|
|
33
34
|
import { COLUMN_BREAKPOINTS } from '@shell/types/store/type-map';
|
|
34
35
|
import { STEVE_CACHE } from '@shell/store/features';
|
|
35
36
|
import { configureConditionalDepaginate } from '@shell/store/type-map.utils';
|
|
36
37
|
import { CATTLE_PUBLIC_ENDPOINTS, STORAGE } from '@shell/config/labels-annotations';
|
|
38
|
+
import { POD_LAST_RESTART_FIELD as POD_RESTARTS_LAST_FIELD, POD_RESTART_FIELD as POD_RESTARTS_COUNT_FIELD } from '@shell/types/resources/pod';
|
|
37
39
|
|
|
38
40
|
export const NAME = 'explorer';
|
|
39
41
|
|
|
@@ -58,6 +60,7 @@ export function init(store) {
|
|
|
58
60
|
weight: 3,
|
|
59
61
|
showNamespaceFilter: true,
|
|
60
62
|
icon: 'compass',
|
|
63
|
+
extendable: true,
|
|
61
64
|
typeStoreMap: {
|
|
62
65
|
[MANAGEMENT.PROJECT]: 'management',
|
|
63
66
|
[MANAGEMENT.CLUSTER_ROLE_TEMPLATE_BINDING]: 'management',
|
|
@@ -386,11 +389,11 @@ export function init(store) {
|
|
|
386
389
|
headers(WORKLOAD, [STATE, NAME_COL, NAMESPACE_COL, TYPE, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE]);
|
|
387
390
|
headers(WORKLOAD_TYPES.DEPLOYMENT,
|
|
388
391
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Ready', 'Up-to-date', 'Available', POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
389
|
-
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(6), STEVE_WORKLOAD_ENDPOINTS, 'Ready', 'Up-to-date', 'Available', STEVE_AGE_COL],
|
|
392
|
+
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(6), STEVE_WORKLOAD_ENDPOINTS, 'Ready', 'Up-to-date', 'Available', STEVE_AGE_COL, STEVE_WORKLOAD_HEALTH_SCALE],
|
|
390
393
|
);
|
|
391
394
|
headers(WORKLOAD_TYPES.DAEMON_SET,
|
|
392
395
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Ready', 'Current', 'Desired', POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
393
|
-
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(9), STEVE_WORKLOAD_ENDPOINTS, 'Ready', 'Current', 'Desired', STEVE_AGE_COL]
|
|
396
|
+
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(9), STEVE_WORKLOAD_ENDPOINTS, 'Ready', 'Current', 'Desired', STEVE_AGE_COL, STEVE_WORKLOAD_HEALTH_SCALE]
|
|
394
397
|
);
|
|
395
398
|
headers(WORKLOAD_TYPES.REPLICA_SET,
|
|
396
399
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Ready', 'Current', 'Desired', POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
@@ -398,7 +401,7 @@ export function init(store) {
|
|
|
398
401
|
);
|
|
399
402
|
headers(WORKLOAD_TYPES.STATEFUL_SET,
|
|
400
403
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Ready', POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
401
|
-
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(4), STEVE_WORKLOAD_ENDPOINTS, 'Ready', STEVE_AGE_COL],
|
|
404
|
+
[STEVE_STATE_COL, STEVE_NAME_COL, STEVE_NAMESPACE_COL, createSteveWorkloadImageCol(4), STEVE_WORKLOAD_ENDPOINTS, 'Ready', STEVE_AGE_COL, STEVE_WORKLOAD_HEALTH_SCALE],
|
|
402
405
|
);
|
|
403
406
|
headers(WORKLOAD_TYPES.JOB,
|
|
404
407
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Completions', DURATION, POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
@@ -408,7 +411,7 @@ export function init(store) {
|
|
|
408
411
|
sort: 'metadata.fields.3',
|
|
409
412
|
search: 'metadata.fields.3',
|
|
410
413
|
formatter: undefined, // Now that sort/search is remote we're not doing weird things with start time (see `duration` in model)
|
|
411
|
-
}, STEVE_AGE_COL],
|
|
414
|
+
}, STEVE_AGE_COL, STEVE_WORKLOAD_HEALTH_SCALE],
|
|
412
415
|
);
|
|
413
416
|
headers(WORKLOAD_TYPES.CRON_JOB,
|
|
414
417
|
[STATE, NAME_COL, NAMESPACE_COL, WORKLOAD_IMAGES, WORKLOAD_ENDPOINTS, 'Schedule', 'Last Schedule', POD_RESTARTS, AGE, WORKLOAD_HEALTH_SCALE],
|
|
@@ -428,7 +431,23 @@ export function init(store) {
|
|
|
428
431
|
...POD_IMAGES,
|
|
429
432
|
sort: false,
|
|
430
433
|
search: 'spec.containers.image'
|
|
431
|
-
},
|
|
434
|
+
},
|
|
435
|
+
'Ready',
|
|
436
|
+
{
|
|
437
|
+
name: 'pod-restart',
|
|
438
|
+
labelKey: 'tableHeaders.podRestarts',
|
|
439
|
+
search: false,
|
|
440
|
+
sort: [POD_RESTARTS_COUNT_FIELD, POD_RESTARTS_LAST_FIELD, 'metadata.name'],
|
|
441
|
+
value: 'restartsCount',
|
|
442
|
+
}, {
|
|
443
|
+
name: 'pod-last-restart',
|
|
444
|
+
labelKey: 'tableHeaders.podLastRestart',
|
|
445
|
+
value: 'restartsLaster',
|
|
446
|
+
search: false,
|
|
447
|
+
sort: [POD_RESTARTS_LAST_FIELD, POD_RESTARTS_COUNT_FIELD, 'metadata.name'],
|
|
448
|
+
},
|
|
449
|
+
'IP',
|
|
450
|
+
{
|
|
432
451
|
...NODE_COL,
|
|
433
452
|
search: 'spec.nodeName'
|
|
434
453
|
},
|
package/config/product/fleet.js
CHANGED
package/config/product/istio.js
CHANGED
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')),
|