@kong-ui-public/entities-gateway-services 3.10.6-pr.2001.a3134f252.0 → 3.10.6-pr.2001.c2e28f3c9.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 Ke, computed as h, ref as W, watch as $e, onBeforeMount as lt, resolveComponent as D, openBlock as C, createElementBlock as F, createVNode as u, unref as o, createSlots as
|
|
1
|
+
import { defineComponent as Ke, computed as h, ref as W, watch as $e, onBeforeMount as lt, resolveComponent as D, openBlock as C, createElementBlock as F, createVNode as u, unref as o, createSlots as Te, withCtx as v, createBlock as Fe, Teleport as je, createElementVNode as S, createCommentVNode as M, createTextVNode as z, toDisplayString as P, withModifiers as Le, reactive as Re, 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";
|
|
@@ -74,7 +74,7 @@ const Vt = {
|
|
|
74
74
|
invalid: "Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"
|
|
75
75
|
},
|
|
76
76
|
url: {
|
|
77
|
-
invalid: "URL
|
|
77
|
+
invalid: "The URL must follow a valid format. Example: https://api.kong-air.com/flights"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
sections: {
|
|
@@ -251,52 +251,52 @@ function Ut() {
|
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function At() {
|
|
255
255
|
const { i18n: { t: n } } = ge.useI18n();
|
|
256
256
|
return {
|
|
257
257
|
validateHost: (b) => {
|
|
258
258
|
if (!b || b.trim() === "") return n("gateway_services.form.errors.host.empty");
|
|
259
|
-
const
|
|
260
|
-
return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(b) ||
|
|
259
|
+
const R = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;
|
|
260
|
+
return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(b) || R.test(b) ? "" : n("gateway_services.form.errors.host.invalid");
|
|
261
261
|
},
|
|
262
|
-
validateProtocol: (b,
|
|
262
|
+
validateProtocol: (b, R) => !b || b.trim() === "" ? n("gateway_services.form.errors.protocol.empty") : (b = b.slice(0, -1), R.find((r) => {
|
|
263
263
|
if (r.value === b) return r;
|
|
264
264
|
}) === void 0 ? n("gateway_services.form.errors.protocol.invalid") : ""),
|
|
265
265
|
validatePath: (b) => !b || b === "" ? "" : b.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(b) ? n("gateway_services.form.errors.path.invalid") : "" : n("gateway_services.form.errors.path.prefix"),
|
|
266
266
|
validatePort: (b) => {
|
|
267
267
|
if (b == null || b === "")
|
|
268
268
|
return "";
|
|
269
|
-
const
|
|
270
|
-
return isNaN(
|
|
269
|
+
const R = typeof b == "string" ? parseInt(b, 10) : b;
|
|
270
|
+
return isNaN(R) ? n("gateway_services.form.errors.port.type") : R < 0 || R > 65535 ? n("gateway_services.form.errors.port.invalid") : "";
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
const ge = {
|
|
275
275
|
useI18n: $t,
|
|
276
276
|
usePortFromProtocol: Ut,
|
|
277
|
-
useUrlValidators:
|
|
278
|
-
},
|
|
277
|
+
useUrlValidators: At
|
|
278
|
+
}, Ae = "/v2/control-planes/{controlPlaneId}/core-entities", xe = "/{workspace}", ye = {
|
|
279
279
|
list: {
|
|
280
280
|
konnect: {
|
|
281
|
-
all: `${
|
|
281
|
+
all: `${Ae}/services`
|
|
282
282
|
},
|
|
283
283
|
kongManager: {
|
|
284
|
-
all: `${
|
|
284
|
+
all: `${xe}/services`
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
form: {
|
|
288
288
|
konnect: {
|
|
289
|
-
create: `${xe}/services`,
|
|
290
|
-
validate: `${xe}/v1/schemas/json/service/validate`,
|
|
291
|
-
edit: `${xe}/services/{id}`
|
|
292
|
-
},
|
|
293
|
-
kongManager: {
|
|
294
289
|
create: `${Ae}/services`,
|
|
295
|
-
validate: `${Ae}/schemas/
|
|
290
|
+
validate: `${Ae}/v1/schemas/json/service/validate`,
|
|
296
291
|
edit: `${Ae}/services/{id}`
|
|
292
|
+
},
|
|
293
|
+
kongManager: {
|
|
294
|
+
create: `${xe}/services`,
|
|
295
|
+
validate: `${xe}/schemas/services/validate`,
|
|
296
|
+
edit: `${xe}/services/{id}`
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, xt = "#00abd2", Tt = "24px", Rt = { class: "kong-ui-entities-gateway-services-list" }, Mt = { class: "button-row" }, Bt = { class: "empty-state-icon-gateway" }, Kt = { key: 1 }, Lt = /* @__PURE__ */ Ke({
|
|
300
300
|
__name: "GatewayServiceList",
|
|
301
301
|
props: {
|
|
302
302
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -356,7 +356,7 @@ const ge = {
|
|
|
356
356
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
357
357
|
setup(n, { emit: B }) {
|
|
358
358
|
var c;
|
|
359
|
-
const y = B, p = n, { i18n: { t: a, formatUnixTimeStamp: b } } = ge.useI18n(),
|
|
359
|
+
const y = B, p = n, { i18n: { t: a, formatUnixTimeStamp: b } } = ge.useI18n(), R = qe(), { axiosInstance: H } = Oe((c = p.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: L } = ct(() => ee.value), I = h(() => r.value && p.config.app === "konnect"), ie = h(() => !p.enableV2EmptyStates && p.config.app === "konnect"), de = h(() => p.config.app !== "kongManager" || !!p.config.disableSorting), X = {
|
|
360
360
|
// the Name column is non-hidable
|
|
361
361
|
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
362
362
|
...p.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -372,11 +372,11 @@ const ge = {
|
|
|
372
372
|
columnVisibility: {
|
|
373
373
|
created_at: !1
|
|
374
374
|
}
|
|
375
|
-
}, fe = X,
|
|
375
|
+
}, fe = X, A = h(() => {
|
|
376
376
|
var m, w;
|
|
377
377
|
let g = `${p.config.apiBaseUrl}${ye.list[p.config.app].all}`;
|
|
378
378
|
return p.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((m = p.config) == null ? void 0 : m.controlPlaneId) || "") : p.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (w = p.config) != null && w.workspace ? `/${p.config.workspace}` : "")), g;
|
|
379
|
-
}), Y = h(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${
|
|
379
|
+
}), Y = h(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${A.value}`) : new URL(A.value)), ee = W(""), re = h(() => {
|
|
380
380
|
const g = p.config.app === "konnect" || p.config.isExactMatch;
|
|
381
381
|
if (g)
|
|
382
382
|
return {
|
|
@@ -391,9 +391,9 @@ const ge = {
|
|
|
391
391
|
};
|
|
392
392
|
}), {
|
|
393
393
|
fetcher: l,
|
|
394
|
-
fetcherState:
|
|
394
|
+
fetcherState: x,
|
|
395
395
|
fetcherCacheKey: se
|
|
396
|
-
} = ut({ ...p.config, cacheIdentifier: p.cacheIdentifier },
|
|
396
|
+
} = ut({ ...p.config, cacheIdentifier: p.cacheIdentifier }, A.value), Pe = () => {
|
|
397
397
|
ee.value = "";
|
|
398
398
|
}, t = () => {
|
|
399
399
|
se.value++;
|
|
@@ -429,7 +429,7 @@ const ge = {
|
|
|
429
429
|
y("error", j);
|
|
430
430
|
}
|
|
431
431
|
}, Ce = (g) => {
|
|
432
|
-
p.config.getControlPlaneRoute &&
|
|
432
|
+
p.config.getControlPlaneRoute && R.push(p.config.getControlPlaneRoute(g));
|
|
433
433
|
}, me = (g, m) => {
|
|
434
434
|
const w = g.id;
|
|
435
435
|
if (!m(w)) {
|
|
@@ -460,18 +460,18 @@ const ge = {
|
|
|
460
460
|
});
|
|
461
461
|
}, Se = async (g) => {
|
|
462
462
|
var w;
|
|
463
|
-
await ((w = p.canRetrieve) == null ? void 0 : w.call(p, g)) &&
|
|
463
|
+
await ((w = p.canRetrieve) == null ? void 0 : w.call(p, g)) && R.push(p.config.getViewRoute(g.id));
|
|
464
464
|
}, ue = (g) => ({
|
|
465
465
|
label: a("actions.view"),
|
|
466
466
|
to: p.config.getViewRoute(g)
|
|
467
467
|
}), le = (g) => ({
|
|
468
468
|
label: a("actions.edit"),
|
|
469
469
|
to: p.config.getEditRoute(g)
|
|
470
|
-
}), N = W(void 0),
|
|
471
|
-
N.value = g,
|
|
470
|
+
}), N = W(void 0), J = W(!1), oe = W(!1), ve = W(""), i = dt(p.config, A.value), f = (g) => {
|
|
471
|
+
N.value = g, J.value = !0, ve.value = "";
|
|
472
472
|
}, k = () => {
|
|
473
|
-
|
|
474
|
-
},
|
|
473
|
+
J.value = !1, N.value = void 0;
|
|
474
|
+
}, Z = async () => {
|
|
475
475
|
var g, m, w;
|
|
476
476
|
if ((g = N.value) != null && g.id) {
|
|
477
477
|
oe.value = !0;
|
|
@@ -484,9 +484,9 @@ const ge = {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
}, K = () => {
|
|
487
|
-
|
|
487
|
+
R.push(p.config.createRoute);
|
|
488
488
|
};
|
|
489
|
-
$e(
|
|
489
|
+
$e(x, (g) => {
|
|
490
490
|
var m, w, O;
|
|
491
491
|
if (g.status === ft.Error) {
|
|
492
492
|
$.value = {
|
|
@@ -501,7 +501,7 @@ const ge = {
|
|
|
501
501
|
U.value = await p.canCreate();
|
|
502
502
|
}), (g, m) => {
|
|
503
503
|
const w = D("KButton"), O = D("KBadge"), Q = D("KInputSwitch"), j = D("KDropdownItem"), he = D("KClipboardProvider");
|
|
504
|
-
return C(), F("div",
|
|
504
|
+
return C(), F("div", Rt, [
|
|
505
505
|
u(o(pt), {
|
|
506
506
|
"cache-identifier": n.cacheIdentifier,
|
|
507
507
|
"default-table-preferences": ke,
|
|
@@ -519,7 +519,7 @@ const ge = {
|
|
|
519
519
|
"onClick:row": m[5] || (m[5] = (e) => Se(e)),
|
|
520
520
|
onSort: t,
|
|
521
521
|
onState: o(L)
|
|
522
|
-
},
|
|
522
|
+
}, Te({
|
|
523
523
|
"toolbar-filter": v(() => [
|
|
524
524
|
u(o(mt), {
|
|
525
525
|
modelValue: ee.value,
|
|
@@ -729,12 +729,12 @@ const ge = {
|
|
|
729
729
|
title: o(a)("gateway_services.empty_state_v2.title"),
|
|
730
730
|
"onClick:create": K,
|
|
731
731
|
"onClick:learnMore": m[3] || (m[3] = (s) => g.$emit("click:learn-more"))
|
|
732
|
-
},
|
|
732
|
+
}, Te({
|
|
733
733
|
image: v(() => [
|
|
734
734
|
S("div", Bt, [
|
|
735
735
|
u(o(st), {
|
|
736
|
-
color: o(
|
|
737
|
-
size: o(
|
|
736
|
+
color: o(xt),
|
|
737
|
+
size: o(Tt)
|
|
738
738
|
}, null, 8, ["color", "size"])
|
|
739
739
|
])
|
|
740
740
|
]),
|
|
@@ -770,9 +770,9 @@ const ge = {
|
|
|
770
770
|
"entity-type": o(bt).GatewayService,
|
|
771
771
|
error: ve.value,
|
|
772
772
|
title: o(a)("actions.delete.title"),
|
|
773
|
-
visible:
|
|
773
|
+
visible: J.value,
|
|
774
774
|
onCancel: k,
|
|
775
|
-
onProceed:
|
|
775
|
+
onProceed: Z
|
|
776
776
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
777
777
|
]);
|
|
778
778
|
};
|
|
@@ -788,7 +788,7 @@ const ge = {
|
|
|
788
788
|
}, Nt = {
|
|
789
789
|
key: 1,
|
|
790
790
|
class: "gateway-service-form-group-fields"
|
|
791
|
-
}, jt = { key: 0 }, zt = { class: "gateway-service-form-margin-top" }, Ht = { class: "gateway-service-form-margin-bottom" },
|
|
791
|
+
}, jt = { key: 0 }, zt = { class: "gateway-service-form-margin-top" }, Ht = { class: "gateway-service-form-margin-bottom" }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = { class: "gateway-service-form-margin-bottom" }, Qt = { class: "gateway-service-form-margin-bottom" }, Xt = {
|
|
792
792
|
key: 0,
|
|
793
793
|
class: "gateway-service-form-margin-bottom"
|
|
794
794
|
}, Yt = {
|
|
@@ -828,7 +828,7 @@ const ge = {
|
|
|
828
828
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
829
829
|
setup(n, { expose: B, emit: y }) {
|
|
830
830
|
var ve;
|
|
831
|
-
const p = y, a = n, b = W(!0),
|
|
831
|
+
const p = y, a = n, b = W(!0), R = qe(), { i18nT: H, i18n: { t: r } } = ge.useI18n(), { getMessageFromError: L } = Xe(), { axiosInstance: I } = Oe((ve = a.config) == null ? void 0 : ve.axiosRequestConfig), ie = Ye(), de = 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 = Re({
|
|
832
832
|
fields: {
|
|
833
833
|
name: "",
|
|
834
834
|
protocol: "http",
|
|
@@ -848,7 +848,7 @@ const ge = {
|
|
|
848
848
|
},
|
|
849
849
|
isReadonly: !1,
|
|
850
850
|
errorMessage: ""
|
|
851
|
-
}),
|
|
851
|
+
}), x = Re({
|
|
852
852
|
name: "",
|
|
853
853
|
protocol: "http",
|
|
854
854
|
host: "",
|
|
@@ -926,9 +926,9 @@ const ge = {
|
|
|
926
926
|
], t = { url: "url", protocol: "protocol" }, $ = (i, f) => {
|
|
927
927
|
f.value;
|
|
928
928
|
}, ae = (i) => i ? parseFloat(i) : 0, ne = () => {
|
|
929
|
-
b.value = !0, l.errorMessage = "", l.fields.host =
|
|
929
|
+
b.value = !0, l.errorMessage = "", l.fields.host = x.host, l.fields.path = x.path, l.fields.port = x.port, l.fields.protocol = x.protocol, l.fields.url = x.url, l.fields.retries = x.retries, l.fields.connect_timeout = x.connect_timeout, l.fields.write_timeout = x.write_timeout, l.fields.read_timeout = x.read_timeout, l.fields.client_certificate = x.client_certificate, l.fields.ca_certificates = x.ca_certificates, l.fields.tls_verify_enabled = x.tls_verify_enabled, l.fields.tls_verify_value = x.tls_verify_value;
|
|
930
930
|
}, q = () => {
|
|
931
|
-
if (l.fields.url &&
|
|
931
|
+
if (l.fields.url && A.value === "url")
|
|
932
932
|
try {
|
|
933
933
|
const i = new URL(l.fields.url);
|
|
934
934
|
l.errorMessage = "", l.fields.protocol = i.protocol.slice(0, -1), l.fields.host = i.hostname, l.fields.path = i.pathname;
|
|
@@ -940,27 +940,27 @@ const ge = {
|
|
|
940
940
|
else
|
|
941
941
|
p("url-valid:success"), l.errorMessage = "";
|
|
942
942
|
}, pe = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(l.fields.protocol)), ce = h(() => {
|
|
943
|
-
if (
|
|
943
|
+
if (A.value === "url")
|
|
944
944
|
return !0;
|
|
945
945
|
const i = ["https", "wss", "tls"].includes(l.fields.protocol);
|
|
946
|
-
return
|
|
946
|
+
return A.value === "protocol" && i;
|
|
947
947
|
}), _e = h(() => {
|
|
948
|
-
if (
|
|
948
|
+
if (A.value === "url")
|
|
949
949
|
return !0;
|
|
950
950
|
const i = ["https", "tls"].includes(l.fields.protocol);
|
|
951
|
-
return
|
|
951
|
+
return A.value === "protocol" && i;
|
|
952
952
|
}), Ve = h(() => {
|
|
953
|
-
if (
|
|
953
|
+
if (A.value === "url")
|
|
954
954
|
return !0;
|
|
955
955
|
const i = ["https", "wss", "tls"].includes(l.fields.protocol);
|
|
956
|
-
return
|
|
956
|
+
return A.value === "protocol" && i;
|
|
957
957
|
}), Ce = (i) => {
|
|
958
958
|
ee.value = ie.utf8Name(i);
|
|
959
|
-
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(
|
|
960
|
-
var f, k,
|
|
961
|
-
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 = ((
|
|
959
|
+
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(x) || A.value === "url" && !!l.fields.url || A.value === "protocol" && !!l.fields.host), be = (i) => {
|
|
960
|
+
var f, k, Z;
|
|
961
|
+
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 = ((Z = i == null ? void 0 : i.client_certificate) == null ? void 0 : Z.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(x, l.fields);
|
|
962
962
|
}, Se = () => {
|
|
963
|
-
|
|
963
|
+
R.push(a.config.cancelRoute);
|
|
964
964
|
}, ue = h(() => {
|
|
965
965
|
var f, k;
|
|
966
966
|
let i = `${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;
|
|
@@ -972,11 +972,11 @@ const ge = {
|
|
|
972
972
|
}), N = (i) => {
|
|
973
973
|
let f = "";
|
|
974
974
|
i.url && (f = new URL(i.url).protocol), (["https", "wss", "tls"].includes(i.protocol) || ["https", "wss", "tls"].includes(f)) && (i.tls_verify = i.tls_verify_enabled ? i.tls_verify_value : null), delete i.tls_verify_enabled, delete i.tls_verify_value;
|
|
975
|
-
},
|
|
976
|
-
var f, k,
|
|
975
|
+
}, J = h(() => {
|
|
976
|
+
var f, k, Z, K;
|
|
977
977
|
const i = {
|
|
978
978
|
name: l.fields.name || null,
|
|
979
|
-
tags: l.fields.tags ? (
|
|
979
|
+
tags: l.fields.tags ? (Z = (k = (f = l.fields.tags) == null ? void 0 : f.split(",")) == null ? void 0 : k.map((U) => String(U || "").trim())) == null ? void 0 : Z.filter((U) => U !== "") : null,
|
|
980
980
|
protocol: l.fields.protocol,
|
|
981
981
|
path: l.fields.path || null,
|
|
982
982
|
read_timeout: l.fields.read_timeout,
|
|
@@ -991,17 +991,17 @@ const ge = {
|
|
|
991
991
|
port: l.fields.port,
|
|
992
992
|
url: l.fields.url
|
|
993
993
|
};
|
|
994
|
-
return l.fields.client_certificate && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.client_certificate = { id: l.fields.client_certificate }), l.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.tls_verify = l.fields.tls_verify_value), pe.value || (i.path = null), X.value === "create" ?
|
|
994
|
+
return l.fields.client_certificate && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.client_certificate = { id: l.fields.client_certificate }), l.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.tls_verify = l.fields.tls_verify_value), pe.value || (i.path = null), X.value === "create" ? A.value === "url" ? (delete i.protocol, delete i.host, delete i.path, a.config.app === "konnect" && delete i.port) : delete i.url : X.value === "edit" && delete i.url, i;
|
|
995
995
|
}), oe = async () => {
|
|
996
|
-
var i, f, k,
|
|
996
|
+
var i, f, k, Z;
|
|
997
997
|
try {
|
|
998
998
|
l.isReadonly = !0, q();
|
|
999
|
-
const K =
|
|
999
|
+
const K = J.value;
|
|
1000
1000
|
N(K);
|
|
1001
1001
|
let U;
|
|
1002
1002
|
if (await I.post(ue.value, K), X.value === "create" ? U = await I.post(le.value, K) : X.value === "edit" && (U = ((i = a.config) == null ? void 0 : i.app) === "konnect" ? await I.put(le.value, K) : await I.patch(le.value, K)), U) {
|
|
1003
1003
|
const { data: c } = U;
|
|
1004
|
-
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 = (
|
|
1004
|
+
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 = (Z = c == null ? void 0 : c.tags) != null && Z.length ? c.tags.join(", ") : "", Object.assign(x, l.fields), p("update", U == null ? void 0 : U.data);
|
|
1005
1005
|
}
|
|
1006
1006
|
return U;
|
|
1007
1007
|
} catch (K) {
|
|
@@ -1011,19 +1011,19 @@ const ge = {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
return $e(() => a.gatewayServiceId, () => {
|
|
1014
|
-
Object.assign(l.fields,
|
|
1014
|
+
Object.assign(l.fields, x);
|
|
1015
1015
|
}), $e(l.fields, (i) => {
|
|
1016
|
-
l.fields.port = Y.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated",
|
|
1017
|
-
}),
|
|
1018
|
-
p("model-updated",
|
|
1016
|
+
l.fields.port = Y.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated", J.value);
|
|
1017
|
+
}), Je(() => {
|
|
1018
|
+
p("model-updated", J.value);
|
|
1019
1019
|
}), B({
|
|
1020
1020
|
validateUrl: q,
|
|
1021
|
-
getPayload:
|
|
1021
|
+
getPayload: J,
|
|
1022
1022
|
saveFormData: oe,
|
|
1023
1023
|
canSubmit: me,
|
|
1024
1024
|
initForm: be
|
|
1025
1025
|
}), (i, f) => {
|
|
1026
|
-
const k = D("KInput"),
|
|
1026
|
+
const k = D("KInput"), Z = D("KLabel"), K = D("KRadio"), U = D("KSelect"), c = D("KCheckbox"), g = D("KCollapse");
|
|
1027
1027
|
return C(), F("div", Wt, [
|
|
1028
1028
|
u(o(tt), {
|
|
1029
1029
|
"can-submit": me.value,
|
|
@@ -1032,7 +1032,7 @@ const ge = {
|
|
|
1032
1032
|
"entity-type": o(Ge).GatewayService,
|
|
1033
1033
|
"error-message": l.errorMessage,
|
|
1034
1034
|
"fetch-url": de.value,
|
|
1035
|
-
"form-fields":
|
|
1035
|
+
"form-fields": J.value,
|
|
1036
1036
|
"is-readonly": l.isReadonly,
|
|
1037
1037
|
onCancel: Se,
|
|
1038
1038
|
"onFetch:error": f[25] || (f[25] = (m) => i.$emit("error", m)),
|
|
@@ -1101,7 +1101,7 @@ const ge = {
|
|
|
1101
1101
|
default: v(() => [
|
|
1102
1102
|
fe.value ? M("", !0) : (C(), F("div", Dt, [
|
|
1103
1103
|
S("div", qt, [
|
|
1104
|
-
u(
|
|
1104
|
+
u(Z, { required: "" }, {
|
|
1105
1105
|
default: v(() => [
|
|
1106
1106
|
z(P(o(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1107
1107
|
]),
|
|
@@ -1110,8 +1110,8 @@ const ge = {
|
|
|
1110
1110
|
]),
|
|
1111
1111
|
S("div", Ot, [
|
|
1112
1112
|
u(K, {
|
|
1113
|
-
modelValue:
|
|
1114
|
-
"onUpdate:modelValue": f[2] || (f[2] = (m) =>
|
|
1113
|
+
modelValue: A.value,
|
|
1114
|
+
"onUpdate:modelValue": f[2] || (f[2] = (m) => A.value = m),
|
|
1115
1115
|
"data-testid": "gateway-service-url-radio",
|
|
1116
1116
|
"selected-value": t.url,
|
|
1117
1117
|
onChange: ne
|
|
@@ -1122,7 +1122,7 @@ const ge = {
|
|
|
1122
1122
|
_: 1
|
|
1123
1123
|
}, 8, ["modelValue", "selected-value"])
|
|
1124
1124
|
]),
|
|
1125
|
-
|
|
1125
|
+
A.value === "url" ? (C(), F("div", Gt, [
|
|
1126
1126
|
u(k, {
|
|
1127
1127
|
modelValue: l.fields.url,
|
|
1128
1128
|
"onUpdate:modelValue": f[3] || (f[3] = (m) => l.fields.url = m),
|
|
@@ -1140,8 +1140,8 @@ const ge = {
|
|
|
1140
1140
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1141
1141
|
])) : M("", !0),
|
|
1142
1142
|
u(K, {
|
|
1143
|
-
modelValue:
|
|
1144
|
-
"onUpdate:modelValue": f[4] || (f[4] = (m) =>
|
|
1143
|
+
modelValue: A.value,
|
|
1144
|
+
"onUpdate:modelValue": f[4] || (f[4] = (m) => A.value = m),
|
|
1145
1145
|
"checked-group": "protocol",
|
|
1146
1146
|
"data-testid": "gateway-service-protocol-radio",
|
|
1147
1147
|
"selected-value": t.protocol,
|
|
@@ -1153,7 +1153,7 @@ const ge = {
|
|
|
1153
1153
|
_: 1
|
|
1154
1154
|
}, 8, ["modelValue", "selected-value"])
|
|
1155
1155
|
])),
|
|
1156
|
-
|
|
1156
|
+
A.value === "protocol" || fe.value ? (C(), F("div", Nt, [
|
|
1157
1157
|
u(U, {
|
|
1158
1158
|
modelValue: l.fields.protocol,
|
|
1159
1159
|
"onUpdate:modelValue": f[5] || (f[5] = (m) => l.fields.protocol = m),
|
|
@@ -1249,7 +1249,7 @@ const ge = {
|
|
|
1249
1249
|
type: "number"
|
|
1250
1250
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1251
1251
|
]),
|
|
1252
|
-
S("div",
|
|
1252
|
+
S("div", Zt, [
|
|
1253
1253
|
u(k, {
|
|
1254
1254
|
modelValue: l.fields.connect_timeout,
|
|
1255
1255
|
"onUpdate:modelValue": [
|
|
@@ -1270,7 +1270,7 @@ const ge = {
|
|
|
1270
1270
|
type: "number"
|
|
1271
1271
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1272
1272
|
]),
|
|
1273
|
-
S("div",
|
|
1273
|
+
S("div", Jt, [
|
|
1274
1274
|
u(k, {
|
|
1275
1275
|
modelValue: l.fields.write_timeout,
|
|
1276
1276
|
"onUpdate:modelValue": [
|
|
@@ -1414,7 +1414,7 @@ const ge = {
|
|
|
1414
1414
|
]);
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
1417
|
-
}),
|
|
1417
|
+
}), Al = /* @__PURE__ */ Ne(ol, [["__scopeId", "data-v-c2c5e1f0"]]), il = { class: "kong-ui-gateway-service-entity-config-card" }, xl = /* @__PURE__ */ Ke({
|
|
1418
1418
|
__name: "GatewayServiceConfigCard",
|
|
1419
1419
|
props: {
|
|
1420
1420
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1441,7 +1441,7 @@ const ge = {
|
|
|
1441
1441
|
},
|
|
1442
1442
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1443
1443
|
setup(n) {
|
|
1444
|
-
const B = n, { i18n: { t: y }, i18nT: p } = ge.useI18n(), a = h(() => ye.form[B.config.app].edit), { getPropValue: b } = ht(),
|
|
1444
|
+
const B = n, { i18n: { t: y }, i18nT: p } = ge.useI18n(), a = h(() => ye.form[B.config.app].edit), { getPropValue: b } = ht(), R = (r, L) => b(r, L) === !0 ? y("gateway_services.form.fields.tls_verify_option.true.display") : y("gateway_services.form.fields.tls_verify_option.false.display"), H = W({
|
|
1445
1445
|
id: {},
|
|
1446
1446
|
name: {
|
|
1447
1447
|
tooltip: y("gateway_services.form.fields.name.tooltip")
|
|
@@ -1553,7 +1553,7 @@ const ge = {
|
|
|
1553
1553
|
})
|
|
1554
1554
|
]),
|
|
1555
1555
|
tls_verify: v((I) => [
|
|
1556
|
-
z(P(typeof o(b)("rowValue", I) == "boolean" ?
|
|
1556
|
+
z(P(typeof o(b)("rowValue", I) == "boolean" ? R("rowValue", I) : o(y)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1557
1557
|
]),
|
|
1558
1558
|
client_certificate: v((I) => [
|
|
1559
1559
|
z(P(o(b)("rowValue", I) ? o(b)("rowValue", I).id : "–"), 1)
|
|
@@ -1564,7 +1564,7 @@ const ge = {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
});
|
|
1566
1566
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1567
|
-
const
|
|
1567
|
+
const Ze = () => {
|
|
1568
1568
|
};
|
|
1569
1569
|
function rl(n, B) {
|
|
1570
1570
|
function y(...p) {
|
|
@@ -1575,16 +1575,16 @@ function rl(n, B) {
|
|
|
1575
1575
|
return y;
|
|
1576
1576
|
}
|
|
1577
1577
|
function sl(n, B = {}) {
|
|
1578
|
-
let y, p, a =
|
|
1578
|
+
let y, p, a = Ze;
|
|
1579
1579
|
const b = (r) => {
|
|
1580
|
-
clearTimeout(r), a(), a =
|
|
1580
|
+
clearTimeout(r), a(), a = Ze;
|
|
1581
1581
|
};
|
|
1582
|
-
let
|
|
1582
|
+
let R;
|
|
1583
1583
|
return (r) => {
|
|
1584
1584
|
const L = ze(n), I = ze(B.maxWait);
|
|
1585
1585
|
return y && b(y), L <= 0 || I !== void 0 && I <= 0 ? (p && (b(p), p = null), Promise.resolve(r())) : new Promise((ie, de) => {
|
|
1586
|
-
a = B.rejectOnCancel ? de : ie,
|
|
1587
|
-
y && b(y), p = null, ie(
|
|
1586
|
+
a = B.rejectOnCancel ? de : ie, R = r, I && !p && (p = setTimeout(() => {
|
|
1587
|
+
y && b(y), p = null, ie(R());
|
|
1588
1588
|
}, I)), y = setTimeout(() => {
|
|
1589
1589
|
p && b(p), p = null, ie(r());
|
|
1590
1590
|
}, L);
|
|
@@ -1673,7 +1673,7 @@ const te = {
|
|
|
1673
1673
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1674
1674
|
setup(n, { expose: B, emit: y }) {
|
|
1675
1675
|
var he;
|
|
1676
|
-
const p = y, a = n, b = W(!0),
|
|
1676
|
+
const p = y, a = n, b = W(!0), R = qe(), { i18nT: H, i18n: { t: r } } = ge.useI18n(), { getErrorFieldsFromError: L } = Xe(), { axiosInstance: I } = Oe((he = a.config) == null ? void 0 : he.axiosRequestConfig), ie = Ye(), { validateHost: de, 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"), x = ge.usePortFromProtocol(), se = W(""), Pe = h(() => !!se.value || !!ue("name")), t = Re({
|
|
1677
1677
|
fields: {
|
|
1678
1678
|
name: "",
|
|
1679
1679
|
protocol: "http",
|
|
@@ -1709,7 +1709,7 @@ const te = {
|
|
|
1709
1709
|
tls_verify_enabled: "",
|
|
1710
1710
|
tls_verify_value: ""
|
|
1711
1711
|
}
|
|
1712
|
-
}), $ =
|
|
1712
|
+
}), $ = Re({
|
|
1713
1713
|
name: "",
|
|
1714
1714
|
protocol: "http",
|
|
1715
1715
|
host: "",
|
|
@@ -1815,10 +1815,10 @@ const te = {
|
|
|
1815
1815
|
t.fields.path = e.pathname;
|
|
1816
1816
|
const E = ke(e.port);
|
|
1817
1817
|
if (E) throw new Error(E);
|
|
1818
|
-
const
|
|
1819
|
-
ee.value = !!
|
|
1820
|
-
} catch
|
|
1821
|
-
p("url-valid:error",
|
|
1818
|
+
const T = Number(e.port);
|
|
1819
|
+
ee.value = !!T, t.fields.port = T || x.getPortFromProtocol(t.fields.protocol), p("url-valid:success");
|
|
1820
|
+
} catch {
|
|
1821
|
+
p("url-valid:error", r("gateway_services.form.errors.url.invalid")), t.formFieldErrors.url = r("gateway_services.form.errors.url.invalid");
|
|
1822
1822
|
}
|
|
1823
1823
|
}, 300), be = De((e) => {
|
|
1824
1824
|
N(e);
|
|
@@ -1833,7 +1833,7 @@ const te = {
|
|
|
1833
1833
|
const V = X(t.fields.path);
|
|
1834
1834
|
V && (t.formFieldErrors.path = V);
|
|
1835
1835
|
const G = ke(t.fields.port);
|
|
1836
|
-
G && (t.formFieldErrors.port = G),
|
|
1836
|
+
G && (t.formFieldErrors.port = G), J.value ? p("url-valid:success") : p("url-valid:error", t.errorMessages.join(",") || r("gateway_services.form.errors.url.invalid"));
|
|
1837
1837
|
}, 300), N = (e) => {
|
|
1838
1838
|
if (e)
|
|
1839
1839
|
t.formFieldErrors[e] = "";
|
|
@@ -1841,7 +1841,7 @@ const te = {
|
|
|
1841
1841
|
for (let s in t.formFieldErrors)
|
|
1842
1842
|
t.formFieldErrors[s] = "";
|
|
1843
1843
|
t.errorMessages = [];
|
|
1844
|
-
},
|
|
1844
|
+
}, J = h(() => {
|
|
1845
1845
|
for (let e in t.formFieldErrors)
|
|
1846
1846
|
if (t.formFieldErrors[e].length)
|
|
1847
1847
|
return !1;
|
|
@@ -1858,7 +1858,7 @@ const te = {
|
|
|
1858
1858
|
return !0;
|
|
1859
1859
|
const e = ["https", "tls"].includes(t.fields.protocol);
|
|
1860
1860
|
return l.value === "protocol" && e;
|
|
1861
|
-
}),
|
|
1861
|
+
}), Z = h(() => {
|
|
1862
1862
|
if (l.value === "url")
|
|
1863
1863
|
return !0;
|
|
1864
1864
|
const e = ["https", "wss", "tls"].includes(t.fields.protocol);
|
|
@@ -1868,13 +1868,13 @@ const te = {
|
|
|
1868
1868
|
}, U = h(() => {
|
|
1869
1869
|
if (re.value)
|
|
1870
1870
|
return JSON.stringify(t.fields) !== JSON.stringify($);
|
|
1871
|
-
const e = l.value === "url" && !!t.fields.url &&
|
|
1871
|
+
const e = l.value === "url" && !!t.fields.url && J.value, s = l.value === "protocol" && !!t.fields.host && J.value;
|
|
1872
1872
|
return e || s;
|
|
1873
1873
|
}), c = (e) => {
|
|
1874
1874
|
var s, V, G;
|
|
1875
1875
|
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($, t.fields);
|
|
1876
1876
|
}, g = () => {
|
|
1877
|
-
|
|
1877
|
+
R.push(a.config.cancelRoute);
|
|
1878
1878
|
}, m = h(() => {
|
|
1879
1879
|
var s, V;
|
|
1880
1880
|
let e = `${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;
|
|
@@ -1890,7 +1890,7 @@ const te = {
|
|
|
1890
1890
|
var s, V, G, E;
|
|
1891
1891
|
const e = {
|
|
1892
1892
|
name: t.fields.name || null,
|
|
1893
|
-
tags: t.fields.tags ? (G = (V = (s = t.fields.tags) == null ? void 0 : s.split(",")) == null ? void 0 : V.map((
|
|
1893
|
+
tags: t.fields.tags ? (G = (V = (s = t.fields.tags) == null ? void 0 : s.split(",")) == null ? void 0 : V.map((T) => String(T || "").trim())) == null ? void 0 : G.filter((T) => T !== "") : null,
|
|
1894
1894
|
protocol: t.fields.protocol,
|
|
1895
1895
|
path: t.fields.path || null,
|
|
1896
1896
|
read_timeout: t.fields.read_timeout,
|
|
@@ -1899,7 +1899,7 @@ const te = {
|
|
|
1899
1899
|
connect_timeout: t.fields.connect_timeout,
|
|
1900
1900
|
tls_verify_value: t.fields.tls_verify_value,
|
|
1901
1901
|
tls_verify_enabled: t.fields.tls_verify_enabled,
|
|
1902
|
-
ca_certificates: t.fields.ca_certificates ? (E = t.fields.ca_certificates) == null ? void 0 : E.split(",").filter((
|
|
1902
|
+
ca_certificates: t.fields.ca_certificates ? (E = t.fields.ca_certificates) == null ? void 0 : E.split(",").filter((T) => T !== "") : null,
|
|
1903
1903
|
client_certificate: t.fields.client_certificate ? { id: t.fields.client_certificate } : null,
|
|
1904
1904
|
write_timeout: t.fields.write_timeout,
|
|
1905
1905
|
port: t.fields.port,
|
|
@@ -1912,15 +1912,15 @@ const te = {
|
|
|
1912
1912
|
t.isReadonly = !0, oe();
|
|
1913
1913
|
const E = Q.value;
|
|
1914
1914
|
O(E);
|
|
1915
|
-
let
|
|
1916
|
-
if (await I.post(m.value, E), Y.value === "create" ?
|
|
1917
|
-
const { data: d } =
|
|
1918
|
-
t.fields.name = (d == null ? void 0 : d.name) || "", t.fields.port = d.port ||
|
|
1915
|
+
let T;
|
|
1916
|
+
if (await I.post(m.value, E), Y.value === "create" ? T = await I.post(w.value, E) : Y.value === "edit" && (T = ((e = a.config) == null ? void 0 : e.app) === "konnect" ? await I.put(w.value, E) : await I.patch(w.value, E)), T) {
|
|
1917
|
+
const { data: d } = T;
|
|
1918
|
+
t.fields.name = (d == null ? void 0 : d.name) || "", t.fields.port = d.port || x.getPortFromProtocol(d.protocol), t.fields.protocol = (d == null ? void 0 : d.protocol) || "http", t.fields.host = (d == null ? void 0 : d.host) || "", t.fields.path = (d == null ? void 0 : d.path) || "", t.fields.url = (d == null ? void 0 : d.url) || "", t.fields.retries = d != null && d.retries || (d == null ? void 0 : d.retries) === 0 ? d == null ? void 0 : d.retries : 5, t.fields.connect_timeout = d != null && d.connect_timeout || (d == null ? void 0 : d.connect_timeout) === 0 ? d == null ? void 0 : d.connect_timeout : 6e4, t.fields.write_timeout = d != null && d.write_timeout || (d == null ? void 0 : d.write_timeout) === 0 ? d == null ? void 0 : d.write_timeout : 6e4, t.fields.read_timeout = d != null && d.read_timeout || (d == null ? void 0 : d.read_timeout) === 0 ? d == null ? void 0 : d.read_timeout : 6e4, t.fields.client_certificate = ((s = d == null ? void 0 : d.client_certificate) == null ? void 0 : s.id) || "", t.fields.ca_certificates = (V = d == null ? void 0 : d.ca_certificates) != null && V.length ? d == null ? void 0 : d.ca_certificates.join(",") : "", t.fields.tls_verify_enabled = (d == null ? void 0 : d.tls_verify) !== "" && (d == null ? void 0 : d.tls_verify) !== null && (d == null ? void 0 : d.tls_verify) !== void 0, t.fields.tls_verify_value = t.fields.tls_verify_enabled && (d == null ? void 0 : d.tls_verify), t.fields.tags = (G = d == null ? void 0 : d.tags) != null && G.length ? d.tags.join(", ") : "", Object.assign($, t.fields), p("update", T == null ? void 0 : T.data);
|
|
1919
1919
|
}
|
|
1920
|
-
return
|
|
1920
|
+
return T;
|
|
1921
1921
|
} catch (E) {
|
|
1922
|
-
const { fields:
|
|
1923
|
-
t.errorMessages = d,
|
|
1922
|
+
const { fields: T, messages: d } = L(E);
|
|
1923
|
+
t.errorMessages = d, T.length && T.forEach((we) => {
|
|
1924
1924
|
const Ie = we.field;
|
|
1925
1925
|
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 = {
|
|
1926
1926
|
...t.formFieldErrors,
|
|
@@ -1934,8 +1934,8 @@ const te = {
|
|
|
1934
1934
|
return $e(() => a.gatewayServiceId, () => {
|
|
1935
1935
|
Object.assign(t.fields, $);
|
|
1936
1936
|
}), $e(t.fields, (e) => {
|
|
1937
|
-
t.fields.port =
|
|
1938
|
-
}),
|
|
1937
|
+
t.fields.port = x.getPortFromProtocol(e.protocol, String(e.port)), p("model-updated", Q.value);
|
|
1938
|
+
}), Je(() => {
|
|
1939
1939
|
p("model-updated", Q.value), re.value || (t.fields.name = ve());
|
|
1940
1940
|
}), B({
|
|
1941
1941
|
validateUrl: oe,
|
|
@@ -1944,14 +1944,14 @@ const te = {
|
|
|
1944
1944
|
canSubmit: U,
|
|
1945
1945
|
initForm: c
|
|
1946
1946
|
}), (e, s) => {
|
|
1947
|
-
const V = D("KRadio"), G = D("KButton"), E = D("KInput"),
|
|
1947
|
+
const V = D("KRadio"), G = D("KButton"), E = D("KInput"), T = D("KSelect"), d = D("KCheckbox"), we = D("KCollapse"), Ie = D("KAlert");
|
|
1948
1948
|
return C(), F("div", al, [
|
|
1949
1949
|
u(o(tt), {
|
|
1950
1950
|
"can-submit": U.value,
|
|
1951
1951
|
config: n.config,
|
|
1952
1952
|
"edit-id": n.gatewayServiceId,
|
|
1953
1953
|
"entity-type": o(Ge).GatewayService,
|
|
1954
|
-
"fetch-url":
|
|
1954
|
+
"fetch-url": A.value,
|
|
1955
1955
|
"form-fields": Q.value,
|
|
1956
1956
|
"is-readonly": t.isReadonly,
|
|
1957
1957
|
onCancel: g,
|
|
@@ -2020,7 +2020,7 @@ const te = {
|
|
|
2020
2020
|
placeholder: o(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
2021
2021
|
required: "",
|
|
2022
2022
|
onInput: o(me)
|
|
2023
|
-
},
|
|
2023
|
+
}, Te({ _: 2 }, [
|
|
2024
2024
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2025
2025
|
name: "after",
|
|
2026
2026
|
fn: v(() => [
|
|
@@ -2046,7 +2046,7 @@ const te = {
|
|
|
2046
2046
|
u(We, { name: "slide-fade" }, {
|
|
2047
2047
|
default: v(() => [
|
|
2048
2048
|
l.value === "protocol" || re.value ? (C(), F("div", dl, [
|
|
2049
|
-
u(
|
|
2049
|
+
u(T, {
|
|
2050
2050
|
modelValue: t.fields.protocol,
|
|
2051
2051
|
"onUpdate:modelValue": s[3] || (s[3] = (_) => t.fields.protocol = _),
|
|
2052
2052
|
"data-testid": "gateway-service-protocol-select",
|
|
@@ -2078,7 +2078,7 @@ const te = {
|
|
|
2078
2078
|
placeholder: o(r)("gateway_services.form.fields.host.placeholder"),
|
|
2079
2079
|
required: "",
|
|
2080
2080
|
onInput: s[6] || (s[6] = (_) => o(le)("host"))
|
|
2081
|
-
},
|
|
2081
|
+
}, Te({ _: 2 }, [
|
|
2082
2082
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2083
2083
|
name: "after",
|
|
2084
2084
|
fn: v(() => [
|
|
@@ -2287,7 +2287,7 @@ const te = {
|
|
|
2287
2287
|
_: 1
|
|
2288
2288
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2289
2289
|
])) : M("", !0),
|
|
2290
|
-
|
|
2290
|
+
Z.value ? (C(), F("div", hl, [
|
|
2291
2291
|
u(d, {
|
|
2292
2292
|
modelValue: t.fields.tls_verify_enabled,
|
|
2293
2293
|
"onUpdate:modelValue": s[24] || (s[24] = (_) => t.fields.tls_verify_enabled = _),
|
|
@@ -2411,10 +2411,10 @@ const te = {
|
|
|
2411
2411
|
]);
|
|
2412
2412
|
};
|
|
2413
2413
|
}
|
|
2414
|
-
}),
|
|
2414
|
+
}), Tl = /* @__PURE__ */ Ne(Sl, [["__scopeId", "data-v-c0b2a473"]]);
|
|
2415
2415
|
export {
|
|
2416
|
-
|
|
2417
|
-
|
|
2416
|
+
xl as GatewayServiceConfigCard,
|
|
2417
|
+
Tl as GatewayServiceForm,
|
|
2418
2418
|
Ul as GatewayServiceList,
|
|
2419
|
-
|
|
2419
|
+
Al as LegacyGatewayServiceForm
|
|
2420
2420
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M["kong-ui-public-entities-gateway-services"]={},M.Vue,M.VueRouter,M.KongIcons,M["kong-ui-public-i18n"],M["kong-ui-public-entities-shared"]))})(this,function(M,e,Ve,we,Ne,b){"use strict";const Ee={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"URL validation failed"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://www.myapi.com/",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. www.myapi.com, 127.0.0.1",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",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).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function Se(){const n=Ne.createI18n("en-us",Ee);return{i18n:n,i18nT:Ne.i18nTComponent(n)}}function Ie(){return{getPortFromProtocol:(P,g)=>{const p=[80,443],a=Number(g);if((a||a===0)&&!p.includes(a))return a;switch(P){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Pe(){const{i18n:{t:n}}=oe.useI18n();return{validateHost:_=>{if(!_||_.trim()==="")return n("gateway_services.form.errors.host.empty");const I=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{1,63}$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(_)||I.test(_)?"":n("gateway_services.form.errors.host.invalid")},validateProtocol:(_,I)=>!_||_.trim()===""?n("gateway_services.form.errors.protocol.empty"):(_=_.slice(0,-1),I.find(i=>{if(i.value===_)return i})===void 0?n("gateway_services.form.errors.protocol.invalid"):""),validatePath:_=>!_||_===""?"":_.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(_)?n("gateway_services.form.errors.path.invalid"):"":n("gateway_services.form.errors.path.prefix"),validatePort:_=>{if(_==null||_==="")return"";const I=typeof _=="string"?parseInt(_,10):_;return isNaN(I)?n("gateway_services.form.errors.port.type"):I<0||I>65535?n("gateway_services.form.errors.port.invalid"):""}}}const oe={useI18n:Se,usePortFromProtocol:Ie,useUrlValidators:Pe},he="/v2/control-planes/{controlPlaneId}/core-entities",ve="/{workspace}",re={list:{konnect:{all:`${he}/services`},kongManager:{all:`${ve}/services`}},form:{konnect:{create:`${he}/services`,validate:`${he}/v1/schemas/json/service/validate`,edit:`${he}/services/{id}`},kongManager:{create:`${ve}/services`,validate:`${ve}/schemas/services/validate`,edit:`${ve}/services/{id}`}}},Be="#00abd2",Te="24px",Fe={class:"kong-ui-entities-gateway-services-list"},$e={class:"button-row"},Ue={class:"empty-state-icon-gateway"},Ae={key:1},Re=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:P}){var c;const g=P,p=n,{i18n:{t:a,formatUnixTimeStamp:_}}=oe.useI18n(),I=Ve.useRouter(),{axiosInstance:D}=b.useAxios((c=p.config)==null?void 0:c.axiosRequestConfig),{hasRecords:i,handleStateChange:T}=b.useTableState(()=>j.value),V=e.computed(()=>i.value&&p.config.app==="konnect"),J=e.computed(()=>!p.enableV2EmptyStates&&p.config.app==="konnect"),le=e.computed(()=>p.config.app!=="kongManager"||!!p.config.disableSorting),G={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...p.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},me={columnVisibility:{created_at:!1}},ie=G,x=e.computed(()=>{var m,w;let u=`${p.config.apiBaseUrl}${re.list[p.config.app].all}`;return p.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((m=p.config)==null?void 0:m.controlPlaneId)||""):p.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(w=p.config)!=null&&w.workspace?`/${p.config.workspace}`:"")),u}),O=e.computed(()=>p.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${x.value}`):new URL(x.value)),j=e.ref(""),Z=e.computed(()=>{const u=p.config.app==="konnect"||p.config.isExactMatch;if(u)return{isExactMatch:u,placeholder:a(`search.placeholder.${p.config.app}`)};const{name:m,enabled:w,protocol:$,host:L,port:R,path:fe}=G;return{isExactMatch:u,fields:{name:m,enabled:w,protocol:$,host:L,port:R,path:fe},schema:p.config.filterSchema}}),{fetcher:r,fetcherState:E,fetcherCacheKey:Q}=b.useFetcher({...p.config,cacheIdentifier:p.cacheIdentifier},x.value),be=()=>{j.value=""},o=()=>{Q.value++},C=e.ref(null),X=e.computed(()=>({ctaPath:p.config.createRoute,ctaText:N.value?p.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState?` ${p.config.additionMessageForEmptyState}`:""}`,title:N.value?p.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),Y=e.ref(!1),F=e.ref(null),se=e.computed(()=>{const u={action:"disable",id:"",name:""};if(F.value){const{enabled:m,id:w,name:$}=F.value;u.action=m?"disable":"enable",u.id=w,u.name=$||w}return u}),ee=u=>{Y.value=!0,F.value=u},ce=()=>{Y.value=!1,F.value=null},ue=async()=>{var $,L;if(!await(($=p.canEdit)==null?void 0:$.call(p,F.value))||!F.value)return;const m=`${O.value.href}/${F.value.id}`,w=!F.value.enabled;try{const{data:R}=((L=p.config)==null?void 0:L.app)==="konnect"?await D.put(m,{...F.value,enabled:w}):await D.patch(m,{...F.value,enabled:w});g("toggle:success",R),F.value.enabled=w}catch(R){g("error",R)}},ge=u=>{p.config.getControlPlaneRoute&&I.push(p.config.getControlPlaneRoute(u))},ae=(u,m)=>{const w=u.id;if(!m(w)){g("copy:error",{entity:u,field:"id",message:a("errors.copy")});return}g("copy:success",{entity:u,field:"id",message:a("copy.success",{val:w})})},de=(u,m)=>{const w=JSON.stringify(u);if(!m(w)){g("copy:error",{entity:u,message:a("errors.copy")});return}g("copy:success",{entity:u,message:a("copy.success_brief")})},ye=async u=>{var w;await((w=p.canRetrieve)==null?void 0:w.call(p,u))&&I.push(p.config.getViewRoute(u.id))},te=u=>({label:a("actions.view"),to:p.config.getViewRoute(u)}),z=u=>({label:a("actions.edit"),to:p.config.getEditRoute(u)}),A=e.ref(void 0),W=e.ref(!1),H=e.ref(!1),ne=e.ref(""),l=b.useDeleteUrlBuilder(p.config,x.value),f=u=>{A.value=u,W.value=!0,ne.value=""},h=()=>{W.value=!1,A.value=void 0},K=async()=>{var u,m,w;if((u=A.value)!=null&&u.id){H.value=!0;try{await D.delete(l(A.value.id)),g("delete:success",A.value),h(),Q.value++}catch($){ne.value=((w=(m=$.response)==null?void 0:m.data)==null?void 0:w.message)||$.message||a("errors.delete"),g("error",$)}finally{H.value=!1}}},B=()=>{I.push(p.config.createRoute)};e.watch(E,u=>{var m,w,$;if(u.status===b.FetcherStatus.Error){C.value={title:a("errors.general")},($=(w=(m=u.error)==null?void 0:m.response)==null?void 0:w.data)!=null&&$.message&&(C.value.message=u.error.response.data.message),g("error",u.error);return}C.value=null});const N=e.ref(!1);return e.onBeforeMount(async()=>{N.value=await p.canCreate()}),(u,m)=>{const w=e.resolveComponent("KButton"),$=e.resolveComponent("KBadge"),L=e.resolveComponent("KInputSwitch"),R=e.resolveComponent("KDropdownItem"),fe=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(e.unref(b.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":me,"disable-sorting":le.value,"empty-state-options":X.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(r),"fetcher-cache-key":e.unref(Q),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:j.value,"table-headers":e.unref(ie),onClearSearchInput:be,"onClick:row":m[5]||(m[5]=t=>ye(t)),onSort:o,onState:e.unref(T)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(b.EntityFilter),{modelValue:j.value,"onUpdate:modelValue":m[0]||(m[0]=t=>j.value=t),config:Z.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[V.value?(e.openBlock(),e.createBlock(w,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=t=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(we.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(w,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(we.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:t})=>[e.createElementVNode("b",null,e.toDisplayString(t??"-"),1)]),control_plane:e.withCtx(({row:t})=>{var s;return[(s=t.x_meta)!=null&&s.cluster_id?(e.openBlock(),e.createBlock($,{key:0,tooltip:t.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(v=>ge(t.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Ae,"-"))]}),enabled:e.withCtx(({row:t})=>[e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canEdit(t),"force-show":""},{default:e.withCtx(({isAllowed:s})=>[e.createElementVNode("div",{onClick:m[4]||(m[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(L,{modelValue:t.enabled,"onUpdate:modelValue":v=>t.enabled=v,"data-testid":`row-${t.id}-toggle-input`,disabled:!s,onClick:e.withModifiers(v=>ee(t),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:t})=>[e.createVNode(e.unref(b.TableTags),{tags:t},null,8,["tags"])]),created_at:e.withCtx(({rowValue:t})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(t)),1)]),updated_at:e.withCtx(({row:t,rowValue:s})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(s??t.created_at)),1)]),actions:e.withCtx(({row:t})=>[e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:v=>ae(t,s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:v=>de(t,s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(t)},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"action-entity-view","has-divider":"",item:te(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canEdit(t)},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"action-entity-edit",item:z(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canDelete(t)},{default:e.withCtx(()=>[e.createVNode(R,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:s=>f(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(i)&&J.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(w,{appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-more-button",icon:"",onClick:m[2]||(m[2]=t=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(we.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,n.enableV2EmptyStates&&n.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var t;return[e.createVNode(e.unref(b.EntityEmptyState),{"action-button-text":e.unref(a)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>n.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(a)("gateway_services.empty_state_v2.description"),"learn-more":n.config.app==="konnect",title:e.unref(a)("gateway_services.empty_state_v2.title"),"onClick:create":B,"onClick:learnMore":m[3]||(m[3]=s=>u.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createVNode(e.unref(we.ServicesIcon),{color:e.unref(Be),size:e.unref(Te)},null,8,["color","size"])])]),_:2},[(t=n.config)!=null&&t.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(b.EntityToggleModal),{action:se.value.action,"entity-id":se.value.id,"entity-name":se.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":ue,visible:Y.value,onCancel:ce,onProceed:ce},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(b.EntityDeleteModal),{"action-pending":H.value,description:e.unref(a)("actions.delete.description"),"entity-name":A.value&&(A.value.name||A.value.id),"entity-type":e.unref(b.EntityTypes).GatewayService,error:ne.value,title:e.unref(a)("actions.delete.title"),visible:W.value,onCancel:h,onProceed:K},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),ke=(n,P)=>{const g=n.__vccOpts||n;for(const[p,a]of P)g[p]=a;return g},Me=ke(Re,[["__scopeId","data-v-ee4f8a6d"]]),De={class:"kong-ui-entities-gateway-service-form"},Ke={key:0},We={class:"gateway-service-form-traffic-label"},Le={class:"gateway-service-form-margin-bottom"},qe={key:0,class:"gateway-service-form-group-fields"},Ge={key:1,class:"gateway-service-form-group-fields"},Oe={key:0},je={class:"gateway-service-form-margin-top"},ze={class:"gateway-service-form-margin-bottom"},He={class:"gateway-service-form-margin-bottom"},Je={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Qe={key:0,class:"gateway-service-form-margin-bottom"},Xe={key:1,class:"gateway-service-form-margin-bottom"},Ye={key:2,class:"gateway-service-form-margin-bottom"},et={key:0,class:"checkbox-aligned-radio"},tt={key:1,class:"checkbox-aligned-radio"},ot=ke(e.defineComponent({__name:"LegacyGatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:P,emit:g}){var ne;const p=g,a=n,_=e.ref(!0),I=Ve.useRouter(),{i18nT:D,i18n:{t:i}}=oe.useI18n(),{getMessageFromError:T}=b.useErrors(),{axiosInstance:V}=b.useAxios((ne=a.config)==null?void 0:ne.axiosRequestConfig),J=b.useValidators(),le=e.computed(()=>re.form[a.config.app].edit),G=e.computed(()=>a.gatewayServiceId?b.EntityBaseFormType.Edit:b.EntityBaseFormType.Create),me=e.ref(!1),ie=e.computed(()=>!!a.gatewayServiceId),x=e.ref(ie.value?"protocol":"url"),O=oe.usePortFromProtocol(),j=e.ref(""),Z=e.computed(()=>!!j.value),r=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessage:""}),E=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),Q=a.config.app==="konnect"||b.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),be=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...Q?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],o={url:"url",protocol:"protocol"},C=(l,f)=>{f.value},X=l=>l?parseFloat(l):0,Y=()=>{_.value=!0,r.errorMessage="",r.fields.host=E.host,r.fields.path=E.path,r.fields.port=E.port,r.fields.protocol=E.protocol,r.fields.url=E.url,r.fields.retries=E.retries,r.fields.connect_timeout=E.connect_timeout,r.fields.write_timeout=E.write_timeout,r.fields.read_timeout=E.read_timeout,r.fields.client_certificate=E.client_certificate,r.fields.ca_certificates=E.ca_certificates,r.fields.tls_verify_enabled=E.tls_verify_enabled,r.fields.tls_verify_value=E.tls_verify_value},F=()=>{if(r.fields.url&&x.value==="url")try{const l=new URL(r.fields.url);r.errorMessage="",r.fields.protocol=l.protocol.slice(0,-1),r.fields.host=l.hostname,r.fields.path=l.pathname;const f=Number(l.port);me.value=!!f,r.fields.port=f||O.getPortFromProtocol(r.fields.protocol),r.errorMessage="",p("url-valid:success")}catch(l){r.errorMessage=i("errors.urlErrorMessage"),p("url-valid:error",T(l))}else p("url-valid:success"),r.errorMessage=""},se=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(r.fields.protocol)),ee=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ce=e.computed(()=>{if(x.value==="url")return!0;const l=["https","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ue=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ge=l=>{j.value=J.utf8Name(l)},ae=e.computed(()=>ie.value&&JSON.stringify(r.fields)!==JSON.stringify(E)||x.value==="url"&&!!r.fields.url||x.value==="protocol"&&!!r.fields.host),de=l=>{var f,h,K;r.fields.name=(l==null?void 0:l.name)||"",r.fields.tags=((f=l==null?void 0:l.tags)==null?void 0:f.join(", "))||"",r.fields.protocol=(l==null?void 0:l.protocol)||"http",r.fields.path=(l==null?void 0:l.path)||"",r.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,r.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,r.fields.host=(l==null?void 0:l.host)||"",r.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,r.fields.tls_verify_enabled=(l==null?void 0:l.tls_verify)!==""&&(l==null?void 0:l.tls_verify)!==null&&(l==null?void 0:l.tls_verify)!==void 0,r.fields.tls_verify_value=l!=null&&l.tls_verify?l==null?void 0:l.tls_verify:!1,r.fields.ca_certificates=((h=l==null?void 0:l.ca_certificates)==null?void 0:h.join(","))||"",r.fields.client_certificate=((K=l==null?void 0:l.client_certificate)==null?void 0:K.id)||"",r.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,r.fields.port=l!=null&&l.port||(l==null?void 0:l.port)===0?l==null?void 0:l.port:80,Object.assign(E,r.fields)},ye=()=>{I.push(a.config.cancelRoute)},te=e.computed(()=>{var f,h;let l=`${a.config.apiBaseUrl}${re.form[a.config.app].validate}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),z=e.computed(()=>{var f,h;let l=`${a.config.apiBaseUrl}${re.form[a.config.app][G.value]}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),A=l=>{let f="";l.url&&(f=new URL(l.url).protocol),(["https","wss","tls"].includes(l.protocol)||["https","wss","tls"].includes(f))&&(l.tls_verify=l.tls_verify_enabled?l.tls_verify_value:null),delete l.tls_verify_enabled,delete l.tls_verify_value},W=e.computed(()=>{var f,h,K,B;const l={name:r.fields.name||null,tags:r.fields.tags?(K=(h=(f=r.fields.tags)==null?void 0:f.split(","))==null?void 0:h.map(N=>String(N||"").trim()))==null?void 0:K.filter(N=>N!==""):null,protocol:r.fields.protocol,path:r.fields.path||null,read_timeout:r.fields.read_timeout,retries:r.fields.retries,host:r.fields.host,connect_timeout:r.fields.connect_timeout,tls_verify_value:r.fields.tls_verify_value,tls_verify_enabled:r.fields.tls_verify_enabled,ca_certificates:r.fields.ca_certificates?(B=r.fields.ca_certificates)==null?void 0:B.split(",").filter(N=>N!==""):null,client_certificate:r.fields.client_certificate?{id:r.fields.client_certificate}:null,write_timeout:r.fields.write_timeout,port:r.fields.port,url:r.fields.url};return r.fields.client_certificate&&["https","wss","tls"].includes(r.fields.protocol)&&(l.client_certificate={id:r.fields.client_certificate}),r.fields.tls_verify_enabled&&["https","wss","tls"].includes(r.fields.protocol)&&(l.tls_verify=r.fields.tls_verify_value),se.value||(l.path=null),G.value==="create"?x.value==="url"?(delete l.protocol,delete l.host,delete l.path,a.config.app==="konnect"&&delete l.port):delete l.url:G.value==="edit"&&delete l.url,l}),H=async()=>{var l,f,h,K;try{r.isReadonly=!0,F();const B=W.value;A(B);let N;if(await V.post(te.value,B),G.value==="create"?N=await V.post(z.value,B):G.value==="edit"&&(N=((l=a.config)==null?void 0:l.app)==="konnect"?await V.put(z.value,B):await V.patch(z.value,B)),N){const{data:c}=N;r.fields.name=(c==null?void 0:c.name)||"",r.fields.port=c.port||O.getPortFromProtocol(c.protocol),r.fields.protocol=(c==null?void 0:c.protocol)||"http",r.fields.host=(c==null?void 0:c.host)||"",r.fields.path=(c==null?void 0:c.path)||"",r.fields.url=(c==null?void 0:c.url)||"",r.fields.retries=c!=null&&c.retries||(c==null?void 0:c.retries)===0?c==null?void 0:c.retries:5,r.fields.connect_timeout=c!=null&&c.connect_timeout||(c==null?void 0:c.connect_timeout)===0?c==null?void 0:c.connect_timeout:6e4,r.fields.write_timeout=c!=null&&c.write_timeout||(c==null?void 0:c.write_timeout)===0?c==null?void 0:c.write_timeout:6e4,r.fields.read_timeout=c!=null&&c.read_timeout||(c==null?void 0:c.read_timeout)===0?c==null?void 0:c.read_timeout:6e4,r.fields.client_certificate=((f=c==null?void 0:c.client_certificate)==null?void 0:f.id)||"",r.fields.ca_certificates=(h=c==null?void 0:c.ca_certificates)!=null&&h.length?c==null?void 0:c.ca_certificates.join(","):"",r.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,r.fields.tls_verify_value=r.fields.tls_verify_enabled&&(c==null?void 0:c.tls_verify),r.fields.tags=(K=c==null?void 0:c.tags)!=null&&K.length?c.tags.join(", "):"",Object.assign(E,r.fields),p("update",N==null?void 0:N.data)}return N}catch(B){r.errorMessage=T(B),p("error",B)}finally{r.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(r.fields,E)}),e.watch(r.fields,l=>{r.fields.port=O.getPortFromProtocol(l.protocol,String(l.port)),p("model-updated",W.value)}),e.onMounted(()=>{p("model-updated",W.value)}),P({validateUrl:F,getPayload:W,saveFormData:H,canSubmit:ae,initForm:de}),(l,f)=>{const h=e.resolveComponent("KInput"),K=e.resolveComponent("KLabel"),B=e.resolveComponent("KRadio"),N=e.resolveComponent("KSelect"),c=e.resolveComponent("KCheckbox"),u=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",De,[e.createVNode(e.unref(b.EntityBaseForm),{"can-submit":ae.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"error-message":r.errorMessage,"fetch-url":le.value,"form-fields":W.value,"is-readonly":r.isReadonly,onCancel:ye,"onFetch:error":f[25]||(f[25]=m=>l.$emit("error",m)),"onFetch:success":de,onLoading:f[26]||(f[26]=m=>l.$emit("loading",m)),onSubmit:H},{"form-actions":e.withCtx(()=>[e.renderSlot(l.$slots,"form-actions",{canSubmit:ae.value,cancel:ye,submit:H},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:r.fields.name,"onUpdate:modelValue":f[0]||(f[0]=m=>r.fields.name=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:Z.value,"error-message":j.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:r.isReadonly,type:"text",onInput:ge},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(h,{modelValue:r.fields.tags,"onUpdate:modelValue":f[1]||(f[1]=m=>r.fields.tags=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[ie.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",We,[e.createVNode(K,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",Le,[e.createVNode(B,{modelValue:x.value,"onUpdate:modelValue":f[2]||(f[2]=m=>x.value=m),"data-testid":"gateway-service-url-radio","selected-value":o.url,onChange:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),x.value==="url"?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(h,{modelValue:r.fields.url,"onUpdate:modelValue":f[3]||(f[3]=m=>r.fields.url=m),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(B,{modelValue:x.value,"onUpdate:modelValue":f[4]||(f[4]=m=>x.value=m),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":o.protocol,onChange:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),x.value==="protocol"||ie.value?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(N,{modelValue:r.fields.protocol,"onUpdate:modelValue":f[5]||(f[5]=m=>r.fields.protocol=m),"data-testid":"gateway-service-protocol-select",items:be,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:r.isReadonly,required:"",width:"100%",onSelected:f[6]||(f[6]=m=>C(r.fields.protocol,m))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(h,{modelValue:r.fields.host,"onUpdate:modelValue":f[7]||(f[7]=m=>r.fields.host=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),se.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(h,{modelValue:r.fields.path,"onUpdate:modelValue":f[8]||(f[8]=m=>r.fields.path=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:r.fields.port,"onUpdate:modelValue":[f[9]||(f[9]=m=>r.fields.port=m),f[10]||(f[10]=()=>{r.fields.port=X(r.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(u,{modelValue:_.value,"onUpdate:modelValue":f[24]||(f[24]=m=>_.value=m),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createElementVNode("div",ze,[e.createVNode(h,{modelValue:r.fields.retries,"onUpdate:modelValue":[f[11]||(f[11]=m=>r.fields.retries=m),f[12]||(f[12]=()=>{r.fields.retries=X(r.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",He,[e.createVNode(h,{modelValue:r.fields.connect_timeout,"onUpdate:modelValue":[f[13]||(f[13]=m=>r.fields.connect_timeout=m),f[14]||(f[14]=()=>{r.fields.connect_timeout=X(r.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Je,[e.createVNode(h,{modelValue:r.fields.write_timeout,"onUpdate:modelValue":[f[15]||(f[15]=m=>r.fields.write_timeout=m),f[16]||(f[16]=()=>{r.fields.write_timeout=X(r.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(h,{modelValue:r.fields.read_timeout,"onUpdate:modelValue":[f[17]||(f[17]=m=>r.fields.read_timeout=m),f[18]||(f[18]=()=>{r.fields.read_timeout=X(r.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),ee.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(h,{modelValue:r.fields.client_certificate,"onUpdate:modelValue":f[19]||(f[19]=m=>r.fields.client_certificate=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ce.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(h,{modelValue:r.fields.ca_certificates,"onUpdate:modelValue":f[20]||(f[20]=m=>r.fields.ca_certificates=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:r.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(c,{modelValue:r.fields.tls_verify_enabled,"onUpdate:modelValue":f[21]||(f[21]=m=>r.fields.tls_verify_enabled=m),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(B,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[22]||(f[22]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(B,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[23]||(f[23]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-c2c5e1f0"]]),rt={class:"kong-ui-gateway-service-entity-config-card"},lt=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const P=n,{i18n:{t:g},i18nT:p}=oe.useI18n(),a=e.computed(()=>re.form[P.config.app].edit),{getPropValue:_}=b.useHelpers(),I=(i,T)=>_(i,T)===!0?g("gateway_services.form.fields.tls_verify_option.true.display"):g("gateway_services.form.fields.tls_verify_option.false.display"),D=e.ref({id:{},name:{tooltip:g("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.protocol.tooltip")},host:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.host.tooltip")},path:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.path.tooltip")},port:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.port.tooltip")},tags:{tooltip:g("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:g("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:g("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:g("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:g("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:g("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:b.ConfigurationSchemaType.BadgeTag,label:g("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:g("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(i,T)=>(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(e.unref(b.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":D.value,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":n.hideTitle,"onFetch:error":T[0]||(T[0]=V=>i.$emit("fetch:error",V)),"onFetch:success":T[1]||(T[1]=V=>i.$emit("fetch:success",V)),onLoading:T[2]||(T[2]=V=>i.$emit("loading",V))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(typeof e.unref(_)("rowValue",V)=="boolean"?I("rowValue",V):e.unref(g)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(e.unref(_)("rowValue",V)?e.unref(_)("rowValue",V).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xe=()=>{};function it(n,P){function g(...p){return new Promise((a,_)=>{Promise.resolve(n(()=>P.apply(this,p),{fn:P,thisArg:this,args:p})).then(a).catch(_)})}return g}function st(n,P={}){let g,p,a=xe;const _=i=>{clearTimeout(i),a(),a=xe};let I;return i=>{const T=e.toValue(n),V=e.toValue(P.maxWait);return g&&_(g),T<=0||V!==void 0&&V<=0?(p&&(_(p),p=null),Promise.resolve(i())):new Promise((J,le)=>{a=P.rejectOnCancel?le:J,I=i,V&&!p&&(p=setTimeout(()=>{g&&_(g),p=null,J(I())},V)),g=setTimeout(()=>{p&&_(p),p=null,J(i())},T)})}}function Ce(n,P=200,g={}){return it(st(P,g),n)}const q={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},at={class:"kong-ui-entities-gateway-service-form"},nt={key:0,class:"gateway-service-form-general-info"},ct={class:"gateway-service-form-group-selection-wrapper"},dt={key:0,class:"gateway-service-form-group-fields"},ft={key:0,class:"gateway-service-form-group-fields"},pt={key:0},mt={key:0,class:"gateway-service-form-advanced-fields"},ut={class:"gateway-service-form-margin-bottom"},gt={class:"gateway-service-form-margin-bottom"},yt={class:"gateway-service-form-margin-bottom"},_t={class:"gateway-service-form-margin-bottom"},bt={key:0,class:"gateway-service-form-margin-bottom"},wt={key:1,class:"gateway-service-form-margin-bottom"},ht={key:2,class:"gateway-service-form-margin-bottom"},vt={key:0,class:"checkbox-aligned-radio"},Vt={key:1,class:"checkbox-aligned-radio"},kt={class:"gateway-service-form-tags"},Ct={class:"form-error-list"},Nt=ke(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1},sampleApiList:{type:Array,required:!1,default:()=>[]}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(n,{expose:P,emit:g}){var fe;const p=g,a=n,_=e.ref(!0),I=Ve.useRouter(),{i18nT:D,i18n:{t:i}}=oe.useI18n(),{getErrorFieldsFromError:T}=b.useErrors(),{axiosInstance:V}=b.useAxios((fe=a.config)==null?void 0:fe.axiosRequestConfig),J=b.useValidators(),{validateHost:le,validatePath:G,validatePort:me,validateProtocol:ie}=oe.useUrlValidators(),x=e.computed(()=>re.form[a.config.app].edit),O=e.computed(()=>a.gatewayServiceId?b.EntityBaseFormType.Edit:b.EntityBaseFormType.Create),j=e.ref(!1),Z=e.computed(()=>!!a.gatewayServiceId),r=e.ref(Z.value?"protocol":"url"),E=oe.usePortFromProtocol(),Q=e.ref(""),be=e.computed(()=>!!Q.value||!!te("name")),o=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),C=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),X=a.config.app==="konnect"||b.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),Y=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...X?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],F={url:"url",protocol:"protocol"},se=(t,s)=>{s.value},ee=t=>t?parseFloat(t):0,ce=()=>{o.fields.host=C.host,o.fields.path=C.path,o.fields.port=C.port,o.fields.protocol=C.protocol,o.fields.url=C.url,o.fields.retries=C.retries,o.fields.connect_timeout=C.connect_timeout,o.fields.write_timeout=C.write_timeout,o.fields.read_timeout=C.read_timeout,o.fields.client_certificate=C.client_certificate,o.fields.ca_certificates=C.ca_certificates,o.fields.tls_verify_enabled=C.tls_verify_enabled,o.fields.tls_verify_value=C.tls_verify_value},ue=()=>{_.value=!0,A(),o.errorMessages=[],ce()},ge=()=>{switch(ce(),o.fields.name=`${q.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,r.value){case"url":o.fields.url=`${q.protocol}://${q.host}${q.path}`;break;case"protocol":o.fields.host=q.host,o.fields.path=q.path,o.fields.protocol=q.protocol,o.fields.port=q.port;break;default:o.fields.url=`${q.protocol}://${q.host}${q.path}`}},ae=Ce(()=>{if(A(),o.fields.url.length)try{const t=new URL(o.fields.url),s=ie(t.protocol,Y);if(s)throw new Error(s);o.fields.protocol=t.protocol.slice(0,-1);const v=le(t.hostname);if(v)throw new Error(v);o.fields.host=t.hostname;const U=G(t.pathname);if(U)throw new Error(U);o.fields.path=t.pathname;const k=me(t.port);if(k)throw new Error(k);const S=Number(t.port);j.value=!!S,o.fields.port=S||E.getPortFromProtocol(o.fields.protocol),p("url-valid:success")}catch(t){p("url-valid:error",t.message||i("gateway_services.form.errors.url.invalid")),o.formFieldErrors.url=t.message||i("gateway_services.form.errors.url.invalid")}},300),de=Ce(t=>{A(t)},300),ye=e.computed(()=>!!o.formFieldErrors.url||!!o.formFieldErrors.host||!!o.formFieldErrors.port),te=t=>{if(o.errorMessages.length)return"";const s=o.formFieldErrors;return s[t]?s[t]:""},z=Ce(t=>{A(t??void 0);const s=le(o.fields.host);s&&(o.formFieldErrors.host=s);const v=G(o.fields.path);v&&(o.formFieldErrors.path=v);const U=me(o.fields.port);U&&(o.formFieldErrors.port=U),W.value?p("url-valid:success"):p("url-valid:error",o.errorMessages.join(",")||i("gateway_services.form.errors.url.invalid"))},300),A=t=>{if(t)o.formFieldErrors[t]="";else for(let s in o.formFieldErrors)o.formFieldErrors[s]="";o.errorMessages=[]},W=e.computed(()=>{for(let t in o.formFieldErrors)if(o.formFieldErrors[t].length)return!1;return!0}),H=()=>{o.fields.url&&r.value==="url"?ae():z()},ne=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,l=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(o.fields.protocol)),f=e.computed(()=>{if(r.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),h=e.computed(()=>{if(r.value==="url")return!0;const t=["https","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),K=e.computed(()=>{if(r.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),B=t=>{A("name"),Q.value=J.utf8Name(t)},N=e.computed(()=>{if(Z.value)return JSON.stringify(o.fields)!==JSON.stringify(C);const t=r.value==="url"&&!!o.fields.url&&W.value,s=r.value==="protocol"&&!!o.fields.host&&W.value;return t||s}),c=t=>{var s,v,U;o.fields.name=(t==null?void 0:t.name)||"",o.fields.tags=((s=t==null?void 0:t.tags)==null?void 0:s.join(", "))||"",o.fields.protocol=(t==null?void 0:t.protocol)||"http",o.fields.path=(t==null?void 0:t.path)||"",o.fields.read_timeout=t!=null&&t.read_timeout||(t==null?void 0:t.read_timeout)===0?t==null?void 0:t.read_timeout:6e4,o.fields.retries=t!=null&&t.retries||(t==null?void 0:t.retries)===0?t==null?void 0:t.retries:5,o.fields.host=(t==null?void 0:t.host)||"",o.fields.connect_timeout=t!=null&&t.connect_timeout||(t==null?void 0:t.connect_timeout)===0?t==null?void 0:t.connect_timeout:6e4,o.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,o.fields.tls_verify_value=t!=null&&t.tls_verify?t==null?void 0:t.tls_verify:!1,o.fields.ca_certificates=((v=t==null?void 0:t.ca_certificates)==null?void 0:v.join(","))||"",o.fields.client_certificate=((U=t==null?void 0:t.client_certificate)==null?void 0:U.id)||"",o.fields.write_timeout=t!=null&&t.write_timeout||(t==null?void 0:t.write_timeout)===0?t==null?void 0:t.write_timeout:6e4,o.fields.port=t!=null&&t.port||(t==null?void 0:t.port)===0?t==null?void 0:t.port:80,Object.assign(C,o.fields)},u=()=>{I.push(a.config.cancelRoute)},m=e.computed(()=>{var s,v;let t=`${a.config.apiBaseUrl}${re.form[a.config.app].validate}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),w=e.computed(()=>{var s,v;let t=`${a.config.apiBaseUrl}${re.form[a.config.app][O.value]}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),$=t=>{let s="";t.url&&(s=new URL(t.url).protocol),(["https","wss","tls"].includes(t.protocol)||["https","wss","tls"].includes(s))&&(t.tls_verify=t.tls_verify_enabled?t.tls_verify_value:null),delete t.tls_verify_enabled,delete t.tls_verify_value},L=e.computed(()=>{var s,v,U,k;const t={name:o.fields.name||null,tags:o.fields.tags?(U=(v=(s=o.fields.tags)==null?void 0:s.split(","))==null?void 0:v.map(S=>String(S||"").trim()))==null?void 0:U.filter(S=>S!==""):null,protocol:o.fields.protocol,path:o.fields.path||null,read_timeout:o.fields.read_timeout,retries:o.fields.retries,host:o.fields.host,connect_timeout:o.fields.connect_timeout,tls_verify_value:o.fields.tls_verify_value,tls_verify_enabled:o.fields.tls_verify_enabled,ca_certificates:o.fields.ca_certificates?(k=o.fields.ca_certificates)==null?void 0:k.split(",").filter(S=>S!==""):null,client_certificate:o.fields.client_certificate?{id:o.fields.client_certificate}:null,write_timeout:o.fields.write_timeout,port:o.fields.port,url:o.fields.url};return o.fields.client_certificate&&["https","wss","tls"].includes(o.fields.protocol)&&(t.client_certificate={id:o.fields.client_certificate}),o.fields.tls_verify_enabled&&["https","wss","tls"].includes(o.fields.protocol)&&(t.tls_verify=o.fields.tls_verify_value),l.value||(t.path=null),O.value==="create"?r.value==="url"?(delete t.protocol,delete t.host,delete t.path,a.config.app==="konnect"&&delete t.port):delete t.url:O.value==="edit"&&delete t.url,t}),R=async()=>{var t,s,v,U;try{o.isReadonly=!0,H();const k=L.value;$(k);let S;if(await V.post(m.value,k),O.value==="create"?S=await V.post(w.value,k):O.value==="edit"&&(S=((t=a.config)==null?void 0:t.app)==="konnect"?await V.put(w.value,k):await V.patch(w.value,k)),S){const{data:d}=S;o.fields.name=(d==null?void 0:d.name)||"",o.fields.port=d.port||E.getPortFromProtocol(d.protocol),o.fields.protocol=(d==null?void 0:d.protocol)||"http",o.fields.host=(d==null?void 0:d.host)||"",o.fields.path=(d==null?void 0:d.path)||"",o.fields.url=(d==null?void 0:d.url)||"",o.fields.retries=d!=null&&d.retries||(d==null?void 0:d.retries)===0?d==null?void 0:d.retries:5,o.fields.connect_timeout=d!=null&&d.connect_timeout||(d==null?void 0:d.connect_timeout)===0?d==null?void 0:d.connect_timeout:6e4,o.fields.write_timeout=d!=null&&d.write_timeout||(d==null?void 0:d.write_timeout)===0?d==null?void 0:d.write_timeout:6e4,o.fields.read_timeout=d!=null&&d.read_timeout||(d==null?void 0:d.read_timeout)===0?d==null?void 0:d.read_timeout:6e4,o.fields.client_certificate=((s=d==null?void 0:d.client_certificate)==null?void 0:s.id)||"",o.fields.ca_certificates=(v=d==null?void 0:d.ca_certificates)!=null&&v.length?d==null?void 0:d.ca_certificates.join(","):"",o.fields.tls_verify_enabled=(d==null?void 0:d.tls_verify)!==""&&(d==null?void 0:d.tls_verify)!==null&&(d==null?void 0:d.tls_verify)!==void 0,o.fields.tls_verify_value=o.fields.tls_verify_enabled&&(d==null?void 0:d.tls_verify),o.fields.tags=(U=d==null?void 0:d.tags)!=null&&U.length?d.tags.join(", "):"",Object.assign(C,o.fields),p("update",S==null?void 0:S.data)}return S}catch(k){const{fields:S,messages:d}=T(k);o.errorMessages=d,S.length&&S.forEach(pe=>{const _e=pe.field;_e==="client_certificate.id"?o.formFieldErrors.client_certificate=pe.message:_e.startsWith("ca_certificates")?o.formFieldErrors.ca_certificates=pe.message:Object.keys(o.formFieldErrors).includes(_e)&&(o.formFieldErrors={...o.formFieldErrors,[_e]:pe.message})}),p("error",k)}finally{o.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(o.fields,C)}),e.watch(o.fields,t=>{o.fields.port=E.getPortFromProtocol(t.protocol,String(t.port)),p("model-updated",L.value)}),e.onMounted(()=>{p("model-updated",L.value),Z.value||(o.fields.name=ne())}),P({validateUrl:H,getPayload:L,saveFormData:R,canSubmit:N,initForm:c}),(t,s)=>{const v=e.resolveComponent("KRadio"),U=e.resolveComponent("KButton"),k=e.resolveComponent("KInput"),S=e.resolveComponent("KSelect"),d=e.resolveComponent("KCheckbox"),pe=e.resolveComponent("KCollapse"),_e=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(e.unref(b.EntityBaseForm),{"can-submit":N.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"fetch-url":x.value,"form-fields":L.value,"is-readonly":o.isReadonly,onCancel:u,"onFetch:error":s[30]||(s[30]=y=>t.$emit("error",y)),"onFetch:success":c,onLoading:s[31]||(s[31]=y=>t.$emit("loading",y)),onSubmit:R},{"form-actions":e.withCtx(()=>[e.renderSlot(t.$slots,"form-actions",{canSubmit:N.value,cancel:u,submit:R},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[Z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",ct,[e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=y=>r.value=y),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(i)("gateway_services.form.sections.keys.url.description"),label:e.unref(i)("gateway_services.form.sections.keys.url.label"),"selected-value":F.url,onChange:ue},null,8,["modelValue","description","label","selected-value"]),e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=y=>r.value=y),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(i)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(i)("gateway_services.form.sections.keys.protocol.label"),"selected-value":F.protocol,onChange:ue},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="url"?(e.openBlock(),e.createElementBlock("div",dt,[e.createVNode(k,{modelValue:o.fields.url,"onUpdate:modelValue":s[2]||(s[2]=y=>o.fields.url=y),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:ye.value,"error-message":te("url"),label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:e.unref(ae)},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary",size:"small",onClick:ge},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder","onInput"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="protocol"||Z.value?(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(S,{modelValue:o.fields.protocol,"onUpdate:modelValue":s[3]||(s[3]=y=>o.fields.protocol=y),"data-testid":"gateway-service-protocol-select",items:Y,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:o.isReadonly,required:"",width:"100%",onSelected:s[4]||(s[4]=y=>se(o.fields.protocol,y))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(k,{modelValue:o.fields.host,"onUpdate:modelValue":s[5]||(s[5]=y=>o.fields.host=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!o.formFieldErrors.host,"error-message":te("host"),label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:"",onInput:s[6]||(s[6]=y=>e.unref(z)("host"))},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary",size:"small",onClick:ge},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),l.value?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(k,{modelValue:o.fields.path,"onUpdate:modelValue":s[7]||(s[7]=y=>o.fields.path=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!o.formFieldErrors.path,"error-message":te("path"),label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder"),onInput:s[8]||(s[8]=y=>e.unref(z)("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(k,{modelValue:o.fields.port,"onUpdate:modelValue":[s[9]||(s[9]=y=>o.fields.port=y),s[11]||(s[11]=()=>{o.fields.port=ee(o.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!o.formFieldErrors.port,"error-message":te("port"),label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:s[10]||(s[10]=y=>e.unref(z)("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(pe,{modelValue:_.value,"onUpdate:modelValue":s[27]||(s[27]=y=>_.value=y),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",ut,[e.createVNode(k,{modelValue:o.fields.retries,"onUpdate:modelValue":[s[12]||(s[12]=y=>o.fields.retries=y),s[13]||(s[13]=()=>{o.fields.retries=ee(o.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",gt,[e.createVNode(k,{modelValue:o.fields.connect_timeout,"onUpdate:modelValue":[s[14]||(s[14]=y=>o.fields.connect_timeout=y),s[15]||(s[15]=()=>{o.fields.connect_timeout=ee(o.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",yt,[e.createVNode(k,{modelValue:o.fields.write_timeout,"onUpdate:modelValue":[s[16]||(s[16]=y=>o.fields.write_timeout=y),s[17]||(s[17]=()=>{o.fields.write_timeout=ee(o.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",_t,[e.createVNode(k,{modelValue:o.fields.read_timeout,"onUpdate:modelValue":[s[18]||(s[18]=y=>o.fields.read_timeout=y),s[19]||(s[19]=()=>{o.fields.read_timeout=ee(o.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),f.value?(e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(k,{modelValue:o.fields.client_certificate,"onUpdate:modelValue":s[20]||(s[20]=y=>o.fields.client_certificate=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!o.formFieldErrors.client_certificate,label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:o.isReadonly,type:"text",onInput:s[21]||(s[21]=y=>e.unref(de)("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(k,{modelValue:o.fields.ca_certificates,"onUpdate:modelValue":s[22]||(s[22]=y=>o.fields.ca_certificates=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!o.formFieldErrors.ca_certificates,label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:o.isReadonly,type:"text",onInput:s[23]||(s[23]=y=>e.unref(de)("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(d,{modelValue:o.fields.tls_verify_enabled,"onUpdate:modelValue":s[24]||(s[24]=y=>o.fields.tls_verify_enabled=y),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(v,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":s[25]||(s[25]=y=>o.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(v,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":s[26]||(s[26]=y=>o.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:o.fields.name,"onUpdate:modelValue":s[28]||(s[28]=y=>o.fields.name=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:be.value,"error-message":Q.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:o.isReadonly,type:"text",onInput:B},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(pe,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",kt,[e.createVNode(k,{modelValue:o.fields.tags,"onUpdate:modelValue":s[29]||(s[29]=y=>o.fields.tags=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:o.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),o.errorMessages.length?(e.openBlock(),e.createBlock(_e,{key:0,appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("ul",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.errorMessages,y=>(e.openBlock(),e.createElementBlock("li",{key:y},e.toDisplayString(y),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-9e0af6be"]]);M.GatewayServiceConfigCard=lt,M.GatewayServiceForm=Nt,M.GatewayServiceList=Me,M.LegacyGatewayServiceForm=ot,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M["kong-ui-public-entities-gateway-services"]={},M.Vue,M.VueRouter,M.KongIcons,M["kong-ui-public-i18n"],M["kong-ui-public-entities-shared"]))})(this,function(M,e,Ve,we,Ne,b){"use strict";const Ee={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"The URL must follow a valid format. Example: https://api.kong-air.com/flights"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://www.myapi.com/",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. www.myapi.com, 127.0.0.1",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",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).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function Se(){const n=Ne.createI18n("en-us",Ee);return{i18n:n,i18nT:Ne.i18nTComponent(n)}}function Ie(){return{getPortFromProtocol:(P,g)=>{const p=[80,443],a=Number(g);if((a||a===0)&&!p.includes(a))return a;switch(P){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Pe(){const{i18n:{t:n}}=oe.useI18n();return{validateHost:_=>{if(!_||_.trim()==="")return n("gateway_services.form.errors.host.empty");const I=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(_)||I.test(_)?"":n("gateway_services.form.errors.host.invalid")},validateProtocol:(_,I)=>!_||_.trim()===""?n("gateway_services.form.errors.protocol.empty"):(_=_.slice(0,-1),I.find(i=>{if(i.value===_)return i})===void 0?n("gateway_services.form.errors.protocol.invalid"):""),validatePath:_=>!_||_===""?"":_.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(_)?n("gateway_services.form.errors.path.invalid"):"":n("gateway_services.form.errors.path.prefix"),validatePort:_=>{if(_==null||_==="")return"";const I=typeof _=="string"?parseInt(_,10):_;return isNaN(I)?n("gateway_services.form.errors.port.type"):I<0||I>65535?n("gateway_services.form.errors.port.invalid"):""}}}const oe={useI18n:Se,usePortFromProtocol:Ie,useUrlValidators:Pe},he="/v2/control-planes/{controlPlaneId}/core-entities",ve="/{workspace}",re={list:{konnect:{all:`${he}/services`},kongManager:{all:`${ve}/services`}},form:{konnect:{create:`${he}/services`,validate:`${he}/v1/schemas/json/service/validate`,edit:`${he}/services/{id}`},kongManager:{create:`${ve}/services`,validate:`${ve}/schemas/services/validate`,edit:`${ve}/services/{id}`}}},Be="#00abd2",Te="24px",Fe={class:"kong-ui-entities-gateway-services-list"},$e={class:"button-row"},Ue={class:"empty-state-icon-gateway"},Ae={key:1},Re=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:P}){var c;const g=P,p=n,{i18n:{t:a,formatUnixTimeStamp:_}}=oe.useI18n(),I=Ve.useRouter(),{axiosInstance:D}=b.useAxios((c=p.config)==null?void 0:c.axiosRequestConfig),{hasRecords:i,handleStateChange:T}=b.useTableState(()=>j.value),V=e.computed(()=>i.value&&p.config.app==="konnect"),Z=e.computed(()=>!p.enableV2EmptyStates&&p.config.app==="konnect"),le=e.computed(()=>p.config.app!=="kongManager"||!!p.config.disableSorting),G={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...p.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},me={columnVisibility:{created_at:!1}},ie=G,x=e.computed(()=>{var m,w;let u=`${p.config.apiBaseUrl}${re.list[p.config.app].all}`;return p.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((m=p.config)==null?void 0:m.controlPlaneId)||""):p.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(w=p.config)!=null&&w.workspace?`/${p.config.workspace}`:"")),u}),O=e.computed(()=>p.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${x.value}`):new URL(x.value)),j=e.ref(""),J=e.computed(()=>{const u=p.config.app==="konnect"||p.config.isExactMatch;if(u)return{isExactMatch:u,placeholder:a(`search.placeholder.${p.config.app}`)};const{name:m,enabled:w,protocol:$,host:L,port:R,path:fe}=G;return{isExactMatch:u,fields:{name:m,enabled:w,protocol:$,host:L,port:R,path:fe},schema:p.config.filterSchema}}),{fetcher:r,fetcherState:E,fetcherCacheKey:Q}=b.useFetcher({...p.config,cacheIdentifier:p.cacheIdentifier},x.value),be=()=>{j.value=""},o=()=>{Q.value++},C=e.ref(null),X=e.computed(()=>({ctaPath:p.config.createRoute,ctaText:N.value?p.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState?` ${p.config.additionMessageForEmptyState}`:""}`,title:N.value?p.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),Y=e.ref(!1),F=e.ref(null),se=e.computed(()=>{const u={action:"disable",id:"",name:""};if(F.value){const{enabled:m,id:w,name:$}=F.value;u.action=m?"disable":"enable",u.id=w,u.name=$||w}return u}),ee=u=>{Y.value=!0,F.value=u},ce=()=>{Y.value=!1,F.value=null},ue=async()=>{var $,L;if(!await(($=p.canEdit)==null?void 0:$.call(p,F.value))||!F.value)return;const m=`${O.value.href}/${F.value.id}`,w=!F.value.enabled;try{const{data:R}=((L=p.config)==null?void 0:L.app)==="konnect"?await D.put(m,{...F.value,enabled:w}):await D.patch(m,{...F.value,enabled:w});g("toggle:success",R),F.value.enabled=w}catch(R){g("error",R)}},ge=u=>{p.config.getControlPlaneRoute&&I.push(p.config.getControlPlaneRoute(u))},ae=(u,m)=>{const w=u.id;if(!m(w)){g("copy:error",{entity:u,field:"id",message:a("errors.copy")});return}g("copy:success",{entity:u,field:"id",message:a("copy.success",{val:w})})},de=(u,m)=>{const w=JSON.stringify(u);if(!m(w)){g("copy:error",{entity:u,message:a("errors.copy")});return}g("copy:success",{entity:u,message:a("copy.success_brief")})},ye=async u=>{var w;await((w=p.canRetrieve)==null?void 0:w.call(p,u))&&I.push(p.config.getViewRoute(u.id))},te=u=>({label:a("actions.view"),to:p.config.getViewRoute(u)}),z=u=>({label:a("actions.edit"),to:p.config.getEditRoute(u)}),A=e.ref(void 0),W=e.ref(!1),H=e.ref(!1),ne=e.ref(""),l=b.useDeleteUrlBuilder(p.config,x.value),f=u=>{A.value=u,W.value=!0,ne.value=""},h=()=>{W.value=!1,A.value=void 0},K=async()=>{var u,m,w;if((u=A.value)!=null&&u.id){H.value=!0;try{await D.delete(l(A.value.id)),g("delete:success",A.value),h(),Q.value++}catch($){ne.value=((w=(m=$.response)==null?void 0:m.data)==null?void 0:w.message)||$.message||a("errors.delete"),g("error",$)}finally{H.value=!1}}},B=()=>{I.push(p.config.createRoute)};e.watch(E,u=>{var m,w,$;if(u.status===b.FetcherStatus.Error){C.value={title:a("errors.general")},($=(w=(m=u.error)==null?void 0:m.response)==null?void 0:w.data)!=null&&$.message&&(C.value.message=u.error.response.data.message),g("error",u.error);return}C.value=null});const N=e.ref(!1);return e.onBeforeMount(async()=>{N.value=await p.canCreate()}),(u,m)=>{const w=e.resolveComponent("KButton"),$=e.resolveComponent("KBadge"),L=e.resolveComponent("KInputSwitch"),R=e.resolveComponent("KDropdownItem"),fe=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(e.unref(b.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":me,"disable-sorting":le.value,"empty-state-options":X.value,"enable-entity-actions":"","error-message":C.value,fetcher:e.unref(r),"fetcher-cache-key":e.unref(Q),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:j.value,"table-headers":e.unref(ie),onClearSearchInput:be,"onClick:row":m[5]||(m[5]=t=>ye(t)),onSort:o,onState:e.unref(T)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(b.EntityFilter),{modelValue:j.value,"onUpdate:modelValue":m[0]||(m[0]=t=>j.value=t),config:J.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[V.value?(e.openBlock(),e.createBlock(w,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=t=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(we.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(w,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(we.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:t})=>[e.createElementVNode("b",null,e.toDisplayString(t??"-"),1)]),control_plane:e.withCtx(({row:t})=>{var s;return[(s=t.x_meta)!=null&&s.cluster_id?(e.openBlock(),e.createBlock($,{key:0,tooltip:t.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(v=>ge(t.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Ae,"-"))]}),enabled:e.withCtx(({row:t})=>[e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canEdit(t),"force-show":""},{default:e.withCtx(({isAllowed:s})=>[e.createElementVNode("div",{onClick:m[4]||(m[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(L,{modelValue:t.enabled,"onUpdate:modelValue":v=>t.enabled=v,"data-testid":`row-${t.id}-toggle-input`,disabled:!s,onClick:e.withModifiers(v=>ee(t),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:t})=>[e.createVNode(e.unref(b.TableTags),{tags:t},null,8,["tags"])]),created_at:e.withCtx(({rowValue:t})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(t)),1)]),updated_at:e.withCtx(({row:t,rowValue:s})=>[e.createTextVNode(e.toDisplayString(e.unref(_)(s??t.created_at)),1)]),actions:e.withCtx(({row:t})=>[e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(R,{"data-testid":"action-entity-copy-id",onClick:v=>ae(t,s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:s})=>[e.createVNode(R,{"data-testid":"action-entity-copy-json",onClick:v=>de(t,s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(t)},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"action-entity-view","has-divider":"",item:te(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canEdit(t)},{default:e.withCtx(()=>[e.createVNode(R,{"data-testid":"action-entity-edit",item:z(t.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(b.PermissionsWrapper),{"auth-function":()=>n.canDelete(t)},{default:e.withCtx(()=>[e.createVNode(R,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:s=>f(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(i)&&Z.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(w,{appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-more-button",icon:"",onClick:m[2]||(m[2]=t=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(we.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,n.enableV2EmptyStates&&n.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var t;return[e.createVNode(e.unref(b.EntityEmptyState),{"action-button-text":e.unref(a)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>n.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(a)("gateway_services.empty_state_v2.description"),"learn-more":n.config.app==="konnect",title:e.unref(a)("gateway_services.empty_state_v2.title"),"onClick:create":B,"onClick:learnMore":m[3]||(m[3]=s=>u.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createVNode(e.unref(we.ServicesIcon),{color:e.unref(Be),size:e.unref(Te)},null,8,["color","size"])])]),_:2},[(t=n.config)!=null&&t.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(b.EntityToggleModal),{action:se.value.action,"entity-id":se.value.id,"entity-name":se.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":ue,visible:Y.value,onCancel:ce,onProceed:ce},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(b.EntityDeleteModal),{"action-pending":H.value,description:e.unref(a)("actions.delete.description"),"entity-name":A.value&&(A.value.name||A.value.id),"entity-type":e.unref(b.EntityTypes).GatewayService,error:ne.value,title:e.unref(a)("actions.delete.title"),visible:W.value,onCancel:h,onProceed:K},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),ke=(n,P)=>{const g=n.__vccOpts||n;for(const[p,a]of P)g[p]=a;return g},Me=ke(Re,[["__scopeId","data-v-ee4f8a6d"]]),De={class:"kong-ui-entities-gateway-service-form"},Ke={key:0},We={class:"gateway-service-form-traffic-label"},Le={class:"gateway-service-form-margin-bottom"},qe={key:0,class:"gateway-service-form-group-fields"},Ge={key:1,class:"gateway-service-form-group-fields"},Oe={key:0},je={class:"gateway-service-form-margin-top"},ze={class:"gateway-service-form-margin-bottom"},He={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Je={class:"gateway-service-form-margin-bottom"},Qe={key:0,class:"gateway-service-form-margin-bottom"},Xe={key:1,class:"gateway-service-form-margin-bottom"},Ye={key:2,class:"gateway-service-form-margin-bottom"},et={key:0,class:"checkbox-aligned-radio"},tt={key:1,class:"checkbox-aligned-radio"},ot=ke(e.defineComponent({__name:"LegacyGatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:P,emit:g}){var ne;const p=g,a=n,_=e.ref(!0),I=Ve.useRouter(),{i18nT:D,i18n:{t:i}}=oe.useI18n(),{getMessageFromError:T}=b.useErrors(),{axiosInstance:V}=b.useAxios((ne=a.config)==null?void 0:ne.axiosRequestConfig),Z=b.useValidators(),le=e.computed(()=>re.form[a.config.app].edit),G=e.computed(()=>a.gatewayServiceId?b.EntityBaseFormType.Edit:b.EntityBaseFormType.Create),me=e.ref(!1),ie=e.computed(()=>!!a.gatewayServiceId),x=e.ref(ie.value?"protocol":"url"),O=oe.usePortFromProtocol(),j=e.ref(""),J=e.computed(()=>!!j.value),r=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessage:""}),E=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),Q=a.config.app==="konnect"||b.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),be=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...Q?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],o={url:"url",protocol:"protocol"},C=(l,f)=>{f.value},X=l=>l?parseFloat(l):0,Y=()=>{_.value=!0,r.errorMessage="",r.fields.host=E.host,r.fields.path=E.path,r.fields.port=E.port,r.fields.protocol=E.protocol,r.fields.url=E.url,r.fields.retries=E.retries,r.fields.connect_timeout=E.connect_timeout,r.fields.write_timeout=E.write_timeout,r.fields.read_timeout=E.read_timeout,r.fields.client_certificate=E.client_certificate,r.fields.ca_certificates=E.ca_certificates,r.fields.tls_verify_enabled=E.tls_verify_enabled,r.fields.tls_verify_value=E.tls_verify_value},F=()=>{if(r.fields.url&&x.value==="url")try{const l=new URL(r.fields.url);r.errorMessage="",r.fields.protocol=l.protocol.slice(0,-1),r.fields.host=l.hostname,r.fields.path=l.pathname;const f=Number(l.port);me.value=!!f,r.fields.port=f||O.getPortFromProtocol(r.fields.protocol),r.errorMessage="",p("url-valid:success")}catch(l){r.errorMessage=i("errors.urlErrorMessage"),p("url-valid:error",T(l))}else p("url-valid:success"),r.errorMessage=""},se=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(r.fields.protocol)),ee=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ce=e.computed(()=>{if(x.value==="url")return!0;const l=["https","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ue=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ge=l=>{j.value=Z.utf8Name(l)},ae=e.computed(()=>ie.value&&JSON.stringify(r.fields)!==JSON.stringify(E)||x.value==="url"&&!!r.fields.url||x.value==="protocol"&&!!r.fields.host),de=l=>{var f,h,K;r.fields.name=(l==null?void 0:l.name)||"",r.fields.tags=((f=l==null?void 0:l.tags)==null?void 0:f.join(", "))||"",r.fields.protocol=(l==null?void 0:l.protocol)||"http",r.fields.path=(l==null?void 0:l.path)||"",r.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,r.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,r.fields.host=(l==null?void 0:l.host)||"",r.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,r.fields.tls_verify_enabled=(l==null?void 0:l.tls_verify)!==""&&(l==null?void 0:l.tls_verify)!==null&&(l==null?void 0:l.tls_verify)!==void 0,r.fields.tls_verify_value=l!=null&&l.tls_verify?l==null?void 0:l.tls_verify:!1,r.fields.ca_certificates=((h=l==null?void 0:l.ca_certificates)==null?void 0:h.join(","))||"",r.fields.client_certificate=((K=l==null?void 0:l.client_certificate)==null?void 0:K.id)||"",r.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,r.fields.port=l!=null&&l.port||(l==null?void 0:l.port)===0?l==null?void 0:l.port:80,Object.assign(E,r.fields)},ye=()=>{I.push(a.config.cancelRoute)},te=e.computed(()=>{var f,h;let l=`${a.config.apiBaseUrl}${re.form[a.config.app].validate}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),z=e.computed(()=>{var f,h;let l=`${a.config.apiBaseUrl}${re.form[a.config.app][G.value]}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(h=a.config)!=null&&h.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),A=l=>{let f="";l.url&&(f=new URL(l.url).protocol),(["https","wss","tls"].includes(l.protocol)||["https","wss","tls"].includes(f))&&(l.tls_verify=l.tls_verify_enabled?l.tls_verify_value:null),delete l.tls_verify_enabled,delete l.tls_verify_value},W=e.computed(()=>{var f,h,K,B;const l={name:r.fields.name||null,tags:r.fields.tags?(K=(h=(f=r.fields.tags)==null?void 0:f.split(","))==null?void 0:h.map(N=>String(N||"").trim()))==null?void 0:K.filter(N=>N!==""):null,protocol:r.fields.protocol,path:r.fields.path||null,read_timeout:r.fields.read_timeout,retries:r.fields.retries,host:r.fields.host,connect_timeout:r.fields.connect_timeout,tls_verify_value:r.fields.tls_verify_value,tls_verify_enabled:r.fields.tls_verify_enabled,ca_certificates:r.fields.ca_certificates?(B=r.fields.ca_certificates)==null?void 0:B.split(",").filter(N=>N!==""):null,client_certificate:r.fields.client_certificate?{id:r.fields.client_certificate}:null,write_timeout:r.fields.write_timeout,port:r.fields.port,url:r.fields.url};return r.fields.client_certificate&&["https","wss","tls"].includes(r.fields.protocol)&&(l.client_certificate={id:r.fields.client_certificate}),r.fields.tls_verify_enabled&&["https","wss","tls"].includes(r.fields.protocol)&&(l.tls_verify=r.fields.tls_verify_value),se.value||(l.path=null),G.value==="create"?x.value==="url"?(delete l.protocol,delete l.host,delete l.path,a.config.app==="konnect"&&delete l.port):delete l.url:G.value==="edit"&&delete l.url,l}),H=async()=>{var l,f,h,K;try{r.isReadonly=!0,F();const B=W.value;A(B);let N;if(await V.post(te.value,B),G.value==="create"?N=await V.post(z.value,B):G.value==="edit"&&(N=((l=a.config)==null?void 0:l.app)==="konnect"?await V.put(z.value,B):await V.patch(z.value,B)),N){const{data:c}=N;r.fields.name=(c==null?void 0:c.name)||"",r.fields.port=c.port||O.getPortFromProtocol(c.protocol),r.fields.protocol=(c==null?void 0:c.protocol)||"http",r.fields.host=(c==null?void 0:c.host)||"",r.fields.path=(c==null?void 0:c.path)||"",r.fields.url=(c==null?void 0:c.url)||"",r.fields.retries=c!=null&&c.retries||(c==null?void 0:c.retries)===0?c==null?void 0:c.retries:5,r.fields.connect_timeout=c!=null&&c.connect_timeout||(c==null?void 0:c.connect_timeout)===0?c==null?void 0:c.connect_timeout:6e4,r.fields.write_timeout=c!=null&&c.write_timeout||(c==null?void 0:c.write_timeout)===0?c==null?void 0:c.write_timeout:6e4,r.fields.read_timeout=c!=null&&c.read_timeout||(c==null?void 0:c.read_timeout)===0?c==null?void 0:c.read_timeout:6e4,r.fields.client_certificate=((f=c==null?void 0:c.client_certificate)==null?void 0:f.id)||"",r.fields.ca_certificates=(h=c==null?void 0:c.ca_certificates)!=null&&h.length?c==null?void 0:c.ca_certificates.join(","):"",r.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,r.fields.tls_verify_value=r.fields.tls_verify_enabled&&(c==null?void 0:c.tls_verify),r.fields.tags=(K=c==null?void 0:c.tags)!=null&&K.length?c.tags.join(", "):"",Object.assign(E,r.fields),p("update",N==null?void 0:N.data)}return N}catch(B){r.errorMessage=T(B),p("error",B)}finally{r.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(r.fields,E)}),e.watch(r.fields,l=>{r.fields.port=O.getPortFromProtocol(l.protocol,String(l.port)),p("model-updated",W.value)}),e.onMounted(()=>{p("model-updated",W.value)}),P({validateUrl:F,getPayload:W,saveFormData:H,canSubmit:ae,initForm:de}),(l,f)=>{const h=e.resolveComponent("KInput"),K=e.resolveComponent("KLabel"),B=e.resolveComponent("KRadio"),N=e.resolveComponent("KSelect"),c=e.resolveComponent("KCheckbox"),u=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",De,[e.createVNode(e.unref(b.EntityBaseForm),{"can-submit":ae.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"error-message":r.errorMessage,"fetch-url":le.value,"form-fields":W.value,"is-readonly":r.isReadonly,onCancel:ye,"onFetch:error":f[25]||(f[25]=m=>l.$emit("error",m)),"onFetch:success":de,onLoading:f[26]||(f[26]=m=>l.$emit("loading",m)),onSubmit:H},{"form-actions":e.withCtx(()=>[e.renderSlot(l.$slots,"form-actions",{canSubmit:ae.value,cancel:ye,submit:H},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:r.fields.name,"onUpdate:modelValue":f[0]||(f[0]=m=>r.fields.name=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:J.value,"error-message":j.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:r.isReadonly,type:"text",onInput:ge},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(h,{modelValue:r.fields.tags,"onUpdate:modelValue":f[1]||(f[1]=m=>r.fields.tags=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[ie.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",We,[e.createVNode(K,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",Le,[e.createVNode(B,{modelValue:x.value,"onUpdate:modelValue":f[2]||(f[2]=m=>x.value=m),"data-testid":"gateway-service-url-radio","selected-value":o.url,onChange:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),x.value==="url"?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(h,{modelValue:r.fields.url,"onUpdate:modelValue":f[3]||(f[3]=m=>r.fields.url=m),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(B,{modelValue:x.value,"onUpdate:modelValue":f[4]||(f[4]=m=>x.value=m),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":o.protocol,onChange:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),x.value==="protocol"||ie.value?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(N,{modelValue:r.fields.protocol,"onUpdate:modelValue":f[5]||(f[5]=m=>r.fields.protocol=m),"data-testid":"gateway-service-protocol-select",items:be,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:r.isReadonly,required:"",width:"100%",onSelected:f[6]||(f[6]=m=>C(r.fields.protocol,m))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(h,{modelValue:r.fields.host,"onUpdate:modelValue":f[7]||(f[7]=m=>r.fields.host=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),se.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(h,{modelValue:r.fields.path,"onUpdate:modelValue":f[8]||(f[8]=m=>r.fields.path=m),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:r.fields.port,"onUpdate:modelValue":[f[9]||(f[9]=m=>r.fields.port=m),f[10]||(f[10]=()=>{r.fields.port=X(r.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(u,{modelValue:_.value,"onUpdate:modelValue":f[24]||(f[24]=m=>_.value=m),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createElementVNode("div",ze,[e.createVNode(h,{modelValue:r.fields.retries,"onUpdate:modelValue":[f[11]||(f[11]=m=>r.fields.retries=m),f[12]||(f[12]=()=>{r.fields.retries=X(r.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",He,[e.createVNode(h,{modelValue:r.fields.connect_timeout,"onUpdate:modelValue":[f[13]||(f[13]=m=>r.fields.connect_timeout=m),f[14]||(f[14]=()=>{r.fields.connect_timeout=X(r.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(h,{modelValue:r.fields.write_timeout,"onUpdate:modelValue":[f[15]||(f[15]=m=>r.fields.write_timeout=m),f[16]||(f[16]=()=>{r.fields.write_timeout=X(r.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Je,[e.createVNode(h,{modelValue:r.fields.read_timeout,"onUpdate:modelValue":[f[17]||(f[17]=m=>r.fields.read_timeout=m),f[18]||(f[18]=()=>{r.fields.read_timeout=X(r.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),ee.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(h,{modelValue:r.fields.client_certificate,"onUpdate:modelValue":f[19]||(f[19]=m=>r.fields.client_certificate=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ce.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(h,{modelValue:r.fields.ca_certificates,"onUpdate:modelValue":f[20]||(f[20]=m=>r.fields.ca_certificates=m),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:r.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(c,{modelValue:r.fields.tls_verify_enabled,"onUpdate:modelValue":f[21]||(f[21]=m=>r.fields.tls_verify_enabled=m),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(B,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[22]||(f[22]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(B,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[23]||(f[23]=m=>r.fields.tls_verify_value=m),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-c2c5e1f0"]]),rt={class:"kong-ui-gateway-service-entity-config-card"},lt=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const P=n,{i18n:{t:g},i18nT:p}=oe.useI18n(),a=e.computed(()=>re.form[P.config.app].edit),{getPropValue:_}=b.useHelpers(),I=(i,T)=>_(i,T)===!0?g("gateway_services.form.fields.tls_verify_option.true.display"):g("gateway_services.form.fields.tls_verify_option.false.display"),D=e.ref({id:{},name:{tooltip:g("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.protocol.tooltip")},host:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.host.tooltip")},path:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.path.tooltip")},port:{section:b.ConfigurationSchemaSection.Basic,tooltip:g("gateway_services.form.fields.port.tooltip")},tags:{tooltip:g("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:g("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:g("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:g("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:g("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:g("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:b.ConfigurationSchemaType.BadgeTag,label:g("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:g("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(i,T)=>(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(e.unref(b.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":D.value,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":n.hideTitle,"onFetch:error":T[0]||(T[0]=V=>i.$emit("fetch:error",V)),"onFetch:success":T[1]||(T[1]=V=>i.$emit("fetch:success",V)),onLoading:T[2]||(T[2]=V=>i.$emit("loading",V))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(p),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(g)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(typeof e.unref(_)("rowValue",V)=="boolean"?I("rowValue",V):e.unref(g)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(V=>[e.createTextVNode(e.toDisplayString(e.unref(_)("rowValue",V)?e.unref(_)("rowValue",V).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xe=()=>{};function it(n,P){function g(...p){return new Promise((a,_)=>{Promise.resolve(n(()=>P.apply(this,p),{fn:P,thisArg:this,args:p})).then(a).catch(_)})}return g}function st(n,P={}){let g,p,a=xe;const _=i=>{clearTimeout(i),a(),a=xe};let I;return i=>{const T=e.toValue(n),V=e.toValue(P.maxWait);return g&&_(g),T<=0||V!==void 0&&V<=0?(p&&(_(p),p=null),Promise.resolve(i())):new Promise((Z,le)=>{a=P.rejectOnCancel?le:Z,I=i,V&&!p&&(p=setTimeout(()=>{g&&_(g),p=null,Z(I())},V)),g=setTimeout(()=>{p&&_(p),p=null,Z(i())},T)})}}function Ce(n,P=200,g={}){return it(st(P,g),n)}const q={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},at={class:"kong-ui-entities-gateway-service-form"},nt={key:0,class:"gateway-service-form-general-info"},ct={class:"gateway-service-form-group-selection-wrapper"},dt={key:0,class:"gateway-service-form-group-fields"},ft={key:0,class:"gateway-service-form-group-fields"},pt={key:0},mt={key:0,class:"gateway-service-form-advanced-fields"},ut={class:"gateway-service-form-margin-bottom"},gt={class:"gateway-service-form-margin-bottom"},yt={class:"gateway-service-form-margin-bottom"},_t={class:"gateway-service-form-margin-bottom"},bt={key:0,class:"gateway-service-form-margin-bottom"},wt={key:1,class:"gateway-service-form-margin-bottom"},ht={key:2,class:"gateway-service-form-margin-bottom"},vt={key:0,class:"checkbox-aligned-radio"},Vt={key:1,class:"checkbox-aligned-radio"},kt={class:"gateway-service-form-tags"},Ct={class:"form-error-list"},Nt=ke(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1},sampleApiList:{type:Array,required:!1,default:()=>[]}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(n,{expose:P,emit:g}){var fe;const p=g,a=n,_=e.ref(!0),I=Ve.useRouter(),{i18nT:D,i18n:{t:i}}=oe.useI18n(),{getErrorFieldsFromError:T}=b.useErrors(),{axiosInstance:V}=b.useAxios((fe=a.config)==null?void 0:fe.axiosRequestConfig),Z=b.useValidators(),{validateHost:le,validatePath:G,validatePort:me,validateProtocol:ie}=oe.useUrlValidators(),x=e.computed(()=>re.form[a.config.app].edit),O=e.computed(()=>a.gatewayServiceId?b.EntityBaseFormType.Edit:b.EntityBaseFormType.Create),j=e.ref(!1),J=e.computed(()=>!!a.gatewayServiceId),r=e.ref(J.value?"protocol":"url"),E=oe.usePortFromProtocol(),Q=e.ref(""),be=e.computed(()=>!!Q.value||!!te("name")),o=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),C=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:""}),X=a.config.app==="konnect"||b.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),Y=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...X?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],F={url:"url",protocol:"protocol"},se=(t,s)=>{s.value},ee=t=>t?parseFloat(t):0,ce=()=>{o.fields.host=C.host,o.fields.path=C.path,o.fields.port=C.port,o.fields.protocol=C.protocol,o.fields.url=C.url,o.fields.retries=C.retries,o.fields.connect_timeout=C.connect_timeout,o.fields.write_timeout=C.write_timeout,o.fields.read_timeout=C.read_timeout,o.fields.client_certificate=C.client_certificate,o.fields.ca_certificates=C.ca_certificates,o.fields.tls_verify_enabled=C.tls_verify_enabled,o.fields.tls_verify_value=C.tls_verify_value},ue=()=>{_.value=!0,A(),o.errorMessages=[],ce()},ge=()=>{switch(ce(),o.fields.name=`${q.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,r.value){case"url":o.fields.url=`${q.protocol}://${q.host}${q.path}`;break;case"protocol":o.fields.host=q.host,o.fields.path=q.path,o.fields.protocol=q.protocol,o.fields.port=q.port;break;default:o.fields.url=`${q.protocol}://${q.host}${q.path}`}},ae=Ce(()=>{if(A(),o.fields.url.length)try{const t=new URL(o.fields.url),s=ie(t.protocol,Y);if(s)throw new Error(s);o.fields.protocol=t.protocol.slice(0,-1);const v=le(t.hostname);if(v)throw new Error(v);o.fields.host=t.hostname;const U=G(t.pathname);if(U)throw new Error(U);o.fields.path=t.pathname;const k=me(t.port);if(k)throw new Error(k);const S=Number(t.port);j.value=!!S,o.fields.port=S||E.getPortFromProtocol(o.fields.protocol),p("url-valid:success")}catch{p("url-valid:error",i("gateway_services.form.errors.url.invalid")),o.formFieldErrors.url=i("gateway_services.form.errors.url.invalid")}},300),de=Ce(t=>{A(t)},300),ye=e.computed(()=>!!o.formFieldErrors.url||!!o.formFieldErrors.host||!!o.formFieldErrors.port),te=t=>{if(o.errorMessages.length)return"";const s=o.formFieldErrors;return s[t]?s[t]:""},z=Ce(t=>{A(t??void 0);const s=le(o.fields.host);s&&(o.formFieldErrors.host=s);const v=G(o.fields.path);v&&(o.formFieldErrors.path=v);const U=me(o.fields.port);U&&(o.formFieldErrors.port=U),W.value?p("url-valid:success"):p("url-valid:error",o.errorMessages.join(",")||i("gateway_services.form.errors.url.invalid"))},300),A=t=>{if(t)o.formFieldErrors[t]="";else for(let s in o.formFieldErrors)o.formFieldErrors[s]="";o.errorMessages=[]},W=e.computed(()=>{for(let t in o.formFieldErrors)if(o.formFieldErrors[t].length)return!1;return!0}),H=()=>{o.fields.url&&r.value==="url"?ae():z()},ne=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,l=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(o.fields.protocol)),f=e.computed(()=>{if(r.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),h=e.computed(()=>{if(r.value==="url")return!0;const t=["https","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),K=e.computed(()=>{if(r.value==="url")return!0;const t=["https","wss","tls"].includes(o.fields.protocol);return r.value==="protocol"&&t}),B=t=>{A("name"),Q.value=Z.utf8Name(t)},N=e.computed(()=>{if(J.value)return JSON.stringify(o.fields)!==JSON.stringify(C);const t=r.value==="url"&&!!o.fields.url&&W.value,s=r.value==="protocol"&&!!o.fields.host&&W.value;return t||s}),c=t=>{var s,v,U;o.fields.name=(t==null?void 0:t.name)||"",o.fields.tags=((s=t==null?void 0:t.tags)==null?void 0:s.join(", "))||"",o.fields.protocol=(t==null?void 0:t.protocol)||"http",o.fields.path=(t==null?void 0:t.path)||"",o.fields.read_timeout=t!=null&&t.read_timeout||(t==null?void 0:t.read_timeout)===0?t==null?void 0:t.read_timeout:6e4,o.fields.retries=t!=null&&t.retries||(t==null?void 0:t.retries)===0?t==null?void 0:t.retries:5,o.fields.host=(t==null?void 0:t.host)||"",o.fields.connect_timeout=t!=null&&t.connect_timeout||(t==null?void 0:t.connect_timeout)===0?t==null?void 0:t.connect_timeout:6e4,o.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,o.fields.tls_verify_value=t!=null&&t.tls_verify?t==null?void 0:t.tls_verify:!1,o.fields.ca_certificates=((v=t==null?void 0:t.ca_certificates)==null?void 0:v.join(","))||"",o.fields.client_certificate=((U=t==null?void 0:t.client_certificate)==null?void 0:U.id)||"",o.fields.write_timeout=t!=null&&t.write_timeout||(t==null?void 0:t.write_timeout)===0?t==null?void 0:t.write_timeout:6e4,o.fields.port=t!=null&&t.port||(t==null?void 0:t.port)===0?t==null?void 0:t.port:80,Object.assign(C,o.fields)},u=()=>{I.push(a.config.cancelRoute)},m=e.computed(()=>{var s,v;let t=`${a.config.apiBaseUrl}${re.form[a.config.app].validate}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),w=e.computed(()=>{var s,v;let t=`${a.config.apiBaseUrl}${re.form[a.config.app][O.value]}`;return a.config.app==="konnect"?t=t.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(t=t.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),t=t.replace(/{id}/gi,a.gatewayServiceId),t}),$=t=>{let s="";t.url&&(s=new URL(t.url).protocol),(["https","wss","tls"].includes(t.protocol)||["https","wss","tls"].includes(s))&&(t.tls_verify=t.tls_verify_enabled?t.tls_verify_value:null),delete t.tls_verify_enabled,delete t.tls_verify_value},L=e.computed(()=>{var s,v,U,k;const t={name:o.fields.name||null,tags:o.fields.tags?(U=(v=(s=o.fields.tags)==null?void 0:s.split(","))==null?void 0:v.map(S=>String(S||"").trim()))==null?void 0:U.filter(S=>S!==""):null,protocol:o.fields.protocol,path:o.fields.path||null,read_timeout:o.fields.read_timeout,retries:o.fields.retries,host:o.fields.host,connect_timeout:o.fields.connect_timeout,tls_verify_value:o.fields.tls_verify_value,tls_verify_enabled:o.fields.tls_verify_enabled,ca_certificates:o.fields.ca_certificates?(k=o.fields.ca_certificates)==null?void 0:k.split(",").filter(S=>S!==""):null,client_certificate:o.fields.client_certificate?{id:o.fields.client_certificate}:null,write_timeout:o.fields.write_timeout,port:o.fields.port,url:o.fields.url};return o.fields.client_certificate&&["https","wss","tls"].includes(o.fields.protocol)&&(t.client_certificate={id:o.fields.client_certificate}),o.fields.tls_verify_enabled&&["https","wss","tls"].includes(o.fields.protocol)&&(t.tls_verify=o.fields.tls_verify_value),l.value||(t.path=null),O.value==="create"?r.value==="url"?(delete t.protocol,delete t.host,delete t.path,a.config.app==="konnect"&&delete t.port):delete t.url:O.value==="edit"&&delete t.url,t}),R=async()=>{var t,s,v,U;try{o.isReadonly=!0,H();const k=L.value;$(k);let S;if(await V.post(m.value,k),O.value==="create"?S=await V.post(w.value,k):O.value==="edit"&&(S=((t=a.config)==null?void 0:t.app)==="konnect"?await V.put(w.value,k):await V.patch(w.value,k)),S){const{data:d}=S;o.fields.name=(d==null?void 0:d.name)||"",o.fields.port=d.port||E.getPortFromProtocol(d.protocol),o.fields.protocol=(d==null?void 0:d.protocol)||"http",o.fields.host=(d==null?void 0:d.host)||"",o.fields.path=(d==null?void 0:d.path)||"",o.fields.url=(d==null?void 0:d.url)||"",o.fields.retries=d!=null&&d.retries||(d==null?void 0:d.retries)===0?d==null?void 0:d.retries:5,o.fields.connect_timeout=d!=null&&d.connect_timeout||(d==null?void 0:d.connect_timeout)===0?d==null?void 0:d.connect_timeout:6e4,o.fields.write_timeout=d!=null&&d.write_timeout||(d==null?void 0:d.write_timeout)===0?d==null?void 0:d.write_timeout:6e4,o.fields.read_timeout=d!=null&&d.read_timeout||(d==null?void 0:d.read_timeout)===0?d==null?void 0:d.read_timeout:6e4,o.fields.client_certificate=((s=d==null?void 0:d.client_certificate)==null?void 0:s.id)||"",o.fields.ca_certificates=(v=d==null?void 0:d.ca_certificates)!=null&&v.length?d==null?void 0:d.ca_certificates.join(","):"",o.fields.tls_verify_enabled=(d==null?void 0:d.tls_verify)!==""&&(d==null?void 0:d.tls_verify)!==null&&(d==null?void 0:d.tls_verify)!==void 0,o.fields.tls_verify_value=o.fields.tls_verify_enabled&&(d==null?void 0:d.tls_verify),o.fields.tags=(U=d==null?void 0:d.tags)!=null&&U.length?d.tags.join(", "):"",Object.assign(C,o.fields),p("update",S==null?void 0:S.data)}return S}catch(k){const{fields:S,messages:d}=T(k);o.errorMessages=d,S.length&&S.forEach(pe=>{const _e=pe.field;_e==="client_certificate.id"?o.formFieldErrors.client_certificate=pe.message:_e.startsWith("ca_certificates")?o.formFieldErrors.ca_certificates=pe.message:Object.keys(o.formFieldErrors).includes(_e)&&(o.formFieldErrors={...o.formFieldErrors,[_e]:pe.message})}),p("error",k)}finally{o.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(o.fields,C)}),e.watch(o.fields,t=>{o.fields.port=E.getPortFromProtocol(t.protocol,String(t.port)),p("model-updated",L.value)}),e.onMounted(()=>{p("model-updated",L.value),J.value||(o.fields.name=ne())}),P({validateUrl:H,getPayload:L,saveFormData:R,canSubmit:N,initForm:c}),(t,s)=>{const v=e.resolveComponent("KRadio"),U=e.resolveComponent("KButton"),k=e.resolveComponent("KInput"),S=e.resolveComponent("KSelect"),d=e.resolveComponent("KCheckbox"),pe=e.resolveComponent("KCollapse"),_e=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(e.unref(b.EntityBaseForm),{"can-submit":N.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(b.SupportedEntityType).GatewayService,"fetch-url":x.value,"form-fields":L.value,"is-readonly":o.isReadonly,onCancel:u,"onFetch:error":s[30]||(s[30]=y=>t.$emit("error",y)),"onFetch:success":c,onLoading:s[31]||(s[31]=y=>t.$emit("loading",y)),onSubmit:R},{"form-actions":e.withCtx(()=>[e.renderSlot(t.$slots,"form-actions",{canSubmit:N.value,cancel:u,submit:R},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[J.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",ct,[e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=y=>r.value=y),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(i)("gateway_services.form.sections.keys.url.description"),label:e.unref(i)("gateway_services.form.sections.keys.url.label"),"selected-value":F.url,onChange:ue},null,8,["modelValue","description","label","selected-value"]),e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=y=>r.value=y),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(i)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(i)("gateway_services.form.sections.keys.protocol.label"),"selected-value":F.protocol,onChange:ue},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="url"?(e.openBlock(),e.createElementBlock("div",dt,[e.createVNode(k,{modelValue:o.fields.url,"onUpdate:modelValue":s[2]||(s[2]=y=>o.fields.url=y),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:ye.value,"error-message":te("url"),label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:e.unref(ae)},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary",size:"small",onClick:ge},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder","onInput"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="protocol"||J.value?(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(S,{modelValue:o.fields.protocol,"onUpdate:modelValue":s[3]||(s[3]=y=>o.fields.protocol=y),"data-testid":"gateway-service-protocol-select",items:Y,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:o.isReadonly,required:"",width:"100%",onSelected:s[4]||(s[4]=y=>se(o.fields.protocol,y))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(k,{modelValue:o.fields.host,"onUpdate:modelValue":s[5]||(s[5]=y=>o.fields.host=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!o.formFieldErrors.host,"error-message":te("host"),label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:"",onInput:s[6]||(s[6]=y=>e.unref(z)("host"))},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary",size:"small",onClick:ge},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),l.value?(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(k,{modelValue:o.fields.path,"onUpdate:modelValue":s[7]||(s[7]=y=>o.fields.path=y),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!o.formFieldErrors.path,"error-message":te("path"),label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder"),onInput:s[8]||(s[8]=y=>e.unref(z)("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(k,{modelValue:o.fields.port,"onUpdate:modelValue":[s[9]||(s[9]=y=>o.fields.port=y),s[11]||(s[11]=()=>{o.fields.port=ee(o.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!o.formFieldErrors.port,"error-message":te("port"),label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:s[10]||(s[10]=y=>e.unref(z)("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(pe,{modelValue:_.value,"onUpdate:modelValue":s[27]||(s[27]=y=>_.value=y),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",ut,[e.createVNode(k,{modelValue:o.fields.retries,"onUpdate:modelValue":[s[12]||(s[12]=y=>o.fields.retries=y),s[13]||(s[13]=()=>{o.fields.retries=ee(o.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",gt,[e.createVNode(k,{modelValue:o.fields.connect_timeout,"onUpdate:modelValue":[s[14]||(s[14]=y=>o.fields.connect_timeout=y),s[15]||(s[15]=()=>{o.fields.connect_timeout=ee(o.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",yt,[e.createVNode(k,{modelValue:o.fields.write_timeout,"onUpdate:modelValue":[s[16]||(s[16]=y=>o.fields.write_timeout=y),s[17]||(s[17]=()=>{o.fields.write_timeout=ee(o.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",_t,[e.createVNode(k,{modelValue:o.fields.read_timeout,"onUpdate:modelValue":[s[18]||(s[18]=y=>o.fields.read_timeout=y),s[19]||(s[19]=()=>{o.fields.read_timeout=ee(o.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:o.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),f.value?(e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(k,{modelValue:o.fields.client_certificate,"onUpdate:modelValue":s[20]||(s[20]=y=>o.fields.client_certificate=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!o.formFieldErrors.client_certificate,label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:o.isReadonly,type:"text",onInput:s[21]||(s[21]=y=>e.unref(de)("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(k,{modelValue:o.fields.ca_certificates,"onUpdate:modelValue":s[22]||(s[22]=y=>o.fields.ca_certificates=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!o.formFieldErrors.ca_certificates,label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:o.isReadonly,type:"text",onInput:s[23]||(s[23]=y=>e.unref(de)("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(d,{modelValue:o.fields.tls_verify_enabled,"onUpdate:modelValue":s[24]||(s[24]=y=>o.fields.tls_verify_enabled=y),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(D),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",vt,[e.createVNode(v,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":s[25]||(s[25]=y=>o.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),o.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(v,{modelValue:o.fields.tls_verify_value,"onUpdate:modelValue":s[26]||(s[26]=y=>o.fields.tls_verify_value=y),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(b.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:o.fields.name,"onUpdate:modelValue":s[28]||(s[28]=y=>o.fields.name=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:be.value,"error-message":Q.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:o.isReadonly,type:"text",onInput:B},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(pe,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",kt,[e.createVNode(k,{modelValue:o.fields.tags,"onUpdate:modelValue":s[29]||(s[29]=y=>o.fields.tags=y),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:o.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),o.errorMessages.length?(e.openBlock(),e.createBlock(_e,{key:0,appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("ul",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.errorMessages,y=>(e.openBlock(),e.createElementBlock("li",{key:y},e.toDisplayString(y),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-c0b2a473"]]);M.GatewayServiceConfigCard=lt,M.GatewayServiceForm=Nt,M.GatewayServiceList=Me,M.LegacyGatewayServiceForm=ot,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-48ae9c8c]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{width:640px}}.button-row[data-v-ee4f8a6d]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-ee4f8a6d]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-ee4f8a6d]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-c2c5e1f0]{width:100%}.kong-ui-entities-gateway-service-form[data-v-c2c5e1f0] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-c2c5e1f0]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-c2c5e1f0]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c2c5e1f0],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c2c5e1f0] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-c2c5e1f0]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-c2c5e1f0]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-c2c5e1f0]{margin:4px;padding-left:24px}.kong-ui-entities-gateway-service-form[data-v-9e0af6be]{width:100%}.kong-ui-entities-gateway-service-form[data-v-9e0af6be] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-9e0af6be] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-9e0af6be] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-9e0af6be]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-9e0af6be]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-9e0af6be]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-9e0af6be]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-9e0af6be]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-9e0af6be],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-9e0af6be] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-9e0af6be]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-9e0af6be]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-9e0af6be] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-9e0af6be]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-9e0af6be]{transition:all .5s ease}.slide-fade-enter-from[data-v-9e0af6be]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-9e0af6be]{opacity:0;transform:translateY(5px)}
|
|
1
|
+
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--54aebfa2);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-be491a0e]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-be491a0e]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-be491a0e]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-be491a0e] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-be491a0e]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-18af080f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-18af080f] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-18af080f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-18af080f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-18af080f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-18af080f] .k-button:last-of-type,.form-actions[data-v-18af080f] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d58db70c]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d58db70c]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d58db70c]{display:none}.kong-ui-entity-base-table[data-v-d58db70c] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-6f25ab21]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-6f25ab21]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-6f25ab21] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-6f25ab21]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-6f25ab21]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-6f25ab21]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-48ae9c8c]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-48ae9c8c]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-48ae9c8c]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-48ae9c8c]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-48ae9c8c]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-48ae9c8c],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-48ae9c8c]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-48ae9c8c]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-48ae9c8c]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-48ae9c8c]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-48ae9c8c]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-48ae9c8c] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-48ae9c8c] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-48ae9c8c]{width:640px}}.button-row[data-v-ee4f8a6d]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-ee4f8a6d]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-ee4f8a6d]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-c2c5e1f0]{width:100%}.kong-ui-entities-gateway-service-form[data-v-c2c5e1f0] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-c2c5e1f0]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-c2c5e1f0]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c2c5e1f0],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c2c5e1f0] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-c2c5e1f0]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-c2c5e1f0]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-c2c5e1f0]{margin:4px;padding-left:24px}.kong-ui-entities-gateway-service-form[data-v-c0b2a473]{width:100%}.kong-ui-entities-gateway-service-form[data-v-c0b2a473] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-c0b2a473] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-c0b2a473] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-c0b2a473]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-c0b2a473]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-c0b2a473]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-c0b2a473]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-c0b2a473]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c0b2a473],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-c0b2a473] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-c0b2a473]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-c0b2a473]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-c0b2a473] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-c0b2a473]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-c0b2a473]{transition:all .5s ease}.slide-fade-enter-from[data-v-c0b2a473]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-c0b2a473]{opacity:0;transform:translateY(5px)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-gateway-services",
|
|
3
|
-
"version": "3.10.6-pr.2001.
|
|
3
|
+
"version": "3.10.6-pr.2001.c2e28f3c9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-gateway-services.umd.js",
|
|
6
6
|
"module": "./dist/entities-gateway-services.es.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.19.3-pr.2001.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.19.3-pr.2001.c2e28f3c9.0",
|
|
30
30
|
"@kong-ui-public/i18n": "^2.2.10"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.19.3-pr.2001.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.19.3-pr.2001.c2e28f3c9.0",
|
|
40
40
|
"@kong-ui-public/i18n": "^2.2.10"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|