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