@kong-ui-public/entities-gateway-services 3.10.8-pr.2001.615c9eb14.0 → 3.10.8-pr.2038.28ab0bdf7.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 Le, computed as k, ref as q, watch as Ue, onBeforeMount as it, resolveComponent as G, openBlock as S, createElementBlock as U, createVNode as u, unref as l, createSlots as Re, withCtx as v, createBlock as $e, Teleport as ze, createElementVNode as I, createCommentVNode as B, createTextVNode as J, toDisplayString as E, withModifiers as We, reactive as Me, onMounted as Qe, renderSlot as Xe, toValue as He, Transition as De, Fragment as rt, renderList as st } from "vue";
2
- import { useRouter as Ge } from "vue-router";
3
- import { BookIcon as Ze, AddIcon as at, ServicesIcon as nt } from "@kong/icons";
4
- import { createI18n as ct, i18nTComponent as ut } from "@kong-ui-public/i18n";
5
- import { useAxios as Oe, useTableState as dt, useFetcher as ft, useDeleteUrlBuilder as pt, FetcherStatus as mt, EntityBaseTable as vt, EntityFilter as gt, PermissionsWrapper as Fe, TableTags as yt, EntityEmptyState as _t, EntityToggleModal as bt, EntityDeleteModal as ht, EntityTypes as wt, useErrors as Ye, useValidators as et, EntityBaseFormType as Be, useGatewayFeatureSupported as tt, EntityBaseForm as lt, SupportedEntityType as Ne, EntityFormSection as Ke, useHelpers as ot, ConfigurationSchemaSection as Ae, ConfigurationSchemaType as kt, EntityBaseConfigCard as Vt } from "@kong-ui-public/entities-shared";
6
- const Ct = {
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 D, 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 Ct = {
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
- }, St = {
19
+ }, dt = {
20
20
  placeholder: {
21
21
  konnect: "Filter by name",
22
22
  kongManager: "Filter by exact name or ID"
23
23
  }
24
- }, It = {
24
+ }, ut = {
25
25
  title: "Gateway Services",
26
26
  list: {
27
27
  toolbar_actions: {
@@ -53,56 +53,24 @@ const Ct = {
53
53
  description: "Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."
54
54
  },
55
55
  form: {
56
- buttons: {
57
- try_sample: "Try sample API"
58
- },
59
- errors: {
60
- host: {
61
- empty: "Host cannot be empty",
62
- invalid: "Invalid host"
63
- },
64
- port: {
65
- type: "Port must be a number",
66
- invalid: "Port must be between 0 and 65535"
67
- },
68
- path: {
69
- prefix: "Path must begin with /",
70
- invalid: "Path should not include characters outside of the reserved list of RFC 3986"
71
- },
72
- protocol: {
73
- empty: "Protocol cannot be empty",
74
- invalid: "Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"
75
- },
76
- url: {
77
- invalid: "The URL must follow a valid format. Example: https://api.kong-air.com/flights"
78
- }
79
- },
80
56
  sections: {
81
57
  general: {
82
58
  title: "General Information",
83
- 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."
84
60
  },
85
61
  keys: {
86
- title: "Service endpoint",
87
- description: "Define where this service should send requests.",
62
+ title: "Service Endpoint",
63
+ description: "Define the endpoint for this service by specifying the full URL or by its separate elements.",
88
64
  checkedGroupLabel: "Choose how and where to send traffic",
89
65
  urlLabel: "Full URL",
90
- checkedGroupAltLabel: "Protocol, host, port and path",
91
- url: {
92
- label: "Full URL",
93
- description: "Define the service using a single, complete API URL for simple setup."
94
- },
95
- protocol: {
96
- label: "Protocol, host, port, and path",
97
- description: "Manually specify each component of the API’s URL for advanced configurations."
98
- },
99
- viewAdvancedFields: "View advanced fields"
66
+ checkedGroupAltLabel: "Protocol, Host, Port and Path",
67
+ viewAdvancedFields: "View Advanced Fields"
100
68
  }
101
69
  },
102
70
  fields: {
103
71
  upstream_url: {
104
- label: "Full URL",
105
- placeholder: "e.g. https://www.myapi.com/",
72
+ label: "Upstream URL",
73
+ placeholder: "Enter a URL",
106
74
  tooltip_for_konnect: "This is the URL of the API you will manage in Konnect.",
107
75
  tooltip_for_km: "This is the URL of the API you will manage in Kong Gateway."
108
76
  },
@@ -129,12 +97,12 @@ const Ct = {
129
97
  },
130
98
  host: {
131
99
  label: "Host",
132
- placeholder: "e.g. www.myapi.com, 127.0.0.1",
100
+ placeholder: "Enter a host",
133
101
  tooltip: "The host of the upstream server. Note that the host value is case sensitive."
134
102
  },
135
103
  path: {
136
104
  label: "Path",
137
- placeholder: "e.g. /sample",
105
+ placeholder: "Enter a path",
138
106
  tooltip: "The path to be used in request to the upstream server."
139
107
  },
140
108
  port: {
@@ -146,31 +114,31 @@ const Ct = {
146
114
  tooltip: "The number of retries to execute upon failure to proxy."
147
115
  },
148
116
  connect_timeout: {
149
- label: "Connection timeout",
117
+ label: "Connection Timeout",
150
118
  tooltip: "The timeout in milliseconds for establishing a connection to the upstream server."
151
119
  },
152
120
  write_timeout: {
153
- label: "Write timeout",
121
+ label: "Write Timeout",
154
122
  tooltip: "The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."
155
123
  },
156
124
  read_timeout: {
157
- label: "Read timeout",
125
+ label: "Read Timeout",
158
126
  tooltip: "The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."
159
127
  },
160
128
  client_certificate: {
161
- label: "Client certificate",
129
+ label: "Client Certificate",
162
130
  placeholder: "Enter a Certificate ID",
163
131
  tooltip: "Certificate to be used as client certificate while TLS handshaking to the upstream server."
164
132
  },
165
133
  ca_certificates: {
166
- label: "CA certificates",
134
+ label: "CA Certificates",
167
135
  placeholder: "Enter a comma separated list of CA Certificate IDs",
168
136
  tooltip: "Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",
169
137
  code1: "CA Certificate",
170
138
  code2: "null"
171
139
  },
172
140
  tls_verify_enabled: {
173
- label: "TLS verify",
141
+ label: "TLS Verify",
174
142
  help: "If unchecked, use default system setting",
175
143
  tooltip: "Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",
176
144
  code1: "null"
@@ -192,8 +160,7 @@ const Ct = {
192
160
  label: "Tags",
193
161
  tooltip: "An optional set of strings associated with the Service for grouping and filtering.",
194
162
  placeholder: "Enter a list of tags separated by comma",
195
- help: "e.g. tag1, tag2, tag3",
196
- collapse: "Add tags"
163
+ help: "e.g. tag1, tag2, tag3"
197
164
  },
198
165
  enabled: {
199
166
  label: "Enabled",
@@ -203,39 +170,39 @@ const Ct = {
203
170
  }
204
171
  }
205
172
  }
206
- }, Pt = {
173
+ }, ft = {
207
174
  general: "Gateway Services could not be retrieved",
208
175
  delete: "The gateway service could not be deleted at this time.",
209
176
  copy: "Failed to copy to clipboard",
210
177
  urlErrorMessage: "Error: invalid URL"
211
- }, Et = {
178
+ }, pt = {
212
179
  success: "Copied {val} to clipboard",
213
180
  success_brief: "Successfully copied to clipboard"
214
- }, Ft = {
181
+ }, mt = {
215
182
  gateway_services: "gateway services"
216
- }, $t = {
217
- actions: Ct,
218
- search: St,
219
- gateway_services: It,
220
- errors: Pt,
221
- copy: Et,
222
- glossary: Ft
183
+ }, vt = {
184
+ actions: ct,
185
+ search: dt,
186
+ gateway_services: ut,
187
+ errors: ft,
188
+ copy: pt,
189
+ glossary: mt
223
190
  };
224
- function Ut() {
225
- const n = ct("en-us", $t);
191
+ function gt() {
192
+ const n = Oe("en-us", vt);
226
193
  return {
227
194
  i18n: n,
228
- i18nT: ut(n)
195
+ i18nT: Ne(n)
229
196
  // Translation component <i18n-t>
230
197
  };
231
198
  }
232
- function At() {
199
+ function yt() {
233
200
  return {
234
- getPortFromProtocol: (K, y) => {
235
- const p = [80, 443], s = Number(y);
236
- if ((s || s === 0) && !p.includes(s))
237
- return s;
238
- switch (K) {
201
+ getPortFromProtocol: (G, p) => {
202
+ const c = [80, 443], r = Number(p);
203
+ if ((r || r === 0) && !c.includes(r))
204
+ return r;
205
+ switch (G) {
239
206
  case "grpcs":
240
207
  case "tls":
241
208
  case "https":
@@ -251,52 +218,31 @@ function At() {
251
218
  }
252
219
  };
253
220
  }
254
- function xt() {
255
- const { i18n: { t: n } } = me.useI18n();
256
- return {
257
- validateHost: (b) => {
258
- if (!b || b.trim() === "") return n("gateway_services.form.errors.host.empty");
259
- const M = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;
260
- return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(b) || M.test(b) ? "" : n("gateway_services.form.errors.host.invalid");
261
- },
262
- validateProtocol: (b, M) => !b || b.trim() === "" ? n("gateway_services.form.errors.protocol.empty") : (b = b.slice(0, -1), M.find((r) => {
263
- if (r.value === b) return r;
264
- }) === void 0 ? n("gateway_services.form.errors.protocol.invalid") : ""),
265
- validatePath: (b) => !b || b === "" ? "" : b.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(b) ? n("gateway_services.form.errors.path.invalid") : "" : n("gateway_services.form.errors.path.prefix"),
266
- validatePort: (b) => {
267
- if (b == null || b === "")
268
- return "";
269
- const M = typeof b == "string" ? parseInt(b, 10) : b;
270
- return isNaN(M) ? n("gateway_services.form.errors.port.type") : M < 0 || M > 65535 ? n("gateway_services.form.errors.port.invalid") : "";
271
- }
272
- };
273
- }
274
- const me = {
275
- useI18n: Ut,
276
- usePortFromProtocol: At,
277
- useUrlValidators: xt
278
- }, xe = "/v2/control-planes/{controlPlaneId}/core-entities", Te = "/{workspace}", ve = {
221
+ const ve = {
222
+ useI18n: gt,
223
+ usePortFromProtocol: yt
224
+ }, pe = "/v2/control-planes/{controlPlaneId}/core-entities", me = "/{workspace}", se = {
279
225
  list: {
280
226
  konnect: {
281
- all: `${xe}/services`
227
+ all: `${pe}/services`
282
228
  },
283
229
  kongManager: {
284
- all: `${Te}/services`
230
+ all: `${me}/services`
285
231
  }
286
232
  },
287
233
  form: {
288
234
  konnect: {
289
- create: `${xe}/services`,
290
- validate: `${xe}/v1/schemas/json/service/validate`,
291
- edit: `${xe}/services/{id}`
235
+ create: `${pe}/services`,
236
+ validate: `${pe}/v1/schemas/json/service/validate`,
237
+ edit: `${pe}/services/{id}`
292
238
  },
293
239
  kongManager: {
294
- create: `${Te}/services`,
295
- validate: `${Te}/schemas/services/validate`,
296
- edit: `${Te}/services/{id}`
240
+ create: `${me}/services`,
241
+ validate: `${me}/schemas/services/validate`,
242
+ edit: `${me}/services/{id}`
297
243
  }
298
244
  }
299
- }, Tt = "#00abd2", Rt = "24px", Mt = { class: "kong-ui-entities-gateway-services-list" }, Bt = { class: "button-row" }, Kt = { class: "empty-state-icon-gateway" }, Lt = { key: 1 }, Wt = /* @__PURE__ */ Le({
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({
300
246
  __name: "GatewayServiceList",
301
247
  props: {
302
248
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -354,211 +300,211 @@ const me = {
354
300
  }
355
301
  },
356
302
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
357
- setup(n, { emit: K }) {
358
- var c;
359
- const y = K, p = n, { i18n: { t: s, formatUnixTimeStamp: b } } = me.useI18n(), M = Ge(), { axiosInstance: Q } = Oe((c = p.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: D } = dt(() => z.value), P = k(() => r.value && p.config.app === "konnect"), ie = k(() => !p.enableV2EmptyStates && p.config.app === "konnect"), ne = k(() => p.config.app !== "kongManager" || !!p.config.disableSorting), Y = {
303
+ setup(n, { emit: G }) {
304
+ var l;
305
+ const p = G, 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(() => B.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 = {
360
306
  // the Name column is non-hidable
361
- name: { label: s("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
362
- ...p.config.showControlPlaneColumn ? { control_plane: { label: s("gateway_services.list.table_headers.control_plane") } } : {},
363
- protocol: { label: s("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
364
- host: { label: s("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
365
- port: { label: s("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
366
- path: { label: s("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
367
- enabled: { label: s("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
368
- tags: { label: s("gateway_services.list.table_headers.tags"), sortable: !1 },
369
- updated_at: { label: s("gateway_services.list.table_headers.updated_at"), sortable: !0 },
370
- created_at: { label: s("gateway_services.list.table_headers.created_at"), sortable: !0 }
371
- }, we = {
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 = {
372
318
  columnVisibility: {
373
319
  created_at: !1
374
320
  }
375
- }, ce = Y, x = k(() => {
376
- var m, C;
377
- let g = `${p.config.apiBaseUrl}${ve.list[p.config.app].all}`;
378
- return p.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((m = p.config) == null ? void 0 : m.controlPlaneId) || "") : p.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (C = p.config) != null && C.workspace ? `/${p.config.workspace}` : "")), g;
379
- }), ge = k(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${x.value}`) : new URL(x.value)), z = q(""), Ie = k(() => {
380
- const g = p.config.app === "konnect" || p.config.isExactMatch;
381
- if (g)
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)), B = E(""), be = b(() => {
326
+ const u = c.config.app === "konnect" || c.config.isExactMatch;
327
+ if (u)
382
328
  return {
383
- isExactMatch: g,
384
- placeholder: s(`search.placeholder.${p.config.app}`)
329
+ isExactMatch: u,
330
+ placeholder: r(`search.placeholder.${c.config.app}`)
385
331
  };
386
- const { name: m, enabled: C, protocol: W, host: fe, port: N, path: pe } = Y;
332
+ const { name: s, enabled: g, protocol: I, host: Z, port: A, path: de } = O;
387
333
  return {
388
- isExactMatch: g,
389
- fields: { name: m, enabled: C, protocol: W, host: fe, port: N, path: pe },
390
- schema: p.config.filterSchema
334
+ isExactMatch: u,
335
+ fields: { name: s, enabled: g, protocol: I, host: Z, port: A, path: de },
336
+ schema: c.config.filterSchema
391
337
  };
392
338
  }), {
393
- fetcher: o,
339
+ fetcher: e,
394
340
  fetcherState: w,
395
- fetcherCacheKey: re
396
- } = ft({ ...p.config, cacheIdentifier: p.cacheIdentifier }, x.value), ye = () => {
397
- z.value = "";
398
- }, ke = () => {
399
- re.value++;
400
- }, e = q(null), A = k(() => ({
401
- ctaPath: p.config.createRoute,
402
- ctaText: T.value ? p.isServerless ? s("actions.serverless_create") : s("actions.create") : void 0,
403
- message: `${s("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState ? ` ${p.config.additionMessageForEmptyState}` : ""}`,
404
- title: T.value ? p.isServerless ? s("gateway_services.list.empty_state.serverless_title") : s("gateway_services.list.empty_state.title") : s("gateway_services.title")
405
- })), ue = q(!1), O = q(null), se = k(() => {
406
- const g = {
341
+ fetcherCacheKey: ee
342
+ } = je({ ...c.config, cacheIdentifier: c.cacheIdentifier }, _.value), he = () => {
343
+ B.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 = {
407
353
  action: "disable",
408
354
  id: "",
409
355
  name: ""
410
356
  };
411
- if (O.value) {
412
- const { enabled: m, id: C, name: W } = O.value;
413
- g.action = m ? "disable" : "enable", g.id = C, g.name = W || C;
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;
414
360
  }
415
- return g;
416
- }), Pe = (g) => {
417
- ue.value = !0, O.value = g;
418
- }, oe = () => {
419
- ue.value = !1, O.value = null;
420
- }, Ve = async () => {
421
- var W, fe;
422
- if (!await ((W = p.canEdit) == null ? void 0 : W.call(p, O.value)) || !O.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)
423
369
  return;
424
- const m = `${ge.value.href}/${O.value.id}`, C = !O.value.enabled;
370
+ const s = `${Y.value.href}/${T.value.id}`, g = !T.value.enabled;
425
371
  try {
426
- const { data: N } = ((fe = p.config) == null ? void 0 : fe.app) === "konnect" ? await Q.put(m, { ...O.value, enabled: C }) : await Q.patch(m, { ...O.value, enabled: C });
427
- y("toggle:success", N), O.value.enabled = C;
428
- } catch (N) {
429
- y("error", N);
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);
430
376
  }
431
- }, Ce = (g) => {
432
- p.config.getControlPlaneRoute && M.push(p.config.getControlPlaneRoute(g));
433
- }, de = (g, m) => {
434
- const C = g.id;
435
- if (!m(C)) {
436
- y("copy:error", {
437
- entity: g,
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)) {
382
+ p("copy:error", {
383
+ entity: u,
438
384
  field: "id",
439
- message: s("errors.copy")
385
+ message: r("errors.copy")
440
386
  });
441
387
  return;
442
388
  }
443
- y("copy:success", {
444
- entity: g,
389
+ p("copy:success", {
390
+ entity: u,
445
391
  field: "id",
446
- message: s("copy.success", { val: C })
392
+ message: r("copy.success", { val: g })
447
393
  });
448
- }, _e = (g, m) => {
449
- const C = JSON.stringify(g);
450
- if (!m(C)) {
451
- y("copy:error", {
452
- entity: g,
453
- message: s("errors.copy")
394
+ }, ne = (u, s) => {
395
+ const g = JSON.stringify(u);
396
+ if (!s(g)) {
397
+ p("copy:error", {
398
+ entity: u,
399
+ message: r("errors.copy")
454
400
  });
455
401
  return;
456
402
  }
457
- y("copy:success", {
458
- entity: g,
459
- message: s("copy.success_brief")
403
+ p("copy:success", {
404
+ entity: u,
405
+ message: r("copy.success_brief")
460
406
  });
461
- }, be = async (g) => {
462
- var C;
463
- await ((C = p.canRetrieve) == null ? void 0 : C.call(p, g)) && M.push(p.config.getViewRoute(g.id));
464
- }, Ee = (g) => ({
465
- label: s("actions.view"),
466
- to: p.config.getViewRoute(g)
467
- }), ee = (g) => ({
468
- label: s("actions.edit"),
469
- to: p.config.getEditRoute(g)
470
- }), H = q(void 0), Z = q(!1), te = q(!1), ae = q(""), i = pt(p.config, x.value), d = (g) => {
471
- H.value = g, Z.value = !0, ae.value = "";
472
- }, V = () => {
473
- Z.value = !1, H.value = void 0;
474
- }, X = async () => {
475
- var g, m, C;
476
- if ((g = H.value) != null && g.id) {
477
- te.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
+ }), L = E(void 0), K = E(!1), j = E(!1), X = E(""), t = He(c.config, _.value), i = (u) => {
417
+ L.value = u, K.value = !0, X.value = "";
418
+ }, v = () => {
419
+ K.value = !1, L.value = void 0;
420
+ }, M = async () => {
421
+ var u, s, g;
422
+ if ((u = L.value) != null && u.id) {
423
+ j.value = !0;
478
424
  try {
479
- await Q.delete(i(H.value.id)), y("delete:success", H.value), V(), re.value++;
480
- } catch (W) {
481
- ae.value = ((C = (m = W.response) == null ? void 0 : m.data) == null ? void 0 : C.message) || W.message || s("errors.delete"), y("error", W);
425
+ await q.delete(t(L.value.id)), p("delete:success", L.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);
482
428
  } finally {
483
- te.value = !1;
429
+ j.value = !1;
484
430
  }
485
431
  }
486
- }, L = () => {
487
- M.push(p.config.createRoute);
432
+ }, V = () => {
433
+ N.push(c.config.createRoute);
488
434
  };
489
- Ue(w, (g) => {
490
- var m, C, W;
491
- if (g.status === mt.Error) {
492
- e.value = {
493
- title: s("errors.general")
494
- }, (W = (C = (m = g.error) == null ? void 0 : m.response) == null ? void 0 : C.data) != null && W.message && (e.value.message = g.error.response.data.message), y("error", g.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);
495
441
  return;
496
442
  }
497
- e.value = null;
443
+ J.value = null;
498
444
  });
499
- const T = q(!1);
500
- return it(async () => {
501
- T.value = await p.canCreate();
502
- }), (g, m) => {
503
- const C = G("KButton"), W = G("KBadge"), fe = G("KInputSwitch"), N = G("KDropdownItem"), pe = G("KClipboardProvider");
504
- return S(), U("div", Mt, [
505
- u(l(vt), {
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), {
506
452
  "cache-identifier": n.cacheIdentifier,
507
- "default-table-preferences": we,
508
- "disable-sorting": ne.value,
509
- "empty-state-options": A.value,
453
+ "default-table-preferences": _e,
454
+ "disable-sorting": ye.value,
455
+ "empty-state-options": W.value,
510
456
  "enable-entity-actions": "",
511
- "error-message": e.value,
512
- fetcher: l(o),
513
- "fetcher-cache-key": l(re),
457
+ "error-message": J.value,
458
+ fetcher: o(e),
459
+ "fetcher-cache-key": o(ee),
514
460
  "pagination-type": "offset",
515
461
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
516
- query: z.value,
517
- "table-headers": l(ce),
518
- onClearSearchInput: ye,
519
- "onClick:row": m[5] || (m[5] = (h) => be(h)),
520
- onSort: ke,
521
- onState: l(D)
522
- }, Re({
523
- "toolbar-filter": v(() => [
524
- u(l(gt), {
525
- modelValue: z.value,
526
- "onUpdate:modelValue": m[0] || (m[0] = (h) => z.value = h),
527
- config: Ie.value
462
+ query: B.value,
463
+ "table-headers": o(H),
464
+ onClearSearchInput: he,
465
+ "onClick:row": s[5] || (s[5] = (m) => ce(m)),
466
+ onSort: re,
467
+ onState: o(P)
468
+ }, Ee({
469
+ "toolbar-filter": f(() => [
470
+ d(o(Qe), {
471
+ modelValue: B.value,
472
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => B.value = m),
473
+ config: be.value
528
474
  }, null, 8, ["modelValue", "config"])
529
475
  ]),
530
- "toolbar-button": v(() => [
531
- (S(), $e(ze, {
476
+ "toolbar-button": f(() => [
477
+ (S(), ue(Pe, {
532
478
  disabled: !n.useActionOutside,
533
479
  to: "#kong-ui-app-page-header-action-button"
534
480
  }, [
535
- I("div", Bt, [
536
- P.value ? (S(), $e(C, {
481
+ k("div", wt, [
482
+ C.value ? (S(), ue(g, {
537
483
  key: 0,
538
484
  appearance: "secondary",
539
485
  class: "open-learning-hub",
540
486
  "data-testid": "gateway-services-learn-more-button",
541
487
  icon: "",
542
- onClick: m[1] || (m[1] = (h) => g.$emit("click:learn-more"))
488
+ onClick: s[1] || (s[1] = (m) => u.$emit("click:learn-more"))
543
489
  }, {
544
- default: v(() => [
545
- u(l(Ze), { decorative: "" })
490
+ default: f(() => [
491
+ d(o(Re), { decorative: "" })
546
492
  ]),
547
493
  _: 1
548
- })) : B("", !0),
549
- u(l(Fe), {
494
+ })) : D("", !0),
495
+ d(o(ie), {
550
496
  "auth-function": () => n.canCreate()
551
497
  }, {
552
- default: v(() => [
553
- u(C, {
498
+ default: f(() => [
499
+ d(g, {
554
500
  appearance: "primary",
555
501
  "data-testid": "toolbar-add-gateway-service",
556
502
  size: n.useActionOutside ? "medium" : "large",
557
503
  to: n.config.createRoute
558
504
  }, {
559
- default: v(() => [
560
- u(l(at)),
561
- J(" " + E(l(s)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
505
+ default: f(() => [
506
+ d(o(Ke)),
507
+ R(" " + y(o(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
562
508
  ]),
563
509
  _: 1
564
510
  }, 8, ["size", "to"])
@@ -568,120 +514,120 @@ const me = {
568
514
  ])
569
515
  ], 8, ["disabled"]))
570
516
  ]),
571
- name: v(({ rowValue: h }) => [
572
- I("b", null, E(h ?? "-"), 1)
517
+ name: f(({ rowValue: m }) => [
518
+ k("b", null, y(m ?? "-"), 1)
573
519
  ]),
574
- control_plane: v(({ row: h }) => {
575
- var t;
520
+ control_plane: f(({ row: m }) => {
521
+ var $;
576
522
  return [
577
- (t = h.x_meta) != null && t.cluster_id ? (S(), $e(W, {
523
+ ($ = m.x_meta) != null && $.cluster_id ? (S(), ue(I, {
578
524
  key: 0,
579
- tooltip: h.x_meta.cluster_id,
525
+ tooltip: m.x_meta.cluster_id,
580
526
  "truncation-tooltip": "",
581
- onClick: We((a) => Ce(h.x_meta.cluster_id), ["stop"])
527
+ onClick: Se((le) => Ce(m.x_meta.cluster_id), ["stop"])
582
528
  }, {
583
- default: v(() => [
584
- J(E(h.x_meta.cluster_id), 1)
529
+ default: f(() => [
530
+ R(y(m.x_meta.cluster_id), 1)
585
531
  ]),
586
532
  _: 2
587
- }, 1032, ["tooltip", "onClick"])) : (S(), U("b", Lt, "-"))
533
+ }, 1032, ["tooltip", "onClick"])) : (S(), U("b", Ct, "-"))
588
534
  ];
589
535
  }),
590
- enabled: v(({ row: h }) => [
591
- u(l(Fe), {
592
- "auth-function": () => n.canEdit(h),
536
+ enabled: f(({ row: m }) => [
537
+ d(o(ie), {
538
+ "auth-function": () => n.canEdit(m),
593
539
  "force-show": ""
594
540
  }, {
595
- default: v(({ isAllowed: t }) => [
596
- I("div", {
597
- onClick: m[4] || (m[4] = We(() => {
541
+ default: f(({ isAllowed: $ }) => [
542
+ k("div", {
543
+ onClick: s[4] || (s[4] = Se(() => {
598
544
  }, ["stop"]))
599
545
  }, [
600
- u(fe, {
601
- modelValue: h.enabled,
602
- "onUpdate:modelValue": (a) => h.enabled = a,
603
- "data-testid": `row-${h.id}-toggle-input`,
604
- disabled: !t,
605
- onClick: We((a) => Pe(h), ["prevent"])
546
+ d(Z, {
547
+ modelValue: m.enabled,
548
+ "onUpdate:modelValue": (le) => m.enabled = le,
549
+ "data-testid": `row-${m.id}-toggle-input`,
550
+ disabled: !$,
551
+ onClick: Se((le) => we(m), ["prevent"])
606
552
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
607
553
  ])
608
554
  ]),
609
555
  _: 2
610
556
  }, 1032, ["auth-function"])
611
557
  ]),
612
- tags: v(({ rowValue: h }) => [
613
- u(l(yt), { tags: h }, null, 8, ["tags"])
558
+ tags: f(({ rowValue: m }) => [
559
+ d(o(Xe), { tags: m }, null, 8, ["tags"])
614
560
  ]),
615
- created_at: v(({ rowValue: h }) => [
616
- J(E(l(b)(h)), 1)
561
+ created_at: f(({ rowValue: m }) => [
562
+ R(y(o(x)(m)), 1)
617
563
  ]),
618
- updated_at: v(({ row: h, rowValue: t }) => [
619
- J(E(l(b)(t ?? h.created_at)), 1)
564
+ updated_at: f(({ row: m, rowValue: $ }) => [
565
+ R(y(o(x)($ ?? m.created_at)), 1)
620
566
  ]),
621
- actions: v(({ row: h }) => [
622
- u(pe, null, {
623
- default: v(({ copyToClipboard: t }) => [
624
- u(N, {
567
+ actions: f(({ row: m }) => [
568
+ d(de, null, {
569
+ default: f(({ copyToClipboard: $ }) => [
570
+ d(A, {
625
571
  "data-testid": "action-entity-copy-id",
626
- onClick: (a) => de(h, t)
572
+ onClick: (le) => te(m, $)
627
573
  }, {
628
- default: v(() => [
629
- J(E(l(s)("actions.copy_id")), 1)
574
+ default: f(() => [
575
+ R(y(o(r)("actions.copy_id")), 1)
630
576
  ]),
631
577
  _: 2
632
578
  }, 1032, ["onClick"])
633
579
  ]),
634
580
  _: 2
635
581
  }, 1024),
636
- u(pe, null, {
637
- default: v(({ copyToClipboard: t }) => [
638
- u(N, {
582
+ d(de, null, {
583
+ default: f(({ copyToClipboard: $ }) => [
584
+ d(A, {
639
585
  "data-testid": "action-entity-copy-json",
640
- onClick: (a) => _e(h, t)
586
+ onClick: (le) => ne(m, $)
641
587
  }, {
642
- default: v(() => [
643
- J(E(l(s)("actions.copy_json")), 1)
588
+ default: f(() => [
589
+ R(y(o(r)("actions.copy_json")), 1)
644
590
  ]),
645
591
  _: 2
646
592
  }, 1032, ["onClick"])
647
593
  ]),
648
594
  _: 2
649
595
  }, 1024),
650
- u(l(Fe), {
651
- "auth-function": () => n.canRetrieve(h)
596
+ d(o(ie), {
597
+ "auth-function": () => n.canRetrieve(m)
652
598
  }, {
653
- default: v(() => [
654
- u(N, {
599
+ default: f(() => [
600
+ d(A, {
655
601
  "data-testid": "action-entity-view",
656
602
  "has-divider": "",
657
- item: Ee(h.id)
603
+ item: Ve(m.id)
658
604
  }, null, 8, ["item"])
659
605
  ]),
660
606
  _: 2
661
607
  }, 1032, ["auth-function"]),
662
- u(l(Fe), {
663
- "auth-function": () => n.canEdit(h)
608
+ d(o(ie), {
609
+ "auth-function": () => n.canEdit(m)
664
610
  }, {
665
- default: v(() => [
666
- u(N, {
611
+ default: f(() => [
612
+ d(A, {
667
613
  "data-testid": "action-entity-edit",
668
- item: ee(h.id)
614
+ item: oe(m.id)
669
615
  }, null, 8, ["item"])
670
616
  ]),
671
617
  _: 2
672
618
  }, 1032, ["auth-function"]),
673
- u(l(Fe), {
674
- "auth-function": () => n.canDelete(h)
619
+ d(o(ie), {
620
+ "auth-function": () => n.canDelete(m)
675
621
  }, {
676
- default: v(() => [
677
- u(N, {
622
+ default: f(() => [
623
+ d(A, {
678
624
  danger: "",
679
625
  "data-testid": "action-entity-delete",
680
626
  "has-divider": "",
681
- onClick: (t) => d(h)
627
+ onClick: ($) => i(m)
682
628
  }, {
683
- default: v(() => [
684
- J(E(l(s)("actions.delete.menu_label")), 1)
629
+ default: f(() => [
630
+ R(y(o(r)("actions.delete.menu_label")), 1)
685
631
  ]),
686
632
  _: 2
687
633
  }, 1032, ["onClick"])
@@ -691,22 +637,22 @@ const me = {
691
637
  ]),
692
638
  _: 2
693
639
  }, [
694
- !l(r) && ie.value ? {
640
+ !o(a) && ge.value ? {
695
641
  name: "outside-actions",
696
- fn: v(() => [
697
- (S(), $e(ze, {
642
+ fn: f(() => [
643
+ (S(), ue(Pe, {
698
644
  disabled: !n.useActionOutside,
699
645
  to: "#kong-ui-app-page-header-action-button"
700
646
  }, [
701
- u(C, {
647
+ d(g, {
702
648
  appearance: "secondary",
703
649
  class: "open-learning-hub",
704
650
  "data-testid": "gateway-services-more-button",
705
651
  icon: "",
706
- onClick: m[2] || (m[2] = (h) => g.$emit("click:learn-more"))
652
+ onClick: s[2] || (s[2] = (m) => u.$emit("click:learn-more"))
707
653
  }, {
708
- default: v(() => [
709
- u(l(Ze), { decorative: "" })
654
+ default: f(() => [
655
+ d(o(Re), { decorative: "" })
710
656
  ]),
711
657
  _: 1
712
658
  })
@@ -714,36 +660,36 @@ const me = {
714
660
  ]),
715
661
  key: "0"
716
662
  } : void 0,
717
- !z.value && n.enableV2EmptyStates && n.config.app === "konnect" ? {
663
+ !B.value && n.enableV2EmptyStates && n.config.app === "konnect" ? {
718
664
  name: "empty-state",
719
- fn: v(() => {
720
- var h;
665
+ fn: f(() => {
666
+ var m;
721
667
  return [
722
- u(l(_t), {
723
- "action-button-text": l(s)("gateway_services.empty_state_v2.create"),
668
+ d(o(Ze), {
669
+ "action-button-text": o(r)("gateway_services.empty_state_v2.create"),
724
670
  appearance: "secondary",
725
671
  "can-create": () => n.canCreate(),
726
672
  "data-testid": "gateway-services-entity-empty-state",
727
- description: l(s)("gateway_services.empty_state_v2.description"),
673
+ description: o(r)("gateway_services.empty_state_v2.description"),
728
674
  "learn-more": n.config.app === "konnect",
729
- title: l(s)("gateway_services.empty_state_v2.title"),
730
- "onClick:create": L,
731
- "onClick:learnMore": m[3] || (m[3] = (t) => g.$emit("click:learn-more"))
732
- }, Re({
733
- image: v(() => [
734
- I("div", Kt, [
735
- u(l(nt), {
736
- color: l(Tt),
737
- size: l(Rt)
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)
738
684
  }, null, 8, ["color", "size"])
739
685
  ])
740
686
  ]),
741
687
  _: 2
742
688
  }, [
743
- (h = n.config) != null && h.isControlPlaneGroup ? {
689
+ (m = n.config) != null && m.isControlPlaneGroup ? {
744
690
  name: "message",
745
- fn: v(() => [
746
- J(E(l(s)("gateway_services.empty_state_v2.group")), 1)
691
+ fn: f(() => [
692
+ R(y(o(r)("gateway_services.empty_state_v2.group")), 1)
747
693
  ]),
748
694
  key: "0"
749
695
  } : void 0
@@ -753,58 +699,58 @@ const me = {
753
699
  key: "1"
754
700
  } : void 0
755
701
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
756
- u(l(bt), {
757
- action: se.value.action,
758
- "entity-id": se.value.id,
759
- "entity-name": se.value.name,
760
- "entity-type": l(s)("glossary.gateway_services"),
761
- "on-confirm": Ve,
762
- visible: ue.value,
763
- onCancel: oe,
764
- onProceed: oe
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
765
711
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
766
- u(l(ht), {
767
- "action-pending": te.value,
768
- description: l(s)("actions.delete.description"),
769
- "entity-name": H.value && (H.value.name || H.value.id),
770
- "entity-type": l(wt).GatewayService,
771
- error: ae.value,
772
- title: l(s)("actions.delete.title"),
773
- visible: Z.value,
774
- onCancel: V,
775
- onProceed: X
712
+ d(o(et), {
713
+ "action-pending": j.value,
714
+ description: o(r)("actions.delete.description"),
715
+ "entity-name": L.value && (L.value.name || L.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
776
722
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
777
723
  ]);
778
724
  };
779
725
  }
780
- }), je = (n, K) => {
781
- const y = n.__vccOpts || n;
782
- for (const [p, s] of K)
783
- y[p] = s;
784
- return y;
785
- }, Al = /* @__PURE__ */ je(Wt, [["__scopeId", "data-v-3d11ac45"]]), Dt = { class: "kong-ui-entities-gateway-service-form" }, qt = { key: 0 }, Gt = { class: "gateway-service-form-traffic-label" }, Ot = { class: "gateway-service-form-margin-bottom" }, Nt = {
726
+ }), Be = (n, G) => {
727
+ const p = n.__vccOpts || n;
728
+ for (const [c, r] of G)
729
+ p[c] = r;
730
+ return p;
731
+ }, zt = /* @__PURE__ */ Be(Vt, [["__scopeId", "data-v-3d11ac45"]]), 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 = {
786
732
  key: 0,
787
733
  class: "gateway-service-form-group-fields"
788
- }, jt = {
734
+ }, Ut = {
789
735
  key: 1,
790
736
  class: "gateway-service-form-group-fields"
791
- }, zt = { key: 0 }, Ht = { class: "gateway-service-form-margin-top" }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = { class: "gateway-service-form-margin-bottom" }, Qt = { class: "gateway-service-form-margin-bottom" }, Xt = { class: "gateway-service-form-margin-bottom" }, Yt = {
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 = {
792
738
  key: 0,
793
739
  class: "gateway-service-form-margin-bottom"
794
- }, el = {
740
+ }, Lt = {
795
741
  key: 1,
796
742
  class: "gateway-service-form-margin-bottom"
797
- }, tl = {
743
+ }, Dt = {
798
744
  key: 2,
799
745
  class: "gateway-service-form-margin-bottom"
800
- }, ll = {
746
+ }, Gt = {
801
747
  key: 0,
802
748
  class: "checkbox-aligned-radio"
803
- }, ol = {
749
+ }, Kt = {
804
750
  key: 1,
805
751
  class: "checkbox-aligned-radio"
806
- }, il = /* @__PURE__ */ Le({
807
- __name: "LegacyGatewayServiceForm",
752
+ }, qt = /* @__PURE__ */ Te({
753
+ __name: "GatewayServiceForm",
808
754
  props: {
809
755
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
810
756
  config: {
@@ -826,9 +772,9 @@ const me = {
826
772
  }
827
773
  },
828
774
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
829
- setup(n, { expose: K, emit: y }) {
830
- var ae;
831
- const p = y, s = n, b = q(!0), M = Ge(), { i18nT: Q, i18n: { t: r } } = me.useI18n(), { getMessageFromError: D } = Ye(), { axiosInstance: P } = Oe((ae = s.config) == null ? void 0 : ae.axiosRequestConfig), ie = et(), ne = k(() => ve.form[s.config.app].edit), Y = k(() => s.gatewayServiceId ? Be.Edit : Be.Create), we = q(!1), ce = k(() => !!s.gatewayServiceId), x = q(ce.value ? "protocol" : "url"), ge = me.usePortFromProtocol(), z = q(""), Ie = k(() => !!z.value), o = Me({
775
+ setup(n, { expose: G, 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(), B = E(""), be = b(() => !!B.value), e = Ue({
832
778
  fields: {
833
779
  name: "",
834
780
  protocol: "http",
@@ -848,7 +794,7 @@ const me = {
848
794
  },
849
795
  isReadonly: !1,
850
796
  errorMessage: ""
851
- }), w = Me({
797
+ }), w = Ue({
852
798
  name: "",
853
799
  protocol: "http",
854
800
  host: "",
@@ -864,543 +810,543 @@ const me = {
864
810
  tls_verify_enabled: !1,
865
811
  tls_verify_value: !1,
866
812
  tags: ""
867
- }), re = s.config.app === "konnect" || tt({
868
- gatewayInfo: s.config.gatewayInfo,
813
+ }), ee = r.config.app === "konnect" || it({
814
+ gatewayInfo: r.config.gatewayInfo,
869
815
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
870
816
  supportedRange: {
871
817
  enterprise: ["3.0"]
872
818
  }
873
- }), ye = [
819
+ }), he = [
874
820
  {
875
- label: r("gateway_services.form.fields.protocol.options.http"),
821
+ label: a("gateway_services.form.fields.protocol.options.http"),
876
822
  value: "http",
877
823
  group: "http"
878
824
  },
879
825
  {
880
- label: r("gateway_services.form.fields.protocol.options.https"),
826
+ label: a("gateway_services.form.fields.protocol.options.https"),
881
827
  value: "https",
882
828
  group: "http"
883
829
  },
884
830
  {
885
- label: r("gateway_services.form.fields.protocol.options.tcp"),
831
+ label: a("gateway_services.form.fields.protocol.options.tcp"),
886
832
  value: "tcp",
887
833
  group: "tcp"
888
834
  },
889
835
  {
890
- label: r("gateway_services.form.fields.protocol.options.tls"),
836
+ label: a("gateway_services.form.fields.protocol.options.tls"),
891
837
  value: "tls",
892
838
  group: "tcp"
893
839
  },
894
840
  {
895
- label: r("gateway_services.form.fields.protocol.options.tls_passthrough"),
841
+ label: a("gateway_services.form.fields.protocol.options.tls_passthrough"),
896
842
  value: "tls_passthrough",
897
843
  group: "tcp"
898
844
  },
899
845
  {
900
- label: r("gateway_services.form.fields.protocol.options.grpc"),
846
+ label: a("gateway_services.form.fields.protocol.options.grpc"),
901
847
  value: "grpc",
902
848
  group: "grpc"
903
849
  },
904
850
  {
905
- label: r("gateway_services.form.fields.protocol.options.grpcs"),
851
+ label: a("gateway_services.form.fields.protocol.options.grpcs"),
906
852
  value: "grpcs",
907
853
  group: "grpc"
908
854
  },
909
- ...re ? [
855
+ ...ee ? [
910
856
  {
911
- label: r("gateway_services.form.fields.protocol.options.ws"),
857
+ label: a("gateway_services.form.fields.protocol.options.ws"),
912
858
  value: "ws",
913
859
  group: "websocket"
914
860
  },
915
861
  {
916
- label: r("gateway_services.form.fields.protocol.options.wss"),
862
+ label: a("gateway_services.form.fields.protocol.options.wss"),
917
863
  value: "wss",
918
864
  group: "websocket"
919
865
  }
920
866
  ] : [],
921
867
  {
922
- label: r("gateway_services.form.fields.protocol.options.udp"),
868
+ label: a("gateway_services.form.fields.protocol.options.udp"),
923
869
  value: "udp",
924
870
  group: "udp"
925
871
  }
926
- ], ke = { url: "url", protocol: "protocol" }, e = (i, d) => {
927
- d.value;
928
- }, A = (i) => i ? parseFloat(i) : 0, ue = () => {
929
- b.value = !0, o.errorMessage = "", o.fields.host = w.host, o.fields.path = w.path, o.fields.port = w.port, o.fields.protocol = w.protocol, o.fields.url = w.url, o.fields.retries = w.retries, o.fields.connect_timeout = w.connect_timeout, o.fields.write_timeout = w.write_timeout, o.fields.read_timeout = w.read_timeout, o.fields.client_certificate = w.client_certificate, o.fields.ca_certificates = w.ca_certificates, o.fields.tls_verify_enabled = w.tls_verify_enabled, o.fields.tls_verify_value = w.tls_verify_value;
930
- }, O = () => {
931
- if (o.fields.url && x.value === "url")
872
+ ], re = { url: "url", protocol: "protocol" }, J = (t, i) => {
873
+ i.value;
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")
932
878
  try {
933
- const i = new URL(o.fields.url);
934
- o.errorMessage = "", o.fields.protocol = i.protocol.slice(0, -1), o.fields.host = i.hostname, o.fields.path = i.pathname;
935
- const d = Number(i.port);
936
- we.value = !!d, o.fields.port = d || ge.getPortFromProtocol(o.fields.protocol), o.errorMessage = "", p("url-valid:success");
937
- } catch (i) {
938
- o.errorMessage = r("errors.urlErrorMessage"), p("url-valid:error", D(i));
879
+ const t = new URL(e.fields.url);
880
+ e.errorMessage = "", e.fields.protocol = t.protocol.slice(0, -1), e.fields.host = t.hostname, e.fields.path = t.pathname;
881
+ const i = Number(t.port);
882
+ _e.value = !!i, e.fields.port = i || Y.getPortFromProtocol(e.fields.protocol), e.errorMessage = "", c("url-valid:success");
883
+ } catch (t) {
884
+ e.errorMessage = a("errors.urlErrorMessage"), c("url-valid:error", P(t));
939
885
  }
940
886
  else
941
- p("url-valid:success"), o.errorMessage = "";
942
- }, se = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(o.fields.protocol)), Pe = k(() => {
943
- if (x.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")
944
890
  return !0;
945
- const i = ["https", "wss", "tls"].includes(o.fields.protocol);
946
- return x.value === "protocol" && i;
947
- }), oe = k(() => {
948
- if (x.value === "url")
891
+ const t = ["https", "wss", "tls"].includes(e.fields.protocol);
892
+ return _.value === "protocol" && t;
893
+ }), ae = b(() => {
894
+ if (_.value === "url")
949
895
  return !0;
950
- const i = ["https", "tls"].includes(o.fields.protocol);
951
- return x.value === "protocol" && i;
952
- }), Ve = k(() => {
953
- if (x.value === "url")
896
+ const t = ["https", "tls"].includes(e.fields.protocol);
897
+ return _.value === "protocol" && t;
898
+ }), ke = b(() => {
899
+ if (_.value === "url")
954
900
  return !0;
955
- const i = ["https", "wss", "tls"].includes(o.fields.protocol);
956
- return x.value === "protocol" && i;
957
- }), Ce = (i) => {
958
- z.value = ie.utf8Name(i);
959
- }, de = k(() => ce.value && JSON.stringify(o.fields) !== JSON.stringify(w) || x.value === "url" && !!o.fields.url || x.value === "protocol" && !!o.fields.host), _e = (i) => {
960
- var d, V, X;
961
- o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((d = i == null ? void 0 : i.tags) == null ? void 0 : d.join(", ")) || "", o.fields.protocol = (i == null ? void 0 : i.protocol) || "http", o.fields.path = (i == null ? void 0 : i.path) || "", o.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, o.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, o.fields.host = (i == null ? void 0 : i.host) || "", o.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, o.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, o.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, o.fields.ca_certificates = ((V = i == null ? void 0 : i.ca_certificates) == null ? void 0 : V.join(",")) || "", o.fields.client_certificate = ((X = i == null ? void 0 : i.client_certificate) == null ? void 0 : X.id) || "", o.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, o.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(w, o.fields);
962
- }, be = () => {
963
- M.push(s.config.cancelRoute);
964
- }, Ee = k(() => {
965
- var d, V;
966
- let i = `${s.config.apiBaseUrl}${ve.form[s.config.app].validate}`;
967
- return s.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((d = s.config) == null ? void 0 : d.controlPlaneId) || "") : s.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = s.config) != null && V.workspace ? `/${s.config.workspace}` : "")), i = i.replace(/{id}/gi, s.gatewayServiceId), i;
968
- }), ee = k(() => {
969
- var d, V;
970
- let i = `${s.config.apiBaseUrl}${ve.form[s.config.app][Y.value]}`;
971
- return s.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((d = s.config) == null ? void 0 : d.controlPlaneId) || "") : s.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = s.config) != null && V.workspace ? `/${s.config.workspace}` : "")), i = i.replace(/{id}/gi, s.gatewayServiceId), i;
972
- }), H = (i) => {
973
- let d = "";
974
- i.url && (d = new URL(i.url).protocol), (["https", "wss", "tls"].includes(i.protocol) || ["https", "wss", "tls"].includes(d)) && (i.tls_verify = i.tls_verify_enabled ? i.tls_verify_value : null), delete i.tls_verify_enabled, delete i.tls_verify_value;
975
- }, Z = k(() => {
976
- var d, V, X, L;
977
- const i = {
978
- name: o.fields.name || null,
979
- tags: o.fields.tags ? (X = (V = (d = o.fields.tags) == null ? void 0 : d.split(",")) == null ? void 0 : V.map((T) => String(T || "").trim())) == null ? void 0 : X.filter((T) => T !== "") : null,
980
- protocol: o.fields.protocol,
981
- path: o.fields.path || null,
982
- read_timeout: o.fields.read_timeout,
983
- retries: o.fields.retries,
984
- host: o.fields.host,
985
- connect_timeout: o.fields.connect_timeout,
986
- tls_verify_value: o.fields.tls_verify_value,
987
- tls_verify_enabled: o.fields.tls_verify_enabled,
988
- ca_certificates: o.fields.ca_certificates ? (L = o.fields.ca_certificates) == null ? void 0 : L.split(",").filter((T) => T !== "") : null,
989
- client_certificate: o.fields.client_certificate ? { id: o.fields.client_certificate } : null,
990
- write_timeout: o.fields.write_timeout,
991
- port: o.fields.port,
992
- url: o.fields.url
901
+ const t = ["https", "wss", "tls"].includes(e.fields.protocol);
902
+ return _.value === "protocol" && t;
903
+ }), Ce = (t) => {
904
+ B.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
+ }), L = (t) => {
919
+ let i = "";
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;
921
+ }, K = b(() => {
922
+ var i, v, M, V;
923
+ const t = {
924
+ name: e.fields.name || 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,
926
+ protocol: e.fields.protocol,
927
+ path: e.fields.path || null,
928
+ read_timeout: e.fields.read_timeout,
929
+ retries: e.fields.retries,
930
+ host: e.fields.host,
931
+ connect_timeout: e.fields.connect_timeout,
932
+ tls_verify_value: e.fields.tls_verify_value,
933
+ tls_verify_enabled: e.fields.tls_verify_enabled,
934
+ ca_certificates: e.fields.ca_certificates ? (V = e.fields.ca_certificates) == null ? void 0 : V.split(",").filter((h) => h !== "") : null,
935
+ client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
936
+ write_timeout: e.fields.write_timeout,
937
+ port: e.fields.port,
938
+ url: e.fields.url
993
939
  };
994
- return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value), se.value || (i.path = null), Y.value === "create" ? x.value === "url" ? (delete i.protocol, delete i.host, delete i.path, s.config.app === "konnect" && delete i.port) : delete i.url : Y.value === "edit" && delete i.url, i;
995
- }), te = async () => {
996
- var i, d, V, X;
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;
997
943
  try {
998
- o.isReadonly = !0, O();
999
- const L = Z.value;
1000
- H(L);
1001
- let T;
1002
- if (await P.post(Ee.value, L), Y.value === "create" ? T = await P.post(ee.value, L) : Y.value === "edit" && (T = ((i = s.config) == null ? void 0 : i.app) === "konnect" ? await P.put(ee.value, L) : await P.patch(ee.value, L)), T) {
1003
- const { data: c } = T;
1004
- o.fields.name = (c == null ? void 0 : c.name) || "", o.fields.port = c.port || ge.getPortFromProtocol(c.protocol), o.fields.protocol = (c == null ? void 0 : c.protocol) || "http", o.fields.host = (c == null ? void 0 : c.host) || "", o.fields.path = (c == null ? void 0 : c.path) || "", o.fields.url = (c == null ? void 0 : c.url) || "", o.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, o.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, o.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, o.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, o.fields.client_certificate = ((d = c == null ? void 0 : c.client_certificate) == null ? void 0 : d.id) || "", o.fields.ca_certificates = (V = c == null ? void 0 : c.ca_certificates) != null && V.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", o.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, o.fields.tls_verify_value = o.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), o.fields.tags = (X = c == null ? void 0 : c.tags) != null && X.length ? c.tags.join(", ") : "", Object.assign(w, o.fields), p("update", T == null ? void 0 : T.data);
944
+ e.isReadonly = !0, T();
945
+ const V = K.value;
946
+ L(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);
1005
951
  }
1006
- return T;
1007
- } catch (L) {
1008
- o.errorMessage = D(L), p("error", L);
952
+ return h;
953
+ } catch (V) {
954
+ e.errorMessage = P(V), c("error", V);
1009
955
  } finally {
1010
- o.isReadonly = !1;
956
+ e.isReadonly = !1;
1011
957
  }
1012
958
  };
1013
- return Ue(() => s.gatewayServiceId, () => {
1014
- Object.assign(o.fields, w);
1015
- }), Ue(o.fields, (i) => {
1016
- o.fields.port = ge.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated", Z.value);
1017
- }), Qe(() => {
1018
- p("model-updated", Z.value);
1019
- }), K({
1020
- validateUrl: O,
1021
- getPayload: Z,
1022
- saveFormData: te,
1023
- canSubmit: de,
1024
- initForm: _e
1025
- }), (i, d) => {
1026
- const V = G("KInput"), X = G("KLabel"), L = G("KRadio"), T = G("KSelect"), c = G("KCheckbox"), g = G("KCollapse");
1027
- return S(), U("div", Dt, [
1028
- u(l(lt), {
1029
- "can-submit": de.value,
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
+ }), G({
966
+ validateUrl: T,
967
+ getPayload: K,
968
+ saveFormData: j,
969
+ canSubmit: te,
970
+ initForm: ne
971
+ }), (t, i) => {
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,
1030
976
  config: n.config,
1031
977
  "edit-id": n.gatewayServiceId,
1032
- "entity-type": l(Ne).GatewayService,
1033
- "error-message": o.errorMessage,
1034
- "fetch-url": ne.value,
1035
- "form-fields": Z.value,
1036
- "is-readonly": o.isReadonly,
1037
- onCancel: be,
1038
- "onFetch:error": d[25] || (d[25] = (m) => i.$emit("error", m)),
1039
- "onFetch:success": _e,
1040
- onLoading: d[26] || (d[26] = (m) => i.$emit("loading", m)),
1041
- onSubmit: te
978
+ "entity-type": o(Fe).GatewayService,
979
+ "error-message": e.errorMessage,
980
+ "fetch-url": ye.value,
981
+ "form-fields": K.value,
982
+ "is-readonly": e.isReadonly,
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
1042
988
  }, {
1043
- "form-actions": v(() => [
1044
- Xe(i.$slots, "form-actions", {
1045
- canSubmit: de.value,
1046
- cancel: be,
1047
- submit: te
989
+ "form-actions": f(() => [
990
+ Ge(t.$slots, "form-actions", {
991
+ canSubmit: te.value,
992
+ cancel: ce,
993
+ submit: j
1048
994
  }, void 0, !0)
1049
995
  ]),
1050
- default: v(() => [
1051
- u(l(Ke), {
1052
- description: l(r)("gateway_services.form.sections.general.description"),
996
+ default: f(() => [
997
+ d(o($e), {
998
+ description: o(a)("gateway_services.form.sections.general.description"),
1053
999
  "hide-info-header": n.hideSectionsInfo,
1054
- title: l(r)("gateway_services.form.sections.general.title")
1000
+ title: o(a)("gateway_services.form.sections.general.title")
1055
1001
  }, {
1056
- default: v(() => [
1057
- u(V, {
1058
- modelValue: o.fields.name,
1059
- "onUpdate:modelValue": d[0] || (d[0] = (m) => o.fields.name = m),
1002
+ default: f(() => [
1003
+ d(v, {
1004
+ modelValue: e.fields.name,
1005
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => e.fields.name = s),
1060
1006
  modelModifiers: { trim: !0 },
1061
1007
  autocomplete: "off",
1062
1008
  "data-testid": "gateway-service-name-input",
1063
- error: Ie.value,
1064
- "error-message": z.value,
1065
- label: l(r)("gateway_services.form.fields.name.label"),
1009
+ error: be.value,
1010
+ "error-message": B.value,
1011
+ label: o(a)("gateway_services.form.fields.name.label"),
1066
1012
  "label-attributes": {
1067
- info: l(r)("gateway_services.form.fields.name.tooltip"),
1013
+ info: o(a)("gateway_services.form.fields.name.tooltip"),
1068
1014
  tooltipAttributes: { maxWidth: "400" }
1069
1015
  },
1070
1016
  name: "name",
1071
- placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
1072
- readonly: o.isReadonly,
1017
+ placeholder: o(a)("gateway_services.form.fields.name.placeholder"),
1018
+ readonly: e.isReadonly,
1073
1019
  type: "text",
1074
1020
  onInput: Ce
1075
1021
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
1076
- u(V, {
1077
- modelValue: o.fields.tags,
1078
- "onUpdate:modelValue": d[1] || (d[1] = (m) => o.fields.tags = m),
1022
+ d(v, {
1023
+ modelValue: e.fields.tags,
1024
+ "onUpdate:modelValue": i[1] || (i[1] = (s) => e.fields.tags = s),
1079
1025
  modelModifiers: { trim: !0 },
1080
1026
  autocomplete: "off",
1081
1027
  "data-testid": "gateway-service-tags-input",
1082
- help: l(r)("gateway_services.form.fields.tags.help"),
1083
- label: l(r)("gateway_services.form.fields.tags.label"),
1028
+ help: o(a)("gateway_services.form.fields.tags.help"),
1029
+ label: o(a)("gateway_services.form.fields.tags.label"),
1084
1030
  "label-attributes": {
1085
- info: l(r)("gateway_services.form.fields.tags.tooltip"),
1031
+ info: o(a)("gateway_services.form.fields.tags.tooltip"),
1086
1032
  tooltipAttributes: { maxWidth: "400" }
1087
1033
  },
1088
1034
  name: "tags",
1089
- placeholder: l(r)("gateway_services.form.fields.tags.placeholder"),
1090
- readonly: o.isReadonly,
1035
+ placeholder: o(a)("gateway_services.form.fields.tags.placeholder"),
1036
+ readonly: e.isReadonly,
1091
1037
  type: "text"
1092
1038
  }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
1093
1039
  ]),
1094
1040
  _: 1
1095
1041
  }, 8, ["description", "hide-info-header", "title"]),
1096
- u(l(Ke), {
1097
- description: l(r)("gateway_services.form.sections.keys.description"),
1042
+ d(o($e), {
1043
+ description: o(a)("gateway_services.form.sections.keys.description"),
1098
1044
  "hide-info-header": n.hideSectionsInfo,
1099
- title: l(r)("gateway_services.form.sections.keys.title")
1045
+ title: o(a)("gateway_services.form.sections.keys.title")
1100
1046
  }, {
1101
- default: v(() => [
1102
- ce.value ? B("", !0) : (S(), U("div", qt, [
1103
- I("div", Gt, [
1104
- u(X, { required: "" }, {
1105
- default: v(() => [
1106
- J(E(l(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
1047
+ default: f(() => [
1048
+ H.value ? D("", !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)
1107
1053
  ]),
1108
1054
  _: 1
1109
1055
  })
1110
1056
  ]),
1111
- I("div", Ot, [
1112
- u(L, {
1113
- modelValue: x.value,
1114
- "onUpdate:modelValue": d[2] || (d[2] = (m) => x.value = m),
1057
+ k("div", Et, [
1058
+ d(V, {
1059
+ modelValue: _.value,
1060
+ "onUpdate:modelValue": i[2] || (i[2] = (s) => _.value = s),
1115
1061
  "data-testid": "gateway-service-url-radio",
1116
- "selected-value": ke.url,
1117
- onChange: ue
1062
+ "selected-value": re.url,
1063
+ onChange: z
1118
1064
  }, {
1119
- default: v(() => [
1120
- J(E(l(r)("gateway_services.form.sections.keys.urlLabel")), 1)
1065
+ default: f(() => [
1066
+ R(y(o(a)("gateway_services.form.sections.keys.urlLabel")), 1)
1121
1067
  ]),
1122
1068
  _: 1
1123
1069
  }, 8, ["modelValue", "selected-value"])
1124
1070
  ]),
1125
- x.value === "url" ? (S(), U("div", Nt, [
1126
- u(V, {
1127
- modelValue: o.fields.url,
1128
- "onUpdate:modelValue": d[3] || (d[3] = (m) => o.fields.url = m),
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),
1129
1075
  modelModifiers: { trim: !0 },
1130
1076
  class: "gateway-service-url-input gateway-service-form-margin-bottom",
1131
1077
  "data-testid": "gateway-service-url-input",
1132
- label: l(r)("gateway_services.form.fields.upstream_url.label"),
1078
+ label: o(a)("gateway_services.form.fields.upstream_url.label"),
1133
1079
  "label-attributes": {
1134
- info: n.config.app === "konnect" ? l(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : l(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
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"),
1135
1081
  tooltipAttributes: { maxWidth: "400" }
1136
1082
  },
1137
1083
  name: "url",
1138
- placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
1084
+ placeholder: o(a)("gateway_services.form.fields.upstream_url.placeholder"),
1139
1085
  required: ""
1140
1086
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
1141
- ])) : B("", !0),
1142
- u(L, {
1143
- modelValue: x.value,
1144
- "onUpdate:modelValue": d[4] || (d[4] = (m) => x.value = m),
1087
+ ])) : D("", !0),
1088
+ d(V, {
1089
+ modelValue: _.value,
1090
+ "onUpdate:modelValue": i[4] || (i[4] = (s) => _.value = s),
1145
1091
  "checked-group": "protocol",
1146
1092
  "data-testid": "gateway-service-protocol-radio",
1147
- "selected-value": ke.protocol,
1148
- onChange: ue
1093
+ "selected-value": re.protocol,
1094
+ onChange: z
1149
1095
  }, {
1150
- default: v(() => [
1151
- J(E(l(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
1096
+ default: f(() => [
1097
+ R(y(o(a)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
1152
1098
  ]),
1153
1099
  _: 1
1154
1100
  }, 8, ["modelValue", "selected-value"])
1155
1101
  ])),
1156
- x.value === "protocol" || ce.value ? (S(), U("div", jt, [
1157
- u(T, {
1158
- modelValue: o.fields.protocol,
1159
- "onUpdate:modelValue": d[5] || (d[5] = (m) => o.fields.protocol = m),
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),
1160
1106
  "data-testid": "gateway-service-protocol-select",
1161
- items: ye,
1162
- label: l(r)("gateway_services.form.fields.protocol.label"),
1107
+ items: he,
1108
+ label: o(a)("gateway_services.form.fields.protocol.label"),
1163
1109
  "label-attributes": {
1164
- info: l(r)("gateway_services.form.fields.protocol.tooltip"),
1110
+ info: o(a)("gateway_services.form.fields.protocol.tooltip"),
1165
1111
  tooltipAttributes: { maxWidth: "400" }
1166
1112
  },
1167
- readonly: o.isReadonly,
1113
+ readonly: e.isReadonly,
1168
1114
  required: "",
1169
1115
  width: "100%",
1170
- onSelected: d[6] || (d[6] = (m) => e(o.fields.protocol, m))
1116
+ onSelected: i[6] || (i[6] = (s) => J(e.fields.protocol, s))
1171
1117
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1172
- u(V, {
1173
- modelValue: o.fields.host,
1174
- "onUpdate:modelValue": d[7] || (d[7] = (m) => o.fields.host = m),
1118
+ d(v, {
1119
+ modelValue: e.fields.host,
1120
+ "onUpdate:modelValue": i[7] || (i[7] = (s) => e.fields.host = s),
1175
1121
  modelModifiers: { trim: !0 },
1176
1122
  class: "gateway-service-form-margin-top",
1177
1123
  "data-testid": "gateway-service-host-input",
1178
- label: l(r)("gateway_services.form.fields.host.label"),
1124
+ label: o(a)("gateway_services.form.fields.host.label"),
1179
1125
  "label-attributes": {
1180
- info: l(r)("gateway_services.form.fields.host.tooltip"),
1126
+ info: o(a)("gateway_services.form.fields.host.tooltip"),
1181
1127
  tooltipAttributes: { maxWidth: "400" }
1182
1128
  },
1183
1129
  name: "host",
1184
- placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
1130
+ placeholder: o(a)("gateway_services.form.fields.host.placeholder"),
1185
1131
  required: ""
1186
1132
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
1187
- se.value ? (S(), U("div", zt, [
1188
- u(V, {
1189
- modelValue: o.fields.path,
1190
- "onUpdate:modelValue": d[8] || (d[8] = (m) => o.fields.path = m),
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),
1191
1137
  modelModifiers: { trim: !0 },
1192
1138
  class: "gateway-service-form-margin-top",
1193
1139
  "data-testid": "gateway-service-path-input",
1194
- label: l(r)("gateway_services.form.fields.path.label"),
1140
+ label: o(a)("gateway_services.form.fields.path.label"),
1195
1141
  "label-attributes": {
1196
- info: l(r)("gateway_services.form.fields.path.tooltip"),
1142
+ info: o(a)("gateway_services.form.fields.path.tooltip"),
1197
1143
  tooltipAttributes: { maxWidth: "400" }
1198
1144
  },
1199
1145
  name: "path",
1200
- placeholder: l(r)("gateway_services.form.fields.path.placeholder")
1146
+ placeholder: o(a)("gateway_services.form.fields.path.placeholder")
1201
1147
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
1202
- ])) : B("", !0),
1203
- u(V, {
1204
- modelValue: o.fields.port,
1148
+ ])) : D("", !0),
1149
+ d(v, {
1150
+ modelValue: e.fields.port,
1205
1151
  "onUpdate:modelValue": [
1206
- d[9] || (d[9] = (m) => o.fields.port = m),
1207
- d[10] || (d[10] = () => {
1208
- o.fields.port = A(o.fields.port + "");
1152
+ i[9] || (i[9] = (s) => e.fields.port = s),
1153
+ i[10] || (i[10] = () => {
1154
+ e.fields.port = W(e.fields.port + "");
1209
1155
  })
1210
1156
  ],
1211
1157
  class: "gateway-service-form-margin-top",
1212
1158
  "data-testid": "gateway-service-port-input",
1213
- label: l(r)("gateway_services.form.fields.port.label"),
1159
+ label: o(a)("gateway_services.form.fields.port.label"),
1214
1160
  "label-attributes": {
1215
- info: l(r)("gateway_services.form.fields.port.tooltip"),
1161
+ info: o(a)("gateway_services.form.fields.port.tooltip"),
1216
1162
  tooltipAttributes: { maxWidth: "400" }
1217
1163
  },
1218
1164
  name: "port",
1219
1165
  type: "number"
1220
1166
  }, null, 8, ["modelValue", "label", "label-attributes"])
1221
- ])) : B("", !0),
1222
- u(g, {
1223
- modelValue: b.value,
1224
- "onUpdate:modelValue": d[24] || (d[24] = (m) => b.value = m),
1167
+ ])) : D("", !0),
1168
+ d(u, {
1169
+ modelValue: x.value,
1170
+ "onUpdate:modelValue": i[24] || (i[24] = (s) => x.value = s),
1225
1171
  "data-testid": "advanced-fields-collapse",
1226
1172
  "trigger-alignment": "leading",
1227
- "trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
1173
+ "trigger-label": o(a)("gateway_services.form.sections.keys.viewAdvancedFields")
1228
1174
  }, {
1229
- default: v(() => [
1230
- I("div", Ht, [
1231
- I("div", Zt, [
1232
- u(V, {
1233
- modelValue: o.fields.retries,
1175
+ default: f(() => [
1176
+ k("div", Mt, [
1177
+ k("div", $t, [
1178
+ d(v, {
1179
+ modelValue: e.fields.retries,
1234
1180
  "onUpdate:modelValue": [
1235
- d[11] || (d[11] = (m) => o.fields.retries = m),
1236
- d[12] || (d[12] = () => {
1237
- o.fields.retries = A(o.fields.retries + "");
1181
+ i[11] || (i[11] = (s) => e.fields.retries = s),
1182
+ i[12] || (i[12] = () => {
1183
+ e.fields.retries = W(e.fields.retries + "");
1238
1184
  })
1239
1185
  ],
1240
1186
  autocomplete: "off",
1241
1187
  "data-testid": "gateway-service-retries-input",
1242
- label: l(r)("gateway_services.form.fields.retries.label"),
1188
+ label: o(a)("gateway_services.form.fields.retries.label"),
1243
1189
  "label-attributes": {
1244
- info: l(r)("gateway_services.form.fields.retries.tooltip"),
1190
+ info: o(a)("gateway_services.form.fields.retries.tooltip"),
1245
1191
  tooltipAttributes: { maxWidth: "400" }
1246
1192
  },
1247
1193
  name: "retries",
1248
- readonly: o.isReadonly,
1194
+ readonly: e.isReadonly,
1249
1195
  type: "number"
1250
1196
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1251
1197
  ]),
1252
- I("div", Jt, [
1253
- u(V, {
1254
- modelValue: o.fields.connect_timeout,
1198
+ k("div", xt, [
1199
+ d(v, {
1200
+ modelValue: e.fields.connect_timeout,
1255
1201
  "onUpdate:modelValue": [
1256
- d[13] || (d[13] = (m) => o.fields.connect_timeout = m),
1257
- d[14] || (d[14] = () => {
1258
- o.fields.connect_timeout = A(o.fields.connect_timeout + "");
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 + "");
1259
1205
  })
1260
1206
  ],
1261
1207
  autocomplete: "off",
1262
1208
  "data-testid": "gateway-service-connTimeout-input",
1263
- label: l(r)("gateway_services.form.fields.connect_timeout.label"),
1209
+ label: o(a)("gateway_services.form.fields.connect_timeout.label"),
1264
1210
  "label-attributes": {
1265
- info: l(r)("gateway_services.form.fields.connect_timeout.tooltip"),
1211
+ info: o(a)("gateway_services.form.fields.connect_timeout.tooltip"),
1266
1212
  tooltipAttributes: { maxWidth: "400" }
1267
1213
  },
1268
1214
  name: "connTimeout",
1269
- readonly: o.isReadonly,
1215
+ readonly: e.isReadonly,
1270
1216
  type: "number"
1271
1217
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1272
1218
  ]),
1273
- I("div", Qt, [
1274
- u(V, {
1275
- modelValue: o.fields.write_timeout,
1219
+ k("div", At, [
1220
+ d(v, {
1221
+ modelValue: e.fields.write_timeout,
1276
1222
  "onUpdate:modelValue": [
1277
- d[15] || (d[15] = (m) => o.fields.write_timeout = m),
1278
- d[16] || (d[16] = () => {
1279
- o.fields.write_timeout = A(o.fields.write_timeout + "");
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 + "");
1280
1226
  })
1281
1227
  ],
1282
1228
  autocomplete: "off",
1283
1229
  "data-testid": "gateway-service-writeTimeout-input",
1284
- label: l(r)("gateway_services.form.fields.write_timeout.label"),
1230
+ label: o(a)("gateway_services.form.fields.write_timeout.label"),
1285
1231
  "label-attributes": {
1286
- info: l(r)("gateway_services.form.fields.write_timeout.tooltip"),
1232
+ info: o(a)("gateway_services.form.fields.write_timeout.tooltip"),
1287
1233
  tooltipAttributes: { maxWidth: "400" }
1288
1234
  },
1289
1235
  name: "writeTimeout",
1290
- readonly: o.isReadonly,
1236
+ readonly: e.isReadonly,
1291
1237
  type: "number"
1292
1238
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1293
1239
  ]),
1294
- I("div", Xt, [
1295
- u(V, {
1296
- modelValue: o.fields.read_timeout,
1240
+ k("div", Ft, [
1241
+ d(v, {
1242
+ modelValue: e.fields.read_timeout,
1297
1243
  "onUpdate:modelValue": [
1298
- d[17] || (d[17] = (m) => o.fields.read_timeout = m),
1299
- d[18] || (d[18] = () => {
1300
- o.fields.read_timeout = A(o.fields.read_timeout + "");
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 + "");
1301
1247
  })
1302
1248
  ],
1303
1249
  autocomplete: "off",
1304
1250
  "data-testid": "gateway-service-readTimeout-input",
1305
- label: l(r)("gateway_services.form.fields.read_timeout.label"),
1251
+ label: o(a)("gateway_services.form.fields.read_timeout.label"),
1306
1252
  "label-attributes": {
1307
- info: l(r)("gateway_services.form.fields.read_timeout.tooltip"),
1253
+ info: o(a)("gateway_services.form.fields.read_timeout.tooltip"),
1308
1254
  tooltipAttributes: { maxWidth: "400" }
1309
1255
  },
1310
1256
  name: "readTimeout",
1311
- readonly: o.isReadonly,
1257
+ readonly: e.isReadonly,
1312
1258
  type: "number"
1313
1259
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1314
1260
  ]),
1315
- Pe.value ? (S(), U("div", Yt, [
1316
- u(V, {
1317
- modelValue: o.fields.client_certificate,
1318
- "onUpdate:modelValue": d[19] || (d[19] = (m) => o.fields.client_certificate = m),
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),
1319
1265
  modelModifiers: { trim: !0 },
1320
1266
  autocomplete: "off",
1321
1267
  "data-testid": "gateway-service-clientCert-input",
1322
- label: l(r)("gateway_services.form.fields.client_certificate.label"),
1268
+ label: o(a)("gateway_services.form.fields.client_certificate.label"),
1323
1269
  "label-attributes": {
1324
- info: l(r)("gateway_services.form.fields.client_certificate.tooltip"),
1270
+ info: o(a)("gateway_services.form.fields.client_certificate.tooltip"),
1325
1271
  tooltipAttributes: { maxWidth: "400" }
1326
1272
  },
1327
1273
  name: "clientCert",
1328
- placeholder: l(r)("gateway_services.form.fields.client_certificate.placeholder"),
1329
- readonly: o.isReadonly,
1274
+ placeholder: o(a)("gateway_services.form.fields.client_certificate.placeholder"),
1275
+ readonly: e.isReadonly,
1330
1276
  type: "text"
1331
1277
  }, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
1332
- ])) : B("", !0),
1333
- oe.value ? (S(), U("div", el, [
1334
- u(V, {
1335
- modelValue: o.fields.ca_certificates,
1336
- "onUpdate:modelValue": d[20] || (d[20] = (m) => o.fields.ca_certificates = m),
1278
+ ])) : D("", !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),
1337
1283
  modelModifiers: { trim: !0 },
1338
1284
  autocomplete: "off",
1339
1285
  "data-testid": "gateway-service-ca-certs-input",
1340
- label: l(r)("gateway_services.form.fields.ca_certificates.label"),
1286
+ label: o(a)("gateway_services.form.fields.ca_certificates.label"),
1341
1287
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } },
1342
- placeholder: l(r)("gateway_services.form.fields.ca_certificates.placeholder"),
1343
- readonly: o.isReadonly,
1288
+ placeholder: o(a)("gateway_services.form.fields.ca_certificates.placeholder"),
1289
+ readonly: e.isReadonly,
1344
1290
  type: "text"
1345
1291
  }, {
1346
- "label-tooltip": v(() => [
1347
- u(l(Q), {
1292
+ "label-tooltip": f(() => [
1293
+ d(o(q), {
1348
1294
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1349
1295
  scope: "global"
1350
1296
  }, {
1351
- code1: v(() => [
1352
- I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
1297
+ code1: f(() => [
1298
+ k("code", null, y(o(a)("gateway_services.form.fields.ca_certificates.code1")), 1)
1353
1299
  ]),
1354
- code2: v(() => [
1355
- I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
1300
+ code2: f(() => [
1301
+ k("code", null, y(o(a)("gateway_services.form.fields.ca_certificates.code2")), 1)
1356
1302
  ]),
1357
1303
  _: 1
1358
1304
  })
1359
1305
  ]),
1360
1306
  _: 1
1361
1307
  }, 8, ["modelValue", "label", "placeholder", "readonly"])
1362
- ])) : B("", !0),
1363
- Ve.value ? (S(), U("div", tl, [
1364
- u(c, {
1365
- modelValue: o.fields.tls_verify_enabled,
1366
- "onUpdate:modelValue": d[21] || (d[21] = (m) => o.fields.tls_verify_enabled = m),
1308
+ ])) : D("", !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),
1367
1313
  "data-testid": "gateway-service-tls-verify-checkbox",
1368
- description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
1369
- label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
1314
+ description: o(a)("gateway_services.form.fields.tls_verify_enabled.help"),
1315
+ label: o(a)("gateway_services.form.fields.tls_verify_enabled.label"),
1370
1316
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } }
1371
1317
  }, {
1372
- tooltip: v(() => [
1373
- u(l(Q), {
1318
+ tooltip: f(() => [
1319
+ d(o(q), {
1374
1320
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1375
1321
  scope: "global"
1376
1322
  }, {
1377
- code1: v(() => [
1378
- I("code", null, E(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1323
+ code1: f(() => [
1324
+ k("code", null, y(o(a)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1379
1325
  ]),
1380
1326
  _: 1
1381
1327
  })
1382
1328
  ]),
1383
1329
  _: 1
1384
1330
  }, 8, ["modelValue", "description", "label"]),
1385
- o.fields.tls_verify_enabled ? (S(), U("div", ll, [
1386
- u(L, {
1387
- modelValue: o.fields.tls_verify_value,
1388
- "onUpdate:modelValue": d[22] || (d[22] = (m) => o.fields.tls_verify_value = m),
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),
1389
1335
  "data-testid": "gateway-service-tls-verify-true-option",
1390
- label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
1336
+ label: o(a)("gateway_services.form.fields.tls_verify_option.true.label"),
1391
1337
  "selected-value": !0
1392
1338
  }, null, 8, ["modelValue", "label"])
1393
- ])) : B("", !0),
1394
- o.fields.tls_verify_enabled ? (S(), U("div", ol, [
1395
- u(L, {
1396
- modelValue: o.fields.tls_verify_value,
1397
- "onUpdate:modelValue": d[23] || (d[23] = (m) => o.fields.tls_verify_value = m),
1339
+ ])) : D("", !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),
1398
1344
  "data-testid": "gateway-service-tls-verify-false-option",
1399
- label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
1345
+ label: o(a)("gateway_services.form.fields.tls_verify_option.false.label"),
1400
1346
  "selected-value": !1
1401
1347
  }, null, 8, ["modelValue", "label"])
1402
- ])) : B("", !0)
1403
- ])) : B("", !0)
1348
+ ])) : D("", !0)
1349
+ ])) : D("", !0)
1404
1350
  ])
1405
1351
  ]),
1406
1352
  _: 1
@@ -1414,7 +1360,7 @@ const me = {
1414
1360
  ]);
1415
1361
  };
1416
1362
  }
1417
- }), xl = /* @__PURE__ */ je(il, [["__scopeId", "data-v-c2c5e1f0"]]), rl = { class: "kong-ui-gateway-service-entity-config-card" }, Tl = /* @__PURE__ */ Le({
1363
+ }), Qt = /* @__PURE__ */ Be(qt, [["__scopeId", "data-v-35e0db56"]]), Ot = { class: "kong-ui-gateway-service-entity-config-card" }, Xt = /* @__PURE__ */ Te({
1418
1364
  __name: "GatewayServiceConfigCard",
1419
1365
  props: {
1420
1366
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -1441,973 +1387,130 @@ const me = {
1441
1387
  },
1442
1388
  emits: ["loading", "fetch:error", "fetch:success"],
1443
1389
  setup(n) {
1444
- const K = n, { i18n: { t: y }, i18nT: p } = me.useI18n(), s = k(() => ve.form[K.config.app].edit), { getPropValue: b } = ot(), M = (r, D) => b(r, D) === !0 ? y("gateway_services.form.fields.tls_verify_option.true.display") : y("gateway_services.form.fields.tls_verify_option.false.display"), Q = q({
1390
+ const G = n, { i18n: { t: p }, i18nT: c } = ve.useI18n(), r = b(() => se.form[G.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({
1445
1391
  id: {},
1446
1392
  name: {
1447
- tooltip: y("gateway_services.form.fields.name.tooltip")
1393
+ tooltip: p("gateway_services.form.fields.name.tooltip")
1448
1394
  },
1449
1395
  enabled: {},
1450
1396
  updated_at: {},
1451
1397
  created_at: {},
1452
1398
  protocol: {
1453
- section: Ae.Basic,
1454
- tooltip: y("gateway_services.form.fields.protocol.tooltip")
1399
+ section: fe.Basic,
1400
+ tooltip: p("gateway_services.form.fields.protocol.tooltip")
1455
1401
  },
1456
1402
  host: {
1457
- section: Ae.Basic,
1458
- tooltip: y("gateway_services.form.fields.host.tooltip")
1403
+ section: fe.Basic,
1404
+ tooltip: p("gateway_services.form.fields.host.tooltip")
1459
1405
  },
1460
1406
  path: {
1461
- section: Ae.Basic,
1462
- tooltip: y("gateway_services.form.fields.path.tooltip")
1407
+ section: fe.Basic,
1408
+ tooltip: p("gateway_services.form.fields.path.tooltip")
1463
1409
  },
1464
1410
  port: {
1465
- section: Ae.Basic,
1466
- tooltip: y("gateway_services.form.fields.port.tooltip")
1411
+ section: fe.Basic,
1412
+ tooltip: p("gateway_services.form.fields.port.tooltip")
1467
1413
  },
1468
1414
  tags: {
1469
- tooltip: y("gateway_services.form.fields.tags.tooltip")
1415
+ tooltip: p("gateway_services.form.fields.tags.tooltip")
1470
1416
  },
1471
1417
  // advanced fields
1472
1418
  retries: {
1473
1419
  order: 1,
1474
- tooltip: y("gateway_services.form.fields.retries.tooltip")
1420
+ tooltip: p("gateway_services.form.fields.retries.tooltip")
1475
1421
  },
1476
1422
  connect_timeout: {
1477
1423
  order: 2,
1478
- tooltip: y("gateway_services.form.fields.connect_timeout.tooltip")
1424
+ tooltip: p("gateway_services.form.fields.connect_timeout.tooltip")
1479
1425
  },
1480
1426
  write_timeout: {
1481
1427
  order: 3,
1482
- tooltip: y("gateway_services.form.fields.write_timeout.tooltip")
1428
+ tooltip: p("gateway_services.form.fields.write_timeout.tooltip")
1483
1429
  },
1484
1430
  read_timeout: {
1485
1431
  order: 4,
1486
- tooltip: y("gateway_services.form.fields.read_timeout.tooltip")
1432
+ tooltip: p("gateway_services.form.fields.read_timeout.tooltip")
1487
1433
  },
1488
1434
  client_certificate: {
1489
1435
  order: 5,
1490
- tooltip: y("gateway_services.form.fields.client_certificate.tooltip")
1436
+ tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
1491
1437
  },
1492
1438
  ca_certificates: {
1493
- type: kt.BadgeTag,
1494
- label: y("gateway_services.form.fields.ca_certificates.label"),
1439
+ type: at.BadgeTag,
1440
+ label: p("gateway_services.form.fields.ca_certificates.label"),
1495
1441
  order: 6
1496
1442
  },
1497
1443
  tls_verify: {
1498
- label: y("gateway_services.form.fields.tls_verify_enabled.label")
1444
+ label: p("gateway_services.form.fields.tls_verify_enabled.label")
1499
1445
  },
1500
1446
  tls_verify_depth: {
1501
1447
  hidden: !0
1502
1448
  }
1503
1449
  });
1504
- return (r, D) => (S(), U("div", rl, [
1505
- u(l(Vt), {
1450
+ return (a, P) => (S(), U("div", Ot, [
1451
+ d(o(nt), {
1506
1452
  config: n.config,
1507
1453
  "config-card-doc": n.configCardDoc,
1508
- "config-schema": Q.value,
1509
- "entity-type": l(Ne).GatewayService,
1510
- "fetch-url": s.value,
1454
+ "config-schema": q.value,
1455
+ "entity-type": o(Fe).GatewayService,
1456
+ "fetch-url": r.value,
1511
1457
  "hide-title": n.hideTitle,
1512
- "onFetch:error": D[0] || (D[0] = (P) => r.$emit("fetch:error", P)),
1513
- "onFetch:success": D[1] || (D[1] = (P) => r.$emit("fetch:success", P)),
1514
- onLoading: D[2] || (D[2] = (P) => r.$emit("loading", P))
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))
1515
1461
  }, {
1516
- "enabled-label-tooltip": v(() => [
1517
- u(l(p), {
1462
+ "enabled-label-tooltip": f(() => [
1463
+ d(o(c), {
1518
1464
  keypath: "gateway_services.form.fields.enabled.tooltip",
1519
1465
  scope: "global"
1520
1466
  }, {
1521
- false: v(() => [
1522
- I("code", null, E(l(y)("gateway_services.form.fields.enabled.false")), 1)
1467
+ false: f(() => [
1468
+ k("code", null, y(o(p)("gateway_services.form.fields.enabled.false")), 1)
1523
1469
  ]),
1524
- true: v(() => [
1525
- I("code", null, E(l(y)("gateway_services.form.fields.enabled.true")), 1)
1470
+ true: f(() => [
1471
+ k("code", null, y(o(p)("gateway_services.form.fields.enabled.true")), 1)
1526
1472
  ]),
1527
1473
  _: 1
1528
1474
  })
1529
1475
  ]),
1530
- "ca_certificates-label-tooltip": v(() => [
1531
- u(l(p), {
1476
+ "ca_certificates-label-tooltip": f(() => [
1477
+ d(o(c), {
1532
1478
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1533
1479
  scope: "global"
1534
1480
  }, {
1535
- code1: v(() => [
1536
- I("code", null, E(l(y)("gateway_services.form.fields.ca_certificates.code1")), 1)
1481
+ code1: f(() => [
1482
+ k("code", null, y(o(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
1537
1483
  ]),
1538
- code2: v(() => [
1539
- I("code", null, E(l(y)("gateway_services.form.fields.ca_certificates.code2")), 1)
1484
+ code2: f(() => [
1485
+ k("code", null, y(o(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
1540
1486
  ]),
1541
1487
  _: 1
1542
1488
  })
1543
1489
  ]),
1544
- "tls_verify-label-tooltip": v(() => [
1545
- u(l(p), {
1490
+ "tls_verify-label-tooltip": f(() => [
1491
+ d(o(c), {
1546
1492
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1547
1493
  scope: "global"
1548
1494
  }, {
1549
- code1: v(() => [
1550
- I("code", null, E(l(y)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1495
+ code1: f(() => [
1496
+ k("code", null, y(o(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1551
1497
  ]),
1552
1498
  _: 1
1553
1499
  })
1554
1500
  ]),
1555
- tls_verify: v((P) => [
1556
- J(E(typeof l(b)("rowValue", P) == "boolean" ? M("rowValue", P) : l(y)("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)
1557
1503
  ]),
1558
- client_certificate: v((P) => [
1559
- J(E(l(b)("rowValue", P) ? l(b)("rowValue", P).id : "–"), 1)
1504
+ client_certificate: f((C) => [
1505
+ R(y(o(x)("rowValue", C) ? o(x)("rowValue", C).id : "–"), 1)
1560
1506
  ]),
1561
1507
  _: 1
1562
1508
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
1563
1509
  ]));
1564
1510
  }
1565
1511
  });
1566
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1567
- const Je = () => {
1568
- };
1569
- function sl(n, K) {
1570
- function y(...p) {
1571
- return new Promise((s, b) => {
1572
- Promise.resolve(n(() => K.apply(this, p), { fn: K, thisArg: this, args: p })).then(s).catch(b);
1573
- });
1574
- }
1575
- return y;
1576
- }
1577
- function al(n, K = {}) {
1578
- let y, p, s = Je;
1579
- const b = (r) => {
1580
- clearTimeout(r), s(), s = Je;
1581
- };
1582
- let M;
1583
- return (r) => {
1584
- const D = He(n), P = He(K.maxWait);
1585
- return y && b(y), D <= 0 || P !== void 0 && P <= 0 ? (p && (b(p), p = null), Promise.resolve(r())) : new Promise((ie, ne) => {
1586
- s = K.rejectOnCancel ? ne : ie, M = r, P && !p && (p = setTimeout(() => {
1587
- y && b(y), p = null, ie(M());
1588
- }, P)), y = setTimeout(() => {
1589
- p && b(p), p = null, ie(r());
1590
- }, D);
1591
- });
1592
- };
1593
- }
1594
- function qe(n, K = 200, y = {}) {
1595
- return sl(
1596
- al(K, y),
1597
- n
1598
- );
1599
- }
1600
- const le = {
1601
- name: "Kong-Air-Flights-API",
1602
- tags: [],
1603
- protocol: "https",
1604
- path: "/flights",
1605
- read_timeout: 6e4,
1606
- retries: 5,
1607
- host: "api.kong-air.com",
1608
- connect_timeout: 6e4,
1609
- ca_certificates: null,
1610
- client_certificate: null,
1611
- write_timeout: 6e4,
1612
- port: 443
1613
- }, nl = { class: "kong-ui-entities-gateway-service-form" }, cl = {
1614
- key: 0,
1615
- class: "gateway-service-form-general-info"
1616
- }, ul = { class: "gateway-service-form-group-selection-wrapper" }, dl = {
1617
- key: 0,
1618
- class: "gateway-service-form-group-fields"
1619
- }, fl = {
1620
- key: 0,
1621
- class: "gateway-service-form-group-fields"
1622
- }, pl = { key: 0 }, ml = {
1623
- key: 0,
1624
- class: "gateway-service-form-advanced-fields"
1625
- }, vl = { class: "gateway-service-form-margin-bottom" }, gl = { class: "gateway-service-form-margin-bottom" }, yl = { class: "gateway-service-form-margin-bottom" }, _l = { class: "gateway-service-form-margin-bottom" }, bl = {
1626
- key: 0,
1627
- class: "gateway-service-form-margin-bottom"
1628
- }, hl = {
1629
- key: 1,
1630
- class: "gateway-service-form-margin-bottom"
1631
- }, wl = {
1632
- key: 2,
1633
- class: "gateway-service-form-margin-bottom"
1634
- }, kl = {
1635
- key: 0,
1636
- class: "checkbox-aligned-radio"
1637
- }, Vl = {
1638
- key: 1,
1639
- class: "checkbox-aligned-radio"
1640
- }, Cl = { class: "gateway-service-form-tags" }, Sl = { class: "form-error-list" }, Il = /* @__PURE__ */ Le({
1641
- __name: "GatewayServiceForm",
1642
- props: {
1643
- /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
1644
- config: {
1645
- type: Object,
1646
- required: !0,
1647
- 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)
1648
- },
1649
- /** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
1650
- gatewayServiceId: {
1651
- type: String,
1652
- required: !1,
1653
- default: ""
1654
- },
1655
- /** Whether show or hide EntityFormSection info column */
1656
- hideSectionsInfo: {
1657
- type: Boolean,
1658
- required: !1,
1659
- default: !1
1660
- },
1661
- /** Whether show or hide Try sample API button */
1662
- hideTrySampleApiButton: {
1663
- type: Boolean,
1664
- required: !1,
1665
- default: !1
1666
- }
1667
- },
1668
- emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
1669
- setup(n, { expose: K, emit: y }) {
1670
- var h;
1671
- const p = y, s = n, b = q(!0), M = Ge(), { i18nT: Q, i18n: { t: r } } = me.useI18n(), { getErrorFieldsFromError: D } = Ye(), { axiosInstance: P } = Oe((h = s.config) == null ? void 0 : h.axiosRequestConfig), ie = et(), { validateHost: ne, validatePath: Y, validatePort: we, validateProtocol: ce } = me.useUrlValidators(), { objectsAreEqual: x } = ot(), ge = k(() => ve.form[s.config.app].edit), z = k(() => s.gatewayServiceId ? Be.Edit : Be.Create), Ie = q(!1), o = k(() => !!s.gatewayServiceId), w = q(o.value ? "protocol" : "url"), re = me.usePortFromProtocol(), ye = q(""), ke = k(() => !!ye.value || !!ee("name")), e = Me({
1672
- fields: {
1673
- name: "",
1674
- protocol: "http",
1675
- host: "",
1676
- path: "",
1677
- port: 80,
1678
- url: "",
1679
- retries: 5,
1680
- connect_timeout: 6e4,
1681
- write_timeout: 6e4,
1682
- read_timeout: 6e4,
1683
- client_certificate: "",
1684
- ca_certificates: "",
1685
- tls_verify_enabled: !1,
1686
- tls_verify_value: !1,
1687
- tags: ""
1688
- },
1689
- isReadonly: !1,
1690
- errorMessages: [],
1691
- formFieldErrors: {
1692
- host: "",
1693
- port: "",
1694
- path: "",
1695
- name: "",
1696
- url: "",
1697
- tags: "",
1698
- retries: "",
1699
- connect_timeout: "",
1700
- write_timeout: "",
1701
- read_timeout: "",
1702
- client_certificate: "",
1703
- ca_certificates: "",
1704
- tls_verify_enabled: "",
1705
- tls_verify_value: ""
1706
- }
1707
- }), A = Me({
1708
- name: "",
1709
- protocol: "http",
1710
- host: "",
1711
- path: "",
1712
- port: 80,
1713
- url: "",
1714
- retries: 5,
1715
- connect_timeout: 6e4,
1716
- write_timeout: 6e4,
1717
- read_timeout: 6e4,
1718
- client_certificate: "",
1719
- ca_certificates: "",
1720
- tls_verify_enabled: !1,
1721
- tls_verify_value: !1,
1722
- tags: ""
1723
- }), ue = s.config.app === "konnect" || tt({
1724
- gatewayInfo: s.config.gatewayInfo,
1725
- // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
1726
- supportedRange: {
1727
- enterprise: ["3.0"]
1728
- }
1729
- }), O = [
1730
- {
1731
- label: r("gateway_services.form.fields.protocol.options.http"),
1732
- value: "http",
1733
- group: "http"
1734
- },
1735
- {
1736
- label: r("gateway_services.form.fields.protocol.options.https"),
1737
- value: "https",
1738
- group: "http"
1739
- },
1740
- {
1741
- label: r("gateway_services.form.fields.protocol.options.tcp"),
1742
- value: "tcp",
1743
- group: "tcp"
1744
- },
1745
- {
1746
- label: r("gateway_services.form.fields.protocol.options.tls"),
1747
- value: "tls",
1748
- group: "tcp"
1749
- },
1750
- {
1751
- label: r("gateway_services.form.fields.protocol.options.tls_passthrough"),
1752
- value: "tls_passthrough",
1753
- group: "tcp"
1754
- },
1755
- {
1756
- label: r("gateway_services.form.fields.protocol.options.grpc"),
1757
- value: "grpc",
1758
- group: "grpc"
1759
- },
1760
- {
1761
- label: r("gateway_services.form.fields.protocol.options.grpcs"),
1762
- value: "grpcs",
1763
- group: "grpc"
1764
- },
1765
- ...ue ? [
1766
- {
1767
- label: r("gateway_services.form.fields.protocol.options.ws"),
1768
- value: "ws",
1769
- group: "websocket"
1770
- },
1771
- {
1772
- label: r("gateway_services.form.fields.protocol.options.wss"),
1773
- value: "wss",
1774
- group: "websocket"
1775
- }
1776
- ] : [],
1777
- {
1778
- label: r("gateway_services.form.fields.protocol.options.udp"),
1779
- value: "udp",
1780
- group: "udp"
1781
- }
1782
- ], se = { url: "url", protocol: "protocol" }, Pe = (t, a) => {
1783
- a.value;
1784
- }, oe = (t) => t ? parseFloat(t) : 0, Ve = () => {
1785
- e.fields.host = A.host, e.fields.path = A.path, e.fields.port = A.port, e.fields.protocol = A.protocol, e.fields.url = A.url, e.fields.retries = A.retries, e.fields.connect_timeout = A.connect_timeout, e.fields.write_timeout = A.write_timeout, e.fields.read_timeout = A.read_timeout, e.fields.client_certificate = A.client_certificate, e.fields.ca_certificates = A.ca_certificates, e.fields.tls_verify_enabled = A.tls_verify_enabled, e.fields.tls_verify_value = A.tls_verify_value;
1786
- }, Ce = () => {
1787
- b.value = !0, Z(), e.errorMessages = [], Ve();
1788
- }, de = () => {
1789
- switch (Ve(), e.fields.name = `${le.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, w.value) {
1790
- case "url":
1791
- e.fields.url = `${le.protocol}://${le.host}${le.path}`;
1792
- break;
1793
- case "protocol":
1794
- e.fields.host = le.host, e.fields.path = le.path, e.fields.protocol = le.protocol, e.fields.port = le.port;
1795
- break;
1796
- default:
1797
- e.fields.url = `${le.protocol}://${le.host}${le.path}`;
1798
- }
1799
- }, _e = qe(() => {
1800
- if (Z(), e.fields.url.length)
1801
- try {
1802
- const t = new URL(e.fields.url), a = ce(t.protocol, O);
1803
- if (a) throw new Error(a);
1804
- e.fields.protocol = t.protocol.slice(0, -1);
1805
- const F = ne(t.hostname);
1806
- if (F) throw new Error(F);
1807
- e.fields.host = t.hostname;
1808
- const j = Y(t.pathname);
1809
- if (j) throw new Error(j);
1810
- e.fields.path = t.pathname;
1811
- const $ = we(t.port);
1812
- if ($) throw new Error($);
1813
- const R = Number(t.port);
1814
- Ie.value = !!R, e.fields.port = R || re.getPortFromProtocol(e.fields.protocol), p("url-valid:success");
1815
- } catch {
1816
- p("url-valid:error", r("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = r("gateway_services.form.errors.url.invalid");
1817
- }
1818
- }, 300), be = qe((t) => {
1819
- Z(t);
1820
- }, 300), Ee = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), ee = (t) => {
1821
- if (e.errorMessages.length) return "";
1822
- const a = e.formFieldErrors;
1823
- return a[t] ? a[t] : "";
1824
- }, H = qe((t) => {
1825
- Z(t ?? void 0);
1826
- const a = ne(e.fields.host);
1827
- a && (e.formFieldErrors.host = a);
1828
- const F = Y(e.fields.path);
1829
- F && (e.formFieldErrors.path = F);
1830
- const j = we(e.fields.port);
1831
- j && (e.formFieldErrors.port = j), te.value ? p("url-valid:success") : p("url-valid:error", e.errorMessages.join(",") || r("gateway_services.form.errors.url.invalid"));
1832
- }, 300), Z = (t) => {
1833
- if (t)
1834
- e.formFieldErrors[t] = "";
1835
- else
1836
- for (let a in e.formFieldErrors)
1837
- e.formFieldErrors[a] = "";
1838
- e.errorMessages = [];
1839
- }, te = k(() => {
1840
- for (let t in e.formFieldErrors)
1841
- if (e.formFieldErrors[t].length)
1842
- return !1;
1843
- return !0;
1844
- }), ae = () => {
1845
- e.fields.url && w.value === "url" ? _e() : H();
1846
- }, i = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, d = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), V = k(() => {
1847
- if (w.value === "url")
1848
- return !0;
1849
- const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1850
- return w.value === "protocol" && t;
1851
- }), X = k(() => {
1852
- if (w.value === "url")
1853
- return !0;
1854
- const t = ["https", "tls"].includes(e.fields.protocol);
1855
- return w.value === "protocol" && t;
1856
- }), L = k(() => {
1857
- if (w.value === "url")
1858
- return !0;
1859
- const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1860
- return w.value === "protocol" && t;
1861
- }), T = (t) => {
1862
- Z("name"), ye.value = ie.utf8Name(t);
1863
- }, c = k(() => {
1864
- const t = !o.value || !x(e.fields, A), a = w.value === "url" && !!e.fields.url && te.value, F = w.value === "protocol" && !!e.fields.host && te.value;
1865
- return t && (a || F);
1866
- }), g = (t) => {
1867
- var a, F, j;
1868
- e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((a = t == null ? void 0 : t.tags) == null ? void 0 : a.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 = ((F = t == null ? void 0 : t.ca_certificates) == null ? void 0 : F.join(",")) || "", e.fields.client_certificate = ((j = t == null ? void 0 : t.client_certificate) == null ? void 0 : j.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(A, e.fields);
1869
- }, m = () => {
1870
- M.push(s.config.cancelRoute);
1871
- }, C = k(() => {
1872
- var a, F;
1873
- let t = `${s.config.apiBaseUrl}${ve.form[s.config.app].validate}`;
1874
- return s.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((a = s.config) == null ? void 0 : a.controlPlaneId) || "") : s.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (F = s.config) != null && F.workspace ? `/${s.config.workspace}` : "")), t = t.replace(/{id}/gi, s.gatewayServiceId), t;
1875
- }), W = k(() => {
1876
- var a, F;
1877
- let t = `${s.config.apiBaseUrl}${ve.form[s.config.app][z.value]}`;
1878
- return s.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((a = s.config) == null ? void 0 : a.controlPlaneId) || "") : s.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (F = s.config) != null && F.workspace ? `/${s.config.workspace}` : "")), t = t.replace(/{id}/gi, s.gatewayServiceId), t;
1879
- }), fe = (t) => {
1880
- let a = "";
1881
- t.url && (a = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(a)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
1882
- }, N = k(() => {
1883
- var a, F, j, $;
1884
- const t = {
1885
- name: e.fields.name || null,
1886
- tags: e.fields.tags ? (j = (F = (a = e.fields.tags) == null ? void 0 : a.split(",")) == null ? void 0 : F.map((R) => String(R || "").trim())) == null ? void 0 : j.filter((R) => R !== "") : null,
1887
- protocol: e.fields.protocol,
1888
- path: e.fields.path || null,
1889
- read_timeout: e.fields.read_timeout,
1890
- retries: e.fields.retries,
1891
- host: e.fields.host,
1892
- connect_timeout: e.fields.connect_timeout,
1893
- tls_verify_value: e.fields.tls_verify_value,
1894
- tls_verify_enabled: e.fields.tls_verify_enabled,
1895
- ca_certificates: e.fields.ca_certificates ? ($ = e.fields.ca_certificates) == null ? void 0 : $.split(",").filter((R) => R !== "") : null,
1896
- client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
1897
- write_timeout: e.fields.write_timeout,
1898
- port: e.fields.port,
1899
- url: e.fields.url
1900
- };
1901
- 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), d.value || (t.path = null), z.value === "create" ? w.value === "url" ? (delete t.protocol, delete t.host, delete t.path, s.config.app === "konnect" && delete t.port) : delete t.url : z.value === "edit" && delete t.url, t;
1902
- }), pe = async () => {
1903
- var t, a, F, j;
1904
- try {
1905
- e.isReadonly = !0, ae();
1906
- const $ = N.value;
1907
- fe($);
1908
- let R;
1909
- if (await P.post(C.value, $), z.value === "create" ? R = await P.post(W.value, $) : z.value === "edit" && (R = ((t = s.config) == null ? void 0 : t.app) === "konnect" ? await P.put(W.value, $) : await P.patch(W.value, $)), R) {
1910
- const { data: f } = R;
1911
- e.fields.name = (f == null ? void 0 : f.name) || "", e.fields.port = f.port || re.getPortFromProtocol(f.protocol), e.fields.protocol = (f == null ? void 0 : f.protocol) || "http", e.fields.host = (f == null ? void 0 : f.host) || "", e.fields.path = (f == null ? void 0 : f.path) || "", e.fields.url = (f == null ? void 0 : f.url) || "", e.fields.retries = f != null && f.retries || (f == null ? void 0 : f.retries) === 0 ? f == null ? void 0 : f.retries : 5, e.fields.connect_timeout = f != null && f.connect_timeout || (f == null ? void 0 : f.connect_timeout) === 0 ? f == null ? void 0 : f.connect_timeout : 6e4, e.fields.write_timeout = f != null && f.write_timeout || (f == null ? void 0 : f.write_timeout) === 0 ? f == null ? void 0 : f.write_timeout : 6e4, e.fields.read_timeout = f != null && f.read_timeout || (f == null ? void 0 : f.read_timeout) === 0 ? f == null ? void 0 : f.read_timeout : 6e4, e.fields.client_certificate = ((a = f == null ? void 0 : f.client_certificate) == null ? void 0 : a.id) || "", e.fields.ca_certificates = (F = f == null ? void 0 : f.ca_certificates) != null && F.length ? f == null ? void 0 : f.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (f == null ? void 0 : f.tls_verify) !== "" && (f == null ? void 0 : f.tls_verify) !== null && (f == null ? void 0 : f.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (f == null ? void 0 : f.tls_verify), e.fields.tags = (j = f == null ? void 0 : f.tags) != null && j.length ? f.tags.join(", ") : "", Object.assign(A, e.fields), p("update", R == null ? void 0 : R.data);
1912
- }
1913
- return R;
1914
- } catch ($) {
1915
- const { fields: R, messages: f } = D($);
1916
- e.errorMessages = f, R.length && R.forEach((he) => {
1917
- const Se = he.field;
1918
- Se === "client_certificate.id" ? e.formFieldErrors.client_certificate = he.message : Se.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = he.message : Object.keys(e.formFieldErrors).includes(Se) && (e.formFieldErrors = {
1919
- ...e.formFieldErrors,
1920
- [Se]: he.message
1921
- });
1922
- }), p("error", $);
1923
- } finally {
1924
- e.isReadonly = !1;
1925
- }
1926
- };
1927
- return Ue(() => s.gatewayServiceId, () => {
1928
- Object.assign(e.fields, A);
1929
- }), Ue(e.fields, (t) => {
1930
- e.fields.port = re.getPortFromProtocol(t.protocol, String(t.port)), p("model-updated", N.value);
1931
- }), Qe(() => {
1932
- p("model-updated", N.value), o.value || (e.fields.name = i());
1933
- }), K({
1934
- validateUrl: ae,
1935
- getPayload: N,
1936
- saveFormData: pe,
1937
- canSubmit: c,
1938
- initForm: g
1939
- }), (t, a) => {
1940
- const F = G("KRadio"), j = G("KButton"), $ = G("KInput"), R = G("KSelect"), f = G("KCheckbox"), he = G("KCollapse"), Se = G("KAlert");
1941
- return S(), U("div", nl, [
1942
- u(l(lt), {
1943
- "can-submit": c.value,
1944
- config: n.config,
1945
- "edit-id": n.gatewayServiceId,
1946
- "entity-type": l(Ne).GatewayService,
1947
- "fetch-url": ge.value,
1948
- "form-fields": N.value,
1949
- "is-readonly": e.isReadonly,
1950
- onCancel: m,
1951
- "onFetch:error": a[30] || (a[30] = (_) => t.$emit("error", _)),
1952
- "onFetch:success": g,
1953
- onLoading: a[31] || (a[31] = (_) => t.$emit("loading", _)),
1954
- onSubmit: pe
1955
- }, {
1956
- "form-actions": v(() => [
1957
- Xe(t.$slots, "form-actions", {
1958
- canSubmit: c.value,
1959
- cancel: m,
1960
- submit: pe
1961
- }, void 0, !0)
1962
- ]),
1963
- default: v(() => [
1964
- u(l(Ke), {
1965
- description: l(r)("gateway_services.form.sections.keys.description"),
1966
- "hide-info-header": n.hideSectionsInfo,
1967
- title: l(r)("gateway_services.form.sections.keys.title")
1968
- }, {
1969
- default: v(() => [
1970
- o.value ? B("", !0) : (S(), U("div", cl, [
1971
- I("div", ul, [
1972
- u(F, {
1973
- modelValue: w.value,
1974
- "onUpdate:modelValue": a[0] || (a[0] = (_) => w.value = _),
1975
- card: "",
1976
- "card-orientation": "horizontal",
1977
- "data-testid": "gateway-service-url-radio",
1978
- description: l(r)("gateway_services.form.sections.keys.url.description"),
1979
- label: l(r)("gateway_services.form.sections.keys.url.label"),
1980
- "selected-value": se.url,
1981
- onChange: Ce
1982
- }, null, 8, ["modelValue", "description", "label", "selected-value"]),
1983
- u(F, {
1984
- modelValue: w.value,
1985
- "onUpdate:modelValue": a[1] || (a[1] = (_) => w.value = _),
1986
- card: "",
1987
- "card-orientation": "horizontal",
1988
- "checked-group": "protocol",
1989
- "data-testid": "gateway-service-protocol-radio",
1990
- description: l(r)("gateway_services.form.sections.keys.protocol.description"),
1991
- label: l(r)("gateway_services.form.sections.keys.protocol.label"),
1992
- "selected-value": se.protocol,
1993
- onChange: Ce
1994
- }, null, 8, ["modelValue", "description", "label", "selected-value"])
1995
- ]),
1996
- u(De, { name: "slide-fade" }, {
1997
- default: v(() => [
1998
- w.value === "url" ? (S(), U("div", dl, [
1999
- u($, {
2000
- modelValue: e.fields.url,
2001
- "onUpdate:modelValue": a[2] || (a[2] = (_) => e.fields.url = _),
2002
- modelModifiers: { trim: !0 },
2003
- class: "gateway-service-url-input gateway-service-form-margin-bottom",
2004
- "data-testid": "gateway-service-url-input",
2005
- error: Ee.value,
2006
- "error-message": ee("url"),
2007
- label: l(r)("gateway_services.form.fields.upstream_url.label"),
2008
- "label-attributes": {
2009
- info: n.config.app === "konnect" ? l(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : l(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
2010
- tooltipAttributes: { maxWidth: "400" }
2011
- },
2012
- name: "url",
2013
- placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
2014
- required: "",
2015
- onInput: l(_e)
2016
- }, Re({ _: 2 }, [
2017
- n.hideTrySampleApiButton ? void 0 : {
2018
- name: "after",
2019
- fn: v(() => [
2020
- u(j, {
2021
- appearance: "tertiary",
2022
- size: "small",
2023
- onClick: de
2024
- }, {
2025
- default: v(() => [
2026
- J(E(l(r)("gateway_services.form.buttons.try_sample")), 1)
2027
- ]),
2028
- _: 1
2029
- })
2030
- ]),
2031
- key: "0"
2032
- }
2033
- ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "onInput"])
2034
- ])) : B("", !0)
2035
- ]),
2036
- _: 1
2037
- })
2038
- ])),
2039
- u(De, { name: "slide-fade" }, {
2040
- default: v(() => [
2041
- w.value === "protocol" || o.value ? (S(), U("div", fl, [
2042
- u(R, {
2043
- modelValue: e.fields.protocol,
2044
- "onUpdate:modelValue": a[3] || (a[3] = (_) => e.fields.protocol = _),
2045
- "data-testid": "gateway-service-protocol-select",
2046
- items: O,
2047
- label: l(r)("gateway_services.form.fields.protocol.label"),
2048
- "label-attributes": {
2049
- info: l(r)("gateway_services.form.fields.protocol.tooltip"),
2050
- tooltipAttributes: { maxWidth: "400" }
2051
- },
2052
- readonly: e.isReadonly,
2053
- required: "",
2054
- width: "100%",
2055
- onSelected: a[4] || (a[4] = (_) => Pe(e.fields.protocol, _))
2056
- }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
2057
- u($, {
2058
- modelValue: e.fields.host,
2059
- "onUpdate:modelValue": a[5] || (a[5] = (_) => e.fields.host = _),
2060
- modelModifiers: { trim: !0 },
2061
- class: "gateway-service-form-margin-top",
2062
- "data-testid": "gateway-service-host-input",
2063
- error: !!e.formFieldErrors.host,
2064
- "error-message": ee("host"),
2065
- label: l(r)("gateway_services.form.fields.host.label"),
2066
- "label-attributes": {
2067
- info: l(r)("gateway_services.form.fields.host.tooltip"),
2068
- tooltipAttributes: { maxWidth: "400" }
2069
- },
2070
- name: "host",
2071
- placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
2072
- required: "",
2073
- onInput: a[6] || (a[6] = (_) => l(H)("host"))
2074
- }, Re({ _: 2 }, [
2075
- n.hideTrySampleApiButton ? void 0 : {
2076
- name: "after",
2077
- fn: v(() => [
2078
- u(j, {
2079
- appearance: "tertiary",
2080
- size: "small",
2081
- onClick: de
2082
- }, {
2083
- default: v(() => [
2084
- J(E(l(r)("gateway_services.form.buttons.try_sample")), 1)
2085
- ]),
2086
- _: 1
2087
- })
2088
- ]),
2089
- key: "0"
2090
- }
2091
- ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
2092
- d.value ? (S(), U("div", pl, [
2093
- u($, {
2094
- modelValue: e.fields.path,
2095
- "onUpdate:modelValue": a[7] || (a[7] = (_) => e.fields.path = _),
2096
- modelModifiers: { trim: !0 },
2097
- class: "gateway-service-form-margin-top",
2098
- "data-testid": "gateway-service-path-input",
2099
- error: !!e.formFieldErrors.path,
2100
- "error-message": ee("path"),
2101
- label: l(r)("gateway_services.form.fields.path.label"),
2102
- "label-attributes": {
2103
- info: l(r)("gateway_services.form.fields.path.tooltip"),
2104
- tooltipAttributes: { maxWidth: "400" }
2105
- },
2106
- name: "path",
2107
- placeholder: l(r)("gateway_services.form.fields.path.placeholder"),
2108
- onInput: a[8] || (a[8] = (_) => l(H)("path"))
2109
- }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
2110
- ])) : B("", !0),
2111
- u($, {
2112
- modelValue: e.fields.port,
2113
- "onUpdate:modelValue": [
2114
- a[9] || (a[9] = (_) => e.fields.port = _),
2115
- a[11] || (a[11] = () => {
2116
- e.fields.port = oe(e.fields.port + "");
2117
- })
2118
- ],
2119
- class: "gateway-service-form-margin-top",
2120
- "data-testid": "gateway-service-port-input",
2121
- error: !!e.formFieldErrors.port,
2122
- "error-message": ee("port"),
2123
- label: l(r)("gateway_services.form.fields.port.label"),
2124
- "label-attributes": {
2125
- info: l(r)("gateway_services.form.fields.port.tooltip"),
2126
- tooltipAttributes: { maxWidth: "400" }
2127
- },
2128
- name: "port",
2129
- type: "number",
2130
- onInput: a[10] || (a[10] = (_) => l(H)("port"))
2131
- }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
2132
- ])) : B("", !0)
2133
- ]),
2134
- _: 1
2135
- }),
2136
- u(he, {
2137
- modelValue: b.value,
2138
- "onUpdate:modelValue": a[27] || (a[27] = (_) => b.value = _),
2139
- "data-testid": "advanced-fields-collapse",
2140
- "trigger-alignment": "leading",
2141
- "trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
2142
- }, {
2143
- default: v(() => [
2144
- u(De, { name: "slide-fade" }, {
2145
- default: v(() => [
2146
- b.value ? B("", !0) : (S(), U("div", ml, [
2147
- I("div", vl, [
2148
- u($, {
2149
- modelValue: e.fields.retries,
2150
- "onUpdate:modelValue": [
2151
- a[12] || (a[12] = (_) => e.fields.retries = _),
2152
- a[13] || (a[13] = () => {
2153
- e.fields.retries = oe(e.fields.retries + "");
2154
- })
2155
- ],
2156
- autocomplete: "off",
2157
- "data-testid": "gateway-service-retries-input",
2158
- label: l(r)("gateway_services.form.fields.retries.label"),
2159
- "label-attributes": {
2160
- info: l(r)("gateway_services.form.fields.retries.tooltip"),
2161
- tooltipAttributes: { maxWidth: "400" }
2162
- },
2163
- name: "retries",
2164
- readonly: e.isReadonly,
2165
- type: "number"
2166
- }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2167
- ]),
2168
- I("div", gl, [
2169
- u($, {
2170
- modelValue: e.fields.connect_timeout,
2171
- "onUpdate:modelValue": [
2172
- a[14] || (a[14] = (_) => e.fields.connect_timeout = _),
2173
- a[15] || (a[15] = () => {
2174
- e.fields.connect_timeout = oe(e.fields.connect_timeout + "");
2175
- })
2176
- ],
2177
- autocomplete: "off",
2178
- "data-testid": "gateway-service-connTimeout-input",
2179
- label: l(r)("gateway_services.form.fields.connect_timeout.label"),
2180
- "label-attributes": {
2181
- info: l(r)("gateway_services.form.fields.connect_timeout.tooltip"),
2182
- tooltipAttributes: { maxWidth: "400" }
2183
- },
2184
- name: "connTimeout",
2185
- readonly: e.isReadonly,
2186
- type: "number"
2187
- }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2188
- ]),
2189
- I("div", yl, [
2190
- u($, {
2191
- modelValue: e.fields.write_timeout,
2192
- "onUpdate:modelValue": [
2193
- a[16] || (a[16] = (_) => e.fields.write_timeout = _),
2194
- a[17] || (a[17] = () => {
2195
- e.fields.write_timeout = oe(e.fields.write_timeout + "");
2196
- })
2197
- ],
2198
- autocomplete: "off",
2199
- "data-testid": "gateway-service-writeTimeout-input",
2200
- label: l(r)("gateway_services.form.fields.write_timeout.label"),
2201
- "label-attributes": {
2202
- info: l(r)("gateway_services.form.fields.write_timeout.tooltip"),
2203
- tooltipAttributes: { maxWidth: "400" }
2204
- },
2205
- name: "writeTimeout",
2206
- readonly: e.isReadonly,
2207
- type: "number"
2208
- }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2209
- ]),
2210
- I("div", _l, [
2211
- u($, {
2212
- modelValue: e.fields.read_timeout,
2213
- "onUpdate:modelValue": [
2214
- a[18] || (a[18] = (_) => e.fields.read_timeout = _),
2215
- a[19] || (a[19] = () => {
2216
- e.fields.read_timeout = oe(e.fields.read_timeout + "");
2217
- })
2218
- ],
2219
- autocomplete: "off",
2220
- "data-testid": "gateway-service-readTimeout-input",
2221
- label: l(r)("gateway_services.form.fields.read_timeout.label"),
2222
- "label-attributes": {
2223
- info: l(r)("gateway_services.form.fields.read_timeout.tooltip"),
2224
- tooltipAttributes: { maxWidth: "400" }
2225
- },
2226
- name: "readTimeout",
2227
- readonly: e.isReadonly,
2228
- type: "number"
2229
- }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
2230
- ]),
2231
- V.value ? (S(), U("div", bl, [
2232
- u($, {
2233
- modelValue: e.fields.client_certificate,
2234
- "onUpdate:modelValue": a[20] || (a[20] = (_) => e.fields.client_certificate = _),
2235
- modelModifiers: { trim: !0 },
2236
- autocomplete: "off",
2237
- "data-testid": "gateway-service-clientCert-input",
2238
- error: !!e.formFieldErrors.client_certificate,
2239
- label: l(r)("gateway_services.form.fields.client_certificate.label"),
2240
- "label-attributes": {
2241
- info: l(r)("gateway_services.form.fields.client_certificate.tooltip"),
2242
- tooltipAttributes: { maxWidth: "400" }
2243
- },
2244
- name: "clientCert",
2245
- placeholder: l(r)("gateway_services.form.fields.client_certificate.placeholder"),
2246
- readonly: e.isReadonly,
2247
- type: "text",
2248
- onInput: a[21] || (a[21] = (_) => l(be)("client_certificate"))
2249
- }, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
2250
- ])) : B("", !0),
2251
- X.value ? (S(), U("div", hl, [
2252
- u($, {
2253
- modelValue: e.fields.ca_certificates,
2254
- "onUpdate:modelValue": a[22] || (a[22] = (_) => e.fields.ca_certificates = _),
2255
- modelModifiers: { trim: !0 },
2256
- autocomplete: "off",
2257
- "data-testid": "gateway-service-ca-certs-input",
2258
- error: !!e.formFieldErrors.ca_certificates,
2259
- label: l(r)("gateway_services.form.fields.ca_certificates.label"),
2260
- "label-attributes": { tooltipAttributes: { maxWidth: "400" } },
2261
- placeholder: l(r)("gateway_services.form.fields.ca_certificates.placeholder"),
2262
- readonly: e.isReadonly,
2263
- type: "text",
2264
- onInput: a[23] || (a[23] = (_) => l(be)("ca_certificates"))
2265
- }, {
2266
- "label-tooltip": v(() => [
2267
- u(l(Q), {
2268
- keypath: "gateway_services.form.fields.ca_certificates.tooltip",
2269
- scope: "global"
2270
- }, {
2271
- code1: v(() => [
2272
- I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
2273
- ]),
2274
- code2: v(() => [
2275
- I("code", null, E(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
2276
- ]),
2277
- _: 1
2278
- })
2279
- ]),
2280
- _: 1
2281
- }, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
2282
- ])) : B("", !0),
2283
- L.value ? (S(), U("div", wl, [
2284
- u(f, {
2285
- modelValue: e.fields.tls_verify_enabled,
2286
- "onUpdate:modelValue": a[24] || (a[24] = (_) => e.fields.tls_verify_enabled = _),
2287
- "data-testid": "gateway-service-tls-verify-checkbox",
2288
- description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
2289
- label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
2290
- "label-attributes": { tooltipAttributes: { maxWidth: "400" } }
2291
- }, {
2292
- tooltip: v(() => [
2293
- u(l(Q), {
2294
- keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
2295
- scope: "global"
2296
- }, {
2297
- code1: v(() => [
2298
- I("code", null, E(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
2299
- ]),
2300
- _: 1
2301
- })
2302
- ]),
2303
- _: 1
2304
- }, 8, ["modelValue", "description", "label"]),
2305
- e.fields.tls_verify_enabled ? (S(), U("div", kl, [
2306
- u(F, {
2307
- modelValue: e.fields.tls_verify_value,
2308
- "onUpdate:modelValue": a[25] || (a[25] = (_) => e.fields.tls_verify_value = _),
2309
- "data-testid": "gateway-service-tls-verify-true-option",
2310
- label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
2311
- "selected-value": !0
2312
- }, null, 8, ["modelValue", "label"])
2313
- ])) : B("", !0),
2314
- e.fields.tls_verify_enabled ? (S(), U("div", Vl, [
2315
- u(F, {
2316
- modelValue: e.fields.tls_verify_value,
2317
- "onUpdate:modelValue": a[26] || (a[26] = (_) => e.fields.tls_verify_value = _),
2318
- "data-testid": "gateway-service-tls-verify-false-option",
2319
- label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
2320
- "selected-value": !1
2321
- }, null, 8, ["modelValue", "label"])
2322
- ])) : B("", !0)
2323
- ])) : B("", !0)
2324
- ]))
2325
- ]),
2326
- _: 1
2327
- })
2328
- ]),
2329
- _: 1
2330
- }, 8, ["modelValue", "trigger-label"])
2331
- ]),
2332
- _: 1
2333
- }, 8, ["description", "hide-info-header", "title"]),
2334
- u(l(Ke), {
2335
- description: l(r)("gateway_services.form.sections.general.description"),
2336
- "hide-info-header": n.hideSectionsInfo,
2337
- title: l(r)("gateway_services.form.sections.general.title")
2338
- }, {
2339
- default: v(() => [
2340
- u($, {
2341
- modelValue: e.fields.name,
2342
- "onUpdate:modelValue": a[28] || (a[28] = (_) => e.fields.name = _),
2343
- modelModifiers: { trim: !0 },
2344
- autocomplete: "off",
2345
- "data-testid": "gateway-service-name-input",
2346
- error: ke.value,
2347
- "error-message": ye.value,
2348
- label: l(r)("gateway_services.form.fields.name.label"),
2349
- "label-attributes": {
2350
- info: l(r)("gateway_services.form.fields.name.tooltip"),
2351
- tooltipAttributes: { maxWidth: "400" }
2352
- },
2353
- name: "name",
2354
- placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
2355
- readonly: e.isReadonly,
2356
- type: "text",
2357
- onInput: T
2358
- }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
2359
- u(he, {
2360
- "data-testid": "tags-collapse",
2361
- "trigger-alignment": "leading",
2362
- "trigger-label": l(r)("gateway_services.form.fields.tags.collapse")
2363
- }, {
2364
- default: v(() => [
2365
- I("div", Cl, [
2366
- u($, {
2367
- modelValue: e.fields.tags,
2368
- "onUpdate:modelValue": a[29] || (a[29] = (_) => e.fields.tags = _),
2369
- modelModifiers: { trim: !0 },
2370
- autocomplete: "off",
2371
- "data-testid": "gateway-service-tags-input",
2372
- help: l(r)("gateway_services.form.fields.tags.help"),
2373
- label: l(r)("gateway_services.form.fields.tags.label"),
2374
- "label-attributes": {
2375
- info: l(r)("gateway_services.form.fields.tags.tooltip"),
2376
- tooltipAttributes: { maxWidth: "400" }
2377
- },
2378
- name: "tags",
2379
- placeholder: l(r)("gateway_services.form.fields.tags.placeholder"),
2380
- readonly: e.isReadonly,
2381
- type: "text"
2382
- }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
2383
- ])
2384
- ]),
2385
- _: 1
2386
- }, 8, ["trigger-label"])
2387
- ]),
2388
- _: 1
2389
- }, 8, ["description", "hide-info-header", "title"]),
2390
- e.errorMessages.length ? (S(), $e(Se, {
2391
- key: 0,
2392
- appearance: "danger"
2393
- }, {
2394
- default: v(() => [
2395
- I("ul", Sl, [
2396
- (S(!0), U(rt, null, st(e.errorMessages, (_) => (S(), U("li", { key: _ }, E(_), 1))), 128))
2397
- ])
2398
- ]),
2399
- _: 1
2400
- })) : B("", !0)
2401
- ]),
2402
- _: 3
2403
- }, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
2404
- ]);
2405
- };
2406
- }
2407
- }), Rl = /* @__PURE__ */ je(Il, [["__scopeId", "data-v-1e0946bb"]]);
2408
1512
  export {
2409
- Tl as GatewayServiceConfigCard,
2410
- Rl as GatewayServiceForm,
2411
- Al as GatewayServiceList,
2412
- xl as LegacyGatewayServiceForm
1513
+ Xt as GatewayServiceConfigCard,
1514
+ Qt as GatewayServiceForm,
1515
+ zt as GatewayServiceList
2413
1516
  };