@kong-ui-public/entities-gateway-services 3.10.4-pr.2001.c671e9446.0 → 3.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { defineComponent as 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";
1
+ import { defineComponent as Te, computed as _, ref as E, watch as Ie, onBeforeMount as Be, resolveComponent as F, openBlock as S, createElementBlock as U, createVNode as d, unref as l, createSlots as Le, withCtx as f, createBlock as ue, Teleport as Ee, createElementVNode as k, createCommentVNode as L, createTextVNode as M, toDisplayString as b, withModifiers as Se, reactive as Pe, onMounted as De, renderSlot as Ke } from "vue";
2
2
  import { useRouter as $e } from "vue-router";
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
- const dt = {
3
+ import { BookIcon as Ue, AddIcon as Ge, ServicesIcon as qe } from "@kong/icons";
4
+ import { createI18n as Oe, i18nTComponent as Ne } from "@kong-ui-public/i18n";
5
+ import { useAxios as xe, useTableState as We, useFetcher as je, useDeleteUrlBuilder as He, FetcherStatus as ze, EntityBaseTable as Je, EntityFilter as Qe, PermissionsWrapper as ie, TableTags as Xe, EntityEmptyState as Ze, EntityToggleModal as Ye, EntityDeleteModal as et, EntityTypes as tt, useErrors as lt, useValidators as ot, EntityBaseFormType as Re, useGatewayFeatureSupported as it, EntityBaseForm as st, SupportedEntityType as Ae, EntityFormSection as Me, useHelpers as rt, ConfigurationSchemaSection as fe, ConfigurationSchemaType as at, EntityBaseConfigCard as nt } from "@kong-ui-public/entities-shared";
6
+ const ct = {
7
7
  create: "New gateway service",
8
8
  serverless_create: "Add a Service",
9
9
  copy_id: "Copy ID",
@@ -16,12 +16,12 @@ const dt = {
16
16
  description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
17
17
  menu_label: "Delete"
18
18
  }
19
- }, ut = {
19
+ }, dt = {
20
20
  placeholder: {
21
21
  konnect: "Filter by name",
22
22
  kongManager: "Filter by exact name or ID"
23
23
  }
24
- }, ft = {
24
+ }, ut = {
25
25
  title: "Gateway Services",
26
26
  list: {
27
27
  toolbar_actions: {
@@ -55,27 +55,21 @@ const dt = {
55
55
  sections: {
56
56
  general: {
57
57
  title: "General Information",
58
- description: "Provide a name and tags to help identify and manage this service."
58
+ description: "General information will help identify and manage this Gateway Service."
59
59
  },
60
60
  keys: {
61
61
  title: "Service Endpoint",
62
- description: "Define where this service should send requests.",
62
+ description: "Define the endpoint for this service by specifying the full URL or by its separate elements.",
63
63
  checkedGroupLabel: "Choose how and where to send traffic",
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
- },
64
+ urlLabel: "Full URL",
65
+ checkedGroupAltLabel: "Protocol, Host, Port and Path",
72
66
  viewAdvancedFields: "View Advanced Fields"
73
67
  }
74
68
  },
75
69
  fields: {
76
70
  upstream_url: {
77
- label: "Full URL",
78
- placeholder: "e.g. https://www.myapi.com/",
71
+ label: "Upstream URL",
72
+ placeholder: "Enter a URL",
79
73
  tooltip_for_konnect: "This is the URL of the API you will manage in Konnect.",
80
74
  tooltip_for_km: "This is the URL of the API you will manage in Kong Gateway."
81
75
  },
@@ -165,8 +159,7 @@ const dt = {
165
159
  label: "Tags",
166
160
  tooltip: "An optional set of strings associated with the Service for grouping and filtering.",
167
161
  placeholder: "Enter a list of tags separated by comma",
168
- help: "e.g. tag1, tag2, tag3",
169
- collapse: "Add tags"
162
+ help: "e.g. tag1, tag2, tag3"
170
163
  },
171
164
  enabled: {
172
165
  label: "Enabled",
@@ -176,39 +169,39 @@ const dt = {
176
169
  }
177
170
  }
178
171
  }
179
- }, pt = {
172
+ }, ft = {
180
173
  general: "Gateway Services could not be retrieved",
181
174
  delete: "The gateway service could not be deleted at this time.",
182
175
  copy: "Failed to copy to clipboard",
183
176
  urlErrorMessage: "Error: invalid URL"
184
- }, mt = {
177
+ }, pt = {
185
178
  success: "Copied {val} to clipboard",
186
179
  success_brief: "Successfully copied to clipboard"
187
- }, vt = {
180
+ }, mt = {
188
181
  gateway_services: "gateway services"
189
- }, gt = {
190
- actions: dt,
191
- search: ut,
192
- gateway_services: ft,
193
- errors: pt,
194
- copy: mt,
195
- glossary: vt
182
+ }, vt = {
183
+ actions: ct,
184
+ search: dt,
185
+ gateway_services: ut,
186
+ errors: ft,
187
+ copy: pt,
188
+ glossary: mt
196
189
  };
197
- function yt() {
198
- const a = Ge("en-us", gt);
190
+ function gt() {
191
+ const n = Oe("en-us", vt);
199
192
  return {
200
- i18n: a,
201
- i18nT: We(a)
193
+ i18n: n,
194
+ i18nT: Ne(n)
202
195
  // Translation component <i18n-t>
203
196
  };
204
197
  }
205
- function _t() {
198
+ function yt() {
206
199
  return {
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) {
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) {
212
205
  case "grpcs":
213
206
  case "tls":
214
207
  case "https":
@@ -224,38 +217,38 @@ function _t() {
224
217
  }
225
218
  };
226
219
  }
227
- const me = {
228
- useI18n: yt,
229
- usePortFromProtocol: _t
230
- }, fe = "/v2/control-planes/{controlPlaneId}/core-entities", pe = "/{workspace}", ie = {
220
+ const ve = {
221
+ useI18n: gt,
222
+ usePortFromProtocol: yt
223
+ }, pe = "/v2/control-planes/{controlPlaneId}/core-entities", me = "/{workspace}", se = {
231
224
  list: {
232
225
  konnect: {
233
- all: `${fe}/services`
226
+ all: `${pe}/services`
234
227
  },
235
228
  kongManager: {
236
- all: `${pe}/services`
229
+ all: `${me}/services`
237
230
  }
238
231
  },
239
232
  form: {
240
233
  konnect: {
241
- create: `${fe}/services`,
242
- validate: `${fe}/v1/schemas/json/service/validate`,
243
- edit: `${fe}/services/{id}`
244
- },
245
- kongManager: {
246
234
  create: `${pe}/services`,
247
- validate: `${pe}/schemas/services/validate`,
235
+ validate: `${pe}/v1/schemas/json/service/validate`,
248
236
  edit: `${pe}/services/{id}`
237
+ },
238
+ kongManager: {
239
+ create: `${me}/services`,
240
+ validate: `${me}/schemas/services/validate`,
241
+ edit: `${me}/services/{id}`
249
242
  }
250
243
  }
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({
244
+ }, _t = "#00abd2", bt = "24px", ht = { class: "kong-ui-entities-gateway-services-list" }, wt = { class: "button-row" }, kt = { class: "empty-state-icon-gateway" }, Ct = { key: 1 }, Vt = /* @__PURE__ */ Te({
252
245
  __name: "GatewayServiceList",
253
246
  props: {
254
247
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
255
248
  config: {
256
249
  type: Object,
257
250
  required: !0,
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)
251
+ validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || !n.createRoute || !n.getViewRoute || !n.getEditRoute || n.app === "kongManager" && !n.isExactMatch && !n.filterSchema)
259
252
  },
260
253
  // used to override the default identifier for the cache entry
261
254
  cacheIdentifier: {
@@ -306,211 +299,211 @@ const me = {
306
299
  }
307
300
  },
308
301
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
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 = {
302
+ setup(n, { emit: D }) {
303
+ var o;
304
+ const p = D, c = n, { i18n: { t: r, formatUnixTimeStamp: $ } } = ve.useI18n(), N = $e(), { axiosInstance: q } = xe((o = c.config) == null ? void 0 : o.axiosRequestConfig), { hasRecords: a, handleStateChange: P } = We(() => K.value), C = _(() => a.value && c.config.app === "konnect"), ge = _(() => !c.enableV2EmptyStates && c.config.app === "konnect"), ye = _(() => c.config.app !== "kongManager" || !!c.config.disableSorting), O = {
312
305
  // the Name column is non-hidable
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 = {
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
+ }, _e = {
324
317
  columnVisibility: {
325
318
  created_at: !1
326
319
  }
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)
320
+ }, H = O, y = _(() => {
321
+ var s, g;
322
+ let u = `${c.config.apiBaseUrl}${se.list[c.config.app].all}`;
323
+ return c.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((s = c.config) == null ? void 0 : s.controlPlaneId) || "") : c.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (g = c.config) != null && g.workspace ? `/${c.config.workspace}` : "")), u;
324
+ }), Y = _(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${y.value}`) : new URL(y.value)), K = E(""), be = _(() => {
325
+ const u = c.config.app === "konnect" || c.config.isExactMatch;
326
+ if (u)
334
327
  return {
335
- isExactMatch: n,
336
- placeholder: s(`search.placeholder.${u.config.app}`)
328
+ isExactMatch: u,
329
+ placeholder: r(`search.placeholder.${c.config.app}`)
337
330
  };
338
- const { name: l, enabled: v, protocol: c, host: J, port: R, path: ce } = q;
331
+ const { name: s, enabled: g, protocol: I, host: Z, port: x, path: de } = O;
339
332
  return {
340
- isExactMatch: n,
341
- fields: { name: l, enabled: v, protocol: c, host: J, port: R, path: ce },
342
- schema: u.config.filterSchema
333
+ isExactMatch: u,
334
+ fields: { name: s, enabled: g, protocol: I, host: Z, port: x, path: de },
335
+ schema: c.config.filterSchema
343
336
  };
344
337
  }), {
345
338
  fetcher: e,
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 = {
339
+ fetcherState: w,
340
+ fetcherCacheKey: ee
341
+ } = je({ ...c.config, cacheIdentifier: c.cacheIdentifier }, y.value), he = () => {
342
+ K.value = "";
343
+ }, re = () => {
344
+ ee.value++;
345
+ }, z = E(null), W = _(() => ({
346
+ ctaPath: c.config.createRoute,
347
+ ctaText: h.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: h.value ? c.isServerless ? r("gateway_services.list.empty_state.serverless_title") : r("gateway_services.list.empty_state.title") : r("gateway_services.title")
350
+ })), J = E(!1), T = E(null), Q = _(() => {
351
+ const u = {
359
352
  action: "disable",
360
353
  id: "",
361
354
  name: ""
362
355
  };
363
- if (E.value) {
364
- const { enabled: l, id: v, name: c } = E.value;
365
- n.action = l ? "disable" : "enable", n.id = v, n.name = c || v;
356
+ if (T.value) {
357
+ const { enabled: s, id: g, name: I } = T.value;
358
+ u.action = s ? "disable" : "enable", u.id = g, u.name = I || g;
366
359
  }
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)
360
+ return u;
361
+ }), we = (u) => {
362
+ J.value = !0, T.value = u;
363
+ }, ae = () => {
364
+ J.value = !1, T.value = null;
365
+ }, ke = async () => {
366
+ var I, Z;
367
+ if (!await ((I = c.canEdit) == null ? void 0 : I.call(c, T.value)) || !T.value)
375
368
  return;
376
- const l = `${Q.value.href}/${E.value.id}`, v = !E.value.enabled;
369
+ const s = `${Y.value.href}/${T.value.id}`, g = !T.value.enabled;
377
370
  try {
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);
371
+ const { data: x } = ((Z = c.config) == null ? void 0 : Z.app) === "konnect" ? await q.put(s, { ...T.value, enabled: g }) : await q.patch(s, { ...T.value, enabled: g });
372
+ p("toggle:success", x), T.value.enabled = g;
373
+ } catch (x) {
374
+ p("error", x);
382
375
  }
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)) {
376
+ }, Ce = (u) => {
377
+ c.config.getControlPlaneRoute && N.push(c.config.getControlPlaneRoute(u));
378
+ }, te = (u, s) => {
379
+ const g = u.id;
380
+ if (!s(g)) {
388
381
  p("copy:error", {
389
- entity: n,
382
+ entity: u,
390
383
  field: "id",
391
- message: s("errors.copy")
384
+ message: r("errors.copy")
392
385
  });
393
386
  return;
394
387
  }
395
388
  p("copy:success", {
396
- entity: n,
389
+ entity: u,
397
390
  field: "id",
398
- message: s("copy.success", { val: v })
391
+ message: r("copy.success", { val: g })
399
392
  });
400
- }, Ve = (n, l) => {
401
- const v = JSON.stringify(n);
402
- if (!l(v)) {
393
+ }, ne = (u, s) => {
394
+ const g = JSON.stringify(u);
395
+ if (!s(g)) {
403
396
  p("copy:error", {
404
- entity: n,
405
- message: s("errors.copy")
397
+ entity: u,
398
+ message: r("errors.copy")
406
399
  });
407
400
  return;
408
401
  }
409
402
  p("copy:success", {
410
- entity: n,
411
- message: s("copy.success_brief")
403
+ entity: u,
404
+ message: r("copy.success_brief")
412
405
  });
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;
406
+ }, ce = async (u) => {
407
+ var g;
408
+ await ((g = c.canRetrieve) == null ? void 0 : g.call(c, u)) && N.push(c.config.getViewRoute(u.id));
409
+ }, Ve = (u) => ({
410
+ label: r("actions.view"),
411
+ to: c.config.getViewRoute(u)
412
+ }), le = (u) => ({
413
+ label: r("actions.edit"),
414
+ to: c.config.getEditRoute(u)
415
+ }), B = E(void 0), G = E(!1), j = E(!1), X = E(""), t = He(c.config, y.value), i = (u) => {
416
+ B.value = u, G.value = !0, X.value = "";
417
+ }, v = () => {
418
+ G.value = !1, B.value = void 0;
419
+ }, R = async () => {
420
+ var u, s, g;
421
+ if ((u = B.value) != null && u.id) {
422
+ j.value = !0;
430
423
  try {
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);
424
+ await q.delete(t(B.value.id)), p("delete:success", B.value), v(), ee.value++;
425
+ } catch (I) {
426
+ X.value = ((g = (s = I.response) == null ? void 0 : s.data) == null ? void 0 : g.message) || I.message || r("errors.delete"), p("error", I);
434
427
  } finally {
435
- ee.value = !1;
428
+ j.value = !1;
436
429
  }
437
430
  }
438
- }, _ = () => {
439
- N.push(u.config.createRoute);
431
+ }, V = () => {
432
+ N.push(c.config.createRoute);
440
433
  };
441
- Te(h, (n) => {
442
- var l, v, c;
443
- if (n.status === Je.Error) {
434
+ Ie(w, (u) => {
435
+ var s, g, I;
436
+ if (u.status === ze.Error) {
444
437
  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);
438
+ title: r("errors.general")
439
+ }, (I = (g = (s = u.error) == null ? void 0 : s.response) == null ? void 0 : g.data) != null && I.message && (z.value.message = u.error.response.data.message), p("error", u.error);
447
440
  return;
448
441
  }
449
442
  z.value = null;
450
443
  });
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,
444
+ const h = E(!1);
445
+ return Be(async () => {
446
+ h.value = await c.canCreate();
447
+ }), (u, s) => {
448
+ const g = F("KButton"), I = F("KBadge"), Z = F("KInputSwitch"), x = F("KDropdownItem"), de = F("KClipboardProvider");
449
+ return S(), U("div", ht, [
450
+ d(l(Je), {
451
+ "cache-identifier": n.cacheIdentifier,
452
+ "default-table-preferences": _e,
453
+ "disable-sorting": ye.value,
454
+ "empty-state-options": W.value,
462
455
  "enable-entity-actions": "",
463
456
  "error-message": z.value,
464
- fetcher: o(e),
465
- "fetcher-cache-key": o(X),
457
+ fetcher: l(e),
458
+ "fetcher-cache-key": l(ee),
466
459
  "pagination-type": "offset",
467
460
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
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({
461
+ query: K.value,
462
+ "table-headers": l(H),
463
+ onClearSearchInput: he,
464
+ "onClick:row": s[5] || (s[5] = (m) => ce(m)),
465
+ onSort: re,
466
+ onState: l(P)
467
+ }, Le({
475
468
  "toolbar-filter": f(() => [
476
- d(o(Xe), {
477
- modelValue: D.value,
478
- "onUpdate:modelValue": l[0] || (l[0] = (m) => D.value = m),
479
- config: _e.value
469
+ d(l(Qe), {
470
+ modelValue: K.value,
471
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => K.value = m),
472
+ config: be.value
480
473
  }, null, 8, ["modelValue", "config"])
481
474
  ]),
482
475
  "toolbar-button": f(() => [
483
- (k(), de(Ee, {
484
- disabled: !a.useActionOutside,
476
+ (S(), ue(Ee, {
477
+ disabled: !n.useActionOutside,
485
478
  to: "#kong-ui-app-page-header-action-button"
486
479
  }, [
487
- C("div", kt, [
488
- w.value ? (k(), de(v, {
480
+ k("div", wt, [
481
+ C.value ? (S(), ue(g, {
489
482
  key: 0,
490
483
  appearance: "secondary",
491
484
  class: "open-learning-hub",
492
485
  "data-testid": "gateway-services-learn-more-button",
493
486
  icon: "",
494
- onClick: l[1] || (l[1] = (m) => n.$emit("click:learn-more"))
487
+ onClick: s[1] || (s[1] = (m) => u.$emit("click:learn-more"))
495
488
  }, {
496
489
  default: f(() => [
497
- d(o(Re), { decorative: "" })
490
+ d(l(Ue), { decorative: "" })
498
491
  ]),
499
492
  _: 1
500
- })) : A("", !0),
501
- d(o(oe), {
502
- "auth-function": () => a.canCreate()
493
+ })) : L("", !0),
494
+ d(l(ie), {
495
+ "auth-function": () => n.canCreate()
503
496
  }, {
504
497
  default: f(() => [
505
- d(v, {
498
+ d(g, {
506
499
  appearance: "primary",
507
500
  "data-testid": "toolbar-add-gateway-service",
508
- size: a.useActionOutside ? "medium" : "large",
509
- to: a.config.createRoute
501
+ size: n.useActionOutside ? "medium" : "large",
502
+ to: n.config.createRoute
510
503
  }, {
511
504
  default: f(() => [
512
- d(o(Ne)),
513
- F(" " + V(o(s)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
505
+ d(l(Ge)),
506
+ M(" " + b(l(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
514
507
  ]),
515
508
  _: 1
516
509
  }, 8, ["size", "to"])
@@ -521,40 +514,40 @@ const me = {
521
514
  ], 8, ["disabled"]))
522
515
  ]),
523
516
  name: f(({ rowValue: m }) => [
524
- C("b", null, V(m ?? "-"), 1)
517
+ k("b", null, b(m ?? "-"), 1)
525
518
  ]),
526
519
  control_plane: f(({ row: m }) => {
527
- var M;
520
+ var A;
528
521
  return [
529
- (M = m.x_meta) != null && M.cluster_id ? (k(), de(c, {
522
+ (A = m.x_meta) != null && A.cluster_id ? (S(), ue(I, {
530
523
  key: 0,
531
524
  tooltip: m.x_meta.cluster_id,
532
525
  "truncation-tooltip": "",
533
- onClick: Se((le) => ke(m.x_meta.cluster_id), ["stop"])
526
+ onClick: Se((oe) => Ce(m.x_meta.cluster_id), ["stop"])
534
527
  }, {
535
528
  default: f(() => [
536
- F(V(m.x_meta.cluster_id), 1)
529
+ M(b(m.x_meta.cluster_id), 1)
537
530
  ]),
538
531
  _: 2
539
- }, 1032, ["tooltip", "onClick"])) : (k(), I("b", Vt, "-"))
532
+ }, 1032, ["tooltip", "onClick"])) : (S(), U("b", Ct, "-"))
540
533
  ];
541
534
  }),
542
535
  enabled: f(({ row: m }) => [
543
- d(o(oe), {
544
- "auth-function": () => a.canEdit(m),
536
+ d(l(ie), {
537
+ "auth-function": () => n.canEdit(m),
545
538
  "force-show": ""
546
539
  }, {
547
- default: f(({ isAllowed: M }) => [
548
- C("div", {
549
- onClick: l[4] || (l[4] = Se(() => {
540
+ default: f(({ isAllowed: A }) => [
541
+ k("div", {
542
+ onClick: s[4] || (s[4] = Se(() => {
550
543
  }, ["stop"]))
551
544
  }, [
552
- d(J, {
545
+ d(Z, {
553
546
  modelValue: m.enabled,
554
- "onUpdate:modelValue": (le) => m.enabled = le,
547
+ "onUpdate:modelValue": (oe) => m.enabled = oe,
555
548
  "data-testid": `row-${m.id}-toggle-input`,
556
- disabled: !M,
557
- onClick: Se((le) => he(m), ["prevent"])
549
+ disabled: !A,
550
+ onClick: Se((oe) => we(m), ["prevent"])
558
551
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
559
552
  ])
560
553
  ]),
@@ -562,78 +555,78 @@ const me = {
562
555
  }, 1032, ["auth-function"])
563
556
  ]),
564
557
  tags: f(({ rowValue: m }) => [
565
- d(o(Ze), { tags: m }, null, 8, ["tags"])
558
+ d(l(Xe), { tags: m }, null, 8, ["tags"])
566
559
  ]),
567
560
  created_at: f(({ rowValue: m }) => [
568
- F(V(o(U)(m)), 1)
561
+ M(b(l($)(m)), 1)
569
562
  ]),
570
- updated_at: f(({ row: m, rowValue: M }) => [
571
- F(V(o(U)(M ?? m.created_at)), 1)
563
+ updated_at: f(({ row: m, rowValue: A }) => [
564
+ M(b(l($)(A ?? m.created_at)), 1)
572
565
  ]),
573
566
  actions: f(({ row: m }) => [
574
- d(ce, null, {
575
- default: f(({ copyToClipboard: M }) => [
576
- d(R, {
567
+ d(de, null, {
568
+ default: f(({ copyToClipboard: A }) => [
569
+ d(x, {
577
570
  "data-testid": "action-entity-copy-id",
578
- onClick: (le) => Ce(m, M)
571
+ onClick: (oe) => te(m, A)
579
572
  }, {
580
573
  default: f(() => [
581
- F(V(o(s)("actions.copy_id")), 1)
574
+ M(b(l(r)("actions.copy_id")), 1)
582
575
  ]),
583
576
  _: 2
584
577
  }, 1032, ["onClick"])
585
578
  ]),
586
579
  _: 2
587
580
  }, 1024),
588
- d(ce, null, {
589
- default: f(({ copyToClipboard: M }) => [
590
- d(R, {
581
+ d(de, null, {
582
+ default: f(({ copyToClipboard: A }) => [
583
+ d(x, {
591
584
  "data-testid": "action-entity-copy-json",
592
- onClick: (le) => Ve(m, M)
585
+ onClick: (oe) => ne(m, A)
593
586
  }, {
594
587
  default: f(() => [
595
- F(V(o(s)("actions.copy_json")), 1)
588
+ M(b(l(r)("actions.copy_json")), 1)
596
589
  ]),
597
590
  _: 2
598
591
  }, 1032, ["onClick"])
599
592
  ]),
600
593
  _: 2
601
594
  }, 1024),
602
- d(o(oe), {
603
- "auth-function": () => a.canRetrieve(m)
595
+ d(l(ie), {
596
+ "auth-function": () => n.canRetrieve(m)
604
597
  }, {
605
598
  default: f(() => [
606
- d(R, {
599
+ d(x, {
607
600
  "data-testid": "action-entity-view",
608
601
  "has-divider": "",
609
- item: re(m.id)
602
+ item: Ve(m.id)
610
603
  }, null, 8, ["item"])
611
604
  ]),
612
605
  _: 2
613
606
  }, 1032, ["auth-function"]),
614
- d(o(oe), {
615
- "auth-function": () => a.canEdit(m)
607
+ d(l(ie), {
608
+ "auth-function": () => n.canEdit(m)
616
609
  }, {
617
610
  default: f(() => [
618
- d(R, {
611
+ d(x, {
619
612
  "data-testid": "action-entity-edit",
620
- item: ae(m.id)
613
+ item: le(m.id)
621
614
  }, null, 8, ["item"])
622
615
  ]),
623
616
  _: 2
624
617
  }, 1032, ["auth-function"]),
625
- d(o(oe), {
626
- "auth-function": () => a.canDelete(m)
618
+ d(l(ie), {
619
+ "auth-function": () => n.canDelete(m)
627
620
  }, {
628
621
  default: f(() => [
629
- d(R, {
622
+ d(x, {
630
623
  danger: "",
631
624
  "data-testid": "action-entity-delete",
632
625
  "has-divider": "",
633
- onClick: (M) => ne(m)
626
+ onClick: (A) => i(m)
634
627
  }, {
635
628
  default: f(() => [
636
- F(V(o(s)("actions.delete.menu_label")), 1)
629
+ M(b(l(r)("actions.delete.menu_label")), 1)
637
630
  ]),
638
631
  _: 2
639
632
  }, 1032, ["onClick"])
@@ -643,22 +636,22 @@ const me = {
643
636
  ]),
644
637
  _: 2
645
638
  }, [
646
- !o(r) && ve.value ? {
639
+ !l(a) && ge.value ? {
647
640
  name: "outside-actions",
648
641
  fn: f(() => [
649
- (k(), de(Ee, {
650
- disabled: !a.useActionOutside,
642
+ (S(), ue(Ee, {
643
+ disabled: !n.useActionOutside,
651
644
  to: "#kong-ui-app-page-header-action-button"
652
645
  }, [
653
- d(v, {
646
+ d(g, {
654
647
  appearance: "secondary",
655
648
  class: "open-learning-hub",
656
649
  "data-testid": "gateway-services-more-button",
657
650
  icon: "",
658
- onClick: l[2] || (l[2] = (m) => n.$emit("click:learn-more"))
651
+ onClick: s[2] || (s[2] = (m) => u.$emit("click:learn-more"))
659
652
  }, {
660
653
  default: f(() => [
661
- d(o(Re), { decorative: "" })
654
+ d(l(Ue), { decorative: "" })
662
655
  ]),
663
656
  _: 1
664
657
  })
@@ -666,25 +659,25 @@ const me = {
666
659
  ]),
667
660
  key: "0"
668
661
  } : void 0,
669
- a.enableV2EmptyStates && a.config.app === "konnect" ? {
662
+ n.enableV2EmptyStates && n.config.app === "konnect" ? {
670
663
  name: "empty-state",
671
664
  fn: f(() => [
672
- d(o(Ye), {
673
- "action-button-text": o(s)("gateway_services.empty_state_v2.create"),
665
+ d(l(Ze), {
666
+ "action-button-text": l(r)("gateway_services.empty_state_v2.create"),
674
667
  appearance: "secondary",
675
- "can-create": () => a.canCreate(),
668
+ "can-create": () => n.canCreate(),
676
669
  "data-testid": "gateway-services-entity-empty-state",
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"))
670
+ description: l(r)("gateway_services.empty_state_v2.description"),
671
+ "learn-more": n.config.app === "konnect",
672
+ title: l(r)("gateway_services.empty_state_v2.title"),
673
+ "onClick:create": V,
674
+ "onClick:learnMore": s[3] || (s[3] = (m) => u.$emit("click:learn-more"))
682
675
  }, {
683
676
  image: f(() => [
684
- C("div", Ct, [
685
- d(o(Oe), {
686
- color: o(bt),
687
- size: o(ht)
677
+ k("div", kt, [
678
+ d(l(qe), {
679
+ color: l(_t),
680
+ size: l(bt)
688
681
  }, null, 8, ["color", "size"])
689
682
  ])
690
683
  ]),
@@ -694,70 +687,64 @@ const me = {
694
687
  key: "1"
695
688
  } : void 0
696
689
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
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
690
+ d(l(Ye), {
691
+ action: Q.value.action,
692
+ "entity-id": Q.value.id,
693
+ "entity-name": Q.value.name,
694
+ "entity-type": l(r)("glossary.gateway_services"),
695
+ "on-confirm": ke,
696
+ visible: J.value,
697
+ onCancel: ae,
698
+ onProceed: ae
706
699
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
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
700
+ d(l(et), {
701
+ "action-pending": j.value,
702
+ description: l(r)("actions.delete.description"),
703
+ "entity-name": B.value && (B.value.name || B.value.id),
704
+ "entity-type": l(tt).GatewayService,
705
+ error: X.value,
706
+ title: l(r)("actions.delete.title"),
707
+ visible: G.value,
708
+ onCancel: v,
709
+ onProceed: R
717
710
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
718
711
  ]);
719
712
  };
720
713
  }
721
- }), Be = (a, B) => {
722
- const p = a.__vccOpts || a;
723
- for (const [u, s] of B)
724
- p[u] = s;
714
+ }), Fe = (n, D) => {
715
+ const p = n.__vccOpts || n;
716
+ for (const [c, r] of D)
717
+ p[c] = r;
725
718
  return p;
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 = {
719
+ }, Jt = /* @__PURE__ */ Fe(Vt, [["__scopeId", "data-v-fa0c855e"]]), St = { class: "kong-ui-entities-gateway-service-form" }, It = { key: 0 }, Tt = { class: "gateway-service-form-traffic-label" }, Et = { class: "gateway-service-form-margin-bottom" }, Pt = {
730
720
  key: 0,
731
721
  class: "gateway-service-form-group-fields"
732
722
  }, Ut = {
733
- key: 0,
723
+ key: 1,
734
724
  class: "gateway-service-form-group-fields"
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 = {
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 = {
739
726
  key: 0,
740
727
  class: "gateway-service-form-margin-bottom"
741
- }, Dt = {
728
+ }, Lt = {
742
729
  key: 1,
743
730
  class: "gateway-service-form-margin-bottom"
744
- }, Kt = {
731
+ }, Dt = {
745
732
  key: 2,
746
733
  class: "gateway-service-form-margin-bottom"
747
- }, Lt = {
734
+ }, Kt = {
748
735
  key: 0,
749
736
  class: "checkbox-aligned-radio"
750
- }, qt = {
737
+ }, Gt = {
751
738
  key: 1,
752
739
  class: "checkbox-aligned-radio"
753
- }, Nt = { class: "gateway-service-form-tags" }, Ot = /* @__PURE__ */ Pe({
740
+ }, qt = /* @__PURE__ */ Te({
754
741
  __name: "GatewayServiceForm",
755
742
  props: {
756
743
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
757
744
  config: {
758
745
  type: Object,
759
746
  required: !0,
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)
747
+ validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || n.app === "konnect" && !n.controlPlaneId || n.app === "kongManager" && typeof n.workspace != "string" || !n.cancelRoute)
761
748
  },
762
749
  /** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
763
750
  gatewayServiceId: {
@@ -770,18 +757,12 @@ const me = {
770
757
  type: Boolean,
771
758
  required: !1,
772
759
  default: !1
773
- },
774
- /** Whether show or hide Try sample API button */
775
- hideTrySampleAPIButton: {
776
- type: Boolean,
777
- required: !1,
778
- default: !1
779
760
  }
780
761
  },
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({
762
+ emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
763
+ setup(n, { expose: D, emit: p }) {
764
+ var X;
765
+ const c = p, r = n, $ = E(!0), N = $e(), { i18nT: q, i18n: { t: a } } = ve.useI18n(), { getMessageFromError: P } = lt(), { axiosInstance: C } = xe((X = r.config) == null ? void 0 : X.axiosRequestConfig), ge = ot(), ye = _(() => se.form[r.config.app].edit), O = _(() => r.gatewayServiceId ? Re.Edit : Re.Create), _e = E(!1), H = _(() => !!r.gatewayServiceId), y = E(H.value ? "protocol" : "url"), Y = ve.usePortFromProtocol(), K = E(""), be = _(() => !!K.value), e = Pe({
785
766
  fields: {
786
767
  name: "",
787
768
  protocol: "http",
@@ -801,7 +782,7 @@ const me = {
801
782
  },
802
783
  isReadonly: !1,
803
784
  errorMessage: ""
804
- }), h = Ue({
785
+ }), w = Pe({
805
786
  name: "",
806
787
  protocol: "http",
807
788
  host: "",
@@ -817,121 +798,119 @@ const me = {
817
798
  tls_verify_enabled: !1,
818
799
  tls_verify_value: !1,
819
800
  tags: ""
820
- }), X = s.config.app === "konnect" || st({
821
- gatewayInfo: s.config.gatewayInfo,
801
+ }), ee = r.config.app === "konnect" || it({
802
+ gatewayInfo: r.config.gatewayInfo,
822
803
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
823
804
  supportedRange: {
824
805
  enterprise: ["3.0"]
825
806
  }
826
- }), be = [
807
+ }), he = [
827
808
  {
828
- label: r("gateway_services.form.fields.protocol.options.http"),
809
+ label: a("gateway_services.form.fields.protocol.options.http"),
829
810
  value: "http",
830
811
  group: "http"
831
812
  },
832
813
  {
833
- label: r("gateway_services.form.fields.protocol.options.https"),
814
+ label: a("gateway_services.form.fields.protocol.options.https"),
834
815
  value: "https",
835
816
  group: "http"
836
817
  },
837
818
  {
838
- label: r("gateway_services.form.fields.protocol.options.tcp"),
819
+ label: a("gateway_services.form.fields.protocol.options.tcp"),
839
820
  value: "tcp",
840
821
  group: "tcp"
841
822
  },
842
823
  {
843
- label: r("gateway_services.form.fields.protocol.options.tls"),
824
+ label: a("gateway_services.form.fields.protocol.options.tls"),
844
825
  value: "tls",
845
826
  group: "tcp"
846
827
  },
847
828
  {
848
- label: r("gateway_services.form.fields.protocol.options.tls_passthrough"),
829
+ label: a("gateway_services.form.fields.protocol.options.tls_passthrough"),
849
830
  value: "tls_passthrough",
850
831
  group: "tcp"
851
832
  },
852
833
  {
853
- label: r("gateway_services.form.fields.protocol.options.grpc"),
834
+ label: a("gateway_services.form.fields.protocol.options.grpc"),
854
835
  value: "grpc",
855
836
  group: "grpc"
856
837
  },
857
838
  {
858
- label: r("gateway_services.form.fields.protocol.options.grpcs"),
839
+ label: a("gateway_services.form.fields.protocol.options.grpcs"),
859
840
  value: "grpcs",
860
841
  group: "grpc"
861
842
  },
862
- ...X ? [
843
+ ...ee ? [
863
844
  {
864
- label: r("gateway_services.form.fields.protocol.options.ws"),
845
+ label: a("gateway_services.form.fields.protocol.options.ws"),
865
846
  value: "ws",
866
847
  group: "websocket"
867
848
  },
868
849
  {
869
- label: r("gateway_services.form.fields.protocol.options.wss"),
850
+ label: a("gateway_services.form.fields.protocol.options.wss"),
870
851
  value: "wss",
871
852
  group: "websocket"
872
853
  }
873
854
  ] : [],
874
855
  {
875
- label: r("gateway_services.form.fields.protocol.options.udp"),
856
+ label: a("gateway_services.form.fields.protocol.options.udp"),
876
857
  value: "udp",
877
858
  group: "udp"
878
859
  }
879
- ], se = { url: "url", protocol: "protocol" }, z = (t, i) => {
860
+ ], re = { url: "url", protocol: "protocol" }, z = (t, i) => {
880
861
  i.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;
883
- }, E = () => {
884
- W();
885
- }, W = () => {
862
+ }, W = (t) => t ? parseFloat(t) : 0, J = () => {
863
+ $.value = !0, e.errorMessage = "", e.fields.host = w.host, e.fields.path = w.path, e.fields.port = w.port, e.fields.protocol = w.protocol, e.fields.url = w.url, e.fields.retries = w.retries, e.fields.connect_timeout = w.connect_timeout, e.fields.write_timeout = w.write_timeout, e.fields.read_timeout = w.read_timeout, e.fields.client_certificate = w.client_certificate, e.fields.ca_certificates = w.ca_certificates, e.fields.tls_verify_enabled = w.tls_verify_enabled, e.fields.tls_verify_value = w.tls_verify_value;
864
+ }, T = () => {
886
865
  if (e.fields.url && y.value === "url")
887
866
  try {
888
867
  const t = new URL(e.fields.url);
889
868
  e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
890
869
  const i = Number(t.port);
891
- ye.value = !!i, e.fields.port = i || Q.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", u("url-valid:success");
870
+ _e.value = !!i, e.fields.port = i || Y.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", c("url-valid:success");
892
871
  } catch (t) {
893
- e.errorMessage = r("errors.urlErrorMessage"), u("url-valid:error", P(t));
872
+ e.errorMessage = a("errors.urlErrorMessage"), c("url-valid:error", P(t));
894
873
  }
895
874
  else
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(() => {
875
+ c("url-valid:success"), e.errorMessage = "";
876
+ }, Q = _(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), we = _(() => {
898
877
  if (y.value === "url")
899
878
  return !0;
900
879
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
901
880
  return y.value === "protocol" && t;
902
- }), ke = b(() => {
881
+ }), ae = _(() => {
903
882
  if (y.value === "url")
904
883
  return !0;
905
884
  const t = ["https", "tls"].includes(e.fields.protocol);
906
885
  return y.value === "protocol" && t;
907
- }), Ce = b(() => {
886
+ }), ke = _(() => {
908
887
  if (y.value === "url")
909
888
  return !0;
910
889
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
911
890
  return y.value === "protocol" && t;
912
- }), Ve = (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) => {
891
+ }), Ce = (t) => {
892
+ K.value = ge.utf8Name(t);
893
+ }, te = _(() => H.value && JSON.stringify(e.fields) !== JSON.stringify(w) || y.value === "url" && !!e.fields.url || y.value === "protocol" && !!e.fields.host), ne = (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(w, e.fields);
896
+ }, ce = () => {
897
+ N.push(r.config.cancelRoute);
898
+ }, Ve = _(() => {
899
+ var i, v;
900
+ let t = `${r.config.apiBaseUrl}${se.form[r.config.app].validate}`;
901
+ return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
902
+ }), le = _(() => {
903
+ var i, v;
904
+ let t = `${r.config.apiBaseUrl}${se.form[r.config.app][O.value]}`;
905
+ return r.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((i = r.config) == null ? void 0 : i.controlPlaneId) || "") : r.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (v = r.config) != null && v.workspace ? `/${r.config.workspace}` : "")), t = t.replace(/{id}/gi, r.gatewayServiceId), t;
906
+ }), B = (t) => {
928
907
  let i = "";
929
908
  t.url && (i = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(i)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
930
- }, K = b(() => {
931
- var i, _, S, g;
909
+ }, G = _(() => {
910
+ var i, v, R, V;
932
911
  const t = {
933
912
  name: e.fields.name || 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,
913
+ tags: e.fields.tags ? (R = (v = (i = e.fields.tags) == null ? void 0 : i.split(",")) == null ? void 0 : v.map((h) => String(h || "").trim())) == null ? void 0 : R.filter((h) => h !== "") : null,
935
914
  protocol: e.fields.protocol,
936
915
  path: e.fields.path || null,
937
916
  read_timeout: e.fields.read_timeout,
@@ -940,456 +919,426 @@ const me = {
940
919
  connect_timeout: e.fields.connect_timeout,
941
920
  tls_verify_value: e.fields.tls_verify_value,
942
921
  tls_verify_enabled: e.fields.tls_verify_enabled,
943
- ca_certificates: e.fields.ca_certificates ? (g = e.fields.ca_certificates) == null ? void 0 : g.split(",").filter((n) => n !== "") : null,
922
+ ca_certificates: e.fields.ca_certificates ? (V = e.fields.ca_certificates) == null ? void 0 : V.split(",").filter((h) => h !== "") : null,
944
923
  client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
945
924
  write_timeout: e.fields.write_timeout,
946
925
  port: e.fields.port,
947
926
  url: e.fields.url
948
927
  };
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;
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), Q.value || (t.path = null), O.value === "create" ? y.value === "url" ? (delete t.protocol, delete t.host, delete t.path, r.config.app === "konnect" && delete t.port) : delete t.url : O.value === "edit" && delete t.url, t;
929
+ }), j = async () => {
930
+ var t, i, v, R;
952
931
  try {
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);
932
+ e.isReadonly = !0, T();
933
+ const V = G.value;
934
+ B(V);
935
+ let h;
936
+ if (await C.post(Ve.value, V), O.value === "create" ? h = await C.post(le.value, V) : O.value === "edit" && (h = ((t = r.config) == null ? void 0 : t.app) === "konnect" ? await C.put(le.value, V) : await C.patch(le.value, V)), h) {
937
+ const { data: o } = h;
938
+ e.fields.name = (o == null ? void 0 : o.name) || "", e.fields.port = o.port || Y.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(w, e.fields), c("update", h == null ? void 0 : h.data);
960
939
  }
961
- return n;
962
- } catch (g) {
963
- e.errorMessage = P(g), u("error", g);
940
+ return h;
941
+ } catch (V) {
942
+ e.errorMessage = P(V), c("error", V);
964
943
  } finally {
965
944
  e.isReadonly = !1;
966
945
  }
967
946
  };
968
- return Te(() => s.gatewayServiceId, () => {
969
- Object.assign(e.fields, h);
970
- }), Te(e.fields, (t) => {
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
947
+ return Ie(() => r.gatewayServiceId, () => {
948
+ Object.assign(e.fields, w);
949
+ }), Ie(e.fields, (t) => {
950
+ e.fields.port = Y.getPortFromProtocol(t.protocol, String(t.port)), c("model-updated", G.value);
951
+ }), De(() => {
952
+ c("model-updated", G.value);
953
+ }), D({
954
+ validateUrl: T,
955
+ getPayload: G,
956
+ saveFormData: j,
957
+ canSubmit: te,
958
+ initForm: ne
980
959
  }), (t, i) => {
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,
960
+ const v = F("KInput"), R = F("KLabel"), V = F("KRadio"), h = F("KSelect"), o = F("KCheckbox"), u = F("KCollapse");
961
+ return S(), U("div", St, [
962
+ d(l(st), {
963
+ "can-submit": te.value,
964
+ config: n.config,
965
+ "edit-id": n.gatewayServiceId,
966
+ "entity-type": l(Ae).GatewayService,
988
967
  "error-message": e.errorMessage,
989
- "fetch-url": ge.value,
990
- "form-fields": K.value,
968
+ "fetch-url": ye.value,
969
+ "form-fields": G.value,
991
970
  "is-readonly": e.isReadonly,
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
971
+ onCancel: ce,
972
+ "onFetch:error": i[25] || (i[25] = (s) => t.$emit("error", s)),
973
+ "onFetch:success": ne,
974
+ onLoading: i[26] || (i[26] = (s) => t.$emit("loading", s)),
975
+ onSubmit: j
997
976
  }, {
998
977
  "form-actions": f(() => [
999
- qe(t.$slots, "form-actions", {
1000
- canSubmit: Y.value,
1001
- cancel: ae,
1002
- submit: te
978
+ Ke(t.$slots, "form-actions", {
979
+ canSubmit: te.value,
980
+ cancel: ce,
981
+ submit: j
1003
982
  }, void 0, !0)
1004
983
  ]),
1005
984
  default: f(() => [
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")
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: be.value,
998
+ "error-message": K.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: Ce
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")
1010
1034
  }, {
1011
1035
  default: f(() => [
1012
- O.value ? A("", !0) : (k(), I("div", Tt, [
1013
- C("div", Pt, [
1014
- d(_, {
1036
+ H.value ? L("", !0) : (S(), U("div", It, [
1037
+ k("div", Tt, [
1038
+ d(R, { required: "" }, {
1039
+ default: f(() => [
1040
+ M(b(l(a)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
1041
+ ]),
1042
+ _: 1
1043
+ })
1044
+ ]),
1045
+ k("div", Et, [
1046
+ d(V, {
1015
1047
  modelValue: y.value,
1016
- "onUpdate:modelValue": i[0] || (i[0] = (c) => y.value = c),
1017
- card: "",
1018
- "card-orientation": "horizontal",
1048
+ "onUpdate:modelValue": i[2] || (i[2] = (s) => y.value = s),
1019
1049
  "data-testid": "gateway-service-url-radio",
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"])
1050
+ "selected-value": re.url,
1051
+ onChange: J
1052
+ }, {
1053
+ default: f(() => [
1054
+ M(b(l(a)("gateway_services.form.sections.keys.urlLabel")), 1)
1055
+ ]),
1056
+ _: 1
1057
+ }, 8, ["modelValue", "selected-value"])
1037
1058
  ]),
1038
- d(Ie, { name: "slide-fade" }, {
1059
+ y.value === "url" ? (S(), U("div", Pt, [
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 === "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(V, {
1077
+ modelValue: y.value,
1078
+ "onUpdate:modelValue": i[4] || (i[4] = (s) => y.value = s),
1079
+ "checked-group": "protocol",
1080
+ "data-testid": "gateway-service-protocol-radio",
1081
+ "selected-value": re.protocol,
1082
+ onChange: J
1083
+ }, {
1039
1084
  default: f(() => [
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"),
1048
- "label-attributes": {
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"),
1050
- tooltipAttributes: { maxWidth: "400" }
1051
- },
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
1066
- })
1067
- ]),
1068
- _: 1
1069
- }, 8, ["modelValue", "label", "label-attributes", "placeholder"])
1070
- ])) : A("", !0)
1085
+ M(b(l(a)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
1071
1086
  ]),
1072
1087
  _: 1
1073
- })
1088
+ }, 8, ["modelValue", "selected-value"])
1074
1089
  ])),
1075
- d(Ie, { name: "slide-fade" }, {
1090
+ y.value === "protocol" || H.value ? (S(), U("div", Ut, [
1091
+ d(h, {
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: he,
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) => z(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
+ Q.value ? (S(), U("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 = W(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
+ }, {
1076
1163
  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),
1164
+ k("div", Mt, [
1165
+ k("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 = W(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
+ k("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 = W(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
+ k("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 = W(e.fields.write_timeout + "");
1214
+ })
1215
+ ],
1216
+ autocomplete: "off",
1217
+ "data-testid": "gateway-service-writeTimeout-input",
1218
+ label: l(a)("gateway_services.form.fields.write_timeout.label"),
1219
+ "label-attributes": {
1220
+ info: l(a)("gateway_services.form.fields.write_timeout.tooltip"),
1221
+ tooltipAttributes: { maxWidth: "400" }
1222
+ },
1223
+ name: "writeTimeout",
1224
+ readonly: e.isReadonly,
1225
+ type: "number"
1226
+ }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1227
+ ]),
1228
+ k("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 = W(e.fields.read_timeout + "");
1235
+ })
1236
+ ],
1237
+ autocomplete: "off",
1238
+ "data-testid": "gateway-service-readTimeout-input",
1239
+ label: l(a)("gateway_services.form.fields.read_timeout.label"),
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
+ we.value ? (S(), U("div", Bt, [
1250
+ d(v, {
1251
+ modelValue: e.fields.client_certificate,
1252
+ "onUpdate:modelValue": i[19] || (i[19] = (s) => e.fields.client_certificate = s),
1112
1253
  modelModifiers: { trim: !0 },
1113
- class: "gateway-service-form-margin-top",
1114
- "data-testid": "gateway-service-path-input",
1115
- label: o(r)("gateway_services.form.fields.path.label"),
1254
+ autocomplete: "off",
1255
+ "data-testid": "gateway-service-clientCert-input",
1256
+ label: l(a)("gateway_services.form.fields.client_certificate.label"),
1116
1257
  "label-attributes": {
1117
- info: o(r)("gateway_services.form.fields.path.tooltip"),
1258
+ info: l(a)("gateway_services.form.fields.client_certificate.tooltip"),
1118
1259
  tooltipAttributes: { maxWidth: "400" }
1119
1260
  },
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"
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
+ ae.value ? (S(), U("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(q), {
1282
+ keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1283
+ scope: "global"
1271
1284
  }, {
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
- })
1285
+ code1: f(() => [
1286
+ k("code", null, b(l(a)("gateway_services.form.fields.ca_certificates.code1")), 1)
1287
+ ]),
1288
+ code2: f(() => [
1289
+ k("code", null, b(l(a)("gateway_services.form.fields.ca_certificates.code2")), 1)
1285
1290
  ]),
1286
1291
  _: 1
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" } }
1292
+ })
1293
+ ]),
1294
+ _: 1
1295
+ }, 8, ["modelValue", "label", "placeholder", "readonly"])
1296
+ ])) : L("", !0),
1297
+ ke.value ? (S(), U("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(q), {
1308
+ keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1309
+ scope: "global"
1297
1310
  }, {
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
- })
1311
+ code1: f(() => [
1312
+ k("code", null, b(l(a)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1308
1313
  ]),
1309
1314
  _: 1
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
- })
1334
- ]),
1335
- _: 1
1336
- }, 8, ["modelValue", "trigger-label"])
1337
- ]),
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"])
1315
+ })
1316
+ ]),
1317
+ _: 1
1318
+ }, 8, ["modelValue", "description", "label"]),
1319
+ e.fields.tls_verify_enabled ? (S(), U("div", Kt, [
1320
+ d(V, {
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 ? (S(), U("div", Gt, [
1329
+ d(V, {
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)
1389
1338
  ])
1390
1339
  ]),
1391
1340
  _: 1
1392
- }, 8, ["trigger-label"])
1341
+ }, 8, ["modelValue", "trigger-label"])
1393
1342
  ]),
1394
1343
  _: 1
1395
1344
  }, 8, ["description", "hide-info-header", "title"])
@@ -1399,14 +1348,14 @@ const me = {
1399
1348
  ]);
1400
1349
  };
1401
1350
  }
1402
- }), Xt = /* @__PURE__ */ Be(Ot, [["__scopeId", "data-v-c056f1f7"]]), Gt = { class: "kong-ui-gateway-service-entity-config-card" }, Zt = /* @__PURE__ */ Pe({
1351
+ }), Qt = /* @__PURE__ */ Fe(qt, [["__scopeId", "data-v-35e0db56"]]), Ot = { class: "kong-ui-gateway-service-entity-config-card" }, Xt = /* @__PURE__ */ Te({
1403
1352
  __name: "GatewayServiceConfigCard",
1404
1353
  props: {
1405
1354
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
1406
1355
  config: {
1407
1356
  type: Object,
1408
1357
  required: !0,
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)
1358
+ validator: (n) => !(!n || !["konnect", "kongManager"].includes(n == null ? void 0 : n.app) || n.app === "konnect" && !n.controlPlaneId || n.app === "kongManager" && typeof n.workspace != "string" || !n.entityId)
1410
1359
  },
1411
1360
  /**
1412
1361
  * External link for documentation that determines visibility of Documentation button
@@ -1425,8 +1374,8 @@ const me = {
1425
1374
  }
1426
1375
  },
1427
1376
  emits: ["loading", "fetch:error", "fetch:success"],
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({
1377
+ setup(n) {
1378
+ const D = n, { i18n: { t: p }, i18nT: c } = ve.useI18n(), r = _(() => se.form[D.config.app].edit), { getPropValue: $ } = rt(), N = (a, P) => $(a, P) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), q = E({
1430
1379
  id: {},
1431
1380
  name: {
1432
1381
  tooltip: p("gateway_services.form.fields.name.tooltip")
@@ -1435,19 +1384,19 @@ const me = {
1435
1384
  updated_at: {},
1436
1385
  created_at: {},
1437
1386
  protocol: {
1438
- section: ue.Basic,
1387
+ section: fe.Basic,
1439
1388
  tooltip: p("gateway_services.form.fields.protocol.tooltip")
1440
1389
  },
1441
1390
  host: {
1442
- section: ue.Basic,
1391
+ section: fe.Basic,
1443
1392
  tooltip: p("gateway_services.form.fields.host.tooltip")
1444
1393
  },
1445
1394
  path: {
1446
- section: ue.Basic,
1395
+ section: fe.Basic,
1447
1396
  tooltip: p("gateway_services.form.fields.path.tooltip")
1448
1397
  },
1449
1398
  port: {
1450
- section: ue.Basic,
1399
+ section: fe.Basic,
1451
1400
  tooltip: p("gateway_services.form.fields.port.tooltip")
1452
1401
  },
1453
1402
  tags: {
@@ -1475,7 +1424,7 @@ const me = {
1475
1424
  tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
1476
1425
  },
1477
1426
  ca_certificates: {
1478
- type: nt.BadgeTag,
1427
+ type: at.BadgeTag,
1479
1428
  label: p("gateway_services.form.fields.ca_certificates.label"),
1480
1429
  order: 6
1481
1430
  },
@@ -1486,62 +1435,62 @@ const me = {
1486
1435
  hidden: !0
1487
1436
  }
1488
1437
  });
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))
1438
+ return (a, P) => (S(), U("div", Ot, [
1439
+ d(l(nt), {
1440
+ config: n.config,
1441
+ "config-card-doc": n.configCardDoc,
1442
+ "config-schema": q.value,
1443
+ "entity-type": l(Ae).GatewayService,
1444
+ "fetch-url": r.value,
1445
+ "hide-title": n.hideTitle,
1446
+ "onFetch:error": P[0] || (P[0] = (C) => a.$emit("fetch:error", C)),
1447
+ "onFetch:success": P[1] || (P[1] = (C) => a.$emit("fetch:success", C)),
1448
+ onLoading: P[2] || (P[2] = (C) => a.$emit("loading", C))
1500
1449
  }, {
1501
1450
  "enabled-label-tooltip": f(() => [
1502
- d(o(u), {
1451
+ d(l(c), {
1503
1452
  keypath: "gateway_services.form.fields.enabled.tooltip",
1504
1453
  scope: "global"
1505
1454
  }, {
1506
1455
  false: f(() => [
1507
- C("code", null, V(o(p)("gateway_services.form.fields.enabled.false")), 1)
1456
+ k("code", null, b(l(p)("gateway_services.form.fields.enabled.false")), 1)
1508
1457
  ]),
1509
1458
  true: f(() => [
1510
- C("code", null, V(o(p)("gateway_services.form.fields.enabled.true")), 1)
1459
+ k("code", null, b(l(p)("gateway_services.form.fields.enabled.true")), 1)
1511
1460
  ]),
1512
1461
  _: 1
1513
1462
  })
1514
1463
  ]),
1515
1464
  "ca_certificates-label-tooltip": f(() => [
1516
- d(o(u), {
1465
+ d(l(c), {
1517
1466
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1518
1467
  scope: "global"
1519
1468
  }, {
1520
1469
  code1: f(() => [
1521
- C("code", null, V(o(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
1470
+ k("code", null, b(l(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
1522
1471
  ]),
1523
1472
  code2: f(() => [
1524
- C("code", null, V(o(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
1473
+ k("code", null, b(l(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
1525
1474
  ]),
1526
1475
  _: 1
1527
1476
  })
1528
1477
  ]),
1529
1478
  "tls_verify-label-tooltip": f(() => [
1530
- d(o(u), {
1479
+ d(l(c), {
1531
1480
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1532
1481
  scope: "global"
1533
1482
  }, {
1534
1483
  code1: f(() => [
1535
- C("code", null, V(o(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1484
+ k("code", null, b(l(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1536
1485
  ]),
1537
1486
  _: 1
1538
1487
  })
1539
1488
  ]),
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)
1489
+ tls_verify: f((C) => [
1490
+ M(b(typeof l($)("rowValue", C) == "boolean" ? N("rowValue", C) : l(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
1542
1491
  ]),
1543
- client_certificate: f((w) => [
1544
- F(V(o(U)("rowValue", w) ? o(U)("rowValue", w).id : "–"), 1)
1492
+ client_certificate: f((C) => [
1493
+ M(b(l($)("rowValue", C) ? l($)("rowValue", C).id : "–"), 1)
1545
1494
  ]),
1546
1495
  _: 1
1547
1496
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
@@ -1549,7 +1498,7 @@ const me = {
1549
1498
  }
1550
1499
  });
1551
1500
  export {
1552
- Zt as GatewayServiceConfigCard,
1553
- Xt as GatewayServiceForm,
1554
- Qt as GatewayServiceList
1501
+ Xt as GatewayServiceConfigCard,
1502
+ Qt as GatewayServiceForm,
1503
+ Jt as GatewayServiceList
1555
1504
  };