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