@kong-ui-public/entities-gateway-services 3.13.12-pr.2582.80627e5d9.0 → 3.13.12-pr.2591.17e303dd2.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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Be, ref as $, computed as k, watch as Me, onBeforeMount as He, resolveComponent as B, createElementBlock as A, openBlock as C, createVNode as n, unref as
|
|
1
|
+
import { defineComponent as Be, ref as $, computed as k, watch as Me, onBeforeMount as He, resolveComponent as B, createElementBlock as A, openBlock as C, createVNode as n, unref as o, createSlots as ke, 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 De, onMounted as Je, Transition as $e, 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";
|
|
@@ -365,18 +365,18 @@ const X = {
|
|
|
365
365
|
}
|
|
366
366
|
}, fe = le, Y = k(() => {
|
|
367
367
|
var v, g;
|
|
368
|
-
let
|
|
369
|
-
return c.config.app === "konnect" ?
|
|
368
|
+
let u = `${c.config.apiBaseUrl}${Ve.list[c.config.app].all}`;
|
|
369
|
+
return c.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((v = c.config) == null ? void 0 : v.controlPlaneId) || "") : c.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (g = c.config) != null && g.workspace ? `/${c.config.workspace}` : "")), u;
|
|
370
370
|
}), Se = k(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${Y.value}`) : new URL(Y.value)), W = $(""), z = k(() => {
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
371
|
+
const u = c.config.app === "konnect" || c.config.isExactMatch;
|
|
372
|
+
if (u)
|
|
373
373
|
return {
|
|
374
|
-
isExactMatch:
|
|
374
|
+
isExactMatch: u,
|
|
375
375
|
placeholder: a(`search.placeholder.${c.config.app}`)
|
|
376
376
|
};
|
|
377
377
|
const { name: v, enabled: g, protocol: S, host: j, port: x, path: K } = le;
|
|
378
378
|
return {
|
|
379
|
-
isExactMatch:
|
|
379
|
+
isExactMatch: u,
|
|
380
380
|
fields: { name: v, enabled: g, protocol: S, host: j, port: x, path: K },
|
|
381
381
|
schema: c.config.filterSchema
|
|
382
382
|
};
|
|
@@ -388,24 +388,24 @@ const X = {
|
|
|
388
388
|
W.value = "";
|
|
389
389
|
}, ae = () => {
|
|
390
390
|
V.value++;
|
|
391
|
-
}, ee = $(null),
|
|
391
|
+
}, ee = $(null), e = k(() => ({
|
|
392
392
|
ctaPath: c.config.createRoute,
|
|
393
393
|
ctaText: oe.value ? c.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
|
|
394
394
|
message: `${a("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
395
395
|
title: oe.value ? c.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
|
|
396
396
|
})), b = $(!1), R = $(null), te = k(() => {
|
|
397
|
-
const
|
|
397
|
+
const u = {
|
|
398
398
|
action: "disable",
|
|
399
399
|
id: "",
|
|
400
400
|
name: ""
|
|
401
401
|
};
|
|
402
402
|
if (R.value) {
|
|
403
403
|
const { enabled: v, id: g, name: S } = R.value;
|
|
404
|
-
|
|
404
|
+
u.action = v ? "disable" : "enable", u.id = g, u.name = S || g;
|
|
405
405
|
}
|
|
406
|
-
return
|
|
407
|
-
}), pe = (
|
|
408
|
-
b.value = !0, R.value =
|
|
406
|
+
return u;
|
|
407
|
+
}), pe = (u) => {
|
|
408
|
+
b.value = !0, R.value = u;
|
|
409
409
|
}, me = () => {
|
|
410
410
|
b.value = !1, R.value = null;
|
|
411
411
|
}, Z = async () => {
|
|
@@ -419,52 +419,52 @@ const X = {
|
|
|
419
419
|
} catch (x) {
|
|
420
420
|
p("error", x);
|
|
421
421
|
}
|
|
422
|
-
}, ve = (
|
|
423
|
-
c.config.getControlPlaneRoute && F.push(c.config.getControlPlaneRoute(
|
|
424
|
-
}, ge = async (
|
|
425
|
-
const g =
|
|
422
|
+
}, ve = (u) => {
|
|
423
|
+
c.config.getControlPlaneRoute && F.push(c.config.getControlPlaneRoute(u));
|
|
424
|
+
}, ge = async (u, v) => {
|
|
425
|
+
const g = u.id;
|
|
426
426
|
if (!await v(g)) {
|
|
427
427
|
p("copy:error", {
|
|
428
|
-
entity:
|
|
428
|
+
entity: u,
|
|
429
429
|
field: "id",
|
|
430
430
|
message: a("errors.copy")
|
|
431
431
|
});
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
434
|
p("copy:success", {
|
|
435
|
-
entity:
|
|
435
|
+
entity: u,
|
|
436
436
|
field: "id",
|
|
437
437
|
message: a("copy.success", { val: g })
|
|
438
438
|
});
|
|
439
|
-
}, ye = async (
|
|
440
|
-
const g = JSON.stringify(
|
|
439
|
+
}, ye = async (u, v) => {
|
|
440
|
+
const g = JSON.stringify(u);
|
|
441
441
|
if (!await v(g)) {
|
|
442
442
|
p("copy:error", {
|
|
443
|
-
entity:
|
|
443
|
+
entity: u,
|
|
444
444
|
message: a("errors.copy")
|
|
445
445
|
});
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
448
|
p("copy:success", {
|
|
449
|
-
entity:
|
|
449
|
+
entity: u,
|
|
450
450
|
message: a("copy.success_brief")
|
|
451
451
|
});
|
|
452
|
-
}, _e = async (
|
|
452
|
+
}, _e = async (u) => {
|
|
453
453
|
var g;
|
|
454
|
-
await ((g = c.canRetrieve) == null ? void 0 : g.call(c,
|
|
455
|
-
}, he = (
|
|
454
|
+
await ((g = c.canRetrieve) == null ? void 0 : g.call(c, u)) && F.push(c.config.getViewRoute(u.id));
|
|
455
|
+
}, he = (u) => ({
|
|
456
456
|
label: a("actions.view"),
|
|
457
|
-
to: c.config.getViewRoute(
|
|
458
|
-
}), Pe = (
|
|
457
|
+
to: c.config.getViewRoute(u)
|
|
458
|
+
}), Pe = (u) => ({
|
|
459
459
|
label: a("actions.edit"),
|
|
460
|
-
to: c.config.getEditRoute(
|
|
461
|
-
}), T = $(void 0), O = $(!1), N = $(!1), J = $(""), Ie = lt(c.config, Y.value), Fe = (
|
|
462
|
-
T.value =
|
|
460
|
+
to: c.config.getEditRoute(u)
|
|
461
|
+
}), T = $(void 0), O = $(!1), N = $(!1), J = $(""), Ie = lt(c.config, Y.value), Fe = (u) => {
|
|
462
|
+
T.value = u, O.value = !0, J.value = "";
|
|
463
463
|
}, ne = () => {
|
|
464
464
|
O.value = !1, T.value = void 0;
|
|
465
465
|
}, Ae = async () => {
|
|
466
|
-
var
|
|
467
|
-
if ((
|
|
466
|
+
var u, v, g;
|
|
467
|
+
if ((u = T.value) != null && u.id) {
|
|
468
468
|
N.value = !0;
|
|
469
469
|
try {
|
|
470
470
|
await G.delete(Ie(T.value.id)), p("delete:success", T.value), ne(), V.value++;
|
|
@@ -477,12 +477,12 @@ const X = {
|
|
|
477
477
|
}, Te = () => {
|
|
478
478
|
F.push(c.config.createRoute);
|
|
479
479
|
};
|
|
480
|
-
Me(H, (
|
|
480
|
+
Me(H, (u) => {
|
|
481
481
|
var v, g, S;
|
|
482
|
-
if (
|
|
482
|
+
if (u.status === st.Error) {
|
|
483
483
|
ee.value = {
|
|
484
484
|
title: a("errors.general")
|
|
485
|
-
}, (S = (g = (v =
|
|
485
|
+
}, (S = (g = (v = u.error) == null ? void 0 : v.response) == null ? void 0 : g.data) != null && S.message && (ee.value.message = u.error.response.data.message), p("error", u.error);
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
ee.value = null;
|
|
@@ -490,31 +490,31 @@ const X = {
|
|
|
490
490
|
const oe = $(!1);
|
|
491
491
|
return He(async () => {
|
|
492
492
|
oe.value = await c.canCreate();
|
|
493
|
-
}), (
|
|
493
|
+
}), (u, v) => {
|
|
494
494
|
const g = B("KButton"), S = B("KEmptyState"), j = B("KBadge"), x = B("KInputSwitch"), K = B("KDropdownItem"), re = B("KClipboardProvider");
|
|
495
495
|
return C(), A("div", Ft, [
|
|
496
|
-
n(
|
|
496
|
+
n(o(at), {
|
|
497
497
|
"cache-identifier": s.cacheIdentifier,
|
|
498
498
|
"default-table-preferences": ue,
|
|
499
499
|
"disable-sorting": Ce.value,
|
|
500
|
-
"empty-state-options":
|
|
500
|
+
"empty-state-options": e.value,
|
|
501
501
|
"enable-entity-actions": "",
|
|
502
502
|
"error-message": ee.value,
|
|
503
|
-
fetcher:
|
|
504
|
-
"fetcher-cache-key":
|
|
503
|
+
fetcher: o(Ee),
|
|
504
|
+
"fetcher-cache-key": o(V),
|
|
505
505
|
"pagination-type": "offset",
|
|
506
506
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
507
507
|
query: W.value,
|
|
508
|
-
"table-headers":
|
|
508
|
+
"table-headers": o(fe),
|
|
509
509
|
onClearSearchInput: se,
|
|
510
|
-
"onClick:row": v[4] || (v[4] = (
|
|
510
|
+
"onClick:row": v[4] || (v[4] = (t) => _e(t)),
|
|
511
511
|
onSort: ae,
|
|
512
|
-
onState:
|
|
512
|
+
onState: o(D)
|
|
513
513
|
}, ke({
|
|
514
514
|
"toolbar-filter": d(() => [
|
|
515
|
-
n(
|
|
515
|
+
n(o(ct), {
|
|
516
516
|
modelValue: W.value,
|
|
517
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
517
|
+
"onUpdate:modelValue": v[0] || (v[0] = (t) => W.value = t),
|
|
518
518
|
config: z.value
|
|
519
519
|
}, null, 8, ["modelValue", "config"])
|
|
520
520
|
]),
|
|
@@ -530,14 +530,14 @@ const X = {
|
|
|
530
530
|
class: "open-learning-hub",
|
|
531
531
|
"data-testid": "gateway-services-learn-more-button",
|
|
532
532
|
icon: "",
|
|
533
|
-
onClick: v[1] || (v[1] = (
|
|
533
|
+
onClick: v[1] || (v[1] = (t) => u.$emit("click:learn-more"))
|
|
534
534
|
}, {
|
|
535
535
|
default: d(() => [
|
|
536
|
-
n(
|
|
536
|
+
n(o(Ke), { decorative: "" })
|
|
537
537
|
]),
|
|
538
538
|
_: 1
|
|
539
539
|
})) : M("", !0),
|
|
540
|
-
n(
|
|
540
|
+
n(o(ce), {
|
|
541
541
|
"auth-function": () => s.canCreate()
|
|
542
542
|
}, {
|
|
543
543
|
default: d(() => [
|
|
@@ -548,8 +548,8 @@ const X = {
|
|
|
548
548
|
to: s.config.createRoute
|
|
549
549
|
}, {
|
|
550
550
|
default: d(() => [
|
|
551
|
-
n(
|
|
552
|
-
U(" " + h(
|
|
551
|
+
n(o(Le)),
|
|
552
|
+
U(" " + h(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
553
553
|
]),
|
|
554
554
|
_: 1
|
|
555
555
|
}, 8, ["size", "to"])
|
|
@@ -559,123 +559,123 @@ const X = {
|
|
|
559
559
|
])
|
|
560
560
|
], 8, ["disabled"]))
|
|
561
561
|
]),
|
|
562
|
-
name: d(({ rowValue:
|
|
563
|
-
E("b", null, h(
|
|
562
|
+
name: d(({ rowValue: t }) => [
|
|
563
|
+
E("b", null, h(t ?? "-"), 1)
|
|
564
564
|
]),
|
|
565
|
-
control_plane: d(({ row:
|
|
566
|
-
var
|
|
565
|
+
control_plane: d(({ row: t }) => {
|
|
566
|
+
var r;
|
|
567
567
|
return [
|
|
568
|
-
(
|
|
568
|
+
(r = t.x_meta) != null && r.cluster_id ? (C(), de(j, {
|
|
569
569
|
key: 0,
|
|
570
|
-
tooltip:
|
|
570
|
+
tooltip: t.x_meta.cluster_id,
|
|
571
571
|
"truncation-tooltip": "",
|
|
572
|
-
onClick: Ue((y) => ve(
|
|
572
|
+
onClick: Ue((y) => ve(t.x_meta.cluster_id), ["stop"])
|
|
573
573
|
}, {
|
|
574
574
|
default: d(() => [
|
|
575
|
-
U(h(
|
|
575
|
+
U(h(t.x_meta.cluster_id), 1)
|
|
576
576
|
]),
|
|
577
577
|
_: 2
|
|
578
578
|
}, 1032, ["tooltip", "onClick"])) : (C(), A("b", Tt, "-"))
|
|
579
579
|
];
|
|
580
580
|
}),
|
|
581
|
-
enabled: d(({ row:
|
|
582
|
-
n(
|
|
583
|
-
"auth-function": () => s.canEdit(
|
|
581
|
+
enabled: d(({ row: t }) => [
|
|
582
|
+
n(o(ce), {
|
|
583
|
+
"auth-function": () => s.canEdit(t),
|
|
584
584
|
"force-show": ""
|
|
585
585
|
}, {
|
|
586
|
-
default: d(({ isAllowed:
|
|
586
|
+
default: d(({ isAllowed: r }) => [
|
|
587
587
|
E("div", {
|
|
588
588
|
onClick: v[3] || (v[3] = Ue(() => {
|
|
589
589
|
}, ["stop"]))
|
|
590
590
|
}, [
|
|
591
591
|
n(x, {
|
|
592
|
-
modelValue:
|
|
593
|
-
"onUpdate:modelValue": (y) =>
|
|
594
|
-
"data-testid": `row-${
|
|
595
|
-
disabled: !
|
|
596
|
-
onClick: Ue((y) => pe(
|
|
592
|
+
modelValue: t.enabled,
|
|
593
|
+
"onUpdate:modelValue": (y) => t.enabled = y,
|
|
594
|
+
"data-testid": `row-${t.id}-toggle-input`,
|
|
595
|
+
disabled: !r,
|
|
596
|
+
onClick: Ue((y) => pe(t), ["prevent"])
|
|
597
597
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
598
598
|
])
|
|
599
599
|
]),
|
|
600
600
|
_: 2
|
|
601
601
|
}, 1032, ["auth-function"])
|
|
602
602
|
]),
|
|
603
|
-
tags: d(({ rowValue:
|
|
604
|
-
n(
|
|
603
|
+
tags: d(({ rowValue: t }) => [
|
|
604
|
+
n(o(nt), { tags: t }, null, 8, ["tags"])
|
|
605
605
|
]),
|
|
606
|
-
created_at: d(({ rowValue:
|
|
607
|
-
U(h(
|
|
606
|
+
created_at: d(({ rowValue: t }) => [
|
|
607
|
+
U(h(o(m)(t)), 1)
|
|
608
608
|
]),
|
|
609
|
-
updated_at: d(({ row:
|
|
610
|
-
U(h(
|
|
609
|
+
updated_at: d(({ row: t, rowValue: r }) => [
|
|
610
|
+
U(h(o(m)(r ?? t.created_at)), 1)
|
|
611
611
|
]),
|
|
612
|
-
actions: d(({ row:
|
|
612
|
+
actions: d(({ row: t }) => [
|
|
613
613
|
n(re, null, {
|
|
614
|
-
default: d(({ copyToClipboard:
|
|
614
|
+
default: d(({ copyToClipboard: r }) => [
|
|
615
615
|
n(K, {
|
|
616
616
|
"data-testid": "action-entity-copy-id",
|
|
617
|
-
onClick: (y) => ge(
|
|
617
|
+
onClick: (y) => ge(t, r)
|
|
618
618
|
}, {
|
|
619
619
|
default: d(() => [
|
|
620
|
-
U(h(
|
|
620
|
+
U(h(o(a)("actions.copy_id")), 1)
|
|
621
621
|
]),
|
|
622
|
-
_:
|
|
623
|
-
},
|
|
622
|
+
_: 1
|
|
623
|
+
}, 8, ["onClick"])
|
|
624
624
|
]),
|
|
625
625
|
_: 2
|
|
626
626
|
}, 1024),
|
|
627
627
|
n(re, null, {
|
|
628
|
-
default: d(({ copyToClipboard:
|
|
628
|
+
default: d(({ copyToClipboard: r }) => [
|
|
629
629
|
n(K, {
|
|
630
630
|
"data-testid": "action-entity-copy-json",
|
|
631
|
-
onClick: (y) => ye(
|
|
631
|
+
onClick: (y) => ye(t, r)
|
|
632
632
|
}, {
|
|
633
633
|
default: d(() => [
|
|
634
|
-
U(h(
|
|
634
|
+
U(h(o(a)("actions.copy_json")), 1)
|
|
635
635
|
]),
|
|
636
|
-
_:
|
|
637
|
-
},
|
|
636
|
+
_: 1
|
|
637
|
+
}, 8, ["onClick"])
|
|
638
638
|
]),
|
|
639
639
|
_: 2
|
|
640
640
|
}, 1024),
|
|
641
|
-
n(
|
|
642
|
-
"auth-function": () => s.canRetrieve(
|
|
641
|
+
n(o(ce), {
|
|
642
|
+
"auth-function": () => s.canRetrieve(t)
|
|
643
643
|
}, {
|
|
644
644
|
default: d(() => [
|
|
645
645
|
n(K, {
|
|
646
646
|
"data-testid": "action-entity-view",
|
|
647
647
|
"has-divider": "",
|
|
648
|
-
item: he(
|
|
648
|
+
item: he(t.id)
|
|
649
649
|
}, null, 8, ["item"])
|
|
650
650
|
]),
|
|
651
651
|
_: 2
|
|
652
652
|
}, 1032, ["auth-function"]),
|
|
653
|
-
n(
|
|
654
|
-
"auth-function": () => s.canEdit(
|
|
653
|
+
n(o(ce), {
|
|
654
|
+
"auth-function": () => s.canEdit(t)
|
|
655
655
|
}, {
|
|
656
656
|
default: d(() => [
|
|
657
657
|
n(K, {
|
|
658
658
|
"data-testid": "action-entity-edit",
|
|
659
|
-
item: Pe(
|
|
659
|
+
item: Pe(t.id)
|
|
660
660
|
}, null, 8, ["item"])
|
|
661
661
|
]),
|
|
662
662
|
_: 2
|
|
663
663
|
}, 1032, ["auth-function"]),
|
|
664
|
-
n(
|
|
665
|
-
"auth-function": () => s.canDelete(
|
|
664
|
+
n(o(ce), {
|
|
665
|
+
"auth-function": () => s.canDelete(t)
|
|
666
666
|
}, {
|
|
667
667
|
default: d(() => [
|
|
668
668
|
n(K, {
|
|
669
669
|
danger: "",
|
|
670
670
|
"data-testid": "action-entity-delete",
|
|
671
671
|
"has-divider": "",
|
|
672
|
-
onClick: (
|
|
672
|
+
onClick: (r) => Fe(t)
|
|
673
673
|
}, {
|
|
674
674
|
default: d(() => [
|
|
675
|
-
U(h(
|
|
675
|
+
U(h(o(a)("actions.delete.menu_label")), 1)
|
|
676
676
|
]),
|
|
677
|
-
_:
|
|
678
|
-
},
|
|
677
|
+
_: 1
|
|
678
|
+
}, 8, ["onClick"])
|
|
679
679
|
]),
|
|
680
680
|
_: 2
|
|
681
681
|
}, 1032, ["auth-function"])
|
|
@@ -685,16 +685,16 @@ const X = {
|
|
|
685
685
|
!W.value && s.config.app === "konnect" ? {
|
|
686
686
|
name: "empty-state",
|
|
687
687
|
fn: d(() => {
|
|
688
|
-
var
|
|
688
|
+
var t;
|
|
689
689
|
return [
|
|
690
690
|
n(S, {
|
|
691
691
|
"data-testid": "gateway-services-entity-empty-state",
|
|
692
692
|
"icon-background": "",
|
|
693
|
-
message:
|
|
694
|
-
title:
|
|
693
|
+
message: o(a)("gateway_services.empty_state_v2.description"),
|
|
694
|
+
title: o(a)("gateway_services.empty_state_v2.title")
|
|
695
695
|
}, ke({
|
|
696
696
|
icon: d(() => [
|
|
697
|
-
n(
|
|
697
|
+
n(o(et), { decorative: "" })
|
|
698
698
|
]),
|
|
699
699
|
action: d(() => [
|
|
700
700
|
oe.value ? (C(), de(g, {
|
|
@@ -703,29 +703,29 @@ const X = {
|
|
|
703
703
|
onClick: Te
|
|
704
704
|
}, {
|
|
705
705
|
default: d(() => [
|
|
706
|
-
n(
|
|
707
|
-
U(" " + h(
|
|
706
|
+
n(o(Le), { decorative: "" }),
|
|
707
|
+
U(" " + h(o(a)("gateway_services.empty_state_v2.create")), 1)
|
|
708
708
|
]),
|
|
709
709
|
_: 1
|
|
710
710
|
})) : M("", !0),
|
|
711
711
|
n(g, {
|
|
712
712
|
appearance: "secondary",
|
|
713
713
|
"data-testid": "entity-learn-more-button",
|
|
714
|
-
onClick: v[2] || (v[2] = (
|
|
714
|
+
onClick: v[2] || (v[2] = (r) => u.$emit("click:learn-more"))
|
|
715
715
|
}, {
|
|
716
716
|
default: d(() => [
|
|
717
|
-
n(
|
|
718
|
-
U(" " + h(
|
|
717
|
+
n(o(Ke), { decorative: "" }),
|
|
718
|
+
U(" " + h(o(a)("gateway_services.empty_state_v2.learn_more")), 1)
|
|
719
719
|
]),
|
|
720
720
|
_: 1
|
|
721
721
|
})
|
|
722
722
|
]),
|
|
723
723
|
_: 2
|
|
724
724
|
}, [
|
|
725
|
-
(
|
|
725
|
+
(t = s.config) != null && t.isControlPlaneGroup ? {
|
|
726
726
|
name: "default",
|
|
727
727
|
fn: d(() => [
|
|
728
|
-
U(h(
|
|
728
|
+
U(h(o(a)("gateway_services.empty_state_v2.group")), 1)
|
|
729
729
|
]),
|
|
730
730
|
key: "0"
|
|
731
731
|
} : void 0
|
|
@@ -735,23 +735,23 @@ const X = {
|
|
|
735
735
|
key: "0"
|
|
736
736
|
} : void 0
|
|
737
737
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
738
|
-
n(
|
|
738
|
+
n(o(dt), {
|
|
739
739
|
action: te.value.action,
|
|
740
740
|
"entity-id": te.value.id,
|
|
741
741
|
"entity-name": te.value.name,
|
|
742
|
-
"entity-type":
|
|
742
|
+
"entity-type": o(a)("glossary.gateway_services"),
|
|
743
743
|
"on-confirm": Z,
|
|
744
744
|
visible: b.value,
|
|
745
745
|
onCancel: me,
|
|
746
746
|
onProceed: me
|
|
747
747
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
748
|
-
n(
|
|
748
|
+
n(o(ut), {
|
|
749
749
|
"action-pending": N.value,
|
|
750
|
-
description:
|
|
750
|
+
description: o(a)("actions.delete.description"),
|
|
751
751
|
"entity-name": T.value && (T.value.name || T.value.id),
|
|
752
|
-
"entity-type":
|
|
752
|
+
"entity-type": o(ft).GatewayService,
|
|
753
753
|
error: J.value,
|
|
754
|
-
title:
|
|
754
|
+
title: o(a)("actions.delete.title"),
|
|
755
755
|
visible: O.value,
|
|
756
756
|
onCancel: ne,
|
|
757
757
|
onProceed: Ae
|
|
@@ -852,11 +852,11 @@ const X = {
|
|
|
852
852
|
}
|
|
853
853
|
});
|
|
854
854
|
return (l, D) => (C(), A("div", $t, [
|
|
855
|
-
n(
|
|
855
|
+
n(o(mt), {
|
|
856
856
|
config: s.config,
|
|
857
857
|
"config-card-doc": s.configCardDoc,
|
|
858
858
|
"config-schema": G.value,
|
|
859
|
-
"entity-type":
|
|
859
|
+
"entity-type": o(je).GatewayService,
|
|
860
860
|
"fetch-url": a.value,
|
|
861
861
|
"hide-title": s.hideTitle,
|
|
862
862
|
"onFetch:error": D[0] || (D[0] = (P) => l.$emit("fetch:error", P)),
|
|
@@ -864,49 +864,49 @@ const X = {
|
|
|
864
864
|
onLoading: D[2] || (D[2] = (P) => l.$emit("loading", P))
|
|
865
865
|
}, {
|
|
866
866
|
"enabled-label-tooltip": d(() => [
|
|
867
|
-
n(
|
|
867
|
+
n(o(c), {
|
|
868
868
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
869
869
|
scope: "global"
|
|
870
870
|
}, {
|
|
871
871
|
false: d(() => [
|
|
872
|
-
E("code", null, h(
|
|
872
|
+
E("code", null, h(o(p)("gateway_services.form.fields.enabled.false")), 1)
|
|
873
873
|
]),
|
|
874
874
|
true: d(() => [
|
|
875
|
-
E("code", null, h(
|
|
875
|
+
E("code", null, h(o(p)("gateway_services.form.fields.enabled.true")), 1)
|
|
876
876
|
]),
|
|
877
877
|
_: 1
|
|
878
878
|
})
|
|
879
879
|
]),
|
|
880
880
|
"ca_certificates-label-tooltip": d(() => [
|
|
881
|
-
n(
|
|
881
|
+
n(o(c), {
|
|
882
882
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
883
883
|
scope: "global"
|
|
884
884
|
}, {
|
|
885
885
|
code1: d(() => [
|
|
886
|
-
E("code", null, h(
|
|
886
|
+
E("code", null, h(o(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
887
887
|
]),
|
|
888
888
|
code2: d(() => [
|
|
889
|
-
E("code", null, h(
|
|
889
|
+
E("code", null, h(o(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
890
890
|
]),
|
|
891
891
|
_: 1
|
|
892
892
|
})
|
|
893
893
|
]),
|
|
894
894
|
"tls_verify-label-tooltip": d(() => [
|
|
895
|
-
n(
|
|
895
|
+
n(o(c), {
|
|
896
896
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
897
897
|
scope: "global"
|
|
898
898
|
}, {
|
|
899
899
|
code1: d(() => [
|
|
900
|
-
E("code", null, h(
|
|
900
|
+
E("code", null, h(o(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
901
901
|
]),
|
|
902
902
|
_: 1
|
|
903
903
|
})
|
|
904
904
|
]),
|
|
905
905
|
tls_verify: d((P) => [
|
|
906
|
-
U(h(typeof
|
|
906
|
+
U(h(typeof o(m)("rowValue", P) == "boolean" ? F("rowValue", P) : o(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
907
907
|
]),
|
|
908
908
|
client_certificate: d((P) => [
|
|
909
|
-
U(h(
|
|
909
|
+
U(h(o(m)("rowValue", P) ? o(m)("rowValue", P).id : "–"), 1)
|
|
910
910
|
]),
|
|
911
911
|
_: 1
|
|
912
912
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -976,7 +976,7 @@ const X = {
|
|
|
976
976
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
977
977
|
setup(s, { expose: q, emit: p }) {
|
|
978
978
|
var re;
|
|
979
|
-
const c = p, a = s, m = $(!0), F = Ne(), { i18nT: G, i18n: { t: l } } = X.useI18n(), { getErrorFieldsFromError: D } = vt(), { axiosInstance: P } = We((re = a.config) == null ? void 0 : re.axiosRequestConfig), Ce = gt(), { validateHost: le, validatePath: ue, validatePort: fe, validateProtocol: Y } = X.useUrlValidators(), { objectsAreEqual: Se } = Oe(), W = k(() => Ve.form[a.config.app].edit), z = k(() => a.gatewayServiceId ? qe.Edit : qe.Create), Ee = $(!1), H = k(() => !!a.gatewayServiceId), V = $(H.value ? "protocol" : "url"), se = X.usePortFromProtocol(), ae = $(""), ee = k(() => !!ae.value || !!T("name")),
|
|
979
|
+
const c = p, a = s, m = $(!0), F = Ne(), { i18nT: G, i18n: { t: l } } = X.useI18n(), { getErrorFieldsFromError: D } = vt(), { axiosInstance: P } = We((re = a.config) == null ? void 0 : re.axiosRequestConfig), Ce = gt(), { validateHost: le, validatePath: ue, validatePort: fe, validateProtocol: Y } = X.useUrlValidators(), { objectsAreEqual: Se } = Oe(), W = k(() => Ve.form[a.config.app].edit), z = k(() => a.gatewayServiceId ? qe.Edit : qe.Create), Ee = $(!1), H = k(() => !!a.gatewayServiceId), V = $(H.value ? "protocol" : "url"), se = X.usePortFromProtocol(), ae = $(""), ee = k(() => !!ae.value || !!T("name")), e = De({
|
|
980
980
|
fields: {
|
|
981
981
|
name: "",
|
|
982
982
|
protocol: "http",
|
|
@@ -1089,213 +1089,213 @@ const X = {
|
|
|
1089
1089
|
value: "udp",
|
|
1090
1090
|
group: "udp"
|
|
1091
1091
|
}
|
|
1092
|
-
], pe = { url: "url", protocol: "protocol" }, me = (
|
|
1093
|
-
|
|
1094
|
-
}, Z = (
|
|
1095
|
-
|
|
1092
|
+
], pe = { url: "url", protocol: "protocol" }, me = (t) => {
|
|
1093
|
+
e.fields.protocol = t.value, e.fields.port = se.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
|
|
1094
|
+
}, Z = (t) => t ? parseFloat(t) : 0, ve = () => {
|
|
1095
|
+
e.fields.host = b.host, e.fields.path = b.path, e.fields.port = b.port, e.fields.protocol = b.protocol, e.fields.url = b.url, e.fields.retries = b.retries, e.fields.connect_timeout = b.connect_timeout, e.fields.write_timeout = b.write_timeout, e.fields.read_timeout = b.read_timeout, e.fields.client_certificate = b.client_certificate, e.fields.ca_certificates = b.ca_certificates, e.fields.tls_verify_enabled = b.tls_verify_enabled, e.fields.tls_verify_value = b.tls_verify_value, e.fields.enabled = b.enabled;
|
|
1096
1096
|
}, ge = () => {
|
|
1097
|
-
m.value = !0, N(),
|
|
1097
|
+
m.value = !0, N(), e.errorMessages = [], ve();
|
|
1098
1098
|
}, ye = () => {
|
|
1099
|
-
switch (ve(),
|
|
1099
|
+
switch (ve(), e.fields.name = `${L.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, V.value) {
|
|
1100
1100
|
case "url":
|
|
1101
|
-
|
|
1101
|
+
e.fields.url = `${L.protocol}://${L.host}${L.path}`;
|
|
1102
1102
|
break;
|
|
1103
1103
|
case "protocol":
|
|
1104
|
-
|
|
1104
|
+
e.fields.host = L.host, e.fields.path = L.path, e.fields.protocol = L.protocol, e.fields.port = L.port;
|
|
1105
1105
|
break;
|
|
1106
1106
|
default:
|
|
1107
|
-
|
|
1107
|
+
e.fields.url = `${L.protocol}://${L.host}${L.path}`;
|
|
1108
1108
|
}
|
|
1109
1109
|
}, _e = () => {
|
|
1110
|
-
if (N(),
|
|
1110
|
+
if (N(), e.fields.url.length)
|
|
1111
1111
|
try {
|
|
1112
|
-
const
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1115
|
-
const y = le(
|
|
1112
|
+
const t = new URL(e.fields.url), r = Y(t.protocol, te);
|
|
1113
|
+
if (r) throw new Error(r);
|
|
1114
|
+
e.fields.protocol = t.protocol.slice(0, -1);
|
|
1115
|
+
const y = le(t.hostname);
|
|
1116
1116
|
if (y) throw new Error(y);
|
|
1117
|
-
|
|
1118
|
-
const I = ue(
|
|
1117
|
+
e.fields.host = t.hostname;
|
|
1118
|
+
const I = ue(t.pathname);
|
|
1119
1119
|
if (I) throw new Error(I);
|
|
1120
|
-
|
|
1121
|
-
const _ = fe(
|
|
1120
|
+
e.fields.path = t.pathname;
|
|
1121
|
+
const _ = fe(t.port);
|
|
1122
1122
|
if (_) throw new Error(_);
|
|
1123
|
-
const w = Number(
|
|
1124
|
-
Ee.value = !!w,
|
|
1123
|
+
const w = Number(t.port);
|
|
1124
|
+
Ee.value = !!w, e.fields.port = w || se.getPortFromProtocol(e.fields.protocol), c("url-valid:success");
|
|
1125
1125
|
} catch {
|
|
1126
|
-
c("url-valid:error", l("gateway_services.form.errors.url.invalid")),
|
|
1126
|
+
c("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
|
|
1127
1127
|
}
|
|
1128
|
-
}, he = (
|
|
1129
|
-
N(
|
|
1130
|
-
}, Pe = k(() => !!
|
|
1131
|
-
if (
|
|
1132
|
-
const
|
|
1133
|
-
return
|
|
1134
|
-
}, O = (
|
|
1135
|
-
N(
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
const y = ue(
|
|
1139
|
-
y && (
|
|
1140
|
-
const I = fe(
|
|
1141
|
-
I && (
|
|
1142
|
-
}, N = (
|
|
1143
|
-
if (
|
|
1144
|
-
|
|
1128
|
+
}, he = (t) => {
|
|
1129
|
+
N(t);
|
|
1130
|
+
}, Pe = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), T = (t) => {
|
|
1131
|
+
if (e.errorMessages.length) return "";
|
|
1132
|
+
const r = e.formFieldErrors;
|
|
1133
|
+
return r[t] ? r[t] : "";
|
|
1134
|
+
}, O = (t) => {
|
|
1135
|
+
N(t ?? void 0);
|
|
1136
|
+
const r = le(e.fields.host);
|
|
1137
|
+
r && (e.formFieldErrors.host = r);
|
|
1138
|
+
const y = ue(e.fields.path);
|
|
1139
|
+
y && (e.formFieldErrors.path = y);
|
|
1140
|
+
const I = fe(e.fields.port);
|
|
1141
|
+
I && (e.formFieldErrors.port = I), J.value ? c("url-valid:success") : c("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
|
|
1142
|
+
}, N = (t) => {
|
|
1143
|
+
if (t)
|
|
1144
|
+
e.formFieldErrors[t] = "";
|
|
1145
1145
|
else
|
|
1146
|
-
for (let
|
|
1147
|
-
|
|
1148
|
-
|
|
1146
|
+
for (let r in e.formFieldErrors)
|
|
1147
|
+
e.formFieldErrors[r] = "";
|
|
1148
|
+
e.errorMessages = [];
|
|
1149
1149
|
}, J = k(() => {
|
|
1150
|
-
for (let
|
|
1151
|
-
if (
|
|
1150
|
+
for (let t in e.formFieldErrors)
|
|
1151
|
+
if (e.formFieldErrors[t].length)
|
|
1152
1152
|
return !1;
|
|
1153
1153
|
return !0;
|
|
1154
1154
|
}), Ie = () => {
|
|
1155
|
-
|
|
1156
|
-
}, Fe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, ne = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(
|
|
1155
|
+
e.fields.url && V.value === "url" ? _e() : O();
|
|
1156
|
+
}, Fe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, ne = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), Ae = k(() => {
|
|
1157
1157
|
if (V.value === "url")
|
|
1158
1158
|
return !0;
|
|
1159
|
-
const
|
|
1160
|
-
return V.value === "protocol" &&
|
|
1159
|
+
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1160
|
+
return V.value === "protocol" && t;
|
|
1161
1161
|
}), Te = k(() => {
|
|
1162
1162
|
if (V.value === "url")
|
|
1163
1163
|
return !0;
|
|
1164
|
-
const
|
|
1165
|
-
return V.value === "protocol" &&
|
|
1164
|
+
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
1165
|
+
return V.value === "protocol" && t;
|
|
1166
1166
|
}), oe = k(() => {
|
|
1167
1167
|
if (V.value === "url")
|
|
1168
1168
|
return !0;
|
|
1169
|
-
const
|
|
1170
|
-
return V.value === "protocol" &&
|
|
1171
|
-
}), be = (
|
|
1172
|
-
N("name"), ae.value = Ce.utf8Name(
|
|
1173
|
-
},
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1176
|
-
}), v = (
|
|
1177
|
-
var
|
|
1178
|
-
|
|
1169
|
+
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1170
|
+
return V.value === "protocol" && t;
|
|
1171
|
+
}), be = (t) => {
|
|
1172
|
+
N("name"), ae.value = Ce.utf8Name(t);
|
|
1173
|
+
}, u = k(() => {
|
|
1174
|
+
const t = !H.value || !Se(e.fields, b), r = V.value === "url" && !!e.fields.url && J.value, y = V.value === "protocol" && !!e.fields.host && J.value;
|
|
1175
|
+
return t && (r || y);
|
|
1176
|
+
}), v = (t) => {
|
|
1177
|
+
var r, y, I;
|
|
1178
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((r = t == null ? void 0 : t.tags) == null ? void 0 : r.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 = ((y = t == null ? void 0 : t.ca_certificates) == null ? void 0 : y.join(",")) || "", e.fields.client_certificate = ((I = t == null ? void 0 : t.client_certificate) == null ? void 0 : I.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(b, e.fields);
|
|
1179
1179
|
}, g = () => {
|
|
1180
1180
|
F.push(a.config.cancelRoute);
|
|
1181
1181
|
}, S = k(() => {
|
|
1182
|
-
var
|
|
1183
|
-
let
|
|
1184
|
-
return a.config.app === "konnect" ?
|
|
1185
|
-
}), j = (
|
|
1186
|
-
let
|
|
1187
|
-
|
|
1182
|
+
var r, y;
|
|
1183
|
+
let t = `${a.config.apiBaseUrl}${Ve.form[a.config.app][z.value]}`;
|
|
1184
|
+
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((r = a.config) == null ? void 0 : r.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (y = a.config) != null && y.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1185
|
+
}), j = (t) => {
|
|
1186
|
+
let r = "";
|
|
1187
|
+
t.url && (r = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(r)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
1188
1188
|
}, x = k(() => {
|
|
1189
|
-
var
|
|
1190
|
-
const
|
|
1191
|
-
name:
|
|
1192
|
-
tags:
|
|
1193
|
-
protocol:
|
|
1194
|
-
path:
|
|
1195
|
-
read_timeout:
|
|
1196
|
-
retries:
|
|
1197
|
-
host:
|
|
1198
|
-
connect_timeout:
|
|
1199
|
-
tls_verify_value:
|
|
1200
|
-
tls_verify_enabled:
|
|
1201
|
-
ca_certificates:
|
|
1202
|
-
client_certificate:
|
|
1203
|
-
write_timeout:
|
|
1204
|
-
port:
|
|
1205
|
-
url:
|
|
1206
|
-
enabled:
|
|
1189
|
+
var r, y, I, _;
|
|
1190
|
+
const t = {
|
|
1191
|
+
name: e.fields.name || null,
|
|
1192
|
+
tags: e.fields.tags ? (I = (y = (r = e.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : y.map((w) => String(w || "").trim())) == null ? void 0 : I.filter((w) => w !== "") : null,
|
|
1193
|
+
protocol: e.fields.protocol,
|
|
1194
|
+
path: e.fields.path || null,
|
|
1195
|
+
read_timeout: e.fields.read_timeout,
|
|
1196
|
+
retries: e.fields.retries,
|
|
1197
|
+
host: e.fields.host,
|
|
1198
|
+
connect_timeout: e.fields.connect_timeout,
|
|
1199
|
+
tls_verify_value: e.fields.tls_verify_value,
|
|
1200
|
+
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
1201
|
+
ca_certificates: e.fields.ca_certificates ? (_ = e.fields.ca_certificates) == null ? void 0 : _.split(",").filter((w) => w !== "") : null,
|
|
1202
|
+
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1203
|
+
write_timeout: e.fields.write_timeout,
|
|
1204
|
+
port: e.fields.port,
|
|
1205
|
+
url: e.fields.url,
|
|
1206
|
+
enabled: e.fields.enabled
|
|
1207
1207
|
};
|
|
1208
|
-
return
|
|
1208
|
+
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), ne.value || (t.path = null), z.value === "create" ? V.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : z.value === "edit" && delete t.url, t;
|
|
1209
1209
|
}), K = async () => {
|
|
1210
|
-
var
|
|
1210
|
+
var t, r, y, I;
|
|
1211
1211
|
try {
|
|
1212
|
-
|
|
1212
|
+
e.isReadonly = !0;
|
|
1213
1213
|
const _ = x.value;
|
|
1214
1214
|
j(_);
|
|
1215
1215
|
let w;
|
|
1216
|
-
if (z.value === "create" ? w = await P.post(S.value, _) : z.value === "edit" && (w = ((
|
|
1216
|
+
if (z.value === "create" ? w = await P.post(S.value, _) : z.value === "edit" && (w = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await P.put(S.value, _) : await P.patch(S.value, _)), w) {
|
|
1217
1217
|
const { data: i } = w;
|
|
1218
|
-
|
|
1218
|
+
e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || se.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 = ((r = i == null ? void 0 : i.client_certificate) == null ? void 0 : r.id) || "", e.fields.ca_certificates = (y = i == null ? void 0 : i.ca_certificates) != null && y.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 = (I = i == null ? void 0 : i.tags) != null && I.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(b, e.fields), c("update", w == null ? void 0 : w.data);
|
|
1219
1219
|
}
|
|
1220
1220
|
return w;
|
|
1221
1221
|
} catch (_) {
|
|
1222
1222
|
const { fields: w, messages: i } = D(_);
|
|
1223
|
-
|
|
1223
|
+
e.errorMessages = i, w.length && w.forEach((Q) => {
|
|
1224
1224
|
const ie = Q.field;
|
|
1225
|
-
ie === "client_certificate.id" ?
|
|
1226
|
-
...
|
|
1225
|
+
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 = {
|
|
1226
|
+
...e.formFieldErrors,
|
|
1227
1227
|
[ie]: Q.message
|
|
1228
1228
|
});
|
|
1229
1229
|
}), c("error", _);
|
|
1230
1230
|
} finally {
|
|
1231
|
-
|
|
1231
|
+
e.isReadonly = !1;
|
|
1232
1232
|
}
|
|
1233
1233
|
};
|
|
1234
1234
|
return Me(() => a.gatewayServiceId, () => {
|
|
1235
|
-
Object.assign(
|
|
1236
|
-
}), Me(
|
|
1237
|
-
|
|
1235
|
+
Object.assign(e.fields, b);
|
|
1236
|
+
}), Me(e.fields, () => {
|
|
1237
|
+
c("model-updated", x.value);
|
|
1238
1238
|
}), Je(() => {
|
|
1239
|
-
c("model-updated", x.value), H.value || (
|
|
1239
|
+
c("model-updated", x.value), H.value || (e.fields.name = Fe());
|
|
1240
1240
|
}), q({
|
|
1241
1241
|
validateUrl: Ie,
|
|
1242
1242
|
getPayload: x,
|
|
1243
1243
|
saveFormData: K,
|
|
1244
|
-
canSubmit:
|
|
1244
|
+
canSubmit: u,
|
|
1245
1245
|
initForm: v
|
|
1246
|
-
}), (
|
|
1246
|
+
}), (t, r) => {
|
|
1247
1247
|
const y = B("KRadio"), I = B("KButton"), _ = B("KInput"), w = B("KSelect"), i = B("KCheckbox"), Q = B("KCollapse"), ie = B("KAlert");
|
|
1248
1248
|
return C(), A("div", Rt, [
|
|
1249
|
-
n(
|
|
1250
|
-
"can-submit":
|
|
1249
|
+
n(o(_t), {
|
|
1250
|
+
"can-submit": u.value,
|
|
1251
1251
|
config: s.config,
|
|
1252
1252
|
"edit-id": s.gatewayServiceId,
|
|
1253
|
-
"entity-type":
|
|
1253
|
+
"entity-type": o(je).GatewayService,
|
|
1254
1254
|
"fetch-url": W.value,
|
|
1255
1255
|
"form-fields": x.value,
|
|
1256
|
-
"is-readonly":
|
|
1256
|
+
"is-readonly": e.isReadonly,
|
|
1257
1257
|
onCancel: g,
|
|
1258
|
-
"onFetch:error":
|
|
1258
|
+
"onFetch:error": r[30] || (r[30] = (f) => t.$emit("error", f)),
|
|
1259
1259
|
"onFetch:success": v,
|
|
1260
|
-
onLoading:
|
|
1260
|
+
onLoading: r[31] || (r[31] = (f) => t.$emit("loading", f)),
|
|
1261
1261
|
onSubmit: K
|
|
1262
1262
|
}, {
|
|
1263
1263
|
"form-actions": d(() => [
|
|
1264
|
-
Ye(
|
|
1265
|
-
canSubmit:
|
|
1264
|
+
Ye(t.$slots, "form-actions", {
|
|
1265
|
+
canSubmit: u.value,
|
|
1266
1266
|
cancel: g,
|
|
1267
1267
|
submit: K
|
|
1268
1268
|
}, void 0, !0)
|
|
1269
1269
|
]),
|
|
1270
1270
|
default: d(() => [
|
|
1271
|
-
n(
|
|
1272
|
-
description:
|
|
1271
|
+
n(o(Ge), {
|
|
1272
|
+
description: o(l)("gateway_services.form.sections.keys.description"),
|
|
1273
1273
|
"hide-info-header": s.hideSectionsInfo,
|
|
1274
|
-
title:
|
|
1274
|
+
title: o(l)("gateway_services.form.sections.keys.title")
|
|
1275
1275
|
}, {
|
|
1276
1276
|
default: d(() => [
|
|
1277
1277
|
H.value ? M("", !0) : (C(), A("div", xt, [
|
|
1278
1278
|
E("div", Mt, [
|
|
1279
1279
|
n(y, {
|
|
1280
1280
|
modelValue: V.value,
|
|
1281
|
-
"onUpdate:modelValue":
|
|
1281
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => V.value = f),
|
|
1282
1282
|
card: "",
|
|
1283
1283
|
"card-orientation": "horizontal",
|
|
1284
1284
|
"data-testid": "gateway-service-url-radio",
|
|
1285
|
-
description:
|
|
1286
|
-
label:
|
|
1285
|
+
description: o(l)("gateway_services.form.sections.keys.url.description"),
|
|
1286
|
+
label: o(l)("gateway_services.form.sections.keys.url.label"),
|
|
1287
1287
|
"selected-value": pe.url,
|
|
1288
1288
|
onChange: ge
|
|
1289
1289
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1290
1290
|
n(y, {
|
|
1291
1291
|
modelValue: V.value,
|
|
1292
|
-
"onUpdate:modelValue":
|
|
1292
|
+
"onUpdate:modelValue": r[1] || (r[1] = (f) => V.value = f),
|
|
1293
1293
|
card: "",
|
|
1294
1294
|
"card-orientation": "horizontal",
|
|
1295
1295
|
"checked-group": "protocol",
|
|
1296
1296
|
"data-testid": "gateway-service-protocol-radio",
|
|
1297
|
-
description:
|
|
1298
|
-
label:
|
|
1297
|
+
description: o(l)("gateway_services.form.sections.keys.protocol.description"),
|
|
1298
|
+
label: o(l)("gateway_services.form.sections.keys.protocol.label"),
|
|
1299
1299
|
"selected-value": pe.protocol,
|
|
1300
1300
|
onChange: ge
|
|
1301
1301
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
@@ -1304,20 +1304,20 @@ const X = {
|
|
|
1304
1304
|
default: d(() => [
|
|
1305
1305
|
V.value === "url" ? (C(), A("div", Bt, [
|
|
1306
1306
|
n(_, {
|
|
1307
|
-
modelValue:
|
|
1308
|
-
"onUpdate:modelValue":
|
|
1307
|
+
modelValue: e.fields.url,
|
|
1308
|
+
"onUpdate:modelValue": r[2] || (r[2] = (f) => e.fields.url = f),
|
|
1309
1309
|
modelModifiers: { trim: !0 },
|
|
1310
1310
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1311
1311
|
"data-testid": "gateway-service-url-input",
|
|
1312
1312
|
error: Pe.value,
|
|
1313
1313
|
"error-message": T("url"),
|
|
1314
|
-
label:
|
|
1314
|
+
label: o(l)("gateway_services.form.fields.upstream_url.label"),
|
|
1315
1315
|
"label-attributes": {
|
|
1316
|
-
info: s.config.app === "konnect" ?
|
|
1316
|
+
info: s.config.app === "konnect" ? o(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1317
1317
|
tooltipAttributes: { maxWidth: "400" }
|
|
1318
1318
|
},
|
|
1319
1319
|
name: "url",
|
|
1320
|
-
placeholder:
|
|
1320
|
+
placeholder: o(l)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1321
1321
|
required: "",
|
|
1322
1322
|
onInput: _e
|
|
1323
1323
|
}, ke({ _: 2 }, [
|
|
@@ -1331,7 +1331,7 @@ const X = {
|
|
|
1331
1331
|
onClick: ye
|
|
1332
1332
|
}, {
|
|
1333
1333
|
default: d(() => [
|
|
1334
|
-
U(h(
|
|
1334
|
+
U(h(o(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
1335
1335
|
]),
|
|
1336
1336
|
_: 1
|
|
1337
1337
|
})
|
|
@@ -1348,37 +1348,37 @@ const X = {
|
|
|
1348
1348
|
default: d(() => [
|
|
1349
1349
|
V.value === "protocol" || H.value ? (C(), A("div", Dt, [
|
|
1350
1350
|
n(w, {
|
|
1351
|
-
modelValue:
|
|
1352
|
-
"onUpdate:modelValue":
|
|
1351
|
+
modelValue: e.fields.protocol,
|
|
1352
|
+
"onUpdate:modelValue": r[3] || (r[3] = (f) => e.fields.protocol = f),
|
|
1353
1353
|
"data-testid": "gateway-service-protocol-select",
|
|
1354
1354
|
items: te,
|
|
1355
|
-
label:
|
|
1355
|
+
label: o(l)("gateway_services.form.fields.protocol.label"),
|
|
1356
1356
|
"label-attributes": {
|
|
1357
|
-
info:
|
|
1357
|
+
info: o(l)("gateway_services.form.fields.protocol.tooltip"),
|
|
1358
1358
|
tooltipAttributes: { maxWidth: "400" }
|
|
1359
1359
|
},
|
|
1360
|
-
readonly:
|
|
1360
|
+
readonly: e.isReadonly,
|
|
1361
1361
|
required: "",
|
|
1362
1362
|
width: "100%",
|
|
1363
|
-
onSelected:
|
|
1363
|
+
onSelected: me
|
|
1364
1364
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1365
1365
|
n(_, {
|
|
1366
|
-
modelValue:
|
|
1367
|
-
"onUpdate:modelValue":
|
|
1366
|
+
modelValue: e.fields.host,
|
|
1367
|
+
"onUpdate:modelValue": r[4] || (r[4] = (f) => e.fields.host = f),
|
|
1368
1368
|
modelModifiers: { trim: !0 },
|
|
1369
1369
|
class: "gateway-service-form-margin-top",
|
|
1370
1370
|
"data-testid": "gateway-service-host-input",
|
|
1371
|
-
error: !!
|
|
1371
|
+
error: !!e.formFieldErrors.host,
|
|
1372
1372
|
"error-message": T("host"),
|
|
1373
|
-
label:
|
|
1373
|
+
label: o(l)("gateway_services.form.fields.host.label"),
|
|
1374
1374
|
"label-attributes": {
|
|
1375
|
-
info:
|
|
1375
|
+
info: o(l)("gateway_services.form.fields.host.tooltip"),
|
|
1376
1376
|
tooltipAttributes: { maxWidth: "400" }
|
|
1377
1377
|
},
|
|
1378
1378
|
name: "host",
|
|
1379
|
-
placeholder:
|
|
1379
|
+
placeholder: o(l)("gateway_services.form.fields.host.placeholder"),
|
|
1380
1380
|
required: "",
|
|
1381
|
-
onInput:
|
|
1381
|
+
onInput: r[5] || (r[5] = (f) => O("host"))
|
|
1382
1382
|
}, ke({ _: 2 }, [
|
|
1383
1383
|
s.hideTrySampleApiButton ? void 0 : {
|
|
1384
1384
|
name: "after",
|
|
@@ -1389,7 +1389,7 @@ const X = {
|
|
|
1389
1389
|
onClick: ye
|
|
1390
1390
|
}, {
|
|
1391
1391
|
default: d(() => [
|
|
1392
|
-
U(h(
|
|
1392
|
+
U(h(o(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
1393
1393
|
]),
|
|
1394
1394
|
_: 1
|
|
1395
1395
|
})
|
|
@@ -1399,43 +1399,43 @@ const X = {
|
|
|
1399
1399
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
1400
1400
|
ne.value ? (C(), A("div", Kt, [
|
|
1401
1401
|
n(_, {
|
|
1402
|
-
modelValue:
|
|
1403
|
-
"onUpdate:modelValue":
|
|
1402
|
+
modelValue: e.fields.path,
|
|
1403
|
+
"onUpdate:modelValue": r[6] || (r[6] = (f) => e.fields.path = f),
|
|
1404
1404
|
modelModifiers: { trim: !0 },
|
|
1405
1405
|
class: "gateway-service-form-margin-top",
|
|
1406
1406
|
"data-testid": "gateway-service-path-input",
|
|
1407
|
-
error: !!
|
|
1407
|
+
error: !!e.formFieldErrors.path,
|
|
1408
1408
|
"error-message": T("path"),
|
|
1409
|
-
label:
|
|
1409
|
+
label: o(l)("gateway_services.form.fields.path.label"),
|
|
1410
1410
|
"label-attributes": {
|
|
1411
|
-
info:
|
|
1411
|
+
info: o(l)("gateway_services.form.fields.path.tooltip"),
|
|
1412
1412
|
tooltipAttributes: { maxWidth: "400" }
|
|
1413
1413
|
},
|
|
1414
1414
|
name: "path",
|
|
1415
|
-
placeholder:
|
|
1416
|
-
onInput:
|
|
1415
|
+
placeholder: o(l)("gateway_services.form.fields.path.placeholder"),
|
|
1416
|
+
onInput: r[7] || (r[7] = (f) => O("path"))
|
|
1417
1417
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
1418
1418
|
])) : M("", !0),
|
|
1419
1419
|
n(_, {
|
|
1420
|
-
modelValue:
|
|
1420
|
+
modelValue: e.fields.port,
|
|
1421
1421
|
"onUpdate:modelValue": [
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1422
|
+
r[8] || (r[8] = (f) => e.fields.port = f),
|
|
1423
|
+
r[10] || (r[10] = () => {
|
|
1424
|
+
e.fields.port = Z(e.fields.port + "");
|
|
1425
1425
|
})
|
|
1426
1426
|
],
|
|
1427
1427
|
class: "gateway-service-form-margin-top",
|
|
1428
1428
|
"data-testid": "gateway-service-port-input",
|
|
1429
|
-
error: !!
|
|
1429
|
+
error: !!e.formFieldErrors.port,
|
|
1430
1430
|
"error-message": T("port"),
|
|
1431
|
-
label:
|
|
1431
|
+
label: o(l)("gateway_services.form.fields.port.label"),
|
|
1432
1432
|
"label-attributes": {
|
|
1433
|
-
info:
|
|
1433
|
+
info: o(l)("gateway_services.form.fields.port.tooltip"),
|
|
1434
1434
|
tooltipAttributes: { maxWidth: "400" }
|
|
1435
1435
|
},
|
|
1436
1436
|
name: "port",
|
|
1437
1437
|
type: "number",
|
|
1438
|
-
onInput:
|
|
1438
|
+
onInput: r[9] || (r[9] = (f) => O("port"))
|
|
1439
1439
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
1440
1440
|
])) : M("", !0)
|
|
1441
1441
|
]),
|
|
@@ -1443,10 +1443,10 @@ const X = {
|
|
|
1443
1443
|
}),
|
|
1444
1444
|
n(Q, {
|
|
1445
1445
|
modelValue: m.value,
|
|
1446
|
-
"onUpdate:modelValue":
|
|
1446
|
+
"onUpdate:modelValue": r[26] || (r[26] = (f) => m.value = f),
|
|
1447
1447
|
"data-testid": "advanced-fields-collapse",
|
|
1448
1448
|
"trigger-alignment": "leading",
|
|
1449
|
-
"trigger-label":
|
|
1449
|
+
"trigger-label": o(l)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1450
1450
|
}, {
|
|
1451
1451
|
default: d(() => [
|
|
1452
1452
|
n($e, { name: "slide-fade" }, {
|
|
@@ -1454,133 +1454,133 @@ const X = {
|
|
|
1454
1454
|
m.value ? M("", !0) : (C(), A("div", Lt, [
|
|
1455
1455
|
E("div", qt, [
|
|
1456
1456
|
n(_, {
|
|
1457
|
-
modelValue:
|
|
1457
|
+
modelValue: e.fields.retries,
|
|
1458
1458
|
"onUpdate:modelValue": [
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1459
|
+
r[11] || (r[11] = (f) => e.fields.retries = f),
|
|
1460
|
+
r[12] || (r[12] = () => {
|
|
1461
|
+
e.fields.retries = Z(e.fields.retries + "");
|
|
1462
1462
|
})
|
|
1463
1463
|
],
|
|
1464
1464
|
autocomplete: "off",
|
|
1465
1465
|
"data-testid": "gateway-service-retries-input",
|
|
1466
|
-
label:
|
|
1466
|
+
label: o(l)("gateway_services.form.fields.retries.label"),
|
|
1467
1467
|
"label-attributes": {
|
|
1468
|
-
info:
|
|
1468
|
+
info: o(l)("gateway_services.form.fields.retries.tooltip"),
|
|
1469
1469
|
tooltipAttributes: { maxWidth: "400" }
|
|
1470
1470
|
},
|
|
1471
1471
|
name: "retries",
|
|
1472
|
-
readonly:
|
|
1472
|
+
readonly: e.isReadonly,
|
|
1473
1473
|
type: "number"
|
|
1474
1474
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1475
1475
|
]),
|
|
1476
1476
|
E("div", Gt, [
|
|
1477
1477
|
n(_, {
|
|
1478
|
-
modelValue:
|
|
1478
|
+
modelValue: e.fields.connect_timeout,
|
|
1479
1479
|
"onUpdate:modelValue": [
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1480
|
+
r[13] || (r[13] = (f) => e.fields.connect_timeout = f),
|
|
1481
|
+
r[14] || (r[14] = () => {
|
|
1482
|
+
e.fields.connect_timeout = Z(e.fields.connect_timeout + "");
|
|
1483
1483
|
})
|
|
1484
1484
|
],
|
|
1485
1485
|
autocomplete: "off",
|
|
1486
1486
|
"data-testid": "gateway-service-connTimeout-input",
|
|
1487
|
-
label:
|
|
1487
|
+
label: o(l)("gateway_services.form.fields.connect_timeout.label"),
|
|
1488
1488
|
"label-attributes": {
|
|
1489
|
-
info:
|
|
1489
|
+
info: o(l)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
1490
1490
|
tooltipAttributes: { maxWidth: "400" }
|
|
1491
1491
|
},
|
|
1492
1492
|
name: "connTimeout",
|
|
1493
|
-
readonly:
|
|
1493
|
+
readonly: e.isReadonly,
|
|
1494
1494
|
type: "number"
|
|
1495
1495
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1496
1496
|
]),
|
|
1497
1497
|
E("div", Nt, [
|
|
1498
1498
|
n(_, {
|
|
1499
|
-
modelValue:
|
|
1499
|
+
modelValue: e.fields.write_timeout,
|
|
1500
1500
|
"onUpdate:modelValue": [
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1501
|
+
r[15] || (r[15] = (f) => e.fields.write_timeout = f),
|
|
1502
|
+
r[16] || (r[16] = () => {
|
|
1503
|
+
e.fields.write_timeout = Z(e.fields.write_timeout + "");
|
|
1504
1504
|
})
|
|
1505
1505
|
],
|
|
1506
1506
|
autocomplete: "off",
|
|
1507
1507
|
"data-testid": "gateway-service-writeTimeout-input",
|
|
1508
|
-
label:
|
|
1508
|
+
label: o(l)("gateway_services.form.fields.write_timeout.label"),
|
|
1509
1509
|
"label-attributes": {
|
|
1510
|
-
info:
|
|
1510
|
+
info: o(l)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
1511
1511
|
tooltipAttributes: { maxWidth: "400" }
|
|
1512
1512
|
},
|
|
1513
1513
|
name: "writeTimeout",
|
|
1514
|
-
readonly:
|
|
1514
|
+
readonly: e.isReadonly,
|
|
1515
1515
|
type: "number"
|
|
1516
1516
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1517
1517
|
]),
|
|
1518
1518
|
E("div", Wt, [
|
|
1519
1519
|
n(_, {
|
|
1520
|
-
modelValue:
|
|
1520
|
+
modelValue: e.fields.read_timeout,
|
|
1521
1521
|
"onUpdate:modelValue": [
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1522
|
+
r[17] || (r[17] = (f) => e.fields.read_timeout = f),
|
|
1523
|
+
r[18] || (r[18] = () => {
|
|
1524
|
+
e.fields.read_timeout = Z(e.fields.read_timeout + "");
|
|
1525
1525
|
})
|
|
1526
1526
|
],
|
|
1527
1527
|
autocomplete: "off",
|
|
1528
1528
|
"data-testid": "gateway-service-readTimeout-input",
|
|
1529
|
-
label:
|
|
1529
|
+
label: o(l)("gateway_services.form.fields.read_timeout.label"),
|
|
1530
1530
|
"label-attributes": {
|
|
1531
|
-
info:
|
|
1531
|
+
info: o(l)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
1532
1532
|
tooltipAttributes: { maxWidth: "400" }
|
|
1533
1533
|
},
|
|
1534
1534
|
name: "readTimeout",
|
|
1535
|
-
readonly:
|
|
1535
|
+
readonly: e.isReadonly,
|
|
1536
1536
|
type: "number"
|
|
1537
1537
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1538
1538
|
]),
|
|
1539
1539
|
Ae.value ? (C(), A("div", Ot, [
|
|
1540
1540
|
n(_, {
|
|
1541
|
-
modelValue:
|
|
1542
|
-
"onUpdate:modelValue":
|
|
1541
|
+
modelValue: e.fields.client_certificate,
|
|
1542
|
+
"onUpdate:modelValue": r[19] || (r[19] = (f) => e.fields.client_certificate = f),
|
|
1543
1543
|
modelModifiers: { trim: !0 },
|
|
1544
1544
|
autocomplete: "off",
|
|
1545
1545
|
"data-testid": "gateway-service-clientCert-input",
|
|
1546
|
-
error: !!
|
|
1547
|
-
label:
|
|
1546
|
+
error: !!e.formFieldErrors.client_certificate,
|
|
1547
|
+
label: o(l)("gateway_services.form.fields.client_certificate.label"),
|
|
1548
1548
|
"label-attributes": {
|
|
1549
|
-
info:
|
|
1549
|
+
info: o(l)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1550
1550
|
tooltipAttributes: { maxWidth: "400" }
|
|
1551
1551
|
},
|
|
1552
1552
|
name: "clientCert",
|
|
1553
|
-
placeholder:
|
|
1554
|
-
readonly:
|
|
1553
|
+
placeholder: o(l)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
1554
|
+
readonly: e.isReadonly,
|
|
1555
1555
|
type: "text",
|
|
1556
|
-
onInput:
|
|
1556
|
+
onInput: r[20] || (r[20] = (f) => he("client_certificate"))
|
|
1557
1557
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
1558
1558
|
])) : M("", !0),
|
|
1559
1559
|
Te.value ? (C(), A("div", jt, [
|
|
1560
1560
|
n(_, {
|
|
1561
|
-
modelValue:
|
|
1562
|
-
"onUpdate:modelValue":
|
|
1561
|
+
modelValue: e.fields.ca_certificates,
|
|
1562
|
+
"onUpdate:modelValue": r[21] || (r[21] = (f) => e.fields.ca_certificates = f),
|
|
1563
1563
|
modelModifiers: { trim: !0 },
|
|
1564
1564
|
autocomplete: "off",
|
|
1565
1565
|
"data-testid": "gateway-service-ca-certs-input",
|
|
1566
|
-
error: !!
|
|
1567
|
-
label:
|
|
1566
|
+
error: !!e.formFieldErrors.ca_certificates,
|
|
1567
|
+
label: o(l)("gateway_services.form.fields.ca_certificates.label"),
|
|
1568
1568
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1569
|
-
placeholder:
|
|
1570
|
-
readonly:
|
|
1569
|
+
placeholder: o(l)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
1570
|
+
readonly: e.isReadonly,
|
|
1571
1571
|
type: "text",
|
|
1572
|
-
onInput:
|
|
1572
|
+
onInput: r[22] || (r[22] = (f) => he("ca_certificates"))
|
|
1573
1573
|
}, {
|
|
1574
1574
|
"label-tooltip": d(() => [
|
|
1575
|
-
n(
|
|
1575
|
+
n(o(G), {
|
|
1576
1576
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1577
1577
|
scope: "global"
|
|
1578
1578
|
}, {
|
|
1579
1579
|
code1: d(() => [
|
|
1580
|
-
E("code", null, h(
|
|
1580
|
+
E("code", null, h(o(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1581
1581
|
]),
|
|
1582
1582
|
code2: d(() => [
|
|
1583
|
-
E("code", null, h(
|
|
1583
|
+
E("code", null, h(o(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1584
1584
|
]),
|
|
1585
1585
|
_: 1
|
|
1586
1586
|
})
|
|
@@ -1590,41 +1590,41 @@ const X = {
|
|
|
1590
1590
|
])) : M("", !0),
|
|
1591
1591
|
oe.value ? (C(), A("div", zt, [
|
|
1592
1592
|
n(i, {
|
|
1593
|
-
modelValue:
|
|
1594
|
-
"onUpdate:modelValue":
|
|
1593
|
+
modelValue: e.fields.tls_verify_enabled,
|
|
1594
|
+
"onUpdate:modelValue": r[23] || (r[23] = (f) => e.fields.tls_verify_enabled = f),
|
|
1595
1595
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1596
|
-
description:
|
|
1597
|
-
label:
|
|
1596
|
+
description: o(l)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1597
|
+
label: o(l)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1598
1598
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1599
1599
|
}, {
|
|
1600
1600
|
tooltip: d(() => [
|
|
1601
|
-
n(
|
|
1601
|
+
n(o(G), {
|
|
1602
1602
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1603
1603
|
scope: "global"
|
|
1604
1604
|
}, {
|
|
1605
1605
|
code1: d(() => [
|
|
1606
|
-
E("code", null, h(
|
|
1606
|
+
E("code", null, h(o(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1607
1607
|
]),
|
|
1608
1608
|
_: 1
|
|
1609
1609
|
})
|
|
1610
1610
|
]),
|
|
1611
1611
|
_: 1
|
|
1612
1612
|
}, 8, ["modelValue", "description", "label"]),
|
|
1613
|
-
|
|
1613
|
+
e.fields.tls_verify_enabled ? (C(), A("div", Ht, [
|
|
1614
1614
|
n(y, {
|
|
1615
|
-
modelValue:
|
|
1616
|
-
"onUpdate:modelValue":
|
|
1615
|
+
modelValue: e.fields.tls_verify_value,
|
|
1616
|
+
"onUpdate:modelValue": r[24] || (r[24] = (f) => e.fields.tls_verify_value = f),
|
|
1617
1617
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1618
|
-
label:
|
|
1618
|
+
label: o(l)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1619
1619
|
"selected-value": !0
|
|
1620
1620
|
}, null, 8, ["modelValue", "label"])
|
|
1621
1621
|
])) : M("", !0),
|
|
1622
|
-
|
|
1622
|
+
e.fields.tls_verify_enabled ? (C(), A("div", Zt, [
|
|
1623
1623
|
n(y, {
|
|
1624
|
-
modelValue:
|
|
1625
|
-
"onUpdate:modelValue":
|
|
1624
|
+
modelValue: e.fields.tls_verify_value,
|
|
1625
|
+
"onUpdate:modelValue": r[25] || (r[25] = (f) => e.fields.tls_verify_value = f),
|
|
1626
1626
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1627
|
-
label:
|
|
1627
|
+
label: o(l)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1628
1628
|
"selected-value": !1
|
|
1629
1629
|
}, null, 8, ["modelValue", "label"])
|
|
1630
1630
|
])) : M("", !0)
|
|
@@ -1639,55 +1639,55 @@ const X = {
|
|
|
1639
1639
|
]),
|
|
1640
1640
|
_: 1
|
|
1641
1641
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1642
|
-
n(
|
|
1643
|
-
description:
|
|
1642
|
+
n(o(Ge), {
|
|
1643
|
+
description: o(l)("gateway_services.form.sections.general.description"),
|
|
1644
1644
|
"hide-info-header": s.hideSectionsInfo,
|
|
1645
|
-
title:
|
|
1645
|
+
title: o(l)("gateway_services.form.sections.general.title")
|
|
1646
1646
|
}, {
|
|
1647
1647
|
default: d(() => [
|
|
1648
1648
|
n(_, {
|
|
1649
|
-
modelValue:
|
|
1650
|
-
"onUpdate:modelValue":
|
|
1649
|
+
modelValue: e.fields.name,
|
|
1650
|
+
"onUpdate:modelValue": r[27] || (r[27] = (f) => e.fields.name = f),
|
|
1651
1651
|
modelModifiers: { trim: !0 },
|
|
1652
1652
|
autocomplete: "off",
|
|
1653
1653
|
"data-testid": "gateway-service-name-input",
|
|
1654
1654
|
error: ee.value,
|
|
1655
1655
|
"error-message": ae.value,
|
|
1656
|
-
label:
|
|
1656
|
+
label: o(l)("gateway_services.form.fields.name.label"),
|
|
1657
1657
|
"label-attributes": {
|
|
1658
|
-
info:
|
|
1658
|
+
info: o(l)("gateway_services.form.fields.name.tooltip"),
|
|
1659
1659
|
tooltipAttributes: { maxWidth: "400" }
|
|
1660
1660
|
},
|
|
1661
1661
|
name: "name",
|
|
1662
|
-
placeholder:
|
|
1663
|
-
readonly:
|
|
1662
|
+
placeholder: o(l)("gateway_services.form.fields.name.placeholder"),
|
|
1663
|
+
readonly: e.isReadonly,
|
|
1664
1664
|
type: "text",
|
|
1665
1665
|
onInput: be
|
|
1666
1666
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1667
1667
|
n(Q, {
|
|
1668
1668
|
"data-testid": "tags-collapse",
|
|
1669
1669
|
"trigger-alignment": "leading",
|
|
1670
|
-
"trigger-label":
|
|
1670
|
+
"trigger-label": o(l)("gateway_services.form.fields.tags.collapse")
|
|
1671
1671
|
}, {
|
|
1672
1672
|
default: d(() => [
|
|
1673
1673
|
E("div", Jt, [
|
|
1674
1674
|
n(_, {
|
|
1675
|
-
modelValue:
|
|
1676
|
-
"onUpdate:modelValue":
|
|
1675
|
+
modelValue: e.fields.tags,
|
|
1676
|
+
"onUpdate:modelValue": r[28] || (r[28] = (f) => e.fields.tags = f),
|
|
1677
1677
|
modelModifiers: { trim: !0 },
|
|
1678
1678
|
autocomplete: "off",
|
|
1679
1679
|
"data-testid": "gateway-service-tags-input",
|
|
1680
|
-
help:
|
|
1681
|
-
label:
|
|
1680
|
+
help: o(l)("gateway_services.form.fields.tags.help"),
|
|
1681
|
+
label: o(l)("gateway_services.form.fields.tags.label"),
|
|
1682
1682
|
"label-attributes": {
|
|
1683
|
-
info:
|
|
1683
|
+
info: o(l)("gateway_services.form.fields.tags.tooltip"),
|
|
1684
1684
|
tooltipAttributes: { maxWidth: "400" }
|
|
1685
1685
|
},
|
|
1686
1686
|
name: "tags",
|
|
1687
|
-
placeholder:
|
|
1688
|
-
readonly:
|
|
1687
|
+
placeholder: o(l)("gateway_services.form.fields.tags.placeholder"),
|
|
1688
|
+
readonly: e.isReadonly,
|
|
1689
1689
|
type: "text",
|
|
1690
|
-
onInput:
|
|
1690
|
+
onInput: r[29] || (r[29] = (f) => N("tags"))
|
|
1691
1691
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
1692
1692
|
])
|
|
1693
1693
|
]),
|
|
@@ -1696,14 +1696,14 @@ const X = {
|
|
|
1696
1696
|
]),
|
|
1697
1697
|
_: 1
|
|
1698
1698
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1699
|
-
|
|
1699
|
+
e.errorMessages.length ? (C(), de(ie, {
|
|
1700
1700
|
key: 0,
|
|
1701
1701
|
appearance: "danger",
|
|
1702
1702
|
"data-testid": "form-error"
|
|
1703
1703
|
}, {
|
|
1704
1704
|
default: d(() => [
|
|
1705
1705
|
E("ul", Qt, [
|
|
1706
|
-
(C(!0), A(Qe, null, Xe(
|
|
1706
|
+
(C(!0), A(Qe, null, Xe(e.errorMessages, (f) => (C(), A("li", { key: f }, h(f), 1))), 128))
|
|
1707
1707
|
])
|
|
1708
1708
|
]),
|
|
1709
1709
|
_: 1
|
|
@@ -1714,7 +1714,7 @@ const X = {
|
|
|
1714
1714
|
]);
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
}), uo = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-
|
|
1717
|
+
}), uo = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-72fe312f"]]), { validateHost: Yt, validatePort: eo, validateProtocol: to, validatePath: oo } = X.useUrlValidators(), fo = () => ({
|
|
1718
1718
|
validateHost: Yt,
|
|
1719
1719
|
validatePort: eo,
|
|
1720
1720
|
validateProtocol: to,
|