@rancher/shell 3.0.8 → 3.0.9-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/apis/intf/modal.ts +38 -0
- package/apis/intf/slide-in.ts +3 -1
- package/apis/shell/__tests__/slide-in.test.ts +36 -0
- package/apis/shell/slide-in.ts +5 -1
- 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 +94 -33
- package/assets/translations/zh-hans.yaml +0 -2
- package/components/ActionMenuShell.vue +4 -4
- 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/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 +11 -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/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 +1 -0
- package/components/Tabbed/index.vue +29 -6
- package/components/Window/ContainerShell.vue +10 -13
- 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/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/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 +1 -2
- package/config/types.js +41 -8
- package/detail/__tests__/workload.test.ts +8 -16
- package/detail/catalog.cattle.io.app.vue +6 -0
- package/detail/fleet.cattle.io.cluster.vue +6 -0
- package/detail/workload/index.vue +7 -109
- 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/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 +122 -85
- package/edit/workload/index.vue +48 -29
- package/edit/workload/mixins/workload.js +85 -32
- 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__/brand.spec.ts +18 -13
- 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/pod.js +14 -0
- package/models/secret.js +1 -1
- package/models/workload.js +93 -27
- package/package.json +4 -4
- 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/fleet/index.vue +18 -12
- package/pages/c/_cluster/manager/hostedprovider/index.vue +1 -19
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
- package/pages/c/_cluster/uiplugins/index.vue +1 -1
- 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/mutations.js +9 -0
- package/plugins/steve/revision.ts +26 -0
- package/plugins/steve/steve-pagination-utils.ts +6 -5
- package/plugins/steve/subscribe.js +211 -51
- 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 +1 -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/utils/status.test.ts +10 -15
- package/rancher-components/utils/status.ts +5 -6
- 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 +99 -0
- package/types/store/dashboard-store.types.ts +29 -7
- 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/cspAdaptor.ts +32 -14
- 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 +101 -17
- 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,20 +1,26 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
import { FLEET } from '@shell/config/types';
|
|
4
|
-
import LabeledSelect from '@shell/components/form/LabeledSelect.vue';
|
|
5
4
|
import FleetResources from '@shell/components/fleet/FleetResources.vue';
|
|
6
|
-
import { RcButton } from '@components/RcButton';
|
|
7
5
|
import { FleetDashboardState } from '@shell/types/fleet';
|
|
8
6
|
import FleetApplicationSource from '@shell/components/formatter/FleetApplicationSource.vue';
|
|
7
|
+
import FleetClusters from '@shell/components/fleet/FleetClusters.vue';
|
|
8
|
+
import Tabbed from '@shell/components/Tabbed/index.vue';
|
|
9
|
+
import Tab from '@shell/components/Tabbed/Tab.vue';
|
|
10
|
+
import Drawer from '@shell/components/Drawer/Chrome.vue';
|
|
11
|
+
import DrawerCard from '@shell/components/Drawer/DrawerCard.vue';
|
|
9
12
|
|
|
10
13
|
export default {
|
|
11
14
|
name: 'FleetDashboardResourceDetails',
|
|
12
15
|
|
|
13
16
|
components: {
|
|
14
|
-
LabeledSelect,
|
|
15
17
|
FleetResources,
|
|
16
18
|
FleetApplicationSource,
|
|
17
|
-
|
|
19
|
+
FleetClusters,
|
|
20
|
+
Tabbed,
|
|
21
|
+
Tab,
|
|
22
|
+
Drawer,
|
|
23
|
+
DrawerCard,
|
|
18
24
|
},
|
|
19
25
|
|
|
20
26
|
props: {
|
|
@@ -46,20 +52,18 @@ export default {
|
|
|
46
52
|
},
|
|
47
53
|
|
|
48
54
|
mounted() {
|
|
49
|
-
this.clusterId =
|
|
55
|
+
this.clusterId = '';
|
|
50
56
|
},
|
|
51
57
|
|
|
52
58
|
computed: {
|
|
53
|
-
clusters() {
|
|
54
|
-
return this.value.targetClusters.map((cluster: { id: string, nameDisplay: string }) => ({
|
|
55
|
-
label: cluster.nameDisplay,
|
|
56
|
-
value: cluster.id
|
|
57
|
-
}));
|
|
58
|
-
},
|
|
59
|
-
|
|
60
59
|
noResources() {
|
|
61
60
|
return !this.value.resourcesStatuses?.length;
|
|
62
61
|
},
|
|
62
|
+
|
|
63
|
+
clusterSchema() {
|
|
64
|
+
return this.$store.getters['management/schemaFor'](FLEET.CLUSTER);
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
},
|
|
64
68
|
|
|
65
69
|
methods: {
|
|
@@ -71,124 +75,93 @@ export default {
|
|
|
71
75
|
</script>
|
|
72
76
|
|
|
73
77
|
<template>
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
<Drawer
|
|
79
|
+
:ariaTarget="value.id"
|
|
80
|
+
:removeFooter="true"
|
|
81
|
+
@close="closePanel"
|
|
82
|
+
>
|
|
83
|
+
<template
|
|
84
|
+
#title
|
|
77
85
|
:data-testid="'fleet-dashboard-resource-details-header'"
|
|
78
86
|
>
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
class="label"
|
|
83
|
-
:to="detailLocation"
|
|
84
|
-
>
|
|
85
|
-
{{ value.id }}
|
|
86
|
-
</router-link>
|
|
87
|
-
<i
|
|
88
|
-
v-if="statePanel.id !== 'success'"
|
|
89
|
-
class="ml-5 state-icon"
|
|
90
|
-
:class="statePanel.icon"
|
|
91
|
-
:style="{ color: statePanel.color }"
|
|
92
|
-
/>
|
|
93
|
-
</h3>
|
|
94
|
-
<RcButton
|
|
95
|
-
small
|
|
96
|
-
ghost
|
|
97
|
-
data-testid="slide-in-close"
|
|
98
|
-
:aria-label="'slide-in-close'"
|
|
99
|
-
tabindex="0"
|
|
100
|
-
@click="closePanel"
|
|
101
|
-
@keydown.space.enter.stop.prevent="closePanel"
|
|
102
|
-
>
|
|
103
|
-
<i class="icon icon-close" />
|
|
104
|
-
</RcButton>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<h4>
|
|
108
|
-
{{ t('fleet.dashboard.source') }}
|
|
109
|
-
</h4>
|
|
110
|
-
<div class="mb-15">
|
|
111
|
-
<FleetApplicationSource
|
|
112
|
-
v-if="value.source.value"
|
|
113
|
-
:row="value"
|
|
87
|
+
<i
|
|
88
|
+
class="icon-lg mmr-3"
|
|
89
|
+
:class="value.dashboardIcon"
|
|
114
90
|
/>
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
91
|
+
<router-link
|
|
92
|
+
class="label"
|
|
93
|
+
:to="detailLocation"
|
|
118
94
|
>
|
|
119
|
-
|
|
120
|
-
</
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
95
|
+
{{ value.id }}
|
|
96
|
+
</router-link>
|
|
97
|
+
<i
|
|
98
|
+
v-if="statePanel.id !== 'success'"
|
|
99
|
+
class="ml-5 state-icon icon-lg"
|
|
100
|
+
:class="statePanel.icon"
|
|
101
|
+
:style="{ color: statePanel.color }"
|
|
102
|
+
/>
|
|
103
|
+
</template>
|
|
104
|
+
<template #body>
|
|
105
|
+
<Tabbed
|
|
106
|
+
v-bind="$attrs"
|
|
107
|
+
:default-tab="'clusters'"
|
|
108
|
+
:resource="value"
|
|
109
|
+
:use-hash="true"
|
|
110
|
+
:remove-borders="true"
|
|
134
111
|
>
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
:
|
|
142
|
-
:
|
|
112
|
+
<Tab
|
|
113
|
+
:label="t('fleet.dashboard.resourceDetails.clusters')"
|
|
114
|
+
name="clusters"
|
|
115
|
+
>
|
|
116
|
+
<DrawerCard>
|
|
117
|
+
<FleetClusters
|
|
118
|
+
:schema="clusterSchema"
|
|
119
|
+
:rows="value.targetClusters"
|
|
120
|
+
:table-actions="false"
|
|
121
|
+
:row-actions="false"
|
|
122
|
+
:search="true"
|
|
123
|
+
:remove-sub-rows="true"
|
|
124
|
+
:ignore-filter="true"
|
|
125
|
+
paging-label="sortableTable.paging.resource"
|
|
143
126
|
/>
|
|
144
|
-
</
|
|
145
|
-
</
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
127
|
+
</DrawerCard>
|
|
128
|
+
</Tab>
|
|
129
|
+
<Tab
|
|
130
|
+
:label="t('fleet.dashboard.resourceDetails.resources')"
|
|
131
|
+
name="resources"
|
|
132
|
+
>
|
|
133
|
+
<DrawerCard>
|
|
134
|
+
<FleetResources
|
|
135
|
+
:rows="value.resourcesStatuses"
|
|
136
|
+
:cluster-id="clusterId"
|
|
137
|
+
:search="true"
|
|
138
|
+
/>
|
|
139
|
+
</DrawerCard>
|
|
140
|
+
</Tab>
|
|
141
|
+
<Tab
|
|
142
|
+
:label="t('fleet.dashboard.resourceDetails.source')"
|
|
143
|
+
name="source"
|
|
144
|
+
>
|
|
145
|
+
<DrawerCard class="mmb-4">
|
|
146
|
+
<FleetApplicationSource
|
|
147
|
+
v-if="value.source.value"
|
|
148
|
+
:row="value"
|
|
149
|
+
/>
|
|
150
|
+
<div
|
|
151
|
+
v-else
|
|
152
|
+
class="text-muted"
|
|
153
|
+
>
|
|
154
|
+
—
|
|
155
|
+
</div>
|
|
156
|
+
</DrawerCard>
|
|
157
|
+
</Tab>
|
|
158
|
+
</Tabbed>
|
|
159
|
+
</template>
|
|
160
|
+
</Drawer>
|
|
149
161
|
</template>
|
|
150
162
|
|
|
151
|
-
<style lang="scss">
|
|
152
|
-
.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
.sortable-table-header {
|
|
156
|
-
.fixed-header-actions {
|
|
157
|
-
align-items: center;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.header {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
padding: 0;
|
|
165
|
-
margin: 0 0 20px 0;
|
|
166
|
-
|
|
167
|
-
.title {
|
|
168
|
-
display: flex;
|
|
169
|
-
align-items: center;
|
|
170
|
-
flex: 1;
|
|
171
|
-
margin-bottom: 0;
|
|
172
|
-
|
|
173
|
-
.icon {
|
|
174
|
-
font-size: 2em;
|
|
175
|
-
margin-right: 16px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.label {
|
|
179
|
-
margin-right: 8px;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.state-icon {
|
|
183
|
-
font-size: 1.5em;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.col {
|
|
190
|
-
.labeled-select {
|
|
191
|
-
min-width: 250px;
|
|
192
|
-
}
|
|
163
|
+
<style lang="scss" scoped>
|
|
164
|
+
.icon-lg {
|
|
165
|
+
font-size: 24px;
|
|
193
166
|
}
|
|
194
167
|
</style>
|
|
@@ -52,21 +52,7 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
|
|
54
54
|
rows() {
|
|
55
|
-
return
|
|
56
|
-
let message = cond.message || '';
|
|
57
|
-
|
|
58
|
-
if ( cond.reason ) {
|
|
59
|
-
message = `[${ cond.reason }] ${ message }`.trim();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
condition: cond.type || 'Unknown',
|
|
64
|
-
status: cond.status || 'Unknown',
|
|
65
|
-
error: cond.error,
|
|
66
|
-
time: cond.lastProbeTime || cond.lastUpdateTime || cond.lastTransitionTime,
|
|
67
|
-
message,
|
|
68
|
-
};
|
|
69
|
-
});
|
|
55
|
+
return this.value.resourceConditions;
|
|
70
56
|
},
|
|
71
57
|
}
|
|
72
58
|
};
|
|
@@ -20,6 +20,10 @@ export default {
|
|
|
20
20
|
default: () => {
|
|
21
21
|
return {};
|
|
22
22
|
}
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: null
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
|
|
@@ -123,6 +127,7 @@ export default {
|
|
|
123
127
|
t('workload.container.lifecycleHook.httpGet.add'),
|
|
124
128
|
]"
|
|
125
129
|
:mode="mode"
|
|
130
|
+
:label="label"
|
|
126
131
|
@update:value="update"
|
|
127
132
|
/>
|
|
128
133
|
</div>
|
|
@@ -386,7 +386,7 @@ export default {
|
|
|
386
386
|
:dropdown-should-open="dropdownShouldOpen"
|
|
387
387
|
:tabindex="-1"
|
|
388
388
|
:uid="generatedUid"
|
|
389
|
-
:aria-label="
|
|
389
|
+
:aria-label="`- ${value}`"
|
|
390
390
|
@update:modelValue="$emit('selecting', $event); $emit('update:value', $event)"
|
|
391
391
|
@search:blur="onBlur"
|
|
392
392
|
@search:focus="onFocus"
|
|
@@ -63,23 +63,19 @@ export default {
|
|
|
63
63
|
<template>
|
|
64
64
|
<div>
|
|
65
65
|
<div class="mb-20">
|
|
66
|
-
<h3 class="clearfix">
|
|
67
|
-
{{ t('workload.container.lifecycleHook.postStart.label') }}
|
|
68
|
-
</h3>
|
|
69
66
|
<HookOption
|
|
70
67
|
v-model:value="postStart"
|
|
71
68
|
:mode="mode"
|
|
69
|
+
:label="t('workload.container.lifecycleHook.postStart.label')"
|
|
72
70
|
@update:value="update"
|
|
73
71
|
/>
|
|
74
72
|
</div>
|
|
75
73
|
|
|
76
74
|
<div>
|
|
77
|
-
<h3 class="clearfix">
|
|
78
|
-
{{ t('workload.container.lifecycleHook.preStop.label') }}
|
|
79
|
-
</h3>
|
|
80
75
|
<HookOption
|
|
81
76
|
v-model:value="preStop"
|
|
82
77
|
:mode="mode"
|
|
78
|
+
:label="t('workload.container.lifecycleHook.preStop.label')"
|
|
83
79
|
@update:value="update"
|
|
84
80
|
/>
|
|
85
81
|
</div>
|
|
@@ -165,5 +165,16 @@ export default defineComponent({
|
|
|
165
165
|
:paginate="paginateType"
|
|
166
166
|
:multiple="$attrs.multiple || false"
|
|
167
167
|
@update:value="$emit('update:value', $event)"
|
|
168
|
-
|
|
168
|
+
>
|
|
169
|
+
<template
|
|
170
|
+
v-for="(_, slot) in $slots"
|
|
171
|
+
:key="slot"
|
|
172
|
+
#[slot]="scope"
|
|
173
|
+
>
|
|
174
|
+
<slot
|
|
175
|
+
:name="slot"
|
|
176
|
+
v-bind="scope"
|
|
177
|
+
/>
|
|
178
|
+
</template>
|
|
179
|
+
</LabeledSelect>
|
|
169
180
|
</template>
|
|
@@ -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>
|