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