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