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