@rancher/shell 3.0.9-rc.1 → 3.0.9-rc.3
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/styles/base/_color.scss +1 -0
- package/assets/styles/base/_typography.scss +14 -5
- package/assets/styles/themes/_light.scss +1 -1
- package/assets/styles/themes/_modern.scss +1 -1
- package/assets/translations/en-us.yaml +104 -33
- package/assets/translations/zh-hans.yaml +13 -2
- package/components/ActionMenu.vue +7 -8
- package/components/ActionMenuShell.vue +23 -24
- package/components/CodeMirror.vue +4 -3
- package/components/DetailText.vue +54 -7
- package/components/Drawer/Chrome.vue +11 -4
- package/components/Drawer/DrawerCard.vue +19 -0
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +3 -11
- package/components/Drawer/ResourceDetailDrawer/__tests__/ConfigTab.test.ts +2 -2
- package/components/Drawer/ResourceDetailDrawer/index.vue +3 -20
- package/components/Drawer/types.ts +1 -0
- package/components/DynamicContent/DynamicContentCloseButton.vue +2 -2
- package/components/LocaleSelector.vue +1 -1
- package/components/Markdown.vue +1 -1
- package/components/PopoverCard.vue +3 -3
- package/components/Resource/Detail/Card/ExtrasCard.vue +39 -0
- package/components/Resource/Detail/Card/Scaler.vue +10 -2
- package/components/Resource/Detail/Card/StateCard/__tests__/composables.test.ts +142 -0
- package/components/Resource/Detail/Card/StateCard/composables.ts +41 -11
- package/components/Resource/Detail/Card/StateCard/index.vue +3 -9
- package/components/Resource/Detail/Card/StateCard/types.ts +6 -0
- package/components/Resource/Detail/Card/{PodsCard → StatusCard}/index.vue +14 -10
- package/components/Resource/Detail/Card/__tests__/PodsCard.test.ts +24 -25
- package/components/Resource/Detail/Cards.vue +27 -0
- package/components/Resource/Detail/Masthead/__tests__/index.test.ts +70 -0
- package/components/Resource/Detail/Masthead/index.vue +5 -0
- package/components/Resource/Detail/Metadata/KeyValueRow.vue +4 -2
- package/components/Resource/Detail/ResourcePopover/ResourcePopoverCard.vue +2 -2
- package/components/Resource/Detail/ResourceRow.types.ts +14 -0
- package/components/Resource/Detail/ResourceRow.vue +23 -35
- package/components/Resource/Detail/StatusRow.vue +5 -2
- package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +38 -7
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +106 -2
- package/components/Resource/Detail/TitleBar/composables.ts +2 -1
- package/components/Resource/Detail/TitleBar/index.vue +41 -6
- package/components/ResourceDetail/Masthead/__tests__/index.test.ts +49 -1
- package/components/ResourceDetail/Masthead/__tests__/latest.test.ts +85 -0
- package/components/ResourceDetail/Masthead/index.vue +1 -0
- package/components/ResourceDetail/Masthead/latest.vue +8 -1
- package/components/ResourceDetail/Masthead/legacy.vue +1 -1
- package/components/ResourceTable.vue +1 -1
- package/components/Setting.vue +1 -1
- package/components/SortableTable/index.vue +25 -0
- package/components/SortableTable/selection.js +25 -12
- package/components/SortableTable/sorting.js +1 -1
- package/components/Tabbed/Tab.vue +5 -0
- package/components/Tabbed/index.vue +40 -9
- package/components/Window/ContainerShell.vue +10 -13
- package/components/__tests__/ProjectRow.test.ts +102 -15
- package/components/fleet/FleetClusterTargets/TargetsList.vue +47 -29
- package/components/fleet/FleetClusterTargets/index.vue +82 -29
- package/components/fleet/FleetClusters.vue +26 -12
- package/components/fleet/FleetGitRepoPaths.vue +2 -2
- package/components/fleet/FleetResources.vue +14 -0
- package/components/fleet/FleetValuesFrom.vue +2 -2
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +531 -0
- package/components/fleet/__tests__/FleetClusters.test.ts +576 -0
- package/components/fleet/dashboard/ResourceDetails.vue +96 -123
- package/components/form/Conditions.vue +1 -15
- package/components/form/HookOption.vue +5 -0
- package/components/form/LabeledSelect.vue +1 -1
- package/components/form/LifecycleHooks.vue +2 -6
- package/components/form/ResourceLabeledSelect.vue +12 -1
- package/components/form/ResourceQuota/Project.vue +59 -8
- package/components/form/ResourceQuota/ProjectRow.vue +116 -21
- package/components/form/ResourceQuota/shared.js +42 -18
- package/components/form/SeccompProfile.vue +113 -0
- package/components/form/Security.vue +244 -133
- package/components/form/__tests__/LabeledSelect.test.ts +1 -1
- package/components/form/__tests__/SeccompProfile.test.js +124 -0
- package/components/form/__tests__/Security.test.ts +125 -37
- package/components/formatter/Autoscaler.vue +2 -2
- package/components/formatter/FleetSummaryGraph.vue +4 -1
- package/components/formatter/LinkName.vue +3 -2
- package/components/nav/Group.vue +5 -0
- package/components/nav/Header.vue +3 -3
- package/components/nav/HeaderPageActionMenu.vue +1 -1
- package/components/nav/NamespaceFilter.vue +6 -6
- package/components/nav/NotificationCenter/index.vue +1 -1
- package/components/nav/TopLevelMenu.helper.ts +41 -16
- package/components/nav/TopLevelMenu.vue +45 -25
- package/components/nav/WorkspaceSwitcher.vue +1 -1
- package/components/nav/__tests__/TopLevelMenu.helper.test.ts +277 -0
- package/components/nav/__tests__/TopLevelMenu.test.ts +160 -4
- package/components/templates/default.vue +0 -3
- package/components/templates/home.vue +0 -3
- package/components/templates/plain.vue +0 -3
- package/composables/useClickOutside.ts +1 -1
- package/config/product/explorer.js +2 -3
- package/config/table-headers.js +9 -7
- package/config/types.js +45 -9
- package/detail/__tests__/workload.test.ts +8 -16
- package/detail/catalog.cattle.io.app.vue +5 -0
- package/detail/fleet.cattle.io.cluster.vue +6 -0
- package/detail/management.cattle.io.oidcclient.vue +15 -4
- package/detail/workload/index.vue +7 -109
- package/edit/__tests__/management.cattle.io.project.test.js +137 -0
- package/edit/__tests__/projectsecret.test.ts +42 -0
- package/edit/auth/__tests__/oidc.test.ts +50 -0
- package/edit/auth/oidc.vue +68 -44
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +140 -59
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +41 -5
- package/edit/management.cattle.io.project.vue +36 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +16 -3
- package/edit/projectsecret.vue +29 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +89 -200
- package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +58 -17
- package/edit/provisioning.cattle.io.cluster/rke2.vue +11 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +3 -63
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +82 -14
- package/edit/workload/__tests__/index.test.ts +3 -4
- package/edit/workload/index.vue +47 -28
- package/edit/workload/mixins/workload.js +66 -31
- package/initialize/install-plugins.js +0 -2
- package/list/catalog.cattle.io.clusterrepo.vue +1 -1
- package/list/projectsecret.vue +2 -2
- package/machine-config/__tests__/vmwarevsphere.test.ts +64 -0
- package/machine-config/amazonec2.vue +2 -2
- package/machine-config/vmwarevsphere.vue +58 -4
- package/mixins/__tests__/chart.test.ts +63 -0
- package/mixins/chart.js +56 -51
- package/models/__tests__/catalog.cattle.io.app.test.ts +33 -0
- package/models/__tests__/workload.test.ts +333 -0
- package/models/catalog.cattle.io.app.js +8 -0
- package/models/management.cattle.io.cluster.js +22 -30
- package/models/pod.js +14 -0
- package/models/provisioning.cattle.io.cluster.js +2 -2
- package/models/secret.js +1 -1
- package/models/workload.js +93 -27
- package/package.json +4 -4
- package/pages/__tests__/diagnostic.test.ts +71 -0
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +91 -0
- package/pages/c/_cluster/apps/charts/install.vue +4 -4
- package/pages/c/_cluster/explorer/EventsTable.vue +2 -2
- package/pages/c/_cluster/explorer/tools/index.vue +23 -5
- package/pages/c/_cluster/fleet/index.vue +14 -8
- package/pages/c/_cluster/manager/hostedprovider/index.vue +1 -19
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +18 -5
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/index.vue +41 -9
- package/pages/diagnostic.vue +17 -3
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +234 -0
- package/plugins/dashboard-store/actions.js +9 -8
- package/plugins/dashboard-store/resource-class.js +97 -1
- package/plugins/steve/__tests__/revision.test.ts +84 -0
- package/plugins/steve/__tests__/steve-pagination-utils.test.ts +30 -0
- package/plugins/steve/__tests__/subscribe.spec.ts +134 -0
- package/plugins/steve/revision.ts +26 -0
- package/plugins/steve/steve-pagination-utils.ts +6 -5
- package/plugins/steve/subscribe.js +188 -49
- package/plugins/subscribe-events.ts +2 -2
- package/rancher-components/Form/Checkbox/Checkbox.vue +13 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +1 -1
- package/rancher-components/Pill/RcCounterBadge/RcCounterBadge.vue +2 -1
- package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +3 -1
- package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.vue +3 -1
- package/rancher-components/Pill/RcTag/RcTag.vue +1 -1
- package/rancher-components/Pill/index.ts +4 -0
- package/rancher-components/RcButton/RcButton.test.ts +53 -9
- package/rancher-components/RcButton/RcButton.vue +217 -25
- package/rancher-components/RcButton/types.ts +27 -1
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +4 -4
- package/rancher-components/RcDropdown/types.ts +3 -3
- package/rancher-components/RcIcon/RcIcon.test.ts +42 -0
- package/rancher-components/RcIcon/RcIcon.vue +9 -6
- package/rancher-components/RcIcon/types.ts +13 -9
- package/rancher-components/RcItemCard/RcItemCard.test.ts +16 -6
- package/rancher-components/RcItemCard/RcItemCard.vue +13 -23
- package/rancher-components/utils/status.test.ts +10 -15
- package/rancher-components/utils/status.ts +5 -6
- package/store/__tests__/auth.test.ts +21 -5
- package/store/auth.js +6 -3
- package/store/aws.js +18 -12
- package/store/index.js +4 -8
- package/store/type-map.utils.ts +1 -1
- package/types/kube/kube-api.ts +29 -3
- package/types/rancher/steve.api.ts +40 -0
- package/types/shell/index.d.ts +262 -156
- package/types/store/pagination.types.ts +1 -0
- package/types/store/subscribe-events.types.ts +1 -0
- package/utils/__tests__/azure.test.ts +56 -0
- package/utils/__tests__/back-off.test.ts +364 -245
- package/utils/__tests__/error.test.ts +44 -0
- package/utils/__tests__/fleet.test.ts +8 -1
- package/utils/__tests__/pagination-wrapper.test.ts +167 -0
- package/utils/__tests__/version.test.ts +55 -1
- package/utils/azure.js +12 -0
- package/utils/back-off.ts +302 -69
- package/utils/dynamic-content/__tests__/index.test.ts +1 -1
- package/utils/dynamic-content/__tests__/new-release.test.ts +48 -7
- package/utils/dynamic-content/__tests__/support-notice.test.ts +1 -4
- package/utils/dynamic-content/index.ts +1 -6
- package/utils/dynamic-content/new-release.ts +5 -3
- package/utils/dynamic-content/types.d.ts +0 -1
- package/utils/error.js +9 -0
- package/utils/fleet.ts +2 -2
- package/utils/inactivity.ts +2 -3
- package/utils/pagination-wrapper.ts +99 -15
- package/utils/validators/formRules/index.ts +3 -0
- package/utils/version.js +38 -0
- package/components/auth/AzureWarning.vue +0 -77
- /package/components/Resource/Detail/{Card/PodsCard/Bubble.vue → Bubble.vue} +0 -0
- /package/components/Resource/Detail/Card/{PodsCard → StatusCard}/composable.ts +0 -0
|
@@ -1,62 +1,86 @@
|
|
|
1
|
+
export const TYPES = {
|
|
2
|
+
EXTENDED: 'extended',
|
|
3
|
+
CONFIG_MAPS: 'configMaps',
|
|
4
|
+
LIMITS_CPU: 'limitsCpu',
|
|
5
|
+
LIMITS_MEM: 'limitsMemory',
|
|
6
|
+
PVC: 'persistentVolumeClaims',
|
|
7
|
+
PODS: 'pods',
|
|
8
|
+
REPLICATION_CONTROLLERS: 'replicationControllers',
|
|
9
|
+
REQUESTS_CPU: 'requestsCpu',
|
|
10
|
+
REQUESTS_MEMORY: 'requestsMemory',
|
|
11
|
+
REQUESTS_STORAGE: 'requestsStorage',
|
|
12
|
+
SECRETS: 'secrets',
|
|
13
|
+
SERVICES: 'services',
|
|
14
|
+
SERVICES_LOAD_BALANCERS: 'servicesLoadBalancers',
|
|
15
|
+
SERVICES_NODE_PORTS: 'servicesNodePorts',
|
|
16
|
+
};
|
|
17
|
+
|
|
1
18
|
export const RANCHER_TYPES = [
|
|
2
19
|
{
|
|
3
|
-
value:
|
|
20
|
+
value: TYPES.EXTENDED,
|
|
21
|
+
inputExponent: 0,
|
|
22
|
+
baseUnit: '',
|
|
23
|
+
labelKey: 'resourceQuota.custom',
|
|
24
|
+
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: TYPES.CONFIG_MAPS,
|
|
4
28
|
inputExponent: 0,
|
|
5
29
|
baseUnit: '',
|
|
6
30
|
labelKey: 'resourceQuota.configMaps',
|
|
7
31
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
8
32
|
},
|
|
9
33
|
{
|
|
10
|
-
value:
|
|
34
|
+
value: TYPES.LIMITS_CPU,
|
|
11
35
|
inputExponent: -1,
|
|
12
36
|
baseUnitKey: 'suffix.cpus',
|
|
13
37
|
labelKey: 'resourceQuota.limitsCpu',
|
|
14
38
|
placeholderKey: 'resourceQuota.projectLimit.cpuPlaceholder'
|
|
15
39
|
},
|
|
16
40
|
{
|
|
17
|
-
value:
|
|
41
|
+
value: TYPES.LIMITS_MEM,
|
|
18
42
|
inputExponent: 2,
|
|
19
43
|
increment: 1024,
|
|
20
44
|
labelKey: 'resourceQuota.limitsMemory',
|
|
21
45
|
placeholderKey: 'resourceQuota.projectLimit.memoryPlaceholder'
|
|
22
46
|
},
|
|
23
47
|
{
|
|
24
|
-
value:
|
|
48
|
+
value: TYPES.PVC,
|
|
25
49
|
inputExponent: 0,
|
|
26
50
|
baseUnit: '',
|
|
27
51
|
labelKey: 'resourceQuota.persistentVolumeClaims',
|
|
28
52
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
29
53
|
},
|
|
30
54
|
{
|
|
31
|
-
value:
|
|
55
|
+
value: TYPES.PODS,
|
|
32
56
|
inputExponent: 0,
|
|
33
57
|
baseUnit: '',
|
|
34
58
|
labelKey: 'resourceQuota.pods',
|
|
35
59
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
36
60
|
},
|
|
37
61
|
{
|
|
38
|
-
value:
|
|
62
|
+
value: TYPES.REPLICATION_CONTROLLERS,
|
|
39
63
|
inputExponent: 0,
|
|
40
64
|
baseUnit: '',
|
|
41
65
|
labelKey: 'resourceQuota.replicationControllers',
|
|
42
66
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
43
67
|
},
|
|
44
68
|
{
|
|
45
|
-
value:
|
|
69
|
+
value: TYPES.REQUESTS_CPU,
|
|
46
70
|
inputExponent: -1,
|
|
47
71
|
baseUnitKey: 'suffix.cpus',
|
|
48
72
|
labelKey: 'resourceQuota.requestsCpu',
|
|
49
73
|
placeholderKey: 'resourceQuota.projectLimit.cpuPlaceholder'
|
|
50
74
|
},
|
|
51
75
|
{
|
|
52
|
-
value:
|
|
76
|
+
value: TYPES.REQUESTS_MEMORY,
|
|
53
77
|
inputExponent: 2,
|
|
54
78
|
increment: 1024,
|
|
55
79
|
labelKey: 'resourceQuota.requestsMemory',
|
|
56
80
|
placeholderKey: 'resourceQuota.projectLimit.memoryPlaceholder'
|
|
57
81
|
},
|
|
58
82
|
{
|
|
59
|
-
value:
|
|
83
|
+
value: TYPES.REQUESTS_STORAGE,
|
|
60
84
|
units: 'storage',
|
|
61
85
|
inputExponent: 2,
|
|
62
86
|
increment: 1024,
|
|
@@ -64,7 +88,7 @@ export const RANCHER_TYPES = [
|
|
|
64
88
|
placeholderKey: 'resourceQuota.projectLimit.storagePlaceholder'
|
|
65
89
|
},
|
|
66
90
|
{
|
|
67
|
-
value:
|
|
91
|
+
value: TYPES.SECRETS,
|
|
68
92
|
units: 'unitless',
|
|
69
93
|
inputExponent: 0,
|
|
70
94
|
baseUnit: '',
|
|
@@ -72,7 +96,7 @@ export const RANCHER_TYPES = [
|
|
|
72
96
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
73
97
|
},
|
|
74
98
|
{
|
|
75
|
-
value:
|
|
99
|
+
value: TYPES.SERVICES,
|
|
76
100
|
units: 'unitless',
|
|
77
101
|
inputExponent: 0,
|
|
78
102
|
baseUnit: '',
|
|
@@ -80,7 +104,7 @@ export const RANCHER_TYPES = [
|
|
|
80
104
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
81
105
|
},
|
|
82
106
|
{
|
|
83
|
-
value:
|
|
107
|
+
value: TYPES.SERVICES_LOAD_BALANCERS,
|
|
84
108
|
units: 'unitless',
|
|
85
109
|
inputExponent: 0,
|
|
86
110
|
baseUnit: '',
|
|
@@ -88,7 +112,7 @@ export const RANCHER_TYPES = [
|
|
|
88
112
|
placeholderKey: 'resourceQuota.projectLimit.unitlessPlaceholder'
|
|
89
113
|
},
|
|
90
114
|
{
|
|
91
|
-
value:
|
|
115
|
+
value: TYPES.SERVICES_NODE_PORTS,
|
|
92
116
|
units: 'unitless',
|
|
93
117
|
inputExponent: 0,
|
|
94
118
|
baseUnit: '',
|
|
@@ -99,28 +123,28 @@ export const RANCHER_TYPES = [
|
|
|
99
123
|
|
|
100
124
|
export const HARVESTER_TYPES = [
|
|
101
125
|
{
|
|
102
|
-
value:
|
|
126
|
+
value: TYPES.LIMITS_CPU,
|
|
103
127
|
inputExponent: -1,
|
|
104
128
|
baseUnitKey: 'suffix.cpus',
|
|
105
129
|
labelKey: 'resourceQuota.limitsCpu',
|
|
106
130
|
placeholderKey: 'resourceQuota.projectLimit.cpuPlaceholder'
|
|
107
131
|
},
|
|
108
132
|
{
|
|
109
|
-
value:
|
|
133
|
+
value: TYPES.LIMITS_MEM,
|
|
110
134
|
inputExponent: 2,
|
|
111
135
|
increment: 1024,
|
|
112
136
|
labelKey: 'resourceQuota.limitsMemory',
|
|
113
137
|
placeholderKey: 'resourceQuota.projectLimit.memoryPlaceholder'
|
|
114
138
|
},
|
|
115
139
|
{
|
|
116
|
-
value:
|
|
140
|
+
value: TYPES.REQUESTS_CPU,
|
|
117
141
|
inputExponent: -1,
|
|
118
142
|
baseUnitKey: 'suffix.cpus',
|
|
119
143
|
labelKey: 'resourceQuota.requestsCpu',
|
|
120
144
|
placeholderKey: 'resourceQuota.projectLimit.cpuPlaceholder'
|
|
121
145
|
},
|
|
122
146
|
{
|
|
123
|
-
value:
|
|
147
|
+
value: TYPES.REQUESTS_MEMORY,
|
|
124
148
|
inputExponent: 2,
|
|
125
149
|
increment: 1024,
|
|
126
150
|
labelKey: 'resourceQuota.requestsMemory',
|
|
@@ -130,7 +154,7 @@ export const HARVESTER_TYPES = [
|
|
|
130
154
|
|
|
131
155
|
export const ROW_COMPUTED = {
|
|
132
156
|
typeOption() {
|
|
133
|
-
return this.types.find((type) => type.value === this.type);
|
|
157
|
+
return this.types.find((type) => type.value === this.type.split('.')[0]);
|
|
134
158
|
}
|
|
135
159
|
};
|
|
136
160
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
3
|
+
import { mapGetters } from 'vuex';
|
|
4
|
+
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
emits: ['update:value'],
|
|
8
|
+
|
|
9
|
+
components: {
|
|
10
|
+
LabeledInput,
|
|
11
|
+
LabeledSelect
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
props: {
|
|
15
|
+
value: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
mode: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'mode'
|
|
22
|
+
},
|
|
23
|
+
seccompProfileTypes: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default: () => []
|
|
26
|
+
},
|
|
27
|
+
title: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
data() {
|
|
34
|
+
const { type, localhostProfile } = this.value || {};
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
type: type || 'None',
|
|
38
|
+
localhostProfile,
|
|
39
|
+
afterLocalhostProfileSelectedMessage: ''
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
computed: { ...mapGetters({ t: 'i18n/t' }) },
|
|
44
|
+
|
|
45
|
+
methods: {
|
|
46
|
+
update() {
|
|
47
|
+
if (this.type === 'None') {
|
|
48
|
+
this.$emit('update:value', undefined);
|
|
49
|
+
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const seccompProfile = { type: this.type };
|
|
54
|
+
|
|
55
|
+
if (this.type === 'Localhost') {
|
|
56
|
+
seccompProfile.localhostProfile = this.localhostProfile;
|
|
57
|
+
this.afterLocalhostProfileSelectedMessage = this.t('workload.container.security.seccompProfile.afterLocalhostProfile.selected');
|
|
58
|
+
} else {
|
|
59
|
+
this.afterLocalhostProfileSelectedMessage = this.t('workload.container.security.seccompProfile.afterLocalhostProfile.unselected');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
this.$emit('update:value', seccompProfile);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<fieldset>
|
|
70
|
+
<legend class="h3-legend">
|
|
71
|
+
{{ title }}
|
|
72
|
+
</legend>
|
|
73
|
+
<div class="row">
|
|
74
|
+
<div
|
|
75
|
+
data-testid="input-security-seccompProfile-type"
|
|
76
|
+
class="col span-6"
|
|
77
|
+
>
|
|
78
|
+
<LabeledSelect
|
|
79
|
+
v-model:value="type"
|
|
80
|
+
:mode="mode"
|
|
81
|
+
:label="t('workload.container.security.seccompProfile.type')"
|
|
82
|
+
:options="seccompProfileTypes"
|
|
83
|
+
data-testid="seccomp-type-select"
|
|
84
|
+
@update:value="update"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
<p
|
|
88
|
+
id="after-localhostprofile-selected"
|
|
89
|
+
role="status"
|
|
90
|
+
aria-live="polite"
|
|
91
|
+
class="sr-only"
|
|
92
|
+
>
|
|
93
|
+
{{ afterLocalhostProfileSelectedMessage }}
|
|
94
|
+
</p>
|
|
95
|
+
<div
|
|
96
|
+
data-testid="input-security-seccompProfile-localhostProfile"
|
|
97
|
+
class="col span-6"
|
|
98
|
+
>
|
|
99
|
+
<LabeledInput
|
|
100
|
+
v-if="type === 'Localhost'"
|
|
101
|
+
v-model:value="localhostProfile"
|
|
102
|
+
:mode="mode"
|
|
103
|
+
:label="t('workload.container.security.seccompProfile.localhostProfile.label')"
|
|
104
|
+
:required="true"
|
|
105
|
+
:tooltip="t('workload.container.security.seccompProfile.localhostProfile.tooltip')"
|
|
106
|
+
:placeholder="t('workload.container.security.seccompProfile.localhostProfile.placeholder')"
|
|
107
|
+
data-testid="seccomp-localhost-input"
|
|
108
|
+
@update:value="update"
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</fieldset>
|
|
113
|
+
</template>
|