@kong-ui-public/entities-gateway-services 3.10.4-pr.1990.f7a2d582d.0 → 3.10.4-pr.2001.5923607fc.0

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