@kong-ui-public/entities-snis 3.5.54 → 3.5.55
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,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createI18n as
|
|
3
|
-
import { useAxios as
|
|
4
|
-
import { AddIcon as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as ce, ref as _, computed as y, watch as oe, onBeforeMount as de, resolveComponent as N, openBlock as E, createElementBlock as L, createVNode as f, unref as o, withCtx as u, createBlock as J, Teleport as me, createTextVNode as A, toDisplayString as S, createElementVNode as ne, reactive as re, createCommentVNode as ge } from "vue";
|
|
2
|
+
import { createI18n as ye, i18nTComponent as ve } from "@kong-ui-public/i18n";
|
|
3
|
+
import { useAxios as fe, useFetcher as he, useDeleteUrlBuilder as be, FetcherStatus as ke, EntityBaseTable as _e, EntityFilter as Ie, PermissionsWrapper as ie, TableTags as Ce, EntityDeleteModal as Se, EntityTypes as Ee, useErrors as Me, EntityBaseFormType as ae, useDebouncedFilter as $e, EntityBaseForm as xe, SupportedEntityType as Fe, EntityFormSection as le } from "@kong-ui-public/entities-shared";
|
|
4
|
+
import { AddIcon as Ne } from "@kong/icons";
|
|
5
|
+
import { useRouter as we } from "vue-router";
|
|
6
|
+
const De = {
|
|
7
7
|
create: "New SNI",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -11,10 +11,10 @@ const Te = {
|
|
|
11
11
|
delete: "Delete",
|
|
12
12
|
clear: "Clear",
|
|
13
13
|
loading: "Loading..."
|
|
14
|
-
},
|
|
14
|
+
}, Re = {
|
|
15
15
|
placeholder: "Filter by exact name or ID",
|
|
16
16
|
no_results: "No results found"
|
|
17
|
-
},
|
|
17
|
+
}, Be = {
|
|
18
18
|
title: "SNIs",
|
|
19
19
|
list: {
|
|
20
20
|
toolbar_actions: {
|
|
@@ -31,7 +31,7 @@ const Te = {
|
|
|
31
31
|
description: "SNIs are used to map hostnames to a certificate."
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, Te = {
|
|
35
35
|
sections: {
|
|
36
36
|
general: {
|
|
37
37
|
title: "General Information",
|
|
@@ -59,7 +59,7 @@ const Te = {
|
|
|
59
59
|
footer: "Search by exact ID to find certificates not included in the list"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, Ve = {
|
|
63
63
|
delete: "The SNI could not be deleted at this time.",
|
|
64
64
|
general: "SNIs could not be retrieved",
|
|
65
65
|
certificates: {
|
|
@@ -67,62 +67,62 @@ const Te = {
|
|
|
67
67
|
invalid: "Please select a valid certificate ID"
|
|
68
68
|
},
|
|
69
69
|
copy: "Failed to copy to clipboard"
|
|
70
|
-
},
|
|
70
|
+
}, Ke = {
|
|
71
71
|
success: "Copied {val} to clipboard",
|
|
72
72
|
success_brief: "Successfully copied to clipboard"
|
|
73
|
-
},
|
|
74
|
-
actions:
|
|
75
|
-
search:
|
|
76
|
-
snis:
|
|
77
|
-
form:
|
|
73
|
+
}, qe = {
|
|
74
|
+
actions: De,
|
|
75
|
+
search: Re,
|
|
76
|
+
snis: Be,
|
|
77
|
+
form: Te,
|
|
78
78
|
delete: {
|
|
79
79
|
title: "Delete an SNI",
|
|
80
80
|
description: "This action cannot be reversed so make sure to check the SNI usage before deleting."
|
|
81
81
|
},
|
|
82
|
-
errors:
|
|
83
|
-
copy:
|
|
82
|
+
errors: Ve,
|
|
83
|
+
copy: Ke
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
const
|
|
85
|
+
function Pe() {
|
|
86
|
+
const i = ye("en-us", qe);
|
|
87
87
|
return {
|
|
88
|
-
i18n:
|
|
89
|
-
i18nT:
|
|
88
|
+
i18n: i,
|
|
89
|
+
i18nT: ve(i)
|
|
90
90
|
// Translation component <i18n-t>
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
useI18n:
|
|
95
|
-
},
|
|
93
|
+
const ue = {
|
|
94
|
+
useI18n: Pe
|
|
95
|
+
}, K = "/v2/control-planes/{controlPlaneId}/core-entities", q = "/{workspace}", P = {
|
|
96
96
|
list: {
|
|
97
97
|
konnect: {
|
|
98
|
-
all: `${
|
|
98
|
+
all: `${K}/snis`
|
|
99
99
|
},
|
|
100
100
|
kongManager: {
|
|
101
|
-
all: `${
|
|
101
|
+
all: `${q}/snis`
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
form: {
|
|
105
105
|
konnect: {
|
|
106
|
+
create: `${K}/snis`,
|
|
107
|
+
edit: `${K}/snis/{id}`,
|
|
108
|
+
validate: `${K}/v1/schemas/json/sni/validate`,
|
|
109
|
+
certificates: `${K}/certificates`
|
|
110
|
+
},
|
|
111
|
+
kongManager: {
|
|
106
112
|
create: `${q}/snis`,
|
|
107
113
|
edit: `${q}/snis/{id}`,
|
|
108
|
-
validate: `${q}/
|
|
114
|
+
validate: `${q}/schemas/snis/validate`,
|
|
109
115
|
certificates: `${q}/certificates`
|
|
110
|
-
},
|
|
111
|
-
kongManager: {
|
|
112
|
-
create: `${P}/snis`,
|
|
113
|
-
edit: `${P}/snis/{id}`,
|
|
114
|
-
validate: `${P}/schemas/snis/validate`,
|
|
115
|
-
certificates: `${P}/certificates`
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, Ue = { class: "kong-ui-entities-snis-list" }, Oe = { key: 1 }, je = /* @__PURE__ */ ce({
|
|
119
119
|
__name: "SniList",
|
|
120
120
|
props: {
|
|
121
121
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
122
122
|
config: {
|
|
123
123
|
type: Object,
|
|
124
124
|
required: !0,
|
|
125
|
-
validator: (
|
|
125
|
+
validator: (i) => !(!i || !["konnect", "kongManager"].includes(i == null ? void 0 : i.app) || !i.createRoute || !i.getViewRoute || !i.getEditRoute || i.app === "kongManager" && !i.isExactMatch && !i.filterSchema)
|
|
126
126
|
},
|
|
127
127
|
// used to override the default identifier for the cache entry
|
|
128
128
|
cacheIdentifier: {
|
|
@@ -160,225 +160,222 @@ const pe = {
|
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
163
|
-
setup(
|
|
164
|
-
var
|
|
165
|
-
const
|
|
163
|
+
setup(i, { emit: w }) {
|
|
164
|
+
var j;
|
|
165
|
+
const v = w, e = i, { i18n: { t: l } } = ue.useI18n(), { axiosInstance: c } = fe((j = e.config) == null ? void 0 : j.axiosRequestConfig), D = _(1), M = y(() => e.config.app !== "kongManager" || !!e.config.disableSorting), U = {
|
|
166
166
|
// the Name column is non-hidable
|
|
167
|
-
name: { label:
|
|
168
|
-
certificate: { label:
|
|
169
|
-
tags: { label:
|
|
170
|
-
},
|
|
167
|
+
name: { label: l("snis.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
168
|
+
certificate: { label: l("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
169
|
+
tags: { label: l("snis.list.table_headers.tags"), sortable: !1 }
|
|
170
|
+
}, $ = U, x = (a) => ({
|
|
171
171
|
style: {
|
|
172
|
-
maxWidth:
|
|
172
|
+
maxWidth: a.headerKey === "name" ? "250px" : a.headerKey === "certificate" ? "350px" : null
|
|
173
173
|
}
|
|
174
|
-
}),
|
|
175
|
-
var
|
|
176
|
-
let
|
|
177
|
-
return
|
|
178
|
-
}),
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
174
|
+
}), r = y(() => {
|
|
175
|
+
var d, p;
|
|
176
|
+
let a = `${e.config.apiBaseUrl}${P.list[e.config.app].all}`;
|
|
177
|
+
return e.config.app === "konnect" ? a = a.replace(/{controlPlaneId}/gi, ((d = e.config) == null ? void 0 : d.controlPlaneId) || "") : e.config.app === "kongManager" && (a = a.replace(/\/{workspace}/gi, (p = e.config) != null && p.workspace ? `/${e.config.workspace}` : "")), a;
|
|
178
|
+
}), C = _(""), Q = y(() => {
|
|
179
|
+
const a = e.config.app === "konnect" || e.config.isExactMatch;
|
|
180
|
+
if (a)
|
|
181
181
|
return {
|
|
182
|
-
isExactMatch:
|
|
183
|
-
placeholder:
|
|
182
|
+
isExactMatch: a,
|
|
183
|
+
placeholder: l("search.placeholder")
|
|
184
184
|
};
|
|
185
|
-
const { name:
|
|
185
|
+
const { name: d } = U;
|
|
186
186
|
return {
|
|
187
|
-
isExactMatch:
|
|
188
|
-
fields: { name:
|
|
189
|
-
schema:
|
|
187
|
+
isExactMatch: a,
|
|
188
|
+
fields: { name: d },
|
|
189
|
+
schema: e.config.filterSchema
|
|
190
190
|
};
|
|
191
|
-
}), { fetcher:
|
|
192
|
-
|
|
191
|
+
}), { fetcher: W, fetcherState: z } = he(e.config, r.value), G = () => {
|
|
192
|
+
C.value = "";
|
|
193
193
|
}, R = () => {
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
ctaPath:
|
|
194
|
+
D.value++;
|
|
195
|
+
}, b = _(null), B = _({
|
|
196
|
+
ctaPath: e.config.createRoute,
|
|
197
197
|
ctaText: void 0,
|
|
198
|
-
message: `${
|
|
199
|
-
title:
|
|
200
|
-
}),
|
|
201
|
-
const
|
|
202
|
-
if (!
|
|
203
|
-
|
|
204
|
-
entity:
|
|
198
|
+
message: `${l("snis.list.empty_state.description")}${e.config.additionMessageForEmptyState ? ` ${e.config.additionMessageForEmptyState}` : ""}`,
|
|
199
|
+
title: l("snis.title")
|
|
200
|
+
}), H = (a, d) => {
|
|
201
|
+
const p = a.id;
|
|
202
|
+
if (!d(p)) {
|
|
203
|
+
v("copy:error", {
|
|
204
|
+
entity: a,
|
|
205
205
|
field: "id",
|
|
206
|
-
message:
|
|
206
|
+
message: l("errors.copy")
|
|
207
207
|
});
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
|
-
|
|
211
|
-
entity:
|
|
210
|
+
v("copy:success", {
|
|
211
|
+
entity: a,
|
|
212
212
|
field: "id",
|
|
213
|
-
message:
|
|
213
|
+
message: l("copy.success", { val: p })
|
|
214
214
|
});
|
|
215
|
-
},
|
|
216
|
-
const
|
|
217
|
-
if (!
|
|
218
|
-
|
|
219
|
-
entity:
|
|
220
|
-
message:
|
|
215
|
+
}, X = (a, d) => {
|
|
216
|
+
const p = JSON.stringify(a);
|
|
217
|
+
if (!d(p)) {
|
|
218
|
+
v("copy:error", {
|
|
219
|
+
entity: a,
|
|
220
|
+
message: l("errors.copy")
|
|
221
221
|
});
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
|
|
225
|
-
entity:
|
|
226
|
-
message:
|
|
224
|
+
v("copy:success", {
|
|
225
|
+
entity: a,
|
|
226
|
+
message: l("copy.success_brief")
|
|
227
227
|
});
|
|
228
|
-
},
|
|
229
|
-
label:
|
|
230
|
-
to:
|
|
231
|
-
}),
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
},
|
|
236
|
-
var
|
|
237
|
-
if ((
|
|
238
|
-
|
|
228
|
+
}, Y = (a) => ({
|
|
229
|
+
label: l("actions.edit"),
|
|
230
|
+
to: e.config.getEditRoute(a)
|
|
231
|
+
}), k = _(void 0), T = _(!1), F = _(!1), O = _(""), Z = be(e.config, r.value), ee = (a) => {
|
|
232
|
+
k.value = a, T.value = !0;
|
|
233
|
+
}, V = () => {
|
|
234
|
+
T.value = !1, k.value = void 0;
|
|
235
|
+
}, te = async () => {
|
|
236
|
+
var a, d, p;
|
|
237
|
+
if ((a = k.value) != null && a.id) {
|
|
238
|
+
F.value = !0;
|
|
239
239
|
try {
|
|
240
|
-
await
|
|
241
|
-
} catch (
|
|
242
|
-
|
|
240
|
+
await c.delete(Z(k.value.id)), v("delete:success", k.value), F.value = !1, V(), D.value++;
|
|
241
|
+
} catch (h) {
|
|
242
|
+
O.value = ((p = (d = h.response) == null ? void 0 : d.data) == null ? void 0 : p.message) || h.message || l("errors.delete"), v("error", h);
|
|
243
243
|
} finally {
|
|
244
|
-
|
|
244
|
+
F.value = !1;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
}
|
|
248
|
-
return
|
|
249
|
-
var
|
|
250
|
-
if (
|
|
251
|
-
|
|
252
|
-
title:
|
|
253
|
-
}, (
|
|
247
|
+
};
|
|
248
|
+
return oe(z, (a) => {
|
|
249
|
+
var d, p, h;
|
|
250
|
+
if (a.status === ke.Error) {
|
|
251
|
+
b.value = {
|
|
252
|
+
title: l("errors.general")
|
|
253
|
+
}, (h = (p = (d = a.error) == null ? void 0 : d.response) == null ? void 0 : p.data) != null && h.message && (b.value.message = a.error.response.data.message), v("error", a.error);
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
|
-
|
|
257
|
-
}),
|
|
258
|
-
await
|
|
259
|
-
}), (
|
|
260
|
-
const
|
|
261
|
-
return
|
|
262
|
-
|
|
263
|
-
"cache-identifier":
|
|
264
|
-
"cell-attributes":
|
|
256
|
+
b.value = null;
|
|
257
|
+
}), de(async () => {
|
|
258
|
+
await e.canCreate() && (B.value.title = l("snis.list.empty_state.title"), B.value.ctaText = l("actions.create"));
|
|
259
|
+
}), (a, d) => {
|
|
260
|
+
const p = N("KButton"), h = N("KCopy"), t = N("KDropdownItem"), s = N("KClipboardProvider");
|
|
261
|
+
return E(), L("div", Ue, [
|
|
262
|
+
f(o(_e), {
|
|
263
|
+
"cache-identifier": i.cacheIdentifier,
|
|
264
|
+
"cell-attributes": x,
|
|
265
265
|
"disable-row-click": !0,
|
|
266
|
-
"disable-sorting":
|
|
266
|
+
"disable-sorting": M.value,
|
|
267
267
|
"empty-state-options": B.value,
|
|
268
268
|
"enable-entity-actions": "",
|
|
269
|
-
"error-message":
|
|
270
|
-
fetcher:
|
|
271
|
-
"fetcher-cache-key":
|
|
272
|
-
"hide-toolbar": T.value,
|
|
269
|
+
"error-message": b.value,
|
|
270
|
+
fetcher: o(W),
|
|
271
|
+
"fetcher-cache-key": D.value,
|
|
273
272
|
"pagination-type": "offset",
|
|
274
273
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
275
|
-
query:
|
|
276
|
-
"table-headers":
|
|
277
|
-
onClearSearchInput:
|
|
274
|
+
query: C.value,
|
|
275
|
+
"table-headers": o($),
|
|
276
|
+
onClearSearchInput: G,
|
|
278
277
|
onSort: R
|
|
279
278
|
}, {
|
|
280
|
-
"toolbar-filter":
|
|
281
|
-
|
|
282
|
-
modelValue:
|
|
283
|
-
"onUpdate:modelValue":
|
|
284
|
-
config:
|
|
279
|
+
"toolbar-filter": u(() => [
|
|
280
|
+
f(o(Ie), {
|
|
281
|
+
modelValue: C.value,
|
|
282
|
+
"onUpdate:modelValue": d[0] || (d[0] = (n) => C.value = n),
|
|
283
|
+
config: Q.value
|
|
285
284
|
}, null, 8, ["modelValue", "config"])
|
|
286
285
|
]),
|
|
287
|
-
"toolbar-button":
|
|
288
|
-
(
|
|
289
|
-
disabled: !
|
|
286
|
+
"toolbar-button": u(() => [
|
|
287
|
+
(E(), J(me, {
|
|
288
|
+
disabled: !i.useActionOutside,
|
|
290
289
|
to: "#kong-ui-app-page-header-action-button"
|
|
291
290
|
}, [
|
|
292
|
-
|
|
293
|
-
"auth-function": () =>
|
|
291
|
+
f(o(ie), {
|
|
292
|
+
"auth-function": () => i.canCreate()
|
|
294
293
|
}, {
|
|
295
|
-
default:
|
|
296
|
-
|
|
294
|
+
default: u(() => [
|
|
295
|
+
f(p, {
|
|
297
296
|
appearance: "primary",
|
|
298
297
|
"data-testid": "toolbar-add-sni",
|
|
299
|
-
size:
|
|
300
|
-
to:
|
|
298
|
+
size: i.useActionOutside ? "medium" : "large",
|
|
299
|
+
to: i.config.createRoute
|
|
301
300
|
}, {
|
|
302
|
-
default:
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
default: u(() => [
|
|
302
|
+
f(o(Ne)),
|
|
303
|
+
A(" " + S(o(l)("snis.list.toolbar_actions.new")), 1)
|
|
305
304
|
]),
|
|
306
305
|
_: 1
|
|
307
|
-
}, 8, ["size", "to"])
|
|
308
|
-
[ve, w.value]
|
|
309
|
-
])
|
|
306
|
+
}, 8, ["size", "to"])
|
|
310
307
|
]),
|
|
311
308
|
_: 1
|
|
312
309
|
}, 8, ["auth-function"])
|
|
313
310
|
], 8, ["disabled"]))
|
|
314
311
|
]),
|
|
315
|
-
name:
|
|
316
|
-
|
|
312
|
+
name: u(({ rowValue: n }) => [
|
|
313
|
+
ne("b", null, S(n ?? "-"), 1)
|
|
317
314
|
]),
|
|
318
|
-
certificate:
|
|
319
|
-
|
|
315
|
+
certificate: u(({ row: n }) => [
|
|
316
|
+
n.certificate && n.certificate.id ? (E(), J(h, {
|
|
320
317
|
key: 0,
|
|
321
318
|
class: "copy-certificate-uuid",
|
|
322
319
|
"data-testid": "copy-certificate-uuid",
|
|
323
|
-
text:
|
|
320
|
+
text: n.certificate.id,
|
|
324
321
|
truncate: ""
|
|
325
|
-
}, null, 8, ["text"])) : (
|
|
322
|
+
}, null, 8, ["text"])) : (E(), L("span", Oe, "-"))
|
|
326
323
|
]),
|
|
327
|
-
tags:
|
|
328
|
-
|
|
324
|
+
tags: u(({ rowValue: n }) => [
|
|
325
|
+
f(o(Ce), { tags: n }, null, 8, ["tags"])
|
|
329
326
|
]),
|
|
330
|
-
actions:
|
|
331
|
-
|
|
332
|
-
default:
|
|
333
|
-
|
|
327
|
+
actions: u(({ row: n }) => [
|
|
328
|
+
f(s, null, {
|
|
329
|
+
default: u(({ copyToClipboard: I }) => [
|
|
330
|
+
f(t, {
|
|
334
331
|
"data-testid": "action-entity-copy-id",
|
|
335
|
-
onClick: (
|
|
332
|
+
onClick: (g) => H(n, I)
|
|
336
333
|
}, {
|
|
337
|
-
default:
|
|
338
|
-
|
|
334
|
+
default: u(() => [
|
|
335
|
+
A(S(o(l)("actions.copy_id")), 1)
|
|
339
336
|
]),
|
|
340
337
|
_: 2
|
|
341
338
|
}, 1032, ["onClick"])
|
|
342
339
|
]),
|
|
343
340
|
_: 2
|
|
344
341
|
}, 1024),
|
|
345
|
-
|
|
346
|
-
default:
|
|
347
|
-
|
|
342
|
+
f(s, null, {
|
|
343
|
+
default: u(({ copyToClipboard: I }) => [
|
|
344
|
+
f(t, {
|
|
348
345
|
"data-testid": "action-entity-copy-json",
|
|
349
|
-
onClick: (
|
|
346
|
+
onClick: (g) => X(n, I)
|
|
350
347
|
}, {
|
|
351
|
-
default:
|
|
352
|
-
|
|
348
|
+
default: u(() => [
|
|
349
|
+
A(S(o(l)("actions.copy_json")), 1)
|
|
353
350
|
]),
|
|
354
351
|
_: 2
|
|
355
352
|
}, 1032, ["onClick"])
|
|
356
353
|
]),
|
|
357
354
|
_: 2
|
|
358
355
|
}, 1024),
|
|
359
|
-
|
|
360
|
-
"auth-function": () =>
|
|
356
|
+
f(o(ie), {
|
|
357
|
+
"auth-function": () => i.canEdit(n)
|
|
361
358
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
|
|
359
|
+
default: u(() => [
|
|
360
|
+
f(t, {
|
|
364
361
|
"data-testid": "action-entity-edit",
|
|
365
|
-
item:
|
|
362
|
+
item: Y(n.id)
|
|
366
363
|
}, null, 8, ["item"])
|
|
367
364
|
]),
|
|
368
365
|
_: 2
|
|
369
366
|
}, 1032, ["auth-function"]),
|
|
370
|
-
|
|
371
|
-
"auth-function": () =>
|
|
367
|
+
f(o(ie), {
|
|
368
|
+
"auth-function": () => i.canDelete(n)
|
|
372
369
|
}, {
|
|
373
|
-
default:
|
|
374
|
-
|
|
370
|
+
default: u(() => [
|
|
371
|
+
f(t, {
|
|
375
372
|
danger: "",
|
|
376
373
|
"data-testid": "action-entity-delete",
|
|
377
374
|
"has-divider": "",
|
|
378
|
-
onClick: (
|
|
375
|
+
onClick: (I) => ee(n)
|
|
379
376
|
}, {
|
|
380
|
-
default:
|
|
381
|
-
|
|
377
|
+
default: u(() => [
|
|
378
|
+
A(S(o(l)("actions.delete")), 1)
|
|
382
379
|
]),
|
|
383
380
|
_: 2
|
|
384
381
|
}, 1032, ["onClick"])
|
|
@@ -387,39 +384,39 @@ const pe = {
|
|
|
387
384
|
}, 1032, ["auth-function"])
|
|
388
385
|
]),
|
|
389
386
|
_: 1
|
|
390
|
-
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "
|
|
391
|
-
|
|
392
|
-
"action-pending":
|
|
393
|
-
description:
|
|
394
|
-
"entity-name":
|
|
395
|
-
"entity-type":
|
|
396
|
-
error:
|
|
387
|
+
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
388
|
+
f(o(Se), {
|
|
389
|
+
"action-pending": F.value,
|
|
390
|
+
description: o(l)("delete.description"),
|
|
391
|
+
"entity-name": k.value && (k.value.name || k.value.id),
|
|
392
|
+
"entity-type": o(Ee).SNI,
|
|
393
|
+
error: O.value,
|
|
397
394
|
"need-confirm": !1,
|
|
398
|
-
title:
|
|
399
|
-
visible:
|
|
400
|
-
onCancel:
|
|
401
|
-
onProceed:
|
|
395
|
+
title: o(l)("delete.title"),
|
|
396
|
+
visible: T.value,
|
|
397
|
+
onCancel: V,
|
|
398
|
+
onProceed: te
|
|
402
399
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
403
400
|
]);
|
|
404
401
|
};
|
|
405
402
|
}
|
|
406
|
-
}),
|
|
407
|
-
const
|
|
408
|
-
for (const [
|
|
409
|
-
|
|
410
|
-
return
|
|
411
|
-
},
|
|
403
|
+
}), pe = (i, w) => {
|
|
404
|
+
const v = i.__vccOpts || i;
|
|
405
|
+
for (const [e, l] of w)
|
|
406
|
+
v[e] = l;
|
|
407
|
+
return v;
|
|
408
|
+
}, Ye = /* @__PURE__ */ pe(je, [["__scopeId", "data-v-70dc188c"]]), Ae = { class: "kong-ui-entities-snis-form" }, Le = { "data-testid": "no-search-results" }, Je = {
|
|
412
409
|
key: 2,
|
|
413
410
|
class: "invalid-certificate-message",
|
|
414
411
|
"data-testid": "invalid-certificate-message"
|
|
415
|
-
},
|
|
412
|
+
}, Qe = /* @__PURE__ */ ce({
|
|
416
413
|
__name: "SniForm",
|
|
417
414
|
props: {
|
|
418
415
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
419
416
|
config: {
|
|
420
417
|
type: Object,
|
|
421
418
|
required: !0,
|
|
422
|
-
validator: (
|
|
419
|
+
validator: (i) => !(!i || !["konnect", "kongManager"].includes(i == null ? void 0 : i.app) || i.app === "konnect" && !i.controlPlaneId || i.app === "kongManager" && typeof i.workspace != "string" || !i.cancelRoute)
|
|
423
420
|
},
|
|
424
421
|
/** If a valid SNI ID is provided, it will put the form in Edit mode instead of Create */
|
|
425
422
|
sniId: {
|
|
@@ -429,9 +426,9 @@ const pe = {
|
|
|
429
426
|
}
|
|
430
427
|
},
|
|
431
428
|
emits: ["update", "error", "loading"],
|
|
432
|
-
setup(
|
|
433
|
-
var
|
|
434
|
-
const
|
|
429
|
+
setup(i, { emit: w }) {
|
|
430
|
+
var h;
|
|
431
|
+
const v = w, e = i, l = we(), { i18n: { t: c } } = ue.useI18n(), { getMessageFromError: D } = Me(), { axiosInstance: M } = fe((h = e.config) == null ? void 0 : h.axiosRequestConfig), U = y(() => P.form[e.config.app].edit), $ = y(() => e.sniId ? ae.Edit : ae.Create), x = y(() => e.config.certificateId && $.value === ae.Create ? e.config.certificateId : ""), r = re({
|
|
435
432
|
fields: {
|
|
436
433
|
name: "",
|
|
437
434
|
tags: "",
|
|
@@ -439,163 +436,163 @@ const pe = {
|
|
|
439
436
|
},
|
|
440
437
|
isReadonly: !1,
|
|
441
438
|
errorMessage: ""
|
|
442
|
-
}),
|
|
439
|
+
}), C = re({
|
|
443
440
|
name: "",
|
|
444
441
|
tags: "",
|
|
445
442
|
certificate_id: ""
|
|
446
|
-
}),
|
|
447
|
-
var
|
|
448
|
-
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
var
|
|
453
|
-
let
|
|
454
|
-
return
|
|
455
|
-
}), R =
|
|
456
|
-
var
|
|
457
|
-
let
|
|
458
|
-
return
|
|
459
|
-
}),
|
|
460
|
-
var
|
|
443
|
+
}), Q = y(() => JSON.stringify(r.fields) !== JSON.stringify(C) && !!r.fields.name && !!(r.fields.certificate_id || x.value)), W = (t) => {
|
|
444
|
+
var s, n;
|
|
445
|
+
r.fields.name = (t == null ? void 0 : t.name) || "", r.fields.tags = ((s = t == null ? void 0 : t.tags) == null ? void 0 : s.join(", ")) || "", r.fields.certificate_id = ((n = t == null ? void 0 : t.certificate) == null ? void 0 : n.id) || "", Object.assign(C, r.fields);
|
|
446
|
+
}, z = () => {
|
|
447
|
+
l.push(e.config.cancelRoute);
|
|
448
|
+
}, G = y(() => {
|
|
449
|
+
var s, n;
|
|
450
|
+
let t = `${e.config.apiBaseUrl}${P.form[e.config.app].validate}`;
|
|
451
|
+
return e.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((s = e.config) == null ? void 0 : s.controlPlaneId) || "") : e.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (n = e.config) != null && n.workspace ? `/${e.config.workspace}` : "")), t = t.replace(/{id}/gi, e.sniId), t;
|
|
452
|
+
}), R = y(() => {
|
|
453
|
+
var s, n;
|
|
454
|
+
let t = `${e.config.apiBaseUrl}${P.form[e.config.app][$.value]}`;
|
|
455
|
+
return e.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((s = e.config) == null ? void 0 : s.controlPlaneId) || "") : e.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (n = e.config) != null && n.workspace ? `/${e.config.workspace}` : "")), t = t.replace(/{id}/gi, e.sniId), t;
|
|
456
|
+
}), b = y(() => {
|
|
457
|
+
var t, s;
|
|
461
458
|
return {
|
|
462
|
-
name:
|
|
463
|
-
tags: (
|
|
464
|
-
certificate: { id:
|
|
459
|
+
name: r.fields.name,
|
|
460
|
+
tags: (s = (t = r.fields.tags.split(",")) == null ? void 0 : t.map((n) => String(n || "").trim())) == null ? void 0 : s.filter((n) => n !== ""),
|
|
461
|
+
certificate: { id: x.value || r.fields.certificate_id }
|
|
465
462
|
};
|
|
466
|
-
}),
|
|
467
|
-
var
|
|
463
|
+
}), B = async () => {
|
|
464
|
+
var t, s, n, I, g, se;
|
|
468
465
|
try {
|
|
469
|
-
|
|
466
|
+
r.isReadonly = !0;
|
|
470
467
|
let m;
|
|
471
|
-
await
|
|
468
|
+
await M.post(G.value, b.value), $.value === "create" ? m = await M.post(R.value, b.value) : $.value === "edit" && (m = ((t = e.config) == null ? void 0 : t.app) === "konnect" ? await M.put(R.value, b.value) : await M.patch(R.value, b.value)), r.fields.name = ((s = m == null ? void 0 : m.data) == null ? void 0 : s.name) || "", r.fields.tags = ((I = (n = m == null ? void 0 : m.data) == null ? void 0 : n.tags) == null ? void 0 : I.join(", ")) || "", r.fields.certificate_id = ((se = (g = m == null ? void 0 : m.data) == null ? void 0 : g.certificate) == null ? void 0 : se.id) || "", Object.assign(C, r.fields), v("update", m == null ? void 0 : m.data);
|
|
472
469
|
} catch (m) {
|
|
473
|
-
|
|
470
|
+
r.errorMessage = D(m), v("error", m);
|
|
474
471
|
} finally {
|
|
475
|
-
|
|
472
|
+
r.isReadonly = !1;
|
|
476
473
|
}
|
|
477
474
|
}, {
|
|
478
|
-
debouncedQueryChange:
|
|
479
|
-
loading:
|
|
480
|
-
allRecords:
|
|
481
|
-
error:
|
|
482
|
-
validationError:
|
|
483
|
-
loadItems:
|
|
484
|
-
results:
|
|
485
|
-
} =
|
|
486
|
-
|
|
487
|
-
},
|
|
488
|
-
label:
|
|
489
|
-
value:
|
|
490
|
-
selected:
|
|
491
|
-
}))),
|
|
492
|
-
|
|
493
|
-
let
|
|
494
|
-
for (
|
|
495
|
-
|
|
475
|
+
debouncedQueryChange: H,
|
|
476
|
+
loading: X,
|
|
477
|
+
allRecords: Y,
|
|
478
|
+
error: k,
|
|
479
|
+
validationError: T,
|
|
480
|
+
loadItems: F,
|
|
481
|
+
results: O
|
|
482
|
+
} = $e(e.config, P.form[e.config.app].certificates), Z = (t) => {
|
|
483
|
+
H(t);
|
|
484
|
+
}, ee = y(() => k.value ? c("errors.certificates.fetch") : ""), V = y(() => T.value ? c("errors.certificates.invalid") : ""), te = _(0), j = y(() => Y.value === void 0), a = _(/* @__PURE__ */ new Set()), d = y(() => Array.from(a.value).map((s) => ({
|
|
485
|
+
label: s,
|
|
486
|
+
value: s,
|
|
487
|
+
selected: r.fields.certificate_id === s
|
|
488
|
+
}))), p = (t) => {
|
|
489
|
+
a.value.clear();
|
|
490
|
+
let s;
|
|
491
|
+
for (s of t)
|
|
492
|
+
a.value.add(s.id);
|
|
496
493
|
};
|
|
497
|
-
return
|
|
498
|
-
|
|
499
|
-
}, { immediate: !0, deep: !0 }),
|
|
500
|
-
|
|
501
|
-
}, { immediate: !0, deep: !0 }),
|
|
502
|
-
await
|
|
503
|
-
}), (
|
|
504
|
-
const
|
|
505
|
-
return
|
|
506
|
-
|
|
507
|
-
"can-submit":
|
|
508
|
-
config:
|
|
509
|
-
"edit-id":
|
|
510
|
-
"entity-type":
|
|
511
|
-
"error-message":
|
|
512
|
-
"fetch-url":
|
|
513
|
-
"form-fields":
|
|
514
|
-
"is-readonly":
|
|
515
|
-
onCancel:
|
|
516
|
-
"onFetch:error":
|
|
517
|
-
"onFetch:success":
|
|
518
|
-
onLoading:
|
|
519
|
-
onSubmit:
|
|
494
|
+
return oe(O, (t) => {
|
|
495
|
+
p(t);
|
|
496
|
+
}, { immediate: !0, deep: !0 }), oe(d, () => {
|
|
497
|
+
te.value++;
|
|
498
|
+
}, { immediate: !0, deep: !0 }), de(async () => {
|
|
499
|
+
await F();
|
|
500
|
+
}), (t, s) => {
|
|
501
|
+
const n = N("KInput"), I = N("KSelect");
|
|
502
|
+
return E(), L("div", Ae, [
|
|
503
|
+
f(o(xe), {
|
|
504
|
+
"can-submit": Q.value,
|
|
505
|
+
config: i.config,
|
|
506
|
+
"edit-id": i.sniId,
|
|
507
|
+
"entity-type": o(Fe).SNI,
|
|
508
|
+
"error-message": r.errorMessage || ee.value,
|
|
509
|
+
"fetch-url": U.value,
|
|
510
|
+
"form-fields": b.value,
|
|
511
|
+
"is-readonly": r.isReadonly,
|
|
512
|
+
onCancel: z,
|
|
513
|
+
"onFetch:error": s[3] || (s[3] = (g) => t.$emit("error", g)),
|
|
514
|
+
"onFetch:success": W,
|
|
515
|
+
onLoading: s[4] || (s[4] = (g) => t.$emit("loading", g)),
|
|
516
|
+
onSubmit: B
|
|
520
517
|
}, {
|
|
521
|
-
default:
|
|
522
|
-
|
|
523
|
-
description:
|
|
524
|
-
title:
|
|
518
|
+
default: u(() => [
|
|
519
|
+
f(o(le), {
|
|
520
|
+
description: o(c)("form.sections.general.description"),
|
|
521
|
+
title: o(c)("form.sections.general.title")
|
|
525
522
|
}, {
|
|
526
|
-
default:
|
|
527
|
-
|
|
528
|
-
modelValue:
|
|
529
|
-
"onUpdate:modelValue":
|
|
523
|
+
default: u(() => [
|
|
524
|
+
f(n, {
|
|
525
|
+
modelValue: r.fields.name,
|
|
526
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => r.fields.name = g),
|
|
530
527
|
modelModifiers: { trim: !0 },
|
|
531
528
|
autocomplete: "off",
|
|
532
529
|
"data-testid": "sni-form-name",
|
|
533
|
-
label:
|
|
534
|
-
placeholder:
|
|
535
|
-
readonly:
|
|
530
|
+
label: o(c)("form.fields.name.label"),
|
|
531
|
+
placeholder: o(c)("form.fields.name.placeholder"),
|
|
532
|
+
readonly: r.isReadonly,
|
|
536
533
|
required: "",
|
|
537
534
|
type: "text"
|
|
538
535
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
539
|
-
|
|
540
|
-
modelValue:
|
|
541
|
-
"onUpdate:modelValue":
|
|
536
|
+
f(n, {
|
|
537
|
+
modelValue: r.fields.tags,
|
|
538
|
+
"onUpdate:modelValue": s[1] || (s[1] = (g) => r.fields.tags = g),
|
|
542
539
|
modelModifiers: { trim: !0 },
|
|
543
540
|
autocomplete: "off",
|
|
544
541
|
"data-testid": "sni-form-tags",
|
|
545
|
-
help:
|
|
546
|
-
label:
|
|
542
|
+
help: o(c)("form.fields.tags.help"),
|
|
543
|
+
label: o(c)("form.fields.tags.label"),
|
|
547
544
|
"label-attributes": {
|
|
548
|
-
info:
|
|
545
|
+
info: o(c)("form.fields.tags.tooltip"),
|
|
549
546
|
tooltipAttributes: { maxWidth: "400" }
|
|
550
547
|
},
|
|
551
|
-
placeholder:
|
|
552
|
-
readonly:
|
|
548
|
+
placeholder: o(c)("form.fields.tags.placeholder"),
|
|
549
|
+
readonly: r.isReadonly,
|
|
553
550
|
type: "text"
|
|
554
551
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
555
552
|
]),
|
|
556
553
|
_: 1
|
|
557
554
|
}, 8, ["description", "title"]),
|
|
558
|
-
|
|
559
|
-
description:
|
|
555
|
+
f(o(le), {
|
|
556
|
+
description: o(c)("form.sections.certificate.description"),
|
|
560
557
|
"has-divider": "",
|
|
561
|
-
title:
|
|
558
|
+
title: o(c)("form.sections.certificate.title")
|
|
562
559
|
}, {
|
|
563
|
-
default:
|
|
564
|
-
|
|
560
|
+
default: u(() => [
|
|
561
|
+
x.value ? (E(), J(n, {
|
|
565
562
|
key: 0,
|
|
566
563
|
"data-testid": "sni-form-certificate-id",
|
|
567
|
-
label:
|
|
568
|
-
"model-value":
|
|
564
|
+
label: o(c)("form.fields.certificate_id.label"),
|
|
565
|
+
"model-value": x.value,
|
|
569
566
|
readonly: "",
|
|
570
567
|
required: "",
|
|
571
568
|
width: "100%"
|
|
572
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
569
|
+
}, null, 8, ["label", "model-value"])) : (E(), J(I, {
|
|
573
570
|
key: 1,
|
|
574
|
-
modelValue:
|
|
575
|
-
"onUpdate:modelValue":
|
|
571
|
+
modelValue: r.fields.certificate_id,
|
|
572
|
+
"onUpdate:modelValue": s[2] || (s[2] = (g) => r.fields.certificate_id = g),
|
|
576
573
|
clearable: "",
|
|
577
574
|
"data-testid": "sni-form-certificate-id",
|
|
578
|
-
"dropdown-footer-text":
|
|
575
|
+
"dropdown-footer-text": j.value ? o(c)("form.fields.certificate_id.footer") : void 0,
|
|
579
576
|
"enable-filtering": "",
|
|
580
577
|
"filter-function": () => !0,
|
|
581
|
-
items:
|
|
582
|
-
label:
|
|
583
|
-
loading:
|
|
584
|
-
placeholder:
|
|
585
|
-
readonly:
|
|
578
|
+
items: d.value,
|
|
579
|
+
label: o(c)("form.fields.certificate_id.label"),
|
|
580
|
+
loading: o(X),
|
|
581
|
+
placeholder: o(c)("form.fields.certificate_id.placeholder"),
|
|
582
|
+
readonly: r.isReadonly,
|
|
586
583
|
required: "",
|
|
587
584
|
width: "100%",
|
|
588
|
-
onQueryChange:
|
|
585
|
+
onQueryChange: Z
|
|
589
586
|
}, {
|
|
590
|
-
loading:
|
|
591
|
-
|
|
587
|
+
loading: u(() => [
|
|
588
|
+
ne("div", null, S(o(c)("actions.loading")), 1)
|
|
592
589
|
]),
|
|
593
|
-
empty:
|
|
594
|
-
|
|
590
|
+
empty: u(() => [
|
|
591
|
+
ne("div", Le, S(o(c)("search.no_results")), 1)
|
|
595
592
|
]),
|
|
596
593
|
_: 1
|
|
597
594
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
598
|
-
|
|
595
|
+
V.value ? (E(), L("p", Je, S(V.value), 1)) : ge("", !0)
|
|
599
596
|
]),
|
|
600
597
|
_: 1
|
|
601
598
|
}, 8, ["description", "title"])
|
|
@@ -605,8 +602,8 @@ const pe = {
|
|
|
605
602
|
]);
|
|
606
603
|
};
|
|
607
604
|
}
|
|
608
|
-
}),
|
|
605
|
+
}), Ze = /* @__PURE__ */ pe(Qe, [["__scopeId", "data-v-414e41d7"]]);
|
|
609
606
|
export {
|
|
610
|
-
|
|
611
|
-
|
|
607
|
+
Ze as SniForm,
|
|
608
|
+
Ye as SniList
|
|
612
609
|
};
|
|
@@ -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,H,d,Z,v){"use strict";const ee={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 te(){const n=H.createI18n("en-us",ee);return{i18n:n,i18nT:H.i18nTComponent(n)}}const X={useI18n:te},V="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${V}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${V}/snis`,edit:`${V}/snis/{id}`,validate:`${V}/v1/schemas/json/sni/validate`,certificates:`${V}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ie={class:"kong-ui-entities-snis-list"},ae={key:1},oe=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:B}){var R;const m=B,i=n,{i18n:{t:c}}=X.useI18n(),{axiosInstance:f}=d.useAxios((R=i.config)==null?void 0:R.axiosRequestConfig),D=e.ref(1),_=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),q={name:{label:c("snis.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},certificate:{label:c("snis.list.table_headers.certificate_id"),sortable:!1},tags:{label:c("snis.list.table_headers.tags"),sortable:!1}},I=q,x=a=>({style:{maxWidth:a.headerKey==="name"?"250px":a.headerKey==="certificate"?"350px":null}}),r=e.computed(()=>{var p,t;let a=`${i.config.apiBaseUrl}${E.list[i.config.app].all}`;return i.config.app==="konnect"?a=a.replace(/{controlPlaneId}/gi,((p=i.config)==null?void 0:p.controlPlaneId)||""):i.config.app==="kongManager"&&(a=a.replace(/\/{workspace}/gi,(t=i.config)!=null&&t.workspace?`/${i.config.workspace}`:"")),a}),b=e.ref(""),U=e.computed(()=>{const a=i.config.app==="konnect"||i.config.isExactMatch;if(a)return{isExactMatch:a,placeholder:c("search.placeholder")};const{name:p}=q;return{isExactMatch:a,fields:{name:p},schema:i.config.filterSchema}}),{fetcher:A,fetcherState:j}=d.useFetcher(i.config,r.value),L=()=>{b.value=""},M=()=>{D.value++},y=e.ref(null),F=e.ref(!1),$=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${c("snis.list.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:c("snis.title")}),J=(a,p)=>{const t=a.id;if(!p(t)){m("copy:error",{entity:a,field:"id",message:c("errors.copy")});return}m("copy:success",{entity:a,field:"id",message:c("copy.success",{val:t})})},W=(a,p)=>{const t=JSON.stringify(a);if(!p(t)){m("copy:error",{entity:a,message:c("errors.copy")});return}m("copy:success",{entity:a,message:c("copy.success_brief")})},Q=a=>({label:c("actions.edit"),to:i.config.getEditRoute(a)}),h=e.ref(void 0),T=e.ref(!1),N=e.ref(!1),P=e.ref(""),z=d.useDeleteUrlBuilder(i.config,r.value),K=a=>{h.value=a,T.value=!0},O=()=>{T.value=!1,h.value=void 0},G=async()=>{var a,p,t;if((a=h.value)!=null&&a.id){N.value=!0;try{await f.delete(z(h.value.id)),m("delete:success",h.value),N.value=!1,O(),D.value++}catch(o){P.value=((t=(p=o.response)==null?void 0:p.data)==null?void 0:t.message)||o.message||c("errors.delete"),m("error",o)}finally{N.value=!1}}},w=e.ref(!1);return e.watch(j,a=>{var p,t,o,l;if(Array.isArray((p=a==null?void 0:a.response)==null?void 0:p.data)&&(w.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:c("errors.general")},(l=(o=(t=a.error)==null?void 0:t.response)==null?void 0:o.data)!=null&&l.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=c("snis.list.empty_state.title"),$.value.ctaText=c("actions.create"))}),(a,p)=>{const t=e.resolveComponent("KButton"),o=e.resolveComponent("KCopy"),l=e.resolveComponent("KDropdownItem"),k=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(d.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"cell-attributes":x,"disable-row-click":!0,"disable-sorting":_.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(A),"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(I),onClearSearchInput:L,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(d.EntityFilter),{modelValue:b.value,"onUpdate:modelValue":p[0]||(p[0]=s=>b.value=s),config:U.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(Z.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(c)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"]),[[e.vShow,w.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:s})=>[e.createElementVNode("b",null,e.toDisplayString(s??"-"),1)]),certificate:e.withCtx(({row:s})=>[s.certificate&&s.certificate.id?(e.openBlock(),e.createBlock(o,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:s.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",ae,"-"))]),tags:e.withCtx(({rowValue:s})=>[e.createVNode(e.unref(d.TableTags),{tags:s},null,8,["tags"])]),actions:e.withCtx(({row:s})=>[e.createVNode(k,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(l,{"data-testid":"action-entity-copy-id",onClick:u=>J(s,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(k,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(l,{"data-testid":"action-entity-copy-json",onClick:u=>W(s,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canEdit(s)},{default:e.withCtx(()=>[e.createVNode(l,{"data-testid":"action-entity-edit",item:Q(s.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(d.PermissionsWrapper),{"auth-function":()=>n.canDelete(s)},{default:e.withCtx(()=>[e.createVNode(l,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:C=>K(s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("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":N.value,description:e.unref(c)("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(c)("delete.title"),visible:T.value,onCancel:O,onProceed:G},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Y=(n,B)=>{const m=n.__vccOpts||n;for(const[i,c]of B)m[i]=c;return m},ne=Y(oe,[["__scopeId","data-v-5945458b"]]),re={class:"kong-ui-entities-snis-form"},se={"data-testid":"no-search-results"},le={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},ce=Y(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:B}){var p;const m=B,i=n,c=v.useRouter(),{i18n:{t:f}}=X.useI18n(),{getMessageFromError:D}=d.useErrors(),{axiosInstance:_}=d.useAxios((p=i.config)==null?void 0:p.axiosRequestConfig),q=e.computed(()=>E.form[i.config.app].edit),I=e.computed(()=>i.sniId?d.EntityBaseFormType.Edit:d.EntityBaseFormType.Create),x=e.computed(()=>i.config.certificateId&&I.value===d.EntityBaseFormType.Create?i.config.certificateId:""),r=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),b=e.reactive({name:"",tags:"",certificate_id:""}),U=e.computed(()=>JSON.stringify(r.fields)!==JSON.stringify(b)&&!!r.fields.name&&!!(r.fields.certificate_id||x.value)),A=t=>{var o,l;r.fields.name=(t==null?void 0:t.name)||"",r.fields.tags=((o=t==null?void 0:t.tags)==null?void 0:o.join(", "))||"",r.fields.certificate_id=((l=t==null?void 0:t.certificate)==null?void 0:l.id)||"",Object.assign(b,r.fields)},j=()=>{c.push(i.config.cancelRoute)},L=e.computed(()=>{var o,l;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,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),M=e.computed(()=>{var o,l;let t=`${i.config.apiBaseUrl}${E.form[i.config.app][I.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,(l=i.config)!=null&&l.workspace?`/${i.config.workspace}`:"")),t=t.replace(/{id}/gi,i.sniId),t}),y=e.computed(()=>{var t,o;return{name:r.fields.name,tags:(o=(t=r.fields.tags.split(","))==null?void 0:t.map(l=>String(l||"").trim()))==null?void 0:o.filter(l=>l!==""),certificate:{id:x.value||r.fields.certificate_id}}}),F=async()=>{var t,o,l,k,s,C;try{r.isReadonly=!0;let u;await _.post(L.value,y.value),I.value==="create"?u=await _.post(M.value,y.value):I.value==="edit"&&(u=((t=i.config)==null?void 0:t.app)==="konnect"?await _.put(M.value,y.value):await _.patch(M.value,y.value)),r.fields.name=((o=u==null?void 0:u.data)==null?void 0:o.name)||"",r.fields.tags=((k=(l=u==null?void 0:u.data)==null?void 0:l.tags)==null?void 0:k.join(", "))||"",r.fields.certificate_id=((C=(s=u==null?void 0:u.data)==null?void 0:s.certificate)==null?void 0:C.id)||"",Object.assign(b,r.fields),m("update",u==null?void 0:u.data)}catch(u){r.errorMessage=D(u),m("error",u)}finally{r.isReadonly=!1}},{debouncedQueryChange:$,loading:J,allRecords:W,error:Q,validationError:h,loadItems:T,results:N}=d.useDebouncedFilter(i.config,E.form[i.config.app].certificates),P=t=>{$(t)},z=e.computed(()=>Q.value?f("errors.certificates.fetch"):""),K=e.computed(()=>h.value?f("errors.certificates.invalid"):""),O=e.ref(0),G=e.computed(()=>W.value===void 0),w=e.ref(new Set),R=e.computed(()=>Array.from(w.value).map(o=>({label:o,value:o,selected:r.fields.certificate_id===o}))),a=t=>{w.value.clear();let o;for(o of t)w.value.add(o.id)};return e.watch(N,t=>{a(t)},{immediate:!0,deep:!0}),e.watch(R,()=>{O.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await T()}),(t,o)=>{const l=e.resolveComponent("KInput"),k=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(d.EntityBaseForm),{"can-submit":U.value,config:n.config,"edit-id":n.sniId,"entity-type":e.unref(d.SupportedEntityType).SNI,"error-message":r.errorMessage||z.value,"fetch-url":q.value,"form-fields":y.value,"is-readonly":r.isReadonly,onCancel:j,"onFetch:error":o[3]||(o[3]=s=>t.$emit("error",s)),"onFetch:success":A,onLoading:o[4]||(o[4]=s=>t.$emit("loading",s)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(d.EntityFormSection),{description:e.unref(f)("form.sections.general.description"),title:e.unref(f)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:r.fields.name,"onUpdate:modelValue":o[0]||(o[0]=s=>r.fields.name=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(f)("form.fields.name.label"),placeholder:e.unref(f)("form.fields.name.placeholder"),readonly:r.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(l,{modelValue:r.fields.tags,"onUpdate:modelValue":o[1]||(o[1]=s=>r.fields.tags=s),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(f)("form.fields.tags.help"),label:e.unref(f)("form.fields.tags.label"),"label-attributes":{info:e.unref(f)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(f)("form.fields.tags.placeholder"),readonly:r.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(f)("form.sections.certificate.description"),"has-divider":"",title:e.unref(f)("form.sections.certificate.title")},{default:e.withCtx(()=>[x.value?(e.openBlock(),e.createBlock(l,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(f)("form.fields.certificate_id.label"),"model-value":x.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(k,{key:1,modelValue:r.fields.certificate_id,"onUpdate:modelValue":o[2]||(o[2]=s=>r.fields.certificate_id=s),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":G.value?e.unref(f)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:R.value,label:e.unref(f)("form.fields.certificate_id.label"),loading:e.unref(J),placeholder:e.unref(f)("form.fields.certificate_id.placeholder"),readonly:r.isReadonly,required:"",width:"100%",onQueryChange:P},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(f)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",se,e.toDisplayString(e.unref(f)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),K.value?(e.openBlock(),e.createElementBlock("p",le,e.toDisplayString(K.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=ce,g.SniList=ne,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(y,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):(y=typeof globalThis<"u"?globalThis:y||self,e(y["kong-ui-public-entities-snis"]={},y.Vue,y["kong-ui-public-i18n"],y["kong-ui-public-entities-shared"],y.KongIcons,y.VueRouter))})(this,function(y,e,G,c,Z,v){"use strict";const ee={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 te(){const a=G.createI18n("en-us",ee);return{i18n:a,i18nT:G.i18nTComponent(a)}}const H={useI18n:te},V="/v2/control-planes/{controlPlaneId}/core-entities",S="/{workspace}",E={list:{konnect:{all:`${V}/snis`},kongManager:{all:`${S}/snis`}},form:{konnect:{create:`${V}/snis`,edit:`${V}/snis/{id}`,validate:`${V}/v1/schemas/json/sni/validate`,certificates:`${V}/certificates`},kongManager:{create:`${S}/snis`,edit:`${S}/snis/{id}`,validate:`${S}/schemas/snis/validate`,certificates:`${S}/certificates`}}},ie={class:"kong-ui-entities-snis-list"},ae={key:1},oe=e.defineComponent({__name:"SniList",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||!a.createRoute||!a.getViewRoute||!a.getEditRoute||a.app==="kongManager"&&!a.isExactMatch&&!a.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(a,{emit:B}){var P;const g=B,t=a,{i18n:{t:l}}=H.useI18n(),{axiosInstance:d}=c.useAxios((P=t.config)==null?void 0:P.axiosRequestConfig),D=e.ref(1),I=e.computed(()=>t.config.app!=="kongManager"||!!t.config.disableSorting),R={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}},x=R,N=o=>({style:{maxWidth:o.headerKey==="name"?"250px":o.headerKey==="certificate"?"350px":null}}),s=e.computed(()=>{var f,p;let o=`${t.config.apiBaseUrl}${E.list[t.config.app].all}`;return t.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((f=t.config)==null?void 0:f.controlPlaneId)||""):t.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(p=t.config)!=null&&p.workspace?`/${t.config.workspace}`:"")),o}),_=e.ref(""),K=e.computed(()=>{const o=t.config.app==="konnect"||t.config.isExactMatch;if(o)return{isExactMatch:o,placeholder:l("search.placeholder")};const{name:f}=R;return{isExactMatch:o,fields:{name:f},schema:t.config.filterSchema}}),{fetcher:O,fetcherState:U}=c.useFetcher(t.config,s.value),j=()=>{_.value=""},M=()=>{D.value++},b=e.ref(null),F=e.ref({ctaPath:t.config.createRoute,ctaText:void 0,message:`${l("snis.list.empty_state.description")}${t.config.additionMessageForEmptyState?` ${t.config.additionMessageForEmptyState}`:""}`,title:l("snis.title")}),A=(o,f)=>{const p=o.id;if(!f(p)){g("copy:error",{entity:o,field:"id",message:l("errors.copy")});return}g("copy:success",{entity:o,field:"id",message:l("copy.success",{val:p})})},L=(o,f)=>{const p=JSON.stringify(o);if(!f(p)){g("copy:error",{entity:o,message:l("errors.copy")});return}g("copy:success",{entity:o,message:l("copy.success_brief")})},J=o=>({label:l("actions.edit"),to:t.config.getEditRoute(o)}),k=e.ref(void 0),$=e.ref(!1),w=e.ref(!1),q=e.ref(""),W=c.useDeleteUrlBuilder(t.config,s.value),Q=o=>{k.value=o,$.value=!0},T=()=>{$.value=!1,k.value=void 0},z=async()=>{var o,f,p;if((o=k.value)!=null&&o.id){w.value=!0;try{await d.delete(W(k.value.id)),g("delete:success",k.value),w.value=!1,T(),D.value++}catch(h){q.value=((p=(f=h.response)==null?void 0:f.data)==null?void 0:p.message)||h.message||l("errors.delete"),g("error",h)}finally{w.value=!1}}};return e.watch(U,o=>{var f,p,h;if(o.status===c.FetcherStatus.Error){b.value={title:l("errors.general")},(h=(p=(f=o.error)==null?void 0:f.response)==null?void 0:p.data)!=null&&h.message&&(b.value.message=o.error.response.data.message),g("error",o.error);return}b.value=null}),e.onBeforeMount(async()=>{await t.canCreate()&&(F.value.title=l("snis.list.empty_state.title"),F.value.ctaText=l("actions.create"))}),(o,f)=>{const p=e.resolveComponent("KButton"),h=e.resolveComponent("KCopy"),i=e.resolveComponent("KDropdownItem"),r=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(c.EntityBaseTable),{"cache-identifier":a.cacheIdentifier,"cell-attributes":N,"disable-row-click":!0,"disable-sorting":I.value,"empty-state-options":F.value,"enable-entity-actions":"","error-message":b.value,fetcher:e.unref(O),"fetcher-cache-key":D.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-snis-list",query:_.value,"table-headers":e.unref(x),onClearSearchInput:j,onSort:M},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(c.EntityFilter),{modelValue:_.value,"onUpdate:modelValue":f[0]||(f[0]=n=>_.value=n),config:K.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!a.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>a.canCreate()},{default:e.withCtx(()=>[e.createVNode(p,{appearance:"primary","data-testid":"toolbar-add-sni",size:a.useActionOutside?"medium":"large",to:a.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("snis.list.toolbar_actions.new")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:n})=>[e.createElementVNode("b",null,e.toDisplayString(n??"-"),1)]),certificate:e.withCtx(({row:n})=>[n.certificate&&n.certificate.id?(e.openBlock(),e.createBlock(h,{key:0,class:"copy-certificate-uuid","data-testid":"copy-certificate-uuid",text:n.certificate.id,truncate:""},null,8,["text"])):(e.openBlock(),e.createElementBlock("span",ae,"-"))]),tags:e.withCtx(({rowValue:n})=>[e.createVNode(e.unref(c.TableTags),{tags:n},null,8,["tags"])]),actions:e.withCtx(({row:n})=>[e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(i,{"data-testid":"action-entity-copy-id",onClick:m=>A(n,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(r,null,{default:e.withCtx(({copyToClipboard:C})=>[e.createVNode(i,{"data-testid":"action-entity-copy-json",onClick:m=>L(n,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>a.canEdit(n)},{default:e.withCtx(()=>[e.createVNode(i,{"data-testid":"action-entity-edit",item:J(n.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>a.canDelete(n)},{default:e.withCtx(()=>[e.createVNode(i,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:C=>Q(n)},{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","query","table-headers"]),e.createVNode(e.unref(c.EntityDeleteModal),{"action-pending":w.value,description:e.unref(l)("delete.description"),"entity-name":k.value&&(k.value.name||k.value.id),"entity-type":e.unref(c.EntityTypes).SNI,error:q.value,"need-confirm":!1,title:e.unref(l)("delete.title"),visible:$.value,onCancel:T,onProceed:z},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),X=(a,B)=>{const g=a.__vccOpts||a;for(const[t,l]of B)g[t]=l;return g},ne=X(oe,[["__scopeId","data-v-70dc188c"]]),re={class:"kong-ui-entities-snis-form"},se={"data-testid":"no-search-results"},le={key:2,class:"invalid-certificate-message","data-testid":"invalid-certificate-message"},ce=X(e.defineComponent({__name:"SniForm",props:{config:{type:Object,required:!0,validator:a=>!(!a||!["konnect","kongManager"].includes(a==null?void 0:a.app)||a.app==="konnect"&&!a.controlPlaneId||a.app==="kongManager"&&typeof a.workspace!="string"||!a.cancelRoute)},sniId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(a,{emit:B}){var h;const g=B,t=a,l=v.useRouter(),{i18n:{t:d}}=H.useI18n(),{getMessageFromError:D}=c.useErrors(),{axiosInstance:I}=c.useAxios((h=t.config)==null?void 0:h.axiosRequestConfig),R=e.computed(()=>E.form[t.config.app].edit),x=e.computed(()=>t.sniId?c.EntityBaseFormType.Edit:c.EntityBaseFormType.Create),N=e.computed(()=>t.config.certificateId&&x.value===c.EntityBaseFormType.Create?t.config.certificateId:""),s=e.reactive({fields:{name:"",tags:"",certificate_id:""},isReadonly:!1,errorMessage:""}),_=e.reactive({name:"",tags:"",certificate_id:""}),K=e.computed(()=>JSON.stringify(s.fields)!==JSON.stringify(_)&&!!s.fields.name&&!!(s.fields.certificate_id||N.value)),O=i=>{var r,n;s.fields.name=(i==null?void 0:i.name)||"",s.fields.tags=((r=i==null?void 0:i.tags)==null?void 0:r.join(", "))||"",s.fields.certificate_id=((n=i==null?void 0:i.certificate)==null?void 0:n.id)||"",Object.assign(_,s.fields)},U=()=>{l.push(t.config.cancelRoute)},j=e.computed(()=>{var r,n;let i=`${t.config.apiBaseUrl}${E.form[t.config.app].validate}`;return t.config.app==="konnect"?i=i.replace(/{controlPlaneId}/gi,((r=t.config)==null?void 0:r.controlPlaneId)||""):t.config.app==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(n=t.config)!=null&&n.workspace?`/${t.config.workspace}`:"")),i=i.replace(/{id}/gi,t.sniId),i}),M=e.computed(()=>{var r,n;let i=`${t.config.apiBaseUrl}${E.form[t.config.app][x.value]}`;return t.config.app==="konnect"?i=i.replace(/{controlPlaneId}/gi,((r=t.config)==null?void 0:r.controlPlaneId)||""):t.config.app==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(n=t.config)!=null&&n.workspace?`/${t.config.workspace}`:"")),i=i.replace(/{id}/gi,t.sniId),i}),b=e.computed(()=>{var i,r;return{name:s.fields.name,tags:(r=(i=s.fields.tags.split(","))==null?void 0:i.map(n=>String(n||"").trim()))==null?void 0:r.filter(n=>n!==""),certificate:{id:N.value||s.fields.certificate_id}}}),F=async()=>{var i,r,n,C,m,Y;try{s.isReadonly=!0;let u;await I.post(j.value,b.value),x.value==="create"?u=await I.post(M.value,b.value):x.value==="edit"&&(u=((i=t.config)==null?void 0:i.app)==="konnect"?await I.put(M.value,b.value):await I.patch(M.value,b.value)),s.fields.name=((r=u==null?void 0:u.data)==null?void 0:r.name)||"",s.fields.tags=((C=(n=u==null?void 0:u.data)==null?void 0:n.tags)==null?void 0:C.join(", "))||"",s.fields.certificate_id=((Y=(m=u==null?void 0:u.data)==null?void 0:m.certificate)==null?void 0:Y.id)||"",Object.assign(_,s.fields),g("update",u==null?void 0:u.data)}catch(u){s.errorMessage=D(u),g("error",u)}finally{s.isReadonly=!1}},{debouncedQueryChange:A,loading:L,allRecords:J,error:k,validationError:$,loadItems:w,results:q}=c.useDebouncedFilter(t.config,E.form[t.config.app].certificates),W=i=>{A(i)},Q=e.computed(()=>k.value?d("errors.certificates.fetch"):""),T=e.computed(()=>$.value?d("errors.certificates.invalid"):""),z=e.ref(0),P=e.computed(()=>J.value===void 0),o=e.ref(new Set),f=e.computed(()=>Array.from(o.value).map(r=>({label:r,value:r,selected:s.fields.certificate_id===r}))),p=i=>{o.value.clear();let r;for(r of i)o.value.add(r.id)};return e.watch(q,i=>{p(i)},{immediate:!0,deep:!0}),e.watch(f,()=>{z.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await w()}),(i,r)=>{const n=e.resolveComponent("KInput"),C=e.resolveComponent("KSelect");return e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(c.EntityBaseForm),{"can-submit":K.value,config:a.config,"edit-id":a.sniId,"entity-type":e.unref(c.SupportedEntityType).SNI,"error-message":s.errorMessage||Q.value,"fetch-url":R.value,"form-fields":b.value,"is-readonly":s.isReadonly,onCancel:U,"onFetch:error":r[3]||(r[3]=m=>i.$emit("error",m)),"onFetch:success":O,onLoading:r[4]||(r[4]=m=>i.$emit("loading",m)),onSubmit:F},{default:e.withCtx(()=>[e.createVNode(e.unref(c.EntityFormSection),{description:e.unref(d)("form.sections.general.description"),title:e.unref(d)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:s.fields.name,"onUpdate:modelValue":r[0]||(r[0]=m=>s.fields.name=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-name",label:e.unref(d)("form.fields.name.label"),placeholder:e.unref(d)("form.fields.name.placeholder"),readonly:s.isReadonly,required:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(n,{modelValue:s.fields.tags,"onUpdate:modelValue":r[1]||(r[1]=m=>s.fields.tags=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"sni-form-tags",help:e.unref(d)("form.fields.tags.help"),label:e.unref(d)("form.fields.tags.label"),"label-attributes":{info:e.unref(d)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("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(c.EntityFormSection),{description:e.unref(d)("form.sections.certificate.description"),"has-divider":"",title:e.unref(d)("form.sections.certificate.title")},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createBlock(n,{key:0,"data-testid":"sni-form-certificate-id",label:e.unref(d)("form.fields.certificate_id.label"),"model-value":N.value,readonly:"",required:"",width:"100%"},null,8,["label","model-value"])):(e.openBlock(),e.createBlock(C,{key:1,modelValue:s.fields.certificate_id,"onUpdate:modelValue":r[2]||(r[2]=m=>s.fields.certificate_id=m),clearable:"","data-testid":"sni-form-certificate-id","dropdown-footer-text":P.value?e.unref(d)("form.fields.certificate_id.footer"):void 0,"enable-filtering":"","filter-function":()=>!0,items:f.value,label:e.unref(d)("form.fields.certificate_id.label"),loading:e.unref(L),placeholder:e.unref(d)("form.fields.certificate_id.placeholder"),readonly:s.isReadonly,required:"",width:"100%",onQueryChange:W},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(d)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",se,e.toDisplayString(e.unref(d)("search.no_results")),1)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly"])),T.value?(e.openBlock(),e.createElementBlock("p",le,e.toDisplayString(T.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"]]);y.SniForm=ce,y.SniList=ne,Object.defineProperty(y,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-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{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-5945458b]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-5945458b]{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}
|
|
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-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{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-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .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-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{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-499e74da]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-499e74da]{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-70dc188c]{width:100%}.kong-ui-entities-snis-list .kong-ui-entity-filter-input[data-v-70dc188c]{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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SniList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SniList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SniList.vue"],"names":[],"mappings":"AAocA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAevC,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EACjB,MAAM,UAAU,CAAA;AASjB,OAAO,gDAAgD,CAAA;;IAwvBrD,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;IAxCjH,oHAAoH;;cAElG,QAAQ,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;;4BAErD,oBAAoB,GAAG,wBAAwB,KAAG,OAAO;;;;;;IAY/E,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,iHAAiH;;;;;;;;;;;;qBAtB9E,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAhD7E,wBA0DG"}
|
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.55",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-snis.umd.js",
|
|
6
6
|
"module": "./dist/entities-snis.es.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/
|
|
30
|
-
"@kong-ui-public/
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.10.14",
|
|
30
|
+
"@kong-ui-public/i18n": "^2.2.9"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "1.17.2",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.12",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/
|
|
40
|
-
"@kong-ui-public/
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.10.14",
|
|
40
|
+
"@kong-ui-public/i18n": "^2.2.9"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|