@rancher/shell 3.0.9-rc.4 → 3.0.9-rc.6
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/brand/suse/metadata.json +2 -1
- package/assets/images/providers/oci-open-containers.svg +22 -0
- package/assets/images/providers/traefik.png +0 -0
- package/assets/styles/themes/_dark.scss +2 -0
- package/assets/styles/themes/_light.scss +2 -0
- package/assets/styles/themes/_modern.scss +6 -0
- package/assets/translations/en-us.yaml +218 -26
- package/components/ActionMenuShell.vue +1 -1
- package/components/CruResource.vue +3 -1
- package/components/ExplorerProjectsNamespaces.vue +12 -12
- package/components/Inactivity.vue +2 -2
- package/components/Resource/Detail/Card/ExtrasCard.vue +49 -15
- package/components/Resource/Detail/Card/StatusCard/__tests__/StatusCard.test.ts +109 -0
- package/components/Resource/Detail/Card/StatusCard/index.vue +21 -4
- package/components/Resource/Detail/Card/__tests__/ExtrasCard.test.ts +111 -0
- package/components/Resource/Detail/Masthead/__tests__/index.test.ts +0 -17
- package/components/Resource/Detail/Masthead/index.vue +11 -4
- package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +19 -2
- package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +19 -11
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +3 -1
- package/components/Resource/Detail/Metadata/index.vue +1 -1
- package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +12 -0
- package/components/Resource/Detail/ResourcePopover/index.vue +2 -0
- package/components/Resource/Detail/ResourceRow.vue +3 -3
- package/components/ResourceDetail/Masthead/latest.vue +12 -2
- package/components/ResourceList/index.vue +12 -0
- package/components/ResourceTable.vue +38 -4
- package/components/Tabbed/Tab.vue +4 -0
- package/components/Tabbed/index.vue +4 -1
- package/components/Window/ContainerLogs.vue +48 -37
- package/components/fleet/FleetClusterTargets/TargetsList.vue +2 -2
- package/components/fleet/FleetClusterTargets/index.vue +6 -1
- package/components/fleet/GitRepoAdvancedTab.vue +333 -0
- package/components/fleet/GitRepoMetadataTab.vue +43 -0
- package/components/fleet/GitRepoRepositoryTab.vue +101 -0
- package/components/fleet/GitRepoTargetTab.vue +77 -0
- package/components/fleet/HelmOpAdvancedTab.vue +247 -0
- package/components/fleet/HelmOpChartTab.vue +158 -0
- package/components/fleet/HelmOpMetadataTab.vue +46 -0
- package/components/fleet/HelmOpTargetTab.vue +84 -0
- package/components/fleet/HelmOpValuesTab.vue +147 -0
- package/components/fleet/__tests__/FleetClusterTargets.test.ts +119 -70
- package/components/form/ChangePassword.vue +41 -35
- package/components/form/NodeScheduling.vue +81 -7
- package/components/form/PodAffinity.vue +1 -36
- package/components/form/ResourceLabeledSelect.vue +8 -4
- package/components/form/ResourceQuota/Namespace.vue +30 -9
- package/components/form/ResourceQuota/NamespaceRow.vue +25 -7
- package/components/form/ResourceQuota/Project.vue +150 -51
- package/components/form/ResourceQuota/ResourceQuotaEntry.vue +145 -0
- package/components/form/ResourceQuota/__tests__/Namespace.test.ts +307 -0
- package/components/form/ResourceQuota/__tests__/NamespaceRow.test.ts +281 -0
- package/components/form/ResourceQuota/__tests__/Project.test.ts +310 -0
- package/components/form/ResourceQuota/__tests__/ResourceQuotaEntry.test.ts +215 -0
- package/components/form/SchedulingCustomization.vue +14 -6
- package/components/form/SelectOrCreateAuthSecret.vue +113 -19
- package/components/form/__tests__/NodeScheduling.test.ts +12 -9
- package/components/form/__tests__/PodAffinity.test.ts +21 -2
- package/components/form/__tests__/SchedulingCustomization.test.ts +240 -0
- package/components/form/__tests__/SelectOrCreateAuthSecret.test.ts +35 -0
- package/components/formatter/ClusterLink.vue +8 -0
- package/components/formatter/MachineSummaryGraph.vue +10 -2
- package/components/formatter/SecretOrigin.vue +79 -0
- package/components/nav/TopLevelMenu.helper.ts +50 -2
- package/components/nav/TopLevelMenu.vue +14 -0
- package/components/nav/Type.vue +5 -0
- package/components/nav/__tests__/TopLevelMenu.test.ts +3 -3
- package/components/nav/__tests__/Type.test.ts +6 -4
- package/config/labels-annotations.js +7 -6
- package/config/pagination-table-headers.js +6 -4
- package/config/product/explorer.js +5 -14
- package/config/product/manager.js +18 -1
- package/config/query-params.js +3 -0
- package/config/router/navigation-guards/authentication.js +8 -9
- package/config/settings.ts +15 -2
- package/config/table-headers.js +21 -17
- package/config/types.js +33 -10
- package/detail/auditlog.cattle.io.auditpolicy.vue +19 -0
- package/detail/management.cattle.io.user.vue +1 -2
- package/detail/node.vue +0 -1
- package/detail/provisioning.cattle.io.cluster.vue +2 -1
- package/detail/workload/index.vue +11 -16
- package/dialog/ChangePasswordDialog.vue +8 -0
- package/dialog/DeactivateDriverDialog.vue +1 -1
- package/dialog/GenericPrompt.vue +20 -3
- package/dialog/Ipv6NetworkingDialog.vue +156 -0
- package/dialog/ScaleMachineDownDialog.vue +65 -15
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/dialog/SearchDialog.vue +10 -2
- package/dialog/__tests__/ScaleMachineDownDialog.test.ts +184 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +89 -0
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +1 -0
- package/edit/__tests__/management.cattle.io.project.test.js +81 -98
- package/edit/auditlog.cattle.io.auditpolicy/AdditionalRedactions.vue +114 -0
- package/edit/auditlog.cattle.io.auditpolicy/Filters.vue +119 -0
- package/edit/auditlog.cattle.io.auditpolicy/General.vue +180 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/AdditionalRedactions.test.ts +327 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/Filters.test.ts +449 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/General.test.ts +472 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/AdditionalRedactions.test.ts.snap +27 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/Filters.test.ts.snap +39 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/General.test.ts.snap +174 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/__snapshots__/index.test.ts.snap +29 -0
- package/edit/auditlog.cattle.io.auditpolicy/__tests__/index.test.ts +215 -0
- package/edit/auditlog.cattle.io.auditpolicy/index.vue +104 -0
- package/edit/auditlog.cattle.io.auditpolicy/types.ts +28 -0
- package/edit/auth/oidc.vue +1 -1
- package/edit/catalog.cattle.io.clusterrepo.vue +155 -25
- package/edit/fleet.cattle.io.gitrepo.vue +161 -276
- package/edit/fleet.cattle.io.helmop.vue +190 -332
- package/edit/management.cattle.io.project.vue +11 -42
- package/edit/management.cattle.io.setting.vue +6 -0
- package/edit/management.cattle.io.user.vue +29 -34
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +55 -24
- package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +1 -103
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2-fleet-cluster-agent.test.ts +283 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +196 -2
- package/edit/provisioning.cattle.io.cluster/ingress/IngressCards.vue +112 -0
- package/edit/provisioning.cattle.io.cluster/ingress/IngressConfiguration.vue +158 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +184 -66
- package/edit/provisioning.cattle.io.cluster/shared.ts +39 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +56 -7
- package/edit/provisioning.cattle.io.cluster/tabs/Ingress.vue +319 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/__tests__/S3Config.test.ts +13 -1
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +10 -44
- package/edit/secret/index.vue +1 -1
- package/edit/token.vue +68 -29
- package/edit/workload/__tests__/index.test.ts +2 -37
- package/edit/workload/index.vue +6 -2
- package/edit/workload/mixins/workload.js +0 -32
- package/list/__tests__/management.cattle.io.setting.test.ts +198 -0
- package/list/auditlog.cattle.io.auditpolicy.vue +63 -0
- package/list/group.principal.vue +11 -15
- package/list/management.cattle.io.setting.vue +13 -0
- package/list/management.cattle.io.user.vue +11 -21
- package/list/provisioning.cattle.io.cluster.vue +50 -1
- package/list/secret.vue +4 -9
- package/list/service.vue +6 -8
- package/machine-config/amazonec2.vue +11 -4
- package/machine-config/azure.vue +14 -0
- package/machine-config/components/EC2Networking.vue +46 -30
- package/machine-config/components/__tests__/EC2Networking.test.ts +7 -7
- package/machine-config/components/__tests__/utils/vpcSubnetMockData.js +0 -9
- package/machine-config/digitalocean.vue +3 -3
- package/mixins/browser-tab-visibility.js +5 -4
- package/mixins/fetch.client.js +6 -0
- package/models/__tests__/auditlog.cattle.io.auditpolicy.test.ts +117 -0
- package/models/__tests__/namespace.test.ts +11 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +96 -0
- package/models/__tests__/workload.test.ts +90 -6
- package/models/auditlog.cattle.io.auditpolicy.js +46 -0
- package/models/catalog.cattle.io.clusterrepo.js +30 -4
- package/models/cluster.x-k8s.io.machine.js +1 -1
- package/models/cluster.x-k8s.io.machinedeployment.js +5 -5
- package/models/event.js +5 -0
- package/models/ext.cattle.io.groupmembershiprefreshrequest.js +15 -0
- package/models/ext.cattle.io.passwordchangerequest.js +15 -0
- package/models/ext.cattle.io.selfuser.js +15 -0
- package/models/ext.cattle.io.token.js +48 -0
- package/models/fleet-application.js +17 -7
- package/models/kontainerdriver.js +2 -2
- package/models/management.cattle.io.user.js +28 -31
- package/models/namespace.js +7 -1
- package/models/nodedriver.js +2 -2
- package/models/provisioning.cattle.io.cluster.js +28 -7
- package/models/schema.js +18 -0
- package/models/secret.js +27 -41
- package/models/service.js +44 -1
- package/models/steve-schema.ts +39 -2
- package/models/token.js +4 -0
- package/models/workload.js +13 -6
- package/package.json +1 -1
- package/pages/account/index.vue +108 -72
- package/pages/auth/login.vue +15 -8
- package/pages/auth/setup.vue +55 -27
- package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +4 -1
- package/pages/c/_cluster/apps/charts/index.vue +93 -4
- package/pages/c/_cluster/apps/charts/install.vue +317 -42
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +5 -4
- package/pages/c/_cluster/settings/index.vue +3 -1
- package/pages/home.vue +9 -3
- package/plugins/dashboard-store/__tests__/getters.test.ts +108 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +28 -3
- package/plugins/dashboard-store/actions.js +10 -8
- package/plugins/dashboard-store/getters.js +30 -6
- package/plugins/dashboard-store/index.js +3 -2
- package/plugins/dashboard-store/mutations.js +8 -1
- package/plugins/dashboard-store/resource-class.js +15 -8
- package/plugins/steve/__tests__/steve-class.test.ts +128 -0
- package/plugins/steve/schema.d.ts +5 -0
- package/plugins/steve/steve-class.js +28 -0
- package/plugins/steve/steve-pagination-utils.ts +7 -2
- package/rancher-components/RcIcon/types.ts +2 -0
- package/rancher-components/RcItemCard/RcItemCard.vue +64 -19
- package/store/auth.js +57 -19
- package/store/notifications.ts +1 -1
- package/store/prefs.js +3 -0
- package/store/type-map.js +12 -1
- package/types/aws-sdk.d.ts +121 -0
- package/types/resources/node.ts +15 -0
- package/types/shell/index.d.ts +542 -516
- package/types/store/dashboard-store.types.ts +7 -0
- package/types/store/pagination.types.ts +5 -5
- package/utils/__tests__/array.test.ts +1 -29
- package/utils/__tests__/cluster-agent-configuration.test.ts +203 -0
- package/utils/array.ts +0 -11
- package/utils/aws.ts +21 -0
- package/utils/cluster.js +22 -2
- package/utils/pagination-wrapper.ts +11 -3
- package/utils/selector-typed.ts +1 -1
- package/vue.config.js +26 -13
- package/components/__tests__/ProjectRow.test.ts +0 -146
- package/components/form/ResourceQuota/ProjectRow.vue +0 -210
- package/edit/provisioning.cattle.io.cluster/defaults.ts +0 -1
|
@@ -66,6 +66,17 @@ export default {
|
|
|
66
66
|
|
|
67
67
|
this.settings = settings;
|
|
68
68
|
this.provisioningSettings = provisioningSettings;
|
|
69
|
+
|
|
70
|
+
this.$nextTick(() => {
|
|
71
|
+
// Handle scrolling to hash anchor after data is loaded
|
|
72
|
+
if (this.$route.hash) {
|
|
73
|
+
const element = document.querySelector(this.$route.hash);
|
|
74
|
+
|
|
75
|
+
if (element) {
|
|
76
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
69
80
|
},
|
|
70
81
|
|
|
71
82
|
data() {
|
|
@@ -89,6 +100,7 @@ export default {
|
|
|
89
100
|
</Banner>
|
|
90
101
|
<div
|
|
91
102
|
v-for="(setting) in settings"
|
|
103
|
+
:id="setting.id"
|
|
92
104
|
:key="setting.id"
|
|
93
105
|
>
|
|
94
106
|
<Setting
|
|
@@ -101,6 +113,7 @@ export default {
|
|
|
101
113
|
</h2>
|
|
102
114
|
<div
|
|
103
115
|
v-for="(setting) in provisioningSettings"
|
|
116
|
+
:id="setting.id"
|
|
104
117
|
:key="setting.id"
|
|
105
118
|
>
|
|
106
119
|
<Setting
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AsyncButton from '@shell/components/AsyncButton';
|
|
3
|
-
import {
|
|
3
|
+
import { EXT } from '@shell/config/types';
|
|
4
4
|
import { NAME } from '@shell/config/product/auth';
|
|
5
5
|
import ResourceTable from '@shell/components/ResourceTable';
|
|
6
6
|
import Masthead from '@shell/components/ResourceList/Masthead';
|
|
@@ -38,14 +38,10 @@ export default {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
async fetch() {
|
|
41
|
-
const store = this.$store;
|
|
42
|
-
|
|
43
|
-
await store.dispatch(`rancher/findAll`, { type: NORMAN.USER });
|
|
44
|
-
|
|
45
41
|
await this.$fetchType(this.resource);
|
|
46
42
|
|
|
47
|
-
this.
|
|
48
|
-
|
|
43
|
+
this.membershipRefreshRequests = await this.$store.dispatch('management/create', { type: EXT.GROUP_MEMBERSHIP_REFRESH_REQUESTS });
|
|
44
|
+
this.canRefreshMemberships = !!this.membershipRefreshRequests?.canRefreshMemberships;
|
|
49
45
|
},
|
|
50
46
|
|
|
51
47
|
data() {
|
|
@@ -55,7 +51,8 @@ export default {
|
|
|
55
51
|
|
|
56
52
|
return {
|
|
57
53
|
schema,
|
|
58
|
-
|
|
54
|
+
membershipRefreshRequests: undefined,
|
|
55
|
+
canRefreshMemberships: false
|
|
59
56
|
};
|
|
60
57
|
},
|
|
61
58
|
|
|
@@ -82,28 +79,21 @@ export default {
|
|
|
82
79
|
// 1) Only show system users in explorer/users and not in auth/users
|
|
83
80
|
// 2) Supplement user with info to enable/disable the refresh group membership action (this is not persisted on save)
|
|
84
81
|
const params = { ...this.$route.params };
|
|
85
|
-
const requiredUsers = params.product === NAME ? this.rows.filter((a) => !a.isSystem) : this.rows;
|
|
86
|
-
|
|
87
|
-
requiredUsers.forEach((r) => {
|
|
88
|
-
r.canRefreshAccess = this.canRefreshAccess;
|
|
89
|
-
});
|
|
90
82
|
|
|
91
|
-
return
|
|
83
|
+
return params.product === NAME ? this.rows.filter((a) => !a.isSystem) : this.rows;
|
|
92
84
|
},
|
|
93
85
|
|
|
94
86
|
isAdmin() {
|
|
95
87
|
return isAdminUser(this.$store.getters);
|
|
96
|
-
}
|
|
88
|
+
}
|
|
97
89
|
},
|
|
98
90
|
|
|
99
91
|
methods: {
|
|
100
92
|
async refreshGroupMemberships(buttonDone) {
|
|
101
93
|
try {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
|
|
94
|
+
// userId specifies the user ID. Use '*' for all users. Check the schemaDefinition for more details.
|
|
95
|
+
this.membershipRefreshRequests.spec = { userId: '*' };
|
|
96
|
+
await this.membershipRefreshRequests.save();
|
|
107
97
|
buttonDone(true);
|
|
108
98
|
} catch (err) {
|
|
109
99
|
this.$store.dispatch('growl/fromError', { title: this.t('user.list.errorRefreshingGroupMemberships'), err }, { root: true });
|
|
@@ -125,7 +115,7 @@ export default {
|
|
|
125
115
|
>
|
|
126
116
|
<template #extraActions>
|
|
127
117
|
<AsyncButton
|
|
128
|
-
v-if="
|
|
118
|
+
v-if="canRefreshMemberships"
|
|
129
119
|
mode="refresh"
|
|
130
120
|
:action-label="t('authGroups.actions.refresh')"
|
|
131
121
|
:waiting-label="t('authGroups.actions.refresh')"
|
|
@@ -167,6 +167,12 @@ export default {
|
|
|
167
167
|
|
|
168
168
|
},
|
|
169
169
|
|
|
170
|
+
methods: {
|
|
171
|
+
getCustomDetailLink(cluster) {
|
|
172
|
+
return cluster.isCapiHybrid ? null : cluster.detailLocation;
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
|
|
170
176
|
$loadingResources() {
|
|
171
177
|
// results are filtered so we wouldn't get the correct count on indicator...
|
|
172
178
|
return { loadIndeterminate: true };
|
|
@@ -211,7 +217,6 @@ export default {
|
|
|
211
217
|
</router-link>
|
|
212
218
|
</template>
|
|
213
219
|
</Masthead>
|
|
214
|
-
|
|
215
220
|
<ResourceTable
|
|
216
221
|
:headers="headers"
|
|
217
222
|
:table-actions="true"
|
|
@@ -221,6 +226,8 @@ export default {
|
|
|
221
226
|
:use-query-params-for-simple-filtering="useQueryParamsForSimpleFiltering"
|
|
222
227
|
:data-testid="'cluster-list'"
|
|
223
228
|
:force-update-live-and-delayed="forceUpdateLiveAndDelayed"
|
|
229
|
+
:get-custom-detail-link="getCustomDetailLink"
|
|
230
|
+
:sub-rows="true"
|
|
224
231
|
>
|
|
225
232
|
<!-- Why are state column and subrow overwritten here? -->
|
|
226
233
|
<!-- for rke1 clusters, where they try to use the mgmt cluster stateObj instead of prov cluster stateObj, -->
|
|
@@ -266,6 +273,48 @@ export default {
|
|
|
266
273
|
{{ t('cluster.explore') }}
|
|
267
274
|
</button>
|
|
268
275
|
</template>
|
|
276
|
+
<template #additional-sub-row="{row, fullColspan, tableActions}">
|
|
277
|
+
<tr
|
|
278
|
+
class="capi-unsupported"
|
|
279
|
+
:class="{'has-description': !!row.stateDescription}"
|
|
280
|
+
>
|
|
281
|
+
<td
|
|
282
|
+
v-if="row.isCapiHybrid"
|
|
283
|
+
class="row-check"
|
|
284
|
+
/>
|
|
285
|
+
<td
|
|
286
|
+
v-if="row.isCapiHybrid"
|
|
287
|
+
:data-testid="`capi-unsupported-warning-${row?.metadata?.name}`"
|
|
288
|
+
:colspan="fullColspan - (tableActions ? 1: 0)"
|
|
289
|
+
>
|
|
290
|
+
<div
|
|
291
|
+
class="text-warning"
|
|
292
|
+
:class="{'mt-5': !!row.stateDescription.trim()}"
|
|
293
|
+
>
|
|
294
|
+
<i class="icon icon-warning" />{{ t('cluster.capi.notSupported') }}
|
|
295
|
+
</div>
|
|
296
|
+
</td>
|
|
297
|
+
</tr>
|
|
298
|
+
</template>
|
|
269
299
|
</ResourceTable>
|
|
270
300
|
</div>
|
|
271
301
|
</template>
|
|
302
|
+
|
|
303
|
+
<stye scoped lang="scss">
|
|
304
|
+
.capi-unsupported {
|
|
305
|
+
&.has-description {
|
|
306
|
+
border-bottom: none;
|
|
307
|
+
padding: 0px;
|
|
308
|
+
td {
|
|
309
|
+
padding-top: 0px;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
& div {
|
|
314
|
+
& i {
|
|
315
|
+
margin-right: 0.1em;
|
|
316
|
+
}
|
|
317
|
+
display: flex;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
</stye>
|
package/list/secret.vue
CHANGED
|
@@ -7,8 +7,8 @@ import PaginatedResourceTable from '@shell/components/PaginatedResourceTable';
|
|
|
7
7
|
import { TableColumn } from '@shell/types/store/type-map';
|
|
8
8
|
import ResourceFetch from '@shell/mixins/resource-fetch';
|
|
9
9
|
import { mapGetters } from 'vuex';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { SECRET_ORIGIN } from '@shell/config/table-headers';
|
|
11
|
+
import { STEVE_SECRET_ORIGIN } from '@shell/config/pagination-table-headers';
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
name: 'ListSecret',
|
|
@@ -61,13 +61,8 @@ export default {
|
|
|
61
61
|
|
|
62
62
|
if (this.canViewProjects) {
|
|
63
63
|
// if the user can see projects, add a column to let them know if it's a secret from a project scoped secret
|
|
64
|
-
headers.push(
|
|
65
|
-
headersSSP.push(
|
|
66
|
-
if (this.currentCluster.isLocal) {
|
|
67
|
-
// if the user is on the local cluster, add a column to let them know if it's a project scoped secret (from another cluster)
|
|
68
|
-
headers.push(SECRET_PROJECT_SCOPED);
|
|
69
|
-
headersSSP.push(SECRET_PROJECT_SCOPED);
|
|
70
|
-
}
|
|
64
|
+
headers.push(SECRET_ORIGIN);
|
|
65
|
+
headersSSP.push(STEVE_SECRET_ORIGIN);
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
headers.push(this.namespacedHeaders[this.namespacedHeaders.length - 1]);
|
package/list/service.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import PaginatedResourceTable from '@shell/components/PaginatedResourceTable';
|
|
3
|
-
import {
|
|
3
|
+
import { fetchNodesForServiceTargets } from '@shell/models/service';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
name: 'ListService',
|
|
@@ -27,13 +27,11 @@ export default {
|
|
|
27
27
|
* of type PagTableFetchSecondaryResources
|
|
28
28
|
*/
|
|
29
29
|
async fetchSecondaryResources(opts) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
await this.$store.dispatch(`${ inStore }/findAll`, { type: NODE });
|
|
36
|
-
}
|
|
30
|
+
// Nodes should be fetched because they may be referenced in the target column of a service list item.
|
|
31
|
+
await fetchNodesForServiceTargets({
|
|
32
|
+
$store: this.$store,
|
|
33
|
+
inStore: this.$store.getters['currentStore']()
|
|
34
|
+
});
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
};
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
|
|
25
25
|
mixins: [CreateEditView],
|
|
26
26
|
|
|
27
|
-
emits: ['validationChanged', 'update:
|
|
27
|
+
emits: ['validationChanged', 'update:isIpv6', 'update:isDualStack'],
|
|
28
28
|
|
|
29
29
|
props: {
|
|
30
30
|
uuid: {
|
|
@@ -47,7 +47,12 @@ export default {
|
|
|
47
47
|
default: false
|
|
48
48
|
},
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
isIpv6: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
isDualStack: {
|
|
51
56
|
type: Boolean,
|
|
52
57
|
default: false
|
|
53
58
|
},
|
|
@@ -386,10 +391,12 @@ export default {
|
|
|
386
391
|
:zone="value.zone"
|
|
387
392
|
:region="value.region"
|
|
388
393
|
:machine-pools="machinePools"
|
|
389
|
-
:
|
|
394
|
+
:is-ipv6="isIpv6"
|
|
395
|
+
:is-dual-stack="isDualStack"
|
|
390
396
|
:disabled="disabled"
|
|
391
397
|
:is-new="poolCreateMode"
|
|
392
|
-
@update:
|
|
398
|
+
@update:is-ipv6="e=>$emit('update:isIpv6', e)"
|
|
399
|
+
@update:is-dual-stack="e=>$emit('update:isDualStack', e)"
|
|
393
400
|
@validation-changed="e=>$emit('validationChanged',e)"
|
|
394
401
|
/>
|
|
395
402
|
|
package/machine-config/azure.vue
CHANGED
|
@@ -209,6 +209,10 @@ export default {
|
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
211
|
|
|
212
|
+
setup() {
|
|
213
|
+
return { _EDIT };
|
|
214
|
+
},
|
|
215
|
+
|
|
212
216
|
data() {
|
|
213
217
|
return {
|
|
214
218
|
azureEnvironments,
|
|
@@ -518,6 +522,11 @@ export default {
|
|
|
518
522
|
</div>
|
|
519
523
|
</div>
|
|
520
524
|
<div v-else>
|
|
525
|
+
<Banner
|
|
526
|
+
v-if="mode === _EDIT && !value.managedDisks"
|
|
527
|
+
color="warning"
|
|
528
|
+
:label="t('cluster.machineConfig.azure.managedDisks.deprecationWarning', {}, true)"
|
|
529
|
+
/>
|
|
521
530
|
<div class="row mt-20">
|
|
522
531
|
<div class="col span-6">
|
|
523
532
|
<LabeledSelect
|
|
@@ -843,6 +852,11 @@ export default {
|
|
|
843
852
|
:label="t('cluster.machineConfig.azure.managedDisks.label')"
|
|
844
853
|
:disabled="disabled"
|
|
845
854
|
/>
|
|
855
|
+
<Banner
|
|
856
|
+
v-if="!value.managedDisks"
|
|
857
|
+
color="warning"
|
|
858
|
+
:label="t('cluster.machineConfig.azure.managedDisks.deprecationWarning', {}, true)"
|
|
859
|
+
/>
|
|
846
860
|
<Banner
|
|
847
861
|
v-if="value.availabilityZone && !value.managedDisks"
|
|
848
862
|
color="error"
|
|
@@ -9,6 +9,7 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
9
9
|
import { Banner } from '@components/Banner';
|
|
10
10
|
import { scrollToBottom } from '@shell/utils/scroll';
|
|
11
11
|
import { _CREATE } from '@shell/config/query-params';
|
|
12
|
+
import { getSubnetDisplayName, getVpcDisplayName, isIpv4Network, isIpv6Network } from '@shell/utils/aws';
|
|
12
13
|
|
|
13
14
|
export default {
|
|
14
15
|
name: 'Ec2MachinePoolNetworking',
|
|
@@ -17,7 +18,7 @@ export default {
|
|
|
17
18
|
Checkbox, LabeledSelect, LabeledInput, Banner
|
|
18
19
|
},
|
|
19
20
|
|
|
20
|
-
emits: ['update:enablePrimaryIpv6', 'update:ipv6AddressCount', 'update:ipv6AddressOnly', 'update:httpProtocolIpv6', 'update:vpcId', 'update:subnetId', 'update:
|
|
21
|
+
emits: ['update:enablePrimaryIpv6', 'update:ipv6AddressCount', 'update:ipv6AddressOnly', 'update:httpProtocolIpv6', 'update:vpcId', 'update:subnetId', 'update:isIpv6', 'update:isDualStack', 'validationChanged'],
|
|
21
22
|
|
|
22
23
|
props: {
|
|
23
24
|
mode: {
|
|
@@ -84,7 +85,12 @@ export default {
|
|
|
84
85
|
default: ''
|
|
85
86
|
},
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
isIpv6: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
isDualStack: {
|
|
88
94
|
type: Boolean,
|
|
89
95
|
default: false
|
|
90
96
|
},
|
|
@@ -113,7 +119,7 @@ export default {
|
|
|
113
119
|
this.enableIpv6 = !!vpcs.find((vpc) => vpc.VpcId === this.vpcId && vpc.Ipv6CidrBlockAssociationSet && !isEmpty(vpc.Ipv6CidrBlockAssociationSet));
|
|
114
120
|
}
|
|
115
121
|
|
|
116
|
-
if (this.isNew && this.
|
|
122
|
+
if (this.isNew && this.somePoolisIpv6OrDual) {
|
|
117
123
|
this.enableIpv6 = true;
|
|
118
124
|
}
|
|
119
125
|
},
|
|
@@ -133,7 +139,7 @@ export default {
|
|
|
133
139
|
if (this.isNew) {
|
|
134
140
|
this.updateNetwork();
|
|
135
141
|
}
|
|
136
|
-
this.$emit('update:
|
|
142
|
+
this.$emit('update:isDualStack', neu);
|
|
137
143
|
|
|
138
144
|
if (neu) {
|
|
139
145
|
this.$emit('update:ipv6AddressCount', '1');
|
|
@@ -154,7 +160,12 @@ export default {
|
|
|
154
160
|
},
|
|
155
161
|
|
|
156
162
|
ipv6AddressOnly(neu) {
|
|
157
|
-
this.$emit('update:
|
|
163
|
+
this.$emit('update:isIpv6', neu);
|
|
164
|
+
if (neu) {
|
|
165
|
+
this.$emit('update:isDualStack', false);
|
|
166
|
+
} else if (this.enableIpv6) {
|
|
167
|
+
this.$emit('update:isDualStack', true);
|
|
168
|
+
}
|
|
158
169
|
},
|
|
159
170
|
|
|
160
171
|
allValid: {
|
|
@@ -174,13 +185,13 @@ export default {
|
|
|
174
185
|
const subnetsByVpc = {};
|
|
175
186
|
|
|
176
187
|
for ( const obj of this.vpcInfo.Vpcs ) {
|
|
177
|
-
const name = obj
|
|
178
|
-
const hasIpv6 =
|
|
179
|
-
const hasIpv4 =
|
|
188
|
+
const name = getVpcDisplayName(obj);
|
|
189
|
+
const hasIpv6 = isIpv6Network(obj);
|
|
190
|
+
const hasIpv4 = isIpv4Network(obj);
|
|
180
191
|
|
|
181
192
|
vpcs.push({
|
|
182
|
-
label: name
|
|
183
|
-
subLabel:
|
|
193
|
+
label: name,
|
|
194
|
+
subLabel: obj.CidrBlock,
|
|
184
195
|
isDefault: obj.IsDefault || false,
|
|
185
196
|
kind: 'vpc',
|
|
186
197
|
value: obj.VpcId,
|
|
@@ -197,8 +208,8 @@ export default {
|
|
|
197
208
|
continue;
|
|
198
209
|
}
|
|
199
210
|
|
|
200
|
-
const hasIpv6 =
|
|
201
|
-
const hasIpv4 =
|
|
211
|
+
const hasIpv6 = isIpv6Network(obj);
|
|
212
|
+
const hasIpv4 = isIpv4Network(obj);
|
|
202
213
|
|
|
203
214
|
if (this.enableIpv6 !== hasIpv6) {
|
|
204
215
|
continue;
|
|
@@ -211,11 +222,11 @@ export default {
|
|
|
211
222
|
subnetsByVpc[obj.VpcId] = entry;
|
|
212
223
|
}
|
|
213
224
|
|
|
214
|
-
const name = obj
|
|
225
|
+
const name = getSubnetDisplayName(obj);
|
|
215
226
|
|
|
216
227
|
entry.push({
|
|
217
|
-
label: name
|
|
218
|
-
subLabel:
|
|
228
|
+
label: name,
|
|
229
|
+
subLabel: obj.CidrBlock,
|
|
219
230
|
kind: 'subnet',
|
|
220
231
|
isDefault: obj.DefaultForAz || false,
|
|
221
232
|
value: obj.SubnetId,
|
|
@@ -278,18 +289,18 @@ export default {
|
|
|
278
289
|
return opt && opt.hasIpv6 && !opt.hasIpv4;
|
|
279
290
|
},
|
|
280
291
|
|
|
281
|
-
|
|
282
|
-
return !!this.machinePools.find((p) => p.
|
|
292
|
+
somePoolisIpv6OrDual() {
|
|
293
|
+
return !!this.machinePools.find((p) => p.isIpv6 || p.isDualStack);
|
|
283
294
|
},
|
|
284
295
|
|
|
285
296
|
showIpv6Options() {
|
|
286
|
-
return this.mode === _CREATE || (this.isNew && this.
|
|
297
|
+
return this.mode === _CREATE || (this.isNew && this.somePoolisIpv6OrDual) || this.enableIpv6;
|
|
287
298
|
},
|
|
288
299
|
|
|
289
300
|
poolsInvalid() {
|
|
290
|
-
const somePoolHasIpv4 = !!this.machinePools.find((p) => !p.
|
|
301
|
+
const somePoolHasIpv4 = !!this.machinePools.find((p) => !p.isIpv6 && !p.isDualStack);
|
|
291
302
|
|
|
292
|
-
return this.
|
|
303
|
+
return this.somePoolisIpv6OrDual && somePoolHasIpv4;
|
|
293
304
|
},
|
|
294
305
|
|
|
295
306
|
addressCountInvalid() {
|
|
@@ -398,9 +409,14 @@ export default {
|
|
|
398
409
|
</template>
|
|
399
410
|
</LabeledSelect>
|
|
400
411
|
</div>
|
|
412
|
+
</div>
|
|
413
|
+
<div
|
|
414
|
+
v-if="enableIpv6"
|
|
415
|
+
class="row mb-10 ipv6-row"
|
|
416
|
+
>
|
|
401
417
|
<div
|
|
402
418
|
v-if="enableIpv6"
|
|
403
|
-
class="col span-
|
|
419
|
+
class="col span-2"
|
|
404
420
|
>
|
|
405
421
|
<Checkbox
|
|
406
422
|
:disabled="!isNew || !dualStackSelected"
|
|
@@ -411,17 +427,12 @@ export default {
|
|
|
411
427
|
@update:value="e=>$emit('update:ipv6AddressOnly', e)"
|
|
412
428
|
/>
|
|
413
429
|
</div>
|
|
414
|
-
|
|
415
|
-
<div
|
|
416
|
-
v-if="enableIpv6"
|
|
417
|
-
class="row mb-10 ipv6-row"
|
|
418
|
-
>
|
|
419
|
-
<div class="col span-6">
|
|
430
|
+
<div class="col span-4">
|
|
420
431
|
<Checkbox
|
|
421
432
|
:value="httpProtocolIpv6==='enabled'"
|
|
422
433
|
:disabled="!isNew"
|
|
423
434
|
:label="t('cluster.machineConfig.amazonEc2.httpProtocolIpv6.label')"
|
|
424
|
-
data-testid="
|
|
435
|
+
data-testid="amazonEc2__httpProtocolIpv6"
|
|
425
436
|
:mode="mode"
|
|
426
437
|
@update:value="e=>$emit('update:httpProtocolIpv6', e ? 'enabled' : 'disabled')"
|
|
427
438
|
/>
|
|
@@ -431,7 +442,7 @@ export default {
|
|
|
431
442
|
v-if="enableIpv6"
|
|
432
443
|
class="row mb-10 ipv6-row"
|
|
433
444
|
>
|
|
434
|
-
<div class="col span-
|
|
445
|
+
<div class="col span-6">
|
|
435
446
|
<LabeledInput
|
|
436
447
|
:disabled="!isNew"
|
|
437
448
|
min="1"
|
|
@@ -443,7 +454,12 @@ export default {
|
|
|
443
454
|
@update:value="e=>$emit('update:ipv6AddressCount', e)"
|
|
444
455
|
/>
|
|
445
456
|
</div>
|
|
446
|
-
|
|
457
|
+
</div>
|
|
458
|
+
<div
|
|
459
|
+
v-if="enableIpv6"
|
|
460
|
+
class="row mb-10 ipv6-row"
|
|
461
|
+
>
|
|
462
|
+
<div class="col span-6">
|
|
447
463
|
<Checkbox
|
|
448
464
|
:disabled="!isNew"
|
|
449
465
|
:value="enablePrimaryIpv6"
|
|
@@ -82,9 +82,9 @@ describe('component: EC2Networking', () => {
|
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
it.each([
|
|
85
|
-
[[{
|
|
86
|
-
[[{
|
|
87
|
-
[[{
|
|
85
|
+
[[{ isIpv6: true }, { isIpv6: false }], true],
|
|
86
|
+
[[{ isIpv6: false }, { isIpv6: false }], false],
|
|
87
|
+
[[{ isIpv6: true }, { isIpv6: true }], false],
|
|
88
88
|
])('should show an error banner if pools do not either all have ipv6 or all have ipv4', (pools, shouldShowError) => {
|
|
89
89
|
const wrapper = shallowMount(EC2Networking, { ...defaultCreateSetup, propsData: { ...defaultCreateSetup.propsData, machinePools: pools } });
|
|
90
90
|
const ipv6Warning = wrapper.findComponent('[data-testid="amazonEc2__ipv6Warning"]');
|
|
@@ -97,7 +97,7 @@ describe('component: EC2Networking', () => {
|
|
|
97
97
|
...defaultCreateSetup,
|
|
98
98
|
propsData: {
|
|
99
99
|
...defaultCreateSetup.propsData,
|
|
100
|
-
machinePools: [{
|
|
100
|
+
machinePools: [{ isIpv6: true }],
|
|
101
101
|
},
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -112,7 +112,7 @@ describe('component: EC2Networking', () => {
|
|
|
112
112
|
...defaultCreateSetup,
|
|
113
113
|
propsData: {
|
|
114
114
|
...defaultCreateSetup.propsData,
|
|
115
|
-
machinePools: [{
|
|
115
|
+
machinePools: [{ isIpv6: false }],
|
|
116
116
|
},
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -127,7 +127,7 @@ describe('component: EC2Networking', () => {
|
|
|
127
127
|
...defaultCreateSetup,
|
|
128
128
|
propsData: {
|
|
129
129
|
...defaultCreateSetup.propsData,
|
|
130
|
-
machinePools: [{
|
|
130
|
+
machinePools: [{ isIpv6: true }, { isIpv6: false }],
|
|
131
131
|
},
|
|
132
132
|
});
|
|
133
133
|
|
|
@@ -139,7 +139,7 @@ describe('component: EC2Networking', () => {
|
|
|
139
139
|
...defaultCreateSetup,
|
|
140
140
|
propsData: {
|
|
141
141
|
...defaultCreateSetup.propsData,
|
|
142
|
-
machinePools: [{
|
|
142
|
+
machinePools: [{ isIpv6: true }, { isIpv6: true }],
|
|
143
143
|
},
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -25,10 +25,6 @@ export const vpcInfo = {
|
|
|
25
25
|
{
|
|
26
26
|
Key: 'displayName',
|
|
27
27
|
Value: 'test'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
Key: 'Name',
|
|
31
|
-
Value: 'test-eks-vpc-VPC'
|
|
32
28
|
}
|
|
33
29
|
]
|
|
34
30
|
},
|
|
@@ -107,11 +103,6 @@ export const subnetInfo = {
|
|
|
107
103
|
OwnerId: '1234',
|
|
108
104
|
AssignIpv6AddressOnCreation: false,
|
|
109
105
|
Tags: [
|
|
110
|
-
{
|
|
111
|
-
Key: 'Name',
|
|
112
|
-
Value: 'aws-controltower-PrivateSubnet2A'
|
|
113
|
-
},
|
|
114
|
-
|
|
115
106
|
{
|
|
116
107
|
Key: 'Network',
|
|
117
108
|
Value: 'Private'
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
|
|
17
17
|
mixins: [CreateEditView],
|
|
18
18
|
|
|
19
|
-
emits: ['update:
|
|
19
|
+
emits: ['update:isDualStack'],
|
|
20
20
|
|
|
21
21
|
props: {
|
|
22
22
|
credentialId: {
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
default: false
|
|
30
30
|
},
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
isDualStack: {
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: false
|
|
35
35
|
},
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
'value.image': 'updateUsername',
|
|
120
120
|
|
|
121
121
|
'value.ipv6'(neu) {
|
|
122
|
-
this.$emit('update:
|
|
122
|
+
this.$emit('update:isDualStack', neu);
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EXT } from '@shell/config/types';
|
|
2
2
|
import { mapGetters } from 'vuex';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -14,9 +14,10 @@ export default {
|
|
|
14
14
|
|
|
15
15
|
async visibilityChange() {
|
|
16
16
|
if (!document.hidden) {
|
|
17
|
-
await this.$store.dispatch('
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
await this.$store.dispatch('management/request', {
|
|
18
|
+
url: `/v1/${ EXT.SELFUSER }`,
|
|
19
|
+
method: 'POST',
|
|
20
|
+
data: {}
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
},
|
package/mixins/fetch.client.js
CHANGED
|
@@ -5,6 +5,12 @@ const hasFetch = (component) => component.$options && typeof component.$options.
|
|
|
5
5
|
export const addLifecycleHook = (vm, hook, fn) => {
|
|
6
6
|
if (!vm.$options[hook]) {
|
|
7
7
|
vm.$options[hook] = [];
|
|
8
|
+
} else if (!Array.isArray(vm.$options[hook]) && typeof vm.$options[hook] === 'function' ) {
|
|
9
|
+
// This caters for when....
|
|
10
|
+
// - component has mixins, but they have no hooks of this type (vm.$options[hook] is then not an array)
|
|
11
|
+
// - component has the hook (vm.$options[hook] is then a function)
|
|
12
|
+
// - component has both fetch and beforeMount (the component beforeMount replaces this files beforeMount with $fetch call)
|
|
13
|
+
vm.$options[hook] = [vm.$options[hook]];
|
|
8
14
|
}
|
|
9
15
|
|
|
10
16
|
if (Array.isArray(vm.$options[hook]) && !vm.$options[hook].includes(fn)) {
|