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