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