@kong-ui-public/entities-gateway-services 3.11.25-pr.2114.f471b8dbc.0 → 3.11.25-pr.2145.96ea30cf8.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Le, computed as k, ref as q, watch as $e, onBeforeMount as it, resolveComponent as G, openBlock as S, createElementBlock as $, createVNode as d, unref as l, createSlots as Re, withCtx as v, createBlock as Ue, Teleport as ze, createElementVNode as I, createCommentVNode as B, createTextVNode as J, toDisplayString as E, withModifiers as We, reactive as Me, onMounted as Qe, renderSlot as Xe, toValue as He, Transition as De, Fragment as rt, renderList as st } from "vue";
|
|
2
2
|
import { useRouter as Ge } from "vue-router";
|
|
3
|
-
import { BookIcon as
|
|
3
|
+
import { BookIcon as Ze, AddIcon as at, ServicesIcon as nt } from "@kong/icons";
|
|
4
4
|
import { createI18n as ct, i18nTComponent as dt } from "@kong-ui-public/i18n";
|
|
5
|
-
import { useAxios as Oe, useTableState as ut, useFetcher as ft, useDeleteUrlBuilder as pt, FetcherStatus as mt, EntityBaseTable as vt, EntityFilter as gt, PermissionsWrapper as Fe, TableTags as yt, EntityEmptyState as _t, EntityToggleModal as bt, EntityDeleteModal as ht, EntityTypes as wt, useErrors as
|
|
5
|
+
import { useAxios as Oe, useTableState as ut, useFetcher as ft, useDeleteUrlBuilder as pt, FetcherStatus as mt, EntityBaseTable as vt, EntityFilter as gt, PermissionsWrapper as Fe, TableTags as yt, EntityEmptyState as _t, EntityToggleModal as bt, EntityDeleteModal as ht, EntityTypes as wt, useErrors as Ye, useValidators as et, EntityBaseFormType as Be, useGatewayFeatureSupported as tt, EntityBaseForm as lt, SupportedEntityType as Ne, EntityFormSection as Ke, useHelpers as ot, ConfigurationSchemaSection as Ae, ConfigurationSchemaType as kt, EntityBaseConfigCard as Vt } from "@kong-ui-public/entities-shared";
|
|
6
6
|
const Ct = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
@@ -229,13 +229,13 @@ function $t() {
|
|
|
229
229
|
// Translation component <i18n-t>
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function At() {
|
|
233
233
|
return {
|
|
234
|
-
getPortFromProtocol: (
|
|
235
|
-
const p = [80, 443],
|
|
236
|
-
if ((
|
|
237
|
-
return
|
|
238
|
-
switch (
|
|
234
|
+
getPortFromProtocol: (K, y) => {
|
|
235
|
+
const p = [80, 443], s = Number(y);
|
|
236
|
+
if ((s || s === 0) && !p.includes(s))
|
|
237
|
+
return s;
|
|
238
|
+
switch (K) {
|
|
239
239
|
case "grpcs":
|
|
240
240
|
case "tls":
|
|
241
241
|
case "https":
|
|
@@ -251,37 +251,37 @@ function xt() {
|
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const { i18n: { t: n } } =
|
|
254
|
+
function xt() {
|
|
255
|
+
const { i18n: { t: n } } = ne.useI18n();
|
|
256
256
|
return {
|
|
257
|
-
validateHost: (
|
|
258
|
-
if (!
|
|
259
|
-
const
|
|
260
|
-
return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(
|
|
257
|
+
validateHost: (b) => {
|
|
258
|
+
if (!b || b.trim() === "") return n("gateway_services.form.errors.host.empty");
|
|
259
|
+
const M = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;
|
|
260
|
+
return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(b) || M.test(b) ? "" : n("gateway_services.form.errors.host.invalid");
|
|
261
261
|
},
|
|
262
|
-
validateProtocol: (
|
|
263
|
-
if (r.value ===
|
|
262
|
+
validateProtocol: (b, M) => !b || b.trim() === "" ? n("gateway_services.form.errors.protocol.empty") : (b = b.slice(0, -1), M.find((r) => {
|
|
263
|
+
if (r.value === b) return r;
|
|
264
264
|
}) === void 0 ? n("gateway_services.form.errors.protocol.invalid") : ""),
|
|
265
|
-
validatePath: (
|
|
266
|
-
validatePort: (
|
|
267
|
-
if (
|
|
265
|
+
validatePath: (b) => !b || b === "" ? "" : b.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(b) ? n("gateway_services.form.errors.path.invalid") : "" : n("gateway_services.form.errors.path.prefix"),
|
|
266
|
+
validatePort: (b) => {
|
|
267
|
+
if (b == null || b === "")
|
|
268
268
|
return "";
|
|
269
|
-
const
|
|
270
|
-
return isNaN(
|
|
269
|
+
const M = typeof b == "string" ? parseInt(b, 10) : b;
|
|
270
|
+
return isNaN(M) ? n("gateway_services.form.errors.port.type") : M < 0 || M > 65535 ? n("gateway_services.form.errors.port.invalid") : "";
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const ne = {
|
|
275
275
|
useI18n: $t,
|
|
276
|
-
usePortFromProtocol:
|
|
277
|
-
useUrlValidators:
|
|
278
|
-
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
276
|
+
usePortFromProtocol: At,
|
|
277
|
+
useUrlValidators: xt
|
|
278
|
+
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities", Te = "/{workspace}", ve = {
|
|
279
279
|
list: {
|
|
280
280
|
konnect: {
|
|
281
281
|
all: `${xe}/services`
|
|
282
282
|
},
|
|
283
283
|
kongManager: {
|
|
284
|
-
all: `${
|
|
284
|
+
all: `${Te}/services`
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
form: {
|
|
@@ -291,12 +291,12 @@ const fe = {
|
|
|
291
291
|
edit: `${xe}/services/{id}`
|
|
292
292
|
},
|
|
293
293
|
kongManager: {
|
|
294
|
-
create: `${
|
|
295
|
-
validate: `${
|
|
296
|
-
edit: `${
|
|
294
|
+
create: `${Te}/services`,
|
|
295
|
+
validate: `${Te}/schemas/services/validate`,
|
|
296
|
+
edit: `${Te}/services/{id}`
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
}, Tt = "#00abd2", Rt = "24px", Mt = { class: "kong-ui-entities-gateway-services-list" }, Bt = { class: "button-row" }, Kt = { class: "empty-state-icon-gateway" },
|
|
299
|
+
}, Tt = "#00abd2", Rt = "24px", Mt = { class: "kong-ui-entities-gateway-services-list" }, Bt = { class: "button-row" }, Kt = { class: "empty-state-icon-gateway" }, Lt = { key: 1 }, Wt = /* @__PURE__ */ Le({
|
|
300
300
|
__name: "GatewayServiceList",
|
|
301
301
|
props: {
|
|
302
302
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -343,214 +343,222 @@ const fe = {
|
|
|
343
343
|
isServerless: {
|
|
344
344
|
type: Boolean,
|
|
345
345
|
default: !1
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* Enables the new empty state design, this prop can be removed when
|
|
349
|
+
* the khcp-14756-empty-states-m2 FF is removed.
|
|
350
|
+
*/
|
|
351
|
+
enableV2EmptyStates: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
default: !1
|
|
346
354
|
}
|
|
347
355
|
},
|
|
348
356
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
349
|
-
setup(n, { emit:
|
|
350
|
-
var
|
|
351
|
-
const
|
|
357
|
+
setup(n, { emit: K }) {
|
|
358
|
+
var c;
|
|
359
|
+
const y = K, p = n, { i18n: { t: s, formatUnixTimeStamp: b } } = ne.useI18n(), M = Ge(), { axiosInstance: Q } = Oe((c = p.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: D } = ut(() => z.value), P = k(() => r.value && p.config.app === "konnect"), ie = k(() => !p.enableV2EmptyStates && p.config.app === "konnect"), ce = k(() => p.config.app !== "kongManager" || !!p.config.disableSorting), Y = {
|
|
352
360
|
// the Name column is non-hidable
|
|
353
|
-
name: { label:
|
|
354
|
-
...p.config.showControlPlaneColumn ? { control_plane: { label:
|
|
355
|
-
protocol: { label:
|
|
356
|
-
host: { label:
|
|
357
|
-
port: { label:
|
|
358
|
-
path: { label:
|
|
359
|
-
enabled: { label:
|
|
360
|
-
tags: { label:
|
|
361
|
-
updated_at: { label:
|
|
362
|
-
created_at: { label:
|
|
363
|
-
},
|
|
361
|
+
name: { label: s("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
362
|
+
...p.config.showControlPlaneColumn ? { control_plane: { label: s("gateway_services.list.table_headers.control_plane") } } : {},
|
|
363
|
+
protocol: { label: s("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
364
|
+
host: { label: s("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
365
|
+
port: { label: s("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
366
|
+
path: { label: s("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
367
|
+
enabled: { label: s("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
368
|
+
tags: { label: s("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
369
|
+
updated_at: { label: s("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
370
|
+
created_at: { label: s("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
371
|
+
}, we = {
|
|
364
372
|
columnVisibility: {
|
|
365
373
|
created_at: !1
|
|
366
374
|
}
|
|
367
|
-
},
|
|
368
|
-
var
|
|
369
|
-
let
|
|
370
|
-
return p.config.app === "konnect" ?
|
|
371
|
-
}),
|
|
372
|
-
const
|
|
373
|
-
if (
|
|
375
|
+
}, de = Y, x = k(() => {
|
|
376
|
+
var m, C;
|
|
377
|
+
let g = `${p.config.apiBaseUrl}${ve.list[p.config.app].all}`;
|
|
378
|
+
return p.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((m = p.config) == null ? void 0 : m.controlPlaneId) || "") : p.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (C = p.config) != null && C.workspace ? `/${p.config.workspace}` : "")), g;
|
|
379
|
+
}), ge = k(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${x.value}`) : new URL(x.value)), z = q(""), Ie = k(() => {
|
|
380
|
+
const g = p.config.app === "konnect" || p.config.isExactMatch;
|
|
381
|
+
if (g)
|
|
374
382
|
return {
|
|
375
|
-
isExactMatch:
|
|
376
|
-
placeholder:
|
|
383
|
+
isExactMatch: g,
|
|
384
|
+
placeholder: s(`search.placeholder.${p.config.app}`)
|
|
377
385
|
};
|
|
378
|
-
const { name:
|
|
386
|
+
const { name: m, enabled: C, protocol: W, host: pe, port: N, path: me } = Y;
|
|
379
387
|
return {
|
|
380
|
-
isExactMatch:
|
|
381
|
-
fields: { name:
|
|
388
|
+
isExactMatch: g,
|
|
389
|
+
fields: { name: m, enabled: C, protocol: W, host: pe, port: N, path: me },
|
|
382
390
|
schema: p.config.filterSchema
|
|
383
391
|
};
|
|
384
392
|
}), {
|
|
385
|
-
fetcher:
|
|
386
|
-
fetcherState:
|
|
387
|
-
fetcherCacheKey:
|
|
388
|
-
} = ft(k(() => ({ ...p.config, cacheIdentifier: p.cacheIdentifier })),
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
+
fetcher: o,
|
|
394
|
+
fetcherState: w,
|
|
395
|
+
fetcherCacheKey: re
|
|
396
|
+
} = ft(k(() => ({ ...p.config, cacheIdentifier: p.cacheIdentifier })), x), ye = () => {
|
|
397
|
+
z.value = "";
|
|
398
|
+
}, ke = () => {
|
|
399
|
+
re.value++;
|
|
400
|
+
}, e = q(null), A = k(() => ({
|
|
393
401
|
ctaPath: p.config.createRoute,
|
|
394
|
-
ctaText:
|
|
395
|
-
message: `${
|
|
396
|
-
title:
|
|
397
|
-
})),
|
|
398
|
-
const
|
|
402
|
+
ctaText: T.value ? p.isServerless ? s("actions.serverless_create") : s("actions.create") : void 0,
|
|
403
|
+
message: `${s("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState ? ` ${p.config.additionMessageForEmptyState}` : ""}`,
|
|
404
|
+
title: T.value ? p.isServerless ? s("gateway_services.list.empty_state.serverless_title") : s("gateway_services.list.empty_state.title") : s("gateway_services.title")
|
|
405
|
+
})), ue = q(!1), O = q(null), se = k(() => {
|
|
406
|
+
const g = {
|
|
399
407
|
action: "disable",
|
|
400
408
|
id: "",
|
|
401
409
|
name: ""
|
|
402
410
|
};
|
|
403
|
-
if (
|
|
404
|
-
const { enabled:
|
|
405
|
-
|
|
411
|
+
if (O.value) {
|
|
412
|
+
const { enabled: m, id: C, name: W } = O.value;
|
|
413
|
+
g.action = m ? "disable" : "enable", g.id = C, g.name = W || C;
|
|
406
414
|
}
|
|
407
|
-
return
|
|
408
|
-
}),
|
|
409
|
-
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
},
|
|
413
|
-
var
|
|
414
|
-
if (!await ((
|
|
415
|
+
return g;
|
|
416
|
+
}), Pe = (g) => {
|
|
417
|
+
ue.value = !0, O.value = g;
|
|
418
|
+
}, oe = () => {
|
|
419
|
+
ue.value = !1, O.value = null;
|
|
420
|
+
}, Ve = async () => {
|
|
421
|
+
var W, pe;
|
|
422
|
+
if (!await ((W = p.canEdit) == null ? void 0 : W.call(p, O.value)) || !O.value)
|
|
415
423
|
return;
|
|
416
|
-
const
|
|
424
|
+
const m = `${ge.value.href}/${O.value.id}`, C = !O.value.enabled;
|
|
417
425
|
try {
|
|
418
|
-
const { data:
|
|
419
|
-
|
|
420
|
-
} catch (
|
|
421
|
-
|
|
426
|
+
const { data: N } = ((pe = p.config) == null ? void 0 : pe.app) === "konnect" ? await Q.put(m, { ...O.value, enabled: C }) : await Q.patch(m, { ...O.value, enabled: C });
|
|
427
|
+
y("toggle:success", N), O.value.enabled = C;
|
|
428
|
+
} catch (N) {
|
|
429
|
+
y("error", N);
|
|
422
430
|
}
|
|
423
|
-
}, Ce = (
|
|
424
|
-
p.config.getControlPlaneRoute &&
|
|
425
|
-
},
|
|
426
|
-
const
|
|
427
|
-
if (!await
|
|
428
|
-
|
|
429
|
-
entity:
|
|
431
|
+
}, Ce = (g) => {
|
|
432
|
+
p.config.getControlPlaneRoute && M.push(p.config.getControlPlaneRoute(g));
|
|
433
|
+
}, fe = async (g, m) => {
|
|
434
|
+
const C = g.id;
|
|
435
|
+
if (!await m(C)) {
|
|
436
|
+
y("copy:error", {
|
|
437
|
+
entity: g,
|
|
430
438
|
field: "id",
|
|
431
|
-
message:
|
|
439
|
+
message: s("errors.copy")
|
|
432
440
|
});
|
|
433
441
|
return;
|
|
434
442
|
}
|
|
435
|
-
|
|
436
|
-
entity:
|
|
443
|
+
y("copy:success", {
|
|
444
|
+
entity: g,
|
|
437
445
|
field: "id",
|
|
438
|
-
message:
|
|
446
|
+
message: s("copy.success", { val: C })
|
|
439
447
|
});
|
|
440
|
-
},
|
|
441
|
-
const
|
|
442
|
-
if (!await
|
|
443
|
-
|
|
444
|
-
entity:
|
|
445
|
-
message:
|
|
448
|
+
}, _e = async (g, m) => {
|
|
449
|
+
const C = JSON.stringify(g);
|
|
450
|
+
if (!await m(C)) {
|
|
451
|
+
y("copy:error", {
|
|
452
|
+
entity: g,
|
|
453
|
+
message: s("errors.copy")
|
|
446
454
|
});
|
|
447
455
|
return;
|
|
448
456
|
}
|
|
449
|
-
|
|
450
|
-
entity:
|
|
451
|
-
message:
|
|
457
|
+
y("copy:success", {
|
|
458
|
+
entity: g,
|
|
459
|
+
message: s("copy.success_brief")
|
|
452
460
|
});
|
|
453
|
-
},
|
|
454
|
-
var
|
|
455
|
-
await ((
|
|
456
|
-
},
|
|
457
|
-
label:
|
|
458
|
-
to: p.config.getViewRoute(
|
|
459
|
-
}),
|
|
460
|
-
label:
|
|
461
|
-
to: p.config.getEditRoute(
|
|
462
|
-
}),
|
|
463
|
-
|
|
464
|
-
},
|
|
465
|
-
|
|
466
|
-
},
|
|
467
|
-
var
|
|
468
|
-
if ((
|
|
469
|
-
|
|
461
|
+
}, be = async (g) => {
|
|
462
|
+
var C;
|
|
463
|
+
await ((C = p.canRetrieve) == null ? void 0 : C.call(p, g)) && M.push(p.config.getViewRoute(g.id));
|
|
464
|
+
}, Ee = (g) => ({
|
|
465
|
+
label: s("actions.view"),
|
|
466
|
+
to: p.config.getViewRoute(g)
|
|
467
|
+
}), ee = (g) => ({
|
|
468
|
+
label: s("actions.edit"),
|
|
469
|
+
to: p.config.getEditRoute(g)
|
|
470
|
+
}), H = q(void 0), Z = q(!1), te = q(!1), ae = q(""), i = pt(p.config, x.value), u = (g) => {
|
|
471
|
+
H.value = g, Z.value = !0, ae.value = "";
|
|
472
|
+
}, V = () => {
|
|
473
|
+
Z.value = !1, H.value = void 0;
|
|
474
|
+
}, X = async () => {
|
|
475
|
+
var g, m, C;
|
|
476
|
+
if ((g = H.value) != null && g.id) {
|
|
477
|
+
te.value = !0;
|
|
470
478
|
try {
|
|
471
|
-
await
|
|
472
|
-
} catch (
|
|
473
|
-
|
|
479
|
+
await Q.delete(i(H.value.id)), y("delete:success", H.value), V(), re.value++;
|
|
480
|
+
} catch (W) {
|
|
481
|
+
ae.value = ((C = (m = W.response) == null ? void 0 : m.data) == null ? void 0 : C.message) || W.message || s("errors.delete"), y("error", W);
|
|
474
482
|
} finally {
|
|
475
|
-
|
|
483
|
+
te.value = !1;
|
|
476
484
|
}
|
|
477
485
|
}
|
|
478
|
-
},
|
|
479
|
-
|
|
486
|
+
}, L = () => {
|
|
487
|
+
M.push(p.config.createRoute);
|
|
480
488
|
};
|
|
481
|
-
|
|
482
|
-
var
|
|
483
|
-
if (
|
|
484
|
-
|
|
485
|
-
title:
|
|
486
|
-
}, (
|
|
489
|
+
$e(w, (g) => {
|
|
490
|
+
var m, C, W;
|
|
491
|
+
if (g.status === mt.Error) {
|
|
492
|
+
e.value = {
|
|
493
|
+
title: s("errors.general")
|
|
494
|
+
}, (W = (C = (m = g.error) == null ? void 0 : m.response) == null ? void 0 : C.data) != null && W.message && (e.value.message = g.error.response.data.message), y("error", g.error);
|
|
487
495
|
return;
|
|
488
496
|
}
|
|
489
|
-
|
|
497
|
+
e.value = null;
|
|
490
498
|
});
|
|
491
|
-
const
|
|
492
|
-
return
|
|
493
|
-
|
|
494
|
-
}), (
|
|
495
|
-
const
|
|
496
|
-
return
|
|
497
|
-
|
|
499
|
+
const T = q(!1);
|
|
500
|
+
return it(async () => {
|
|
501
|
+
T.value = await p.canCreate();
|
|
502
|
+
}), (g, m) => {
|
|
503
|
+
const C = G("KButton"), W = G("KBadge"), pe = G("KInputSwitch"), N = G("KDropdownItem"), me = G("KClipboardProvider");
|
|
504
|
+
return S(), $("div", Mt, [
|
|
505
|
+
d(l(vt), {
|
|
498
506
|
"cache-identifier": n.cacheIdentifier,
|
|
499
|
-
"default-table-preferences":
|
|
500
|
-
"disable-sorting":
|
|
501
|
-
"empty-state-options":
|
|
507
|
+
"default-table-preferences": we,
|
|
508
|
+
"disable-sorting": ce.value,
|
|
509
|
+
"empty-state-options": A.value,
|
|
502
510
|
"enable-entity-actions": "",
|
|
503
|
-
"error-message":
|
|
504
|
-
fetcher: l(
|
|
505
|
-
"fetcher-cache-key": l(
|
|
511
|
+
"error-message": e.value,
|
|
512
|
+
fetcher: l(o),
|
|
513
|
+
"fetcher-cache-key": l(re),
|
|
506
514
|
"pagination-type": "offset",
|
|
507
515
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
508
|
-
query:
|
|
509
|
-
"table-headers": l(
|
|
510
|
-
onClearSearchInput:
|
|
511
|
-
"onClick:row":
|
|
512
|
-
onSort:
|
|
513
|
-
onState: l(
|
|
516
|
+
query: z.value,
|
|
517
|
+
"table-headers": l(de),
|
|
518
|
+
onClearSearchInput: ye,
|
|
519
|
+
"onClick:row": m[5] || (m[5] = (h) => be(h)),
|
|
520
|
+
onSort: ke,
|
|
521
|
+
onState: l(D)
|
|
514
522
|
}, Re({
|
|
515
523
|
"toolbar-filter": v(() => [
|
|
516
|
-
|
|
517
|
-
modelValue:
|
|
518
|
-
"onUpdate:modelValue":
|
|
519
|
-
config:
|
|
524
|
+
d(l(gt), {
|
|
525
|
+
modelValue: z.value,
|
|
526
|
+
"onUpdate:modelValue": m[0] || (m[0] = (h) => z.value = h),
|
|
527
|
+
config: Ie.value
|
|
520
528
|
}, null, 8, ["modelValue", "config"])
|
|
521
529
|
]),
|
|
522
530
|
"toolbar-button": v(() => [
|
|
523
|
-
(
|
|
531
|
+
(S(), Ue(ze, {
|
|
524
532
|
disabled: !n.useActionOutside,
|
|
525
533
|
to: "#kong-ui-app-page-header-action-button"
|
|
526
534
|
}, [
|
|
527
|
-
|
|
528
|
-
|
|
535
|
+
I("div", Bt, [
|
|
536
|
+
P.value ? (S(), Ue(C, {
|
|
529
537
|
key: 0,
|
|
530
538
|
appearance: "secondary",
|
|
531
539
|
class: "open-learning-hub",
|
|
532
540
|
"data-testid": "gateway-services-learn-more-button",
|
|
533
541
|
icon: "",
|
|
534
|
-
onClick:
|
|
542
|
+
onClick: m[1] || (m[1] = (h) => g.$emit("click:learn-more"))
|
|
535
543
|
}, {
|
|
536
544
|
default: v(() => [
|
|
537
|
-
|
|
545
|
+
d(l(Ze), { decorative: "" })
|
|
538
546
|
]),
|
|
539
547
|
_: 1
|
|
540
|
-
})) :
|
|
541
|
-
|
|
548
|
+
})) : B("", !0),
|
|
549
|
+
d(l(Fe), {
|
|
542
550
|
"auth-function": () => n.canCreate()
|
|
543
551
|
}, {
|
|
544
552
|
default: v(() => [
|
|
545
|
-
|
|
553
|
+
d(C, {
|
|
546
554
|
appearance: "primary",
|
|
547
555
|
"data-testid": "toolbar-add-gateway-service",
|
|
548
556
|
size: n.useActionOutside ? "medium" : "large",
|
|
549
557
|
to: n.config.createRoute
|
|
550
558
|
}, {
|
|
551
559
|
default: v(() => [
|
|
552
|
-
|
|
553
|
-
|
|
560
|
+
d(l(at)),
|
|
561
|
+
J(" " + E(l(s)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
554
562
|
]),
|
|
555
563
|
_: 1
|
|
556
564
|
}, 8, ["size", "to"])
|
|
@@ -560,120 +568,120 @@ const fe = {
|
|
|
560
568
|
])
|
|
561
569
|
], 8, ["disabled"]))
|
|
562
570
|
]),
|
|
563
|
-
name: v(({ rowValue:
|
|
564
|
-
|
|
571
|
+
name: v(({ rowValue: h }) => [
|
|
572
|
+
I("b", null, E(h ?? "-"), 1)
|
|
565
573
|
]),
|
|
566
|
-
control_plane: v(({ row:
|
|
567
|
-
var
|
|
574
|
+
control_plane: v(({ row: h }) => {
|
|
575
|
+
var t;
|
|
568
576
|
return [
|
|
569
|
-
(
|
|
577
|
+
(t = h.x_meta) != null && t.cluster_id ? (S(), Ue(W, {
|
|
570
578
|
key: 0,
|
|
571
|
-
tooltip:
|
|
579
|
+
tooltip: h.x_meta.cluster_id,
|
|
572
580
|
"truncation-tooltip": "",
|
|
573
|
-
onClick:
|
|
581
|
+
onClick: We((a) => Ce(h.x_meta.cluster_id), ["stop"])
|
|
574
582
|
}, {
|
|
575
583
|
default: v(() => [
|
|
576
|
-
|
|
584
|
+
J(E(h.x_meta.cluster_id), 1)
|
|
577
585
|
]),
|
|
578
586
|
_: 2
|
|
579
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
587
|
+
}, 1032, ["tooltip", "onClick"])) : (S(), $("b", Lt, "-"))
|
|
580
588
|
];
|
|
581
589
|
}),
|
|
582
|
-
enabled: v(({ row:
|
|
583
|
-
|
|
584
|
-
"auth-function": () => n.canEdit(
|
|
590
|
+
enabled: v(({ row: h }) => [
|
|
591
|
+
d(l(Fe), {
|
|
592
|
+
"auth-function": () => n.canEdit(h),
|
|
585
593
|
"force-show": ""
|
|
586
594
|
}, {
|
|
587
|
-
default: v(({ isAllowed:
|
|
588
|
-
|
|
589
|
-
onClick:
|
|
595
|
+
default: v(({ isAllowed: t }) => [
|
|
596
|
+
I("div", {
|
|
597
|
+
onClick: m[4] || (m[4] = We(() => {
|
|
590
598
|
}, ["stop"]))
|
|
591
599
|
}, [
|
|
592
|
-
|
|
593
|
-
modelValue:
|
|
594
|
-
"onUpdate:modelValue": (
|
|
595
|
-
"data-testid": `row-${
|
|
596
|
-
disabled: !
|
|
597
|
-
onClick:
|
|
600
|
+
d(pe, {
|
|
601
|
+
modelValue: h.enabled,
|
|
602
|
+
"onUpdate:modelValue": (a) => h.enabled = a,
|
|
603
|
+
"data-testid": `row-${h.id}-toggle-input`,
|
|
604
|
+
disabled: !t,
|
|
605
|
+
onClick: We((a) => Pe(h), ["prevent"])
|
|
598
606
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
599
607
|
])
|
|
600
608
|
]),
|
|
601
609
|
_: 2
|
|
602
610
|
}, 1032, ["auth-function"])
|
|
603
611
|
]),
|
|
604
|
-
tags: v(({ rowValue:
|
|
605
|
-
|
|
612
|
+
tags: v(({ rowValue: h }) => [
|
|
613
|
+
d(l(yt), { tags: h }, null, 8, ["tags"])
|
|
606
614
|
]),
|
|
607
|
-
created_at: v(({ rowValue:
|
|
608
|
-
|
|
615
|
+
created_at: v(({ rowValue: h }) => [
|
|
616
|
+
J(E(l(b)(h)), 1)
|
|
609
617
|
]),
|
|
610
|
-
updated_at: v(({ row:
|
|
611
|
-
|
|
618
|
+
updated_at: v(({ row: h, rowValue: t }) => [
|
|
619
|
+
J(E(l(b)(t ?? h.created_at)), 1)
|
|
612
620
|
]),
|
|
613
|
-
actions: v(({ row:
|
|
614
|
-
|
|
615
|
-
default: v(({ copyToClipboard:
|
|
616
|
-
|
|
621
|
+
actions: v(({ row: h }) => [
|
|
622
|
+
d(me, null, {
|
|
623
|
+
default: v(({ copyToClipboard: t }) => [
|
|
624
|
+
d(N, {
|
|
617
625
|
"data-testid": "action-entity-copy-id",
|
|
618
|
-
onClick: (
|
|
626
|
+
onClick: (a) => fe(h, t)
|
|
619
627
|
}, {
|
|
620
628
|
default: v(() => [
|
|
621
|
-
|
|
629
|
+
J(E(l(s)("actions.copy_id")), 1)
|
|
622
630
|
]),
|
|
623
631
|
_: 2
|
|
624
632
|
}, 1032, ["onClick"])
|
|
625
633
|
]),
|
|
626
634
|
_: 2
|
|
627
635
|
}, 1024),
|
|
628
|
-
|
|
629
|
-
default: v(({ copyToClipboard:
|
|
630
|
-
|
|
636
|
+
d(me, null, {
|
|
637
|
+
default: v(({ copyToClipboard: t }) => [
|
|
638
|
+
d(N, {
|
|
631
639
|
"data-testid": "action-entity-copy-json",
|
|
632
|
-
onClick: (
|
|
640
|
+
onClick: (a) => _e(h, t)
|
|
633
641
|
}, {
|
|
634
642
|
default: v(() => [
|
|
635
|
-
|
|
643
|
+
J(E(l(s)("actions.copy_json")), 1)
|
|
636
644
|
]),
|
|
637
645
|
_: 2
|
|
638
646
|
}, 1032, ["onClick"])
|
|
639
647
|
]),
|
|
640
648
|
_: 2
|
|
641
649
|
}, 1024),
|
|
642
|
-
|
|
643
|
-
"auth-function": () => n.canRetrieve(
|
|
650
|
+
d(l(Fe), {
|
|
651
|
+
"auth-function": () => n.canRetrieve(h)
|
|
644
652
|
}, {
|
|
645
653
|
default: v(() => [
|
|
646
|
-
|
|
654
|
+
d(N, {
|
|
647
655
|
"data-testid": "action-entity-view",
|
|
648
656
|
"has-divider": "",
|
|
649
|
-
item:
|
|
657
|
+
item: Ee(h.id)
|
|
650
658
|
}, null, 8, ["item"])
|
|
651
659
|
]),
|
|
652
660
|
_: 2
|
|
653
661
|
}, 1032, ["auth-function"]),
|
|
654
|
-
|
|
655
|
-
"auth-function": () => n.canEdit(
|
|
662
|
+
d(l(Fe), {
|
|
663
|
+
"auth-function": () => n.canEdit(h)
|
|
656
664
|
}, {
|
|
657
665
|
default: v(() => [
|
|
658
|
-
|
|
666
|
+
d(N, {
|
|
659
667
|
"data-testid": "action-entity-edit",
|
|
660
|
-
item:
|
|
668
|
+
item: ee(h.id)
|
|
661
669
|
}, null, 8, ["item"])
|
|
662
670
|
]),
|
|
663
671
|
_: 2
|
|
664
672
|
}, 1032, ["auth-function"]),
|
|
665
|
-
|
|
666
|
-
"auth-function": () => n.canDelete(
|
|
673
|
+
d(l(Fe), {
|
|
674
|
+
"auth-function": () => n.canDelete(h)
|
|
667
675
|
}, {
|
|
668
676
|
default: v(() => [
|
|
669
|
-
|
|
677
|
+
d(N, {
|
|
670
678
|
danger: "",
|
|
671
679
|
"data-testid": "action-entity-delete",
|
|
672
680
|
"has-divider": "",
|
|
673
|
-
onClick: (
|
|
681
|
+
onClick: (t) => u(h)
|
|
674
682
|
}, {
|
|
675
683
|
default: v(() => [
|
|
676
|
-
|
|
684
|
+
J(E(l(s)("actions.delete.menu_label")), 1)
|
|
677
685
|
]),
|
|
678
686
|
_: 2
|
|
679
687
|
}, 1032, ["onClick"])
|
|
@@ -683,25 +691,48 @@ const fe = {
|
|
|
683
691
|
]),
|
|
684
692
|
_: 2
|
|
685
693
|
}, [
|
|
686
|
-
!
|
|
694
|
+
!l(r) && ie.value ? {
|
|
695
|
+
name: "outside-actions",
|
|
696
|
+
fn: v(() => [
|
|
697
|
+
(S(), Ue(ze, {
|
|
698
|
+
disabled: !n.useActionOutside,
|
|
699
|
+
to: "#kong-ui-app-page-header-action-button"
|
|
700
|
+
}, [
|
|
701
|
+
d(C, {
|
|
702
|
+
appearance: "secondary",
|
|
703
|
+
class: "open-learning-hub",
|
|
704
|
+
"data-testid": "gateway-services-more-button",
|
|
705
|
+
icon: "",
|
|
706
|
+
onClick: m[2] || (m[2] = (h) => g.$emit("click:learn-more"))
|
|
707
|
+
}, {
|
|
708
|
+
default: v(() => [
|
|
709
|
+
d(l(Ze), { decorative: "" })
|
|
710
|
+
]),
|
|
711
|
+
_: 1
|
|
712
|
+
})
|
|
713
|
+
], 8, ["disabled"]))
|
|
714
|
+
]),
|
|
715
|
+
key: "0"
|
|
716
|
+
} : void 0,
|
|
717
|
+
!z.value && n.enableV2EmptyStates && n.config.app === "konnect" ? {
|
|
687
718
|
name: "empty-state",
|
|
688
719
|
fn: v(() => {
|
|
689
|
-
var
|
|
720
|
+
var h;
|
|
690
721
|
return [
|
|
691
|
-
|
|
692
|
-
"action-button-text": l(
|
|
722
|
+
d(l(_t), {
|
|
723
|
+
"action-button-text": l(s)("gateway_services.empty_state_v2.create"),
|
|
693
724
|
appearance: "secondary",
|
|
694
725
|
"can-create": () => n.canCreate(),
|
|
695
726
|
"data-testid": "gateway-services-entity-empty-state",
|
|
696
|
-
description: l(
|
|
727
|
+
description: l(s)("gateway_services.empty_state_v2.description"),
|
|
697
728
|
"learn-more": n.config.app === "konnect",
|
|
698
|
-
title: l(
|
|
699
|
-
"onClick:create":
|
|
700
|
-
"onClick:learnMore":
|
|
729
|
+
title: l(s)("gateway_services.empty_state_v2.title"),
|
|
730
|
+
"onClick:create": L,
|
|
731
|
+
"onClick:learnMore": m[3] || (m[3] = (t) => g.$emit("click:learn-more"))
|
|
701
732
|
}, Re({
|
|
702
733
|
image: v(() => [
|
|
703
|
-
|
|
704
|
-
|
|
734
|
+
I("div", Kt, [
|
|
735
|
+
d(l(nt), {
|
|
705
736
|
color: l(Tt),
|
|
706
737
|
size: l(Rt)
|
|
707
738
|
}, null, 8, ["color", "size"])
|
|
@@ -709,49 +740,49 @@ const fe = {
|
|
|
709
740
|
]),
|
|
710
741
|
_: 2
|
|
711
742
|
}, [
|
|
712
|
-
(
|
|
743
|
+
(h = n.config) != null && h.isControlPlaneGroup ? {
|
|
713
744
|
name: "message",
|
|
714
745
|
fn: v(() => [
|
|
715
|
-
|
|
746
|
+
J(E(l(s)("gateway_services.empty_state_v2.group")), 1)
|
|
716
747
|
]),
|
|
717
748
|
key: "0"
|
|
718
749
|
} : void 0
|
|
719
750
|
]), 1032, ["action-button-text", "can-create", "description", "learn-more", "title"])
|
|
720
751
|
];
|
|
721
752
|
}),
|
|
722
|
-
key: "
|
|
753
|
+
key: "1"
|
|
723
754
|
} : void 0
|
|
724
755
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
725
|
-
|
|
726
|
-
action:
|
|
727
|
-
"entity-id":
|
|
728
|
-
"entity-name":
|
|
729
|
-
"entity-type": l(
|
|
730
|
-
"on-confirm":
|
|
731
|
-
visible:
|
|
732
|
-
onCancel:
|
|
733
|
-
onProceed:
|
|
756
|
+
d(l(bt), {
|
|
757
|
+
action: se.value.action,
|
|
758
|
+
"entity-id": se.value.id,
|
|
759
|
+
"entity-name": se.value.name,
|
|
760
|
+
"entity-type": l(s)("glossary.gateway_services"),
|
|
761
|
+
"on-confirm": Ve,
|
|
762
|
+
visible: ue.value,
|
|
763
|
+
onCancel: oe,
|
|
764
|
+
onProceed: oe
|
|
734
765
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
735
|
-
|
|
736
|
-
"action-pending":
|
|
737
|
-
description: l(
|
|
738
|
-
"entity-name":
|
|
766
|
+
d(l(ht), {
|
|
767
|
+
"action-pending": te.value,
|
|
768
|
+
description: l(s)("actions.delete.description"),
|
|
769
|
+
"entity-name": H.value && (H.value.name || H.value.id),
|
|
739
770
|
"entity-type": l(wt).GatewayService,
|
|
740
|
-
error:
|
|
741
|
-
title: l(
|
|
742
|
-
visible:
|
|
743
|
-
onCancel:
|
|
744
|
-
onProceed:
|
|
771
|
+
error: ae.value,
|
|
772
|
+
title: l(s)("actions.delete.title"),
|
|
773
|
+
visible: Z.value,
|
|
774
|
+
onCancel: V,
|
|
775
|
+
onProceed: X
|
|
745
776
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
746
777
|
]);
|
|
747
778
|
};
|
|
748
779
|
}
|
|
749
|
-
}), je = (n,
|
|
750
|
-
const
|
|
751
|
-
for (const [p,
|
|
752
|
-
|
|
753
|
-
return
|
|
754
|
-
}, Ml = /* @__PURE__ */ je(
|
|
780
|
+
}), je = (n, K) => {
|
|
781
|
+
const y = n.__vccOpts || n;
|
|
782
|
+
for (const [p, s] of K)
|
|
783
|
+
y[p] = s;
|
|
784
|
+
return y;
|
|
785
|
+
}, Ml = /* @__PURE__ */ je(Wt, [["__scopeId", "data-v-210f19c5"]]), Dt = { class: "kong-ui-entities-gateway-service-form" }, qt = { key: 0 }, Gt = { class: "gateway-service-form-traffic-label" }, Ot = { class: "gateway-service-form-margin-bottom" }, Nt = {
|
|
755
786
|
key: 0,
|
|
756
787
|
class: "gateway-service-form-group-fields"
|
|
757
788
|
}, jt = {
|
|
@@ -772,7 +803,7 @@ const fe = {
|
|
|
772
803
|
}, ol = {
|
|
773
804
|
key: 1,
|
|
774
805
|
class: "checkbox-aligned-radio"
|
|
775
|
-
}, il = /* @__PURE__ */
|
|
806
|
+
}, il = /* @__PURE__ */ Le({
|
|
776
807
|
__name: "LegacyGatewayServiceForm",
|
|
777
808
|
props: {
|
|
778
809
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -795,9 +826,9 @@ const fe = {
|
|
|
795
826
|
}
|
|
796
827
|
},
|
|
797
828
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
798
|
-
setup(n, { expose:
|
|
799
|
-
var
|
|
800
|
-
const p =
|
|
829
|
+
setup(n, { expose: K, emit: y }) {
|
|
830
|
+
var ae;
|
|
831
|
+
const p = y, s = n, b = q(!0), M = Ge(), { i18nT: Q, i18n: { t: r } } = ne.useI18n(), { getMessageFromError: D } = Ye(), { axiosInstance: P } = Oe((ae = s.config) == null ? void 0 : ae.axiosRequestConfig), ie = et(), ce = k(() => ve.form[s.config.app].edit), Y = k(() => s.gatewayServiceId ? Be.Edit : Be.Create), we = q(!1), de = k(() => !!s.gatewayServiceId), x = q(de.value ? "protocol" : "url"), ge = ne.usePortFromProtocol(), z = q(""), Ie = k(() => !!z.value), o = Me({
|
|
801
832
|
fields: {
|
|
802
833
|
name: "",
|
|
803
834
|
protocol: "http",
|
|
@@ -817,7 +848,7 @@ const fe = {
|
|
|
817
848
|
},
|
|
818
849
|
isReadonly: !1,
|
|
819
850
|
errorMessage: ""
|
|
820
|
-
}),
|
|
851
|
+
}), w = Me({
|
|
821
852
|
name: "",
|
|
822
853
|
protocol: "http",
|
|
823
854
|
host: "",
|
|
@@ -833,13 +864,13 @@ const fe = {
|
|
|
833
864
|
tls_verify_enabled: !1,
|
|
834
865
|
tls_verify_value: !1,
|
|
835
866
|
tags: ""
|
|
836
|
-
}),
|
|
837
|
-
gatewayInfo:
|
|
867
|
+
}), re = s.config.app === "konnect" || tt({
|
|
868
|
+
gatewayInfo: s.config.gatewayInfo,
|
|
838
869
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
839
870
|
supportedRange: {
|
|
840
871
|
enterprise: ["3.0"]
|
|
841
872
|
}
|
|
842
|
-
}),
|
|
873
|
+
}), ye = [
|
|
843
874
|
{
|
|
844
875
|
label: r("gateway_services.form.fields.protocol.options.http"),
|
|
845
876
|
value: "http",
|
|
@@ -875,7 +906,7 @@ const fe = {
|
|
|
875
906
|
value: "grpcs",
|
|
876
907
|
group: "grpc"
|
|
877
908
|
},
|
|
878
|
-
...
|
|
909
|
+
...re ? [
|
|
879
910
|
{
|
|
880
911
|
label: r("gateway_services.form.fields.protocol.options.ws"),
|
|
881
912
|
value: "ws",
|
|
@@ -892,60 +923,60 @@ const fe = {
|
|
|
892
923
|
value: "udp",
|
|
893
924
|
group: "udp"
|
|
894
925
|
}
|
|
895
|
-
],
|
|
896
|
-
|
|
897
|
-
},
|
|
898
|
-
|
|
899
|
-
},
|
|
900
|
-
if (o.fields.url &&
|
|
926
|
+
], ke = { url: "url", protocol: "protocol" }, e = (i, u) => {
|
|
927
|
+
u.value;
|
|
928
|
+
}, A = (i) => i ? parseFloat(i) : 0, ue = () => {
|
|
929
|
+
b.value = !0, o.errorMessage = "", o.fields.host = w.host, o.fields.path = w.path, o.fields.port = w.port, o.fields.protocol = w.protocol, o.fields.url = w.url, o.fields.retries = w.retries, o.fields.connect_timeout = w.connect_timeout, o.fields.write_timeout = w.write_timeout, o.fields.read_timeout = w.read_timeout, o.fields.client_certificate = w.client_certificate, o.fields.ca_certificates = w.ca_certificates, o.fields.tls_verify_enabled = w.tls_verify_enabled, o.fields.tls_verify_value = w.tls_verify_value;
|
|
930
|
+
}, O = () => {
|
|
931
|
+
if (o.fields.url && x.value === "url")
|
|
901
932
|
try {
|
|
902
933
|
const i = new URL(o.fields.url);
|
|
903
934
|
o.errorMessage = "", o.fields.protocol = i.protocol.slice(0, -1), o.fields.host = i.hostname, o.fields.path = i.pathname;
|
|
904
|
-
const
|
|
905
|
-
|
|
935
|
+
const u = Number(i.port);
|
|
936
|
+
we.value = !!u, o.fields.port = u || ge.getPortFromProtocol(o.fields.protocol), o.errorMessage = "", p("url-valid:success");
|
|
906
937
|
} catch (i) {
|
|
907
|
-
o.errorMessage = r("errors.urlErrorMessage"), p("url-valid:error",
|
|
938
|
+
o.errorMessage = r("errors.urlErrorMessage"), p("url-valid:error", D(i));
|
|
908
939
|
}
|
|
909
940
|
else
|
|
910
941
|
p("url-valid:success"), o.errorMessage = "";
|
|
911
|
-
},
|
|
912
|
-
if (
|
|
942
|
+
}, se = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(o.fields.protocol)), Pe = k(() => {
|
|
943
|
+
if (x.value === "url")
|
|
913
944
|
return !0;
|
|
914
945
|
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
915
|
-
return
|
|
916
|
-
}),
|
|
917
|
-
if (
|
|
946
|
+
return x.value === "protocol" && i;
|
|
947
|
+
}), oe = k(() => {
|
|
948
|
+
if (x.value === "url")
|
|
918
949
|
return !0;
|
|
919
950
|
const i = ["https", "tls"].includes(o.fields.protocol);
|
|
920
|
-
return
|
|
921
|
-
}),
|
|
922
|
-
if (
|
|
951
|
+
return x.value === "protocol" && i;
|
|
952
|
+
}), Ve = k(() => {
|
|
953
|
+
if (x.value === "url")
|
|
923
954
|
return !0;
|
|
924
955
|
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
925
|
-
return
|
|
926
|
-
}),
|
|
927
|
-
|
|
928
|
-
},
|
|
929
|
-
var
|
|
930
|
-
o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((
|
|
956
|
+
return x.value === "protocol" && i;
|
|
957
|
+
}), Ce = (i) => {
|
|
958
|
+
z.value = ie.utf8Name(i);
|
|
959
|
+
}, fe = k(() => de.value && JSON.stringify(o.fields) !== JSON.stringify(w) || x.value === "url" && !!o.fields.url || x.value === "protocol" && !!o.fields.host), _e = (i) => {
|
|
960
|
+
var u, V, X;
|
|
961
|
+
o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((u = i == null ? void 0 : i.tags) == null ? void 0 : u.join(", ")) || "", o.fields.protocol = (i == null ? void 0 : i.protocol) || "http", o.fields.path = (i == null ? void 0 : i.path) || "", o.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, o.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, o.fields.host = (i == null ? void 0 : i.host) || "", o.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, o.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, o.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, o.fields.ca_certificates = ((V = i == null ? void 0 : i.ca_certificates) == null ? void 0 : V.join(",")) || "", o.fields.client_certificate = ((X = i == null ? void 0 : i.client_certificate) == null ? void 0 : X.id) || "", o.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, o.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(w, o.fields);
|
|
931
962
|
}, be = () => {
|
|
932
|
-
|
|
963
|
+
M.push(s.config.cancelRoute);
|
|
933
964
|
}, Ee = k(() => {
|
|
934
|
-
var
|
|
935
|
-
let i = `${
|
|
936
|
-
return
|
|
937
|
-
}),
|
|
938
|
-
var
|
|
939
|
-
let i = `${
|
|
940
|
-
return
|
|
941
|
-
}),
|
|
942
|
-
let
|
|
943
|
-
i.url && (
|
|
944
|
-
},
|
|
945
|
-
var
|
|
965
|
+
var u, V;
|
|
966
|
+
let i = `${s.config.apiBaseUrl}${ve.form[s.config.app].validate}`;
|
|
967
|
+
return s.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((u = s.config) == null ? void 0 : u.controlPlaneId) || "") : s.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = s.config) != null && V.workspace ? `/${s.config.workspace}` : "")), i = i.replace(/{id}/gi, s.gatewayServiceId), i;
|
|
968
|
+
}), ee = k(() => {
|
|
969
|
+
var u, V;
|
|
970
|
+
let i = `${s.config.apiBaseUrl}${ve.form[s.config.app][Y.value]}`;
|
|
971
|
+
return s.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((u = s.config) == null ? void 0 : u.controlPlaneId) || "") : s.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = s.config) != null && V.workspace ? `/${s.config.workspace}` : "")), i = i.replace(/{id}/gi, s.gatewayServiceId), i;
|
|
972
|
+
}), H = (i) => {
|
|
973
|
+
let u = "";
|
|
974
|
+
i.url && (u = new URL(i.url).protocol), (["https", "wss", "tls"].includes(i.protocol) || ["https", "wss", "tls"].includes(u)) && (i.tls_verify = i.tls_verify_enabled ? i.tls_verify_value : null), delete i.tls_verify_enabled, delete i.tls_verify_value;
|
|
975
|
+
}, Z = k(() => {
|
|
976
|
+
var u, V, X, L;
|
|
946
977
|
const i = {
|
|
947
978
|
name: o.fields.name || null,
|
|
948
|
-
tags: o.fields.tags ? (
|
|
979
|
+
tags: o.fields.tags ? (X = (V = (u = o.fields.tags) == null ? void 0 : u.split(",")) == null ? void 0 : V.map((T) => String(T || "").trim())) == null ? void 0 : X.filter((T) => T !== "") : null,
|
|
949
980
|
protocol: o.fields.protocol,
|
|
950
981
|
path: o.fields.path || null,
|
|
951
982
|
read_timeout: o.fields.read_timeout,
|
|
@@ -954,83 +985,83 @@ const fe = {
|
|
|
954
985
|
connect_timeout: o.fields.connect_timeout,
|
|
955
986
|
tls_verify_value: o.fields.tls_verify_value,
|
|
956
987
|
tls_verify_enabled: o.fields.tls_verify_enabled,
|
|
957
|
-
ca_certificates: o.fields.ca_certificates ? (
|
|
988
|
+
ca_certificates: o.fields.ca_certificates ? (L = o.fields.ca_certificates) == null ? void 0 : L.split(",").filter((T) => T !== "") : null,
|
|
958
989
|
client_certificate: o.fields.client_certificate ? { id: o.fields.client_certificate } : null,
|
|
959
990
|
write_timeout: o.fields.write_timeout,
|
|
960
991
|
port: o.fields.port,
|
|
961
992
|
url: o.fields.url
|
|
962
993
|
};
|
|
963
|
-
return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value),
|
|
994
|
+
return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value), se.value || (i.path = null), Y.value === "create" ? x.value === "url" ? (delete i.protocol, delete i.host, delete i.path, s.config.app === "konnect" && delete i.port) : delete i.url : Y.value === "edit" && delete i.url, i;
|
|
964
995
|
}), te = async () => {
|
|
965
|
-
var i,
|
|
996
|
+
var i, u, V, X;
|
|
966
997
|
try {
|
|
967
|
-
o.isReadonly = !0,
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
let
|
|
971
|
-
if (await
|
|
972
|
-
const { data:
|
|
973
|
-
o.fields.name = (
|
|
998
|
+
o.isReadonly = !0, O();
|
|
999
|
+
const L = Z.value;
|
|
1000
|
+
H(L);
|
|
1001
|
+
let T;
|
|
1002
|
+
if (await P.post(Ee.value, L), Y.value === "create" ? T = await P.post(ee.value, L) : Y.value === "edit" && (T = ((i = s.config) == null ? void 0 : i.app) === "konnect" ? await P.put(ee.value, L) : await P.patch(ee.value, L)), T) {
|
|
1003
|
+
const { data: c } = T;
|
|
1004
|
+
o.fields.name = (c == null ? void 0 : c.name) || "", o.fields.port = c.port || ge.getPortFromProtocol(c.protocol), o.fields.protocol = (c == null ? void 0 : c.protocol) || "http", o.fields.host = (c == null ? void 0 : c.host) || "", o.fields.path = (c == null ? void 0 : c.path) || "", o.fields.url = (c == null ? void 0 : c.url) || "", o.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, o.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, o.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, o.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, o.fields.client_certificate = ((u = c == null ? void 0 : c.client_certificate) == null ? void 0 : u.id) || "", o.fields.ca_certificates = (V = c == null ? void 0 : c.ca_certificates) != null && V.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", o.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, o.fields.tls_verify_value = o.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), o.fields.tags = (X = c == null ? void 0 : c.tags) != null && X.length ? c.tags.join(", ") : "", Object.assign(w, o.fields), p("update", T == null ? void 0 : T.data);
|
|
974
1005
|
}
|
|
975
|
-
return
|
|
976
|
-
} catch (
|
|
977
|
-
o.errorMessage =
|
|
1006
|
+
return T;
|
|
1007
|
+
} catch (L) {
|
|
1008
|
+
o.errorMessage = D(L), p("error", L);
|
|
978
1009
|
} finally {
|
|
979
1010
|
o.isReadonly = !1;
|
|
980
1011
|
}
|
|
981
1012
|
};
|
|
982
|
-
return
|
|
983
|
-
Object.assign(o.fields,
|
|
984
|
-
}),
|
|
985
|
-
o.fields.port =
|
|
986
|
-
}),
|
|
987
|
-
p("model-updated",
|
|
988
|
-
}),
|
|
989
|
-
validateUrl:
|
|
990
|
-
getPayload:
|
|
1013
|
+
return $e(() => s.gatewayServiceId, () => {
|
|
1014
|
+
Object.assign(o.fields, w);
|
|
1015
|
+
}), $e(o.fields, (i) => {
|
|
1016
|
+
o.fields.port = ge.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated", Z.value);
|
|
1017
|
+
}), Qe(() => {
|
|
1018
|
+
p("model-updated", Z.value);
|
|
1019
|
+
}), K({
|
|
1020
|
+
validateUrl: O,
|
|
1021
|
+
getPayload: Z,
|
|
991
1022
|
saveFormData: te,
|
|
992
|
-
canSubmit:
|
|
1023
|
+
canSubmit: fe,
|
|
993
1024
|
initForm: _e
|
|
994
|
-
}), (i,
|
|
995
|
-
const V =
|
|
996
|
-
return
|
|
997
|
-
|
|
998
|
-
"can-submit":
|
|
1025
|
+
}), (i, u) => {
|
|
1026
|
+
const V = G("KInput"), X = G("KLabel"), L = G("KRadio"), T = G("KSelect"), c = G("KCheckbox"), g = G("KCollapse");
|
|
1027
|
+
return S(), $("div", Dt, [
|
|
1028
|
+
d(l(lt), {
|
|
1029
|
+
"can-submit": fe.value,
|
|
999
1030
|
config: n.config,
|
|
1000
1031
|
"edit-id": n.gatewayServiceId,
|
|
1001
1032
|
"entity-type": l(Ne).GatewayService,
|
|
1002
1033
|
"error-message": o.errorMessage,
|
|
1003
|
-
"fetch-url":
|
|
1004
|
-
"form-fields":
|
|
1034
|
+
"fetch-url": ce.value,
|
|
1035
|
+
"form-fields": Z.value,
|
|
1005
1036
|
"is-readonly": o.isReadonly,
|
|
1006
1037
|
onCancel: be,
|
|
1007
|
-
"onFetch:error":
|
|
1038
|
+
"onFetch:error": u[25] || (u[25] = (m) => i.$emit("error", m)),
|
|
1008
1039
|
"onFetch:success": _e,
|
|
1009
|
-
onLoading:
|
|
1040
|
+
onLoading: u[26] || (u[26] = (m) => i.$emit("loading", m)),
|
|
1010
1041
|
onSubmit: te
|
|
1011
1042
|
}, {
|
|
1012
1043
|
"form-actions": v(() => [
|
|
1013
|
-
|
|
1014
|
-
canSubmit:
|
|
1044
|
+
Xe(i.$slots, "form-actions", {
|
|
1045
|
+
canSubmit: fe.value,
|
|
1015
1046
|
cancel: be,
|
|
1016
1047
|
submit: te
|
|
1017
1048
|
}, void 0, !0)
|
|
1018
1049
|
]),
|
|
1019
1050
|
default: v(() => [
|
|
1020
|
-
|
|
1051
|
+
d(l(Ke), {
|
|
1021
1052
|
description: l(r)("gateway_services.form.sections.general.description"),
|
|
1022
1053
|
"hide-info-header": n.hideSectionsInfo,
|
|
1023
1054
|
title: l(r)("gateway_services.form.sections.general.title")
|
|
1024
1055
|
}, {
|
|
1025
1056
|
default: v(() => [
|
|
1026
|
-
|
|
1057
|
+
d(V, {
|
|
1027
1058
|
modelValue: o.fields.name,
|
|
1028
|
-
"onUpdate:modelValue":
|
|
1059
|
+
"onUpdate:modelValue": u[0] || (u[0] = (m) => o.fields.name = m),
|
|
1029
1060
|
modelModifiers: { trim: !0 },
|
|
1030
1061
|
autocomplete: "off",
|
|
1031
1062
|
"data-testid": "gateway-service-name-input",
|
|
1032
|
-
error:
|
|
1033
|
-
"error-message":
|
|
1063
|
+
error: Ie.value,
|
|
1064
|
+
"error-message": z.value,
|
|
1034
1065
|
label: l(r)("gateway_services.form.fields.name.label"),
|
|
1035
1066
|
"label-attributes": {
|
|
1036
1067
|
info: l(r)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -1040,11 +1071,11 @@ const fe = {
|
|
|
1040
1071
|
placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
|
|
1041
1072
|
readonly: o.isReadonly,
|
|
1042
1073
|
type: "text",
|
|
1043
|
-
onInput:
|
|
1074
|
+
onInput: Ce
|
|
1044
1075
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1045
|
-
|
|
1076
|
+
d(V, {
|
|
1046
1077
|
modelValue: o.fields.tags,
|
|
1047
|
-
"onUpdate:modelValue":
|
|
1078
|
+
"onUpdate:modelValue": u[1] || (u[1] = (m) => o.fields.tags = m),
|
|
1048
1079
|
modelModifiers: { trim: !0 },
|
|
1049
1080
|
autocomplete: "off",
|
|
1050
1081
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -1062,39 +1093,39 @@ const fe = {
|
|
|
1062
1093
|
]),
|
|
1063
1094
|
_: 1
|
|
1064
1095
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1065
|
-
|
|
1096
|
+
d(l(Ke), {
|
|
1066
1097
|
description: l(r)("gateway_services.form.sections.keys.description"),
|
|
1067
1098
|
"hide-info-header": n.hideSectionsInfo,
|
|
1068
1099
|
title: l(r)("gateway_services.form.sections.keys.title")
|
|
1069
1100
|
}, {
|
|
1070
1101
|
default: v(() => [
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1102
|
+
de.value ? B("", !0) : (S(), $("div", qt, [
|
|
1103
|
+
I("div", Gt, [
|
|
1104
|
+
d(X, { required: "" }, {
|
|
1074
1105
|
default: v(() => [
|
|
1075
|
-
|
|
1106
|
+
J(E(l(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1076
1107
|
]),
|
|
1077
1108
|
_: 1
|
|
1078
1109
|
})
|
|
1079
1110
|
]),
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
modelValue:
|
|
1083
|
-
"onUpdate:modelValue":
|
|
1111
|
+
I("div", Ot, [
|
|
1112
|
+
d(L, {
|
|
1113
|
+
modelValue: x.value,
|
|
1114
|
+
"onUpdate:modelValue": u[2] || (u[2] = (m) => x.value = m),
|
|
1084
1115
|
"data-testid": "gateway-service-url-radio",
|
|
1085
|
-
"selected-value":
|
|
1086
|
-
onChange:
|
|
1116
|
+
"selected-value": ke.url,
|
|
1117
|
+
onChange: ue
|
|
1087
1118
|
}, {
|
|
1088
1119
|
default: v(() => [
|
|
1089
|
-
|
|
1120
|
+
J(E(l(r)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1090
1121
|
]),
|
|
1091
1122
|
_: 1
|
|
1092
1123
|
}, 8, ["modelValue", "selected-value"])
|
|
1093
1124
|
]),
|
|
1094
|
-
|
|
1095
|
-
|
|
1125
|
+
x.value === "url" ? (S(), $("div", Nt, [
|
|
1126
|
+
d(V, {
|
|
1096
1127
|
modelValue: o.fields.url,
|
|
1097
|
-
"onUpdate:modelValue":
|
|
1128
|
+
"onUpdate:modelValue": u[3] || (u[3] = (m) => o.fields.url = m),
|
|
1098
1129
|
modelModifiers: { trim: !0 },
|
|
1099
1130
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1100
1131
|
"data-testid": "gateway-service-url-input",
|
|
@@ -1107,27 +1138,27 @@ const fe = {
|
|
|
1107
1138
|
placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1108
1139
|
required: ""
|
|
1109
1140
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1110
|
-
])) :
|
|
1111
|
-
|
|
1112
|
-
modelValue:
|
|
1113
|
-
"onUpdate:modelValue":
|
|
1141
|
+
])) : B("", !0),
|
|
1142
|
+
d(L, {
|
|
1143
|
+
modelValue: x.value,
|
|
1144
|
+
"onUpdate:modelValue": u[4] || (u[4] = (m) => x.value = m),
|
|
1114
1145
|
"checked-group": "protocol",
|
|
1115
1146
|
"data-testid": "gateway-service-protocol-radio",
|
|
1116
|
-
"selected-value":
|
|
1117
|
-
onChange:
|
|
1147
|
+
"selected-value": ke.protocol,
|
|
1148
|
+
onChange: ue
|
|
1118
1149
|
}, {
|
|
1119
1150
|
default: v(() => [
|
|
1120
|
-
|
|
1151
|
+
J(E(l(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1121
1152
|
]),
|
|
1122
1153
|
_: 1
|
|
1123
1154
|
}, 8, ["modelValue", "selected-value"])
|
|
1124
1155
|
])),
|
|
1125
|
-
|
|
1126
|
-
|
|
1156
|
+
x.value === "protocol" || de.value ? (S(), $("div", jt, [
|
|
1157
|
+
d(T, {
|
|
1127
1158
|
modelValue: o.fields.protocol,
|
|
1128
|
-
"onUpdate:modelValue":
|
|
1159
|
+
"onUpdate:modelValue": u[5] || (u[5] = (m) => o.fields.protocol = m),
|
|
1129
1160
|
"data-testid": "gateway-service-protocol-select",
|
|
1130
|
-
items:
|
|
1161
|
+
items: ye,
|
|
1131
1162
|
label: l(r)("gateway_services.form.fields.protocol.label"),
|
|
1132
1163
|
"label-attributes": {
|
|
1133
1164
|
info: l(r)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -1136,11 +1167,11 @@ const fe = {
|
|
|
1136
1167
|
readonly: o.isReadonly,
|
|
1137
1168
|
required: "",
|
|
1138
1169
|
width: "100%",
|
|
1139
|
-
onSelected:
|
|
1170
|
+
onSelected: u[6] || (u[6] = (m) => e(o.fields.protocol, m))
|
|
1140
1171
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1141
|
-
|
|
1172
|
+
d(V, {
|
|
1142
1173
|
modelValue: o.fields.host,
|
|
1143
|
-
"onUpdate:modelValue":
|
|
1174
|
+
"onUpdate:modelValue": u[7] || (u[7] = (m) => o.fields.host = m),
|
|
1144
1175
|
modelModifiers: { trim: !0 },
|
|
1145
1176
|
class: "gateway-service-form-margin-top",
|
|
1146
1177
|
"data-testid": "gateway-service-host-input",
|
|
@@ -1153,10 +1184,10 @@ const fe = {
|
|
|
1153
1184
|
placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
|
|
1154
1185
|
required: ""
|
|
1155
1186
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1156
|
-
|
|
1157
|
-
|
|
1187
|
+
se.value ? (S(), $("div", zt, [
|
|
1188
|
+
d(V, {
|
|
1158
1189
|
modelValue: o.fields.path,
|
|
1159
|
-
"onUpdate:modelValue":
|
|
1190
|
+
"onUpdate:modelValue": u[8] || (u[8] = (m) => o.fields.path = m),
|
|
1160
1191
|
modelModifiers: { trim: !0 },
|
|
1161
1192
|
class: "gateway-service-form-margin-top",
|
|
1162
1193
|
"data-testid": "gateway-service-path-input",
|
|
@@ -1168,13 +1199,13 @@ const fe = {
|
|
|
1168
1199
|
name: "path",
|
|
1169
1200
|
placeholder: l(r)("gateway_services.form.fields.path.placeholder")
|
|
1170
1201
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1171
|
-
])) :
|
|
1172
|
-
|
|
1202
|
+
])) : B("", !0),
|
|
1203
|
+
d(V, {
|
|
1173
1204
|
modelValue: o.fields.port,
|
|
1174
1205
|
"onUpdate:modelValue": [
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
o.fields.port =
|
|
1206
|
+
u[9] || (u[9] = (m) => o.fields.port = m),
|
|
1207
|
+
u[10] || (u[10] = () => {
|
|
1208
|
+
o.fields.port = A(o.fields.port + "");
|
|
1178
1209
|
})
|
|
1179
1210
|
],
|
|
1180
1211
|
class: "gateway-service-form-margin-top",
|
|
@@ -1187,23 +1218,23 @@ const fe = {
|
|
|
1187
1218
|
name: "port",
|
|
1188
1219
|
type: "number"
|
|
1189
1220
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1190
|
-
])) :
|
|
1191
|
-
|
|
1192
|
-
modelValue:
|
|
1193
|
-
"onUpdate:modelValue":
|
|
1221
|
+
])) : B("", !0),
|
|
1222
|
+
d(g, {
|
|
1223
|
+
modelValue: b.value,
|
|
1224
|
+
"onUpdate:modelValue": u[24] || (u[24] = (m) => b.value = m),
|
|
1194
1225
|
"data-testid": "advanced-fields-collapse",
|
|
1195
1226
|
"trigger-alignment": "leading",
|
|
1196
1227
|
"trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1197
1228
|
}, {
|
|
1198
1229
|
default: v(() => [
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1230
|
+
I("div", Ht, [
|
|
1231
|
+
I("div", Zt, [
|
|
1232
|
+
d(V, {
|
|
1202
1233
|
modelValue: o.fields.retries,
|
|
1203
1234
|
"onUpdate:modelValue": [
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
o.fields.retries =
|
|
1235
|
+
u[11] || (u[11] = (m) => o.fields.retries = m),
|
|
1236
|
+
u[12] || (u[12] = () => {
|
|
1237
|
+
o.fields.retries = A(o.fields.retries + "");
|
|
1207
1238
|
})
|
|
1208
1239
|
],
|
|
1209
1240
|
autocomplete: "off",
|
|
@@ -1218,13 +1249,13 @@ const fe = {
|
|
|
1218
1249
|
type: "number"
|
|
1219
1250
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1220
1251
|
]),
|
|
1221
|
-
|
|
1222
|
-
|
|
1252
|
+
I("div", Jt, [
|
|
1253
|
+
d(V, {
|
|
1223
1254
|
modelValue: o.fields.connect_timeout,
|
|
1224
1255
|
"onUpdate:modelValue": [
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
o.fields.connect_timeout =
|
|
1256
|
+
u[13] || (u[13] = (m) => o.fields.connect_timeout = m),
|
|
1257
|
+
u[14] || (u[14] = () => {
|
|
1258
|
+
o.fields.connect_timeout = A(o.fields.connect_timeout + "");
|
|
1228
1259
|
})
|
|
1229
1260
|
],
|
|
1230
1261
|
autocomplete: "off",
|
|
@@ -1239,13 +1270,13 @@ const fe = {
|
|
|
1239
1270
|
type: "number"
|
|
1240
1271
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1241
1272
|
]),
|
|
1242
|
-
|
|
1243
|
-
|
|
1273
|
+
I("div", Qt, [
|
|
1274
|
+
d(V, {
|
|
1244
1275
|
modelValue: o.fields.write_timeout,
|
|
1245
1276
|
"onUpdate:modelValue": [
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
o.fields.write_timeout =
|
|
1277
|
+
u[15] || (u[15] = (m) => o.fields.write_timeout = m),
|
|
1278
|
+
u[16] || (u[16] = () => {
|
|
1279
|
+
o.fields.write_timeout = A(o.fields.write_timeout + "");
|
|
1249
1280
|
})
|
|
1250
1281
|
],
|
|
1251
1282
|
autocomplete: "off",
|
|
@@ -1260,13 +1291,13 @@ const fe = {
|
|
|
1260
1291
|
type: "number"
|
|
1261
1292
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1262
1293
|
]),
|
|
1263
|
-
|
|
1264
|
-
|
|
1294
|
+
I("div", Xt, [
|
|
1295
|
+
d(V, {
|
|
1265
1296
|
modelValue: o.fields.read_timeout,
|
|
1266
1297
|
"onUpdate:modelValue": [
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
o.fields.read_timeout =
|
|
1298
|
+
u[17] || (u[17] = (m) => o.fields.read_timeout = m),
|
|
1299
|
+
u[18] || (u[18] = () => {
|
|
1300
|
+
o.fields.read_timeout = A(o.fields.read_timeout + "");
|
|
1270
1301
|
})
|
|
1271
1302
|
],
|
|
1272
1303
|
autocomplete: "off",
|
|
@@ -1281,10 +1312,10 @@ const fe = {
|
|
|
1281
1312
|
type: "number"
|
|
1282
1313
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1283
1314
|
]),
|
|
1284
|
-
|
|
1285
|
-
|
|
1315
|
+
Pe.value ? (S(), $("div", Yt, [
|
|
1316
|
+
d(V, {
|
|
1286
1317
|
modelValue: o.fields.client_certificate,
|
|
1287
|
-
"onUpdate:modelValue":
|
|
1318
|
+
"onUpdate:modelValue": u[19] || (u[19] = (m) => o.fields.client_certificate = m),
|
|
1288
1319
|
modelModifiers: { trim: !0 },
|
|
1289
1320
|
autocomplete: "off",
|
|
1290
1321
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -1298,11 +1329,11 @@ const fe = {
|
|
|
1298
1329
|
readonly: o.isReadonly,
|
|
1299
1330
|
type: "text"
|
|
1300
1331
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1301
|
-
])) :
|
|
1302
|
-
|
|
1303
|
-
|
|
1332
|
+
])) : B("", !0),
|
|
1333
|
+
oe.value ? (S(), $("div", el, [
|
|
1334
|
+
d(V, {
|
|
1304
1335
|
modelValue: o.fields.ca_certificates,
|
|
1305
|
-
"onUpdate:modelValue":
|
|
1336
|
+
"onUpdate:modelValue": u[20] || (u[20] = (m) => o.fields.ca_certificates = m),
|
|
1306
1337
|
modelModifiers: { trim: !0 },
|
|
1307
1338
|
autocomplete: "off",
|
|
1308
1339
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -1313,63 +1344,63 @@ const fe = {
|
|
|
1313
1344
|
type: "text"
|
|
1314
1345
|
}, {
|
|
1315
1346
|
"label-tooltip": v(() => [
|
|
1316
|
-
|
|
1347
|
+
d(l(Q), {
|
|
1317
1348
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1318
1349
|
scope: "global"
|
|
1319
1350
|
}, {
|
|
1320
1351
|
code1: v(() => [
|
|
1321
|
-
|
|
1352
|
+
I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1322
1353
|
]),
|
|
1323
1354
|
code2: v(() => [
|
|
1324
|
-
|
|
1355
|
+
I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1325
1356
|
]),
|
|
1326
1357
|
_: 1
|
|
1327
1358
|
})
|
|
1328
1359
|
]),
|
|
1329
1360
|
_: 1
|
|
1330
1361
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1331
|
-
])) :
|
|
1332
|
-
|
|
1333
|
-
|
|
1362
|
+
])) : B("", !0),
|
|
1363
|
+
Ve.value ? (S(), $("div", tl, [
|
|
1364
|
+
d(c, {
|
|
1334
1365
|
modelValue: o.fields.tls_verify_enabled,
|
|
1335
|
-
"onUpdate:modelValue":
|
|
1366
|
+
"onUpdate:modelValue": u[21] || (u[21] = (m) => o.fields.tls_verify_enabled = m),
|
|
1336
1367
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1337
1368
|
description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1338
1369
|
label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1339
1370
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1340
1371
|
}, {
|
|
1341
1372
|
tooltip: v(() => [
|
|
1342
|
-
|
|
1373
|
+
d(l(Q), {
|
|
1343
1374
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1344
1375
|
scope: "global"
|
|
1345
1376
|
}, {
|
|
1346
1377
|
code1: v(() => [
|
|
1347
|
-
|
|
1378
|
+
I("code", null, E(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1348
1379
|
]),
|
|
1349
1380
|
_: 1
|
|
1350
1381
|
})
|
|
1351
1382
|
]),
|
|
1352
1383
|
_: 1
|
|
1353
1384
|
}, 8, ["modelValue", "description", "label"]),
|
|
1354
|
-
o.fields.tls_verify_enabled ? (
|
|
1355
|
-
|
|
1385
|
+
o.fields.tls_verify_enabled ? (S(), $("div", ll, [
|
|
1386
|
+
d(L, {
|
|
1356
1387
|
modelValue: o.fields.tls_verify_value,
|
|
1357
|
-
"onUpdate:modelValue":
|
|
1388
|
+
"onUpdate:modelValue": u[22] || (u[22] = (m) => o.fields.tls_verify_value = m),
|
|
1358
1389
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1359
1390
|
label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1360
1391
|
"selected-value": !0
|
|
1361
1392
|
}, null, 8, ["modelValue", "label"])
|
|
1362
|
-
])) :
|
|
1363
|
-
o.fields.tls_verify_enabled ? (
|
|
1364
|
-
|
|
1393
|
+
])) : B("", !0),
|
|
1394
|
+
o.fields.tls_verify_enabled ? (S(), $("div", ol, [
|
|
1395
|
+
d(L, {
|
|
1365
1396
|
modelValue: o.fields.tls_verify_value,
|
|
1366
|
-
"onUpdate:modelValue":
|
|
1397
|
+
"onUpdate:modelValue": u[23] || (u[23] = (m) => o.fields.tls_verify_value = m),
|
|
1367
1398
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1368
1399
|
label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1369
1400
|
"selected-value": !1
|
|
1370
1401
|
}, null, 8, ["modelValue", "label"])
|
|
1371
|
-
])) :
|
|
1372
|
-
])) :
|
|
1402
|
+
])) : B("", !0)
|
|
1403
|
+
])) : B("", !0)
|
|
1373
1404
|
])
|
|
1374
1405
|
]),
|
|
1375
1406
|
_: 1
|
|
@@ -1383,7 +1414,7 @@ const fe = {
|
|
|
1383
1414
|
]);
|
|
1384
1415
|
};
|
|
1385
1416
|
}
|
|
1386
|
-
}), Bl = /* @__PURE__ */ je(il, [["__scopeId", "data-v-59d8e66b"]]), rl = { class: "kong-ui-gateway-service-entity-config-card" }, Kl = /* @__PURE__ */
|
|
1417
|
+
}), Bl = /* @__PURE__ */ je(il, [["__scopeId", "data-v-59d8e66b"]]), rl = { class: "kong-ui-gateway-service-entity-config-card" }, Kl = /* @__PURE__ */ Le({
|
|
1387
1418
|
__name: "GatewayServiceConfigCard",
|
|
1388
1419
|
props: {
|
|
1389
1420
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1410,122 +1441,122 @@ const fe = {
|
|
|
1410
1441
|
},
|
|
1411
1442
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1412
1443
|
setup(n) {
|
|
1413
|
-
const
|
|
1444
|
+
const K = n, { i18n: { t: y }, i18nT: p } = ne.useI18n(), s = k(() => ve.form[K.config.app].edit), { getPropValue: b } = ot(), M = (r, D) => b(r, D) === !0 ? y("gateway_services.form.fields.tls_verify_option.true.display") : y("gateway_services.form.fields.tls_verify_option.false.display"), Q = q({
|
|
1414
1445
|
id: {},
|
|
1415
1446
|
name: {
|
|
1416
|
-
tooltip:
|
|
1447
|
+
tooltip: y("gateway_services.form.fields.name.tooltip")
|
|
1417
1448
|
},
|
|
1418
1449
|
enabled: {},
|
|
1419
1450
|
updated_at: {},
|
|
1420
1451
|
created_at: {},
|
|
1421
1452
|
protocol: {
|
|
1422
|
-
section:
|
|
1423
|
-
tooltip:
|
|
1453
|
+
section: Ae.Basic,
|
|
1454
|
+
tooltip: y("gateway_services.form.fields.protocol.tooltip")
|
|
1424
1455
|
},
|
|
1425
1456
|
host: {
|
|
1426
|
-
section:
|
|
1427
|
-
tooltip:
|
|
1457
|
+
section: Ae.Basic,
|
|
1458
|
+
tooltip: y("gateway_services.form.fields.host.tooltip")
|
|
1428
1459
|
},
|
|
1429
1460
|
path: {
|
|
1430
|
-
section:
|
|
1431
|
-
tooltip:
|
|
1461
|
+
section: Ae.Basic,
|
|
1462
|
+
tooltip: y("gateway_services.form.fields.path.tooltip")
|
|
1432
1463
|
},
|
|
1433
1464
|
port: {
|
|
1434
|
-
section:
|
|
1435
|
-
tooltip:
|
|
1465
|
+
section: Ae.Basic,
|
|
1466
|
+
tooltip: y("gateway_services.form.fields.port.tooltip")
|
|
1436
1467
|
},
|
|
1437
1468
|
tags: {
|
|
1438
|
-
tooltip:
|
|
1469
|
+
tooltip: y("gateway_services.form.fields.tags.tooltip")
|
|
1439
1470
|
},
|
|
1440
1471
|
// advanced fields
|
|
1441
1472
|
retries: {
|
|
1442
1473
|
order: 1,
|
|
1443
|
-
tooltip:
|
|
1474
|
+
tooltip: y("gateway_services.form.fields.retries.tooltip")
|
|
1444
1475
|
},
|
|
1445
1476
|
connect_timeout: {
|
|
1446
1477
|
order: 2,
|
|
1447
|
-
tooltip:
|
|
1478
|
+
tooltip: y("gateway_services.form.fields.connect_timeout.tooltip")
|
|
1448
1479
|
},
|
|
1449
1480
|
write_timeout: {
|
|
1450
1481
|
order: 3,
|
|
1451
|
-
tooltip:
|
|
1482
|
+
tooltip: y("gateway_services.form.fields.write_timeout.tooltip")
|
|
1452
1483
|
},
|
|
1453
1484
|
read_timeout: {
|
|
1454
1485
|
order: 4,
|
|
1455
|
-
tooltip:
|
|
1486
|
+
tooltip: y("gateway_services.form.fields.read_timeout.tooltip")
|
|
1456
1487
|
},
|
|
1457
1488
|
client_certificate: {
|
|
1458
1489
|
order: 5,
|
|
1459
|
-
tooltip:
|
|
1490
|
+
tooltip: y("gateway_services.form.fields.client_certificate.tooltip")
|
|
1460
1491
|
},
|
|
1461
1492
|
ca_certificates: {
|
|
1462
1493
|
type: kt.BadgeTag,
|
|
1463
|
-
label:
|
|
1494
|
+
label: y("gateway_services.form.fields.ca_certificates.label"),
|
|
1464
1495
|
order: 6
|
|
1465
1496
|
},
|
|
1466
1497
|
tls_verify: {
|
|
1467
|
-
label:
|
|
1498
|
+
label: y("gateway_services.form.fields.tls_verify_enabled.label")
|
|
1468
1499
|
},
|
|
1469
1500
|
tls_verify_depth: {
|
|
1470
1501
|
hidden: !0
|
|
1471
1502
|
}
|
|
1472
1503
|
});
|
|
1473
|
-
return (r,
|
|
1474
|
-
|
|
1504
|
+
return (r, D) => (S(), $("div", rl, [
|
|
1505
|
+
d(l(Vt), {
|
|
1475
1506
|
config: n.config,
|
|
1476
1507
|
"config-card-doc": n.configCardDoc,
|
|
1477
|
-
"config-schema":
|
|
1508
|
+
"config-schema": Q.value,
|
|
1478
1509
|
"entity-type": l(Ne).GatewayService,
|
|
1479
|
-
"fetch-url":
|
|
1510
|
+
"fetch-url": s.value,
|
|
1480
1511
|
"hide-title": n.hideTitle,
|
|
1481
|
-
"onFetch:error":
|
|
1482
|
-
"onFetch:success":
|
|
1483
|
-
onLoading:
|
|
1512
|
+
"onFetch:error": D[0] || (D[0] = (P) => r.$emit("fetch:error", P)),
|
|
1513
|
+
"onFetch:success": D[1] || (D[1] = (P) => r.$emit("fetch:success", P)),
|
|
1514
|
+
onLoading: D[2] || (D[2] = (P) => r.$emit("loading", P))
|
|
1484
1515
|
}, {
|
|
1485
1516
|
"enabled-label-tooltip": v(() => [
|
|
1486
|
-
|
|
1517
|
+
d(l(p), {
|
|
1487
1518
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1488
1519
|
scope: "global"
|
|
1489
1520
|
}, {
|
|
1490
1521
|
false: v(() => [
|
|
1491
|
-
|
|
1522
|
+
I("code", null, E(l(y)("gateway_services.form.fields.enabled.false")), 1)
|
|
1492
1523
|
]),
|
|
1493
1524
|
true: v(() => [
|
|
1494
|
-
|
|
1525
|
+
I("code", null, E(l(y)("gateway_services.form.fields.enabled.true")), 1)
|
|
1495
1526
|
]),
|
|
1496
1527
|
_: 1
|
|
1497
1528
|
})
|
|
1498
1529
|
]),
|
|
1499
1530
|
"ca_certificates-label-tooltip": v(() => [
|
|
1500
|
-
|
|
1531
|
+
d(l(p), {
|
|
1501
1532
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1502
1533
|
scope: "global"
|
|
1503
1534
|
}, {
|
|
1504
1535
|
code1: v(() => [
|
|
1505
|
-
|
|
1536
|
+
I("code", null, E(l(y)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1506
1537
|
]),
|
|
1507
1538
|
code2: v(() => [
|
|
1508
|
-
|
|
1539
|
+
I("code", null, E(l(y)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1509
1540
|
]),
|
|
1510
1541
|
_: 1
|
|
1511
1542
|
})
|
|
1512
1543
|
]),
|
|
1513
1544
|
"tls_verify-label-tooltip": v(() => [
|
|
1514
|
-
|
|
1545
|
+
d(l(p), {
|
|
1515
1546
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1516
1547
|
scope: "global"
|
|
1517
1548
|
}, {
|
|
1518
1549
|
code1: v(() => [
|
|
1519
|
-
|
|
1550
|
+
I("code", null, E(l(y)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1520
1551
|
]),
|
|
1521
1552
|
_: 1
|
|
1522
1553
|
})
|
|
1523
1554
|
]),
|
|
1524
|
-
tls_verify: v((
|
|
1525
|
-
|
|
1555
|
+
tls_verify: v((P) => [
|
|
1556
|
+
J(E(typeof l(b)("rowValue", P) == "boolean" ? M("rowValue", P) : l(y)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1526
1557
|
]),
|
|
1527
|
-
client_certificate: v((
|
|
1528
|
-
|
|
1558
|
+
client_certificate: v((P) => [
|
|
1559
|
+
J(E(l(b)("rowValue", P) ? l(b)("rowValue", P).id : "–"), 1)
|
|
1529
1560
|
]),
|
|
1530
1561
|
_: 1
|
|
1531
1562
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1533,36 +1564,36 @@ const fe = {
|
|
|
1533
1564
|
}
|
|
1534
1565
|
});
|
|
1535
1566
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1536
|
-
const
|
|
1567
|
+
const Je = () => {
|
|
1537
1568
|
};
|
|
1538
|
-
function sl(n,
|
|
1539
|
-
function
|
|
1540
|
-
return new Promise((
|
|
1541
|
-
Promise.resolve(n(() =>
|
|
1569
|
+
function sl(n, K) {
|
|
1570
|
+
function y(...p) {
|
|
1571
|
+
return new Promise((s, b) => {
|
|
1572
|
+
Promise.resolve(n(() => K.apply(this, p), { fn: K, thisArg: this, args: p })).then(s).catch(b);
|
|
1542
1573
|
});
|
|
1543
1574
|
}
|
|
1544
|
-
return
|
|
1575
|
+
return y;
|
|
1545
1576
|
}
|
|
1546
|
-
function al(n,
|
|
1547
|
-
let
|
|
1548
|
-
const
|
|
1549
|
-
clearTimeout(r),
|
|
1577
|
+
function al(n, K = {}) {
|
|
1578
|
+
let y, p, s = Je;
|
|
1579
|
+
const b = (r) => {
|
|
1580
|
+
clearTimeout(r), s(), s = Je;
|
|
1550
1581
|
};
|
|
1551
|
-
let
|
|
1582
|
+
let M;
|
|
1552
1583
|
return (r) => {
|
|
1553
|
-
const
|
|
1554
|
-
return
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
},
|
|
1558
|
-
p &&
|
|
1559
|
-
},
|
|
1584
|
+
const D = He(n), P = He(K.maxWait);
|
|
1585
|
+
return y && b(y), D <= 0 || P !== void 0 && P <= 0 ? (p && (b(p), p = null), Promise.resolve(r())) : new Promise((ie, ce) => {
|
|
1586
|
+
s = K.rejectOnCancel ? ce : ie, M = r, P && !p && (p = setTimeout(() => {
|
|
1587
|
+
y && b(y), p = null, ie(M());
|
|
1588
|
+
}, P)), y = setTimeout(() => {
|
|
1589
|
+
p && b(p), p = null, ie(r());
|
|
1590
|
+
}, D);
|
|
1560
1591
|
});
|
|
1561
1592
|
};
|
|
1562
1593
|
}
|
|
1563
|
-
function qe(n,
|
|
1594
|
+
function qe(n, K = 200, y = {}) {
|
|
1564
1595
|
return sl(
|
|
1565
|
-
al(
|
|
1596
|
+
al(K, y),
|
|
1566
1597
|
n
|
|
1567
1598
|
);
|
|
1568
1599
|
}
|
|
@@ -1606,7 +1637,7 @@ const le = {
|
|
|
1606
1637
|
}, Vl = {
|
|
1607
1638
|
key: 1,
|
|
1608
1639
|
class: "checkbox-aligned-radio"
|
|
1609
|
-
}, Cl = { class: "gateway-service-form-tags" }, Sl = { class: "form-error-list" }, Il = /* @__PURE__ */
|
|
1640
|
+
}, Cl = { class: "gateway-service-form-tags" }, Sl = { class: "form-error-list" }, Il = /* @__PURE__ */ Le({
|
|
1610
1641
|
__name: "GatewayServiceForm",
|
|
1611
1642
|
props: {
|
|
1612
1643
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1635,9 +1666,9 @@ const le = {
|
|
|
1635
1666
|
}
|
|
1636
1667
|
},
|
|
1637
1668
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1638
|
-
setup(n, { expose:
|
|
1639
|
-
var
|
|
1640
|
-
const p =
|
|
1669
|
+
setup(n, { expose: K, emit: y }) {
|
|
1670
|
+
var h;
|
|
1671
|
+
const p = y, s = n, b = q(!0), M = Ge(), { i18nT: Q, i18n: { t: r } } = ne.useI18n(), { getErrorFieldsFromError: D } = Ye(), { axiosInstance: P } = Oe((h = s.config) == null ? void 0 : h.axiosRequestConfig), ie = et(), { validateHost: ce, validatePath: Y, validatePort: we, validateProtocol: de } = ne.useUrlValidators(), { objectsAreEqual: x } = ot(), ge = k(() => ve.form[s.config.app].edit), z = k(() => s.gatewayServiceId ? Be.Edit : Be.Create), Ie = q(!1), o = k(() => !!s.gatewayServiceId), w = q(o.value ? "protocol" : "url"), re = ne.usePortFromProtocol(), ye = q(""), ke = k(() => !!ye.value || !!ee("name")), e = Me({
|
|
1641
1672
|
fields: {
|
|
1642
1673
|
name: "",
|
|
1643
1674
|
protocol: "http",
|
|
@@ -1673,7 +1704,7 @@ const le = {
|
|
|
1673
1704
|
tls_verify_enabled: "",
|
|
1674
1705
|
tls_verify_value: ""
|
|
1675
1706
|
}
|
|
1676
|
-
}),
|
|
1707
|
+
}), A = Me({
|
|
1677
1708
|
name: "",
|
|
1678
1709
|
protocol: "http",
|
|
1679
1710
|
host: "",
|
|
@@ -1689,13 +1720,13 @@ const le = {
|
|
|
1689
1720
|
tls_verify_enabled: !1,
|
|
1690
1721
|
tls_verify_value: !1,
|
|
1691
1722
|
tags: ""
|
|
1692
|
-
}),
|
|
1693
|
-
gatewayInfo:
|
|
1723
|
+
}), ue = s.config.app === "konnect" || tt({
|
|
1724
|
+
gatewayInfo: s.config.gatewayInfo,
|
|
1694
1725
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1695
1726
|
supportedRange: {
|
|
1696
1727
|
enterprise: ["3.0"]
|
|
1697
1728
|
}
|
|
1698
|
-
}),
|
|
1729
|
+
}), O = [
|
|
1699
1730
|
{
|
|
1700
1731
|
label: r("gateway_services.form.fields.protocol.options.http"),
|
|
1701
1732
|
value: "http",
|
|
@@ -1731,7 +1762,7 @@ const le = {
|
|
|
1731
1762
|
value: "grpcs",
|
|
1732
1763
|
group: "grpc"
|
|
1733
1764
|
},
|
|
1734
|
-
...
|
|
1765
|
+
...ue ? [
|
|
1735
1766
|
{
|
|
1736
1767
|
label: r("gateway_services.form.fields.protocol.options.ws"),
|
|
1737
1768
|
value: "ws",
|
|
@@ -1748,14 +1779,14 @@ const le = {
|
|
|
1748
1779
|
value: "udp",
|
|
1749
1780
|
group: "udp"
|
|
1750
1781
|
}
|
|
1751
|
-
],
|
|
1752
|
-
|
|
1753
|
-
},
|
|
1754
|
-
e.fields.host =
|
|
1755
|
-
},
|
|
1756
|
-
|
|
1757
|
-
},
|
|
1758
|
-
switch (
|
|
1782
|
+
], se = { url: "url", protocol: "protocol" }, Pe = (t, a) => {
|
|
1783
|
+
a.value;
|
|
1784
|
+
}, oe = (t) => t ? parseFloat(t) : 0, Ve = () => {
|
|
1785
|
+
e.fields.host = A.host, e.fields.path = A.path, e.fields.port = A.port, e.fields.protocol = A.protocol, e.fields.url = A.url, e.fields.retries = A.retries, e.fields.connect_timeout = A.connect_timeout, e.fields.write_timeout = A.write_timeout, e.fields.read_timeout = A.read_timeout, e.fields.client_certificate = A.client_certificate, e.fields.ca_certificates = A.ca_certificates, e.fields.tls_verify_enabled = A.tls_verify_enabled, e.fields.tls_verify_value = A.tls_verify_value;
|
|
1786
|
+
}, Ce = () => {
|
|
1787
|
+
b.value = !0, Z(), e.errorMessages = [], Ve();
|
|
1788
|
+
}, fe = () => {
|
|
1789
|
+
switch (Ve(), e.fields.name = `${le.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, w.value) {
|
|
1759
1790
|
case "url":
|
|
1760
1791
|
e.fields.url = `${le.protocol}://${le.host}${le.path}`;
|
|
1761
1792
|
break;
|
|
@@ -1766,93 +1797,93 @@ const le = {
|
|
|
1766
1797
|
e.fields.url = `${le.protocol}://${le.host}${le.path}`;
|
|
1767
1798
|
}
|
|
1768
1799
|
}, _e = qe(() => {
|
|
1769
|
-
if (
|
|
1800
|
+
if (Z(), e.fields.url.length)
|
|
1770
1801
|
try {
|
|
1771
|
-
const t = new URL(e.fields.url),
|
|
1772
|
-
if (
|
|
1802
|
+
const t = new URL(e.fields.url), a = de(t.protocol, O);
|
|
1803
|
+
if (a) throw new Error(a);
|
|
1773
1804
|
e.fields.protocol = t.protocol.slice(0, -1);
|
|
1774
|
-
const F =
|
|
1805
|
+
const F = ce(t.hostname);
|
|
1775
1806
|
if (F) throw new Error(F);
|
|
1776
1807
|
e.fields.host = t.hostname;
|
|
1777
|
-
const
|
|
1778
|
-
if (
|
|
1808
|
+
const j = Y(t.pathname);
|
|
1809
|
+
if (j) throw new Error(j);
|
|
1779
1810
|
e.fields.path = t.pathname;
|
|
1780
|
-
const U =
|
|
1811
|
+
const U = we(t.port);
|
|
1781
1812
|
if (U) throw new Error(U);
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1813
|
+
const R = Number(t.port);
|
|
1814
|
+
Ie.value = !!R, e.fields.port = R || re.getPortFromProtocol(e.fields.protocol), p("url-valid:success");
|
|
1784
1815
|
} catch {
|
|
1785
1816
|
p("url-valid:error", r("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = r("gateway_services.form.errors.url.invalid");
|
|
1786
1817
|
}
|
|
1787
1818
|
}, 300), be = qe((t) => {
|
|
1788
|
-
|
|
1789
|
-
}, 300), Ee = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port),
|
|
1819
|
+
Z(t);
|
|
1820
|
+
}, 300), Ee = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), ee = (t) => {
|
|
1790
1821
|
if (e.errorMessages.length) return "";
|
|
1791
|
-
const
|
|
1792
|
-
return
|
|
1793
|
-
},
|
|
1794
|
-
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1797
|
-
const F =
|
|
1822
|
+
const a = e.formFieldErrors;
|
|
1823
|
+
return a[t] ? a[t] : "";
|
|
1824
|
+
}, H = qe((t) => {
|
|
1825
|
+
Z(t ?? void 0);
|
|
1826
|
+
const a = ce(e.fields.host);
|
|
1827
|
+
a && (e.formFieldErrors.host = a);
|
|
1828
|
+
const F = Y(e.fields.path);
|
|
1798
1829
|
F && (e.formFieldErrors.path = F);
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
}, 300),
|
|
1830
|
+
const j = we(e.fields.port);
|
|
1831
|
+
j && (e.formFieldErrors.port = j), te.value ? p("url-valid:success") : p("url-valid:error", e.errorMessages.join(",") || r("gateway_services.form.errors.url.invalid"));
|
|
1832
|
+
}, 300), Z = (t) => {
|
|
1802
1833
|
if (t)
|
|
1803
1834
|
e.formFieldErrors[t] = "";
|
|
1804
1835
|
else
|
|
1805
|
-
for (let
|
|
1806
|
-
e.formFieldErrors[
|
|
1836
|
+
for (let a in e.formFieldErrors)
|
|
1837
|
+
e.formFieldErrors[a] = "";
|
|
1807
1838
|
e.errorMessages = [];
|
|
1808
1839
|
}, te = k(() => {
|
|
1809
1840
|
for (let t in e.formFieldErrors)
|
|
1810
1841
|
if (e.formFieldErrors[t].length)
|
|
1811
1842
|
return !1;
|
|
1812
1843
|
return !0;
|
|
1813
|
-
}),
|
|
1814
|
-
e.fields.url &&
|
|
1815
|
-
}, i = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`,
|
|
1816
|
-
if (
|
|
1844
|
+
}), ae = () => {
|
|
1845
|
+
e.fields.url && w.value === "url" ? _e() : H();
|
|
1846
|
+
}, i = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, u = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), V = k(() => {
|
|
1847
|
+
if (w.value === "url")
|
|
1817
1848
|
return !0;
|
|
1818
1849
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1819
|
-
return
|
|
1820
|
-
}),
|
|
1821
|
-
if (
|
|
1850
|
+
return w.value === "protocol" && t;
|
|
1851
|
+
}), X = k(() => {
|
|
1852
|
+
if (w.value === "url")
|
|
1822
1853
|
return !0;
|
|
1823
1854
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
1824
|
-
return
|
|
1825
|
-
}),
|
|
1826
|
-
if (
|
|
1855
|
+
return w.value === "protocol" && t;
|
|
1856
|
+
}), L = k(() => {
|
|
1857
|
+
if (w.value === "url")
|
|
1827
1858
|
return !0;
|
|
1828
1859
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1829
|
-
return
|
|
1830
|
-
}),
|
|
1831
|
-
|
|
1832
|
-
},
|
|
1833
|
-
const t = !o.value || !
|
|
1834
|
-
return t && (
|
|
1835
|
-
}),
|
|
1836
|
-
var
|
|
1837
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((
|
|
1860
|
+
return w.value === "protocol" && t;
|
|
1861
|
+
}), T = (t) => {
|
|
1862
|
+
Z("name"), ye.value = ie.utf8Name(t);
|
|
1863
|
+
}, c = k(() => {
|
|
1864
|
+
const t = !o.value || !x(e.fields, A), a = w.value === "url" && !!e.fields.url && te.value, F = w.value === "protocol" && !!e.fields.host && te.value;
|
|
1865
|
+
return t && (a || F);
|
|
1866
|
+
}), g = (t) => {
|
|
1867
|
+
var a, F, j;
|
|
1868
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((a = t == null ? void 0 : t.tags) == null ? void 0 : a.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 = ((F = t == null ? void 0 : t.ca_certificates) == null ? void 0 : F.join(",")) || "", e.fields.client_certificate = ((j = t == null ? void 0 : t.client_certificate) == null ? void 0 : j.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(A, e.fields);
|
|
1838
1869
|
}, m = () => {
|
|
1839
|
-
|
|
1840
|
-
},
|
|
1841
|
-
var
|
|
1842
|
-
let t = `${
|
|
1843
|
-
return
|
|
1844
|
-
}),
|
|
1845
|
-
var
|
|
1846
|
-
let t = `${
|
|
1847
|
-
return
|
|
1848
|
-
}),
|
|
1849
|
-
let
|
|
1850
|
-
t.url && (
|
|
1851
|
-
},
|
|
1852
|
-
var
|
|
1870
|
+
M.push(s.config.cancelRoute);
|
|
1871
|
+
}, C = k(() => {
|
|
1872
|
+
var a, F;
|
|
1873
|
+
let t = `${s.config.apiBaseUrl}${ve.form[s.config.app].validate}`;
|
|
1874
|
+
return s.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((a = s.config) == null ? void 0 : a.controlPlaneId) || "") : s.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (F = s.config) != null && F.workspace ? `/${s.config.workspace}` : "")), t = t.replace(/{id}/gi, s.gatewayServiceId), t;
|
|
1875
|
+
}), W = k(() => {
|
|
1876
|
+
var a, F;
|
|
1877
|
+
let t = `${s.config.apiBaseUrl}${ve.form[s.config.app][z.value]}`;
|
|
1878
|
+
return s.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((a = s.config) == null ? void 0 : a.controlPlaneId) || "") : s.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (F = s.config) != null && F.workspace ? `/${s.config.workspace}` : "")), t = t.replace(/{id}/gi, s.gatewayServiceId), t;
|
|
1879
|
+
}), pe = (t) => {
|
|
1880
|
+
let a = "";
|
|
1881
|
+
t.url && (a = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(a)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
1882
|
+
}, N = k(() => {
|
|
1883
|
+
var a, F, j, U;
|
|
1853
1884
|
const t = {
|
|
1854
1885
|
name: e.fields.name || null,
|
|
1855
|
-
tags: e.fields.tags ? (
|
|
1886
|
+
tags: e.fields.tags ? (j = (F = (a = e.fields.tags) == null ? void 0 : a.split(",")) == null ? void 0 : F.map((R) => String(R || "").trim())) == null ? void 0 : j.filter((R) => R !== "") : null,
|
|
1856
1887
|
protocol: e.fields.protocol,
|
|
1857
1888
|
path: e.fields.path || null,
|
|
1858
1889
|
read_timeout: e.fields.read_timeout,
|
|
@@ -1861,118 +1892,118 @@ const le = {
|
|
|
1861
1892
|
connect_timeout: e.fields.connect_timeout,
|
|
1862
1893
|
tls_verify_value: e.fields.tls_verify_value,
|
|
1863
1894
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
1864
|
-
ca_certificates: e.fields.ca_certificates ? (U = e.fields.ca_certificates) == null ? void 0 : U.split(",").filter((
|
|
1895
|
+
ca_certificates: e.fields.ca_certificates ? (U = e.fields.ca_certificates) == null ? void 0 : U.split(",").filter((R) => R !== "") : null,
|
|
1865
1896
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1866
1897
|
write_timeout: e.fields.write_timeout,
|
|
1867
1898
|
port: e.fields.port,
|
|
1868
1899
|
url: e.fields.url
|
|
1869
1900
|
};
|
|
1870
|
-
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),
|
|
1871
|
-
}),
|
|
1872
|
-
var t,
|
|
1901
|
+
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), u.value || (t.path = null), z.value === "create" ? w.value === "url" ? (delete t.protocol, delete t.host, delete t.path, s.config.app === "konnect" && delete t.port) : delete t.url : z.value === "edit" && delete t.url, t;
|
|
1902
|
+
}), me = async () => {
|
|
1903
|
+
var t, a, F, j;
|
|
1873
1904
|
try {
|
|
1874
|
-
e.isReadonly = !0,
|
|
1875
|
-
const U =
|
|
1876
|
-
|
|
1877
|
-
let
|
|
1878
|
-
if (await
|
|
1879
|
-
const { data:
|
|
1880
|
-
e.fields.name = (
|
|
1905
|
+
e.isReadonly = !0, ae();
|
|
1906
|
+
const U = N.value;
|
|
1907
|
+
pe(U);
|
|
1908
|
+
let R;
|
|
1909
|
+
if (await P.post(C.value, U), z.value === "create" ? R = await P.post(W.value, U) : z.value === "edit" && (R = ((t = s.config) == null ? void 0 : t.app) === "konnect" ? await P.put(W.value, U) : await P.patch(W.value, U)), R) {
|
|
1910
|
+
const { data: f } = R;
|
|
1911
|
+
e.fields.name = (f == null ? void 0 : f.name) || "", e.fields.port = f.port || re.getPortFromProtocol(f.protocol), e.fields.protocol = (f == null ? void 0 : f.protocol) || "http", e.fields.host = (f == null ? void 0 : f.host) || "", e.fields.path = (f == null ? void 0 : f.path) || "", e.fields.url = (f == null ? void 0 : f.url) || "", e.fields.retries = f != null && f.retries || (f == null ? void 0 : f.retries) === 0 ? f == null ? void 0 : f.retries : 5, e.fields.connect_timeout = f != null && f.connect_timeout || (f == null ? void 0 : f.connect_timeout) === 0 ? f == null ? void 0 : f.connect_timeout : 6e4, e.fields.write_timeout = f != null && f.write_timeout || (f == null ? void 0 : f.write_timeout) === 0 ? f == null ? void 0 : f.write_timeout : 6e4, e.fields.read_timeout = f != null && f.read_timeout || (f == null ? void 0 : f.read_timeout) === 0 ? f == null ? void 0 : f.read_timeout : 6e4, e.fields.client_certificate = ((a = f == null ? void 0 : f.client_certificate) == null ? void 0 : a.id) || "", e.fields.ca_certificates = (F = f == null ? void 0 : f.ca_certificates) != null && F.length ? f == null ? void 0 : f.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (f == null ? void 0 : f.tls_verify) !== "" && (f == null ? void 0 : f.tls_verify) !== null && (f == null ? void 0 : f.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (f == null ? void 0 : f.tls_verify), e.fields.tags = (j = f == null ? void 0 : f.tags) != null && j.length ? f.tags.join(", ") : "", Object.assign(A, e.fields), p("update", R == null ? void 0 : R.data);
|
|
1881
1912
|
}
|
|
1882
|
-
return
|
|
1913
|
+
return R;
|
|
1883
1914
|
} catch (U) {
|
|
1884
|
-
const { fields:
|
|
1885
|
-
e.errorMessages =
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1915
|
+
const { fields: R, messages: f } = D(U);
|
|
1916
|
+
e.errorMessages = f, R.length && R.forEach((he) => {
|
|
1917
|
+
const Se = he.field;
|
|
1918
|
+
Se === "client_certificate.id" ? e.formFieldErrors.client_certificate = he.message : Se.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = he.message : Object.keys(e.formFieldErrors).includes(Se) && (e.formFieldErrors = {
|
|
1888
1919
|
...e.formFieldErrors,
|
|
1889
|
-
[
|
|
1920
|
+
[Se]: he.message
|
|
1890
1921
|
});
|
|
1891
1922
|
}), p("error", U);
|
|
1892
1923
|
} finally {
|
|
1893
1924
|
e.isReadonly = !1;
|
|
1894
1925
|
}
|
|
1895
1926
|
};
|
|
1896
|
-
return
|
|
1897
|
-
Object.assign(e.fields,
|
|
1898
|
-
}),
|
|
1899
|
-
e.fields.port =
|
|
1900
|
-
}),
|
|
1901
|
-
p("model-updated",
|
|
1902
|
-
}),
|
|
1903
|
-
validateUrl:
|
|
1904
|
-
getPayload:
|
|
1905
|
-
saveFormData:
|
|
1906
|
-
canSubmit:
|
|
1907
|
-
initForm:
|
|
1908
|
-
}), (t,
|
|
1909
|
-
const F =
|
|
1910
|
-
return
|
|
1911
|
-
|
|
1912
|
-
"can-submit":
|
|
1927
|
+
return $e(() => s.gatewayServiceId, () => {
|
|
1928
|
+
Object.assign(e.fields, A);
|
|
1929
|
+
}), $e(e.fields, (t) => {
|
|
1930
|
+
e.fields.port = re.getPortFromProtocol(t.protocol, String(t.port)), p("model-updated", N.value);
|
|
1931
|
+
}), Qe(() => {
|
|
1932
|
+
p("model-updated", N.value), o.value || (e.fields.name = i());
|
|
1933
|
+
}), K({
|
|
1934
|
+
validateUrl: ae,
|
|
1935
|
+
getPayload: N,
|
|
1936
|
+
saveFormData: me,
|
|
1937
|
+
canSubmit: c,
|
|
1938
|
+
initForm: g
|
|
1939
|
+
}), (t, a) => {
|
|
1940
|
+
const F = G("KRadio"), j = G("KButton"), U = G("KInput"), R = G("KSelect"), f = G("KCheckbox"), he = G("KCollapse"), Se = G("KAlert");
|
|
1941
|
+
return S(), $("div", nl, [
|
|
1942
|
+
d(l(lt), {
|
|
1943
|
+
"can-submit": c.value,
|
|
1913
1944
|
config: n.config,
|
|
1914
1945
|
"edit-id": n.gatewayServiceId,
|
|
1915
1946
|
"entity-type": l(Ne).GatewayService,
|
|
1916
|
-
"fetch-url":
|
|
1917
|
-
"form-fields":
|
|
1947
|
+
"fetch-url": ge.value,
|
|
1948
|
+
"form-fields": N.value,
|
|
1918
1949
|
"is-readonly": e.isReadonly,
|
|
1919
1950
|
onCancel: m,
|
|
1920
|
-
"onFetch:error":
|
|
1921
|
-
"onFetch:success":
|
|
1922
|
-
onLoading:
|
|
1923
|
-
onSubmit:
|
|
1951
|
+
"onFetch:error": a[30] || (a[30] = (_) => t.$emit("error", _)),
|
|
1952
|
+
"onFetch:success": g,
|
|
1953
|
+
onLoading: a[31] || (a[31] = (_) => t.$emit("loading", _)),
|
|
1954
|
+
onSubmit: me
|
|
1924
1955
|
}, {
|
|
1925
1956
|
"form-actions": v(() => [
|
|
1926
|
-
|
|
1927
|
-
canSubmit:
|
|
1957
|
+
Xe(t.$slots, "form-actions", {
|
|
1958
|
+
canSubmit: c.value,
|
|
1928
1959
|
cancel: m,
|
|
1929
|
-
submit:
|
|
1960
|
+
submit: me
|
|
1930
1961
|
}, void 0, !0)
|
|
1931
1962
|
]),
|
|
1932
1963
|
default: v(() => [
|
|
1933
|
-
|
|
1964
|
+
d(l(Ke), {
|
|
1934
1965
|
description: l(r)("gateway_services.form.sections.keys.description"),
|
|
1935
1966
|
"hide-info-header": n.hideSectionsInfo,
|
|
1936
1967
|
title: l(r)("gateway_services.form.sections.keys.title")
|
|
1937
1968
|
}, {
|
|
1938
1969
|
default: v(() => [
|
|
1939
|
-
o.value ?
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
modelValue:
|
|
1943
|
-
"onUpdate:modelValue":
|
|
1970
|
+
o.value ? B("", !0) : (S(), $("div", cl, [
|
|
1971
|
+
I("div", dl, [
|
|
1972
|
+
d(F, {
|
|
1973
|
+
modelValue: w.value,
|
|
1974
|
+
"onUpdate:modelValue": a[0] || (a[0] = (_) => w.value = _),
|
|
1944
1975
|
card: "",
|
|
1945
1976
|
"card-orientation": "horizontal",
|
|
1946
1977
|
"data-testid": "gateway-service-url-radio",
|
|
1947
1978
|
description: l(r)("gateway_services.form.sections.keys.url.description"),
|
|
1948
1979
|
label: l(r)("gateway_services.form.sections.keys.url.label"),
|
|
1949
|
-
"selected-value":
|
|
1950
|
-
onChange:
|
|
1980
|
+
"selected-value": se.url,
|
|
1981
|
+
onChange: Ce
|
|
1951
1982
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1952
|
-
|
|
1953
|
-
modelValue:
|
|
1954
|
-
"onUpdate:modelValue":
|
|
1983
|
+
d(F, {
|
|
1984
|
+
modelValue: w.value,
|
|
1985
|
+
"onUpdate:modelValue": a[1] || (a[1] = (_) => w.value = _),
|
|
1955
1986
|
card: "",
|
|
1956
1987
|
"card-orientation": "horizontal",
|
|
1957
1988
|
"checked-group": "protocol",
|
|
1958
1989
|
"data-testid": "gateway-service-protocol-radio",
|
|
1959
1990
|
description: l(r)("gateway_services.form.sections.keys.protocol.description"),
|
|
1960
1991
|
label: l(r)("gateway_services.form.sections.keys.protocol.label"),
|
|
1961
|
-
"selected-value":
|
|
1962
|
-
onChange:
|
|
1992
|
+
"selected-value": se.protocol,
|
|
1993
|
+
onChange: Ce
|
|
1963
1994
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1964
1995
|
]),
|
|
1965
|
-
|
|
1996
|
+
d(De, { name: "slide-fade" }, {
|
|
1966
1997
|
default: v(() => [
|
|
1967
|
-
|
|
1968
|
-
|
|
1998
|
+
w.value === "url" ? (S(), $("div", ul, [
|
|
1999
|
+
d(U, {
|
|
1969
2000
|
modelValue: e.fields.url,
|
|
1970
|
-
"onUpdate:modelValue":
|
|
2001
|
+
"onUpdate:modelValue": a[2] || (a[2] = (_) => e.fields.url = _),
|
|
1971
2002
|
modelModifiers: { trim: !0 },
|
|
1972
2003
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1973
2004
|
"data-testid": "gateway-service-url-input",
|
|
1974
2005
|
error: Ee.value,
|
|
1975
|
-
"error-message":
|
|
2006
|
+
"error-message": ee("url"),
|
|
1976
2007
|
label: l(r)("gateway_services.form.fields.upstream_url.label"),
|
|
1977
2008
|
"label-attributes": {
|
|
1978
2009
|
info: n.config.app === "konnect" ? l(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : l(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
@@ -1986,14 +2017,14 @@ const le = {
|
|
|
1986
2017
|
n.hideTrySampleApiButton ? void 0 : {
|
|
1987
2018
|
name: "after",
|
|
1988
2019
|
fn: v(() => [
|
|
1989
|
-
|
|
2020
|
+
d(j, {
|
|
1990
2021
|
appearance: "tertiary",
|
|
1991
2022
|
"data-testid": "try-sample-api",
|
|
1992
2023
|
size: "small",
|
|
1993
|
-
onClick:
|
|
2024
|
+
onClick: fe
|
|
1994
2025
|
}, {
|
|
1995
2026
|
default: v(() => [
|
|
1996
|
-
|
|
2027
|
+
J(E(l(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
1997
2028
|
]),
|
|
1998
2029
|
_: 1
|
|
1999
2030
|
})
|
|
@@ -2001,19 +2032,19 @@ const le = {
|
|
|
2001
2032
|
key: "0"
|
|
2002
2033
|
}
|
|
2003
2034
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "onInput"])
|
|
2004
|
-
])) :
|
|
2035
|
+
])) : B("", !0)
|
|
2005
2036
|
]),
|
|
2006
2037
|
_: 1
|
|
2007
2038
|
})
|
|
2008
2039
|
])),
|
|
2009
|
-
|
|
2040
|
+
d(De, { name: "slide-fade" }, {
|
|
2010
2041
|
default: v(() => [
|
|
2011
|
-
|
|
2012
|
-
|
|
2042
|
+
w.value === "protocol" || o.value ? (S(), $("div", fl, [
|
|
2043
|
+
d(R, {
|
|
2013
2044
|
modelValue: e.fields.protocol,
|
|
2014
|
-
"onUpdate:modelValue":
|
|
2045
|
+
"onUpdate:modelValue": a[3] || (a[3] = (_) => e.fields.protocol = _),
|
|
2015
2046
|
"data-testid": "gateway-service-protocol-select",
|
|
2016
|
-
items:
|
|
2047
|
+
items: O,
|
|
2017
2048
|
label: l(r)("gateway_services.form.fields.protocol.label"),
|
|
2018
2049
|
"label-attributes": {
|
|
2019
2050
|
info: l(r)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -2022,16 +2053,16 @@ const le = {
|
|
|
2022
2053
|
readonly: e.isReadonly,
|
|
2023
2054
|
required: "",
|
|
2024
2055
|
width: "100%",
|
|
2025
|
-
onSelected:
|
|
2056
|
+
onSelected: a[4] || (a[4] = (_) => Pe(e.fields.protocol, _))
|
|
2026
2057
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2027
|
-
|
|
2058
|
+
d(U, {
|
|
2028
2059
|
modelValue: e.fields.host,
|
|
2029
|
-
"onUpdate:modelValue":
|
|
2060
|
+
"onUpdate:modelValue": a[5] || (a[5] = (_) => e.fields.host = _),
|
|
2030
2061
|
modelModifiers: { trim: !0 },
|
|
2031
2062
|
class: "gateway-service-form-margin-top",
|
|
2032
2063
|
"data-testid": "gateway-service-host-input",
|
|
2033
2064
|
error: !!e.formFieldErrors.host,
|
|
2034
|
-
"error-message":
|
|
2065
|
+
"error-message": ee("host"),
|
|
2035
2066
|
label: l(r)("gateway_services.form.fields.host.label"),
|
|
2036
2067
|
"label-attributes": {
|
|
2037
2068
|
info: l(r)("gateway_services.form.fields.host.tooltip"),
|
|
@@ -2040,18 +2071,18 @@ const le = {
|
|
|
2040
2071
|
name: "host",
|
|
2041
2072
|
placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
|
|
2042
2073
|
required: "",
|
|
2043
|
-
onInput:
|
|
2074
|
+
onInput: a[6] || (a[6] = (_) => l(H)("host"))
|
|
2044
2075
|
}, Re({ _: 2 }, [
|
|
2045
2076
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2046
2077
|
name: "after",
|
|
2047
2078
|
fn: v(() => [
|
|
2048
|
-
|
|
2079
|
+
d(j, {
|
|
2049
2080
|
appearance: "tertiary",
|
|
2050
2081
|
size: "small",
|
|
2051
|
-
onClick:
|
|
2082
|
+
onClick: fe
|
|
2052
2083
|
}, {
|
|
2053
2084
|
default: v(() => [
|
|
2054
|
-
|
|
2085
|
+
J(E(l(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2055
2086
|
]),
|
|
2056
2087
|
_: 1
|
|
2057
2088
|
})
|
|
@@ -2059,15 +2090,15 @@ const le = {
|
|
|
2059
2090
|
key: "0"
|
|
2060
2091
|
}
|
|
2061
2092
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
2062
|
-
|
|
2063
|
-
|
|
2093
|
+
u.value ? (S(), $("div", pl, [
|
|
2094
|
+
d(U, {
|
|
2064
2095
|
modelValue: e.fields.path,
|
|
2065
|
-
"onUpdate:modelValue":
|
|
2096
|
+
"onUpdate:modelValue": a[7] || (a[7] = (_) => e.fields.path = _),
|
|
2066
2097
|
modelModifiers: { trim: !0 },
|
|
2067
2098
|
class: "gateway-service-form-margin-top",
|
|
2068
2099
|
"data-testid": "gateway-service-path-input",
|
|
2069
2100
|
error: !!e.formFieldErrors.path,
|
|
2070
|
-
"error-message":
|
|
2101
|
+
"error-message": ee("path"),
|
|
2071
2102
|
label: l(r)("gateway_services.form.fields.path.label"),
|
|
2072
2103
|
"label-attributes": {
|
|
2073
2104
|
info: l(r)("gateway_services.form.fields.path.tooltip"),
|
|
@@ -2075,21 +2106,21 @@ const le = {
|
|
|
2075
2106
|
},
|
|
2076
2107
|
name: "path",
|
|
2077
2108
|
placeholder: l(r)("gateway_services.form.fields.path.placeholder"),
|
|
2078
|
-
onInput:
|
|
2109
|
+
onInput: a[8] || (a[8] = (_) => l(H)("path"))
|
|
2079
2110
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2080
|
-
])) :
|
|
2081
|
-
|
|
2111
|
+
])) : B("", !0),
|
|
2112
|
+
d(U, {
|
|
2082
2113
|
modelValue: e.fields.port,
|
|
2083
2114
|
"onUpdate:modelValue": [
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
e.fields.port =
|
|
2115
|
+
a[9] || (a[9] = (_) => e.fields.port = _),
|
|
2116
|
+
a[11] || (a[11] = () => {
|
|
2117
|
+
e.fields.port = oe(e.fields.port + "");
|
|
2087
2118
|
})
|
|
2088
2119
|
],
|
|
2089
2120
|
class: "gateway-service-form-margin-top",
|
|
2090
2121
|
"data-testid": "gateway-service-port-input",
|
|
2091
2122
|
error: !!e.formFieldErrors.port,
|
|
2092
|
-
"error-message":
|
|
2123
|
+
"error-message": ee("port"),
|
|
2093
2124
|
label: l(r)("gateway_services.form.fields.port.label"),
|
|
2094
2125
|
"label-attributes": {
|
|
2095
2126
|
info: l(r)("gateway_services.form.fields.port.tooltip"),
|
|
@@ -2097,30 +2128,30 @@ const le = {
|
|
|
2097
2128
|
},
|
|
2098
2129
|
name: "port",
|
|
2099
2130
|
type: "number",
|
|
2100
|
-
onInput:
|
|
2131
|
+
onInput: a[10] || (a[10] = (_) => l(H)("port"))
|
|
2101
2132
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
2102
|
-
])) :
|
|
2133
|
+
])) : B("", !0)
|
|
2103
2134
|
]),
|
|
2104
2135
|
_: 1
|
|
2105
2136
|
}),
|
|
2106
|
-
|
|
2107
|
-
modelValue:
|
|
2108
|
-
"onUpdate:modelValue":
|
|
2137
|
+
d(he, {
|
|
2138
|
+
modelValue: b.value,
|
|
2139
|
+
"onUpdate:modelValue": a[27] || (a[27] = (_) => b.value = _),
|
|
2109
2140
|
"data-testid": "advanced-fields-collapse",
|
|
2110
2141
|
"trigger-alignment": "leading",
|
|
2111
2142
|
"trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
2112
2143
|
}, {
|
|
2113
2144
|
default: v(() => [
|
|
2114
|
-
|
|
2145
|
+
d(De, { name: "slide-fade" }, {
|
|
2115
2146
|
default: v(() => [
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2147
|
+
b.value ? B("", !0) : (S(), $("div", ml, [
|
|
2148
|
+
I("div", vl, [
|
|
2149
|
+
d(U, {
|
|
2119
2150
|
modelValue: e.fields.retries,
|
|
2120
2151
|
"onUpdate:modelValue": [
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
e.fields.retries =
|
|
2152
|
+
a[12] || (a[12] = (_) => e.fields.retries = _),
|
|
2153
|
+
a[13] || (a[13] = () => {
|
|
2154
|
+
e.fields.retries = oe(e.fields.retries + "");
|
|
2124
2155
|
})
|
|
2125
2156
|
],
|
|
2126
2157
|
autocomplete: "off",
|
|
@@ -2135,13 +2166,13 @@ const le = {
|
|
|
2135
2166
|
type: "number"
|
|
2136
2167
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2137
2168
|
]),
|
|
2138
|
-
|
|
2139
|
-
|
|
2169
|
+
I("div", gl, [
|
|
2170
|
+
d(U, {
|
|
2140
2171
|
modelValue: e.fields.connect_timeout,
|
|
2141
2172
|
"onUpdate:modelValue": [
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
e.fields.connect_timeout =
|
|
2173
|
+
a[14] || (a[14] = (_) => e.fields.connect_timeout = _),
|
|
2174
|
+
a[15] || (a[15] = () => {
|
|
2175
|
+
e.fields.connect_timeout = oe(e.fields.connect_timeout + "");
|
|
2145
2176
|
})
|
|
2146
2177
|
],
|
|
2147
2178
|
autocomplete: "off",
|
|
@@ -2156,13 +2187,13 @@ const le = {
|
|
|
2156
2187
|
type: "number"
|
|
2157
2188
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2158
2189
|
]),
|
|
2159
|
-
|
|
2160
|
-
|
|
2190
|
+
I("div", yl, [
|
|
2191
|
+
d(U, {
|
|
2161
2192
|
modelValue: e.fields.write_timeout,
|
|
2162
2193
|
"onUpdate:modelValue": [
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
e.fields.write_timeout =
|
|
2194
|
+
a[16] || (a[16] = (_) => e.fields.write_timeout = _),
|
|
2195
|
+
a[17] || (a[17] = () => {
|
|
2196
|
+
e.fields.write_timeout = oe(e.fields.write_timeout + "");
|
|
2166
2197
|
})
|
|
2167
2198
|
],
|
|
2168
2199
|
autocomplete: "off",
|
|
@@ -2177,13 +2208,13 @@ const le = {
|
|
|
2177
2208
|
type: "number"
|
|
2178
2209
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2179
2210
|
]),
|
|
2180
|
-
|
|
2181
|
-
|
|
2211
|
+
I("div", _l, [
|
|
2212
|
+
d(U, {
|
|
2182
2213
|
modelValue: e.fields.read_timeout,
|
|
2183
2214
|
"onUpdate:modelValue": [
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
e.fields.read_timeout =
|
|
2215
|
+
a[18] || (a[18] = (_) => e.fields.read_timeout = _),
|
|
2216
|
+
a[19] || (a[19] = () => {
|
|
2217
|
+
e.fields.read_timeout = oe(e.fields.read_timeout + "");
|
|
2187
2218
|
})
|
|
2188
2219
|
],
|
|
2189
2220
|
autocomplete: "off",
|
|
@@ -2198,10 +2229,10 @@ const le = {
|
|
|
2198
2229
|
type: "number"
|
|
2199
2230
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2200
2231
|
]),
|
|
2201
|
-
V.value ? (
|
|
2202
|
-
|
|
2232
|
+
V.value ? (S(), $("div", bl, [
|
|
2233
|
+
d(U, {
|
|
2203
2234
|
modelValue: e.fields.client_certificate,
|
|
2204
|
-
"onUpdate:modelValue":
|
|
2235
|
+
"onUpdate:modelValue": a[20] || (a[20] = (_) => e.fields.client_certificate = _),
|
|
2205
2236
|
modelModifiers: { trim: !0 },
|
|
2206
2237
|
autocomplete: "off",
|
|
2207
2238
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -2215,13 +2246,13 @@ const le = {
|
|
|
2215
2246
|
placeholder: l(r)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
2216
2247
|
readonly: e.isReadonly,
|
|
2217
2248
|
type: "text",
|
|
2218
|
-
onInput:
|
|
2249
|
+
onInput: a[21] || (a[21] = (_) => l(be)("client_certificate"))
|
|
2219
2250
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
2220
|
-
])) :
|
|
2221
|
-
|
|
2222
|
-
|
|
2251
|
+
])) : B("", !0),
|
|
2252
|
+
X.value ? (S(), $("div", hl, [
|
|
2253
|
+
d(U, {
|
|
2223
2254
|
modelValue: e.fields.ca_certificates,
|
|
2224
|
-
"onUpdate:modelValue":
|
|
2255
|
+
"onUpdate:modelValue": a[22] || (a[22] = (_) => e.fields.ca_certificates = _),
|
|
2225
2256
|
modelModifiers: { trim: !0 },
|
|
2226
2257
|
autocomplete: "off",
|
|
2227
2258
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -2231,66 +2262,66 @@ const le = {
|
|
|
2231
2262
|
placeholder: l(r)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
2232
2263
|
readonly: e.isReadonly,
|
|
2233
2264
|
type: "text",
|
|
2234
|
-
onInput:
|
|
2265
|
+
onInput: a[23] || (a[23] = (_) => l(be)("ca_certificates"))
|
|
2235
2266
|
}, {
|
|
2236
2267
|
"label-tooltip": v(() => [
|
|
2237
|
-
|
|
2268
|
+
d(l(Q), {
|
|
2238
2269
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
2239
2270
|
scope: "global"
|
|
2240
2271
|
}, {
|
|
2241
2272
|
code1: v(() => [
|
|
2242
|
-
|
|
2273
|
+
I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
2243
2274
|
]),
|
|
2244
2275
|
code2: v(() => [
|
|
2245
|
-
|
|
2276
|
+
I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
2246
2277
|
]),
|
|
2247
2278
|
_: 1
|
|
2248
2279
|
})
|
|
2249
2280
|
]),
|
|
2250
2281
|
_: 1
|
|
2251
2282
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2252
|
-
])) :
|
|
2253
|
-
|
|
2254
|
-
f
|
|
2283
|
+
])) : B("", !0),
|
|
2284
|
+
L.value ? (S(), $("div", wl, [
|
|
2285
|
+
d(f, {
|
|
2255
2286
|
modelValue: e.fields.tls_verify_enabled,
|
|
2256
|
-
"onUpdate:modelValue":
|
|
2287
|
+
"onUpdate:modelValue": a[24] || (a[24] = (_) => e.fields.tls_verify_enabled = _),
|
|
2257
2288
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
2258
2289
|
description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
2259
2290
|
label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
2260
2291
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
2261
2292
|
}, {
|
|
2262
2293
|
tooltip: v(() => [
|
|
2263
|
-
|
|
2294
|
+
d(l(Q), {
|
|
2264
2295
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
2265
2296
|
scope: "global"
|
|
2266
2297
|
}, {
|
|
2267
2298
|
code1: v(() => [
|
|
2268
|
-
|
|
2299
|
+
I("code", null, E(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
2269
2300
|
]),
|
|
2270
2301
|
_: 1
|
|
2271
2302
|
})
|
|
2272
2303
|
]),
|
|
2273
2304
|
_: 1
|
|
2274
2305
|
}, 8, ["modelValue", "description", "label"]),
|
|
2275
|
-
e.fields.tls_verify_enabled ? (
|
|
2276
|
-
|
|
2306
|
+
e.fields.tls_verify_enabled ? (S(), $("div", kl, [
|
|
2307
|
+
d(F, {
|
|
2277
2308
|
modelValue: e.fields.tls_verify_value,
|
|
2278
|
-
"onUpdate:modelValue":
|
|
2309
|
+
"onUpdate:modelValue": a[25] || (a[25] = (_) => e.fields.tls_verify_value = _),
|
|
2279
2310
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
2280
2311
|
label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
2281
2312
|
"selected-value": !0
|
|
2282
2313
|
}, null, 8, ["modelValue", "label"])
|
|
2283
|
-
])) :
|
|
2284
|
-
e.fields.tls_verify_enabled ? (
|
|
2285
|
-
|
|
2314
|
+
])) : B("", !0),
|
|
2315
|
+
e.fields.tls_verify_enabled ? (S(), $("div", Vl, [
|
|
2316
|
+
d(F, {
|
|
2286
2317
|
modelValue: e.fields.tls_verify_value,
|
|
2287
|
-
"onUpdate:modelValue":
|
|
2318
|
+
"onUpdate:modelValue": a[26] || (a[26] = (_) => e.fields.tls_verify_value = _),
|
|
2288
2319
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
2289
2320
|
label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
2290
2321
|
"selected-value": !1
|
|
2291
2322
|
}, null, 8, ["modelValue", "label"])
|
|
2292
|
-
])) :
|
|
2293
|
-
])) :
|
|
2323
|
+
])) : B("", !0)
|
|
2324
|
+
])) : B("", !0)
|
|
2294
2325
|
]))
|
|
2295
2326
|
]),
|
|
2296
2327
|
_: 1
|
|
@@ -2301,20 +2332,20 @@ const le = {
|
|
|
2301
2332
|
]),
|
|
2302
2333
|
_: 1
|
|
2303
2334
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2304
|
-
|
|
2335
|
+
d(l(Ke), {
|
|
2305
2336
|
description: l(r)("gateway_services.form.sections.general.description"),
|
|
2306
2337
|
"hide-info-header": n.hideSectionsInfo,
|
|
2307
2338
|
title: l(r)("gateway_services.form.sections.general.title")
|
|
2308
2339
|
}, {
|
|
2309
2340
|
default: v(() => [
|
|
2310
|
-
|
|
2341
|
+
d(U, {
|
|
2311
2342
|
modelValue: e.fields.name,
|
|
2312
|
-
"onUpdate:modelValue":
|
|
2343
|
+
"onUpdate:modelValue": a[28] || (a[28] = (_) => e.fields.name = _),
|
|
2313
2344
|
modelModifiers: { trim: !0 },
|
|
2314
2345
|
autocomplete: "off",
|
|
2315
2346
|
"data-testid": "gateway-service-name-input",
|
|
2316
|
-
error:
|
|
2317
|
-
"error-message":
|
|
2347
|
+
error: ke.value,
|
|
2348
|
+
"error-message": ye.value,
|
|
2318
2349
|
label: l(r)("gateway_services.form.fields.name.label"),
|
|
2319
2350
|
"label-attributes": {
|
|
2320
2351
|
info: l(r)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -2324,18 +2355,18 @@ const le = {
|
|
|
2324
2355
|
placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
|
|
2325
2356
|
readonly: e.isReadonly,
|
|
2326
2357
|
type: "text",
|
|
2327
|
-
onInput:
|
|
2358
|
+
onInput: T
|
|
2328
2359
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
2329
|
-
|
|
2360
|
+
d(he, {
|
|
2330
2361
|
"data-testid": "tags-collapse",
|
|
2331
2362
|
"trigger-alignment": "leading",
|
|
2332
2363
|
"trigger-label": l(r)("gateway_services.form.fields.tags.collapse")
|
|
2333
2364
|
}, {
|
|
2334
2365
|
default: v(() => [
|
|
2335
|
-
|
|
2336
|
-
|
|
2366
|
+
I("div", Cl, [
|
|
2367
|
+
d(U, {
|
|
2337
2368
|
modelValue: e.fields.tags,
|
|
2338
|
-
"onUpdate:modelValue":
|
|
2369
|
+
"onUpdate:modelValue": a[29] || (a[29] = (_) => e.fields.tags = _),
|
|
2339
2370
|
modelModifiers: { trim: !0 },
|
|
2340
2371
|
autocomplete: "off",
|
|
2341
2372
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -2357,24 +2388,24 @@ const le = {
|
|
|
2357
2388
|
]),
|
|
2358
2389
|
_: 1
|
|
2359
2390
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2360
|
-
e.errorMessages.length ? (
|
|
2391
|
+
e.errorMessages.length ? (S(), Ue(Se, {
|
|
2361
2392
|
key: 0,
|
|
2362
2393
|
appearance: "danger"
|
|
2363
2394
|
}, {
|
|
2364
2395
|
default: v(() => [
|
|
2365
|
-
|
|
2366
|
-
(
|
|
2396
|
+
I("ul", Sl, [
|
|
2397
|
+
(S(!0), $(rt, null, st(e.errorMessages, (_) => (S(), $("li", { key: _ }, E(_), 1))), 128))
|
|
2367
2398
|
])
|
|
2368
2399
|
]),
|
|
2369
2400
|
_: 1
|
|
2370
|
-
})) :
|
|
2401
|
+
})) : B("", !0)
|
|
2371
2402
|
]),
|
|
2372
2403
|
_: 3
|
|
2373
2404
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
2374
2405
|
]);
|
|
2375
2406
|
};
|
|
2376
2407
|
}
|
|
2377
|
-
}),
|
|
2408
|
+
}), Ll = /* @__PURE__ */ je(Il, [["__scopeId", "data-v-aac697aa"]]), { validateHost: Pl, validatePort: El, validateProtocol: Fl, validatePath: Ul } = ne.useUrlValidators(), Wl = () => ({
|
|
2378
2409
|
validateHost: Pl,
|
|
2379
2410
|
validatePort: El,
|
|
2380
2411
|
validateProtocol: Fl,
|
|
@@ -2382,8 +2413,8 @@ const le = {
|
|
|
2382
2413
|
});
|
|
2383
2414
|
export {
|
|
2384
2415
|
Kl as GatewayServiceConfigCard,
|
|
2385
|
-
|
|
2416
|
+
Ll as GatewayServiceForm,
|
|
2386
2417
|
Ml as GatewayServiceList,
|
|
2387
2418
|
Bl as LegacyGatewayServiceForm,
|
|
2388
|
-
|
|
2419
|
+
Wl as useUrlValidator
|
|
2389
2420
|
};
|