@kong-ui-public/entities-snis 3.5.32 → 3.5.33
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as fe, ref as v, computed as g, watch as
|
|
1
|
+
import { defineComponent as fe, ref as v, computed as g, watch as se, onBeforeMount as ue, resolveComponent as C, openBlock as h, createElementBlock as N, createVNode as p, unref as s, withCtx as f, createBlock as w, Teleport as ve, withDirectives as he, createTextVNode as A, toDisplayString as k, vShow as be, createElementVNode as re, Fragment as _e, renderList as ke, withModifiers as Ie, reactive as le, createCommentVNode as Ce } from "vue";
|
|
2
2
|
import { createI18n as Se, i18nTComponent as Ee } from "@kong-ui-public/i18n";
|
|
3
|
-
import { useAxios as pe, useFetcher as Me, useDeleteUrlBuilder as $e, FetcherStatus as ce, EntityBaseTable as xe, EntityFilter as De, PermissionsWrapper as ne, EntityDeleteModal as Fe, EntityTypes as Ne, useErrors as we, EntityBaseFormType as oe, useDebouncedFilter as Re, EntityBaseForm as Be, SupportedEntityType as
|
|
4
|
-
import { AddIcon as
|
|
3
|
+
import { useAxios as pe, useFetcher as Me, useDeleteUrlBuilder as $e, FetcherStatus as ce, EntityBaseTable as xe, EntityFilter as De, PermissionsWrapper as ne, EntityDeleteModal as Fe, EntityTypes as Ne, useErrors as we, EntityBaseFormType as oe, useDebouncedFilter as Re, EntityBaseForm as Be, SupportedEntityType as Ke, EntityFormSection as de } from "@kong-ui-public/entities-shared";
|
|
4
|
+
import { AddIcon as Te } from "@kong/icons";
|
|
5
5
|
import { useRouter as qe } from "vue-router";
|
|
6
6
|
const Pe = {
|
|
7
7
|
create: "New SNI",
|
|
@@ -171,7 +171,7 @@ const me = {
|
|
|
171
171
|
style: {
|
|
172
172
|
maxWidth: i.headerKey === "name" ? "250px" : i.headerKey === "certificate" ? "350px" : null
|
|
173
173
|
}
|
|
174
|
-
}),
|
|
174
|
+
}), r = g(() => {
|
|
175
175
|
var d, e;
|
|
176
176
|
let i = `${t.config.apiBaseUrl}${L.list[t.config.app].all}`;
|
|
177
177
|
return t.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((d = t.config) == null ? void 0 : d.controlPlaneId) || "") : t.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (e = t.config) != null && e.workspace ? `/${t.config.workspace}` : "")), i;
|
|
@@ -188,11 +188,11 @@ const me = {
|
|
|
188
188
|
fields: { name: d },
|
|
189
189
|
schema: t.config.filterSchema
|
|
190
190
|
};
|
|
191
|
-
}), { fetcher: H, fetcherState: X } = Me(t.config,
|
|
191
|
+
}), { fetcher: H, fetcherState: X } = Me(t.config, r.value), Y = () => {
|
|
192
192
|
I.value = "";
|
|
193
|
-
},
|
|
193
|
+
}, K = () => {
|
|
194
194
|
B.value++;
|
|
195
|
-
}, b = v(null),
|
|
195
|
+
}, b = v(null), T = v(!1), q = v({
|
|
196
196
|
ctaPath: t.config.createRoute,
|
|
197
197
|
ctaText: void 0,
|
|
198
198
|
message: `${l("snis.list.empty_state.description")}${t.config.additionMessageForEmptyState ? ` ${t.config.additionMessageForEmptyState}` : ""}`,
|
|
@@ -228,16 +228,16 @@ const me = {
|
|
|
228
228
|
}, te = (i) => ({
|
|
229
229
|
label: l("actions.edit"),
|
|
230
230
|
to: t.config.getEditRoute(i)
|
|
231
|
-
}),
|
|
232
|
-
|
|
231
|
+
}), _ = v(void 0), P = v(!1), x = v(!1), Q = v(""), ie = $e(t.config, r.value), W = (i) => {
|
|
232
|
+
_.value = i, P.value = !0;
|
|
233
233
|
}, z = () => {
|
|
234
|
-
P.value = !1,
|
|
234
|
+
P.value = !1, _.value = void 0;
|
|
235
235
|
}, ae = async () => {
|
|
236
236
|
var i, d, e;
|
|
237
|
-
if ((i =
|
|
237
|
+
if ((i = _.value) != null && i.id) {
|
|
238
238
|
x.value = !0;
|
|
239
239
|
try {
|
|
240
|
-
await u.delete(ie(
|
|
240
|
+
await u.delete(ie(_.value.id)), y("delete:success", _.value), x.value = !1, z(), B.value++;
|
|
241
241
|
} catch (a) {
|
|
242
242
|
Q.value = ((e = (d = a.response) == null ? void 0 : d.data) == null ? void 0 : e.message) || a.message || l("errors.delete"), y("error", a);
|
|
243
243
|
} finally {
|
|
@@ -245,9 +245,9 @@ const me = {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
}, D = v(!1);
|
|
248
|
-
return
|
|
248
|
+
return se(X, (i) => {
|
|
249
249
|
var d, e, a, c;
|
|
250
|
-
if (Array.isArray((d = i == null ? void 0 : i.response) == null ? void 0 : d.data) && (D.value = i.response.data.length > 0), i.status === ce.NoRecords ?
|
|
250
|
+
if (Array.isArray((d = i == null ? void 0 : i.response) == null ? void 0 : d.data) && (D.value = i.response.data.length > 0), i.status === ce.NoRecords ? T.value = !0 : T.value = !1, i.status === ce.Error) {
|
|
251
251
|
b.value = {
|
|
252
252
|
title: l("errors.general")
|
|
253
253
|
}, (c = (a = (e = i.error) == null ? void 0 : e.response) == null ? void 0 : a.data) != null && c.message && (b.value.message = i.error.response.data.message), y("error", i.error);
|
|
@@ -259,7 +259,7 @@ const me = {
|
|
|
259
259
|
}), (i, d) => {
|
|
260
260
|
const e = C("KButton"), a = C("KCopy"), c = C("KBadge"), F = C("KTruncate"), m = C("KDropdownItem"), O = C("KClipboardProvider");
|
|
261
261
|
return h(), N("div", Qe, [
|
|
262
|
-
p(
|
|
262
|
+
p(s(xe), {
|
|
263
263
|
"cache-identifier": n.cacheIdentifier,
|
|
264
264
|
"cell-attributes": $,
|
|
265
265
|
"disable-row-click": !0,
|
|
@@ -267,18 +267,18 @@ const me = {
|
|
|
267
267
|
"empty-state-options": q.value,
|
|
268
268
|
"enable-entity-actions": "",
|
|
269
269
|
"error-message": b.value,
|
|
270
|
-
fetcher:
|
|
270
|
+
fetcher: s(H),
|
|
271
271
|
"fetcher-cache-key": B.value,
|
|
272
|
-
"hide-toolbar":
|
|
272
|
+
"hide-toolbar": T.value,
|
|
273
273
|
"pagination-type": "offset",
|
|
274
274
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
275
275
|
query: I.value,
|
|
276
|
-
"table-headers":
|
|
276
|
+
"table-headers": s(M),
|
|
277
277
|
onClearSearchInput: Y,
|
|
278
|
-
onSort:
|
|
278
|
+
onSort: K
|
|
279
279
|
}, {
|
|
280
280
|
"toolbar-filter": f(() => [
|
|
281
|
-
p(
|
|
281
|
+
p(s(De), {
|
|
282
282
|
modelValue: I.value,
|
|
283
283
|
"onUpdate:modelValue": d[0] || (d[0] = (o) => I.value = o),
|
|
284
284
|
config: G.value
|
|
@@ -289,7 +289,7 @@ const me = {
|
|
|
289
289
|
disabled: !n.useActionOutside,
|
|
290
290
|
to: "#kong-ui-app-page-header-action-button"
|
|
291
291
|
}, [
|
|
292
|
-
p(
|
|
292
|
+
p(s(ne), {
|
|
293
293
|
"auth-function": () => n.canCreate()
|
|
294
294
|
}, {
|
|
295
295
|
default: f(() => [
|
|
@@ -300,8 +300,8 @@ const me = {
|
|
|
300
300
|
to: n.config.createRoute
|
|
301
301
|
}, {
|
|
302
302
|
default: f(() => [
|
|
303
|
-
p(
|
|
304
|
-
A(" " +
|
|
303
|
+
p(s(Te)),
|
|
304
|
+
A(" " + k(s(l)("snis.list.toolbar_actions.new")), 1)
|
|
305
305
|
]),
|
|
306
306
|
_: 1
|
|
307
307
|
}, 8, ["size", "to"]), [
|
|
@@ -313,7 +313,7 @@ const me = {
|
|
|
313
313
|
], 8, ["disabled"]))
|
|
314
314
|
]),
|
|
315
315
|
name: f(({ rowValue: o }) => [
|
|
316
|
-
|
|
316
|
+
re("b", null, k(o ?? "-"), 1)
|
|
317
317
|
]),
|
|
318
318
|
certificate: f(({ row: o }) => [
|
|
319
319
|
o.certificate && o.certificate.id ? (h(), w(a, {
|
|
@@ -327,13 +327,13 @@ const me = {
|
|
|
327
327
|
tags: f(({ rowValue: o }) => [
|
|
328
328
|
o != null && o.length ? (h(), w(F, { key: 0 }, {
|
|
329
329
|
default: f(() => [
|
|
330
|
-
(h(!0), N(
|
|
330
|
+
(h(!0), N(_e, null, ke(o, (S) => (h(), w(c, {
|
|
331
331
|
key: S,
|
|
332
332
|
onClick: d[1] || (d[1] = Ie(() => {
|
|
333
333
|
}, ["stop"]))
|
|
334
334
|
}, {
|
|
335
335
|
default: f(() => [
|
|
336
|
-
A(
|
|
336
|
+
A(k(S), 1)
|
|
337
337
|
]),
|
|
338
338
|
_: 2
|
|
339
339
|
}, 1024))), 128))
|
|
@@ -349,7 +349,7 @@ const me = {
|
|
|
349
349
|
onClick: (ye) => Z(o, S)
|
|
350
350
|
}, {
|
|
351
351
|
default: f(() => [
|
|
352
|
-
A(
|
|
352
|
+
A(k(s(l)("actions.copy_id")), 1)
|
|
353
353
|
]),
|
|
354
354
|
_: 2
|
|
355
355
|
}, 1032, ["onClick"])
|
|
@@ -363,14 +363,14 @@ const me = {
|
|
|
363
363
|
onClick: (ye) => ee(o, S)
|
|
364
364
|
}, {
|
|
365
365
|
default: f(() => [
|
|
366
|
-
A(
|
|
366
|
+
A(k(s(l)("actions.copy_json")), 1)
|
|
367
367
|
]),
|
|
368
368
|
_: 2
|
|
369
369
|
}, 1032, ["onClick"])
|
|
370
370
|
]),
|
|
371
371
|
_: 2
|
|
372
372
|
}, 1024),
|
|
373
|
-
p(
|
|
373
|
+
p(s(ne), {
|
|
374
374
|
"auth-function": () => n.canEdit(o)
|
|
375
375
|
}, {
|
|
376
376
|
default: f(() => [
|
|
@@ -381,7 +381,7 @@ const me = {
|
|
|
381
381
|
]),
|
|
382
382
|
_: 2
|
|
383
383
|
}, 1032, ["auth-function"]),
|
|
384
|
-
p(
|
|
384
|
+
p(s(ne), {
|
|
385
385
|
"auth-function": () => n.canDelete(o)
|
|
386
386
|
}, {
|
|
387
387
|
default: f(() => [
|
|
@@ -392,7 +392,7 @@ const me = {
|
|
|
392
392
|
onClick: (S) => W(o)
|
|
393
393
|
}, {
|
|
394
394
|
default: f(() => [
|
|
395
|
-
A(
|
|
395
|
+
A(k(s(l)("actions.delete")), 1)
|
|
396
396
|
]),
|
|
397
397
|
_: 2
|
|
398
398
|
}, 1032, ["onClick"])
|
|
@@ -402,14 +402,14 @@ const me = {
|
|
|
402
402
|
]),
|
|
403
403
|
_: 1
|
|
404
404
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
|
|
405
|
-
p(
|
|
405
|
+
p(s(Fe), {
|
|
406
406
|
"action-pending": x.value,
|
|
407
|
-
description:
|
|
408
|
-
"entity-name":
|
|
409
|
-
"entity-type":
|
|
407
|
+
description: s(l)("delete.description"),
|
|
408
|
+
"entity-name": _.value && (_.value.name || _.value.id),
|
|
409
|
+
"entity-type": s(Ne).SNI,
|
|
410
410
|
error: Q.value,
|
|
411
411
|
"need-confirm": !1,
|
|
412
|
-
title:
|
|
412
|
+
title: s(l)("delete.title"),
|
|
413
413
|
visible: P.value,
|
|
414
414
|
onCancel: z,
|
|
415
415
|
onProceed: ae
|
|
@@ -440,20 +440,12 @@ const me = {
|
|
|
440
440
|
type: String,
|
|
441
441
|
required: !1,
|
|
442
442
|
default: ""
|
|
443
|
-
},
|
|
444
|
-
/**
|
|
445
|
-
* Enable display of Terraform code
|
|
446
|
-
* Guarded by FF: khcp-12445-terraform-config-details
|
|
447
|
-
*/
|
|
448
|
-
enableTerraform: {
|
|
449
|
-
type: Boolean,
|
|
450
|
-
default: !1
|
|
451
443
|
}
|
|
452
444
|
},
|
|
453
445
|
emits: ["update", "error", "loading"],
|
|
454
446
|
setup(n, { emit: R }) {
|
|
455
447
|
var d;
|
|
456
|
-
const y = R, t = n, l = qe(), { i18n: { t: u } } = me.useI18n(), { getMessageFromError: B } = we(), { axiosInstance: E } = pe((d = t.config) == null ? void 0 : d.axiosRequestConfig), J = g(() => L.form[t.config.app].edit), M = g(() => t.sniId ? oe.Edit : oe.Create), $ = g(() => t.config.certificateId && M.value === oe.Create ? t.config.certificateId : ""),
|
|
448
|
+
const y = R, t = n, l = qe(), { i18n: { t: u } } = me.useI18n(), { getMessageFromError: B } = we(), { axiosInstance: E } = pe((d = t.config) == null ? void 0 : d.axiosRequestConfig), J = g(() => L.form[t.config.app].edit), M = g(() => t.sniId ? oe.Edit : oe.Create), $ = g(() => t.config.certificateId && M.value === oe.Create ? t.config.certificateId : ""), r = le({
|
|
457
449
|
fields: {
|
|
458
450
|
name: "",
|
|
459
451
|
tags: "",
|
|
@@ -465,171 +457,170 @@ const me = {
|
|
|
465
457
|
name: "",
|
|
466
458
|
tags: "",
|
|
467
459
|
certificate_id: ""
|
|
468
|
-
}), G = g(() => JSON.stringify(
|
|
460
|
+
}), G = g(() => JSON.stringify(r.fields) !== JSON.stringify(I) && !!r.fields.name && !!(r.fields.certificate_id || $.value)), H = (e) => {
|
|
469
461
|
var a, c;
|
|
470
|
-
|
|
462
|
+
r.fields.name = (e == null ? void 0 : e.name) || "", r.fields.tags = ((a = e == null ? void 0 : e.tags) == null ? void 0 : a.join(", ")) || "", r.fields.certificate_id = ((c = e == null ? void 0 : e.certificate) == null ? void 0 : c.id) || "", Object.assign(I, r.fields);
|
|
471
463
|
}, X = () => {
|
|
472
464
|
l.push(t.config.cancelRoute);
|
|
473
465
|
}, Y = g(() => {
|
|
474
466
|
var a, c;
|
|
475
467
|
let e = `${t.config.apiBaseUrl}${L.form[t.config.app].validate}`;
|
|
476
468
|
return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (c = t.config) != null && c.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
|
|
477
|
-
}),
|
|
469
|
+
}), K = g(() => {
|
|
478
470
|
var a, c;
|
|
479
471
|
let e = `${t.config.apiBaseUrl}${L.form[t.config.app][M.value]}`;
|
|
480
472
|
return t.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((a = t.config) == null ? void 0 : a.controlPlaneId) || "") : t.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (c = t.config) != null && c.workspace ? `/${t.config.workspace}` : "")), e = e.replace(/{id}/gi, t.sniId), e;
|
|
481
473
|
}), b = g(() => {
|
|
482
474
|
var e, a;
|
|
483
475
|
return {
|
|
484
|
-
name:
|
|
485
|
-
tags: (a = (e =
|
|
486
|
-
certificate: { id: $.value ||
|
|
476
|
+
name: r.fields.name,
|
|
477
|
+
tags: (a = (e = r.fields.tags.split(",")) == null ? void 0 : e.map((c) => String(c || "").trim())) == null ? void 0 : a.filter((c) => c !== ""),
|
|
478
|
+
certificate: { id: $.value || r.fields.certificate_id }
|
|
487
479
|
};
|
|
488
|
-
}),
|
|
480
|
+
}), T = async () => {
|
|
489
481
|
var e, a, c, F, m, O;
|
|
490
482
|
try {
|
|
491
|
-
|
|
483
|
+
r.isReadonly = !0;
|
|
492
484
|
let o;
|
|
493
|
-
await E.post(Y.value, b.value), M.value === "create" ? o = await E.post(
|
|
485
|
+
await E.post(Y.value, b.value), M.value === "create" ? o = await E.post(K.value, b.value) : M.value === "edit" && (o = ((e = t.config) == null ? void 0 : e.app) === "konnect" ? await E.put(K.value, b.value) : await E.patch(K.value, b.value)), r.fields.name = ((a = o == null ? void 0 : o.data) == null ? void 0 : a.name) || "", r.fields.tags = ((F = (c = o == null ? void 0 : o.data) == null ? void 0 : c.tags) == null ? void 0 : F.join(", ")) || "", r.fields.certificate_id = ((O = (m = o == null ? void 0 : o.data) == null ? void 0 : m.certificate) == null ? void 0 : O.id) || "", Object.assign(I, r.fields), y("update", o == null ? void 0 : o.data);
|
|
494
486
|
} catch (o) {
|
|
495
|
-
|
|
487
|
+
r.errorMessage = B(o), y("error", o);
|
|
496
488
|
} finally {
|
|
497
|
-
|
|
489
|
+
r.isReadonly = !1;
|
|
498
490
|
}
|
|
499
491
|
}, {
|
|
500
492
|
debouncedQueryChange: q,
|
|
501
493
|
loading: Z,
|
|
502
494
|
allRecords: ee,
|
|
503
495
|
error: te,
|
|
504
|
-
validationError:
|
|
496
|
+
validationError: _,
|
|
505
497
|
loadItems: P,
|
|
506
498
|
results: x
|
|
507
499
|
} = Re(t.config, L.form[t.config.app].certificates), Q = (e) => {
|
|
508
500
|
q(e);
|
|
509
|
-
}, ie = g(() => te.value ? u("errors.certificates.fetch") : ""), W = g(() =>
|
|
501
|
+
}, ie = g(() => te.value ? u("errors.certificates.fetch") : ""), W = g(() => _.value ? u("errors.certificates.invalid") : ""), z = v(0), ae = g(() => ee.value === void 0), D = v(/* @__PURE__ */ new Set()), U = g(() => Array.from(D.value).map((a) => ({
|
|
510
502
|
label: a,
|
|
511
503
|
value: a,
|
|
512
|
-
selected:
|
|
504
|
+
selected: r.fields.certificate_id === a
|
|
513
505
|
}))), i = (e) => {
|
|
514
506
|
D.value.clear();
|
|
515
507
|
let a;
|
|
516
508
|
for (a of e)
|
|
517
509
|
D.value.add(a.id);
|
|
518
510
|
};
|
|
519
|
-
return
|
|
511
|
+
return se(x, (e) => {
|
|
520
512
|
i(e);
|
|
521
|
-
}, { immediate: !0, deep: !0 }),
|
|
513
|
+
}, { immediate: !0, deep: !0 }), se(U, () => {
|
|
522
514
|
z.value++;
|
|
523
515
|
}, { immediate: !0, deep: !0 }), ue(async () => {
|
|
524
516
|
await P();
|
|
525
517
|
}), (e, a) => {
|
|
526
518
|
const c = C("KInput"), F = C("KSelect");
|
|
527
519
|
return h(), N("div", He, [
|
|
528
|
-
p(
|
|
520
|
+
p(s(Be), {
|
|
529
521
|
"can-submit": G.value,
|
|
530
522
|
config: n.config,
|
|
531
523
|
"edit-id": n.sniId,
|
|
532
|
-
"
|
|
533
|
-
"
|
|
534
|
-
"error-message": s.errorMessage || ie.value,
|
|
524
|
+
"entity-type": s(Ke).SNI,
|
|
525
|
+
"error-message": r.errorMessage || ie.value,
|
|
535
526
|
"fetch-url": J.value,
|
|
536
527
|
"form-fields": b.value,
|
|
537
|
-
"is-readonly":
|
|
528
|
+
"is-readonly": r.isReadonly,
|
|
538
529
|
onCancel: X,
|
|
539
530
|
"onFetch:error": a[3] || (a[3] = (m) => e.$emit("error", m)),
|
|
540
531
|
"onFetch:success": H,
|
|
541
532
|
onLoading: a[4] || (a[4] = (m) => e.$emit("loading", m)),
|
|
542
|
-
onSubmit:
|
|
533
|
+
onSubmit: T
|
|
543
534
|
}, {
|
|
544
535
|
default: f(() => [
|
|
545
|
-
p(
|
|
546
|
-
description:
|
|
547
|
-
title:
|
|
536
|
+
p(s(de), {
|
|
537
|
+
description: s(u)("form.sections.general.description"),
|
|
538
|
+
title: s(u)("form.sections.general.title")
|
|
548
539
|
}, {
|
|
549
540
|
default: f(() => [
|
|
550
541
|
p(c, {
|
|
551
|
-
modelValue:
|
|
552
|
-
"onUpdate:modelValue": a[0] || (a[0] = (m) =>
|
|
542
|
+
modelValue: r.fields.name,
|
|
543
|
+
"onUpdate:modelValue": a[0] || (a[0] = (m) => r.fields.name = m),
|
|
553
544
|
modelModifiers: { trim: !0 },
|
|
554
545
|
autocomplete: "off",
|
|
555
546
|
"data-testid": "sni-form-name",
|
|
556
|
-
label:
|
|
557
|
-
placeholder:
|
|
558
|
-
readonly:
|
|
547
|
+
label: s(u)("form.fields.name.label"),
|
|
548
|
+
placeholder: s(u)("form.fields.name.placeholder"),
|
|
549
|
+
readonly: r.isReadonly,
|
|
559
550
|
required: "",
|
|
560
551
|
type: "text"
|
|
561
552
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
562
553
|
p(c, {
|
|
563
|
-
modelValue:
|
|
564
|
-
"onUpdate:modelValue": a[1] || (a[1] = (m) =>
|
|
554
|
+
modelValue: r.fields.tags,
|
|
555
|
+
"onUpdate:modelValue": a[1] || (a[1] = (m) => r.fields.tags = m),
|
|
565
556
|
modelModifiers: { trim: !0 },
|
|
566
557
|
autocomplete: "off",
|
|
567
558
|
"data-testid": "sni-form-tags",
|
|
568
|
-
help:
|
|
569
|
-
label:
|
|
559
|
+
help: s(u)("form.fields.tags.help"),
|
|
560
|
+
label: s(u)("form.fields.tags.label"),
|
|
570
561
|
"label-attributes": {
|
|
571
|
-
info:
|
|
562
|
+
info: s(u)("form.fields.tags.tooltip"),
|
|
572
563
|
tooltipAttributes: { maxWidth: "400" }
|
|
573
564
|
},
|
|
574
|
-
placeholder:
|
|
575
|
-
readonly:
|
|
565
|
+
placeholder: s(u)("form.fields.tags.placeholder"),
|
|
566
|
+
readonly: r.isReadonly,
|
|
576
567
|
type: "text"
|
|
577
568
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
578
569
|
]),
|
|
579
570
|
_: 1
|
|
580
571
|
}, 8, ["description", "title"]),
|
|
581
|
-
p(
|
|
582
|
-
description:
|
|
572
|
+
p(s(de), {
|
|
573
|
+
description: s(u)("form.sections.certificate.description"),
|
|
583
574
|
"has-divider": "",
|
|
584
|
-
title:
|
|
575
|
+
title: s(u)("form.sections.certificate.title")
|
|
585
576
|
}, {
|
|
586
577
|
default: f(() => [
|
|
587
578
|
$.value ? (h(), w(c, {
|
|
588
579
|
key: 0,
|
|
589
580
|
"data-testid": "sni-form-certificate-id",
|
|
590
|
-
label:
|
|
581
|
+
label: s(u)("form.fields.certificate_id.label"),
|
|
591
582
|
"model-value": $.value,
|
|
592
583
|
readonly: "",
|
|
593
584
|
required: "",
|
|
594
585
|
width: "100%"
|
|
595
586
|
}, null, 8, ["label", "model-value"])) : (h(), w(F, {
|
|
596
587
|
key: 1,
|
|
597
|
-
modelValue:
|
|
598
|
-
"onUpdate:modelValue": a[2] || (a[2] = (m) =>
|
|
588
|
+
modelValue: r.fields.certificate_id,
|
|
589
|
+
"onUpdate:modelValue": a[2] || (a[2] = (m) => r.fields.certificate_id = m),
|
|
599
590
|
clearable: "",
|
|
600
591
|
"data-testid": "sni-form-certificate-id",
|
|
601
|
-
"dropdown-footer-text": ae.value ?
|
|
592
|
+
"dropdown-footer-text": ae.value ? s(u)("form.fields.certificate_id.footer") : void 0,
|
|
602
593
|
"enable-filtering": "",
|
|
603
594
|
"filter-function": () => !0,
|
|
604
595
|
items: U.value,
|
|
605
|
-
label:
|
|
606
|
-
loading:
|
|
607
|
-
placeholder:
|
|
608
|
-
readonly:
|
|
596
|
+
label: s(u)("form.fields.certificate_id.label"),
|
|
597
|
+
loading: s(Z),
|
|
598
|
+
placeholder: s(u)("form.fields.certificate_id.placeholder"),
|
|
599
|
+
readonly: r.isReadonly,
|
|
609
600
|
required: "",
|
|
610
601
|
width: "100%",
|
|
611
602
|
onQueryChange: Q
|
|
612
603
|
}, {
|
|
613
604
|
loading: f(() => [
|
|
614
|
-
|
|
605
|
+
re("div", null, k(s(u)("actions.loading")), 1)
|
|
615
606
|
]),
|
|
616
607
|
empty: f(() => [
|
|
617
|
-
|
|
608
|
+
re("div", Xe, k(s(u)("search.no_results")), 1)
|
|
618
609
|
]),
|
|
619
610
|
_: 1
|
|
620
611
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
621
|
-
W.value ? (h(), N("p", Ye,
|
|
612
|
+
W.value ? (h(), N("p", Ye, k(W.value), 1)) : Ce("", !0)
|
|
622
613
|
]),
|
|
623
614
|
_: 1
|
|
624
615
|
}, 8, ["description", "title"])
|
|
625
616
|
]),
|
|
626
617
|
_: 1
|
|
627
|
-
}, 8, ["can-submit", "config", "edit-id", "
|
|
618
|
+
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
628
619
|
]);
|
|
629
620
|
};
|
|
630
621
|
}
|
|
631
|
-
}),
|
|
622
|
+
}), st = /* @__PURE__ */ ge(Ze, [["__scopeId", "data-v-414e41d7"]]);
|
|
632
623
|
export {
|
|
633
|
-
|
|
624
|
+
st as SniForm,
|
|
634
625
|
ot as SniList
|
|
635
626
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons","vue-router"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-snis"]={},g.Vue,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"],g.KongIcons,g.VueRouter))})(this,function(g,e,X,d,v,ee){"use strict";const te={actions:{create:"New SNI",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},snis:{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."}}},form:{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"}}},delete:{title:"Delete an SNI",description:"This action cannot be reversed so make sure to check the SNI usage before deleting."},errors:{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"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}};function ie(){const n=X.createI18n("en-us",te);return{i18n:n,i18nT:X.i18nTComponent(n)}}const Y={useI18n:ie},B="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${B}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${B}/snis`,edit:`${B}/snis/{id}`,validate:`${B}/v1/schemas/json/sni/validate`,certificates:`${B}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ae={class:"kong-ui-entities-snis-list"},oe={key:1},ne={key:1},re=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(n,{emit:V}){var R;const m=V,i=n,{i18n:{t:l}}=Y.useI18n(),{axiosInstance:p}=d.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),D=e.ref(1),C=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),q={name:{label:l("snis.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},certificate:{label:l("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:l("snis.list.table_headers.tags"),sortable:!1}},_=q,I=a=>({style:{maxWidth:a.headerKey==="name"?"250px":a.headerKey==="certificate"?"350px":null}}),s=e.computed(()=>{var f,t;let a=`${i.config.apiBaseUrl}${E.list[i.config.app].all}`;return i.config.app==="konnect"?a=a.replace(/{controlPlaneId}/gi,((f=i.config)==null?void 0:f.controlPlaneId)||""):i.config.app==="kongManager"&&(a=a.replace(/\/{workspace}/gi,(t=i.config)!=null&&t.workspace?`/${i.config.workspace}`:"")),a}),b=e.ref(""),A=e.computed(()=>{const a=i.config.app==="konnect"||i.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:l("search.placeholder")};const{name:f}=q;return{isExactMatch:a,fields:{name:f},schema:i.config.filterSchema}}),{fetcher:j,fetcherState:L}=d.useFetcher(i.config,s.value),J=()=>{b.value=""},M=()=>{D.value++},y=e.ref(null),F=e.ref(!1),$=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${l("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:l("snis.title")}),W=(a,f)=>{const t=a.id;if(!f(t)){m("copy:error",{entity:a,field:"id",message:l("errors.copy")});return}m("copy:success",{entity:a,field:"id",message:l("copy.success",{val:t})})},Q=(a,f)=>{const t=JSON.stringify(a);if(!f(t)){m("copy:error",{entity:a,message:l("errors.copy")});return}m("copy:success",{entity:a,message:l("copy.success_brief")})},z=a=>({label:l("actions.edit"),to:i.config.getEditRoute(a)}),h=e.ref(void 0),T=e.ref(!1),x=e.ref(!1),P=e.ref(""),G=d.useDeleteUrlBuilder(i.config,s.value),O=a=>{h.value=a,T.value=!0},U=()=>{T.value=!1,h.value=void 0},H=async()=>{var a,f,t;if((a=h.value)!=null&&a.id){x.value=!0;try{await p.delete(G(h.value.id)),m("delete:success",h.value),x.value=!1,U(),D.value++}catch(o){P.value=((t=(f=o.response)==null?void 0:f.data)==null?void 0:t.message)||o.message||l("errors.delete"),m("error",o)}finally{x.value=!1}}},N=e.ref(!1);return e.watch(L,a=>{var f,t,o,c;if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)&&(N.value=a.response.data.length>0),a.status===d.FetcherStatus.NoRecords?F.value=!0:F.value=!1,a.status===d.FetcherStatus.Error){y.value={title:l("errors.general")},(c=(o=(t=a.error)==null?void 0:t.response)==null?void 0:o.data)!=null&&c.message&&(y.value.message=a.error.response.data.message),m("error",a.error);return}y.value=null}),e.onBeforeMount(async()=>{await i.canCreate()&&($.value.title=l("snis.list.empty_state.title"),$.value.ctaText=l("actions.create"))}),(a,f)=>{const t=e.resolveComponent("KButton"),o=e.resolveComponent("KCopy"),c=e.resolveComponent("KBadge"),w=e.resolveComponent("KTruncate"),u=e.resolveComponent("KDropdownItem"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"cell-attributes":I,"disable-row-click":!0,"disable-sorting":C.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(j),"fetcher-cache-key":D.value,"hide-toolbar":F.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:b.value,"table-headers":e.unref(_),onClearSearchInput:J,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(d.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":f[0]||(f[0]=r=>b.value=r),config:A.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(t,{appearance:"primary","data-testid":"toolbar-add-sni",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(v.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"]),[[e.vShow,N.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:r})=>[e.createElementVNode("b",null,e.toDisplayString(r??"-"),1)]),certificate:e.withCtx(({row:r})=>[r.certificate&&r.certificate.id?(e.openBlock(),e.createBlock(o,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:r.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",oe,"-"))]),tags:e.withCtx(({rowValue:r})=>[r!=null&&r.length?(e.openBlock(),e.createBlock(w,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,k=>(e.openBlock(),e.createBlock(c,{key:k,onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ne,"-"))]),actions:e.withCtx(({row:r})=>[e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-id",onClick:pe=>W(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-json",onClick:pe=>Q(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canEdit(r)},{default:e.withCtx(()=>[e.createVNode(u,{"data-testid":"action-entity-edit",item:z(r.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canDelete(r)},{default:e.withCtx(()=>[e.createVNode(u,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:k=>O(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-pending":x.value,description:e.unref(l)("delete.description"),"entity-name":h.value&&(h.value.name||h.value.id),"entity-type":e.unref(d.EntityTypes).SNI,error:P.value,"need-confirm":!1,title:e.unref(l)("delete.title"),visible:T.value,onCancel:U,onProceed:H},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Z=(n,V)=>{const m=n.__vccOpts||n;for(const[i,l]of V)m[i]=l;return m},se=Z(re,[["__scopeId","data-v-ae9b8532"]]),le={class:"kong-ui-entities-snis-form"},ce={"data-testid":"no-search-results"},de={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},fe=Z(e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},sniId:{type:String,required:!1,default:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(n,{emit:V}){var f;const m=V,i=n,l=ee.useRouter(),{i18n:{t:p}}=Y.useI18n(),{getMessageFromError:D}=d.useErrors(),{axiosInstance:C}=d.useAxios((f=i.config)==null?void 0:f.axiosRequestConfig),q=e.computed(()=>E.form[i.config.app].edit),_=e.computed(()=>i.sniId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),I=e.computed(()=>i.config.certificateId&&_.value===d.EntityBaseFormType.Create?i.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),b=e.reactive({name:"",tags:"",certificate_id:""}),A=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(b)&&!!s.fields.name&&!!(s.fields.certificate_id||I.value)),j=t=>{var o,c;s.fields.name=(t==null?void 0:t.name)||"",s.fields.tags=((o=t==null?void 0:t.tags)==null?void 0:o.join(", "))||"",s.fields.certificate_id=((c=t==null?void 0:t.certificate)==null?void 0:c.id)||"",Object.assign(b,s.fields)},L=()=>{l.push(i.config.cancelRoute)},J=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app].validate}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),M=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app][_.value]}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),y=e.computed(()=>{var t,o;return{name:s.fields.name,tags:(o=(t=s.fields.tags.split(","))==null?void 0:t.map(c=>String(c||"").trim()))==null?void 0:o.filter(c=>c!==""),certificate:{id:I.value||s.fields.certificate_id}}}),F=async()=>{var t,o,c,w,u,K;try{s.isReadonly=!0;let r;await C.post(J.value,y.value),_.value==="create"?r=await C.post(M.value,y.value):_.value==="edit"&&(r=((t=i.config)==null?void 0:t.app)==="konnect"?await C.put(M.value,y.value):await C.patch(M.value,y.value)),s.fields.name=((o=r==null?void 0:r.data)==null?void 0:o.name)||"",s.fields.tags=((w=(c=r==null?void 0:r.data)==null?void 0:c.tags)==null?void 0:w.join(", "))||"",s.fields.certificate_id=((K=(u=r==null?void 0:r.data)==null?void 0:u.certificate)==null?void 0:K.id)||"",Object.assign(b,s.fields),m("update",r==null?void 0:r.data)}catch(r){s.errorMessage=D(r),m("error",r)}finally{s.isReadonly=!1}},{debouncedQueryChange:$,loading:W,allRecords:Q,error:z,validationError:h,loadItems:T,results:x}=d.useDebouncedFilter(i.config,E.form[i.config.app].certificates),P=t=>{$(t)},G=e.computed(()=>z.value?p("errors.certificates.fetch"):""),O=e.computed(()=>h.value?p("errors.certificates.invalid"):""),U=e.ref(0),H=e.computed(()=>Q.value===void 0),N=e.ref(new Set),R=e.computed(()=>Array.from(N.value).map(o=>({label:o,value:o,selected:s.fields.certificate_id===o}))),a=t=>{N.value.clear();let o;for(o of t)N.value.add(o.id)};return e.watch(x,t=>{a(t)},{immediate:!0,deep:!0}),e.watch(R,()=>{U.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await T()}),(t,o)=>{const c=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",le,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":A.value,config:n.config,"edit-id":n.sniId,"enable-terraform":n.enableTerraform,"entity-type":e.unref(d.SupportedEntityType).SNI,"error-message":s.errorMessage||G.value,"fetch-url":q.value,"form-fields":y.value,"is-readonly":s.isReadonly,onCancel:L,"onFetch:error":o[3]||(o[3]=u=>t.$emit("error",u)),"onFetch:success":j,onLoading:o[4]||(o[4]=u=>t.$emit("loading",u)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.general.description"),title:e.unref(p)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:s.fields.name,"onUpdate:modelValue":o[0]||(o[0]=u=>s.fields.name=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(p)("form.fields.name.label"),placeholder:e.unref(p)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(c,{modelValue:s.fields.tags,"onUpdate:modelValue":o[1]||(o[1]=u=>s.fields.tags=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(p)("form.fields.tags.help"),label:e.unref(p)("form.fields.tags.label"),"label-attributes":{info:e.unref(p)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(p)("form.fields.tags.placeholder"),readonly:s.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.certificate.description"),"has-divider":"",title:e.unref(p)("form.sections.certificate.title")},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(c,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(p)("form.fields.certificate_id.label"),"model-value":I.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(w,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":o[2]||(o[2]=u=>s.fields.certificate_id=u),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":H.value?e.unref(p)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(p)("form.fields.certificate_id.label"),loading:e.unref(W),placeholder:e.unref(p)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:P},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(p)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ce,e.toDisplayString(e.unref(p)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),O.value?(e.openBlock(),e.createElementBlock("p",de,e.toDisplayString(O.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-97327875"]]);g.SniForm=fe,g.SniList=se,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","@kong-ui-public/entities-shared","@kong/icons","vue-router"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["kong-ui-public-entities-snis"]={},g.Vue,g["kong-ui-public-i18n"],g["kong-ui-public-entities-shared"],g.KongIcons,g.VueRouter))})(this,function(g,e,X,d,v,ee){"use strict";const te={actions:{create:"New SNI",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},snis:{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."}}},form:{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"}}},delete:{title:"Delete an SNI",description:"This action cannot be reversed so make sure to check the SNI usage before deleting."},errors:{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"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}};function ie(){const n=X.createI18n("en-us",te);return{i18n:n,i18nT:X.i18nTComponent(n)}}const Y={useI18n:ie},B="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${B}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${B}/snis`,edit:`${B}/snis/{id}`,validate:`${B}/v1/schemas/json/sni/validate`,certificates:`${B}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ae={class:"kong-ui-entities-snis-list"},oe={key:1},ne={key:1},re=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(n,{emit:V}){var R;const m=V,i=n,{i18n:{t:l}}=Y.useI18n(),{axiosInstance:p}=d.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),D=e.ref(1),C=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),q={name:{label:l("snis.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},certificate:{label:l("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:l("snis.list.table_headers.tags"),sortable:!1}},_=q,I=a=>({style:{maxWidth:a.headerKey==="name"?"250px":a.headerKey==="certificate"?"350px":null}}),s=e.computed(()=>{var f,t;let a=`${i.config.apiBaseUrl}${E.list[i.config.app].all}`;return i.config.app==="konnect"?a=a.replace(/{controlPlaneId}/gi,((f=i.config)==null?void 0:f.controlPlaneId)||""):i.config.app==="kongManager"&&(a=a.replace(/\/{workspace}/gi,(t=i.config)!=null&&t.workspace?`/${i.config.workspace}`:"")),a}),b=e.ref(""),A=e.computed(()=>{const a=i.config.app==="konnect"||i.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:l("search.placeholder")};const{name:f}=q;return{isExactMatch:a,fields:{name:f},schema:i.config.filterSchema}}),{fetcher:j,fetcherState:L}=d.useFetcher(i.config,s.value),J=()=>{b.value=""},M=()=>{D.value++},y=e.ref(null),F=e.ref(!1),$=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${l("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:l("snis.title")}),W=(a,f)=>{const t=a.id;if(!f(t)){m("copy:error",{entity:a,field:"id",message:l("errors.copy")});return}m("copy:success",{entity:a,field:"id",message:l("copy.success",{val:t})})},Q=(a,f)=>{const t=JSON.stringify(a);if(!f(t)){m("copy:error",{entity:a,message:l("errors.copy")});return}m("copy:success",{entity:a,message:l("copy.success_brief")})},z=a=>({label:l("actions.edit"),to:i.config.getEditRoute(a)}),h=e.ref(void 0),T=e.ref(!1),x=e.ref(!1),P=e.ref(""),G=d.useDeleteUrlBuilder(i.config,s.value),O=a=>{h.value=a,T.value=!0},U=()=>{T.value=!1,h.value=void 0},H=async()=>{var a,f,t;if((a=h.value)!=null&&a.id){x.value=!0;try{await p.delete(G(h.value.id)),m("delete:success",h.value),x.value=!1,U(),D.value++}catch(o){P.value=((t=(f=o.response)==null?void 0:f.data)==null?void 0:t.message)||o.message||l("errors.delete"),m("error",o)}finally{x.value=!1}}},N=e.ref(!1);return e.watch(L,a=>{var f,t,o,c;if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)&&(N.value=a.response.data.length>0),a.status===d.FetcherStatus.NoRecords?F.value=!0:F.value=!1,a.status===d.FetcherStatus.Error){y.value={title:l("errors.general")},(c=(o=(t=a.error)==null?void 0:t.response)==null?void 0:o.data)!=null&&c.message&&(y.value.message=a.error.response.data.message),m("error",a.error);return}y.value=null}),e.onBeforeMount(async()=>{await i.canCreate()&&($.value.title=l("snis.list.empty_state.title"),$.value.ctaText=l("actions.create"))}),(a,f)=>{const t=e.resolveComponent("KButton"),o=e.resolveComponent("KCopy"),c=e.resolveComponent("KBadge"),w=e.resolveComponent("KTruncate"),u=e.resolveComponent("KDropdownItem"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"cell-attributes":I,"disable-row-click":!0,"disable-sorting":C.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(j),"fetcher-cache-key":D.value,"hide-toolbar":F.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:b.value,"table-headers":e.unref(_),onClearSearchInput:J,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(d.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":f[0]||(f[0]=r=>b.value=r),config:A.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(t,{appearance:"primary","data-testid":"toolbar-add-sni",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(v.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"]),[[e.vShow,N.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:r})=>[e.createElementVNode("b",null,e.toDisplayString(r??"-"),1)]),certificate:e.withCtx(({row:r})=>[r.certificate&&r.certificate.id?(e.openBlock(),e.createBlock(o,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:r.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",oe,"-"))]),tags:e.withCtx(({rowValue:r})=>[r!=null&&r.length?(e.openBlock(),e.createBlock(w,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,k=>(e.openBlock(),e.createBlock(c,{key:k,onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ne,"-"))]),actions:e.withCtx(({row:r})=>[e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-id",onClick:pe=>W(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:k})=>[e.createVNode(u,{"data-testid":"action-entity-copy-json",onClick:pe=>Q(r,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canEdit(r)},{default:e.withCtx(()=>[e.createVNode(u,{"data-testid":"action-entity-edit",item:z(r.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canDelete(r)},{default:e.withCtx(()=>[e.createVNode(u,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:k=>O(r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","hide-toolbar","query","table-headers"]),e.createVNode(e.unref(d.EntityDeleteModal),{"action-pending":x.value,description:e.unref(l)("delete.description"),"entity-name":h.value&&(h.value.name||h.value.id),"entity-type":e.unref(d.EntityTypes).SNI,error:P.value,"need-confirm":!1,title:e.unref(l)("delete.title"),visible:T.value,onCancel:U,onProceed:H},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Z=(n,V)=>{const m=n.__vccOpts||n;for(const[i,l]of V)m[i]=l;return m},se=Z(re,[["__scopeId","data-v-ae9b8532"]]),le={class:"kong-ui-entities-snis-form"},ce={"data-testid":"no-search-results"},de={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},fe=Z(e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(n,{emit:V}){var f;const m=V,i=n,l=ee.useRouter(),{i18n:{t:p}}=Y.useI18n(),{getMessageFromError:D}=d.useErrors(),{axiosInstance:C}=d.useAxios((f=i.config)==null?void 0:f.axiosRequestConfig),q=e.computed(()=>E.form[i.config.app].edit),_=e.computed(()=>i.sniId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),I=e.computed(()=>i.config.certificateId&&_.value===d.EntityBaseFormType.Create?i.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),b=e.reactive({name:"",tags:"",certificate_id:""}),A=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(b)&&!!s.fields.name&&!!(s.fields.certificate_id||I.value)),j=t=>{var o,c;s.fields.name=(t==null?void 0:t.name)||"",s.fields.tags=((o=t==null?void 0:t.tags)==null?void 0:o.join(", "))||"",s.fields.certificate_id=((c=t==null?void 0:t.certificate)==null?void 0:c.id)||"",Object.assign(b,s.fields)},L=()=>{l.push(i.config.cancelRoute)},J=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app].validate}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),M=e.computed(()=>{var o,c;let t=`${i.config.apiBaseUrl}${E.form[i.config.app][_.value]}`;return i.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((o=i.config)==null?void 0:o.controlPlaneId)||""):i.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(c=i.config)!=null&&c.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),y=e.computed(()=>{var t,o;return{name:s.fields.name,tags:(o=(t=s.fields.tags.split(","))==null?void 0:t.map(c=>String(c||"").trim()))==null?void 0:o.filter(c=>c!==""),certificate:{id:I.value||s.fields.certificate_id}}}),F=async()=>{var t,o,c,w,u,K;try{s.isReadonly=!0;let r;await C.post(J.value,y.value),_.value==="create"?r=await C.post(M.value,y.value):_.value==="edit"&&(r=((t=i.config)==null?void 0:t.app)==="konnect"?await C.put(M.value,y.value):await C.patch(M.value,y.value)),s.fields.name=((o=r==null?void 0:r.data)==null?void 0:o.name)||"",s.fields.tags=((w=(c=r==null?void 0:r.data)==null?void 0:c.tags)==null?void 0:w.join(", "))||"",s.fields.certificate_id=((K=(u=r==null?void 0:r.data)==null?void 0:u.certificate)==null?void 0:K.id)||"",Object.assign(b,s.fields),m("update",r==null?void 0:r.data)}catch(r){s.errorMessage=D(r),m("error",r)}finally{s.isReadonly=!1}},{debouncedQueryChange:$,loading:W,allRecords:Q,error:z,validationError:h,loadItems:T,results:x}=d.useDebouncedFilter(i.config,E.form[i.config.app].certificates),P=t=>{$(t)},G=e.computed(()=>z.value?p("errors.certificates.fetch"):""),O=e.computed(()=>h.value?p("errors.certificates.invalid"):""),U=e.ref(0),H=e.computed(()=>Q.value===void 0),N=e.ref(new Set),R=e.computed(()=>Array.from(N.value).map(o=>({label:o,value:o,selected:s.fields.certificate_id===o}))),a=t=>{N.value.clear();let o;for(o of t)N.value.add(o.id)};return e.watch(x,t=>{a(t)},{immediate:!0,deep:!0}),e.watch(R,()=>{U.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await T()}),(t,o)=>{const c=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",le,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":A.value,config:n.config,"edit-id":n.sniId,"entity-type":e.unref(d.SupportedEntityType).SNI,"error-message":s.errorMessage||G.value,"fetch-url":q.value,"form-fields":y.value,"is-readonly":s.isReadonly,onCancel:L,"onFetch:error":o[3]||(o[3]=u=>t.$emit("error",u)),"onFetch:success":j,onLoading:o[4]||(o[4]=u=>t.$emit("loading",u)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.general.description"),title:e.unref(p)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:s.fields.name,"onUpdate:modelValue":o[0]||(o[0]=u=>s.fields.name=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(p)("form.fields.name.label"),placeholder:e.unref(p)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(c,{modelValue:s.fields.tags,"onUpdate:modelValue":o[1]||(o[1]=u=>s.fields.tags=u),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(p)("form.fields.tags.help"),label:e.unref(p)("form.fields.tags.label"),"label-attributes":{info:e.unref(p)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(p)("form.fields.tags.placeholder"),readonly:s.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(p)("form.sections.certificate.description"),"has-divider":"",title:e.unref(p)("form.sections.certificate.title")},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(c,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(p)("form.fields.certificate_id.label"),"model-value":I.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(w,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":o[2]||(o[2]=u=>s.fields.certificate_id=u),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":H.value?e.unref(p)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(p)("form.fields.certificate_id.label"),loading:e.unref(W),placeholder:e.unref(p)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:P},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(p)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",ce,e.toDisplayString(e.unref(p)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),O.value?(e.openBlock(),e.createElementBlock("p",de,e.toDisplayString(O.value),1)):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-414e41d7"]]);g.SniForm=fe,g.SniList=se,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-d957ab89]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-d957ab89]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-d957ab89]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-d957ab89] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-d957ab89]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-765e475b]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-765e475b]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-snis-list[data-v-ae9b8532]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-ae9b8532]{margin-right:12px}.kong-ui-entities-snis-form[data-v-414e41d7]{width:100%}.kong-ui-entities-snis-form .invalid-certificate-message[data-v-414e41d7]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}
|
|
@@ -15,14 +15,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
required: false;
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
19
|
-
* Enable display of Terraform code
|
|
20
|
-
* Guarded by FF: khcp-12445-terraform-config-details
|
|
21
|
-
*/
|
|
22
|
-
enableTerraform: {
|
|
23
|
-
type: BooleanConstructor;
|
|
24
|
-
default: boolean;
|
|
25
|
-
};
|
|
26
18
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
19
|
update: (data: Record<string, any>) => void;
|
|
28
20
|
error: (error: AxiosError<unknown, any>) => void;
|
|
@@ -40,21 +32,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
32
|
required: false;
|
|
41
33
|
default: string;
|
|
42
34
|
};
|
|
43
|
-
/**
|
|
44
|
-
* Enable display of Terraform code
|
|
45
|
-
* Guarded by FF: khcp-12445-terraform-config-details
|
|
46
|
-
*/
|
|
47
|
-
enableTerraform: {
|
|
48
|
-
type: BooleanConstructor;
|
|
49
|
-
default: boolean;
|
|
50
|
-
};
|
|
51
35
|
}>> & {
|
|
52
36
|
onError?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
53
37
|
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
54
38
|
onUpdate?: ((data: Record<string, any>) => any) | undefined;
|
|
55
39
|
}, {
|
|
56
40
|
sniId: string;
|
|
57
|
-
enableTerraform: boolean;
|
|
58
41
|
}, {}>;
|
|
59
42
|
export default _default;
|
|
60
43
|
//# sourceMappingURL=SniForm.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SniForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SniForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniForm.vue"],"names":[],"mappings":"AAsWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EAIzB,MAAM,UAAU,CAAA;AAYjB,OAAO,gDAAgD,CAAA;;IA0erD,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;IAQ/E,yFAAyF;;;;;;;;;;;IAZzF,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;IAQ/E,yFAAyF;;;;;;;;;;;;;AAnB3F,wBA0BG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-snis",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-snis.umd.js",
|
|
6
6
|
"module": "./dist/entities-snis.es.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"axios": "^1.6.8",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.3.3",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.9.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.9.19",
|
|
30
30
|
"@kong-ui-public/i18n": "^2.2.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vue": "^3.4.38",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
39
|
"@kong-ui-public/i18n": "^2.2.3",
|
|
40
|
-
"@kong-ui-public/entities-shared": "^3.9.
|
|
40
|
+
"@kong-ui-public/entities-shared": "^3.9.19"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|