@kong-ui-public/entities-gateway-services 3.10.6-pr.2001.dfcf418cd.0 → 3.10.6-pr.2001.e73b22c4d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Le, computed as h, ref as W, watch as Ue, onBeforeMount as lt, resolveComponent as D, openBlock as C, createElementBlock as
|
|
1
|
+
import { defineComponent as Le, computed as h, ref as W, watch as Ue, onBeforeMount as lt, resolveComponent as D, openBlock as C, createElementBlock as F, createVNode as d, unref as o, createSlots as xe, withCtx as v, createBlock as Fe, Teleport as je, createElementVNode as S, createCommentVNode as T, createTextVNode as z, toDisplayString as P, withModifiers as Ke, reactive as Te, onMounted as Je, renderSlot as Qe, toValue as ze, Transition as We, Fragment as ot, renderList as it } from "vue";
|
|
2
2
|
import { useRouter as qe } from "vue-router";
|
|
3
3
|
import { BookIcon as He, AddIcon as rt, ServicesIcon as st } from "@kong/icons";
|
|
4
4
|
import { createI18n as at, i18nTComponent as nt } from "@kong-ui-public/i18n";
|
|
5
|
-
import { useAxios as
|
|
5
|
+
import { useAxios as Oe, useTableState as ct, useFetcher as dt, useDeleteUrlBuilder as ut, FetcherStatus as ft, EntityBaseTable as pt, EntityFilter as mt, PermissionsWrapper as Ee, TableTags as vt, EntityEmptyState as gt, EntityToggleModal as yt, EntityDeleteModal as _t, EntityTypes as bt, useErrors as Xe, useValidators as Ye, EntityBaseFormType as Me, useGatewayFeatureSupported as et, EntityBaseForm as tt, SupportedEntityType as Ge, EntityFormSection as Be, useHelpers as ht, ConfigurationSchemaSection as $e, ConfigurationSchemaType as wt, EntityBaseConfigCard as kt } from "@kong-ui-public/entities-shared";
|
|
6
6
|
const Vt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
@@ -53,6 +53,9 @@ const Vt = {
|
|
|
53
53
|
description: "Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."
|
|
54
54
|
},
|
|
55
55
|
form: {
|
|
56
|
+
buttons: {
|
|
57
|
+
try_sample: "Try sample API"
|
|
58
|
+
},
|
|
56
59
|
errors: {
|
|
57
60
|
host: {
|
|
58
61
|
empty: "host cannot be empty",
|
|
@@ -77,7 +80,7 @@ const Vt = {
|
|
|
77
80
|
description: "Provide a name and tags to help identify and manage this service."
|
|
78
81
|
},
|
|
79
82
|
keys: {
|
|
80
|
-
title: "Service
|
|
83
|
+
title: "Service endpoint",
|
|
81
84
|
description: "Define where this service should send requests.",
|
|
82
85
|
checkedGroupLabel: "Choose how and where to send traffic",
|
|
83
86
|
urlLabel: "Full URL",
|
|
@@ -90,7 +93,7 @@ const Vt = {
|
|
|
90
93
|
label: "Protocol, host, port, and path",
|
|
91
94
|
description: "Manually specify each component of the API’s URL for advanced configurations."
|
|
92
95
|
},
|
|
93
|
-
viewAdvancedFields: "View
|
|
96
|
+
viewAdvancedFields: "View advanced fields"
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
99
|
fields: {
|
|
@@ -140,31 +143,31 @@ const Vt = {
|
|
|
140
143
|
tooltip: "The number of retries to execute upon failure to proxy."
|
|
141
144
|
},
|
|
142
145
|
connect_timeout: {
|
|
143
|
-
label: "Connection
|
|
146
|
+
label: "Connection timeout",
|
|
144
147
|
tooltip: "The timeout in milliseconds for establishing a connection to the upstream server."
|
|
145
148
|
},
|
|
146
149
|
write_timeout: {
|
|
147
|
-
label: "Write
|
|
150
|
+
label: "Write timeout",
|
|
148
151
|
tooltip: "The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."
|
|
149
152
|
},
|
|
150
153
|
read_timeout: {
|
|
151
|
-
label: "Read
|
|
154
|
+
label: "Read timeout",
|
|
152
155
|
tooltip: "The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."
|
|
153
156
|
},
|
|
154
157
|
client_certificate: {
|
|
155
|
-
label: "Client
|
|
158
|
+
label: "Client certificate",
|
|
156
159
|
placeholder: "Enter a Certificate ID",
|
|
157
160
|
tooltip: "Certificate to be used as client certificate while TLS handshaking to the upstream server."
|
|
158
161
|
},
|
|
159
162
|
ca_certificates: {
|
|
160
|
-
label: "CA
|
|
163
|
+
label: "CA certificates",
|
|
161
164
|
placeholder: "Enter a comma separated list of CA Certificate IDs",
|
|
162
165
|
tooltip: "Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",
|
|
163
166
|
code1: "CA Certificate",
|
|
164
167
|
code2: "null"
|
|
165
168
|
},
|
|
166
169
|
tls_verify_enabled: {
|
|
167
|
-
label: "TLS
|
|
170
|
+
label: "TLS verify",
|
|
168
171
|
help: "If unchecked, use default system setting",
|
|
169
172
|
tooltip: "Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",
|
|
170
173
|
code1: "null"
|
|
@@ -265,13 +268,13 @@ const ge = {
|
|
|
265
268
|
useI18n: Ut,
|
|
266
269
|
usePortFromProtocol: $t,
|
|
267
270
|
useUrlValidators: At
|
|
268
|
-
}, Ae = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
271
|
+
}, Ae = "/v2/control-planes/{controlPlaneId}/core-entities", Re = "/{workspace}", ye = {
|
|
269
272
|
list: {
|
|
270
273
|
konnect: {
|
|
271
274
|
all: `${Ae}/services`
|
|
272
275
|
},
|
|
273
276
|
kongManager: {
|
|
274
|
-
all: `${
|
|
277
|
+
all: `${Re}/services`
|
|
275
278
|
}
|
|
276
279
|
},
|
|
277
280
|
form: {
|
|
@@ -281,12 +284,12 @@ const ge = {
|
|
|
281
284
|
edit: `${Ae}/services/{id}`
|
|
282
285
|
},
|
|
283
286
|
kongManager: {
|
|
284
|
-
create: `${
|
|
285
|
-
validate: `${
|
|
286
|
-
edit: `${
|
|
287
|
+
create: `${Re}/services`,
|
|
288
|
+
validate: `${Re}/schemas/services/validate`,
|
|
289
|
+
edit: `${Re}/services/{id}`
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
|
-
},
|
|
292
|
+
}, Rt = "#00abd2", xt = "24px", Tt = { class: "kong-ui-entities-gateway-services-list" }, Mt = { class: "button-row" }, Bt = { class: "empty-state-icon-gateway" }, Lt = { key: 1 }, Kt = /* @__PURE__ */ Le({
|
|
290
293
|
__name: "GatewayServiceList",
|
|
291
294
|
props: {
|
|
292
295
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -346,7 +349,7 @@ const ge = {
|
|
|
346
349
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
347
350
|
setup(n, { emit: M }) {
|
|
348
351
|
var c;
|
|
349
|
-
const y = M, p = n, { i18n: { t: a, formatUnixTimeStamp: b } } = ge.useI18n(), B = qe(), { axiosInstance: Z } =
|
|
352
|
+
const y = M, p = n, { i18n: { t: a, formatUnixTimeStamp: b } } = ge.useI18n(), B = qe(), { axiosInstance: Z } = Oe((c = p.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: K } = ct(() => ee.value), I = h(() => r.value && p.config.app === "konnect"), ie = h(() => !p.enableV2EmptyStates && p.config.app === "konnect"), ue = h(() => p.config.app !== "kongManager" || !!p.config.disableSorting), X = {
|
|
350
353
|
// the Name column is non-hidable
|
|
351
354
|
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
352
355
|
...p.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -373,15 +376,15 @@ const ge = {
|
|
|
373
376
|
isExactMatch: g,
|
|
374
377
|
placeholder: a(`search.placeholder.${p.config.app}`)
|
|
375
378
|
};
|
|
376
|
-
const { name: m, enabled: w, protocol:
|
|
379
|
+
const { name: m, enabled: w, protocol: O, host: Q, port: j, path: he } = X;
|
|
377
380
|
return {
|
|
378
381
|
isExactMatch: g,
|
|
379
|
-
fields: { name: m, enabled: w, protocol:
|
|
382
|
+
fields: { name: m, enabled: w, protocol: O, host: Q, port: j, path: he },
|
|
380
383
|
schema: p.config.filterSchema
|
|
381
384
|
};
|
|
382
385
|
}), {
|
|
383
386
|
fetcher: l,
|
|
384
|
-
fetcherState:
|
|
387
|
+
fetcherState: R,
|
|
385
388
|
fetcherCacheKey: se
|
|
386
389
|
} = dt({ ...p.config, cacheIdentifier: p.cacheIdentifier }, A.value), Pe = () => {
|
|
387
390
|
ee.value = "";
|
|
@@ -399,8 +402,8 @@ const ge = {
|
|
|
399
402
|
name: ""
|
|
400
403
|
};
|
|
401
404
|
if (q.value) {
|
|
402
|
-
const { enabled: m, id: w, name:
|
|
403
|
-
g.action = m ? "disable" : "enable", g.id = w, g.name =
|
|
405
|
+
const { enabled: m, id: w, name: O } = q.value;
|
|
406
|
+
g.action = m ? "disable" : "enable", g.id = w, g.name = O || w;
|
|
404
407
|
}
|
|
405
408
|
return g;
|
|
406
409
|
}), ce = (g) => {
|
|
@@ -408,8 +411,8 @@ const ge = {
|
|
|
408
411
|
}, _e = () => {
|
|
409
412
|
ne.value = !1, q.value = null;
|
|
410
413
|
}, Ve = async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!await ((
|
|
414
|
+
var O, Q;
|
|
415
|
+
if (!await ((O = p.canEdit) == null ? void 0 : O.call(p, q.value)) || !q.value)
|
|
413
416
|
return;
|
|
414
417
|
const m = `${Y.value.href}/${q.value.id}`, w = !q.value.enabled;
|
|
415
418
|
try {
|
|
@@ -467,8 +470,8 @@ const ge = {
|
|
|
467
470
|
oe.value = !0;
|
|
468
471
|
try {
|
|
469
472
|
await Z.delete(i(N.value.id)), y("delete:success", N.value), k(), se.value++;
|
|
470
|
-
} catch (
|
|
471
|
-
ve.value = ((w = (m =
|
|
473
|
+
} catch (O) {
|
|
474
|
+
ve.value = ((w = (m = O.response) == null ? void 0 : m.data) == null ? void 0 : w.message) || O.message || a("errors.delete"), y("error", O);
|
|
472
475
|
} finally {
|
|
473
476
|
oe.value = !1;
|
|
474
477
|
}
|
|
@@ -476,12 +479,12 @@ const ge = {
|
|
|
476
479
|
}, L = () => {
|
|
477
480
|
B.push(p.config.createRoute);
|
|
478
481
|
};
|
|
479
|
-
Ue(
|
|
480
|
-
var m, w,
|
|
482
|
+
Ue(R, (g) => {
|
|
483
|
+
var m, w, O;
|
|
481
484
|
if (g.status === ft.Error) {
|
|
482
485
|
U.value = {
|
|
483
486
|
title: a("errors.general")
|
|
484
|
-
}, (
|
|
487
|
+
}, (O = (w = (m = g.error) == null ? void 0 : m.response) == null ? void 0 : w.data) != null && O.message && (U.value.message = g.error.response.data.message), y("error", g.error);
|
|
485
488
|
return;
|
|
486
489
|
}
|
|
487
490
|
U.value = null;
|
|
@@ -490,8 +493,8 @@ const ge = {
|
|
|
490
493
|
return lt(async () => {
|
|
491
494
|
$.value = await p.canCreate();
|
|
492
495
|
}), (g, m) => {
|
|
493
|
-
const w = D("KButton"),
|
|
494
|
-
return C(),
|
|
496
|
+
const w = D("KButton"), O = D("KBadge"), Q = D("KInputSwitch"), j = D("KDropdownItem"), he = D("KClipboardProvider");
|
|
497
|
+
return C(), F("div", Tt, [
|
|
495
498
|
d(o(pt), {
|
|
496
499
|
"cache-identifier": n.cacheIdentifier,
|
|
497
500
|
"default-table-preferences": ke,
|
|
@@ -509,7 +512,7 @@ const ge = {
|
|
|
509
512
|
"onClick:row": m[5] || (m[5] = (e) => Se(e)),
|
|
510
513
|
onSort: t,
|
|
511
514
|
onState: o(K)
|
|
512
|
-
},
|
|
515
|
+
}, xe({
|
|
513
516
|
"toolbar-filter": v(() => [
|
|
514
517
|
d(o(mt), {
|
|
515
518
|
modelValue: ee.value,
|
|
@@ -535,7 +538,7 @@ const ge = {
|
|
|
535
538
|
d(o(He), { decorative: "" })
|
|
536
539
|
]),
|
|
537
540
|
_: 1
|
|
538
|
-
})) :
|
|
541
|
+
})) : T("", !0),
|
|
539
542
|
d(o(Ee), {
|
|
540
543
|
"auth-function": () => n.canCreate()
|
|
541
544
|
}, {
|
|
@@ -548,7 +551,7 @@ const ge = {
|
|
|
548
551
|
}, {
|
|
549
552
|
default: v(() => [
|
|
550
553
|
d(o(rt)),
|
|
551
|
-
z(" " +
|
|
554
|
+
z(" " + P(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
552
555
|
]),
|
|
553
556
|
_: 1
|
|
554
557
|
}, 8, ["size", "to"])
|
|
@@ -559,22 +562,22 @@ const ge = {
|
|
|
559
562
|
], 8, ["disabled"]))
|
|
560
563
|
]),
|
|
561
564
|
name: v(({ rowValue: e }) => [
|
|
562
|
-
S("b", null,
|
|
565
|
+
S("b", null, P(e ?? "-"), 1)
|
|
563
566
|
]),
|
|
564
567
|
control_plane: v(({ row: e }) => {
|
|
565
568
|
var s;
|
|
566
569
|
return [
|
|
567
|
-
(s = e.x_meta) != null && s.cluster_id ? (C(), Fe(
|
|
570
|
+
(s = e.x_meta) != null && s.cluster_id ? (C(), Fe(O, {
|
|
568
571
|
key: 0,
|
|
569
572
|
tooltip: e.x_meta.cluster_id,
|
|
570
573
|
"truncation-tooltip": "",
|
|
571
574
|
onClick: Ke((V) => Ce(e.x_meta.cluster_id), ["stop"])
|
|
572
575
|
}, {
|
|
573
576
|
default: v(() => [
|
|
574
|
-
z(
|
|
577
|
+
z(P(e.x_meta.cluster_id), 1)
|
|
575
578
|
]),
|
|
576
579
|
_: 2
|
|
577
|
-
}, 1032, ["tooltip", "onClick"])) : (C(),
|
|
580
|
+
}, 1032, ["tooltip", "onClick"])) : (C(), F("b", Lt, "-"))
|
|
578
581
|
];
|
|
579
582
|
}),
|
|
580
583
|
enabled: v(({ row: e }) => [
|
|
@@ -603,10 +606,10 @@ const ge = {
|
|
|
603
606
|
d(o(vt), { tags: e }, null, 8, ["tags"])
|
|
604
607
|
]),
|
|
605
608
|
created_at: v(({ rowValue: e }) => [
|
|
606
|
-
z(
|
|
609
|
+
z(P(o(b)(e)), 1)
|
|
607
610
|
]),
|
|
608
611
|
updated_at: v(({ row: e, rowValue: s }) => [
|
|
609
|
-
z(
|
|
612
|
+
z(P(o(b)(s ?? e.created_at)), 1)
|
|
610
613
|
]),
|
|
611
614
|
actions: v(({ row: e }) => [
|
|
612
615
|
d(he, null, {
|
|
@@ -616,7 +619,7 @@ const ge = {
|
|
|
616
619
|
onClick: (V) => me(e, s)
|
|
617
620
|
}, {
|
|
618
621
|
default: v(() => [
|
|
619
|
-
z(
|
|
622
|
+
z(P(o(a)("actions.copy_id")), 1)
|
|
620
623
|
]),
|
|
621
624
|
_: 2
|
|
622
625
|
}, 1032, ["onClick"])
|
|
@@ -630,7 +633,7 @@ const ge = {
|
|
|
630
633
|
onClick: (V) => be(e, s)
|
|
631
634
|
}, {
|
|
632
635
|
default: v(() => [
|
|
633
|
-
z(
|
|
636
|
+
z(P(o(a)("actions.copy_json")), 1)
|
|
634
637
|
]),
|
|
635
638
|
_: 2
|
|
636
639
|
}, 1032, ["onClick"])
|
|
@@ -671,7 +674,7 @@ const ge = {
|
|
|
671
674
|
onClick: (s) => f(e)
|
|
672
675
|
}, {
|
|
673
676
|
default: v(() => [
|
|
674
|
-
z(
|
|
677
|
+
z(P(o(a)("actions.delete.menu_label")), 1)
|
|
675
678
|
]),
|
|
676
679
|
_: 2
|
|
677
680
|
}, 1032, ["onClick"])
|
|
@@ -719,12 +722,12 @@ const ge = {
|
|
|
719
722
|
title: o(a)("gateway_services.empty_state_v2.title"),
|
|
720
723
|
"onClick:create": L,
|
|
721
724
|
"onClick:learnMore": m[3] || (m[3] = (s) => g.$emit("click:learn-more"))
|
|
722
|
-
},
|
|
725
|
+
}, xe({
|
|
723
726
|
image: v(() => [
|
|
724
727
|
S("div", Bt, [
|
|
725
728
|
d(o(st), {
|
|
726
|
-
color: o(
|
|
727
|
-
size: o(
|
|
729
|
+
color: o(Rt),
|
|
730
|
+
size: o(xt)
|
|
728
731
|
}, null, 8, ["color", "size"])
|
|
729
732
|
])
|
|
730
733
|
]),
|
|
@@ -733,7 +736,7 @@ const ge = {
|
|
|
733
736
|
(e = n.config) != null && e.isControlPlaneGroup ? {
|
|
734
737
|
name: "message",
|
|
735
738
|
fn: v(() => [
|
|
736
|
-
z(
|
|
739
|
+
z(P(o(a)("gateway_services.empty_state_v2.group")), 1)
|
|
737
740
|
]),
|
|
738
741
|
key: "0"
|
|
739
742
|
} : void 0
|
|
@@ -772,7 +775,7 @@ const ge = {
|
|
|
772
775
|
for (const [p, a] of M)
|
|
773
776
|
y[p] = a;
|
|
774
777
|
return y;
|
|
775
|
-
}, $l = /* @__PURE__ */ Ne(Kt, [["__scopeId", "data-v-ee4f8a6d"]]), Wt = { class: "kong-ui-entities-gateway-service-form" }, Dt = { key: 0 }, qt = { class: "gateway-service-form-traffic-label" },
|
|
778
|
+
}, $l = /* @__PURE__ */ Ne(Kt, [["__scopeId", "data-v-ee4f8a6d"]]), Wt = { class: "kong-ui-entities-gateway-service-form" }, Dt = { key: 0 }, qt = { class: "gateway-service-form-traffic-label" }, Ot = { class: "gateway-service-form-margin-bottom" }, Gt = {
|
|
776
779
|
key: 0,
|
|
777
780
|
class: "gateway-service-form-group-fields"
|
|
778
781
|
}, Nt = {
|
|
@@ -818,7 +821,7 @@ const ge = {
|
|
|
818
821
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
819
822
|
setup(n, { expose: M, emit: y }) {
|
|
820
823
|
var ve;
|
|
821
|
-
const p = y, a = n, b = W(!0), B = qe(), { i18nT: Z, i18n: { t: r } } = ge.useI18n(), { getMessageFromError: K } = Xe(), { axiosInstance: I } =
|
|
824
|
+
const p = y, a = n, b = W(!0), B = qe(), { i18nT: Z, i18n: { t: r } } = ge.useI18n(), { getMessageFromError: K } = Xe(), { axiosInstance: I } = Oe((ve = a.config) == null ? void 0 : ve.axiosRequestConfig), ie = Ye(), ue = h(() => ye.form[a.config.app].edit), X = h(() => a.gatewayServiceId ? Me.Edit : Me.Create), ke = W(!1), fe = h(() => !!a.gatewayServiceId), A = W(fe.value ? "protocol" : "url"), Y = ge.usePortFromProtocol(), ee = W(""), re = h(() => !!ee.value), l = Te({
|
|
822
825
|
fields: {
|
|
823
826
|
name: "",
|
|
824
827
|
protocol: "http",
|
|
@@ -838,7 +841,7 @@ const ge = {
|
|
|
838
841
|
},
|
|
839
842
|
isReadonly: !1,
|
|
840
843
|
errorMessage: ""
|
|
841
|
-
}),
|
|
844
|
+
}), R = Te({
|
|
842
845
|
name: "",
|
|
843
846
|
protocol: "http",
|
|
844
847
|
host: "",
|
|
@@ -916,7 +919,7 @@ const ge = {
|
|
|
916
919
|
], t = { url: "url", protocol: "protocol" }, U = (i, f) => {
|
|
917
920
|
f.value;
|
|
918
921
|
}, ae = (i) => i ? parseFloat(i) : 0, ne = () => {
|
|
919
|
-
b.value = !0, l.errorMessage = "", l.fields.host =
|
|
922
|
+
b.value = !0, l.errorMessage = "", l.fields.host = R.host, l.fields.path = R.path, l.fields.port = R.port, l.fields.protocol = R.protocol, l.fields.url = R.url, l.fields.retries = R.retries, l.fields.connect_timeout = R.connect_timeout, l.fields.write_timeout = R.write_timeout, l.fields.read_timeout = R.read_timeout, l.fields.client_certificate = R.client_certificate, l.fields.ca_certificates = R.ca_certificates, l.fields.tls_verify_enabled = R.tls_verify_enabled, l.fields.tls_verify_value = R.tls_verify_value;
|
|
920
923
|
}, q = () => {
|
|
921
924
|
if (l.fields.url && A.value === "url")
|
|
922
925
|
try {
|
|
@@ -946,9 +949,9 @@ const ge = {
|
|
|
946
949
|
return A.value === "protocol" && i;
|
|
947
950
|
}), Ce = (i) => {
|
|
948
951
|
ee.value = ie.utf8Name(i);
|
|
949
|
-
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(
|
|
952
|
+
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(R) || A.value === "url" && !!l.fields.url || A.value === "protocol" && !!l.fields.host), be = (i) => {
|
|
950
953
|
var f, k, H;
|
|
951
|
-
l.fields.name = (i == null ? void 0 : i.name) || "", l.fields.tags = ((f = i == null ? void 0 : i.tags) == null ? void 0 : f.join(", ")) || "", l.fields.protocol = (i == null ? void 0 : i.protocol) || "http", l.fields.path = (i == null ? void 0 : i.path) || "", l.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, l.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, l.fields.host = (i == null ? void 0 : i.host) || "", l.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, l.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, l.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, l.fields.ca_certificates = ((k = i == null ? void 0 : i.ca_certificates) == null ? void 0 : k.join(",")) || "", l.fields.client_certificate = ((H = i == null ? void 0 : i.client_certificate) == null ? void 0 : H.id) || "", l.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, l.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(
|
|
954
|
+
l.fields.name = (i == null ? void 0 : i.name) || "", l.fields.tags = ((f = i == null ? void 0 : i.tags) == null ? void 0 : f.join(", ")) || "", l.fields.protocol = (i == null ? void 0 : i.protocol) || "http", l.fields.path = (i == null ? void 0 : i.path) || "", l.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, l.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, l.fields.host = (i == null ? void 0 : i.host) || "", l.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, l.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, l.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, l.fields.ca_certificates = ((k = i == null ? void 0 : i.ca_certificates) == null ? void 0 : k.join(",")) || "", l.fields.client_certificate = ((H = i == null ? void 0 : i.client_certificate) == null ? void 0 : H.id) || "", l.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, l.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(R, l.fields);
|
|
952
955
|
}, Se = () => {
|
|
953
956
|
B.push(a.config.cancelRoute);
|
|
954
957
|
}, de = h(() => {
|
|
@@ -991,7 +994,7 @@ const ge = {
|
|
|
991
994
|
let $;
|
|
992
995
|
if (await I.post(de.value, L), X.value === "create" ? $ = await I.post(le.value, L) : X.value === "edit" && ($ = ((i = a.config) == null ? void 0 : i.app) === "konnect" ? await I.put(le.value, L) : await I.patch(le.value, L)), $) {
|
|
993
996
|
const { data: c } = $;
|
|
994
|
-
l.fields.name = (c == null ? void 0 : c.name) || "", l.fields.port = c.port || Y.getPortFromProtocol(c.protocol), l.fields.protocol = (c == null ? void 0 : c.protocol) || "http", l.fields.host = (c == null ? void 0 : c.host) || "", l.fields.path = (c == null ? void 0 : c.path) || "", l.fields.url = (c == null ? void 0 : c.url) || "", l.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, l.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, l.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, l.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, l.fields.client_certificate = ((f = c == null ? void 0 : c.client_certificate) == null ? void 0 : f.id) || "", l.fields.ca_certificates = (k = c == null ? void 0 : c.ca_certificates) != null && k.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", l.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, l.fields.tls_verify_value = l.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), l.fields.tags = (H = c == null ? void 0 : c.tags) != null && H.length ? c.tags.join(", ") : "", Object.assign(
|
|
997
|
+
l.fields.name = (c == null ? void 0 : c.name) || "", l.fields.port = c.port || Y.getPortFromProtocol(c.protocol), l.fields.protocol = (c == null ? void 0 : c.protocol) || "http", l.fields.host = (c == null ? void 0 : c.host) || "", l.fields.path = (c == null ? void 0 : c.path) || "", l.fields.url = (c == null ? void 0 : c.url) || "", l.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, l.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, l.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, l.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, l.fields.client_certificate = ((f = c == null ? void 0 : c.client_certificate) == null ? void 0 : f.id) || "", l.fields.ca_certificates = (k = c == null ? void 0 : c.ca_certificates) != null && k.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", l.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, l.fields.tls_verify_value = l.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), l.fields.tags = (H = c == null ? void 0 : c.tags) != null && H.length ? c.tags.join(", ") : "", Object.assign(R, l.fields), p("update", $ == null ? void 0 : $.data);
|
|
995
998
|
}
|
|
996
999
|
return $;
|
|
997
1000
|
} catch (L) {
|
|
@@ -1001,7 +1004,7 @@ const ge = {
|
|
|
1001
1004
|
}
|
|
1002
1005
|
};
|
|
1003
1006
|
return Ue(() => a.gatewayServiceId, () => {
|
|
1004
|
-
Object.assign(l.fields,
|
|
1007
|
+
Object.assign(l.fields, R);
|
|
1005
1008
|
}), Ue(l.fields, (i) => {
|
|
1006
1009
|
l.fields.port = Y.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated", J.value);
|
|
1007
1010
|
}), Je(() => {
|
|
@@ -1014,12 +1017,12 @@ const ge = {
|
|
|
1014
1017
|
initForm: be
|
|
1015
1018
|
}), (i, f) => {
|
|
1016
1019
|
const k = D("KInput"), H = D("KLabel"), L = D("KRadio"), $ = D("KSelect"), c = D("KCheckbox"), g = D("KCollapse");
|
|
1017
|
-
return C(),
|
|
1020
|
+
return C(), F("div", Wt, [
|
|
1018
1021
|
d(o(tt), {
|
|
1019
1022
|
"can-submit": me.value,
|
|
1020
1023
|
config: n.config,
|
|
1021
1024
|
"edit-id": n.gatewayServiceId,
|
|
1022
|
-
"entity-type": o(
|
|
1025
|
+
"entity-type": o(Ge).GatewayService,
|
|
1023
1026
|
"error-message": l.errorMessage,
|
|
1024
1027
|
"fetch-url": ue.value,
|
|
1025
1028
|
"form-fields": J.value,
|
|
@@ -1089,16 +1092,16 @@ const ge = {
|
|
|
1089
1092
|
title: o(r)("gateway_services.form.sections.keys.title")
|
|
1090
1093
|
}, {
|
|
1091
1094
|
default: v(() => [
|
|
1092
|
-
fe.value ?
|
|
1095
|
+
fe.value ? T("", !0) : (C(), F("div", Dt, [
|
|
1093
1096
|
S("div", qt, [
|
|
1094
1097
|
d(H, { required: "" }, {
|
|
1095
1098
|
default: v(() => [
|
|
1096
|
-
z(
|
|
1099
|
+
z(P(o(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1097
1100
|
]),
|
|
1098
1101
|
_: 1
|
|
1099
1102
|
})
|
|
1100
1103
|
]),
|
|
1101
|
-
S("div",
|
|
1104
|
+
S("div", Ot, [
|
|
1102
1105
|
d(L, {
|
|
1103
1106
|
modelValue: A.value,
|
|
1104
1107
|
"onUpdate:modelValue": f[2] || (f[2] = (m) => A.value = m),
|
|
@@ -1107,12 +1110,12 @@ const ge = {
|
|
|
1107
1110
|
onChange: ne
|
|
1108
1111
|
}, {
|
|
1109
1112
|
default: v(() => [
|
|
1110
|
-
z(
|
|
1113
|
+
z(P(o(r)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1111
1114
|
]),
|
|
1112
1115
|
_: 1
|
|
1113
1116
|
}, 8, ["modelValue", "selected-value"])
|
|
1114
1117
|
]),
|
|
1115
|
-
A.value === "url" ? (C(),
|
|
1118
|
+
A.value === "url" ? (C(), F("div", Gt, [
|
|
1116
1119
|
d(k, {
|
|
1117
1120
|
modelValue: l.fields.url,
|
|
1118
1121
|
"onUpdate:modelValue": f[3] || (f[3] = (m) => l.fields.url = m),
|
|
@@ -1128,7 +1131,7 @@ const ge = {
|
|
|
1128
1131
|
placeholder: o(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1129
1132
|
required: ""
|
|
1130
1133
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1131
|
-
])) :
|
|
1134
|
+
])) : T("", !0),
|
|
1132
1135
|
d(L, {
|
|
1133
1136
|
modelValue: A.value,
|
|
1134
1137
|
"onUpdate:modelValue": f[4] || (f[4] = (m) => A.value = m),
|
|
@@ -1138,12 +1141,12 @@ const ge = {
|
|
|
1138
1141
|
onChange: ne
|
|
1139
1142
|
}, {
|
|
1140
1143
|
default: v(() => [
|
|
1141
|
-
z(
|
|
1144
|
+
z(P(o(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1142
1145
|
]),
|
|
1143
1146
|
_: 1
|
|
1144
1147
|
}, 8, ["modelValue", "selected-value"])
|
|
1145
1148
|
])),
|
|
1146
|
-
A.value === "protocol" || fe.value ? (C(),
|
|
1149
|
+
A.value === "protocol" || fe.value ? (C(), F("div", Nt, [
|
|
1147
1150
|
d($, {
|
|
1148
1151
|
modelValue: l.fields.protocol,
|
|
1149
1152
|
"onUpdate:modelValue": f[5] || (f[5] = (m) => l.fields.protocol = m),
|
|
@@ -1174,7 +1177,7 @@ const ge = {
|
|
|
1174
1177
|
placeholder: o(r)("gateway_services.form.fields.host.placeholder"),
|
|
1175
1178
|
required: ""
|
|
1176
1179
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1177
|
-
pe.value ? (C(),
|
|
1180
|
+
pe.value ? (C(), F("div", jt, [
|
|
1178
1181
|
d(k, {
|
|
1179
1182
|
modelValue: l.fields.path,
|
|
1180
1183
|
"onUpdate:modelValue": f[8] || (f[8] = (m) => l.fields.path = m),
|
|
@@ -1189,7 +1192,7 @@ const ge = {
|
|
|
1189
1192
|
name: "path",
|
|
1190
1193
|
placeholder: o(r)("gateway_services.form.fields.path.placeholder")
|
|
1191
1194
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1192
|
-
])) :
|
|
1195
|
+
])) : T("", !0),
|
|
1193
1196
|
d(k, {
|
|
1194
1197
|
modelValue: l.fields.port,
|
|
1195
1198
|
"onUpdate:modelValue": [
|
|
@@ -1208,7 +1211,7 @@ const ge = {
|
|
|
1208
1211
|
name: "port",
|
|
1209
1212
|
type: "number"
|
|
1210
1213
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1211
|
-
])) :
|
|
1214
|
+
])) : T("", !0),
|
|
1212
1215
|
d(g, {
|
|
1213
1216
|
modelValue: b.value,
|
|
1214
1217
|
"onUpdate:modelValue": f[24] || (f[24] = (m) => b.value = m),
|
|
@@ -1302,7 +1305,7 @@ const ge = {
|
|
|
1302
1305
|
type: "number"
|
|
1303
1306
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1304
1307
|
]),
|
|
1305
|
-
ce.value ? (C(),
|
|
1308
|
+
ce.value ? (C(), F("div", Xt, [
|
|
1306
1309
|
d(k, {
|
|
1307
1310
|
modelValue: l.fields.client_certificate,
|
|
1308
1311
|
"onUpdate:modelValue": f[19] || (f[19] = (m) => l.fields.client_certificate = m),
|
|
@@ -1319,8 +1322,8 @@ const ge = {
|
|
|
1319
1322
|
readonly: l.isReadonly,
|
|
1320
1323
|
type: "text"
|
|
1321
1324
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1322
|
-
])) :
|
|
1323
|
-
_e.value ? (C(),
|
|
1325
|
+
])) : T("", !0),
|
|
1326
|
+
_e.value ? (C(), F("div", Yt, [
|
|
1324
1327
|
d(k, {
|
|
1325
1328
|
modelValue: l.fields.ca_certificates,
|
|
1326
1329
|
"onUpdate:modelValue": f[20] || (f[20] = (m) => l.fields.ca_certificates = m),
|
|
@@ -1339,18 +1342,18 @@ const ge = {
|
|
|
1339
1342
|
scope: "global"
|
|
1340
1343
|
}, {
|
|
1341
1344
|
code1: v(() => [
|
|
1342
|
-
S("code", null,
|
|
1345
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1343
1346
|
]),
|
|
1344
1347
|
code2: v(() => [
|
|
1345
|
-
S("code", null,
|
|
1348
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1346
1349
|
]),
|
|
1347
1350
|
_: 1
|
|
1348
1351
|
})
|
|
1349
1352
|
]),
|
|
1350
1353
|
_: 1
|
|
1351
1354
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1352
|
-
])) :
|
|
1353
|
-
Ve.value ? (C(),
|
|
1355
|
+
])) : T("", !0),
|
|
1356
|
+
Ve.value ? (C(), F("div", el, [
|
|
1354
1357
|
d(c, {
|
|
1355
1358
|
modelValue: l.fields.tls_verify_enabled,
|
|
1356
1359
|
"onUpdate:modelValue": f[21] || (f[21] = (m) => l.fields.tls_verify_enabled = m),
|
|
@@ -1365,14 +1368,14 @@ const ge = {
|
|
|
1365
1368
|
scope: "global"
|
|
1366
1369
|
}, {
|
|
1367
1370
|
code1: v(() => [
|
|
1368
|
-
S("code", null,
|
|
1371
|
+
S("code", null, P(o(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1369
1372
|
]),
|
|
1370
1373
|
_: 1
|
|
1371
1374
|
})
|
|
1372
1375
|
]),
|
|
1373
1376
|
_: 1
|
|
1374
1377
|
}, 8, ["modelValue", "description", "label"]),
|
|
1375
|
-
l.fields.tls_verify_enabled ? (C(),
|
|
1378
|
+
l.fields.tls_verify_enabled ? (C(), F("div", tl, [
|
|
1376
1379
|
d(L, {
|
|
1377
1380
|
modelValue: l.fields.tls_verify_value,
|
|
1378
1381
|
"onUpdate:modelValue": f[22] || (f[22] = (m) => l.fields.tls_verify_value = m),
|
|
@@ -1380,8 +1383,8 @@ const ge = {
|
|
|
1380
1383
|
label: o(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1381
1384
|
"selected-value": !0
|
|
1382
1385
|
}, null, 8, ["modelValue", "label"])
|
|
1383
|
-
])) :
|
|
1384
|
-
l.fields.tls_verify_enabled ? (C(),
|
|
1386
|
+
])) : T("", !0),
|
|
1387
|
+
l.fields.tls_verify_enabled ? (C(), F("div", ll, [
|
|
1385
1388
|
d(L, {
|
|
1386
1389
|
modelValue: l.fields.tls_verify_value,
|
|
1387
1390
|
"onUpdate:modelValue": f[23] || (f[23] = (m) => l.fields.tls_verify_value = m),
|
|
@@ -1389,8 +1392,8 @@ const ge = {
|
|
|
1389
1392
|
label: o(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1390
1393
|
"selected-value": !1
|
|
1391
1394
|
}, null, 8, ["modelValue", "label"])
|
|
1392
|
-
])) :
|
|
1393
|
-
])) :
|
|
1395
|
+
])) : T("", !0)
|
|
1396
|
+
])) : T("", !0)
|
|
1394
1397
|
])
|
|
1395
1398
|
]),
|
|
1396
1399
|
_: 1
|
|
@@ -1404,7 +1407,7 @@ const ge = {
|
|
|
1404
1407
|
]);
|
|
1405
1408
|
};
|
|
1406
1409
|
}
|
|
1407
|
-
}), Al = /* @__PURE__ */ Ne(ol, [["__scopeId", "data-v-c2c5e1f0"]]), il = { class: "kong-ui-gateway-service-entity-config-card" },
|
|
1410
|
+
}), Al = /* @__PURE__ */ Ne(ol, [["__scopeId", "data-v-c2c5e1f0"]]), il = { class: "kong-ui-gateway-service-entity-config-card" }, Rl = /* @__PURE__ */ Le({
|
|
1408
1411
|
__name: "GatewayServiceConfigCard",
|
|
1409
1412
|
props: {
|
|
1410
1413
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1491,12 +1494,12 @@ const ge = {
|
|
|
1491
1494
|
hidden: !0
|
|
1492
1495
|
}
|
|
1493
1496
|
});
|
|
1494
|
-
return (r, K) => (C(),
|
|
1497
|
+
return (r, K) => (C(), F("div", il, [
|
|
1495
1498
|
d(o(kt), {
|
|
1496
1499
|
config: n.config,
|
|
1497
1500
|
"config-card-doc": n.configCardDoc,
|
|
1498
1501
|
"config-schema": Z.value,
|
|
1499
|
-
"entity-type": o(
|
|
1502
|
+
"entity-type": o(Ge).GatewayService,
|
|
1500
1503
|
"fetch-url": a.value,
|
|
1501
1504
|
"hide-title": n.hideTitle,
|
|
1502
1505
|
"onFetch:error": K[0] || (K[0] = (I) => r.$emit("fetch:error", I)),
|
|
@@ -1509,10 +1512,10 @@ const ge = {
|
|
|
1509
1512
|
scope: "global"
|
|
1510
1513
|
}, {
|
|
1511
1514
|
false: v(() => [
|
|
1512
|
-
S("code", null,
|
|
1515
|
+
S("code", null, P(o(y)("gateway_services.form.fields.enabled.false")), 1)
|
|
1513
1516
|
]),
|
|
1514
1517
|
true: v(() => [
|
|
1515
|
-
S("code", null,
|
|
1518
|
+
S("code", null, P(o(y)("gateway_services.form.fields.enabled.true")), 1)
|
|
1516
1519
|
]),
|
|
1517
1520
|
_: 1
|
|
1518
1521
|
})
|
|
@@ -1523,10 +1526,10 @@ const ge = {
|
|
|
1523
1526
|
scope: "global"
|
|
1524
1527
|
}, {
|
|
1525
1528
|
code1: v(() => [
|
|
1526
|
-
S("code", null,
|
|
1529
|
+
S("code", null, P(o(y)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1527
1530
|
]),
|
|
1528
1531
|
code2: v(() => [
|
|
1529
|
-
S("code", null,
|
|
1532
|
+
S("code", null, P(o(y)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1530
1533
|
]),
|
|
1531
1534
|
_: 1
|
|
1532
1535
|
})
|
|
@@ -1537,16 +1540,16 @@ const ge = {
|
|
|
1537
1540
|
scope: "global"
|
|
1538
1541
|
}, {
|
|
1539
1542
|
code1: v(() => [
|
|
1540
|
-
S("code", null,
|
|
1543
|
+
S("code", null, P(o(y)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1541
1544
|
]),
|
|
1542
1545
|
_: 1
|
|
1543
1546
|
})
|
|
1544
1547
|
]),
|
|
1545
1548
|
tls_verify: v((I) => [
|
|
1546
|
-
z(
|
|
1549
|
+
z(P(typeof o(b)("rowValue", I) == "boolean" ? B("rowValue", I) : o(y)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1547
1550
|
]),
|
|
1548
1551
|
client_certificate: v((I) => [
|
|
1549
|
-
z(
|
|
1552
|
+
z(P(o(b)("rowValue", I) ? o(b)("rowValue", I).id : "–"), 1)
|
|
1550
1553
|
]),
|
|
1551
1554
|
_: 1
|
|
1552
1555
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1663,7 +1666,7 @@ const te = {
|
|
|
1663
1666
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1664
1667
|
setup(n, { expose: M, emit: y }) {
|
|
1665
1668
|
var he;
|
|
1666
|
-
const p = y, a = n, b = W(!0), B = qe(), { i18nT: Z, i18n: { t: r } } = ge.useI18n(), { getErrorFieldsFromError: K } = Xe(), { axiosInstance: I } =
|
|
1669
|
+
const p = y, a = n, b = W(!0), B = qe(), { i18nT: Z, i18n: { t: r } } = ge.useI18n(), { getErrorFieldsFromError: K } = Xe(), { axiosInstance: I } = Oe((he = a.config) == null ? void 0 : he.axiosRequestConfig), ie = Ye(), { validateHost: ue, validatePath: X, validatePort: ke, validateProtocol: fe } = ge.useUrlValidators(), A = h(() => ye.form[a.config.app].edit), Y = h(() => a.gatewayServiceId ? Me.Edit : Me.Create), ee = W(!1), re = h(() => !!a.gatewayServiceId), l = W(re.value ? "protocol" : "url"), R = ge.usePortFromProtocol(), se = W(""), Pe = h(() => !!se.value || !!de("name")), t = Te({
|
|
1667
1670
|
fields: {
|
|
1668
1671
|
name: "",
|
|
1669
1672
|
protocol: "http",
|
|
@@ -1699,7 +1702,7 @@ const te = {
|
|
|
1699
1702
|
tls_verify_enabled: "",
|
|
1700
1703
|
tls_verify_value: ""
|
|
1701
1704
|
}
|
|
1702
|
-
}), U =
|
|
1705
|
+
}), U = Te({
|
|
1703
1706
|
name: "",
|
|
1704
1707
|
protocol: "http",
|
|
1705
1708
|
host: "",
|
|
@@ -1781,7 +1784,7 @@ const te = {
|
|
|
1781
1784
|
}, Ve = () => {
|
|
1782
1785
|
b.value = !0, N(), t.errorMessages = [], _e();
|
|
1783
1786
|
}, Ce = () => {
|
|
1784
|
-
switch (_e(), t.fields.name = te.name, l.value) {
|
|
1787
|
+
switch (_e(), t.fields.name = `${te.name} + ${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, l.value) {
|
|
1785
1788
|
case "url":
|
|
1786
1789
|
t.fields.url = `${te.protocol}://${te.host}${te.path}`;
|
|
1787
1790
|
break;
|
|
@@ -1800,13 +1803,13 @@ const te = {
|
|
|
1800
1803
|
const V = ue(e.hostname);
|
|
1801
1804
|
if (V) throw new Error(V);
|
|
1802
1805
|
t.fields.host = e.hostname;
|
|
1803
|
-
const
|
|
1804
|
-
if (
|
|
1806
|
+
const G = X(e.pathname);
|
|
1807
|
+
if (G) throw new Error(G);
|
|
1805
1808
|
t.fields.path = e.pathname;
|
|
1806
|
-
const
|
|
1807
|
-
if (
|
|
1808
|
-
const
|
|
1809
|
-
ee.value = !!
|
|
1809
|
+
const E = ke(e.port);
|
|
1810
|
+
if (E) throw new Error(E);
|
|
1811
|
+
const x = Number(e.port);
|
|
1812
|
+
ee.value = !!x, t.fields.port = x || R.getPortFromProtocol(t.fields.protocol), p("url-valid:success");
|
|
1810
1813
|
} catch (e) {
|
|
1811
1814
|
p("url-valid:error", e.message || "URL validation failed"), t.formFieldErrors.url = e.message || "URL validation failed";
|
|
1812
1815
|
}
|
|
@@ -1822,8 +1825,8 @@ const te = {
|
|
|
1822
1825
|
s && (t.formFieldErrors.host = s);
|
|
1823
1826
|
const V = X(t.fields.path);
|
|
1824
1827
|
V && (t.formFieldErrors.path = V);
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1828
|
+
const G = ke(t.fields.port);
|
|
1829
|
+
G && (t.formFieldErrors.port = G), J.value ? p("url-valid:success") : p("url-valid:error", t.errorMessages.join(",") || "URL validation failed");
|
|
1827
1830
|
}, 300), N = (e) => {
|
|
1828
1831
|
if (e)
|
|
1829
1832
|
t.formFieldErrors[e] = "";
|
|
@@ -1864,8 +1867,8 @@ const te = {
|
|
|
1864
1867
|
const e = l.value === "url" && !!t.fields.url && J.value, s = l.value === "protocol" && !!t.fields.host && J.value;
|
|
1865
1868
|
return e || s;
|
|
1866
1869
|
}), c = (e) => {
|
|
1867
|
-
var s, V,
|
|
1868
|
-
t.fields.name = (e == null ? void 0 : e.name) || "", t.fields.tags = ((s = e == null ? void 0 : e.tags) == null ? void 0 : s.join(", ")) || "", t.fields.protocol = (e == null ? void 0 : e.protocol) || "http", t.fields.path = (e == null ? void 0 : e.path) || "", t.fields.read_timeout = e != null && e.read_timeout || (e == null ? void 0 : e.read_timeout) === 0 ? e == null ? void 0 : e.read_timeout : 6e4, t.fields.retries = e != null && e.retries || (e == null ? void 0 : e.retries) === 0 ? e == null ? void 0 : e.retries : 5, t.fields.host = (e == null ? void 0 : e.host) || "", t.fields.connect_timeout = e != null && e.connect_timeout || (e == null ? void 0 : e.connect_timeout) === 0 ? e == null ? void 0 : e.connect_timeout : 6e4, t.fields.tls_verify_enabled = (e == null ? void 0 : e.tls_verify) !== "" && (e == null ? void 0 : e.tls_verify) !== null && (e == null ? void 0 : e.tls_verify) !== void 0, t.fields.tls_verify_value = e != null && e.tls_verify ? e == null ? void 0 : e.tls_verify : !1, t.fields.ca_certificates = ((V = e == null ? void 0 : e.ca_certificates) == null ? void 0 : V.join(",")) || "", t.fields.client_certificate = ((
|
|
1870
|
+
var s, V, G;
|
|
1871
|
+
t.fields.name = (e == null ? void 0 : e.name) || "", t.fields.tags = ((s = e == null ? void 0 : e.tags) == null ? void 0 : s.join(", ")) || "", t.fields.protocol = (e == null ? void 0 : e.protocol) || "http", t.fields.path = (e == null ? void 0 : e.path) || "", t.fields.read_timeout = e != null && e.read_timeout || (e == null ? void 0 : e.read_timeout) === 0 ? e == null ? void 0 : e.read_timeout : 6e4, t.fields.retries = e != null && e.retries || (e == null ? void 0 : e.retries) === 0 ? e == null ? void 0 : e.retries : 5, t.fields.host = (e == null ? void 0 : e.host) || "", t.fields.connect_timeout = e != null && e.connect_timeout || (e == null ? void 0 : e.connect_timeout) === 0 ? e == null ? void 0 : e.connect_timeout : 6e4, t.fields.tls_verify_enabled = (e == null ? void 0 : e.tls_verify) !== "" && (e == null ? void 0 : e.tls_verify) !== null && (e == null ? void 0 : e.tls_verify) !== void 0, t.fields.tls_verify_value = e != null && e.tls_verify ? e == null ? void 0 : e.tls_verify : !1, t.fields.ca_certificates = ((V = e == null ? void 0 : e.ca_certificates) == null ? void 0 : V.join(",")) || "", t.fields.client_certificate = ((G = e == null ? void 0 : e.client_certificate) == null ? void 0 : G.id) || "", t.fields.write_timeout = e != null && e.write_timeout || (e == null ? void 0 : e.write_timeout) === 0 ? e == null ? void 0 : e.write_timeout : 6e4, t.fields.port = e != null && e.port || (e == null ? void 0 : e.port) === 0 ? e == null ? void 0 : e.port : 80, Object.assign(U, t.fields);
|
|
1869
1872
|
}, g = () => {
|
|
1870
1873
|
B.push(a.config.cancelRoute);
|
|
1871
1874
|
}, m = h(() => {
|
|
@@ -1876,14 +1879,14 @@ const te = {
|
|
|
1876
1879
|
var s, V;
|
|
1877
1880
|
let e = `${a.config.apiBaseUrl}${ye.form[a.config.app][Y.value]}`;
|
|
1878
1881
|
return a.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((s = a.config) == null ? void 0 : s.controlPlaneId) || "") : a.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), e = e.replace(/{id}/gi, a.gatewayServiceId), e;
|
|
1879
|
-
}),
|
|
1882
|
+
}), O = (e) => {
|
|
1880
1883
|
let s = "";
|
|
1881
1884
|
e.url && (s = new URL(e.url).protocol), (["https", "wss", "tls"].includes(e.protocol) || ["https", "wss", "tls"].includes(s)) && (e.tls_verify = e.tls_verify_enabled ? e.tls_verify_value : null), delete e.tls_verify_enabled, delete e.tls_verify_value;
|
|
1882
1885
|
}, Q = h(() => {
|
|
1883
|
-
var s, V,
|
|
1886
|
+
var s, V, G, E;
|
|
1884
1887
|
const e = {
|
|
1885
1888
|
name: t.fields.name || null,
|
|
1886
|
-
tags: t.fields.tags ? (
|
|
1889
|
+
tags: t.fields.tags ? (G = (V = (s = t.fields.tags) == null ? void 0 : s.split(",")) == null ? void 0 : V.map((x) => String(x || "").trim())) == null ? void 0 : G.filter((x) => x !== "") : null,
|
|
1887
1890
|
protocol: t.fields.protocol,
|
|
1888
1891
|
path: t.fields.path || null,
|
|
1889
1892
|
read_timeout: t.fields.read_timeout,
|
|
@@ -1892,7 +1895,7 @@ const te = {
|
|
|
1892
1895
|
connect_timeout: t.fields.connect_timeout,
|
|
1893
1896
|
tls_verify_value: t.fields.tls_verify_value,
|
|
1894
1897
|
tls_verify_enabled: t.fields.tls_verify_enabled,
|
|
1895
|
-
ca_certificates: t.fields.ca_certificates ? (
|
|
1898
|
+
ca_certificates: t.fields.ca_certificates ? (E = t.fields.ca_certificates) == null ? void 0 : E.split(",").filter((x) => x !== "") : null,
|
|
1896
1899
|
client_certificate: t.fields.client_certificate ? { id: t.fields.client_certificate } : null,
|
|
1897
1900
|
write_timeout: t.fields.write_timeout,
|
|
1898
1901
|
port: t.fields.port,
|
|
@@ -1900,26 +1903,26 @@ const te = {
|
|
|
1900
1903
|
};
|
|
1901
1904
|
return t.fields.client_certificate && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.client_certificate = { id: t.fields.client_certificate }), t.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.tls_verify = t.fields.tls_verify_value), i.value || (e.path = null), Y.value === "create" ? l.value === "url" ? (delete e.protocol, delete e.host, delete e.path, a.config.app === "konnect" && delete e.port) : delete e.url : Y.value === "edit" && delete e.url, e;
|
|
1902
1905
|
}), j = async () => {
|
|
1903
|
-
var e, s, V,
|
|
1906
|
+
var e, s, V, G;
|
|
1904
1907
|
try {
|
|
1905
1908
|
t.isReadonly = !0, oe();
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1908
|
-
let
|
|
1909
|
-
if (await I.post(m.value,
|
|
1910
|
-
const { data: u } =
|
|
1911
|
-
t.fields.name = (u == null ? void 0 : u.name) || "", t.fields.port = u.port ||
|
|
1909
|
+
const E = Q.value;
|
|
1910
|
+
O(E);
|
|
1911
|
+
let x;
|
|
1912
|
+
if (await I.post(m.value, E), Y.value === "create" ? x = await I.post(w.value, E) : Y.value === "edit" && (x = ((e = a.config) == null ? void 0 : e.app) === "konnect" ? await I.put(w.value, E) : await I.patch(w.value, E)), x) {
|
|
1913
|
+
const { data: u } = x;
|
|
1914
|
+
t.fields.name = (u == null ? void 0 : u.name) || "", t.fields.port = u.port || R.getPortFromProtocol(u.protocol), t.fields.protocol = (u == null ? void 0 : u.protocol) || "http", t.fields.host = (u == null ? void 0 : u.host) || "", t.fields.path = (u == null ? void 0 : u.path) || "", t.fields.url = (u == null ? void 0 : u.url) || "", t.fields.retries = u != null && u.retries || (u == null ? void 0 : u.retries) === 0 ? u == null ? void 0 : u.retries : 5, t.fields.connect_timeout = u != null && u.connect_timeout || (u == null ? void 0 : u.connect_timeout) === 0 ? u == null ? void 0 : u.connect_timeout : 6e4, t.fields.write_timeout = u != null && u.write_timeout || (u == null ? void 0 : u.write_timeout) === 0 ? u == null ? void 0 : u.write_timeout : 6e4, t.fields.read_timeout = u != null && u.read_timeout || (u == null ? void 0 : u.read_timeout) === 0 ? u == null ? void 0 : u.read_timeout : 6e4, t.fields.client_certificate = ((s = u == null ? void 0 : u.client_certificate) == null ? void 0 : s.id) || "", t.fields.ca_certificates = (V = u == null ? void 0 : u.ca_certificates) != null && V.length ? u == null ? void 0 : u.ca_certificates.join(",") : "", t.fields.tls_verify_enabled = (u == null ? void 0 : u.tls_verify) !== "" && (u == null ? void 0 : u.tls_verify) !== null && (u == null ? void 0 : u.tls_verify) !== void 0, t.fields.tls_verify_value = t.fields.tls_verify_enabled && (u == null ? void 0 : u.tls_verify), t.fields.tags = (G = u == null ? void 0 : u.tags) != null && G.length ? u.tags.join(", ") : "", Object.assign(U, t.fields), p("update", x == null ? void 0 : x.data);
|
|
1912
1915
|
}
|
|
1913
|
-
return
|
|
1914
|
-
} catch (
|
|
1915
|
-
const { fields:
|
|
1916
|
-
t.errorMessages = u,
|
|
1916
|
+
return x;
|
|
1917
|
+
} catch (E) {
|
|
1918
|
+
const { fields: x, messages: u } = K(E);
|
|
1919
|
+
t.errorMessages = u, x.length && x.forEach((we) => {
|
|
1917
1920
|
const Ie = we.field;
|
|
1918
1921
|
Ie === "client_certificate.id" ? t.formFieldErrors.client_certificate = we.message : Ie.startsWith("ca_certificates") ? t.formFieldErrors.ca_certificates = we.message : Object.keys(t.formFieldErrors).includes(Ie) && (t.formFieldErrors = {
|
|
1919
1922
|
...t.formFieldErrors,
|
|
1920
1923
|
[Ie]: we.message
|
|
1921
1924
|
});
|
|
1922
|
-
}), p("error",
|
|
1925
|
+
}), p("error", E);
|
|
1923
1926
|
} finally {
|
|
1924
1927
|
t.isReadonly = !1;
|
|
1925
1928
|
}
|
|
@@ -1927,7 +1930,7 @@ const te = {
|
|
|
1927
1930
|
return Ue(() => a.gatewayServiceId, () => {
|
|
1928
1931
|
Object.assign(t.fields, U);
|
|
1929
1932
|
}), Ue(t.fields, (e) => {
|
|
1930
|
-
t.fields.port =
|
|
1933
|
+
t.fields.port = R.getPortFromProtocol(e.protocol, String(e.port)), p("model-updated", Q.value);
|
|
1931
1934
|
}), Je(() => {
|
|
1932
1935
|
p("model-updated", Q.value), re.value || (t.fields.name = ve());
|
|
1933
1936
|
}), M({
|
|
@@ -1937,13 +1940,13 @@ const te = {
|
|
|
1937
1940
|
canSubmit: $,
|
|
1938
1941
|
initForm: c
|
|
1939
1942
|
}), (e, s) => {
|
|
1940
|
-
const V = D("KRadio"),
|
|
1941
|
-
return C(),
|
|
1943
|
+
const V = D("KRadio"), G = D("KButton"), E = D("KInput"), x = D("KSelect"), u = D("KCheckbox"), we = D("KCollapse"), Ie = D("KAlert");
|
|
1944
|
+
return C(), F("div", al, [
|
|
1942
1945
|
d(o(tt), {
|
|
1943
1946
|
"can-submit": $.value,
|
|
1944
1947
|
config: n.config,
|
|
1945
1948
|
"edit-id": n.gatewayServiceId,
|
|
1946
|
-
"entity-type": o(
|
|
1949
|
+
"entity-type": o(Ge).GatewayService,
|
|
1947
1950
|
"fetch-url": A.value,
|
|
1948
1951
|
"form-fields": Q.value,
|
|
1949
1952
|
"is-readonly": t.isReadonly,
|
|
@@ -1967,7 +1970,7 @@ const te = {
|
|
|
1967
1970
|
title: o(r)("gateway_services.form.sections.keys.title")
|
|
1968
1971
|
}, {
|
|
1969
1972
|
default: v(() => [
|
|
1970
|
-
re.value ?
|
|
1973
|
+
re.value ? T("", !0) : (C(), F("div", nl, [
|
|
1971
1974
|
S("div", cl, [
|
|
1972
1975
|
d(V, {
|
|
1973
1976
|
modelValue: l.value,
|
|
@@ -1995,8 +1998,8 @@ const te = {
|
|
|
1995
1998
|
]),
|
|
1996
1999
|
d(We, { name: "slide-fade" }, {
|
|
1997
2000
|
default: v(() => [
|
|
1998
|
-
l.value === "url" ? (C(),
|
|
1999
|
-
d(
|
|
2001
|
+
l.value === "url" ? (C(), F("div", dl, [
|
|
2002
|
+
d(E, {
|
|
2000
2003
|
modelValue: t.fields.url,
|
|
2001
2004
|
"onUpdate:modelValue": s[2] || (s[2] = (_) => t.fields.url = _),
|
|
2002
2005
|
modelModifiers: { trim: !0 },
|
|
@@ -2013,33 +2016,33 @@ const te = {
|
|
|
2013
2016
|
placeholder: o(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
2014
2017
|
required: "",
|
|
2015
2018
|
onInput: o(me)
|
|
2016
|
-
},
|
|
2019
|
+
}, xe({ _: 2 }, [
|
|
2017
2020
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2018
2021
|
name: "after",
|
|
2019
2022
|
fn: v(() => [
|
|
2020
|
-
d(
|
|
2023
|
+
d(G, {
|
|
2021
2024
|
appearance: "tertiary",
|
|
2022
2025
|
size: "small",
|
|
2023
2026
|
onClick: Ce
|
|
2024
2027
|
}, {
|
|
2025
|
-
default: v(() =>
|
|
2026
|
-
z("
|
|
2027
|
-
])
|
|
2028
|
+
default: v(() => [
|
|
2029
|
+
z(P(o(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2030
|
+
]),
|
|
2028
2031
|
_: 1
|
|
2029
2032
|
})
|
|
2030
2033
|
]),
|
|
2031
2034
|
key: "0"
|
|
2032
2035
|
}
|
|
2033
2036
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "onInput"])
|
|
2034
|
-
])) :
|
|
2037
|
+
])) : T("", !0)
|
|
2035
2038
|
]),
|
|
2036
2039
|
_: 1
|
|
2037
2040
|
})
|
|
2038
2041
|
])),
|
|
2039
2042
|
d(We, { name: "slide-fade" }, {
|
|
2040
2043
|
default: v(() => [
|
|
2041
|
-
l.value === "protocol" || re.value ? (C(),
|
|
2042
|
-
d(
|
|
2044
|
+
l.value === "protocol" || re.value ? (C(), F("div", ul, [
|
|
2045
|
+
d(x, {
|
|
2043
2046
|
modelValue: t.fields.protocol,
|
|
2044
2047
|
"onUpdate:modelValue": s[3] || (s[3] = (_) => t.fields.protocol = _),
|
|
2045
2048
|
"data-testid": "gateway-service-protocol-select",
|
|
@@ -2054,7 +2057,7 @@ const te = {
|
|
|
2054
2057
|
width: "100%",
|
|
2055
2058
|
onSelected: s[4] || (s[4] = (_) => pe(t.fields.protocol, _))
|
|
2056
2059
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2057
|
-
d(
|
|
2060
|
+
d(E, {
|
|
2058
2061
|
modelValue: t.fields.host,
|
|
2059
2062
|
"onUpdate:modelValue": s[5] || (s[5] = (_) => t.fields.host = _),
|
|
2060
2063
|
modelModifiers: { trim: !0 },
|
|
@@ -2071,26 +2074,26 @@ const te = {
|
|
|
2071
2074
|
placeholder: o(r)("gateway_services.form.fields.host.placeholder"),
|
|
2072
2075
|
required: "",
|
|
2073
2076
|
onInput: s[6] || (s[6] = (_) => o(le)("host"))
|
|
2074
|
-
},
|
|
2077
|
+
}, xe({ _: 2 }, [
|
|
2075
2078
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2076
2079
|
name: "after",
|
|
2077
2080
|
fn: v(() => [
|
|
2078
|
-
d(
|
|
2081
|
+
d(G, {
|
|
2079
2082
|
appearance: "tertiary",
|
|
2080
2083
|
size: "small",
|
|
2081
2084
|
onClick: Ce
|
|
2082
2085
|
}, {
|
|
2083
|
-
default: v(() =>
|
|
2084
|
-
z("
|
|
2085
|
-
])
|
|
2086
|
+
default: v(() => [
|
|
2087
|
+
z(P(o(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2088
|
+
]),
|
|
2086
2089
|
_: 1
|
|
2087
2090
|
})
|
|
2088
2091
|
]),
|
|
2089
2092
|
key: "0"
|
|
2090
2093
|
}
|
|
2091
2094
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
2092
|
-
i.value ? (C(),
|
|
2093
|
-
d(
|
|
2095
|
+
i.value ? (C(), F("div", fl, [
|
|
2096
|
+
d(E, {
|
|
2094
2097
|
modelValue: t.fields.path,
|
|
2095
2098
|
"onUpdate:modelValue": s[7] || (s[7] = (_) => t.fields.path = _),
|
|
2096
2099
|
modelModifiers: { trim: !0 },
|
|
@@ -2107,8 +2110,8 @@ const te = {
|
|
|
2107
2110
|
placeholder: o(r)("gateway_services.form.fields.path.placeholder"),
|
|
2108
2111
|
onInput: s[8] || (s[8] = (_) => o(le)("path"))
|
|
2109
2112
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2110
|
-
])) :
|
|
2111
|
-
d(
|
|
2113
|
+
])) : T("", !0),
|
|
2114
|
+
d(E, {
|
|
2112
2115
|
modelValue: t.fields.port,
|
|
2113
2116
|
"onUpdate:modelValue": [
|
|
2114
2117
|
s[9] || (s[9] = (_) => t.fields.port = _),
|
|
@@ -2129,7 +2132,7 @@ const te = {
|
|
|
2129
2132
|
type: "number",
|
|
2130
2133
|
onInput: s[10] || (s[10] = (_) => o(le)("port"))
|
|
2131
2134
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
2132
|
-
])) :
|
|
2135
|
+
])) : T("", !0)
|
|
2133
2136
|
]),
|
|
2134
2137
|
_: 1
|
|
2135
2138
|
}),
|
|
@@ -2143,9 +2146,9 @@ const te = {
|
|
|
2143
2146
|
default: v(() => [
|
|
2144
2147
|
d(We, { name: "slide-fade" }, {
|
|
2145
2148
|
default: v(() => [
|
|
2146
|
-
b.value ?
|
|
2149
|
+
b.value ? T("", !0) : (C(), F("div", pl, [
|
|
2147
2150
|
S("div", ml, [
|
|
2148
|
-
d(
|
|
2151
|
+
d(E, {
|
|
2149
2152
|
modelValue: t.fields.retries,
|
|
2150
2153
|
"onUpdate:modelValue": [
|
|
2151
2154
|
s[12] || (s[12] = (_) => t.fields.retries = _),
|
|
@@ -2166,7 +2169,7 @@ const te = {
|
|
|
2166
2169
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2167
2170
|
]),
|
|
2168
2171
|
S("div", vl, [
|
|
2169
|
-
d(
|
|
2172
|
+
d(E, {
|
|
2170
2173
|
modelValue: t.fields.connect_timeout,
|
|
2171
2174
|
"onUpdate:modelValue": [
|
|
2172
2175
|
s[14] || (s[14] = (_) => t.fields.connect_timeout = _),
|
|
@@ -2187,7 +2190,7 @@ const te = {
|
|
|
2187
2190
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2188
2191
|
]),
|
|
2189
2192
|
S("div", gl, [
|
|
2190
|
-
d(
|
|
2193
|
+
d(E, {
|
|
2191
2194
|
modelValue: t.fields.write_timeout,
|
|
2192
2195
|
"onUpdate:modelValue": [
|
|
2193
2196
|
s[16] || (s[16] = (_) => t.fields.write_timeout = _),
|
|
@@ -2208,7 +2211,7 @@ const te = {
|
|
|
2208
2211
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2209
2212
|
]),
|
|
2210
2213
|
S("div", yl, [
|
|
2211
|
-
d(
|
|
2214
|
+
d(E, {
|
|
2212
2215
|
modelValue: t.fields.read_timeout,
|
|
2213
2216
|
"onUpdate:modelValue": [
|
|
2214
2217
|
s[18] || (s[18] = (_) => t.fields.read_timeout = _),
|
|
@@ -2228,8 +2231,8 @@ const te = {
|
|
|
2228
2231
|
type: "number"
|
|
2229
2232
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2230
2233
|
]),
|
|
2231
|
-
f.value ? (C(),
|
|
2232
|
-
d(
|
|
2234
|
+
f.value ? (C(), F("div", _l, [
|
|
2235
|
+
d(E, {
|
|
2233
2236
|
modelValue: t.fields.client_certificate,
|
|
2234
2237
|
"onUpdate:modelValue": s[20] || (s[20] = (_) => t.fields.client_certificate = _),
|
|
2235
2238
|
modelModifiers: { trim: !0 },
|
|
@@ -2247,9 +2250,9 @@ const te = {
|
|
|
2247
2250
|
type: "text",
|
|
2248
2251
|
onInput: s[21] || (s[21] = (_) => o(be)("client_certificate"))
|
|
2249
2252
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
2250
|
-
])) :
|
|
2251
|
-
k.value ? (C(),
|
|
2252
|
-
d(
|
|
2253
|
+
])) : T("", !0),
|
|
2254
|
+
k.value ? (C(), F("div", bl, [
|
|
2255
|
+
d(E, {
|
|
2253
2256
|
modelValue: t.fields.ca_certificates,
|
|
2254
2257
|
"onUpdate:modelValue": s[22] || (s[22] = (_) => t.fields.ca_certificates = _),
|
|
2255
2258
|
modelModifiers: { trim: !0 },
|
|
@@ -2269,18 +2272,18 @@ const te = {
|
|
|
2269
2272
|
scope: "global"
|
|
2270
2273
|
}, {
|
|
2271
2274
|
code1: v(() => [
|
|
2272
|
-
S("code", null,
|
|
2275
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
2273
2276
|
]),
|
|
2274
2277
|
code2: v(() => [
|
|
2275
|
-
S("code", null,
|
|
2278
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
2276
2279
|
]),
|
|
2277
2280
|
_: 1
|
|
2278
2281
|
})
|
|
2279
2282
|
]),
|
|
2280
2283
|
_: 1
|
|
2281
2284
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2282
|
-
])) :
|
|
2283
|
-
H.value ? (C(),
|
|
2285
|
+
])) : T("", !0),
|
|
2286
|
+
H.value ? (C(), F("div", hl, [
|
|
2284
2287
|
d(u, {
|
|
2285
2288
|
modelValue: t.fields.tls_verify_enabled,
|
|
2286
2289
|
"onUpdate:modelValue": s[24] || (s[24] = (_) => t.fields.tls_verify_enabled = _),
|
|
@@ -2295,14 +2298,14 @@ const te = {
|
|
|
2295
2298
|
scope: "global"
|
|
2296
2299
|
}, {
|
|
2297
2300
|
code1: v(() => [
|
|
2298
|
-
S("code", null,
|
|
2301
|
+
S("code", null, P(o(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
2299
2302
|
]),
|
|
2300
2303
|
_: 1
|
|
2301
2304
|
})
|
|
2302
2305
|
]),
|
|
2303
2306
|
_: 1
|
|
2304
2307
|
}, 8, ["modelValue", "description", "label"]),
|
|
2305
|
-
t.fields.tls_verify_enabled ? (C(),
|
|
2308
|
+
t.fields.tls_verify_enabled ? (C(), F("div", wl, [
|
|
2306
2309
|
d(V, {
|
|
2307
2310
|
modelValue: t.fields.tls_verify_value,
|
|
2308
2311
|
"onUpdate:modelValue": s[25] || (s[25] = (_) => t.fields.tls_verify_value = _),
|
|
@@ -2310,8 +2313,8 @@ const te = {
|
|
|
2310
2313
|
label: o(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
2311
2314
|
"selected-value": !0
|
|
2312
2315
|
}, null, 8, ["modelValue", "label"])
|
|
2313
|
-
])) :
|
|
2314
|
-
t.fields.tls_verify_enabled ? (C(),
|
|
2316
|
+
])) : T("", !0),
|
|
2317
|
+
t.fields.tls_verify_enabled ? (C(), F("div", kl, [
|
|
2315
2318
|
d(V, {
|
|
2316
2319
|
modelValue: t.fields.tls_verify_value,
|
|
2317
2320
|
"onUpdate:modelValue": s[26] || (s[26] = (_) => t.fields.tls_verify_value = _),
|
|
@@ -2319,8 +2322,8 @@ const te = {
|
|
|
2319
2322
|
label: o(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
2320
2323
|
"selected-value": !1
|
|
2321
2324
|
}, null, 8, ["modelValue", "label"])
|
|
2322
|
-
])) :
|
|
2323
|
-
])) :
|
|
2325
|
+
])) : T("", !0)
|
|
2326
|
+
])) : T("", !0)
|
|
2324
2327
|
]))
|
|
2325
2328
|
]),
|
|
2326
2329
|
_: 1
|
|
@@ -2337,7 +2340,7 @@ const te = {
|
|
|
2337
2340
|
title: o(r)("gateway_services.form.sections.general.title")
|
|
2338
2341
|
}, {
|
|
2339
2342
|
default: v(() => [
|
|
2340
|
-
d(
|
|
2343
|
+
d(E, {
|
|
2341
2344
|
modelValue: t.fields.name,
|
|
2342
2345
|
"onUpdate:modelValue": s[28] || (s[28] = (_) => t.fields.name = _),
|
|
2343
2346
|
modelModifiers: { trim: !0 },
|
|
@@ -2363,7 +2366,7 @@ const te = {
|
|
|
2363
2366
|
}, {
|
|
2364
2367
|
default: v(() => [
|
|
2365
2368
|
S("div", Vl, [
|
|
2366
|
-
d(
|
|
2369
|
+
d(E, {
|
|
2367
2370
|
modelValue: t.fields.tags,
|
|
2368
2371
|
"onUpdate:modelValue": s[29] || (s[29] = (_) => t.fields.tags = _),
|
|
2369
2372
|
modelModifiers: { trim: !0 },
|
|
@@ -2393,21 +2396,21 @@ const te = {
|
|
|
2393
2396
|
}, {
|
|
2394
2397
|
default: v(() => [
|
|
2395
2398
|
S("ul", Cl, [
|
|
2396
|
-
(C(!0),
|
|
2399
|
+
(C(!0), F(ot, null, it(t.errorMessages, (_) => (C(), F("li", { key: _ }, P(_), 1))), 128))
|
|
2397
2400
|
])
|
|
2398
2401
|
]),
|
|
2399
2402
|
_: 1
|
|
2400
|
-
})) :
|
|
2403
|
+
})) : T("", !0)
|
|
2401
2404
|
]),
|
|
2402
2405
|
_: 3
|
|
2403
2406
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
2404
2407
|
]);
|
|
2405
2408
|
};
|
|
2406
2409
|
}
|
|
2407
|
-
}),
|
|
2410
|
+
}), xl = /* @__PURE__ */ Ne(Sl, [["__scopeId", "data-v-291510a6"]]);
|
|
2408
2411
|
export {
|
|
2409
|
-
|
|
2410
|
-
|
|
2412
|
+
Rl as GatewayServiceConfigCard,
|
|
2413
|
+
xl as GatewayServiceForm,
|
|
2411
2414
|
$l as GatewayServiceList,
|
|
2412
2415
|
Al as LegacyGatewayServiceForm
|
|
2413
2416
|
};
|