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

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