@kong-ui-public/entities-gateway-services 3.10.4-pr.1990.f7a2d582d.0 → 3.10.4-pr.2001.5923607fc.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 +1026 -794
- 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 +26 -0
- package/dist/types/components/GatewayServiceForm.vue.d.ts.map +1 -1
- package/dist/types/components/GatewayServiceList.vue.d.ts.map +1 -1
- package/dist/types/constants.d.ts +69 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/types/gateway-service-form.d.ts +19 -2
- package/dist/types/types/gateway-service-form.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Me, computed as h, ref as $, watch as xe, onBeforeMount as He, resolveComponent as D, openBlock as C, createElementBlock as P, createVNode as c, unref as i, createSlots as Ne, withCtx as d, createBlock as ne, Teleport as Be, createElementVNode as S, createCommentVNode as B, createTextVNode as L, toDisplayString as E, withModifiers as Re, toValue as De, reactive as qe, onMounted as Je, renderSlot as Qe, Transition as $e, Fragment as Xe, renderList as Ye } from "vue";
|
|
2
|
+
import { useRouter as Ge } from "vue-router";
|
|
3
|
+
import { BookIcon as Le, AddIcon as et, ServicesIcon as tt } from "@kong/icons";
|
|
4
|
+
import { createI18n as ot, i18nTComponent as it } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as je, useTableState as lt, useFetcher as rt, useDeleteUrlBuilder as st, FetcherStatus as at, EntityBaseTable as nt, EntityFilter as ct, PermissionsWrapper as ae, TableTags as dt, EntityEmptyState as ut, EntityToggleModal as ft, EntityDeleteModal as pt, EntityTypes as mt, useErrors as vt, useValidators as gt, EntityBaseFormType as Ke, useGatewayFeatureSupported as yt, EntityBaseForm as _t, SupportedEntityType as ze, EntityFormSection as We, useHelpers as ht, ConfigurationSchemaSection as be, ConfigurationSchemaType as bt, EntityBaseConfigCard as wt } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const kt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
9
9
|
copy_id: "Copy ID",
|
|
@@ -16,12 +16,12 @@ const dt = {
|
|
|
16
16
|
description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
|
|
17
17
|
menu_label: "Delete"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, Ct = {
|
|
20
20
|
placeholder: {
|
|
21
21
|
konnect: "Filter by name",
|
|
22
22
|
kongManager: "Filter by exact name or ID"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, Vt = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -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
|
},
|
|
@@ -96,12 +102,12 @@ const dt = {
|
|
|
96
102
|
},
|
|
97
103
|
host: {
|
|
98
104
|
label: "Host",
|
|
99
|
-
placeholder: "
|
|
105
|
+
placeholder: "e.g. www.myapi.com, 127.0.0.1",
|
|
100
106
|
tooltip: "The host of the upstream server. Note that the host value is case sensitive."
|
|
101
107
|
},
|
|
102
108
|
path: {
|
|
103
109
|
label: "Path",
|
|
104
|
-
placeholder: "
|
|
110
|
+
placeholder: "e.g. /sample",
|
|
105
111
|
tooltip: "The path to be used in request to the upstream server."
|
|
106
112
|
},
|
|
107
113
|
port: {
|
|
@@ -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",
|
|
@@ -169,39 +176,39 @@ const dt = {
|
|
|
169
176
|
}
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
|
-
},
|
|
179
|
+
}, St = {
|
|
173
180
|
general: "Gateway Services could not be retrieved",
|
|
174
181
|
delete: "The gateway service could not be deleted at this time.",
|
|
175
182
|
copy: "Failed to copy to clipboard",
|
|
176
183
|
urlErrorMessage: "Error: invalid URL"
|
|
177
|
-
},
|
|
184
|
+
}, Et = {
|
|
178
185
|
success: "Copied {val} to clipboard",
|
|
179
186
|
success_brief: "Successfully copied to clipboard"
|
|
180
|
-
},
|
|
187
|
+
}, It = {
|
|
181
188
|
gateway_services: "gateway services"
|
|
182
|
-
},
|
|
183
|
-
actions:
|
|
184
|
-
search:
|
|
185
|
-
gateway_services:
|
|
186
|
-
errors:
|
|
187
|
-
copy:
|
|
188
|
-
glossary:
|
|
189
|
+
}, Ft = {
|
|
190
|
+
actions: kt,
|
|
191
|
+
search: Ct,
|
|
192
|
+
gateway_services: Vt,
|
|
193
|
+
errors: St,
|
|
194
|
+
copy: Et,
|
|
195
|
+
glossary: It
|
|
189
196
|
};
|
|
190
|
-
function
|
|
191
|
-
const
|
|
197
|
+
function Tt() {
|
|
198
|
+
const a = ot("en-us", Ft);
|
|
192
199
|
return {
|
|
193
|
-
i18n:
|
|
194
|
-
i18nT:
|
|
200
|
+
i18n: a,
|
|
201
|
+
i18nT: it(a)
|
|
195
202
|
// Translation component <i18n-t>
|
|
196
203
|
};
|
|
197
204
|
}
|
|
198
|
-
function
|
|
205
|
+
function Pt() {
|
|
199
206
|
return {
|
|
200
|
-
getPortFromProtocol: (
|
|
201
|
-
const
|
|
202
|
-
if ((r || r === 0) && !
|
|
207
|
+
getPortFromProtocol: (I, p) => {
|
|
208
|
+
const n = [80, 443], r = Number(p);
|
|
209
|
+
if ((r || r === 0) && !n.includes(r))
|
|
203
210
|
return r;
|
|
204
|
-
switch (
|
|
211
|
+
switch (I) {
|
|
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:
|
|
222
|
-
usePortFromProtocol:
|
|
223
|
-
},
|
|
227
|
+
const Ce = {
|
|
228
|
+
useI18n: Tt,
|
|
229
|
+
usePortFromProtocol: Pt
|
|
230
|
+
}, we = "/v2/control-planes/{controlPlaneId}/core-entities", ke = "/{workspace}", ce = {
|
|
224
231
|
list: {
|
|
225
232
|
konnect: {
|
|
226
|
-
all: `${
|
|
233
|
+
all: `${we}/services`
|
|
227
234
|
},
|
|
228
235
|
kongManager: {
|
|
229
|
-
all: `${
|
|
236
|
+
all: `${ke}/services`
|
|
230
237
|
}
|
|
231
238
|
},
|
|
232
239
|
form: {
|
|
233
240
|
konnect: {
|
|
234
|
-
create: `${
|
|
235
|
-
validate: `${
|
|
236
|
-
edit: `${
|
|
241
|
+
create: `${we}/services`,
|
|
242
|
+
validate: `${we}/v1/schemas/json/service/validate`,
|
|
243
|
+
edit: `${we}/services/{id}`
|
|
237
244
|
},
|
|
238
245
|
kongManager: {
|
|
239
|
-
create: `${
|
|
240
|
-
validate: `${
|
|
241
|
-
edit: `${
|
|
246
|
+
create: `${ke}/services`,
|
|
247
|
+
validate: `${ke}/schemas/services/validate`,
|
|
248
|
+
edit: `${ke}/services/{id}`
|
|
242
249
|
}
|
|
243
250
|
}
|
|
244
|
-
},
|
|
251
|
+
}, At = "#00abd2", Rt = "24px", $t = { class: "kong-ui-entities-gateway-services-list" }, Ut = { class: "button-row" }, xt = { class: "empty-state-icon-gateway" }, Mt = { key: 1 }, Bt = /* @__PURE__ */ Me({
|
|
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,12 +306,12 @@ 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: I }) {
|
|
310
|
+
var se;
|
|
311
|
+
const p = I, n = a, { i18n: { t: r, formatUnixTimeStamp: V } } = Ce.useI18n(), q = Ge(), { axiosInstance: K } = je((se = n.config) == null ? void 0 : se.axiosRequestConfig), { hasRecords: s, handleStateChange: A } = lt(() => W.value), _ = h(() => s.value && n.config.app === "konnect"), G = h(() => !n.enableV2EmptyStates && n.config.app === "konnect"), oe = h(() => n.config.app !== "kongManager" || !!n.config.disableSorting), N = {
|
|
305
312
|
// the Name column is non-hidable
|
|
306
313
|
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
307
|
-
...
|
|
314
|
+
...n.config.showControlPlaneColumn ? { control_plane: { label: r("gateway_services.list.table_headers.control_plane") } } : {},
|
|
308
315
|
protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
309
316
|
host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
310
317
|
port: { label: r("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
@@ -313,71 +320,71 @@ const ye = {
|
|
|
313
320
|
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
314
321
|
updated_at: { label: r("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
315
322
|
created_at: { label: r("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
316
|
-
},
|
|
323
|
+
}, Ve = {
|
|
317
324
|
columnVisibility: {
|
|
318
325
|
created_at: !1
|
|
319
326
|
}
|
|
320
|
-
},
|
|
321
|
-
var
|
|
322
|
-
let u = `${
|
|
323
|
-
return
|
|
324
|
-
}),
|
|
325
|
-
const u =
|
|
327
|
+
}, j = N, b = h(() => {
|
|
328
|
+
var m, g;
|
|
329
|
+
let u = `${n.config.apiBaseUrl}${ce.list[n.config.app].all}`;
|
|
330
|
+
return n.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((m = n.config) == null ? void 0 : m.controlPlaneId) || "") : n.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (g = n.config) != null && g.workspace ? `/${n.config.workspace}` : "")), u;
|
|
331
|
+
}), ie = h(() => n.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${b.value}`) : new URL(b.value)), W = $(""), de = h(() => {
|
|
332
|
+
const u = n.config.app === "konnect" || n.config.isExactMatch;
|
|
326
333
|
if (u)
|
|
327
334
|
return {
|
|
328
335
|
isExactMatch: u,
|
|
329
|
-
placeholder: r(`search.placeholder.${
|
|
336
|
+
placeholder: r(`search.placeholder.${n.config.app}`)
|
|
330
337
|
};
|
|
331
|
-
const { name:
|
|
338
|
+
const { name: m, enabled: g, protocol: F, host: M, port: R, path: J } = N;
|
|
332
339
|
return {
|
|
333
340
|
isExactMatch: u,
|
|
334
|
-
fields: { name:
|
|
335
|
-
schema:
|
|
341
|
+
fields: { name: m, enabled: g, protocol: F, host: M, port: R, path: J },
|
|
342
|
+
schema: n.config.filterSchema
|
|
336
343
|
};
|
|
337
344
|
}), {
|
|
338
|
-
fetcher:
|
|
339
|
-
fetcherState:
|
|
340
|
-
fetcherCacheKey:
|
|
341
|
-
} =
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
ctaPath:
|
|
347
|
-
ctaText:
|
|
348
|
-
message: `${r("gateway_services.list.empty_state.description")}${
|
|
349
|
-
title:
|
|
350
|
-
})),
|
|
345
|
+
fetcher: ue,
|
|
346
|
+
fetcherState: t,
|
|
347
|
+
fetcherCacheKey: k
|
|
348
|
+
} = rt({ ...n.config, cacheIdentifier: n.cacheIdentifier }, b.value), Se = () => {
|
|
349
|
+
W.value = "";
|
|
350
|
+
}, fe = () => {
|
|
351
|
+
k.value++;
|
|
352
|
+
}, z = $(null), Ee = h(() => ({
|
|
353
|
+
ctaPath: n.config.createRoute,
|
|
354
|
+
ctaText: H.value ? n.isServerless ? r("actions.serverless_create") : r("actions.create") : void 0,
|
|
355
|
+
message: `${r("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState ? ` ${n.config.additionMessageForEmptyState}` : ""}`,
|
|
356
|
+
title: H.value ? n.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
|
|
357
|
+
})), O = $(!1), U = $(null), X = h(() => {
|
|
351
358
|
const u = {
|
|
352
359
|
action: "disable",
|
|
353
360
|
id: "",
|
|
354
361
|
name: ""
|
|
355
362
|
};
|
|
356
|
-
if (
|
|
357
|
-
const { enabled:
|
|
358
|
-
u.action =
|
|
363
|
+
if (U.value) {
|
|
364
|
+
const { enabled: m, id: g, name: F } = U.value;
|
|
365
|
+
u.action = m ? "disable" : "enable", u.id = g, u.name = F || g;
|
|
359
366
|
}
|
|
360
367
|
return u;
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
var
|
|
367
|
-
if (!await ((
|
|
368
|
+
}), Ie = (u) => {
|
|
369
|
+
O.value = !0, U.value = u;
|
|
370
|
+
}, le = () => {
|
|
371
|
+
O.value = !1, U.value = null;
|
|
372
|
+
}, Fe = async () => {
|
|
373
|
+
var F, M;
|
|
374
|
+
if (!await ((F = n.canEdit) == null ? void 0 : F.call(n, U.value)) || !U.value)
|
|
368
375
|
return;
|
|
369
|
-
const
|
|
376
|
+
const m = `${ie.value.href}/${U.value.id}`, g = !U.value.enabled;
|
|
370
377
|
try {
|
|
371
|
-
const { data:
|
|
372
|
-
p("toggle:success",
|
|
373
|
-
} catch (
|
|
374
|
-
p("error",
|
|
378
|
+
const { data: R } = ((M = n.config) == null ? void 0 : M.app) === "konnect" ? await K.put(m, { ...U.value, enabled: g }) : await K.patch(m, { ...U.value, enabled: g });
|
|
379
|
+
p("toggle:success", R), U.value.enabled = g;
|
|
380
|
+
} catch (R) {
|
|
381
|
+
p("error", R);
|
|
375
382
|
}
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
},
|
|
379
|
-
const
|
|
380
|
-
if (!
|
|
383
|
+
}, pe = (u) => {
|
|
384
|
+
n.config.getControlPlaneRoute && q.push(n.config.getControlPlaneRoute(u));
|
|
385
|
+
}, me = (u, m) => {
|
|
386
|
+
const g = u.id;
|
|
387
|
+
if (!m(g)) {
|
|
381
388
|
p("copy:error", {
|
|
382
389
|
entity: u,
|
|
383
390
|
field: "id",
|
|
@@ -388,11 +395,11 @@ const ye = {
|
|
|
388
395
|
p("copy:success", {
|
|
389
396
|
entity: u,
|
|
390
397
|
field: "id",
|
|
391
|
-
message: r("copy.success", { val:
|
|
398
|
+
message: r("copy.success", { val: g })
|
|
392
399
|
});
|
|
393
|
-
},
|
|
394
|
-
const
|
|
395
|
-
if (!
|
|
400
|
+
}, ve = (u, m) => {
|
|
401
|
+
const g = JSON.stringify(u);
|
|
402
|
+
if (!m(g)) {
|
|
396
403
|
p("copy:error", {
|
|
397
404
|
entity: u,
|
|
398
405
|
message: r("errors.copy")
|
|
@@ -403,107 +410,107 @@ const ye = {
|
|
|
403
410
|
entity: u,
|
|
404
411
|
message: r("copy.success_brief")
|
|
405
412
|
});
|
|
406
|
-
},
|
|
407
|
-
var
|
|
408
|
-
await ((
|
|
409
|
-
},
|
|
413
|
+
}, ge = async (u) => {
|
|
414
|
+
var g;
|
|
415
|
+
await ((g = n.canRetrieve) == null ? void 0 : g.call(n, u)) && q.push(n.config.getViewRoute(u.id));
|
|
416
|
+
}, ye = (u) => ({
|
|
410
417
|
label: r("actions.view"),
|
|
411
|
-
to:
|
|
412
|
-
}),
|
|
418
|
+
to: n.config.getViewRoute(u)
|
|
419
|
+
}), Y = (u) => ({
|
|
413
420
|
label: r("actions.edit"),
|
|
414
|
-
to:
|
|
415
|
-
}),
|
|
416
|
-
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
var u,
|
|
421
|
-
if ((u =
|
|
422
|
-
|
|
421
|
+
to: n.config.getEditRoute(u)
|
|
422
|
+
}), x = $(void 0), Z = $(!1), ee = $(!1), re = $(""), _e = st(n.config, b.value), Te = (u) => {
|
|
423
|
+
x.value = u, Z.value = !0, re.value = "";
|
|
424
|
+
}, he = () => {
|
|
425
|
+
Z.value = !1, x.value = void 0;
|
|
426
|
+
}, Pe = async () => {
|
|
427
|
+
var u, m, g;
|
|
428
|
+
if ((u = x.value) != null && u.id) {
|
|
429
|
+
ee.value = !0;
|
|
423
430
|
try {
|
|
424
|
-
await
|
|
425
|
-
} catch (
|
|
426
|
-
|
|
431
|
+
await K.delete(_e(x.value.id)), p("delete:success", x.value), he(), k.value++;
|
|
432
|
+
} catch (F) {
|
|
433
|
+
re.value = ((g = (m = F.response) == null ? void 0 : m.data) == null ? void 0 : g.message) || F.message || r("errors.delete"), p("error", F);
|
|
427
434
|
} finally {
|
|
428
|
-
|
|
435
|
+
ee.value = !1;
|
|
429
436
|
}
|
|
430
437
|
}
|
|
431
|
-
},
|
|
432
|
-
|
|
438
|
+
}, Ae = () => {
|
|
439
|
+
q.push(n.config.createRoute);
|
|
433
440
|
};
|
|
434
|
-
|
|
435
|
-
var
|
|
436
|
-
if (u.status ===
|
|
437
|
-
|
|
441
|
+
xe(t, (u) => {
|
|
442
|
+
var m, g, F;
|
|
443
|
+
if (u.status === at.Error) {
|
|
444
|
+
z.value = {
|
|
438
445
|
title: r("errors.general")
|
|
439
|
-
}, (
|
|
446
|
+
}, (F = (g = (m = u.error) == null ? void 0 : m.response) == null ? void 0 : g.data) != null && F.message && (z.value.message = u.error.response.data.message), p("error", u.error);
|
|
440
447
|
return;
|
|
441
448
|
}
|
|
442
|
-
|
|
449
|
+
z.value = null;
|
|
443
450
|
});
|
|
444
|
-
const
|
|
445
|
-
return
|
|
446
|
-
|
|
447
|
-
}), (u,
|
|
448
|
-
const
|
|
449
|
-
return
|
|
450
|
-
|
|
451
|
-
"cache-identifier":
|
|
452
|
-
"default-table-preferences":
|
|
453
|
-
"disable-sorting":
|
|
454
|
-
"empty-state-options":
|
|
451
|
+
const H = $(!1);
|
|
452
|
+
return He(async () => {
|
|
453
|
+
H.value = await n.canCreate();
|
|
454
|
+
}), (u, m) => {
|
|
455
|
+
const g = D("KButton"), F = D("KBadge"), M = D("KInputSwitch"), R = D("KDropdownItem"), J = D("KClipboardProvider");
|
|
456
|
+
return C(), P("div", $t, [
|
|
457
|
+
c(i(nt), {
|
|
458
|
+
"cache-identifier": a.cacheIdentifier,
|
|
459
|
+
"default-table-preferences": Ve,
|
|
460
|
+
"disable-sorting": oe.value,
|
|
461
|
+
"empty-state-options": Ee.value,
|
|
455
462
|
"enable-entity-actions": "",
|
|
456
|
-
"error-message":
|
|
457
|
-
fetcher:
|
|
458
|
-
"fetcher-cache-key":
|
|
463
|
+
"error-message": z.value,
|
|
464
|
+
fetcher: i(ue),
|
|
465
|
+
"fetcher-cache-key": i(k),
|
|
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
|
-
"toolbar-filter":
|
|
469
|
-
|
|
470
|
-
modelValue:
|
|
471
|
-
"onUpdate:modelValue":
|
|
472
|
-
config:
|
|
468
|
+
query: W.value,
|
|
469
|
+
"table-headers": i(j),
|
|
470
|
+
onClearSearchInput: Se,
|
|
471
|
+
"onClick:row": m[5] || (m[5] = (e) => ge(e)),
|
|
472
|
+
onSort: fe,
|
|
473
|
+
onState: i(A)
|
|
474
|
+
}, Ne({
|
|
475
|
+
"toolbar-filter": d(() => [
|
|
476
|
+
c(i(ct), {
|
|
477
|
+
modelValue: W.value,
|
|
478
|
+
"onUpdate:modelValue": m[0] || (m[0] = (e) => W.value = e),
|
|
479
|
+
config: de.value
|
|
473
480
|
}, null, 8, ["modelValue", "config"])
|
|
474
481
|
]),
|
|
475
|
-
"toolbar-button":
|
|
476
|
-
(
|
|
477
|
-
disabled: !
|
|
482
|
+
"toolbar-button": d(() => [
|
|
483
|
+
(C(), ne(Be, {
|
|
484
|
+
disabled: !a.useActionOutside,
|
|
478
485
|
to: "#kong-ui-app-page-header-action-button"
|
|
479
486
|
}, [
|
|
480
|
-
|
|
481
|
-
|
|
487
|
+
S("div", Ut, [
|
|
488
|
+
_.value ? (C(), ne(g, {
|
|
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: m[1] || (m[1] = (e) => u.$emit("click:learn-more"))
|
|
488
495
|
}, {
|
|
489
|
-
default:
|
|
490
|
-
|
|
496
|
+
default: d(() => [
|
|
497
|
+
c(i(Le), { decorative: "" })
|
|
491
498
|
]),
|
|
492
499
|
_: 1
|
|
493
|
-
})) :
|
|
494
|
-
|
|
495
|
-
"auth-function": () =>
|
|
500
|
+
})) : B("", !0),
|
|
501
|
+
c(i(ae), {
|
|
502
|
+
"auth-function": () => a.canCreate()
|
|
496
503
|
}, {
|
|
497
|
-
default:
|
|
498
|
-
|
|
504
|
+
default: d(() => [
|
|
505
|
+
c(g, {
|
|
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
|
-
default:
|
|
505
|
-
|
|
506
|
-
|
|
511
|
+
default: d(() => [
|
|
512
|
+
c(i(et)),
|
|
513
|
+
L(" " + E(i(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
507
514
|
]),
|
|
508
515
|
_: 1
|
|
509
516
|
}, 8, ["size", "to"])
|
|
@@ -513,120 +520,120 @@ const ye = {
|
|
|
513
520
|
])
|
|
514
521
|
], 8, ["disabled"]))
|
|
515
522
|
]),
|
|
516
|
-
name:
|
|
517
|
-
|
|
523
|
+
name: d(({ rowValue: e }) => [
|
|
524
|
+
S("b", null, E(e ?? "-"), 1)
|
|
518
525
|
]),
|
|
519
|
-
control_plane:
|
|
520
|
-
var
|
|
526
|
+
control_plane: d(({ row: e }) => {
|
|
527
|
+
var o;
|
|
521
528
|
return [
|
|
522
|
-
(
|
|
529
|
+
(o = e.x_meta) != null && o.cluster_id ? (C(), ne(F, {
|
|
523
530
|
key: 0,
|
|
524
|
-
tooltip:
|
|
531
|
+
tooltip: e.x_meta.cluster_id,
|
|
525
532
|
"truncation-tooltip": "",
|
|
526
|
-
onClick:
|
|
533
|
+
onClick: Re((v) => pe(e.x_meta.cluster_id), ["stop"])
|
|
527
534
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
535
|
+
default: d(() => [
|
|
536
|
+
L(E(e.x_meta.cluster_id), 1)
|
|
530
537
|
]),
|
|
531
538
|
_: 2
|
|
532
|
-
}, 1032, ["tooltip", "onClick"])) : (
|
|
539
|
+
}, 1032, ["tooltip", "onClick"])) : (C(), P("b", Mt, "-"))
|
|
533
540
|
];
|
|
534
541
|
}),
|
|
535
|
-
enabled:
|
|
536
|
-
|
|
537
|
-
"auth-function": () =>
|
|
542
|
+
enabled: d(({ row: e }) => [
|
|
543
|
+
c(i(ae), {
|
|
544
|
+
"auth-function": () => a.canEdit(e),
|
|
538
545
|
"force-show": ""
|
|
539
546
|
}, {
|
|
540
|
-
default:
|
|
541
|
-
|
|
542
|
-
onClick:
|
|
547
|
+
default: d(({ isAllowed: o }) => [
|
|
548
|
+
S("div", {
|
|
549
|
+
onClick: m[4] || (m[4] = Re(() => {
|
|
543
550
|
}, ["stop"]))
|
|
544
551
|
}, [
|
|
545
|
-
|
|
546
|
-
modelValue:
|
|
547
|
-
"onUpdate:modelValue": (
|
|
548
|
-
"data-testid": `row-${
|
|
549
|
-
disabled: !
|
|
550
|
-
onClick:
|
|
552
|
+
c(M, {
|
|
553
|
+
modelValue: e.enabled,
|
|
554
|
+
"onUpdate:modelValue": (v) => e.enabled = v,
|
|
555
|
+
"data-testid": `row-${e.id}-toggle-input`,
|
|
556
|
+
disabled: !o,
|
|
557
|
+
onClick: Re((v) => Ie(e), ["prevent"])
|
|
551
558
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
552
559
|
])
|
|
553
560
|
]),
|
|
554
561
|
_: 2
|
|
555
562
|
}, 1032, ["auth-function"])
|
|
556
563
|
]),
|
|
557
|
-
tags:
|
|
558
|
-
|
|
564
|
+
tags: d(({ rowValue: e }) => [
|
|
565
|
+
c(i(dt), { tags: e }, null, 8, ["tags"])
|
|
559
566
|
]),
|
|
560
|
-
created_at:
|
|
561
|
-
|
|
567
|
+
created_at: d(({ rowValue: e }) => [
|
|
568
|
+
L(E(i(V)(e)), 1)
|
|
562
569
|
]),
|
|
563
|
-
updated_at:
|
|
564
|
-
|
|
570
|
+
updated_at: d(({ row: e, rowValue: o }) => [
|
|
571
|
+
L(E(i(V)(o ?? e.created_at)), 1)
|
|
565
572
|
]),
|
|
566
|
-
actions:
|
|
567
|
-
|
|
568
|
-
default:
|
|
569
|
-
|
|
573
|
+
actions: d(({ row: e }) => [
|
|
574
|
+
c(J, null, {
|
|
575
|
+
default: d(({ copyToClipboard: o }) => [
|
|
576
|
+
c(R, {
|
|
570
577
|
"data-testid": "action-entity-copy-id",
|
|
571
|
-
onClick: (
|
|
578
|
+
onClick: (v) => me(e, o)
|
|
572
579
|
}, {
|
|
573
|
-
default:
|
|
574
|
-
|
|
580
|
+
default: d(() => [
|
|
581
|
+
L(E(i(r)("actions.copy_id")), 1)
|
|
575
582
|
]),
|
|
576
583
|
_: 2
|
|
577
584
|
}, 1032, ["onClick"])
|
|
578
585
|
]),
|
|
579
586
|
_: 2
|
|
580
587
|
}, 1024),
|
|
581
|
-
|
|
582
|
-
default:
|
|
583
|
-
|
|
588
|
+
c(J, null, {
|
|
589
|
+
default: d(({ copyToClipboard: o }) => [
|
|
590
|
+
c(R, {
|
|
584
591
|
"data-testid": "action-entity-copy-json",
|
|
585
|
-
onClick: (
|
|
592
|
+
onClick: (v) => ve(e, o)
|
|
586
593
|
}, {
|
|
587
|
-
default:
|
|
588
|
-
|
|
594
|
+
default: d(() => [
|
|
595
|
+
L(E(i(r)("actions.copy_json")), 1)
|
|
589
596
|
]),
|
|
590
597
|
_: 2
|
|
591
598
|
}, 1032, ["onClick"])
|
|
592
599
|
]),
|
|
593
600
|
_: 2
|
|
594
601
|
}, 1024),
|
|
595
|
-
|
|
596
|
-
"auth-function": () =>
|
|
602
|
+
c(i(ae), {
|
|
603
|
+
"auth-function": () => a.canRetrieve(e)
|
|
597
604
|
}, {
|
|
598
|
-
default:
|
|
599
|
-
|
|
605
|
+
default: d(() => [
|
|
606
|
+
c(R, {
|
|
600
607
|
"data-testid": "action-entity-view",
|
|
601
608
|
"has-divider": "",
|
|
602
|
-
item:
|
|
609
|
+
item: ye(e.id)
|
|
603
610
|
}, null, 8, ["item"])
|
|
604
611
|
]),
|
|
605
612
|
_: 2
|
|
606
613
|
}, 1032, ["auth-function"]),
|
|
607
|
-
|
|
608
|
-
"auth-function": () =>
|
|
614
|
+
c(i(ae), {
|
|
615
|
+
"auth-function": () => a.canEdit(e)
|
|
609
616
|
}, {
|
|
610
|
-
default:
|
|
611
|
-
|
|
617
|
+
default: d(() => [
|
|
618
|
+
c(R, {
|
|
612
619
|
"data-testid": "action-entity-edit",
|
|
613
|
-
item:
|
|
620
|
+
item: Y(e.id)
|
|
614
621
|
}, null, 8, ["item"])
|
|
615
622
|
]),
|
|
616
623
|
_: 2
|
|
617
624
|
}, 1032, ["auth-function"]),
|
|
618
|
-
|
|
619
|
-
"auth-function": () =>
|
|
625
|
+
c(i(ae), {
|
|
626
|
+
"auth-function": () => a.canDelete(e)
|
|
620
627
|
}, {
|
|
621
|
-
default:
|
|
622
|
-
|
|
628
|
+
default: d(() => [
|
|
629
|
+
c(R, {
|
|
623
630
|
danger: "",
|
|
624
631
|
"data-testid": "action-entity-delete",
|
|
625
632
|
"has-divider": "",
|
|
626
|
-
onClick: (
|
|
633
|
+
onClick: (o) => Te(e)
|
|
627
634
|
}, {
|
|
628
|
-
default:
|
|
629
|
-
|
|
635
|
+
default: d(() => [
|
|
636
|
+
L(E(i(r)("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
|
+
!i(s) && G.value ? {
|
|
640
647
|
name: "outside-actions",
|
|
641
|
-
fn:
|
|
642
|
-
(
|
|
643
|
-
disabled: !
|
|
648
|
+
fn: d(() => [
|
|
649
|
+
(C(), ne(Be, {
|
|
650
|
+
disabled: !a.useActionOutside,
|
|
644
651
|
to: "#kong-ui-app-page-header-action-button"
|
|
645
652
|
}, [
|
|
646
|
-
|
|
653
|
+
c(g, {
|
|
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: m[2] || (m[2] = (e) => u.$emit("click:learn-more"))
|
|
652
659
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
|
|
660
|
+
default: d(() => [
|
|
661
|
+
c(i(Le), { 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
|
-
fn:
|
|
665
|
-
|
|
666
|
-
"action-button-text":
|
|
671
|
+
fn: d(() => [
|
|
672
|
+
c(i(ut), {
|
|
673
|
+
"action-button-text": i(r)("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: i(r)("gateway_services.empty_state_v2.description"),
|
|
678
|
+
"learn-more": a.config.app === "konnect",
|
|
679
|
+
title: i(r)("gateway_services.empty_state_v2.title"),
|
|
680
|
+
"onClick:create": Ae,
|
|
681
|
+
"onClick:learnMore": m[3] || (m[3] = (e) => u.$emit("click:learn-more"))
|
|
675
682
|
}, {
|
|
676
|
-
image:
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
color:
|
|
680
|
-
size:
|
|
683
|
+
image: d(() => [
|
|
684
|
+
S("div", xt, [
|
|
685
|
+
c(i(tt), {
|
|
686
|
+
color: i(At),
|
|
687
|
+
size: i(Rt)
|
|
681
688
|
}, null, 8, ["color", "size"])
|
|
682
689
|
])
|
|
683
690
|
]),
|
|
@@ -687,64 +694,137 @@ 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
|
-
|
|
697
|
+
c(i(ft), {
|
|
691
698
|
action: X.value.action,
|
|
692
699
|
"entity-id": X.value.id,
|
|
693
700
|
"entity-name": X.value.name,
|
|
694
|
-
"entity-type":
|
|
695
|
-
"on-confirm":
|
|
696
|
-
visible:
|
|
697
|
-
onCancel:
|
|
698
|
-
onProceed:
|
|
701
|
+
"entity-type": i(r)("glossary.gateway_services"),
|
|
702
|
+
"on-confirm": Fe,
|
|
703
|
+
visible: O.value,
|
|
704
|
+
onCancel: le,
|
|
705
|
+
onProceed: le
|
|
699
706
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
700
|
-
|
|
701
|
-
"action-pending":
|
|
702
|
-
description:
|
|
703
|
-
"entity-name":
|
|
704
|
-
"entity-type":
|
|
705
|
-
error:
|
|
706
|
-
title:
|
|
707
|
-
visible:
|
|
708
|
-
onCancel:
|
|
709
|
-
onProceed:
|
|
707
|
+
c(i(pt), {
|
|
708
|
+
"action-pending": ee.value,
|
|
709
|
+
description: i(r)("actions.delete.description"),
|
|
710
|
+
"entity-name": x.value && (x.value.name || x.value.id),
|
|
711
|
+
"entity-type": i(mt).GatewayService,
|
|
712
|
+
error: re.value,
|
|
713
|
+
title: i(r)("actions.delete.title"),
|
|
714
|
+
visible: Z.value,
|
|
715
|
+
onCancel: he,
|
|
716
|
+
onProceed: Pe
|
|
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
|
+
}), Ze = (a, I) => {
|
|
722
|
+
const p = a.__vccOpts || a;
|
|
723
|
+
for (const [n, r] of I)
|
|
724
|
+
p[n] = r;
|
|
725
|
+
return p;
|
|
726
|
+
}, mo = /* @__PURE__ */ Ze(Bt, [["__scopeId", "data-v-fa0c855e"]]);
|
|
727
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
728
|
+
const Oe = () => {
|
|
729
|
+
};
|
|
730
|
+
function Dt(a, I) {
|
|
731
|
+
function p(...n) {
|
|
732
|
+
return new Promise((r, V) => {
|
|
733
|
+
Promise.resolve(a(() => I.apply(this, n), { fn: I, thisArg: this, args: n })).then(r).catch(V);
|
|
734
|
+
});
|
|
735
|
+
}
|
|
718
736
|
return p;
|
|
719
|
-
}
|
|
737
|
+
}
|
|
738
|
+
function qt(a, I = {}) {
|
|
739
|
+
let p, n, r = Oe;
|
|
740
|
+
const V = (s) => {
|
|
741
|
+
clearTimeout(s), r(), r = Oe;
|
|
742
|
+
};
|
|
743
|
+
let q;
|
|
744
|
+
return (s) => {
|
|
745
|
+
const A = De(a), _ = De(I.maxWait);
|
|
746
|
+
return p && V(p), A <= 0 || _ !== void 0 && _ <= 0 ? (n && (V(n), n = null), Promise.resolve(s())) : new Promise((G, oe) => {
|
|
747
|
+
r = I.rejectOnCancel ? oe : G, q = s, _ && !n && (n = setTimeout(() => {
|
|
748
|
+
p && V(p), n = null, G(q());
|
|
749
|
+
}, _)), p = setTimeout(() => {
|
|
750
|
+
n && V(n), n = null, G(s());
|
|
751
|
+
}, A);
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function Ue(a, I = 200, p = {}) {
|
|
756
|
+
return Dt(
|
|
757
|
+
qt(I, p),
|
|
758
|
+
a
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
const Lt = {
|
|
762
|
+
name: "WeatherApi-quickstart-demo",
|
|
763
|
+
tags: [
|
|
764
|
+
"quickstart-demo"
|
|
765
|
+
],
|
|
766
|
+
protocol: "https",
|
|
767
|
+
path: "/examples/weather/utopia",
|
|
768
|
+
read_timeout: 6e4,
|
|
769
|
+
retries: 5,
|
|
770
|
+
// will be overriden with correct host during DP node setup
|
|
771
|
+
host: "global.api.konghq.com",
|
|
772
|
+
connect_timeout: 6e4,
|
|
773
|
+
ca_certificates: null,
|
|
774
|
+
client_certificate: null,
|
|
775
|
+
write_timeout: 6e4,
|
|
776
|
+
port: 443
|
|
777
|
+
}, Kt = {
|
|
778
|
+
name: "StockApi-quickstart-demo",
|
|
779
|
+
tags: [
|
|
780
|
+
"quickstart-demo"
|
|
781
|
+
],
|
|
782
|
+
protocol: "https",
|
|
783
|
+
path: "/examples/stock/piper",
|
|
784
|
+
read_timeout: 6e4,
|
|
785
|
+
retries: 5,
|
|
786
|
+
// will be overriden with correct host during DP node setup
|
|
787
|
+
host: "global.api.konghq.com",
|
|
788
|
+
connect_timeout: 6e4,
|
|
789
|
+
ca_certificates: null,
|
|
790
|
+
client_certificate: null,
|
|
791
|
+
write_timeout: 6e4,
|
|
792
|
+
port: 443
|
|
793
|
+
}, Wt = { class: "kong-ui-entities-gateway-service-form" }, Ot = {
|
|
794
|
+
key: 0,
|
|
795
|
+
class: "gateway-service-form-general-info"
|
|
796
|
+
}, Nt = { class: "gateway-service-form-group-selection-wrapper" }, Gt = {
|
|
720
797
|
key: 0,
|
|
721
798
|
class: "gateway-service-form-group-fields"
|
|
722
|
-
},
|
|
723
|
-
key:
|
|
799
|
+
}, jt = {
|
|
800
|
+
key: 0,
|
|
724
801
|
class: "gateway-service-form-group-fields"
|
|
725
|
-
},
|
|
802
|
+
}, zt = { key: 0 }, Zt = {
|
|
803
|
+
key: 0,
|
|
804
|
+
class: "gateway-service-form-advanced-fields"
|
|
805
|
+
}, Ht = { class: "gateway-service-form-margin-bottom" }, Jt = { class: "gateway-service-form-margin-bottom" }, Qt = { class: "gateway-service-form-margin-bottom" }, Xt = { class: "gateway-service-form-margin-bottom" }, Yt = {
|
|
726
806
|
key: 0,
|
|
727
807
|
class: "gateway-service-form-margin-bottom"
|
|
728
|
-
},
|
|
808
|
+
}, eo = {
|
|
729
809
|
key: 1,
|
|
730
810
|
class: "gateway-service-form-margin-bottom"
|
|
731
|
-
},
|
|
811
|
+
}, to = {
|
|
732
812
|
key: 2,
|
|
733
813
|
class: "gateway-service-form-margin-bottom"
|
|
734
|
-
},
|
|
814
|
+
}, oo = {
|
|
735
815
|
key: 0,
|
|
736
816
|
class: "checkbox-aligned-radio"
|
|
737
|
-
},
|
|
817
|
+
}, io = {
|
|
738
818
|
key: 1,
|
|
739
819
|
class: "checkbox-aligned-radio"
|
|
740
|
-
},
|
|
820
|
+
}, lo = { class: "gateway-service-form-tags" }, ro = { class: "form-error-list" }, so = /* @__PURE__ */ Me({
|
|
741
821
|
__name: "GatewayServiceForm",
|
|
742
822
|
props: {
|
|
743
823
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
744
824
|
config: {
|
|
745
825
|
type: Object,
|
|
746
826
|
required: !0,
|
|
747
|
-
validator: (
|
|
827
|
+
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
828
|
},
|
|
749
829
|
/** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
|
|
750
830
|
gatewayServiceId: {
|
|
@@ -757,12 +837,23 @@ const ye = {
|
|
|
757
837
|
type: Boolean,
|
|
758
838
|
required: !1,
|
|
759
839
|
default: !1
|
|
840
|
+
},
|
|
841
|
+
/** Whether show or hide Try sample API button */
|
|
842
|
+
hideTrySampleApiButton: {
|
|
843
|
+
type: Boolean,
|
|
844
|
+
required: !1,
|
|
845
|
+
default: !1
|
|
846
|
+
},
|
|
847
|
+
sampleApiList: {
|
|
848
|
+
type: Array,
|
|
849
|
+
required: !1,
|
|
850
|
+
default: () => []
|
|
760
851
|
}
|
|
761
852
|
},
|
|
762
|
-
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
763
|
-
setup(
|
|
764
|
-
var
|
|
765
|
-
const
|
|
853
|
+
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
854
|
+
setup(a, { expose: I, emit: p }) {
|
|
855
|
+
var J;
|
|
856
|
+
const n = p, r = a, V = $(!0), q = Ge(), { i18nT: K, i18n: { t: s } } = Ce.useI18n(), { getErrorFieldsFromError: A } = vt(), { axiosInstance: _ } = je((J = r.config) == null ? void 0 : J.axiosRequestConfig), G = gt(), oe = h(() => ce.form[r.config.app].edit), N = h(() => r.gatewayServiceId ? Ke.Edit : Ke.Create), Ve = $(!1), j = h(() => !!r.gatewayServiceId), b = $(j.value ? "protocol" : "url"), ie = Ce.usePortFromProtocol(), W = $(""), de = $(0), ue = h(() => !!W.value), t = qe({
|
|
766
857
|
fields: {
|
|
767
858
|
name: "",
|
|
768
859
|
protocol: "http",
|
|
@@ -781,8 +872,23 @@ const ye = {
|
|
|
781
872
|
tags: ""
|
|
782
873
|
},
|
|
783
874
|
isReadonly: !1,
|
|
784
|
-
|
|
785
|
-
|
|
875
|
+
errorMessages: [],
|
|
876
|
+
formFieldErrors: {
|
|
877
|
+
host: "",
|
|
878
|
+
port: "",
|
|
879
|
+
path: "",
|
|
880
|
+
url: "",
|
|
881
|
+
tags: "",
|
|
882
|
+
retries: "",
|
|
883
|
+
connect_timeout: "",
|
|
884
|
+
write_timeout: "",
|
|
885
|
+
read_timeout: "",
|
|
886
|
+
client_certificate: "",
|
|
887
|
+
ca_certificates: "",
|
|
888
|
+
tls_verify_enabled: "",
|
|
889
|
+
tls_verify_value: ""
|
|
890
|
+
}
|
|
891
|
+
}), k = qe({
|
|
786
892
|
name: "",
|
|
787
893
|
protocol: "http",
|
|
788
894
|
host: "",
|
|
@@ -798,564 +904,690 @@ const ye = {
|
|
|
798
904
|
tls_verify_enabled: !1,
|
|
799
905
|
tls_verify_value: !1,
|
|
800
906
|
tags: ""
|
|
801
|
-
}),
|
|
907
|
+
}), Se = r.config.app === "konnect" || yt({
|
|
802
908
|
gatewayInfo: r.config.gatewayInfo,
|
|
803
909
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
804
910
|
supportedRange: {
|
|
805
911
|
enterprise: ["3.0"]
|
|
806
912
|
}
|
|
807
|
-
}),
|
|
913
|
+
}), fe = [
|
|
808
914
|
{
|
|
809
|
-
label:
|
|
915
|
+
label: s("gateway_services.form.fields.protocol.options.http"),
|
|
810
916
|
value: "http",
|
|
811
917
|
group: "http"
|
|
812
918
|
},
|
|
813
919
|
{
|
|
814
|
-
label:
|
|
920
|
+
label: s("gateway_services.form.fields.protocol.options.https"),
|
|
815
921
|
value: "https",
|
|
816
922
|
group: "http"
|
|
817
923
|
},
|
|
818
924
|
{
|
|
819
|
-
label:
|
|
925
|
+
label: s("gateway_services.form.fields.protocol.options.tcp"),
|
|
820
926
|
value: "tcp",
|
|
821
927
|
group: "tcp"
|
|
822
928
|
},
|
|
823
929
|
{
|
|
824
|
-
label:
|
|
930
|
+
label: s("gateway_services.form.fields.protocol.options.tls"),
|
|
825
931
|
value: "tls",
|
|
826
932
|
group: "tcp"
|
|
827
933
|
},
|
|
828
934
|
{
|
|
829
|
-
label:
|
|
935
|
+
label: s("gateway_services.form.fields.protocol.options.tls_passthrough"),
|
|
830
936
|
value: "tls_passthrough",
|
|
831
937
|
group: "tcp"
|
|
832
938
|
},
|
|
833
939
|
{
|
|
834
|
-
label:
|
|
940
|
+
label: s("gateway_services.form.fields.protocol.options.grpc"),
|
|
835
941
|
value: "grpc",
|
|
836
942
|
group: "grpc"
|
|
837
943
|
},
|
|
838
944
|
{
|
|
839
|
-
label:
|
|
945
|
+
label: s("gateway_services.form.fields.protocol.options.grpcs"),
|
|
840
946
|
value: "grpcs",
|
|
841
947
|
group: "grpc"
|
|
842
948
|
},
|
|
843
|
-
...
|
|
949
|
+
...Se ? [
|
|
844
950
|
{
|
|
845
|
-
label:
|
|
951
|
+
label: s("gateway_services.form.fields.protocol.options.ws"),
|
|
846
952
|
value: "ws",
|
|
847
953
|
group: "websocket"
|
|
848
954
|
},
|
|
849
955
|
{
|
|
850
|
-
label:
|
|
956
|
+
label: s("gateway_services.form.fields.protocol.options.wss"),
|
|
851
957
|
value: "wss",
|
|
852
958
|
group: "websocket"
|
|
853
959
|
}
|
|
854
960
|
] : [],
|
|
855
961
|
{
|
|
856
|
-
label:
|
|
962
|
+
label: s("gateway_services.form.fields.protocol.options.udp"),
|
|
857
963
|
value: "udp",
|
|
858
964
|
group: "udp"
|
|
859
965
|
}
|
|
860
|
-
],
|
|
861
|
-
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
|
|
966
|
+
], z = { url: "url", protocol: "protocol" }, Ee = (e, o) => {
|
|
967
|
+
o.value;
|
|
968
|
+
}, O = (e) => e ? parseFloat(e) : 0, U = () => {
|
|
969
|
+
t.fields.host = k.host, t.fields.path = k.path, t.fields.port = k.port, t.fields.protocol = k.protocol, t.fields.url = k.url, t.fields.retries = k.retries, t.fields.connect_timeout = k.connect_timeout, t.fields.write_timeout = k.write_timeout, t.fields.read_timeout = k.read_timeout, t.fields.client_certificate = k.client_certificate, t.fields.ca_certificates = k.ca_certificates, t.fields.tls_verify_enabled = k.tls_verify_enabled, t.fields.tls_verify_value = k.tls_verify_value;
|
|
970
|
+
}, X = () => {
|
|
971
|
+
V.value = !0, x(), t.errorMessages = [], U();
|
|
972
|
+
}, Ie = () => {
|
|
973
|
+
de.value += 1;
|
|
974
|
+
const o = de.value % 2 === 0 ? { ...Lt } : { ...Kt };
|
|
975
|
+
switch (U(), t.fields.name = o.name, b.value) {
|
|
976
|
+
case "url":
|
|
977
|
+
t.fields.url = `${o.protocol}://${o.host}${o.path}`;
|
|
978
|
+
break;
|
|
979
|
+
case "protocol":
|
|
980
|
+
t.fields.host = o.host, t.fields.path = o.path, t.fields.protocol = o.protocol, t.fields.port = o.port;
|
|
981
|
+
break;
|
|
982
|
+
default:
|
|
983
|
+
console.warn("Invalid input group selected");
|
|
984
|
+
}
|
|
985
|
+
}, le = (e) => !e || e.trim() === "" ? "host cannot be empty" : /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$|^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(e) ? "" : "invalid host", Fe = (e) => !e || e.trim() === "" ? "protocol cannot be empty" : (e = e.slice(0, -1), fe.find((v) => {
|
|
986
|
+
if (v.value === e) return v;
|
|
987
|
+
}) === void 0 ? 'protocol - value must be one of "http", "https", "grpc", "grpcs", "tcp", "udp", "tls", "tls_passthrough", "ws", "wss"' : ""), pe = (e) => {
|
|
988
|
+
if (e == null || e === "")
|
|
989
|
+
return "";
|
|
990
|
+
const o = typeof e == "string" ? parseInt(e, 10) : e;
|
|
991
|
+
return isNaN(o) ? "Port must be a number" : o < 0 || o > 65535 ? "Port must be between 0 and 65535" : "";
|
|
992
|
+
}, me = (e) => !e || e === "" ? "" : e.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(e) ? "Path should not include characters outside of the reserved list of RFC 3986" : "" : "Path must begin with /", ve = Ue(() => {
|
|
993
|
+
if (x(), t.fields.url.length)
|
|
866
994
|
try {
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
995
|
+
const e = new URL(t.fields.url), o = Fe(e.protocol);
|
|
996
|
+
if (o) throw new Error(o);
|
|
997
|
+
t.fields.protocol = e.protocol.slice(0, -1);
|
|
998
|
+
const v = le(e.hostname);
|
|
999
|
+
if (v) throw new Error(v);
|
|
1000
|
+
t.fields.host = e.hostname;
|
|
1001
|
+
const T = me(e.pathname);
|
|
1002
|
+
if (T) throw new Error(T);
|
|
1003
|
+
t.fields.path = e.pathname;
|
|
1004
|
+
const y = pe(e.port);
|
|
1005
|
+
if (y) throw new Error(y);
|
|
1006
|
+
const w = Number(e.port);
|
|
1007
|
+
Ve.value = !!w, t.fields.port = w || ie.getPortFromProtocol(t.fields.protocol), n("url-valid:success");
|
|
1008
|
+
} catch (e) {
|
|
1009
|
+
n("url-valid:error", e.message || "URL validation failed"), t.formFieldErrors.url = e.message || "URL validation failed";
|
|
873
1010
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
},
|
|
877
|
-
|
|
1011
|
+
}, 300), ge = Ue((e) => {
|
|
1012
|
+
x(e ?? void 0);
|
|
1013
|
+
}, 300), ye = h(() => (e) => {
|
|
1014
|
+
const o = t.formFieldErrors;
|
|
1015
|
+
return e === "url" ? o.host.length ? o.host : o.path.length ? o.path : o.url : o[e] ? o[e] : "";
|
|
1016
|
+
}), Y = Ue((e) => {
|
|
1017
|
+
x(e ?? void 0);
|
|
1018
|
+
const o = le(t.fields.host);
|
|
1019
|
+
o && (t.formFieldErrors.host = o);
|
|
1020
|
+
const v = me(t.fields.path);
|
|
1021
|
+
v && (t.formFieldErrors.path = v);
|
|
1022
|
+
const T = pe(t.fields.port);
|
|
1023
|
+
T && (t.formFieldErrors.port = T), Z.value ? n("url-valid:success") : n("url-valid:error", t.errorMessages.join(",") || "URL validation failed");
|
|
1024
|
+
}, 300), x = (e) => {
|
|
1025
|
+
e ? t.formFieldErrors[e] = "" : t.formFieldErrors = {
|
|
1026
|
+
host: "",
|
|
1027
|
+
port: "",
|
|
1028
|
+
url: "",
|
|
1029
|
+
path: "",
|
|
1030
|
+
tags: "",
|
|
1031
|
+
retries: "",
|
|
1032
|
+
connect_timeout: "",
|
|
1033
|
+
write_timeout: "",
|
|
1034
|
+
read_timeout: "",
|
|
1035
|
+
client_certificate: "",
|
|
1036
|
+
ca_certificates: "",
|
|
1037
|
+
tls_verify_enabled: "",
|
|
1038
|
+
tls_verify_value: ""
|
|
1039
|
+
}, t.errorMessages = [];
|
|
1040
|
+
}, Z = h(() => Object.values(t.formFieldErrors).some((e) => e !== null && e !== "") && !ue.value), ee = () => {
|
|
1041
|
+
t.fields.url && b.value === "url" ? ve() : Y();
|
|
1042
|
+
}, re = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, _e = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(t.fields.protocol)), Te = h(() => {
|
|
1043
|
+
if (b.value === "url")
|
|
878
1044
|
return !0;
|
|
879
|
-
const
|
|
880
|
-
return
|
|
881
|
-
}),
|
|
882
|
-
if (
|
|
1045
|
+
const e = ["https", "wss", "tls"].includes(t.fields.protocol);
|
|
1046
|
+
return b.value === "protocol" && e;
|
|
1047
|
+
}), he = h(() => {
|
|
1048
|
+
if (b.value === "url")
|
|
883
1049
|
return !0;
|
|
884
|
-
const
|
|
885
|
-
return
|
|
886
|
-
}),
|
|
887
|
-
if (
|
|
1050
|
+
const e = ["https", "tls"].includes(t.fields.protocol);
|
|
1051
|
+
return b.value === "protocol" && e;
|
|
1052
|
+
}), Pe = h(() => {
|
|
1053
|
+
if (b.value === "url")
|
|
888
1054
|
return !0;
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
}),
|
|
892
|
-
|
|
893
|
-
},
|
|
894
|
-
var
|
|
895
|
-
|
|
896
|
-
},
|
|
897
|
-
|
|
898
|
-
},
|
|
899
|
-
var
|
|
900
|
-
let
|
|
901
|
-
return r.config.app ===
|
|
902
|
-
}),
|
|
903
|
-
var
|
|
904
|
-
let
|
|
905
|
-
return r.config.app ===
|
|
906
|
-
}),
|
|
907
|
-
let
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
var
|
|
911
|
-
const
|
|
912
|
-
name:
|
|
913
|
-
tags:
|
|
914
|
-
protocol:
|
|
915
|
-
path:
|
|
916
|
-
read_timeout:
|
|
917
|
-
retries:
|
|
918
|
-
host:
|
|
919
|
-
connect_timeout:
|
|
920
|
-
tls_verify_value:
|
|
921
|
-
tls_verify_enabled:
|
|
922
|
-
ca_certificates:
|
|
923
|
-
client_certificate:
|
|
924
|
-
write_timeout:
|
|
925
|
-
port:
|
|
926
|
-
url:
|
|
1055
|
+
const e = ["https", "wss", "tls"].includes(t.fields.protocol);
|
|
1056
|
+
return b.value === "protocol" && e;
|
|
1057
|
+
}), Ae = (e) => {
|
|
1058
|
+
W.value = G.utf8Name(e);
|
|
1059
|
+
}, H = h(() => j.value && JSON.stringify(t.fields) !== JSON.stringify(k) || b.value === "url" && !!t.fields.url && !Z.value || b.value === "protocol" && !!t.fields.host && !Z.value), se = (e) => {
|
|
1060
|
+
var o, v, T;
|
|
1061
|
+
t.fields.name = (e == null ? void 0 : e.name) || "", t.fields.tags = ((o = e == null ? void 0 : e.tags) == null ? void 0 : o.join(", ")) || "", t.fields.protocol = (e == null ? void 0 : e.protocol) || "http", t.fields.path = (e == null ? void 0 : e.path) || "", t.fields.read_timeout = e != null && e.read_timeout || (e == null ? void 0 : e.read_timeout) === 0 ? e == null ? void 0 : e.read_timeout : 6e4, t.fields.retries = e != null && e.retries || (e == null ? void 0 : e.retries) === 0 ? e == null ? void 0 : e.retries : 5, t.fields.host = (e == null ? void 0 : e.host) || "", t.fields.connect_timeout = e != null && e.connect_timeout || (e == null ? void 0 : e.connect_timeout) === 0 ? e == null ? void 0 : e.connect_timeout : 6e4, t.fields.tls_verify_enabled = (e == null ? void 0 : e.tls_verify) !== "" && (e == null ? void 0 : e.tls_verify) !== null && (e == null ? void 0 : e.tls_verify) !== void 0, t.fields.tls_verify_value = e != null && e.tls_verify ? e == null ? void 0 : e.tls_verify : !1, t.fields.ca_certificates = ((v = e == null ? void 0 : e.ca_certificates) == null ? void 0 : v.join(",")) || "", t.fields.client_certificate = ((T = e == null ? void 0 : e.client_certificate) == null ? void 0 : T.id) || "", t.fields.write_timeout = e != null && e.write_timeout || (e == null ? void 0 : e.write_timeout) === 0 ? e == null ? void 0 : e.write_timeout : 6e4, t.fields.port = e != null && e.port || (e == null ? void 0 : e.port) === 0 ? e == null ? void 0 : e.port : 80, Object.assign(k, t.fields);
|
|
1062
|
+
}, u = () => {
|
|
1063
|
+
q.push(r.config.cancelRoute);
|
|
1064
|
+
}, m = h(() => {
|
|
1065
|
+
var o, v;
|
|
1066
|
+
let e = `${r.config.apiBaseUrl}${ce.form[r.config.app].validate}`;
|
|
1067
|
+
return r.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((o = r.config) == null ? void 0 : o.controlPlaneId) || "") : r.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), e = e.replace(/{id}/gi, r.gatewayServiceId), e;
|
|
1068
|
+
}), g = h(() => {
|
|
1069
|
+
var o, v;
|
|
1070
|
+
let e = `${r.config.apiBaseUrl}${ce.form[r.config.app][N.value]}`;
|
|
1071
|
+
return r.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((o = r.config) == null ? void 0 : o.controlPlaneId) || "") : r.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), e = e.replace(/{id}/gi, r.gatewayServiceId), e;
|
|
1072
|
+
}), F = (e) => {
|
|
1073
|
+
let o = "";
|
|
1074
|
+
e.url && (o = new URL(e.url).protocol), (["https", "wss", "tls"].includes(e.protocol) || ["https", "wss", "tls"].includes(o)) && (e.tls_verify = e.tls_verify_enabled ? e.tls_verify_value : null), delete e.tls_verify_enabled, delete e.tls_verify_value;
|
|
1075
|
+
}, M = h(() => {
|
|
1076
|
+
var o, v, T, y;
|
|
1077
|
+
const e = {
|
|
1078
|
+
name: t.fields.name || null,
|
|
1079
|
+
tags: t.fields.tags ? (T = (v = (o = t.fields.tags) == null ? void 0 : o.split(",")) == null ? void 0 : v.map((w) => String(w || "").trim())) == null ? void 0 : T.filter((w) => w !== "") : null,
|
|
1080
|
+
protocol: t.fields.protocol,
|
|
1081
|
+
path: t.fields.path || null,
|
|
1082
|
+
read_timeout: t.fields.read_timeout,
|
|
1083
|
+
retries: t.fields.retries,
|
|
1084
|
+
host: t.fields.host,
|
|
1085
|
+
connect_timeout: t.fields.connect_timeout,
|
|
1086
|
+
tls_verify_value: t.fields.tls_verify_value,
|
|
1087
|
+
tls_verify_enabled: t.fields.tls_verify_enabled,
|
|
1088
|
+
ca_certificates: t.fields.ca_certificates ? (y = t.fields.ca_certificates) == null ? void 0 : y.split(",").filter((w) => w !== "") : null,
|
|
1089
|
+
client_certificate: t.fields.client_certificate ? { id: t.fields.client_certificate } : null,
|
|
1090
|
+
write_timeout: t.fields.write_timeout,
|
|
1091
|
+
port: t.fields.port,
|
|
1092
|
+
url: t.fields.url
|
|
927
1093
|
};
|
|
928
|
-
return
|
|
929
|
-
}),
|
|
930
|
-
var
|
|
1094
|
+
return t.fields.client_certificate && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.client_certificate = { id: t.fields.client_certificate }), t.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.tls_verify = t.fields.tls_verify_value), _e.value || (e.path = null), N.value === "create" ? b.value === "url" ? (delete e.protocol, delete e.host, delete e.path, r.config.app === "konnect" && delete e.port) : delete e.url : N.value === "edit" && delete e.url, e;
|
|
1095
|
+
}), R = async () => {
|
|
1096
|
+
var e, o, v, T;
|
|
931
1097
|
try {
|
|
932
|
-
|
|
933
|
-
const
|
|
934
|
-
|
|
1098
|
+
t.isReadonly = !0, ee();
|
|
1099
|
+
const y = M.value;
|
|
1100
|
+
F(y);
|
|
935
1101
|
let w;
|
|
936
|
-
if (await
|
|
937
|
-
const { data:
|
|
938
|
-
|
|
1102
|
+
if (await _.post(m.value, y), N.value === "create" ? w = await _.post(g.value, y) : N.value === "edit" && (w = ((e = r.config) == null ? void 0 : e.app) === "konnect" ? await _.put(g.value, y) : await _.patch(g.value, y)), w) {
|
|
1103
|
+
const { data: l } = w;
|
|
1104
|
+
t.fields.name = (l == null ? void 0 : l.name) || "", t.fields.port = l.port || ie.getPortFromProtocol(l.protocol), t.fields.protocol = (l == null ? void 0 : l.protocol) || "http", t.fields.host = (l == null ? void 0 : l.host) || "", t.fields.path = (l == null ? void 0 : l.path) || "", t.fields.url = (l == null ? void 0 : l.url) || "", t.fields.retries = l != null && l.retries || (l == null ? void 0 : l.retries) === 0 ? l == null ? void 0 : l.retries : 5, t.fields.connect_timeout = l != null && l.connect_timeout || (l == null ? void 0 : l.connect_timeout) === 0 ? l == null ? void 0 : l.connect_timeout : 6e4, t.fields.write_timeout = l != null && l.write_timeout || (l == null ? void 0 : l.write_timeout) === 0 ? l == null ? void 0 : l.write_timeout : 6e4, t.fields.read_timeout = l != null && l.read_timeout || (l == null ? void 0 : l.read_timeout) === 0 ? l == null ? void 0 : l.read_timeout : 6e4, t.fields.client_certificate = ((o = l == null ? void 0 : l.client_certificate) == null ? void 0 : o.id) || "", t.fields.ca_certificates = (v = l == null ? void 0 : l.ca_certificates) != null && v.length ? l == null ? void 0 : l.ca_certificates.join(",") : "", t.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, t.fields.tls_verify_value = t.fields.tls_verify_enabled && (l == null ? void 0 : l.tls_verify), t.fields.tags = (T = l == null ? void 0 : l.tags) != null && T.length ? l.tags.join(", ") : "", Object.assign(k, t.fields), n("update", w == null ? void 0 : w.data);
|
|
939
1105
|
}
|
|
940
1106
|
return w;
|
|
941
|
-
} catch (
|
|
942
|
-
|
|
1107
|
+
} catch (y) {
|
|
1108
|
+
const { fields: w, messages: l } = A(y);
|
|
1109
|
+
t.errorMessages = l, w.length && w.forEach((Q) => {
|
|
1110
|
+
const te = Q.field;
|
|
1111
|
+
te === "client_certificate.id" ? t.formFieldErrors.client_certificate = Q.message : te === "ca_certificates[0]" ? t.formFieldErrors.ca_certificates = Q.message : Object.keys(t.formFieldErrors).includes(te) && (t.formFieldErrors = {
|
|
1112
|
+
...t.formFieldErrors,
|
|
1113
|
+
[te]: Q.message
|
|
1114
|
+
});
|
|
1115
|
+
}), n("error", y);
|
|
943
1116
|
} finally {
|
|
944
|
-
|
|
1117
|
+
t.isReadonly = !1;
|
|
945
1118
|
}
|
|
946
1119
|
};
|
|
947
|
-
return
|
|
948
|
-
Object.assign(
|
|
949
|
-
}),
|
|
950
|
-
|
|
951
|
-
}),
|
|
952
|
-
|
|
953
|
-
}),
|
|
954
|
-
validateUrl:
|
|
955
|
-
getPayload:
|
|
956
|
-
saveFormData:
|
|
957
|
-
canSubmit:
|
|
958
|
-
initForm:
|
|
959
|
-
}), (
|
|
960
|
-
const v =
|
|
961
|
-
return
|
|
962
|
-
|
|
963
|
-
"can-submit":
|
|
964
|
-
config:
|
|
965
|
-
"edit-id":
|
|
966
|
-
"entity-type":
|
|
967
|
-
"
|
|
968
|
-
"
|
|
969
|
-
"
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
"onFetch:
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
onSubmit: H
|
|
1120
|
+
return xe(() => r.gatewayServiceId, () => {
|
|
1121
|
+
Object.assign(t.fields, k);
|
|
1122
|
+
}), xe(t.fields, (e) => {
|
|
1123
|
+
t.fields.port = ie.getPortFromProtocol(e.protocol, String(e.port)), n("model-updated", M.value);
|
|
1124
|
+
}), Je(() => {
|
|
1125
|
+
n("model-updated", M.value), j.value || (t.fields.name = re());
|
|
1126
|
+
}), I({
|
|
1127
|
+
validateUrl: ee,
|
|
1128
|
+
getPayload: M,
|
|
1129
|
+
saveFormData: R,
|
|
1130
|
+
canSubmit: H,
|
|
1131
|
+
initForm: se
|
|
1132
|
+
}), (e, o) => {
|
|
1133
|
+
const v = D("KRadio"), T = D("KButton"), y = D("KInput"), w = D("KSelect"), l = D("KCheckbox"), Q = D("KCollapse"), te = D("KAlert");
|
|
1134
|
+
return C(), P("div", Wt, [
|
|
1135
|
+
c(i(_t), {
|
|
1136
|
+
"can-submit": H.value,
|
|
1137
|
+
config: a.config,
|
|
1138
|
+
"edit-id": a.gatewayServiceId,
|
|
1139
|
+
"entity-type": i(ze).GatewayService,
|
|
1140
|
+
"fetch-url": oe.value,
|
|
1141
|
+
"form-fields": M.value,
|
|
1142
|
+
"is-readonly": t.isReadonly,
|
|
1143
|
+
onCancel: u,
|
|
1144
|
+
"onFetch:error": o[30] || (o[30] = (f) => e.$emit("error", f)),
|
|
1145
|
+
"onFetch:success": se,
|
|
1146
|
+
onLoading: o[31] || (o[31] = (f) => e.$emit("loading", f)),
|
|
1147
|
+
onSubmit: R
|
|
976
1148
|
}, {
|
|
977
|
-
"form-actions":
|
|
978
|
-
|
|
979
|
-
canSubmit:
|
|
980
|
-
cancel:
|
|
981
|
-
submit:
|
|
1149
|
+
"form-actions": d(() => [
|
|
1150
|
+
Qe(e.$slots, "form-actions", {
|
|
1151
|
+
canSubmit: H.value,
|
|
1152
|
+
cancel: u,
|
|
1153
|
+
submit: R
|
|
982
1154
|
}, void 0, !0)
|
|
983
1155
|
]),
|
|
984
|
-
default:
|
|
985
|
-
|
|
986
|
-
description:
|
|
987
|
-
"hide-info-header":
|
|
988
|
-
title:
|
|
1156
|
+
default: d(() => [
|
|
1157
|
+
c(i(We), {
|
|
1158
|
+
description: i(s)("gateway_services.form.sections.keys.description"),
|
|
1159
|
+
"hide-info-header": a.hideSectionsInfo,
|
|
1160
|
+
title: i(s)("gateway_services.form.sections.keys.title")
|
|
989
1161
|
}, {
|
|
990
|
-
default:
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
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")
|
|
1034
|
-
}, {
|
|
1035
|
-
default: f(() => [
|
|
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
|
-
]),
|
|
1045
|
-
C("div", Pt, [
|
|
1046
|
-
d(S, {
|
|
1047
|
-
modelValue: _.value,
|
|
1048
|
-
"onUpdate:modelValue": i[2] || (i[2] = (s) => _.value = s),
|
|
1162
|
+
default: d(() => [
|
|
1163
|
+
j.value ? B("", !0) : (C(), P("div", Ot, [
|
|
1164
|
+
S("div", Nt, [
|
|
1165
|
+
c(v, {
|
|
1166
|
+
modelValue: b.value,
|
|
1167
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => b.value = f),
|
|
1168
|
+
card: "",
|
|
1169
|
+
"card-orientation": "horizontal",
|
|
1049
1170
|
"data-testid": "gateway-service-url-radio",
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1171
|
+
description: i(s)("gateway_services.form.sections.keys.url.description"),
|
|
1172
|
+
label: i(s)("gateway_services.form.sections.keys.url.label"),
|
|
1173
|
+
"selected-value": z.url,
|
|
1174
|
+
onChange: X
|
|
1175
|
+
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1176
|
+
c(v, {
|
|
1177
|
+
modelValue: b.value,
|
|
1178
|
+
"onUpdate:modelValue": o[1] || (o[1] = (f) => b.value = f),
|
|
1179
|
+
card: "",
|
|
1180
|
+
"card-orientation": "horizontal",
|
|
1181
|
+
"checked-group": "protocol",
|
|
1182
|
+
"data-testid": "gateway-service-protocol-radio",
|
|
1183
|
+
description: i(s)("gateway_services.form.sections.keys.protocol.description"),
|
|
1184
|
+
label: i(s)("gateway_services.form.sections.keys.protocol.label"),
|
|
1185
|
+
"selected-value": z.protocol,
|
|
1186
|
+
onChange: X
|
|
1187
|
+
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1058
1188
|
]),
|
|
1059
|
-
|
|
1060
|
-
d(
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
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
|
-
}, {
|
|
1084
|
-
default: f(() => [
|
|
1085
|
-
M(h(l(a)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1086
|
-
]),
|
|
1087
|
-
_: 1
|
|
1088
|
-
}, 8, ["modelValue", "selected-value"])
|
|
1089
|
-
])),
|
|
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
|
-
}, {
|
|
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"),
|
|
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"),
|
|
1189
|
+
c($e, { name: "slide-fade" }, {
|
|
1190
|
+
default: d(() => [
|
|
1191
|
+
b.value === "url" ? (C(), P("div", Gt, [
|
|
1192
|
+
c(y, {
|
|
1193
|
+
modelValue: t.fields.url,
|
|
1194
|
+
"onUpdate:modelValue": o[2] || (o[2] = (f) => t.fields.url = f),
|
|
1195
|
+
modelModifiers: { trim: !0 },
|
|
1196
|
+
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1197
|
+
"data-testid": "gateway-service-url-input",
|
|
1198
|
+
error: ye.value("url").length > 0,
|
|
1199
|
+
"error-message": t.errorMessages.length == 0 ? ye.value("url") : void 0,
|
|
1200
|
+
label: i(s)("gateway_services.form.fields.upstream_url.label"),
|
|
1240
1201
|
"label-attributes": {
|
|
1241
|
-
info:
|
|
1202
|
+
info: a.config.app === "konnect" ? i(s)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : i(s)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1242
1203
|
tooltipAttributes: { maxWidth: "400" }
|
|
1243
1204
|
},
|
|
1244
|
-
name: "
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1205
|
+
name: "url",
|
|
1206
|
+
placeholder: i(s)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1207
|
+
required: "",
|
|
1208
|
+
onInput: i(ve)
|
|
1209
|
+
}, Ne({ _: 2 }, [
|
|
1210
|
+
a.hideTrySampleApiButton ? void 0 : {
|
|
1211
|
+
name: "after",
|
|
1212
|
+
fn: d(() => [
|
|
1213
|
+
c(T, {
|
|
1214
|
+
appearance: "tertiary",
|
|
1215
|
+
size: "small",
|
|
1216
|
+
onClick: Ie
|
|
1217
|
+
}, {
|
|
1218
|
+
default: d(() => o[32] || (o[32] = [
|
|
1219
|
+
L(" Try Sample API ")
|
|
1220
|
+
])),
|
|
1221
|
+
_: 1
|
|
1222
|
+
})
|
|
1223
|
+
]),
|
|
1224
|
+
key: "0"
|
|
1225
|
+
}
|
|
1226
|
+
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "onInput"])
|
|
1227
|
+
])) : B("", !0)
|
|
1228
|
+
]),
|
|
1229
|
+
_: 1
|
|
1230
|
+
})
|
|
1231
|
+
])),
|
|
1232
|
+
c($e, { name: "slide-fade" }, {
|
|
1233
|
+
default: d(() => [
|
|
1234
|
+
b.value === "protocol" || j.value ? (C(), P("div", jt, [
|
|
1235
|
+
c(w, {
|
|
1236
|
+
modelValue: t.fields.protocol,
|
|
1237
|
+
"onUpdate:modelValue": o[3] || (o[3] = (f) => t.fields.protocol = f),
|
|
1238
|
+
"data-testid": "gateway-service-protocol-select",
|
|
1239
|
+
items: fe,
|
|
1240
|
+
label: i(s)("gateway_services.form.fields.protocol.label"),
|
|
1241
|
+
"label-attributes": {
|
|
1242
|
+
info: i(s)("gateway_services.form.fields.protocol.tooltip"),
|
|
1243
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1244
|
+
},
|
|
1245
|
+
readonly: t.isReadonly,
|
|
1246
|
+
required: "",
|
|
1247
|
+
width: "100%",
|
|
1248
|
+
onSelected: o[4] || (o[4] = (f) => Ee(t.fields.protocol, f))
|
|
1249
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1250
|
+
c(y, {
|
|
1251
|
+
modelValue: t.fields.host,
|
|
1252
|
+
"onUpdate:modelValue": o[5] || (o[5] = (f) => t.fields.host = f),
|
|
1253
|
+
modelModifiers: { trim: !0 },
|
|
1254
|
+
class: "gateway-service-form-margin-top",
|
|
1255
|
+
"data-testid": "gateway-service-host-input",
|
|
1256
|
+
error: t.formFieldErrors.host.length > 0,
|
|
1257
|
+
"error-message": t.formFieldErrors.host,
|
|
1258
|
+
label: i(s)("gateway_services.form.fields.host.label"),
|
|
1259
|
+
"label-attributes": {
|
|
1260
|
+
info: i(s)("gateway_services.form.fields.host.tooltip"),
|
|
1261
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1262
|
+
},
|
|
1263
|
+
name: "host",
|
|
1264
|
+
placeholder: i(s)("gateway_services.form.fields.host.placeholder"),
|
|
1265
|
+
required: "",
|
|
1266
|
+
onInput: o[6] || (o[6] = (f) => i(Y)("host"))
|
|
1267
|
+
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
1268
|
+
_e.value ? (C(), P("div", zt, [
|
|
1269
|
+
c(y, {
|
|
1270
|
+
modelValue: t.fields.path,
|
|
1271
|
+
"onUpdate:modelValue": o[7] || (o[7] = (f) => t.fields.path = f),
|
|
1253
1272
|
modelModifiers: { trim: !0 },
|
|
1254
|
-
|
|
1255
|
-
"data-testid": "gateway-service-
|
|
1256
|
-
|
|
1273
|
+
class: "gateway-service-form-margin-top",
|
|
1274
|
+
"data-testid": "gateway-service-path-input",
|
|
1275
|
+
error: t.formFieldErrors.path.length > 0,
|
|
1276
|
+
"error-message": t.formFieldErrors.path,
|
|
1277
|
+
label: i(s)("gateway_services.form.fields.path.label"),
|
|
1257
1278
|
"label-attributes": {
|
|
1258
|
-
info:
|
|
1279
|
+
info: i(s)("gateway_services.form.fields.path.tooltip"),
|
|
1259
1280
|
tooltipAttributes: { maxWidth: "400" }
|
|
1260
1281
|
},
|
|
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
|
-
|
|
1282
|
+
name: "path",
|
|
1283
|
+
placeholder: i(s)("gateway_services.form.fields.path.placeholder"),
|
|
1284
|
+
onInput: o[8] || (o[8] = (f) => i(Y)("path"))
|
|
1285
|
+
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
1286
|
+
])) : B("", !0),
|
|
1287
|
+
c(y, {
|
|
1288
|
+
modelValue: t.fields.port,
|
|
1289
|
+
"onUpdate:modelValue": [
|
|
1290
|
+
o[9] || (o[9] = (f) => t.fields.port = f),
|
|
1291
|
+
o[11] || (o[11] = () => {
|
|
1292
|
+
t.fields.port = O(t.fields.port + "");
|
|
1293
|
+
})
|
|
1294
|
+
],
|
|
1295
|
+
class: "gateway-service-form-margin-top",
|
|
1296
|
+
"data-testid": "gateway-service-port-input",
|
|
1297
|
+
error: t.formFieldErrors.port.length > 0,
|
|
1298
|
+
"error-message": t.formFieldErrors.port,
|
|
1299
|
+
label: i(s)("gateway_services.form.fields.port.label"),
|
|
1300
|
+
"label-attributes": {
|
|
1301
|
+
info: i(s)("gateway_services.form.fields.port.tooltip"),
|
|
1302
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1303
|
+
},
|
|
1304
|
+
name: "port",
|
|
1305
|
+
type: "number",
|
|
1306
|
+
onInput: o[10] || (o[10] = (f) => i(Y)("port"))
|
|
1307
|
+
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
1308
|
+
])) : B("", !0)
|
|
1309
|
+
]),
|
|
1310
|
+
_: 1
|
|
1311
|
+
}),
|
|
1312
|
+
c(Q, {
|
|
1313
|
+
modelValue: V.value,
|
|
1314
|
+
"onUpdate:modelValue": o[27] || (o[27] = (f) => V.value = f),
|
|
1315
|
+
"data-testid": "advanced-fields-collapse",
|
|
1316
|
+
"trigger-alignment": "leading",
|
|
1317
|
+
"trigger-label": i(s)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1318
|
+
}, {
|
|
1319
|
+
default: d(() => [
|
|
1320
|
+
c($e, { name: "slide-fade" }, {
|
|
1321
|
+
default: d(() => [
|
|
1322
|
+
V.value ? B("", !0) : (C(), P("div", Zt, [
|
|
1323
|
+
S("div", Ht, [
|
|
1324
|
+
c(y, {
|
|
1325
|
+
modelValue: t.fields.retries,
|
|
1326
|
+
"onUpdate:modelValue": [
|
|
1327
|
+
o[12] || (o[12] = (f) => t.fields.retries = f),
|
|
1328
|
+
o[13] || (o[13] = () => {
|
|
1329
|
+
t.fields.retries = O(t.fields.retries + "");
|
|
1330
|
+
})
|
|
1331
|
+
],
|
|
1332
|
+
autocomplete: "off",
|
|
1333
|
+
"data-testid": "gateway-service-retries-input",
|
|
1334
|
+
label: i(s)("gateway_services.form.fields.retries.label"),
|
|
1335
|
+
"label-attributes": {
|
|
1336
|
+
info: i(s)("gateway_services.form.fields.retries.tooltip"),
|
|
1337
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1338
|
+
},
|
|
1339
|
+
name: "retries",
|
|
1340
|
+
readonly: t.isReadonly,
|
|
1341
|
+
type: "number"
|
|
1342
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1343
|
+
]),
|
|
1344
|
+
S("div", Jt, [
|
|
1345
|
+
c(y, {
|
|
1346
|
+
modelValue: t.fields.connect_timeout,
|
|
1347
|
+
"onUpdate:modelValue": [
|
|
1348
|
+
o[14] || (o[14] = (f) => t.fields.connect_timeout = f),
|
|
1349
|
+
o[15] || (o[15] = () => {
|
|
1350
|
+
t.fields.connect_timeout = O(t.fields.connect_timeout + "");
|
|
1351
|
+
})
|
|
1352
|
+
],
|
|
1353
|
+
autocomplete: "off",
|
|
1354
|
+
"data-testid": "gateway-service-connTimeout-input",
|
|
1355
|
+
label: i(s)("gateway_services.form.fields.connect_timeout.label"),
|
|
1356
|
+
"label-attributes": {
|
|
1357
|
+
info: i(s)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
1358
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1359
|
+
},
|
|
1360
|
+
name: "connTimeout",
|
|
1361
|
+
readonly: t.isReadonly,
|
|
1362
|
+
type: "number"
|
|
1363
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1364
|
+
]),
|
|
1365
|
+
S("div", Qt, [
|
|
1366
|
+
c(y, {
|
|
1367
|
+
modelValue: t.fields.write_timeout,
|
|
1368
|
+
"onUpdate:modelValue": [
|
|
1369
|
+
o[16] || (o[16] = (f) => t.fields.write_timeout = f),
|
|
1370
|
+
o[17] || (o[17] = () => {
|
|
1371
|
+
t.fields.write_timeout = O(t.fields.write_timeout + "");
|
|
1372
|
+
})
|
|
1373
|
+
],
|
|
1374
|
+
autocomplete: "off",
|
|
1375
|
+
"data-testid": "gateway-service-writeTimeout-input",
|
|
1376
|
+
label: i(s)("gateway_services.form.fields.write_timeout.label"),
|
|
1377
|
+
"label-attributes": {
|
|
1378
|
+
info: i(s)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
1379
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1380
|
+
},
|
|
1381
|
+
name: "writeTimeout",
|
|
1382
|
+
readonly: t.isReadonly,
|
|
1383
|
+
type: "number"
|
|
1384
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1385
|
+
]),
|
|
1386
|
+
S("div", Xt, [
|
|
1387
|
+
c(y, {
|
|
1388
|
+
modelValue: t.fields.read_timeout,
|
|
1389
|
+
"onUpdate:modelValue": [
|
|
1390
|
+
o[18] || (o[18] = (f) => t.fields.read_timeout = f),
|
|
1391
|
+
o[19] || (o[19] = () => {
|
|
1392
|
+
t.fields.read_timeout = O(t.fields.read_timeout + "");
|
|
1393
|
+
})
|
|
1394
|
+
],
|
|
1395
|
+
autocomplete: "off",
|
|
1396
|
+
"data-testid": "gateway-service-readTimeout-input",
|
|
1397
|
+
label: i(s)("gateway_services.form.fields.read_timeout.label"),
|
|
1398
|
+
"label-attributes": {
|
|
1399
|
+
info: i(s)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
1400
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1401
|
+
},
|
|
1402
|
+
name: "readTimeout",
|
|
1403
|
+
readonly: t.isReadonly,
|
|
1404
|
+
type: "number"
|
|
1405
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1406
|
+
]),
|
|
1407
|
+
Te.value ? (C(), P("div", Yt, [
|
|
1408
|
+
c(y, {
|
|
1409
|
+
modelValue: t.fields.client_certificate,
|
|
1410
|
+
"onUpdate:modelValue": o[20] || (o[20] = (f) => t.fields.client_certificate = f),
|
|
1411
|
+
modelModifiers: { trim: !0 },
|
|
1412
|
+
autocomplete: "off",
|
|
1413
|
+
"data-testid": "gateway-service-clientCert-input",
|
|
1414
|
+
error: t.formFieldErrors.client_certificate.length > 0,
|
|
1415
|
+
label: i(s)("gateway_services.form.fields.client_certificate.label"),
|
|
1416
|
+
"label-attributes": {
|
|
1417
|
+
info: i(s)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1418
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1419
|
+
},
|
|
1420
|
+
name: "clientCert",
|
|
1421
|
+
placeholder: i(s)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
1422
|
+
readonly: t.isReadonly,
|
|
1423
|
+
type: "text",
|
|
1424
|
+
onInput: o[21] || (o[21] = (f) => i(ge)("client_certificate"))
|
|
1425
|
+
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
1426
|
+
])) : B("", !0),
|
|
1427
|
+
he.value ? (C(), P("div", eo, [
|
|
1428
|
+
c(y, {
|
|
1429
|
+
modelValue: t.fields.ca_certificates,
|
|
1430
|
+
"onUpdate:modelValue": o[22] || (o[22] = (f) => t.fields.ca_certificates = f),
|
|
1431
|
+
modelModifiers: { trim: !0 },
|
|
1432
|
+
autocomplete: "off",
|
|
1433
|
+
"data-testid": "gateway-service-ca-certs-input",
|
|
1434
|
+
error: t.formFieldErrors.ca_certificates.length > 0,
|
|
1435
|
+
label: i(s)("gateway_services.form.fields.ca_certificates.label"),
|
|
1436
|
+
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1437
|
+
placeholder: i(s)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
1438
|
+
readonly: t.isReadonly,
|
|
1439
|
+
type: "text",
|
|
1440
|
+
onInput: o[23] || (o[23] = (f) => i(ge)("ca_certificates"))
|
|
1284
1441
|
}, {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1442
|
+
"label-tooltip": d(() => [
|
|
1443
|
+
c(i(K), {
|
|
1444
|
+
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1445
|
+
scope: "global"
|
|
1446
|
+
}, {
|
|
1447
|
+
code1: d(() => [
|
|
1448
|
+
S("code", null, E(i(s)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1449
|
+
]),
|
|
1450
|
+
code2: d(() => [
|
|
1451
|
+
S("code", null, E(i(s)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1452
|
+
]),
|
|
1453
|
+
_: 1
|
|
1454
|
+
})
|
|
1290
1455
|
]),
|
|
1291
1456
|
_: 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"
|
|
1457
|
+
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
1458
|
+
])) : B("", !0),
|
|
1459
|
+
Pe.value ? (C(), P("div", to, [
|
|
1460
|
+
c(l, {
|
|
1461
|
+
modelValue: t.fields.tls_verify_enabled,
|
|
1462
|
+
"onUpdate:modelValue": o[24] || (o[24] = (f) => t.fields.tls_verify_enabled = f),
|
|
1463
|
+
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1464
|
+
description: i(s)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1465
|
+
label: i(s)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1466
|
+
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1310
1467
|
}, {
|
|
1311
|
-
|
|
1312
|
-
|
|
1468
|
+
tooltip: d(() => [
|
|
1469
|
+
c(i(K), {
|
|
1470
|
+
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1471
|
+
scope: "global"
|
|
1472
|
+
}, {
|
|
1473
|
+
code1: d(() => [
|
|
1474
|
+
S("code", null, E(i(s)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1475
|
+
]),
|
|
1476
|
+
_: 1
|
|
1477
|
+
})
|
|
1313
1478
|
]),
|
|
1314
1479
|
_: 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
|
-
|
|
1480
|
+
}, 8, ["modelValue", "description", "label"]),
|
|
1481
|
+
t.fields.tls_verify_enabled ? (C(), P("div", oo, [
|
|
1482
|
+
c(v, {
|
|
1483
|
+
modelValue: t.fields.tls_verify_value,
|
|
1484
|
+
"onUpdate:modelValue": o[25] || (o[25] = (f) => t.fields.tls_verify_value = f),
|
|
1485
|
+
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1486
|
+
label: i(s)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1487
|
+
"selected-value": !0
|
|
1488
|
+
}, null, 8, ["modelValue", "label"])
|
|
1489
|
+
])) : B("", !0),
|
|
1490
|
+
t.fields.tls_verify_enabled ? (C(), P("div", io, [
|
|
1491
|
+
c(v, {
|
|
1492
|
+
modelValue: t.fields.tls_verify_value,
|
|
1493
|
+
"onUpdate:modelValue": o[26] || (o[26] = (f) => t.fields.tls_verify_value = f),
|
|
1494
|
+
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1495
|
+
label: i(s)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1496
|
+
"selected-value": !1
|
|
1497
|
+
}, null, 8, ["modelValue", "label"])
|
|
1498
|
+
])) : B("", !0)
|
|
1499
|
+
])) : B("", !0)
|
|
1500
|
+
]))
|
|
1501
|
+
]),
|
|
1502
|
+
_: 1
|
|
1503
|
+
})
|
|
1339
1504
|
]),
|
|
1340
1505
|
_: 1
|
|
1341
1506
|
}, 8, ["modelValue", "trigger-label"])
|
|
1342
1507
|
]),
|
|
1343
1508
|
_: 1
|
|
1344
|
-
}, 8, ["description", "hide-info-header", "title"])
|
|
1509
|
+
}, 8, ["description", "hide-info-header", "title"]),
|
|
1510
|
+
c(i(We), {
|
|
1511
|
+
description: i(s)("gateway_services.form.sections.general.description"),
|
|
1512
|
+
"hide-info-header": a.hideSectionsInfo,
|
|
1513
|
+
title: i(s)("gateway_services.form.sections.general.title")
|
|
1514
|
+
}, {
|
|
1515
|
+
default: d(() => [
|
|
1516
|
+
c(y, {
|
|
1517
|
+
modelValue: t.fields.name,
|
|
1518
|
+
"onUpdate:modelValue": o[28] || (o[28] = (f) => t.fields.name = f),
|
|
1519
|
+
modelModifiers: { trim: !0 },
|
|
1520
|
+
autocomplete: "off",
|
|
1521
|
+
"data-testid": "gateway-service-name-input",
|
|
1522
|
+
error: ue.value,
|
|
1523
|
+
"error-message": W.value,
|
|
1524
|
+
label: i(s)("gateway_services.form.fields.name.label"),
|
|
1525
|
+
"label-attributes": {
|
|
1526
|
+
info: i(s)("gateway_services.form.fields.name.tooltip"),
|
|
1527
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1528
|
+
},
|
|
1529
|
+
name: "name",
|
|
1530
|
+
placeholder: i(s)("gateway_services.form.fields.name.placeholder"),
|
|
1531
|
+
readonly: t.isReadonly,
|
|
1532
|
+
type: "text",
|
|
1533
|
+
onInput: Ae
|
|
1534
|
+
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1535
|
+
c(Q, {
|
|
1536
|
+
"data-testid": "tags-collapse",
|
|
1537
|
+
"trigger-alignment": "leading",
|
|
1538
|
+
"trigger-label": i(s)("gateway_services.form.fields.tags.collapse")
|
|
1539
|
+
}, {
|
|
1540
|
+
default: d(() => [
|
|
1541
|
+
S("div", lo, [
|
|
1542
|
+
c(y, {
|
|
1543
|
+
modelValue: t.fields.tags,
|
|
1544
|
+
"onUpdate:modelValue": o[29] || (o[29] = (f) => t.fields.tags = f),
|
|
1545
|
+
modelModifiers: { trim: !0 },
|
|
1546
|
+
autocomplete: "off",
|
|
1547
|
+
"data-testid": "gateway-service-tags-input",
|
|
1548
|
+
help: i(s)("gateway_services.form.fields.tags.help"),
|
|
1549
|
+
label: i(s)("gateway_services.form.fields.tags.label"),
|
|
1550
|
+
"label-attributes": {
|
|
1551
|
+
info: i(s)("gateway_services.form.fields.tags.tooltip"),
|
|
1552
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1553
|
+
},
|
|
1554
|
+
name: "tags",
|
|
1555
|
+
placeholder: i(s)("gateway_services.form.fields.tags.placeholder"),
|
|
1556
|
+
readonly: t.isReadonly,
|
|
1557
|
+
type: "text"
|
|
1558
|
+
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
1559
|
+
])
|
|
1560
|
+
]),
|
|
1561
|
+
_: 1
|
|
1562
|
+
}, 8, ["trigger-label"])
|
|
1563
|
+
]),
|
|
1564
|
+
_: 1
|
|
1565
|
+
}, 8, ["description", "hide-info-header", "title"]),
|
|
1566
|
+
t.errorMessages.length ? (C(), ne(te, {
|
|
1567
|
+
key: 0,
|
|
1568
|
+
appearance: "danger"
|
|
1569
|
+
}, {
|
|
1570
|
+
default: d(() => [
|
|
1571
|
+
S("ul", ro, [
|
|
1572
|
+
(C(!0), P(Xe, null, Ye(t.errorMessages, (f) => (C(), P("li", { key: f }, E(f), 1))), 128))
|
|
1573
|
+
])
|
|
1574
|
+
]),
|
|
1575
|
+
_: 1
|
|
1576
|
+
})) : B("", !0)
|
|
1345
1577
|
]),
|
|
1346
1578
|
_: 3
|
|
1347
|
-
}, 8, ["can-submit", "config", "edit-id", "entity-type", "
|
|
1579
|
+
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
1348
1580
|
]);
|
|
1349
1581
|
};
|
|
1350
1582
|
}
|
|
1351
|
-
}),
|
|
1583
|
+
}), vo = /* @__PURE__ */ Ze(so, [["__scopeId", "data-v-06fb1f63"]]), ao = { class: "kong-ui-gateway-service-entity-config-card" }, go = /* @__PURE__ */ Me({
|
|
1352
1584
|
__name: "GatewayServiceConfigCard",
|
|
1353
1585
|
props: {
|
|
1354
1586
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1355
1587
|
config: {
|
|
1356
1588
|
type: Object,
|
|
1357
1589
|
required: !0,
|
|
1358
|
-
validator: (
|
|
1590
|
+
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
1591
|
},
|
|
1360
1592
|
/**
|
|
1361
1593
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -1374,8 +1606,8 @@ const ye = {
|
|
|
1374
1606
|
}
|
|
1375
1607
|
},
|
|
1376
1608
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1377
|
-
setup(
|
|
1378
|
-
const
|
|
1609
|
+
setup(a) {
|
|
1610
|
+
const I = a, { i18n: { t: p }, i18nT: n } = Ce.useI18n(), r = h(() => ce.form[I.config.app].edit), { getPropValue: V } = ht(), q = (s, A) => V(s, A) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), K = $({
|
|
1379
1611
|
id: {},
|
|
1380
1612
|
name: {
|
|
1381
1613
|
tooltip: p("gateway_services.form.fields.name.tooltip")
|
|
@@ -1384,19 +1616,19 @@ const ye = {
|
|
|
1384
1616
|
updated_at: {},
|
|
1385
1617
|
created_at: {},
|
|
1386
1618
|
protocol: {
|
|
1387
|
-
section:
|
|
1619
|
+
section: be.Basic,
|
|
1388
1620
|
tooltip: p("gateway_services.form.fields.protocol.tooltip")
|
|
1389
1621
|
},
|
|
1390
1622
|
host: {
|
|
1391
|
-
section:
|
|
1623
|
+
section: be.Basic,
|
|
1392
1624
|
tooltip: p("gateway_services.form.fields.host.tooltip")
|
|
1393
1625
|
},
|
|
1394
1626
|
path: {
|
|
1395
|
-
section:
|
|
1627
|
+
section: be.Basic,
|
|
1396
1628
|
tooltip: p("gateway_services.form.fields.path.tooltip")
|
|
1397
1629
|
},
|
|
1398
1630
|
port: {
|
|
1399
|
-
section:
|
|
1631
|
+
section: be.Basic,
|
|
1400
1632
|
tooltip: p("gateway_services.form.fields.port.tooltip")
|
|
1401
1633
|
},
|
|
1402
1634
|
tags: {
|
|
@@ -1424,7 +1656,7 @@ const ye = {
|
|
|
1424
1656
|
tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
|
|
1425
1657
|
},
|
|
1426
1658
|
ca_certificates: {
|
|
1427
|
-
type:
|
|
1659
|
+
type: bt.BadgeTag,
|
|
1428
1660
|
label: p("gateway_services.form.fields.ca_certificates.label"),
|
|
1429
1661
|
order: 6
|
|
1430
1662
|
},
|
|
@@ -1435,62 +1667,62 @@ const ye = {
|
|
|
1435
1667
|
hidden: !0
|
|
1436
1668
|
}
|
|
1437
1669
|
});
|
|
1438
|
-
return (
|
|
1439
|
-
|
|
1440
|
-
config:
|
|
1441
|
-
"config-card-doc":
|
|
1442
|
-
"config-schema":
|
|
1443
|
-
"entity-type":
|
|
1670
|
+
return (s, A) => (C(), P("div", ao, [
|
|
1671
|
+
c(i(wt), {
|
|
1672
|
+
config: a.config,
|
|
1673
|
+
"config-card-doc": a.configCardDoc,
|
|
1674
|
+
"config-schema": K.value,
|
|
1675
|
+
"entity-type": i(ze).GatewayService,
|
|
1444
1676
|
"fetch-url": r.value,
|
|
1445
|
-
"hide-title":
|
|
1446
|
-
"onFetch:error":
|
|
1447
|
-
"onFetch:success":
|
|
1448
|
-
onLoading:
|
|
1677
|
+
"hide-title": a.hideTitle,
|
|
1678
|
+
"onFetch:error": A[0] || (A[0] = (_) => s.$emit("fetch:error", _)),
|
|
1679
|
+
"onFetch:success": A[1] || (A[1] = (_) => s.$emit("fetch:success", _)),
|
|
1680
|
+
onLoading: A[2] || (A[2] = (_) => s.$emit("loading", _))
|
|
1449
1681
|
}, {
|
|
1450
|
-
"enabled-label-tooltip":
|
|
1451
|
-
|
|
1682
|
+
"enabled-label-tooltip": d(() => [
|
|
1683
|
+
c(i(n), {
|
|
1452
1684
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1453
1685
|
scope: "global"
|
|
1454
1686
|
}, {
|
|
1455
|
-
false:
|
|
1456
|
-
|
|
1687
|
+
false: d(() => [
|
|
1688
|
+
S("code", null, E(i(p)("gateway_services.form.fields.enabled.false")), 1)
|
|
1457
1689
|
]),
|
|
1458
|
-
true:
|
|
1459
|
-
|
|
1690
|
+
true: d(() => [
|
|
1691
|
+
S("code", null, E(i(p)("gateway_services.form.fields.enabled.true")), 1)
|
|
1460
1692
|
]),
|
|
1461
1693
|
_: 1
|
|
1462
1694
|
})
|
|
1463
1695
|
]),
|
|
1464
|
-
"ca_certificates-label-tooltip":
|
|
1465
|
-
|
|
1696
|
+
"ca_certificates-label-tooltip": d(() => [
|
|
1697
|
+
c(i(n), {
|
|
1466
1698
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1467
1699
|
scope: "global"
|
|
1468
1700
|
}, {
|
|
1469
|
-
code1:
|
|
1470
|
-
|
|
1701
|
+
code1: d(() => [
|
|
1702
|
+
S("code", null, E(i(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1471
1703
|
]),
|
|
1472
|
-
code2:
|
|
1473
|
-
|
|
1704
|
+
code2: d(() => [
|
|
1705
|
+
S("code", null, E(i(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1474
1706
|
]),
|
|
1475
1707
|
_: 1
|
|
1476
1708
|
})
|
|
1477
1709
|
]),
|
|
1478
|
-
"tls_verify-label-tooltip":
|
|
1479
|
-
|
|
1710
|
+
"tls_verify-label-tooltip": d(() => [
|
|
1711
|
+
c(i(n), {
|
|
1480
1712
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1481
1713
|
scope: "global"
|
|
1482
1714
|
}, {
|
|
1483
|
-
code1:
|
|
1484
|
-
|
|
1715
|
+
code1: d(() => [
|
|
1716
|
+
S("code", null, E(i(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1485
1717
|
]),
|
|
1486
1718
|
_: 1
|
|
1487
1719
|
})
|
|
1488
1720
|
]),
|
|
1489
|
-
tls_verify:
|
|
1490
|
-
|
|
1721
|
+
tls_verify: d((_) => [
|
|
1722
|
+
L(E(typeof i(V)("rowValue", _) == "boolean" ? q("rowValue", _) : i(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1491
1723
|
]),
|
|
1492
|
-
client_certificate:
|
|
1493
|
-
|
|
1724
|
+
client_certificate: d((_) => [
|
|
1725
|
+
L(E(i(V)("rowValue", _) ? i(V)("rowValue", _).id : "–"), 1)
|
|
1494
1726
|
]),
|
|
1495
1727
|
_: 1
|
|
1496
1728
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1498,7 +1730,7 @@ const ye = {
|
|
|
1498
1730
|
}
|
|
1499
1731
|
});
|
|
1500
1732
|
export {
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1733
|
+
go as GatewayServiceConfigCard,
|
|
1734
|
+
vo as GatewayServiceForm,
|
|
1735
|
+
mo as GatewayServiceList
|
|
1504
1736
|
};
|