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