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