@kong-ui-public/entities-snis 3.12.39 → 3.13.0
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/dist/entities-snis.es.js +332 -423
- package/dist/entities-snis.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,133 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { useAxios as
|
|
5
|
-
import { BookIcon as
|
|
6
|
-
const Ue = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
delete: "Delete",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, Ae = {
|
|
15
|
-
placeholder: "Filter by exact name or ID",
|
|
16
|
-
no_results: "No results found"
|
|
17
|
-
}, je = {
|
|
18
|
-
title: "SNIs",
|
|
19
|
-
list: {
|
|
20
|
-
toolbar_actions: {
|
|
21
|
-
new: "New SNI"
|
|
22
|
-
},
|
|
23
|
-
table_headers: {
|
|
24
|
-
name: "Name",
|
|
25
|
-
id: "ID",
|
|
26
|
-
certificate_id: "SSL certificate ID",
|
|
27
|
-
tags: "Tags"
|
|
28
|
-
},
|
|
29
|
-
empty_state: {
|
|
30
|
-
title: "Configure a new SNI",
|
|
31
|
-
description: "SNIs are used to map hostnames to a certificate."
|
|
32
|
-
},
|
|
33
|
-
empty_state_v2: {
|
|
34
|
-
title: "Configure your first SNI",
|
|
35
|
-
description: "Server Name Indications (SNIs) map hostnames to SSL/TLS certificates, enabling secure connections for domain-specific traffic.",
|
|
36
|
-
group: "SNIs created in gateways within this group will automatically appear here.",
|
|
37
|
-
create_cta: "New SNI",
|
|
38
|
-
learn_more: "Learn more"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, Le = {
|
|
42
|
-
sections: {
|
|
43
|
-
general: {
|
|
44
|
-
title: "General information",
|
|
45
|
-
description: "General information will help identify and manage this SNI."
|
|
46
|
-
},
|
|
47
|
-
certificate: {
|
|
48
|
-
title: "Certificate",
|
|
49
|
-
description: "Map an existing certificate object to hostnames"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
fields: {
|
|
53
|
-
name: {
|
|
54
|
-
label: "Name",
|
|
55
|
-
placeholder: "Enter a unique name for this SNI"
|
|
56
|
-
},
|
|
57
|
-
tags: {
|
|
58
|
-
label: "Tags",
|
|
59
|
-
placeholder: "Enter a list of tags separated by comma",
|
|
60
|
-
help: "e.g. tag1, tag2, tag3",
|
|
61
|
-
tooltip: "An optional set of strings for grouping and filtering, separated by commas."
|
|
62
|
-
},
|
|
63
|
-
certificate_id: {
|
|
64
|
-
label: "SSL certificate ID",
|
|
65
|
-
placeholder: "Enter or select a certificate ID",
|
|
66
|
-
footer: "Search by exact ID to find certificates not included in the list"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}, Je = {
|
|
70
|
-
delete: "The SNI could not be deleted at this time.",
|
|
71
|
-
general: "SNIs could not be retrieved",
|
|
72
|
-
certificates: {
|
|
73
|
-
fetch: "Could not fetch available certificates",
|
|
74
|
-
invalid: "Please select a valid certificate ID"
|
|
75
|
-
},
|
|
76
|
-
copy: "Failed to copy to clipboard"
|
|
77
|
-
}, Qe = {
|
|
78
|
-
success: "Copied {val} to clipboard",
|
|
79
|
-
success_brief: "Successfully copied to clipboard"
|
|
80
|
-
}, ze = {
|
|
81
|
-
actions: Ue,
|
|
82
|
-
search: Ae,
|
|
83
|
-
snis: je,
|
|
84
|
-
form: Le,
|
|
85
|
-
delete: {
|
|
86
|
-
title: "Delete an SNI",
|
|
87
|
-
description: "This action cannot be reversed so make sure to check the SNI usage before deleting."
|
|
88
|
-
},
|
|
89
|
-
errors: Je,
|
|
90
|
-
copy: Qe
|
|
1
|
+
import { defineComponent as me, computed as p, ref as b, watch as le, onBeforeMount as ge, resolveComponent as C, openBlock as y, createElementBlock as H, createVNode as l, unref as e, createSlots as de, withCtx as r, createTextVNode as S, toDisplayString as g, createBlock as _, createElementVNode as W, Teleport as Ie, createCommentVNode as q, reactive as ue } from "vue";
|
|
2
|
+
import { useRouter as ye } from "vue-router";
|
|
3
|
+
import { createI18n as Ce, i18nTComponent as Ee } from "@kong-ui-public/i18n";
|
|
4
|
+
import { useAxios as ve, useTableState as we, useFetcher as Ne, useDeleteUrlBuilder as $e, FetcherStatus as Me, EntityBaseTable as xe, PermissionsWrapper as J, TableTags as Fe, EntityFilter as De, EntityDeleteModal as Re, EntityTypes as Be, useErrors as Te, EntityBaseFormType as se, useDebouncedFilter as Ke, EntityBaseForm as Ve, SupportedEntityType as qe, EntityFormSection as fe } from "@kong-ui-public/entities-shared";
|
|
5
|
+
import { BookIcon as pe, AddIcon as re, CloudIcon as Pe } from "@kong/icons";
|
|
6
|
+
const Oe = { create: "New SNI", copy_id: "Copy ID", copy_json: "Copy JSON", edit: "Edit", delete: "Delete", clear: "Clear", loading: "Loading..." }, Ue = { placeholder: "Filter by exact name or ID", no_results: "No results found" }, Ae = { title: "SNIs", list: { toolbar_actions: { new: "New SNI" }, table_headers: { name: "Name", id: "ID", certificate_id: "SSL certificate ID", tags: "Tags" }, empty_state: { title: "Configure a new SNI", description: "SNIs are used to map hostnames to a certificate." }, empty_state_v2: { title: "Configure your first SNI", description: "Server Name Indications (SNIs) map hostnames to SSL/TLS certificates, enabling secure connections for domain-specific traffic.", group: "SNIs created in gateways within this group will automatically appear here.", create_cta: "New SNI", learn_more: "Learn more" } } }, je = { sections: { general: { title: "General information", description: "General information will help identify and manage this SNI." }, certificate: { title: "Certificate", description: "Map an existing certificate object to hostnames" } }, fields: { name: { label: "Name", placeholder: "Enter a unique name for this SNI" }, tags: { label: "Tags", placeholder: "Enter a list of tags separated by comma", help: "e.g. tag1, tag2, tag3", tooltip: "An optional set of strings for grouping and filtering, separated by commas." }, certificate_id: { label: "SSL certificate ID", placeholder: "Enter or select a certificate ID", footer: "Search by exact ID to find certificates not included in the list" } } }, Le = { delete: "The SNI could not be deleted at this time.", general: "SNIs could not be retrieved", certificates: { fetch: "Could not fetch available certificates", invalid: "Please select a valid certificate ID" }, copy: "Failed to copy to clipboard" }, Je = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, Qe = {
|
|
7
|
+
actions: Oe,
|
|
8
|
+
search: Ue,
|
|
9
|
+
snis: Ae,
|
|
10
|
+
form: je,
|
|
11
|
+
delete: { title: "Delete an SNI", description: "This action cannot be reversed so make sure to check the SNI usage before deleting." },
|
|
12
|
+
errors: Le,
|
|
13
|
+
copy: Je
|
|
91
14
|
};
|
|
92
|
-
function
|
|
93
|
-
const t =
|
|
15
|
+
function ze() {
|
|
16
|
+
const t = Ce("en-us", Qe);
|
|
94
17
|
return {
|
|
95
18
|
i18n: t,
|
|
96
|
-
i18nT:
|
|
19
|
+
i18nT: Ee(t)
|
|
97
20
|
// Translation component <i18n-t>
|
|
98
21
|
};
|
|
99
22
|
}
|
|
100
|
-
const
|
|
101
|
-
useI18n:
|
|
102
|
-
},
|
|
23
|
+
const he = {
|
|
24
|
+
useI18n: ze
|
|
25
|
+
}, Q = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", z = "/{workspace}", G = {
|
|
103
26
|
list: {
|
|
104
27
|
konnect: {
|
|
105
|
-
all: `${
|
|
28
|
+
all: `${Q}/snis`
|
|
106
29
|
},
|
|
107
30
|
kongManager: {
|
|
108
|
-
all: `${
|
|
31
|
+
all: `${z}/snis`
|
|
109
32
|
}
|
|
110
33
|
},
|
|
111
34
|
form: {
|
|
112
35
|
konnect: {
|
|
113
|
-
create: `${
|
|
114
|
-
edit: `${
|
|
115
|
-
certificates: `${
|
|
36
|
+
create: `${Q}/snis`,
|
|
37
|
+
edit: `${Q}/snis/{id}`,
|
|
38
|
+
certificates: `${Q}/certificates`
|
|
116
39
|
},
|
|
117
40
|
kongManager: {
|
|
118
|
-
create: `${
|
|
119
|
-
edit: `${
|
|
120
|
-
certificates: `${
|
|
41
|
+
create: `${z}/snis`,
|
|
42
|
+
edit: `${z}/snis/{id}`,
|
|
43
|
+
certificates: `${z}/certificates`
|
|
121
44
|
}
|
|
122
45
|
}
|
|
123
|
-
},
|
|
46
|
+
}, Ge = { class: "kong-ui-entities-snis-list" }, He = { class: "button-row" }, We = { key: 1 }, Xe = /* @__PURE__ */ me({
|
|
124
47
|
__name: "SniList",
|
|
125
48
|
props: {
|
|
126
49
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
127
50
|
config: {
|
|
128
51
|
type: Object,
|
|
129
52
|
required: !0,
|
|
130
|
-
validator: (t) => !(!t || !["konnect", "kongManager"].includes(t
|
|
53
|
+
validator: (t) => !(!t || !["konnect", "kongManager"].includes(t?.app) || !t.createRoute || !t.getViewRoute || !t.getEditRoute || t.app === "kongManager" && !t.isExactMatch && !t.filterSchema)
|
|
131
54
|
},
|
|
132
55
|
// used to override the default identifier for the cache entry
|
|
133
56
|
cacheIdentifier: {
|
|
@@ -170,191 +93,187 @@ const ke = {
|
|
|
170
93
|
}
|
|
171
94
|
},
|
|
172
95
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
173
|
-
setup(t, { emit:
|
|
174
|
-
|
|
175
|
-
const v = D, a = t, { i18n: { t: r } } = ke.useI18n(), p = he(), { axiosInstance: Z } = be((g = a.config) == null ? void 0 : g.axiosRequestConfig), { hasRecords: R, handleStateChange: ee } = Ne(() => _.value), w = y(() => R.value && a.config.app === "konnect"), N = y(() => a.config.app !== "kongManager" || !!a.config.disableSorting), s = {
|
|
96
|
+
setup(t, { emit: F }) {
|
|
97
|
+
const m = F, a = t, { i18n: { t: s } } = he.useI18n(), d = ye(), { axiosInstance: X } = ve(a.config?.axiosRequestConfig), { hasRecords: D, handleStateChange: Y } = we(() => k.value), E = p(() => D.value && a.config.app === "konnect"), w = p(() => a.config.app !== "kongManager" || !!a.config.disableSorting), o = {
|
|
176
98
|
// the Name column is non-hidable
|
|
177
|
-
name: { label:
|
|
178
|
-
certificate: { label:
|
|
179
|
-
tags: { label:
|
|
180
|
-
},
|
|
99
|
+
name: { label: s("snis.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
100
|
+
certificate: { label: s("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
101
|
+
tags: { label: s("snis.list.table_headers.tags"), sortable: !1 }
|
|
102
|
+
}, R = o, Z = (i) => ({
|
|
181
103
|
style: {
|
|
182
104
|
maxWidth: i.headerKey === "name" ? "250px" : i.headerKey === "certificate" ? "350px" : null
|
|
183
105
|
}
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}), _ = S(""), T = y(() => {
|
|
106
|
+
}), P = p(() => {
|
|
107
|
+
let i = `${a.config.apiBaseUrl}${G.list[a.config.app].all}`;
|
|
108
|
+
return a.config.app === "konnect" && (i = i.replace(/{controlPlaneId}/gi, a.config?.controlPlaneId || "")), i.replace(/\/{workspace}/gi, a.config?.workspace ? `/${a.config.workspace}` : "");
|
|
109
|
+
}), k = b(""), B = p(() => {
|
|
189
110
|
const i = a.config.app === "konnect" || a.config.isExactMatch;
|
|
190
111
|
if (i)
|
|
191
112
|
return {
|
|
192
113
|
isExactMatch: i,
|
|
193
|
-
placeholder:
|
|
114
|
+
placeholder: s("search.placeholder")
|
|
194
115
|
};
|
|
195
|
-
const { name:
|
|
116
|
+
const { name: c } = o;
|
|
196
117
|
return {
|
|
197
118
|
isExactMatch: i,
|
|
198
|
-
fields: { name:
|
|
119
|
+
fields: { name: c },
|
|
199
120
|
schema: a.config.filterSchema
|
|
200
121
|
};
|
|
201
122
|
}), {
|
|
202
|
-
fetcher:
|
|
203
|
-
fetcherState:
|
|
204
|
-
fetcherCacheKey:
|
|
205
|
-
} =
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
},
|
|
123
|
+
fetcher: N,
|
|
124
|
+
fetcherState: ee,
|
|
125
|
+
fetcherCacheKey: T
|
|
126
|
+
} = Ne(p(() => ({ ...a.config, cacheIdentifier: a.cacheIdentifier })), P), te = () => {
|
|
127
|
+
k.value = "";
|
|
128
|
+
}, ae = () => {
|
|
129
|
+
T.value++;
|
|
130
|
+
}, $ = b(null), K = b({
|
|
210
131
|
ctaPath: a.config.createRoute,
|
|
211
132
|
ctaText: void 0,
|
|
212
|
-
message: `${
|
|
213
|
-
title:
|
|
214
|
-
}),
|
|
215
|
-
const
|
|
216
|
-
if (!await
|
|
217
|
-
|
|
133
|
+
message: `${s("snis.list.empty_state.description")}${a.config.additionMessageForEmptyState ? ` ${a.config.additionMessageForEmptyState}` : ""}`,
|
|
134
|
+
title: s("snis.title")
|
|
135
|
+
}), ie = async (i, c) => {
|
|
136
|
+
const v = i.id;
|
|
137
|
+
if (!await c(v)) {
|
|
138
|
+
m("copy:error", {
|
|
218
139
|
entity: i,
|
|
219
140
|
field: "id",
|
|
220
|
-
message:
|
|
141
|
+
message: s("errors.copy")
|
|
221
142
|
});
|
|
222
143
|
return;
|
|
223
144
|
}
|
|
224
|
-
|
|
145
|
+
m("copy:success", {
|
|
225
146
|
entity: i,
|
|
226
147
|
field: "id",
|
|
227
|
-
message:
|
|
148
|
+
message: s("copy.success", { val: v })
|
|
228
149
|
});
|
|
229
|
-
},
|
|
230
|
-
const
|
|
231
|
-
if (!await
|
|
232
|
-
|
|
150
|
+
}, ne = async (i, c) => {
|
|
151
|
+
const v = JSON.stringify(i);
|
|
152
|
+
if (!await c(v)) {
|
|
153
|
+
m("copy:error", {
|
|
233
154
|
entity: i,
|
|
234
|
-
message:
|
|
155
|
+
message: s("errors.copy")
|
|
235
156
|
});
|
|
236
157
|
return;
|
|
237
158
|
}
|
|
238
|
-
|
|
159
|
+
m("copy:success", {
|
|
239
160
|
entity: i,
|
|
240
|
-
message:
|
|
161
|
+
message: s("copy.success_brief")
|
|
241
162
|
});
|
|
242
|
-
},
|
|
243
|
-
label:
|
|
163
|
+
}, oe = (i) => ({
|
|
164
|
+
label: s("actions.edit"),
|
|
244
165
|
to: a.config.getEditRoute(i)
|
|
245
|
-
}),
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
F.value = !0;
|
|
166
|
+
}), h = b(void 0), M = b(!1), x = b(!1), O = b(""), V = $e(a.config, P.value), U = (i) => {
|
|
167
|
+
h.value = i, M.value = !0;
|
|
168
|
+
}, A = () => {
|
|
169
|
+
M.value = !1, h.value = void 0;
|
|
170
|
+
}, n = async () => {
|
|
171
|
+
if (h.value?.id) {
|
|
172
|
+
x.value = !0;
|
|
253
173
|
try {
|
|
254
|
-
await
|
|
255
|
-
} catch (
|
|
256
|
-
|
|
174
|
+
await X.delete(V(h.value.id)), m("delete:success", h.value), x.value = !1, A(), T.value++;
|
|
175
|
+
} catch (i) {
|
|
176
|
+
O.value = i.response?.data?.message || i.message || s("errors.delete"), m("error", i);
|
|
257
177
|
} finally {
|
|
258
|
-
|
|
178
|
+
x.value = !1;
|
|
259
179
|
}
|
|
260
180
|
}
|
|
261
|
-
},
|
|
262
|
-
|
|
181
|
+
}, u = () => {
|
|
182
|
+
d.push(a.config.createRoute);
|
|
263
183
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}, (u = (f = (n = i.error) == null ? void 0 : n.response) == null ? void 0 : f.data) != null && u.message && (M.value.message = i.error.response.data.message), v("error", i.error);
|
|
184
|
+
le(ee, (i) => {
|
|
185
|
+
if (i.status === Me.Error) {
|
|
186
|
+
$.value = {
|
|
187
|
+
title: s("errors.general")
|
|
188
|
+
}, i.error?.response?.data?.message && ($.value.message = i.error.response.data.message), m("error", i.error);
|
|
270
189
|
return;
|
|
271
190
|
}
|
|
272
|
-
|
|
191
|
+
$.value = null;
|
|
273
192
|
});
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
|
|
277
|
-
}), (i,
|
|
278
|
-
const
|
|
279
|
-
return
|
|
280
|
-
|
|
193
|
+
const I = b(!1);
|
|
194
|
+
return ge(async () => {
|
|
195
|
+
I.value = await a.canCreate(), I.value && (K.value.title = s("snis.list.empty_state.title"), K.value.ctaText = s("actions.create"));
|
|
196
|
+
}), (i, c) => {
|
|
197
|
+
const v = C("KButton"), ke = C("KEmptyState"), Se = C("KCopy"), j = C("KDropdownItem"), ce = C("KClipboardProvider");
|
|
198
|
+
return y(), H("div", Ge, [
|
|
199
|
+
l(e(xe), {
|
|
281
200
|
"cache-identifier": t.cacheIdentifier,
|
|
282
|
-
"cell-attributes":
|
|
201
|
+
"cell-attributes": Z,
|
|
283
202
|
"disable-row-click": !0,
|
|
284
|
-
"disable-sorting":
|
|
285
|
-
"empty-state-options":
|
|
203
|
+
"disable-sorting": w.value,
|
|
204
|
+
"empty-state-options": K.value,
|
|
286
205
|
"enable-entity-actions": "",
|
|
287
|
-
"error-message":
|
|
288
|
-
fetcher: e(
|
|
289
|
-
"fetcher-cache-key": e(
|
|
206
|
+
"error-message": $.value,
|
|
207
|
+
fetcher: e(N),
|
|
208
|
+
"fetcher-cache-key": e(T),
|
|
290
209
|
"pagination-type": "offset",
|
|
291
210
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
292
|
-
query:
|
|
293
|
-
"table-headers": e(
|
|
294
|
-
onClearSearchInput:
|
|
295
|
-
onSort:
|
|
296
|
-
onState: e(
|
|
297
|
-
},
|
|
298
|
-
"toolbar-filter":
|
|
299
|
-
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue":
|
|
302
|
-
config:
|
|
211
|
+
query: k.value,
|
|
212
|
+
"table-headers": e(R),
|
|
213
|
+
onClearSearchInput: te,
|
|
214
|
+
onSort: ae,
|
|
215
|
+
onState: e(Y)
|
|
216
|
+
}, de({
|
|
217
|
+
"toolbar-filter": r(() => [
|
|
218
|
+
l(e(De), {
|
|
219
|
+
modelValue: k.value,
|
|
220
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => k.value = f),
|
|
221
|
+
config: B.value
|
|
303
222
|
}, null, 8, ["modelValue", "config"]),
|
|
304
|
-
t.useToolbarCreationButton ? (
|
|
223
|
+
t.useToolbarCreationButton ? (y(), _(e(J), {
|
|
305
224
|
key: 0,
|
|
306
225
|
"auth-function": t.canCreate
|
|
307
226
|
}, {
|
|
308
|
-
default:
|
|
309
|
-
|
|
227
|
+
default: r(() => [
|
|
228
|
+
l(v, {
|
|
310
229
|
appearance: "primary",
|
|
311
230
|
"data-testid": "toolbar-add-sni",
|
|
312
231
|
size: "large",
|
|
313
232
|
to: t.config.createRoute
|
|
314
233
|
}, {
|
|
315
|
-
default:
|
|
316
|
-
|
|
317
|
-
|
|
234
|
+
default: r(() => [
|
|
235
|
+
l(e(re)),
|
|
236
|
+
S(" " + g(e(s)("actions.create")), 1)
|
|
318
237
|
]),
|
|
319
238
|
_: 1
|
|
320
239
|
}, 8, ["to"])
|
|
321
240
|
]),
|
|
322
241
|
_: 1
|
|
323
|
-
}, 8, ["auth-function"])) :
|
|
242
|
+
}, 8, ["auth-function"])) : q("", !0)
|
|
324
243
|
]),
|
|
325
|
-
"toolbar-button":
|
|
326
|
-
(
|
|
244
|
+
"toolbar-button": r(() => [
|
|
245
|
+
(y(), _(Ie, {
|
|
327
246
|
disabled: !t.useActionOutside,
|
|
328
247
|
to: "#kong-ui-app-page-header-action-button"
|
|
329
248
|
}, [
|
|
330
|
-
|
|
331
|
-
|
|
249
|
+
W("div", He, [
|
|
250
|
+
E.value ? (y(), _(v, {
|
|
332
251
|
key: 0,
|
|
333
252
|
appearance: "secondary",
|
|
334
253
|
class: "open-learning-hub",
|
|
335
254
|
"data-testid": "snis-learn-more-button",
|
|
336
255
|
icon: "",
|
|
337
|
-
onClick:
|
|
256
|
+
onClick: c[1] || (c[1] = (f) => i.$emit("click:learn-more"))
|
|
338
257
|
}, {
|
|
339
|
-
default:
|
|
340
|
-
|
|
258
|
+
default: r(() => [
|
|
259
|
+
l(e(pe), { decorative: "" })
|
|
341
260
|
]),
|
|
342
261
|
_: 1
|
|
343
|
-
})) :
|
|
344
|
-
t.useToolbarCreationButton ?
|
|
262
|
+
})) : q("", !0),
|
|
263
|
+
t.useToolbarCreationButton ? q("", !0) : (y(), _(e(J), {
|
|
345
264
|
key: 1,
|
|
346
265
|
"auth-function": t.canCreate
|
|
347
266
|
}, {
|
|
348
|
-
default:
|
|
349
|
-
|
|
267
|
+
default: r(() => [
|
|
268
|
+
l(v, {
|
|
350
269
|
appearance: "primary",
|
|
351
270
|
"data-testid": "toolbar-add-sni",
|
|
352
271
|
size: t.useActionOutside ? "medium" : "large",
|
|
353
272
|
to: t.config.createRoute
|
|
354
273
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
357
|
-
|
|
274
|
+
default: r(() => [
|
|
275
|
+
l(e(re)),
|
|
276
|
+
S(" " + g(e(s)("snis.list.toolbar_actions.new")), 1)
|
|
358
277
|
]),
|
|
359
278
|
_: 1
|
|
360
279
|
}, 8, ["size", "to"])
|
|
@@ -364,73 +283,73 @@ const ke = {
|
|
|
364
283
|
])
|
|
365
284
|
], 8, ["disabled"]))
|
|
366
285
|
]),
|
|
367
|
-
name:
|
|
368
|
-
|
|
286
|
+
name: r(({ rowValue: f }) => [
|
|
287
|
+
W("b", null, g(f ?? "-"), 1)
|
|
369
288
|
]),
|
|
370
|
-
certificate:
|
|
371
|
-
|
|
289
|
+
certificate: r(({ row: f }) => [
|
|
290
|
+
f.certificate && f.certificate.id ? (y(), _(Se, {
|
|
372
291
|
key: 0,
|
|
373
292
|
class: "copy-certificate-uuid",
|
|
374
293
|
"data-testid": "copy-certificate-uuid",
|
|
375
|
-
text:
|
|
294
|
+
text: f.certificate.id,
|
|
376
295
|
truncate: ""
|
|
377
|
-
}, null, 8, ["text"])) : (
|
|
296
|
+
}, null, 8, ["text"])) : (y(), H("span", We, "-"))
|
|
378
297
|
]),
|
|
379
|
-
tags:
|
|
380
|
-
|
|
298
|
+
tags: r(({ rowValue: f }) => [
|
|
299
|
+
l(e(Fe), { tags: f }, null, 8, ["tags"])
|
|
381
300
|
]),
|
|
382
|
-
actions:
|
|
383
|
-
|
|
384
|
-
default:
|
|
385
|
-
|
|
301
|
+
actions: r(({ row: f }) => [
|
|
302
|
+
l(ce, null, {
|
|
303
|
+
default: r(({ copyToClipboard: L }) => [
|
|
304
|
+
l(j, {
|
|
386
305
|
"data-testid": "action-entity-copy-id",
|
|
387
|
-
onClick: (
|
|
306
|
+
onClick: (_e) => ie(f, L)
|
|
388
307
|
}, {
|
|
389
|
-
default:
|
|
390
|
-
|
|
308
|
+
default: r(() => [
|
|
309
|
+
S(g(e(s)("actions.copy_id")), 1)
|
|
391
310
|
]),
|
|
392
311
|
_: 1
|
|
393
312
|
}, 8, ["onClick"])
|
|
394
313
|
]),
|
|
395
314
|
_: 2
|
|
396
315
|
}, 1024),
|
|
397
|
-
|
|
398
|
-
default:
|
|
399
|
-
|
|
316
|
+
l(ce, null, {
|
|
317
|
+
default: r(({ copyToClipboard: L }) => [
|
|
318
|
+
l(j, {
|
|
400
319
|
"data-testid": "action-entity-copy-json",
|
|
401
|
-
onClick: (
|
|
320
|
+
onClick: (_e) => ne(f, L)
|
|
402
321
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
|
|
322
|
+
default: r(() => [
|
|
323
|
+
S(g(e(s)("actions.copy_json")), 1)
|
|
405
324
|
]),
|
|
406
325
|
_: 1
|
|
407
326
|
}, 8, ["onClick"])
|
|
408
327
|
]),
|
|
409
328
|
_: 2
|
|
410
329
|
}, 1024),
|
|
411
|
-
|
|
412
|
-
"auth-function": () => t.canEdit(
|
|
330
|
+
l(e(J), {
|
|
331
|
+
"auth-function": () => t.canEdit(f)
|
|
413
332
|
}, {
|
|
414
|
-
default:
|
|
415
|
-
|
|
333
|
+
default: r(() => [
|
|
334
|
+
l(j, {
|
|
416
335
|
"data-testid": "action-entity-edit",
|
|
417
|
-
item:
|
|
336
|
+
item: oe(f.id)
|
|
418
337
|
}, null, 8, ["item"])
|
|
419
338
|
]),
|
|
420
339
|
_: 2
|
|
421
340
|
}, 1032, ["auth-function"]),
|
|
422
|
-
|
|
423
|
-
"auth-function": () => t.canDelete(
|
|
341
|
+
l(e(J), {
|
|
342
|
+
"auth-function": () => t.canDelete(f)
|
|
424
343
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
344
|
+
default: r(() => [
|
|
345
|
+
l(j, {
|
|
427
346
|
danger: "",
|
|
428
347
|
"data-testid": "action-entity-delete",
|
|
429
348
|
"has-divider": "",
|
|
430
|
-
onClick: (
|
|
349
|
+
onClick: (L) => U(f)
|
|
431
350
|
}, {
|
|
432
|
-
default:
|
|
433
|
-
|
|
351
|
+
default: r(() => [
|
|
352
|
+
S(g(e(s)("actions.delete")), 1)
|
|
434
353
|
]),
|
|
435
354
|
_: 1
|
|
436
355
|
}, 8, ["onClick"])
|
|
@@ -440,91 +359,88 @@ const ke = {
|
|
|
440
359
|
]),
|
|
441
360
|
_: 2
|
|
442
361
|
}, [
|
|
443
|
-
!
|
|
362
|
+
!k.value && t.config.app === "konnect" ? {
|
|
444
363
|
name: "empty-state",
|
|
445
|
-
fn:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
d(e(ge), { decorative: "" }),
|
|
476
|
-
I(" " + h(e(r)("snis.list.empty_state_v2.learn_more")), 1)
|
|
477
|
-
]),
|
|
478
|
-
_: 1
|
|
479
|
-
})
|
|
480
|
-
]),
|
|
481
|
-
_: 2
|
|
482
|
-
}, [
|
|
483
|
-
(m = t.config) != null && m.isControlPlaneGroup ? {
|
|
484
|
-
name: "default",
|
|
485
|
-
fn: c(() => [
|
|
486
|
-
I(h(e(r)("snis.list.empty_state_v2.group")), 1)
|
|
364
|
+
fn: r(() => [
|
|
365
|
+
l(ke, {
|
|
366
|
+
"data-testid": "snis-entity-empty-state",
|
|
367
|
+
"icon-background": "",
|
|
368
|
+
message: e(s)("snis.list.empty_state_v2.description"),
|
|
369
|
+
title: e(s)("snis.list.empty_state_v2.title")
|
|
370
|
+
}, de({
|
|
371
|
+
icon: r(() => [
|
|
372
|
+
l(e(Pe), { decorative: "" })
|
|
373
|
+
]),
|
|
374
|
+
action: r(() => [
|
|
375
|
+
I.value ? (y(), _(v, {
|
|
376
|
+
key: 0,
|
|
377
|
+
"data-testid": "entity-create-button",
|
|
378
|
+
onClick: u
|
|
379
|
+
}, {
|
|
380
|
+
default: r(() => [
|
|
381
|
+
l(e(re), { decorative: "" }),
|
|
382
|
+
S(" " + g(e(s)("snis.list.toolbar_actions.new")), 1)
|
|
383
|
+
]),
|
|
384
|
+
_: 1
|
|
385
|
+
})) : q("", !0),
|
|
386
|
+
l(v, {
|
|
387
|
+
appearance: "secondary",
|
|
388
|
+
"data-testid": "entity-learn-more-button",
|
|
389
|
+
onClick: c[2] || (c[2] = (f) => i.$emit("click:learn-more"))
|
|
390
|
+
}, {
|
|
391
|
+
default: r(() => [
|
|
392
|
+
l(e(pe), { decorative: "" }),
|
|
393
|
+
S(" " + g(e(s)("snis.list.empty_state_v2.learn_more")), 1)
|
|
487
394
|
]),
|
|
488
|
-
|
|
489
|
-
}
|
|
490
|
-
]),
|
|
491
|
-
|
|
492
|
-
|
|
395
|
+
_: 1
|
|
396
|
+
})
|
|
397
|
+
]),
|
|
398
|
+
_: 2
|
|
399
|
+
}, [
|
|
400
|
+
t.config?.isControlPlaneGroup ? {
|
|
401
|
+
name: "default",
|
|
402
|
+
fn: r(() => [
|
|
403
|
+
S(g(e(s)("snis.list.empty_state_v2.group")), 1)
|
|
404
|
+
]),
|
|
405
|
+
key: "0"
|
|
406
|
+
} : void 0
|
|
407
|
+
]), 1032, ["message", "title"])
|
|
408
|
+
]),
|
|
493
409
|
key: "0"
|
|
494
410
|
} : void 0
|
|
495
411
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
496
|
-
|
|
497
|
-
"action-pending":
|
|
498
|
-
description: e(
|
|
499
|
-
"entity-name":
|
|
500
|
-
"entity-type": e(
|
|
501
|
-
error:
|
|
412
|
+
l(e(Re), {
|
|
413
|
+
"action-pending": x.value,
|
|
414
|
+
description: e(s)("delete.description"),
|
|
415
|
+
"entity-name": h.value && (h.value.name || h.value.id),
|
|
416
|
+
"entity-type": e(Be).SNI,
|
|
417
|
+
error: O.value,
|
|
502
418
|
"need-confirm": !1,
|
|
503
|
-
title: e(
|
|
504
|
-
visible:
|
|
505
|
-
onCancel:
|
|
506
|
-
onProceed:
|
|
419
|
+
title: e(s)("delete.title"),
|
|
420
|
+
visible: M.value,
|
|
421
|
+
onCancel: A,
|
|
422
|
+
onProceed: n
|
|
507
423
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
508
424
|
]);
|
|
509
425
|
};
|
|
510
426
|
}
|
|
511
|
-
}),
|
|
512
|
-
const
|
|
513
|
-
for (const [a,
|
|
514
|
-
|
|
515
|
-
return
|
|
516
|
-
},
|
|
427
|
+
}), be = (t, F) => {
|
|
428
|
+
const m = t.__vccOpts || t;
|
|
429
|
+
for (const [a, s] of F)
|
|
430
|
+
m[a] = s;
|
|
431
|
+
return m;
|
|
432
|
+
}, rt = /* @__PURE__ */ be(Xe, [["__scopeId", "data-v-fa9cde4b"]]), Ye = { class: "kong-ui-entities-snis-form" }, Ze = { "data-testid": "no-search-results" }, et = {
|
|
517
433
|
key: 2,
|
|
518
434
|
class: "invalid-certificate-message",
|
|
519
435
|
"data-testid": "invalid-certificate-message"
|
|
520
|
-
},
|
|
436
|
+
}, tt = /* @__PURE__ */ me({
|
|
521
437
|
__name: "SniForm",
|
|
522
438
|
props: {
|
|
523
439
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
524
440
|
config: {
|
|
525
441
|
type: Object,
|
|
526
442
|
required: !0,
|
|
527
|
-
validator: (t) => !(!t || !["konnect", "kongManager"].includes(t
|
|
443
|
+
validator: (t) => !(!t || !["konnect", "kongManager"].includes(t?.app) || t.app === "konnect" && !t.controlPlaneId || t.app === "kongManager" && typeof t.workspace != "string" || !t.cancelRoute)
|
|
528
444
|
},
|
|
529
445
|
/** If a valid SNI ID is provided, it will put the form in Edit mode instead of Create */
|
|
530
446
|
sniId: {
|
|
@@ -534,9 +450,8 @@ const ke = {
|
|
|
534
450
|
}
|
|
535
451
|
},
|
|
536
452
|
emits: ["update", "error", "loading"],
|
|
537
|
-
setup(t, { emit:
|
|
538
|
-
|
|
539
|
-
const v = D, a = t, r = he(), { i18n: { t: p } } = ke.useI18n(), { getMessageFromError: Z } = Ke(), { axiosInstance: R } = be((J = a.config) == null ? void 0 : J.axiosRequestConfig), ee = y(() => W.form[a.config.app].edit), w = y(() => a.sniId ? le.Edit : le.Create), N = y(() => a.config.certificateId && w.value === le.Create ? a.config.certificateId : ""), s = pe({
|
|
453
|
+
setup(t, { emit: F }) {
|
|
454
|
+
const m = F, a = t, s = ye(), { i18n: { t: d } } = he.useI18n(), { getMessageFromError: X } = Te(), { axiosInstance: D } = ve(a.config?.axiosRequestConfig), Y = p(() => G.form[a.config.app].edit), E = p(() => a.sniId ? se.Edit : se.Create), w = p(() => a.config.certificateId && E.value === se.Create ? a.config.certificateId : ""), o = ue({
|
|
540
455
|
fields: {
|
|
541
456
|
name: "",
|
|
542
457
|
tags: "",
|
|
@@ -544,159 +459,153 @@ const ke = {
|
|
|
544
459
|
},
|
|
545
460
|
isReadonly: !1,
|
|
546
461
|
errorMessage: ""
|
|
547
|
-
}),
|
|
462
|
+
}), R = ue({
|
|
548
463
|
name: "",
|
|
549
464
|
tags: "",
|
|
550
465
|
certificate_id: ""
|
|
551
|
-
}),
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
name: s.fields.name,
|
|
564
|
-
tags: (o = (l = s.fields.tags.split(",")) == null ? void 0 : l.map((g) => String(g || "").trim())) == null ? void 0 : o.filter((g) => g !== ""),
|
|
565
|
-
certificate: { id: N.value || s.fields.certificate_id }
|
|
566
|
-
};
|
|
567
|
-
}), ae = async () => {
|
|
568
|
-
var l, o, g, i, n, f;
|
|
466
|
+
}), Z = p(() => JSON.stringify(o.fields) !== JSON.stringify(R) && !!o.fields.name && !!(o.fields.certificate_id || w.value)), P = (n) => {
|
|
467
|
+
o.fields.name = n?.name || "", o.fields.tags = n?.tags?.join(", ") || "", o.fields.certificate_id = n?.certificate?.id || "", Object.assign(R, o.fields);
|
|
468
|
+
}, k = () => {
|
|
469
|
+
s.push(a.config.cancelRoute);
|
|
470
|
+
}, B = p(() => {
|
|
471
|
+
let n = `${a.config.apiBaseUrl}${G.form[a.config.app][E.value]}`;
|
|
472
|
+
return a.config.app === "konnect" && (n = n.replace(/{controlPlaneId}/gi, a.config?.controlPlaneId || "")), n.replace(/\/{workspace}/gi, a.config?.workspace ? `/${a.config.workspace}` : "").replace(/{id}/gi, a.sniId ?? "");
|
|
473
|
+
}), N = p(() => ({
|
|
474
|
+
name: o.fields.name,
|
|
475
|
+
tags: o.fields.tags.split(",")?.map((n) => String(n || "").trim())?.filter((n) => n !== ""),
|
|
476
|
+
certificate: { id: w.value || o.fields.certificate_id }
|
|
477
|
+
})), ee = async () => {
|
|
569
478
|
try {
|
|
570
|
-
|
|
571
|
-
let
|
|
572
|
-
|
|
573
|
-
} catch (
|
|
574
|
-
|
|
479
|
+
o.isReadonly = !0;
|
|
480
|
+
let n;
|
|
481
|
+
E.value === "create" ? n = await D.post(B.value, N.value) : E.value === "edit" && (n = a.config?.app === "konnect" ? await D.put(B.value, N.value) : await D.patch(B.value, N.value)), o.fields.name = n?.data?.name || "", o.fields.tags = n?.data?.tags?.join(", ") || "", o.fields.certificate_id = n?.data?.certificate?.id || "", Object.assign(R, o.fields), m("update", n?.data);
|
|
482
|
+
} catch (n) {
|
|
483
|
+
o.errorMessage = X(n), m("error", n);
|
|
575
484
|
} finally {
|
|
576
|
-
|
|
485
|
+
o.isReadonly = !1;
|
|
577
486
|
}
|
|
578
487
|
}, {
|
|
579
|
-
debouncedQueryChange:
|
|
580
|
-
loading:
|
|
581
|
-
allRecords:
|
|
582
|
-
error:
|
|
583
|
-
validationError:
|
|
584
|
-
loadItems:
|
|
585
|
-
results:
|
|
586
|
-
} =
|
|
587
|
-
|
|
588
|
-
},
|
|
589
|
-
label:
|
|
590
|
-
value:
|
|
591
|
-
selected:
|
|
592
|
-
}))),
|
|
593
|
-
|
|
594
|
-
let
|
|
595
|
-
for (
|
|
596
|
-
|
|
488
|
+
debouncedQueryChange: T,
|
|
489
|
+
loading: te,
|
|
490
|
+
allRecords: ae,
|
|
491
|
+
error: $,
|
|
492
|
+
validationError: K,
|
|
493
|
+
loadItems: ie,
|
|
494
|
+
results: ne
|
|
495
|
+
} = Ke(a.config, G.form[a.config.app].certificates), oe = (n) => {
|
|
496
|
+
T(n);
|
|
497
|
+
}, h = p(() => $.value ? d("errors.certificates.fetch") : ""), M = p(() => K.value ? d("errors.certificates.invalid") : ""), x = b(0), O = p(() => ae.value === void 0), V = b(/* @__PURE__ */ new Set()), U = p(() => Array.from(V.value).map((u) => ({
|
|
498
|
+
label: u,
|
|
499
|
+
value: u,
|
|
500
|
+
selected: o.fields.certificate_id === u
|
|
501
|
+
}))), A = (n) => {
|
|
502
|
+
V.value.clear();
|
|
503
|
+
let u;
|
|
504
|
+
for (u of n)
|
|
505
|
+
V.value.add(u.id);
|
|
597
506
|
};
|
|
598
|
-
return
|
|
599
|
-
|
|
600
|
-
}, { immediate: !0, deep: !0 }),
|
|
601
|
-
|
|
602
|
-
}, { immediate: !0, deep: !0 }),
|
|
603
|
-
await
|
|
604
|
-
}), (
|
|
605
|
-
const
|
|
606
|
-
return
|
|
607
|
-
|
|
608
|
-
"can-submit":
|
|
507
|
+
return le(ne, (n) => {
|
|
508
|
+
A(n);
|
|
509
|
+
}, { immediate: !0, deep: !0 }), le(U, () => {
|
|
510
|
+
x.value++;
|
|
511
|
+
}, { immediate: !0, deep: !0 }), ge(async () => {
|
|
512
|
+
await ie();
|
|
513
|
+
}), (n, u) => {
|
|
514
|
+
const I = C("KInput"), i = C("KSelect");
|
|
515
|
+
return y(), H("div", Ye, [
|
|
516
|
+
l(e(Ve), {
|
|
517
|
+
"can-submit": Z.value,
|
|
609
518
|
config: t.config,
|
|
610
519
|
"edit-id": t.sniId,
|
|
611
|
-
"entity-type": e(
|
|
612
|
-
"error-message":
|
|
613
|
-
"fetch-url":
|
|
614
|
-
"form-fields":
|
|
615
|
-
"is-readonly":
|
|
616
|
-
onCancel:
|
|
617
|
-
"onFetch:error":
|
|
618
|
-
"onFetch:success":
|
|
619
|
-
onLoading:
|
|
620
|
-
onSubmit:
|
|
520
|
+
"entity-type": e(qe).SNI,
|
|
521
|
+
"error-message": o.errorMessage || h.value,
|
|
522
|
+
"fetch-url": Y.value,
|
|
523
|
+
"form-fields": N.value,
|
|
524
|
+
"is-readonly": o.isReadonly,
|
|
525
|
+
onCancel: k,
|
|
526
|
+
"onFetch:error": u[3] || (u[3] = (c) => n.$emit("error", c)),
|
|
527
|
+
"onFetch:success": P,
|
|
528
|
+
onLoading: u[4] || (u[4] = (c) => n.$emit("loading", c)),
|
|
529
|
+
onSubmit: ee
|
|
621
530
|
}, {
|
|
622
|
-
default:
|
|
623
|
-
|
|
624
|
-
description: e(
|
|
625
|
-
title: e(
|
|
531
|
+
default: r(() => [
|
|
532
|
+
l(e(fe), {
|
|
533
|
+
description: e(d)("form.sections.general.description"),
|
|
534
|
+
title: e(d)("form.sections.general.title")
|
|
626
535
|
}, {
|
|
627
|
-
default:
|
|
628
|
-
|
|
629
|
-
modelValue:
|
|
630
|
-
"onUpdate:modelValue":
|
|
536
|
+
default: r(() => [
|
|
537
|
+
l(I, {
|
|
538
|
+
modelValue: o.fields.name,
|
|
539
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.fields.name = c),
|
|
631
540
|
modelModifiers: { trim: !0 },
|
|
632
541
|
autocomplete: "off",
|
|
633
542
|
"data-testid": "sni-form-name",
|
|
634
|
-
label: e(
|
|
635
|
-
placeholder: e(
|
|
636
|
-
readonly:
|
|
543
|
+
label: e(d)("form.fields.name.label"),
|
|
544
|
+
placeholder: e(d)("form.fields.name.placeholder"),
|
|
545
|
+
readonly: o.isReadonly,
|
|
637
546
|
required: "",
|
|
638
547
|
type: "text"
|
|
639
548
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
640
|
-
|
|
641
|
-
modelValue:
|
|
642
|
-
"onUpdate:modelValue":
|
|
549
|
+
l(I, {
|
|
550
|
+
modelValue: o.fields.tags,
|
|
551
|
+
"onUpdate:modelValue": u[1] || (u[1] = (c) => o.fields.tags = c),
|
|
643
552
|
modelModifiers: { trim: !0 },
|
|
644
553
|
autocomplete: "off",
|
|
645
554
|
"data-testid": "sni-form-tags",
|
|
646
|
-
help: e(
|
|
647
|
-
label: e(
|
|
555
|
+
help: e(d)("form.fields.tags.help"),
|
|
556
|
+
label: e(d)("form.fields.tags.label"),
|
|
648
557
|
"label-attributes": {
|
|
649
|
-
info: e(
|
|
558
|
+
info: e(d)("form.fields.tags.tooltip"),
|
|
650
559
|
tooltipAttributes: { maxWidth: "400" }
|
|
651
560
|
},
|
|
652
|
-
placeholder: e(
|
|
653
|
-
readonly:
|
|
561
|
+
placeholder: e(d)("form.fields.tags.placeholder"),
|
|
562
|
+
readonly: o.isReadonly,
|
|
654
563
|
type: "text"
|
|
655
564
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
656
565
|
]),
|
|
657
566
|
_: 1
|
|
658
567
|
}, 8, ["description", "title"]),
|
|
659
|
-
|
|
660
|
-
description: e(
|
|
568
|
+
l(e(fe), {
|
|
569
|
+
description: e(d)("form.sections.certificate.description"),
|
|
661
570
|
"has-divider": "",
|
|
662
|
-
title: e(
|
|
571
|
+
title: e(d)("form.sections.certificate.title")
|
|
663
572
|
}, {
|
|
664
|
-
default:
|
|
665
|
-
|
|
573
|
+
default: r(() => [
|
|
574
|
+
w.value ? (y(), _(I, {
|
|
666
575
|
key: 0,
|
|
667
576
|
"data-testid": "sni-form-certificate-id",
|
|
668
|
-
label: e(
|
|
669
|
-
"model-value":
|
|
577
|
+
label: e(d)("form.fields.certificate_id.label"),
|
|
578
|
+
"model-value": w.value,
|
|
670
579
|
readonly: "",
|
|
671
580
|
required: "",
|
|
672
581
|
width: "100%"
|
|
673
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
582
|
+
}, null, 8, ["label", "model-value"])) : (y(), _(i, {
|
|
674
583
|
key: 1,
|
|
675
|
-
modelValue:
|
|
676
|
-
"onUpdate:modelValue":
|
|
584
|
+
modelValue: o.fields.certificate_id,
|
|
585
|
+
"onUpdate:modelValue": u[2] || (u[2] = (c) => o.fields.certificate_id = c),
|
|
677
586
|
clearable: "",
|
|
678
587
|
"data-testid": "sni-form-certificate-id",
|
|
679
|
-
"dropdown-footer-text":
|
|
588
|
+
"dropdown-footer-text": O.value ? e(d)("form.fields.certificate_id.footer") : void 0,
|
|
680
589
|
"enable-filtering": "",
|
|
681
590
|
"filter-function": () => !0,
|
|
682
|
-
items:
|
|
683
|
-
label: e(
|
|
684
|
-
loading: e(
|
|
685
|
-
placeholder: e(
|
|
686
|
-
readonly:
|
|
591
|
+
items: U.value,
|
|
592
|
+
label: e(d)("form.fields.certificate_id.label"),
|
|
593
|
+
loading: e(te),
|
|
594
|
+
placeholder: e(d)("form.fields.certificate_id.placeholder"),
|
|
595
|
+
readonly: o.isReadonly,
|
|
687
596
|
required: "",
|
|
688
597
|
width: "100%",
|
|
689
|
-
onQueryChange:
|
|
598
|
+
onQueryChange: oe
|
|
690
599
|
}, {
|
|
691
|
-
loading:
|
|
692
|
-
|
|
600
|
+
loading: r(() => [
|
|
601
|
+
W("div", null, g(e(d)("actions.loading")), 1)
|
|
693
602
|
]),
|
|
694
|
-
empty:
|
|
695
|
-
|
|
603
|
+
empty: r(() => [
|
|
604
|
+
W("div", Ze, g(e(d)("search.no_results")), 1)
|
|
696
605
|
]),
|
|
697
606
|
_: 1
|
|
698
607
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
699
|
-
|
|
608
|
+
M.value ? (y(), H("p", et, g(M.value), 1)) : q("", !0)
|
|
700
609
|
]),
|
|
701
610
|
_: 1
|
|
702
611
|
}, 8, ["description", "title"])
|
|
@@ -706,8 +615,8 @@ const ke = {
|
|
|
706
615
|
]);
|
|
707
616
|
};
|
|
708
617
|
}
|
|
709
|
-
}),
|
|
618
|
+
}), lt = /* @__PURE__ */ be(tt, [["__scopeId", "data-v-25387b59"]]);
|
|
710
619
|
export {
|
|
711
|
-
|
|
712
|
-
|
|
620
|
+
lt as SniForm,
|
|
621
|
+
rt as SniList
|
|
713
622
|
};
|