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