@kong-ui-public/entities-gateway-services 3.11.34-pr.2226.ebb850a4d.0 → 3.11.34-pr.2233.a1402c580.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/entities-gateway-services.es.js +690 -1326
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceConfigCard.vue.d.ts +2 -2
- package/dist/types/components/GatewayServiceForm.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/gateway-service-form.d.ts +0 -8
- package/dist/types/types/gateway-service-form.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/types/components/LegacyGatewayServiceForm.vue.d.ts +0 -86
- package/dist/types/components/LegacyGatewayServiceForm.vue.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
1
|
+
import { defineComponent as De, computed as b, ref as R, watch as Be, onBeforeMount as Ze, resolveComponent as L, openBlock as V, createElementBlock as T, createVNode as c, unref as o, createSlots as Ce, withCtx as d, createBlock as de, Teleport as Ke, createElementVNode as I, createCommentVNode as D, createTextVNode as K, toDisplayString as k, withModifiers as xe, reactive as Le, onMounted as Je, renderSlot as Qe, Transition as Me, Fragment as Xe, renderList as Ye } from "vue";
|
|
2
|
+
import { useRouter as Oe } from "vue-router";
|
|
3
|
+
import { BookIcon as qe, AddIcon as et, ServicesIcon as tt } from "@kong/icons";
|
|
4
|
+
import { createI18n as ot, i18nTComponent as rt } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as We, useTableState as it, useFetcher as lt, useDeleteUrlBuilder as st, FetcherStatus as at, EntityBaseTable as nt, EntityFilter as ct, PermissionsWrapper as ce, TableTags as dt, EntityEmptyState as ut, EntityToggleModal as ft, EntityDeleteModal as pt, EntityTypes as mt, useHelpers as je, ConfigurationSchemaSection as we, ConfigurationSchemaType as vt, EntityBaseConfigCard as gt, SupportedEntityType as ze, useErrors as yt, useValidators as _t, EntityBaseFormType as Ge, useGatewayFeatureSupported as ht, EntityBaseForm as bt, EntityFormSection as Ne } from "@kong-ui-public/entities-shared";
|
|
6
6
|
const wt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
@@ -208,34 +208,34 @@ const wt = {
|
|
|
208
208
|
delete: "The gateway service could not be deleted at this time.",
|
|
209
209
|
copy: "Failed to copy to clipboard",
|
|
210
210
|
urlErrorMessage: "Error: invalid URL"
|
|
211
|
-
},
|
|
211
|
+
}, Et = {
|
|
212
212
|
success: "Copied {val} to clipboard",
|
|
213
213
|
success_brief: "Successfully copied to clipboard"
|
|
214
|
-
},
|
|
214
|
+
}, St = {
|
|
215
215
|
gateway_services: "gateway services"
|
|
216
|
-
},
|
|
216
|
+
}, It = {
|
|
217
217
|
actions: wt,
|
|
218
218
|
search: kt,
|
|
219
219
|
gateway_services: Vt,
|
|
220
220
|
errors: Ct,
|
|
221
|
-
copy:
|
|
222
|
-
glossary:
|
|
221
|
+
copy: Et,
|
|
222
|
+
glossary: St
|
|
223
223
|
};
|
|
224
|
-
function
|
|
225
|
-
const
|
|
224
|
+
function Pt() {
|
|
225
|
+
const s = ot("en-us", It);
|
|
226
226
|
return {
|
|
227
|
-
i18n:
|
|
228
|
-
i18nT:
|
|
227
|
+
i18n: s,
|
|
228
|
+
i18nT: rt(s)
|
|
229
229
|
// Translation component <i18n-t>
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Ft() {
|
|
233
233
|
return {
|
|
234
|
-
getPortFromProtocol: (
|
|
235
|
-
const
|
|
236
|
-
if ((a || a === 0) && !
|
|
234
|
+
getPortFromProtocol: (G, m) => {
|
|
235
|
+
const n = [80, 443], a = Number(m);
|
|
236
|
+
if ((a || a === 0) && !n.includes(a))
|
|
237
237
|
return a;
|
|
238
|
-
switch (
|
|
238
|
+
switch (G) {
|
|
239
239
|
case "grpcs":
|
|
240
240
|
case "tls":
|
|
241
241
|
case "https":
|
|
@@ -251,59 +251,59 @@ function Ut() {
|
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const { i18n: { t:
|
|
254
|
+
function At() {
|
|
255
|
+
const { i18n: { t: s } } = Y.useI18n();
|
|
256
256
|
return {
|
|
257
|
-
validateHost: (
|
|
258
|
-
if (!
|
|
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(
|
|
257
|
+
validateHost: (g) => {
|
|
258
|
+
if (!g || g.trim() === "") return s("gateway_services.form.errors.host.empty");
|
|
259
|
+
const $ = /^(?!:\/\/)([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(g) || $.test(g) ? "" : s("gateway_services.form.errors.host.invalid");
|
|
261
261
|
},
|
|
262
|
-
validateProtocol: (
|
|
263
|
-
if (
|
|
264
|
-
}) === void 0 ?
|
|
265
|
-
validatePath: (
|
|
266
|
-
validatePort: (
|
|
267
|
-
if (
|
|
262
|
+
validateProtocol: (g, $) => !g || g.trim() === "" ? s("gateway_services.form.errors.protocol.empty") : (g = g.slice(0, -1), $.find((l) => {
|
|
263
|
+
if (l.value === g) return l;
|
|
264
|
+
}) === void 0 ? s("gateway_services.form.errors.protocol.invalid") : ""),
|
|
265
|
+
validatePath: (g) => !g || g === "" ? "" : g.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(g) ? s("gateway_services.form.errors.path.invalid") : "" : s("gateway_services.form.errors.path.prefix"),
|
|
266
|
+
validatePort: (g) => {
|
|
267
|
+
if (g == null || g === "")
|
|
268
268
|
return "";
|
|
269
|
-
const
|
|
270
|
-
return isNaN(
|
|
269
|
+
const $ = typeof g == "string" ? parseInt(g, 10) : g;
|
|
270
|
+
return isNaN($) ? s("gateway_services.form.errors.port.type") : $ < 0 || $ > 65535 ? s("gateway_services.form.errors.port.invalid") : "";
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
const
|
|
275
|
-
useI18n:
|
|
276
|
-
usePortFromProtocol:
|
|
277
|
-
useUrlValidators:
|
|
278
|
-
},
|
|
274
|
+
const Y = {
|
|
275
|
+
useI18n: Pt,
|
|
276
|
+
usePortFromProtocol: Ft,
|
|
277
|
+
useUrlValidators: At
|
|
278
|
+
}, ke = "/v2/control-planes/{controlPlaneId}/core-entities", Ve = "/{workspace}", ue = {
|
|
279
279
|
list: {
|
|
280
280
|
konnect: {
|
|
281
|
-
all: `${
|
|
281
|
+
all: `${ke}/services`
|
|
282
282
|
},
|
|
283
283
|
kongManager: {
|
|
284
|
-
all: `${
|
|
284
|
+
all: `${Ve}/services`
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
form: {
|
|
288
288
|
konnect: {
|
|
289
|
-
create: `${
|
|
290
|
-
validate: `${
|
|
291
|
-
edit: `${
|
|
289
|
+
create: `${ke}/services`,
|
|
290
|
+
validate: `${ke}/v1/schemas/json/service/validate`,
|
|
291
|
+
edit: `${ke}/services/{id}`
|
|
292
292
|
},
|
|
293
293
|
kongManager: {
|
|
294
|
-
create: `${
|
|
295
|
-
validate: `${
|
|
296
|
-
edit: `${
|
|
294
|
+
create: `${Ve}/services`,
|
|
295
|
+
validate: `${Ve}/schemas/services/validate`,
|
|
296
|
+
edit: `${Ve}/services/{id}`
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, $t = "#00abd2", Tt = "24px", Ut = { class: "kong-ui-entities-gateway-services-list" }, Rt = { class: "button-row" }, xt = { class: "empty-state-icon-gateway" }, Mt = { key: 1 }, Bt = /* @__PURE__ */ De({
|
|
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. */
|
|
303
303
|
config: {
|
|
304
304
|
type: Object,
|
|
305
305
|
required: !0,
|
|
306
|
-
validator: (
|
|
306
|
+
validator: (s) => !(!s || !["konnect", "kongManager"].includes(s == null ? void 0 : s.app) || !s.createRoute || !s.getViewRoute || !s.getEditRoute || s.app === "kongManager" && !s.isExactMatch && !s.filterSchema)
|
|
307
307
|
},
|
|
308
308
|
// used to override the default identifier for the cache entry
|
|
309
309
|
cacheIdentifier: {
|
|
@@ -354,12 +354,12 @@ const se = {
|
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
356
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
357
|
-
setup(
|
|
358
|
-
var
|
|
359
|
-
const
|
|
357
|
+
setup(s, { emit: G }) {
|
|
358
|
+
var oe;
|
|
359
|
+
const m = G, n = s, { i18n: { t: a, formatUnixTimeStamp: g } } = Y.useI18n(), $ = Oe(), { axiosInstance: N } = We((oe = n.config) == null ? void 0 : oe.axiosRequestConfig), { hasRecords: l, handleStateChange: M } = it(() => B.value), P = b(() => l.value && n.config.app === "konnect"), Ee = b(() => !n.enableV2EmptyStates && n.config.app === "konnect"), fe = b(() => n.config.app !== "kongManager" || !!n.config.disableSorting), ie = {
|
|
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
|
+
...n.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
363
363
|
protocol: { label: a("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
364
364
|
host: { label: a("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
365
365
|
port: { label: a("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
@@ -368,197 +368,197 @@ const se = {
|
|
|
368
368
|
tags: { label: a("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
369
369
|
updated_at: { label: a("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
370
370
|
created_at: { label: a("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
371
|
-
},
|
|
371
|
+
}, pe = {
|
|
372
372
|
columnVisibility: {
|
|
373
373
|
created_at: !1
|
|
374
374
|
}
|
|
375
|
-
},
|
|
376
|
-
var
|
|
377
|
-
let
|
|
378
|
-
return
|
|
379
|
-
}),
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
375
|
+
}, Se = ie, ee = b(() => {
|
|
376
|
+
var v, y;
|
|
377
|
+
let u = `${n.config.apiBaseUrl}${ue.list[n.config.app].all}`;
|
|
378
|
+
return n.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((v = n.config) == null ? void 0 : v.controlPlaneId) || "") : n.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (y = n.config) != null && y.workspace ? `/${n.config.workspace}` : "")), u;
|
|
379
|
+
}), Ie = b(() => n.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${ee.value}`) : new URL(ee.value)), B = R(""), Pe = b(() => {
|
|
380
|
+
const u = n.config.app === "konnect" || n.config.isExactMatch;
|
|
381
|
+
if (u)
|
|
382
382
|
return {
|
|
383
|
-
isExactMatch:
|
|
384
|
-
placeholder: a(`search.placeholder.${
|
|
383
|
+
isExactMatch: u,
|
|
384
|
+
placeholder: a(`search.placeholder.${n.config.app}`)
|
|
385
385
|
};
|
|
386
|
-
const { name:
|
|
386
|
+
const { name: v, enabled: y, protocol: S, host: j, port: F, path: z } = ie;
|
|
387
387
|
return {
|
|
388
|
-
isExactMatch:
|
|
389
|
-
fields: { name:
|
|
390
|
-
schema:
|
|
388
|
+
isExactMatch: u,
|
|
389
|
+
fields: { name: v, enabled: y, protocol: S, host: j, port: F, path: z },
|
|
390
|
+
schema: n.config.filterSchema
|
|
391
391
|
};
|
|
392
392
|
}), {
|
|
393
|
-
fetcher:
|
|
394
|
-
fetcherState:
|
|
395
|
-
fetcherCacheKey:
|
|
396
|
-
} =
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
}, e =
|
|
401
|
-
ctaPath:
|
|
402
|
-
ctaText:
|
|
403
|
-
message: `${a("gateway_services.list.empty_state.description")}${
|
|
404
|
-
title:
|
|
405
|
-
})),
|
|
406
|
-
const
|
|
393
|
+
fetcher: H,
|
|
394
|
+
fetcherState: E,
|
|
395
|
+
fetcherCacheKey: Z
|
|
396
|
+
} = lt(b(() => ({ ...n.config, cacheIdentifier: n.cacheIdentifier })), ee), le = () => {
|
|
397
|
+
B.value = "";
|
|
398
|
+
}, Fe = () => {
|
|
399
|
+
Z.value++;
|
|
400
|
+
}, e = R(null), C = b(() => ({
|
|
401
|
+
ctaPath: n.config.createRoute,
|
|
402
|
+
ctaText: ne.value ? n.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
|
|
403
|
+
message: `${a("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState ? ` ${n.config.additionMessageForEmptyState}` : ""}`,
|
|
404
|
+
title: ne.value ? n.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
|
|
405
|
+
})), se = R(!1), U = R(null), te = b(() => {
|
|
406
|
+
const u = {
|
|
407
407
|
action: "disable",
|
|
408
408
|
id: "",
|
|
409
409
|
name: ""
|
|
410
410
|
};
|
|
411
|
-
if (
|
|
412
|
-
const { enabled:
|
|
413
|
-
|
|
411
|
+
if (U.value) {
|
|
412
|
+
const { enabled: v, id: y, name: S } = U.value;
|
|
413
|
+
u.action = v ? "disable" : "enable", u.id = y, u.name = S || y;
|
|
414
414
|
}
|
|
415
|
-
return
|
|
416
|
-
}),
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
},
|
|
421
|
-
var
|
|
422
|
-
if (!await ((
|
|
415
|
+
return u;
|
|
416
|
+
}), Ae = (u) => {
|
|
417
|
+
se.value = !0, U.value = u;
|
|
418
|
+
}, W = () => {
|
|
419
|
+
se.value = !1, U.value = null;
|
|
420
|
+
}, me = async () => {
|
|
421
|
+
var S, j;
|
|
422
|
+
if (!await ((S = n.canEdit) == null ? void 0 : S.call(n, U.value)) || !U.value)
|
|
423
423
|
return;
|
|
424
|
-
const
|
|
424
|
+
const v = `${Ie.value.href}/${U.value.id}`, y = !U.value.enabled;
|
|
425
425
|
try {
|
|
426
|
-
const { data:
|
|
427
|
-
|
|
428
|
-
} catch (
|
|
429
|
-
|
|
426
|
+
const { data: F } = ((j = n.config) == null ? void 0 : j.app) === "konnect" ? await N.put(v, { ...U.value, enabled: y }) : await N.patch(v, { ...U.value, enabled: y });
|
|
427
|
+
m("toggle:success", F), U.value.enabled = y;
|
|
428
|
+
} catch (F) {
|
|
429
|
+
m("error", F);
|
|
430
430
|
}
|
|
431
|
-
},
|
|
432
|
-
|
|
433
|
-
},
|
|
434
|
-
const
|
|
435
|
-
if (!await
|
|
436
|
-
|
|
437
|
-
entity:
|
|
431
|
+
}, ve = (u) => {
|
|
432
|
+
n.config.getControlPlaneRoute && $.push(n.config.getControlPlaneRoute(u));
|
|
433
|
+
}, ge = async (u, v) => {
|
|
434
|
+
const y = u.id;
|
|
435
|
+
if (!await v(y)) {
|
|
436
|
+
m("copy:error", {
|
|
437
|
+
entity: u,
|
|
438
438
|
field: "id",
|
|
439
439
|
message: a("errors.copy")
|
|
440
440
|
});
|
|
441
441
|
return;
|
|
442
442
|
}
|
|
443
|
-
|
|
444
|
-
entity:
|
|
443
|
+
m("copy:success", {
|
|
444
|
+
entity: u,
|
|
445
445
|
field: "id",
|
|
446
|
-
message: a("copy.success", { val:
|
|
446
|
+
message: a("copy.success", { val: y })
|
|
447
447
|
});
|
|
448
|
-
},
|
|
449
|
-
const
|
|
450
|
-
if (!await
|
|
451
|
-
|
|
452
|
-
entity:
|
|
448
|
+
}, ye = async (u, v) => {
|
|
449
|
+
const y = JSON.stringify(u);
|
|
450
|
+
if (!await v(y)) {
|
|
451
|
+
m("copy:error", {
|
|
452
|
+
entity: u,
|
|
453
453
|
message: a("errors.copy")
|
|
454
454
|
});
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
|
|
458
|
-
entity:
|
|
457
|
+
m("copy:success", {
|
|
458
|
+
entity: u,
|
|
459
459
|
message: a("copy.success_brief")
|
|
460
460
|
});
|
|
461
|
-
},
|
|
462
|
-
var
|
|
463
|
-
await ((
|
|
464
|
-
},
|
|
461
|
+
}, _e = async (u) => {
|
|
462
|
+
var y;
|
|
463
|
+
await ((y = n.canRetrieve) == null ? void 0 : y.call(n, u)) && $.push(n.config.getViewRoute(u.id));
|
|
464
|
+
}, $e = (u) => ({
|
|
465
465
|
label: a("actions.view"),
|
|
466
|
-
to:
|
|
467
|
-
}),
|
|
466
|
+
to: n.config.getViewRoute(u)
|
|
467
|
+
}), J = (u) => ({
|
|
468
468
|
label: a("actions.edit"),
|
|
469
|
-
to:
|
|
470
|
-
}),
|
|
471
|
-
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
},
|
|
475
|
-
var
|
|
476
|
-
if ((
|
|
477
|
-
|
|
469
|
+
to: n.config.getEditRoute(u)
|
|
470
|
+
}), x = R(void 0), O = R(!1), Q = R(!1), ae = R(""), Te = st(n.config, ee.value), he = (u) => {
|
|
471
|
+
x.value = u, O.value = !0, ae.value = "";
|
|
472
|
+
}, be = () => {
|
|
473
|
+
O.value = !1, x.value = void 0;
|
|
474
|
+
}, Ue = async () => {
|
|
475
|
+
var u, v, y;
|
|
476
|
+
if ((u = x.value) != null && u.id) {
|
|
477
|
+
Q.value = !0;
|
|
478
478
|
try {
|
|
479
|
-
await
|
|
480
|
-
} catch (
|
|
481
|
-
|
|
479
|
+
await N.delete(Te(x.value.id)), m("delete:success", x.value), be(), Z.value++;
|
|
480
|
+
} catch (S) {
|
|
481
|
+
ae.value = ((y = (v = S.response) == null ? void 0 : v.data) == null ? void 0 : y.message) || S.message || a("errors.delete"), m("error", S);
|
|
482
482
|
} finally {
|
|
483
|
-
|
|
483
|
+
Q.value = !1;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
},
|
|
487
|
-
|
|
486
|
+
}, Re = () => {
|
|
487
|
+
$.push(n.config.createRoute);
|
|
488
488
|
};
|
|
489
|
-
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
489
|
+
Be(E, (u) => {
|
|
490
|
+
var v, y, S;
|
|
491
|
+
if (u.status === at.Error) {
|
|
492
492
|
e.value = {
|
|
493
493
|
title: a("errors.general")
|
|
494
|
-
}, (
|
|
494
|
+
}, (S = (y = (v = u.error) == null ? void 0 : v.response) == null ? void 0 : y.data) != null && S.message && (e.value.message = u.error.response.data.message), m("error", u.error);
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
e.value = null;
|
|
498
498
|
});
|
|
499
|
-
const
|
|
500
|
-
return
|
|
501
|
-
|
|
502
|
-
}), (
|
|
503
|
-
const
|
|
504
|
-
return
|
|
505
|
-
|
|
506
|
-
"cache-identifier":
|
|
507
|
-
"default-table-preferences":
|
|
508
|
-
"disable-sorting":
|
|
509
|
-
"empty-state-options":
|
|
499
|
+
const ne = R(!1);
|
|
500
|
+
return Ze(async () => {
|
|
501
|
+
ne.value = await n.canCreate();
|
|
502
|
+
}), (u, v) => {
|
|
503
|
+
const y = L("KButton"), S = L("KBadge"), j = L("KInputSwitch"), F = L("KDropdownItem"), z = L("KClipboardProvider");
|
|
504
|
+
return V(), T("div", Ut, [
|
|
505
|
+
c(o(nt), {
|
|
506
|
+
"cache-identifier": s.cacheIdentifier,
|
|
507
|
+
"default-table-preferences": pe,
|
|
508
|
+
"disable-sorting": fe.value,
|
|
509
|
+
"empty-state-options": C.value,
|
|
510
510
|
"enable-entity-actions": "",
|
|
511
511
|
"error-message": e.value,
|
|
512
|
-
fetcher:
|
|
513
|
-
"fetcher-cache-key":
|
|
512
|
+
fetcher: o(H),
|
|
513
|
+
"fetcher-cache-key": o(Z),
|
|
514
514
|
"pagination-type": "offset",
|
|
515
515
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
516
|
-
query:
|
|
517
|
-
"table-headers":
|
|
518
|
-
onClearSearchInput:
|
|
519
|
-
"onClick:row":
|
|
520
|
-
onSort:
|
|
521
|
-
onState:
|
|
522
|
-
},
|
|
523
|
-
"toolbar-filter":
|
|
524
|
-
|
|
525
|
-
modelValue:
|
|
526
|
-
"onUpdate:modelValue":
|
|
527
|
-
config:
|
|
516
|
+
query: B.value,
|
|
517
|
+
"table-headers": o(Se),
|
|
518
|
+
onClearSearchInput: le,
|
|
519
|
+
"onClick:row": v[5] || (v[5] = (p) => _e(p)),
|
|
520
|
+
onSort: Fe,
|
|
521
|
+
onState: o(M)
|
|
522
|
+
}, Ce({
|
|
523
|
+
"toolbar-filter": d(() => [
|
|
524
|
+
c(o(ct), {
|
|
525
|
+
modelValue: B.value,
|
|
526
|
+
"onUpdate:modelValue": v[0] || (v[0] = (p) => B.value = p),
|
|
527
|
+
config: Pe.value
|
|
528
528
|
}, null, 8, ["modelValue", "config"])
|
|
529
529
|
]),
|
|
530
|
-
"toolbar-button":
|
|
531
|
-
(
|
|
532
|
-
disabled: !
|
|
530
|
+
"toolbar-button": d(() => [
|
|
531
|
+
(V(), de(Ke, {
|
|
532
|
+
disabled: !s.useActionOutside,
|
|
533
533
|
to: "#kong-ui-app-page-header-action-button"
|
|
534
534
|
}, [
|
|
535
535
|
I("div", Rt, [
|
|
536
|
-
|
|
536
|
+
P.value ? (V(), de(y, {
|
|
537
537
|
key: 0,
|
|
538
538
|
appearance: "secondary",
|
|
539
539
|
class: "open-learning-hub",
|
|
540
540
|
"data-testid": "gateway-services-learn-more-button",
|
|
541
541
|
icon: "",
|
|
542
|
-
onClick:
|
|
542
|
+
onClick: v[1] || (v[1] = (p) => u.$emit("click:learn-more"))
|
|
543
543
|
}, {
|
|
544
|
-
default:
|
|
545
|
-
|
|
544
|
+
default: d(() => [
|
|
545
|
+
c(o(qe), { decorative: "" })
|
|
546
546
|
]),
|
|
547
547
|
_: 1
|
|
548
|
-
})) :
|
|
549
|
-
|
|
550
|
-
"auth-function": () =>
|
|
548
|
+
})) : D("", !0),
|
|
549
|
+
c(o(ce), {
|
|
550
|
+
"auth-function": () => s.canCreate()
|
|
551
551
|
}, {
|
|
552
|
-
default:
|
|
553
|
-
|
|
552
|
+
default: d(() => [
|
|
553
|
+
c(y, {
|
|
554
554
|
appearance: "primary",
|
|
555
555
|
"data-testid": "toolbar-add-gateway-service",
|
|
556
|
-
size:
|
|
557
|
-
to:
|
|
556
|
+
size: s.useActionOutside ? "medium" : "large",
|
|
557
|
+
to: s.config.createRoute
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
560
|
-
|
|
561
|
-
|
|
559
|
+
default: d(() => [
|
|
560
|
+
c(o(et)),
|
|
561
|
+
K(" " + k(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
562
562
|
]),
|
|
563
563
|
_: 1
|
|
564
564
|
}, 8, ["size", "to"])
|
|
@@ -568,120 +568,120 @@ const se = {
|
|
|
568
568
|
])
|
|
569
569
|
], 8, ["disabled"]))
|
|
570
570
|
]),
|
|
571
|
-
name:
|
|
572
|
-
I("b", null,
|
|
571
|
+
name: d(({ rowValue: p }) => [
|
|
572
|
+
I("b", null, k(p ?? "-"), 1)
|
|
573
573
|
]),
|
|
574
|
-
control_plane:
|
|
574
|
+
control_plane: d(({ row: p }) => {
|
|
575
575
|
var t;
|
|
576
576
|
return [
|
|
577
|
-
(t =
|
|
577
|
+
(t = p.x_meta) != null && t.cluster_id ? (V(), de(S, {
|
|
578
578
|
key: 0,
|
|
579
|
-
tooltip:
|
|
579
|
+
tooltip: p.x_meta.cluster_id,
|
|
580
580
|
"truncation-tooltip": "",
|
|
581
|
-
onClick:
|
|
581
|
+
onClick: xe((r) => ve(p.x_meta.cluster_id), ["stop"])
|
|
582
582
|
}, {
|
|
583
|
-
default:
|
|
584
|
-
|
|
583
|
+
default: d(() => [
|
|
584
|
+
K(k(p.x_meta.cluster_id), 1)
|
|
585
585
|
]),
|
|
586
586
|
_: 2
|
|
587
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
587
|
+
}, 1032, ["tooltip", "onClick"])) : (V(), T("b", Mt, "-"))
|
|
588
588
|
];
|
|
589
589
|
}),
|
|
590
|
-
enabled:
|
|
591
|
-
|
|
592
|
-
"auth-function": () =>
|
|
590
|
+
enabled: d(({ row: p }) => [
|
|
591
|
+
c(o(ce), {
|
|
592
|
+
"auth-function": () => s.canEdit(p),
|
|
593
593
|
"force-show": ""
|
|
594
594
|
}, {
|
|
595
|
-
default:
|
|
595
|
+
default: d(({ isAllowed: t }) => [
|
|
596
596
|
I("div", {
|
|
597
|
-
onClick:
|
|
597
|
+
onClick: v[4] || (v[4] = xe(() => {
|
|
598
598
|
}, ["stop"]))
|
|
599
599
|
}, [
|
|
600
|
-
|
|
601
|
-
modelValue:
|
|
602
|
-
"onUpdate:modelValue": (
|
|
603
|
-
"data-testid": `row-${
|
|
600
|
+
c(j, {
|
|
601
|
+
modelValue: p.enabled,
|
|
602
|
+
"onUpdate:modelValue": (r) => p.enabled = r,
|
|
603
|
+
"data-testid": `row-${p.id}-toggle-input`,
|
|
604
604
|
disabled: !t,
|
|
605
|
-
onClick:
|
|
605
|
+
onClick: xe((r) => Ae(p), ["prevent"])
|
|
606
606
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
607
607
|
])
|
|
608
608
|
]),
|
|
609
609
|
_: 2
|
|
610
610
|
}, 1032, ["auth-function"])
|
|
611
611
|
]),
|
|
612
|
-
tags:
|
|
613
|
-
|
|
612
|
+
tags: d(({ rowValue: p }) => [
|
|
613
|
+
c(o(dt), { tags: p }, null, 8, ["tags"])
|
|
614
614
|
]),
|
|
615
|
-
created_at:
|
|
616
|
-
|
|
615
|
+
created_at: d(({ rowValue: p }) => [
|
|
616
|
+
K(k(o(g)(p)), 1)
|
|
617
617
|
]),
|
|
618
|
-
updated_at:
|
|
619
|
-
|
|
618
|
+
updated_at: d(({ row: p, rowValue: t }) => [
|
|
619
|
+
K(k(o(g)(t ?? p.created_at)), 1)
|
|
620
620
|
]),
|
|
621
|
-
actions:
|
|
622
|
-
|
|
623
|
-
default:
|
|
624
|
-
|
|
621
|
+
actions: d(({ row: p }) => [
|
|
622
|
+
c(z, null, {
|
|
623
|
+
default: d(({ copyToClipboard: t }) => [
|
|
624
|
+
c(F, {
|
|
625
625
|
"data-testid": "action-entity-copy-id",
|
|
626
|
-
onClick: (
|
|
626
|
+
onClick: (r) => ge(p, t)
|
|
627
627
|
}, {
|
|
628
|
-
default:
|
|
629
|
-
|
|
628
|
+
default: d(() => [
|
|
629
|
+
K(k(o(a)("actions.copy_id")), 1)
|
|
630
630
|
]),
|
|
631
631
|
_: 2
|
|
632
632
|
}, 1032, ["onClick"])
|
|
633
633
|
]),
|
|
634
634
|
_: 2
|
|
635
635
|
}, 1024),
|
|
636
|
-
|
|
637
|
-
default:
|
|
638
|
-
|
|
636
|
+
c(z, null, {
|
|
637
|
+
default: d(({ copyToClipboard: t }) => [
|
|
638
|
+
c(F, {
|
|
639
639
|
"data-testid": "action-entity-copy-json",
|
|
640
|
-
onClick: (
|
|
640
|
+
onClick: (r) => ye(p, t)
|
|
641
641
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
|
|
642
|
+
default: d(() => [
|
|
643
|
+
K(k(o(a)("actions.copy_json")), 1)
|
|
644
644
|
]),
|
|
645
645
|
_: 2
|
|
646
646
|
}, 1032, ["onClick"])
|
|
647
647
|
]),
|
|
648
648
|
_: 2
|
|
649
649
|
}, 1024),
|
|
650
|
-
|
|
651
|
-
"auth-function": () =>
|
|
650
|
+
c(o(ce), {
|
|
651
|
+
"auth-function": () => s.canRetrieve(p)
|
|
652
652
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
|
|
653
|
+
default: d(() => [
|
|
654
|
+
c(F, {
|
|
655
655
|
"data-testid": "action-entity-view",
|
|
656
656
|
"has-divider": "",
|
|
657
|
-
item:
|
|
657
|
+
item: $e(p.id)
|
|
658
658
|
}, null, 8, ["item"])
|
|
659
659
|
]),
|
|
660
660
|
_: 2
|
|
661
661
|
}, 1032, ["auth-function"]),
|
|
662
|
-
|
|
663
|
-
"auth-function": () =>
|
|
662
|
+
c(o(ce), {
|
|
663
|
+
"auth-function": () => s.canEdit(p)
|
|
664
664
|
}, {
|
|
665
|
-
default:
|
|
666
|
-
|
|
665
|
+
default: d(() => [
|
|
666
|
+
c(F, {
|
|
667
667
|
"data-testid": "action-entity-edit",
|
|
668
|
-
item:
|
|
668
|
+
item: J(p.id)
|
|
669
669
|
}, null, 8, ["item"])
|
|
670
670
|
]),
|
|
671
671
|
_: 2
|
|
672
672
|
}, 1032, ["auth-function"]),
|
|
673
|
-
|
|
674
|
-
"auth-function": () =>
|
|
673
|
+
c(o(ce), {
|
|
674
|
+
"auth-function": () => s.canDelete(p)
|
|
675
675
|
}, {
|
|
676
|
-
default:
|
|
677
|
-
|
|
676
|
+
default: d(() => [
|
|
677
|
+
c(F, {
|
|
678
678
|
danger: "",
|
|
679
679
|
"data-testid": "action-entity-delete",
|
|
680
680
|
"has-divider": "",
|
|
681
|
-
onClick: (t) =>
|
|
681
|
+
onClick: (t) => he(p)
|
|
682
682
|
}, {
|
|
683
|
-
default:
|
|
684
|
-
|
|
683
|
+
default: d(() => [
|
|
684
|
+
K(k(o(a)("actions.delete.menu_label")), 1)
|
|
685
685
|
]),
|
|
686
686
|
_: 2
|
|
687
687
|
}, 1032, ["onClick"])
|
|
@@ -691,22 +691,22 @@ const se = {
|
|
|
691
691
|
]),
|
|
692
692
|
_: 2
|
|
693
693
|
}, [
|
|
694
|
-
!l
|
|
694
|
+
!o(l) && Ee.value ? {
|
|
695
695
|
name: "outside-actions",
|
|
696
|
-
fn:
|
|
697
|
-
(
|
|
698
|
-
disabled: !
|
|
696
|
+
fn: d(() => [
|
|
697
|
+
(V(), de(Ke, {
|
|
698
|
+
disabled: !s.useActionOutside,
|
|
699
699
|
to: "#kong-ui-app-page-header-action-button"
|
|
700
700
|
}, [
|
|
701
|
-
|
|
701
|
+
c(y, {
|
|
702
702
|
appearance: "secondary",
|
|
703
703
|
class: "open-learning-hub",
|
|
704
704
|
"data-testid": "gateway-services-more-button",
|
|
705
705
|
icon: "",
|
|
706
|
-
onClick:
|
|
706
|
+
onClick: v[2] || (v[2] = (p) => u.$emit("click:learn-more"))
|
|
707
707
|
}, {
|
|
708
|
-
default:
|
|
709
|
-
|
|
708
|
+
default: d(() => [
|
|
709
|
+
c(o(qe), { decorative: "" })
|
|
710
710
|
]),
|
|
711
711
|
_: 1
|
|
712
712
|
})
|
|
@@ -714,36 +714,36 @@ const se = {
|
|
|
714
714
|
]),
|
|
715
715
|
key: "0"
|
|
716
716
|
} : void 0,
|
|
717
|
-
!
|
|
717
|
+
!B.value && s.enableV2EmptyStates && s.config.app === "konnect" ? {
|
|
718
718
|
name: "empty-state",
|
|
719
|
-
fn:
|
|
720
|
-
var
|
|
719
|
+
fn: d(() => {
|
|
720
|
+
var p;
|
|
721
721
|
return [
|
|
722
|
-
|
|
723
|
-
"action-button-text":
|
|
722
|
+
c(o(ut), {
|
|
723
|
+
"action-button-text": o(a)("gateway_services.empty_state_v2.create"),
|
|
724
724
|
appearance: "secondary",
|
|
725
|
-
"can-create": () =>
|
|
725
|
+
"can-create": () => s.canCreate(),
|
|
726
726
|
"data-testid": "gateway-services-entity-empty-state",
|
|
727
|
-
description:
|
|
728
|
-
"learn-more":
|
|
729
|
-
title:
|
|
730
|
-
"onClick:create":
|
|
731
|
-
"onClick:learnMore":
|
|
732
|
-
},
|
|
733
|
-
image:
|
|
734
|
-
I("div",
|
|
735
|
-
|
|
736
|
-
color:
|
|
737
|
-
size:
|
|
727
|
+
description: o(a)("gateway_services.empty_state_v2.description"),
|
|
728
|
+
"learn-more": s.config.app === "konnect",
|
|
729
|
+
title: o(a)("gateway_services.empty_state_v2.title"),
|
|
730
|
+
"onClick:create": Re,
|
|
731
|
+
"onClick:learnMore": v[3] || (v[3] = (t) => u.$emit("click:learn-more"))
|
|
732
|
+
}, Ce({
|
|
733
|
+
image: d(() => [
|
|
734
|
+
I("div", xt, [
|
|
735
|
+
c(o(tt), {
|
|
736
|
+
color: o($t),
|
|
737
|
+
size: o(Tt)
|
|
738
738
|
}, null, 8, ["color", "size"])
|
|
739
739
|
])
|
|
740
740
|
]),
|
|
741
741
|
_: 2
|
|
742
742
|
}, [
|
|
743
|
-
(
|
|
743
|
+
(p = s.config) != null && p.isControlPlaneGroup ? {
|
|
744
744
|
name: "message",
|
|
745
|
-
fn:
|
|
746
|
-
|
|
745
|
+
fn: d(() => [
|
|
746
|
+
K(k(o(a)("gateway_services.empty_state_v2.group")), 1)
|
|
747
747
|
]),
|
|
748
748
|
key: "0"
|
|
749
749
|
} : void 0
|
|
@@ -753,678 +753,43 @@ const se = {
|
|
|
753
753
|
key: "1"
|
|
754
754
|
} : void 0
|
|
755
755
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
756
|
-
|
|
757
|
-
action:
|
|
758
|
-
"entity-id":
|
|
759
|
-
"entity-name":
|
|
760
|
-
"entity-type":
|
|
761
|
-
"on-confirm":
|
|
762
|
-
visible:
|
|
763
|
-
onCancel:
|
|
764
|
-
onProceed:
|
|
756
|
+
c(o(ft), {
|
|
757
|
+
action: te.value.action,
|
|
758
|
+
"entity-id": te.value.id,
|
|
759
|
+
"entity-name": te.value.name,
|
|
760
|
+
"entity-type": o(a)("glossary.gateway_services"),
|
|
761
|
+
"on-confirm": me,
|
|
762
|
+
visible: se.value,
|
|
763
|
+
onCancel: W,
|
|
764
|
+
onProceed: W
|
|
765
765
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
766
|
-
|
|
767
|
-
"action-pending":
|
|
768
|
-
description:
|
|
769
|
-
"entity-name":
|
|
770
|
-
"entity-type":
|
|
771
|
-
error:
|
|
772
|
-
title:
|
|
773
|
-
visible:
|
|
774
|
-
onCancel:
|
|
775
|
-
onProceed:
|
|
766
|
+
c(o(pt), {
|
|
767
|
+
"action-pending": Q.value,
|
|
768
|
+
description: o(a)("actions.delete.description"),
|
|
769
|
+
"entity-name": x.value && (x.value.name || x.value.id),
|
|
770
|
+
"entity-type": o(mt).GatewayService,
|
|
771
|
+
error: ae.value,
|
|
772
|
+
title: o(a)("actions.delete.title"),
|
|
773
|
+
visible: O.value,
|
|
774
|
+
onCancel: be,
|
|
775
|
+
onProceed: Ue
|
|
776
776
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
777
777
|
]);
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
}),
|
|
781
|
-
const
|
|
782
|
-
for (const [
|
|
783
|
-
|
|
784
|
-
return
|
|
785
|
-
},
|
|
786
|
-
key: 0,
|
|
787
|
-
class: "gateway-service-form-group-fields"
|
|
788
|
-
}, Gt = {
|
|
789
|
-
key: 1,
|
|
790
|
-
class: "gateway-service-form-group-fields"
|
|
791
|
-
}, Ot = { key: 0 }, Nt = { class: "gateway-service-form-margin-top" }, jt = { class: "gateway-service-form-margin-bottom" }, zt = { class: "gateway-service-form-margin-bottom" }, Ht = { class: "gateway-service-form-margin-bottom" }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = {
|
|
792
|
-
key: 0,
|
|
793
|
-
class: "gateway-service-form-margin-bottom"
|
|
794
|
-
}, Qt = {
|
|
795
|
-
key: 1,
|
|
796
|
-
class: "gateway-service-form-margin-bottom"
|
|
797
|
-
}, Xt = {
|
|
798
|
-
key: 2,
|
|
799
|
-
class: "gateway-service-form-margin-bottom"
|
|
800
|
-
}, Yt = {
|
|
801
|
-
key: 0,
|
|
802
|
-
class: "checkbox-aligned-radio"
|
|
803
|
-
}, el = {
|
|
804
|
-
key: 1,
|
|
805
|
-
class: "checkbox-aligned-radio"
|
|
806
|
-
}, tl = /* @__PURE__ */ Le({
|
|
807
|
-
__name: "LegacyGatewayServiceForm",
|
|
808
|
-
props: {
|
|
809
|
-
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
810
|
-
config: {
|
|
811
|
-
type: Object,
|
|
812
|
-
required: !0,
|
|
813
|
-
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)
|
|
814
|
-
},
|
|
815
|
-
/** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
|
|
816
|
-
gatewayServiceId: {
|
|
817
|
-
type: String,
|
|
818
|
-
required: !1,
|
|
819
|
-
default: ""
|
|
820
|
-
},
|
|
821
|
-
/** Whether show or hide EntityFormSection info column */
|
|
822
|
-
hideSectionsInfo: {
|
|
823
|
-
type: Boolean,
|
|
824
|
-
required: !1,
|
|
825
|
-
default: !1
|
|
826
|
-
}
|
|
827
|
-
},
|
|
828
|
-
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
829
|
-
setup(n, { expose: X, emit: _ }) {
|
|
830
|
-
var de;
|
|
831
|
-
const v = _, a = n, h = D(!0), L = qe(), { i18nT: Q, i18n: { t: r } } = se.useI18n(), { getMessageFromError: j } = Je(), { axiosInstance: A } = Ge((de = a.config) == null ? void 0 : de.axiosRequestConfig), Se = Qe(), be = k(() => pe.form[a.config.app].edit), Y = k(() => a.gatewayServiceId ? Be.Edit : Be.Create), he = D(!1), ae = k(() => !!a.gatewayServiceId), x = D(ae.value ? "protocol" : "url"), me = se.usePortFromProtocol(), N = D(""), Ie = k(() => !!N.value), o = Me({
|
|
832
|
-
fields: {
|
|
833
|
-
name: "",
|
|
834
|
-
protocol: "http",
|
|
835
|
-
host: "",
|
|
836
|
-
path: "",
|
|
837
|
-
port: 80,
|
|
838
|
-
url: "",
|
|
839
|
-
retries: 5,
|
|
840
|
-
connect_timeout: 6e4,
|
|
841
|
-
write_timeout: 6e4,
|
|
842
|
-
read_timeout: 6e4,
|
|
843
|
-
client_certificate: "",
|
|
844
|
-
ca_certificates: "",
|
|
845
|
-
tls_verify_enabled: !1,
|
|
846
|
-
tls_verify_value: !1,
|
|
847
|
-
tags: "",
|
|
848
|
-
enabled: !0
|
|
849
|
-
},
|
|
850
|
-
isReadonly: !1,
|
|
851
|
-
errorMessage: ""
|
|
852
|
-
}), w = Me({
|
|
853
|
-
name: "",
|
|
854
|
-
protocol: "http",
|
|
855
|
-
host: "",
|
|
856
|
-
path: "",
|
|
857
|
-
port: 80,
|
|
858
|
-
url: "",
|
|
859
|
-
retries: 5,
|
|
860
|
-
connect_timeout: 6e4,
|
|
861
|
-
write_timeout: 6e4,
|
|
862
|
-
read_timeout: 6e4,
|
|
863
|
-
client_certificate: "",
|
|
864
|
-
ca_certificates: "",
|
|
865
|
-
tls_verify_enabled: !1,
|
|
866
|
-
tls_verify_value: !1,
|
|
867
|
-
tags: "",
|
|
868
|
-
enabled: !0
|
|
869
|
-
}), ie = a.config.app === "konnect" || Xe({
|
|
870
|
-
gatewayInfo: a.config.gatewayInfo,
|
|
871
|
-
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
872
|
-
supportedRange: {
|
|
873
|
-
enterprise: ["3.0"]
|
|
874
|
-
}
|
|
875
|
-
}), ve = [
|
|
876
|
-
{
|
|
877
|
-
label: r("gateway_services.form.fields.protocol.options.http"),
|
|
878
|
-
value: "http",
|
|
879
|
-
group: "http"
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
label: r("gateway_services.form.fields.protocol.options.https"),
|
|
883
|
-
value: "https",
|
|
884
|
-
group: "http"
|
|
885
|
-
},
|
|
886
|
-
{
|
|
887
|
-
label: r("gateway_services.form.fields.protocol.options.tcp"),
|
|
888
|
-
value: "tcp",
|
|
889
|
-
group: "tcp"
|
|
890
|
-
},
|
|
891
|
-
{
|
|
892
|
-
label: r("gateway_services.form.fields.protocol.options.tls"),
|
|
893
|
-
value: "tls",
|
|
894
|
-
group: "tcp"
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
label: r("gateway_services.form.fields.protocol.options.tls_passthrough"),
|
|
898
|
-
value: "tls_passthrough",
|
|
899
|
-
group: "tcp"
|
|
900
|
-
},
|
|
901
|
-
{
|
|
902
|
-
label: r("gateway_services.form.fields.protocol.options.grpc"),
|
|
903
|
-
value: "grpc",
|
|
904
|
-
group: "grpc"
|
|
905
|
-
},
|
|
906
|
-
{
|
|
907
|
-
label: r("gateway_services.form.fields.protocol.options.grpcs"),
|
|
908
|
-
value: "grpcs",
|
|
909
|
-
group: "grpc"
|
|
910
|
-
},
|
|
911
|
-
...ie ? [
|
|
912
|
-
{
|
|
913
|
-
label: r("gateway_services.form.fields.protocol.options.ws"),
|
|
914
|
-
value: "ws",
|
|
915
|
-
group: "websocket"
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
label: r("gateway_services.form.fields.protocol.options.wss"),
|
|
919
|
-
value: "wss",
|
|
920
|
-
group: "websocket"
|
|
921
|
-
}
|
|
922
|
-
] : [],
|
|
923
|
-
{
|
|
924
|
-
label: r("gateway_services.form.fields.protocol.options.udp"),
|
|
925
|
-
value: "udp",
|
|
926
|
-
group: "udp"
|
|
927
|
-
}
|
|
928
|
-
], we = { url: "url", protocol: "protocol" }, e = (i, f) => {
|
|
929
|
-
f.value;
|
|
930
|
-
}, $ = (i) => i ? parseFloat(i) : 0, ne = () => {
|
|
931
|
-
h.value = !0, o.errorMessage = "", o.fields.host = w.host, o.fields.path = w.path, o.fields.port = w.port, o.fields.protocol = w.protocol, o.fields.url = w.url, o.fields.retries = w.retries, o.fields.connect_timeout = w.connect_timeout, o.fields.write_timeout = w.write_timeout, o.fields.read_timeout = w.read_timeout, o.fields.client_certificate = w.client_certificate, o.fields.ca_certificates = w.ca_certificates, o.fields.tls_verify_enabled = w.tls_verify_enabled, o.fields.tls_verify_value = w.tls_verify_value, o.fields.enabled = w.enabled;
|
|
932
|
-
}, q = () => {
|
|
933
|
-
if (o.fields.url && x.value === "url")
|
|
934
|
-
try {
|
|
935
|
-
const i = new URL(o.fields.url);
|
|
936
|
-
o.errorMessage = "", o.fields.protocol = i.protocol.slice(0, -1), o.fields.host = i.hostname, o.fields.path = i.pathname;
|
|
937
|
-
const f = Number(i.port);
|
|
938
|
-
he.value = !!f, o.fields.port = f || me.getPortFromProtocol(o.fields.protocol), o.errorMessage = "", v("url-valid:success");
|
|
939
|
-
} catch (i) {
|
|
940
|
-
o.errorMessage = r("errors.urlErrorMessage"), v("url-valid:error", j(i));
|
|
941
|
-
}
|
|
942
|
-
else
|
|
943
|
-
v("url-valid:success"), o.errorMessage = "";
|
|
944
|
-
}, re = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(o.fields.protocol)), Pe = k(() => {
|
|
945
|
-
if (x.value === "url")
|
|
946
|
-
return !0;
|
|
947
|
-
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
948
|
-
return x.value === "protocol" && i;
|
|
949
|
-
}), oe = k(() => {
|
|
950
|
-
if (x.value === "url")
|
|
951
|
-
return !0;
|
|
952
|
-
const i = ["https", "tls"].includes(o.fields.protocol);
|
|
953
|
-
return x.value === "protocol" && i;
|
|
954
|
-
}), ke = k(() => {
|
|
955
|
-
if (x.value === "url")
|
|
956
|
-
return !0;
|
|
957
|
-
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
958
|
-
return x.value === "protocol" && i;
|
|
959
|
-
}), Ve = (i) => {
|
|
960
|
-
N.value = Se.utf8Name(i);
|
|
961
|
-
}, ce = k(() => ae.value && JSON.stringify(o.fields) !== JSON.stringify(w) || x.value === "url" && !!o.fields.url || x.value === "protocol" && !!o.fields.host), ge = (i) => {
|
|
962
|
-
var f, V, J;
|
|
963
|
-
o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((f = i == null ? void 0 : i.tags) == null ? void 0 : f.join(", ")) || "", o.fields.protocol = (i == null ? void 0 : i.protocol) || "http", o.fields.path = (i == null ? void 0 : i.path) || "", o.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, o.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, o.fields.host = (i == null ? void 0 : i.host) || "", o.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, o.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, o.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, o.fields.ca_certificates = ((V = i == null ? void 0 : i.ca_certificates) == null ? void 0 : V.join(",")) || "", o.fields.client_certificate = ((J = i == null ? void 0 : i.client_certificate) == null ? void 0 : J.id) || "", o.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, o.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, o.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(w, o.fields);
|
|
964
|
-
}, ye = () => {
|
|
965
|
-
L.push(a.config.cancelRoute);
|
|
966
|
-
}, Ee = k(() => {
|
|
967
|
-
var f, V;
|
|
968
|
-
let i = `${a.config.apiBaseUrl}${pe.form[a.config.app].validate}`;
|
|
969
|
-
return a.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((f = a.config) == null ? void 0 : f.controlPlaneId) || "") : a.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), i = i.replace(/{id}/gi, a.gatewayServiceId), i;
|
|
970
|
-
}), ee = k(() => {
|
|
971
|
-
var f, V;
|
|
972
|
-
let i = `${a.config.apiBaseUrl}${pe.form[a.config.app][Y.value]}`;
|
|
973
|
-
return a.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((f = a.config) == null ? void 0 : f.controlPlaneId) || "") : a.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), i = i.replace(/{id}/gi, a.gatewayServiceId), i;
|
|
974
|
-
}), z = (i) => {
|
|
975
|
-
let f = "";
|
|
976
|
-
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;
|
|
977
|
-
}, H = k(() => {
|
|
978
|
-
var f, V, J, B;
|
|
979
|
-
const i = {
|
|
980
|
-
name: o.fields.name || null,
|
|
981
|
-
tags: o.fields.tags ? (J = (V = (f = o.fields.tags) == null ? void 0 : f.split(",")) == null ? void 0 : V.map((R) => String(R || "").trim())) == null ? void 0 : J.filter((R) => R !== "") : null,
|
|
982
|
-
protocol: o.fields.protocol,
|
|
983
|
-
path: o.fields.path || null,
|
|
984
|
-
read_timeout: o.fields.read_timeout,
|
|
985
|
-
retries: o.fields.retries,
|
|
986
|
-
host: o.fields.host,
|
|
987
|
-
connect_timeout: o.fields.connect_timeout,
|
|
988
|
-
tls_verify_value: o.fields.tls_verify_value,
|
|
989
|
-
tls_verify_enabled: o.fields.tls_verify_enabled,
|
|
990
|
-
ca_certificates: o.fields.ca_certificates ? (B = o.fields.ca_certificates) == null ? void 0 : B.split(",").filter((R) => R !== "") : null,
|
|
991
|
-
client_certificate: o.fields.client_certificate ? { id: o.fields.client_certificate } : null,
|
|
992
|
-
write_timeout: o.fields.write_timeout,
|
|
993
|
-
port: o.fields.port,
|
|
994
|
-
url: o.fields.url,
|
|
995
|
-
enabled: o.fields.enabled
|
|
996
|
-
};
|
|
997
|
-
return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value), re.value || (i.path = null), Y.value === "create" ? x.value === "url" ? (delete i.protocol, delete i.host, delete i.path, a.config.app === "konnect" && delete i.port) : delete i.url : Y.value === "edit" && delete i.url, i;
|
|
998
|
-
}), te = async () => {
|
|
999
|
-
var i, f, V, J;
|
|
1000
|
-
try {
|
|
1001
|
-
o.isReadonly = !0, q();
|
|
1002
|
-
const B = H.value;
|
|
1003
|
-
z(B);
|
|
1004
|
-
let R;
|
|
1005
|
-
if (await A.post(Ee.value, B), Y.value === "create" ? R = await A.post(ee.value, B) : Y.value === "edit" && (R = ((i = a.config) == null ? void 0 : i.app) === "konnect" ? await A.put(ee.value, B) : await A.patch(ee.value, B)), R) {
|
|
1006
|
-
const { data: c } = R;
|
|
1007
|
-
o.fields.name = (c == null ? void 0 : c.name) || "", o.fields.port = c.port || me.getPortFromProtocol(c.protocol), o.fields.protocol = (c == null ? void 0 : c.protocol) || "http", o.fields.host = (c == null ? void 0 : c.host) || "", o.fields.path = (c == null ? void 0 : c.path) || "", o.fields.url = (c == null ? void 0 : c.url) || "", o.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, o.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, o.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, o.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, o.fields.client_certificate = ((f = c == null ? void 0 : c.client_certificate) == null ? void 0 : f.id) || "", o.fields.ca_certificates = (V = c == null ? void 0 : c.ca_certificates) != null && V.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", o.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, o.fields.tls_verify_value = o.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), o.fields.tags = (J = c == null ? void 0 : c.tags) != null && J.length ? c.tags.join(", ") : "", o.fields.enabled = (c == null ? void 0 : c.enabled) ?? !0, Object.assign(w, o.fields), v("update", R == null ? void 0 : R.data);
|
|
1008
|
-
}
|
|
1009
|
-
return R;
|
|
1010
|
-
} catch (B) {
|
|
1011
|
-
o.errorMessage = j(B), v("error", B);
|
|
1012
|
-
} finally {
|
|
1013
|
-
o.isReadonly = !1;
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
return Fe(() => a.gatewayServiceId, () => {
|
|
1017
|
-
Object.assign(o.fields, w);
|
|
1018
|
-
}), Fe(o.fields, (i) => {
|
|
1019
|
-
o.fields.port = me.getPortFromProtocol(i.protocol, String(i.port)), v("model-updated", H.value);
|
|
1020
|
-
}), He(() => {
|
|
1021
|
-
v("model-updated", H.value);
|
|
1022
|
-
}), X({
|
|
1023
|
-
validateUrl: q,
|
|
1024
|
-
getPayload: H,
|
|
1025
|
-
saveFormData: te,
|
|
1026
|
-
canSubmit: ce,
|
|
1027
|
-
initForm: ge
|
|
1028
|
-
}), (i, f) => {
|
|
1029
|
-
const V = W("KInput"), J = W("KLabel"), B = W("KRadio"), R = W("KSelect"), c = W("KCheckbox"), g = W("KCollapse");
|
|
1030
|
-
return S(), F("div", Kt, [
|
|
1031
|
-
u(l(Ye), {
|
|
1032
|
-
"can-submit": ce.value,
|
|
1033
|
-
config: n.config,
|
|
1034
|
-
"edit-id": n.gatewayServiceId,
|
|
1035
|
-
"entity-type": l(Oe).GatewayService,
|
|
1036
|
-
"error-message": o.errorMessage,
|
|
1037
|
-
"fetch-url": be.value,
|
|
1038
|
-
"form-fields": H.value,
|
|
1039
|
-
"is-readonly": o.isReadonly,
|
|
1040
|
-
onCancel: ye,
|
|
1041
|
-
"onFetch:error": f[25] || (f[25] = (p) => i.$emit("error", p)),
|
|
1042
|
-
"onFetch:success": ge,
|
|
1043
|
-
onLoading: f[26] || (f[26] = (p) => i.$emit("loading", p)),
|
|
1044
|
-
onSubmit: te
|
|
1045
|
-
}, {
|
|
1046
|
-
"form-actions": m(() => [
|
|
1047
|
-
Ze(i.$slots, "form-actions", {
|
|
1048
|
-
canSubmit: ce.value,
|
|
1049
|
-
cancel: ye,
|
|
1050
|
-
submit: te
|
|
1051
|
-
}, void 0, !0)
|
|
1052
|
-
]),
|
|
1053
|
-
default: m(() => [
|
|
1054
|
-
u(l(Ke), {
|
|
1055
|
-
description: l(r)("gateway_services.form.sections.general.description"),
|
|
1056
|
-
"hide-info-header": n.hideSectionsInfo,
|
|
1057
|
-
title: l(r)("gateway_services.form.sections.general.title")
|
|
1058
|
-
}, {
|
|
1059
|
-
default: m(() => [
|
|
1060
|
-
u(V, {
|
|
1061
|
-
modelValue: o.fields.name,
|
|
1062
|
-
"onUpdate:modelValue": f[0] || (f[0] = (p) => o.fields.name = p),
|
|
1063
|
-
modelModifiers: { trim: !0 },
|
|
1064
|
-
autocomplete: "off",
|
|
1065
|
-
"data-testid": "gateway-service-name-input",
|
|
1066
|
-
error: Ie.value,
|
|
1067
|
-
"error-message": N.value,
|
|
1068
|
-
label: l(r)("gateway_services.form.fields.name.label"),
|
|
1069
|
-
"label-attributes": {
|
|
1070
|
-
info: l(r)("gateway_services.form.fields.name.tooltip"),
|
|
1071
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1072
|
-
},
|
|
1073
|
-
name: "name",
|
|
1074
|
-
placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
|
|
1075
|
-
readonly: o.isReadonly,
|
|
1076
|
-
type: "text",
|
|
1077
|
-
onInput: Ve
|
|
1078
|
-
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1079
|
-
u(V, {
|
|
1080
|
-
modelValue: o.fields.tags,
|
|
1081
|
-
"onUpdate:modelValue": f[1] || (f[1] = (p) => o.fields.tags = p),
|
|
1082
|
-
modelModifiers: { trim: !0 },
|
|
1083
|
-
autocomplete: "off",
|
|
1084
|
-
"data-testid": "gateway-service-tags-input",
|
|
1085
|
-
help: l(r)("gateway_services.form.fields.tags.help"),
|
|
1086
|
-
label: l(r)("gateway_services.form.fields.tags.label"),
|
|
1087
|
-
"label-attributes": {
|
|
1088
|
-
info: l(r)("gateway_services.form.fields.tags.tooltip"),
|
|
1089
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1090
|
-
},
|
|
1091
|
-
name: "tags",
|
|
1092
|
-
placeholder: l(r)("gateway_services.form.fields.tags.placeholder"),
|
|
1093
|
-
readonly: o.isReadonly,
|
|
1094
|
-
type: "text"
|
|
1095
|
-
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
1096
|
-
]),
|
|
1097
|
-
_: 1
|
|
1098
|
-
}, 8, ["description", "hide-info-header", "title"]),
|
|
1099
|
-
u(l(Ke), {
|
|
1100
|
-
description: l(r)("gateway_services.form.sections.keys.description"),
|
|
1101
|
-
"hide-info-header": n.hideSectionsInfo,
|
|
1102
|
-
title: l(r)("gateway_services.form.sections.keys.title")
|
|
1103
|
-
}, {
|
|
1104
|
-
default: m(() => [
|
|
1105
|
-
ae.value ? M("", !0) : (S(), F("div", Lt, [
|
|
1106
|
-
I("div", Dt, [
|
|
1107
|
-
u(J, { required: "" }, {
|
|
1108
|
-
default: m(() => [
|
|
1109
|
-
Z(P(l(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1110
|
-
]),
|
|
1111
|
-
_: 1
|
|
1112
|
-
})
|
|
1113
|
-
]),
|
|
1114
|
-
I("div", Wt, [
|
|
1115
|
-
u(B, {
|
|
1116
|
-
modelValue: x.value,
|
|
1117
|
-
"onUpdate:modelValue": f[2] || (f[2] = (p) => x.value = p),
|
|
1118
|
-
"data-testid": "gateway-service-url-radio",
|
|
1119
|
-
"selected-value": we.url,
|
|
1120
|
-
onChange: ne
|
|
1121
|
-
}, {
|
|
1122
|
-
default: m(() => [
|
|
1123
|
-
Z(P(l(r)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1124
|
-
]),
|
|
1125
|
-
_: 1
|
|
1126
|
-
}, 8, ["modelValue", "selected-value"])
|
|
1127
|
-
]),
|
|
1128
|
-
x.value === "url" ? (S(), F("div", qt, [
|
|
1129
|
-
u(V, {
|
|
1130
|
-
modelValue: o.fields.url,
|
|
1131
|
-
"onUpdate:modelValue": f[3] || (f[3] = (p) => o.fields.url = p),
|
|
1132
|
-
modelModifiers: { trim: !0 },
|
|
1133
|
-
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1134
|
-
"data-testid": "gateway-service-url-input",
|
|
1135
|
-
label: l(r)("gateway_services.form.fields.upstream_url.label"),
|
|
1136
|
-
"label-attributes": {
|
|
1137
|
-
info: n.config.app === "konnect" ? l(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : l(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1138
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1139
|
-
},
|
|
1140
|
-
name: "url",
|
|
1141
|
-
placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1142
|
-
required: ""
|
|
1143
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1144
|
-
])) : M("", !0),
|
|
1145
|
-
u(B, {
|
|
1146
|
-
modelValue: x.value,
|
|
1147
|
-
"onUpdate:modelValue": f[4] || (f[4] = (p) => x.value = p),
|
|
1148
|
-
"checked-group": "protocol",
|
|
1149
|
-
"data-testid": "gateway-service-protocol-radio",
|
|
1150
|
-
"selected-value": we.protocol,
|
|
1151
|
-
onChange: ne
|
|
1152
|
-
}, {
|
|
1153
|
-
default: m(() => [
|
|
1154
|
-
Z(P(l(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1155
|
-
]),
|
|
1156
|
-
_: 1
|
|
1157
|
-
}, 8, ["modelValue", "selected-value"])
|
|
1158
|
-
])),
|
|
1159
|
-
x.value === "protocol" || ae.value ? (S(), F("div", Gt, [
|
|
1160
|
-
u(R, {
|
|
1161
|
-
modelValue: o.fields.protocol,
|
|
1162
|
-
"onUpdate:modelValue": f[5] || (f[5] = (p) => o.fields.protocol = p),
|
|
1163
|
-
"data-testid": "gateway-service-protocol-select",
|
|
1164
|
-
items: ve,
|
|
1165
|
-
label: l(r)("gateway_services.form.fields.protocol.label"),
|
|
1166
|
-
"label-attributes": {
|
|
1167
|
-
info: l(r)("gateway_services.form.fields.protocol.tooltip"),
|
|
1168
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1169
|
-
},
|
|
1170
|
-
readonly: o.isReadonly,
|
|
1171
|
-
required: "",
|
|
1172
|
-
width: "100%",
|
|
1173
|
-
onSelected: f[6] || (f[6] = (p) => e(o.fields.protocol, p))
|
|
1174
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1175
|
-
u(V, {
|
|
1176
|
-
modelValue: o.fields.host,
|
|
1177
|
-
"onUpdate:modelValue": f[7] || (f[7] = (p) => o.fields.host = p),
|
|
1178
|
-
modelModifiers: { trim: !0 },
|
|
1179
|
-
class: "gateway-service-form-margin-top",
|
|
1180
|
-
"data-testid": "gateway-service-host-input",
|
|
1181
|
-
label: l(r)("gateway_services.form.fields.host.label"),
|
|
1182
|
-
"label-attributes": {
|
|
1183
|
-
info: l(r)("gateway_services.form.fields.host.tooltip"),
|
|
1184
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1185
|
-
},
|
|
1186
|
-
name: "host",
|
|
1187
|
-
placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
|
|
1188
|
-
required: ""
|
|
1189
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1190
|
-
re.value ? (S(), F("div", Ot, [
|
|
1191
|
-
u(V, {
|
|
1192
|
-
modelValue: o.fields.path,
|
|
1193
|
-
"onUpdate:modelValue": f[8] || (f[8] = (p) => o.fields.path = p),
|
|
1194
|
-
modelModifiers: { trim: !0 },
|
|
1195
|
-
class: "gateway-service-form-margin-top",
|
|
1196
|
-
"data-testid": "gateway-service-path-input",
|
|
1197
|
-
label: l(r)("gateway_services.form.fields.path.label"),
|
|
1198
|
-
"label-attributes": {
|
|
1199
|
-
info: l(r)("gateway_services.form.fields.path.tooltip"),
|
|
1200
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1201
|
-
},
|
|
1202
|
-
name: "path",
|
|
1203
|
-
placeholder: l(r)("gateway_services.form.fields.path.placeholder")
|
|
1204
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1205
|
-
])) : M("", !0),
|
|
1206
|
-
u(V, {
|
|
1207
|
-
modelValue: o.fields.port,
|
|
1208
|
-
"onUpdate:modelValue": [
|
|
1209
|
-
f[9] || (f[9] = (p) => o.fields.port = p),
|
|
1210
|
-
f[10] || (f[10] = () => {
|
|
1211
|
-
o.fields.port = $(o.fields.port + "");
|
|
1212
|
-
})
|
|
1213
|
-
],
|
|
1214
|
-
class: "gateway-service-form-margin-top",
|
|
1215
|
-
"data-testid": "gateway-service-port-input",
|
|
1216
|
-
label: l(r)("gateway_services.form.fields.port.label"),
|
|
1217
|
-
"label-attributes": {
|
|
1218
|
-
info: l(r)("gateway_services.form.fields.port.tooltip"),
|
|
1219
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1220
|
-
},
|
|
1221
|
-
name: "port",
|
|
1222
|
-
type: "number"
|
|
1223
|
-
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1224
|
-
])) : M("", !0),
|
|
1225
|
-
u(g, {
|
|
1226
|
-
modelValue: h.value,
|
|
1227
|
-
"onUpdate:modelValue": f[24] || (f[24] = (p) => h.value = p),
|
|
1228
|
-
"data-testid": "advanced-fields-collapse",
|
|
1229
|
-
"trigger-alignment": "leading",
|
|
1230
|
-
"trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1231
|
-
}, {
|
|
1232
|
-
default: m(() => [
|
|
1233
|
-
I("div", Nt, [
|
|
1234
|
-
I("div", jt, [
|
|
1235
|
-
u(V, {
|
|
1236
|
-
modelValue: o.fields.retries,
|
|
1237
|
-
"onUpdate:modelValue": [
|
|
1238
|
-
f[11] || (f[11] = (p) => o.fields.retries = p),
|
|
1239
|
-
f[12] || (f[12] = () => {
|
|
1240
|
-
o.fields.retries = $(o.fields.retries + "");
|
|
1241
|
-
})
|
|
1242
|
-
],
|
|
1243
|
-
autocomplete: "off",
|
|
1244
|
-
"data-testid": "gateway-service-retries-input",
|
|
1245
|
-
label: l(r)("gateway_services.form.fields.retries.label"),
|
|
1246
|
-
"label-attributes": {
|
|
1247
|
-
info: l(r)("gateway_services.form.fields.retries.tooltip"),
|
|
1248
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1249
|
-
},
|
|
1250
|
-
name: "retries",
|
|
1251
|
-
readonly: o.isReadonly,
|
|
1252
|
-
type: "number"
|
|
1253
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1254
|
-
]),
|
|
1255
|
-
I("div", zt, [
|
|
1256
|
-
u(V, {
|
|
1257
|
-
modelValue: o.fields.connect_timeout,
|
|
1258
|
-
"onUpdate:modelValue": [
|
|
1259
|
-
f[13] || (f[13] = (p) => o.fields.connect_timeout = p),
|
|
1260
|
-
f[14] || (f[14] = () => {
|
|
1261
|
-
o.fields.connect_timeout = $(o.fields.connect_timeout + "");
|
|
1262
|
-
})
|
|
1263
|
-
],
|
|
1264
|
-
autocomplete: "off",
|
|
1265
|
-
"data-testid": "gateway-service-connTimeout-input",
|
|
1266
|
-
label: l(r)("gateway_services.form.fields.connect_timeout.label"),
|
|
1267
|
-
"label-attributes": {
|
|
1268
|
-
info: l(r)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
1269
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1270
|
-
},
|
|
1271
|
-
name: "connTimeout",
|
|
1272
|
-
readonly: o.isReadonly,
|
|
1273
|
-
type: "number"
|
|
1274
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1275
|
-
]),
|
|
1276
|
-
I("div", Ht, [
|
|
1277
|
-
u(V, {
|
|
1278
|
-
modelValue: o.fields.write_timeout,
|
|
1279
|
-
"onUpdate:modelValue": [
|
|
1280
|
-
f[15] || (f[15] = (p) => o.fields.write_timeout = p),
|
|
1281
|
-
f[16] || (f[16] = () => {
|
|
1282
|
-
o.fields.write_timeout = $(o.fields.write_timeout + "");
|
|
1283
|
-
})
|
|
1284
|
-
],
|
|
1285
|
-
autocomplete: "off",
|
|
1286
|
-
"data-testid": "gateway-service-writeTimeout-input",
|
|
1287
|
-
label: l(r)("gateway_services.form.fields.write_timeout.label"),
|
|
1288
|
-
"label-attributes": {
|
|
1289
|
-
info: l(r)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
1290
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1291
|
-
},
|
|
1292
|
-
name: "writeTimeout",
|
|
1293
|
-
readonly: o.isReadonly,
|
|
1294
|
-
type: "number"
|
|
1295
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1296
|
-
]),
|
|
1297
|
-
I("div", Zt, [
|
|
1298
|
-
u(V, {
|
|
1299
|
-
modelValue: o.fields.read_timeout,
|
|
1300
|
-
"onUpdate:modelValue": [
|
|
1301
|
-
f[17] || (f[17] = (p) => o.fields.read_timeout = p),
|
|
1302
|
-
f[18] || (f[18] = () => {
|
|
1303
|
-
o.fields.read_timeout = $(o.fields.read_timeout + "");
|
|
1304
|
-
})
|
|
1305
|
-
],
|
|
1306
|
-
autocomplete: "off",
|
|
1307
|
-
"data-testid": "gateway-service-readTimeout-input",
|
|
1308
|
-
label: l(r)("gateway_services.form.fields.read_timeout.label"),
|
|
1309
|
-
"label-attributes": {
|
|
1310
|
-
info: l(r)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
1311
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1312
|
-
},
|
|
1313
|
-
name: "readTimeout",
|
|
1314
|
-
readonly: o.isReadonly,
|
|
1315
|
-
type: "number"
|
|
1316
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1317
|
-
]),
|
|
1318
|
-
Pe.value ? (S(), F("div", Jt, [
|
|
1319
|
-
u(V, {
|
|
1320
|
-
modelValue: o.fields.client_certificate,
|
|
1321
|
-
"onUpdate:modelValue": f[19] || (f[19] = (p) => o.fields.client_certificate = p),
|
|
1322
|
-
modelModifiers: { trim: !0 },
|
|
1323
|
-
autocomplete: "off",
|
|
1324
|
-
"data-testid": "gateway-service-clientCert-input",
|
|
1325
|
-
label: l(r)("gateway_services.form.fields.client_certificate.label"),
|
|
1326
|
-
"label-attributes": {
|
|
1327
|
-
info: l(r)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1328
|
-
tooltipAttributes: { maxWidth: "400" }
|
|
1329
|
-
},
|
|
1330
|
-
name: "clientCert",
|
|
1331
|
-
placeholder: l(r)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
1332
|
-
readonly: o.isReadonly,
|
|
1333
|
-
type: "text"
|
|
1334
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1335
|
-
])) : M("", !0),
|
|
1336
|
-
oe.value ? (S(), F("div", Qt, [
|
|
1337
|
-
u(V, {
|
|
1338
|
-
modelValue: o.fields.ca_certificates,
|
|
1339
|
-
"onUpdate:modelValue": f[20] || (f[20] = (p) => o.fields.ca_certificates = p),
|
|
1340
|
-
modelModifiers: { trim: !0 },
|
|
1341
|
-
autocomplete: "off",
|
|
1342
|
-
"data-testid": "gateway-service-ca-certs-input",
|
|
1343
|
-
label: l(r)("gateway_services.form.fields.ca_certificates.label"),
|
|
1344
|
-
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1345
|
-
placeholder: l(r)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
1346
|
-
readonly: o.isReadonly,
|
|
1347
|
-
type: "text"
|
|
1348
|
-
}, {
|
|
1349
|
-
"label-tooltip": m(() => [
|
|
1350
|
-
u(l(Q), {
|
|
1351
|
-
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1352
|
-
scope: "global"
|
|
1353
|
-
}, {
|
|
1354
|
-
code1: m(() => [
|
|
1355
|
-
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1356
|
-
]),
|
|
1357
|
-
code2: m(() => [
|
|
1358
|
-
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1359
|
-
]),
|
|
1360
|
-
_: 1
|
|
1361
|
-
})
|
|
1362
|
-
]),
|
|
1363
|
-
_: 1
|
|
1364
|
-
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1365
|
-
])) : M("", !0),
|
|
1366
|
-
ke.value ? (S(), F("div", Xt, [
|
|
1367
|
-
u(c, {
|
|
1368
|
-
modelValue: o.fields.tls_verify_enabled,
|
|
1369
|
-
"onUpdate:modelValue": f[21] || (f[21] = (p) => o.fields.tls_verify_enabled = p),
|
|
1370
|
-
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1371
|
-
description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1372
|
-
label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1373
|
-
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1374
|
-
}, {
|
|
1375
|
-
tooltip: m(() => [
|
|
1376
|
-
u(l(Q), {
|
|
1377
|
-
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1378
|
-
scope: "global"
|
|
1379
|
-
}, {
|
|
1380
|
-
code1: m(() => [
|
|
1381
|
-
I("code", null, P(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1382
|
-
]),
|
|
1383
|
-
_: 1
|
|
1384
|
-
})
|
|
1385
|
-
]),
|
|
1386
|
-
_: 1
|
|
1387
|
-
}, 8, ["modelValue", "description", "label"]),
|
|
1388
|
-
o.fields.tls_verify_enabled ? (S(), F("div", Yt, [
|
|
1389
|
-
u(B, {
|
|
1390
|
-
modelValue: o.fields.tls_verify_value,
|
|
1391
|
-
"onUpdate:modelValue": f[22] || (f[22] = (p) => o.fields.tls_verify_value = p),
|
|
1392
|
-
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1393
|
-
label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1394
|
-
"selected-value": !0
|
|
1395
|
-
}, null, 8, ["modelValue", "label"])
|
|
1396
|
-
])) : M("", !0),
|
|
1397
|
-
o.fields.tls_verify_enabled ? (S(), F("div", el, [
|
|
1398
|
-
u(B, {
|
|
1399
|
-
modelValue: o.fields.tls_verify_value,
|
|
1400
|
-
"onUpdate:modelValue": f[23] || (f[23] = (p) => o.fields.tls_verify_value = p),
|
|
1401
|
-
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1402
|
-
label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1403
|
-
"selected-value": !1
|
|
1404
|
-
}, null, 8, ["modelValue", "label"])
|
|
1405
|
-
])) : M("", !0)
|
|
1406
|
-
])) : M("", !0)
|
|
1407
|
-
])
|
|
1408
|
-
]),
|
|
1409
|
-
_: 1
|
|
1410
|
-
}, 8, ["modelValue", "trigger-label"])
|
|
1411
|
-
]),
|
|
1412
|
-
_: 1
|
|
1413
|
-
}, 8, ["description", "hide-info-header", "title"])
|
|
1414
|
-
]),
|
|
1415
|
-
_: 3
|
|
1416
|
-
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
1417
|
-
]);
|
|
1418
|
-
};
|
|
1419
|
-
}
|
|
1420
|
-
}), Al = /* @__PURE__ */ Ne(tl, [["__scopeId", "data-v-e874c296"]]), ll = { class: "kong-ui-gateway-service-entity-config-card" }, xl = /* @__PURE__ */ Le({
|
|
780
|
+
}), He = (s, G) => {
|
|
781
|
+
const m = s.__vccOpts || s;
|
|
782
|
+
for (const [n, a] of G)
|
|
783
|
+
m[n] = a;
|
|
784
|
+
return m;
|
|
785
|
+
}, mo = /* @__PURE__ */ He(Bt, [["__scopeId", "data-v-210f19c5"]]), Dt = { class: "kong-ui-gateway-service-entity-config-card" }, vo = /* @__PURE__ */ De({
|
|
1421
786
|
__name: "GatewayServiceConfigCard",
|
|
1422
787
|
props: {
|
|
1423
788
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1424
789
|
config: {
|
|
1425
790
|
type: Object,
|
|
1426
791
|
required: !0,
|
|
1427
|
-
validator: (
|
|
792
|
+
validator: (s) => !(!s || !["konnect", "kongManager"].includes(s == null ? void 0 : s.app) || s.app === "konnect" && !s.controlPlaneId || s.app === "kongManager" && typeof s.workspace != "string" || !s.entityId)
|
|
1428
793
|
},
|
|
1429
794
|
/**
|
|
1430
795
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -1443,129 +808,129 @@ const se = {
|
|
|
1443
808
|
}
|
|
1444
809
|
},
|
|
1445
810
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1446
|
-
setup(
|
|
1447
|
-
const
|
|
811
|
+
setup(s) {
|
|
812
|
+
const G = s, { i18n: { t: m }, i18nT: n } = Y.useI18n(), a = b(() => ue.form[G.config.app].edit), { getPropValue: g } = je(), $ = (l, M) => g(l, M) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), N = R({
|
|
1448
813
|
id: {},
|
|
1449
814
|
name: {
|
|
1450
|
-
tooltip:
|
|
815
|
+
tooltip: m("gateway_services.form.fields.name.tooltip")
|
|
1451
816
|
},
|
|
1452
817
|
enabled: {},
|
|
1453
818
|
updated_at: {},
|
|
1454
819
|
created_at: {},
|
|
1455
820
|
protocol: {
|
|
1456
|
-
section:
|
|
1457
|
-
tooltip:
|
|
821
|
+
section: we.Basic,
|
|
822
|
+
tooltip: m("gateway_services.form.fields.protocol.tooltip")
|
|
1458
823
|
},
|
|
1459
824
|
host: {
|
|
1460
|
-
section:
|
|
1461
|
-
tooltip:
|
|
825
|
+
section: we.Basic,
|
|
826
|
+
tooltip: m("gateway_services.form.fields.host.tooltip")
|
|
1462
827
|
},
|
|
1463
828
|
path: {
|
|
1464
|
-
section:
|
|
1465
|
-
tooltip:
|
|
829
|
+
section: we.Basic,
|
|
830
|
+
tooltip: m("gateway_services.form.fields.path.tooltip")
|
|
1466
831
|
},
|
|
1467
832
|
port: {
|
|
1468
|
-
section:
|
|
1469
|
-
tooltip:
|
|
833
|
+
section: we.Basic,
|
|
834
|
+
tooltip: m("gateway_services.form.fields.port.tooltip")
|
|
1470
835
|
},
|
|
1471
836
|
tags: {
|
|
1472
|
-
tooltip:
|
|
837
|
+
tooltip: m("gateway_services.form.fields.tags.tooltip")
|
|
1473
838
|
},
|
|
1474
839
|
// advanced fields
|
|
1475
840
|
retries: {
|
|
1476
841
|
order: 1,
|
|
1477
|
-
tooltip:
|
|
842
|
+
tooltip: m("gateway_services.form.fields.retries.tooltip")
|
|
1478
843
|
},
|
|
1479
844
|
connect_timeout: {
|
|
1480
845
|
order: 2,
|
|
1481
|
-
tooltip:
|
|
846
|
+
tooltip: m("gateway_services.form.fields.connect_timeout.tooltip")
|
|
1482
847
|
},
|
|
1483
848
|
write_timeout: {
|
|
1484
849
|
order: 3,
|
|
1485
|
-
tooltip:
|
|
850
|
+
tooltip: m("gateway_services.form.fields.write_timeout.tooltip")
|
|
1486
851
|
},
|
|
1487
852
|
read_timeout: {
|
|
1488
853
|
order: 4,
|
|
1489
|
-
tooltip:
|
|
854
|
+
tooltip: m("gateway_services.form.fields.read_timeout.tooltip")
|
|
1490
855
|
},
|
|
1491
856
|
client_certificate: {
|
|
1492
857
|
order: 5,
|
|
1493
|
-
tooltip:
|
|
858
|
+
tooltip: m("gateway_services.form.fields.client_certificate.tooltip")
|
|
1494
859
|
},
|
|
1495
860
|
ca_certificates: {
|
|
1496
|
-
type:
|
|
1497
|
-
label:
|
|
861
|
+
type: vt.BadgeTag,
|
|
862
|
+
label: m("gateway_services.form.fields.ca_certificates.label"),
|
|
1498
863
|
order: 6
|
|
1499
864
|
},
|
|
1500
865
|
tls_verify: {
|
|
1501
|
-
label:
|
|
866
|
+
label: m("gateway_services.form.fields.tls_verify_enabled.label")
|
|
1502
867
|
},
|
|
1503
868
|
tls_verify_depth: {
|
|
1504
869
|
hidden: !0
|
|
1505
870
|
}
|
|
1506
871
|
});
|
|
1507
|
-
return (
|
|
1508
|
-
|
|
1509
|
-
config:
|
|
1510
|
-
"config-card-doc":
|
|
1511
|
-
"config-schema":
|
|
1512
|
-
"entity-type":
|
|
872
|
+
return (l, M) => (V(), T("div", Dt, [
|
|
873
|
+
c(o(gt), {
|
|
874
|
+
config: s.config,
|
|
875
|
+
"config-card-doc": s.configCardDoc,
|
|
876
|
+
"config-schema": N.value,
|
|
877
|
+
"entity-type": o(ze).GatewayService,
|
|
1513
878
|
"fetch-url": a.value,
|
|
1514
|
-
"hide-title":
|
|
1515
|
-
"onFetch:error":
|
|
1516
|
-
"onFetch:success":
|
|
1517
|
-
onLoading:
|
|
879
|
+
"hide-title": s.hideTitle,
|
|
880
|
+
"onFetch:error": M[0] || (M[0] = (P) => l.$emit("fetch:error", P)),
|
|
881
|
+
"onFetch:success": M[1] || (M[1] = (P) => l.$emit("fetch:success", P)),
|
|
882
|
+
onLoading: M[2] || (M[2] = (P) => l.$emit("loading", P))
|
|
1518
883
|
}, {
|
|
1519
|
-
"enabled-label-tooltip":
|
|
1520
|
-
|
|
884
|
+
"enabled-label-tooltip": d(() => [
|
|
885
|
+
c(o(n), {
|
|
1521
886
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1522
887
|
scope: "global"
|
|
1523
888
|
}, {
|
|
1524
|
-
false:
|
|
1525
|
-
I("code", null,
|
|
889
|
+
false: d(() => [
|
|
890
|
+
I("code", null, k(o(m)("gateway_services.form.fields.enabled.false")), 1)
|
|
1526
891
|
]),
|
|
1527
|
-
true:
|
|
1528
|
-
I("code", null,
|
|
892
|
+
true: d(() => [
|
|
893
|
+
I("code", null, k(o(m)("gateway_services.form.fields.enabled.true")), 1)
|
|
1529
894
|
]),
|
|
1530
895
|
_: 1
|
|
1531
896
|
})
|
|
1532
897
|
]),
|
|
1533
|
-
"ca_certificates-label-tooltip":
|
|
1534
|
-
|
|
898
|
+
"ca_certificates-label-tooltip": d(() => [
|
|
899
|
+
c(o(n), {
|
|
1535
900
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1536
901
|
scope: "global"
|
|
1537
902
|
}, {
|
|
1538
|
-
code1:
|
|
1539
|
-
I("code", null,
|
|
903
|
+
code1: d(() => [
|
|
904
|
+
I("code", null, k(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1540
905
|
]),
|
|
1541
|
-
code2:
|
|
1542
|
-
I("code", null,
|
|
906
|
+
code2: d(() => [
|
|
907
|
+
I("code", null, k(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1543
908
|
]),
|
|
1544
909
|
_: 1
|
|
1545
910
|
})
|
|
1546
911
|
]),
|
|
1547
|
-
"tls_verify-label-tooltip":
|
|
1548
|
-
|
|
912
|
+
"tls_verify-label-tooltip": d(() => [
|
|
913
|
+
c(o(n), {
|
|
1549
914
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1550
915
|
scope: "global"
|
|
1551
916
|
}, {
|
|
1552
|
-
code1:
|
|
1553
|
-
I("code", null,
|
|
917
|
+
code1: d(() => [
|
|
918
|
+
I("code", null, k(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1554
919
|
]),
|
|
1555
920
|
_: 1
|
|
1556
921
|
})
|
|
1557
922
|
]),
|
|
1558
|
-
tls_verify:
|
|
1559
|
-
|
|
923
|
+
tls_verify: d((P) => [
|
|
924
|
+
K(k(typeof o(g)("rowValue", P) == "boolean" ? $("rowValue", P) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1560
925
|
]),
|
|
1561
|
-
client_certificate:
|
|
1562
|
-
|
|
926
|
+
client_certificate: d((P) => [
|
|
927
|
+
K(k(o(g)("rowValue", P) ? o(g)("rowValue", P).id : "–"), 1)
|
|
1563
928
|
]),
|
|
1564
929
|
_: 1
|
|
1565
930
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
1566
931
|
]));
|
|
1567
932
|
}
|
|
1568
|
-
}),
|
|
933
|
+
}), q = {
|
|
1569
934
|
name: "Kong-Air-Flights-API",
|
|
1570
935
|
tags: [],
|
|
1571
936
|
protocol: "https",
|
|
@@ -1578,41 +943,41 @@ const se = {
|
|
|
1578
943
|
client_certificate: null,
|
|
1579
944
|
write_timeout: 6e4,
|
|
1580
945
|
port: 443
|
|
1581
|
-
},
|
|
946
|
+
}, Kt = { class: "kong-ui-entities-gateway-service-form" }, Lt = {
|
|
1582
947
|
key: 0,
|
|
1583
948
|
class: "gateway-service-form-general-info"
|
|
1584
|
-
},
|
|
949
|
+
}, qt = { class: "gateway-service-form-group-selection-wrapper" }, Gt = {
|
|
1585
950
|
key: 0,
|
|
1586
951
|
class: "gateway-service-form-group-fields"
|
|
1587
|
-
},
|
|
952
|
+
}, Nt = {
|
|
1588
953
|
key: 0,
|
|
1589
954
|
class: "gateway-service-form-group-fields"
|
|
1590
|
-
},
|
|
955
|
+
}, Ot = { key: 0 }, Wt = {
|
|
1591
956
|
key: 0,
|
|
1592
957
|
class: "gateway-service-form-advanced-fields"
|
|
1593
|
-
},
|
|
958
|
+
}, jt = { class: "gateway-service-form-margin-bottom" }, zt = { class: "gateway-service-form-margin-bottom" }, Ht = { class: "gateway-service-form-margin-bottom" }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = {
|
|
1594
959
|
key: 0,
|
|
1595
960
|
class: "gateway-service-form-margin-bottom"
|
|
1596
|
-
},
|
|
961
|
+
}, Qt = {
|
|
1597
962
|
key: 1,
|
|
1598
963
|
class: "gateway-service-form-margin-bottom"
|
|
1599
|
-
},
|
|
964
|
+
}, Xt = {
|
|
1600
965
|
key: 2,
|
|
1601
966
|
class: "gateway-service-form-margin-bottom"
|
|
1602
|
-
},
|
|
967
|
+
}, Yt = {
|
|
1603
968
|
key: 0,
|
|
1604
969
|
class: "checkbox-aligned-radio"
|
|
1605
|
-
},
|
|
970
|
+
}, eo = {
|
|
1606
971
|
key: 1,
|
|
1607
972
|
class: "checkbox-aligned-radio"
|
|
1608
|
-
},
|
|
973
|
+
}, to = { class: "gateway-service-form-tags" }, oo = { class: "form-error-list" }, ro = /* @__PURE__ */ De({
|
|
1609
974
|
__name: "GatewayServiceForm",
|
|
1610
975
|
props: {
|
|
1611
976
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1612
977
|
config: {
|
|
1613
978
|
type: Object,
|
|
1614
979
|
required: !0,
|
|
1615
|
-
validator: (
|
|
980
|
+
validator: (s) => !(!s || !["konnect", "kongManager"].includes(s == null ? void 0 : s.app) || s.app === "konnect" && !s.controlPlaneId || s.app === "kongManager" && typeof s.workspace != "string" || !s.cancelRoute)
|
|
1616
981
|
},
|
|
1617
982
|
/** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
|
|
1618
983
|
gatewayServiceId: {
|
|
@@ -1634,9 +999,9 @@ const se = {
|
|
|
1634
999
|
}
|
|
1635
1000
|
},
|
|
1636
1001
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1637
|
-
setup(
|
|
1638
|
-
var
|
|
1639
|
-
const
|
|
1002
|
+
setup(s, { expose: G, emit: m }) {
|
|
1003
|
+
var p;
|
|
1004
|
+
const n = m, a = s, g = R(!0), $ = Oe(), { i18nT: N, i18n: { t: l } } = Y.useI18n(), { getErrorFieldsFromError: M } = yt(), { axiosInstance: P } = We((p = a.config) == null ? void 0 : p.axiosRequestConfig), Ee = _t(), { validateHost: fe, validatePath: ie, validatePort: pe, validateProtocol: Se } = Y.useUrlValidators(), { objectsAreEqual: ee } = je(), Ie = b(() => ue.form[a.config.app].edit), B = b(() => a.gatewayServiceId ? Ge.Edit : Ge.Create), Pe = R(!1), H = b(() => !!a.gatewayServiceId), E = R(H.value ? "protocol" : "url"), Z = Y.usePortFromProtocol(), le = R(""), Fe = b(() => !!le.value || !!J("name")), e = Le({
|
|
1640
1005
|
fields: {
|
|
1641
1006
|
name: "",
|
|
1642
1007
|
protocol: "http",
|
|
@@ -1673,7 +1038,7 @@ const se = {
|
|
|
1673
1038
|
tls_verify_enabled: "",
|
|
1674
1039
|
tls_verify_value: ""
|
|
1675
1040
|
}
|
|
1676
|
-
}),
|
|
1041
|
+
}), C = Le({
|
|
1677
1042
|
name: "",
|
|
1678
1043
|
protocol: "http",
|
|
1679
1044
|
host: "",
|
|
@@ -1690,170 +1055,170 @@ const se = {
|
|
|
1690
1055
|
tls_verify_value: !1,
|
|
1691
1056
|
tags: "",
|
|
1692
1057
|
enabled: !0
|
|
1693
|
-
}),
|
|
1058
|
+
}), se = a.config.app === "konnect" || ht({
|
|
1694
1059
|
gatewayInfo: a.config.gatewayInfo,
|
|
1695
1060
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1696
1061
|
supportedRange: {
|
|
1697
1062
|
enterprise: ["3.0"]
|
|
1698
1063
|
}
|
|
1699
|
-
}),
|
|
1064
|
+
}), U = [
|
|
1700
1065
|
{
|
|
1701
|
-
label:
|
|
1066
|
+
label: l("gateway_services.form.fields.protocol.options.http"),
|
|
1702
1067
|
value: "http",
|
|
1703
1068
|
group: "http"
|
|
1704
1069
|
},
|
|
1705
1070
|
{
|
|
1706
|
-
label:
|
|
1071
|
+
label: l("gateway_services.form.fields.protocol.options.https"),
|
|
1707
1072
|
value: "https",
|
|
1708
1073
|
group: "http"
|
|
1709
1074
|
},
|
|
1710
1075
|
{
|
|
1711
|
-
label:
|
|
1076
|
+
label: l("gateway_services.form.fields.protocol.options.tcp"),
|
|
1712
1077
|
value: "tcp",
|
|
1713
1078
|
group: "tcp"
|
|
1714
1079
|
},
|
|
1715
1080
|
{
|
|
1716
|
-
label:
|
|
1081
|
+
label: l("gateway_services.form.fields.protocol.options.tls"),
|
|
1717
1082
|
value: "tls",
|
|
1718
1083
|
group: "tcp"
|
|
1719
1084
|
},
|
|
1720
1085
|
{
|
|
1721
|
-
label:
|
|
1086
|
+
label: l("gateway_services.form.fields.protocol.options.tls_passthrough"),
|
|
1722
1087
|
value: "tls_passthrough",
|
|
1723
1088
|
group: "tcp"
|
|
1724
1089
|
},
|
|
1725
1090
|
{
|
|
1726
|
-
label:
|
|
1091
|
+
label: l("gateway_services.form.fields.protocol.options.grpc"),
|
|
1727
1092
|
value: "grpc",
|
|
1728
1093
|
group: "grpc"
|
|
1729
1094
|
},
|
|
1730
1095
|
{
|
|
1731
|
-
label:
|
|
1096
|
+
label: l("gateway_services.form.fields.protocol.options.grpcs"),
|
|
1732
1097
|
value: "grpcs",
|
|
1733
1098
|
group: "grpc"
|
|
1734
1099
|
},
|
|
1735
|
-
...
|
|
1100
|
+
...se ? [
|
|
1736
1101
|
{
|
|
1737
|
-
label:
|
|
1102
|
+
label: l("gateway_services.form.fields.protocol.options.ws"),
|
|
1738
1103
|
value: "ws",
|
|
1739
1104
|
group: "websocket"
|
|
1740
1105
|
},
|
|
1741
1106
|
{
|
|
1742
|
-
label:
|
|
1107
|
+
label: l("gateway_services.form.fields.protocol.options.wss"),
|
|
1743
1108
|
value: "wss",
|
|
1744
1109
|
group: "websocket"
|
|
1745
1110
|
}
|
|
1746
1111
|
] : [],
|
|
1747
1112
|
{
|
|
1748
|
-
label:
|
|
1113
|
+
label: l("gateway_services.form.fields.protocol.options.udp"),
|
|
1749
1114
|
value: "udp",
|
|
1750
1115
|
group: "udp"
|
|
1751
1116
|
}
|
|
1752
|
-
],
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1755
|
-
e.fields.host =
|
|
1756
|
-
},
|
|
1757
|
-
|
|
1758
|
-
},
|
|
1759
|
-
switch (
|
|
1117
|
+
], te = { url: "url", protocol: "protocol" }, Ae = (t, r) => {
|
|
1118
|
+
r.value;
|
|
1119
|
+
}, W = (t) => t ? parseFloat(t) : 0, me = () => {
|
|
1120
|
+
e.fields.host = C.host, e.fields.path = C.path, e.fields.port = C.port, e.fields.protocol = C.protocol, e.fields.url = C.url, e.fields.retries = C.retries, e.fields.connect_timeout = C.connect_timeout, e.fields.write_timeout = C.write_timeout, e.fields.read_timeout = C.read_timeout, e.fields.client_certificate = C.client_certificate, e.fields.ca_certificates = C.ca_certificates, e.fields.tls_verify_enabled = C.tls_verify_enabled, e.fields.tls_verify_value = C.tls_verify_value, e.fields.enabled = C.enabled;
|
|
1121
|
+
}, ve = () => {
|
|
1122
|
+
g.value = !0, O(), e.errorMessages = [], me();
|
|
1123
|
+
}, ge = () => {
|
|
1124
|
+
switch (me(), e.fields.name = `${q.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, E.value) {
|
|
1760
1125
|
case "url":
|
|
1761
|
-
e.fields.url = `${
|
|
1126
|
+
e.fields.url = `${q.protocol}://${q.host}${q.path}`;
|
|
1762
1127
|
break;
|
|
1763
1128
|
case "protocol":
|
|
1764
|
-
e.fields.host =
|
|
1129
|
+
e.fields.host = q.host, e.fields.path = q.path, e.fields.protocol = q.protocol, e.fields.port = q.port;
|
|
1765
1130
|
break;
|
|
1766
1131
|
default:
|
|
1767
|
-
e.fields.url = `${
|
|
1132
|
+
e.fields.url = `${q.protocol}://${q.host}${q.path}`;
|
|
1768
1133
|
}
|
|
1769
|
-
},
|
|
1770
|
-
if (
|
|
1134
|
+
}, ye = () => {
|
|
1135
|
+
if (O(), e.fields.url.length)
|
|
1771
1136
|
try {
|
|
1772
|
-
const t = new URL(e.fields.url),
|
|
1773
|
-
if (
|
|
1137
|
+
const t = new URL(e.fields.url), r = Se(t.protocol, U);
|
|
1138
|
+
if (r) throw new Error(r);
|
|
1774
1139
|
e.fields.protocol = t.protocol.slice(0, -1);
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1140
|
+
const _ = fe(t.hostname);
|
|
1141
|
+
if (_) throw new Error(_);
|
|
1777
1142
|
e.fields.host = t.hostname;
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1143
|
+
const A = ie(t.pathname);
|
|
1144
|
+
if (A) throw new Error(A);
|
|
1780
1145
|
e.fields.path = t.pathname;
|
|
1781
|
-
const
|
|
1782
|
-
if (
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1146
|
+
const h = pe(t.port);
|
|
1147
|
+
if (h) throw new Error(h);
|
|
1148
|
+
const w = Number(t.port);
|
|
1149
|
+
Pe.value = !!w, e.fields.port = w || Z.getPortFromProtocol(e.fields.protocol), n("url-valid:success");
|
|
1785
1150
|
} catch {
|
|
1786
|
-
|
|
1151
|
+
n("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
|
|
1787
1152
|
}
|
|
1788
|
-
},
|
|
1789
|
-
|
|
1790
|
-
},
|
|
1153
|
+
}, _e = (t) => {
|
|
1154
|
+
O(t);
|
|
1155
|
+
}, $e = b(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), J = (t) => {
|
|
1791
1156
|
if (e.errorMessages.length) return "";
|
|
1792
|
-
const
|
|
1793
|
-
return
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
},
|
|
1157
|
+
const r = e.formFieldErrors;
|
|
1158
|
+
return r[t] ? r[t] : "";
|
|
1159
|
+
}, x = (t) => {
|
|
1160
|
+
O(t ?? void 0);
|
|
1161
|
+
const r = fe(e.fields.host);
|
|
1162
|
+
r && (e.formFieldErrors.host = r);
|
|
1163
|
+
const _ = ie(e.fields.path);
|
|
1164
|
+
_ && (e.formFieldErrors.path = _);
|
|
1165
|
+
const A = pe(e.fields.port);
|
|
1166
|
+
A && (e.formFieldErrors.port = A), Q.value ? n("url-valid:success") : n("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
|
|
1167
|
+
}, O = (t) => {
|
|
1803
1168
|
if (t)
|
|
1804
1169
|
e.formFieldErrors[t] = "";
|
|
1805
1170
|
else
|
|
1806
|
-
for (let
|
|
1807
|
-
e.formFieldErrors[
|
|
1171
|
+
for (let r in e.formFieldErrors)
|
|
1172
|
+
e.formFieldErrors[r] = "";
|
|
1808
1173
|
e.errorMessages = [];
|
|
1809
|
-
},
|
|
1174
|
+
}, Q = b(() => {
|
|
1810
1175
|
for (let t in e.formFieldErrors)
|
|
1811
1176
|
if (e.formFieldErrors[t].length)
|
|
1812
1177
|
return !1;
|
|
1813
1178
|
return !0;
|
|
1814
|
-
}),
|
|
1815
|
-
e.fields.url &&
|
|
1816
|
-
},
|
|
1817
|
-
if (
|
|
1179
|
+
}), ae = () => {
|
|
1180
|
+
e.fields.url && E.value === "url" ? ye() : x();
|
|
1181
|
+
}, Te = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, he = b(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), be = b(() => {
|
|
1182
|
+
if (E.value === "url")
|
|
1818
1183
|
return !0;
|
|
1819
1184
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1820
|
-
return
|
|
1821
|
-
}),
|
|
1822
|
-
if (
|
|
1185
|
+
return E.value === "protocol" && t;
|
|
1186
|
+
}), Ue = b(() => {
|
|
1187
|
+
if (E.value === "url")
|
|
1823
1188
|
return !0;
|
|
1824
1189
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
1825
|
-
return
|
|
1826
|
-
}),
|
|
1827
|
-
if (
|
|
1190
|
+
return E.value === "protocol" && t;
|
|
1191
|
+
}), Re = b(() => {
|
|
1192
|
+
if (E.value === "url")
|
|
1828
1193
|
return !0;
|
|
1829
1194
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1830
|
-
return
|
|
1831
|
-
}),
|
|
1832
|
-
|
|
1833
|
-
},
|
|
1834
|
-
const t = !
|
|
1835
|
-
return t && (
|
|
1836
|
-
}),
|
|
1837
|
-
var
|
|
1838
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((
|
|
1839
|
-
},
|
|
1840
|
-
|
|
1841
|
-
},
|
|
1842
|
-
var
|
|
1843
|
-
let t = `${a.config.apiBaseUrl}${
|
|
1844
|
-
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((
|
|
1845
|
-
}),
|
|
1846
|
-
var
|
|
1847
|
-
let t = `${a.config.apiBaseUrl}${
|
|
1848
|
-
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((
|
|
1849
|
-
}),
|
|
1850
|
-
let
|
|
1851
|
-
t.url && (
|
|
1852
|
-
},
|
|
1853
|
-
var
|
|
1195
|
+
return E.value === "protocol" && t;
|
|
1196
|
+
}), ne = (t) => {
|
|
1197
|
+
O("name"), le.value = Ee.utf8Name(t);
|
|
1198
|
+
}, oe = b(() => {
|
|
1199
|
+
const t = !H.value || !ee(e.fields, C), r = E.value === "url" && !!e.fields.url && Q.value, _ = E.value === "protocol" && !!e.fields.host && Q.value;
|
|
1200
|
+
return t && (r || _);
|
|
1201
|
+
}), u = (t) => {
|
|
1202
|
+
var r, _, A;
|
|
1203
|
+
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 = ((_ = t == null ? void 0 : t.ca_certificates) == null ? void 0 : _.join(",")) || "", e.fields.client_certificate = ((A = t == null ? void 0 : t.client_certificate) == null ? void 0 : A.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(C, e.fields);
|
|
1204
|
+
}, v = () => {
|
|
1205
|
+
$.push(a.config.cancelRoute);
|
|
1206
|
+
}, y = b(() => {
|
|
1207
|
+
var r, _;
|
|
1208
|
+
let t = `${a.config.apiBaseUrl}${ue.form[a.config.app].validate}`;
|
|
1209
|
+
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, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1210
|
+
}), S = b(() => {
|
|
1211
|
+
var r, _;
|
|
1212
|
+
let t = `${a.config.apiBaseUrl}${ue.form[a.config.app][B.value]}`;
|
|
1213
|
+
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, (_ = a.config) != null && _.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1214
|
+
}), j = (t) => {
|
|
1215
|
+
let r = "";
|
|
1216
|
+
t.url && (r = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(r)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
1217
|
+
}, F = b(() => {
|
|
1218
|
+
var r, _, A, h;
|
|
1854
1219
|
const t = {
|
|
1855
1220
|
name: e.fields.name || null,
|
|
1856
|
-
tags: e.fields.tags ? (
|
|
1221
|
+
tags: e.fields.tags ? (A = (_ = (r = e.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : _.map((w) => String(w || "").trim())) == null ? void 0 : A.filter((w) => w !== "") : null,
|
|
1857
1222
|
protocol: e.fields.protocol,
|
|
1858
1223
|
path: e.fields.path || null,
|
|
1859
1224
|
read_timeout: e.fields.read_timeout,
|
|
@@ -1862,140 +1227,140 @@ const se = {
|
|
|
1862
1227
|
connect_timeout: e.fields.connect_timeout,
|
|
1863
1228
|
tls_verify_value: e.fields.tls_verify_value,
|
|
1864
1229
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
1865
|
-
ca_certificates: e.fields.ca_certificates ? (
|
|
1230
|
+
ca_certificates: e.fields.ca_certificates ? (h = e.fields.ca_certificates) == null ? void 0 : h.split(",").filter((w) => w !== "") : null,
|
|
1866
1231
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1867
1232
|
write_timeout: e.fields.write_timeout,
|
|
1868
1233
|
port: e.fields.port,
|
|
1869
1234
|
url: e.fields.url,
|
|
1870
1235
|
enabled: e.fields.enabled
|
|
1871
1236
|
};
|
|
1872
|
-
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),
|
|
1873
|
-
}),
|
|
1874
|
-
var t,
|
|
1237
|
+
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), B.value === "create" ? E.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : B.value === "edit" && delete t.url, t;
|
|
1238
|
+
}), z = async () => {
|
|
1239
|
+
var t, r, _, A;
|
|
1875
1240
|
try {
|
|
1876
1241
|
e.isReadonly = !0;
|
|
1877
|
-
const
|
|
1878
|
-
|
|
1879
|
-
let
|
|
1880
|
-
if (await
|
|
1881
|
-
const { data:
|
|
1882
|
-
e.fields.name = (
|
|
1242
|
+
const h = F.value;
|
|
1243
|
+
j(h);
|
|
1244
|
+
let w;
|
|
1245
|
+
if (await P.post(y.value, h), B.value === "create" ? w = await P.post(S.value, h) : B.value === "edit" && (w = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await P.put(S.value, h) : await P.patch(S.value, h)), w) {
|
|
1246
|
+
const { data: i } = w;
|
|
1247
|
+
e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || Z.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 = (_ = i == null ? void 0 : i.ca_certificates) != null && _.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 = (A = i == null ? void 0 : i.tags) != null && A.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(C, e.fields), n("update", w == null ? void 0 : w.data);
|
|
1883
1248
|
}
|
|
1884
|
-
return
|
|
1885
|
-
} catch (
|
|
1886
|
-
const { fields:
|
|
1887
|
-
e.errorMessages =
|
|
1888
|
-
const
|
|
1889
|
-
|
|
1249
|
+
return w;
|
|
1250
|
+
} catch (h) {
|
|
1251
|
+
const { fields: w, messages: i } = M(h);
|
|
1252
|
+
e.errorMessages = i, w.length && w.forEach((X) => {
|
|
1253
|
+
const re = X.field;
|
|
1254
|
+
re === "client_certificate.id" ? e.formFieldErrors.client_certificate = X.message : re.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = X.message : Object.keys(e.formFieldErrors).includes(re) && (e.formFieldErrors = {
|
|
1890
1255
|
...e.formFieldErrors,
|
|
1891
|
-
[
|
|
1256
|
+
[re]: X.message
|
|
1892
1257
|
});
|
|
1893
|
-
}),
|
|
1258
|
+
}), n("error", h);
|
|
1894
1259
|
} finally {
|
|
1895
1260
|
e.isReadonly = !1;
|
|
1896
1261
|
}
|
|
1897
1262
|
};
|
|
1898
|
-
return
|
|
1899
|
-
Object.assign(e.fields,
|
|
1900
|
-
}),
|
|
1901
|
-
e.fields.port =
|
|
1902
|
-
}),
|
|
1903
|
-
|
|
1904
|
-
}),
|
|
1905
|
-
validateUrl:
|
|
1906
|
-
getPayload:
|
|
1907
|
-
saveFormData:
|
|
1908
|
-
canSubmit:
|
|
1909
|
-
initForm:
|
|
1910
|
-
}), (t,
|
|
1911
|
-
const
|
|
1912
|
-
return
|
|
1913
|
-
|
|
1914
|
-
"can-submit":
|
|
1915
|
-
config:
|
|
1916
|
-
"edit-id":
|
|
1917
|
-
"entity-type":
|
|
1918
|
-
"fetch-url":
|
|
1919
|
-
"form-fields":
|
|
1263
|
+
return Be(() => a.gatewayServiceId, () => {
|
|
1264
|
+
Object.assign(e.fields, C);
|
|
1265
|
+
}), Be(e.fields, (t) => {
|
|
1266
|
+
e.fields.port = Z.getPortFromProtocol(t.protocol, String(t.port)), n("model-updated", F.value);
|
|
1267
|
+
}), Je(() => {
|
|
1268
|
+
n("model-updated", F.value), H.value || (e.fields.name = Te());
|
|
1269
|
+
}), G({
|
|
1270
|
+
validateUrl: ae,
|
|
1271
|
+
getPayload: F,
|
|
1272
|
+
saveFormData: z,
|
|
1273
|
+
canSubmit: oe,
|
|
1274
|
+
initForm: u
|
|
1275
|
+
}), (t, r) => {
|
|
1276
|
+
const _ = L("KRadio"), A = L("KButton"), h = L("KInput"), w = L("KSelect"), i = L("KCheckbox"), X = L("KCollapse"), re = L("KAlert");
|
|
1277
|
+
return V(), T("div", Kt, [
|
|
1278
|
+
c(o(bt), {
|
|
1279
|
+
"can-submit": oe.value,
|
|
1280
|
+
config: s.config,
|
|
1281
|
+
"edit-id": s.gatewayServiceId,
|
|
1282
|
+
"entity-type": o(ze).GatewayService,
|
|
1283
|
+
"fetch-url": Ie.value,
|
|
1284
|
+
"form-fields": F.value,
|
|
1920
1285
|
"is-readonly": e.isReadonly,
|
|
1921
|
-
onCancel:
|
|
1922
|
-
"onFetch:error":
|
|
1923
|
-
"onFetch:success":
|
|
1924
|
-
onLoading:
|
|
1925
|
-
onSubmit:
|
|
1286
|
+
onCancel: v,
|
|
1287
|
+
"onFetch:error": r[30] || (r[30] = (f) => t.$emit("error", f)),
|
|
1288
|
+
"onFetch:success": u,
|
|
1289
|
+
onLoading: r[31] || (r[31] = (f) => t.$emit("loading", f)),
|
|
1290
|
+
onSubmit: z
|
|
1926
1291
|
}, {
|
|
1927
|
-
"form-actions":
|
|
1928
|
-
|
|
1929
|
-
canSubmit:
|
|
1930
|
-
cancel:
|
|
1931
|
-
submit:
|
|
1292
|
+
"form-actions": d(() => [
|
|
1293
|
+
Qe(t.$slots, "form-actions", {
|
|
1294
|
+
canSubmit: oe.value,
|
|
1295
|
+
cancel: v,
|
|
1296
|
+
submit: z
|
|
1932
1297
|
}, void 0, !0)
|
|
1933
1298
|
]),
|
|
1934
|
-
default:
|
|
1935
|
-
|
|
1936
|
-
description: l
|
|
1937
|
-
"hide-info-header":
|
|
1938
|
-
title: l
|
|
1299
|
+
default: d(() => [
|
|
1300
|
+
c(o(Ne), {
|
|
1301
|
+
description: o(l)("gateway_services.form.sections.keys.description"),
|
|
1302
|
+
"hide-info-header": s.hideSectionsInfo,
|
|
1303
|
+
title: o(l)("gateway_services.form.sections.keys.title")
|
|
1939
1304
|
}, {
|
|
1940
|
-
default:
|
|
1941
|
-
|
|
1942
|
-
I("div",
|
|
1943
|
-
|
|
1944
|
-
modelValue:
|
|
1945
|
-
"onUpdate:modelValue":
|
|
1305
|
+
default: d(() => [
|
|
1306
|
+
H.value ? D("", !0) : (V(), T("div", Lt, [
|
|
1307
|
+
I("div", qt, [
|
|
1308
|
+
c(_, {
|
|
1309
|
+
modelValue: E.value,
|
|
1310
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => E.value = f),
|
|
1946
1311
|
card: "",
|
|
1947
1312
|
"card-orientation": "horizontal",
|
|
1948
1313
|
"data-testid": "gateway-service-url-radio",
|
|
1949
|
-
description: l
|
|
1950
|
-
label: l
|
|
1951
|
-
"selected-value":
|
|
1952
|
-
onChange:
|
|
1314
|
+
description: o(l)("gateway_services.form.sections.keys.url.description"),
|
|
1315
|
+
label: o(l)("gateway_services.form.sections.keys.url.label"),
|
|
1316
|
+
"selected-value": te.url,
|
|
1317
|
+
onChange: ve
|
|
1953
1318
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1954
|
-
|
|
1955
|
-
modelValue:
|
|
1956
|
-
"onUpdate:modelValue":
|
|
1319
|
+
c(_, {
|
|
1320
|
+
modelValue: E.value,
|
|
1321
|
+
"onUpdate:modelValue": r[1] || (r[1] = (f) => E.value = f),
|
|
1957
1322
|
card: "",
|
|
1958
1323
|
"card-orientation": "horizontal",
|
|
1959
1324
|
"checked-group": "protocol",
|
|
1960
1325
|
"data-testid": "gateway-service-protocol-radio",
|
|
1961
|
-
description: l
|
|
1962
|
-
label: l
|
|
1963
|
-
"selected-value":
|
|
1964
|
-
onChange:
|
|
1326
|
+
description: o(l)("gateway_services.form.sections.keys.protocol.description"),
|
|
1327
|
+
label: o(l)("gateway_services.form.sections.keys.protocol.label"),
|
|
1328
|
+
"selected-value": te.protocol,
|
|
1329
|
+
onChange: ve
|
|
1965
1330
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1966
1331
|
]),
|
|
1967
|
-
|
|
1968
|
-
default:
|
|
1969
|
-
|
|
1970
|
-
|
|
1332
|
+
c(Me, { name: "slide-fade" }, {
|
|
1333
|
+
default: d(() => [
|
|
1334
|
+
E.value === "url" ? (V(), T("div", Gt, [
|
|
1335
|
+
c(h, {
|
|
1971
1336
|
modelValue: e.fields.url,
|
|
1972
|
-
"onUpdate:modelValue":
|
|
1337
|
+
"onUpdate:modelValue": r[2] || (r[2] = (f) => e.fields.url = f),
|
|
1973
1338
|
modelModifiers: { trim: !0 },
|
|
1974
1339
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1975
1340
|
"data-testid": "gateway-service-url-input",
|
|
1976
|
-
error:
|
|
1977
|
-
"error-message":
|
|
1978
|
-
label: l
|
|
1341
|
+
error: $e.value,
|
|
1342
|
+
"error-message": J("url"),
|
|
1343
|
+
label: o(l)("gateway_services.form.fields.upstream_url.label"),
|
|
1979
1344
|
"label-attributes": {
|
|
1980
|
-
info:
|
|
1345
|
+
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"),
|
|
1981
1346
|
tooltipAttributes: { maxWidth: "400" }
|
|
1982
1347
|
},
|
|
1983
1348
|
name: "url",
|
|
1984
|
-
placeholder: l
|
|
1349
|
+
placeholder: o(l)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1985
1350
|
required: "",
|
|
1986
|
-
onInput:
|
|
1987
|
-
},
|
|
1988
|
-
|
|
1351
|
+
onInput: ye
|
|
1352
|
+
}, Ce({ _: 2 }, [
|
|
1353
|
+
s.hideTrySampleApiButton ? void 0 : {
|
|
1989
1354
|
name: "after",
|
|
1990
|
-
fn:
|
|
1991
|
-
|
|
1355
|
+
fn: d(() => [
|
|
1356
|
+
c(A, {
|
|
1992
1357
|
appearance: "tertiary",
|
|
1993
1358
|
"data-testid": "try-sample-api",
|
|
1994
1359
|
size: "small",
|
|
1995
|
-
onClick:
|
|
1360
|
+
onClick: ge
|
|
1996
1361
|
}, {
|
|
1997
|
-
default:
|
|
1998
|
-
|
|
1362
|
+
default: d(() => [
|
|
1363
|
+
K(k(o(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
1999
1364
|
]),
|
|
2000
1365
|
_: 1
|
|
2001
1366
|
})
|
|
@@ -2003,57 +1368,57 @@ const se = {
|
|
|
2003
1368
|
key: "0"
|
|
2004
1369
|
}
|
|
2005
1370
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2006
|
-
])) :
|
|
1371
|
+
])) : D("", !0)
|
|
2007
1372
|
]),
|
|
2008
1373
|
_: 1
|
|
2009
1374
|
})
|
|
2010
1375
|
])),
|
|
2011
|
-
|
|
2012
|
-
default:
|
|
2013
|
-
|
|
2014
|
-
|
|
1376
|
+
c(Me, { name: "slide-fade" }, {
|
|
1377
|
+
default: d(() => [
|
|
1378
|
+
E.value === "protocol" || H.value ? (V(), T("div", Nt, [
|
|
1379
|
+
c(w, {
|
|
2015
1380
|
modelValue: e.fields.protocol,
|
|
2016
|
-
"onUpdate:modelValue":
|
|
1381
|
+
"onUpdate:modelValue": r[3] || (r[3] = (f) => e.fields.protocol = f),
|
|
2017
1382
|
"data-testid": "gateway-service-protocol-select",
|
|
2018
|
-
items:
|
|
2019
|
-
label: l
|
|
1383
|
+
items: U,
|
|
1384
|
+
label: o(l)("gateway_services.form.fields.protocol.label"),
|
|
2020
1385
|
"label-attributes": {
|
|
2021
|
-
info: l
|
|
1386
|
+
info: o(l)("gateway_services.form.fields.protocol.tooltip"),
|
|
2022
1387
|
tooltipAttributes: { maxWidth: "400" }
|
|
2023
1388
|
},
|
|
2024
1389
|
readonly: e.isReadonly,
|
|
2025
1390
|
required: "",
|
|
2026
1391
|
width: "100%",
|
|
2027
|
-
onSelected:
|
|
1392
|
+
onSelected: r[4] || (r[4] = (f) => Ae(e.fields.protocol, f))
|
|
2028
1393
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2029
|
-
|
|
1394
|
+
c(h, {
|
|
2030
1395
|
modelValue: e.fields.host,
|
|
2031
|
-
"onUpdate:modelValue":
|
|
1396
|
+
"onUpdate:modelValue": r[5] || (r[5] = (f) => e.fields.host = f),
|
|
2032
1397
|
modelModifiers: { trim: !0 },
|
|
2033
1398
|
class: "gateway-service-form-margin-top",
|
|
2034
1399
|
"data-testid": "gateway-service-host-input",
|
|
2035
1400
|
error: !!e.formFieldErrors.host,
|
|
2036
|
-
"error-message":
|
|
2037
|
-
label: l
|
|
1401
|
+
"error-message": J("host"),
|
|
1402
|
+
label: o(l)("gateway_services.form.fields.host.label"),
|
|
2038
1403
|
"label-attributes": {
|
|
2039
|
-
info: l
|
|
1404
|
+
info: o(l)("gateway_services.form.fields.host.tooltip"),
|
|
2040
1405
|
tooltipAttributes: { maxWidth: "400" }
|
|
2041
1406
|
},
|
|
2042
1407
|
name: "host",
|
|
2043
|
-
placeholder: l
|
|
1408
|
+
placeholder: o(l)("gateway_services.form.fields.host.placeholder"),
|
|
2044
1409
|
required: "",
|
|
2045
|
-
onInput:
|
|
2046
|
-
},
|
|
2047
|
-
|
|
1410
|
+
onInput: r[6] || (r[6] = (f) => x("host"))
|
|
1411
|
+
}, Ce({ _: 2 }, [
|
|
1412
|
+
s.hideTrySampleApiButton ? void 0 : {
|
|
2048
1413
|
name: "after",
|
|
2049
|
-
fn:
|
|
2050
|
-
|
|
1414
|
+
fn: d(() => [
|
|
1415
|
+
c(A, {
|
|
2051
1416
|
appearance: "tertiary",
|
|
2052
1417
|
size: "small",
|
|
2053
|
-
onClick:
|
|
1418
|
+
onClick: ge
|
|
2054
1419
|
}, {
|
|
2055
|
-
default:
|
|
2056
|
-
|
|
1420
|
+
default: d(() => [
|
|
1421
|
+
K(k(o(l)("gateway_services.form.buttons.try_sample")), 1)
|
|
2057
1422
|
]),
|
|
2058
1423
|
_: 1
|
|
2059
1424
|
})
|
|
@@ -2061,75 +1426,75 @@ const se = {
|
|
|
2061
1426
|
key: "0"
|
|
2062
1427
|
}
|
|
2063
1428
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
2064
|
-
|
|
2065
|
-
|
|
1429
|
+
he.value ? (V(), T("div", Ot, [
|
|
1430
|
+
c(h, {
|
|
2066
1431
|
modelValue: e.fields.path,
|
|
2067
|
-
"onUpdate:modelValue":
|
|
1432
|
+
"onUpdate:modelValue": r[7] || (r[7] = (f) => e.fields.path = f),
|
|
2068
1433
|
modelModifiers: { trim: !0 },
|
|
2069
1434
|
class: "gateway-service-form-margin-top",
|
|
2070
1435
|
"data-testid": "gateway-service-path-input",
|
|
2071
1436
|
error: !!e.formFieldErrors.path,
|
|
2072
|
-
"error-message":
|
|
2073
|
-
label: l
|
|
1437
|
+
"error-message": J("path"),
|
|
1438
|
+
label: o(l)("gateway_services.form.fields.path.label"),
|
|
2074
1439
|
"label-attributes": {
|
|
2075
|
-
info: l
|
|
1440
|
+
info: o(l)("gateway_services.form.fields.path.tooltip"),
|
|
2076
1441
|
tooltipAttributes: { maxWidth: "400" }
|
|
2077
1442
|
},
|
|
2078
1443
|
name: "path",
|
|
2079
|
-
placeholder: l
|
|
2080
|
-
onInput:
|
|
1444
|
+
placeholder: o(l)("gateway_services.form.fields.path.placeholder"),
|
|
1445
|
+
onInput: r[8] || (r[8] = (f) => x("path"))
|
|
2081
1446
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2082
|
-
])) :
|
|
2083
|
-
|
|
1447
|
+
])) : D("", !0),
|
|
1448
|
+
c(h, {
|
|
2084
1449
|
modelValue: e.fields.port,
|
|
2085
1450
|
"onUpdate:modelValue": [
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
e.fields.port =
|
|
1451
|
+
r[9] || (r[9] = (f) => e.fields.port = f),
|
|
1452
|
+
r[11] || (r[11] = () => {
|
|
1453
|
+
e.fields.port = W(e.fields.port + "");
|
|
2089
1454
|
})
|
|
2090
1455
|
],
|
|
2091
1456
|
class: "gateway-service-form-margin-top",
|
|
2092
1457
|
"data-testid": "gateway-service-port-input",
|
|
2093
1458
|
error: !!e.formFieldErrors.port,
|
|
2094
|
-
"error-message":
|
|
2095
|
-
label: l
|
|
1459
|
+
"error-message": J("port"),
|
|
1460
|
+
label: o(l)("gateway_services.form.fields.port.label"),
|
|
2096
1461
|
"label-attributes": {
|
|
2097
|
-
info: l
|
|
1462
|
+
info: o(l)("gateway_services.form.fields.port.tooltip"),
|
|
2098
1463
|
tooltipAttributes: { maxWidth: "400" }
|
|
2099
1464
|
},
|
|
2100
1465
|
name: "port",
|
|
2101
1466
|
type: "number",
|
|
2102
|
-
onInput:
|
|
1467
|
+
onInput: r[10] || (r[10] = (f) => x("port"))
|
|
2103
1468
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
2104
|
-
])) :
|
|
1469
|
+
])) : D("", !0)
|
|
2105
1470
|
]),
|
|
2106
1471
|
_: 1
|
|
2107
1472
|
}),
|
|
2108
|
-
|
|
2109
|
-
modelValue:
|
|
2110
|
-
"onUpdate:modelValue":
|
|
1473
|
+
c(X, {
|
|
1474
|
+
modelValue: g.value,
|
|
1475
|
+
"onUpdate:modelValue": r[27] || (r[27] = (f) => g.value = f),
|
|
2111
1476
|
"data-testid": "advanced-fields-collapse",
|
|
2112
1477
|
"trigger-alignment": "leading",
|
|
2113
|
-
"trigger-label": l
|
|
1478
|
+
"trigger-label": o(l)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
2114
1479
|
}, {
|
|
2115
|
-
default:
|
|
2116
|
-
|
|
2117
|
-
default:
|
|
2118
|
-
|
|
2119
|
-
I("div",
|
|
2120
|
-
|
|
1480
|
+
default: d(() => [
|
|
1481
|
+
c(Me, { name: "slide-fade" }, {
|
|
1482
|
+
default: d(() => [
|
|
1483
|
+
g.value ? D("", !0) : (V(), T("div", Wt, [
|
|
1484
|
+
I("div", jt, [
|
|
1485
|
+
c(h, {
|
|
2121
1486
|
modelValue: e.fields.retries,
|
|
2122
1487
|
"onUpdate:modelValue": [
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
e.fields.retries =
|
|
1488
|
+
r[12] || (r[12] = (f) => e.fields.retries = f),
|
|
1489
|
+
r[13] || (r[13] = () => {
|
|
1490
|
+
e.fields.retries = W(e.fields.retries + "");
|
|
2126
1491
|
})
|
|
2127
1492
|
],
|
|
2128
1493
|
autocomplete: "off",
|
|
2129
1494
|
"data-testid": "gateway-service-retries-input",
|
|
2130
|
-
label: l
|
|
1495
|
+
label: o(l)("gateway_services.form.fields.retries.label"),
|
|
2131
1496
|
"label-attributes": {
|
|
2132
|
-
info: l
|
|
1497
|
+
info: o(l)("gateway_services.form.fields.retries.tooltip"),
|
|
2133
1498
|
tooltipAttributes: { maxWidth: "400" }
|
|
2134
1499
|
},
|
|
2135
1500
|
name: "retries",
|
|
@@ -2137,20 +1502,20 @@ const se = {
|
|
|
2137
1502
|
type: "number"
|
|
2138
1503
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2139
1504
|
]),
|
|
2140
|
-
I("div",
|
|
2141
|
-
|
|
1505
|
+
I("div", zt, [
|
|
1506
|
+
c(h, {
|
|
2142
1507
|
modelValue: e.fields.connect_timeout,
|
|
2143
1508
|
"onUpdate:modelValue": [
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
e.fields.connect_timeout =
|
|
1509
|
+
r[14] || (r[14] = (f) => e.fields.connect_timeout = f),
|
|
1510
|
+
r[15] || (r[15] = () => {
|
|
1511
|
+
e.fields.connect_timeout = W(e.fields.connect_timeout + "");
|
|
2147
1512
|
})
|
|
2148
1513
|
],
|
|
2149
1514
|
autocomplete: "off",
|
|
2150
1515
|
"data-testid": "gateway-service-connTimeout-input",
|
|
2151
|
-
label: l
|
|
1516
|
+
label: o(l)("gateway_services.form.fields.connect_timeout.label"),
|
|
2152
1517
|
"label-attributes": {
|
|
2153
|
-
info: l
|
|
1518
|
+
info: o(l)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
2154
1519
|
tooltipAttributes: { maxWidth: "400" }
|
|
2155
1520
|
},
|
|
2156
1521
|
name: "connTimeout",
|
|
@@ -2158,20 +1523,20 @@ const se = {
|
|
|
2158
1523
|
type: "number"
|
|
2159
1524
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2160
1525
|
]),
|
|
2161
|
-
I("div",
|
|
2162
|
-
|
|
1526
|
+
I("div", Ht, [
|
|
1527
|
+
c(h, {
|
|
2163
1528
|
modelValue: e.fields.write_timeout,
|
|
2164
1529
|
"onUpdate:modelValue": [
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
e.fields.write_timeout =
|
|
1530
|
+
r[16] || (r[16] = (f) => e.fields.write_timeout = f),
|
|
1531
|
+
r[17] || (r[17] = () => {
|
|
1532
|
+
e.fields.write_timeout = W(e.fields.write_timeout + "");
|
|
2168
1533
|
})
|
|
2169
1534
|
],
|
|
2170
1535
|
autocomplete: "off",
|
|
2171
1536
|
"data-testid": "gateway-service-writeTimeout-input",
|
|
2172
|
-
label: l
|
|
1537
|
+
label: o(l)("gateway_services.form.fields.write_timeout.label"),
|
|
2173
1538
|
"label-attributes": {
|
|
2174
|
-
info: l
|
|
1539
|
+
info: o(l)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
2175
1540
|
tooltipAttributes: { maxWidth: "400" }
|
|
2176
1541
|
},
|
|
2177
1542
|
name: "writeTimeout",
|
|
@@ -2179,20 +1544,20 @@ const se = {
|
|
|
2179
1544
|
type: "number"
|
|
2180
1545
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2181
1546
|
]),
|
|
2182
|
-
I("div",
|
|
2183
|
-
|
|
1547
|
+
I("div", Zt, [
|
|
1548
|
+
c(h, {
|
|
2184
1549
|
modelValue: e.fields.read_timeout,
|
|
2185
1550
|
"onUpdate:modelValue": [
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
e.fields.read_timeout =
|
|
1551
|
+
r[18] || (r[18] = (f) => e.fields.read_timeout = f),
|
|
1552
|
+
r[19] || (r[19] = () => {
|
|
1553
|
+
e.fields.read_timeout = W(e.fields.read_timeout + "");
|
|
2189
1554
|
})
|
|
2190
1555
|
],
|
|
2191
1556
|
autocomplete: "off",
|
|
2192
1557
|
"data-testid": "gateway-service-readTimeout-input",
|
|
2193
|
-
label: l
|
|
1558
|
+
label: o(l)("gateway_services.form.fields.read_timeout.label"),
|
|
2194
1559
|
"label-attributes": {
|
|
2195
|
-
info: l
|
|
1560
|
+
info: o(l)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
2196
1561
|
tooltipAttributes: { maxWidth: "400" }
|
|
2197
1562
|
},
|
|
2198
1563
|
name: "readTimeout",
|
|
@@ -2200,99 +1565,99 @@ const se = {
|
|
|
2200
1565
|
type: "number"
|
|
2201
1566
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2202
1567
|
]),
|
|
2203
|
-
|
|
2204
|
-
|
|
1568
|
+
be.value ? (V(), T("div", Jt, [
|
|
1569
|
+
c(h, {
|
|
2205
1570
|
modelValue: e.fields.client_certificate,
|
|
2206
|
-
"onUpdate:modelValue":
|
|
1571
|
+
"onUpdate:modelValue": r[20] || (r[20] = (f) => e.fields.client_certificate = f),
|
|
2207
1572
|
modelModifiers: { trim: !0 },
|
|
2208
1573
|
autocomplete: "off",
|
|
2209
1574
|
"data-testid": "gateway-service-clientCert-input",
|
|
2210
1575
|
error: !!e.formFieldErrors.client_certificate,
|
|
2211
|
-
label: l
|
|
1576
|
+
label: o(l)("gateway_services.form.fields.client_certificate.label"),
|
|
2212
1577
|
"label-attributes": {
|
|
2213
|
-
info: l
|
|
1578
|
+
info: o(l)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
2214
1579
|
tooltipAttributes: { maxWidth: "400" }
|
|
2215
1580
|
},
|
|
2216
1581
|
name: "clientCert",
|
|
2217
|
-
placeholder: l
|
|
1582
|
+
placeholder: o(l)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
2218
1583
|
readonly: e.isReadonly,
|
|
2219
1584
|
type: "text",
|
|
2220
|
-
onInput:
|
|
1585
|
+
onInput: r[21] || (r[21] = (f) => _e("client_certificate"))
|
|
2221
1586
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
2222
|
-
])) :
|
|
2223
|
-
|
|
2224
|
-
|
|
1587
|
+
])) : D("", !0),
|
|
1588
|
+
Ue.value ? (V(), T("div", Qt, [
|
|
1589
|
+
c(h, {
|
|
2225
1590
|
modelValue: e.fields.ca_certificates,
|
|
2226
|
-
"onUpdate:modelValue":
|
|
1591
|
+
"onUpdate:modelValue": r[22] || (r[22] = (f) => e.fields.ca_certificates = f),
|
|
2227
1592
|
modelModifiers: { trim: !0 },
|
|
2228
1593
|
autocomplete: "off",
|
|
2229
1594
|
"data-testid": "gateway-service-ca-certs-input",
|
|
2230
1595
|
error: !!e.formFieldErrors.ca_certificates,
|
|
2231
|
-
label: l
|
|
1596
|
+
label: o(l)("gateway_services.form.fields.ca_certificates.label"),
|
|
2232
1597
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
2233
|
-
placeholder: l
|
|
1598
|
+
placeholder: o(l)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
2234
1599
|
readonly: e.isReadonly,
|
|
2235
1600
|
type: "text",
|
|
2236
|
-
onInput:
|
|
1601
|
+
onInput: r[23] || (r[23] = (f) => _e("ca_certificates"))
|
|
2237
1602
|
}, {
|
|
2238
|
-
"label-tooltip":
|
|
2239
|
-
|
|
1603
|
+
"label-tooltip": d(() => [
|
|
1604
|
+
c(o(N), {
|
|
2240
1605
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
2241
1606
|
scope: "global"
|
|
2242
1607
|
}, {
|
|
2243
|
-
code1:
|
|
2244
|
-
I("code", null,
|
|
1608
|
+
code1: d(() => [
|
|
1609
|
+
I("code", null, k(o(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
2245
1610
|
]),
|
|
2246
|
-
code2:
|
|
2247
|
-
I("code", null,
|
|
1611
|
+
code2: d(() => [
|
|
1612
|
+
I("code", null, k(o(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
2248
1613
|
]),
|
|
2249
1614
|
_: 1
|
|
2250
1615
|
})
|
|
2251
1616
|
]),
|
|
2252
1617
|
_: 1
|
|
2253
1618
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2254
|
-
])) :
|
|
2255
|
-
|
|
2256
|
-
|
|
1619
|
+
])) : D("", !0),
|
|
1620
|
+
Re.value ? (V(), T("div", Xt, [
|
|
1621
|
+
c(i, {
|
|
2257
1622
|
modelValue: e.fields.tls_verify_enabled,
|
|
2258
|
-
"onUpdate:modelValue":
|
|
1623
|
+
"onUpdate:modelValue": r[24] || (r[24] = (f) => e.fields.tls_verify_enabled = f),
|
|
2259
1624
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
2260
|
-
description: l
|
|
2261
|
-
label: l
|
|
1625
|
+
description: o(l)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1626
|
+
label: o(l)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
2262
1627
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
2263
1628
|
}, {
|
|
2264
|
-
tooltip:
|
|
2265
|
-
|
|
1629
|
+
tooltip: d(() => [
|
|
1630
|
+
c(o(N), {
|
|
2266
1631
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
2267
1632
|
scope: "global"
|
|
2268
1633
|
}, {
|
|
2269
|
-
code1:
|
|
2270
|
-
I("code", null,
|
|
1634
|
+
code1: d(() => [
|
|
1635
|
+
I("code", null, k(o(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
2271
1636
|
]),
|
|
2272
1637
|
_: 1
|
|
2273
1638
|
})
|
|
2274
1639
|
]),
|
|
2275
1640
|
_: 1
|
|
2276
1641
|
}, 8, ["modelValue", "description", "label"]),
|
|
2277
|
-
e.fields.tls_verify_enabled ? (
|
|
2278
|
-
|
|
1642
|
+
e.fields.tls_verify_enabled ? (V(), T("div", Yt, [
|
|
1643
|
+
c(_, {
|
|
2279
1644
|
modelValue: e.fields.tls_verify_value,
|
|
2280
|
-
"onUpdate:modelValue":
|
|
1645
|
+
"onUpdate:modelValue": r[25] || (r[25] = (f) => e.fields.tls_verify_value = f),
|
|
2281
1646
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
2282
|
-
label: l
|
|
1647
|
+
label: o(l)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
2283
1648
|
"selected-value": !0
|
|
2284
1649
|
}, null, 8, ["modelValue", "label"])
|
|
2285
|
-
])) :
|
|
2286
|
-
e.fields.tls_verify_enabled ? (
|
|
2287
|
-
|
|
1650
|
+
])) : D("", !0),
|
|
1651
|
+
e.fields.tls_verify_enabled ? (V(), T("div", eo, [
|
|
1652
|
+
c(_, {
|
|
2288
1653
|
modelValue: e.fields.tls_verify_value,
|
|
2289
|
-
"onUpdate:modelValue":
|
|
1654
|
+
"onUpdate:modelValue": r[26] || (r[26] = (f) => e.fields.tls_verify_value = f),
|
|
2290
1655
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
2291
|
-
label: l
|
|
1656
|
+
label: o(l)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
2292
1657
|
"selected-value": !1
|
|
2293
1658
|
}, null, 8, ["modelValue", "label"])
|
|
2294
|
-
])) :
|
|
2295
|
-
])) :
|
|
1659
|
+
])) : D("", !0)
|
|
1660
|
+
])) : D("", !0)
|
|
2296
1661
|
]))
|
|
2297
1662
|
]),
|
|
2298
1663
|
_: 1
|
|
@@ -2303,52 +1668,52 @@ const se = {
|
|
|
2303
1668
|
]),
|
|
2304
1669
|
_: 1
|
|
2305
1670
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2306
|
-
|
|
2307
|
-
description: l
|
|
2308
|
-
"hide-info-header":
|
|
2309
|
-
title: l
|
|
1671
|
+
c(o(Ne), {
|
|
1672
|
+
description: o(l)("gateway_services.form.sections.general.description"),
|
|
1673
|
+
"hide-info-header": s.hideSectionsInfo,
|
|
1674
|
+
title: o(l)("gateway_services.form.sections.general.title")
|
|
2310
1675
|
}, {
|
|
2311
|
-
default:
|
|
2312
|
-
|
|
1676
|
+
default: d(() => [
|
|
1677
|
+
c(h, {
|
|
2313
1678
|
modelValue: e.fields.name,
|
|
2314
|
-
"onUpdate:modelValue":
|
|
1679
|
+
"onUpdate:modelValue": r[28] || (r[28] = (f) => e.fields.name = f),
|
|
2315
1680
|
modelModifiers: { trim: !0 },
|
|
2316
1681
|
autocomplete: "off",
|
|
2317
1682
|
"data-testid": "gateway-service-name-input",
|
|
2318
|
-
error:
|
|
2319
|
-
"error-message":
|
|
2320
|
-
label: l
|
|
1683
|
+
error: Fe.value,
|
|
1684
|
+
"error-message": le.value,
|
|
1685
|
+
label: o(l)("gateway_services.form.fields.name.label"),
|
|
2321
1686
|
"label-attributes": {
|
|
2322
|
-
info: l
|
|
1687
|
+
info: o(l)("gateway_services.form.fields.name.tooltip"),
|
|
2323
1688
|
tooltipAttributes: { maxWidth: "400" }
|
|
2324
1689
|
},
|
|
2325
1690
|
name: "name",
|
|
2326
|
-
placeholder: l
|
|
1691
|
+
placeholder: o(l)("gateway_services.form.fields.name.placeholder"),
|
|
2327
1692
|
readonly: e.isReadonly,
|
|
2328
1693
|
type: "text",
|
|
2329
|
-
onInput:
|
|
1694
|
+
onInput: ne
|
|
2330
1695
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
2331
|
-
|
|
1696
|
+
c(X, {
|
|
2332
1697
|
"data-testid": "tags-collapse",
|
|
2333
1698
|
"trigger-alignment": "leading",
|
|
2334
|
-
"trigger-label": l
|
|
1699
|
+
"trigger-label": o(l)("gateway_services.form.fields.tags.collapse")
|
|
2335
1700
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
I("div",
|
|
2338
|
-
|
|
1701
|
+
default: d(() => [
|
|
1702
|
+
I("div", to, [
|
|
1703
|
+
c(h, {
|
|
2339
1704
|
modelValue: e.fields.tags,
|
|
2340
|
-
"onUpdate:modelValue":
|
|
1705
|
+
"onUpdate:modelValue": r[29] || (r[29] = (f) => e.fields.tags = f),
|
|
2341
1706
|
modelModifiers: { trim: !0 },
|
|
2342
1707
|
autocomplete: "off",
|
|
2343
1708
|
"data-testid": "gateway-service-tags-input",
|
|
2344
|
-
help: l
|
|
2345
|
-
label: l
|
|
1709
|
+
help: o(l)("gateway_services.form.fields.tags.help"),
|
|
1710
|
+
label: o(l)("gateway_services.form.fields.tags.label"),
|
|
2346
1711
|
"label-attributes": {
|
|
2347
|
-
info: l
|
|
1712
|
+
info: o(l)("gateway_services.form.fields.tags.tooltip"),
|
|
2348
1713
|
tooltipAttributes: { maxWidth: "400" }
|
|
2349
1714
|
},
|
|
2350
1715
|
name: "tags",
|
|
2351
|
-
placeholder: l
|
|
1716
|
+
placeholder: o(l)("gateway_services.form.fields.tags.placeholder"),
|
|
2352
1717
|
readonly: e.isReadonly,
|
|
2353
1718
|
type: "text"
|
|
2354
1719
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
@@ -2359,34 +1724,33 @@ const se = {
|
|
|
2359
1724
|
]),
|
|
2360
1725
|
_: 1
|
|
2361
1726
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2362
|
-
e.errorMessages.length ? (
|
|
1727
|
+
e.errorMessages.length ? (V(), de(re, {
|
|
2363
1728
|
key: 0,
|
|
2364
1729
|
appearance: "danger",
|
|
2365
1730
|
"data-testid": "form-error"
|
|
2366
1731
|
}, {
|
|
2367
|
-
default:
|
|
2368
|
-
I("ul",
|
|
2369
|
-
(
|
|
1732
|
+
default: d(() => [
|
|
1733
|
+
I("ul", oo, [
|
|
1734
|
+
(V(!0), T(Xe, null, Ye(e.errorMessages, (f) => (V(), T("li", { key: f }, k(f), 1))), 128))
|
|
2370
1735
|
])
|
|
2371
1736
|
]),
|
|
2372
1737
|
_: 1
|
|
2373
|
-
})) :
|
|
1738
|
+
})) : D("", !0)
|
|
2374
1739
|
]),
|
|
2375
1740
|
_: 3
|
|
2376
1741
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
2377
1742
|
]);
|
|
2378
1743
|
};
|
|
2379
1744
|
}
|
|
2380
|
-
}),
|
|
2381
|
-
validateHost:
|
|
2382
|
-
validatePort:
|
|
2383
|
-
validateProtocol:
|
|
2384
|
-
validatePath:
|
|
1745
|
+
}), go = /* @__PURE__ */ He(ro, [["__scopeId", "data-v-ce7f08af"]]), { validateHost: io, validatePort: lo, validateProtocol: so, validatePath: ao } = Y.useUrlValidators(), yo = () => ({
|
|
1746
|
+
validateHost: io,
|
|
1747
|
+
validatePort: lo,
|
|
1748
|
+
validateProtocol: so,
|
|
1749
|
+
validatePath: ao
|
|
2385
1750
|
});
|
|
2386
1751
|
export {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
Tl as useUrlValidator
|
|
1752
|
+
vo as GatewayServiceConfigCard,
|
|
1753
|
+
go as GatewayServiceForm,
|
|
1754
|
+
mo as GatewayServiceList,
|
|
1755
|
+
yo as useUrlValidator
|
|
2392
1756
|
};
|