@kong-ui-public/entities-gateway-services 3.13.28-pr.2732.14092b6ff.0 → 3.13.28-pr.2734.381a5b2e0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-gateway-services.es.js +488 -467
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceList.vue.d.ts +13 -0
- package/dist/types/components/GatewayServiceList.vue.d.ts.map +1 -1
- package/dist/types/types/gateway-service-list.d.ts +2 -0
- package/dist/types/types/gateway-service-list.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as De, ref as R, computed as V, watch as Me, onBeforeMount as He, resolveComponent as D, createElementBlock as T, openBlock as S, createVNode as n, unref as r, createSlots as Ve, withCtx as d, createTextVNode as U, toDisplayString as h, createElementVNode as E, withModifiers as Ue, createBlock as de, Teleport as Ze, createCommentVNode as M, reactive as Be, onMounted as Je, Transition as Re, Fragment as Qe, renderList as Xe, renderSlot as Ye } from "vue";
|
|
2
2
|
import { useRouter as Ne } from "vue-router";
|
|
3
3
|
import { BookIcon as Ke, AddIcon as Le, ServicesIcon as et } from "@kong/icons";
|
|
4
4
|
import { createI18n as tt, i18nTComponent as ot } from "@kong-ui-public/i18n";
|
|
5
|
-
import { useAxios as We, useTableState as rt, useFetcher as it, useDeleteUrlBuilder as lt, FetcherStatus as st, EntityBaseTable as at, PermissionsWrapper as
|
|
5
|
+
import { useAxios as We, useTableState as rt, useFetcher as it, useDeleteUrlBuilder as lt, FetcherStatus as st, EntityBaseTable as at, PermissionsWrapper as le, TableTags as nt, EntityFilter as ct, EntityToggleModal as dt, EntityDeleteModal as ut, EntityTypes as ft, useHelpers as Oe, ConfigurationSchemaType as pt, ConfigurationSchemaSection as ke, EntityBaseConfigCard as mt, SupportedEntityType as je, useErrors as vt, useValidators as gt, EntityBaseFormType as qe, useGatewayFeatureSupported as yt, EntityBaseForm as _t, EntityFormSection as Ge } from "@kong-ui-public/entities-shared";
|
|
6
6
|
const ht = {
|
|
7
7
|
create: "New gateway service",
|
|
8
|
+
debugger: "Start debugging",
|
|
8
9
|
serverless_create: "Add a Service",
|
|
9
10
|
copy_id: "Copy ID",
|
|
10
11
|
copy_json: "Copy JSON",
|
|
@@ -232,11 +233,11 @@ function Et() {
|
|
|
232
233
|
}
|
|
233
234
|
function Pt() {
|
|
234
235
|
return {
|
|
235
|
-
getPortFromProtocol: (
|
|
236
|
+
getPortFromProtocol: (N, p) => {
|
|
236
237
|
const c = [80, 443], a = Number(p);
|
|
237
238
|
if ((a || a === 0) && !c.includes(a))
|
|
238
239
|
return a;
|
|
239
|
-
switch (
|
|
240
|
+
switch (N) {
|
|
240
241
|
case "grpcs":
|
|
241
242
|
case "tls":
|
|
242
243
|
case "https":
|
|
@@ -253,33 +254,33 @@ function Pt() {
|
|
|
253
254
|
};
|
|
254
255
|
}
|
|
255
256
|
function It() {
|
|
256
|
-
const { i18n: { t: s } } =
|
|
257
|
+
const { i18n: { t: s } } = X.useI18n();
|
|
257
258
|
return {
|
|
258
|
-
validateHost: (
|
|
259
|
-
if (!
|
|
259
|
+
validateHost: (v) => {
|
|
260
|
+
if (!v || v.trim() === "") return s("gateway_services.form.errors.host.empty");
|
|
260
261
|
const F = /^(?!:\/\/)([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})?$/;
|
|
261
|
-
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(
|
|
262
|
+
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(v) || F.test(v) ? "" : s("gateway_services.form.errors.host.invalid");
|
|
262
263
|
},
|
|
263
|
-
validateProtocol: (
|
|
264
|
-
if (l.value ===
|
|
264
|
+
validateProtocol: (v, F) => !v || v.trim() === "" ? s("gateway_services.form.errors.protocol.empty") : (v = v.slice(0, -1), F.find((l) => {
|
|
265
|
+
if (l.value === v) return l;
|
|
265
266
|
}) === void 0 ? s("gateway_services.form.errors.protocol.invalid") : ""),
|
|
266
|
-
validatePath: (
|
|
267
|
-
validatePort: (
|
|
268
|
-
if (
|
|
267
|
+
validatePath: (v) => !v || v === "" ? "" : v.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(v) ? s("gateway_services.form.errors.path.invalid") : "" : s("gateway_services.form.errors.path.prefix"),
|
|
268
|
+
validatePort: (v) => {
|
|
269
|
+
if (v == null || v === "")
|
|
269
270
|
return "";
|
|
270
|
-
const F = typeof
|
|
271
|
+
const F = typeof v == "string" ? parseInt(v, 10) : v;
|
|
271
272
|
return isNaN(F) ? s("gateway_services.form.errors.port.type") : F < 0 || F > 65535 ? s("gateway_services.form.errors.port.invalid") : "";
|
|
272
273
|
}
|
|
273
274
|
};
|
|
274
275
|
}
|
|
275
|
-
const
|
|
276
|
+
const X = {
|
|
276
277
|
useI18n: Et,
|
|
277
278
|
usePortFromProtocol: Pt,
|
|
278
279
|
useUrlValidators: It
|
|
279
|
-
},
|
|
280
|
+
}, $e = "/v2/control-planes/{controlPlaneId}/core-entities", xe = "/{workspace}", Ce = {
|
|
280
281
|
list: {
|
|
281
282
|
konnect: {
|
|
282
|
-
all: `${
|
|
283
|
+
all: `${$e}/services`
|
|
283
284
|
},
|
|
284
285
|
kongManager: {
|
|
285
286
|
all: `${xe}/services`
|
|
@@ -287,15 +288,15 @@ const Y = {
|
|
|
287
288
|
},
|
|
288
289
|
form: {
|
|
289
290
|
konnect: {
|
|
290
|
-
create: `${
|
|
291
|
-
edit: `${
|
|
291
|
+
create: `${$e}/services`,
|
|
292
|
+
edit: `${$e}/services/{id}`
|
|
292
293
|
},
|
|
293
294
|
kongManager: {
|
|
294
295
|
create: `${xe}/services`,
|
|
295
296
|
edit: `${xe}/services/{id}`
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
|
-
}, Ft = { class: "kong-ui-entities-gateway-services-list" }, At = { class: "button-row" }, Tt = { key: 1 }, Ut = /* @__PURE__ */
|
|
299
|
+
}, Ft = { class: "kong-ui-entities-gateway-services-list" }, At = { class: "button-row" }, Tt = { key: 1 }, Ut = /* @__PURE__ */ De({
|
|
299
300
|
__name: "GatewayServiceList",
|
|
300
301
|
props: {
|
|
301
302
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -333,6 +334,12 @@ const Y = {
|
|
|
333
334
|
required: !1,
|
|
334
335
|
default: async () => !0
|
|
335
336
|
},
|
|
337
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can start debugger session on a given entity */
|
|
338
|
+
canDebug: {
|
|
339
|
+
type: Function,
|
|
340
|
+
required: !1,
|
|
341
|
+
default: async () => !1
|
|
342
|
+
},
|
|
336
343
|
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
337
344
|
useActionOutside: {
|
|
338
345
|
type: Boolean,
|
|
@@ -345,9 +352,9 @@ const Y = {
|
|
|
345
352
|
}
|
|
346
353
|
},
|
|
347
354
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
348
|
-
setup(s, { emit:
|
|
349
|
-
var
|
|
350
|
-
const p =
|
|
355
|
+
setup(s, { emit: N }) {
|
|
356
|
+
var re;
|
|
357
|
+
const p = N, c = s, { i18n: { t: a, formatUnixTimeStamp: v } } = X.useI18n(), F = Ne(), { axiosInstance: q } = We((re = c.config) == null ? void 0 : re.axiosRequestConfig), { hasRecords: l, handleStateChange: B } = rt(() => O.value), P = V(() => l.value && c.config.app === "konnect"), Se = V(() => c.config.app !== "kongManager" || !!c.config.disableSorting), se = {
|
|
351
358
|
// the Name column is non-hidable
|
|
352
359
|
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
353
360
|
...c.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -363,70 +370,70 @@ const Y = {
|
|
|
363
370
|
columnVisibility: {
|
|
364
371
|
created_at: !1
|
|
365
372
|
}
|
|
366
|
-
}, fe =
|
|
367
|
-
var
|
|
368
|
-
let u = `${c.config.apiBaseUrl}${
|
|
369
|
-
return c.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((
|
|
370
|
-
}),
|
|
373
|
+
}, fe = se, Y = V(() => {
|
|
374
|
+
var g, y;
|
|
375
|
+
let u = `${c.config.apiBaseUrl}${Ce.list[c.config.app].all}`;
|
|
376
|
+
return c.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = c.config) == null ? void 0 : g.controlPlaneId) || "") : c.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (y = c.config) != null && y.workspace ? `/${c.config.workspace}` : "")), u;
|
|
377
|
+
}), Ee = V(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${Y.value}`) : new URL(Y.value)), O = R(""), j = V(() => {
|
|
371
378
|
const u = c.config.app === "konnect" || c.config.isExactMatch;
|
|
372
379
|
if (u)
|
|
373
380
|
return {
|
|
374
381
|
isExactMatch: u,
|
|
375
382
|
placeholder: a(`search.placeholder.${c.config.app}`)
|
|
376
383
|
};
|
|
377
|
-
const { name:
|
|
384
|
+
const { name: g, enabled: y, protocol: I, host: K, port: L, path: A } = se;
|
|
378
385
|
return {
|
|
379
386
|
isExactMatch: u,
|
|
380
|
-
fields: { name:
|
|
387
|
+
fields: { name: g, enabled: y, protocol: I, host: K, port: L, path: A },
|
|
381
388
|
schema: c.config.filterSchema
|
|
382
389
|
};
|
|
383
390
|
}), {
|
|
384
|
-
fetcher:
|
|
385
|
-
fetcherState:
|
|
386
|
-
fetcherCacheKey:
|
|
387
|
-
} = it(
|
|
388
|
-
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
},
|
|
391
|
+
fetcher: Pe,
|
|
392
|
+
fetcherState: z,
|
|
393
|
+
fetcherCacheKey: C
|
|
394
|
+
} = it(V(() => ({ ...c.config, cacheIdentifier: c.cacheIdentifier })), Y), ae = () => {
|
|
395
|
+
O.value = "";
|
|
396
|
+
}, ne = () => {
|
|
397
|
+
C.value++;
|
|
398
|
+
}, ee = R(null), e = V(() => ({
|
|
392
399
|
ctaPath: c.config.createRoute,
|
|
393
|
-
ctaText:
|
|
400
|
+
ctaText: oe.value ? c.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
|
|
394
401
|
message: `${a("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
395
|
-
title:
|
|
396
|
-
})),
|
|
402
|
+
title: oe.value ? c.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
|
|
403
|
+
})), w = R(!1), $ = R(null), te = V(() => {
|
|
397
404
|
const u = {
|
|
398
405
|
action: "disable",
|
|
399
406
|
id: "",
|
|
400
407
|
name: ""
|
|
401
408
|
};
|
|
402
|
-
if (
|
|
403
|
-
const { enabled:
|
|
404
|
-
u.action =
|
|
409
|
+
if ($.value) {
|
|
410
|
+
const { enabled: g, id: y, name: I } = $.value;
|
|
411
|
+
u.action = g ? "disable" : "enable", u.id = y, u.name = I || y;
|
|
405
412
|
}
|
|
406
413
|
return u;
|
|
407
414
|
}), pe = (u) => {
|
|
408
|
-
|
|
415
|
+
w.value = !0, $.value = u;
|
|
409
416
|
}, me = () => {
|
|
410
|
-
|
|
411
|
-
},
|
|
412
|
-
var
|
|
413
|
-
if (!await ((
|
|
417
|
+
w.value = !1, $.value = null;
|
|
418
|
+
}, H = async () => {
|
|
419
|
+
var I, K;
|
|
420
|
+
if (!await ((I = c.canEdit) == null ? void 0 : I.call(c, $.value)) || !$.value)
|
|
414
421
|
return;
|
|
415
|
-
const
|
|
422
|
+
const g = `${Ee.value.href}/${$.value.id}`, y = !$.value.enabled;
|
|
416
423
|
try {
|
|
417
|
-
const
|
|
424
|
+
const L = (K = c.config) == null ? void 0 : K.app;
|
|
418
425
|
let A;
|
|
419
|
-
|
|
420
|
-
const { data:
|
|
421
|
-
p("toggle:success",
|
|
422
|
-
} catch (
|
|
423
|
-
p("error",
|
|
426
|
+
O.value && L === "konnect" && (A = await q.get(g));
|
|
427
|
+
const { data: t } = L === "konnect" ? await q.put(g, { ...(A == null ? void 0 : A.data) || $.value, enabled: y }) : await q.patch(g, { ...$.value, enabled: y });
|
|
428
|
+
p("toggle:success", t), $.value.enabled = y;
|
|
429
|
+
} catch (L) {
|
|
430
|
+
p("error", L);
|
|
424
431
|
}
|
|
425
432
|
}, ve = (u) => {
|
|
426
433
|
c.config.getControlPlaneRoute && F.push(c.config.getControlPlaneRoute(u));
|
|
427
|
-
}, ge = async (u,
|
|
428
|
-
const
|
|
429
|
-
if (!await
|
|
434
|
+
}, ge = async (u, g) => {
|
|
435
|
+
const y = u.id;
|
|
436
|
+
if (!await g(y)) {
|
|
430
437
|
p("copy:error", {
|
|
431
438
|
entity: u,
|
|
432
439
|
field: "id",
|
|
@@ -437,11 +444,11 @@ const Y = {
|
|
|
437
444
|
p("copy:success", {
|
|
438
445
|
entity: u,
|
|
439
446
|
field: "id",
|
|
440
|
-
message: a("copy.success", { val:
|
|
447
|
+
message: a("copy.success", { val: y })
|
|
441
448
|
});
|
|
442
|
-
}, ye = async (u,
|
|
443
|
-
const
|
|
444
|
-
if (!await
|
|
449
|
+
}, ye = async (u, g) => {
|
|
450
|
+
const y = JSON.stringify(u);
|
|
451
|
+
if (!await g(y)) {
|
|
445
452
|
p("copy:error", {
|
|
446
453
|
entity: u,
|
|
447
454
|
message: a("errors.copy")
|
|
@@ -453,106 +460,109 @@ const Y = {
|
|
|
453
460
|
message: a("copy.success_brief")
|
|
454
461
|
});
|
|
455
462
|
}, _e = async (u) => {
|
|
456
|
-
var
|
|
457
|
-
await ((
|
|
463
|
+
var y;
|
|
464
|
+
await ((y = c.canRetrieve) == null ? void 0 : y.call(c, u)) && F.push(c.config.getViewRoute(u.id));
|
|
458
465
|
}, he = (u) => ({
|
|
459
466
|
label: a("actions.view"),
|
|
460
467
|
to: c.config.getViewRoute(u)
|
|
461
|
-
}),
|
|
468
|
+
}), Ie = (u) => ({
|
|
462
469
|
label: a("actions.edit"),
|
|
463
470
|
to: c.config.getEditRoute(u)
|
|
464
|
-
}),
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
471
|
+
}), Z = (u) => ({
|
|
472
|
+
label: a("actions.debugger"),
|
|
473
|
+
to: c.config.getDebugRoute(u)
|
|
474
|
+
}), x = R(void 0), W = R(!1), J = R(!1), ce = R(""), Fe = lt(c.config, Y.value), be = (u) => {
|
|
475
|
+
x.value = u, W.value = !0, ce.value = "";
|
|
476
|
+
}, we = () => {
|
|
477
|
+
W.value = !1, x.value = void 0;
|
|
468
478
|
}, Ae = async () => {
|
|
469
|
-
var u,
|
|
470
|
-
if ((u =
|
|
471
|
-
|
|
479
|
+
var u, g, y;
|
|
480
|
+
if ((u = x.value) != null && u.id) {
|
|
481
|
+
J.value = !0;
|
|
472
482
|
try {
|
|
473
|
-
await
|
|
474
|
-
} catch (
|
|
475
|
-
|
|
483
|
+
await q.delete(Fe(x.value.id)), p("delete:success", x.value), we(), C.value++;
|
|
484
|
+
} catch (I) {
|
|
485
|
+
ce.value = ((y = (g = I.response) == null ? void 0 : g.data) == null ? void 0 : y.message) || I.message || a("errors.delete"), p("error", I);
|
|
476
486
|
} finally {
|
|
477
|
-
|
|
487
|
+
J.value = !1;
|
|
478
488
|
}
|
|
479
489
|
}
|
|
480
490
|
}, Te = () => {
|
|
481
491
|
F.push(c.config.createRoute);
|
|
482
492
|
};
|
|
483
|
-
Me(
|
|
484
|
-
var
|
|
493
|
+
Me(z, (u) => {
|
|
494
|
+
var g, y, I;
|
|
485
495
|
if (u.status === st.Error) {
|
|
486
|
-
|
|
496
|
+
ee.value = {
|
|
487
497
|
title: a("errors.general")
|
|
488
|
-
}, (
|
|
498
|
+
}, (I = (y = (g = u.error) == null ? void 0 : g.response) == null ? void 0 : y.data) != null && I.message && (ee.value.message = u.error.response.data.message), p("error", u.error);
|
|
489
499
|
return;
|
|
490
500
|
}
|
|
491
|
-
|
|
501
|
+
ee.value = null;
|
|
492
502
|
});
|
|
493
|
-
const
|
|
503
|
+
const oe = R(!1);
|
|
494
504
|
return He(async () => {
|
|
495
|
-
|
|
496
|
-
}), (u,
|
|
497
|
-
const
|
|
498
|
-
return
|
|
499
|
-
n(
|
|
505
|
+
oe.value = await c.canCreate();
|
|
506
|
+
}), (u, g) => {
|
|
507
|
+
const y = D("KButton"), I = D("KEmptyState"), K = D("KBadge"), L = D("KInputSwitch"), A = D("KDropdownItem"), t = D("KClipboardProvider");
|
|
508
|
+
return S(), T("div", Ft, [
|
|
509
|
+
n(r(at), {
|
|
500
510
|
"cache-identifier": s.cacheIdentifier,
|
|
501
511
|
"default-table-preferences": ue,
|
|
502
|
-
"disable-sorting":
|
|
512
|
+
"disable-sorting": Se.value,
|
|
503
513
|
"empty-state-options": e.value,
|
|
504
514
|
"enable-entity-actions": "",
|
|
505
|
-
"error-message":
|
|
506
|
-
fetcher:
|
|
507
|
-
"fetcher-cache-key":
|
|
515
|
+
"error-message": ee.value,
|
|
516
|
+
fetcher: r(Pe),
|
|
517
|
+
"fetcher-cache-key": r(C),
|
|
508
518
|
"pagination-type": "offset",
|
|
509
519
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
510
|
-
query:
|
|
511
|
-
"table-headers":
|
|
512
|
-
onClearSearchInput:
|
|
513
|
-
"onClick:row":
|
|
514
|
-
onSort:
|
|
515
|
-
onState:
|
|
516
|
-
},
|
|
520
|
+
query: O.value,
|
|
521
|
+
"table-headers": r(fe),
|
|
522
|
+
onClearSearchInput: ae,
|
|
523
|
+
"onClick:row": g[4] || (g[4] = (o) => _e(o)),
|
|
524
|
+
onSort: ne,
|
|
525
|
+
onState: r(B)
|
|
526
|
+
}, Ve({
|
|
517
527
|
"toolbar-filter": d(() => [
|
|
518
|
-
n(
|
|
519
|
-
modelValue:
|
|
520
|
-
"onUpdate:modelValue":
|
|
521
|
-
config:
|
|
528
|
+
n(r(ct), {
|
|
529
|
+
modelValue: O.value,
|
|
530
|
+
"onUpdate:modelValue": g[0] || (g[0] = (o) => O.value = o),
|
|
531
|
+
config: j.value
|
|
522
532
|
}, null, 8, ["modelValue", "config"])
|
|
523
533
|
]),
|
|
524
534
|
"toolbar-button": d(() => [
|
|
525
|
-
(
|
|
535
|
+
(S(), de(Ze, {
|
|
526
536
|
disabled: !s.useActionOutside,
|
|
527
537
|
to: "#kong-ui-app-page-header-action-button"
|
|
528
538
|
}, [
|
|
529
539
|
E("div", At, [
|
|
530
|
-
P.value ? (
|
|
540
|
+
P.value ? (S(), de(y, {
|
|
531
541
|
key: 0,
|
|
532
542
|
appearance: "secondary",
|
|
533
543
|
class: "open-learning-hub",
|
|
534
544
|
"data-testid": "gateway-services-learn-more-button",
|
|
535
545
|
icon: "",
|
|
536
|
-
onClick:
|
|
546
|
+
onClick: g[1] || (g[1] = (o) => u.$emit("click:learn-more"))
|
|
537
547
|
}, {
|
|
538
548
|
default: d(() => [
|
|
539
|
-
n(
|
|
549
|
+
n(r(Ke), { decorative: "" })
|
|
540
550
|
]),
|
|
541
551
|
_: 1
|
|
542
|
-
})) :
|
|
543
|
-
n(
|
|
552
|
+
})) : M("", !0),
|
|
553
|
+
n(r(le), {
|
|
544
554
|
"auth-function": () => s.canCreate()
|
|
545
555
|
}, {
|
|
546
556
|
default: d(() => [
|
|
547
|
-
n(
|
|
557
|
+
n(y, {
|
|
548
558
|
appearance: "primary",
|
|
549
559
|
"data-testid": "toolbar-add-gateway-service",
|
|
550
560
|
size: s.useActionOutside ? "medium" : "large",
|
|
551
561
|
to: s.config.createRoute
|
|
552
562
|
}, {
|
|
553
563
|
default: d(() => [
|
|
554
|
-
n(
|
|
555
|
-
|
|
564
|
+
n(r(Le)),
|
|
565
|
+
U(" " + h(r(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
556
566
|
]),
|
|
557
567
|
_: 1
|
|
558
568
|
}, 8, ["size", "to"])
|
|
@@ -562,120 +572,131 @@ const Y = {
|
|
|
562
572
|
])
|
|
563
573
|
], 8, ["disabled"]))
|
|
564
574
|
]),
|
|
565
|
-
name: d(({ rowValue:
|
|
566
|
-
E("b", null, h(
|
|
575
|
+
name: d(({ rowValue: o }) => [
|
|
576
|
+
E("b", null, h(o ?? "-"), 1)
|
|
567
577
|
]),
|
|
568
|
-
control_plane: d(({ row:
|
|
569
|
-
var
|
|
578
|
+
control_plane: d(({ row: o }) => {
|
|
579
|
+
var m;
|
|
570
580
|
return [
|
|
571
|
-
(
|
|
581
|
+
(m = o.x_meta) != null && m.cluster_id ? (S(), de(K, {
|
|
572
582
|
key: 0,
|
|
573
|
-
tooltip:
|
|
583
|
+
tooltip: o.x_meta.cluster_id,
|
|
574
584
|
"truncation-tooltip": "",
|
|
575
|
-
onClick: Ue((
|
|
585
|
+
onClick: Ue((b) => ve(o.x_meta.cluster_id), ["stop"])
|
|
576
586
|
}, {
|
|
577
587
|
default: d(() => [
|
|
578
|
-
|
|
588
|
+
U(h(o.x_meta.cluster_id), 1)
|
|
579
589
|
]),
|
|
580
590
|
_: 2
|
|
581
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
591
|
+
}, 1032, ["tooltip", "onClick"])) : (S(), T("b", Tt, "-"))
|
|
582
592
|
];
|
|
583
593
|
}),
|
|
584
|
-
enabled: d(({ row:
|
|
585
|
-
n(
|
|
586
|
-
"auth-function": () => s.canEdit(
|
|
594
|
+
enabled: d(({ row: o }) => [
|
|
595
|
+
n(r(le), {
|
|
596
|
+
"auth-function": () => s.canEdit(o),
|
|
587
597
|
"force-show": ""
|
|
588
598
|
}, {
|
|
589
|
-
default: d(({ isAllowed:
|
|
599
|
+
default: d(({ isAllowed: m }) => [
|
|
590
600
|
E("div", {
|
|
591
|
-
onClick:
|
|
601
|
+
onClick: g[3] || (g[3] = Ue(() => {
|
|
592
602
|
}, ["stop"]))
|
|
593
603
|
}, [
|
|
594
|
-
n(
|
|
595
|
-
modelValue:
|
|
596
|
-
"onUpdate:modelValue": (
|
|
597
|
-
"data-testid": `row-${
|
|
598
|
-
disabled: !
|
|
599
|
-
onClick: Ue((
|
|
604
|
+
n(L, {
|
|
605
|
+
modelValue: o.enabled,
|
|
606
|
+
"onUpdate:modelValue": (b) => o.enabled = b,
|
|
607
|
+
"data-testid": `row-${o.id}-toggle-input`,
|
|
608
|
+
disabled: !m,
|
|
609
|
+
onClick: Ue((b) => pe(o), ["prevent"])
|
|
600
610
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
601
611
|
])
|
|
602
612
|
]),
|
|
603
613
|
_: 2
|
|
604
614
|
}, 1032, ["auth-function"])
|
|
605
615
|
]),
|
|
606
|
-
tags: d(({ rowValue:
|
|
607
|
-
n(
|
|
616
|
+
tags: d(({ rowValue: o }) => [
|
|
617
|
+
n(r(nt), { tags: o }, null, 8, ["tags"])
|
|
608
618
|
]),
|
|
609
|
-
created_at: d(({ rowValue:
|
|
610
|
-
|
|
619
|
+
created_at: d(({ rowValue: o }) => [
|
|
620
|
+
U(h(r(v)(o)), 1)
|
|
611
621
|
]),
|
|
612
|
-
updated_at: d(({ row:
|
|
613
|
-
|
|
622
|
+
updated_at: d(({ row: o, rowValue: m }) => [
|
|
623
|
+
U(h(r(v)(m ?? o.created_at)), 1)
|
|
614
624
|
]),
|
|
615
|
-
actions: d(({ row:
|
|
616
|
-
n(
|
|
617
|
-
default: d(({ copyToClipboard:
|
|
625
|
+
actions: d(({ row: o }) => [
|
|
626
|
+
n(t, null, {
|
|
627
|
+
default: d(({ copyToClipboard: m }) => [
|
|
618
628
|
n(A, {
|
|
619
629
|
"data-testid": "action-entity-copy-id",
|
|
620
|
-
onClick: (
|
|
630
|
+
onClick: (b) => ge(o, m)
|
|
621
631
|
}, {
|
|
622
632
|
default: d(() => [
|
|
623
|
-
|
|
633
|
+
U(h(r(a)("actions.copy_id")), 1)
|
|
624
634
|
]),
|
|
625
635
|
_: 1
|
|
626
636
|
}, 8, ["onClick"])
|
|
627
637
|
]),
|
|
628
638
|
_: 2
|
|
629
639
|
}, 1024),
|
|
630
|
-
n(
|
|
631
|
-
default: d(({ copyToClipboard:
|
|
640
|
+
n(t, null, {
|
|
641
|
+
default: d(({ copyToClipboard: m }) => [
|
|
632
642
|
n(A, {
|
|
633
643
|
"data-testid": "action-entity-copy-json",
|
|
634
|
-
onClick: (
|
|
644
|
+
onClick: (b) => ye(o, m)
|
|
635
645
|
}, {
|
|
636
646
|
default: d(() => [
|
|
637
|
-
|
|
647
|
+
U(h(r(a)("actions.copy_json")), 1)
|
|
638
648
|
]),
|
|
639
649
|
_: 1
|
|
640
650
|
}, 8, ["onClick"])
|
|
641
651
|
]),
|
|
642
652
|
_: 2
|
|
643
653
|
}, 1024),
|
|
644
|
-
n(
|
|
645
|
-
"auth-function": () => s.canRetrieve(
|
|
654
|
+
n(r(le), {
|
|
655
|
+
"auth-function": () => s.canRetrieve(o)
|
|
646
656
|
}, {
|
|
647
657
|
default: d(() => [
|
|
648
658
|
n(A, {
|
|
649
659
|
"data-testid": "action-entity-view",
|
|
650
660
|
"has-divider": "",
|
|
651
|
-
item: he(
|
|
661
|
+
item: he(o.id)
|
|
662
|
+
}, null, 8, ["item"])
|
|
663
|
+
]),
|
|
664
|
+
_: 2
|
|
665
|
+
}, 1032, ["auth-function"]),
|
|
666
|
+
n(r(le), {
|
|
667
|
+
"auth-function": () => s.canDebug(o)
|
|
668
|
+
}, {
|
|
669
|
+
default: d(() => [
|
|
670
|
+
n(A, {
|
|
671
|
+
"data-testid": "action-entity-debug",
|
|
672
|
+
item: Z(o.id)
|
|
652
673
|
}, null, 8, ["item"])
|
|
653
674
|
]),
|
|
654
675
|
_: 2
|
|
655
676
|
}, 1032, ["auth-function"]),
|
|
656
|
-
n(
|
|
657
|
-
"auth-function": () => s.canEdit(
|
|
677
|
+
n(r(le), {
|
|
678
|
+
"auth-function": () => s.canEdit(o)
|
|
658
679
|
}, {
|
|
659
680
|
default: d(() => [
|
|
660
681
|
n(A, {
|
|
661
682
|
"data-testid": "action-entity-edit",
|
|
662
|
-
item:
|
|
683
|
+
item: Ie(o.id)
|
|
663
684
|
}, null, 8, ["item"])
|
|
664
685
|
]),
|
|
665
686
|
_: 2
|
|
666
687
|
}, 1032, ["auth-function"]),
|
|
667
|
-
n(
|
|
668
|
-
"auth-function": () => s.canDelete(
|
|
688
|
+
n(r(le), {
|
|
689
|
+
"auth-function": () => s.canDelete(o)
|
|
669
690
|
}, {
|
|
670
691
|
default: d(() => [
|
|
671
692
|
n(A, {
|
|
672
693
|
danger: "",
|
|
673
694
|
"data-testid": "action-entity-delete",
|
|
674
695
|
"has-divider": "",
|
|
675
|
-
onClick: (
|
|
696
|
+
onClick: (m) => be(o)
|
|
676
697
|
}, {
|
|
677
698
|
default: d(() => [
|
|
678
|
-
|
|
699
|
+
U(h(r(a)("actions.delete.menu_label")), 1)
|
|
679
700
|
]),
|
|
680
701
|
_: 1
|
|
681
702
|
}, 8, ["onClick"])
|
|
@@ -685,50 +706,50 @@ const Y = {
|
|
|
685
706
|
]),
|
|
686
707
|
_: 2
|
|
687
708
|
}, [
|
|
688
|
-
!
|
|
709
|
+
!O.value && s.config.app === "konnect" ? {
|
|
689
710
|
name: "empty-state",
|
|
690
711
|
fn: d(() => {
|
|
691
|
-
var
|
|
712
|
+
var o;
|
|
692
713
|
return [
|
|
693
|
-
n(
|
|
714
|
+
n(I, {
|
|
694
715
|
"data-testid": "gateway-services-entity-empty-state",
|
|
695
716
|
"icon-background": "",
|
|
696
|
-
message:
|
|
697
|
-
title:
|
|
698
|
-
},
|
|
717
|
+
message: r(a)("gateway_services.empty_state_v2.description"),
|
|
718
|
+
title: r(a)("gateway_services.empty_state_v2.title")
|
|
719
|
+
}, Ve({
|
|
699
720
|
icon: d(() => [
|
|
700
|
-
n(
|
|
721
|
+
n(r(et), { decorative: "" })
|
|
701
722
|
]),
|
|
702
723
|
action: d(() => [
|
|
703
|
-
|
|
724
|
+
oe.value ? (S(), de(y, {
|
|
704
725
|
key: 0,
|
|
705
726
|
"data-testid": "entity-create-button",
|
|
706
727
|
onClick: Te
|
|
707
728
|
}, {
|
|
708
729
|
default: d(() => [
|
|
709
|
-
n(
|
|
710
|
-
|
|
730
|
+
n(r(Le), { decorative: "" }),
|
|
731
|
+
U(" " + h(r(a)("gateway_services.empty_state_v2.create")), 1)
|
|
711
732
|
]),
|
|
712
733
|
_: 1
|
|
713
|
-
})) :
|
|
714
|
-
n(
|
|
734
|
+
})) : M("", !0),
|
|
735
|
+
n(y, {
|
|
715
736
|
appearance: "secondary",
|
|
716
737
|
"data-testid": "entity-learn-more-button",
|
|
717
|
-
onClick:
|
|
738
|
+
onClick: g[2] || (g[2] = (m) => u.$emit("click:learn-more"))
|
|
718
739
|
}, {
|
|
719
740
|
default: d(() => [
|
|
720
|
-
n(
|
|
721
|
-
|
|
741
|
+
n(r(Ke), { decorative: "" }),
|
|
742
|
+
U(" " + h(r(a)("gateway_services.empty_state_v2.learn_more")), 1)
|
|
722
743
|
]),
|
|
723
744
|
_: 1
|
|
724
745
|
})
|
|
725
746
|
]),
|
|
726
747
|
_: 2
|
|
727
748
|
}, [
|
|
728
|
-
(
|
|
749
|
+
(o = s.config) != null && o.isControlPlaneGroup ? {
|
|
729
750
|
name: "default",
|
|
730
751
|
fn: d(() => [
|
|
731
|
-
|
|
752
|
+
U(h(r(a)("gateway_services.empty_state_v2.group")), 1)
|
|
732
753
|
]),
|
|
733
754
|
key: "0"
|
|
734
755
|
} : void 0
|
|
@@ -738,36 +759,36 @@ const Y = {
|
|
|
738
759
|
key: "0"
|
|
739
760
|
} : void 0
|
|
740
761
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
741
|
-
n(
|
|
742
|
-
action:
|
|
743
|
-
"entity-id":
|
|
744
|
-
"entity-name":
|
|
745
|
-
"entity-type":
|
|
746
|
-
"on-confirm":
|
|
747
|
-
visible:
|
|
762
|
+
n(r(dt), {
|
|
763
|
+
action: te.value.action,
|
|
764
|
+
"entity-id": te.value.id,
|
|
765
|
+
"entity-name": te.value.name,
|
|
766
|
+
"entity-type": r(a)("glossary.gateway_services"),
|
|
767
|
+
"on-confirm": H,
|
|
768
|
+
visible: w.value,
|
|
748
769
|
onCancel: me,
|
|
749
770
|
onProceed: me
|
|
750
771
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
751
|
-
n(
|
|
752
|
-
"action-pending":
|
|
753
|
-
description:
|
|
754
|
-
"entity-name":
|
|
755
|
-
"entity-type":
|
|
756
|
-
error:
|
|
757
|
-
title:
|
|
758
|
-
visible:
|
|
759
|
-
onCancel:
|
|
772
|
+
n(r(ut), {
|
|
773
|
+
"action-pending": J.value,
|
|
774
|
+
description: r(a)("actions.delete.description"),
|
|
775
|
+
"entity-name": x.value && (x.value.name || x.value.id),
|
|
776
|
+
"entity-type": r(ft).GatewayService,
|
|
777
|
+
error: ce.value,
|
|
778
|
+
title: r(a)("actions.delete.title"),
|
|
779
|
+
visible: W.value,
|
|
780
|
+
onCancel: we,
|
|
760
781
|
onProceed: Ae
|
|
761
782
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
762
783
|
]);
|
|
763
784
|
};
|
|
764
785
|
}
|
|
765
|
-
}), ze = (s,
|
|
786
|
+
}), ze = (s, N) => {
|
|
766
787
|
const p = s.__vccOpts || s;
|
|
767
|
-
for (const [c, a] of
|
|
788
|
+
for (const [c, a] of N)
|
|
768
789
|
p[c] = a;
|
|
769
790
|
return p;
|
|
770
|
-
}, no = /* @__PURE__ */ ze(Ut, [["__scopeId", "data-v-
|
|
791
|
+
}, no = /* @__PURE__ */ ze(Ut, [["__scopeId", "data-v-7f1b285f"]]), Rt = { class: "kong-ui-gateway-service-entity-config-card" }, co = /* @__PURE__ */ De({
|
|
771
792
|
__name: "GatewayServiceConfigCard",
|
|
772
793
|
props: {
|
|
773
794
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -794,7 +815,7 @@ const Y = {
|
|
|
794
815
|
},
|
|
795
816
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
796
817
|
setup(s) {
|
|
797
|
-
const
|
|
818
|
+
const N = s, { i18n: { t: p }, i18nT: c } = X.useI18n(), a = V(() => Ce.form[N.config.app].edit), { getPropValue: v } = Oe(), F = (l, B) => v(l, B) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), q = R({
|
|
798
819
|
id: {},
|
|
799
820
|
name: {
|
|
800
821
|
tooltip: p("gateway_services.form.fields.name.tooltip")
|
|
@@ -803,19 +824,19 @@ const Y = {
|
|
|
803
824
|
updated_at: {},
|
|
804
825
|
created_at: {},
|
|
805
826
|
protocol: {
|
|
806
|
-
section:
|
|
827
|
+
section: ke.Basic,
|
|
807
828
|
tooltip: p("gateway_services.form.fields.protocol.tooltip")
|
|
808
829
|
},
|
|
809
830
|
host: {
|
|
810
|
-
section:
|
|
831
|
+
section: ke.Basic,
|
|
811
832
|
tooltip: p("gateway_services.form.fields.host.tooltip")
|
|
812
833
|
},
|
|
813
834
|
path: {
|
|
814
|
-
section:
|
|
835
|
+
section: ke.Basic,
|
|
815
836
|
tooltip: p("gateway_services.form.fields.path.tooltip")
|
|
816
837
|
},
|
|
817
838
|
port: {
|
|
818
|
-
section:
|
|
839
|
+
section: ke.Basic,
|
|
819
840
|
tooltip: p("gateway_services.form.fields.port.tooltip")
|
|
820
841
|
},
|
|
821
842
|
tags: {
|
|
@@ -854,80 +875,80 @@ const Y = {
|
|
|
854
875
|
hidden: !0
|
|
855
876
|
}
|
|
856
877
|
});
|
|
857
|
-
return (l,
|
|
858
|
-
n(
|
|
878
|
+
return (l, B) => (S(), T("div", Rt, [
|
|
879
|
+
n(r(mt), {
|
|
859
880
|
config: s.config,
|
|
860
881
|
"config-card-doc": s.configCardDoc,
|
|
861
|
-
"config-schema":
|
|
862
|
-
"entity-type":
|
|
882
|
+
"config-schema": q.value,
|
|
883
|
+
"entity-type": r(je).GatewayService,
|
|
863
884
|
"fetch-url": a.value,
|
|
864
885
|
"hide-title": s.hideTitle,
|
|
865
|
-
"onFetch:error":
|
|
866
|
-
"onFetch:success":
|
|
867
|
-
onLoading:
|
|
886
|
+
"onFetch:error": B[0] || (B[0] = (P) => l.$emit("fetch:error", P)),
|
|
887
|
+
"onFetch:success": B[1] || (B[1] = (P) => l.$emit("fetch:success", P)),
|
|
888
|
+
onLoading: B[2] || (B[2] = (P) => l.$emit("loading", P))
|
|
868
889
|
}, {
|
|
869
890
|
"enabled-label-tooltip": d(() => [
|
|
870
|
-
n(
|
|
891
|
+
n(r(c), {
|
|
871
892
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
872
893
|
scope: "global"
|
|
873
894
|
}, {
|
|
874
895
|
false: d(() => [
|
|
875
|
-
E("code", null, h(
|
|
896
|
+
E("code", null, h(r(p)("gateway_services.form.fields.enabled.false")), 1)
|
|
876
897
|
]),
|
|
877
898
|
true: d(() => [
|
|
878
|
-
E("code", null, h(
|
|
899
|
+
E("code", null, h(r(p)("gateway_services.form.fields.enabled.true")), 1)
|
|
879
900
|
]),
|
|
880
901
|
_: 1
|
|
881
902
|
})
|
|
882
903
|
]),
|
|
883
904
|
"ca_certificates-label-tooltip": d(() => [
|
|
884
|
-
n(
|
|
905
|
+
n(r(c), {
|
|
885
906
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
886
907
|
scope: "global"
|
|
887
908
|
}, {
|
|
888
909
|
code1: d(() => [
|
|
889
|
-
E("code", null, h(
|
|
910
|
+
E("code", null, h(r(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
890
911
|
]),
|
|
891
912
|
code2: d(() => [
|
|
892
|
-
E("code", null, h(
|
|
913
|
+
E("code", null, h(r(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
893
914
|
]),
|
|
894
915
|
_: 1
|
|
895
916
|
})
|
|
896
917
|
]),
|
|
897
918
|
"tls_verify-label-tooltip": d(() => [
|
|
898
|
-
n(
|
|
919
|
+
n(r(c), {
|
|
899
920
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
900
921
|
scope: "global"
|
|
901
922
|
}, {
|
|
902
923
|
code1: d(() => [
|
|
903
|
-
E("code", null, h(
|
|
924
|
+
E("code", null, h(r(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
904
925
|
]),
|
|
905
926
|
_: 1
|
|
906
927
|
})
|
|
907
928
|
]),
|
|
908
929
|
tls_verify: d((P) => [
|
|
909
|
-
|
|
930
|
+
U(h(typeof r(v)("rowValue", P) == "boolean" ? F("rowValue", P) : r(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
910
931
|
]),
|
|
911
932
|
client_certificate: d((P) => [
|
|
912
|
-
|
|
933
|
+
U(h(r(v)("rowValue", P) ? r(v)("rowValue", P).id : "–"), 1)
|
|
913
934
|
]),
|
|
914
935
|
_: 1
|
|
915
936
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
916
937
|
]));
|
|
917
938
|
}
|
|
918
|
-
}),
|
|
939
|
+
}), G = {
|
|
919
940
|
name: "Kong-Air-Flights-API",
|
|
920
941
|
protocol: "https",
|
|
921
942
|
path: "/flights",
|
|
922
943
|
host: "api.kong-air.com",
|
|
923
944
|
port: 443
|
|
924
|
-
},
|
|
945
|
+
}, $t = { class: "kong-ui-entities-gateway-service-form" }, xt = {
|
|
925
946
|
key: 0,
|
|
926
947
|
class: "gateway-service-form-general-info"
|
|
927
|
-
}, Mt = { class: "gateway-service-form-group-selection-wrapper" },
|
|
948
|
+
}, Mt = { class: "gateway-service-form-group-selection-wrapper" }, Dt = {
|
|
928
949
|
key: 0,
|
|
929
950
|
class: "gateway-service-form-group-fields"
|
|
930
|
-
},
|
|
951
|
+
}, Bt = {
|
|
931
952
|
key: 0,
|
|
932
953
|
class: "gateway-service-form-group-fields"
|
|
933
954
|
}, Kt = { key: 0 }, Lt = {
|
|
@@ -948,7 +969,7 @@ const Y = {
|
|
|
948
969
|
}, Zt = {
|
|
949
970
|
key: 1,
|
|
950
971
|
class: "checkbox-aligned-radio"
|
|
951
|
-
}, Jt = { class: "gateway-service-form-tags" }, Qt = { class: "form-error-list" }, Xt = /* @__PURE__ */
|
|
972
|
+
}, Jt = { class: "gateway-service-form-tags" }, Qt = { class: "form-error-list" }, Xt = /* @__PURE__ */ De({
|
|
952
973
|
__name: "GatewayServiceForm",
|
|
953
974
|
props: {
|
|
954
975
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -977,9 +998,9 @@ const Y = {
|
|
|
977
998
|
}
|
|
978
999
|
},
|
|
979
1000
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
980
|
-
setup(s, { expose:
|
|
981
|
-
var
|
|
982
|
-
const c = p, a = s,
|
|
1001
|
+
setup(s, { expose: N, emit: p }) {
|
|
1002
|
+
var A;
|
|
1003
|
+
const c = p, a = s, v = R(!0), F = Ne(), { i18nT: q, i18n: { t: l } } = X.useI18n(), { getErrorFieldsFromError: B } = vt(), { axiosInstance: P } = We((A = a.config) == null ? void 0 : A.axiosRequestConfig), Se = gt(), { validateHost: se, validatePath: ue, validatePort: fe, validateProtocol: Y } = X.useUrlValidators(), { objectsAreEqual: Ee } = Oe(), O = V(() => Ce.form[a.config.app].edit), j = V(() => a.gatewayServiceId ? qe.Edit : qe.Create), Pe = R(!1), z = V(() => !!a.gatewayServiceId), C = R(z.value ? "protocol" : "url"), ae = X.usePortFromProtocol(), ne = R(""), ee = V(() => !!ne.value || !!Z("name")), e = Be({
|
|
983
1004
|
fields: {
|
|
984
1005
|
name: "",
|
|
985
1006
|
protocol: "http",
|
|
@@ -1016,7 +1037,7 @@ const Y = {
|
|
|
1016
1037
|
tls_verify_enabled: "",
|
|
1017
1038
|
tls_verify_value: ""
|
|
1018
1039
|
}
|
|
1019
|
-
}),
|
|
1040
|
+
}), w = Be({
|
|
1020
1041
|
name: "",
|
|
1021
1042
|
protocol: "http",
|
|
1022
1043
|
host: "",
|
|
@@ -1033,13 +1054,13 @@ const Y = {
|
|
|
1033
1054
|
tls_verify_value: !1,
|
|
1034
1055
|
tags: "",
|
|
1035
1056
|
enabled: !0
|
|
1036
|
-
}),
|
|
1057
|
+
}), $ = a.config.app === "konnect" || yt({
|
|
1037
1058
|
gatewayInfo: a.config.gatewayInfo,
|
|
1038
1059
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1039
1060
|
supportedRange: {
|
|
1040
1061
|
enterprise: ["3.0"]
|
|
1041
1062
|
}
|
|
1042
|
-
}),
|
|
1063
|
+
}), te = [
|
|
1043
1064
|
{
|
|
1044
1065
|
label: l("gateway_services.form.fields.protocol.options.http"),
|
|
1045
1066
|
value: "http",
|
|
@@ -1075,7 +1096,7 @@ const Y = {
|
|
|
1075
1096
|
value: "grpcs",
|
|
1076
1097
|
group: "grpc"
|
|
1077
1098
|
},
|
|
1078
|
-
|
|
1099
|
+
...$ ? [
|
|
1079
1100
|
{
|
|
1080
1101
|
label: l("gateway_services.form.fields.protocol.options.ws"),
|
|
1081
1102
|
value: "ws",
|
|
@@ -1093,106 +1114,106 @@ const Y = {
|
|
|
1093
1114
|
group: "udp"
|
|
1094
1115
|
}
|
|
1095
1116
|
], pe = { url: "url", protocol: "protocol" }, me = (t) => {
|
|
1096
|
-
e.fields.protocol = t.value, e.fields.port =
|
|
1097
|
-
},
|
|
1098
|
-
e.fields.host =
|
|
1117
|
+
e.fields.protocol = t.value, e.fields.port = ae.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
|
|
1118
|
+
}, H = (t) => t ? parseFloat(t) : 0, ve = () => {
|
|
1119
|
+
e.fields.host = w.host, e.fields.path = w.path, e.fields.port = w.port, e.fields.protocol = w.protocol, e.fields.url = w.url, e.fields.retries = w.retries, e.fields.connect_timeout = w.connect_timeout, e.fields.write_timeout = w.write_timeout, e.fields.read_timeout = w.read_timeout, e.fields.client_certificate = w.client_certificate, e.fields.ca_certificates = w.ca_certificates, e.fields.tls_verify_enabled = w.tls_verify_enabled, e.fields.tls_verify_value = w.tls_verify_value, e.fields.enabled = w.enabled;
|
|
1099
1120
|
}, ge = () => {
|
|
1100
|
-
|
|
1121
|
+
v.value = !0, W(), e.errorMessages = [], ve();
|
|
1101
1122
|
}, ye = () => {
|
|
1102
|
-
switch (ve(), e.fields.name = `${
|
|
1123
|
+
switch (ve(), e.fields.name = `${G.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, C.value) {
|
|
1103
1124
|
case "url":
|
|
1104
|
-
e.fields.url = `${
|
|
1125
|
+
e.fields.url = `${G.protocol}://${G.host}${G.path}`;
|
|
1105
1126
|
break;
|
|
1106
1127
|
case "protocol":
|
|
1107
|
-
e.fields.host =
|
|
1128
|
+
e.fields.host = G.host, e.fields.path = G.path, e.fields.protocol = G.protocol, e.fields.port = G.port;
|
|
1108
1129
|
break;
|
|
1109
1130
|
default:
|
|
1110
|
-
e.fields.url = `${
|
|
1131
|
+
e.fields.url = `${G.protocol}://${G.host}${G.path}`;
|
|
1111
1132
|
}
|
|
1112
1133
|
}, _e = () => {
|
|
1113
|
-
if (
|
|
1134
|
+
if (W(), e.fields.url.length)
|
|
1114
1135
|
try {
|
|
1115
|
-
const t = new URL(e.fields.url),
|
|
1116
|
-
if (
|
|
1136
|
+
const t = new URL(e.fields.url), o = Y(t.protocol, te);
|
|
1137
|
+
if (o) throw new Error(o);
|
|
1117
1138
|
e.fields.protocol = t.protocol.slice(0, -1);
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1139
|
+
const m = se(t.hostname);
|
|
1140
|
+
if (m) throw new Error(m);
|
|
1120
1141
|
e.fields.host = t.hostname;
|
|
1121
|
-
const
|
|
1122
|
-
if (
|
|
1142
|
+
const b = ue(t.pathname);
|
|
1143
|
+
if (b) throw new Error(b);
|
|
1123
1144
|
e.fields.path = t.pathname;
|
|
1124
1145
|
const _ = fe(t.port);
|
|
1125
1146
|
if (_) throw new Error(_);
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1147
|
+
const k = Number(t.port);
|
|
1148
|
+
Pe.value = !!k, e.fields.port = k || ae.getPortFromProtocol(e.fields.protocol), c("url-valid:success");
|
|
1128
1149
|
} catch {
|
|
1129
1150
|
c("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
|
|
1130
1151
|
}
|
|
1131
1152
|
}, he = (t) => {
|
|
1132
|
-
|
|
1133
|
-
},
|
|
1153
|
+
W(t);
|
|
1154
|
+
}, Ie = V(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), Z = (t) => {
|
|
1134
1155
|
if (e.errorMessages.length) return "";
|
|
1135
|
-
const
|
|
1136
|
-
return
|
|
1137
|
-
},
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
},
|
|
1156
|
+
const o = e.formFieldErrors;
|
|
1157
|
+
return o[t] ? o[t] : "";
|
|
1158
|
+
}, x = (t) => {
|
|
1159
|
+
W(t ?? void 0);
|
|
1160
|
+
const o = se(e.fields.host);
|
|
1161
|
+
o && (e.formFieldErrors.host = o);
|
|
1162
|
+
const m = ue(e.fields.path);
|
|
1163
|
+
m && (e.formFieldErrors.path = m);
|
|
1164
|
+
const b = fe(e.fields.port);
|
|
1165
|
+
b && (e.formFieldErrors.port = b), J.value ? c("url-valid:success") : c("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
|
|
1166
|
+
}, W = (t) => {
|
|
1146
1167
|
if (t)
|
|
1147
1168
|
e.formFieldErrors[t] = "";
|
|
1148
1169
|
else
|
|
1149
|
-
for (let
|
|
1150
|
-
e.formFieldErrors[
|
|
1170
|
+
for (let o in e.formFieldErrors)
|
|
1171
|
+
e.formFieldErrors[o] = "";
|
|
1151
1172
|
e.errorMessages = [];
|
|
1152
|
-
},
|
|
1173
|
+
}, J = V(() => {
|
|
1153
1174
|
for (let t in e.formFieldErrors)
|
|
1154
1175
|
if (e.formFieldErrors[t].length)
|
|
1155
1176
|
return !1;
|
|
1156
1177
|
return !0;
|
|
1157
|
-
}),
|
|
1158
|
-
e.fields.url &&
|
|
1159
|
-
}, Fe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`,
|
|
1160
|
-
if (
|
|
1178
|
+
}), ce = () => {
|
|
1179
|
+
e.fields.url && C.value === "url" ? _e() : x();
|
|
1180
|
+
}, Fe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, be = V(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), we = V(() => {
|
|
1181
|
+
if (C.value === "url")
|
|
1161
1182
|
return !0;
|
|
1162
1183
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1163
|
-
return
|
|
1164
|
-
}),
|
|
1165
|
-
if (
|
|
1184
|
+
return C.value === "protocol" && t;
|
|
1185
|
+
}), Ae = V(() => {
|
|
1186
|
+
if (C.value === "url")
|
|
1166
1187
|
return !0;
|
|
1167
1188
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
1168
|
-
return
|
|
1169
|
-
}),
|
|
1170
|
-
if (
|
|
1189
|
+
return C.value === "protocol" && t;
|
|
1190
|
+
}), Te = V(() => {
|
|
1191
|
+
if (C.value === "url")
|
|
1171
1192
|
return !0;
|
|
1172
1193
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1173
|
-
return
|
|
1174
|
-
}),
|
|
1175
|
-
|
|
1176
|
-
},
|
|
1177
|
-
const t = !
|
|
1178
|
-
return t && (
|
|
1179
|
-
}),
|
|
1180
|
-
var
|
|
1181
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((
|
|
1194
|
+
return C.value === "protocol" && t;
|
|
1195
|
+
}), oe = (t) => {
|
|
1196
|
+
W("name"), ne.value = Se.utf8Name(t);
|
|
1197
|
+
}, re = V(() => {
|
|
1198
|
+
const t = !z.value || !Ee(e.fields, w), o = C.value === "url" && !!e.fields.url && J.value, m = C.value === "protocol" && !!e.fields.host && J.value;
|
|
1199
|
+
return t && (o || m);
|
|
1200
|
+
}), u = (t) => {
|
|
1201
|
+
var o, m, b;
|
|
1202
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((o = t == null ? void 0 : t.tags) == null ? void 0 : o.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 = ((m = t == null ? void 0 : t.ca_certificates) == null ? void 0 : m.join(",")) || "", e.fields.client_certificate = ((b = t == null ? void 0 : t.client_certificate) == null ? void 0 : b.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, e.fields.enabled = (t == null ? void 0 : t.enabled) ?? !0, Object.assign(w, e.fields);
|
|
1182
1203
|
}, g = () => {
|
|
1183
1204
|
F.push(a.config.cancelRoute);
|
|
1184
|
-
},
|
|
1185
|
-
var
|
|
1186
|
-
let t = `${a.config.apiBaseUrl}${
|
|
1187
|
-
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((
|
|
1188
|
-
}),
|
|
1189
|
-
let
|
|
1190
|
-
t.url && (
|
|
1191
|
-
},
|
|
1192
|
-
var
|
|
1205
|
+
}, y = V(() => {
|
|
1206
|
+
var o, m;
|
|
1207
|
+
let t = `${a.config.apiBaseUrl}${Ce.form[a.config.app][j.value]}`;
|
|
1208
|
+
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((o = a.config) == null ? void 0 : o.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (m = a.config) != null && m.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1209
|
+
}), I = (t) => {
|
|
1210
|
+
let o = "";
|
|
1211
|
+
t.url && (o = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(o)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
1212
|
+
}, K = V(() => {
|
|
1213
|
+
var o, m, b, _;
|
|
1193
1214
|
const t = {
|
|
1194
1215
|
name: e.fields.name || null,
|
|
1195
|
-
tags: e.fields.tags ? (
|
|
1216
|
+
tags: e.fields.tags ? (b = (m = (o = e.fields.tags) == null ? void 0 : o.split(",")) == null ? void 0 : m.map((k) => String(k || "").trim())) == null ? void 0 : b.filter((k) => k !== "") : null,
|
|
1196
1217
|
protocol: e.fields.protocol,
|
|
1197
1218
|
path: e.fields.path || null,
|
|
1198
1219
|
read_timeout: e.fields.read_timeout,
|
|
@@ -1201,33 +1222,33 @@ const Y = {
|
|
|
1201
1222
|
connect_timeout: e.fields.connect_timeout,
|
|
1202
1223
|
tls_verify_value: e.fields.tls_verify_value,
|
|
1203
1224
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
1204
|
-
ca_certificates: e.fields.ca_certificates ? (_ = e.fields.ca_certificates) == null ? void 0 : _.split(",").filter((
|
|
1225
|
+
ca_certificates: e.fields.ca_certificates ? (_ = e.fields.ca_certificates) == null ? void 0 : _.split(",").filter((k) => k !== "") : null,
|
|
1205
1226
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1206
1227
|
write_timeout: e.fields.write_timeout,
|
|
1207
1228
|
port: e.fields.port,
|
|
1208
1229
|
url: e.fields.url,
|
|
1209
1230
|
enabled: e.fields.enabled
|
|
1210
1231
|
};
|
|
1211
|
-
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),
|
|
1212
|
-
}),
|
|
1213
|
-
var t,
|
|
1232
|
+
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), be.value || (t.path = null), j.value === "create" ? C.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : j.value === "edit" && delete t.url, t;
|
|
1233
|
+
}), L = async () => {
|
|
1234
|
+
var t, o, m, b;
|
|
1214
1235
|
try {
|
|
1215
1236
|
e.isReadonly = !0;
|
|
1216
|
-
const _ =
|
|
1217
|
-
|
|
1218
|
-
let
|
|
1219
|
-
if (
|
|
1220
|
-
const { data: i } =
|
|
1221
|
-
e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port ||
|
|
1237
|
+
const _ = K.value;
|
|
1238
|
+
I(_);
|
|
1239
|
+
let k;
|
|
1240
|
+
if (j.value === "create" ? k = await P.post(y.value, _) : j.value === "edit" && (k = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await P.put(y.value, _) : await P.patch(y.value, _)), k) {
|
|
1241
|
+
const { data: i } = k;
|
|
1242
|
+
e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || ae.getPortFromProtocol(i.protocol), e.fields.protocol = (i == null ? void 0 : i.protocol) || "http", e.fields.host = (i == null ? void 0 : i.host) || "", e.fields.path = (i == null ? void 0 : i.path) || "", e.fields.url = (i == null ? void 0 : i.url) || "", e.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, e.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, e.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, e.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, e.fields.client_certificate = ((o = i == null ? void 0 : i.client_certificate) == null ? void 0 : o.id) || "", e.fields.ca_certificates = (m = i == null ? void 0 : i.ca_certificates) != null && m.length ? i == null ? void 0 : i.ca_certificates.join(",") : "", e.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, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (i == null ? void 0 : i.tls_verify), e.fields.tags = (b = i == null ? void 0 : i.tags) != null && b.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(w, e.fields), c("update", k == null ? void 0 : k.data);
|
|
1222
1243
|
}
|
|
1223
|
-
return
|
|
1244
|
+
return k;
|
|
1224
1245
|
} catch (_) {
|
|
1225
|
-
const { fields:
|
|
1226
|
-
e.errorMessages = i,
|
|
1227
|
-
const ie =
|
|
1228
|
-
ie === "client_certificate.id" ? e.formFieldErrors.client_certificate =
|
|
1246
|
+
const { fields: k, messages: i } = B(_);
|
|
1247
|
+
e.errorMessages = i, k.length && k.forEach((Q) => {
|
|
1248
|
+
const ie = Q.field;
|
|
1249
|
+
ie === "client_certificate.id" ? e.formFieldErrors.client_certificate = Q.message : ie.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = Q.message : Object.keys(e.formFieldErrors).includes(ie) && (e.formFieldErrors = {
|
|
1229
1250
|
...e.formFieldErrors,
|
|
1230
|
-
[ie]:
|
|
1251
|
+
[ie]: Q.message
|
|
1231
1252
|
});
|
|
1232
1253
|
}), c("error", _);
|
|
1233
1254
|
} finally {
|
|
@@ -1235,106 +1256,106 @@ const Y = {
|
|
|
1235
1256
|
}
|
|
1236
1257
|
};
|
|
1237
1258
|
return Me(() => a.gatewayServiceId, () => {
|
|
1238
|
-
Object.assign(e.fields,
|
|
1259
|
+
Object.assign(e.fields, w);
|
|
1239
1260
|
}), Me(e.fields, () => {
|
|
1240
|
-
c("model-updated",
|
|
1261
|
+
c("model-updated", K.value);
|
|
1241
1262
|
}), Je(() => {
|
|
1242
|
-
c("model-updated",
|
|
1243
|
-
}),
|
|
1244
|
-
validateUrl:
|
|
1245
|
-
getPayload:
|
|
1246
|
-
saveFormData:
|
|
1247
|
-
canSubmit:
|
|
1248
|
-
initForm:
|
|
1249
|
-
}), (t,
|
|
1250
|
-
const
|
|
1251
|
-
return
|
|
1252
|
-
n(
|
|
1253
|
-
"can-submit":
|
|
1263
|
+
c("model-updated", K.value), z.value || (e.fields.name = Fe());
|
|
1264
|
+
}), N({
|
|
1265
|
+
validateUrl: ce,
|
|
1266
|
+
getPayload: K,
|
|
1267
|
+
saveFormData: L,
|
|
1268
|
+
canSubmit: re,
|
|
1269
|
+
initForm: u
|
|
1270
|
+
}), (t, o) => {
|
|
1271
|
+
const m = D("KRadio"), b = D("KButton"), _ = D("KInput"), k = D("KSelect"), i = D("KCheckbox"), Q = D("KCollapse"), ie = D("KAlert");
|
|
1272
|
+
return S(), T("div", $t, [
|
|
1273
|
+
n(r(_t), {
|
|
1274
|
+
"can-submit": re.value,
|
|
1254
1275
|
config: s.config,
|
|
1255
1276
|
"edit-id": s.gatewayServiceId,
|
|
1256
|
-
"entity-type":
|
|
1257
|
-
"fetch-url":
|
|
1258
|
-
"form-fields":
|
|
1277
|
+
"entity-type": r(je).GatewayService,
|
|
1278
|
+
"fetch-url": O.value,
|
|
1279
|
+
"form-fields": K.value,
|
|
1259
1280
|
"is-readonly": e.isReadonly,
|
|
1260
1281
|
onCancel: g,
|
|
1261
|
-
"onFetch:error":
|
|
1262
|
-
"onFetch:success":
|
|
1263
|
-
onLoading:
|
|
1264
|
-
onSubmit:
|
|
1282
|
+
"onFetch:error": o[30] || (o[30] = (f) => t.$emit("error", f)),
|
|
1283
|
+
"onFetch:success": u,
|
|
1284
|
+
onLoading: o[31] || (o[31] = (f) => t.$emit("loading", f)),
|
|
1285
|
+
onSubmit: L
|
|
1265
1286
|
}, {
|
|
1266
1287
|
"form-actions": d(() => [
|
|
1267
1288
|
Ye(t.$slots, "form-actions", {
|
|
1268
|
-
canSubmit:
|
|
1289
|
+
canSubmit: re.value,
|
|
1269
1290
|
cancel: g,
|
|
1270
|
-
submit:
|
|
1291
|
+
submit: L
|
|
1271
1292
|
}, void 0, !0)
|
|
1272
1293
|
]),
|
|
1273
1294
|
default: d(() => [
|
|
1274
|
-
n(
|
|
1275
|
-
description:
|
|
1295
|
+
n(r(Ge), {
|
|
1296
|
+
description: r(l)("gateway_services.form.sections.keys.description"),
|
|
1276
1297
|
"hide-info-header": s.hideSectionsInfo,
|
|
1277
|
-
title:
|
|
1298
|
+
title: r(l)("gateway_services.form.sections.keys.title")
|
|
1278
1299
|
}, {
|
|
1279
1300
|
default: d(() => [
|
|
1280
|
-
|
|
1301
|
+
z.value ? M("", !0) : (S(), T("div", xt, [
|
|
1281
1302
|
E("div", Mt, [
|
|
1282
|
-
n(
|
|
1283
|
-
modelValue:
|
|
1284
|
-
"onUpdate:modelValue":
|
|
1303
|
+
n(m, {
|
|
1304
|
+
modelValue: C.value,
|
|
1305
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => C.value = f),
|
|
1285
1306
|
card: "",
|
|
1286
1307
|
"card-orientation": "horizontal",
|
|
1287
1308
|
"data-testid": "gateway-service-url-radio",
|
|
1288
|
-
description:
|
|
1289
|
-
label:
|
|
1309
|
+
description: r(l)("gateway_services.form.sections.keys.url.description"),
|
|
1310
|
+
label: r(l)("gateway_services.form.sections.keys.url.label"),
|
|
1290
1311
|
"selected-value": pe.url,
|
|
1291
1312
|
onChange: ge
|
|
1292
1313
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1293
|
-
n(
|
|
1294
|
-
modelValue:
|
|
1295
|
-
"onUpdate:modelValue":
|
|
1314
|
+
n(m, {
|
|
1315
|
+
modelValue: C.value,
|
|
1316
|
+
"onUpdate:modelValue": o[1] || (o[1] = (f) => C.value = f),
|
|
1296
1317
|
card: "",
|
|
1297
1318
|
"card-orientation": "horizontal",
|
|
1298
1319
|
"checked-group": "protocol",
|
|
1299
1320
|
"data-testid": "gateway-service-protocol-radio",
|
|
1300
|
-
description:
|
|
1301
|
-
label:
|
|
1321
|
+
description: r(l)("gateway_services.form.sections.keys.protocol.description"),
|
|
1322
|
+
label: r(l)("gateway_services.form.sections.keys.protocol.label"),
|
|
1302
1323
|
"selected-value": pe.protocol,
|
|
1303
1324
|
onChange: ge
|
|
1304
1325
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1305
1326
|
]),
|
|
1306
|
-
n(
|
|
1327
|
+
n(Re, { name: "slide-fade" }, {
|
|
1307
1328
|
default: d(() => [
|
|
1308
|
-
|
|
1329
|
+
C.value === "url" ? (S(), T("div", Dt, [
|
|
1309
1330
|
n(_, {
|
|
1310
1331
|
modelValue: e.fields.url,
|
|
1311
|
-
"onUpdate:modelValue":
|
|
1332
|
+
"onUpdate:modelValue": o[2] || (o[2] = (f) => e.fields.url = f),
|
|
1312
1333
|
modelModifiers: { trim: !0 },
|
|
1313
1334
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1314
1335
|
"data-testid": "gateway-service-url-input",
|
|
1315
|
-
error:
|
|
1316
|
-
"error-message":
|
|
1317
|
-
label:
|
|
1336
|
+
error: Ie.value,
|
|
1337
|
+
"error-message": Z("url"),
|
|
1338
|
+
label: r(l)("gateway_services.form.fields.upstream_url.label"),
|
|
1318
1339
|
"label-attributes": {
|
|
1319
|
-
info: s.config.app === "konnect" ?
|
|
1340
|
+
info: s.config.app === "konnect" ? r(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : r(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1320
1341
|
tooltipAttributes: { maxWidth: "400" }
|
|
1321
1342
|
},
|
|
1322
1343
|
name: "url",
|
|
1323
|
-
placeholder:
|
|
1344
|
+
placeholder: r(l)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1324
1345
|
required: "",
|
|
1325
1346
|
onInput: _e
|
|
1326
|
-
},
|
|
1347
|
+
}, Ve({ _: 2 }, [
|
|
1327
1348
|
s.hideTrySampleApiButton ? void 0 : {
|
|
1328
1349
|
name: "after",
|
|
1329
1350
|
fn: d(() => [
|
|
1330
|
-
n(
|
|
1351
|
+
n(b, {
|
|
1331
1352
|
appearance: "tertiary",
|
|
1332
1353
|
"data-testid": "try-sample-api",
|
|
1333
1354
|
size: "small",
|
|
1334
1355
|
onClick: ye
|
|
1335
1356
|
}, {
|
|
1336
1357
|
default: d(() => [
|
|
1337
|
-
|
|
1358
|
+
U(h(r(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
1338
1359
|
]),
|
|
1339
1360
|
_: 1
|
|
1340
1361
|
})
|
|
@@ -1342,22 +1363,22 @@ const Y = {
|
|
|
1342
1363
|
key: "0"
|
|
1343
1364
|
}
|
|
1344
1365
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
1345
|
-
])) :
|
|
1366
|
+
])) : M("", !0)
|
|
1346
1367
|
]),
|
|
1347
1368
|
_: 1
|
|
1348
1369
|
})
|
|
1349
1370
|
])),
|
|
1350
|
-
n(
|
|
1371
|
+
n(Re, { name: "slide-fade" }, {
|
|
1351
1372
|
default: d(() => [
|
|
1352
|
-
|
|
1353
|
-
n(
|
|
1373
|
+
C.value === "protocol" || z.value ? (S(), T("div", Bt, [
|
|
1374
|
+
n(k, {
|
|
1354
1375
|
modelValue: e.fields.protocol,
|
|
1355
|
-
"onUpdate:modelValue":
|
|
1376
|
+
"onUpdate:modelValue": o[3] || (o[3] = (f) => e.fields.protocol = f),
|
|
1356
1377
|
"data-testid": "gateway-service-protocol-select",
|
|
1357
|
-
items:
|
|
1358
|
-
label:
|
|
1378
|
+
items: te,
|
|
1379
|
+
label: r(l)("gateway_services.form.fields.protocol.label"),
|
|
1359
1380
|
"label-attributes": {
|
|
1360
|
-
info:
|
|
1381
|
+
info: r(l)("gateway_services.form.fields.protocol.tooltip"),
|
|
1361
1382
|
tooltipAttributes: { maxWidth: "400" }
|
|
1362
1383
|
},
|
|
1363
1384
|
readonly: e.isReadonly,
|
|
@@ -1367,32 +1388,32 @@ const Y = {
|
|
|
1367
1388
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1368
1389
|
n(_, {
|
|
1369
1390
|
modelValue: e.fields.host,
|
|
1370
|
-
"onUpdate:modelValue":
|
|
1391
|
+
"onUpdate:modelValue": o[4] || (o[4] = (f) => e.fields.host = f),
|
|
1371
1392
|
modelModifiers: { trim: !0 },
|
|
1372
1393
|
class: "gateway-service-form-margin-top",
|
|
1373
1394
|
"data-testid": "gateway-service-host-input",
|
|
1374
1395
|
error: !!e.formFieldErrors.host,
|
|
1375
|
-
"error-message":
|
|
1376
|
-
label:
|
|
1396
|
+
"error-message": Z("host"),
|
|
1397
|
+
label: r(l)("gateway_services.form.fields.host.label"),
|
|
1377
1398
|
"label-attributes": {
|
|
1378
|
-
info:
|
|
1399
|
+
info: r(l)("gateway_services.form.fields.host.tooltip"),
|
|
1379
1400
|
tooltipAttributes: { maxWidth: "400" }
|
|
1380
1401
|
},
|
|
1381
1402
|
name: "host",
|
|
1382
|
-
placeholder:
|
|
1403
|
+
placeholder: r(l)("gateway_services.form.fields.host.placeholder"),
|
|
1383
1404
|
required: "",
|
|
1384
|
-
onInput:
|
|
1385
|
-
},
|
|
1405
|
+
onInput: o[5] || (o[5] = (f) => x("host"))
|
|
1406
|
+
}, Ve({ _: 2 }, [
|
|
1386
1407
|
s.hideTrySampleApiButton ? void 0 : {
|
|
1387
1408
|
name: "after",
|
|
1388
1409
|
fn: d(() => [
|
|
1389
|
-
n(
|
|
1410
|
+
n(b, {
|
|
1390
1411
|
appearance: "tertiary",
|
|
1391
1412
|
size: "small",
|
|
1392
1413
|
onClick: ye
|
|
1393
1414
|
}, {
|
|
1394
1415
|
default: d(() => [
|
|
1395
|
-
|
|
1416
|
+
U(h(r(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
1396
1417
|
]),
|
|
1397
1418
|
_: 1
|
|
1398
1419
|
})
|
|
@@ -1400,75 +1421,75 @@ const Y = {
|
|
|
1400
1421
|
key: "0"
|
|
1401
1422
|
}
|
|
1402
1423
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
1403
|
-
|
|
1424
|
+
be.value ? (S(), T("div", Kt, [
|
|
1404
1425
|
n(_, {
|
|
1405
1426
|
modelValue: e.fields.path,
|
|
1406
|
-
"onUpdate:modelValue":
|
|
1427
|
+
"onUpdate:modelValue": o[6] || (o[6] = (f) => e.fields.path = f),
|
|
1407
1428
|
modelModifiers: { trim: !0 },
|
|
1408
1429
|
class: "gateway-service-form-margin-top",
|
|
1409
1430
|
"data-testid": "gateway-service-path-input",
|
|
1410
1431
|
error: !!e.formFieldErrors.path,
|
|
1411
|
-
"error-message":
|
|
1412
|
-
label:
|
|
1432
|
+
"error-message": Z("path"),
|
|
1433
|
+
label: r(l)("gateway_services.form.fields.path.label"),
|
|
1413
1434
|
"label-attributes": {
|
|
1414
|
-
info:
|
|
1435
|
+
info: r(l)("gateway_services.form.fields.path.tooltip"),
|
|
1415
1436
|
tooltipAttributes: { maxWidth: "400" }
|
|
1416
1437
|
},
|
|
1417
1438
|
name: "path",
|
|
1418
|
-
placeholder:
|
|
1419
|
-
onInput:
|
|
1439
|
+
placeholder: r(l)("gateway_services.form.fields.path.placeholder"),
|
|
1440
|
+
onInput: o[7] || (o[7] = (f) => x("path"))
|
|
1420
1441
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
1421
|
-
])) :
|
|
1442
|
+
])) : M("", !0),
|
|
1422
1443
|
n(_, {
|
|
1423
1444
|
modelValue: e.fields.port,
|
|
1424
1445
|
"onUpdate:modelValue": [
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
e.fields.port =
|
|
1446
|
+
o[8] || (o[8] = (f) => e.fields.port = f),
|
|
1447
|
+
o[10] || (o[10] = () => {
|
|
1448
|
+
e.fields.port = H(e.fields.port + "");
|
|
1428
1449
|
})
|
|
1429
1450
|
],
|
|
1430
1451
|
class: "gateway-service-form-margin-top",
|
|
1431
1452
|
"data-testid": "gateway-service-port-input",
|
|
1432
1453
|
error: !!e.formFieldErrors.port,
|
|
1433
|
-
"error-message":
|
|
1434
|
-
label:
|
|
1454
|
+
"error-message": Z("port"),
|
|
1455
|
+
label: r(l)("gateway_services.form.fields.port.label"),
|
|
1435
1456
|
"label-attributes": {
|
|
1436
|
-
info:
|
|
1457
|
+
info: r(l)("gateway_services.form.fields.port.tooltip"),
|
|
1437
1458
|
tooltipAttributes: { maxWidth: "400" }
|
|
1438
1459
|
},
|
|
1439
1460
|
name: "port",
|
|
1440
1461
|
type: "number",
|
|
1441
|
-
onInput:
|
|
1462
|
+
onInput: o[9] || (o[9] = (f) => x("port"))
|
|
1442
1463
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
1443
|
-
])) :
|
|
1464
|
+
])) : M("", !0)
|
|
1444
1465
|
]),
|
|
1445
1466
|
_: 1
|
|
1446
1467
|
}),
|
|
1447
|
-
n(
|
|
1448
|
-
modelValue:
|
|
1449
|
-
"onUpdate:modelValue":
|
|
1468
|
+
n(Q, {
|
|
1469
|
+
modelValue: v.value,
|
|
1470
|
+
"onUpdate:modelValue": o[26] || (o[26] = (f) => v.value = f),
|
|
1450
1471
|
"data-testid": "advanced-fields-collapse",
|
|
1451
1472
|
"trigger-alignment": "leading",
|
|
1452
|
-
"trigger-label":
|
|
1473
|
+
"trigger-label": r(l)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1453
1474
|
}, {
|
|
1454
1475
|
default: d(() => [
|
|
1455
|
-
n(
|
|
1476
|
+
n(Re, { name: "slide-fade" }, {
|
|
1456
1477
|
default: d(() => [
|
|
1457
|
-
|
|
1478
|
+
v.value ? M("", !0) : (S(), T("div", Lt, [
|
|
1458
1479
|
E("div", qt, [
|
|
1459
1480
|
n(_, {
|
|
1460
1481
|
modelValue: e.fields.retries,
|
|
1461
1482
|
"onUpdate:modelValue": [
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
e.fields.retries =
|
|
1483
|
+
o[11] || (o[11] = (f) => e.fields.retries = f),
|
|
1484
|
+
o[12] || (o[12] = () => {
|
|
1485
|
+
e.fields.retries = H(e.fields.retries + "");
|
|
1465
1486
|
})
|
|
1466
1487
|
],
|
|
1467
1488
|
autocomplete: "off",
|
|
1468
1489
|
"data-testid": "gateway-service-retries-input",
|
|
1469
|
-
label:
|
|
1490
|
+
label: r(l)("gateway_services.form.fields.retries.label"),
|
|
1470
1491
|
"label-attributes": {
|
|
1471
|
-
info:
|
|
1492
|
+
info: r(l)("gateway_services.form.fields.retries.tooltip"),
|
|
1472
1493
|
tooltipAttributes: { maxWidth: "400" }
|
|
1473
1494
|
},
|
|
1474
1495
|
name: "retries",
|
|
@@ -1480,16 +1501,16 @@ const Y = {
|
|
|
1480
1501
|
n(_, {
|
|
1481
1502
|
modelValue: e.fields.connect_timeout,
|
|
1482
1503
|
"onUpdate:modelValue": [
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
e.fields.connect_timeout =
|
|
1504
|
+
o[13] || (o[13] = (f) => e.fields.connect_timeout = f),
|
|
1505
|
+
o[14] || (o[14] = () => {
|
|
1506
|
+
e.fields.connect_timeout = H(e.fields.connect_timeout + "");
|
|
1486
1507
|
})
|
|
1487
1508
|
],
|
|
1488
1509
|
autocomplete: "off",
|
|
1489
1510
|
"data-testid": "gateway-service-connTimeout-input",
|
|
1490
|
-
label:
|
|
1511
|
+
label: r(l)("gateway_services.form.fields.connect_timeout.label"),
|
|
1491
1512
|
"label-attributes": {
|
|
1492
|
-
info:
|
|
1513
|
+
info: r(l)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
1493
1514
|
tooltipAttributes: { maxWidth: "400" }
|
|
1494
1515
|
},
|
|
1495
1516
|
name: "connTimeout",
|
|
@@ -1501,16 +1522,16 @@ const Y = {
|
|
|
1501
1522
|
n(_, {
|
|
1502
1523
|
modelValue: e.fields.write_timeout,
|
|
1503
1524
|
"onUpdate:modelValue": [
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
e.fields.write_timeout =
|
|
1525
|
+
o[15] || (o[15] = (f) => e.fields.write_timeout = f),
|
|
1526
|
+
o[16] || (o[16] = () => {
|
|
1527
|
+
e.fields.write_timeout = H(e.fields.write_timeout + "");
|
|
1507
1528
|
})
|
|
1508
1529
|
],
|
|
1509
1530
|
autocomplete: "off",
|
|
1510
1531
|
"data-testid": "gateway-service-writeTimeout-input",
|
|
1511
|
-
label:
|
|
1532
|
+
label: r(l)("gateway_services.form.fields.write_timeout.label"),
|
|
1512
1533
|
"label-attributes": {
|
|
1513
|
-
info:
|
|
1534
|
+
info: r(l)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
1514
1535
|
tooltipAttributes: { maxWidth: "400" }
|
|
1515
1536
|
},
|
|
1516
1537
|
name: "writeTimeout",
|
|
@@ -1522,16 +1543,16 @@ const Y = {
|
|
|
1522
1543
|
n(_, {
|
|
1523
1544
|
modelValue: e.fields.read_timeout,
|
|
1524
1545
|
"onUpdate:modelValue": [
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
e.fields.read_timeout =
|
|
1546
|
+
o[17] || (o[17] = (f) => e.fields.read_timeout = f),
|
|
1547
|
+
o[18] || (o[18] = () => {
|
|
1548
|
+
e.fields.read_timeout = H(e.fields.read_timeout + "");
|
|
1528
1549
|
})
|
|
1529
1550
|
],
|
|
1530
1551
|
autocomplete: "off",
|
|
1531
1552
|
"data-testid": "gateway-service-readTimeout-input",
|
|
1532
|
-
label:
|
|
1553
|
+
label: r(l)("gateway_services.form.fields.read_timeout.label"),
|
|
1533
1554
|
"label-attributes": {
|
|
1534
|
-
info:
|
|
1555
|
+
info: r(l)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
1535
1556
|
tooltipAttributes: { maxWidth: "400" }
|
|
1536
1557
|
},
|
|
1537
1558
|
name: "readTimeout",
|
|
@@ -1539,99 +1560,99 @@ const Y = {
|
|
|
1539
1560
|
type: "number"
|
|
1540
1561
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1541
1562
|
]),
|
|
1542
|
-
|
|
1563
|
+
we.value ? (S(), T("div", Ot, [
|
|
1543
1564
|
n(_, {
|
|
1544
1565
|
modelValue: e.fields.client_certificate,
|
|
1545
|
-
"onUpdate:modelValue":
|
|
1566
|
+
"onUpdate:modelValue": o[19] || (o[19] = (f) => e.fields.client_certificate = f),
|
|
1546
1567
|
modelModifiers: { trim: !0 },
|
|
1547
1568
|
autocomplete: "off",
|
|
1548
1569
|
"data-testid": "gateway-service-clientCert-input",
|
|
1549
1570
|
error: !!e.formFieldErrors.client_certificate,
|
|
1550
|
-
label:
|
|
1571
|
+
label: r(l)("gateway_services.form.fields.client_certificate.label"),
|
|
1551
1572
|
"label-attributes": {
|
|
1552
|
-
info:
|
|
1573
|
+
info: r(l)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1553
1574
|
tooltipAttributes: { maxWidth: "400" }
|
|
1554
1575
|
},
|
|
1555
1576
|
name: "clientCert",
|
|
1556
|
-
placeholder:
|
|
1577
|
+
placeholder: r(l)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
1557
1578
|
readonly: e.isReadonly,
|
|
1558
1579
|
type: "text",
|
|
1559
|
-
onInput:
|
|
1580
|
+
onInput: o[20] || (o[20] = (f) => he("client_certificate"))
|
|
1560
1581
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
1561
|
-
])) :
|
|
1562
|
-
|
|
1582
|
+
])) : M("", !0),
|
|
1583
|
+
Ae.value ? (S(), T("div", jt, [
|
|
1563
1584
|
n(_, {
|
|
1564
1585
|
modelValue: e.fields.ca_certificates,
|
|
1565
|
-
"onUpdate:modelValue":
|
|
1586
|
+
"onUpdate:modelValue": o[21] || (o[21] = (f) => e.fields.ca_certificates = f),
|
|
1566
1587
|
modelModifiers: { trim: !0 },
|
|
1567
1588
|
autocomplete: "off",
|
|
1568
1589
|
"data-testid": "gateway-service-ca-certs-input",
|
|
1569
1590
|
error: !!e.formFieldErrors.ca_certificates,
|
|
1570
|
-
label:
|
|
1591
|
+
label: r(l)("gateway_services.form.fields.ca_certificates.label"),
|
|
1571
1592
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1572
|
-
placeholder:
|
|
1593
|
+
placeholder: r(l)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
1573
1594
|
readonly: e.isReadonly,
|
|
1574
1595
|
type: "text",
|
|
1575
|
-
onInput:
|
|
1596
|
+
onInput: o[22] || (o[22] = (f) => he("ca_certificates"))
|
|
1576
1597
|
}, {
|
|
1577
1598
|
"label-tooltip": d(() => [
|
|
1578
|
-
n(
|
|
1599
|
+
n(r(q), {
|
|
1579
1600
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1580
1601
|
scope: "global"
|
|
1581
1602
|
}, {
|
|
1582
1603
|
code1: d(() => [
|
|
1583
|
-
E("code", null, h(
|
|
1604
|
+
E("code", null, h(r(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1584
1605
|
]),
|
|
1585
1606
|
code2: d(() => [
|
|
1586
|
-
E("code", null, h(
|
|
1607
|
+
E("code", null, h(r(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1587
1608
|
]),
|
|
1588
1609
|
_: 1
|
|
1589
1610
|
})
|
|
1590
1611
|
]),
|
|
1591
1612
|
_: 1
|
|
1592
1613
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
1593
|
-
])) :
|
|
1594
|
-
|
|
1614
|
+
])) : M("", !0),
|
|
1615
|
+
Te.value ? (S(), T("div", zt, [
|
|
1595
1616
|
n(i, {
|
|
1596
1617
|
modelValue: e.fields.tls_verify_enabled,
|
|
1597
|
-
"onUpdate:modelValue":
|
|
1618
|
+
"onUpdate:modelValue": o[23] || (o[23] = (f) => e.fields.tls_verify_enabled = f),
|
|
1598
1619
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1599
|
-
description:
|
|
1600
|
-
label:
|
|
1620
|
+
description: r(l)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1621
|
+
label: r(l)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1601
1622
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1602
1623
|
}, {
|
|
1603
1624
|
tooltip: d(() => [
|
|
1604
|
-
n(
|
|
1625
|
+
n(r(q), {
|
|
1605
1626
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1606
1627
|
scope: "global"
|
|
1607
1628
|
}, {
|
|
1608
1629
|
code1: d(() => [
|
|
1609
|
-
E("code", null, h(
|
|
1630
|
+
E("code", null, h(r(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1610
1631
|
]),
|
|
1611
1632
|
_: 1
|
|
1612
1633
|
})
|
|
1613
1634
|
]),
|
|
1614
1635
|
_: 1
|
|
1615
1636
|
}, 8, ["modelValue", "description", "label"]),
|
|
1616
|
-
e.fields.tls_verify_enabled ? (
|
|
1617
|
-
n(
|
|
1637
|
+
e.fields.tls_verify_enabled ? (S(), T("div", Ht, [
|
|
1638
|
+
n(m, {
|
|
1618
1639
|
modelValue: e.fields.tls_verify_value,
|
|
1619
|
-
"onUpdate:modelValue":
|
|
1640
|
+
"onUpdate:modelValue": o[24] || (o[24] = (f) => e.fields.tls_verify_value = f),
|
|
1620
1641
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1621
|
-
label:
|
|
1642
|
+
label: r(l)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1622
1643
|
"selected-value": !0
|
|
1623
1644
|
}, null, 8, ["modelValue", "label"])
|
|
1624
|
-
])) :
|
|
1625
|
-
e.fields.tls_verify_enabled ? (
|
|
1626
|
-
n(
|
|
1645
|
+
])) : M("", !0),
|
|
1646
|
+
e.fields.tls_verify_enabled ? (S(), T("div", Zt, [
|
|
1647
|
+
n(m, {
|
|
1627
1648
|
modelValue: e.fields.tls_verify_value,
|
|
1628
|
-
"onUpdate:modelValue":
|
|
1649
|
+
"onUpdate:modelValue": o[25] || (o[25] = (f) => e.fields.tls_verify_value = f),
|
|
1629
1650
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1630
|
-
label:
|
|
1651
|
+
label: r(l)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1631
1652
|
"selected-value": !1
|
|
1632
1653
|
}, null, 8, ["modelValue", "label"])
|
|
1633
|
-
])) :
|
|
1634
|
-
])) :
|
|
1654
|
+
])) : M("", !0)
|
|
1655
|
+
])) : M("", !0)
|
|
1635
1656
|
]))
|
|
1636
1657
|
]),
|
|
1637
1658
|
_: 1
|
|
@@ -1642,55 +1663,55 @@ const Y = {
|
|
|
1642
1663
|
]),
|
|
1643
1664
|
_: 1
|
|
1644
1665
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1645
|
-
n(
|
|
1646
|
-
description:
|
|
1666
|
+
n(r(Ge), {
|
|
1667
|
+
description: r(l)("gateway_services.form.sections.general.description"),
|
|
1647
1668
|
"hide-info-header": s.hideSectionsInfo,
|
|
1648
|
-
title:
|
|
1669
|
+
title: r(l)("gateway_services.form.sections.general.title")
|
|
1649
1670
|
}, {
|
|
1650
1671
|
default: d(() => [
|
|
1651
1672
|
n(_, {
|
|
1652
1673
|
modelValue: e.fields.name,
|
|
1653
|
-
"onUpdate:modelValue":
|
|
1674
|
+
"onUpdate:modelValue": o[27] || (o[27] = (f) => e.fields.name = f),
|
|
1654
1675
|
modelModifiers: { trim: !0 },
|
|
1655
1676
|
autocomplete: "off",
|
|
1656
1677
|
"data-testid": "gateway-service-name-input",
|
|
1657
|
-
error:
|
|
1658
|
-
"error-message":
|
|
1659
|
-
label:
|
|
1678
|
+
error: ee.value,
|
|
1679
|
+
"error-message": ne.value,
|
|
1680
|
+
label: r(l)("gateway_services.form.fields.name.label"),
|
|
1660
1681
|
"label-attributes": {
|
|
1661
|
-
info:
|
|
1682
|
+
info: r(l)("gateway_services.form.fields.name.tooltip"),
|
|
1662
1683
|
tooltipAttributes: { maxWidth: "400" }
|
|
1663
1684
|
},
|
|
1664
1685
|
name: "name",
|
|
1665
|
-
placeholder:
|
|
1686
|
+
placeholder: r(l)("gateway_services.form.fields.name.placeholder"),
|
|
1666
1687
|
readonly: e.isReadonly,
|
|
1667
1688
|
type: "text",
|
|
1668
|
-
onInput:
|
|
1689
|
+
onInput: oe
|
|
1669
1690
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1670
|
-
n(
|
|
1691
|
+
n(Q, {
|
|
1671
1692
|
"data-testid": "tags-collapse",
|
|
1672
1693
|
"trigger-alignment": "leading",
|
|
1673
|
-
"trigger-label":
|
|
1694
|
+
"trigger-label": r(l)("gateway_services.form.fields.tags.collapse")
|
|
1674
1695
|
}, {
|
|
1675
1696
|
default: d(() => [
|
|
1676
1697
|
E("div", Jt, [
|
|
1677
1698
|
n(_, {
|
|
1678
1699
|
modelValue: e.fields.tags,
|
|
1679
|
-
"onUpdate:modelValue":
|
|
1700
|
+
"onUpdate:modelValue": o[28] || (o[28] = (f) => e.fields.tags = f),
|
|
1680
1701
|
modelModifiers: { trim: !0 },
|
|
1681
1702
|
autocomplete: "off",
|
|
1682
1703
|
"data-testid": "gateway-service-tags-input",
|
|
1683
|
-
help:
|
|
1684
|
-
label:
|
|
1704
|
+
help: r(l)("gateway_services.form.fields.tags.help"),
|
|
1705
|
+
label: r(l)("gateway_services.form.fields.tags.label"),
|
|
1685
1706
|
"label-attributes": {
|
|
1686
|
-
info:
|
|
1707
|
+
info: r(l)("gateway_services.form.fields.tags.tooltip"),
|
|
1687
1708
|
tooltipAttributes: { maxWidth: "400" }
|
|
1688
1709
|
},
|
|
1689
1710
|
name: "tags",
|
|
1690
|
-
placeholder:
|
|
1711
|
+
placeholder: r(l)("gateway_services.form.fields.tags.placeholder"),
|
|
1691
1712
|
readonly: e.isReadonly,
|
|
1692
1713
|
type: "text",
|
|
1693
|
-
onInput:
|
|
1714
|
+
onInput: o[29] || (o[29] = (f) => W("tags"))
|
|
1694
1715
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
1695
1716
|
])
|
|
1696
1717
|
]),
|
|
@@ -1699,25 +1720,25 @@ const Y = {
|
|
|
1699
1720
|
]),
|
|
1700
1721
|
_: 1
|
|
1701
1722
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1702
|
-
e.errorMessages.length ? (
|
|
1723
|
+
e.errorMessages.length ? (S(), de(ie, {
|
|
1703
1724
|
key: 0,
|
|
1704
1725
|
appearance: "danger",
|
|
1705
1726
|
"data-testid": "form-error"
|
|
1706
1727
|
}, {
|
|
1707
1728
|
default: d(() => [
|
|
1708
1729
|
E("ul", Qt, [
|
|
1709
|
-
(
|
|
1730
|
+
(S(!0), T(Qe, null, Xe(e.errorMessages, (f) => (S(), T("li", { key: f }, h(f), 1))), 128))
|
|
1710
1731
|
])
|
|
1711
1732
|
]),
|
|
1712
1733
|
_: 1
|
|
1713
|
-
})) :
|
|
1734
|
+
})) : M("", !0)
|
|
1714
1735
|
]),
|
|
1715
1736
|
_: 3
|
|
1716
1737
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
1717
1738
|
]);
|
|
1718
1739
|
};
|
|
1719
1740
|
}
|
|
1720
|
-
}), uo = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-72fe312f"]]), { validateHost: Yt, validatePort: eo, validateProtocol: to, validatePath: oo } =
|
|
1741
|
+
}), uo = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-72fe312f"]]), { validateHost: Yt, validatePort: eo, validateProtocol: to, validatePath: oo } = X.useUrlValidators(), fo = () => ({
|
|
1721
1742
|
validateHost: Yt,
|
|
1722
1743
|
validatePort: eo,
|
|
1723
1744
|
validateProtocol: to,
|