@kong-ui-public/entities-gateway-services 3.8.29-pr.1752.c73ad6992.0 → 3.8.29-pr.1756.f5b0b2e2e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { AddIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Ve, ref as V, computed as h, watch as ke, onBeforeMount as xe, resolveComponent as A, openBlock as S, createElementBlock as U, createVNode as u, unref as o, withCtx as p, createBlock as Ce, Teleport as Ae, withDirectives as Fe, createTextVNode as E, toDisplayString as _, vShow as $e, createElementVNode as C, withModifiers as we, reactive as Se, onMounted as De, renderSlot as Be, createCommentVNode as L } from "vue";
|
|
2
|
+
import { useRouter as Ue } from "vue-router";
|
|
3
|
+
import { AddIcon as Ge } from "@kong/icons";
|
|
4
|
+
import { createI18n as Le, i18nTComponent as Ke } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as Ee, useFetcher as qe, useDeleteUrlBuilder as Ne, FetcherStatus as Ie, EntityBaseTable as We, EntityFilter as Oe, PermissionsWrapper as le, TableTags as je, EntityToggleModal as He, EntityDeleteModal as Je, EntityTypes as ze, useErrors as Qe, useValidators as Xe, EntityBaseFormType as Te, useGatewayFeatureSupported as Ye, EntityBaseForm as Ze, SupportedEntityType as Me, EntityFormSection as Pe, useHelpers as et, ConfigurationSchemaSection as ne, ConfigurationSchemaType as tt, EntityBaseConfigCard as lt } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const ot = {
|
|
7
7
|
create: "New Gateway Service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
9
9
|
copy_id: "Copy ID",
|
|
@@ -16,12 +16,12 @@ const st = {
|
|
|
16
16
|
description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
|
|
17
17
|
menu_label: "Delete"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, it = {
|
|
20
20
|
placeholder: {
|
|
21
21
|
konnect: "Filter by name",
|
|
22
22
|
kongManager: "Filter by exact name or ID"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, st = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -164,33 +164,33 @@ const st = {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
},
|
|
167
|
+
}, rt = {
|
|
168
168
|
general: "Gateway Services could not be retrieved",
|
|
169
169
|
delete: "The gateway service could not be deleted at this time.",
|
|
170
170
|
copy: "Failed to copy to clipboard",
|
|
171
171
|
urlErrorMessage: "Error: invalid URL"
|
|
172
|
-
},
|
|
172
|
+
}, at = {
|
|
173
173
|
success: "Copied {val} to clipboard",
|
|
174
174
|
success_brief: "Successfully copied to clipboard"
|
|
175
|
-
},
|
|
175
|
+
}, nt = {
|
|
176
176
|
gateway_services: "gateway services"
|
|
177
|
-
},
|
|
178
|
-
actions:
|
|
179
|
-
search:
|
|
180
|
-
gateway_services:
|
|
181
|
-
errors:
|
|
182
|
-
copy:
|
|
183
|
-
glossary:
|
|
177
|
+
}, ct = {
|
|
178
|
+
actions: ot,
|
|
179
|
+
search: it,
|
|
180
|
+
gateway_services: st,
|
|
181
|
+
errors: rt,
|
|
182
|
+
copy: at,
|
|
183
|
+
glossary: nt
|
|
184
184
|
};
|
|
185
|
-
function
|
|
186
|
-
const n =
|
|
185
|
+
function dt() {
|
|
186
|
+
const n = Le("en-us", ct);
|
|
187
187
|
return {
|
|
188
188
|
i18n: n,
|
|
189
|
-
i18nT:
|
|
189
|
+
i18nT: Ke(n)
|
|
190
190
|
// Translation component <i18n-t>
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function ut() {
|
|
194
194
|
return {
|
|
195
195
|
getPortFromProtocol: ($, m) => {
|
|
196
196
|
const d = [80, 443], r = Number(m);
|
|
@@ -212,31 +212,31 @@ function pt() {
|
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
const
|
|
216
|
-
useI18n:
|
|
217
|
-
usePortFromProtocol:
|
|
218
|
-
},
|
|
215
|
+
const ue = {
|
|
216
|
+
useI18n: dt,
|
|
217
|
+
usePortFromProtocol: ut
|
|
218
|
+
}, ce = "/v2/control-planes/{controlPlaneId}/core-entities", de = "/{workspace}", oe = {
|
|
219
219
|
list: {
|
|
220
220
|
konnect: {
|
|
221
|
-
all: `${
|
|
221
|
+
all: `${ce}/services`
|
|
222
222
|
},
|
|
223
223
|
kongManager: {
|
|
224
|
-
all: `${
|
|
224
|
+
all: `${de}/services`
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
227
|
form: {
|
|
228
228
|
konnect: {
|
|
229
|
-
create: `${
|
|
230
|
-
validate: `${
|
|
231
|
-
edit: `${
|
|
229
|
+
create: `${ce}/services`,
|
|
230
|
+
validate: `${ce}/v1/schemas/json/service/validate`,
|
|
231
|
+
edit: `${ce}/services/{id}`
|
|
232
232
|
},
|
|
233
233
|
kongManager: {
|
|
234
|
-
create: `${
|
|
235
|
-
validate: `${
|
|
236
|
-
edit: `${
|
|
234
|
+
create: `${de}/services`,
|
|
235
|
+
validate: `${de}/schemas/services/validate`,
|
|
236
|
+
edit: `${de}/services/{id}`
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
},
|
|
239
|
+
}, ft = { class: "kong-ui-entities-gateway-services-list" }, pt = { key: 1 }, mt = /* @__PURE__ */ Ve({
|
|
240
240
|
__name: "GatewayServiceList",
|
|
241
241
|
props: {
|
|
242
242
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -287,8 +287,8 @@ const pe = {
|
|
|
287
287
|
},
|
|
288
288
|
emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
289
289
|
setup(n, { emit: $ }) {
|
|
290
|
-
var
|
|
291
|
-
const m = $, d = n, { i18n: { t: r, formatUnixTimeStamp:
|
|
290
|
+
var P;
|
|
291
|
+
const m = $, d = n, { i18n: { t: r, formatUnixTimeStamp: M } } = ue.useI18n(), W = Ue(), { axiosInstance: K } = Ee((P = d.config) == null ? void 0 : P.axiosRequestConfig), s = V(1), I = h(() => d.config.app !== "kongManager" || !!d.config.disableSorting), b = {
|
|
292
292
|
// the Name column is non-hidable
|
|
293
293
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
294
294
|
...d.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -300,65 +300,65 @@ const pe = {
|
|
|
300
300
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
301
301
|
updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
302
302
|
created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
303
|
-
},
|
|
303
|
+
}, fe = {
|
|
304
304
|
columnVisibility: {
|
|
305
305
|
created_at: !1
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, pe = b, F = h(() => {
|
|
308
308
|
var f, l;
|
|
309
|
-
let a = `${d.config.apiBaseUrl}${
|
|
309
|
+
let a = `${d.config.apiBaseUrl}${oe.list[d.config.app].all}`;
|
|
310
310
|
return d.config.app === "konnect" ? a = a.replace(/{controlPlaneId}/gi, ((f = d.config) == null ? void 0 : f.controlPlaneId) || "") : d.config.app === "kongManager" && (a = a.replace(/\/{workspace}/gi, (l = d.config) != null && l.workspace ? `/${d.config.workspace}` : "")), a;
|
|
311
|
-
}),
|
|
311
|
+
}), me = h(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${F.value}`) : new URL(F.value)), D = V(""), w = h(() => {
|
|
312
312
|
const a = d.config.app === "konnect" || d.config.isExactMatch;
|
|
313
313
|
if (a)
|
|
314
314
|
return {
|
|
315
315
|
isExactMatch: a,
|
|
316
316
|
placeholder: r(`search.placeholder.${d.config.app}`)
|
|
317
317
|
};
|
|
318
|
-
const { name: f, enabled: l, protocol:
|
|
318
|
+
const { name: f, enabled: l, protocol: k, host: c, port: x, path: ae } = b;
|
|
319
319
|
return {
|
|
320
320
|
isExactMatch: a,
|
|
321
|
-
fields: { name: f, enabled: l, protocol:
|
|
321
|
+
fields: { name: f, enabled: l, protocol: k, host: c, port: x, path: ae },
|
|
322
322
|
schema: d.config.filterSchema
|
|
323
323
|
};
|
|
324
|
-
}), { fetcher:
|
|
324
|
+
}), { fetcher: j, fetcherState: H } = qe(d.config, F.value), ve = () => {
|
|
325
325
|
D.value = "";
|
|
326
326
|
}, e = () => {
|
|
327
327
|
s.value++;
|
|
328
|
-
},
|
|
328
|
+
}, y = V(null), J = V(!1), ge = h(() => ({
|
|
329
329
|
ctaPath: d.config.createRoute,
|
|
330
|
-
ctaText:
|
|
330
|
+
ctaText: g.value ? d.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
|
|
331
331
|
message: `${r("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
|
|
332
|
-
title:
|
|
333
|
-
})),
|
|
332
|
+
title: g.value ? d.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
333
|
+
})), O = V(!1), T = V(null), B = h(() => {
|
|
334
334
|
const a = {
|
|
335
335
|
action: "disable",
|
|
336
336
|
id: "",
|
|
337
337
|
name: ""
|
|
338
338
|
};
|
|
339
|
-
if (
|
|
340
|
-
const { enabled: f, id: l, name:
|
|
341
|
-
a.action = f ? "disable" : "enable", a.id = l, a.name =
|
|
339
|
+
if (T.value) {
|
|
340
|
+
const { enabled: f, id: l, name: k } = T.value;
|
|
341
|
+
a.action = f ? "disable" : "enable", a.id = l, a.name = k || l;
|
|
342
342
|
}
|
|
343
343
|
return a;
|
|
344
|
-
}),
|
|
345
|
-
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
var
|
|
350
|
-
if (!await ((
|
|
344
|
+
}), ie = (a) => {
|
|
345
|
+
O.value = !0, T.value = a;
|
|
346
|
+
}, z = () => {
|
|
347
|
+
O.value = !1, T.value = null;
|
|
348
|
+
}, se = async () => {
|
|
349
|
+
var k, c;
|
|
350
|
+
if (!await ((k = d.canEdit) == null ? void 0 : k.call(d, T.value)) || !T.value)
|
|
351
351
|
return;
|
|
352
|
-
const f = `${
|
|
352
|
+
const f = `${me.value.href}/${T.value.id}`, l = !T.value.enabled;
|
|
353
353
|
try {
|
|
354
|
-
const { data:
|
|
355
|
-
m("toggle:success",
|
|
356
|
-
} catch (
|
|
357
|
-
m("error",
|
|
354
|
+
const { data: x } = ((c = d.config) == null ? void 0 : c.app) === "konnect" ? await K.put(f, { ...T.value, enabled: l }) : await K.patch(f, { ...T.value, enabled: l });
|
|
355
|
+
m("toggle:success", x), T.value.enabled = l;
|
|
356
|
+
} catch (x) {
|
|
357
|
+
m("error", x);
|
|
358
358
|
}
|
|
359
|
-
},
|
|
360
|
-
d.config.getControlPlaneRoute &&
|
|
361
|
-
},
|
|
359
|
+
}, ye = (a) => {
|
|
360
|
+
d.config.getControlPlaneRoute && W.push(d.config.getControlPlaneRoute(a));
|
|
361
|
+
}, _e = (a, f) => {
|
|
362
362
|
const l = a.id;
|
|
363
363
|
if (!f(l)) {
|
|
364
364
|
m("copy:error", {
|
|
@@ -373,7 +373,7 @@ const pe = {
|
|
|
373
373
|
field: "id",
|
|
374
374
|
message: r("copy.success", { val: l })
|
|
375
375
|
});
|
|
376
|
-
},
|
|
376
|
+
}, be = (a, f) => {
|
|
377
377
|
const l = JSON.stringify(a);
|
|
378
378
|
if (!f(l)) {
|
|
379
379
|
m("copy:error", {
|
|
@@ -386,95 +386,95 @@ const pe = {
|
|
|
386
386
|
entity: a,
|
|
387
387
|
message: r("copy.success_brief")
|
|
388
388
|
});
|
|
389
|
-
},
|
|
389
|
+
}, he = async (a) => {
|
|
390
390
|
var l;
|
|
391
|
-
await ((l = d.canRetrieve) == null ? void 0 : l.call(d, a)) &&
|
|
392
|
-
},
|
|
391
|
+
await ((l = d.canRetrieve) == null ? void 0 : l.call(d, a)) && W.push(d.config.getViewRoute(a.id));
|
|
392
|
+
}, Q = (a) => ({
|
|
393
393
|
label: r("actions.view"),
|
|
394
394
|
to: d.config.getViewRoute(a)
|
|
395
|
-
}),
|
|
395
|
+
}), re = (a) => ({
|
|
396
396
|
label: r("actions.edit"),
|
|
397
397
|
to: d.config.getEditRoute(a)
|
|
398
|
-
}),
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
|
|
398
|
+
}), R = V(void 0), X = V(!1), q = V(!1), Y = V(""), N = Ne(d.config, F.value), Z = (a) => {
|
|
399
|
+
R.value = a, X.value = !0, Y.value = "";
|
|
400
|
+
}, ee = () => {
|
|
401
|
+
X.value = !1, R.value = void 0;
|
|
402
402
|
}, t = async () => {
|
|
403
403
|
var a, f, l;
|
|
404
|
-
if ((a =
|
|
405
|
-
|
|
404
|
+
if ((a = R.value) != null && a.id) {
|
|
405
|
+
q.value = !0;
|
|
406
406
|
try {
|
|
407
|
-
await
|
|
408
|
-
} catch (
|
|
409
|
-
|
|
407
|
+
await K.delete(N(R.value.id)), m("delete:success", R.value), ee(), s.value++;
|
|
408
|
+
} catch (k) {
|
|
409
|
+
Y.value = ((l = (f = k.response) == null ? void 0 : f.data) == null ? void 0 : l.message) || k.message || r("errors.delete"), m("error", k);
|
|
410
410
|
} finally {
|
|
411
|
-
|
|
411
|
+
q.value = !1;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}, i = V(!1);
|
|
415
|
-
|
|
416
|
-
var f, l,
|
|
417
|
-
if (Array.isArray((f = a == null ? void 0 : a.response) == null ? void 0 : f.data) && (i.value = a.response.data.length > 0), a.status ===
|
|
418
|
-
|
|
415
|
+
ke(H, (a) => {
|
|
416
|
+
var f, l, k, c;
|
|
417
|
+
if (Array.isArray((f = a == null ? void 0 : a.response) == null ? void 0 : f.data) && (i.value = a.response.data.length > 0), a.status === Ie.NoRecords ? J.value = !0 : J.value = !1, a.status === Ie.Error) {
|
|
418
|
+
y.value = {
|
|
419
419
|
title: r("errors.general")
|
|
420
|
-
}, (c = (
|
|
420
|
+
}, (c = (k = (l = a.error) == null ? void 0 : l.response) == null ? void 0 : k.data) != null && c.message && (y.value.message = a.error.response.data.message), m("error", a.error);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
|
|
423
|
+
y.value = null;
|
|
424
424
|
});
|
|
425
|
-
const
|
|
426
|
-
return
|
|
427
|
-
|
|
425
|
+
const g = V(!1);
|
|
426
|
+
return xe(async () => {
|
|
427
|
+
g.value = await d.canCreate();
|
|
428
428
|
}), (a, f) => {
|
|
429
|
-
const l =
|
|
430
|
-
return
|
|
431
|
-
u(o(
|
|
429
|
+
const l = A("KButton"), k = A("KBadge"), c = A("KInputSwitch"), x = A("KDropdownItem"), ae = A("KClipboardProvider");
|
|
430
|
+
return S(), U("div", ft, [
|
|
431
|
+
u(o(We), {
|
|
432
432
|
"cache-identifier": n.cacheIdentifier,
|
|
433
|
-
"default-table-preferences":
|
|
434
|
-
"disable-sorting":
|
|
435
|
-
"empty-state-options":
|
|
433
|
+
"default-table-preferences": fe,
|
|
434
|
+
"disable-sorting": I.value,
|
|
435
|
+
"empty-state-options": ge.value,
|
|
436
436
|
"enable-entity-actions": "",
|
|
437
|
-
"error-message":
|
|
438
|
-
fetcher: o(
|
|
437
|
+
"error-message": y.value,
|
|
438
|
+
fetcher: o(j),
|
|
439
439
|
"fetcher-cache-key": s.value,
|
|
440
|
-
"hide-toolbar":
|
|
440
|
+
"hide-toolbar": J.value,
|
|
441
441
|
"pagination-type": "offset",
|
|
442
442
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
443
443
|
query: D.value,
|
|
444
|
-
"table-headers": o(
|
|
445
|
-
onClearSearchInput:
|
|
446
|
-
"onClick:row": f[
|
|
444
|
+
"table-headers": o(pe),
|
|
445
|
+
onClearSearchInput: ve,
|
|
446
|
+
"onClick:row": f[2] || (f[2] = (v) => he(v)),
|
|
447
447
|
onSort: e
|
|
448
448
|
}, {
|
|
449
449
|
"toolbar-filter": p(() => [
|
|
450
|
-
u(o(
|
|
450
|
+
u(o(Oe), {
|
|
451
451
|
modelValue: D.value,
|
|
452
452
|
"onUpdate:modelValue": f[0] || (f[0] = (v) => D.value = v),
|
|
453
|
-
config:
|
|
453
|
+
config: w.value
|
|
454
454
|
}, null, 8, ["modelValue", "config"])
|
|
455
455
|
]),
|
|
456
456
|
"toolbar-button": p(() => [
|
|
457
|
-
(
|
|
457
|
+
(S(), Ce(Ae, {
|
|
458
458
|
disabled: !n.useActionOutside,
|
|
459
459
|
to: "#kong-ui-app-page-header-action-button"
|
|
460
460
|
}, [
|
|
461
|
-
u(o(
|
|
461
|
+
u(o(le), {
|
|
462
462
|
"auth-function": () => n.canCreate()
|
|
463
463
|
}, {
|
|
464
464
|
default: p(() => [
|
|
465
|
-
|
|
465
|
+
Fe(u(l, {
|
|
466
466
|
appearance: "primary",
|
|
467
467
|
"data-testid": "toolbar-add-gateway-service",
|
|
468
468
|
size: n.useActionOutside ? "medium" : "large",
|
|
469
469
|
to: n.config.createRoute
|
|
470
470
|
}, {
|
|
471
471
|
default: p(() => [
|
|
472
|
-
u(o(
|
|
472
|
+
u(o(Ge)),
|
|
473
473
|
E(" " + _(o(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
474
474
|
]),
|
|
475
475
|
_: 1
|
|
476
476
|
}, 8, ["size", "to"]), [
|
|
477
|
-
[
|
|
477
|
+
[$e, i.value]
|
|
478
478
|
])
|
|
479
479
|
]),
|
|
480
480
|
_: 1
|
|
@@ -482,40 +482,40 @@ const pe = {
|
|
|
482
482
|
], 8, ["disabled"]))
|
|
483
483
|
]),
|
|
484
484
|
name: p(({ rowValue: v }) => [
|
|
485
|
-
|
|
485
|
+
C("b", null, _(v ?? "-"), 1)
|
|
486
486
|
]),
|
|
487
487
|
control_plane: p(({ row: v }) => {
|
|
488
|
-
var
|
|
488
|
+
var G;
|
|
489
489
|
return [
|
|
490
|
-
(
|
|
490
|
+
(G = v.x_meta) != null && G.cluster_id ? (S(), Ce(k, {
|
|
491
491
|
key: 0,
|
|
492
492
|
tooltip: v.x_meta.cluster_id,
|
|
493
493
|
"truncation-tooltip": "",
|
|
494
|
-
onClick:
|
|
494
|
+
onClick: we((te) => ye(v.x_meta.cluster_id), ["stop"])
|
|
495
495
|
}, {
|
|
496
496
|
default: p(() => [
|
|
497
497
|
E(_(v.x_meta.cluster_id), 1)
|
|
498
498
|
]),
|
|
499
499
|
_: 2
|
|
500
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
500
|
+
}, 1032, ["tooltip", "onClick"])) : (S(), U("b", pt, "-"))
|
|
501
501
|
];
|
|
502
502
|
}),
|
|
503
503
|
enabled: p(({ row: v }) => [
|
|
504
|
-
u(o(
|
|
504
|
+
u(o(le), {
|
|
505
505
|
"auth-function": () => n.canEdit(v),
|
|
506
506
|
"force-show": ""
|
|
507
507
|
}, {
|
|
508
|
-
default: p(({ isAllowed:
|
|
509
|
-
|
|
510
|
-
onClick: f[1] || (f[1] =
|
|
508
|
+
default: p(({ isAllowed: G }) => [
|
|
509
|
+
C("div", {
|
|
510
|
+
onClick: f[1] || (f[1] = we(() => {
|
|
511
511
|
}, ["stop"]))
|
|
512
512
|
}, [
|
|
513
513
|
u(c, {
|
|
514
514
|
modelValue: v.enabled,
|
|
515
|
-
"onUpdate:modelValue": (
|
|
515
|
+
"onUpdate:modelValue": (te) => v.enabled = te,
|
|
516
516
|
"data-testid": `row-${v.id}-toggle-input`,
|
|
517
|
-
disabled: !
|
|
518
|
-
onClick:
|
|
517
|
+
disabled: !G,
|
|
518
|
+
onClick: we((te) => ie(v), ["prevent"])
|
|
519
519
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
520
520
|
])
|
|
521
521
|
]),
|
|
@@ -523,34 +523,20 @@ const pe = {
|
|
|
523
523
|
}, 1032, ["auth-function"])
|
|
524
524
|
]),
|
|
525
525
|
tags: p(({ rowValue: v }) => [
|
|
526
|
-
(
|
|
527
|
-
default: p(() => [
|
|
528
|
-
(w(!0), I(Be, null, Le(v, (M) => (w(), ne(C, {
|
|
529
|
-
key: M,
|
|
530
|
-
onClick: f[2] || (f[2] = ce(() => {
|
|
531
|
-
}, ["stop"]))
|
|
532
|
-
}, {
|
|
533
|
-
default: p(() => [
|
|
534
|
-
E(_(M), 1)
|
|
535
|
-
]),
|
|
536
|
-
_: 2
|
|
537
|
-
}, 1024))), 128))
|
|
538
|
-
]),
|
|
539
|
-
_: 2
|
|
540
|
-
}, 1024)) : (w(), I("span", yt, "-"))
|
|
526
|
+
u(o(je), { tags: v }, null, 8, ["tags"])
|
|
541
527
|
]),
|
|
542
528
|
created_at: p(({ rowValue: v }) => [
|
|
543
|
-
E(_(o(
|
|
529
|
+
E(_(o(M)(v)), 1)
|
|
544
530
|
]),
|
|
545
531
|
updated_at: p(({ rowValue: v }) => [
|
|
546
|
-
E(_(o(
|
|
532
|
+
E(_(o(M)(v)), 1)
|
|
547
533
|
]),
|
|
548
534
|
actions: p(({ row: v }) => [
|
|
549
|
-
u(
|
|
550
|
-
default: p(({ copyToClipboard:
|
|
551
|
-
u(
|
|
535
|
+
u(ae, null, {
|
|
536
|
+
default: p(({ copyToClipboard: G }) => [
|
|
537
|
+
u(x, {
|
|
552
538
|
"data-testid": "action-entity-copy-id",
|
|
553
|
-
onClick: (
|
|
539
|
+
onClick: (te) => _e(v, G)
|
|
554
540
|
}, {
|
|
555
541
|
default: p(() => [
|
|
556
542
|
E(_(o(r)("actions.copy_id")), 1)
|
|
@@ -560,11 +546,11 @@ const pe = {
|
|
|
560
546
|
]),
|
|
561
547
|
_: 2
|
|
562
548
|
}, 1024),
|
|
563
|
-
u(
|
|
564
|
-
default: p(({ copyToClipboard:
|
|
565
|
-
u(
|
|
549
|
+
u(ae, null, {
|
|
550
|
+
default: p(({ copyToClipboard: G }) => [
|
|
551
|
+
u(x, {
|
|
566
552
|
"data-testid": "action-entity-copy-json",
|
|
567
|
-
onClick: (
|
|
553
|
+
onClick: (te) => be(v, G)
|
|
568
554
|
}, {
|
|
569
555
|
default: p(() => [
|
|
570
556
|
E(_(o(r)("actions.copy_json")), 1)
|
|
@@ -574,38 +560,38 @@ const pe = {
|
|
|
574
560
|
]),
|
|
575
561
|
_: 2
|
|
576
562
|
}, 1024),
|
|
577
|
-
u(o(
|
|
563
|
+
u(o(le), {
|
|
578
564
|
"auth-function": () => n.canRetrieve(v)
|
|
579
565
|
}, {
|
|
580
566
|
default: p(() => [
|
|
581
|
-
u(
|
|
567
|
+
u(x, {
|
|
582
568
|
"data-testid": "action-entity-view",
|
|
583
569
|
"has-divider": "",
|
|
584
|
-
item:
|
|
570
|
+
item: Q(v.id)
|
|
585
571
|
}, null, 8, ["item"])
|
|
586
572
|
]),
|
|
587
573
|
_: 2
|
|
588
574
|
}, 1032, ["auth-function"]),
|
|
589
|
-
u(o(
|
|
575
|
+
u(o(le), {
|
|
590
576
|
"auth-function": () => n.canEdit(v)
|
|
591
577
|
}, {
|
|
592
578
|
default: p(() => [
|
|
593
|
-
u(
|
|
579
|
+
u(x, {
|
|
594
580
|
"data-testid": "action-entity-edit",
|
|
595
|
-
item:
|
|
581
|
+
item: re(v.id)
|
|
596
582
|
}, null, 8, ["item"])
|
|
597
583
|
]),
|
|
598
584
|
_: 2
|
|
599
585
|
}, 1032, ["auth-function"]),
|
|
600
|
-
u(o(
|
|
586
|
+
u(o(le), {
|
|
601
587
|
"auth-function": () => n.canDelete(v)
|
|
602
588
|
}, {
|
|
603
589
|
default: p(() => [
|
|
604
|
-
u(
|
|
590
|
+
u(x, {
|
|
605
591
|
danger: "",
|
|
606
592
|
"data-testid": "action-entity-delete",
|
|
607
593
|
"has-divider": "",
|
|
608
|
-
onClick: (
|
|
594
|
+
onClick: (G) => Z(v)
|
|
609
595
|
}, {
|
|
610
596
|
default: p(() => [
|
|
611
597
|
E(_(o(r)("actions.delete.menu_label")), 1)
|
|
@@ -618,57 +604,57 @@ const pe = {
|
|
|
618
604
|
]),
|
|
619
605
|
_: 1
|
|
620
606
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
|
|
621
|
-
u(o(
|
|
607
|
+
u(o(He), {
|
|
622
608
|
action: B.value.action,
|
|
623
609
|
"entity-id": B.value.id,
|
|
624
610
|
"entity-name": B.value.name,
|
|
625
611
|
"entity-type": o(r)("glossary.gateway_services"),
|
|
626
|
-
"on-confirm":
|
|
627
|
-
visible:
|
|
628
|
-
onCancel:
|
|
629
|
-
onProceed:
|
|
612
|
+
"on-confirm": se,
|
|
613
|
+
visible: O.value,
|
|
614
|
+
onCancel: z,
|
|
615
|
+
onProceed: z
|
|
630
616
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
631
|
-
u(o(
|
|
632
|
-
"action-pending":
|
|
617
|
+
u(o(Je), {
|
|
618
|
+
"action-pending": q.value,
|
|
633
619
|
description: o(r)("actions.delete.description"),
|
|
634
|
-
"entity-name":
|
|
635
|
-
"entity-type": o(
|
|
636
|
-
error:
|
|
620
|
+
"entity-name": R.value && (R.value.name || R.value.id),
|
|
621
|
+
"entity-type": o(ze).GatewayService,
|
|
622
|
+
error: Y.value,
|
|
637
623
|
title: o(r)("actions.delete.title"),
|
|
638
|
-
visible:
|
|
639
|
-
onCancel:
|
|
624
|
+
visible: X.value,
|
|
625
|
+
onCancel: ee,
|
|
640
626
|
onProceed: t
|
|
641
627
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
642
628
|
]);
|
|
643
629
|
};
|
|
644
630
|
}
|
|
645
|
-
}),
|
|
631
|
+
}), Re = (n, $) => {
|
|
646
632
|
const m = n.__vccOpts || n;
|
|
647
633
|
for (const [d, r] of $)
|
|
648
634
|
m[d] = r;
|
|
649
635
|
return m;
|
|
650
|
-
},
|
|
636
|
+
}, Gt = /* @__PURE__ */ Re(mt, [["__scopeId", "data-v-d7870a2d"]]), vt = { class: "kong-ui-entities-gateway-service-form" }, gt = { key: 0 }, yt = { class: "gateway-service-form-traffic-label" }, _t = { class: "gateway-service-form-margin-bottom" }, bt = {
|
|
651
637
|
key: 0,
|
|
652
638
|
class: "gateway-service-form-group-fields"
|
|
653
|
-
},
|
|
639
|
+
}, ht = {
|
|
654
640
|
key: 1,
|
|
655
641
|
class: "gateway-service-form-group-fields"
|
|
656
|
-
},
|
|
642
|
+
}, wt = { key: 0 }, kt = { class: "gateway-service-form-margin-top" }, Vt = { class: "gateway-service-form-margin-bottom" }, Ct = { class: "gateway-service-form-margin-bottom" }, St = { class: "gateway-service-form-margin-bottom" }, It = { class: "gateway-service-form-margin-bottom" }, Tt = {
|
|
657
643
|
key: 0,
|
|
658
644
|
class: "gateway-service-form-margin-bottom"
|
|
659
|
-
},
|
|
645
|
+
}, Pt = {
|
|
660
646
|
key: 1,
|
|
661
647
|
class: "gateway-service-form-margin-bottom"
|
|
662
|
-
},
|
|
648
|
+
}, Ut = {
|
|
663
649
|
key: 2,
|
|
664
650
|
class: "gateway-service-form-margin-bottom"
|
|
665
|
-
},
|
|
651
|
+
}, Et = {
|
|
666
652
|
key: 0,
|
|
667
653
|
class: "checkbox-aligned-radio"
|
|
668
|
-
},
|
|
654
|
+
}, Mt = {
|
|
669
655
|
key: 1,
|
|
670
656
|
class: "checkbox-aligned-radio"
|
|
671
|
-
},
|
|
657
|
+
}, Rt = /* @__PURE__ */ Ve({
|
|
672
658
|
__name: "GatewayServiceForm",
|
|
673
659
|
props: {
|
|
674
660
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -692,8 +678,8 @@ const pe = {
|
|
|
692
678
|
},
|
|
693
679
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
694
680
|
setup(n, { expose: $, emit: m }) {
|
|
695
|
-
var
|
|
696
|
-
const d = m, r = n,
|
|
681
|
+
var ee;
|
|
682
|
+
const d = m, r = n, M = V(!0), W = Ue(), { i18nT: K, i18n: { t: s } } = ue.useI18n(), { getMessageFromError: I } = Qe(), { axiosInstance: b } = Ee((ee = r.config) == null ? void 0 : ee.axiosRequestConfig), fe = Xe(), pe = h(() => oe.form[r.config.app].edit), F = h(() => r.gatewayServiceId ? Te.Edit : Te.Create), me = V(!1), D = h(() => !!r.gatewayServiceId), w = V(D.value ? "protocol" : "url"), j = ue.usePortFromProtocol(), H = V(""), ve = h(() => !!H.value), e = Se({
|
|
697
683
|
fields: {
|
|
698
684
|
name: "",
|
|
699
685
|
protocol: "http",
|
|
@@ -713,7 +699,7 @@ const pe = {
|
|
|
713
699
|
},
|
|
714
700
|
isReadonly: !1,
|
|
715
701
|
errorMessage: ""
|
|
716
|
-
}),
|
|
702
|
+
}), y = Se({
|
|
717
703
|
name: "",
|
|
718
704
|
protocol: "http",
|
|
719
705
|
host: "",
|
|
@@ -729,13 +715,13 @@ const pe = {
|
|
|
729
715
|
tls_verify_enabled: !1,
|
|
730
716
|
tls_verify_value: !1,
|
|
731
717
|
tags: ""
|
|
732
|
-
}),
|
|
718
|
+
}), J = r.config.app === "konnect" || Ye({
|
|
733
719
|
gatewayInfo: r.config.gatewayInfo,
|
|
734
720
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
735
721
|
supportedRange: {
|
|
736
722
|
enterprise: ["3.0"]
|
|
737
723
|
}
|
|
738
|
-
}),
|
|
724
|
+
}), ge = [
|
|
739
725
|
{
|
|
740
726
|
label: s("gateway_services.form.fields.protocol.options.http"),
|
|
741
727
|
value: "http",
|
|
@@ -771,7 +757,7 @@ const pe = {
|
|
|
771
757
|
value: "grpcs",
|
|
772
758
|
group: "grpc"
|
|
773
759
|
},
|
|
774
|
-
...
|
|
760
|
+
...J ? [
|
|
775
761
|
{
|
|
776
762
|
label: s("gateway_services.form.fields.protocol.options.ws"),
|
|
777
763
|
value: "ws",
|
|
@@ -788,60 +774,60 @@ const pe = {
|
|
|
788
774
|
value: "udp",
|
|
789
775
|
group: "udp"
|
|
790
776
|
}
|
|
791
|
-
],
|
|
777
|
+
], O = { url: "url", protocol: "protocol" }, T = (t, i) => {
|
|
792
778
|
i.value;
|
|
793
|
-
}, B = (t) => t ? parseFloat(t) : 0,
|
|
794
|
-
|
|
795
|
-
},
|
|
796
|
-
if (e.fields.url &&
|
|
779
|
+
}, B = (t) => t ? parseFloat(t) : 0, ie = () => {
|
|
780
|
+
M.value = !0, e.errorMessage = "", e.fields.host = y.host, e.fields.path = y.path, e.fields.port = y.port, e.fields.protocol = y.protocol, e.fields.url = y.url, e.fields.retries = y.retries, e.fields.connect_timeout = y.connect_timeout, e.fields.write_timeout = y.write_timeout, e.fields.read_timeout = y.read_timeout, e.fields.client_certificate = y.client_certificate, e.fields.ca_certificates = y.ca_certificates, e.fields.tls_verify_enabled = y.tls_verify_enabled, e.fields.tls_verify_value = y.tls_verify_value;
|
|
781
|
+
}, z = () => {
|
|
782
|
+
if (e.fields.url && w.value === "url")
|
|
797
783
|
try {
|
|
798
784
|
const t = new URL(e.fields.url);
|
|
799
785
|
e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
|
|
800
786
|
const i = Number(t.port);
|
|
801
|
-
|
|
787
|
+
me.value = !!i, e.fields.port = i || j.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", d("url-valid:success");
|
|
802
788
|
} catch (t) {
|
|
803
|
-
e.errorMessage = s("errors.urlErrorMessage"), d("url-valid:error",
|
|
789
|
+
e.errorMessage = s("errors.urlErrorMessage"), d("url-valid:error", I(t));
|
|
804
790
|
}
|
|
805
791
|
else
|
|
806
792
|
d("url-valid:success"), e.errorMessage = "";
|
|
807
|
-
},
|
|
808
|
-
if (
|
|
793
|
+
}, se = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), ye = h(() => {
|
|
794
|
+
if (w.value === "url")
|
|
809
795
|
return !0;
|
|
810
796
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
811
|
-
return
|
|
812
|
-
}),
|
|
813
|
-
if (
|
|
797
|
+
return w.value === "protocol" && t;
|
|
798
|
+
}), _e = h(() => {
|
|
799
|
+
if (w.value === "url")
|
|
814
800
|
return !0;
|
|
815
801
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
816
|
-
return
|
|
817
|
-
}),
|
|
818
|
-
if (
|
|
802
|
+
return w.value === "protocol" && t;
|
|
803
|
+
}), be = h(() => {
|
|
804
|
+
if (w.value === "url")
|
|
819
805
|
return !0;
|
|
820
806
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
821
|
-
return
|
|
822
|
-
}),
|
|
823
|
-
|
|
824
|
-
},
|
|
825
|
-
var i,
|
|
826
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((i = t == null ? void 0 : t.tags) == null ? void 0 : i.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 = ((
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
},
|
|
830
|
-
var i,
|
|
831
|
-
let t = `${r.config.apiBaseUrl}${
|
|
832
|
-
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (
|
|
833
|
-
}),
|
|
834
|
-
var i,
|
|
835
|
-
let t = `${r.config.apiBaseUrl}${
|
|
836
|
-
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (
|
|
837
|
-
}),
|
|
807
|
+
return w.value === "protocol" && t;
|
|
808
|
+
}), he = (t) => {
|
|
809
|
+
H.value = fe.utf8Name(t);
|
|
810
|
+
}, Q = h(() => D.value && JSON.stringify(e.fields) !== JSON.stringify(y) || w.value === "url" && !!e.fields.url || w.value === "protocol" && !!e.fields.host), re = (t) => {
|
|
811
|
+
var i, g, P;
|
|
812
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((i = t == null ? void 0 : t.tags) == null ? void 0 : i.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 = ((g = t == null ? void 0 : t.ca_certificates) == null ? void 0 : g.join(",")) || "", e.fields.client_certificate = ((P = t == null ? void 0 : t.client_certificate) == null ? void 0 : P.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, Object.assign(y, e.fields);
|
|
813
|
+
}, R = () => {
|
|
814
|
+
W.push(r.config.cancelRoute);
|
|
815
|
+
}, X = h(() => {
|
|
816
|
+
var i, g;
|
|
817
|
+
let t = `${r.config.apiBaseUrl}${oe.form[r.config.app].validate}`;
|
|
818
|
+
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
819
|
+
}), q = h(() => {
|
|
820
|
+
var i, g;
|
|
821
|
+
let t = `${r.config.apiBaseUrl}${oe.form[r.config.app][F.value]}`;
|
|
822
|
+
return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (g = r.config) != null && g.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
823
|
+
}), Y = (t) => {
|
|
838
824
|
let i = "";
|
|
839
825
|
t.url && (i = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(i)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
840
|
-
},
|
|
841
|
-
var i,
|
|
826
|
+
}, N = h(() => {
|
|
827
|
+
var i, g, P, a;
|
|
842
828
|
const t = {
|
|
843
829
|
name: e.fields.name || null,
|
|
844
|
-
tags: e.fields.tags ? (
|
|
830
|
+
tags: e.fields.tags ? (P = (g = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : g.map((f) => String(f || "").trim())) == null ? void 0 : P.filter((f) => f !== "") : null,
|
|
845
831
|
protocol: e.fields.protocol,
|
|
846
832
|
path: e.fields.path || null,
|
|
847
833
|
read_timeout: e.fields.read_timeout,
|
|
@@ -856,77 +842,77 @@ const pe = {
|
|
|
856
842
|
port: e.fields.port,
|
|
857
843
|
url: e.fields.url
|
|
858
844
|
};
|
|
859
|
-
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),
|
|
860
|
-
}),
|
|
861
|
-
var t, i,
|
|
845
|
+
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), se.value || (t.path = null), F.value === "create" ? w.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : F.value === "edit" && delete t.url, t;
|
|
846
|
+
}), Z = async () => {
|
|
847
|
+
var t, i, g, P;
|
|
862
848
|
try {
|
|
863
|
-
e.isReadonly = !0,
|
|
864
|
-
const a =
|
|
865
|
-
|
|
849
|
+
e.isReadonly = !0, z();
|
|
850
|
+
const a = N.value;
|
|
851
|
+
Y(a);
|
|
866
852
|
let f;
|
|
867
|
-
if (await b.post(
|
|
853
|
+
if (await b.post(X.value, a), F.value === "create" ? f = await b.post(q.value, a) : F.value === "edit" && (f = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await b.put(q.value, a) : await b.patch(q.value, a)), f) {
|
|
868
854
|
const { data: l } = f;
|
|
869
|
-
e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port ||
|
|
855
|
+
e.fields.name = (l == null ? void 0 : l.name) || "", e.fields.port = l.port || j.getPortFromProtocol(l.protocol), e.fields.protocol = (l == null ? void 0 : l.protocol) || "http", e.fields.host = (l == null ? void 0 : l.host) || "", e.fields.path = (l == null ? void 0 : l.path) || "", e.fields.url = (l == null ? void 0 : l.url) || "", e.fields.retries = l != null && l.retries || (l == null ? void 0 : l.retries) === 0 ? l == null ? void 0 : l.retries : 5, e.fields.connect_timeout = l != null && l.connect_timeout || (l == null ? void 0 : l.connect_timeout) === 0 ? l == null ? void 0 : l.connect_timeout : 6e4, e.fields.write_timeout = l != null && l.write_timeout || (l == null ? void 0 : l.write_timeout) === 0 ? l == null ? void 0 : l.write_timeout : 6e4, e.fields.read_timeout = l != null && l.read_timeout || (l == null ? void 0 : l.read_timeout) === 0 ? l == null ? void 0 : l.read_timeout : 6e4, e.fields.client_certificate = ((i = l == null ? void 0 : l.client_certificate) == null ? void 0 : i.id) || "", e.fields.ca_certificates = (g = l == null ? void 0 : l.ca_certificates) != null && g.length ? l == null ? void 0 : l.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (l == null ? void 0 : l.tls_verify) !== "" && (l == null ? void 0 : l.tls_verify) !== null && (l == null ? void 0 : l.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (l == null ? void 0 : l.tls_verify), e.fields.tags = (P = l == null ? void 0 : l.tags) != null && P.length ? l.tags.join(", ") : "", Object.assign(y, e.fields), d("update", f == null ? void 0 : f.data);
|
|
870
856
|
}
|
|
871
857
|
return f;
|
|
872
858
|
} catch (a) {
|
|
873
|
-
e.errorMessage =
|
|
859
|
+
e.errorMessage = I(a), d("error", a);
|
|
874
860
|
} finally {
|
|
875
861
|
e.isReadonly = !1;
|
|
876
862
|
}
|
|
877
863
|
};
|
|
878
|
-
return
|
|
879
|
-
Object.assign(e.fields,
|
|
880
|
-
}),
|
|
881
|
-
e.fields.port =
|
|
882
|
-
}),
|
|
883
|
-
d("model-updated",
|
|
864
|
+
return ke(() => r.gatewayServiceId, () => {
|
|
865
|
+
Object.assign(e.fields, y);
|
|
866
|
+
}), ke(e.fields, (t) => {
|
|
867
|
+
e.fields.port = j.getPortFromProtocol(t.protocol, String(t.port)), d("model-updated", N.value);
|
|
868
|
+
}), De(() => {
|
|
869
|
+
d("model-updated", N.value);
|
|
884
870
|
}), $({
|
|
885
|
-
validateUrl:
|
|
886
|
-
getPayload:
|
|
887
|
-
saveFormData:
|
|
888
|
-
canSubmit:
|
|
889
|
-
initForm:
|
|
871
|
+
validateUrl: z,
|
|
872
|
+
getPayload: N,
|
|
873
|
+
saveFormData: Z,
|
|
874
|
+
canSubmit: Q,
|
|
875
|
+
initForm: re
|
|
890
876
|
}), (t, i) => {
|
|
891
|
-
const
|
|
892
|
-
return
|
|
893
|
-
u(o(
|
|
894
|
-
"can-submit":
|
|
877
|
+
const g = A("KInput"), P = A("KLabel"), a = A("KRadio"), f = A("KSelect"), l = A("KCheckbox"), k = A("KCollapse");
|
|
878
|
+
return S(), U("div", vt, [
|
|
879
|
+
u(o(Ze), {
|
|
880
|
+
"can-submit": Q.value,
|
|
895
881
|
config: n.config,
|
|
896
882
|
"edit-id": n.gatewayServiceId,
|
|
897
|
-
"entity-type": o(
|
|
883
|
+
"entity-type": o(Me).GatewayService,
|
|
898
884
|
"error-message": e.errorMessage,
|
|
899
|
-
"fetch-url":
|
|
900
|
-
"form-fields":
|
|
885
|
+
"fetch-url": pe.value,
|
|
886
|
+
"form-fields": N.value,
|
|
901
887
|
"is-readonly": e.isReadonly,
|
|
902
|
-
onCancel:
|
|
888
|
+
onCancel: R,
|
|
903
889
|
"onFetch:error": i[25] || (i[25] = (c) => t.$emit("error", c)),
|
|
904
|
-
"onFetch:success":
|
|
890
|
+
"onFetch:success": re,
|
|
905
891
|
onLoading: i[26] || (i[26] = (c) => t.$emit("loading", c)),
|
|
906
|
-
onSubmit:
|
|
892
|
+
onSubmit: Z
|
|
907
893
|
}, {
|
|
908
894
|
"form-actions": p(() => [
|
|
909
|
-
|
|
910
|
-
canSubmit:
|
|
911
|
-
cancel:
|
|
912
|
-
submit:
|
|
895
|
+
Be(t.$slots, "form-actions", {
|
|
896
|
+
canSubmit: Q.value,
|
|
897
|
+
cancel: R,
|
|
898
|
+
submit: Z
|
|
913
899
|
}, void 0, !0)
|
|
914
900
|
]),
|
|
915
901
|
default: p(() => [
|
|
916
|
-
u(o(
|
|
902
|
+
u(o(Pe), {
|
|
917
903
|
description: o(s)("gateway_services.form.sections.general.description"),
|
|
918
904
|
"hide-info-header": n.hideSectionsInfo,
|
|
919
905
|
title: o(s)("gateway_services.form.sections.general.title")
|
|
920
906
|
}, {
|
|
921
907
|
default: p(() => [
|
|
922
|
-
u(
|
|
908
|
+
u(g, {
|
|
923
909
|
modelValue: e.fields.name,
|
|
924
910
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => e.fields.name = c),
|
|
925
911
|
modelModifiers: { trim: !0 },
|
|
926
912
|
autocomplete: "off",
|
|
927
913
|
"data-testid": "gateway-service-name-input",
|
|
928
|
-
error:
|
|
929
|
-
"error-message":
|
|
914
|
+
error: ve.value,
|
|
915
|
+
"error-message": H.value,
|
|
930
916
|
label: o(s)("gateway_services.form.fields.name.label"),
|
|
931
917
|
"label-attributes": {
|
|
932
918
|
info: o(s)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -936,9 +922,9 @@ const pe = {
|
|
|
936
922
|
placeholder: o(s)("gateway_services.form.fields.name.placeholder"),
|
|
937
923
|
readonly: e.isReadonly,
|
|
938
924
|
type: "text",
|
|
939
|
-
onInput:
|
|
925
|
+
onInput: he
|
|
940
926
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
941
|
-
u(
|
|
927
|
+
u(g, {
|
|
942
928
|
modelValue: e.fields.tags,
|
|
943
929
|
"onUpdate:modelValue": i[1] || (i[1] = (c) => e.fields.tags = c),
|
|
944
930
|
modelModifiers: { trim: !0 },
|
|
@@ -958,28 +944,28 @@ const pe = {
|
|
|
958
944
|
]),
|
|
959
945
|
_: 1
|
|
960
946
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
961
|
-
u(o(
|
|
947
|
+
u(o(Pe), {
|
|
962
948
|
description: o(s)("gateway_services.form.sections.keys.description"),
|
|
963
949
|
"hide-info-header": n.hideSectionsInfo,
|
|
964
950
|
title: o(s)("gateway_services.form.sections.keys.title")
|
|
965
951
|
}, {
|
|
966
952
|
default: p(() => [
|
|
967
|
-
D.value ? L("", !0) : (
|
|
968
|
-
|
|
969
|
-
u(
|
|
953
|
+
D.value ? L("", !0) : (S(), U("div", gt, [
|
|
954
|
+
C("div", yt, [
|
|
955
|
+
u(P, { required: "" }, {
|
|
970
956
|
default: p(() => [
|
|
971
957
|
E(_(o(s)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
972
958
|
]),
|
|
973
959
|
_: 1
|
|
974
960
|
})
|
|
975
961
|
]),
|
|
976
|
-
|
|
962
|
+
C("div", _t, [
|
|
977
963
|
u(a, {
|
|
978
|
-
modelValue:
|
|
979
|
-
"onUpdate:modelValue": i[2] || (i[2] = (c) =>
|
|
964
|
+
modelValue: w.value,
|
|
965
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => w.value = c),
|
|
980
966
|
"data-testid": "gateway-service-url-radio",
|
|
981
|
-
"selected-value":
|
|
982
|
-
onChange:
|
|
967
|
+
"selected-value": O.url,
|
|
968
|
+
onChange: ie
|
|
983
969
|
}, {
|
|
984
970
|
default: p(() => [
|
|
985
971
|
E(_(o(s)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
@@ -987,8 +973,8 @@ const pe = {
|
|
|
987
973
|
_: 1
|
|
988
974
|
}, 8, ["modelValue", "selected-value"])
|
|
989
975
|
]),
|
|
990
|
-
|
|
991
|
-
u(
|
|
976
|
+
w.value === "url" ? (S(), U("div", bt, [
|
|
977
|
+
u(g, {
|
|
992
978
|
modelValue: e.fields.url,
|
|
993
979
|
"onUpdate:modelValue": i[3] || (i[3] = (c) => e.fields.url = c),
|
|
994
980
|
modelModifiers: { trim: !0 },
|
|
@@ -1005,12 +991,12 @@ const pe = {
|
|
|
1005
991
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1006
992
|
])) : L("", !0),
|
|
1007
993
|
u(a, {
|
|
1008
|
-
modelValue:
|
|
1009
|
-
"onUpdate:modelValue": i[4] || (i[4] = (c) =>
|
|
994
|
+
modelValue: w.value,
|
|
995
|
+
"onUpdate:modelValue": i[4] || (i[4] = (c) => w.value = c),
|
|
1010
996
|
"checked-group": "protocol",
|
|
1011
997
|
"data-testid": "gateway-service-protocol-radio",
|
|
1012
|
-
"selected-value":
|
|
1013
|
-
onChange:
|
|
998
|
+
"selected-value": O.protocol,
|
|
999
|
+
onChange: ie
|
|
1014
1000
|
}, {
|
|
1015
1001
|
default: p(() => [
|
|
1016
1002
|
E(_(o(s)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
@@ -1018,12 +1004,12 @@ const pe = {
|
|
|
1018
1004
|
_: 1
|
|
1019
1005
|
}, 8, ["modelValue", "selected-value"])
|
|
1020
1006
|
])),
|
|
1021
|
-
|
|
1007
|
+
w.value === "protocol" || D.value ? (S(), U("div", ht, [
|
|
1022
1008
|
u(f, {
|
|
1023
1009
|
modelValue: e.fields.protocol,
|
|
1024
1010
|
"onUpdate:modelValue": i[5] || (i[5] = (c) => e.fields.protocol = c),
|
|
1025
1011
|
"data-testid": "gateway-service-protocol-select",
|
|
1026
|
-
items:
|
|
1012
|
+
items: ge,
|
|
1027
1013
|
label: o(s)("gateway_services.form.fields.protocol.label"),
|
|
1028
1014
|
"label-attributes": {
|
|
1029
1015
|
info: o(s)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -1032,9 +1018,9 @@ const pe = {
|
|
|
1032
1018
|
readonly: e.isReadonly,
|
|
1033
1019
|
required: "",
|
|
1034
1020
|
width: "100%",
|
|
1035
|
-
onSelected: i[6] || (i[6] = (c) =>
|
|
1021
|
+
onSelected: i[6] || (i[6] = (c) => T(e.fields.protocol, c))
|
|
1036
1022
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1037
|
-
u(
|
|
1023
|
+
u(g, {
|
|
1038
1024
|
modelValue: e.fields.host,
|
|
1039
1025
|
"onUpdate:modelValue": i[7] || (i[7] = (c) => e.fields.host = c),
|
|
1040
1026
|
modelModifiers: { trim: !0 },
|
|
@@ -1049,8 +1035,8 @@ const pe = {
|
|
|
1049
1035
|
placeholder: o(s)("gateway_services.form.fields.host.placeholder"),
|
|
1050
1036
|
required: ""
|
|
1051
1037
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1052
|
-
|
|
1053
|
-
u(
|
|
1038
|
+
se.value ? (S(), U("div", wt, [
|
|
1039
|
+
u(g, {
|
|
1054
1040
|
modelValue: e.fields.path,
|
|
1055
1041
|
"onUpdate:modelValue": i[8] || (i[8] = (c) => e.fields.path = c),
|
|
1056
1042
|
modelModifiers: { trim: !0 },
|
|
@@ -1065,7 +1051,7 @@ const pe = {
|
|
|
1065
1051
|
placeholder: o(s)("gateway_services.form.fields.path.placeholder")
|
|
1066
1052
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1067
1053
|
])) : L("", !0),
|
|
1068
|
-
u(
|
|
1054
|
+
u(g, {
|
|
1069
1055
|
modelValue: e.fields.port,
|
|
1070
1056
|
"onUpdate:modelValue": [
|
|
1071
1057
|
i[9] || (i[9] = (c) => e.fields.port = c),
|
|
@@ -1084,17 +1070,17 @@ const pe = {
|
|
|
1084
1070
|
type: "number"
|
|
1085
1071
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1086
1072
|
])) : L("", !0),
|
|
1087
|
-
u(
|
|
1088
|
-
modelValue:
|
|
1089
|
-
"onUpdate:modelValue": i[24] || (i[24] = (c) =>
|
|
1073
|
+
u(k, {
|
|
1074
|
+
modelValue: M.value,
|
|
1075
|
+
"onUpdate:modelValue": i[24] || (i[24] = (c) => M.value = c),
|
|
1090
1076
|
"data-testid": "advanced-fields-collapse",
|
|
1091
1077
|
"trigger-alignment": "leading",
|
|
1092
1078
|
"trigger-label": o(s)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1093
1079
|
}, {
|
|
1094
1080
|
default: p(() => [
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
u(
|
|
1081
|
+
C("div", kt, [
|
|
1082
|
+
C("div", Vt, [
|
|
1083
|
+
u(g, {
|
|
1098
1084
|
modelValue: e.fields.retries,
|
|
1099
1085
|
"onUpdate:modelValue": [
|
|
1100
1086
|
i[11] || (i[11] = (c) => e.fields.retries = c),
|
|
@@ -1114,8 +1100,8 @@ const pe = {
|
|
|
1114
1100
|
type: "number"
|
|
1115
1101
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1116
1102
|
]),
|
|
1117
|
-
|
|
1118
|
-
u(
|
|
1103
|
+
C("div", Ct, [
|
|
1104
|
+
u(g, {
|
|
1119
1105
|
modelValue: e.fields.connect_timeout,
|
|
1120
1106
|
"onUpdate:modelValue": [
|
|
1121
1107
|
i[13] || (i[13] = (c) => e.fields.connect_timeout = c),
|
|
@@ -1135,8 +1121,8 @@ const pe = {
|
|
|
1135
1121
|
type: "number"
|
|
1136
1122
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1137
1123
|
]),
|
|
1138
|
-
|
|
1139
|
-
u(
|
|
1124
|
+
C("div", St, [
|
|
1125
|
+
u(g, {
|
|
1140
1126
|
modelValue: e.fields.write_timeout,
|
|
1141
1127
|
"onUpdate:modelValue": [
|
|
1142
1128
|
i[15] || (i[15] = (c) => e.fields.write_timeout = c),
|
|
@@ -1156,8 +1142,8 @@ const pe = {
|
|
|
1156
1142
|
type: "number"
|
|
1157
1143
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1158
1144
|
]),
|
|
1159
|
-
|
|
1160
|
-
u(
|
|
1145
|
+
C("div", It, [
|
|
1146
|
+
u(g, {
|
|
1161
1147
|
modelValue: e.fields.read_timeout,
|
|
1162
1148
|
"onUpdate:modelValue": [
|
|
1163
1149
|
i[17] || (i[17] = (c) => e.fields.read_timeout = c),
|
|
@@ -1177,8 +1163,8 @@ const pe = {
|
|
|
1177
1163
|
type: "number"
|
|
1178
1164
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1179
1165
|
]),
|
|
1180
|
-
|
|
1181
|
-
u(
|
|
1166
|
+
ye.value ? (S(), U("div", Tt, [
|
|
1167
|
+
u(g, {
|
|
1182
1168
|
modelValue: e.fields.client_certificate,
|
|
1183
1169
|
"onUpdate:modelValue": i[19] || (i[19] = (c) => e.fields.client_certificate = c),
|
|
1184
1170
|
modelModifiers: { trim: !0 },
|
|
@@ -1195,8 +1181,8 @@ const pe = {
|
|
|
1195
1181
|
type: "text"
|
|
1196
1182
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1197
1183
|
])) : L("", !0),
|
|
1198
|
-
|
|
1199
|
-
u(
|
|
1184
|
+
_e.value ? (S(), U("div", Pt, [
|
|
1185
|
+
u(g, {
|
|
1200
1186
|
modelValue: e.fields.ca_certificates,
|
|
1201
1187
|
"onUpdate:modelValue": i[20] || (i[20] = (c) => e.fields.ca_certificates = c),
|
|
1202
1188
|
modelModifiers: { trim: !0 },
|
|
@@ -1209,15 +1195,15 @@ const pe = {
|
|
|
1209
1195
|
type: "text"
|
|
1210
1196
|
}, {
|
|
1211
1197
|
"label-tooltip": p(() => [
|
|
1212
|
-
u(o(
|
|
1198
|
+
u(o(K), {
|
|
1213
1199
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1214
1200
|
scope: "global"
|
|
1215
1201
|
}, {
|
|
1216
1202
|
code1: p(() => [
|
|
1217
|
-
|
|
1203
|
+
C("code", null, _(o(s)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1218
1204
|
]),
|
|
1219
1205
|
code2: p(() => [
|
|
1220
|
-
|
|
1206
|
+
C("code", null, _(o(s)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1221
1207
|
]),
|
|
1222
1208
|
_: 1
|
|
1223
1209
|
})
|
|
@@ -1225,7 +1211,7 @@ const pe = {
|
|
|
1225
1211
|
_: 1
|
|
1226
1212
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1227
1213
|
])) : L("", !0),
|
|
1228
|
-
|
|
1214
|
+
be.value ? (S(), U("div", Ut, [
|
|
1229
1215
|
u(l, {
|
|
1230
1216
|
modelValue: e.fields.tls_verify_enabled,
|
|
1231
1217
|
"onUpdate:modelValue": i[21] || (i[21] = (c) => e.fields.tls_verify_enabled = c),
|
|
@@ -1235,19 +1221,19 @@ const pe = {
|
|
|
1235
1221
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1236
1222
|
}, {
|
|
1237
1223
|
tooltip: p(() => [
|
|
1238
|
-
u(o(
|
|
1224
|
+
u(o(K), {
|
|
1239
1225
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1240
1226
|
scope: "global"
|
|
1241
1227
|
}, {
|
|
1242
1228
|
code1: p(() => [
|
|
1243
|
-
|
|
1229
|
+
C("code", null, _(o(s)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1244
1230
|
]),
|
|
1245
1231
|
_: 1
|
|
1246
1232
|
})
|
|
1247
1233
|
]),
|
|
1248
1234
|
_: 1
|
|
1249
1235
|
}, 8, ["modelValue", "description", "label"]),
|
|
1250
|
-
e.fields.tls_verify_enabled ? (
|
|
1236
|
+
e.fields.tls_verify_enabled ? (S(), U("div", Et, [
|
|
1251
1237
|
u(a, {
|
|
1252
1238
|
modelValue: e.fields.tls_verify_value,
|
|
1253
1239
|
"onUpdate:modelValue": i[22] || (i[22] = (c) => e.fields.tls_verify_value = c),
|
|
@@ -1256,7 +1242,7 @@ const pe = {
|
|
|
1256
1242
|
"selected-value": !0
|
|
1257
1243
|
}, null, 8, ["modelValue", "label"])
|
|
1258
1244
|
])) : L("", !0),
|
|
1259
|
-
e.fields.tls_verify_enabled ? (
|
|
1245
|
+
e.fields.tls_verify_enabled ? (S(), U("div", Mt, [
|
|
1260
1246
|
u(a, {
|
|
1261
1247
|
modelValue: e.fields.tls_verify_value,
|
|
1262
1248
|
"onUpdate:modelValue": i[23] || (i[23] = (c) => e.fields.tls_verify_value = c),
|
|
@@ -1279,7 +1265,7 @@ const pe = {
|
|
|
1279
1265
|
]);
|
|
1280
1266
|
};
|
|
1281
1267
|
}
|
|
1282
|
-
}),
|
|
1268
|
+
}), Lt = /* @__PURE__ */ Re(Rt, [["__scopeId", "data-v-35e0db56"]]), xt = { class: "kong-ui-gateway-service-entity-config-card" }, Kt = /* @__PURE__ */ Ve({
|
|
1283
1269
|
__name: "GatewayServiceConfigCard",
|
|
1284
1270
|
props: {
|
|
1285
1271
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1306,7 +1292,7 @@ const pe = {
|
|
|
1306
1292
|
},
|
|
1307
1293
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1308
1294
|
setup(n) {
|
|
1309
|
-
const $ = n, { i18n: { t: m }, i18nT: d } =
|
|
1295
|
+
const $ = n, { i18n: { t: m }, i18nT: d } = ue.useI18n(), r = h(() => oe.form[$.config.app].edit), { getPropValue: M } = et(), W = (s, I) => M(s, I) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), K = V({
|
|
1310
1296
|
id: {},
|
|
1311
1297
|
name: {
|
|
1312
1298
|
tooltip: m("gateway_services.form.fields.name.tooltip")
|
|
@@ -1315,19 +1301,19 @@ const pe = {
|
|
|
1315
1301
|
updated_at: {},
|
|
1316
1302
|
created_at: {},
|
|
1317
1303
|
protocol: {
|
|
1318
|
-
section:
|
|
1304
|
+
section: ne.Basic,
|
|
1319
1305
|
tooltip: m("gateway_services.form.fields.protocol.tooltip")
|
|
1320
1306
|
},
|
|
1321
1307
|
host: {
|
|
1322
|
-
section:
|
|
1308
|
+
section: ne.Basic,
|
|
1323
1309
|
tooltip: m("gateway_services.form.fields.host.tooltip")
|
|
1324
1310
|
},
|
|
1325
1311
|
path: {
|
|
1326
|
-
section:
|
|
1312
|
+
section: ne.Basic,
|
|
1327
1313
|
tooltip: m("gateway_services.form.fields.path.tooltip")
|
|
1328
1314
|
},
|
|
1329
1315
|
port: {
|
|
1330
|
-
section:
|
|
1316
|
+
section: ne.Basic,
|
|
1331
1317
|
tooltip: m("gateway_services.form.fields.port.tooltip")
|
|
1332
1318
|
},
|
|
1333
1319
|
tags: {
|
|
@@ -1355,7 +1341,7 @@ const pe = {
|
|
|
1355
1341
|
tooltip: m("gateway_services.form.fields.client_certificate.tooltip")
|
|
1356
1342
|
},
|
|
1357
1343
|
ca_certificates: {
|
|
1358
|
-
type:
|
|
1344
|
+
type: tt.BadgeTag,
|
|
1359
1345
|
label: m("gateway_services.form.fields.ca_certificates.label"),
|
|
1360
1346
|
order: 6
|
|
1361
1347
|
},
|
|
@@ -1366,17 +1352,17 @@ const pe = {
|
|
|
1366
1352
|
hidden: !0
|
|
1367
1353
|
}
|
|
1368
1354
|
});
|
|
1369
|
-
return (s,
|
|
1370
|
-
u(o(
|
|
1355
|
+
return (s, I) => (S(), U("div", xt, [
|
|
1356
|
+
u(o(lt), {
|
|
1371
1357
|
config: n.config,
|
|
1372
1358
|
"config-card-doc": n.configCardDoc,
|
|
1373
|
-
"config-schema":
|
|
1374
|
-
"entity-type": o(
|
|
1359
|
+
"config-schema": K.value,
|
|
1360
|
+
"entity-type": o(Me).GatewayService,
|
|
1375
1361
|
"fetch-url": r.value,
|
|
1376
1362
|
"hide-title": n.hideTitle,
|
|
1377
|
-
"onFetch:error":
|
|
1378
|
-
"onFetch:success":
|
|
1379
|
-
onLoading:
|
|
1363
|
+
"onFetch:error": I[0] || (I[0] = (b) => s.$emit("fetch:error", b)),
|
|
1364
|
+
"onFetch:success": I[1] || (I[1] = (b) => s.$emit("fetch:success", b)),
|
|
1365
|
+
onLoading: I[2] || (I[2] = (b) => s.$emit("loading", b))
|
|
1380
1366
|
}, {
|
|
1381
1367
|
"enabled-label-tooltip": p(() => [
|
|
1382
1368
|
u(o(d), {
|
|
@@ -1384,10 +1370,10 @@ const pe = {
|
|
|
1384
1370
|
scope: "global"
|
|
1385
1371
|
}, {
|
|
1386
1372
|
false: p(() => [
|
|
1387
|
-
|
|
1373
|
+
C("code", null, _(o(m)("gateway_services.form.fields.enabled.false")), 1)
|
|
1388
1374
|
]),
|
|
1389
1375
|
true: p(() => [
|
|
1390
|
-
|
|
1376
|
+
C("code", null, _(o(m)("gateway_services.form.fields.enabled.true")), 1)
|
|
1391
1377
|
]),
|
|
1392
1378
|
_: 1
|
|
1393
1379
|
})
|
|
@@ -1398,10 +1384,10 @@ const pe = {
|
|
|
1398
1384
|
scope: "global"
|
|
1399
1385
|
}, {
|
|
1400
1386
|
code1: p(() => [
|
|
1401
|
-
|
|
1387
|
+
C("code", null, _(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1402
1388
|
]),
|
|
1403
1389
|
code2: p(() => [
|
|
1404
|
-
|
|
1390
|
+
C("code", null, _(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1405
1391
|
]),
|
|
1406
1392
|
_: 1
|
|
1407
1393
|
})
|
|
@@ -1412,16 +1398,16 @@ const pe = {
|
|
|
1412
1398
|
scope: "global"
|
|
1413
1399
|
}, {
|
|
1414
1400
|
code1: p(() => [
|
|
1415
|
-
|
|
1401
|
+
C("code", null, _(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1416
1402
|
]),
|
|
1417
1403
|
_: 1
|
|
1418
1404
|
})
|
|
1419
1405
|
]),
|
|
1420
1406
|
tls_verify: p((b) => [
|
|
1421
|
-
E(_(typeof o(
|
|
1407
|
+
E(_(typeof o(M)("rowValue", b) == "boolean" ? W("rowValue", b) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1422
1408
|
]),
|
|
1423
1409
|
client_certificate: p((b) => [
|
|
1424
|
-
E(_(o(
|
|
1410
|
+
E(_(o(M)("rowValue", b) ? o(M)("rowValue", b).id : "–"), 1)
|
|
1425
1411
|
]),
|
|
1426
1412
|
_: 1
|
|
1427
1413
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1429,7 +1415,7 @@ const pe = {
|
|
|
1429
1415
|
}
|
|
1430
1416
|
});
|
|
1431
1417
|
export {
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1418
|
+
Kt as GatewayServiceConfigCard,
|
|
1419
|
+
Lt as GatewayServiceForm,
|
|
1420
|
+
Gt as GatewayServiceList
|
|
1435
1421
|
};
|