@kong-ui-public/entities-gateway-services 3.26.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as qe, computed as h, ref as x, watch as Ke, onBeforeMount as ht, resolveComponent as $, openBlock as p, createElementBlock as w, createVNode as c, unref as t, createSlots as Ie, withCtx as n, createTextVNode as P, toDisplayString as _, createBlock as D, createCommentVNode as I, createElementVNode as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as
|
|
1
|
+
import { defineComponent as qe, computed as h, ref as x, watch as Ke, onBeforeMount as ht, resolveComponent as $, openBlock as p, createElementBlock as w, createVNode as c, unref as t, createSlots as Ie, withCtx as n, createTextVNode as P, toDisplayString as _, createBlock as D, createCommentVNode as I, createElementVNode as C, withModifiers as tt, Teleport as bt, Fragment as Fe, renderList as Le, reactive as ot, onMounted as wt, Transition as at, renderSlot as kt } from "vue";
|
|
2
|
+
import { useRouter as ft } from "vue-router";
|
|
3
|
+
import { BookIcon as rt, AddIcon as Ne, ServicesIcon as Ct, TrashIcon as St } from "@kong/icons";
|
|
4
4
|
import { createI18n as Vt, i18nTComponent as Et } from "@kong-ui-public/i18n";
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const Wt = { 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." } } }, Gt = { placeholder: { konnect: "Filter by name", kongManager: "Filter by exact name or ID" } }, Ot = { 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", select_placeholder: "Select a certificate", 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", select_placeholder: "Select CA certificates", 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" } } } }, jt = { 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" }, zt = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, Ht = { gateway_services: "gateway services" }, Zt = {
|
|
5
|
+
import { useAxios as pt, useTableState as It, useFetcher as Ft, useDeleteUrlBuilder as Pt, FetcherStatus as $t, EntityBaseTable as Tt, PermissionsWrapper as pe, TableTags as xt, EntityFilter as Rt, EntityToggleModal as Ut, EntityDeleteModal as At, EntityTypes as Dt, useHelpers as mt, ConfigurationSchemaType as Bt, ConfigurationSchemaSection as Me, EntityBaseConfigCard as Mt, SupportedEntityType as gt, useErrors as Kt, useValidators as Lt, useDebouncedFilter as nt, EntityBaseFormType as ct, useGatewayFeatureSupported as Nt, EntityBaseForm as qt, EntityFormSection as dt } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const Wt = { 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", description: "Deleting this gateway service will also remove any associated plugins. This action cannot be reversed.", 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." } } }, Gt = { placeholder: { konnect: "Filter by name", kongManager: "Filter by exact name or ID" } }, Ot = { 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", select_placeholder: "Select a certificate", 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", select_placeholder: "Select CA certificates", 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" } } } }, jt = { 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" }, zt = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, Ht = { gateway_services: "gateway services" }, Zt = {
|
|
7
7
|
actions: Wt,
|
|
8
8
|
search: Gt,
|
|
9
9
|
gateway_services: Ot,
|
|
@@ -12,20 +12,20 @@ const Wt = { create: "New gateway service", debugger: "Start debugging", serverl
|
|
|
12
12
|
glossary: Ht
|
|
13
13
|
};
|
|
14
14
|
function Qt() {
|
|
15
|
-
const
|
|
15
|
+
const l = Vt("en-us", Zt);
|
|
16
16
|
return {
|
|
17
|
-
i18n:
|
|
18
|
-
i18nT: Et(
|
|
17
|
+
i18n: l,
|
|
18
|
+
i18nT: Et(l)
|
|
19
19
|
// Translation component <i18n-t>
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function Jt() {
|
|
23
23
|
return {
|
|
24
|
-
getPortFromProtocol: (
|
|
25
|
-
const
|
|
26
|
-
if ((o || o === 0) && !
|
|
24
|
+
getPortFromProtocol: (K, m) => {
|
|
25
|
+
const d = [80, 443], o = Number(m);
|
|
26
|
+
if ((o || o === 0) && !d.includes(o))
|
|
27
27
|
return o;
|
|
28
|
-
switch (
|
|
28
|
+
switch (K) {
|
|
29
29
|
case "grpcs":
|
|
30
30
|
case "tls":
|
|
31
31
|
case "https":
|
|
@@ -37,42 +37,42 @@ function Jt() {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
const Xt = /^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*(\.)?$/, Yt = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/, ea = (
|
|
40
|
+
const Xt = /^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*(\.)?$/, Yt = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/, ea = (l) => /^[0-9A-Fa-f:.]+$/.test(l) && l.includes(":");
|
|
41
41
|
function ta() {
|
|
42
|
-
const { i18n: { t:
|
|
42
|
+
const { i18n: { t: l } } = oe.useI18n();
|
|
43
43
|
return {
|
|
44
|
-
validateHost: (
|
|
45
|
-
if (!
|
|
44
|
+
validateHost: (v) => {
|
|
45
|
+
if (!v || v.trim() === "") return l("gateway_services.form.errors.host.empty");
|
|
46
46
|
try {
|
|
47
|
-
if (ea(
|
|
48
|
-
return new URL("/", `https://[${
|
|
49
|
-
if (Xt.test(
|
|
50
|
-
return new URL("/", `https://${
|
|
47
|
+
if (ea(v))
|
|
48
|
+
return new URL("/", `https://[${v}]`), "";
|
|
49
|
+
if (Xt.test(v) || Yt.test(v))
|
|
50
|
+
return new URL("/", `https://${v}`), "";
|
|
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: (v, A) => !v || v.trim() === "" ? l("gateway_services.form.errors.protocol.empty") : (v = v.slice(0, -1), A.find((i) => {
|
|
56
|
+
if (i.value === v) return i;
|
|
57
|
+
}) === void 0 ? l("gateway_services.form.errors.protocol.invalid") : ""),
|
|
58
|
+
validatePath: (v) => !v || v === "" ? "" : v.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(v) ? l("gateway_services.form.errors.path.invalid") : "" : l("gateway_services.form.errors.path.prefix"),
|
|
59
|
+
validatePort: (v) => {
|
|
60
|
+
if (v == null || v === "")
|
|
61
61
|
return "";
|
|
62
|
-
const A = typeof
|
|
63
|
-
return isNaN(A) ?
|
|
62
|
+
const A = typeof v == "string" ? parseInt(v, 10) : v;
|
|
63
|
+
return isNaN(A) ? l("gateway_services.form.errors.port.type") : A < 0 || A > 65535 ? l("gateway_services.form.errors.port.invalid") : "";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const oe = {
|
|
68
68
|
useI18n: Qt,
|
|
69
69
|
usePortFromProtocol: Jt,
|
|
70
70
|
useUrlValidators: ta
|
|
71
|
-
},
|
|
71
|
+
}, Y = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", Ee = "/{workspace}", Q = {
|
|
72
72
|
list: {
|
|
73
73
|
konnect: {
|
|
74
|
-
all: `${
|
|
75
|
-
search: `${
|
|
74
|
+
all: `${Y}/services`,
|
|
75
|
+
search: `${Y}/services/search`
|
|
76
76
|
},
|
|
77
77
|
kongManager: {
|
|
78
78
|
all: `${Ee}/services`
|
|
@@ -80,10 +80,10 @@ const re = {
|
|
|
80
80
|
},
|
|
81
81
|
form: {
|
|
82
82
|
konnect: {
|
|
83
|
-
create: `${
|
|
84
|
-
edit: `${
|
|
85
|
-
getCertificates: `${
|
|
86
|
-
getCaCertificates: `${
|
|
83
|
+
create: `${Y}/services`,
|
|
84
|
+
edit: `${Y}/services/{id}`,
|
|
85
|
+
getCertificates: `${Y}/certificates`,
|
|
86
|
+
getCaCertificates: `${Y}/ca_certificates`
|
|
87
87
|
},
|
|
88
88
|
kongManager: {
|
|
89
89
|
create: `${Ee}/services`,
|
|
@@ -94,18 +94,18 @@ const re = {
|
|
|
94
94
|
},
|
|
95
95
|
relatedEntities: {
|
|
96
96
|
konnect: {
|
|
97
|
-
routes: `${
|
|
98
|
-
plugins: `${
|
|
97
|
+
routes: `${Y}/services/{id}/routes`,
|
|
98
|
+
plugins: `${Y}/services/{id}/plugins`
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
}, aa = { class: "kong-ui-entities-gateway-services-list" }, sa = { class: "button-row" },
|
|
101
|
+
}, aa = { class: "kong-ui-entities-gateway-services-list" }, sa = { class: "button-row" }, ia = { key: 1 }, la = { key: 0 }, oa = 1e3, ra = /* @__PURE__ */ qe({
|
|
102
102
|
__name: "GatewayServiceList",
|
|
103
103
|
props: {
|
|
104
104
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
105
105
|
config: {
|
|
106
106
|
type: Object,
|
|
107
107
|
required: !0,
|
|
108
|
-
validator: (
|
|
108
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || !l.createRoute || !l.getViewRoute || !l.getEditRoute || l.app === "kongManager" && !l.isExactMatch && !l.filterSchema)
|
|
109
109
|
},
|
|
110
110
|
// used to override the default identifier for the cache entry
|
|
111
111
|
cacheIdentifier: {
|
|
@@ -163,11 +163,11 @@ const re = {
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success", "click:import"],
|
|
166
|
-
setup(
|
|
167
|
-
const m =
|
|
166
|
+
setup(l, { emit: K }) {
|
|
167
|
+
const m = K, d = l, { i18n: { t: o, formatUnixTimeStamp: v } } = oe.useI18n(), A = ft(), { axiosInstance: R } = pt(d.config?.axiosRequestConfig), { hasRecords: i, handleStateChange: U } = It(() => W.value), T = h(() => i.value && d.config.app === "konnect"), ee = h(() => d.config.app !== "kongManager" || !!d.config.disableSorting), re = {
|
|
168
168
|
// the Name column is non-hidable
|
|
169
169
|
name: { label: o("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
170
|
-
...
|
|
170
|
+
...d.config.showControlPlaneColumn ? { control_plane: { label: o("gateway_services.list.table_headers.control_plane") } } : {},
|
|
171
171
|
protocol: { label: o("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
172
172
|
host: { label: o("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
173
173
|
port: { label: o("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
@@ -176,72 +176,72 @@ const re = {
|
|
|
176
176
|
tags: { label: o("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
177
177
|
updated_at: { label: o("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
178
178
|
created_at: { label: o("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
179
|
-
},
|
|
179
|
+
}, N = {
|
|
180
180
|
columnVisibility: {
|
|
181
181
|
created_at: !1
|
|
182
182
|
}
|
|
183
|
-
},
|
|
184
|
-
let
|
|
185
|
-
return
|
|
186
|
-
},
|
|
187
|
-
const f =
|
|
183
|
+
}, te = re, me = (f) => {
|
|
184
|
+
let y = `${d.config.apiBaseUrl}${f}`;
|
|
185
|
+
return d.config.app === "konnect" && (y = y.replace(/{controlPlaneId}/gi, d.config?.controlPlaneId || "")), y.replace(/\/{workspace}/gi, d.config?.workspace ? `/${d.config.workspace}` : "");
|
|
186
|
+
}, ne = h(() => me(Q.list[d.config.app].all)), We = h(() => d.config.app === "konnect" && d.config.workspace && W.value ? me(Q.list.konnect.search) : ne.value), Ge = h(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${ne.value}`) : new URL(ne.value)), W = x(""), Pe = h(() => {
|
|
187
|
+
const f = d.config.app === "konnect" || d.config.isExactMatch;
|
|
188
188
|
if (f)
|
|
189
189
|
return {
|
|
190
190
|
isExactMatch: f,
|
|
191
|
-
placeholder: o(`search.placeholder.${
|
|
191
|
+
placeholder: o(`search.placeholder.${d.config.app}`)
|
|
192
192
|
};
|
|
193
|
-
const { name:
|
|
193
|
+
const { name: y, enabled: V, protocol: F, host: Z, port: L, path: ke } = re;
|
|
194
194
|
return {
|
|
195
195
|
isExactMatch: f,
|
|
196
|
-
fields: { name:
|
|
197
|
-
schema:
|
|
196
|
+
fields: { name: y, enabled: V, protocol: F, host: Z, port: L, path: ke },
|
|
197
|
+
schema: d.config.filterSchema
|
|
198
198
|
};
|
|
199
199
|
}), {
|
|
200
200
|
fetcher: Oe,
|
|
201
201
|
fetcherState: $e,
|
|
202
|
-
fetcherCacheKey:
|
|
203
|
-
} = Ft(h(() => ({ ...
|
|
204
|
-
|
|
202
|
+
fetcherCacheKey: ge
|
|
203
|
+
} = Ft(h(() => ({ ...d.config, cacheIdentifier: d.cacheIdentifier })), We), je = () => {
|
|
204
|
+
W.value = "";
|
|
205
205
|
}, ze = () => {
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
ctaPath:
|
|
209
|
-
ctaText:
|
|
210
|
-
message: `${o("gateway_services.list.empty_state.description")}${
|
|
211
|
-
title:
|
|
212
|
-
})),
|
|
206
|
+
ge.value++;
|
|
207
|
+
}, ce = x(null), ve = h(() => ({
|
|
208
|
+
ctaPath: d.config.createRoute,
|
|
209
|
+
ctaText: H.value ? d.isServerless ? o("actions.serverless_create") : o("actions.create") : void 0,
|
|
210
|
+
message: `${o("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
|
|
211
|
+
title: H.value ? d.isServerless ? o("gateway_services.list.empty_state.serverless_title") : o("gateway_services.list.empty_state.title") : o("gateway_services.title")
|
|
212
|
+
})), ye = x(!1), B = x(null), G = h(() => {
|
|
213
213
|
const f = {
|
|
214
214
|
action: "disable",
|
|
215
215
|
id: "",
|
|
216
216
|
name: ""
|
|
217
217
|
};
|
|
218
218
|
if (B.value) {
|
|
219
|
-
const { enabled:
|
|
220
|
-
f.action =
|
|
219
|
+
const { enabled: y, id: V, name: F } = B.value;
|
|
220
|
+
f.action = y ? "disable" : "enable", f.id = V, f.name = F || V;
|
|
221
221
|
}
|
|
222
222
|
return f;
|
|
223
|
-
}),
|
|
224
|
-
|
|
223
|
+
}), _e = (f) => {
|
|
224
|
+
ye.value = !0, B.value = f;
|
|
225
225
|
}, Te = () => {
|
|
226
|
-
|
|
226
|
+
ye.value = !1, B.value = null;
|
|
227
227
|
}, He = async () => {
|
|
228
|
-
if (!await
|
|
228
|
+
if (!await d.canEdit?.(B.value) || !B.value)
|
|
229
229
|
return;
|
|
230
|
-
const
|
|
230
|
+
const y = `${Ge.value.href}/${B.value.id}`, V = !B.value.enabled;
|
|
231
231
|
try {
|
|
232
|
-
const F =
|
|
233
|
-
let
|
|
234
|
-
|
|
235
|
-
const { data:
|
|
236
|
-
m("toggle:success",
|
|
232
|
+
const F = d.config?.app;
|
|
233
|
+
let Z;
|
|
234
|
+
W.value && F === "konnect" && (Z = await R.get(y));
|
|
235
|
+
const { data: L } = F === "konnect" ? await R.put(y, { ...Z?.data || B.value, enabled: V }) : await R.patch(y, { ...B.value, enabled: V });
|
|
236
|
+
m("toggle:success", L), B.value.enabled = V;
|
|
237
237
|
} catch (F) {
|
|
238
238
|
m("error", F);
|
|
239
239
|
}
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
}, Ze = async (f,
|
|
243
|
-
const
|
|
244
|
-
if (!await
|
|
240
|
+
}, he = (f) => {
|
|
241
|
+
d.config.getControlPlaneRoute && A.push(d.config.getControlPlaneRoute(f));
|
|
242
|
+
}, Ze = async (f, y) => {
|
|
243
|
+
const V = f.id;
|
|
244
|
+
if (!await y(V)) {
|
|
245
245
|
m("copy:error", {
|
|
246
246
|
entity: f,
|
|
247
247
|
field: "id",
|
|
@@ -252,11 +252,11 @@ const re = {
|
|
|
252
252
|
m("copy:success", {
|
|
253
253
|
entity: f,
|
|
254
254
|
field: "id",
|
|
255
|
-
message: o("copy.success", { val:
|
|
255
|
+
message: o("copy.success", { val: V })
|
|
256
256
|
});
|
|
257
|
-
}, xe = async (f,
|
|
258
|
-
const
|
|
259
|
-
if (!await
|
|
257
|
+
}, xe = async (f, y) => {
|
|
258
|
+
const V = JSON.stringify(f);
|
|
259
|
+
if (!await y(V)) {
|
|
260
260
|
m("copy:error", {
|
|
261
261
|
entity: f,
|
|
262
262
|
message: o("errors.copy")
|
|
@@ -268,128 +268,128 @@ const re = {
|
|
|
268
268
|
message: o("copy.success_brief")
|
|
269
269
|
});
|
|
270
270
|
}, Qe = async (f) => {
|
|
271
|
-
await
|
|
272
|
-
},
|
|
271
|
+
await d.canRetrieve?.(f) && A.push(d.config.getViewRoute(f.id));
|
|
272
|
+
}, ae = (f) => ({
|
|
273
273
|
label: o("actions.view"),
|
|
274
|
-
to:
|
|
274
|
+
to: d.config.getViewRoute(f)
|
|
275
275
|
}), Je = (f) => ({
|
|
276
276
|
label: o("actions.edit"),
|
|
277
|
-
to:
|
|
278
|
-
}),
|
|
279
|
-
if (
|
|
277
|
+
to: d.config.getEditRoute(f)
|
|
278
|
+
}), se = (f) => {
|
|
279
|
+
if (d.config.getDebugRoute)
|
|
280
280
|
return {
|
|
281
281
|
label: o("actions.debugger"),
|
|
282
|
-
to:
|
|
282
|
+
to: d.config.getDebugRoute(f)
|
|
283
283
|
};
|
|
284
|
-
},
|
|
285
|
-
if (
|
|
284
|
+
}, S = x(void 0), ie = x(!1), le = x(!1), be = x(""), e = Pt(d.config, ne.value), b = x(0), de = x(0), J = x(!1), O = x(!1), Xe = h(() => d.enableForceDeleteConfirmation && (O.value || b.value > 0 || de.value > 0)), j = h(() => d.enableForceDeleteConfirmation && (O.value || b.value > 0)), Re = h(() => d.config.app === "kongManager" ? o("actions.delete.description") : ""), Ue = h(() => {
|
|
285
|
+
if (O.value)
|
|
286
286
|
return o("actions.delete.related_entities.check_failed");
|
|
287
|
-
const f =
|
|
287
|
+
const f = de.value;
|
|
288
288
|
return o("actions.delete.related_entities.plugins_only", {
|
|
289
289
|
pluginCount: f,
|
|
290
290
|
plugin: o("actions.delete.related_entities.plugin", { count: f })
|
|
291
291
|
});
|
|
292
|
-
}),
|
|
293
|
-
const
|
|
292
|
+
}), we = async (f, y) => {
|
|
293
|
+
const V = me(f).replace(/{id}/gi, y), { data: F } = await R.get(V, { params: { size: oa } });
|
|
294
294
|
return F?.total ?? F?.data?.length ?? 0;
|
|
295
|
-
},
|
|
296
|
-
if (
|
|
295
|
+
}, Ae = async (f) => {
|
|
296
|
+
if (S.value = f, be.value = "", J.value = !1, b.value = 0, de.value = 0, O.value = !1, d.enableForceDeleteConfirmation && d.config.app === "konnect")
|
|
297
297
|
try {
|
|
298
|
-
const [
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
const [y, V] = await Promise.all([
|
|
299
|
+
we(Q.relatedEntities.konnect.routes, f.id),
|
|
300
|
+
we(Q.relatedEntities.konnect.plugins, f.id)
|
|
301
301
|
]);
|
|
302
|
-
b.value =
|
|
302
|
+
b.value = y, de.value = V;
|
|
303
303
|
} catch {
|
|
304
|
-
|
|
304
|
+
O.value = !0;
|
|
305
305
|
}
|
|
306
306
|
ie.value = !0;
|
|
307
|
-
},
|
|
308
|
-
ie.value = !1,
|
|
309
|
-
},
|
|
310
|
-
if (
|
|
311
|
-
|
|
307
|
+
}, z = () => {
|
|
308
|
+
ie.value = !1, S.value = void 0;
|
|
309
|
+
}, Ye = async () => {
|
|
310
|
+
if (S.value?.id) {
|
|
311
|
+
le.value = !0;
|
|
312
312
|
try {
|
|
313
|
-
await R.delete(e(
|
|
313
|
+
await R.delete(e(S.value.id), {
|
|
314
314
|
// Only ever send force=true when the user has explicitly confirmed it via the checkbox,
|
|
315
315
|
// not merely because routes/plugins were detected
|
|
316
|
-
...
|
|
317
|
-
}), m("delete:success",
|
|
316
|
+
...J.value ? { params: { force: !0 } } : {}
|
|
317
|
+
}), m("delete:success", S.value), z(), ge.value++;
|
|
318
318
|
} catch (f) {
|
|
319
|
-
|
|
319
|
+
be.value = f.response?.data?.message || f.message || o("errors.delete"), m("error", f);
|
|
320
320
|
} finally {
|
|
321
|
-
|
|
321
|
+
le.value = !1;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
A.push(
|
|
324
|
+
}, X = () => {
|
|
325
|
+
A.push(d.config.createRoute);
|
|
326
326
|
};
|
|
327
327
|
Ke($e, (f) => {
|
|
328
328
|
if (f.status === $t.Error) {
|
|
329
|
-
|
|
329
|
+
ce.value = {
|
|
330
330
|
title: o("errors.general")
|
|
331
|
-
}, f.error?.response?.data?.message && (
|
|
331
|
+
}, f.error?.response?.data?.message && (ce.value.message = f.error.response.data.message), m("error", f.error);
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
|
|
334
|
+
ce.value = null;
|
|
335
335
|
});
|
|
336
|
-
const
|
|
336
|
+
const H = x(!1);
|
|
337
337
|
return ht(async () => {
|
|
338
|
-
|
|
339
|
-
}), (f,
|
|
340
|
-
const
|
|
338
|
+
H.value = await d.canCreate();
|
|
339
|
+
}), (f, y) => {
|
|
340
|
+
const V = $("KButton"), F = $("KDropdownItem"), Z = $("KDropdown"), L = $("KEmptyState"), ke = $("KBadge"), De = $("KInputSwitch"), ue = $("KClipboardProvider"), Be = $("KCheckbox");
|
|
341
341
|
return p(), w("div", aa, [
|
|
342
342
|
c(t(Tt), {
|
|
343
|
-
"cache-identifier":
|
|
344
|
-
"default-table-preferences":
|
|
345
|
-
"disable-sorting":
|
|
343
|
+
"cache-identifier": l.cacheIdentifier,
|
|
344
|
+
"default-table-preferences": N,
|
|
345
|
+
"disable-sorting": ee.value,
|
|
346
346
|
"empty-state-options": ve.value,
|
|
347
347
|
"enable-entity-actions": "",
|
|
348
|
-
"error-message":
|
|
348
|
+
"error-message": ce.value,
|
|
349
349
|
fetcher: t(Oe),
|
|
350
|
-
"fetcher-cache-key": t(
|
|
350
|
+
"fetcher-cache-key": t(ge),
|
|
351
351
|
"pagination-type": "offset",
|
|
352
352
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
353
|
-
query:
|
|
354
|
-
"table-headers": t(
|
|
353
|
+
query: W.value,
|
|
354
|
+
"table-headers": t(te),
|
|
355
355
|
onClearSearchInput: je,
|
|
356
|
-
"onClick:row":
|
|
356
|
+
"onClick:row": y[5] || (y[5] = (g) => Qe(g)),
|
|
357
357
|
onSort: ze,
|
|
358
358
|
onState: t(U)
|
|
359
359
|
}, Ie({
|
|
360
360
|
"toolbar-filter": n(() => [
|
|
361
361
|
c(t(Rt), {
|
|
362
|
-
modelValue:
|
|
363
|
-
"onUpdate:modelValue":
|
|
362
|
+
modelValue: W.value,
|
|
363
|
+
"onUpdate:modelValue": y[0] || (y[0] = (g) => W.value = g),
|
|
364
364
|
config: Pe.value
|
|
365
365
|
}, null, 8, ["modelValue", "config"])
|
|
366
366
|
]),
|
|
367
367
|
"toolbar-button": n(() => [
|
|
368
368
|
(p(), D(bt, {
|
|
369
|
-
disabled: !
|
|
369
|
+
disabled: !l.useActionOutside,
|
|
370
370
|
to: "#kong-ui-app-page-header-action-button"
|
|
371
371
|
}, [
|
|
372
|
-
|
|
373
|
-
T.value ? (p(), D(
|
|
372
|
+
C("div", sa, [
|
|
373
|
+
T.value ? (p(), D(V, {
|
|
374
374
|
key: 0,
|
|
375
375
|
appearance: "secondary",
|
|
376
376
|
class: "open-learning-hub",
|
|
377
377
|
"data-testid": "gateway-services-learn-more-button",
|
|
378
378
|
icon: "",
|
|
379
|
-
onClick:
|
|
379
|
+
onClick: y[1] || (y[1] = (g) => f.$emit("click:learn-more"))
|
|
380
380
|
}, {
|
|
381
381
|
default: n(() => [
|
|
382
|
-
c(t(
|
|
382
|
+
c(t(rt), { decorative: "" })
|
|
383
383
|
]),
|
|
384
384
|
_: 1
|
|
385
385
|
})) : I("", !0),
|
|
386
|
-
c(t(
|
|
386
|
+
c(t(pe), { "auth-function": l.canCreate }, {
|
|
387
387
|
default: n(() => [
|
|
388
|
-
c(
|
|
388
|
+
c(V, {
|
|
389
389
|
appearance: "primary",
|
|
390
390
|
"data-testid": "toolbar-add-gateway-service",
|
|
391
|
-
size:
|
|
392
|
-
to:
|
|
391
|
+
size: l.useActionOutside ? "medium" : "large",
|
|
392
|
+
to: l.config.createRoute
|
|
393
393
|
}, {
|
|
394
394
|
default: n(() => [
|
|
395
395
|
c(t(Ne)),
|
|
@@ -404,37 +404,37 @@ const re = {
|
|
|
404
404
|
], 8, ["disabled"]))
|
|
405
405
|
]),
|
|
406
406
|
name: n(({ rowValue: g }) => [
|
|
407
|
-
|
|
407
|
+
C("b", null, _(g ?? "-"), 1)
|
|
408
408
|
]),
|
|
409
409
|
control_plane: n(({ row: g }) => [
|
|
410
|
-
g.x_meta?.cluster_id ? (p(), D(
|
|
410
|
+
g.x_meta?.cluster_id ? (p(), D(ke, {
|
|
411
411
|
key: 0,
|
|
412
412
|
tooltip: g.x_meta.cluster_id,
|
|
413
413
|
"truncation-tooltip": "",
|
|
414
|
-
onClick:
|
|
414
|
+
onClick: tt((M) => he(g.x_meta.cluster_id), ["stop"])
|
|
415
415
|
}, {
|
|
416
416
|
default: n(() => [
|
|
417
417
|
P(_(g.x_meta.cluster_id), 1)
|
|
418
418
|
]),
|
|
419
419
|
_: 2
|
|
420
|
-
}, 1032, ["tooltip", "onClick"])) : (p(), w("b",
|
|
420
|
+
}, 1032, ["tooltip", "onClick"])) : (p(), w("b", ia, "-"))
|
|
421
421
|
]),
|
|
422
422
|
enabled: n(({ row: g }) => [
|
|
423
|
-
c(t(
|
|
424
|
-
"auth-function": () =>
|
|
423
|
+
c(t(pe), {
|
|
424
|
+
"auth-function": () => l.canEdit(g),
|
|
425
425
|
"force-show": ""
|
|
426
426
|
}, {
|
|
427
|
-
default: n(({ isAllowed:
|
|
428
|
-
|
|
429
|
-
onClick:
|
|
427
|
+
default: n(({ isAllowed: M }) => [
|
|
428
|
+
C("div", {
|
|
429
|
+
onClick: y[4] || (y[4] = tt(() => {
|
|
430
430
|
}, ["stop"]))
|
|
431
431
|
}, [
|
|
432
432
|
c(De, {
|
|
433
433
|
modelValue: g.enabled,
|
|
434
|
-
"onUpdate:modelValue": (
|
|
434
|
+
"onUpdate:modelValue": (fe) => g.enabled = fe,
|
|
435
435
|
"data-testid": `row-${g.id}-toggle-input`,
|
|
436
|
-
disabled: !
|
|
437
|
-
onClick:
|
|
436
|
+
disabled: !M,
|
|
437
|
+
onClick: tt((fe) => _e(g), ["prevent"])
|
|
438
438
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
439
439
|
])
|
|
440
440
|
]),
|
|
@@ -445,17 +445,17 @@ const re = {
|
|
|
445
445
|
c(t(xt), { tags: g }, null, 8, ["tags"])
|
|
446
446
|
]),
|
|
447
447
|
created_at: n(({ rowValue: g }) => [
|
|
448
|
-
P(_(t(
|
|
448
|
+
P(_(t(v)(g)), 1)
|
|
449
449
|
]),
|
|
450
|
-
updated_at: n(({ row: g, rowValue:
|
|
451
|
-
P(_(t(
|
|
450
|
+
updated_at: n(({ row: g, rowValue: M }) => [
|
|
451
|
+
P(_(t(v)(M ?? g.created_at)), 1)
|
|
452
452
|
]),
|
|
453
453
|
actions: n(({ row: g }) => [
|
|
454
|
-
c(
|
|
455
|
-
default: n(({ copyToClipboard:
|
|
454
|
+
c(ue, null, {
|
|
455
|
+
default: n(({ copyToClipboard: M }) => [
|
|
456
456
|
c(F, {
|
|
457
457
|
"data-testid": "action-entity-copy-id",
|
|
458
|
-
onClick: (
|
|
458
|
+
onClick: (fe) => Ze(g, M)
|
|
459
459
|
}, {
|
|
460
460
|
default: n(() => [
|
|
461
461
|
P(_(t(o)("actions.copy_id")), 1)
|
|
@@ -465,11 +465,11 @@ const re = {
|
|
|
465
465
|
]),
|
|
466
466
|
_: 2
|
|
467
467
|
}, 1024),
|
|
468
|
-
c(
|
|
469
|
-
default: n(({ copyToClipboard:
|
|
468
|
+
c(ue, null, {
|
|
469
|
+
default: n(({ copyToClipboard: M }) => [
|
|
470
470
|
c(F, {
|
|
471
471
|
"data-testid": "action-entity-copy-json",
|
|
472
|
-
onClick: (
|
|
472
|
+
onClick: (fe) => xe(g, M)
|
|
473
473
|
}, {
|
|
474
474
|
default: n(() => [
|
|
475
475
|
P(_(t(o)("actions.copy_json")), 1)
|
|
@@ -479,32 +479,32 @@ const re = {
|
|
|
479
479
|
]),
|
|
480
480
|
_: 2
|
|
481
481
|
}, 1024),
|
|
482
|
-
c(t(
|
|
483
|
-
"auth-function": () =>
|
|
482
|
+
c(t(pe), {
|
|
483
|
+
"auth-function": () => l.canRetrieve(g)
|
|
484
484
|
}, {
|
|
485
485
|
default: n(() => [
|
|
486
486
|
c(F, {
|
|
487
487
|
"data-testid": "action-entity-view",
|
|
488
488
|
"has-divider": "",
|
|
489
|
-
item:
|
|
489
|
+
item: ae(g.id)
|
|
490
490
|
}, null, 8, ["item"])
|
|
491
491
|
]),
|
|
492
492
|
_: 2
|
|
493
493
|
}, 1032, ["auth-function"]),
|
|
494
|
-
c(t(
|
|
495
|
-
"auth-function": () =>
|
|
494
|
+
c(t(pe), {
|
|
495
|
+
"auth-function": () => l.canDebug(g)
|
|
496
496
|
}, {
|
|
497
497
|
default: n(() => [
|
|
498
|
-
|
|
498
|
+
l.config.getDebugRoute ? (p(), D(F, {
|
|
499
499
|
key: 0,
|
|
500
500
|
"data-testid": "action-entity-debug",
|
|
501
|
-
item:
|
|
501
|
+
item: se(g.id)
|
|
502
502
|
}, null, 8, ["item"])) : I("", !0)
|
|
503
503
|
]),
|
|
504
504
|
_: 2
|
|
505
505
|
}, 1032, ["auth-function"]),
|
|
506
|
-
c(t(
|
|
507
|
-
"auth-function": () =>
|
|
506
|
+
c(t(pe), {
|
|
507
|
+
"auth-function": () => l.canEdit(g)
|
|
508
508
|
}, {
|
|
509
509
|
default: n(() => [
|
|
510
510
|
c(F, {
|
|
@@ -514,15 +514,15 @@ const re = {
|
|
|
514
514
|
]),
|
|
515
515
|
_: 2
|
|
516
516
|
}, 1032, ["auth-function"]),
|
|
517
|
-
c(t(
|
|
518
|
-
"auth-function": () =>
|
|
517
|
+
c(t(pe), {
|
|
518
|
+
"auth-function": () => l.canDelete(g)
|
|
519
519
|
}, {
|
|
520
520
|
default: n(() => [
|
|
521
521
|
c(F, {
|
|
522
522
|
danger: "",
|
|
523
523
|
"data-testid": "action-entity-delete",
|
|
524
524
|
"has-divider": "",
|
|
525
|
-
onClick: (
|
|
525
|
+
onClick: (M) => Ae(g)
|
|
526
526
|
}, {
|
|
527
527
|
default: n(() => [
|
|
528
528
|
P(_(t(o)("actions.delete.menu_label")), 1)
|
|
@@ -535,10 +535,10 @@ const re = {
|
|
|
535
535
|
]),
|
|
536
536
|
_: 2
|
|
537
537
|
}, [
|
|
538
|
-
!
|
|
538
|
+
!W.value && l.config.app === "konnect" ? {
|
|
539
539
|
name: "empty-state",
|
|
540
540
|
fn: n(() => [
|
|
541
|
-
c(
|
|
541
|
+
c(L, {
|
|
542
542
|
"data-testid": "gateway-services-entity-empty-state",
|
|
543
543
|
"icon-background": "",
|
|
544
544
|
message: t(o)("gateway_services.empty_state_v2.description"),
|
|
@@ -548,8 +548,8 @@ const re = {
|
|
|
548
548
|
c(t(Ct), { decorative: "" })
|
|
549
549
|
]),
|
|
550
550
|
action: n(() => [
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
H.value ? (p(), w(Fe, { key: 0 }, [
|
|
552
|
+
l.canImportSpecs ? (p(), D(Z, {
|
|
553
553
|
key: 0,
|
|
554
554
|
"data-testid": "entity-create-dropdown",
|
|
555
555
|
"show-caret": "",
|
|
@@ -559,7 +559,7 @@ const re = {
|
|
|
559
559
|
items: n(() => [
|
|
560
560
|
c(F, {
|
|
561
561
|
"data-testid": "entity-create-dropdown-item",
|
|
562
|
-
onClick:
|
|
562
|
+
onClick: X
|
|
563
563
|
}, {
|
|
564
564
|
default: n(() => [
|
|
565
565
|
P(_(t(o)("gateway_services.empty_state_v2.create_new")), 1)
|
|
@@ -568,7 +568,7 @@ const re = {
|
|
|
568
568
|
}),
|
|
569
569
|
c(F, {
|
|
570
570
|
"data-testid": "entity-import-dropdown-item",
|
|
571
|
-
onClick:
|
|
571
|
+
onClick: y[2] || (y[2] = (g) => f.$emit("click:import"))
|
|
572
572
|
}, {
|
|
573
573
|
default: n(() => [
|
|
574
574
|
P(_(t(o)("gateway_services.empty_state_v2.import_spec")), 1)
|
|
@@ -577,10 +577,10 @@ const re = {
|
|
|
577
577
|
})
|
|
578
578
|
]),
|
|
579
579
|
_: 1
|
|
580
|
-
}, 8, ["trigger-text"])) : (p(), D(
|
|
580
|
+
}, 8, ["trigger-text"])) : (p(), D(V, {
|
|
581
581
|
key: 1,
|
|
582
582
|
"data-testid": "entity-create-button",
|
|
583
|
-
onClick:
|
|
583
|
+
onClick: X
|
|
584
584
|
}, {
|
|
585
585
|
default: n(() => [
|
|
586
586
|
c(t(Ne), { decorative: "" }),
|
|
@@ -589,13 +589,13 @@ const re = {
|
|
|
589
589
|
_: 1
|
|
590
590
|
}))
|
|
591
591
|
], 64)) : I("", !0),
|
|
592
|
-
c(
|
|
592
|
+
c(V, {
|
|
593
593
|
appearance: "secondary",
|
|
594
594
|
"data-testid": "entity-learn-more-button",
|
|
595
|
-
onClick:
|
|
595
|
+
onClick: y[3] || (y[3] = (g) => f.$emit("click:learn-more"))
|
|
596
596
|
}, {
|
|
597
597
|
default: n(() => [
|
|
598
|
-
c(t(
|
|
598
|
+
c(t(rt), { decorative: "" }),
|
|
599
599
|
P(" " + _(t(o)("gateway_services.empty_state_v2.learn_more")), 1)
|
|
600
600
|
]),
|
|
601
601
|
_: 1
|
|
@@ -603,7 +603,7 @@ const re = {
|
|
|
603
603
|
]),
|
|
604
604
|
_: 2
|
|
605
605
|
}, [
|
|
606
|
-
|
|
606
|
+
l.config?.isControlPlaneGroup ? {
|
|
607
607
|
name: "default",
|
|
608
608
|
fn: n(() => [
|
|
609
609
|
P(_(t(o)("gateway_services.empty_state_v2.group")), 1)
|
|
@@ -616,34 +616,35 @@ const re = {
|
|
|
616
616
|
} : void 0
|
|
617
617
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
618
618
|
c(t(Ut), {
|
|
619
|
-
action:
|
|
620
|
-
"entity-id":
|
|
621
|
-
"entity-name":
|
|
619
|
+
action: G.value.action,
|
|
620
|
+
"entity-id": G.value.id,
|
|
621
|
+
"entity-name": G.value.name,
|
|
622
622
|
"entity-type": t(o)("glossary.gateway_services"),
|
|
623
623
|
"on-confirm": He,
|
|
624
|
-
visible:
|
|
624
|
+
visible: ye.value,
|
|
625
625
|
onCancel: Te,
|
|
626
626
|
onProceed: Te
|
|
627
627
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
628
628
|
c(t(At), {
|
|
629
|
-
"action-pending":
|
|
630
|
-
"confirm-disabled":
|
|
631
|
-
|
|
629
|
+
"action-pending": le.value,
|
|
630
|
+
"confirm-disabled": j.value && !J.value,
|
|
631
|
+
description: Re.value,
|
|
632
|
+
"entity-name": S.value && (S.value.name || S.value.id),
|
|
632
633
|
"entity-type": t(Dt).GatewayService,
|
|
633
|
-
error:
|
|
634
|
+
error: be.value,
|
|
634
635
|
title: t(o)("actions.delete.title"),
|
|
635
636
|
visible: ie.value,
|
|
636
|
-
onCancel:
|
|
637
|
-
onProceed:
|
|
637
|
+
onCancel: z,
|
|
638
|
+
onProceed: Ye
|
|
638
639
|
}, Ie({ _: 2 }, [
|
|
639
640
|
Xe.value ? {
|
|
640
641
|
name: "extra",
|
|
641
642
|
fn: n(() => [
|
|
642
|
-
|
|
643
|
-
|
|
643
|
+
O.value || !j.value ? (p(), w("p", la, _(Ue.value), 1)) : I("", !0),
|
|
644
|
+
j.value ? (p(), D(Be, {
|
|
644
645
|
key: 1,
|
|
645
|
-
modelValue:
|
|
646
|
-
"onUpdate:modelValue":
|
|
646
|
+
modelValue: J.value,
|
|
647
|
+
"onUpdate:modelValue": y[6] || (y[6] = (g) => J.value = g),
|
|
647
648
|
"data-testid": "gateway-service-delete-force-checkbox",
|
|
648
649
|
description: t(o)("actions.delete.related_entities.force_delete_help"),
|
|
649
650
|
label: t(o)("actions.delete.related_entities.force_delete_checkbox")
|
|
@@ -651,23 +652,23 @@ const re = {
|
|
|
651
652
|
]),
|
|
652
653
|
key: "0"
|
|
653
654
|
} : void 0
|
|
654
|
-
]), 1032, ["action-pending", "confirm-disabled", "entity-name", "entity-type", "error", "title", "visible"])
|
|
655
|
+
]), 1032, ["action-pending", "confirm-disabled", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
655
656
|
]);
|
|
656
657
|
};
|
|
657
658
|
}
|
|
658
|
-
}),
|
|
659
|
-
const m =
|
|
660
|
-
for (const [
|
|
661
|
-
m[
|
|
659
|
+
}), st = (l, K) => {
|
|
660
|
+
const m = l.__vccOpts || l;
|
|
661
|
+
for (const [d, o] of K)
|
|
662
|
+
m[d] = o;
|
|
662
663
|
return m;
|
|
663
|
-
}, Qa = /* @__PURE__ */
|
|
664
|
+
}, Qa = /* @__PURE__ */ st(ra, [["__scopeId", "data-v-b28278c6"]]), na = { class: "kong-ui-gateway-service-entity-config-card" }, Ja = /* @__PURE__ */ qe({
|
|
664
665
|
__name: "GatewayServiceConfigCard",
|
|
665
666
|
props: {
|
|
666
667
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
667
668
|
config: {
|
|
668
669
|
type: Object,
|
|
669
670
|
required: !0,
|
|
670
|
-
validator: (
|
|
671
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || !l.entityId)
|
|
671
672
|
},
|
|
672
673
|
/**
|
|
673
674
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -686,8 +687,8 @@ const re = {
|
|
|
686
687
|
}
|
|
687
688
|
},
|
|
688
689
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
689
|
-
setup(
|
|
690
|
-
const
|
|
690
|
+
setup(l) {
|
|
691
|
+
const K = l, { i18n: { t: m }, i18nT: d } = oe.useI18n(), o = h(() => Q.form[K.config.app].edit), { getPropValue: v } = mt(), A = (i, U) => v(i, U) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), R = x({
|
|
691
692
|
id: {},
|
|
692
693
|
name: {
|
|
693
694
|
tooltip: m("gateway_services.form.fields.name.tooltip")
|
|
@@ -747,68 +748,68 @@ const re = {
|
|
|
747
748
|
hidden: !0
|
|
748
749
|
}
|
|
749
750
|
});
|
|
750
|
-
return (
|
|
751
|
+
return (i, U) => (p(), w("div", na, [
|
|
751
752
|
c(t(Mt), {
|
|
752
|
-
config:
|
|
753
|
-
"config-card-doc":
|
|
753
|
+
config: l.config,
|
|
754
|
+
"config-card-doc": l.configCardDoc,
|
|
754
755
|
"config-schema": R.value,
|
|
755
|
-
"entity-type": t(
|
|
756
|
+
"entity-type": t(gt).GatewayService,
|
|
756
757
|
"fetch-url": o.value,
|
|
757
|
-
"hide-title":
|
|
758
|
-
"onFetch:error": U[0] || (U[0] = (T) =>
|
|
759
|
-
"onFetch:success": U[1] || (U[1] = (T) =>
|
|
760
|
-
onLoading: U[2] || (U[2] = (T) =>
|
|
758
|
+
"hide-title": l.hideTitle,
|
|
759
|
+
"onFetch:error": U[0] || (U[0] = (T) => i.$emit("fetch:error", T)),
|
|
760
|
+
"onFetch:success": U[1] || (U[1] = (T) => i.$emit("fetch:success", T)),
|
|
761
|
+
onLoading: U[2] || (U[2] = (T) => i.$emit("loading", T))
|
|
761
762
|
}, {
|
|
762
763
|
"enabled-label-tooltip": n(() => [
|
|
763
|
-
c(t(
|
|
764
|
+
c(t(d), {
|
|
764
765
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
765
766
|
scope: "global"
|
|
766
767
|
}, {
|
|
767
768
|
false: n(() => [
|
|
768
|
-
|
|
769
|
+
C("code", null, _(t(m)("gateway_services.form.fields.enabled.false")), 1)
|
|
769
770
|
]),
|
|
770
771
|
true: n(() => [
|
|
771
|
-
|
|
772
|
+
C("code", null, _(t(m)("gateway_services.form.fields.enabled.true")), 1)
|
|
772
773
|
]),
|
|
773
774
|
_: 1
|
|
774
775
|
})
|
|
775
776
|
]),
|
|
776
777
|
"ca_certificates-label-tooltip": n(() => [
|
|
777
|
-
c(t(
|
|
778
|
+
c(t(d), {
|
|
778
779
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
779
780
|
scope: "global"
|
|
780
781
|
}, {
|
|
781
782
|
code1: n(() => [
|
|
782
|
-
|
|
783
|
+
C("code", null, _(t(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
783
784
|
]),
|
|
784
785
|
code2: n(() => [
|
|
785
|
-
|
|
786
|
+
C("code", null, _(t(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
786
787
|
]),
|
|
787
788
|
_: 1
|
|
788
789
|
})
|
|
789
790
|
]),
|
|
790
791
|
"tls_verify-label-tooltip": n(() => [
|
|
791
|
-
c(t(
|
|
792
|
+
c(t(d), {
|
|
792
793
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
793
794
|
scope: "global"
|
|
794
795
|
}, {
|
|
795
796
|
code1: n(() => [
|
|
796
|
-
|
|
797
|
+
C("code", null, _(t(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
797
798
|
]),
|
|
798
799
|
_: 1
|
|
799
800
|
})
|
|
800
801
|
]),
|
|
801
802
|
tls_verify: n((T) => [
|
|
802
|
-
P(_(typeof t(
|
|
803
|
+
P(_(typeof t(v)("rowValue", T) == "boolean" ? A("rowValue", T) : t(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
803
804
|
]),
|
|
804
805
|
client_certificate: n((T) => [
|
|
805
|
-
P(_(t(
|
|
806
|
+
P(_(t(v)("rowValue", T) ? t(v)("rowValue", T).id : "–"), 1)
|
|
806
807
|
]),
|
|
807
808
|
_: 1
|
|
808
809
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
809
810
|
]));
|
|
810
811
|
}
|
|
811
|
-
}),
|
|
812
|
+
}), q = {
|
|
812
813
|
name: "Kong-Air-Flights-API",
|
|
813
814
|
protocol: "https",
|
|
814
815
|
path: "/flights",
|
|
@@ -830,45 +831,45 @@ const re = {
|
|
|
830
831
|
readonly: { type: Boolean }
|
|
831
832
|
},
|
|
832
833
|
emits: ["update:modelValue", "input"],
|
|
833
|
-
setup(
|
|
834
|
-
const m =
|
|
835
|
-
|
|
836
|
-
},
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
}, A = (R,
|
|
834
|
+
setup(l, { emit: K }) {
|
|
835
|
+
const m = l, d = K, o = () => {
|
|
836
|
+
d("update:modelValue", [...m.modelValue, ""]);
|
|
837
|
+
}, v = (R) => {
|
|
838
|
+
const i = [...m.modelValue];
|
|
839
|
+
i.splice(R, 1), d("update:modelValue", i);
|
|
840
|
+
}, A = (R, i) => {
|
|
840
841
|
const U = [...m.modelValue];
|
|
841
|
-
U[R] =
|
|
842
|
+
U[R] = i, d("update:modelValue", U), d("input");
|
|
842
843
|
};
|
|
843
|
-
return (R,
|
|
844
|
-
const U = $("KLabel"), T = $("KInput"),
|
|
844
|
+
return (R, i) => {
|
|
845
|
+
const U = $("KLabel"), T = $("KInput"), ee = $("KButton");
|
|
845
846
|
return p(), w("div", da, [
|
|
846
|
-
c(U, { info:
|
|
847
|
+
c(U, { info: l.tooltip }, {
|
|
847
848
|
default: n(() => [
|
|
848
|
-
P(_(
|
|
849
|
+
P(_(l.label), 1)
|
|
849
850
|
]),
|
|
850
851
|
_: 1
|
|
851
852
|
}, 8, ["info"]),
|
|
852
|
-
(p(!0), w(Fe, null, Le(
|
|
853
|
-
key:
|
|
853
|
+
(p(!0), w(Fe, null, Le(l.modelValue, (re, N) => (p(), w("div", {
|
|
854
|
+
key: N,
|
|
854
855
|
class: "tls-sans-field-input"
|
|
855
856
|
}, [
|
|
856
857
|
c(T, {
|
|
857
858
|
autocomplete: "off",
|
|
858
|
-
"data-testid": `${
|
|
859
|
-
error:
|
|
860
|
-
"model-value":
|
|
861
|
-
placeholder:
|
|
862
|
-
readonly:
|
|
859
|
+
"data-testid": `${l.testIdPrefix}-input-${N}`,
|
|
860
|
+
error: l.error,
|
|
861
|
+
"model-value": l.modelValue[N],
|
|
862
|
+
placeholder: l.placeholder,
|
|
863
|
+
readonly: l.readonly,
|
|
863
864
|
type: "text",
|
|
864
|
-
"onUpdate:modelValue": (
|
|
865
|
+
"onUpdate:modelValue": (te) => A(N, te.trim())
|
|
865
866
|
}, null, 8, ["data-testid", "error", "model-value", "placeholder", "readonly", "onUpdate:modelValue"]),
|
|
866
|
-
|
|
867
|
-
c(
|
|
867
|
+
l.readonly ? I("", !0) : (p(), w("div", ua, [
|
|
868
|
+
c(ee, {
|
|
868
869
|
appearance: "tertiary",
|
|
869
|
-
"data-testid": `remove-${
|
|
870
|
+
"data-testid": `remove-${l.testIdPrefix}`,
|
|
870
871
|
icon: "",
|
|
871
|
-
onClick: (
|
|
872
|
+
onClick: (te) => v(N)
|
|
872
873
|
}, {
|
|
873
874
|
default: n(() => [
|
|
874
875
|
c(t(St), {
|
|
@@ -877,10 +878,10 @@ const re = {
|
|
|
877
878
|
]),
|
|
878
879
|
_: 1
|
|
879
880
|
}, 8, ["data-testid", "onClick"]),
|
|
880
|
-
c(
|
|
881
|
+
c(ee, {
|
|
881
882
|
appearance: "tertiary",
|
|
882
|
-
"data-testid": `add-${
|
|
883
|
-
disabled:
|
|
883
|
+
"data-testid": `add-${l.testIdPrefix}`,
|
|
884
|
+
disabled: N !== l.modelValue.length - 1,
|
|
884
885
|
icon: "",
|
|
885
886
|
onClick: o
|
|
886
887
|
}, {
|
|
@@ -891,14 +892,14 @@ const re = {
|
|
|
891
892
|
}, 8, ["data-testid", "disabled"])
|
|
892
893
|
]))
|
|
893
894
|
]))), 128)),
|
|
894
|
-
|
|
895
|
-
c(
|
|
896
|
-
"data-testid": `add-${
|
|
895
|
+
l.modelValue.length === 0 && !l.readonly ? (p(), w("div", fa, [
|
|
896
|
+
c(ee, {
|
|
897
|
+
"data-testid": `add-${l.testIdPrefix}`,
|
|
897
898
|
onClick: o
|
|
898
899
|
}, {
|
|
899
900
|
default: n(() => [
|
|
900
901
|
c(t(Ne)),
|
|
901
|
-
P(" " + _(
|
|
902
|
+
P(" " + _(l.addButtonText), 1)
|
|
902
903
|
]),
|
|
903
904
|
_: 1
|
|
904
905
|
}, 8, ["data-testid"])
|
|
@@ -906,10 +907,10 @@ const re = {
|
|
|
906
907
|
]);
|
|
907
908
|
};
|
|
908
909
|
}
|
|
909
|
-
}),
|
|
910
|
+
}), ut = /* @__PURE__ */ st(pa, [["__scopeId", "data-v-4f239c35"]]), ma = { class: "kong-ui-entities-gateway-service-form" }, ga = {
|
|
910
911
|
key: 0,
|
|
911
912
|
class: "gateway-service-form-general-info"
|
|
912
|
-
},
|
|
913
|
+
}, va = { class: "gateway-service-form-group-selection-wrapper" }, ya = {
|
|
913
914
|
key: 0,
|
|
914
915
|
class: "gateway-service-form-group-fields"
|
|
915
916
|
}, _a = {
|
|
@@ -946,7 +947,7 @@ const re = {
|
|
|
946
947
|
config: {
|
|
947
948
|
type: Object,
|
|
948
949
|
required: !0,
|
|
949
|
-
validator: (
|
|
950
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || !l.cancelRoute)
|
|
950
951
|
},
|
|
951
952
|
/** If a valid Gateway Service ID is provided, it will put the form in Edit mode instead of Create */
|
|
952
953
|
gatewayServiceId: {
|
|
@@ -985,65 +986,65 @@ const re = {
|
|
|
985
986
|
}
|
|
986
987
|
},
|
|
987
988
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
988
|
-
setup(
|
|
989
|
-
const
|
|
989
|
+
setup(l, { expose: K, emit: m }) {
|
|
990
|
+
const d = m, o = l, v = x(!0), A = ft(), { i18nT: R, i18n: { t: i } } = oe.useI18n(), { getErrorFieldsFromError: U } = Kt(), { axiosInstance: T } = pt(o.config?.axiosRequestConfig), ee = Lt(), { validateHost: re, validatePath: N, validatePort: te, validateProtocol: me } = oe.useUrlValidators(), { objectsAreEqual: ne } = mt(), {
|
|
990
991
|
debouncedQueryChange: We,
|
|
991
992
|
loading: Ge,
|
|
992
|
-
loadItems:
|
|
993
|
+
loadItems: W,
|
|
993
994
|
results: Pe
|
|
994
|
-
} =
|
|
995
|
-
const s = (Pe.value ?? []).map((
|
|
996
|
-
label:
|
|
997
|
-
value:
|
|
995
|
+
} = nt(o.config, Q.form[o.config.app].getCertificates), Oe = h(() => new Map((Pe.value ?? []).map((s) => [String(s.id), s.tags ?? []]))), $e = (s) => Oe.value.get(String(s)) ?? [], ge = h(() => {
|
|
996
|
+
const s = (Pe.value ?? []).map((u) => ({
|
|
997
|
+
label: u.id,
|
|
998
|
+
value: u.id
|
|
998
999
|
})), a = e.fields.client_certificate;
|
|
999
|
-
return a && !s.some((
|
|
1000
|
+
return a && !s.some((u) => u.value === a) && s.unshift({ label: a, value: a }), s;
|
|
1000
1001
|
}), {
|
|
1001
1002
|
debouncedQueryChange: je,
|
|
1002
1003
|
loading: ze,
|
|
1003
|
-
loadItems:
|
|
1004
|
+
loadItems: ce,
|
|
1004
1005
|
results: ve
|
|
1005
|
-
} =
|
|
1006
|
-
let
|
|
1007
|
-
const Te = () => (
|
|
1008
|
-
const a = s.filter((E) => !(String(E.id) in
|
|
1006
|
+
} = nt(o.config, Q.form[o.config.app].getCaCertificates), ye = h(() => new Map((ve.value ?? []).map((s) => [String(s.id), s.tags ?? []]))), B = (s) => ye.value.get(String(s)) ?? [], G = x({});
|
|
1007
|
+
let _e = null;
|
|
1008
|
+
const Te = () => (_e || (_e = (async () => (await import("reflect-metadata"), import("@peculiar/x509")))()), _e), He = async (s) => {
|
|
1009
|
+
const a = s.filter((E) => !(String(E.id) in G.value));
|
|
1009
1010
|
if (!a.length)
|
|
1010
1011
|
return;
|
|
1011
|
-
let
|
|
1012
|
+
let u = null;
|
|
1012
1013
|
for (const E of a) {
|
|
1013
1014
|
const k = String(E.id);
|
|
1014
1015
|
if (E.metadata?.issuer) {
|
|
1015
|
-
|
|
1016
|
+
G.value[k] = E.metadata.issuer;
|
|
1016
1017
|
continue;
|
|
1017
1018
|
}
|
|
1018
1019
|
if (!E.cert) {
|
|
1019
|
-
|
|
1020
|
+
G.value[k] = "";
|
|
1020
1021
|
continue;
|
|
1021
1022
|
}
|
|
1022
1023
|
try {
|
|
1023
|
-
|
|
1024
|
+
u ??= await Te(), G.value[k] = new u.X509Certificate(E.cert).issuer;
|
|
1024
1025
|
} catch {
|
|
1025
|
-
|
|
1026
|
+
G.value[k] = "";
|
|
1026
1027
|
}
|
|
1027
1028
|
}
|
|
1028
1029
|
};
|
|
1029
1030
|
Ke(ve, (s) => {
|
|
1030
1031
|
He(s ?? []);
|
|
1031
1032
|
}, { immediate: !0 });
|
|
1032
|
-
const
|
|
1033
|
+
const he = (s) => G.value[String(s)] ?? "", Ze = h(() => {
|
|
1033
1034
|
const s = (ve.value ?? []).map((a) => ({
|
|
1034
1035
|
label: a.id,
|
|
1035
1036
|
value: a.id,
|
|
1036
1037
|
selected: e.fields.ca_certificates.includes(a.id)
|
|
1037
1038
|
}));
|
|
1038
1039
|
return e.fields.ca_certificates.forEach((a) => {
|
|
1039
|
-
s.some((
|
|
1040
|
+
s.some((u) => u.value === a) || s.unshift({ label: a, value: a, selected: !0 });
|
|
1040
1041
|
}), s;
|
|
1041
1042
|
}), xe = h({
|
|
1042
1043
|
get: () => e.fields.ca_certificates.join(","),
|
|
1043
1044
|
set: (s) => {
|
|
1044
1045
|
e.fields.ca_certificates = s.split(",");
|
|
1045
1046
|
}
|
|
1046
|
-
}), Qe = h(() =>
|
|
1047
|
+
}), Qe = h(() => Q.form[o.config.app].edit), ae = h(() => o.gatewayServiceId ? ct.Edit : ct.Create), Je = x(!1), se = h(() => !!o.gatewayServiceId), S = x(se.value ? "protocol" : "url"), ie = oe.usePortFromProtocol(), le = x(""), be = h(() => !!le.value || !!X("name")), e = ot({
|
|
1047
1048
|
fields: {
|
|
1048
1049
|
name: "",
|
|
1049
1050
|
protocol: "http",
|
|
@@ -1083,7 +1084,7 @@ const re = {
|
|
|
1083
1084
|
tls_verify_enabled: "",
|
|
1084
1085
|
tls_verify_value: ""
|
|
1085
1086
|
}
|
|
1086
|
-
}), b =
|
|
1087
|
+
}), b = ot({
|
|
1087
1088
|
name: "",
|
|
1088
1089
|
protocol: "http",
|
|
1089
1090
|
host: "",
|
|
@@ -1101,148 +1102,148 @@ const re = {
|
|
|
1101
1102
|
tls_verify_value: !1,
|
|
1102
1103
|
tags: "",
|
|
1103
1104
|
enabled: !0
|
|
1104
|
-
}),
|
|
1105
|
+
}), de = o.config.app === "konnect" || Nt({
|
|
1105
1106
|
gatewayInfo: o.config.gatewayInfo,
|
|
1106
1107
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1107
1108
|
supportedRange: {
|
|
1108
1109
|
enterprise: ["3.0"]
|
|
1109
1110
|
}
|
|
1110
|
-
}),
|
|
1111
|
+
}), J = [
|
|
1111
1112
|
{
|
|
1112
|
-
label:
|
|
1113
|
+
label: i("gateway_services.form.fields.protocol.options.http"),
|
|
1113
1114
|
value: "http",
|
|
1114
1115
|
group: "http"
|
|
1115
1116
|
},
|
|
1116
1117
|
{
|
|
1117
|
-
label:
|
|
1118
|
+
label: i("gateway_services.form.fields.protocol.options.https"),
|
|
1118
1119
|
value: "https",
|
|
1119
1120
|
group: "http"
|
|
1120
1121
|
},
|
|
1121
1122
|
{
|
|
1122
|
-
label:
|
|
1123
|
+
label: i("gateway_services.form.fields.protocol.options.tcp"),
|
|
1123
1124
|
value: "tcp",
|
|
1124
1125
|
group: "tcp"
|
|
1125
1126
|
},
|
|
1126
1127
|
{
|
|
1127
|
-
label:
|
|
1128
|
+
label: i("gateway_services.form.fields.protocol.options.tls"),
|
|
1128
1129
|
value: "tls",
|
|
1129
1130
|
group: "tcp"
|
|
1130
1131
|
},
|
|
1131
1132
|
{
|
|
1132
|
-
label:
|
|
1133
|
+
label: i("gateway_services.form.fields.protocol.options.tls_passthrough"),
|
|
1133
1134
|
value: "tls_passthrough",
|
|
1134
1135
|
group: "tcp"
|
|
1135
1136
|
},
|
|
1136
1137
|
{
|
|
1137
|
-
label:
|
|
1138
|
+
label: i("gateway_services.form.fields.protocol.options.grpc"),
|
|
1138
1139
|
value: "grpc",
|
|
1139
1140
|
group: "grpc"
|
|
1140
1141
|
},
|
|
1141
1142
|
{
|
|
1142
|
-
label:
|
|
1143
|
+
label: i("gateway_services.form.fields.protocol.options.grpcs"),
|
|
1143
1144
|
value: "grpcs",
|
|
1144
1145
|
group: "grpc"
|
|
1145
1146
|
},
|
|
1146
|
-
...
|
|
1147
|
+
...de ? [
|
|
1147
1148
|
{
|
|
1148
|
-
label:
|
|
1149
|
+
label: i("gateway_services.form.fields.protocol.options.ws"),
|
|
1149
1150
|
value: "ws",
|
|
1150
1151
|
group: "websocket"
|
|
1151
1152
|
},
|
|
1152
1153
|
{
|
|
1153
|
-
label:
|
|
1154
|
+
label: i("gateway_services.form.fields.protocol.options.wss"),
|
|
1154
1155
|
value: "wss",
|
|
1155
1156
|
group: "websocket"
|
|
1156
1157
|
}
|
|
1157
1158
|
] : [],
|
|
1158
1159
|
{
|
|
1159
|
-
label:
|
|
1160
|
+
label: i("gateway_services.form.fields.protocol.options.udp"),
|
|
1160
1161
|
value: "udp",
|
|
1161
1162
|
group: "udp"
|
|
1162
1163
|
}
|
|
1163
|
-
],
|
|
1164
|
+
], O = { url: "url", protocol: "protocol" }, Xe = (s) => {
|
|
1164
1165
|
e.fields.protocol = s.value, e.fields.port = ie.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
|
|
1165
|
-
},
|
|
1166
|
+
}, j = (s) => s ? parseFloat(s) : 0, Re = () => {
|
|
1166
1167
|
e.fields.host = b.host, e.fields.path = b.path, e.fields.port = b.port, e.fields.protocol = b.protocol, e.fields.url = b.url, e.fields.retries = b.retries, e.fields.connect_timeout = b.connect_timeout, e.fields.write_timeout = b.write_timeout, e.fields.read_timeout = b.read_timeout, e.fields.client_certificate = b.client_certificate, e.fields.tls_sans = {
|
|
1167
1168
|
dnsnames: [...b.tls_sans.dnsnames],
|
|
1168
1169
|
uris: [...b.tls_sans.uris]
|
|
1169
1170
|
}, e.fields.ca_certificates = [...b.ca_certificates], e.fields.tls_verify_enabled = b.tls_verify_enabled, e.fields.tls_verify_value = b.tls_verify_value, e.fields.enabled = b.enabled;
|
|
1170
|
-
}, be = () => {
|
|
1171
|
-
y.value = !0, v(), e.errorMessages = [], Re();
|
|
1172
1171
|
}, Ue = () => {
|
|
1173
|
-
|
|
1172
|
+
v.value = !0, f(), e.errorMessages = [], Re();
|
|
1173
|
+
}, we = () => {
|
|
1174
|
+
switch (Re(), e.fields.name = `${q.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, S.value) {
|
|
1174
1175
|
case "url":
|
|
1175
|
-
e.fields.url = `${
|
|
1176
|
+
e.fields.url = `${q.protocol}://${q.host}${q.path}`;
|
|
1176
1177
|
break;
|
|
1177
1178
|
case "protocol":
|
|
1178
|
-
e.fields.host =
|
|
1179
|
+
e.fields.host = q.host, e.fields.path = q.path, e.fields.protocol = q.protocol, e.fields.port = q.port;
|
|
1179
1180
|
break;
|
|
1180
1181
|
default:
|
|
1181
|
-
e.fields.url = `${
|
|
1182
|
+
e.fields.url = `${q.protocol}://${q.host}${q.path}`;
|
|
1182
1183
|
}
|
|
1183
|
-
},
|
|
1184
|
-
if (
|
|
1184
|
+
}, Ae = () => {
|
|
1185
|
+
if (f(), e.fields.url.length)
|
|
1185
1186
|
try {
|
|
1186
|
-
const s = new URL(e.fields.url), a =
|
|
1187
|
+
const s = new URL(e.fields.url), a = me(s.protocol, J);
|
|
1187
1188
|
if (a) throw new Error(a);
|
|
1188
1189
|
e.fields.protocol = s.protocol.slice(0, -1);
|
|
1189
|
-
const
|
|
1190
|
-
if (
|
|
1190
|
+
const u = re(s.hostname);
|
|
1191
|
+
if (u) throw new Error(u);
|
|
1191
1192
|
e.fields.host = s.hostname;
|
|
1192
|
-
const E =
|
|
1193
|
+
const E = N(s.pathname);
|
|
1193
1194
|
if (E) throw new Error(E);
|
|
1194
1195
|
e.fields.path = s.pathname;
|
|
1195
|
-
const k =
|
|
1196
|
+
const k = te(s.port);
|
|
1196
1197
|
if (k) throw new Error(k);
|
|
1197
1198
|
const Se = Number(s.port);
|
|
1198
|
-
Je.value = !!Se, e.fields.port = Se || ie.getPortFromProtocol(e.fields.protocol),
|
|
1199
|
+
Je.value = !!Se, e.fields.port = Se || ie.getPortFromProtocol(e.fields.protocol), d("url-valid:success");
|
|
1199
1200
|
} catch {
|
|
1200
|
-
|
|
1201
|
+
d("url-valid:error", i("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = i("gateway_services.form.errors.url.invalid");
|
|
1201
1202
|
}
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1203
|
+
}, z = (s) => {
|
|
1204
|
+
f(s);
|
|
1205
|
+
}, Ye = h(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), X = (s) => {
|
|
1205
1206
|
if (e.errorMessages.length) return "";
|
|
1206
1207
|
const a = e.formFieldErrors;
|
|
1207
1208
|
return a[s] ? a[s] : "";
|
|
1208
|
-
},
|
|
1209
|
-
|
|
1210
|
-
const a =
|
|
1209
|
+
}, H = (s) => {
|
|
1210
|
+
f(s ?? void 0);
|
|
1211
|
+
const a = re(e.fields.host);
|
|
1211
1212
|
a && (e.formFieldErrors.host = a);
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
const E =
|
|
1215
|
-
E && (e.formFieldErrors.port = E),
|
|
1216
|
-
},
|
|
1213
|
+
const u = N(e.fields.path);
|
|
1214
|
+
u && (e.formFieldErrors.path = u);
|
|
1215
|
+
const E = te(e.fields.port);
|
|
1216
|
+
E && (e.formFieldErrors.port = E), y.value ? d("url-valid:success") : d("url-valid:error", e.errorMessages.join(",") || i("gateway_services.form.errors.url.invalid"));
|
|
1217
|
+
}, f = (s) => {
|
|
1217
1218
|
if (s)
|
|
1218
1219
|
e.formFieldErrors[s] = "";
|
|
1219
1220
|
else
|
|
1220
1221
|
for (let a in e.formFieldErrors)
|
|
1221
1222
|
e.formFieldErrors[a] = "";
|
|
1222
1223
|
e.errorMessages = [];
|
|
1223
|
-
},
|
|
1224
|
+
}, y = h(() => {
|
|
1224
1225
|
for (let s in e.formFieldErrors)
|
|
1225
1226
|
if (e.formFieldErrors[s].length)
|
|
1226
1227
|
return !1;
|
|
1227
1228
|
return !0;
|
|
1228
|
-
}),
|
|
1229
|
-
e.fields.url &&
|
|
1230
|
-
},
|
|
1231
|
-
if (
|
|
1229
|
+
}), V = () => {
|
|
1230
|
+
e.fields.url && S.value === "url" ? Ae() : H();
|
|
1231
|
+
}, F = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, Z = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), L = h(() => {
|
|
1232
|
+
if (S.value === "url")
|
|
1232
1233
|
return !0;
|
|
1233
1234
|
const s = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1234
|
-
return
|
|
1235
|
-
}),
|
|
1236
|
-
if (
|
|
1235
|
+
return S.value === "protocol" && s;
|
|
1236
|
+
}), ke = h(() => {
|
|
1237
|
+
if (S.value === "url")
|
|
1237
1238
|
return !0;
|
|
1238
1239
|
const s = ["https", "tls"].includes(e.fields.protocol);
|
|
1239
|
-
return
|
|
1240
|
+
return S.value === "protocol" && s;
|
|
1241
|
+
}), De = (s) => {
|
|
1242
|
+
f("name"), le.value = ee.utf8Name(s);
|
|
1243
|
+
}, ue = h(() => {
|
|
1244
|
+
const s = !se.value || !ne(e.fields, b), a = S.value === "url" && !!e.fields.url && y.value, u = S.value === "protocol" && !!e.fields.host && y.value;
|
|
1245
|
+
return s && (a || u);
|
|
1240
1246
|
}), Be = (s) => {
|
|
1241
|
-
v("name"), oe.value = te.utf8Name(s);
|
|
1242
|
-
}, ke = h(() => {
|
|
1243
|
-
const s = !le.value || !ce(e.fields, b), a = V.value === "url" && !!e.fields.url && C.value, d = V.value === "protocol" && !!e.fields.host && C.value;
|
|
1244
|
-
return s && (a || d);
|
|
1245
|
-
}), g = (s) => {
|
|
1246
1247
|
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 ? [...s.ca_certificates] : [], e.fields.client_certificate = s?.client_certificate?.id || "", e.fields.tls_sans = {
|
|
1247
1248
|
dnsnames: s?.tls_sans?.dnsnames ?? [""],
|
|
1248
1249
|
uris: s?.tls_sans?.uris ?? [""]
|
|
@@ -1250,25 +1251,25 @@ const re = {
|
|
|
1250
1251
|
dnsnames: [...e.fields.tls_sans.dnsnames],
|
|
1251
1252
|
uris: [...e.fields.tls_sans.uris]
|
|
1252
1253
|
}, b.ca_certificates = [...e.fields.ca_certificates];
|
|
1253
|
-
},
|
|
1254
|
+
}, g = () => {
|
|
1254
1255
|
A.push(o.config.cancelRoute);
|
|
1255
|
-
},
|
|
1256
|
-
let s = `${o.config.apiBaseUrl}${
|
|
1256
|
+
}, M = h(() => {
|
|
1257
|
+
let s = `${o.config.apiBaseUrl}${Q.form[o.config.app][ae.value]}`;
|
|
1257
1258
|
return o.config.app === "konnect" && (s = s.replace(/{controlPlaneId}/gi, o.config?.controlPlaneId || "")), s.replace(/\/{workspace}/gi, o.config?.workspace ? `/${o.config.workspace}` : "").replace(/{id}/gi, o.gatewayServiceId ?? "");
|
|
1258
|
-
}),
|
|
1259
|
+
}), fe = h(() => {
|
|
1259
1260
|
if (!o.isTlsSansSupported)
|
|
1260
1261
|
return;
|
|
1261
|
-
if (!
|
|
1262
|
+
if (!L.value)
|
|
1262
1263
|
return null;
|
|
1263
|
-
const s = e.fields.tls_sans.dnsnames.map((
|
|
1264
|
+
const s = e.fields.tls_sans.dnsnames.map((u) => u.trim()).filter(Boolean), a = e.fields.tls_sans.uris.map((u) => u.trim()).filter(Boolean);
|
|
1264
1265
|
return s.length || a.length ? {
|
|
1265
1266
|
dnsnames: s.length ? s : null,
|
|
1266
1267
|
uris: a.length ? a : null
|
|
1267
1268
|
} : null;
|
|
1268
1269
|
}), Ce = h(() => {
|
|
1269
|
-
const s = e.fields.ca_certificates.filter((
|
|
1270
|
+
const s = e.fields.ca_certificates.filter((u) => u.trim() !== ""), a = {
|
|
1270
1271
|
name: e.fields.name || null,
|
|
1271
|
-
tags: e.fields.tags ? e.fields.tags?.split(",")?.map((
|
|
1272
|
+
tags: e.fields.tags ? e.fields.tags?.split(",")?.map((u) => String(u || "").trim())?.filter((u) => u !== "") : null,
|
|
1272
1273
|
protocol: e.fields.protocol,
|
|
1273
1274
|
path: e.fields.path || null,
|
|
1274
1275
|
read_timeout: e.fields.read_timeout,
|
|
@@ -1277,38 +1278,38 @@ const re = {
|
|
|
1277
1278
|
connect_timeout: e.fields.connect_timeout,
|
|
1278
1279
|
ca_certificates: s.length ? s : null,
|
|
1279
1280
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1280
|
-
tls_sans:
|
|
1281
|
+
tls_sans: fe.value,
|
|
1281
1282
|
write_timeout: e.fields.write_timeout,
|
|
1282
1283
|
port: e.fields.port,
|
|
1283
1284
|
url: e.fields.url,
|
|
1284
1285
|
enabled: e.fields.enabled
|
|
1285
1286
|
};
|
|
1286
|
-
return
|
|
1287
|
-
}),
|
|
1287
|
+
return L.value || (a.client_certificate = null), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (a.tls_verify = e.fields.tls_verify_value), Z.value || (a.path = null), ae.value === "create" ? S.value === "url" ? (delete a.protocol, delete a.host, delete a.path, o.config.app === "konnect" && delete a.port) : delete a.url : ae.value === "edit" && delete a.url, a;
|
|
1288
|
+
}), et = async () => {
|
|
1288
1289
|
try {
|
|
1289
1290
|
e.isReadonly = !0;
|
|
1290
1291
|
const s = Ce.value;
|
|
1291
1292
|
let a;
|
|
1292
|
-
if (
|
|
1293
|
-
const { data:
|
|
1294
|
-
e.fields.name =
|
|
1295
|
-
dnsnames:
|
|
1296
|
-
uris:
|
|
1297
|
-
}, e.fields.ca_certificates =
|
|
1293
|
+
if (ae.value === "create" ? a = await T.post(M.value, s) : ae.value === "edit" && (a = o.config?.app === "konnect" ? await T.put(M.value, s) : await T.patch(M.value, s)), a) {
|
|
1294
|
+
const { data: u } = a;
|
|
1295
|
+
e.fields.name = u?.name || "", e.fields.port = u.port || ie.getPortFromProtocol(u.protocol), e.fields.protocol = u?.protocol || "http", e.fields.host = u?.host || "", e.fields.path = u?.path || "", e.fields.url = u?.url || "", e.fields.retries = u?.retries || u?.retries === 0 ? u?.retries : 5, e.fields.connect_timeout = u?.connect_timeout || u?.connect_timeout === 0 ? u?.connect_timeout : 6e4, e.fields.write_timeout = u?.write_timeout || u?.write_timeout === 0 ? u?.write_timeout : 6e4, e.fields.read_timeout = u?.read_timeout || u?.read_timeout === 0 ? u?.read_timeout : 6e4, e.fields.client_certificate = u?.client_certificate?.id || "", e.fields.tls_sans = {
|
|
1296
|
+
dnsnames: u?.tls_sans?.dnsnames ?? [],
|
|
1297
|
+
uris: u?.tls_sans?.uris ?? []
|
|
1298
|
+
}, e.fields.ca_certificates = u?.ca_certificates?.length ? [...u.ca_certificates] : [], e.fields.tls_verify_enabled = u?.tls_verify !== "" && u?.tls_verify !== null && u?.tls_verify !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && u?.tls_verify, e.fields.tags = u?.tags?.length ? u.tags.join(", ") : "", e.fields.enabled = u?.enabled ?? !0, Object.assign(b, e.fields), b.tls_sans = {
|
|
1298
1299
|
dnsnames: [...e.fields.tls_sans.dnsnames],
|
|
1299
1300
|
uris: [...e.fields.tls_sans.uris]
|
|
1300
|
-
}, b.ca_certificates = [...e.fields.ca_certificates],
|
|
1301
|
+
}, b.ca_certificates = [...e.fields.ca_certificates], d("update", a?.data);
|
|
1301
1302
|
}
|
|
1302
1303
|
return a;
|
|
1303
1304
|
} catch (s) {
|
|
1304
|
-
const { fields: a, messages:
|
|
1305
|
-
e.errorMessages =
|
|
1305
|
+
const { fields: a, messages: u } = U(s);
|
|
1306
|
+
e.errorMessages = u, a.length && a.forEach((E) => {
|
|
1306
1307
|
const k = E.field;
|
|
1307
1308
|
k === "client_certificate.id" ? e.formFieldErrors.client_certificate = E.message : k.startsWith("tls_sans.dnsnames") ? e.formFieldErrors.tls_sans_dnsnames = E.message : k.startsWith("tls_sans.uris") ? e.formFieldErrors.tls_sans_uris = E.message : k.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = E.message : Object.keys(e.formFieldErrors).includes(k) && (e.formFieldErrors = {
|
|
1308
1309
|
...e.formFieldErrors,
|
|
1309
1310
|
[k]: E.message
|
|
1310
1311
|
});
|
|
1311
|
-
}),
|
|
1312
|
+
}), d("error", s);
|
|
1312
1313
|
} finally {
|
|
1313
1314
|
e.isReadonly = !1;
|
|
1314
1315
|
}
|
|
@@ -1316,104 +1317,104 @@ const re = {
|
|
|
1316
1317
|
return Ke(() => o.gatewayServiceId, () => {
|
|
1317
1318
|
Object.assign(e.fields, b);
|
|
1318
1319
|
}), Ke(e.fields, () => {
|
|
1319
|
-
|
|
1320
|
+
d("model-updated", Ce.value);
|
|
1320
1321
|
}), wt(() => {
|
|
1321
|
-
|
|
1322
|
-
}),
|
|
1323
|
-
validateUrl:
|
|
1322
|
+
d("model-updated", Ce.value), se.value || (e.fields.name = F()), o.isCertificateSelectEnabled && (W(), ce());
|
|
1323
|
+
}), K({
|
|
1324
|
+
validateUrl: V,
|
|
1324
1325
|
getPayload: Ce,
|
|
1325
|
-
saveFormData:
|
|
1326
|
-
canSubmit:
|
|
1327
|
-
initForm:
|
|
1326
|
+
saveFormData: et,
|
|
1327
|
+
canSubmit: ue,
|
|
1328
|
+
initForm: Be
|
|
1328
1329
|
}), (s, a) => {
|
|
1329
|
-
const
|
|
1330
|
+
const u = $("KRadio"), E = $("KButton"), k = $("KInput"), Se = $("KSelect"), it = $("KBadge"), vt = $("KMultiselect"), yt = $("KCheckbox"), lt = $("KCollapse"), _t = $("KAlert");
|
|
1330
1331
|
return p(), w("div", ma, [
|
|
1331
1332
|
c(t(qt), {
|
|
1332
|
-
"can-submit":
|
|
1333
|
-
config:
|
|
1334
|
-
"edit-id":
|
|
1335
|
-
"entity-type": t(
|
|
1333
|
+
"can-submit": ue.value,
|
|
1334
|
+
config: l.config,
|
|
1335
|
+
"edit-id": l.gatewayServiceId,
|
|
1336
|
+
"entity-type": t(gt).GatewayService,
|
|
1336
1337
|
"fetch-url": Qe.value,
|
|
1337
1338
|
"form-fields": Ce.value,
|
|
1338
1339
|
"is-readonly": e.isReadonly,
|
|
1339
|
-
onCancel:
|
|
1340
|
+
onCancel: g,
|
|
1340
1341
|
"onFetch:error": a[38] || (a[38] = (r) => s.$emit("error", r)),
|
|
1341
|
-
"onFetch:success":
|
|
1342
|
+
"onFetch:success": Be,
|
|
1342
1343
|
onLoading: a[39] || (a[39] = (r) => s.$emit("loading", r)),
|
|
1343
|
-
onSubmit:
|
|
1344
|
+
onSubmit: et
|
|
1344
1345
|
}, {
|
|
1345
1346
|
"form-actions": n(() => [
|
|
1346
1347
|
kt(s.$slots, "form-actions", {
|
|
1347
|
-
canSubmit:
|
|
1348
|
-
cancel:
|
|
1349
|
-
submit:
|
|
1348
|
+
canSubmit: ue.value,
|
|
1349
|
+
cancel: g,
|
|
1350
|
+
submit: et
|
|
1350
1351
|
}, void 0, !0)
|
|
1351
1352
|
]),
|
|
1352
1353
|
default: n(() => [
|
|
1353
|
-
c(t(
|
|
1354
|
-
description: t(
|
|
1355
|
-
"hide-info-header":
|
|
1356
|
-
title: t(
|
|
1354
|
+
c(t(dt), {
|
|
1355
|
+
description: t(i)("gateway_services.form.sections.keys.description"),
|
|
1356
|
+
"hide-info-header": l.hideSectionsInfo,
|
|
1357
|
+
title: t(i)("gateway_services.form.sections.keys.title")
|
|
1357
1358
|
}, {
|
|
1358
1359
|
default: n(() => [
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
c(
|
|
1362
|
-
modelValue:
|
|
1363
|
-
"onUpdate:modelValue": a[0] || (a[0] = (r) =>
|
|
1360
|
+
se.value ? I("", !0) : (p(), w("div", ga, [
|
|
1361
|
+
C("div", va, [
|
|
1362
|
+
c(u, {
|
|
1363
|
+
modelValue: S.value,
|
|
1364
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => S.value = r),
|
|
1364
1365
|
card: "",
|
|
1365
1366
|
"card-orientation": "horizontal",
|
|
1366
1367
|
"data-testid": "gateway-service-url-radio",
|
|
1367
|
-
description: t(
|
|
1368
|
-
label: t(
|
|
1369
|
-
"selected-value":
|
|
1370
|
-
onChange:
|
|
1368
|
+
description: t(i)("gateway_services.form.sections.keys.url.description"),
|
|
1369
|
+
label: t(i)("gateway_services.form.sections.keys.url.label"),
|
|
1370
|
+
"selected-value": O.url,
|
|
1371
|
+
onChange: Ue
|
|
1371
1372
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1372
|
-
c(
|
|
1373
|
-
modelValue:
|
|
1374
|
-
"onUpdate:modelValue": a[1] || (a[1] = (r) =>
|
|
1373
|
+
c(u, {
|
|
1374
|
+
modelValue: S.value,
|
|
1375
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => S.value = r),
|
|
1375
1376
|
card: "",
|
|
1376
1377
|
"card-orientation": "horizontal",
|
|
1377
1378
|
"checked-group": "protocol",
|
|
1378
1379
|
"data-testid": "gateway-service-protocol-radio",
|
|
1379
|
-
description: t(
|
|
1380
|
-
label: t(
|
|
1381
|
-
"selected-value":
|
|
1382
|
-
onChange:
|
|
1380
|
+
description: t(i)("gateway_services.form.sections.keys.protocol.description"),
|
|
1381
|
+
label: t(i)("gateway_services.form.sections.keys.protocol.label"),
|
|
1382
|
+
"selected-value": O.protocol,
|
|
1383
|
+
onChange: Ue
|
|
1383
1384
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1384
1385
|
]),
|
|
1385
|
-
c(
|
|
1386
|
+
c(at, { name: "slide-fade" }, {
|
|
1386
1387
|
default: n(() => [
|
|
1387
|
-
|
|
1388
|
+
S.value === "url" ? (p(), w("div", ya, [
|
|
1388
1389
|
c(k, {
|
|
1389
1390
|
modelValue: e.fields.url,
|
|
1390
1391
|
"onUpdate:modelValue": a[2] || (a[2] = (r) => e.fields.url = r),
|
|
1391
1392
|
modelModifiers: { trim: !0 },
|
|
1392
1393
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1393
1394
|
"data-testid": "gateway-service-url-input",
|
|
1394
|
-
error:
|
|
1395
|
-
"error-message":
|
|
1396
|
-
label: t(
|
|
1395
|
+
error: Ye.value,
|
|
1396
|
+
"error-message": X("url"),
|
|
1397
|
+
label: t(i)("gateway_services.form.fields.upstream_url.label"),
|
|
1397
1398
|
"label-attributes": {
|
|
1398
|
-
info:
|
|
1399
|
+
info: l.config.app === "konnect" ? t(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : t(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
1399
1400
|
tooltipAttributes: { maxWidth: "400" }
|
|
1400
1401
|
},
|
|
1401
1402
|
name: "url",
|
|
1402
|
-
placeholder: t(
|
|
1403
|
+
placeholder: t(i)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1403
1404
|
required: "",
|
|
1404
|
-
onInput:
|
|
1405
|
+
onInput: Ae
|
|
1405
1406
|
}, Ie({ _: 2 }, [
|
|
1406
|
-
|
|
1407
|
+
l.hideTrySampleApiButton ? void 0 : {
|
|
1407
1408
|
name: "after",
|
|
1408
1409
|
fn: n(() => [
|
|
1409
1410
|
c(E, {
|
|
1410
1411
|
appearance: "tertiary",
|
|
1411
1412
|
"data-testid": "try-sample-api",
|
|
1412
1413
|
size: "small",
|
|
1413
|
-
onClick:
|
|
1414
|
+
onClick: we
|
|
1414
1415
|
}, {
|
|
1415
1416
|
default: n(() => [
|
|
1416
|
-
P(_(t(
|
|
1417
|
+
P(_(t(i)("gateway_services.form.buttons.try_sample")), 1)
|
|
1417
1418
|
]),
|
|
1418
1419
|
_: 1
|
|
1419
1420
|
})
|
|
@@ -1426,17 +1427,17 @@ const re = {
|
|
|
1426
1427
|
_: 1
|
|
1427
1428
|
})
|
|
1428
1429
|
])),
|
|
1429
|
-
c(
|
|
1430
|
+
c(at, { name: "slide-fade" }, {
|
|
1430
1431
|
default: n(() => [
|
|
1431
|
-
|
|
1432
|
+
S.value === "protocol" || se.value ? (p(), w("div", _a, [
|
|
1432
1433
|
c(Se, {
|
|
1433
1434
|
modelValue: e.fields.protocol,
|
|
1434
1435
|
"onUpdate:modelValue": a[3] || (a[3] = (r) => e.fields.protocol = r),
|
|
1435
1436
|
"data-testid": "gateway-service-protocol-select",
|
|
1436
|
-
items:
|
|
1437
|
-
label: t(
|
|
1437
|
+
items: J,
|
|
1438
|
+
label: t(i)("gateway_services.form.fields.protocol.label"),
|
|
1438
1439
|
"label-attributes": {
|
|
1439
|
-
info: t(
|
|
1440
|
+
info: t(i)("gateway_services.form.fields.protocol.tooltip"),
|
|
1440
1441
|
tooltipAttributes: { maxWidth: "400" }
|
|
1441
1442
|
},
|
|
1442
1443
|
readonly: e.isReadonly,
|
|
@@ -1451,27 +1452,27 @@ const re = {
|
|
|
1451
1452
|
class: "gateway-service-form-margin-top",
|
|
1452
1453
|
"data-testid": "gateway-service-host-input",
|
|
1453
1454
|
error: !!e.formFieldErrors.host,
|
|
1454
|
-
"error-message":
|
|
1455
|
-
label: t(
|
|
1455
|
+
"error-message": X("host"),
|
|
1456
|
+
label: t(i)("gateway_services.form.fields.host.label"),
|
|
1456
1457
|
"label-attributes": {
|
|
1457
|
-
info: t(
|
|
1458
|
+
info: t(i)("gateway_services.form.fields.host.tooltip"),
|
|
1458
1459
|
tooltipAttributes: { maxWidth: "400" }
|
|
1459
1460
|
},
|
|
1460
1461
|
name: "host",
|
|
1461
|
-
placeholder: t(
|
|
1462
|
+
placeholder: t(i)("gateway_services.form.fields.host.placeholder"),
|
|
1462
1463
|
required: "",
|
|
1463
|
-
onInput: a[5] || (a[5] = (r) =>
|
|
1464
|
+
onInput: a[5] || (a[5] = (r) => H("host"))
|
|
1464
1465
|
}, Ie({ _: 2 }, [
|
|
1465
|
-
|
|
1466
|
+
l.hideTrySampleApiButton ? void 0 : {
|
|
1466
1467
|
name: "after",
|
|
1467
1468
|
fn: n(() => [
|
|
1468
1469
|
c(E, {
|
|
1469
1470
|
appearance: "tertiary",
|
|
1470
1471
|
size: "small",
|
|
1471
|
-
onClick:
|
|
1472
|
+
onClick: we
|
|
1472
1473
|
}, {
|
|
1473
1474
|
default: n(() => [
|
|
1474
|
-
P(_(t(
|
|
1475
|
+
P(_(t(i)("gateway_services.form.buttons.try_sample")), 1)
|
|
1475
1476
|
]),
|
|
1476
1477
|
_: 1
|
|
1477
1478
|
})
|
|
@@ -1479,7 +1480,7 @@ const re = {
|
|
|
1479
1480
|
key: "0"
|
|
1480
1481
|
}
|
|
1481
1482
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
1482
|
-
|
|
1483
|
+
Z.value ? (p(), w("div", ha, [
|
|
1483
1484
|
c(k, {
|
|
1484
1485
|
modelValue: e.fields.path,
|
|
1485
1486
|
"onUpdate:modelValue": a[6] || (a[6] = (r) => e.fields.path = r),
|
|
@@ -1487,15 +1488,15 @@ const re = {
|
|
|
1487
1488
|
class: "gateway-service-form-margin-top",
|
|
1488
1489
|
"data-testid": "gateway-service-path-input",
|
|
1489
1490
|
error: !!e.formFieldErrors.path,
|
|
1490
|
-
"error-message":
|
|
1491
|
-
label: t(
|
|
1491
|
+
"error-message": X("path"),
|
|
1492
|
+
label: t(i)("gateway_services.form.fields.path.label"),
|
|
1492
1493
|
"label-attributes": {
|
|
1493
|
-
info: t(
|
|
1494
|
+
info: t(i)("gateway_services.form.fields.path.tooltip"),
|
|
1494
1495
|
tooltipAttributes: { maxWidth: "400" }
|
|
1495
1496
|
},
|
|
1496
1497
|
name: "path",
|
|
1497
|
-
placeholder: t(
|
|
1498
|
-
onInput: a[7] || (a[7] = (r) =>
|
|
1498
|
+
placeholder: t(i)("gateway_services.form.fields.path.placeholder"),
|
|
1499
|
+
onInput: a[7] || (a[7] = (r) => H("path"))
|
|
1499
1500
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
1500
1501
|
])) : I("", !0),
|
|
1501
1502
|
c(k, {
|
|
@@ -1503,51 +1504,51 @@ const re = {
|
|
|
1503
1504
|
"onUpdate:modelValue": [
|
|
1504
1505
|
a[8] || (a[8] = (r) => e.fields.port = r),
|
|
1505
1506
|
a[10] || (a[10] = () => {
|
|
1506
|
-
e.fields.port =
|
|
1507
|
+
e.fields.port = j(e.fields.port + "");
|
|
1507
1508
|
})
|
|
1508
1509
|
],
|
|
1509
1510
|
class: "gateway-service-form-margin-top",
|
|
1510
1511
|
"data-testid": "gateway-service-port-input",
|
|
1511
1512
|
error: !!e.formFieldErrors.port,
|
|
1512
|
-
"error-message":
|
|
1513
|
-
label: t(
|
|
1513
|
+
"error-message": X("port"),
|
|
1514
|
+
label: t(i)("gateway_services.form.fields.port.label"),
|
|
1514
1515
|
"label-attributes": {
|
|
1515
|
-
info: t(
|
|
1516
|
+
info: t(i)("gateway_services.form.fields.port.tooltip"),
|
|
1516
1517
|
tooltipAttributes: { maxWidth: "400" }
|
|
1517
1518
|
},
|
|
1518
1519
|
name: "port",
|
|
1519
1520
|
type: "number",
|
|
1520
|
-
onInput: a[9] || (a[9] = (r) =>
|
|
1521
|
+
onInput: a[9] || (a[9] = (r) => H("port"))
|
|
1521
1522
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
1522
1523
|
])) : I("", !0)
|
|
1523
1524
|
]),
|
|
1524
1525
|
_: 1
|
|
1525
1526
|
}),
|
|
1526
1527
|
c(lt, {
|
|
1527
|
-
modelValue:
|
|
1528
|
-
"onUpdate:modelValue": a[34] || (a[34] = (r) =>
|
|
1528
|
+
modelValue: v.value,
|
|
1529
|
+
"onUpdate:modelValue": a[34] || (a[34] = (r) => v.value = r),
|
|
1529
1530
|
"data-testid": "advanced-fields-collapse",
|
|
1530
1531
|
"trigger-alignment": "leading",
|
|
1531
|
-
"trigger-label": t(
|
|
1532
|
+
"trigger-label": t(i)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1532
1533
|
}, {
|
|
1533
1534
|
default: n(() => [
|
|
1534
|
-
c(
|
|
1535
|
+
c(at, { name: "slide-fade" }, {
|
|
1535
1536
|
default: n(() => [
|
|
1536
|
-
|
|
1537
|
-
|
|
1537
|
+
v.value ? I("", !0) : (p(), w("div", ba, [
|
|
1538
|
+
C("div", wa, [
|
|
1538
1539
|
c(k, {
|
|
1539
1540
|
modelValue: e.fields.retries,
|
|
1540
1541
|
"onUpdate:modelValue": [
|
|
1541
1542
|
a[11] || (a[11] = (r) => e.fields.retries = r),
|
|
1542
1543
|
a[12] || (a[12] = () => {
|
|
1543
|
-
e.fields.retries =
|
|
1544
|
+
e.fields.retries = j(e.fields.retries + "");
|
|
1544
1545
|
})
|
|
1545
1546
|
],
|
|
1546
1547
|
autocomplete: "off",
|
|
1547
1548
|
"data-testid": "gateway-service-retries-input",
|
|
1548
|
-
label: t(
|
|
1549
|
+
label: t(i)("gateway_services.form.fields.retries.label"),
|
|
1549
1550
|
"label-attributes": {
|
|
1550
|
-
info: t(
|
|
1551
|
+
info: t(i)("gateway_services.form.fields.retries.tooltip"),
|
|
1551
1552
|
tooltipAttributes: { maxWidth: "400" }
|
|
1552
1553
|
},
|
|
1553
1554
|
name: "retries",
|
|
@@ -1555,20 +1556,20 @@ const re = {
|
|
|
1555
1556
|
type: "number"
|
|
1556
1557
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1557
1558
|
]),
|
|
1558
|
-
|
|
1559
|
+
C("div", ka, [
|
|
1559
1560
|
c(k, {
|
|
1560
1561
|
modelValue: e.fields.connect_timeout,
|
|
1561
1562
|
"onUpdate:modelValue": [
|
|
1562
1563
|
a[13] || (a[13] = (r) => e.fields.connect_timeout = r),
|
|
1563
1564
|
a[14] || (a[14] = () => {
|
|
1564
|
-
e.fields.connect_timeout =
|
|
1565
|
+
e.fields.connect_timeout = j(e.fields.connect_timeout + "");
|
|
1565
1566
|
})
|
|
1566
1567
|
],
|
|
1567
1568
|
autocomplete: "off",
|
|
1568
1569
|
"data-testid": "gateway-service-connTimeout-input",
|
|
1569
|
-
label: t(
|
|
1570
|
+
label: t(i)("gateway_services.form.fields.connect_timeout.label"),
|
|
1570
1571
|
"label-attributes": {
|
|
1571
|
-
info: t(
|
|
1572
|
+
info: t(i)("gateway_services.form.fields.connect_timeout.tooltip"),
|
|
1572
1573
|
tooltipAttributes: { maxWidth: "400" }
|
|
1573
1574
|
},
|
|
1574
1575
|
name: "connTimeout",
|
|
@@ -1576,20 +1577,20 @@ const re = {
|
|
|
1576
1577
|
type: "number"
|
|
1577
1578
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1578
1579
|
]),
|
|
1579
|
-
|
|
1580
|
+
C("div", Ca, [
|
|
1580
1581
|
c(k, {
|
|
1581
1582
|
modelValue: e.fields.write_timeout,
|
|
1582
1583
|
"onUpdate:modelValue": [
|
|
1583
1584
|
a[15] || (a[15] = (r) => e.fields.write_timeout = r),
|
|
1584
1585
|
a[16] || (a[16] = () => {
|
|
1585
|
-
e.fields.write_timeout =
|
|
1586
|
+
e.fields.write_timeout = j(e.fields.write_timeout + "");
|
|
1586
1587
|
})
|
|
1587
1588
|
],
|
|
1588
1589
|
autocomplete: "off",
|
|
1589
1590
|
"data-testid": "gateway-service-writeTimeout-input",
|
|
1590
|
-
label: t(
|
|
1591
|
+
label: t(i)("gateway_services.form.fields.write_timeout.label"),
|
|
1591
1592
|
"label-attributes": {
|
|
1592
|
-
info: t(
|
|
1593
|
+
info: t(i)("gateway_services.form.fields.write_timeout.tooltip"),
|
|
1593
1594
|
tooltipAttributes: { maxWidth: "400" }
|
|
1594
1595
|
},
|
|
1595
1596
|
name: "writeTimeout",
|
|
@@ -1597,20 +1598,20 @@ const re = {
|
|
|
1597
1598
|
type: "number"
|
|
1598
1599
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1599
1600
|
]),
|
|
1600
|
-
|
|
1601
|
+
C("div", Sa, [
|
|
1601
1602
|
c(k, {
|
|
1602
1603
|
modelValue: e.fields.read_timeout,
|
|
1603
1604
|
"onUpdate:modelValue": [
|
|
1604
1605
|
a[17] || (a[17] = (r) => e.fields.read_timeout = r),
|
|
1605
1606
|
a[18] || (a[18] = () => {
|
|
1606
|
-
e.fields.read_timeout =
|
|
1607
|
+
e.fields.read_timeout = j(e.fields.read_timeout + "");
|
|
1607
1608
|
})
|
|
1608
1609
|
],
|
|
1609
1610
|
autocomplete: "off",
|
|
1610
1611
|
"data-testid": "gateway-service-readTimeout-input",
|
|
1611
|
-
label: t(
|
|
1612
|
+
label: t(i)("gateway_services.form.fields.read_timeout.label"),
|
|
1612
1613
|
"label-attributes": {
|
|
1613
|
-
info: t(
|
|
1614
|
+
info: t(i)("gateway_services.form.fields.read_timeout.tooltip"),
|
|
1614
1615
|
tooltipAttributes: { maxWidth: "400" }
|
|
1615
1616
|
},
|
|
1616
1617
|
name: "readTimeout",
|
|
@@ -1618,37 +1619,37 @@ const re = {
|
|
|
1618
1619
|
type: "number"
|
|
1619
1620
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1620
1621
|
]),
|
|
1621
|
-
|
|
1622
|
-
|
|
1622
|
+
L.value ? (p(), w("div", Va, [
|
|
1623
|
+
l.isCertificateSelectEnabled ? (p(), D(Se, {
|
|
1623
1624
|
key: 0,
|
|
1624
1625
|
modelValue: e.fields.client_certificate,
|
|
1625
1626
|
"onUpdate:modelValue": [
|
|
1626
1627
|
a[19] || (a[19] = (r) => e.fields.client_certificate = r),
|
|
1627
|
-
a[20] || (a[20] = (r) =>
|
|
1628
|
+
a[20] || (a[20] = (r) => z("client_certificate"))
|
|
1628
1629
|
],
|
|
1629
1630
|
clearable: "",
|
|
1630
1631
|
"data-testid": "gateway-service-clientCert-select",
|
|
1631
1632
|
"enable-filtering": "",
|
|
1632
1633
|
error: !!e.formFieldErrors.client_certificate,
|
|
1633
1634
|
"filter-function": () => !0,
|
|
1634
|
-
items:
|
|
1635
|
-
label: t(
|
|
1635
|
+
items: ge.value,
|
|
1636
|
+
label: t(i)("gateway_services.form.fields.client_certificate.label"),
|
|
1636
1637
|
"label-attributes": {
|
|
1637
|
-
info: t(
|
|
1638
|
+
info: t(i)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1638
1639
|
tooltipAttributes: { maxWidth: "400" }
|
|
1639
1640
|
},
|
|
1640
1641
|
loading: t(Ge),
|
|
1641
1642
|
name: "clientCert",
|
|
1642
|
-
placeholder: t(
|
|
1643
|
+
placeholder: t(i)("gateway_services.form.fields.client_certificate.select_placeholder"),
|
|
1643
1644
|
readonly: e.isReadonly,
|
|
1644
1645
|
width: "100%",
|
|
1645
1646
|
onQueryChange: t(We)
|
|
1646
1647
|
}, {
|
|
1647
1648
|
"item-template": n(({ item: r }) => [
|
|
1648
|
-
|
|
1649
|
-
|
|
1649
|
+
C("div", Ea, [
|
|
1650
|
+
C("span", Ia, _(r.value), 1),
|
|
1650
1651
|
$e(r.value).length ? (p(), w("div", Fa, [
|
|
1651
|
-
(p(!0), w(Fe, null, Le($e(r.value), (Ve) => (p(), D(
|
|
1652
|
+
(p(!0), w(Fe, null, Le($e(r.value), (Ve) => (p(), D(it, {
|
|
1652
1653
|
key: Ve,
|
|
1653
1654
|
appearance: "info",
|
|
1654
1655
|
"max-width": "150",
|
|
@@ -1671,74 +1672,74 @@ const re = {
|
|
|
1671
1672
|
autocomplete: "off",
|
|
1672
1673
|
"data-testid": "gateway-service-clientCert-input",
|
|
1673
1674
|
error: !!e.formFieldErrors.client_certificate,
|
|
1674
|
-
label: t(
|
|
1675
|
+
label: t(i)("gateway_services.form.fields.client_certificate.label"),
|
|
1675
1676
|
"label-attributes": {
|
|
1676
|
-
info: t(
|
|
1677
|
+
info: t(i)("gateway_services.form.fields.client_certificate.tooltip"),
|
|
1677
1678
|
tooltipAttributes: { maxWidth: "400" }
|
|
1678
1679
|
},
|
|
1679
1680
|
name: "clientCert",
|
|
1680
|
-
placeholder: t(
|
|
1681
|
+
placeholder: t(i)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
1681
1682
|
readonly: e.isReadonly,
|
|
1682
1683
|
type: "text",
|
|
1683
|
-
onInput: a[22] || (a[22] = (r) =>
|
|
1684
|
+
onInput: a[22] || (a[22] = (r) => z("client_certificate"))
|
|
1684
1685
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"]))
|
|
1685
1686
|
])) : I("", !0),
|
|
1686
|
-
|
|
1687
|
+
L.value && l.isTlsSansSupported ? (p(), D(ut, {
|
|
1687
1688
|
key: 1,
|
|
1688
1689
|
modelValue: e.fields.tls_sans.dnsnames,
|
|
1689
1690
|
"onUpdate:modelValue": a[23] || (a[23] = (r) => e.fields.tls_sans.dnsnames = r),
|
|
1690
|
-
"add-button-text": t(
|
|
1691
|
+
"add-button-text": t(i)("gateway_services.form.fields.tls_sans_dnsnames.add"),
|
|
1691
1692
|
class: "gateway-service-form-margin-bottom",
|
|
1692
1693
|
"data-testid": "gateway-service-tls-sans-dnsnames",
|
|
1693
1694
|
error: !!e.formFieldErrors.tls_sans_dnsnames,
|
|
1694
|
-
label: t(
|
|
1695
|
-
placeholder: t(
|
|
1695
|
+
label: t(i)("gateway_services.form.fields.tls_sans_dnsnames.label"),
|
|
1696
|
+
placeholder: t(i)("gateway_services.form.fields.tls_sans_dnsnames.placeholder"),
|
|
1696
1697
|
readonly: e.isReadonly,
|
|
1697
1698
|
"test-id-prefix": "tls-sans-dnsnames",
|
|
1698
|
-
tooltip: t(
|
|
1699
|
-
onInput: a[24] || (a[24] = (r) =>
|
|
1699
|
+
tooltip: t(i)("gateway_services.form.fields.tls_sans_dnsnames.tooltip"),
|
|
1700
|
+
onInput: a[24] || (a[24] = (r) => z("tls_sans_dnsnames"))
|
|
1700
1701
|
}, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : I("", !0),
|
|
1701
|
-
|
|
1702
|
+
L.value && l.isTlsSansSupported ? (p(), D(ut, {
|
|
1702
1703
|
key: 2,
|
|
1703
1704
|
modelValue: e.fields.tls_sans.uris,
|
|
1704
1705
|
"onUpdate:modelValue": a[25] || (a[25] = (r) => e.fields.tls_sans.uris = r),
|
|
1705
|
-
"add-button-text": t(
|
|
1706
|
+
"add-button-text": t(i)("gateway_services.form.fields.tls_sans_uris.add"),
|
|
1706
1707
|
class: "gateway-service-form-margin-bottom",
|
|
1707
1708
|
"data-testid": "gateway-service-tls-sans-uris",
|
|
1708
1709
|
error: !!e.formFieldErrors.tls_sans_uris,
|
|
1709
|
-
label: t(
|
|
1710
|
-
placeholder: t(
|
|
1710
|
+
label: t(i)("gateway_services.form.fields.tls_sans_uris.label"),
|
|
1711
|
+
placeholder: t(i)("gateway_services.form.fields.tls_sans_uris.placeholder"),
|
|
1711
1712
|
readonly: e.isReadonly,
|
|
1712
1713
|
"test-id-prefix": "tls-sans-uris",
|
|
1713
|
-
tooltip: t(
|
|
1714
|
-
onInput: a[26] || (a[26] = (r) =>
|
|
1714
|
+
tooltip: t(i)("gateway_services.form.fields.tls_sans_uris.tooltip"),
|
|
1715
|
+
onInput: a[26] || (a[26] = (r) => z("tls_sans_uris"))
|
|
1715
1716
|
}, null, 8, ["modelValue", "add-button-text", "error", "label", "placeholder", "readonly", "tooltip"])) : I("", !0),
|
|
1716
|
-
|
|
1717
|
-
|
|
1717
|
+
ke.value ? (p(), w("div", Pa, [
|
|
1718
|
+
l.isCertificateSelectEnabled ? (p(), D(vt, {
|
|
1718
1719
|
key: 0,
|
|
1719
1720
|
modelValue: e.fields.ca_certificates,
|
|
1720
1721
|
"onUpdate:modelValue": [
|
|
1721
1722
|
a[27] || (a[27] = (r) => e.fields.ca_certificates = r),
|
|
1722
|
-
a[28] || (a[28] = (r) =>
|
|
1723
|
+
a[28] || (a[28] = (r) => z("ca_certificates"))
|
|
1723
1724
|
],
|
|
1724
1725
|
autosuggest: "",
|
|
1725
1726
|
"data-testid": "gateway-service-ca-certs-select",
|
|
1726
1727
|
error: !!e.formFieldErrors.ca_certificates,
|
|
1727
1728
|
items: Ze.value,
|
|
1728
|
-
label: t(
|
|
1729
|
+
label: t(i)("gateway_services.form.fields.ca_certificates.label"),
|
|
1729
1730
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1730
1731
|
loading: t(ze),
|
|
1731
|
-
placeholder: t(
|
|
1732
|
+
placeholder: t(i)("gateway_services.form.fields.ca_certificates.select_placeholder"),
|
|
1732
1733
|
readonly: e.isReadonly,
|
|
1733
1734
|
width: "100%",
|
|
1734
1735
|
onQueryChange: t(je)
|
|
1735
1736
|
}, {
|
|
1736
1737
|
"item-template": n(({ item: r }) => [
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1738
|
+
C("div", $a, [
|
|
1739
|
+
C("div", Ta, [
|
|
1740
|
+
C("span", xa, _(r.value), 1),
|
|
1740
1741
|
B(r.value).length ? (p(), w("div", Ra, [
|
|
1741
|
-
(p(!0), w(Fe, null, Le(B(r.value), (Ve) => (p(), D(
|
|
1742
|
+
(p(!0), w(Fe, null, Le(B(r.value), (Ve) => (p(), D(it, {
|
|
1742
1743
|
key: Ve,
|
|
1743
1744
|
appearance: "info",
|
|
1744
1745
|
"max-width": "150",
|
|
@@ -1751,11 +1752,11 @@ const re = {
|
|
|
1751
1752
|
}, 1024))), 128))
|
|
1752
1753
|
])) : I("", !0)
|
|
1753
1754
|
]),
|
|
1754
|
-
|
|
1755
|
+
he(r.value) ? (p(), w("span", {
|
|
1755
1756
|
key: 0,
|
|
1756
1757
|
class: "certificate-select-item-issuer",
|
|
1757
|
-
title:
|
|
1758
|
-
}, _(
|
|
1758
|
+
title: he(r.value)
|
|
1759
|
+
}, _(he(r.value)), 9, Ua)) : I("", !0)
|
|
1759
1760
|
])
|
|
1760
1761
|
]),
|
|
1761
1762
|
"label-tooltip": n(() => [
|
|
@@ -1764,10 +1765,10 @@ const re = {
|
|
|
1764
1765
|
scope: "global"
|
|
1765
1766
|
}, {
|
|
1766
1767
|
code1: n(() => [
|
|
1767
|
-
|
|
1768
|
+
C("code", null, _(t(i)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1768
1769
|
]),
|
|
1769
1770
|
code2: n(() => [
|
|
1770
|
-
|
|
1771
|
+
C("code", null, _(t(i)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1771
1772
|
]),
|
|
1772
1773
|
_: 1
|
|
1773
1774
|
})
|
|
@@ -1781,12 +1782,12 @@ const re = {
|
|
|
1781
1782
|
autocomplete: "off",
|
|
1782
1783
|
"data-testid": "gateway-service-ca-certs-input",
|
|
1783
1784
|
error: !!e.formFieldErrors.ca_certificates,
|
|
1784
|
-
label: t(
|
|
1785
|
+
label: t(i)("gateway_services.form.fields.ca_certificates.label"),
|
|
1785
1786
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1786
|
-
placeholder: t(
|
|
1787
|
+
placeholder: t(i)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
1787
1788
|
readonly: e.isReadonly,
|
|
1788
1789
|
type: "text",
|
|
1789
|
-
onInput: a[30] || (a[30] = (r) =>
|
|
1790
|
+
onInput: a[30] || (a[30] = (r) => z("ca_certificates"))
|
|
1790
1791
|
}, {
|
|
1791
1792
|
"label-tooltip": n(() => [
|
|
1792
1793
|
c(t(R), {
|
|
@@ -1794,10 +1795,10 @@ const re = {
|
|
|
1794
1795
|
scope: "global"
|
|
1795
1796
|
}, {
|
|
1796
1797
|
code1: n(() => [
|
|
1797
|
-
|
|
1798
|
+
C("code", null, _(t(i)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1798
1799
|
]),
|
|
1799
1800
|
code2: n(() => [
|
|
1800
|
-
|
|
1801
|
+
C("code", null, _(t(i)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1801
1802
|
]),
|
|
1802
1803
|
_: 1
|
|
1803
1804
|
})
|
|
@@ -1805,13 +1806,13 @@ const re = {
|
|
|
1805
1806
|
_: 1
|
|
1806
1807
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"]))
|
|
1807
1808
|
])) : I("", !0),
|
|
1808
|
-
|
|
1809
|
+
L.value ? (p(), w("div", Aa, [
|
|
1809
1810
|
c(yt, {
|
|
1810
1811
|
modelValue: e.fields.tls_verify_enabled,
|
|
1811
1812
|
"onUpdate:modelValue": a[31] || (a[31] = (r) => e.fields.tls_verify_enabled = r),
|
|
1812
1813
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1813
|
-
description: t(
|
|
1814
|
-
label: t(
|
|
1814
|
+
description: t(i)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1815
|
+
label: t(i)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1815
1816
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1816
1817
|
}, {
|
|
1817
1818
|
tooltip: n(() => [
|
|
@@ -1820,7 +1821,7 @@ const re = {
|
|
|
1820
1821
|
scope: "global"
|
|
1821
1822
|
}, {
|
|
1822
1823
|
code1: n(() => [
|
|
1823
|
-
|
|
1824
|
+
C("code", null, _(t(i)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1824
1825
|
]),
|
|
1825
1826
|
_: 1
|
|
1826
1827
|
})
|
|
@@ -1828,20 +1829,20 @@ const re = {
|
|
|
1828
1829
|
_: 1
|
|
1829
1830
|
}, 8, ["modelValue", "description", "label"]),
|
|
1830
1831
|
e.fields.tls_verify_enabled ? (p(), w("div", Da, [
|
|
1831
|
-
c(
|
|
1832
|
+
c(u, {
|
|
1832
1833
|
modelValue: e.fields.tls_verify_value,
|
|
1833
1834
|
"onUpdate:modelValue": a[32] || (a[32] = (r) => e.fields.tls_verify_value = r),
|
|
1834
1835
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1835
|
-
label: t(
|
|
1836
|
+
label: t(i)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1836
1837
|
"selected-value": !0
|
|
1837
1838
|
}, null, 8, ["modelValue", "label"])
|
|
1838
1839
|
])) : I("", !0),
|
|
1839
1840
|
e.fields.tls_verify_enabled ? (p(), w("div", Ba, [
|
|
1840
|
-
c(
|
|
1841
|
+
c(u, {
|
|
1841
1842
|
modelValue: e.fields.tls_verify_value,
|
|
1842
1843
|
"onUpdate:modelValue": a[33] || (a[33] = (r) => e.fields.tls_verify_value = r),
|
|
1843
1844
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1844
|
-
label: t(
|
|
1845
|
+
label: t(i)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1845
1846
|
"selected-value": !1
|
|
1846
1847
|
}, null, 8, ["modelValue", "label"])
|
|
1847
1848
|
])) : I("", !0)
|
|
@@ -1856,10 +1857,10 @@ const re = {
|
|
|
1856
1857
|
]),
|
|
1857
1858
|
_: 1
|
|
1858
1859
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1859
|
-
c(t(
|
|
1860
|
-
description: t(
|
|
1861
|
-
"hide-info-header":
|
|
1862
|
-
title: t(
|
|
1860
|
+
c(t(dt), {
|
|
1861
|
+
description: t(i)("gateway_services.form.sections.general.description"),
|
|
1862
|
+
"hide-info-header": l.hideSectionsInfo,
|
|
1863
|
+
title: t(i)("gateway_services.form.sections.general.title")
|
|
1863
1864
|
}, {
|
|
1864
1865
|
default: n(() => [
|
|
1865
1866
|
c(k, {
|
|
@@ -1868,43 +1869,43 @@ const re = {
|
|
|
1868
1869
|
modelModifiers: { trim: !0 },
|
|
1869
1870
|
autocomplete: "off",
|
|
1870
1871
|
"data-testid": "gateway-service-name-input",
|
|
1871
|
-
error:
|
|
1872
|
-
"error-message":
|
|
1873
|
-
label: t(
|
|
1872
|
+
error: be.value,
|
|
1873
|
+
"error-message": le.value,
|
|
1874
|
+
label: t(i)("gateway_services.form.fields.name.label"),
|
|
1874
1875
|
"label-attributes": {
|
|
1875
|
-
info: t(
|
|
1876
|
+
info: t(i)("gateway_services.form.fields.name.tooltip"),
|
|
1876
1877
|
tooltipAttributes: { maxWidth: "400" }
|
|
1877
1878
|
},
|
|
1878
1879
|
name: "name",
|
|
1879
|
-
placeholder: t(
|
|
1880
|
+
placeholder: t(i)("gateway_services.form.fields.name.placeholder"),
|
|
1880
1881
|
readonly: e.isReadonly,
|
|
1881
1882
|
type: "text",
|
|
1882
|
-
onInput:
|
|
1883
|
+
onInput: De
|
|
1883
1884
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1884
1885
|
c(lt, {
|
|
1885
1886
|
"data-testid": "tags-collapse",
|
|
1886
1887
|
"trigger-alignment": "leading",
|
|
1887
|
-
"trigger-label": t(
|
|
1888
|
+
"trigger-label": t(i)("gateway_services.form.fields.tags.collapse")
|
|
1888
1889
|
}, {
|
|
1889
1890
|
default: n(() => [
|
|
1890
|
-
|
|
1891
|
+
C("div", Ma, [
|
|
1891
1892
|
c(k, {
|
|
1892
1893
|
modelValue: e.fields.tags,
|
|
1893
1894
|
"onUpdate:modelValue": a[36] || (a[36] = (r) => e.fields.tags = r),
|
|
1894
1895
|
modelModifiers: { trim: !0 },
|
|
1895
1896
|
autocomplete: "off",
|
|
1896
1897
|
"data-testid": "gateway-service-tags-input",
|
|
1897
|
-
help: t(
|
|
1898
|
-
label: t(
|
|
1898
|
+
help: t(i)("gateway_services.form.fields.tags.help"),
|
|
1899
|
+
label: t(i)("gateway_services.form.fields.tags.label"),
|
|
1899
1900
|
"label-attributes": {
|
|
1900
|
-
info: t(
|
|
1901
|
+
info: t(i)("gateway_services.form.fields.tags.tooltip"),
|
|
1901
1902
|
tooltipAttributes: { maxWidth: "400" }
|
|
1902
1903
|
},
|
|
1903
1904
|
name: "tags",
|
|
1904
|
-
placeholder: t(
|
|
1905
|
+
placeholder: t(i)("gateway_services.form.fields.tags.placeholder"),
|
|
1905
1906
|
readonly: e.isReadonly,
|
|
1906
1907
|
type: "text",
|
|
1907
|
-
onInput: a[37] || (a[37] = (r) =>
|
|
1908
|
+
onInput: a[37] || (a[37] = (r) => f("tags"))
|
|
1908
1909
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
1909
1910
|
])
|
|
1910
1911
|
]),
|
|
@@ -1919,7 +1920,7 @@ const re = {
|
|
|
1919
1920
|
"data-testid": "form-error"
|
|
1920
1921
|
}, {
|
|
1921
1922
|
default: n(() => [
|
|
1922
|
-
|
|
1923
|
+
C("ul", Ka, [
|
|
1923
1924
|
(p(!0), w(Fe, null, Le(e.errorMessages, (r) => (p(), w("li", { key: r }, _(r), 1))), 128))
|
|
1924
1925
|
])
|
|
1925
1926
|
]),
|
|
@@ -1931,7 +1932,7 @@ const re = {
|
|
|
1931
1932
|
]);
|
|
1932
1933
|
};
|
|
1933
1934
|
}
|
|
1934
|
-
}), Xa = /* @__PURE__ */
|
|
1935
|
+
}), Xa = /* @__PURE__ */ st(La, [["__scopeId", "data-v-a9f81e18"]]), { validateHost: Na, validatePort: qa, validateProtocol: Wa, validatePath: Ga } = oe.useUrlValidators(), Ya = () => ({
|
|
1935
1936
|
validateHost: Na,
|
|
1936
1937
|
validatePort: qa,
|
|
1937
1938
|
validateProtocol: Wa,
|