@kong-ui-public/entities-gateway-services 3.7.13 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-gateway-services.es.js +486 -471
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceList.vue.d.ts.map +1 -1
- package/dist/types/composables/useI18n.d.ts +8 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { AddIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Ve, ref as S, computed as w, watch as Ce, onBeforeMount as xe, resolveComponent as M, openBlock as k, createElementBlock as T, createVNode as u, unref as o, withCtx as p, createBlock as re, Teleport as Re, withDirectives as Ae, createTextVNode as U, toDisplayString as b, vShow as Fe, createElementVNode as V, withModifiers as ae, Fragment as $e, renderList as Be, reactive as Se, onMounted as De, renderSlot as Le, createCommentVNode as D } from "vue";
|
|
2
|
+
import { useRouter as Pe } from "vue-router";
|
|
3
|
+
import { AddIcon as Ge } from "@kong/icons";
|
|
4
|
+
import { createI18n as Ke, i18nTComponent as qe } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as Ue, useFetcher as Ne, useDeleteUrlBuilder as We, FetcherStatus as Oe, EntityBaseTable as je, EntityFilter as He, PermissionsWrapper as te, EntityToggleModal as Je, EntityDeleteModal as ze, EntityTypes as Qe, useErrors as Xe, useValidators as Ye, EntityBaseFormType as Te, useGatewayFeatureSupported as Ze, EntityBaseForm as et, SupportedEntityType as Ee, EntityFormSection as Ie, useHelpers as tt, ConfigurationSchemaSection as ne, ConfigurationSchemaType as lt, EntityBaseConfigCard as ot } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const it = {
|
|
7
7
|
create: "New Gateway Service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
9
9
|
copy_id: "Copy ID",
|
|
@@ -16,12 +16,12 @@ const lt = {
|
|
|
16
16
|
description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
|
|
17
17
|
menu_label: "Delete"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, st = {
|
|
20
20
|
placeholder: {
|
|
21
21
|
konnect: "Filter by name",
|
|
22
22
|
kongManager: "Filter by exact name or ID"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, rt = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -36,7 +36,9 @@ const lt = {
|
|
|
36
36
|
path: "Path",
|
|
37
37
|
enabled: "Enabled",
|
|
38
38
|
tags: "Tags",
|
|
39
|
-
id: "ID"
|
|
39
|
+
id: "ID",
|
|
40
|
+
created_at: "Created At",
|
|
41
|
+
updated_at: "Last Modified"
|
|
40
42
|
},
|
|
41
43
|
empty_state: {
|
|
42
44
|
title: "Configure a New Gateway Service",
|
|
@@ -162,39 +164,39 @@ const lt = {
|
|
|
162
164
|
}
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
|
-
},
|
|
167
|
+
}, at = {
|
|
166
168
|
general: "Gateway Services could not be retrieved",
|
|
167
169
|
delete: "The gateway service could not be deleted at this time.",
|
|
168
170
|
copy: "Failed to copy to clipboard",
|
|
169
171
|
urlErrorMessage: "Error: invalid URL"
|
|
170
|
-
},
|
|
172
|
+
}, nt = {
|
|
171
173
|
success: "Copied {val} to clipboard",
|
|
172
174
|
success_brief: "Successfully copied to clipboard"
|
|
173
|
-
},
|
|
175
|
+
}, ct = {
|
|
174
176
|
gateway_services: "gateway services"
|
|
175
|
-
},
|
|
176
|
-
actions:
|
|
177
|
-
search:
|
|
178
|
-
gateway_services:
|
|
179
|
-
errors:
|
|
180
|
-
copy:
|
|
181
|
-
glossary:
|
|
177
|
+
}, dt = {
|
|
178
|
+
actions: it,
|
|
179
|
+
search: st,
|
|
180
|
+
gateway_services: rt,
|
|
181
|
+
errors: at,
|
|
182
|
+
copy: nt,
|
|
183
|
+
glossary: ct
|
|
182
184
|
};
|
|
183
|
-
function
|
|
184
|
-
const a =
|
|
185
|
+
function ut() {
|
|
186
|
+
const a = Ke("en-us", dt);
|
|
185
187
|
return {
|
|
186
188
|
i18n: a,
|
|
187
|
-
i18nT:
|
|
189
|
+
i18nT: qe(a)
|
|
188
190
|
// Translation component <i18n-t>
|
|
189
191
|
};
|
|
190
192
|
}
|
|
191
|
-
function
|
|
193
|
+
function ft() {
|
|
192
194
|
return {
|
|
193
|
-
getPortFromProtocol: (
|
|
194
|
-
const c = [80, 443], r = Number(
|
|
195
|
+
getPortFromProtocol: ($, v) => {
|
|
196
|
+
const c = [80, 443], r = Number(v);
|
|
195
197
|
if ((r || r === 0) && !c.includes(r))
|
|
196
198
|
return r;
|
|
197
|
-
switch (
|
|
199
|
+
switch ($) {
|
|
198
200
|
case "grpcs":
|
|
199
201
|
case "tls":
|
|
200
202
|
case "https":
|
|
@@ -210,31 +212,31 @@ function dt() {
|
|
|
210
212
|
}
|
|
211
213
|
};
|
|
212
214
|
}
|
|
213
|
-
const
|
|
214
|
-
useI18n:
|
|
215
|
-
usePortFromProtocol:
|
|
216
|
-
},
|
|
215
|
+
const ue = {
|
|
216
|
+
useI18n: ut,
|
|
217
|
+
usePortFromProtocol: ft
|
|
218
|
+
}, ce = "/v2/control-planes/{controlPlaneId}/core-entities", de = "/{workspace}", le = {
|
|
217
219
|
list: {
|
|
218
220
|
konnect: {
|
|
219
|
-
all: `${
|
|
221
|
+
all: `${ce}/services`
|
|
220
222
|
},
|
|
221
223
|
kongManager: {
|
|
222
|
-
all: `${
|
|
224
|
+
all: `${de}/services`
|
|
223
225
|
}
|
|
224
226
|
},
|
|
225
227
|
form: {
|
|
226
228
|
konnect: {
|
|
227
|
-
create: `${
|
|
228
|
-
validate: `${
|
|
229
|
-
edit: `${
|
|
229
|
+
create: `${ce}/services`,
|
|
230
|
+
validate: `${ce}/v1/schemas/json/service/validate`,
|
|
231
|
+
edit: `${ce}/services/{id}`
|
|
230
232
|
},
|
|
231
233
|
kongManager: {
|
|
232
|
-
create: `${
|
|
233
|
-
validate: `${
|
|
234
|
-
edit: `${
|
|
234
|
+
create: `${de}/services`,
|
|
235
|
+
validate: `${de}/schemas/services/validate`,
|
|
236
|
+
edit: `${de}/services/{id}`
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
|
-
},
|
|
239
|
+
}, pt = { class: "kong-ui-entities-gateway-services-list" }, mt = { key: 1 }, vt = { key: 1 }, yt = /* @__PURE__ */ Ve({
|
|
238
240
|
__name: "GatewayServiceList",
|
|
239
241
|
props: {
|
|
240
242
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -284,9 +286,9 @@ const me = {
|
|
|
284
286
|
}
|
|
285
287
|
},
|
|
286
288
|
emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
287
|
-
setup(a, { emit:
|
|
288
|
-
var
|
|
289
|
-
const
|
|
289
|
+
setup(a, { emit: $ }) {
|
|
290
|
+
var g;
|
|
291
|
+
const v = $, c = a, { i18n: { t: r, formatUnixTimeStamp: x } } = ue.useI18n(), W = Pe(), { axiosInstance: L } = Ue((g = c.config) == null ? void 0 : g.axiosRequestConfig), s = S(1), P = w(() => c.config.app !== "kongManager" || !!c.config.disableSorting), h = {
|
|
290
292
|
// the Name column is non-hidable
|
|
291
293
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
292
294
|
...c.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -295,306 +297,319 @@ const me = {
|
|
|
295
297
|
port: { label: r("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
296
298
|
path: { label: r("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
297
299
|
enabled: { label: r("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
298
|
-
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
300
|
+
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
301
|
+
updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
302
|
+
created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
303
|
+
}, fe = {
|
|
304
|
+
columnVisibility: {
|
|
305
|
+
created_at: !1
|
|
306
|
+
}
|
|
307
|
+
}, pe = h, F = w(() => {
|
|
308
|
+
var f, m;
|
|
309
|
+
let n = `${c.config.apiBaseUrl}${le.list[c.config.app].all}`;
|
|
310
|
+
return c.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((f = c.config) == null ? void 0 : f.controlPlaneId) || "") : c.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (m = c.config) != null && m.workspace ? `/${c.config.workspace}` : "")), n;
|
|
311
|
+
}), me = w(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${F.value}`) : new URL(F.value)), B = S(""), C = w(() => {
|
|
312
|
+
const n = c.config.app === "konnect" || c.config.isExactMatch;
|
|
313
|
+
if (n)
|
|
306
314
|
return {
|
|
307
|
-
isExactMatch:
|
|
315
|
+
isExactMatch: n,
|
|
308
316
|
placeholder: r(`search.placeholder.${c.config.app}`)
|
|
309
317
|
};
|
|
310
|
-
const { name:
|
|
318
|
+
const { name: f, enabled: m, protocol: l, host: A, port: d, path: N } = h;
|
|
311
319
|
return {
|
|
312
|
-
isExactMatch:
|
|
313
|
-
fields: { name:
|
|
320
|
+
isExactMatch: n,
|
|
321
|
+
fields: { name: f, enabled: m, protocol: l, host: A, port: d, path: N },
|
|
314
322
|
schema: c.config.filterSchema
|
|
315
323
|
};
|
|
316
|
-
}), { fetcher:
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
},
|
|
324
|
+
}), { fetcher: H, fetcherState: J } = Ne(c.config, F.value), ve = () => {
|
|
325
|
+
B.value = "";
|
|
326
|
+
}, e = () => {
|
|
327
|
+
s.value++;
|
|
328
|
+
}, _ = S(null), ye = w(() => ({
|
|
321
329
|
ctaPath: c.config.createRoute,
|
|
322
|
-
ctaText:
|
|
330
|
+
ctaText: i.value ? c.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
|
|
323
331
|
message: `${r("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
324
|
-
title:
|
|
325
|
-
})),
|
|
326
|
-
const
|
|
332
|
+
title: i.value ? c.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
333
|
+
})), z = S(!1), I = S(null), Q = w(() => {
|
|
334
|
+
const n = {
|
|
327
335
|
action: "disable",
|
|
328
336
|
id: "",
|
|
329
337
|
name: ""
|
|
330
338
|
};
|
|
331
|
-
if (
|
|
332
|
-
const { enabled:
|
|
333
|
-
|
|
339
|
+
if (I.value) {
|
|
340
|
+
const { enabled: f, id: m, name: l } = I.value;
|
|
341
|
+
n.action = f ? "disable" : "enable", n.id = m, n.name = l || m;
|
|
334
342
|
}
|
|
335
|
-
return
|
|
336
|
-
}),
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
},
|
|
341
|
-
var
|
|
342
|
-
if (!await ((
|
|
343
|
+
return n;
|
|
344
|
+
}), G = (n) => {
|
|
345
|
+
z.value = !0, I.value = n;
|
|
346
|
+
}, X = () => {
|
|
347
|
+
z.value = !1, I.value = null;
|
|
348
|
+
}, oe = async () => {
|
|
349
|
+
var l, A;
|
|
350
|
+
if (!await ((l = c.canEdit) == null ? void 0 : l.call(c, I.value)) || !I.value)
|
|
343
351
|
return;
|
|
344
|
-
const
|
|
352
|
+
const f = `${me.value.href}/${I.value.id}`, m = !I.value.enabled;
|
|
345
353
|
try {
|
|
346
|
-
const { data:
|
|
347
|
-
|
|
348
|
-
} catch (
|
|
349
|
-
|
|
354
|
+
const { data: d } = ((A = c.config) == null ? void 0 : A.app) === "konnect" ? await L.put(f, { ...I.value, enabled: m }) : await L.patch(f, { ...I.value, enabled: m });
|
|
355
|
+
v("toggle:success", d);
|
|
356
|
+
} catch (d) {
|
|
357
|
+
v("error", d);
|
|
350
358
|
}
|
|
351
|
-
|
|
352
|
-
},
|
|
353
|
-
c.config.getControlPlaneRoute &&
|
|
354
|
-
},
|
|
355
|
-
const m =
|
|
356
|
-
if (!
|
|
357
|
-
|
|
358
|
-
entity:
|
|
359
|
+
I.value.enabled = m;
|
|
360
|
+
}, ie = (n) => {
|
|
361
|
+
c.config.getControlPlaneRoute && W.push(c.config.getControlPlaneRoute(n));
|
|
362
|
+
}, ge = (n, f) => {
|
|
363
|
+
const m = n.id;
|
|
364
|
+
if (!f(m)) {
|
|
365
|
+
v("copy:error", {
|
|
366
|
+
entity: n,
|
|
359
367
|
field: "id",
|
|
360
368
|
message: r("errors.copy")
|
|
361
369
|
});
|
|
362
370
|
return;
|
|
363
371
|
}
|
|
364
|
-
|
|
365
|
-
entity:
|
|
372
|
+
v("copy:success", {
|
|
373
|
+
entity: n,
|
|
366
374
|
field: "id",
|
|
367
375
|
message: r("copy.success", { val: m })
|
|
368
376
|
});
|
|
369
|
-
},
|
|
370
|
-
const m = JSON.stringify(
|
|
371
|
-
if (!
|
|
372
|
-
|
|
373
|
-
entity:
|
|
377
|
+
}, _e = (n, f) => {
|
|
378
|
+
const m = JSON.stringify(n);
|
|
379
|
+
if (!f(m)) {
|
|
380
|
+
v("copy:error", {
|
|
381
|
+
entity: n,
|
|
374
382
|
message: r("errors.copy")
|
|
375
383
|
});
|
|
376
384
|
return;
|
|
377
385
|
}
|
|
378
|
-
|
|
379
|
-
entity:
|
|
386
|
+
v("copy:success", {
|
|
387
|
+
entity: n,
|
|
380
388
|
message: r("copy.success_brief")
|
|
381
389
|
});
|
|
382
|
-
},
|
|
390
|
+
}, be = async (n) => {
|
|
383
391
|
var m;
|
|
384
|
-
await ((m = c.canRetrieve) == null ? void 0 : m.call(c,
|
|
385
|
-
},
|
|
392
|
+
await ((m = c.canRetrieve) == null ? void 0 : m.call(c, n)) && W.push(c.config.getViewRoute(n.id));
|
|
393
|
+
}, he = (n) => ({
|
|
386
394
|
label: r("actions.view"),
|
|
387
|
-
to: c.config.getViewRoute(
|
|
388
|
-
}),
|
|
395
|
+
to: c.config.getViewRoute(n)
|
|
396
|
+
}), Y = (n) => ({
|
|
389
397
|
label: r("actions.edit"),
|
|
390
|
-
to: c.config.getEditRoute(
|
|
391
|
-
}),
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
|
|
395
|
-
},
|
|
396
|
-
var
|
|
397
|
-
if ((
|
|
398
|
-
|
|
398
|
+
to: c.config.getEditRoute(n)
|
|
399
|
+
}), R = S(void 0), O = S(!1), Z = S(!1), K = S(""), we = We(c.config, F.value), q = (n) => {
|
|
400
|
+
R.value = n, O.value = !0, K.value = "";
|
|
401
|
+
}, j = () => {
|
|
402
|
+
O.value = !1, R.value = void 0;
|
|
403
|
+
}, se = async () => {
|
|
404
|
+
var n, f, m;
|
|
405
|
+
if ((n = R.value) != null && n.id) {
|
|
406
|
+
Z.value = !0;
|
|
399
407
|
try {
|
|
400
|
-
await
|
|
401
|
-
} catch (
|
|
402
|
-
|
|
408
|
+
await L.delete(we(R.value.id)), v("delete:success", R.value), j(), s.value++;
|
|
409
|
+
} catch (l) {
|
|
410
|
+
K.value = ((m = (f = l.response) == null ? void 0 : f.data) == null ? void 0 : m.message) || l.message || r("errors.delete"), v("error", l);
|
|
403
411
|
} finally {
|
|
404
|
-
|
|
412
|
+
Z.value = !1;
|
|
405
413
|
}
|
|
406
414
|
}
|
|
407
|
-
},
|
|
408
|
-
|
|
409
|
-
var
|
|
410
|
-
if (Array.isArray((
|
|
411
|
-
|
|
415
|
+
}, t = S(!1);
|
|
416
|
+
Ce(J, (n) => {
|
|
417
|
+
var f, m, l, A;
|
|
418
|
+
if (Array.isArray((f = n == null ? void 0 : n.response) == null ? void 0 : f.data) && (t.value = n.response.data.length > 0), n.status === Oe.Error) {
|
|
419
|
+
_.value = {
|
|
412
420
|
title: r("errors.general")
|
|
413
|
-
}, (
|
|
421
|
+
}, (A = (l = (m = n.error) == null ? void 0 : m.response) == null ? void 0 : l.data) != null && A.message && (_.value.message = n.error.response.data.message), v("error", n.error);
|
|
414
422
|
return;
|
|
415
423
|
}
|
|
416
|
-
|
|
424
|
+
_.value = null;
|
|
417
425
|
});
|
|
418
|
-
const
|
|
419
|
-
return
|
|
420
|
-
|
|
421
|
-
}), (
|
|
422
|
-
const m =
|
|
423
|
-
return
|
|
424
|
-
|
|
426
|
+
const i = S(!1);
|
|
427
|
+
return xe(async () => {
|
|
428
|
+
i.value = await c.canCreate();
|
|
429
|
+
}), (n, f) => {
|
|
430
|
+
const m = M("KButton"), l = M("KBadge"), A = M("KInputSwitch"), d = M("KTruncate"), N = M("KDropdownItem"), ke = M("KClipboardProvider");
|
|
431
|
+
return k(), T("div", pt, [
|
|
432
|
+
u(o(je), {
|
|
425
433
|
"cache-identifier": a.cacheIdentifier,
|
|
434
|
+
"default-table-preferences": fe,
|
|
426
435
|
"disable-pagination-page-jump": "",
|
|
427
|
-
"disable-sorting":
|
|
428
|
-
"empty-state-options":
|
|
436
|
+
"disable-sorting": P.value,
|
|
437
|
+
"empty-state-options": ye.value,
|
|
429
438
|
"enable-entity-actions": "",
|
|
430
|
-
"error-message":
|
|
431
|
-
fetcher: o(
|
|
432
|
-
"fetcher-cache-key":
|
|
439
|
+
"error-message": _.value,
|
|
440
|
+
fetcher: o(H),
|
|
441
|
+
"fetcher-cache-key": s.value,
|
|
433
442
|
"pagination-type": "offset",
|
|
434
443
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
435
|
-
query:
|
|
436
|
-
"table-headers": o(
|
|
437
|
-
onClearSearchInput:
|
|
438
|
-
"onClick:row":
|
|
439
|
-
onSort:
|
|
444
|
+
query: B.value,
|
|
445
|
+
"table-headers": o(pe),
|
|
446
|
+
onClearSearchInput: ve,
|
|
447
|
+
"onClick:row": f[3] || (f[3] = (y) => be(y)),
|
|
448
|
+
onSort: e
|
|
440
449
|
}, {
|
|
441
|
-
"toolbar-filter":
|
|
442
|
-
|
|
443
|
-
modelValue:
|
|
444
|
-
"onUpdate:modelValue":
|
|
445
|
-
config:
|
|
450
|
+
"toolbar-filter": p(() => [
|
|
451
|
+
u(o(He), {
|
|
452
|
+
modelValue: B.value,
|
|
453
|
+
"onUpdate:modelValue": f[0] || (f[0] = (y) => B.value = y),
|
|
454
|
+
config: C.value
|
|
446
455
|
}, null, 8, ["modelValue", "config"])
|
|
447
456
|
]),
|
|
448
|
-
"toolbar-button":
|
|
449
|
-
(
|
|
457
|
+
"toolbar-button": p(() => [
|
|
458
|
+
(k(), re(Re, {
|
|
450
459
|
disabled: !a.useActionOutside,
|
|
451
460
|
to: "#kong-ui-app-page-header-action-button"
|
|
452
461
|
}, [
|
|
453
|
-
|
|
462
|
+
u(o(te), {
|
|
454
463
|
"auth-function": () => a.canCreate()
|
|
455
464
|
}, {
|
|
456
|
-
default:
|
|
457
|
-
|
|
465
|
+
default: p(() => [
|
|
466
|
+
Ae(u(m, {
|
|
458
467
|
appearance: "primary",
|
|
459
468
|
"data-testid": "toolbar-add-gateway-service",
|
|
460
469
|
size: a.useActionOutside ? "medium" : "large",
|
|
461
470
|
to: a.config.createRoute
|
|
462
471
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
|
|
465
|
-
|
|
472
|
+
default: p(() => [
|
|
473
|
+
u(o(Ge)),
|
|
474
|
+
U(" " + b(o(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
466
475
|
]),
|
|
467
476
|
_: 1
|
|
468
477
|
}, 8, ["size", "to"]), [
|
|
469
|
-
[
|
|
478
|
+
[Fe, t.value]
|
|
470
479
|
])
|
|
471
480
|
]),
|
|
472
481
|
_: 1
|
|
473
482
|
}, 8, ["auth-function"])
|
|
474
483
|
], 8, ["disabled"]))
|
|
475
484
|
]),
|
|
476
|
-
name:
|
|
477
|
-
V("b", null, b(
|
|
485
|
+
name: p(({ rowValue: y }) => [
|
|
486
|
+
V("b", null, b(y ?? "-"), 1)
|
|
478
487
|
]),
|
|
479
|
-
control_plane:
|
|
480
|
-
var
|
|
488
|
+
control_plane: p(({ row: y }) => {
|
|
489
|
+
var E;
|
|
481
490
|
return [
|
|
482
|
-
(
|
|
491
|
+
(E = y.x_meta) != null && E.cluster_id ? (k(), re(l, {
|
|
483
492
|
key: 0,
|
|
484
|
-
tooltip:
|
|
493
|
+
tooltip: y.x_meta.cluster_id,
|
|
485
494
|
"truncation-tooltip": "",
|
|
486
|
-
onClick:
|
|
495
|
+
onClick: ae((ee) => ie(y.x_meta.cluster_id), ["stop"])
|
|
487
496
|
}, {
|
|
488
|
-
default:
|
|
489
|
-
|
|
497
|
+
default: p(() => [
|
|
498
|
+
U(b(y.x_meta.cluster_id), 1)
|
|
490
499
|
]),
|
|
491
500
|
_: 2
|
|
492
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
501
|
+
}, 1032, ["tooltip", "onClick"])) : (k(), T("b", mt, "-"))
|
|
493
502
|
];
|
|
494
503
|
}),
|
|
495
|
-
enabled:
|
|
496
|
-
|
|
497
|
-
"auth-function": () => a.canEdit(
|
|
504
|
+
enabled: p(({ row: y }) => [
|
|
505
|
+
u(o(te), {
|
|
506
|
+
"auth-function": () => a.canEdit(y),
|
|
498
507
|
"force-show": ""
|
|
499
508
|
}, {
|
|
500
|
-
default:
|
|
509
|
+
default: p(({ isAllowed: E }) => [
|
|
501
510
|
V("div", {
|
|
502
|
-
onClick:
|
|
511
|
+
onClick: f[1] || (f[1] = ae(() => {
|
|
503
512
|
}, ["stop"]))
|
|
504
513
|
}, [
|
|
505
|
-
|
|
506
|
-
modelValue:
|
|
507
|
-
"onUpdate:modelValue": (ee) =>
|
|
508
|
-
"data-testid": `row-${
|
|
509
|
-
disabled: !
|
|
510
|
-
onClick:
|
|
514
|
+
u(A, {
|
|
515
|
+
modelValue: y.enabled,
|
|
516
|
+
"onUpdate:modelValue": (ee) => y.enabled = ee,
|
|
517
|
+
"data-testid": `row-${y.id}-toggle-input`,
|
|
518
|
+
disabled: !E,
|
|
519
|
+
onClick: ae((ee) => G(y), ["prevent"])
|
|
511
520
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
512
521
|
])
|
|
513
522
|
]),
|
|
514
523
|
_: 2
|
|
515
524
|
}, 1032, ["auth-function"])
|
|
516
525
|
]),
|
|
517
|
-
tags:
|
|
518
|
-
(
|
|
519
|
-
default:
|
|
520
|
-
(
|
|
521
|
-
key:
|
|
522
|
-
onClick:
|
|
526
|
+
tags: p(({ rowValue: y }) => [
|
|
527
|
+
(y == null ? void 0 : y.length) > 0 ? (k(), re(d, { key: 0 }, {
|
|
528
|
+
default: p(() => [
|
|
529
|
+
(k(!0), T($e, null, Be(y, (E) => (k(), re(l, {
|
|
530
|
+
key: E,
|
|
531
|
+
onClick: f[2] || (f[2] = ae(() => {
|
|
523
532
|
}, ["stop"]))
|
|
524
533
|
}, {
|
|
525
|
-
default:
|
|
526
|
-
|
|
534
|
+
default: p(() => [
|
|
535
|
+
U(b(E), 1)
|
|
527
536
|
]),
|
|
528
537
|
_: 2
|
|
529
538
|
}, 1024))), 128))
|
|
530
539
|
]),
|
|
531
540
|
_: 2
|
|
532
|
-
}, 1024)) : (
|
|
541
|
+
}, 1024)) : (k(), T("span", vt, "-"))
|
|
533
542
|
]),
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
543
|
+
created_at: p(({ rowValue: y }) => [
|
|
544
|
+
U(b(o(x)(y)), 1)
|
|
545
|
+
]),
|
|
546
|
+
updated_at: p(({ rowValue: y }) => [
|
|
547
|
+
U(b(o(x)(y)), 1)
|
|
548
|
+
]),
|
|
549
|
+
actions: p(({ row: y }) => [
|
|
550
|
+
u(ke, null, {
|
|
551
|
+
default: p(({ copyToClipboard: E }) => [
|
|
552
|
+
u(N, {
|
|
538
553
|
"data-testid": "action-entity-copy-id",
|
|
539
|
-
onClick: (ee) =>
|
|
554
|
+
onClick: (ee) => ge(y, E)
|
|
540
555
|
}, {
|
|
541
|
-
default:
|
|
542
|
-
|
|
556
|
+
default: p(() => [
|
|
557
|
+
U(b(o(r)("actions.copy_id")), 1)
|
|
543
558
|
]),
|
|
544
559
|
_: 2
|
|
545
560
|
}, 1032, ["onClick"])
|
|
546
561
|
]),
|
|
547
562
|
_: 2
|
|
548
563
|
}, 1024),
|
|
549
|
-
|
|
550
|
-
default:
|
|
551
|
-
|
|
564
|
+
u(ke, null, {
|
|
565
|
+
default: p(({ copyToClipboard: E }) => [
|
|
566
|
+
u(N, {
|
|
552
567
|
"data-testid": "action-entity-copy-json",
|
|
553
|
-
onClick: (ee) =>
|
|
568
|
+
onClick: (ee) => _e(y, E)
|
|
554
569
|
}, {
|
|
555
|
-
default:
|
|
556
|
-
|
|
570
|
+
default: p(() => [
|
|
571
|
+
U(b(o(r)("actions.copy_json")), 1)
|
|
557
572
|
]),
|
|
558
573
|
_: 2
|
|
559
574
|
}, 1032, ["onClick"])
|
|
560
575
|
]),
|
|
561
576
|
_: 2
|
|
562
577
|
}, 1024),
|
|
563
|
-
|
|
564
|
-
"auth-function": () => a.canRetrieve(
|
|
578
|
+
u(o(te), {
|
|
579
|
+
"auth-function": () => a.canRetrieve(y)
|
|
565
580
|
}, {
|
|
566
|
-
default:
|
|
567
|
-
|
|
581
|
+
default: p(() => [
|
|
582
|
+
u(N, {
|
|
568
583
|
"data-testid": "action-entity-view",
|
|
569
584
|
"has-divider": "",
|
|
570
|
-
item:
|
|
585
|
+
item: he(y.id)
|
|
571
586
|
}, null, 8, ["item"])
|
|
572
587
|
]),
|
|
573
588
|
_: 2
|
|
574
589
|
}, 1032, ["auth-function"]),
|
|
575
|
-
|
|
576
|
-
"auth-function": () => a.canEdit(
|
|
590
|
+
u(o(te), {
|
|
591
|
+
"auth-function": () => a.canEdit(y)
|
|
577
592
|
}, {
|
|
578
|
-
default:
|
|
579
|
-
|
|
593
|
+
default: p(() => [
|
|
594
|
+
u(N, {
|
|
580
595
|
"data-testid": "action-entity-edit",
|
|
581
|
-
item:
|
|
596
|
+
item: Y(y.id)
|
|
582
597
|
}, null, 8, ["item"])
|
|
583
598
|
]),
|
|
584
599
|
_: 2
|
|
585
600
|
}, 1032, ["auth-function"]),
|
|
586
|
-
|
|
587
|
-
"auth-function": () => a.canDelete(
|
|
601
|
+
u(o(te), {
|
|
602
|
+
"auth-function": () => a.canDelete(y)
|
|
588
603
|
}, {
|
|
589
|
-
default:
|
|
590
|
-
|
|
604
|
+
default: p(() => [
|
|
605
|
+
u(N, {
|
|
591
606
|
danger: "",
|
|
592
607
|
"data-testid": "action-entity-delete",
|
|
593
608
|
"has-divider": "",
|
|
594
|
-
onClick: (
|
|
609
|
+
onClick: (E) => q(y)
|
|
595
610
|
}, {
|
|
596
|
-
default:
|
|
597
|
-
|
|
611
|
+
default: p(() => [
|
|
612
|
+
U(b(o(r)("actions.delete.menu_label")), 1)
|
|
598
613
|
]),
|
|
599
614
|
_: 2
|
|
600
615
|
}, 1032, ["onClick"])
|
|
@@ -604,57 +619,57 @@ const me = {
|
|
|
604
619
|
]),
|
|
605
620
|
_: 1
|
|
606
621
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
607
|
-
|
|
608
|
-
action:
|
|
609
|
-
"entity-id":
|
|
610
|
-
"entity-name":
|
|
622
|
+
u(o(Je), {
|
|
623
|
+
action: Q.value.action,
|
|
624
|
+
"entity-id": Q.value.id,
|
|
625
|
+
"entity-name": Q.value.name,
|
|
611
626
|
"entity-type": o(r)("glossary.gateway_services"),
|
|
612
|
-
"on-confirm":
|
|
613
|
-
visible:
|
|
614
|
-
onCancel:
|
|
615
|
-
onProceed:
|
|
627
|
+
"on-confirm": oe,
|
|
628
|
+
visible: z.value,
|
|
629
|
+
onCancel: X,
|
|
630
|
+
onProceed: X
|
|
616
631
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
617
|
-
|
|
618
|
-
"action-pending":
|
|
632
|
+
u(o(ze), {
|
|
633
|
+
"action-pending": Z.value,
|
|
619
634
|
description: o(r)("actions.delete.description"),
|
|
620
|
-
"entity-name":
|
|
621
|
-
"entity-type": o(
|
|
622
|
-
error:
|
|
635
|
+
"entity-name": R.value && (R.value.name || R.value.id),
|
|
636
|
+
"entity-type": o(Qe).GatewayService,
|
|
637
|
+
error: K.value,
|
|
623
638
|
title: o(r)("actions.delete.title"),
|
|
624
|
-
visible:
|
|
625
|
-
onCancel:
|
|
626
|
-
onProceed:
|
|
639
|
+
visible: O.value,
|
|
640
|
+
onCancel: j,
|
|
641
|
+
onProceed: se
|
|
627
642
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
628
643
|
]);
|
|
629
644
|
};
|
|
630
645
|
}
|
|
631
|
-
}),
|
|
632
|
-
const
|
|
633
|
-
for (const [c, r] of
|
|
634
|
-
|
|
635
|
-
return
|
|
636
|
-
},
|
|
646
|
+
}), Me = (a, $) => {
|
|
647
|
+
const v = a.__vccOpts || a;
|
|
648
|
+
for (const [c, r] of $)
|
|
649
|
+
v[c] = r;
|
|
650
|
+
return v;
|
|
651
|
+
}, Kt = /* @__PURE__ */ Me(yt, [["__scopeId", "data-v-822e59d7"]]), gt = { class: "kong-ui-entities-gateway-service-form" }, _t = { key: 0 }, bt = { class: "gateway-service-form-traffic-label" }, ht = { class: "gateway-service-form-margin-bottom" }, wt = {
|
|
637
652
|
key: 0,
|
|
638
653
|
class: "gateway-service-form-group-fields"
|
|
639
|
-
},
|
|
654
|
+
}, kt = {
|
|
640
655
|
key: 1,
|
|
641
656
|
class: "gateway-service-form-group-fields"
|
|
642
|
-
},
|
|
657
|
+
}, Ct = { key: 0 }, Vt = { class: "gateway-service-form-margin-top" }, St = { class: "gateway-service-form-margin-bottom" }, Tt = { class: "gateway-service-form-margin-bottom" }, It = { class: "gateway-service-form-margin-bottom" }, Pt = { class: "gateway-service-form-margin-bottom" }, Ut = {
|
|
643
658
|
key: 0,
|
|
644
659
|
class: "gateway-service-form-margin-bottom"
|
|
645
|
-
},
|
|
660
|
+
}, Et = {
|
|
646
661
|
key: 1,
|
|
647
662
|
class: "gateway-service-form-margin-bottom"
|
|
648
|
-
},
|
|
663
|
+
}, Mt = {
|
|
649
664
|
key: 2,
|
|
650
665
|
class: "gateway-service-form-margin-bottom"
|
|
651
|
-
},
|
|
666
|
+
}, xt = {
|
|
652
667
|
key: 0,
|
|
653
668
|
class: "checkbox-aligned-radio"
|
|
654
|
-
},
|
|
669
|
+
}, Rt = {
|
|
655
670
|
key: 1,
|
|
656
671
|
class: "checkbox-aligned-radio"
|
|
657
|
-
},
|
|
672
|
+
}, At = /* @__PURE__ */ Ve({
|
|
658
673
|
__name: "GatewayServiceForm",
|
|
659
674
|
props: {
|
|
660
675
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -685,9 +700,9 @@ const me = {
|
|
|
685
700
|
}
|
|
686
701
|
},
|
|
687
702
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
688
|
-
setup(a, { expose:
|
|
689
|
-
var
|
|
690
|
-
const c =
|
|
703
|
+
setup(a, { expose: $, emit: v }) {
|
|
704
|
+
var se;
|
|
705
|
+
const c = v, r = a, x = S(!0), W = Pe(), { i18nT: L, i18n: { t: s } } = ue.useI18n(), { getMessageFromError: P } = Xe(), { axiosInstance: h } = Ue((se = r.config) == null ? void 0 : se.axiosRequestConfig), fe = Ye(), pe = w(() => le.form[r.config.app].edit), F = w(() => r.gatewayServiceId ? Te.Edit : Te.Create), me = S(!1), B = w(() => !!r.gatewayServiceId), C = S(B.value ? "protocol" : "url"), H = ue.usePortFromProtocol(), J = S(""), ve = w(() => !!J.value), e = Se({
|
|
691
706
|
fields: {
|
|
692
707
|
name: "",
|
|
693
708
|
protocol: "http",
|
|
@@ -707,7 +722,7 @@ const me = {
|
|
|
707
722
|
},
|
|
708
723
|
isReadonly: !1,
|
|
709
724
|
errorMessage: ""
|
|
710
|
-
}), _ =
|
|
725
|
+
}), _ = Se({
|
|
711
726
|
name: "",
|
|
712
727
|
protocol: "http",
|
|
713
728
|
host: "",
|
|
@@ -723,13 +738,13 @@ const me = {
|
|
|
723
738
|
tls_verify_enabled: !1,
|
|
724
739
|
tls_verify_value: !1,
|
|
725
740
|
tags: ""
|
|
726
|
-
}),
|
|
741
|
+
}), ye = r.config.app === "konnect" || Ze({
|
|
727
742
|
gatewayInfo: r.config.gatewayInfo,
|
|
728
743
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
729
744
|
supportedRange: {
|
|
730
745
|
enterprise: ["3.0"]
|
|
731
746
|
}
|
|
732
|
-
}),
|
|
747
|
+
}), z = [
|
|
733
748
|
{
|
|
734
749
|
label: s("gateway_services.form.fields.protocol.options.http"),
|
|
735
750
|
value: "http",
|
|
@@ -765,7 +780,7 @@ const me = {
|
|
|
765
780
|
value: "grpcs",
|
|
766
781
|
group: "grpc"
|
|
767
782
|
},
|
|
768
|
-
...
|
|
783
|
+
...ye ? [
|
|
769
784
|
{
|
|
770
785
|
label: s("gateway_services.form.fields.protocol.options.ws"),
|
|
771
786
|
value: "ws",
|
|
@@ -782,60 +797,60 @@ const me = {
|
|
|
782
797
|
value: "udp",
|
|
783
798
|
group: "udp"
|
|
784
799
|
}
|
|
785
|
-
],
|
|
786
|
-
|
|
787
|
-
},
|
|
788
|
-
|
|
789
|
-
},
|
|
800
|
+
], I = { url: "url", protocol: "protocol" }, Q = (t, i) => {
|
|
801
|
+
i.value;
|
|
802
|
+
}, G = (t) => t ? parseFloat(t) : 0, X = () => {
|
|
803
|
+
x.value = !0, e.errorMessage = "", e.fields.host = _.host, e.fields.path = _.path, e.fields.port = _.port, e.fields.protocol = _.protocol, e.fields.url = _.url, e.fields.retries = _.retries, e.fields.connect_timeout = _.connect_timeout, e.fields.write_timeout = _.write_timeout, e.fields.read_timeout = _.read_timeout, e.fields.client_certificate = _.client_certificate, e.fields.ca_certificates = _.ca_certificates, e.fields.tls_verify_enabled = _.tls_verify_enabled, e.fields.tls_verify_value = _.tls_verify_value;
|
|
804
|
+
}, oe = () => {
|
|
790
805
|
if (e.fields.url && C.value === "url")
|
|
791
806
|
try {
|
|
792
807
|
const t = new URL(e.fields.url);
|
|
793
808
|
e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
|
|
794
|
-
const
|
|
795
|
-
|
|
809
|
+
const i = Number(t.port);
|
|
810
|
+
me.value = !!i, e.fields.port = i || H.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", c("url-valid:success");
|
|
796
811
|
} catch (t) {
|
|
797
|
-
e.errorMessage = s("errors.urlErrorMessage"), c("url-valid:error",
|
|
812
|
+
e.errorMessage = s("errors.urlErrorMessage"), c("url-valid:error", P(t));
|
|
798
813
|
}
|
|
799
814
|
else
|
|
800
815
|
c("url-valid:success"), e.errorMessage = "";
|
|
801
|
-
},
|
|
816
|
+
}, ie = w(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), ge = w(() => {
|
|
802
817
|
if (C.value === "url")
|
|
803
818
|
return !0;
|
|
804
819
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
805
820
|
return C.value === "protocol" && t;
|
|
806
|
-
}), _e =
|
|
821
|
+
}), _e = w(() => {
|
|
807
822
|
if (C.value === "url")
|
|
808
823
|
return !0;
|
|
809
824
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
810
825
|
return C.value === "protocol" && t;
|
|
811
|
-
}), be =
|
|
826
|
+
}), be = w(() => {
|
|
812
827
|
if (C.value === "url")
|
|
813
828
|
return !0;
|
|
814
829
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
815
830
|
return C.value === "protocol" && t;
|
|
816
|
-
}),
|
|
817
|
-
|
|
818
|
-
},
|
|
819
|
-
var
|
|
820
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((
|
|
821
|
-
},
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
var
|
|
831
|
+
}), he = (t) => {
|
|
832
|
+
J.value = fe.utf8Name(t);
|
|
833
|
+
}, Y = w(() => B.value && JSON.stringify(e.fields) !== JSON.stringify(_) || C.value === "url" && !!e.fields.url || C.value === "protocol" && !!e.fields.host), R = (t) => {
|
|
834
|
+
var i, g, n;
|
|
835
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((i = t == null ? void 0 : t.tags) == null ? void 0 : i.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((g = t == null ? void 0 : t.ca_certificates) == null ? void 0 : g.join(",")) || "", e.fields.client_certificate = ((n = t == null ? void 0 : t.client_certificate) == null ? void 0 : n.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, Object.assign(_, e.fields);
|
|
836
|
+
}, O = () => {
|
|
837
|
+
W.push(r.config.cancelRoute);
|
|
838
|
+
}, Z = w(() => {
|
|
839
|
+
var i, g;
|
|
825
840
|
let t = `${r.config.apiBaseUrl}${le.form[r.config.app].validate}`;
|
|
826
|
-
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((
|
|
827
|
-
}),
|
|
828
|
-
var
|
|
829
|
-
let t = `${r.config.apiBaseUrl}${le.form[r.config.app][
|
|
830
|
-
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((
|
|
831
|
-
}),
|
|
832
|
-
let
|
|
833
|
-
t.url && (
|
|
834
|
-
}, q =
|
|
835
|
-
var
|
|
841
|
+
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
842
|
+
}), K = w(() => {
|
|
843
|
+
var i, g;
|
|
844
|
+
let t = `${r.config.apiBaseUrl}${le.form[r.config.app][F.value]}`;
|
|
845
|
+
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
846
|
+
}), we = (t) => {
|
|
847
|
+
let i = "";
|
|
848
|
+
t.url && (i = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(i)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
849
|
+
}, q = w(() => {
|
|
850
|
+
var i, g, n, f;
|
|
836
851
|
const t = {
|
|
837
852
|
name: e.fields.name || null,
|
|
838
|
-
tags: e.fields.tags ? (
|
|
853
|
+
tags: e.fields.tags ? (n = (g = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : g.map((m) => String(m || "").trim())) == null ? void 0 : n.filter((m) => m !== "") : null,
|
|
839
854
|
protocol: e.fields.protocol,
|
|
840
855
|
path: e.fields.path || null,
|
|
841
856
|
read_timeout: e.fields.read_timeout,
|
|
@@ -844,84 +859,84 @@ const me = {
|
|
|
844
859
|
connect_timeout: e.fields.connect_timeout,
|
|
845
860
|
tls_verify_value: e.fields.tls_verify_value,
|
|
846
861
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
847
|
-
ca_certificates: e.fields.ca_certificates ? (
|
|
862
|
+
ca_certificates: e.fields.ca_certificates ? (f = e.fields.ca_certificates) == null ? void 0 : f.split(",").filter((m) => m !== "") : null,
|
|
848
863
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
849
864
|
write_timeout: e.fields.write_timeout,
|
|
850
865
|
port: e.fields.port,
|
|
851
866
|
url: e.fields.url
|
|
852
867
|
};
|
|
853
|
-
return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value),
|
|
854
|
-
}),
|
|
855
|
-
var t,
|
|
868
|
+
return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), ie.value || (t.path = null), F.value === "create" ? C.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : F.value === "edit" && delete t.url, t;
|
|
869
|
+
}), j = async () => {
|
|
870
|
+
var t, i, g, n;
|
|
856
871
|
try {
|
|
857
|
-
e.isReadonly = !0,
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
let
|
|
861
|
-
if (await
|
|
862
|
-
const { data:
|
|
863
|
-
e.fields.name = (
|
|
872
|
+
e.isReadonly = !0, oe();
|
|
873
|
+
const f = q.value;
|
|
874
|
+
we(f);
|
|
875
|
+
let m;
|
|
876
|
+
if (await h.post(Z.value, f), F.value === "create" ? m = await h.post(K.value, f) : F.value === "edit" && (m = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await h.put(K.value, f) : await h.patch(K.value, f)), m) {
|
|
877
|
+
const { data: l } = m;
|
|
878
|
+
e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port || H.getPortFromProtocol(l.protocol), e.fields.protocol = (l == null ? void 0 : l.protocol) || "http", e.fields.host = (l == null ? void 0 : l.host) || "", e.fields.path = (l == null ? void 0 : l.path) || "", e.fields.url = (l == null ? void 0 : l.url) || "", e.fields.retries = l != null && l.retries || (l == null ? void 0 : l.retries) === 0 ? l == null ? void 0 : l.retries : 5, e.fields.connect_timeout = l != null && l.connect_timeout || (l == null ? void 0 : l.connect_timeout) === 0 ? l == null ? void 0 : l.connect_timeout : 6e4, e.fields.write_timeout = l != null && l.write_timeout || (l == null ? void 0 : l.write_timeout) === 0 ? l == null ? void 0 : l.write_timeout : 6e4, e.fields.read_timeout = l != null && l.read_timeout || (l == null ? void 0 : l.read_timeout) === 0 ? l == null ? void 0 : l.read_timeout : 6e4, e.fields.client_certificate = ((i = l == null ? void 0 : l.client_certificate) == null ? void 0 : i.id) || "", e.fields.ca_certificates = (g = l == null ? void 0 : l.ca_certificates) != null && g.length ? l == null ? void 0 : l.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (l == null ? void 0 : l.tls_verify) !== "" && (l == null ? void 0 : l.tls_verify) !== null && (l == null ? void 0 : l.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (l == null ? void 0 : l.tls_verify), e.fields.tags = (n = l == null ? void 0 : l.tags) != null && n.length ? l.tags.join(", ") : "", Object.assign(_, e.fields), c("update", m == null ? void 0 : m.data);
|
|
864
879
|
}
|
|
865
|
-
return
|
|
866
|
-
} catch (
|
|
867
|
-
e.errorMessage =
|
|
880
|
+
return m;
|
|
881
|
+
} catch (f) {
|
|
882
|
+
e.errorMessage = P(f), c("error", f);
|
|
868
883
|
} finally {
|
|
869
884
|
e.isReadonly = !1;
|
|
870
885
|
}
|
|
871
886
|
};
|
|
872
|
-
return
|
|
887
|
+
return Ce(() => r.gatewayServiceId, () => {
|
|
873
888
|
Object.assign(e.fields, _);
|
|
874
|
-
}),
|
|
875
|
-
e.fields.port =
|
|
876
|
-
}),
|
|
889
|
+
}), Ce(e.fields, (t) => {
|
|
890
|
+
e.fields.port = H.getPortFromProtocol(t.protocol, String(t.port)), c("model-updated", q.value);
|
|
891
|
+
}), De(() => {
|
|
877
892
|
c("model-updated", q.value);
|
|
878
|
-
}),
|
|
879
|
-
validateUrl:
|
|
893
|
+
}), $({
|
|
894
|
+
validateUrl: oe,
|
|
880
895
|
getPayload: q,
|
|
881
|
-
saveFormData:
|
|
882
|
-
canSubmit:
|
|
883
|
-
initForm:
|
|
884
|
-
}), (t,
|
|
885
|
-
const
|
|
886
|
-
return
|
|
887
|
-
|
|
888
|
-
"can-submit":
|
|
896
|
+
saveFormData: j,
|
|
897
|
+
canSubmit: Y,
|
|
898
|
+
initForm: R
|
|
899
|
+
}), (t, i) => {
|
|
900
|
+
const g = M("KInput"), n = M("KLabel"), f = M("KRadio"), m = M("KSelect"), l = M("KCheckbox"), A = M("KCollapse");
|
|
901
|
+
return k(), T("div", gt, [
|
|
902
|
+
u(o(et), {
|
|
903
|
+
"can-submit": Y.value,
|
|
889
904
|
config: a.config,
|
|
890
905
|
"edit-id": a.gatewayServiceId,
|
|
891
906
|
"enable-terraform": a.enableTerraform,
|
|
892
|
-
"entity-type": o(
|
|
907
|
+
"entity-type": o(Ee).GatewayService,
|
|
893
908
|
"error-message": e.errorMessage,
|
|
894
|
-
"fetch-url":
|
|
909
|
+
"fetch-url": pe.value,
|
|
895
910
|
"form-fields": q.value,
|
|
896
911
|
"is-readonly": e.isReadonly,
|
|
897
|
-
onCancel:
|
|
898
|
-
"onFetch:error":
|
|
899
|
-
"onFetch:success":
|
|
900
|
-
onLoading:
|
|
901
|
-
onSubmit:
|
|
912
|
+
onCancel: O,
|
|
913
|
+
"onFetch:error": i[25] || (i[25] = (d) => t.$emit("error", d)),
|
|
914
|
+
"onFetch:success": R,
|
|
915
|
+
onLoading: i[26] || (i[26] = (d) => t.$emit("loading", d)),
|
|
916
|
+
onSubmit: j
|
|
902
917
|
}, {
|
|
903
|
-
"form-actions":
|
|
904
|
-
|
|
905
|
-
canSubmit:
|
|
906
|
-
cancel:
|
|
907
|
-
submit:
|
|
918
|
+
"form-actions": p(() => [
|
|
919
|
+
Le(t.$slots, "form-actions", {
|
|
920
|
+
canSubmit: Y.value,
|
|
921
|
+
cancel: O,
|
|
922
|
+
submit: j
|
|
908
923
|
}, void 0, !0)
|
|
909
924
|
]),
|
|
910
|
-
default:
|
|
911
|
-
|
|
925
|
+
default: p(() => [
|
|
926
|
+
u(o(Ie), {
|
|
912
927
|
description: o(s)("gateway_services.form.sections.general.description"),
|
|
913
928
|
"hide-info-header": a.hideSectionsInfo,
|
|
914
929
|
title: o(s)("gateway_services.form.sections.general.title")
|
|
915
930
|
}, {
|
|
916
|
-
default:
|
|
917
|
-
|
|
931
|
+
default: p(() => [
|
|
932
|
+
u(g, {
|
|
918
933
|
modelValue: e.fields.name,
|
|
919
|
-
"onUpdate:modelValue":
|
|
934
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => e.fields.name = d),
|
|
920
935
|
modelModifiers: { trim: !0 },
|
|
921
936
|
autocomplete: "off",
|
|
922
937
|
"data-testid": "gateway-service-name-input",
|
|
923
|
-
error:
|
|
924
|
-
"error-message":
|
|
938
|
+
error: ve.value,
|
|
939
|
+
"error-message": J.value,
|
|
925
940
|
label: o(s)("gateway_services.form.fields.name.label"),
|
|
926
941
|
"label-attributes": {
|
|
927
942
|
info: o(s)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -931,11 +946,11 @@ const me = {
|
|
|
931
946
|
placeholder: o(s)("gateway_services.form.fields.name.placeholder"),
|
|
932
947
|
readonly: e.isReadonly,
|
|
933
948
|
type: "text",
|
|
934
|
-
onInput:
|
|
949
|
+
onInput: he
|
|
935
950
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
936
|
-
|
|
951
|
+
u(g, {
|
|
937
952
|
modelValue: e.fields.tags,
|
|
938
|
-
"onUpdate:modelValue":
|
|
953
|
+
"onUpdate:modelValue": i[1] || (i[1] = (d) => e.fields.tags = d),
|
|
939
954
|
modelModifiers: { trim: !0 },
|
|
940
955
|
autocomplete: "off",
|
|
941
956
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -953,39 +968,39 @@ const me = {
|
|
|
953
968
|
]),
|
|
954
969
|
_: 1
|
|
955
970
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
956
|
-
|
|
971
|
+
u(o(Ie), {
|
|
957
972
|
description: o(s)("gateway_services.form.sections.keys.description"),
|
|
958
973
|
"hide-info-header": a.hideSectionsInfo,
|
|
959
974
|
title: o(s)("gateway_services.form.sections.keys.title")
|
|
960
975
|
}, {
|
|
961
|
-
default:
|
|
962
|
-
|
|
963
|
-
V("div",
|
|
964
|
-
|
|
965
|
-
default:
|
|
966
|
-
|
|
976
|
+
default: p(() => [
|
|
977
|
+
B.value ? D("", !0) : (k(), T("div", _t, [
|
|
978
|
+
V("div", bt, [
|
|
979
|
+
u(n, { required: "" }, {
|
|
980
|
+
default: p(() => [
|
|
981
|
+
U(b(o(s)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
967
982
|
]),
|
|
968
983
|
_: 1
|
|
969
984
|
})
|
|
970
985
|
]),
|
|
971
|
-
V("div",
|
|
972
|
-
|
|
986
|
+
V("div", ht, [
|
|
987
|
+
u(f, {
|
|
973
988
|
modelValue: C.value,
|
|
974
|
-
"onUpdate:modelValue":
|
|
989
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => C.value = d),
|
|
975
990
|
"data-testid": "gateway-service-url-radio",
|
|
976
|
-
"selected-value":
|
|
977
|
-
onChange:
|
|
991
|
+
"selected-value": I.url,
|
|
992
|
+
onChange: X
|
|
978
993
|
}, {
|
|
979
|
-
default:
|
|
980
|
-
|
|
994
|
+
default: p(() => [
|
|
995
|
+
U(b(o(s)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
981
996
|
]),
|
|
982
997
|
_: 1
|
|
983
998
|
}, 8, ["modelValue", "selected-value"])
|
|
984
999
|
]),
|
|
985
|
-
C.value === "url" ? (
|
|
986
|
-
|
|
1000
|
+
C.value === "url" ? (k(), T("div", wt, [
|
|
1001
|
+
u(g, {
|
|
987
1002
|
modelValue: e.fields.url,
|
|
988
|
-
"onUpdate:modelValue":
|
|
1003
|
+
"onUpdate:modelValue": i[3] || (i[3] = (d) => e.fields.url = d),
|
|
989
1004
|
modelModifiers: { trim: !0 },
|
|
990
1005
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
991
1006
|
"data-testid": "gateway-service-url-input",
|
|
@@ -998,27 +1013,27 @@ const me = {
|
|
|
998
1013
|
placeholder: o(s)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
999
1014
|
required: ""
|
|
1000
1015
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1001
|
-
])) :
|
|
1002
|
-
|
|
1016
|
+
])) : D("", !0),
|
|
1017
|
+
u(f, {
|
|
1003
1018
|
modelValue: C.value,
|
|
1004
|
-
"onUpdate:modelValue":
|
|
1019
|
+
"onUpdate:modelValue": i[4] || (i[4] = (d) => C.value = d),
|
|
1005
1020
|
"checked-group": "protocol",
|
|
1006
1021
|
"data-testid": "gateway-service-protocol-radio",
|
|
1007
|
-
"selected-value":
|
|
1008
|
-
onChange:
|
|
1022
|
+
"selected-value": I.protocol,
|
|
1023
|
+
onChange: X
|
|
1009
1024
|
}, {
|
|
1010
|
-
default:
|
|
1011
|
-
|
|
1025
|
+
default: p(() => [
|
|
1026
|
+
U(b(o(s)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1012
1027
|
]),
|
|
1013
1028
|
_: 1
|
|
1014
1029
|
}, 8, ["modelValue", "selected-value"])
|
|
1015
1030
|
])),
|
|
1016
|
-
C.value === "protocol" ||
|
|
1017
|
-
|
|
1031
|
+
C.value === "protocol" || B.value ? (k(), T("div", kt, [
|
|
1032
|
+
u(m, {
|
|
1018
1033
|
modelValue: e.fields.protocol,
|
|
1019
|
-
"onUpdate:modelValue":
|
|
1034
|
+
"onUpdate:modelValue": i[5] || (i[5] = (d) => e.fields.protocol = d),
|
|
1020
1035
|
"data-testid": "gateway-service-protocol-select",
|
|
1021
|
-
items:
|
|
1036
|
+
items: z,
|
|
1022
1037
|
label: o(s)("gateway_services.form.fields.protocol.label"),
|
|
1023
1038
|
"label-attributes": {
|
|
1024
1039
|
info: o(s)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -1027,11 +1042,11 @@ const me = {
|
|
|
1027
1042
|
readonly: e.isReadonly,
|
|
1028
1043
|
required: "",
|
|
1029
1044
|
width: "100%",
|
|
1030
|
-
onSelected:
|
|
1045
|
+
onSelected: i[6] || (i[6] = (d) => Q(e.fields.protocol, d))
|
|
1031
1046
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1032
|
-
|
|
1047
|
+
u(g, {
|
|
1033
1048
|
modelValue: e.fields.host,
|
|
1034
|
-
"onUpdate:modelValue":
|
|
1049
|
+
"onUpdate:modelValue": i[7] || (i[7] = (d) => e.fields.host = d),
|
|
1035
1050
|
modelModifiers: { trim: !0 },
|
|
1036
1051
|
class: "gateway-service-form-margin-top",
|
|
1037
1052
|
"data-testid": "gateway-service-host-input",
|
|
@@ -1044,10 +1059,10 @@ const me = {
|
|
|
1044
1059
|
placeholder: o(s)("gateway_services.form.fields.host.placeholder"),
|
|
1045
1060
|
required: ""
|
|
1046
1061
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1047
|
-
|
|
1048
|
-
|
|
1062
|
+
ie.value ? (k(), T("div", Ct, [
|
|
1063
|
+
u(g, {
|
|
1049
1064
|
modelValue: e.fields.path,
|
|
1050
|
-
"onUpdate:modelValue":
|
|
1065
|
+
"onUpdate:modelValue": i[8] || (i[8] = (d) => e.fields.path = d),
|
|
1051
1066
|
modelModifiers: { trim: !0 },
|
|
1052
1067
|
class: "gateway-service-form-margin-top",
|
|
1053
1068
|
"data-testid": "gateway-service-path-input",
|
|
@@ -1059,13 +1074,13 @@ const me = {
|
|
|
1059
1074
|
name: "path",
|
|
1060
1075
|
placeholder: o(s)("gateway_services.form.fields.path.placeholder")
|
|
1061
1076
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1062
|
-
])) :
|
|
1063
|
-
|
|
1077
|
+
])) : D("", !0),
|
|
1078
|
+
u(g, {
|
|
1064
1079
|
modelValue: e.fields.port,
|
|
1065
1080
|
"onUpdate:modelValue": [
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
e.fields.port =
|
|
1081
|
+
i[9] || (i[9] = (d) => e.fields.port = d),
|
|
1082
|
+
i[10] || (i[10] = () => {
|
|
1083
|
+
e.fields.port = G(e.fields.port + "");
|
|
1069
1084
|
})
|
|
1070
1085
|
],
|
|
1071
1086
|
class: "gateway-service-form-margin-top",
|
|
@@ -1078,23 +1093,23 @@ const me = {
|
|
|
1078
1093
|
name: "port",
|
|
1079
1094
|
type: "number"
|
|
1080
1095
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1081
|
-
])) :
|
|
1082
|
-
|
|
1083
|
-
modelValue:
|
|
1084
|
-
"onUpdate:modelValue":
|
|
1096
|
+
])) : D("", !0),
|
|
1097
|
+
u(A, {
|
|
1098
|
+
modelValue: x.value,
|
|
1099
|
+
"onUpdate:modelValue": i[24] || (i[24] = (d) => x.value = d),
|
|
1085
1100
|
"data-testid": "advanced-fields-collapse",
|
|
1086
1101
|
"trigger-alignment": "leading",
|
|
1087
1102
|
"trigger-label": o(s)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1088
1103
|
}, {
|
|
1089
|
-
default:
|
|
1090
|
-
V("div",
|
|
1091
|
-
V("div",
|
|
1092
|
-
|
|
1104
|
+
default: p(() => [
|
|
1105
|
+
V("div", Vt, [
|
|
1106
|
+
V("div", St, [
|
|
1107
|
+
u(g, {
|
|
1093
1108
|
modelValue: e.fields.retries,
|
|
1094
1109
|
"onUpdate:modelValue": [
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
e.fields.retries =
|
|
1110
|
+
i[11] || (i[11] = (d) => e.fields.retries = d),
|
|
1111
|
+
i[12] || (i[12] = () => {
|
|
1112
|
+
e.fields.retries = G(e.fields.retries + "");
|
|
1098
1113
|
})
|
|
1099
1114
|
],
|
|
1100
1115
|
autocomplete: "off",
|
|
@@ -1109,13 +1124,13 @@ const me = {
|
|
|
1109
1124
|
type: "number"
|
|
1110
1125
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1111
1126
|
]),
|
|
1112
|
-
V("div",
|
|
1113
|
-
|
|
1127
|
+
V("div", Tt, [
|
|
1128
|
+
u(g, {
|
|
1114
1129
|
modelValue: e.fields.connect_timeout,
|
|
1115
1130
|
"onUpdate:modelValue": [
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
e.fields.connect_timeout =
|
|
1131
|
+
i[13] || (i[13] = (d) => e.fields.connect_timeout = d),
|
|
1132
|
+
i[14] || (i[14] = () => {
|
|
1133
|
+
e.fields.connect_timeout = G(e.fields.connect_timeout + "");
|
|
1119
1134
|
})
|
|
1120
1135
|
],
|
|
1121
1136
|
autocomplete: "off",
|
|
@@ -1130,13 +1145,13 @@ const me = {
|
|
|
1130
1145
|
type: "number"
|
|
1131
1146
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1132
1147
|
]),
|
|
1133
|
-
V("div",
|
|
1134
|
-
|
|
1148
|
+
V("div", It, [
|
|
1149
|
+
u(g, {
|
|
1135
1150
|
modelValue: e.fields.write_timeout,
|
|
1136
1151
|
"onUpdate:modelValue": [
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
e.fields.write_timeout =
|
|
1152
|
+
i[15] || (i[15] = (d) => e.fields.write_timeout = d),
|
|
1153
|
+
i[16] || (i[16] = () => {
|
|
1154
|
+
e.fields.write_timeout = G(e.fields.write_timeout + "");
|
|
1140
1155
|
})
|
|
1141
1156
|
],
|
|
1142
1157
|
autocomplete: "off",
|
|
@@ -1151,13 +1166,13 @@ const me = {
|
|
|
1151
1166
|
type: "number"
|
|
1152
1167
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1153
1168
|
]),
|
|
1154
|
-
V("div",
|
|
1155
|
-
|
|
1169
|
+
V("div", Pt, [
|
|
1170
|
+
u(g, {
|
|
1156
1171
|
modelValue: e.fields.read_timeout,
|
|
1157
1172
|
"onUpdate:modelValue": [
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
e.fields.read_timeout =
|
|
1173
|
+
i[17] || (i[17] = (d) => e.fields.read_timeout = d),
|
|
1174
|
+
i[18] || (i[18] = () => {
|
|
1175
|
+
e.fields.read_timeout = G(e.fields.read_timeout + "");
|
|
1161
1176
|
})
|
|
1162
1177
|
],
|
|
1163
1178
|
autocomplete: "off",
|
|
@@ -1172,10 +1187,10 @@ const me = {
|
|
|
1172
1187
|
type: "number"
|
|
1173
1188
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1174
1189
|
]),
|
|
1175
|
-
|
|
1176
|
-
|
|
1190
|
+
ge.value ? (k(), T("div", Ut, [
|
|
1191
|
+
u(g, {
|
|
1177
1192
|
modelValue: e.fields.client_certificate,
|
|
1178
|
-
"onUpdate:modelValue":
|
|
1193
|
+
"onUpdate:modelValue": i[19] || (i[19] = (d) => e.fields.client_certificate = d),
|
|
1179
1194
|
modelModifiers: { trim: !0 },
|
|
1180
1195
|
autocomplete: "off",
|
|
1181
1196
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -1189,11 +1204,11 @@ const me = {
|
|
|
1189
1204
|
readonly: e.isReadonly,
|
|
1190
1205
|
type: "text"
|
|
1191
1206
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1192
|
-
])) :
|
|
1193
|
-
_e.value ? (
|
|
1194
|
-
|
|
1207
|
+
])) : D("", !0),
|
|
1208
|
+
_e.value ? (k(), T("div", Et, [
|
|
1209
|
+
u(g, {
|
|
1195
1210
|
modelValue: e.fields.ca_certificates,
|
|
1196
|
-
"onUpdate:modelValue":
|
|
1211
|
+
"onUpdate:modelValue": i[20] || (i[20] = (d) => e.fields.ca_certificates = d),
|
|
1197
1212
|
modelModifiers: { trim: !0 },
|
|
1198
1213
|
autocomplete: "off",
|
|
1199
1214
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -1203,15 +1218,15 @@ const me = {
|
|
|
1203
1218
|
readonly: e.isReadonly,
|
|
1204
1219
|
type: "text"
|
|
1205
1220
|
}, {
|
|
1206
|
-
"label-tooltip":
|
|
1207
|
-
|
|
1221
|
+
"label-tooltip": p(() => [
|
|
1222
|
+
u(o(L), {
|
|
1208
1223
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1209
1224
|
scope: "global"
|
|
1210
1225
|
}, {
|
|
1211
|
-
code1:
|
|
1226
|
+
code1: p(() => [
|
|
1212
1227
|
V("code", null, b(o(s)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1213
1228
|
]),
|
|
1214
|
-
code2:
|
|
1229
|
+
code2: p(() => [
|
|
1215
1230
|
V("code", null, b(o(s)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1216
1231
|
]),
|
|
1217
1232
|
_: 1
|
|
@@ -1219,22 +1234,22 @@ const me = {
|
|
|
1219
1234
|
]),
|
|
1220
1235
|
_: 1
|
|
1221
1236
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1222
|
-
])) :
|
|
1223
|
-
be.value ? (
|
|
1224
|
-
|
|
1237
|
+
])) : D("", !0),
|
|
1238
|
+
be.value ? (k(), T("div", Mt, [
|
|
1239
|
+
u(l, {
|
|
1225
1240
|
modelValue: e.fields.tls_verify_enabled,
|
|
1226
|
-
"onUpdate:modelValue":
|
|
1241
|
+
"onUpdate:modelValue": i[21] || (i[21] = (d) => e.fields.tls_verify_enabled = d),
|
|
1227
1242
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1228
1243
|
description: o(s)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1229
1244
|
label: o(s)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1230
1245
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1231
1246
|
}, {
|
|
1232
|
-
tooltip:
|
|
1233
|
-
|
|
1247
|
+
tooltip: p(() => [
|
|
1248
|
+
u(o(L), {
|
|
1234
1249
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1235
1250
|
scope: "global"
|
|
1236
1251
|
}, {
|
|
1237
|
-
code1:
|
|
1252
|
+
code1: p(() => [
|
|
1238
1253
|
V("code", null, b(o(s)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1239
1254
|
]),
|
|
1240
1255
|
_: 1
|
|
@@ -1242,25 +1257,25 @@ const me = {
|
|
|
1242
1257
|
]),
|
|
1243
1258
|
_: 1
|
|
1244
1259
|
}, 8, ["modelValue", "description", "label"]),
|
|
1245
|
-
e.fields.tls_verify_enabled ? (
|
|
1246
|
-
|
|
1260
|
+
e.fields.tls_verify_enabled ? (k(), T("div", xt, [
|
|
1261
|
+
u(f, {
|
|
1247
1262
|
modelValue: e.fields.tls_verify_value,
|
|
1248
|
-
"onUpdate:modelValue":
|
|
1263
|
+
"onUpdate:modelValue": i[22] || (i[22] = (d) => e.fields.tls_verify_value = d),
|
|
1249
1264
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1250
1265
|
label: o(s)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1251
1266
|
"selected-value": !0
|
|
1252
1267
|
}, null, 8, ["modelValue", "label"])
|
|
1253
|
-
])) :
|
|
1254
|
-
e.fields.tls_verify_enabled ? (
|
|
1255
|
-
|
|
1268
|
+
])) : D("", !0),
|
|
1269
|
+
e.fields.tls_verify_enabled ? (k(), T("div", Rt, [
|
|
1270
|
+
u(f, {
|
|
1256
1271
|
modelValue: e.fields.tls_verify_value,
|
|
1257
|
-
"onUpdate:modelValue":
|
|
1272
|
+
"onUpdate:modelValue": i[23] || (i[23] = (d) => e.fields.tls_verify_value = d),
|
|
1258
1273
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1259
1274
|
label: o(s)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1260
1275
|
"selected-value": !1
|
|
1261
1276
|
}, null, 8, ["modelValue", "label"])
|
|
1262
|
-
])) :
|
|
1263
|
-
])) :
|
|
1277
|
+
])) : D("", !0)
|
|
1278
|
+
])) : D("", !0)
|
|
1264
1279
|
])
|
|
1265
1280
|
]),
|
|
1266
1281
|
_: 1
|
|
@@ -1274,7 +1289,7 @@ const me = {
|
|
|
1274
1289
|
]);
|
|
1275
1290
|
};
|
|
1276
1291
|
}
|
|
1277
|
-
}),
|
|
1292
|
+
}), qt = /* @__PURE__ */ Me(At, [["__scopeId", "data-v-b3bd262f"]]), Ft = { class: "kong-ui-gateway-service-entity-config-card" }, Nt = /* @__PURE__ */ Ve({
|
|
1278
1293
|
__name: "GatewayServiceConfigCard",
|
|
1279
1294
|
props: {
|
|
1280
1295
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1309,123 +1324,123 @@ const me = {
|
|
|
1309
1324
|
},
|
|
1310
1325
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1311
1326
|
setup(a) {
|
|
1312
|
-
const
|
|
1327
|
+
const $ = a, { i18n: { t: v }, i18nT: c } = ue.useI18n(), r = w(() => le.form[$.config.app].edit), { getPropValue: x } = tt(), W = (s, P) => x(s, P) === !0 ? v("gateway_services.form.fields.tls_verify_option.true.display") : v("gateway_services.form.fields.tls_verify_option.false.display"), L = S({
|
|
1313
1328
|
id: {},
|
|
1314
1329
|
name: {
|
|
1315
|
-
tooltip:
|
|
1330
|
+
tooltip: v("gateway_services.form.fields.name.tooltip")
|
|
1316
1331
|
},
|
|
1317
1332
|
enabled: {},
|
|
1318
1333
|
updated_at: {},
|
|
1319
1334
|
created_at: {},
|
|
1320
1335
|
protocol: {
|
|
1321
|
-
section:
|
|
1322
|
-
tooltip:
|
|
1336
|
+
section: ne.Basic,
|
|
1337
|
+
tooltip: v("gateway_services.form.fields.protocol.tooltip")
|
|
1323
1338
|
},
|
|
1324
1339
|
host: {
|
|
1325
|
-
section:
|
|
1326
|
-
tooltip:
|
|
1340
|
+
section: ne.Basic,
|
|
1341
|
+
tooltip: v("gateway_services.form.fields.host.tooltip")
|
|
1327
1342
|
},
|
|
1328
1343
|
path: {
|
|
1329
|
-
section:
|
|
1330
|
-
tooltip:
|
|
1344
|
+
section: ne.Basic,
|
|
1345
|
+
tooltip: v("gateway_services.form.fields.path.tooltip")
|
|
1331
1346
|
},
|
|
1332
1347
|
port: {
|
|
1333
|
-
section:
|
|
1334
|
-
tooltip:
|
|
1348
|
+
section: ne.Basic,
|
|
1349
|
+
tooltip: v("gateway_services.form.fields.port.tooltip")
|
|
1335
1350
|
},
|
|
1336
1351
|
tags: {
|
|
1337
|
-
tooltip:
|
|
1352
|
+
tooltip: v("gateway_services.form.fields.tags.tooltip")
|
|
1338
1353
|
},
|
|
1339
1354
|
// advanced fields
|
|
1340
1355
|
retries: {
|
|
1341
1356
|
order: 1,
|
|
1342
|
-
tooltip:
|
|
1357
|
+
tooltip: v("gateway_services.form.fields.retries.tooltip")
|
|
1343
1358
|
},
|
|
1344
1359
|
connect_timeout: {
|
|
1345
1360
|
order: 2,
|
|
1346
|
-
tooltip:
|
|
1361
|
+
tooltip: v("gateway_services.form.fields.connect_timeout.tooltip")
|
|
1347
1362
|
},
|
|
1348
1363
|
write_timeout: {
|
|
1349
1364
|
order: 3,
|
|
1350
|
-
tooltip:
|
|
1365
|
+
tooltip: v("gateway_services.form.fields.write_timeout.tooltip")
|
|
1351
1366
|
},
|
|
1352
1367
|
read_timeout: {
|
|
1353
1368
|
order: 4,
|
|
1354
|
-
tooltip:
|
|
1369
|
+
tooltip: v("gateway_services.form.fields.read_timeout.tooltip")
|
|
1355
1370
|
},
|
|
1356
1371
|
client_certificate: {
|
|
1357
1372
|
order: 5,
|
|
1358
|
-
tooltip:
|
|
1373
|
+
tooltip: v("gateway_services.form.fields.client_certificate.tooltip")
|
|
1359
1374
|
},
|
|
1360
1375
|
ca_certificates: {
|
|
1361
|
-
type:
|
|
1362
|
-
label:
|
|
1376
|
+
type: lt.BadgeTag,
|
|
1377
|
+
label: v("gateway_services.form.fields.ca_certificates.label"),
|
|
1363
1378
|
order: 6
|
|
1364
1379
|
},
|
|
1365
1380
|
tls_verify: {
|
|
1366
|
-
label:
|
|
1381
|
+
label: v("gateway_services.form.fields.tls_verify_enabled.label")
|
|
1367
1382
|
},
|
|
1368
1383
|
tls_verify_depth: {
|
|
1369
1384
|
hidden: !0
|
|
1370
1385
|
}
|
|
1371
1386
|
});
|
|
1372
|
-
return (s,
|
|
1373
|
-
|
|
1387
|
+
return (s, P) => (k(), T("div", Ft, [
|
|
1388
|
+
u(o(ot), {
|
|
1374
1389
|
config: a.config,
|
|
1375
1390
|
"config-card-doc": a.configCardDoc,
|
|
1376
|
-
"config-schema":
|
|
1391
|
+
"config-schema": L.value,
|
|
1377
1392
|
"enable-terraform": a.enableTerraform,
|
|
1378
|
-
"entity-type": o(
|
|
1393
|
+
"entity-type": o(Ee).GatewayService,
|
|
1379
1394
|
"fetch-url": r.value,
|
|
1380
1395
|
"hide-title": a.hideTitle,
|
|
1381
|
-
"onFetch:error":
|
|
1382
|
-
"onFetch:success":
|
|
1383
|
-
onLoading:
|
|
1396
|
+
"onFetch:error": P[0] || (P[0] = (h) => s.$emit("fetch:error", h)),
|
|
1397
|
+
"onFetch:success": P[1] || (P[1] = (h) => s.$emit("fetch:success", h)),
|
|
1398
|
+
onLoading: P[2] || (P[2] = (h) => s.$emit("loading", h))
|
|
1384
1399
|
}, {
|
|
1385
|
-
"enabled-label-tooltip":
|
|
1386
|
-
|
|
1400
|
+
"enabled-label-tooltip": p(() => [
|
|
1401
|
+
u(o(c), {
|
|
1387
1402
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1388
1403
|
scope: "global"
|
|
1389
1404
|
}, {
|
|
1390
|
-
false:
|
|
1391
|
-
V("code", null, b(o(
|
|
1405
|
+
false: p(() => [
|
|
1406
|
+
V("code", null, b(o(v)("gateway_services.form.fields.enabled.false")), 1)
|
|
1392
1407
|
]),
|
|
1393
|
-
true:
|
|
1394
|
-
V("code", null, b(o(
|
|
1408
|
+
true: p(() => [
|
|
1409
|
+
V("code", null, b(o(v)("gateway_services.form.fields.enabled.true")), 1)
|
|
1395
1410
|
]),
|
|
1396
1411
|
_: 1
|
|
1397
1412
|
})
|
|
1398
1413
|
]),
|
|
1399
|
-
"ca_certificates-label-tooltip":
|
|
1400
|
-
|
|
1414
|
+
"ca_certificates-label-tooltip": p(() => [
|
|
1415
|
+
u(o(c), {
|
|
1401
1416
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1402
1417
|
scope: "global"
|
|
1403
1418
|
}, {
|
|
1404
|
-
code1:
|
|
1405
|
-
V("code", null, b(o(
|
|
1419
|
+
code1: p(() => [
|
|
1420
|
+
V("code", null, b(o(v)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1406
1421
|
]),
|
|
1407
|
-
code2:
|
|
1408
|
-
V("code", null, b(o(
|
|
1422
|
+
code2: p(() => [
|
|
1423
|
+
V("code", null, b(o(v)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1409
1424
|
]),
|
|
1410
1425
|
_: 1
|
|
1411
1426
|
})
|
|
1412
1427
|
]),
|
|
1413
|
-
"tls_verify-label-tooltip":
|
|
1414
|
-
|
|
1428
|
+
"tls_verify-label-tooltip": p(() => [
|
|
1429
|
+
u(o(c), {
|
|
1415
1430
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1416
1431
|
scope: "global"
|
|
1417
1432
|
}, {
|
|
1418
|
-
code1:
|
|
1419
|
-
V("code", null, b(o(
|
|
1433
|
+
code1: p(() => [
|
|
1434
|
+
V("code", null, b(o(v)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1420
1435
|
]),
|
|
1421
1436
|
_: 1
|
|
1422
1437
|
})
|
|
1423
1438
|
]),
|
|
1424
|
-
tls_verify:
|
|
1425
|
-
|
|
1439
|
+
tls_verify: p((h) => [
|
|
1440
|
+
U(b(typeof o(x)("rowValue", h) == "boolean" ? W("rowValue", h) : o(v)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1426
1441
|
]),
|
|
1427
|
-
client_certificate:
|
|
1428
|
-
|
|
1442
|
+
client_certificate: p((h) => [
|
|
1443
|
+
U(b(o(x)("rowValue", h) ? o(x)("rowValue", h).id : "–"), 1)
|
|
1429
1444
|
]),
|
|
1430
1445
|
_: 1
|
|
1431
1446
|
}, 8, ["config", "config-card-doc", "config-schema", "enable-terraform", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1433,7 +1448,7 @@ const me = {
|
|
|
1433
1448
|
}
|
|
1434
1449
|
});
|
|
1435
1450
|
export {
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1451
|
+
Nt as GatewayServiceConfigCard,
|
|
1452
|
+
qt as GatewayServiceForm,
|
|
1453
|
+
Kt as GatewayServiceList
|
|
1439
1454
|
};
|