@kong-ui-public/entities-gateway-services 3.10.3 → 3.10.4-pr.1990.f7a2d582d.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/dist/entities-gateway-services.es.js +328 -328
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceConfigCard.vue.d.ts.map +1 -1
- package/dist/types/components/GatewayServiceForm.vue.d.ts.map +1 -1
- package/dist/types/components/GatewayServiceList.vue.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Ee, computed as b, ref as P, watch as Te, onBeforeMount as Be, resolveComponent as F, openBlock as I, createElementBlock as K, createVNode as d, unref as l, createSlots as Le, withCtx as f, createBlock as fe, Teleport as Pe, createElementVNode as C, createCommentVNode as L, createTextVNode as M, toDisplayString as h, withModifiers as Ie, reactive as Ue, onMounted as De, renderSlot as Ge } from "vue";
|
|
2
2
|
import { useRouter as $e } from "vue-router";
|
|
3
|
-
import { BookIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as xe, useTableState as
|
|
6
|
-
const
|
|
3
|
+
import { BookIcon as Ke, AddIcon as qe, ServicesIcon as Oe } from "@kong/icons";
|
|
4
|
+
import { createI18n as Ne, i18nTComponent as We } from "@kong-ui-public/i18n";
|
|
5
|
+
import { AppType as g, useAxios as xe, useTableState as je, useFetcher as He, useDeleteUrlBuilder as ze, FetcherStatus as Je, EntityBaseTable as Qe, EntityFilter as Xe, PermissionsWrapper as se, TableTags as Ze, EntityEmptyState as Ye, EntityToggleModal as et, EntityDeleteModal as tt, EntityTypes as lt, useErrors as ot, useValidators as it, EntityBaseFormType as Re, useGatewayFeatureSupported as st, EntityBaseForm as rt, SupportedEntityType as Ae, EntityFormSection as Me, useHelpers as at, ConfigurationSchemaSection as pe, ConfigurationSchemaType as nt, EntityBaseConfigCard as ct } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const dt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
9
9
|
copy_id: "Copy ID",
|
|
@@ -16,12 +16,12 @@ const ct = {
|
|
|
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
|
+
}, ut = {
|
|
20
20
|
placeholder: {
|
|
21
21
|
konnect: "Filter by name",
|
|
22
22
|
kongManager: "Filter by exact name or ID"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, ft = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -169,33 +169,33 @@ const ct = {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, pt = {
|
|
173
173
|
general: "Gateway Services could not be retrieved",
|
|
174
174
|
delete: "The gateway service could not be deleted at this time.",
|
|
175
175
|
copy: "Failed to copy to clipboard",
|
|
176
176
|
urlErrorMessage: "Error: invalid URL"
|
|
177
|
-
},
|
|
177
|
+
}, mt = {
|
|
178
178
|
success: "Copied {val} to clipboard",
|
|
179
179
|
success_brief: "Successfully copied to clipboard"
|
|
180
|
-
}, mt = {
|
|
181
|
-
gateway_services: "gateway services"
|
|
182
180
|
}, vt = {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
gateway_services: "gateway services"
|
|
182
|
+
}, yt = {
|
|
183
|
+
actions: dt,
|
|
184
|
+
search: ut,
|
|
185
|
+
gateway_services: ft,
|
|
186
|
+
errors: pt,
|
|
187
|
+
copy: mt,
|
|
188
|
+
glossary: vt
|
|
189
189
|
};
|
|
190
190
|
function gt() {
|
|
191
|
-
const n =
|
|
191
|
+
const n = Ne("en-us", yt);
|
|
192
192
|
return {
|
|
193
193
|
i18n: n,
|
|
194
|
-
i18nT:
|
|
194
|
+
i18nT: We(n)
|
|
195
195
|
// Translation component <i18n-t>
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function _t() {
|
|
199
199
|
return {
|
|
200
200
|
getPortFromProtocol: (D, p) => {
|
|
201
201
|
const c = [80, 443], r = Number(p);
|
|
@@ -217,38 +217,38 @@ function yt() {
|
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const ye = {
|
|
221
221
|
useI18n: gt,
|
|
222
|
-
usePortFromProtocol:
|
|
223
|
-
},
|
|
222
|
+
usePortFromProtocol: _t
|
|
223
|
+
}, me = "/v2/control-planes/{controlPlaneId}/core-entities", ve = "/{workspace}", re = {
|
|
224
224
|
list: {
|
|
225
225
|
konnect: {
|
|
226
|
-
all: `${
|
|
226
|
+
all: `${me}/services`
|
|
227
227
|
},
|
|
228
228
|
kongManager: {
|
|
229
|
-
all: `${
|
|
229
|
+
all: `${ve}/services`
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
form: {
|
|
233
233
|
konnect: {
|
|
234
|
-
create: `${pe}/services`,
|
|
235
|
-
validate: `${pe}/v1/schemas/json/service/validate`,
|
|
236
|
-
edit: `${pe}/services/{id}`
|
|
237
|
-
},
|
|
238
|
-
kongManager: {
|
|
239
234
|
create: `${me}/services`,
|
|
240
|
-
validate: `${me}/schemas/
|
|
235
|
+
validate: `${me}/v1/schemas/json/service/validate`,
|
|
241
236
|
edit: `${me}/services/{id}`
|
|
237
|
+
},
|
|
238
|
+
kongManager: {
|
|
239
|
+
create: `${ve}/services`,
|
|
240
|
+
validate: `${ve}/schemas/services/validate`,
|
|
241
|
+
edit: `${ve}/services/{id}`
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
},
|
|
244
|
+
}, bt = "#00abd2", ht = "24px", wt = { class: "kong-ui-entities-gateway-services-list" }, kt = { class: "button-row" }, Ct = { class: "empty-state-icon-gateway" }, Vt = { key: 1 }, St = /* @__PURE__ */ Ee({
|
|
245
245
|
__name: "GatewayServiceList",
|
|
246
246
|
props: {
|
|
247
247
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
248
248
|
config: {
|
|
249
249
|
type: Object,
|
|
250
250
|
required: !0,
|
|
251
|
-
validator: (n) => !(!n || ![
|
|
251
|
+
validator: (n) => !(!n || ![g.Konnect, g.KongManager].includes(n == null ? void 0 : n.app) || !n.createRoute || !n.getViewRoute || !n.getEditRoute || n.app === g.KongManager && !n.isExactMatch && !n.filterSchema)
|
|
252
252
|
},
|
|
253
253
|
// used to override the default identifier for the cache entry
|
|
254
254
|
cacheIdentifier: {
|
|
@@ -301,7 +301,7 @@ const ve = {
|
|
|
301
301
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
302
302
|
setup(n, { emit: D }) {
|
|
303
303
|
var o;
|
|
304
|
-
const p = D, c = n, { i18n: { t: r, formatUnixTimeStamp: $ } } =
|
|
304
|
+
const p = D, c = n, { i18n: { t: r, formatUnixTimeStamp: $ } } = ye.useI18n(), W = $e(), { axiosInstance: O } = xe((o = c.config) == null ? void 0 : o.axiosRequestConfig), { hasRecords: a, handleStateChange: U } = je(() => G.value), V = b(() => a.value && c.config.app === g.Konnect), ge = b(() => !c.enableV2EmptyStates && c.config.app === g.Konnect), _e = b(() => c.config.app !== g.KongManager || !!c.config.disableSorting), N = {
|
|
305
305
|
// the Name column is non-hidable
|
|
306
306
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
307
307
|
...c.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -313,71 +313,71 @@ const ve = {
|
|
|
313
313
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
314
314
|
updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
315
315
|
created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
316
|
-
},
|
|
316
|
+
}, be = {
|
|
317
317
|
columnVisibility: {
|
|
318
318
|
created_at: !1
|
|
319
319
|
}
|
|
320
|
-
},
|
|
321
|
-
var s,
|
|
322
|
-
let u = `${c.config.apiBaseUrl}${
|
|
323
|
-
return c.config.app ===
|
|
324
|
-
}),
|
|
325
|
-
const u = c.config.app ===
|
|
320
|
+
}, z = N, _ = b(() => {
|
|
321
|
+
var s, y;
|
|
322
|
+
let u = `${c.config.apiBaseUrl}${re.list[c.config.app].all}`;
|
|
323
|
+
return c.config.app === g.Konnect ? u = u.replace(/{controlPlaneId}/gi, ((s = c.config) == null ? void 0 : s.controlPlaneId) || "") : c.config.app === g.KongManager && (u = u.replace(/\/{workspace}/gi, (y = c.config) != null && y.workspace ? `/${c.config.workspace}` : "")), u;
|
|
324
|
+
}), ee = b(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${_.value}`) : new URL(_.value)), G = P(""), he = b(() => {
|
|
325
|
+
const u = c.config.app === g.Konnect || c.config.isExactMatch;
|
|
326
326
|
if (u)
|
|
327
327
|
return {
|
|
328
328
|
isExactMatch: u,
|
|
329
329
|
placeholder: r(`search.placeholder.${c.config.app}`)
|
|
330
330
|
};
|
|
331
|
-
const { name: s, enabled:
|
|
331
|
+
const { name: s, enabled: y, protocol: T, host: Y, port: x, path: ue } = N;
|
|
332
332
|
return {
|
|
333
333
|
isExactMatch: u,
|
|
334
|
-
fields: { name: s, enabled:
|
|
334
|
+
fields: { name: s, enabled: y, protocol: T, host: Y, port: x, path: ue },
|
|
335
335
|
schema: c.config.filterSchema
|
|
336
336
|
};
|
|
337
337
|
}), {
|
|
338
338
|
fetcher: e,
|
|
339
|
-
fetcherState:
|
|
340
|
-
fetcherCacheKey:
|
|
341
|
-
} =
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
},
|
|
339
|
+
fetcherState: k,
|
|
340
|
+
fetcherCacheKey: te
|
|
341
|
+
} = He({ ...c.config, cacheIdentifier: c.cacheIdentifier }, _.value), we = () => {
|
|
342
|
+
G.value = "";
|
|
343
|
+
}, ae = () => {
|
|
344
|
+
te.value++;
|
|
345
|
+
}, J = P(null), j = b(() => ({
|
|
346
346
|
ctaPath: c.config.createRoute,
|
|
347
|
-
ctaText:
|
|
347
|
+
ctaText: w.value ? c.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
|
|
348
348
|
message: `${r("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
|
|
349
|
-
title:
|
|
350
|
-
})),
|
|
349
|
+
title: w.value ? c.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
350
|
+
})), Q = P(!1), E = P(null), X = b(() => {
|
|
351
351
|
const u = {
|
|
352
352
|
action: "disable",
|
|
353
353
|
id: "",
|
|
354
354
|
name: ""
|
|
355
355
|
};
|
|
356
|
-
if (
|
|
357
|
-
const { enabled: s, id:
|
|
358
|
-
u.action = s ? "disable" : "enable", u.id =
|
|
356
|
+
if (E.value) {
|
|
357
|
+
const { enabled: s, id: y, name: T } = E.value;
|
|
358
|
+
u.action = s ? "disable" : "enable", u.id = y, u.name = T || y;
|
|
359
359
|
}
|
|
360
360
|
return u;
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
var
|
|
367
|
-
if (!await ((
|
|
361
|
+
}), ke = (u) => {
|
|
362
|
+
Q.value = !0, E.value = u;
|
|
363
|
+
}, ne = () => {
|
|
364
|
+
Q.value = !1, E.value = null;
|
|
365
|
+
}, Ce = async () => {
|
|
366
|
+
var T, Y;
|
|
367
|
+
if (!await ((T = c.canEdit) == null ? void 0 : T.call(c, E.value)) || !E.value)
|
|
368
368
|
return;
|
|
369
|
-
const s = `${
|
|
369
|
+
const s = `${ee.value.href}/${E.value.id}`, y = !E.value.enabled;
|
|
370
370
|
try {
|
|
371
|
-
const { data: x } = ((
|
|
372
|
-
p("toggle:success", x),
|
|
371
|
+
const { data: x } = ((Y = c.config) == null ? void 0 : Y.app) === g.Konnect ? await O.put(s, { ...E.value, enabled: y }) : await O.patch(s, { ...E.value, enabled: y });
|
|
372
|
+
p("toggle:success", x), E.value.enabled = y;
|
|
373
373
|
} catch (x) {
|
|
374
374
|
p("error", x);
|
|
375
375
|
}
|
|
376
|
-
},
|
|
377
|
-
c.config.getControlPlaneRoute &&
|
|
378
|
-
},
|
|
379
|
-
const
|
|
380
|
-
if (!s(
|
|
376
|
+
}, Ve = (u) => {
|
|
377
|
+
c.config.getControlPlaneRoute && W.push(c.config.getControlPlaneRoute(u));
|
|
378
|
+
}, le = (u, s) => {
|
|
379
|
+
const y = u.id;
|
|
380
|
+
if (!s(y)) {
|
|
381
381
|
p("copy:error", {
|
|
382
382
|
entity: u,
|
|
383
383
|
field: "id",
|
|
@@ -388,11 +388,11 @@ const ve = {
|
|
|
388
388
|
p("copy:success", {
|
|
389
389
|
entity: u,
|
|
390
390
|
field: "id",
|
|
391
|
-
message: r("copy.success", { val:
|
|
391
|
+
message: r("copy.success", { val: y })
|
|
392
392
|
});
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
if (!s(
|
|
393
|
+
}, ce = (u, s) => {
|
|
394
|
+
const y = JSON.stringify(u);
|
|
395
|
+
if (!s(y)) {
|
|
396
396
|
p("copy:error", {
|
|
397
397
|
entity: u,
|
|
398
398
|
message: r("errors.copy")
|
|
@@ -403,82 +403,82 @@ const ve = {
|
|
|
403
403
|
entity: u,
|
|
404
404
|
message: r("copy.success_brief")
|
|
405
405
|
});
|
|
406
|
-
},
|
|
407
|
-
var
|
|
408
|
-
await ((
|
|
409
|
-
},
|
|
406
|
+
}, de = async (u) => {
|
|
407
|
+
var y;
|
|
408
|
+
await ((y = c.canRetrieve) == null ? void 0 : y.call(c, u)) && W.push(c.config.getViewRoute(u.id));
|
|
409
|
+
}, Se = (u) => ({
|
|
410
410
|
label: r("actions.view"),
|
|
411
411
|
to: c.config.getViewRoute(u)
|
|
412
|
-
}),
|
|
412
|
+
}), oe = (u) => ({
|
|
413
413
|
label: r("actions.edit"),
|
|
414
414
|
to: c.config.getEditRoute(u)
|
|
415
|
-
}), B =
|
|
416
|
-
B.value = u,
|
|
415
|
+
}), B = P(void 0), q = P(!1), H = P(!1), Z = P(""), t = ze(c.config, _.value), i = (u) => {
|
|
416
|
+
B.value = u, q.value = !0, Z.value = "";
|
|
417
417
|
}, v = () => {
|
|
418
|
-
|
|
418
|
+
q.value = !1, B.value = void 0;
|
|
419
419
|
}, R = async () => {
|
|
420
|
-
var u, s,
|
|
420
|
+
var u, s, y;
|
|
421
421
|
if ((u = B.value) != null && u.id) {
|
|
422
|
-
|
|
422
|
+
H.value = !0;
|
|
423
423
|
try {
|
|
424
|
-
await
|
|
425
|
-
} catch (
|
|
426
|
-
|
|
424
|
+
await O.delete(t(B.value.id)), p("delete:success", B.value), v(), te.value++;
|
|
425
|
+
} catch (T) {
|
|
426
|
+
Z.value = ((y = (s = T.response) == null ? void 0 : s.data) == null ? void 0 : y.message) || T.message || r("errors.delete"), p("error", T);
|
|
427
427
|
} finally {
|
|
428
|
-
|
|
428
|
+
H.value = !1;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, S = () => {
|
|
432
|
+
W.push(c.config.createRoute);
|
|
433
433
|
};
|
|
434
|
-
|
|
435
|
-
var s,
|
|
436
|
-
if (u.status ===
|
|
437
|
-
|
|
434
|
+
Te(k, (u) => {
|
|
435
|
+
var s, y, T;
|
|
436
|
+
if (u.status === Je.Error) {
|
|
437
|
+
J.value = {
|
|
438
438
|
title: r("errors.general")
|
|
439
|
-
}, (
|
|
439
|
+
}, (T = (y = (s = u.error) == null ? void 0 : s.response) == null ? void 0 : y.data) != null && T.message && (J.value.message = u.error.response.data.message), p("error", u.error);
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
J.value = null;
|
|
443
443
|
});
|
|
444
|
-
const
|
|
444
|
+
const w = P(!1);
|
|
445
445
|
return Be(async () => {
|
|
446
|
-
|
|
446
|
+
w.value = await c.canCreate();
|
|
447
447
|
}), (u, s) => {
|
|
448
|
-
const
|
|
449
|
-
return
|
|
450
|
-
d(l(
|
|
448
|
+
const y = F("KButton"), T = F("KBadge"), Y = F("KInputSwitch"), x = F("KDropdownItem"), ue = F("KClipboardProvider");
|
|
449
|
+
return I(), K("div", wt, [
|
|
450
|
+
d(l(Qe), {
|
|
451
451
|
"cache-identifier": n.cacheIdentifier,
|
|
452
|
-
"default-table-preferences":
|
|
453
|
-
"disable-sorting":
|
|
454
|
-
"empty-state-options":
|
|
452
|
+
"default-table-preferences": be,
|
|
453
|
+
"disable-sorting": _e.value,
|
|
454
|
+
"empty-state-options": j.value,
|
|
455
455
|
"enable-entity-actions": "",
|
|
456
|
-
"error-message":
|
|
456
|
+
"error-message": J.value,
|
|
457
457
|
fetcher: l(e),
|
|
458
|
-
"fetcher-cache-key": l(
|
|
458
|
+
"fetcher-cache-key": l(te),
|
|
459
459
|
"pagination-type": "offset",
|
|
460
460
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
461
|
-
query:
|
|
462
|
-
"table-headers": l(
|
|
463
|
-
onClearSearchInput:
|
|
464
|
-
"onClick:row": s[5] || (s[5] = (m) =>
|
|
465
|
-
onSort:
|
|
466
|
-
onState: l(
|
|
461
|
+
query: G.value,
|
|
462
|
+
"table-headers": l(z),
|
|
463
|
+
onClearSearchInput: we,
|
|
464
|
+
"onClick:row": s[5] || (s[5] = (m) => de(m)),
|
|
465
|
+
onSort: ae,
|
|
466
|
+
onState: l(U)
|
|
467
467
|
}, Le({
|
|
468
468
|
"toolbar-filter": f(() => [
|
|
469
|
-
d(l(
|
|
470
|
-
modelValue:
|
|
471
|
-
"onUpdate:modelValue": s[0] || (s[0] = (m) =>
|
|
472
|
-
config:
|
|
469
|
+
d(l(Xe), {
|
|
470
|
+
modelValue: G.value,
|
|
471
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => G.value = m),
|
|
472
|
+
config: he.value
|
|
473
473
|
}, null, 8, ["modelValue", "config"])
|
|
474
474
|
]),
|
|
475
475
|
"toolbar-button": f(() => [
|
|
476
|
-
(
|
|
476
|
+
(I(), fe(Pe, {
|
|
477
477
|
disabled: !n.useActionOutside,
|
|
478
478
|
to: "#kong-ui-app-page-header-action-button"
|
|
479
479
|
}, [
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
C("div", kt, [
|
|
481
|
+
V.value ? (I(), fe(y, {
|
|
482
482
|
key: 0,
|
|
483
483
|
appearance: "secondary",
|
|
484
484
|
class: "open-learning-hub",
|
|
@@ -487,23 +487,23 @@ const ve = {
|
|
|
487
487
|
onClick: s[1] || (s[1] = (m) => u.$emit("click:learn-more"))
|
|
488
488
|
}, {
|
|
489
489
|
default: f(() => [
|
|
490
|
-
d(l(
|
|
490
|
+
d(l(Ke), { decorative: "" })
|
|
491
491
|
]),
|
|
492
492
|
_: 1
|
|
493
493
|
})) : L("", !0),
|
|
494
|
-
d(l(
|
|
494
|
+
d(l(se), {
|
|
495
495
|
"auth-function": () => n.canCreate()
|
|
496
496
|
}, {
|
|
497
497
|
default: f(() => [
|
|
498
|
-
d(
|
|
498
|
+
d(y, {
|
|
499
499
|
appearance: "primary",
|
|
500
500
|
"data-testid": "toolbar-add-gateway-service",
|
|
501
501
|
size: n.useActionOutside ? "medium" : "large",
|
|
502
502
|
to: n.config.createRoute
|
|
503
503
|
}, {
|
|
504
504
|
default: f(() => [
|
|
505
|
-
d(l(
|
|
506
|
-
M(" " +
|
|
505
|
+
d(l(qe)),
|
|
506
|
+
M(" " + h(l(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
}, 8, ["size", "to"])
|
|
@@ -514,40 +514,40 @@ const ve = {
|
|
|
514
514
|
], 8, ["disabled"]))
|
|
515
515
|
]),
|
|
516
516
|
name: f(({ rowValue: m }) => [
|
|
517
|
-
|
|
517
|
+
C("b", null, h(m ?? "-"), 1)
|
|
518
518
|
]),
|
|
519
519
|
control_plane: f(({ row: m }) => {
|
|
520
520
|
var A;
|
|
521
521
|
return [
|
|
522
|
-
(A = m.x_meta) != null && A.cluster_id ? (
|
|
522
|
+
(A = m.x_meta) != null && A.cluster_id ? (I(), fe(T, {
|
|
523
523
|
key: 0,
|
|
524
524
|
tooltip: m.x_meta.cluster_id,
|
|
525
525
|
"truncation-tooltip": "",
|
|
526
|
-
onClick:
|
|
526
|
+
onClick: Ie((ie) => Ve(m.x_meta.cluster_id), ["stop"])
|
|
527
527
|
}, {
|
|
528
528
|
default: f(() => [
|
|
529
|
-
M(
|
|
529
|
+
M(h(m.x_meta.cluster_id), 1)
|
|
530
530
|
]),
|
|
531
531
|
_: 2
|
|
532
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
532
|
+
}, 1032, ["tooltip", "onClick"])) : (I(), K("b", Vt, "-"))
|
|
533
533
|
];
|
|
534
534
|
}),
|
|
535
535
|
enabled: f(({ row: m }) => [
|
|
536
|
-
d(l(
|
|
536
|
+
d(l(se), {
|
|
537
537
|
"auth-function": () => n.canEdit(m),
|
|
538
538
|
"force-show": ""
|
|
539
539
|
}, {
|
|
540
540
|
default: f(({ isAllowed: A }) => [
|
|
541
|
-
|
|
542
|
-
onClick: s[4] || (s[4] =
|
|
541
|
+
C("div", {
|
|
542
|
+
onClick: s[4] || (s[4] = Ie(() => {
|
|
543
543
|
}, ["stop"]))
|
|
544
544
|
}, [
|
|
545
|
-
d(
|
|
545
|
+
d(Y, {
|
|
546
546
|
modelValue: m.enabled,
|
|
547
|
-
"onUpdate:modelValue": (
|
|
547
|
+
"onUpdate:modelValue": (ie) => m.enabled = ie,
|
|
548
548
|
"data-testid": `row-${m.id}-toggle-input`,
|
|
549
549
|
disabled: !A,
|
|
550
|
-
onClick:
|
|
550
|
+
onClick: Ie((ie) => ke(m), ["prevent"])
|
|
551
551
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
552
552
|
])
|
|
553
553
|
]),
|
|
@@ -555,67 +555,67 @@ const ve = {
|
|
|
555
555
|
}, 1032, ["auth-function"])
|
|
556
556
|
]),
|
|
557
557
|
tags: f(({ rowValue: m }) => [
|
|
558
|
-
d(l(
|
|
558
|
+
d(l(Ze), { tags: m }, null, 8, ["tags"])
|
|
559
559
|
]),
|
|
560
560
|
created_at: f(({ rowValue: m }) => [
|
|
561
|
-
M(
|
|
561
|
+
M(h(l($)(m)), 1)
|
|
562
562
|
]),
|
|
563
563
|
updated_at: f(({ row: m, rowValue: A }) => [
|
|
564
|
-
M(
|
|
564
|
+
M(h(l($)(A ?? m.created_at)), 1)
|
|
565
565
|
]),
|
|
566
566
|
actions: f(({ row: m }) => [
|
|
567
|
-
d(
|
|
567
|
+
d(ue, null, {
|
|
568
568
|
default: f(({ copyToClipboard: A }) => [
|
|
569
569
|
d(x, {
|
|
570
570
|
"data-testid": "action-entity-copy-id",
|
|
571
|
-
onClick: (
|
|
571
|
+
onClick: (ie) => le(m, A)
|
|
572
572
|
}, {
|
|
573
573
|
default: f(() => [
|
|
574
|
-
M(
|
|
574
|
+
M(h(l(r)("actions.copy_id")), 1)
|
|
575
575
|
]),
|
|
576
576
|
_: 2
|
|
577
577
|
}, 1032, ["onClick"])
|
|
578
578
|
]),
|
|
579
579
|
_: 2
|
|
580
580
|
}, 1024),
|
|
581
|
-
d(
|
|
581
|
+
d(ue, null, {
|
|
582
582
|
default: f(({ copyToClipboard: A }) => [
|
|
583
583
|
d(x, {
|
|
584
584
|
"data-testid": "action-entity-copy-json",
|
|
585
|
-
onClick: (
|
|
585
|
+
onClick: (ie) => ce(m, A)
|
|
586
586
|
}, {
|
|
587
587
|
default: f(() => [
|
|
588
|
-
M(
|
|
588
|
+
M(h(l(r)("actions.copy_json")), 1)
|
|
589
589
|
]),
|
|
590
590
|
_: 2
|
|
591
591
|
}, 1032, ["onClick"])
|
|
592
592
|
]),
|
|
593
593
|
_: 2
|
|
594
594
|
}, 1024),
|
|
595
|
-
d(l(
|
|
595
|
+
d(l(se), {
|
|
596
596
|
"auth-function": () => n.canRetrieve(m)
|
|
597
597
|
}, {
|
|
598
598
|
default: f(() => [
|
|
599
599
|
d(x, {
|
|
600
600
|
"data-testid": "action-entity-view",
|
|
601
601
|
"has-divider": "",
|
|
602
|
-
item:
|
|
602
|
+
item: Se(m.id)
|
|
603
603
|
}, null, 8, ["item"])
|
|
604
604
|
]),
|
|
605
605
|
_: 2
|
|
606
606
|
}, 1032, ["auth-function"]),
|
|
607
|
-
d(l(
|
|
607
|
+
d(l(se), {
|
|
608
608
|
"auth-function": () => n.canEdit(m)
|
|
609
609
|
}, {
|
|
610
610
|
default: f(() => [
|
|
611
611
|
d(x, {
|
|
612
612
|
"data-testid": "action-entity-edit",
|
|
613
|
-
item:
|
|
613
|
+
item: oe(m.id)
|
|
614
614
|
}, null, 8, ["item"])
|
|
615
615
|
]),
|
|
616
616
|
_: 2
|
|
617
617
|
}, 1032, ["auth-function"]),
|
|
618
|
-
d(l(
|
|
618
|
+
d(l(se), {
|
|
619
619
|
"auth-function": () => n.canDelete(m)
|
|
620
620
|
}, {
|
|
621
621
|
default: f(() => [
|
|
@@ -626,7 +626,7 @@ const ve = {
|
|
|
626
626
|
onClick: (A) => i(m)
|
|
627
627
|
}, {
|
|
628
628
|
default: f(() => [
|
|
629
|
-
M(
|
|
629
|
+
M(h(l(r)("actions.delete.menu_label")), 1)
|
|
630
630
|
]),
|
|
631
631
|
_: 2
|
|
632
632
|
}, 1032, ["onClick"])
|
|
@@ -639,11 +639,11 @@ const ve = {
|
|
|
639
639
|
!l(a) && ge.value ? {
|
|
640
640
|
name: "outside-actions",
|
|
641
641
|
fn: f(() => [
|
|
642
|
-
(
|
|
642
|
+
(I(), fe(Pe, {
|
|
643
643
|
disabled: !n.useActionOutside,
|
|
644
644
|
to: "#kong-ui-app-page-header-action-button"
|
|
645
645
|
}, [
|
|
646
|
-
d(
|
|
646
|
+
d(y, {
|
|
647
647
|
appearance: "secondary",
|
|
648
648
|
class: "open-learning-hub",
|
|
649
649
|
"data-testid": "gateway-services-more-button",
|
|
@@ -651,7 +651,7 @@ const ve = {
|
|
|
651
651
|
onClick: s[2] || (s[2] = (m) => u.$emit("click:learn-more"))
|
|
652
652
|
}, {
|
|
653
653
|
default: f(() => [
|
|
654
|
-
d(l(
|
|
654
|
+
d(l(Ke), { decorative: "" })
|
|
655
655
|
]),
|
|
656
656
|
_: 1
|
|
657
657
|
})
|
|
@@ -659,25 +659,25 @@ const ve = {
|
|
|
659
659
|
]),
|
|
660
660
|
key: "0"
|
|
661
661
|
} : void 0,
|
|
662
|
-
n.enableV2EmptyStates && n.config.app ===
|
|
662
|
+
n.enableV2EmptyStates && n.config.app === l(g).Konnect ? {
|
|
663
663
|
name: "empty-state",
|
|
664
664
|
fn: f(() => [
|
|
665
|
-
d(l(
|
|
665
|
+
d(l(Ye), {
|
|
666
666
|
"action-button-text": l(r)("gateway_services.empty_state_v2.create"),
|
|
667
667
|
appearance: "secondary",
|
|
668
668
|
"can-create": () => n.canCreate(),
|
|
669
669
|
"data-testid": "gateway-services-entity-empty-state",
|
|
670
670
|
description: l(r)("gateway_services.empty_state_v2.description"),
|
|
671
|
-
"learn-more": n.config.app ===
|
|
671
|
+
"learn-more": n.config.app === l(g).Konnect,
|
|
672
672
|
title: l(r)("gateway_services.empty_state_v2.title"),
|
|
673
|
-
"onClick:create":
|
|
673
|
+
"onClick:create": S,
|
|
674
674
|
"onClick:learnMore": s[3] || (s[3] = (m) => u.$emit("click:learn-more"))
|
|
675
675
|
}, {
|
|
676
676
|
image: f(() => [
|
|
677
|
-
|
|
678
|
-
d(l(
|
|
679
|
-
color: l(
|
|
680
|
-
size: l(
|
|
677
|
+
C("div", Ct, [
|
|
678
|
+
d(l(Oe), {
|
|
679
|
+
color: l(bt),
|
|
680
|
+
size: l(ht)
|
|
681
681
|
}, null, 8, ["color", "size"])
|
|
682
682
|
])
|
|
683
683
|
]),
|
|
@@ -687,24 +687,24 @@ const ve = {
|
|
|
687
687
|
key: "1"
|
|
688
688
|
} : void 0
|
|
689
689
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
690
|
-
d(l(
|
|
691
|
-
action:
|
|
692
|
-
"entity-id":
|
|
693
|
-
"entity-name":
|
|
690
|
+
d(l(et), {
|
|
691
|
+
action: X.value.action,
|
|
692
|
+
"entity-id": X.value.id,
|
|
693
|
+
"entity-name": X.value.name,
|
|
694
694
|
"entity-type": l(r)("glossary.gateway_services"),
|
|
695
|
-
"on-confirm":
|
|
696
|
-
visible:
|
|
697
|
-
onCancel:
|
|
698
|
-
onProceed:
|
|
695
|
+
"on-confirm": Ce,
|
|
696
|
+
visible: Q.value,
|
|
697
|
+
onCancel: ne,
|
|
698
|
+
onProceed: ne
|
|
699
699
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
700
|
-
d(l(
|
|
701
|
-
"action-pending":
|
|
700
|
+
d(l(tt), {
|
|
701
|
+
"action-pending": H.value,
|
|
702
702
|
description: l(r)("actions.delete.description"),
|
|
703
703
|
"entity-name": B.value && (B.value.name || B.value.id),
|
|
704
|
-
"entity-type": l(
|
|
705
|
-
error:
|
|
704
|
+
"entity-type": l(lt).GatewayService,
|
|
705
|
+
error: Z.value,
|
|
706
706
|
title: l(r)("actions.delete.title"),
|
|
707
|
-
visible:
|
|
707
|
+
visible: q.value,
|
|
708
708
|
onCancel: v,
|
|
709
709
|
onProceed: R
|
|
710
710
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -716,10 +716,10 @@ const ve = {
|
|
|
716
716
|
for (const [c, r] of D)
|
|
717
717
|
p[c] = r;
|
|
718
718
|
return p;
|
|
719
|
-
},
|
|
719
|
+
}, Qt = /* @__PURE__ */ Fe(St, [["__scopeId", "data-v-3493f686"]]), It = { class: "kong-ui-entities-gateway-service-form" }, Tt = { key: 0 }, Et = { class: "gateway-service-form-traffic-label" }, Pt = { class: "gateway-service-form-margin-bottom" }, Ut = {
|
|
720
720
|
key: 0,
|
|
721
721
|
class: "gateway-service-form-group-fields"
|
|
722
|
-
},
|
|
722
|
+
}, Kt = {
|
|
723
723
|
key: 1,
|
|
724
724
|
class: "gateway-service-form-group-fields"
|
|
725
725
|
}, Rt = { key: 0 }, Mt = { class: "gateway-service-form-margin-top" }, $t = { class: "gateway-service-form-margin-bottom" }, xt = { class: "gateway-service-form-margin-bottom" }, At = { class: "gateway-service-form-margin-bottom" }, Ft = { class: "gateway-service-form-margin-bottom" }, Bt = {
|
|
@@ -731,20 +731,20 @@ const ve = {
|
|
|
731
731
|
}, Dt = {
|
|
732
732
|
key: 2,
|
|
733
733
|
class: "gateway-service-form-margin-bottom"
|
|
734
|
-
},
|
|
734
|
+
}, Gt = {
|
|
735
735
|
key: 0,
|
|
736
736
|
class: "checkbox-aligned-radio"
|
|
737
|
-
},
|
|
737
|
+
}, qt = {
|
|
738
738
|
key: 1,
|
|
739
739
|
class: "checkbox-aligned-radio"
|
|
740
|
-
},
|
|
740
|
+
}, Ot = /* @__PURE__ */ Ee({
|
|
741
741
|
__name: "GatewayServiceForm",
|
|
742
742
|
props: {
|
|
743
743
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
744
744
|
config: {
|
|
745
745
|
type: Object,
|
|
746
746
|
required: !0,
|
|
747
|
-
validator: (n) => !(!n || ![
|
|
747
|
+
validator: (n) => !(!n || ![g.Konnect, g.KongManager].includes(n == null ? void 0 : n.app) || n.app === g.Konnect && !n.controlPlaneId || n.app === g.KongManager && typeof n.workspace != "string" || !n.cancelRoute)
|
|
748
748
|
},
|
|
749
749
|
/** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
|
|
750
750
|
gatewayServiceId: {
|
|
@@ -761,8 +761,8 @@ const ve = {
|
|
|
761
761
|
},
|
|
762
762
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
763
763
|
setup(n, { expose: D, emit: p }) {
|
|
764
|
-
var
|
|
765
|
-
const c = p, r = n, $ =
|
|
764
|
+
var Z;
|
|
765
|
+
const c = p, r = n, $ = P(!0), W = $e(), { i18nT: O, i18n: { t: a } } = ye.useI18n(), { getMessageFromError: U } = ot(), { axiosInstance: V } = xe((Z = r.config) == null ? void 0 : Z.axiosRequestConfig), ge = it(), _e = b(() => re.form[r.config.app].edit), N = b(() => r.gatewayServiceId ? Re.Edit : Re.Create), be = P(!1), z = b(() => !!r.gatewayServiceId), _ = P(z.value ? "protocol" : "url"), ee = ye.usePortFromProtocol(), G = P(""), he = b(() => !!G.value), e = Ue({
|
|
766
766
|
fields: {
|
|
767
767
|
name: "",
|
|
768
768
|
protocol: "http",
|
|
@@ -782,7 +782,7 @@ const ve = {
|
|
|
782
782
|
},
|
|
783
783
|
isReadonly: !1,
|
|
784
784
|
errorMessage: ""
|
|
785
|
-
}),
|
|
785
|
+
}), k = Ue({
|
|
786
786
|
name: "",
|
|
787
787
|
protocol: "http",
|
|
788
788
|
host: "",
|
|
@@ -798,13 +798,13 @@ const ve = {
|
|
|
798
798
|
tls_verify_enabled: !1,
|
|
799
799
|
tls_verify_value: !1,
|
|
800
800
|
tags: ""
|
|
801
|
-
}),
|
|
801
|
+
}), te = r.config.app === g.Konnect || st({
|
|
802
802
|
gatewayInfo: r.config.gatewayInfo,
|
|
803
803
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
804
804
|
supportedRange: {
|
|
805
805
|
enterprise: ["3.0"]
|
|
806
806
|
}
|
|
807
|
-
}),
|
|
807
|
+
}), we = [
|
|
808
808
|
{
|
|
809
809
|
label: a("gateway_services.form.fields.protocol.options.http"),
|
|
810
810
|
value: "http",
|
|
@@ -840,7 +840,7 @@ const ve = {
|
|
|
840
840
|
value: "grpcs",
|
|
841
841
|
group: "grpc"
|
|
842
842
|
},
|
|
843
|
-
...
|
|
843
|
+
...te ? [
|
|
844
844
|
{
|
|
845
845
|
label: a("gateway_services.form.fields.protocol.options.ws"),
|
|
846
846
|
value: "ws",
|
|
@@ -857,60 +857,60 @@ const ve = {
|
|
|
857
857
|
value: "udp",
|
|
858
858
|
group: "udp"
|
|
859
859
|
}
|
|
860
|
-
],
|
|
860
|
+
], ae = { url: "url", protocol: "protocol" }, J = (t, i) => {
|
|
861
861
|
i.value;
|
|
862
|
-
},
|
|
863
|
-
$.value = !0, e.errorMessage = "", e.fields.host =
|
|
864
|
-
},
|
|
865
|
-
if (e.fields.url &&
|
|
862
|
+
}, j = (t) => t ? parseFloat(t) : 0, Q = () => {
|
|
863
|
+
$.value = !0, e.errorMessage = "", e.fields.host = k.host, e.fields.path = k.path, e.fields.port = k.port, e.fields.protocol = k.protocol, e.fields.url = k.url, e.fields.retries = k.retries, e.fields.connect_timeout = k.connect_timeout, e.fields.write_timeout = k.write_timeout, e.fields.read_timeout = k.read_timeout, e.fields.client_certificate = k.client_certificate, e.fields.ca_certificates = k.ca_certificates, e.fields.tls_verify_enabled = k.tls_verify_enabled, e.fields.tls_verify_value = k.tls_verify_value;
|
|
864
|
+
}, E = () => {
|
|
865
|
+
if (e.fields.url && _.value === "url")
|
|
866
866
|
try {
|
|
867
867
|
const t = new URL(e.fields.url);
|
|
868
868
|
e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
|
|
869
869
|
const i = Number(t.port);
|
|
870
|
-
|
|
870
|
+
be.value = !!i, e.fields.port = i || ee.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", c("url-valid:success");
|
|
871
871
|
} catch (t) {
|
|
872
|
-
e.errorMessage = a("errors.urlErrorMessage"), c("url-valid:error",
|
|
872
|
+
e.errorMessage = a("errors.urlErrorMessage"), c("url-valid:error", U(t));
|
|
873
873
|
}
|
|
874
874
|
else
|
|
875
875
|
c("url-valid:success"), e.errorMessage = "";
|
|
876
|
-
},
|
|
877
|
-
if (
|
|
876
|
+
}, X = b(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), ke = b(() => {
|
|
877
|
+
if (_.value === "url")
|
|
878
878
|
return !0;
|
|
879
879
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
880
|
-
return
|
|
881
|
-
}),
|
|
882
|
-
if (
|
|
880
|
+
return _.value === "protocol" && t;
|
|
881
|
+
}), ne = b(() => {
|
|
882
|
+
if (_.value === "url")
|
|
883
883
|
return !0;
|
|
884
884
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
885
|
-
return
|
|
886
|
-
}),
|
|
887
|
-
if (
|
|
885
|
+
return _.value === "protocol" && t;
|
|
886
|
+
}), Ce = b(() => {
|
|
887
|
+
if (_.value === "url")
|
|
888
888
|
return !0;
|
|
889
889
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
890
|
-
return
|
|
891
|
-
}),
|
|
892
|
-
|
|
893
|
-
},
|
|
890
|
+
return _.value === "protocol" && t;
|
|
891
|
+
}), Ve = (t) => {
|
|
892
|
+
G.value = ge.utf8Name(t);
|
|
893
|
+
}, le = b(() => z.value && JSON.stringify(e.fields) !== JSON.stringify(k) || _.value === "url" && !!e.fields.url || _.value === "protocol" && !!e.fields.host), ce = (t) => {
|
|
894
894
|
var i, v, R;
|
|
895
|
-
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 = ((v = t == null ? void 0 : t.ca_certificates) == null ? void 0 : v.join(",")) || "", e.fields.client_certificate = ((R = t == null ? void 0 : t.client_certificate) == null ? void 0 : R.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(
|
|
896
|
-
},
|
|
897
|
-
|
|
898
|
-
},
|
|
895
|
+
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 = ((v = t == null ? void 0 : t.ca_certificates) == null ? void 0 : v.join(",")) || "", e.fields.client_certificate = ((R = t == null ? void 0 : t.client_certificate) == null ? void 0 : R.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(k, e.fields);
|
|
896
|
+
}, de = () => {
|
|
897
|
+
W.push(r.config.cancelRoute);
|
|
898
|
+
}, Se = b(() => {
|
|
899
899
|
var i, v;
|
|
900
|
-
let t = `${r.config.apiBaseUrl}${
|
|
901
|
-
return r.config.app ===
|
|
902
|
-
}),
|
|
900
|
+
let t = `${r.config.apiBaseUrl}${re.form[r.config.app].validate}`;
|
|
901
|
+
return r.config.app === g.Konnect ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === g.KongManager && (t = t.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
902
|
+
}), oe = b(() => {
|
|
903
903
|
var i, v;
|
|
904
|
-
let t = `${r.config.apiBaseUrl}${
|
|
905
|
-
return r.config.app ===
|
|
904
|
+
let t = `${r.config.apiBaseUrl}${re.form[r.config.app][N.value]}`;
|
|
905
|
+
return r.config.app === g.Konnect ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === g.KongManager && (t = t.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
|
|
906
906
|
}), B = (t) => {
|
|
907
907
|
let i = "";
|
|
908
908
|
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;
|
|
909
|
-
},
|
|
910
|
-
var i, v, R,
|
|
909
|
+
}, q = b(() => {
|
|
910
|
+
var i, v, R, S;
|
|
911
911
|
const t = {
|
|
912
912
|
name: e.fields.name || null,
|
|
913
|
-
tags: e.fields.tags ? (R = (v = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : v.map((
|
|
913
|
+
tags: e.fields.tags ? (R = (v = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : v.map((w) => String(w || "").trim())) == null ? void 0 : R.filter((w) => w !== "") : null,
|
|
914
914
|
protocol: e.fields.protocol,
|
|
915
915
|
path: e.fields.path || null,
|
|
916
916
|
read_timeout: e.fields.read_timeout,
|
|
@@ -919,66 +919,66 @@ const ve = {
|
|
|
919
919
|
connect_timeout: e.fields.connect_timeout,
|
|
920
920
|
tls_verify_value: e.fields.tls_verify_value,
|
|
921
921
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
922
|
-
ca_certificates: e.fields.ca_certificates ? (
|
|
922
|
+
ca_certificates: e.fields.ca_certificates ? (S = e.fields.ca_certificates) == null ? void 0 : S.split(",").filter((w) => w !== "") : null,
|
|
923
923
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
924
924
|
write_timeout: e.fields.write_timeout,
|
|
925
925
|
port: e.fields.port,
|
|
926
926
|
url: e.fields.url
|
|
927
927
|
};
|
|
928
|
-
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),
|
|
929
|
-
}),
|
|
928
|
+
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), X.value || (t.path = null), N.value === "create" ? _.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === g.Konnect && delete t.port) : delete t.url : N.value === "edit" && delete t.url, t;
|
|
929
|
+
}), H = async () => {
|
|
930
930
|
var t, i, v, R;
|
|
931
931
|
try {
|
|
932
|
-
e.isReadonly = !0,
|
|
933
|
-
const
|
|
934
|
-
B(
|
|
935
|
-
let
|
|
936
|
-
if (await
|
|
937
|
-
const { data: o } =
|
|
938
|
-
e.fields.name = (o == null ? void 0 : o.name) || "", e.fields.port = o.port ||
|
|
932
|
+
e.isReadonly = !0, E();
|
|
933
|
+
const S = q.value;
|
|
934
|
+
B(S);
|
|
935
|
+
let w;
|
|
936
|
+
if (await V.post(Se.value, S), N.value === "create" ? w = await V.post(oe.value, S) : N.value === "edit" && (w = ((t = r.config) == null ? void 0 : t.app) === g.Konnect ? await V.put(oe.value, S) : await V.patch(oe.value, S)), w) {
|
|
937
|
+
const { data: o } = w;
|
|
938
|
+
e.fields.name = (o == null ? void 0 : o.name) || "", e.fields.port = o.port || ee.getPortFromProtocol(o.protocol), e.fields.protocol = (o == null ? void 0 : o.protocol) || "http", e.fields.host = (o == null ? void 0 : o.host) || "", e.fields.path = (o == null ? void 0 : o.path) || "", e.fields.url = (o == null ? void 0 : o.url) || "", e.fields.retries = o != null && o.retries || (o == null ? void 0 : o.retries) === 0 ? o == null ? void 0 : o.retries : 5, e.fields.connect_timeout = o != null && o.connect_timeout || (o == null ? void 0 : o.connect_timeout) === 0 ? o == null ? void 0 : o.connect_timeout : 6e4, e.fields.write_timeout = o != null && o.write_timeout || (o == null ? void 0 : o.write_timeout) === 0 ? o == null ? void 0 : o.write_timeout : 6e4, e.fields.read_timeout = o != null && o.read_timeout || (o == null ? void 0 : o.read_timeout) === 0 ? o == null ? void 0 : o.read_timeout : 6e4, e.fields.client_certificate = ((i = o == null ? void 0 : o.client_certificate) == null ? void 0 : i.id) || "", e.fields.ca_certificates = (v = o == null ? void 0 : o.ca_certificates) != null && v.length ? o == null ? void 0 : o.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (o == null ? void 0 : o.tls_verify) !== "" && (o == null ? void 0 : o.tls_verify) !== null && (o == null ? void 0 : o.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (o == null ? void 0 : o.tls_verify), e.fields.tags = (R = o == null ? void 0 : o.tags) != null && R.length ? o.tags.join(", ") : "", Object.assign(k, e.fields), c("update", w == null ? void 0 : w.data);
|
|
939
939
|
}
|
|
940
|
-
return
|
|
941
|
-
} catch (
|
|
942
|
-
e.errorMessage =
|
|
940
|
+
return w;
|
|
941
|
+
} catch (S) {
|
|
942
|
+
e.errorMessage = U(S), c("error", S);
|
|
943
943
|
} finally {
|
|
944
944
|
e.isReadonly = !1;
|
|
945
945
|
}
|
|
946
946
|
};
|
|
947
|
-
return
|
|
948
|
-
Object.assign(e.fields,
|
|
949
|
-
}),
|
|
950
|
-
e.fields.port =
|
|
947
|
+
return Te(() => r.gatewayServiceId, () => {
|
|
948
|
+
Object.assign(e.fields, k);
|
|
949
|
+
}), Te(e.fields, (t) => {
|
|
950
|
+
e.fields.port = ee.getPortFromProtocol(t.protocol, String(t.port)), c("model-updated", q.value);
|
|
951
951
|
}), De(() => {
|
|
952
|
-
c("model-updated",
|
|
952
|
+
c("model-updated", q.value);
|
|
953
953
|
}), D({
|
|
954
|
-
validateUrl:
|
|
955
|
-
getPayload:
|
|
956
|
-
saveFormData:
|
|
957
|
-
canSubmit:
|
|
958
|
-
initForm:
|
|
954
|
+
validateUrl: E,
|
|
955
|
+
getPayload: q,
|
|
956
|
+
saveFormData: H,
|
|
957
|
+
canSubmit: le,
|
|
958
|
+
initForm: ce
|
|
959
959
|
}), (t, i) => {
|
|
960
|
-
const v = F("KInput"), R = F("KLabel"),
|
|
961
|
-
return
|
|
962
|
-
d(l(
|
|
963
|
-
"can-submit":
|
|
960
|
+
const v = F("KInput"), R = F("KLabel"), S = F("KRadio"), w = F("KSelect"), o = F("KCheckbox"), u = F("KCollapse");
|
|
961
|
+
return I(), K("div", It, [
|
|
962
|
+
d(l(rt), {
|
|
963
|
+
"can-submit": le.value,
|
|
964
964
|
config: n.config,
|
|
965
965
|
"edit-id": n.gatewayServiceId,
|
|
966
966
|
"entity-type": l(Ae).GatewayService,
|
|
967
967
|
"error-message": e.errorMessage,
|
|
968
|
-
"fetch-url":
|
|
969
|
-
"form-fields":
|
|
968
|
+
"fetch-url": _e.value,
|
|
969
|
+
"form-fields": q.value,
|
|
970
970
|
"is-readonly": e.isReadonly,
|
|
971
|
-
onCancel:
|
|
971
|
+
onCancel: de,
|
|
972
972
|
"onFetch:error": i[25] || (i[25] = (s) => t.$emit("error", s)),
|
|
973
|
-
"onFetch:success":
|
|
973
|
+
"onFetch:success": ce,
|
|
974
974
|
onLoading: i[26] || (i[26] = (s) => t.$emit("loading", s)),
|
|
975
|
-
onSubmit:
|
|
975
|
+
onSubmit: H
|
|
976
976
|
}, {
|
|
977
977
|
"form-actions": f(() => [
|
|
978
|
-
|
|
979
|
-
canSubmit:
|
|
980
|
-
cancel:
|
|
981
|
-
submit:
|
|
978
|
+
Ge(t.$slots, "form-actions", {
|
|
979
|
+
canSubmit: le.value,
|
|
980
|
+
cancel: de,
|
|
981
|
+
submit: H
|
|
982
982
|
}, void 0, !0)
|
|
983
983
|
]),
|
|
984
984
|
default: f(() => [
|
|
@@ -994,8 +994,8 @@ const ve = {
|
|
|
994
994
|
modelModifiers: { trim: !0 },
|
|
995
995
|
autocomplete: "off",
|
|
996
996
|
"data-testid": "gateway-service-name-input",
|
|
997
|
-
error:
|
|
998
|
-
"error-message":
|
|
997
|
+
error: he.value,
|
|
998
|
+
"error-message": G.value,
|
|
999
999
|
label: l(a)("gateway_services.form.fields.name.label"),
|
|
1000
1000
|
"label-attributes": {
|
|
1001
1001
|
info: l(a)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -1005,7 +1005,7 @@ const ve = {
|
|
|
1005
1005
|
placeholder: l(a)("gateway_services.form.fields.name.placeholder"),
|
|
1006
1006
|
readonly: e.isReadonly,
|
|
1007
1007
|
type: "text",
|
|
1008
|
-
onInput:
|
|
1008
|
+
onInput: Ve
|
|
1009
1009
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1010
1010
|
d(v, {
|
|
1011
1011
|
modelValue: e.fields.tags,
|
|
@@ -1033,30 +1033,30 @@ const ve = {
|
|
|
1033
1033
|
title: l(a)("gateway_services.form.sections.keys.title")
|
|
1034
1034
|
}, {
|
|
1035
1035
|
default: f(() => [
|
|
1036
|
-
|
|
1037
|
-
|
|
1036
|
+
z.value ? L("", !0) : (I(), K("div", Tt, [
|
|
1037
|
+
C("div", Et, [
|
|
1038
1038
|
d(R, { required: "" }, {
|
|
1039
1039
|
default: f(() => [
|
|
1040
|
-
M(
|
|
1040
|
+
M(h(l(a)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1041
1041
|
]),
|
|
1042
1042
|
_: 1
|
|
1043
1043
|
})
|
|
1044
1044
|
]),
|
|
1045
|
-
|
|
1046
|
-
d(
|
|
1047
|
-
modelValue:
|
|
1048
|
-
"onUpdate:modelValue": i[2] || (i[2] = (s) =>
|
|
1045
|
+
C("div", Pt, [
|
|
1046
|
+
d(S, {
|
|
1047
|
+
modelValue: _.value,
|
|
1048
|
+
"onUpdate:modelValue": i[2] || (i[2] = (s) => _.value = s),
|
|
1049
1049
|
"data-testid": "gateway-service-url-radio",
|
|
1050
|
-
"selected-value":
|
|
1051
|
-
onChange:
|
|
1050
|
+
"selected-value": ae.url,
|
|
1051
|
+
onChange: Q
|
|
1052
1052
|
}, {
|
|
1053
1053
|
default: f(() => [
|
|
1054
|
-
M(
|
|
1054
|
+
M(h(l(a)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1055
1055
|
]),
|
|
1056
1056
|
_: 1
|
|
1057
1057
|
}, 8, ["modelValue", "selected-value"])
|
|
1058
1058
|
]),
|
|
1059
|
-
|
|
1059
|
+
_.value === "url" ? (I(), K("div", Ut, [
|
|
1060
1060
|
d(v, {
|
|
1061
1061
|
modelValue: e.fields.url,
|
|
1062
1062
|
"onUpdate:modelValue": i[3] || (i[3] = (s) => e.fields.url = s),
|
|
@@ -1065,7 +1065,7 @@ const ve = {
|
|
|
1065
1065
|
"data-testid": "gateway-service-url-input",
|
|
1066
1066
|
label: l(a)("gateway_services.form.fields.upstream_url.label"),
|
|
1067
1067
|
"label-attributes": {
|
|
1068
|
-
info: n.config.app ===
|
|
1068
|
+
info: n.config.app === l(g).Konnect ? l(a)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : l(a)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1069
1069
|
tooltipAttributes: { maxWidth: "400" }
|
|
1070
1070
|
},
|
|
1071
1071
|
name: "url",
|
|
@@ -1073,26 +1073,26 @@ const ve = {
|
|
|
1073
1073
|
required: ""
|
|
1074
1074
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1075
1075
|
])) : L("", !0),
|
|
1076
|
-
d(
|
|
1077
|
-
modelValue:
|
|
1078
|
-
"onUpdate:modelValue": i[4] || (i[4] = (s) =>
|
|
1076
|
+
d(S, {
|
|
1077
|
+
modelValue: _.value,
|
|
1078
|
+
"onUpdate:modelValue": i[4] || (i[4] = (s) => _.value = s),
|
|
1079
1079
|
"checked-group": "protocol",
|
|
1080
1080
|
"data-testid": "gateway-service-protocol-radio",
|
|
1081
|
-
"selected-value":
|
|
1082
|
-
onChange:
|
|
1081
|
+
"selected-value": ae.protocol,
|
|
1082
|
+
onChange: Q
|
|
1083
1083
|
}, {
|
|
1084
1084
|
default: f(() => [
|
|
1085
|
-
M(
|
|
1085
|
+
M(h(l(a)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1086
1086
|
]),
|
|
1087
1087
|
_: 1
|
|
1088
1088
|
}, 8, ["modelValue", "selected-value"])
|
|
1089
1089
|
])),
|
|
1090
|
-
|
|
1091
|
-
d(
|
|
1090
|
+
_.value === "protocol" || z.value ? (I(), K("div", Kt, [
|
|
1091
|
+
d(w, {
|
|
1092
1092
|
modelValue: e.fields.protocol,
|
|
1093
1093
|
"onUpdate:modelValue": i[5] || (i[5] = (s) => e.fields.protocol = s),
|
|
1094
1094
|
"data-testid": "gateway-service-protocol-select",
|
|
1095
|
-
items:
|
|
1095
|
+
items: we,
|
|
1096
1096
|
label: l(a)("gateway_services.form.fields.protocol.label"),
|
|
1097
1097
|
"label-attributes": {
|
|
1098
1098
|
info: l(a)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -1101,7 +1101,7 @@ const ve = {
|
|
|
1101
1101
|
readonly: e.isReadonly,
|
|
1102
1102
|
required: "",
|
|
1103
1103
|
width: "100%",
|
|
1104
|
-
onSelected: i[6] || (i[6] = (s) =>
|
|
1104
|
+
onSelected: i[6] || (i[6] = (s) => J(e.fields.protocol, s))
|
|
1105
1105
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1106
1106
|
d(v, {
|
|
1107
1107
|
modelValue: e.fields.host,
|
|
@@ -1118,7 +1118,7 @@ const ve = {
|
|
|
1118
1118
|
placeholder: l(a)("gateway_services.form.fields.host.placeholder"),
|
|
1119
1119
|
required: ""
|
|
1120
1120
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1121
|
-
|
|
1121
|
+
X.value ? (I(), K("div", Rt, [
|
|
1122
1122
|
d(v, {
|
|
1123
1123
|
modelValue: e.fields.path,
|
|
1124
1124
|
"onUpdate:modelValue": i[8] || (i[8] = (s) => e.fields.path = s),
|
|
@@ -1139,7 +1139,7 @@ const ve = {
|
|
|
1139
1139
|
"onUpdate:modelValue": [
|
|
1140
1140
|
i[9] || (i[9] = (s) => e.fields.port = s),
|
|
1141
1141
|
i[10] || (i[10] = () => {
|
|
1142
|
-
e.fields.port =
|
|
1142
|
+
e.fields.port = j(e.fields.port + "");
|
|
1143
1143
|
})
|
|
1144
1144
|
],
|
|
1145
1145
|
class: "gateway-service-form-margin-top",
|
|
@@ -1161,14 +1161,14 @@ const ve = {
|
|
|
1161
1161
|
"trigger-label": l(a)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1162
1162
|
}, {
|
|
1163
1163
|
default: f(() => [
|
|
1164
|
-
|
|
1165
|
-
|
|
1164
|
+
C("div", Mt, [
|
|
1165
|
+
C("div", $t, [
|
|
1166
1166
|
d(v, {
|
|
1167
1167
|
modelValue: e.fields.retries,
|
|
1168
1168
|
"onUpdate:modelValue": [
|
|
1169
1169
|
i[11] || (i[11] = (s) => e.fields.retries = s),
|
|
1170
1170
|
i[12] || (i[12] = () => {
|
|
1171
|
-
e.fields.retries =
|
|
1171
|
+
e.fields.retries = j(e.fields.retries + "");
|
|
1172
1172
|
})
|
|
1173
1173
|
],
|
|
1174
1174
|
autocomplete: "off",
|
|
@@ -1183,13 +1183,13 @@ const ve = {
|
|
|
1183
1183
|
type: "number"
|
|
1184
1184
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1185
1185
|
]),
|
|
1186
|
-
|
|
1186
|
+
C("div", xt, [
|
|
1187
1187
|
d(v, {
|
|
1188
1188
|
modelValue: e.fields.connect_timeout,
|
|
1189
1189
|
"onUpdate:modelValue": [
|
|
1190
1190
|
i[13] || (i[13] = (s) => e.fields.connect_timeout = s),
|
|
1191
1191
|
i[14] || (i[14] = () => {
|
|
1192
|
-
e.fields.connect_timeout =
|
|
1192
|
+
e.fields.connect_timeout = j(e.fields.connect_timeout + "");
|
|
1193
1193
|
})
|
|
1194
1194
|
],
|
|
1195
1195
|
autocomplete: "off",
|
|
@@ -1204,13 +1204,13 @@ const ve = {
|
|
|
1204
1204
|
type: "number"
|
|
1205
1205
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1206
1206
|
]),
|
|
1207
|
-
|
|
1207
|
+
C("div", At, [
|
|
1208
1208
|
d(v, {
|
|
1209
1209
|
modelValue: e.fields.write_timeout,
|
|
1210
1210
|
"onUpdate:modelValue": [
|
|
1211
1211
|
i[15] || (i[15] = (s) => e.fields.write_timeout = s),
|
|
1212
1212
|
i[16] || (i[16] = () => {
|
|
1213
|
-
e.fields.write_timeout =
|
|
1213
|
+
e.fields.write_timeout = j(e.fields.write_timeout + "");
|
|
1214
1214
|
})
|
|
1215
1215
|
],
|
|
1216
1216
|
autocomplete: "off",
|
|
@@ -1225,13 +1225,13 @@ const ve = {
|
|
|
1225
1225
|
type: "number"
|
|
1226
1226
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1227
1227
|
]),
|
|
1228
|
-
|
|
1228
|
+
C("div", Ft, [
|
|
1229
1229
|
d(v, {
|
|
1230
1230
|
modelValue: e.fields.read_timeout,
|
|
1231
1231
|
"onUpdate:modelValue": [
|
|
1232
1232
|
i[17] || (i[17] = (s) => e.fields.read_timeout = s),
|
|
1233
1233
|
i[18] || (i[18] = () => {
|
|
1234
|
-
e.fields.read_timeout =
|
|
1234
|
+
e.fields.read_timeout = j(e.fields.read_timeout + "");
|
|
1235
1235
|
})
|
|
1236
1236
|
],
|
|
1237
1237
|
autocomplete: "off",
|
|
@@ -1246,7 +1246,7 @@ const ve = {
|
|
|
1246
1246
|
type: "number"
|
|
1247
1247
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1248
1248
|
]),
|
|
1249
|
-
|
|
1249
|
+
ke.value ? (I(), K("div", Bt, [
|
|
1250
1250
|
d(v, {
|
|
1251
1251
|
modelValue: e.fields.client_certificate,
|
|
1252
1252
|
"onUpdate:modelValue": i[19] || (i[19] = (s) => e.fields.client_certificate = s),
|
|
@@ -1264,7 +1264,7 @@ const ve = {
|
|
|
1264
1264
|
type: "text"
|
|
1265
1265
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1266
1266
|
])) : L("", !0),
|
|
1267
|
-
|
|
1267
|
+
ne.value ? (I(), K("div", Lt, [
|
|
1268
1268
|
d(v, {
|
|
1269
1269
|
modelValue: e.fields.ca_certificates,
|
|
1270
1270
|
"onUpdate:modelValue": i[20] || (i[20] = (s) => e.fields.ca_certificates = s),
|
|
@@ -1278,15 +1278,15 @@ const ve = {
|
|
|
1278
1278
|
type: "text"
|
|
1279
1279
|
}, {
|
|
1280
1280
|
"label-tooltip": f(() => [
|
|
1281
|
-
d(l(
|
|
1281
|
+
d(l(O), {
|
|
1282
1282
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1283
1283
|
scope: "global"
|
|
1284
1284
|
}, {
|
|
1285
1285
|
code1: f(() => [
|
|
1286
|
-
|
|
1286
|
+
C("code", null, h(l(a)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1287
1287
|
]),
|
|
1288
1288
|
code2: f(() => [
|
|
1289
|
-
|
|
1289
|
+
C("code", null, h(l(a)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1290
1290
|
]),
|
|
1291
1291
|
_: 1
|
|
1292
1292
|
})
|
|
@@ -1294,7 +1294,7 @@ const ve = {
|
|
|
1294
1294
|
_: 1
|
|
1295
1295
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1296
1296
|
])) : L("", !0),
|
|
1297
|
-
|
|
1297
|
+
Ce.value ? (I(), K("div", Dt, [
|
|
1298
1298
|
d(o, {
|
|
1299
1299
|
modelValue: e.fields.tls_verify_enabled,
|
|
1300
1300
|
"onUpdate:modelValue": i[21] || (i[21] = (s) => e.fields.tls_verify_enabled = s),
|
|
@@ -1304,20 +1304,20 @@ const ve = {
|
|
|
1304
1304
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1305
1305
|
}, {
|
|
1306
1306
|
tooltip: f(() => [
|
|
1307
|
-
d(l(
|
|
1307
|
+
d(l(O), {
|
|
1308
1308
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1309
1309
|
scope: "global"
|
|
1310
1310
|
}, {
|
|
1311
1311
|
code1: f(() => [
|
|
1312
|
-
|
|
1312
|
+
C("code", null, h(l(a)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1313
1313
|
]),
|
|
1314
1314
|
_: 1
|
|
1315
1315
|
})
|
|
1316
1316
|
]),
|
|
1317
1317
|
_: 1
|
|
1318
1318
|
}, 8, ["modelValue", "description", "label"]),
|
|
1319
|
-
e.fields.tls_verify_enabled ? (
|
|
1320
|
-
d(
|
|
1319
|
+
e.fields.tls_verify_enabled ? (I(), K("div", Gt, [
|
|
1320
|
+
d(S, {
|
|
1321
1321
|
modelValue: e.fields.tls_verify_value,
|
|
1322
1322
|
"onUpdate:modelValue": i[22] || (i[22] = (s) => e.fields.tls_verify_value = s),
|
|
1323
1323
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
@@ -1325,8 +1325,8 @@ const ve = {
|
|
|
1325
1325
|
"selected-value": !0
|
|
1326
1326
|
}, null, 8, ["modelValue", "label"])
|
|
1327
1327
|
])) : L("", !0),
|
|
1328
|
-
e.fields.tls_verify_enabled ? (
|
|
1329
|
-
d(
|
|
1328
|
+
e.fields.tls_verify_enabled ? (I(), K("div", qt, [
|
|
1329
|
+
d(S, {
|
|
1330
1330
|
modelValue: e.fields.tls_verify_value,
|
|
1331
1331
|
"onUpdate:modelValue": i[23] || (i[23] = (s) => e.fields.tls_verify_value = s),
|
|
1332
1332
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
@@ -1348,14 +1348,14 @@ const ve = {
|
|
|
1348
1348
|
]);
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
}),
|
|
1351
|
+
}), Xt = /* @__PURE__ */ Fe(Ot, [["__scopeId", "data-v-861a3759"]]), Nt = { class: "kong-ui-gateway-service-entity-config-card" }, Zt = /* @__PURE__ */ Ee({
|
|
1352
1352
|
__name: "GatewayServiceConfigCard",
|
|
1353
1353
|
props: {
|
|
1354
1354
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1355
1355
|
config: {
|
|
1356
1356
|
type: Object,
|
|
1357
1357
|
required: !0,
|
|
1358
|
-
validator: (n) => !(!n || ![
|
|
1358
|
+
validator: (n) => !(!n || ![g.Konnect, g.KongManager].includes(n == null ? void 0 : n.app) || n.app === g.Konnect && !n.controlPlaneId || n.app === g.KongManager && typeof n.workspace != "string" || !n.entityId)
|
|
1359
1359
|
},
|
|
1360
1360
|
/**
|
|
1361
1361
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -1375,7 +1375,7 @@ const ve = {
|
|
|
1375
1375
|
},
|
|
1376
1376
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1377
1377
|
setup(n) {
|
|
1378
|
-
const D = n, { i18n: { t: p }, i18nT: c } =
|
|
1378
|
+
const D = n, { i18n: { t: p }, i18nT: c } = ye.useI18n(), r = b(() => re.form[D.config.app].edit), { getPropValue: $ } = at(), W = (a, U) => $(a, U) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), O = P({
|
|
1379
1379
|
id: {},
|
|
1380
1380
|
name: {
|
|
1381
1381
|
tooltip: p("gateway_services.form.fields.name.tooltip")
|
|
@@ -1384,19 +1384,19 @@ const ve = {
|
|
|
1384
1384
|
updated_at: {},
|
|
1385
1385
|
created_at: {},
|
|
1386
1386
|
protocol: {
|
|
1387
|
-
section:
|
|
1387
|
+
section: pe.Basic,
|
|
1388
1388
|
tooltip: p("gateway_services.form.fields.protocol.tooltip")
|
|
1389
1389
|
},
|
|
1390
1390
|
host: {
|
|
1391
|
-
section:
|
|
1391
|
+
section: pe.Basic,
|
|
1392
1392
|
tooltip: p("gateway_services.form.fields.host.tooltip")
|
|
1393
1393
|
},
|
|
1394
1394
|
path: {
|
|
1395
|
-
section:
|
|
1395
|
+
section: pe.Basic,
|
|
1396
1396
|
tooltip: p("gateway_services.form.fields.path.tooltip")
|
|
1397
1397
|
},
|
|
1398
1398
|
port: {
|
|
1399
|
-
section:
|
|
1399
|
+
section: pe.Basic,
|
|
1400
1400
|
tooltip: p("gateway_services.form.fields.port.tooltip")
|
|
1401
1401
|
},
|
|
1402
1402
|
tags: {
|
|
@@ -1424,7 +1424,7 @@ const ve = {
|
|
|
1424
1424
|
tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
|
|
1425
1425
|
},
|
|
1426
1426
|
ca_certificates: {
|
|
1427
|
-
type:
|
|
1427
|
+
type: nt.BadgeTag,
|
|
1428
1428
|
label: p("gateway_services.form.fields.ca_certificates.label"),
|
|
1429
1429
|
order: 6
|
|
1430
1430
|
},
|
|
@@ -1435,17 +1435,17 @@ const ve = {
|
|
|
1435
1435
|
hidden: !0
|
|
1436
1436
|
}
|
|
1437
1437
|
});
|
|
1438
|
-
return (a,
|
|
1439
|
-
d(l(
|
|
1438
|
+
return (a, U) => (I(), K("div", Nt, [
|
|
1439
|
+
d(l(ct), {
|
|
1440
1440
|
config: n.config,
|
|
1441
1441
|
"config-card-doc": n.configCardDoc,
|
|
1442
|
-
"config-schema":
|
|
1442
|
+
"config-schema": O.value,
|
|
1443
1443
|
"entity-type": l(Ae).GatewayService,
|
|
1444
1444
|
"fetch-url": r.value,
|
|
1445
1445
|
"hide-title": n.hideTitle,
|
|
1446
|
-
"onFetch:error":
|
|
1447
|
-
"onFetch:success":
|
|
1448
|
-
onLoading:
|
|
1446
|
+
"onFetch:error": U[0] || (U[0] = (V) => a.$emit("fetch:error", V)),
|
|
1447
|
+
"onFetch:success": U[1] || (U[1] = (V) => a.$emit("fetch:success", V)),
|
|
1448
|
+
onLoading: U[2] || (U[2] = (V) => a.$emit("loading", V))
|
|
1449
1449
|
}, {
|
|
1450
1450
|
"enabled-label-tooltip": f(() => [
|
|
1451
1451
|
d(l(c), {
|
|
@@ -1453,10 +1453,10 @@ const ve = {
|
|
|
1453
1453
|
scope: "global"
|
|
1454
1454
|
}, {
|
|
1455
1455
|
false: f(() => [
|
|
1456
|
-
|
|
1456
|
+
C("code", null, h(l(p)("gateway_services.form.fields.enabled.false")), 1)
|
|
1457
1457
|
]),
|
|
1458
1458
|
true: f(() => [
|
|
1459
|
-
|
|
1459
|
+
C("code", null, h(l(p)("gateway_services.form.fields.enabled.true")), 1)
|
|
1460
1460
|
]),
|
|
1461
1461
|
_: 1
|
|
1462
1462
|
})
|
|
@@ -1467,10 +1467,10 @@ const ve = {
|
|
|
1467
1467
|
scope: "global"
|
|
1468
1468
|
}, {
|
|
1469
1469
|
code1: f(() => [
|
|
1470
|
-
|
|
1470
|
+
C("code", null, h(l(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1471
1471
|
]),
|
|
1472
1472
|
code2: f(() => [
|
|
1473
|
-
|
|
1473
|
+
C("code", null, h(l(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1474
1474
|
]),
|
|
1475
1475
|
_: 1
|
|
1476
1476
|
})
|
|
@@ -1481,16 +1481,16 @@ const ve = {
|
|
|
1481
1481
|
scope: "global"
|
|
1482
1482
|
}, {
|
|
1483
1483
|
code1: f(() => [
|
|
1484
|
-
|
|
1484
|
+
C("code", null, h(l(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1485
1485
|
]),
|
|
1486
1486
|
_: 1
|
|
1487
1487
|
})
|
|
1488
1488
|
]),
|
|
1489
|
-
tls_verify: f((
|
|
1490
|
-
M(
|
|
1489
|
+
tls_verify: f((V) => [
|
|
1490
|
+
M(h(typeof l($)("rowValue", V) == "boolean" ? W("rowValue", V) : l(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1491
1491
|
]),
|
|
1492
|
-
client_certificate: f((
|
|
1493
|
-
M(
|
|
1492
|
+
client_certificate: f((V) => [
|
|
1493
|
+
M(h(l($)("rowValue", V) ? l($)("rowValue", V).id : "–"), 1)
|
|
1494
1494
|
]),
|
|
1495
1495
|
_: 1
|
|
1496
1496
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1498,7 +1498,7 @@ const ve = {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
});
|
|
1500
1500
|
export {
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1501
|
+
Zt as GatewayServiceConfigCard,
|
|
1502
|
+
Xt as GatewayServiceForm,
|
|
1503
|
+
Qt as GatewayServiceList
|
|
1504
1504
|
};
|