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