@kong-ui-public/entities-upstreams-targets 3.12.10 → 3.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-upstreams-targets.es.js +646 -654
- package/dist/entities-upstreams-targets.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/TargetForm.vue.d.ts.map +1 -1
- package/dist/types/components/UpstreamsForm.vue.d.ts.map +1 -1
- package/dist/types/targets-endpoints.d.ts +0 -2
- package/dist/types/targets-endpoints.d.ts.map +1 -1
- package/dist/types/types/upstreams-form.d.ts +1 -1
- package/dist/types/types/upstreams-form.d.ts.map +1 -1
- package/dist/types/upstreams-endpoints.d.ts +0 -2
- package/dist/types/upstreams-endpoints.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as R, defineComponent as ne, computed as
|
|
2
|
-
import { useAxios as
|
|
1
|
+
import { ref as R, defineComponent as ne, computed as U, watch as de, onBeforeMount as De, resolveComponent as P, createElementBlock as oe, openBlock as q, createVNode as u, unref as e, createSlots as Ie, withCtx as n, createTextVNode as Q, toDisplayString as f, createElementVNode as v, createBlock as E, Teleport as bt, createCommentVNode as B, reactive as qe, renderSlot as vt, Fragment as Ce, renderList as Pt, normalizeClass as $t } from "vue";
|
|
2
|
+
import { useAxios as $e, useTableState as At, useFetcher as kt, useDeleteUrlBuilder as _t, FetcherStatus as Ct, EntityBaseTable as St, PermissionsWrapper as ce, TableTags as Ht, EntityFilter as Mt, EntityDeleteModal as Ut, EntityTypes as It, useErrors as qt, EntityBaseFormType as ue, EntityBaseForm as wt, SupportedEntityType as Le, useDebouncedFilter as mt, EntityFormSection as He, useHelpers as Kt, ConfigurationSchemaType as Vt, ConfigurationSchemaSection as he, EntityBaseConfigCard as Et } from "@kong-ui-public/entities-shared";
|
|
3
3
|
import { useRouter as Tt } from "vue-router";
|
|
4
|
-
import { BookIcon as ft, AddIcon as
|
|
4
|
+
import { BookIcon as ft, AddIcon as we, CloudUploadIcon as Nt, TrashIcon as Bt } from "@kong/icons";
|
|
5
5
|
import { createI18n as Rt, i18nTComponent as Dt } from "@kong-ui-public/i18n";
|
|
6
6
|
const Lt = {
|
|
7
7
|
list: {
|
|
@@ -397,8 +397,8 @@ function Se(a) {
|
|
|
397
397
|
const { replaceId: D = !1 } = a, i = R([]);
|
|
398
398
|
return {
|
|
399
399
|
addedItems: i,
|
|
400
|
-
trackNewItems: (h,
|
|
401
|
-
if (
|
|
400
|
+
trackNewItems: (h, g) => {
|
|
401
|
+
if (g) {
|
|
402
402
|
const y = { ...h };
|
|
403
403
|
D && (y.value = h.label), i.value.push(y);
|
|
404
404
|
} else
|
|
@@ -406,7 +406,7 @@ function Se(a) {
|
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
const
|
|
409
|
+
const Te = [
|
|
410
410
|
{
|
|
411
411
|
label: "100",
|
|
412
412
|
value: "100"
|
|
@@ -775,70 +775,70 @@ const Oe = [
|
|
|
775
775
|
label: "599",
|
|
776
776
|
value: "599"
|
|
777
777
|
}
|
|
778
|
-
],
|
|
779
|
-
function
|
|
780
|
-
const a = (
|
|
781
|
-
if (a(
|
|
782
|
-
const m = Number(
|
|
778
|
+
], Ne = 10, Be = 65536, Jt = 0, Gt = 65535, ge = 0, be = 255, Ft = 0, xt = 255, zt = 0, Xt = 65535, yt = 0, gt = 65535, Yt = 0, Zt = 2 ** 31, Fe = ["200", "302"], xe = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], Oe = ["429", "404", "500", "501", "502", "503", "504", "505"], Pe = ["429", "500", "503"], ea = ["latency", "least-connections", "round-robin"];
|
|
779
|
+
function Ae() {
|
|
780
|
+
const a = (l) => /^\d+$/.test(l), D = (l, c, C) => {
|
|
781
|
+
if (a(l)) {
|
|
782
|
+
const m = Number(l);
|
|
783
783
|
return m >= c && m <= C;
|
|
784
784
|
} else
|
|
785
785
|
return !1;
|
|
786
|
-
}, i = (
|
|
787
|
-
var C, m, t, V,
|
|
786
|
+
}, i = (l) => l.map((c) => Number(c)), s = (l) => l.map((c) => c.toString()), h = (l) => {
|
|
787
|
+
var C, m, t, V, w, p, S, G, N, X, k, T, $, A, _, O, W, le, z, re, M, K, ee, se, ae, te, H, L, b, I, x, Y, d, o, r, J, Z, ie, fe, ye, Ue, je, Qe, We, Je, Ge, ze, Xe, Ye, Ze, et, tt, at, lt, st, it, ot, rt, nt, ht, ut, ct, dt, pt;
|
|
788
788
|
return {
|
|
789
|
-
name: (
|
|
790
|
-
hostHeader: (
|
|
791
|
-
clientCertificate: ((C =
|
|
792
|
-
tags: ((m =
|
|
793
|
-
algorithm: (
|
|
794
|
-
stickySessionsCookie: (
|
|
795
|
-
stickySessionsCookiePath: (
|
|
796
|
-
slots: ((t =
|
|
797
|
-
hashOn: (
|
|
798
|
-
hashFallback: (
|
|
799
|
-
hashOnHeader: (
|
|
800
|
-
hashOnCookie: (
|
|
801
|
-
hashOnCookiePath: (
|
|
802
|
-
hashOnQueryArgument: (
|
|
803
|
-
hashOnUriCapture: (
|
|
804
|
-
hashFallbackHeader: (
|
|
805
|
-
hashFallbackQueryArgument: (
|
|
806
|
-
hashFallbackUriCapture: (
|
|
807
|
-
activeHealthSwitch:
|
|
808
|
-
passiveHealthSwitch:
|
|
809
|
-
healthchecksThreshold: ((
|
|
789
|
+
name: (l == null ? void 0 : l.name) || "",
|
|
790
|
+
hostHeader: (l == null ? void 0 : l.host_header) || "",
|
|
791
|
+
clientCertificate: ((C = l == null ? void 0 : l.client_certificate) == null ? void 0 : C.id) || "",
|
|
792
|
+
tags: ((m = l == null ? void 0 : l.tags) == null ? void 0 : m.join(", ")) || "",
|
|
793
|
+
algorithm: (l == null ? void 0 : l.algorithm) || "round-robin",
|
|
794
|
+
stickySessionsCookie: (l == null ? void 0 : l.sticky_sessions_cookie) || "",
|
|
795
|
+
stickySessionsCookiePath: (l == null ? void 0 : l.sticky_sessions_cookie_path) || "/",
|
|
796
|
+
slots: ((t = l == null ? void 0 : l.slots) == null ? void 0 : t.toString()) || "10000",
|
|
797
|
+
hashOn: (l == null ? void 0 : l.hash_on) || "none",
|
|
798
|
+
hashFallback: (l == null ? void 0 : l.hash_fallback) || "none",
|
|
799
|
+
hashOnHeader: (l == null ? void 0 : l.hash_on_header) || "",
|
|
800
|
+
hashOnCookie: (l == null ? void 0 : l.hash_on_cookie) || "",
|
|
801
|
+
hashOnCookiePath: (l == null ? void 0 : l.hash_on_cookie_path) || "/",
|
|
802
|
+
hashOnQueryArgument: (l == null ? void 0 : l.hash_on_query_arg) || "",
|
|
803
|
+
hashOnUriCapture: (l == null ? void 0 : l.hash_on_uri_capture) || "",
|
|
804
|
+
hashFallbackHeader: (l == null ? void 0 : l.hash_fallback_header) || "",
|
|
805
|
+
hashFallbackQueryArgument: (l == null ? void 0 : l.hash_fallback_query_arg) || "",
|
|
806
|
+
hashFallbackUriCapture: (l == null ? void 0 : l.hash_fallback_uri_capture) || "",
|
|
807
|
+
activeHealthSwitch: l ? ((w = (V = l.healthchecks.active) == null ? void 0 : V.healthy) == null ? void 0 : w.interval) !== 0 || ((S = (p = l.healthchecks.active) == null ? void 0 : p.unhealthy) == null ? void 0 : S.interval) !== 0 : !1,
|
|
808
|
+
passiveHealthSwitch: l ? ((N = (G = l.healthchecks.passive) == null ? void 0 : G.healthy) == null ? void 0 : N.successes) !== 0 || ((k = (X = l.healthchecks.passive) == null ? void 0 : X.unhealthy) == null ? void 0 : k.timeouts) !== 0 || (($ = (T = l.healthchecks.passive) == null ? void 0 : T.unhealthy) == null ? void 0 : $.tcp_failures) !== 0 || ((_ = (A = l.healthchecks.passive) == null ? void 0 : A.unhealthy) == null ? void 0 : _.http_failures) !== 0 : !1,
|
|
809
|
+
healthchecksThreshold: ((O = l == null ? void 0 : l.healthchecks.threshold) == null ? void 0 : O.toString()) || "0",
|
|
810
810
|
activeHealthCheck: {
|
|
811
|
-
type: ((
|
|
812
|
-
httpPath: ((le =
|
|
813
|
-
timeout: ((re = (
|
|
814
|
-
concurrency: ((K = (
|
|
815
|
-
httpsSni: ((ee =
|
|
816
|
-
verifySsl: ((se =
|
|
817
|
-
headers: (ae =
|
|
811
|
+
type: ((W = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : W.type) || "http",
|
|
812
|
+
httpPath: ((le = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : le.http_path) || "/",
|
|
813
|
+
timeout: ((re = (z = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : z.timeout) == null ? void 0 : re.toString()) || "1",
|
|
814
|
+
concurrency: ((K = (M = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : M.concurrency) == null ? void 0 : K.toString()) || "10",
|
|
815
|
+
httpsSni: ((ee = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : ee.https_sni) || "",
|
|
816
|
+
verifySsl: ((se = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : se.https_verify_certificate) || !1,
|
|
817
|
+
headers: (ae = l == null ? void 0 : l.healthchecks.active) != null && ae.headers && Object.entries(l.healthchecks.active.headers).length > 0 ? Object.entries(l.healthchecks.active.headers).map(([Ot, Ke]) => ({ key: Ot, values: Ke == null ? void 0 : Ke.join(", ") })) : [{ key: "", values: "" }],
|
|
818
818
|
healthy: {
|
|
819
|
-
interval: ((L = (
|
|
820
|
-
successes: ((x = (
|
|
821
|
-
httpStatuses: (d = (
|
|
819
|
+
interval: ((L = (H = (te = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : te.healthy) == null ? void 0 : H.interval) == null ? void 0 : L.toString()) || "0",
|
|
820
|
+
successes: ((x = (I = (b = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : b.healthy) == null ? void 0 : I.successes) == null ? void 0 : x.toString()) || "5",
|
|
821
|
+
httpStatuses: (d = (Y = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Y.healthy) != null && d.http_statuses ? s(l.healthchecks.active.healthy.http_statuses) : Fe
|
|
822
822
|
},
|
|
823
823
|
unhealthy: {
|
|
824
|
-
interval: ((J = (r = (o =
|
|
825
|
-
httpFailures: ((fe = (ie = (
|
|
826
|
-
tcpFailures: ((je = (Ue = (ye =
|
|
827
|
-
httpStatuses: (We = (Qe =
|
|
828
|
-
timeouts: ((ze = (Ge = (Je =
|
|
824
|
+
interval: ((J = (r = (o = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : o.unhealthy) == null ? void 0 : r.interval) == null ? void 0 : J.toString()) || "0",
|
|
825
|
+
httpFailures: ((fe = (ie = (Z = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Z.unhealthy) == null ? void 0 : ie.http_failures) == null ? void 0 : fe.toString()) || "5",
|
|
826
|
+
tcpFailures: ((je = (Ue = (ye = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : ye.unhealthy) == null ? void 0 : Ue.tcp_failures) == null ? void 0 : je.toString()) || "5",
|
|
827
|
+
httpStatuses: (We = (Qe = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Qe.unhealthy) != null && We.http_statuses ? s(l.healthchecks.active.unhealthy.http_statuses) : Oe,
|
|
828
|
+
timeouts: ((ze = (Ge = (Je = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Je.unhealthy) == null ? void 0 : Ge.timeouts) == null ? void 0 : ze.toString()) || "0"
|
|
829
829
|
}
|
|
830
830
|
},
|
|
831
831
|
passiveHealthCheck: {
|
|
832
|
-
type: ((Xe =
|
|
832
|
+
type: ((Xe = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Xe.type) || "http",
|
|
833
833
|
healthy: {
|
|
834
|
-
successes: ((et = (Ze = (Ye =
|
|
835
|
-
httpStatuses: (at = (tt =
|
|
834
|
+
successes: ((et = (Ze = (Ye = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Ye.healthy) == null ? void 0 : Ze.successes) == null ? void 0 : et.toString()) || "5",
|
|
835
|
+
httpStatuses: (at = (tt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : tt.healthy) != null && at.http_statuses ? s(l.healthchecks.passive.healthy.http_statuses) : xe
|
|
836
836
|
},
|
|
837
837
|
unhealthy: {
|
|
838
|
-
timeouts: ((it = (st = (lt =
|
|
839
|
-
httpFailures: ((nt = (rt = (ot =
|
|
840
|
-
tcpFailures: ((ct = (ut = (ht =
|
|
841
|
-
httpStatuses: (pt = (dt =
|
|
838
|
+
timeouts: ((it = (st = (lt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : lt.unhealthy) == null ? void 0 : st.timeouts) == null ? void 0 : it.toString()) || "0",
|
|
839
|
+
httpFailures: ((nt = (rt = (ot = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ot.unhealthy) == null ? void 0 : rt.http_failures) == null ? void 0 : nt.toString()) || "5",
|
|
840
|
+
tcpFailures: ((ct = (ut = (ht = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ht.unhealthy) == null ? void 0 : ut.tcp_failures) == null ? void 0 : ct.toString()) || "5",
|
|
841
|
+
httpStatuses: (pt = (dt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : dt.unhealthy) != null && pt.http_statuses ? s(l.healthchecks.passive.unhealthy.http_statuses) : Pe
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
};
|
|
@@ -847,42 +847,40 @@ function Ve() {
|
|
|
847
847
|
isInteger: a,
|
|
848
848
|
inRange: D,
|
|
849
849
|
stringToNumberArray: i,
|
|
850
|
-
numberToStringArray:
|
|
851
|
-
upstreamsResponseToFields: (
|
|
850
|
+
numberToStringArray: s,
|
|
851
|
+
upstreamsResponseToFields: (l) => h(l),
|
|
852
852
|
getDefaultUpstreamFields: () => h(),
|
|
853
|
-
objectsAreEqual: (
|
|
853
|
+
objectsAreEqual: (l, c) => {
|
|
854
854
|
try {
|
|
855
|
-
return JSON.stringify(
|
|
855
|
+
return JSON.stringify(l) === JSON.stringify(c);
|
|
856
856
|
} catch {
|
|
857
857
|
return !1;
|
|
858
858
|
}
|
|
859
859
|
},
|
|
860
|
-
cloneDeep: (
|
|
860
|
+
cloneDeep: (l) => JSON.parse(JSON.stringify(l))
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
863
|
const pe = {
|
|
864
864
|
useI18n: Wt,
|
|
865
865
|
useMultiselectCreation: Se,
|
|
866
|
-
useHelpers:
|
|
867
|
-
},
|
|
866
|
+
useHelpers: Ae
|
|
867
|
+
}, ke = "/v2/control-planes/{controlPlaneId}/core-entities", _e = "/{workspace}", ve = {
|
|
868
868
|
list: {
|
|
869
|
-
konnect: `${
|
|
870
|
-
kongManager: `${
|
|
869
|
+
konnect: `${ke}/upstreams`,
|
|
870
|
+
kongManager: `${_e}/upstreams`
|
|
871
871
|
},
|
|
872
872
|
form: {
|
|
873
873
|
konnect: {
|
|
874
|
-
getServices: `${
|
|
875
|
-
getCertificates: `${
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
edit: `${ge}/upstreams/{id}`
|
|
874
|
+
getServices: `${ke}/services`,
|
|
875
|
+
getCertificates: `${ke}/certificates`,
|
|
876
|
+
create: `${ke}/upstreams`,
|
|
877
|
+
edit: `${ke}/upstreams/{id}`
|
|
879
878
|
},
|
|
880
879
|
kongManager: {
|
|
881
|
-
getServices: `${
|
|
882
|
-
getCertificates: `${
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
edit: `${be}/upstreams/{id}`
|
|
880
|
+
getServices: `${_e}/services`,
|
|
881
|
+
getCertificates: `${_e}/certificates`,
|
|
882
|
+
create: `${_e}/upstreams`,
|
|
883
|
+
edit: `${_e}/upstreams/{id}`
|
|
886
884
|
}
|
|
887
885
|
}
|
|
888
886
|
}, ta = { class: "kong-ui-entities-upstreams-list" }, aa = { class: "button-row" }, la = { class: "upstream-name" }, sa = /* @__PURE__ */ ne({
|
|
@@ -932,150 +930,150 @@ const pe = {
|
|
|
932
930
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
933
931
|
setup(a, { emit: D }) {
|
|
934
932
|
var L;
|
|
935
|
-
const i = D,
|
|
933
|
+
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), g = Tt(), { axiosInstance: y } = $e((L = s.config) == null ? void 0 : L.axiosRequestConfig), { hasRecords: j, handleStateChange: F } = At(() => V.value), l = U(() => j.value && s.config.app === "konnect"), c = U(() => s.config.app !== "kongManager" || !!s.config.disableSorting), C = {
|
|
936
934
|
// the Name column is non-hidable
|
|
937
935
|
name: { label: h("upstreams.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
938
936
|
slots: { label: h("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
939
937
|
tags: { label: h("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
940
|
-
}, m = C, t =
|
|
941
|
-
var
|
|
942
|
-
let
|
|
943
|
-
return
|
|
944
|
-
}), V = R(""),
|
|
945
|
-
const
|
|
946
|
-
if (
|
|
938
|
+
}, m = C, t = U(() => {
|
|
939
|
+
var I, x;
|
|
940
|
+
let b = `${s.config.apiBaseUrl}${ve.list[s.config.app]}`;
|
|
941
|
+
return s.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((I = s.config) == null ? void 0 : I.controlPlaneId) || "") : s.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (x = s.config) != null && x.workspace ? `/${s.config.workspace}` : "")), b;
|
|
942
|
+
}), V = R(""), w = U(() => {
|
|
943
|
+
const b = s.config.app === "konnect" || s.config.isExactMatch;
|
|
944
|
+
if (b)
|
|
947
945
|
return {
|
|
948
|
-
isExactMatch:
|
|
946
|
+
isExactMatch: b,
|
|
949
947
|
placeholder: h("upstreams.search.placeholder")
|
|
950
948
|
};
|
|
951
|
-
const { name:
|
|
949
|
+
const { name: I, slots: x } = C;
|
|
952
950
|
return {
|
|
953
|
-
isExactMatch:
|
|
954
|
-
fields: { name:
|
|
955
|
-
schema:
|
|
951
|
+
isExactMatch: b,
|
|
952
|
+
fields: { name: I, slots: x },
|
|
953
|
+
schema: s.config.filterSchema
|
|
956
954
|
};
|
|
957
955
|
}), {
|
|
958
956
|
fetcher: p,
|
|
959
957
|
fetcherState: S,
|
|
960
|
-
fetcherCacheKey:
|
|
961
|
-
} = kt(
|
|
958
|
+
fetcherCacheKey: G
|
|
959
|
+
} = kt(U(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), t), N = () => {
|
|
962
960
|
V.value = "";
|
|
963
|
-
},
|
|
964
|
-
|
|
965
|
-
},
|
|
966
|
-
const x =
|
|
967
|
-
if (!await
|
|
961
|
+
}, X = () => {
|
|
962
|
+
G.value++;
|
|
963
|
+
}, k = R(null), T = async (b, I) => {
|
|
964
|
+
const x = b.id;
|
|
965
|
+
if (!await I(x)) {
|
|
968
966
|
i("copy:error", {
|
|
969
|
-
entity:
|
|
967
|
+
entity: b,
|
|
970
968
|
field: "id",
|
|
971
969
|
message: h("upstreams.errors.copy")
|
|
972
970
|
});
|
|
973
971
|
return;
|
|
974
972
|
}
|
|
975
973
|
i("copy:success", {
|
|
976
|
-
entity:
|
|
974
|
+
entity: b,
|
|
977
975
|
field: "id",
|
|
978
976
|
message: h("upstreams.copy.success", { val: x })
|
|
979
977
|
});
|
|
980
|
-
},
|
|
981
|
-
const x = JSON.stringify(
|
|
982
|
-
if (!await
|
|
978
|
+
}, $ = async (b, I) => {
|
|
979
|
+
const x = JSON.stringify(b);
|
|
980
|
+
if (!await I(x)) {
|
|
983
981
|
i("copy:error", {
|
|
984
|
-
entity:
|
|
982
|
+
entity: b,
|
|
985
983
|
message: h("upstreams.errors.copy")
|
|
986
984
|
});
|
|
987
985
|
return;
|
|
988
986
|
}
|
|
989
987
|
i("copy:success", {
|
|
990
|
-
entity:
|
|
988
|
+
entity: b,
|
|
991
989
|
message: h("upstreams.copy.success_brief")
|
|
992
990
|
});
|
|
993
|
-
},
|
|
991
|
+
}, A = async (b) => {
|
|
994
992
|
var x;
|
|
995
|
-
await ((x =
|
|
996
|
-
},
|
|
993
|
+
await ((x = s.canRetrieve) == null ? void 0 : x.call(s, b)) && g.push(s.config.getViewRoute(b.id));
|
|
994
|
+
}, _ = (b) => ({
|
|
997
995
|
label: h("upstreams.actions.view"),
|
|
998
|
-
to:
|
|
999
|
-
}),
|
|
996
|
+
to: s.config.getViewRoute(b)
|
|
997
|
+
}), O = (b) => ({
|
|
1000
998
|
label: h("upstreams.actions.edit"),
|
|
1001
|
-
to:
|
|
1002
|
-
}),
|
|
1003
|
-
|
|
999
|
+
to: s.config.getEditRoute(b)
|
|
1000
|
+
}), W = R(void 0), le = R(!1), z = R(!1), re = R(""), M = _t(s.config, t.value), K = (b) => {
|
|
1001
|
+
W.value = b, le.value = !0;
|
|
1004
1002
|
}, ee = () => {
|
|
1005
1003
|
le.value = !1;
|
|
1006
1004
|
}, se = async () => {
|
|
1007
|
-
var
|
|
1008
|
-
if ((
|
|
1009
|
-
|
|
1005
|
+
var b, I, x;
|
|
1006
|
+
if ((b = W.value) != null && b.id) {
|
|
1007
|
+
z.value = !0;
|
|
1010
1008
|
try {
|
|
1011
|
-
await y.delete(
|
|
1012
|
-
} catch (
|
|
1013
|
-
re.value = ((x = (
|
|
1009
|
+
await y.delete(M(W.value.id)), z.value = !1, le.value = !1, G.value++, i("delete:success", W.value);
|
|
1010
|
+
} catch (Y) {
|
|
1011
|
+
re.value = ((x = (I = Y.response) == null ? void 0 : I.data) == null ? void 0 : x.message) || Y.message || h("upstreams.errors.delete"), i("error", Y);
|
|
1014
1012
|
} finally {
|
|
1015
|
-
|
|
1013
|
+
z.value = !1;
|
|
1016
1014
|
}
|
|
1017
1015
|
}
|
|
1018
1016
|
}, ae = () => {
|
|
1019
|
-
|
|
1017
|
+
g.push(s.config.createRoute);
|
|
1020
1018
|
};
|
|
1021
|
-
de(S, (
|
|
1022
|
-
var
|
|
1023
|
-
if (
|
|
1024
|
-
|
|
1019
|
+
de(S, (b) => {
|
|
1020
|
+
var I, x, Y;
|
|
1021
|
+
if (b.status === Ct.Error) {
|
|
1022
|
+
k.value = {
|
|
1025
1023
|
title: h("upstreams.errors.general")
|
|
1026
|
-
}, (
|
|
1024
|
+
}, (Y = (x = (I = b.error) == null ? void 0 : I.response) == null ? void 0 : x.data) != null && Y.message && (k.value.message = b.error.response.data.message), i("error", b.error);
|
|
1027
1025
|
return;
|
|
1028
1026
|
}
|
|
1029
|
-
|
|
1027
|
+
k.value = null;
|
|
1030
1028
|
});
|
|
1031
1029
|
const te = R({
|
|
1032
|
-
ctaPath:
|
|
1030
|
+
ctaPath: s.config.createRoute,
|
|
1033
1031
|
ctaText: void 0,
|
|
1034
|
-
message: `${h("upstreams.list.empty_state.description")}${
|
|
1032
|
+
message: `${h("upstreams.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
1035
1033
|
title: h("upstreams.title")
|
|
1036
|
-
}),
|
|
1034
|
+
}), H = R(!1);
|
|
1037
1035
|
return De(async () => {
|
|
1038
|
-
|
|
1039
|
-
}), (
|
|
1040
|
-
const x =
|
|
1041
|
-
return
|
|
1036
|
+
H.value = await s.canCreate(), H.value && (te.value.title = h("upstreams.list.empty_state.title"), te.value.ctaText = h("upstreams.actions.create"));
|
|
1037
|
+
}), (b, I) => {
|
|
1038
|
+
const x = P("KButton"), Y = P("KEmptyState"), d = P("KDropdownItem"), o = P("KClipboardProvider");
|
|
1039
|
+
return q(), oe("div", ta, [
|
|
1042
1040
|
u(e(St), {
|
|
1043
1041
|
"cache-identifier": a.cacheIdentifier,
|
|
1044
1042
|
"disable-sorting": c.value,
|
|
1045
1043
|
"empty-state-options": te.value,
|
|
1046
1044
|
"enable-entity-actions": "",
|
|
1047
|
-
"error-message":
|
|
1045
|
+
"error-message": k.value,
|
|
1048
1046
|
fetcher: e(p),
|
|
1049
|
-
"fetcher-cache-key": e(
|
|
1047
|
+
"fetcher-cache-key": e(G),
|
|
1050
1048
|
"pagination-type": "offset",
|
|
1051
1049
|
"preferences-storage-key": "kong-ui-entities-upstreams-list",
|
|
1052
1050
|
query: V.value,
|
|
1053
1051
|
"table-headers": e(m),
|
|
1054
|
-
onClearSearchInput:
|
|
1055
|
-
"onClick:row":
|
|
1056
|
-
onSort:
|
|
1052
|
+
onClearSearchInput: N,
|
|
1053
|
+
"onClick:row": I[3] || (I[3] = (r) => A(r)),
|
|
1054
|
+
onSort: X,
|
|
1057
1055
|
onState: e(F)
|
|
1058
|
-
},
|
|
1056
|
+
}, Ie({
|
|
1059
1057
|
"toolbar-filter": n(() => [
|
|
1060
1058
|
u(e(Mt), {
|
|
1061
1059
|
modelValue: V.value,
|
|
1062
|
-
"onUpdate:modelValue":
|
|
1063
|
-
config:
|
|
1060
|
+
"onUpdate:modelValue": I[0] || (I[0] = (r) => V.value = r),
|
|
1061
|
+
config: w.value
|
|
1064
1062
|
}, null, 8, ["modelValue", "config"])
|
|
1065
1063
|
]),
|
|
1066
1064
|
"toolbar-button": n(() => [
|
|
1067
|
-
(
|
|
1065
|
+
(q(), E(bt, {
|
|
1068
1066
|
disabled: !a.useActionOutside,
|
|
1069
1067
|
to: "#kong-ui-app-page-header-action-button"
|
|
1070
1068
|
}, [
|
|
1071
|
-
|
|
1072
|
-
|
|
1069
|
+
v("div", aa, [
|
|
1070
|
+
l.value ? (q(), E(x, {
|
|
1073
1071
|
key: 0,
|
|
1074
1072
|
appearance: "secondary",
|
|
1075
1073
|
class: "open-learning-hub",
|
|
1076
1074
|
"data-testid": "upstream-learn-more-button",
|
|
1077
1075
|
icon: "",
|
|
1078
|
-
onClick:
|
|
1076
|
+
onClick: I[1] || (I[1] = (r) => b.$emit("click:learn-more"))
|
|
1079
1077
|
}, {
|
|
1080
1078
|
default: n(() => [
|
|
1081
1079
|
u(e(ft), { decorative: "" })
|
|
@@ -1093,7 +1091,7 @@ const pe = {
|
|
|
1093
1091
|
to: a.config.createRoute
|
|
1094
1092
|
}, {
|
|
1095
1093
|
default: n(() => [
|
|
1096
|
-
u(e(
|
|
1094
|
+
u(e(we)),
|
|
1097
1095
|
Q(" " + f(e(h)("upstreams.list.toolbar_actions.new_upstream")), 1)
|
|
1098
1096
|
]),
|
|
1099
1097
|
_: 1
|
|
@@ -1105,7 +1103,7 @@ const pe = {
|
|
|
1105
1103
|
], 8, ["disabled"]))
|
|
1106
1104
|
]),
|
|
1107
1105
|
name: n(({ rowValue: r }) => [
|
|
1108
|
-
|
|
1106
|
+
v("span", la, f(r), 1)
|
|
1109
1107
|
]),
|
|
1110
1108
|
tags: n(({ rowValue: r }) => [
|
|
1111
1109
|
u(e(Ht), {
|
|
@@ -1118,7 +1116,7 @@ const pe = {
|
|
|
1118
1116
|
default: n(({ copyToClipboard: J }) => [
|
|
1119
1117
|
u(d, {
|
|
1120
1118
|
"data-testid": "action-entity-copy-id",
|
|
1121
|
-
onClick: (
|
|
1119
|
+
onClick: (Z) => T(r, J)
|
|
1122
1120
|
}, {
|
|
1123
1121
|
default: n(() => [
|
|
1124
1122
|
Q(f(e(h)("upstreams.actions.copy_id")), 1)
|
|
@@ -1132,7 +1130,7 @@ const pe = {
|
|
|
1132
1130
|
default: n(({ copyToClipboard: J }) => [
|
|
1133
1131
|
u(d, {
|
|
1134
1132
|
"data-testid": "action-entity-copy-json",
|
|
1135
|
-
onClick: (
|
|
1133
|
+
onClick: (Z) => $(r, J)
|
|
1136
1134
|
}, {
|
|
1137
1135
|
default: n(() => [
|
|
1138
1136
|
Q(f(e(h)("upstreams.actions.copy_json")), 1)
|
|
@@ -1149,7 +1147,7 @@ const pe = {
|
|
|
1149
1147
|
u(d, {
|
|
1150
1148
|
"data-testid": "action-entity-view",
|
|
1151
1149
|
"has-divider": "",
|
|
1152
|
-
item:
|
|
1150
|
+
item: _(r.id)
|
|
1153
1151
|
}, null, 8, ["item"])
|
|
1154
1152
|
]),
|
|
1155
1153
|
_: 2
|
|
@@ -1160,7 +1158,7 @@ const pe = {
|
|
|
1160
1158
|
default: n(() => [
|
|
1161
1159
|
u(d, {
|
|
1162
1160
|
"data-testid": "action-entity-edit",
|
|
1163
|
-
item:
|
|
1161
|
+
item: O(r.id)
|
|
1164
1162
|
}, null, 8, ["item"])
|
|
1165
1163
|
]),
|
|
1166
1164
|
_: 2
|
|
@@ -1191,23 +1189,23 @@ const pe = {
|
|
|
1191
1189
|
fn: n(() => {
|
|
1192
1190
|
var r;
|
|
1193
1191
|
return [
|
|
1194
|
-
u(
|
|
1192
|
+
u(Y, {
|
|
1195
1193
|
"data-testid": "upstreams-entity-empty-state",
|
|
1196
1194
|
"icon-background": "",
|
|
1197
1195
|
message: e(h)("upstreams.list.empty_state_v2.description"),
|
|
1198
1196
|
title: e(h)("upstreams.list.empty_state_v2.title")
|
|
1199
|
-
},
|
|
1197
|
+
}, Ie({
|
|
1200
1198
|
icon: n(() => [
|
|
1201
1199
|
u(e(Nt), { decorative: "" })
|
|
1202
1200
|
]),
|
|
1203
1201
|
action: n(() => [
|
|
1204
|
-
|
|
1202
|
+
H.value ? (q(), E(x, {
|
|
1205
1203
|
key: 0,
|
|
1206
1204
|
"data-testid": "entity-create-button",
|
|
1207
1205
|
onClick: ae
|
|
1208
1206
|
}, {
|
|
1209
1207
|
default: n(() => [
|
|
1210
|
-
u(e(
|
|
1208
|
+
u(e(we), { decorative: "" }),
|
|
1211
1209
|
Q(" " + f(e(h)("upstreams.list.empty_state_v2.create_cta")), 1)
|
|
1212
1210
|
]),
|
|
1213
1211
|
_: 1
|
|
@@ -1215,7 +1213,7 @@ const pe = {
|
|
|
1215
1213
|
u(x, {
|
|
1216
1214
|
appearance: "secondary",
|
|
1217
1215
|
"data-testid": "entity-learn-more-button",
|
|
1218
|
-
onClick:
|
|
1216
|
+
onClick: I[2] || (I[2] = (J) => b.$emit("click:learn-more"))
|
|
1219
1217
|
}, {
|
|
1220
1218
|
default: n(() => [
|
|
1221
1219
|
u(e(ft), { decorative: "" }),
|
|
@@ -1240,9 +1238,9 @@ const pe = {
|
|
|
1240
1238
|
} : void 0
|
|
1241
1239
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
1242
1240
|
u(e(Ut), {
|
|
1243
|
-
"action-pending":
|
|
1241
|
+
"action-pending": z.value,
|
|
1244
1242
|
description: e(h)("upstreams.delete.description"),
|
|
1245
|
-
"entity-name":
|
|
1243
|
+
"entity-name": W.value && (W.value.name || W.value.id),
|
|
1246
1244
|
"entity-type": e(It).Upstream,
|
|
1247
1245
|
error: re.value,
|
|
1248
1246
|
title: e(h)("upstreams.delete.title"),
|
|
@@ -1255,24 +1253,22 @@ const pe = {
|
|
|
1255
1253
|
}
|
|
1256
1254
|
}), me = (a, D) => {
|
|
1257
1255
|
const i = a.__vccOpts || a;
|
|
1258
|
-
for (const [
|
|
1259
|
-
i[
|
|
1256
|
+
for (const [s, h] of D)
|
|
1257
|
+
i[s] = h;
|
|
1260
1258
|
return i;
|
|
1261
|
-
}, za = /* @__PURE__ */ me(sa, [["__scopeId", "data-v-fd5b2677"]]),
|
|
1259
|
+
}, za = /* @__PURE__ */ me(sa, [["__scopeId", "data-v-fd5b2677"]]), Ve = "/v2/control-planes/{controlPlaneId}/core-entities", Ee = "/{workspace}", Re = {
|
|
1262
1260
|
list: {
|
|
1263
|
-
konnect: `${
|
|
1264
|
-
kongManager: `${
|
|
1261
|
+
konnect: `${Ve}/upstreams/{upstreamId}/targets`,
|
|
1262
|
+
kongManager: `${Ee}/upstreams/{upstreamId}/targets`
|
|
1265
1263
|
},
|
|
1266
1264
|
form: {
|
|
1267
1265
|
konnect: {
|
|
1268
|
-
create: `${
|
|
1269
|
-
edit: `${
|
|
1270
|
-
validate: `${Ie}/v1/schemas/json/target/validate`
|
|
1266
|
+
create: `${Ve}/upstreams/{upstreamId}/targets`,
|
|
1267
|
+
edit: `${Ve}/upstreams/{upstreamId}/targets/{id}`
|
|
1271
1268
|
},
|
|
1272
1269
|
kongManager: {
|
|
1273
|
-
create: `${
|
|
1274
|
-
edit: `${
|
|
1275
|
-
validate: `${qe}/schemas/targets/validate`
|
|
1270
|
+
create: `${Ee}/upstreams/{upstreamId}/targets`,
|
|
1271
|
+
edit: `${Ee}/upstreams/{upstreamId}/targets/{id}`
|
|
1276
1272
|
}
|
|
1277
1273
|
}
|
|
1278
1274
|
}, ia = { class: "kong-ui-entities-target-form" }, oa = { class: "target-form-container" }, ra = {
|
|
@@ -1315,11 +1311,11 @@ const pe = {
|
|
|
1315
1311
|
},
|
|
1316
1312
|
emits: ["update", "error", "loading", "cancel"],
|
|
1317
1313
|
setup(a, { emit: D }) {
|
|
1318
|
-
var
|
|
1319
|
-
const i = D,
|
|
1320
|
-
var
|
|
1321
|
-
return
|
|
1322
|
-
}), F =
|
|
1314
|
+
var X;
|
|
1315
|
+
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), { getMessageFromError: g } = qt(), { axiosInstance: y } = $e((X = s.config) == null ? void 0 : X.axiosRequestConfig), j = U(() => {
|
|
1316
|
+
var k;
|
|
1317
|
+
return Re.form[s.config.app].edit.replace(/{upstreamId}/gi, ((k = s.config) == null ? void 0 : k.upstreamId) || "");
|
|
1318
|
+
}), F = U(() => s.targetId ? ue.Edit : ue.Create), l = U(() => F.value === ue.Edit ? h("targets.form.edit.title") : h("targets.form.create.title")), c = qe({
|
|
1323
1319
|
fields: {
|
|
1324
1320
|
target: "",
|
|
1325
1321
|
weight: 100,
|
|
@@ -1328,7 +1324,7 @@ const pe = {
|
|
|
1328
1324
|
},
|
|
1329
1325
|
isReadonly: !1,
|
|
1330
1326
|
errorMessage: ""
|
|
1331
|
-
}), C =
|
|
1327
|
+
}), C = qe({
|
|
1332
1328
|
target: "",
|
|
1333
1329
|
weight: 100,
|
|
1334
1330
|
tags: "",
|
|
@@ -1337,84 +1333,80 @@ const pe = {
|
|
|
1337
1333
|
target: "",
|
|
1338
1334
|
weight: 100,
|
|
1339
1335
|
tags: ""
|
|
1340
|
-
}, t =
|
|
1341
|
-
const
|
|
1342
|
-
return
|
|
1343
|
-
}), V =
|
|
1336
|
+
}, t = U(() => {
|
|
1337
|
+
const k = parseInt(c.fields.weight.toString(), 10);
|
|
1338
|
+
return k < 0 || k > 65535;
|
|
1339
|
+
}), V = U(
|
|
1344
1340
|
() => JSON.stringify(c.fields) !== JSON.stringify(C) && !!c.fields.target && !!c.fields.weight && !t.value
|
|
1345
|
-
),
|
|
1346
|
-
var
|
|
1347
|
-
c.fields.target = (
|
|
1341
|
+
), w = (k) => {
|
|
1342
|
+
var T;
|
|
1343
|
+
c.fields.target = (k == null ? void 0 : k.target) || "", c.fields.weight = (k == null ? void 0 : k.weight) ?? "", c.fields.tags = ((T = k == null ? void 0 : k.tags) == null ? void 0 : T.join(", ")) || "", s.failoverEnabled && (c.fields.failover = (k == null ? void 0 : k.failover) || !1), Object.assign(C, c.fields);
|
|
1348
1344
|
}, p = () => {
|
|
1349
1345
|
c.errorMessage = "", i("cancel");
|
|
1350
|
-
}, S =
|
|
1351
|
-
var
|
|
1352
|
-
let
|
|
1353
|
-
return
|
|
1354
|
-
}),
|
|
1355
|
-
var
|
|
1356
|
-
let b = `${l.config.apiBaseUrl}${we.form[l.config.app][F.value]}`;
|
|
1357
|
-
return l.config.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, ((I = l.config) == null ? void 0 : I.controlPlaneId) || "").replace(/{upstreamId}/gi, ((O = l.config) == null ? void 0 : O.upstreamId) || "") : l.config.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, (g = l.config) != null && g.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((N = l.config) == null ? void 0 : N.upstreamId) || "")), b = b.replace(/{id}/gi, l.targetId), b;
|
|
1358
|
-
}), M = H(() => {
|
|
1359
|
-
var b, I, O;
|
|
1346
|
+
}, S = U(() => {
|
|
1347
|
+
var T, $, A, _;
|
|
1348
|
+
let k = `${s.config.apiBaseUrl}${Re.form[s.config.app][F.value]}`;
|
|
1349
|
+
return s.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((T = s.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{upstreamId}/gi, (($ = s.config) == null ? void 0 : $.upstreamId) || "") : s.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (A = s.config) != null && A.workspace ? `/${s.config.workspace}` : "").replace(/{upstreamId}/gi, ((_ = s.config) == null ? void 0 : _.upstreamId) || "")), k = k.replace(/{id}/gi, s.targetId), k;
|
|
1350
|
+
}), G = U(() => {
|
|
1351
|
+
var k, T, $;
|
|
1360
1352
|
return {
|
|
1361
1353
|
target: c.fields.target,
|
|
1362
1354
|
weight: parseInt(c.fields.weight),
|
|
1363
|
-
tags: (
|
|
1364
|
-
upstream: { id:
|
|
1365
|
-
...
|
|
1355
|
+
tags: ($ = (T = (k = c.fields.tags) == null ? void 0 : k.split(",")) == null ? void 0 : T.map((A) => String(A || "").trim())) == null ? void 0 : $.filter((A) => A !== ""),
|
|
1356
|
+
upstream: { id: s.config.upstreamId },
|
|
1357
|
+
...s.failoverEnabled ? { failover: c.fields.failover } : {}
|
|
1366
1358
|
};
|
|
1367
|
-
}),
|
|
1368
|
-
var
|
|
1359
|
+
}), N = async () => {
|
|
1360
|
+
var k, T;
|
|
1369
1361
|
try {
|
|
1370
1362
|
c.isReadonly = !0, c.errorMessage = "";
|
|
1371
|
-
let
|
|
1372
|
-
if (
|
|
1373
|
-
const { data:
|
|
1374
|
-
c.fields.target = (
|
|
1363
|
+
let $;
|
|
1364
|
+
if (F.value === "create" ? $ = await y.post(S.value, G.value) : F.value === "edit" && ($ = ((k = s.config) == null ? void 0 : k.app) === "konnect" ? await y.put(S.value, G.value) : await y.patch(S.value, G.value)), $) {
|
|
1365
|
+
const { data: A } = $;
|
|
1366
|
+
c.fields.target = (A == null ? void 0 : A.name) || "", c.fields.weight = (A == null ? void 0 : A.weight) ?? 100, c.fields.tags = ((T = A == null ? void 0 : A.tags) == null ? void 0 : T.join(", ")) || "", i("update", A), Object.assign(c.fields, m);
|
|
1375
1367
|
}
|
|
1376
|
-
} catch (
|
|
1377
|
-
c.errorMessage =
|
|
1368
|
+
} catch ($) {
|
|
1369
|
+
c.errorMessage = g($), i("error", $);
|
|
1378
1370
|
} finally {
|
|
1379
1371
|
c.isReadonly = !1;
|
|
1380
1372
|
}
|
|
1381
1373
|
};
|
|
1382
|
-
return de(() =>
|
|
1374
|
+
return de(() => s.targetId, () => {
|
|
1383
1375
|
Object.assign(c.fields, m);
|
|
1384
|
-
}), (
|
|
1385
|
-
const
|
|
1386
|
-
return
|
|
1376
|
+
}), (k, T) => {
|
|
1377
|
+
const $ = P("KInput"), A = P("KCheckbox"), _ = P("KPrompt");
|
|
1378
|
+
return q(), E(_, {
|
|
1387
1379
|
"action-button-disabled": !V.value || c.isReadonly,
|
|
1388
1380
|
"action-button-text": e(h)("targets.form.buttons.save"),
|
|
1389
1381
|
"cancel-button-text": e(h)("targets.form.buttons.cancel"),
|
|
1390
|
-
title:
|
|
1382
|
+
title: l.value,
|
|
1391
1383
|
visible: a.isVisible,
|
|
1392
1384
|
onCancel: p,
|
|
1393
|
-
onProceed:
|
|
1385
|
+
onProceed: N
|
|
1394
1386
|
}, {
|
|
1395
1387
|
default: n(() => [
|
|
1396
|
-
|
|
1388
|
+
v("div", ia, [
|
|
1397
1389
|
u(e(wt), {
|
|
1398
1390
|
config: a.config,
|
|
1399
1391
|
"edit-id": a.targetId,
|
|
1400
1392
|
"entity-type": e(Le).Target,
|
|
1401
1393
|
"error-message": c.errorMessage,
|
|
1402
1394
|
"fetch-url": j.value,
|
|
1403
|
-
"form-fields":
|
|
1395
|
+
"form-fields": G.value,
|
|
1404
1396
|
"is-readonly": c.isReadonly,
|
|
1405
1397
|
onCancel: p,
|
|
1406
|
-
"onFetch:error":
|
|
1407
|
-
"onFetch:success":
|
|
1408
|
-
onLoading:
|
|
1398
|
+
"onFetch:error": T[4] || (T[4] = (O) => k.$emit("error", O)),
|
|
1399
|
+
"onFetch:success": w,
|
|
1400
|
+
onLoading: T[5] || (T[5] = (O) => k.$emit("loading", O))
|
|
1409
1401
|
}, {
|
|
1410
1402
|
default: n(() => [
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
vt(
|
|
1403
|
+
v("div", oa, [
|
|
1404
|
+
k.$slots.info ? (q(), oe("div", ra, [
|
|
1405
|
+
vt(k.$slots, "info", {}, void 0, !0)
|
|
1414
1406
|
])) : B("", !0),
|
|
1415
|
-
u(
|
|
1407
|
+
u($, {
|
|
1416
1408
|
modelValue: c.fields.target,
|
|
1417
|
-
"onUpdate:modelValue":
|
|
1409
|
+
"onUpdate:modelValue": T[0] || (T[0] = (O) => c.fields.target = O),
|
|
1418
1410
|
modelModifiers: { trim: !0 },
|
|
1419
1411
|
autocomplete: "off",
|
|
1420
1412
|
class: "target-form-input",
|
|
@@ -1429,9 +1421,9 @@ const pe = {
|
|
|
1429
1421
|
required: "",
|
|
1430
1422
|
type: "text"
|
|
1431
1423
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1432
|
-
u(
|
|
1424
|
+
u($, {
|
|
1433
1425
|
modelValue: c.fields.weight,
|
|
1434
|
-
"onUpdate:modelValue":
|
|
1426
|
+
"onUpdate:modelValue": T[1] || (T[1] = (O) => c.fields.weight = O),
|
|
1435
1427
|
autocomplete: "off",
|
|
1436
1428
|
class: "target-form-input",
|
|
1437
1429
|
"data-testid": "target-form-weight",
|
|
@@ -1448,10 +1440,10 @@ const pe = {
|
|
|
1448
1440
|
required: "",
|
|
1449
1441
|
type: "number"
|
|
1450
1442
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "readonly"]),
|
|
1451
|
-
a.failoverEnabled ? (
|
|
1452
|
-
u(
|
|
1443
|
+
a.failoverEnabled ? (q(), oe("div", na, [
|
|
1444
|
+
u(A, {
|
|
1453
1445
|
modelValue: c.fields.failover,
|
|
1454
|
-
"onUpdate:modelValue":
|
|
1446
|
+
"onUpdate:modelValue": T[2] || (T[2] = (O) => c.fields.failover = O),
|
|
1455
1447
|
disabled: a.failoverUnsupported,
|
|
1456
1448
|
label: e(h)("targets.form.fields.failover.label"),
|
|
1457
1449
|
"label-attributes": {
|
|
@@ -1459,9 +1451,9 @@ const pe = {
|
|
|
1459
1451
|
}
|
|
1460
1452
|
}, null, 8, ["modelValue", "disabled", "label", "label-attributes"])
|
|
1461
1453
|
])) : B("", !0),
|
|
1462
|
-
u(
|
|
1454
|
+
u($, {
|
|
1463
1455
|
modelValue: c.fields.tags,
|
|
1464
|
-
"onUpdate:modelValue":
|
|
1456
|
+
"onUpdate:modelValue": T[3] || (T[3] = (O) => c.fields.tags = O),
|
|
1465
1457
|
modelModifiers: { trim: !0 },
|
|
1466
1458
|
autocomplete: "off",
|
|
1467
1459
|
class: "target-form-input",
|
|
@@ -1482,7 +1474,7 @@ const pe = {
|
|
|
1482
1474
|
}, 8, ["action-button-disabled", "action-button-text", "cancel-button-text", "title", "visible"]);
|
|
1483
1475
|
};
|
|
1484
1476
|
}
|
|
1485
|
-
}), ua = /* @__PURE__ */ me(ha, [["__scopeId", "data-v-
|
|
1477
|
+
}), ua = /* @__PURE__ */ me(ha, [["__scopeId", "data-v-dc1948b7"]]), ca = { class: "kong-ui-entities-targets-list" }, da = { class: "target-address" }, pa = /* @__PURE__ */ ne({
|
|
1486
1478
|
__name: "TargetsList",
|
|
1487
1479
|
props: {
|
|
1488
1480
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1532,120 +1524,120 @@ const pe = {
|
|
|
1532
1524
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
1533
1525
|
setup(a, { emit: D }) {
|
|
1534
1526
|
var te;
|
|
1535
|
-
const i = D,
|
|
1527
|
+
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), { axiosInstance: g } = $e((te = s.config) == null ? void 0 : te.axiosRequestConfig), y = U(() => s.config.app !== "kongManager" || !!s.config.disableSorting), F = {
|
|
1536
1528
|
// the Target Address column is non-hidable
|
|
1537
1529
|
target: { label: h("targets.list.table_headers.target_address"), sortable: !0, hidable: !1 },
|
|
1538
1530
|
weight: { label: h("targets.list.table_headers.weight"), sortable: !0 },
|
|
1539
|
-
...
|
|
1531
|
+
...s.failoverEnabled ? { failover: { label: h("targets.list.table_headers.target_type"), sortable: !1 } } : {},
|
|
1540
1532
|
tags: { label: h("targets.list.table_headers.tags"), sortable: !1 }
|
|
1541
|
-
},
|
|
1542
|
-
var L,
|
|
1543
|
-
let
|
|
1544
|
-
return
|
|
1533
|
+
}, l = U(() => {
|
|
1534
|
+
var L, b, I, x;
|
|
1535
|
+
let H = `${s.config.apiBaseUrl}${Re.list[s.config.app]}`;
|
|
1536
|
+
return s.config.app === "konnect" ? H = H.replace(/{controlPlaneId}/gi, ((L = s.config) == null ? void 0 : L.controlPlaneId) || "").replace(/{upstreamId}/gi, ((b = s.config) == null ? void 0 : b.upstreamId) || "") : s.config.app === "kongManager" && (H = H.replace(/\/{workspace}/gi, (I = s.config) != null && I.workspace ? `/${s.config.workspace}` : "").replace(/{upstreamId}/gi, ((x = s.config) == null ? void 0 : x.upstreamId) || "")), H;
|
|
1545
1537
|
}), {
|
|
1546
1538
|
fetcher: c,
|
|
1547
1539
|
fetcherState: C,
|
|
1548
1540
|
fetcherCacheKey: m
|
|
1549
|
-
} = kt(
|
|
1541
|
+
} = kt(U(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), l), t = () => {
|
|
1550
1542
|
m.value++;
|
|
1551
|
-
}, V = R(null),
|
|
1543
|
+
}, V = R(null), w = () => {
|
|
1552
1544
|
K.value = !0;
|
|
1553
|
-
}, p = async (
|
|
1554
|
-
const
|
|
1555
|
-
if (!await L(
|
|
1545
|
+
}, p = async (H, L) => {
|
|
1546
|
+
const b = H.id;
|
|
1547
|
+
if (!await L(b)) {
|
|
1556
1548
|
i("copy:error", {
|
|
1557
|
-
entity:
|
|
1549
|
+
entity: H,
|
|
1558
1550
|
field: "id",
|
|
1559
1551
|
message: h("targets.errors.copy")
|
|
1560
1552
|
});
|
|
1561
1553
|
return;
|
|
1562
1554
|
}
|
|
1563
1555
|
i("copy:success", {
|
|
1564
|
-
entity:
|
|
1556
|
+
entity: H,
|
|
1565
1557
|
field: "id",
|
|
1566
|
-
message: h("targets.copy.success", { val:
|
|
1558
|
+
message: h("targets.copy.success", { val: b })
|
|
1567
1559
|
});
|
|
1568
|
-
}, S = async (
|
|
1569
|
-
const
|
|
1570
|
-
if (!await L(
|
|
1560
|
+
}, S = async (H, L) => {
|
|
1561
|
+
const b = JSON.stringify(H);
|
|
1562
|
+
if (!await L(b)) {
|
|
1571
1563
|
i("copy:error", {
|
|
1572
|
-
entity:
|
|
1564
|
+
entity: H,
|
|
1573
1565
|
message: h("targets.errors.copy")
|
|
1574
1566
|
});
|
|
1575
1567
|
return;
|
|
1576
1568
|
}
|
|
1577
1569
|
i("copy:success", {
|
|
1578
|
-
entity:
|
|
1570
|
+
entity: H,
|
|
1579
1571
|
message: h("targets.copy.success_brief")
|
|
1580
1572
|
});
|
|
1581
|
-
},
|
|
1582
|
-
|
|
1583
|
-
},
|
|
1584
|
-
|
|
1585
|
-
},
|
|
1586
|
-
|
|
1573
|
+
}, G = (H) => {
|
|
1574
|
+
M.value = H, K.value = !0;
|
|
1575
|
+
}, N = (H) => s.config.app === "konnect" ? !1 : s.config.canMarkHealthy(H), X = (H) => s.config.app === "konnect" ? !1 : s.config.canMarkUnhealthy(H), k = R(void 0), T = R(!1), $ = R(!1), A = R(""), _ = _t(s.config, l.value), O = (H) => {
|
|
1576
|
+
k.value = H, T.value = !0;
|
|
1577
|
+
}, W = () => {
|
|
1578
|
+
T.value = !1;
|
|
1587
1579
|
}, le = async () => {
|
|
1588
|
-
var
|
|
1589
|
-
if ((
|
|
1590
|
-
|
|
1580
|
+
var H, L, b;
|
|
1581
|
+
if ((H = k.value) != null && H.id) {
|
|
1582
|
+
$.value = !0;
|
|
1591
1583
|
try {
|
|
1592
|
-
await
|
|
1593
|
-
} catch (
|
|
1594
|
-
|
|
1584
|
+
await g.delete(_(k.value.id)), $.value = !1, T.value = !1, m.value++, i("delete:success", k.value);
|
|
1585
|
+
} catch (I) {
|
|
1586
|
+
A.value = ((b = (L = I.response) == null ? void 0 : L.data) == null ? void 0 : b.message) || I.message || h("targets.errors.delete"), i("error", I);
|
|
1595
1587
|
} finally {
|
|
1596
|
-
|
|
1588
|
+
$.value = !1;
|
|
1597
1589
|
}
|
|
1598
1590
|
}
|
|
1599
1591
|
};
|
|
1600
|
-
de(C, (
|
|
1601
|
-
var L,
|
|
1602
|
-
if (
|
|
1592
|
+
de(C, (H) => {
|
|
1593
|
+
var L, b, I;
|
|
1594
|
+
if (H.status === Ct.Error) {
|
|
1603
1595
|
V.value = {
|
|
1604
1596
|
title: h("targets.errors.general")
|
|
1605
|
-
}, (
|
|
1597
|
+
}, (I = (b = (L = H.error) == null ? void 0 : L.response) == null ? void 0 : b.data) != null && I.message && (V.value.message = H.error.response.data.message), i("error", H.error);
|
|
1606
1598
|
return;
|
|
1607
1599
|
}
|
|
1608
1600
|
V.value = null;
|
|
1609
1601
|
});
|
|
1610
|
-
const
|
|
1602
|
+
const z = R({
|
|
1611
1603
|
ctaText: void 0,
|
|
1612
|
-
message: `${h("targets.list.empty_state.description")}${
|
|
1604
|
+
message: `${h("targets.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
1613
1605
|
title: h("targets.title"),
|
|
1614
|
-
...
|
|
1606
|
+
...s.config.createRoute && {
|
|
1615
1607
|
// If `createRoute` provided in config, add a `ctaPath` to empty state CTA button so it becomes a link
|
|
1616
|
-
ctaPath:
|
|
1608
|
+
ctaPath: s.config.createRoute
|
|
1617
1609
|
}
|
|
1618
1610
|
});
|
|
1619
1611
|
De(async () => {
|
|
1620
|
-
await
|
|
1612
|
+
await s.canCreate() && (z.value.title = h("targets.list.empty_state.title"), z.value.ctaText = h("targets.actions.create"));
|
|
1621
1613
|
});
|
|
1622
|
-
const re =
|
|
1623
|
-
app:
|
|
1624
|
-
apiBaseUrl:
|
|
1625
|
-
upstreamId:
|
|
1626
|
-
axiosRequestConfig:
|
|
1614
|
+
const re = U(() => ({
|
|
1615
|
+
app: s.config.app,
|
|
1616
|
+
apiBaseUrl: s.config.apiBaseUrl,
|
|
1617
|
+
upstreamId: s.config.upstreamId,
|
|
1618
|
+
axiosRequestConfig: s.config.axiosRequestConfig,
|
|
1627
1619
|
// Depending on the app, we need to pass in the control plane ID or workspace
|
|
1628
1620
|
// see KonnectTargetFormConfig and KongManagerTargetFormConfig types
|
|
1629
|
-
...
|
|
1630
|
-
controlPlaneId:
|
|
1621
|
+
...s.config.app === "konnect" && {
|
|
1622
|
+
controlPlaneId: s.config.controlPlaneId
|
|
1631
1623
|
},
|
|
1632
|
-
...
|
|
1633
|
-
workspace:
|
|
1624
|
+
...s.config.app === "kongManager" && {
|
|
1625
|
+
workspace: s.config.workspace
|
|
1634
1626
|
}
|
|
1635
|
-
})),
|
|
1636
|
-
|
|
1627
|
+
})), M = R(""), K = R(!1), ee = (H) => {
|
|
1628
|
+
M.value ? i("update:target", H) : i("create:target", H), se();
|
|
1637
1629
|
}, se = () => {
|
|
1638
1630
|
ae(), m.value++;
|
|
1639
1631
|
}, ae = () => {
|
|
1640
|
-
K.value = !1,
|
|
1632
|
+
K.value = !1, M.value = "";
|
|
1641
1633
|
};
|
|
1642
|
-
return (
|
|
1643
|
-
const
|
|
1644
|
-
return
|
|
1634
|
+
return (H, L) => {
|
|
1635
|
+
const b = P("KButton"), I = P("KBadge"), x = P("KDropdownItem"), Y = P("KClipboardProvider");
|
|
1636
|
+
return q(), oe("div", ca, [
|
|
1645
1637
|
u(e(St), {
|
|
1646
1638
|
"cache-identifier": a.cacheIdentifier,
|
|
1647
1639
|
"disable-sorting": y.value,
|
|
1648
|
-
"empty-state-options":
|
|
1640
|
+
"empty-state-options": z.value,
|
|
1649
1641
|
"enable-entity-actions": "",
|
|
1650
1642
|
"error-message": V.value,
|
|
1651
1643
|
fetcher: e(c),
|
|
@@ -1653,11 +1645,11 @@ const pe = {
|
|
|
1653
1645
|
"pagination-type": "offset",
|
|
1654
1646
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
1655
1647
|
"table-headers": e(F),
|
|
1656
|
-
onEmptyStateCtaClicked: L[1] || (L[1] = () =>
|
|
1648
|
+
onEmptyStateCtaClicked: L[1] || (L[1] = () => s.config.createRoute ? void 0 : w()),
|
|
1657
1649
|
onSort: t
|
|
1658
|
-
},
|
|
1650
|
+
}, Ie({
|
|
1659
1651
|
"toolbar-button": n(() => [
|
|
1660
|
-
(
|
|
1652
|
+
(q(), E(bt, {
|
|
1661
1653
|
disabled: !a.useActionOutside,
|
|
1662
1654
|
to: "#kong-ui-app-page-header-action-button"
|
|
1663
1655
|
}, [
|
|
@@ -1665,15 +1657,15 @@ const pe = {
|
|
|
1665
1657
|
"auth-function": () => a.canCreate()
|
|
1666
1658
|
}, {
|
|
1667
1659
|
default: n(() => [
|
|
1668
|
-
u(
|
|
1660
|
+
u(b, {
|
|
1669
1661
|
appearance: "primary",
|
|
1670
1662
|
"data-testid": "toolbar-new-target",
|
|
1671
1663
|
size: a.useActionOutside ? "medium" : "large",
|
|
1672
|
-
to:
|
|
1673
|
-
onClick: L[0] || (L[0] = () =>
|
|
1664
|
+
to: s.config.createRoute ? s.config.createRoute : void 0,
|
|
1665
|
+
onClick: L[0] || (L[0] = () => s.config.createRoute ? void 0 : w())
|
|
1674
1666
|
}, {
|
|
1675
1667
|
default: n(() => [
|
|
1676
|
-
u(e(
|
|
1668
|
+
u(e(we)),
|
|
1677
1669
|
Q(" " + f(e(h)("targets.list.toolbar_actions.new_target")), 1)
|
|
1678
1670
|
]),
|
|
1679
1671
|
_: 1
|
|
@@ -1684,7 +1676,7 @@ const pe = {
|
|
|
1684
1676
|
], 8, ["disabled"]))
|
|
1685
1677
|
]),
|
|
1686
1678
|
target: n(({ rowValue: d }) => [
|
|
1687
|
-
|
|
1679
|
+
v("span", da, f(d), 1)
|
|
1688
1680
|
]),
|
|
1689
1681
|
tags: n(({ rowValue: d }) => [
|
|
1690
1682
|
u(e(Ht), {
|
|
@@ -1693,7 +1685,7 @@ const pe = {
|
|
|
1693
1685
|
}, null, 8, ["tags"])
|
|
1694
1686
|
]),
|
|
1695
1687
|
actions: n(({ row: d }) => [
|
|
1696
|
-
u(
|
|
1688
|
+
u(Y, null, {
|
|
1697
1689
|
default: n(({ copyToClipboard: o }) => [
|
|
1698
1690
|
u(x, {
|
|
1699
1691
|
"data-testid": "action-entity-copy-id",
|
|
@@ -1707,7 +1699,7 @@ const pe = {
|
|
|
1707
1699
|
]),
|
|
1708
1700
|
_: 2
|
|
1709
1701
|
}, 1024),
|
|
1710
|
-
u(
|
|
1702
|
+
u(Y, null, {
|
|
1711
1703
|
default: n(({ copyToClipboard: o }) => [
|
|
1712
1704
|
u(x, {
|
|
1713
1705
|
"data-testid": "action-entity-copy-json",
|
|
@@ -1728,7 +1720,7 @@ const pe = {
|
|
|
1728
1720
|
u(x, {
|
|
1729
1721
|
"data-testid": "action-entity-edit",
|
|
1730
1722
|
"has-divider": "",
|
|
1731
|
-
onClick: (o) =>
|
|
1723
|
+
onClick: (o) => G(d.id)
|
|
1732
1724
|
}, {
|
|
1733
1725
|
default: n(() => [
|
|
1734
1726
|
Q(f(e(h)("targets.actions.edit")), 1)
|
|
@@ -1739,7 +1731,7 @@ const pe = {
|
|
|
1739
1731
|
_: 2
|
|
1740
1732
|
}, 1032, ["auth-function"]),
|
|
1741
1733
|
u(e(ce), {
|
|
1742
|
-
"auth-function": () =>
|
|
1734
|
+
"auth-function": () => N(d)
|
|
1743
1735
|
}, {
|
|
1744
1736
|
default: n(() => [
|
|
1745
1737
|
u(x, {
|
|
@@ -1755,7 +1747,7 @@ const pe = {
|
|
|
1755
1747
|
_: 2
|
|
1756
1748
|
}, 1032, ["auth-function"]),
|
|
1757
1749
|
u(e(ce), {
|
|
1758
|
-
"auth-function": () =>
|
|
1750
|
+
"auth-function": () => X(d)
|
|
1759
1751
|
}, {
|
|
1760
1752
|
default: n(() => [
|
|
1761
1753
|
u(x, {
|
|
@@ -1778,7 +1770,7 @@ const pe = {
|
|
|
1778
1770
|
danger: "",
|
|
1779
1771
|
"data-testid": "action-entity-delete",
|
|
1780
1772
|
"has-divider": "",
|
|
1781
|
-
onClick: (o) =>
|
|
1773
|
+
onClick: (o) => O(d)
|
|
1782
1774
|
}, {
|
|
1783
1775
|
default: n(() => [
|
|
1784
1776
|
Q(f(e(h)("targets.actions.delete")), 1)
|
|
@@ -1794,7 +1786,7 @@ const pe = {
|
|
|
1794
1786
|
a.failoverEnabled ? {
|
|
1795
1787
|
name: "failover",
|
|
1796
1788
|
fn: n(({ rowValue: d }) => [
|
|
1797
|
-
u(
|
|
1789
|
+
u(I, {
|
|
1798
1790
|
appearance: "info",
|
|
1799
1791
|
class: "upstream-failover"
|
|
1800
1792
|
}, {
|
|
@@ -1808,14 +1800,14 @@ const pe = {
|
|
|
1808
1800
|
} : void 0
|
|
1809
1801
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "table-headers"]),
|
|
1810
1802
|
u(e(Ut), {
|
|
1811
|
-
"action-pending":
|
|
1803
|
+
"action-pending": $.value,
|
|
1812
1804
|
description: e(h)("targets.delete.description"),
|
|
1813
1805
|
"entity-type": e(It).Target,
|
|
1814
|
-
error:
|
|
1806
|
+
error: A.value,
|
|
1815
1807
|
"need-confirm": !1,
|
|
1816
1808
|
title: e(h)("targets.delete.title"),
|
|
1817
|
-
visible:
|
|
1818
|
-
onCancel:
|
|
1809
|
+
visible: T.value,
|
|
1810
|
+
onCancel: W,
|
|
1819
1811
|
onProceed: le
|
|
1820
1812
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"]),
|
|
1821
1813
|
u(ua, {
|
|
@@ -1823,14 +1815,14 @@ const pe = {
|
|
|
1823
1815
|
"failover-enabled": a.failoverEnabled,
|
|
1824
1816
|
"failover-unsupported": a.failoverEnabled && !e(ea).includes(a.algorithm),
|
|
1825
1817
|
"is-visible": K.value,
|
|
1826
|
-
"target-id":
|
|
1818
|
+
"target-id": M.value,
|
|
1827
1819
|
onCancel: ae,
|
|
1828
1820
|
onUpdate: ee
|
|
1829
|
-
},
|
|
1830
|
-
|
|
1821
|
+
}, Ie({ _: 2 }, [
|
|
1822
|
+
H.$slots["form-info"] ? {
|
|
1831
1823
|
name: "info",
|
|
1832
1824
|
fn: n(() => [
|
|
1833
|
-
vt(
|
|
1825
|
+
vt(H.$slots, "form-info", {}, void 0, !0)
|
|
1834
1826
|
]),
|
|
1835
1827
|
key: "0"
|
|
1836
1828
|
} : void 0
|
|
@@ -1869,14 +1861,14 @@ const pe = {
|
|
|
1869
1861
|
},
|
|
1870
1862
|
emits: ["update:name", "update:host-header", "update:client-certificate", "update:tags"],
|
|
1871
1863
|
setup(a, { emit: D }) {
|
|
1872
|
-
var
|
|
1873
|
-
const { i18nT: i, i18n: { t:
|
|
1864
|
+
var W, le, z, re;
|
|
1865
|
+
const { i18nT: i, i18n: { t: s } } = pe.useI18n(), h = a, g = D, {
|
|
1874
1866
|
debouncedQueryChange: y,
|
|
1875
1867
|
loading: j,
|
|
1876
1868
|
loadItems: F,
|
|
1877
|
-
results:
|
|
1869
|
+
results: l,
|
|
1878
1870
|
allRecords: c
|
|
1879
|
-
} = mt(h.config, (le =
|
|
1871
|
+
} = mt(h.config, (le = ve.form[(W = h.config) == null ? void 0 : W.app]) == null ? void 0 : le.getServices, "", {
|
|
1880
1872
|
fetchedItemsKey: "data",
|
|
1881
1873
|
searchKeys: ["host"]
|
|
1882
1874
|
}), {
|
|
@@ -1884,49 +1876,49 @@ const pe = {
|
|
|
1884
1876
|
loading: m,
|
|
1885
1877
|
loadItems: t,
|
|
1886
1878
|
results: V
|
|
1887
|
-
} = mt(h.config, (re =
|
|
1888
|
-
var
|
|
1889
|
-
return !!h.name && !((
|
|
1890
|
-
}), S =
|
|
1879
|
+
} = mt(h.config, (re = ve.form[(z = h.config) == null ? void 0 : z.app]) == null ? void 0 : re.getCertificates), w = R(""), p = U(() => {
|
|
1880
|
+
var M;
|
|
1881
|
+
return !!h.name && !((M = c.value) != null && M.some((K) => K.host === h.name));
|
|
1882
|
+
}), S = U(() => {
|
|
1891
1883
|
var K, ee, se;
|
|
1892
|
-
const
|
|
1893
|
-
return (se =
|
|
1894
|
-
|
|
1884
|
+
const M = p.value && h.name.includes((K = w.value) == null ? void 0 : K.toLowerCase());
|
|
1885
|
+
return (se = l.value) == null ? void 0 : se.map((ae) => ({ label: ae.host, value: ae.id })).concat(
|
|
1886
|
+
M ? [{ label: h.name, value: ((ee = X.value) == null ? void 0 : ee.value) || h.name }] : []
|
|
1895
1887
|
);
|
|
1896
|
-
}),
|
|
1897
|
-
var
|
|
1898
|
-
return (
|
|
1899
|
-
}),
|
|
1900
|
-
var
|
|
1901
|
-
return ((
|
|
1902
|
-
}),
|
|
1903
|
-
|
|
1904
|
-
},
|
|
1905
|
-
|
|
1906
|
-
},
|
|
1907
|
-
|
|
1908
|
-
},
|
|
1909
|
-
|
|
1910
|
-
},
|
|
1888
|
+
}), G = U(() => {
|
|
1889
|
+
var M;
|
|
1890
|
+
return (M = V.value) == null ? void 0 : M.map((K) => ({ label: K.id, value: K.id }));
|
|
1891
|
+
}), N = R(""), X = R({ value: "", label: "" }), k = U(() => {
|
|
1892
|
+
var M, K;
|
|
1893
|
+
return ((M = S.value.find((ee) => ee.value === N.value)) == null ? void 0 : M.label) || ((K = X.value) == null ? void 0 : K.label);
|
|
1894
|
+
}), T = (M) => {
|
|
1895
|
+
w.value = M, y(M);
|
|
1896
|
+
}, $ = (M) => {
|
|
1897
|
+
X.value = M;
|
|
1898
|
+
}, A = () => {
|
|
1899
|
+
X.value = { value: "", label: "" };
|
|
1900
|
+
}, _ = (M) => {
|
|
1901
|
+
N.value = M, g("update:name", k.value);
|
|
1902
|
+
}, O = R(!1);
|
|
1911
1903
|
return De(async () => {
|
|
1912
|
-
var
|
|
1904
|
+
var M, K;
|
|
1913
1905
|
try {
|
|
1914
|
-
|
|
1906
|
+
O.value = !0, await F(), h.name && (N.value = ((K = (M = S.value.find((ee) => ee.label === h.name)) == null ? void 0 : M.value) == null ? void 0 : K.toString()) || h.name), await t();
|
|
1915
1907
|
} finally {
|
|
1916
|
-
|
|
1908
|
+
O.value = !1;
|
|
1917
1909
|
}
|
|
1918
|
-
}), (
|
|
1919
|
-
const ee =
|
|
1920
|
-
return
|
|
1910
|
+
}), (M, K) => {
|
|
1911
|
+
const ee = P("KSkeleton"), se = P("KSelect"), ae = P("KInput");
|
|
1912
|
+
return q(), E(e(He), {
|
|
1921
1913
|
class: "kong-ui-entities-upstreams-general-info",
|
|
1922
|
-
description: e(
|
|
1923
|
-
title: e(
|
|
1914
|
+
description: e(s)("upstreams.form.general_info.help"),
|
|
1915
|
+
title: e(s)("upstreams.form.general_info.title")
|
|
1924
1916
|
}, {
|
|
1925
1917
|
default: n(() => [
|
|
1926
|
-
|
|
1918
|
+
O.value ? (q(), E(ee, {
|
|
1927
1919
|
key: 0,
|
|
1928
1920
|
type: "form"
|
|
1929
|
-
})) : (
|
|
1921
|
+
})) : (q(), oe("div", ma, [
|
|
1930
1922
|
u(se, {
|
|
1931
1923
|
class: "name-select margin-bottom-6",
|
|
1932
1924
|
clearable: "",
|
|
@@ -1935,18 +1927,18 @@ const pe = {
|
|
|
1935
1927
|
"enable-item-creation": "",
|
|
1936
1928
|
"filter-function": () => !0,
|
|
1937
1929
|
items: S.value,
|
|
1938
|
-
label: e(
|
|
1930
|
+
label: e(s)("upstreams.form.fields.name.label"),
|
|
1939
1931
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1940
1932
|
loading: e(j),
|
|
1941
|
-
"model-value":
|
|
1942
|
-
placeholder: e(
|
|
1933
|
+
"model-value": N.value,
|
|
1934
|
+
placeholder: e(s)("upstreams.form.fields.name.placeholder"),
|
|
1943
1935
|
readonly: a.readonly,
|
|
1944
1936
|
required: "",
|
|
1945
1937
|
width: "100%",
|
|
1946
|
-
onItemAdded:
|
|
1947
|
-
onItemRemoved:
|
|
1948
|
-
onQueryChange:
|
|
1949
|
-
"onUpdate:modelValue":
|
|
1938
|
+
onItemAdded: $,
|
|
1939
|
+
onItemRemoved: A,
|
|
1940
|
+
onQueryChange: T,
|
|
1941
|
+
"onUpdate:modelValue": _
|
|
1950
1942
|
}, {
|
|
1951
1943
|
"label-tooltip": n(() => [
|
|
1952
1944
|
u(e(i), {
|
|
@@ -1954,7 +1946,7 @@ const pe = {
|
|
|
1954
1946
|
scope: "global"
|
|
1955
1947
|
}, {
|
|
1956
1948
|
host: n(() => [
|
|
1957
|
-
|
|
1949
|
+
v("code", null, f(e(s)("upstreams.form.fields.name.host")), 1)
|
|
1958
1950
|
]),
|
|
1959
1951
|
_: 1
|
|
1960
1952
|
})
|
|
@@ -1965,11 +1957,11 @@ const pe = {
|
|
|
1965
1957
|
autocomplete: "off",
|
|
1966
1958
|
class: "margin-bottom-6",
|
|
1967
1959
|
"data-testid": "upstreams-form-host-header",
|
|
1968
|
-
label: e(
|
|
1960
|
+
label: e(s)("upstreams.form.fields.host_header.label"),
|
|
1969
1961
|
"model-value": a.hostHeader,
|
|
1970
1962
|
readonly: a.readonly,
|
|
1971
1963
|
type: "text",
|
|
1972
|
-
"onUpdate:modelValue": K[0] || (K[0] = (te) =>
|
|
1964
|
+
"onUpdate:modelValue": K[0] || (K[0] = (te) => g("update:host-header", te))
|
|
1973
1965
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
1974
1966
|
u(se, {
|
|
1975
1967
|
class: "certificate-select margin-bottom-6",
|
|
@@ -1977,34 +1969,34 @@ const pe = {
|
|
|
1977
1969
|
"data-testid": "upstreams-form-client-certificate",
|
|
1978
1970
|
"enable-filtering": "",
|
|
1979
1971
|
"filter-function": () => !0,
|
|
1980
|
-
items:
|
|
1981
|
-
label: e(
|
|
1972
|
+
items: G.value,
|
|
1973
|
+
label: e(s)("upstreams.form.fields.client_certificate.label"),
|
|
1982
1974
|
"label-attributes": {
|
|
1983
|
-
info: e(
|
|
1975
|
+
info: e(s)("upstreams.form.fields.client_certificate.tooltip"),
|
|
1984
1976
|
tooltipAttributes: { maxWidth: "400" }
|
|
1985
1977
|
},
|
|
1986
1978
|
loading: e(m),
|
|
1987
1979
|
"model-value": a.clientCertificate,
|
|
1988
|
-
placeholder: e(
|
|
1980
|
+
placeholder: e(s)("upstreams.form.fields.client_certificate.placeholder"),
|
|
1989
1981
|
readonly: a.readonly,
|
|
1990
1982
|
width: "100%",
|
|
1991
1983
|
onQueryChange: e(C),
|
|
1992
|
-
"onUpdate:modelValue": K[1] || (K[1] = (te) =>
|
|
1984
|
+
"onUpdate:modelValue": K[1] || (K[1] = (te) => g("update:client-certificate", te))
|
|
1993
1985
|
}, null, 8, ["items", "label", "label-attributes", "loading", "model-value", "placeholder", "readonly", "onQueryChange"]),
|
|
1994
1986
|
u(ae, {
|
|
1995
1987
|
autocomplete: "off",
|
|
1996
1988
|
"data-testid": "upstreams-form-tags",
|
|
1997
|
-
help: e(
|
|
1998
|
-
label: e(
|
|
1989
|
+
help: e(s)("upstreams.form.fields.tags.help"),
|
|
1990
|
+
label: e(s)("upstreams.form.fields.tags.label"),
|
|
1999
1991
|
"label-attributes": {
|
|
2000
|
-
info: e(
|
|
1992
|
+
info: e(s)("upstreams.form.fields.tags.tooltip"),
|
|
2001
1993
|
tooltipAttributes: { maxWidth: "400" }
|
|
2002
1994
|
},
|
|
2003
1995
|
"model-value": a.tags,
|
|
2004
|
-
placeholder: e(
|
|
1996
|
+
placeholder: e(s)("upstreams.form.fields.tags.placeholder"),
|
|
2005
1997
|
readonly: a.readonly,
|
|
2006
1998
|
type: "text",
|
|
2007
|
-
"onUpdate:modelValue": K[2] || (K[2] = (te) =>
|
|
1999
|
+
"onUpdate:modelValue": K[2] || (K[2] = (te) => g("update:tags", te))
|
|
2008
2000
|
}, null, 8, ["help", "label", "label-attributes", "model-value", "placeholder", "readonly"])
|
|
2009
2001
|
]))
|
|
2010
2002
|
]),
|
|
@@ -2012,7 +2004,7 @@ const pe = {
|
|
|
2012
2004
|
}, 8, ["description", "title"]);
|
|
2013
2005
|
};
|
|
2014
2006
|
}
|
|
2015
|
-
}), ya = /* @__PURE__ */ me(fa, [["__scopeId", "data-v-1a71740c"]]),
|
|
2007
|
+
}), ya = /* @__PURE__ */ me(fa, [["__scopeId", "data-v-1a71740c"]]), Me = {
|
|
2016
2008
|
upstreamObject: "https://developer.konghq.com/gateway/entities/upstream/",
|
|
2017
2009
|
loadBalancing: "https://developer.konghq.com/gateway/traffic-control/load-balancing-reference/"
|
|
2018
2010
|
}, ga = { class: "fields-group-title" }, ba = { class: "fields-group-text" }, va = { class: "fields-group-title" }, ka = { class: "fields-group-text" }, _a = /* @__PURE__ */ ne({
|
|
@@ -2087,97 +2079,97 @@ const pe = {
|
|
|
2087
2079
|
},
|
|
2088
2080
|
emits: ["update:algorithm", "update:sticky-sessions-cookie", "update:sticky-sessions-cookie-path", "update:slots", "update:hash-on", "update:hash-fallback", "update:hash-on-header", "update:hash-on-cookie", "update:hash-on-cookie-path", "update:hash-on-query-argument", "update:hash-on-uri-capture", "update:hash-fallback-header", "update:hash-fallback-query-argument", "update:hash-fallback-uri-capture"],
|
|
2089
2081
|
setup(a, { emit: D }) {
|
|
2090
|
-
const { i18nT: i, i18n: { t:
|
|
2082
|
+
const { i18nT: i, i18n: { t: s } } = pe.useI18n(), { inRange: h } = Ae(), g = a, y = D, j = R([
|
|
2091
2083
|
{
|
|
2092
|
-
label:
|
|
2084
|
+
label: s("upstreams.form.algorithms.round_robin_label"),
|
|
2093
2085
|
value: "round-robin",
|
|
2094
2086
|
selected: !1
|
|
2095
2087
|
},
|
|
2096
2088
|
{
|
|
2097
|
-
label:
|
|
2089
|
+
label: s("upstreams.form.algorithms.least_connections_label"),
|
|
2098
2090
|
value: "least-connections",
|
|
2099
2091
|
selected: !1
|
|
2100
2092
|
},
|
|
2101
2093
|
{
|
|
2102
|
-
label:
|
|
2094
|
+
label: s("upstreams.form.algorithms.consistent_hashing_label"),
|
|
2103
2095
|
value: "consistent-hashing",
|
|
2104
2096
|
selected: !1
|
|
2105
2097
|
},
|
|
2106
2098
|
{
|
|
2107
|
-
label:
|
|
2099
|
+
label: s("upstreams.form.algorithms.latency_label"),
|
|
2108
2100
|
value: "latency",
|
|
2109
2101
|
selected: !1
|
|
2110
2102
|
},
|
|
2111
|
-
...
|
|
2112
|
-
label:
|
|
2103
|
+
...g.stickySessionsAvailable ? [{
|
|
2104
|
+
label: s("upstreams.form.algorithms.sticky_sessions_label"),
|
|
2113
2105
|
value: "sticky-sessions",
|
|
2114
2106
|
selected: !1
|
|
2115
2107
|
}] : []
|
|
2116
2108
|
]), F = R([
|
|
2117
2109
|
{
|
|
2118
|
-
label:
|
|
2110
|
+
label: s("upstreams.form.hash_labels.none"),
|
|
2119
2111
|
value: "none",
|
|
2120
2112
|
selected: !1
|
|
2121
2113
|
},
|
|
2122
2114
|
{
|
|
2123
|
-
label:
|
|
2115
|
+
label: s("upstreams.form.hash_labels.consumer"),
|
|
2124
2116
|
value: "consumer",
|
|
2125
2117
|
selected: !1
|
|
2126
2118
|
},
|
|
2127
2119
|
{
|
|
2128
|
-
label:
|
|
2120
|
+
label: s("upstreams.form.hash_labels.ip"),
|
|
2129
2121
|
value: "ip",
|
|
2130
2122
|
selected: !1
|
|
2131
2123
|
},
|
|
2132
2124
|
{
|
|
2133
|
-
label:
|
|
2125
|
+
label: s("upstreams.form.hash_labels.header"),
|
|
2134
2126
|
value: "header",
|
|
2135
2127
|
selected: !1
|
|
2136
2128
|
},
|
|
2137
2129
|
{
|
|
2138
|
-
label:
|
|
2130
|
+
label: s("upstreams.form.hash_labels.cookie"),
|
|
2139
2131
|
value: "cookie",
|
|
2140
2132
|
selected: !1
|
|
2141
2133
|
},
|
|
2142
2134
|
{
|
|
2143
|
-
label:
|
|
2135
|
+
label: s("upstreams.form.hash_labels.path"),
|
|
2144
2136
|
value: "path",
|
|
2145
2137
|
selected: !1
|
|
2146
2138
|
},
|
|
2147
2139
|
{
|
|
2148
|
-
label:
|
|
2140
|
+
label: s("upstreams.form.hash_labels.query_argument"),
|
|
2149
2141
|
value: "query_arg",
|
|
2150
2142
|
selected: !1
|
|
2151
2143
|
},
|
|
2152
2144
|
{
|
|
2153
|
-
label:
|
|
2145
|
+
label: s("upstreams.form.hash_labels.uri_capture"),
|
|
2154
2146
|
value: "uri_capture",
|
|
2155
2147
|
selected: !1
|
|
2156
2148
|
}
|
|
2157
2149
|
]);
|
|
2158
|
-
de(() =>
|
|
2150
|
+
de(() => g.hashOn, (C, m) => {
|
|
2159
2151
|
m === "header" && C !== m && y("update:hash-on-header", ""), m === "cookie" && C !== m && (y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/")), m === "query_arg" && C !== m && y("update:hash-on-query-argument", ""), m === "uri_capture" && C !== m && y("update:hash-on-uri-capture", ""), (C === "cookie" || C === "none") && (y("update:hash-fallback", "none"), y("update:hash-fallback-header", ""), y("update:hash-fallback-query-argument", ""), y("update:hash-fallback-uri-capture", ""));
|
|
2160
|
-
}), de(() =>
|
|
2152
|
+
}), de(() => g.hashFallback, (C, m) => {
|
|
2161
2153
|
m === "header" && C !== m && y("update:hash-fallback-header", ""), m === "cookie" && C !== m && (y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/")), m === "query_arg" && C !== m && y("update:hash-fallback-query-argument", ""), m === "uri_capture" && C !== m && y("update:hash-fallback-uri-capture", "");
|
|
2162
|
-
}), de(() =>
|
|
2154
|
+
}), de(() => g.algorithm, (C) => {
|
|
2163
2155
|
C === "sticky-sessions" && (y("update:slots", "10000"), y("update:hash-on", "none"), y("update:hash-fallback", "none"), y("update:hash-on-header", ""), y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/"), y("update:hash-on-query-argument", ""), y("update:hash-on-uri-capture", ""), y("update:hash-fallback-header", ""), y("update:hash-fallback-query-argument", ""), y("update:hash-fallback-uri-capture", ""));
|
|
2164
2156
|
}, { immediate: !0 });
|
|
2165
|
-
const
|
|
2157
|
+
const l = U(() => g.hashOn === "cookie" || g.hashOn === "none"), c = U(() => g.slots ? h(g.slots, Ne, Be) ? "" : s("upstreams.form.errors.in_range") : "");
|
|
2166
2158
|
return (C, m) => {
|
|
2167
|
-
const t =
|
|
2168
|
-
return
|
|
2159
|
+
const t = P("KExternalLink"), V = P("KSelect"), w = P("KInput"), p = P("KCard");
|
|
2160
|
+
return q(), E(e(He), {
|
|
2169
2161
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
2170
|
-
title: e(
|
|
2162
|
+
title: e(s)("upstreams.form.load_balancing.title")
|
|
2171
2163
|
}, {
|
|
2172
2164
|
description: n(() => [
|
|
2173
|
-
|
|
2174
|
-
Q(f(e(
|
|
2165
|
+
v("p", null, [
|
|
2166
|
+
Q(f(e(s)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
2175
2167
|
u(t, {
|
|
2176
2168
|
"hide-icon": "",
|
|
2177
|
-
href: e(
|
|
2169
|
+
href: e(Me).upstreamObject
|
|
2178
2170
|
}, {
|
|
2179
2171
|
default: n(() => [
|
|
2180
|
-
Q(f(e(
|
|
2172
|
+
Q(f(e(s)("upstreams.form.buttons.view_documentation")), 1)
|
|
2181
2173
|
]),
|
|
2182
2174
|
_: 1
|
|
2183
2175
|
}, 8, ["href"])
|
|
@@ -2187,19 +2179,19 @@ const pe = {
|
|
|
2187
2179
|
u(V, {
|
|
2188
2180
|
class: "algorithm-select",
|
|
2189
2181
|
items: j.value,
|
|
2190
|
-
label: e(
|
|
2182
|
+
label: e(s)("upstreams.form.fields.algorithm.label"),
|
|
2191
2183
|
"model-value": a.algorithm,
|
|
2192
2184
|
readonly: a.readonly,
|
|
2193
2185
|
width: "100%",
|
|
2194
2186
|
"onUpdate:modelValue": m[0] || (m[0] = (S) => y("update:algorithm", S))
|
|
2195
2187
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2196
|
-
a.algorithm === "sticky-sessions" ? (
|
|
2197
|
-
u(
|
|
2188
|
+
a.algorithm === "sticky-sessions" ? (q(), oe(Ce, { key: 0 }, [
|
|
2189
|
+
u(w, {
|
|
2198
2190
|
autocomplete: "off",
|
|
2199
2191
|
"data-testid": "upstreams-form-sticky-sessions-cookie",
|
|
2200
|
-
label: e(
|
|
2192
|
+
label: e(s)("upstreams.form.fields.sticky_sessions_cookie.label"),
|
|
2201
2193
|
"label-attributes": {
|
|
2202
|
-
info: e(
|
|
2194
|
+
info: e(s)("upstreams.form.fields.sticky_sessions_cookie.tooltip"),
|
|
2203
2195
|
tooltipAttributes: { maxWidth: "400" }
|
|
2204
2196
|
},
|
|
2205
2197
|
"model-value": a.stickySessionsCookie,
|
|
@@ -2208,12 +2200,12 @@ const pe = {
|
|
|
2208
2200
|
type: "text",
|
|
2209
2201
|
"onUpdate:modelValue": m[1] || (m[1] = (S) => y("update:sticky-sessions-cookie", S))
|
|
2210
2202
|
}, null, 8, ["label", "label-attributes", "model-value", "readonly"]),
|
|
2211
|
-
u(
|
|
2203
|
+
u(w, {
|
|
2212
2204
|
autocomplete: "off",
|
|
2213
2205
|
"data-testid": "upstreams-form-sticky-sessions-cookie-path",
|
|
2214
|
-
label: e(
|
|
2206
|
+
label: e(s)("upstreams.form.fields.sticky_sessions_cookie_path.label"),
|
|
2215
2207
|
"label-attributes": {
|
|
2216
|
-
info: e(
|
|
2208
|
+
info: e(s)("upstreams.form.fields.sticky_sessions_cookie_path.tooltip"),
|
|
2217
2209
|
tooltipAttributes: { maxWidth: "400" }
|
|
2218
2210
|
},
|
|
2219
2211
|
"model-value": a.stickySessionsCookiePath,
|
|
@@ -2223,63 +2215,63 @@ const pe = {
|
|
|
2223
2215
|
"onUpdate:modelValue": m[2] || (m[2] = (S) => y("update:sticky-sessions-cookie-path", S))
|
|
2224
2216
|
}, null, 8, ["label", "label-attributes", "model-value", "readonly"])
|
|
2225
2217
|
], 64)) : B("", !0),
|
|
2226
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
2218
|
+
a.algorithm !== "sticky-sessions" ? (q(), E(w, {
|
|
2227
2219
|
key: 1,
|
|
2228
2220
|
autocomplete: "off",
|
|
2229
2221
|
"data-testid": "upstreams-form-slots",
|
|
2230
2222
|
error: !!c.value,
|
|
2231
2223
|
"error-message": c.value,
|
|
2232
|
-
help: e(
|
|
2233
|
-
label: e(
|
|
2234
|
-
max: e(
|
|
2235
|
-
min: e(
|
|
2224
|
+
help: e(s)("upstreams.form.fields.slots.help"),
|
|
2225
|
+
label: e(s)("upstreams.form.fields.slots.label"),
|
|
2226
|
+
max: e(Be),
|
|
2227
|
+
min: e(Ne),
|
|
2236
2228
|
"model-value": a.slots,
|
|
2237
2229
|
readonly: a.readonly,
|
|
2238
2230
|
type: "number",
|
|
2239
2231
|
"onUpdate:modelValue": m[3] || (m[3] = (S) => y("update:slots", S))
|
|
2240
2232
|
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"])) : B("", !0),
|
|
2241
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
2233
|
+
a.algorithm !== "sticky-sessions" ? (q(), E(p, { key: 2 }, {
|
|
2242
2234
|
default: n(() => [
|
|
2243
|
-
|
|
2244
|
-
|
|
2235
|
+
v("h5", ga, f(e(s)("upstreams.form.fields.hash_on.label")), 1),
|
|
2236
|
+
v("p", ba, f(e(s)("upstreams.form.fields.hash_on.help")), 1),
|
|
2245
2237
|
u(V, {
|
|
2246
2238
|
class: "hash-on-select",
|
|
2247
2239
|
items: F.value,
|
|
2248
|
-
label: e(
|
|
2240
|
+
label: e(s)("upstreams.form.fields.hash_on.label"),
|
|
2249
2241
|
"model-value": a.hashOn,
|
|
2250
2242
|
readonly: a.readonly,
|
|
2251
2243
|
width: "100%",
|
|
2252
2244
|
"onUpdate:modelValue": m[4] || (m[4] = (S) => y("update:hash-on", S))
|
|
2253
2245
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2254
|
-
a.hashOn === "header" ? (
|
|
2246
|
+
a.hashOn === "header" ? (q(), E(w, {
|
|
2255
2247
|
key: 0,
|
|
2256
2248
|
autocomplete: "off",
|
|
2257
2249
|
class: "margin-top-6",
|
|
2258
2250
|
"data-testid": "upstreams-form-hash-on-header",
|
|
2259
|
-
label: e(
|
|
2251
|
+
label: e(s)("upstreams.form.fields.header.label"),
|
|
2260
2252
|
"model-value": a.hashOnHeader,
|
|
2261
2253
|
readonly: a.readonly,
|
|
2262
2254
|
required: "",
|
|
2263
2255
|
type: "text",
|
|
2264
2256
|
"onUpdate:modelValue": m[5] || (m[5] = (S) => y("update:hash-on-header", S))
|
|
2265
2257
|
}, null, 8, ["label", "model-value", "readonly"])) : B("", !0),
|
|
2266
|
-
a.hashOn === "cookie" ? (
|
|
2267
|
-
u(
|
|
2258
|
+
a.hashOn === "cookie" ? (q(), oe(Ce, { key: 1 }, [
|
|
2259
|
+
u(w, {
|
|
2268
2260
|
autocomplete: "off",
|
|
2269
2261
|
class: "margin-top-6",
|
|
2270
2262
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2271
|
-
label: e(
|
|
2263
|
+
label: e(s)("upstreams.form.fields.cookie.label"),
|
|
2272
2264
|
"model-value": a.hashOnCookie,
|
|
2273
2265
|
readonly: a.readonly,
|
|
2274
2266
|
required: "",
|
|
2275
2267
|
type: "text",
|
|
2276
2268
|
"onUpdate:modelValue": m[6] || (m[6] = (S) => y("update:hash-on-cookie", S))
|
|
2277
2269
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2278
|
-
u(
|
|
2270
|
+
u(w, {
|
|
2279
2271
|
autocomplete: "off",
|
|
2280
2272
|
class: "margin-top-6",
|
|
2281
2273
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2282
|
-
label: e(
|
|
2274
|
+
label: e(s)("upstreams.form.fields.cookie_path.label"),
|
|
2283
2275
|
"model-value": a.hashOnCookiePath,
|
|
2284
2276
|
readonly: a.readonly,
|
|
2285
2277
|
required: "",
|
|
@@ -2287,24 +2279,24 @@ const pe = {
|
|
|
2287
2279
|
"onUpdate:modelValue": m[7] || (m[7] = (S) => y("update:hash-on-cookie-path", S))
|
|
2288
2280
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2289
2281
|
], 64)) : B("", !0),
|
|
2290
|
-
a.hashOn === "query_arg" ? (
|
|
2282
|
+
a.hashOn === "query_arg" ? (q(), E(w, {
|
|
2291
2283
|
key: 2,
|
|
2292
2284
|
autocomplete: "off",
|
|
2293
2285
|
class: "margin-top-6",
|
|
2294
2286
|
"data-testid": "upstreams-form-query-argument",
|
|
2295
|
-
label: e(
|
|
2287
|
+
label: e(s)("upstreams.form.fields.query_argument.label"),
|
|
2296
2288
|
"model-value": a.hashOnQueryArgument,
|
|
2297
2289
|
readonly: a.readonly,
|
|
2298
2290
|
required: "",
|
|
2299
2291
|
type: "text",
|
|
2300
2292
|
"onUpdate:modelValue": m[8] || (m[8] = (S) => y("update:hash-on-query-argument", S))
|
|
2301
2293
|
}, null, 8, ["label", "model-value", "readonly"])) : B("", !0),
|
|
2302
|
-
a.hashOn === "uri_capture" ? (
|
|
2294
|
+
a.hashOn === "uri_capture" ? (q(), E(w, {
|
|
2303
2295
|
key: 3,
|
|
2304
2296
|
autocomplete: "off",
|
|
2305
2297
|
class: "margin-top-6",
|
|
2306
2298
|
"data-testid": "upstreams-form-uri-capture",
|
|
2307
|
-
label: e(
|
|
2299
|
+
label: e(s)("upstreams.form.fields.uri_capture.label"),
|
|
2308
2300
|
"model-value": a.hashOnUriCapture,
|
|
2309
2301
|
readonly: a.readonly,
|
|
2310
2302
|
required: "",
|
|
@@ -2314,15 +2306,15 @@ const pe = {
|
|
|
2314
2306
|
]),
|
|
2315
2307
|
_: 1
|
|
2316
2308
|
})) : B("", !0),
|
|
2317
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
2309
|
+
a.algorithm !== "sticky-sessions" ? (q(), E(p, { key: 3 }, {
|
|
2318
2310
|
default: n(() => [
|
|
2319
|
-
|
|
2320
|
-
|
|
2311
|
+
v("h5", va, f(e(s)("upstreams.form.fields.hash_fallback.label")), 1),
|
|
2312
|
+
v("p", ka, f(e(s)("upstreams.form.fields.hash_fallback.help")), 1),
|
|
2321
2313
|
u(V, {
|
|
2322
2314
|
class: "hash-fallback-select",
|
|
2323
|
-
disabled:
|
|
2315
|
+
disabled: l.value,
|
|
2324
2316
|
items: F.value,
|
|
2325
|
-
label: e(
|
|
2317
|
+
label: e(s)("upstreams.form.fields.hash_fallback.label"),
|
|
2326
2318
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
2327
2319
|
"model-value": a.hashFallback,
|
|
2328
2320
|
readonly: a.readonly,
|
|
@@ -2335,45 +2327,45 @@ const pe = {
|
|
|
2335
2327
|
scope: "global"
|
|
2336
2328
|
}, {
|
|
2337
2329
|
hash_on: n(() => [
|
|
2338
|
-
|
|
2330
|
+
v("code", null, f(e(s)("upstreams.form.fields.hash_fallback.hash_on")), 1)
|
|
2339
2331
|
]),
|
|
2340
2332
|
cookie: n(() => [
|
|
2341
|
-
|
|
2333
|
+
v("code", null, f(e(s)("upstreams.form.fields.hash_fallback.cookie")), 1)
|
|
2342
2334
|
]),
|
|
2343
2335
|
_: 1
|
|
2344
2336
|
})
|
|
2345
2337
|
]),
|
|
2346
2338
|
_: 1
|
|
2347
2339
|
}, 8, ["disabled", "items", "label", "model-value", "readonly"]),
|
|
2348
|
-
a.hashFallback === "header" ? (
|
|
2340
|
+
a.hashFallback === "header" ? (q(), E(w, {
|
|
2349
2341
|
key: 0,
|
|
2350
2342
|
autocomplete: "off",
|
|
2351
2343
|
class: "margin-top-6",
|
|
2352
2344
|
"data-testid": "upstreams-form-hash-fallback-header",
|
|
2353
|
-
label: e(
|
|
2345
|
+
label: e(s)("upstreams.form.fields.header.label"),
|
|
2354
2346
|
"model-value": a.hashFallbackHeader,
|
|
2355
2347
|
readonly: a.readonly,
|
|
2356
2348
|
required: "",
|
|
2357
2349
|
type: "text",
|
|
2358
2350
|
"onUpdate:modelValue": m[11] || (m[11] = (S) => y("update:hash-fallback-header", S))
|
|
2359
2351
|
}, null, 8, ["label", "model-value", "readonly"])) : B("", !0),
|
|
2360
|
-
a.hashFallback === "cookie" ? (
|
|
2361
|
-
u(
|
|
2352
|
+
a.hashFallback === "cookie" ? (q(), oe(Ce, { key: 1 }, [
|
|
2353
|
+
u(w, {
|
|
2362
2354
|
autocomplete: "off",
|
|
2363
2355
|
class: "margin-top-6",
|
|
2364
2356
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2365
|
-
label: e(
|
|
2357
|
+
label: e(s)("upstreams.form.fields.cookie.label"),
|
|
2366
2358
|
"model-value": a.hashOnCookie,
|
|
2367
2359
|
readonly: a.readonly,
|
|
2368
2360
|
required: "",
|
|
2369
2361
|
type: "text",
|
|
2370
2362
|
"onUpdate:modelValue": m[12] || (m[12] = (S) => y("update:hash-on-cookie", S))
|
|
2371
2363
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2372
|
-
u(
|
|
2364
|
+
u(w, {
|
|
2373
2365
|
autocomplete: "off",
|
|
2374
2366
|
class: "margin-top-6",
|
|
2375
2367
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2376
|
-
label: e(
|
|
2368
|
+
label: e(s)("upstreams.form.fields.cookie_path.label"),
|
|
2377
2369
|
"model-value": a.hashOnCookiePath,
|
|
2378
2370
|
readonly: a.readonly,
|
|
2379
2371
|
required: "",
|
|
@@ -2381,24 +2373,24 @@ const pe = {
|
|
|
2381
2373
|
"onUpdate:modelValue": m[13] || (m[13] = (S) => y("update:hash-on-cookie-path", S))
|
|
2382
2374
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2383
2375
|
], 64)) : B("", !0),
|
|
2384
|
-
a.hashFallback === "query_arg" ? (
|
|
2376
|
+
a.hashFallback === "query_arg" ? (q(), E(w, {
|
|
2385
2377
|
key: 2,
|
|
2386
2378
|
autocomplete: "off",
|
|
2387
2379
|
class: "margin-top-6",
|
|
2388
2380
|
"data-testid": "upstreams-form-hash-fallback-query-argument",
|
|
2389
|
-
label: e(
|
|
2381
|
+
label: e(s)("upstreams.form.fields.query_argument.label"),
|
|
2390
2382
|
"model-value": a.hashFallbackQueryArgument,
|
|
2391
2383
|
readonly: a.readonly,
|
|
2392
2384
|
required: "",
|
|
2393
2385
|
type: "text",
|
|
2394
2386
|
"onUpdate:modelValue": m[14] || (m[14] = (S) => y("update:hash-fallback-query-argument", S))
|
|
2395
2387
|
}, null, 8, ["label", "model-value", "readonly"])) : B("", !0),
|
|
2396
|
-
a.hashFallback === "uri_capture" ? (
|
|
2388
|
+
a.hashFallback === "uri_capture" ? (q(), E(w, {
|
|
2397
2389
|
key: 3,
|
|
2398
2390
|
autocomplete: "off",
|
|
2399
2391
|
class: "margin-top-6",
|
|
2400
2392
|
"data-testid": "upstreams-form-hash-fallback-uri-capture",
|
|
2401
|
-
label: e(
|
|
2393
|
+
label: e(s)("upstreams.form.fields.uri_capture.label"),
|
|
2402
2394
|
"model-value": a.hashFallbackUriCapture,
|
|
2403
2395
|
readonly: a.readonly,
|
|
2404
2396
|
required: "",
|
|
@@ -2436,19 +2428,19 @@ const pe = {
|
|
|
2436
2428
|
},
|
|
2437
2429
|
emits: ["update:active-health-switch", "update:passive-health-switch", "update:healthchecks-threshold"],
|
|
2438
2430
|
setup(a, { emit: D }) {
|
|
2439
|
-
const { i18n: { t: i } } = pe.useI18n(),
|
|
2440
|
-
return (h,
|
|
2441
|
-
const y =
|
|
2442
|
-
return
|
|
2431
|
+
const { i18n: { t: i } } = pe.useI18n(), s = D;
|
|
2432
|
+
return (h, g) => {
|
|
2433
|
+
const y = P("KExternalLink"), j = P("KInputSwitch"), F = P("KCard"), l = P("KInput");
|
|
2434
|
+
return q(), E(e(He), {
|
|
2443
2435
|
class: "kong-ui-entities-upstreams-healthchecks",
|
|
2444
2436
|
title: e(i)("upstreams.form.health_check.title")
|
|
2445
2437
|
}, {
|
|
2446
2438
|
description: n(() => [
|
|
2447
|
-
|
|
2439
|
+
v("p", null, [
|
|
2448
2440
|
Q(f(e(i)("upstreams.form.health_check.help")) + " ", 1),
|
|
2449
2441
|
u(y, {
|
|
2450
2442
|
"hide-icon": "",
|
|
2451
|
-
href: e(
|
|
2443
|
+
href: e(Me).loadBalancing
|
|
2452
2444
|
}, {
|
|
2453
2445
|
default: n(() => [
|
|
2454
2446
|
Q(f(e(i)("upstreams.form.buttons.view_documentation")), 1)
|
|
@@ -2460,33 +2452,33 @@ const pe = {
|
|
|
2460
2452
|
default: n(() => [
|
|
2461
2453
|
u(F, null, {
|
|
2462
2454
|
default: n(() => [
|
|
2463
|
-
|
|
2464
|
-
|
|
2455
|
+
v("h5", Sa, f(e(i)("upstreams.form.fields.active_health_checks.label")), 1),
|
|
2456
|
+
v("p", Ha, f(e(i)("upstreams.form.fields.active_health_checks.help")), 1),
|
|
2465
2457
|
u(j, {
|
|
2466
2458
|
class: "active-health-switch",
|
|
2467
2459
|
"data-testid": "active-health-switch",
|
|
2468
2460
|
disabled: a.readonly,
|
|
2469
2461
|
"model-value": a.activeHealthSwitch,
|
|
2470
|
-
onChange:
|
|
2462
|
+
onChange: g[0] || (g[0] = (c) => s("update:active-health-switch", c))
|
|
2471
2463
|
}, null, 8, ["disabled", "model-value"])
|
|
2472
2464
|
]),
|
|
2473
2465
|
_: 1
|
|
2474
2466
|
}),
|
|
2475
2467
|
u(F, null, {
|
|
2476
2468
|
default: n(() => [
|
|
2477
|
-
|
|
2478
|
-
|
|
2469
|
+
v("h5", Ua, f(e(i)("upstreams.form.fields.passive_health_checks.label")), 1),
|
|
2470
|
+
v("p", Ia, f(e(i)("upstreams.form.fields.passive_health_checks.help")), 1),
|
|
2479
2471
|
u(j, {
|
|
2480
2472
|
class: "passive-health-switch",
|
|
2481
2473
|
"data-testid": "passive-health-switch",
|
|
2482
2474
|
disabled: a.readonly,
|
|
2483
2475
|
"model-value": a.passiveHealthSwitch,
|
|
2484
|
-
onChange:
|
|
2476
|
+
onChange: g[1] || (g[1] = (c) => s("update:passive-health-switch", c))
|
|
2485
2477
|
}, null, 8, ["disabled", "model-value"])
|
|
2486
2478
|
]),
|
|
2487
2479
|
_: 1
|
|
2488
2480
|
}),
|
|
2489
|
-
u(
|
|
2481
|
+
u(l, {
|
|
2490
2482
|
autocomplete: "off",
|
|
2491
2483
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
2492
2484
|
label: e(i)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
@@ -2495,14 +2487,14 @@ const pe = {
|
|
|
2495
2487
|
"model-value": a.healthchecksThreshold,
|
|
2496
2488
|
readonly: a.readonly,
|
|
2497
2489
|
type: "number",
|
|
2498
|
-
"onUpdate:modelValue":
|
|
2490
|
+
"onUpdate:modelValue": g[2] || (g[2] = (c) => s("update:healthchecks-threshold", c))
|
|
2499
2491
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2500
2492
|
]),
|
|
2501
2493
|
_: 1
|
|
2502
2494
|
}, 8, ["title"]);
|
|
2503
2495
|
};
|
|
2504
2496
|
}
|
|
2505
|
-
}), wa = /* @__PURE__ */ me(qa, [["__scopeId", "data-v-c2ff95ff"]]), Ta = "#d60027", Fa = { class: "fields-group-title" }, xa = { class: "fields-group-text" }, Oa = { class: "fields-group-title" },
|
|
2497
|
+
}), wa = /* @__PURE__ */ me(qa, [["__scopeId", "data-v-c2ff95ff"]]), Ta = "#d60027", Fa = { class: "fields-group-title" }, xa = { class: "fields-group-text" }, Oa = { class: "fields-group-title" }, Pa = { class: "fields-group-text" }, $a = /* @__PURE__ */ ne({
|
|
2506
2498
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
2507
2499
|
props: {
|
|
2508
2500
|
config: {
|
|
@@ -2577,7 +2569,7 @@ const pe = {
|
|
|
2577
2569
|
},
|
|
2578
2570
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:healthy-interval", "update:healthy-successes", "update:healthy-http-statuses", "update:unhealthy-interval", "update:unhealthy-http-failures", "update:unhealthy-tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
2579
2571
|
setup(a, { emit: D }) {
|
|
2580
|
-
const { i18n: { t: i } } = pe.useI18n(), { objectsAreEqual:
|
|
2572
|
+
const { i18n: { t: i } } = pe.useI18n(), { objectsAreEqual: s } = Ae(), h = a, g = D, y = R([
|
|
2581
2573
|
{
|
|
2582
2574
|
label: i("upstreams.form.healthcheck_type_labels.http"),
|
|
2583
2575
|
value: "http",
|
|
@@ -2603,40 +2595,40 @@ const pe = {
|
|
|
2603
2595
|
value: "grpcs",
|
|
2604
2596
|
selected: !1
|
|
2605
2597
|
}
|
|
2606
|
-
]), j =
|
|
2607
|
-
trackNewItems:
|
|
2598
|
+
]), j = U(() => h.type === "https" || h.type === "grpcs"), F = U(() => h.type === "tcp"), {
|
|
2599
|
+
trackNewItems: l
|
|
2608
2600
|
} = Se({ replaceId: !0 }), {
|
|
2609
2601
|
trackNewItems: c
|
|
2610
2602
|
} = Se({ replaceId: !0 });
|
|
2611
|
-
de(() => h.type, (
|
|
2612
|
-
p === "tcp" &&
|
|
2603
|
+
de(() => h.type, (w, p) => {
|
|
2604
|
+
p === "tcp" && w !== p && g("update:unhealthy-tcp-failures", "5"), (p === "https" || p === "grpcs") && w !== p && (g("update:https-sni", ""), g("update:verify-ssl", !1)), p !== "tcp" && w === "tcp" && (g("update:http-path", "/"), g("update:healthy-http-statuses", Fe), g("update:unhealthy-http-statuses", Oe));
|
|
2613
2605
|
});
|
|
2614
2606
|
const C = R([{ key: "", values: "" }]);
|
|
2615
|
-
de(() => h.headers, (
|
|
2616
|
-
|
|
2607
|
+
de(() => h.headers, (w) => {
|
|
2608
|
+
s(C.value, w) || (C.value = [...w]);
|
|
2617
2609
|
}, {
|
|
2618
2610
|
immediate: !0,
|
|
2619
2611
|
deep: !0
|
|
2620
2612
|
});
|
|
2621
2613
|
const m = () => {
|
|
2622
|
-
|
|
2614
|
+
g("update:headers", C.value);
|
|
2623
2615
|
}, t = () => {
|
|
2624
2616
|
C.value.push({ key: "", values: "" }), m();
|
|
2625
|
-
}, V = (
|
|
2626
|
-
|
|
2617
|
+
}, V = (w) => {
|
|
2618
|
+
w === 0 && C.value.length === 1 ? C.value[0] = { key: "", values: "" } : C.value.splice(w, 1), m();
|
|
2627
2619
|
};
|
|
2628
|
-
return (
|
|
2629
|
-
const S =
|
|
2630
|
-
return
|
|
2620
|
+
return (w, p) => {
|
|
2621
|
+
const S = P("KExternalLink"), G = P("KSelect"), N = P("KInput"), X = P("KCheckbox"), k = P("KLabel"), T = P("KButton"), $ = P("KMultiselect"), A = P("KCard");
|
|
2622
|
+
return q(), E(e(He), {
|
|
2631
2623
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
2632
2624
|
title: e(i)("upstreams.form.active_health_check.title")
|
|
2633
2625
|
}, {
|
|
2634
2626
|
description: n(() => [
|
|
2635
|
-
|
|
2627
|
+
v("p", null, [
|
|
2636
2628
|
Q(f(e(i)("upstreams.form.active_health_check.help")) + " ", 1),
|
|
2637
2629
|
u(S, {
|
|
2638
2630
|
"hide-icon": "",
|
|
2639
|
-
href: e(
|
|
2631
|
+
href: e(Me).upstreamObject
|
|
2640
2632
|
}, {
|
|
2641
2633
|
default: n(() => [
|
|
2642
2634
|
Q(f(e(i)("upstreams.form.buttons.view_documentation")), 1)
|
|
@@ -2646,16 +2638,16 @@ const pe = {
|
|
|
2646
2638
|
])
|
|
2647
2639
|
]),
|
|
2648
2640
|
default: n(() => [
|
|
2649
|
-
u(
|
|
2641
|
+
u(G, {
|
|
2650
2642
|
class: "active-healthcheck-type-select",
|
|
2651
2643
|
items: y.value,
|
|
2652
2644
|
label: e(i)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
2653
2645
|
"model-value": a.type,
|
|
2654
2646
|
readonly: a.readonly,
|
|
2655
2647
|
width: "100%",
|
|
2656
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2648
|
+
"onUpdate:modelValue": p[0] || (p[0] = (_) => g("update:type", _))
|
|
2657
2649
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2658
|
-
F.value ? B("", !0) : (
|
|
2650
|
+
F.value ? B("", !0) : (q(), E(N, {
|
|
2659
2651
|
key: 0,
|
|
2660
2652
|
autocomplete: "off",
|
|
2661
2653
|
"data-testid": "active-healthcheck-http-path",
|
|
@@ -2663,9 +2655,9 @@ const pe = {
|
|
|
2663
2655
|
"model-value": a.httpPath,
|
|
2664
2656
|
readonly: a.readonly,
|
|
2665
2657
|
type: "text",
|
|
2666
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2658
|
+
"onUpdate:modelValue": p[1] || (p[1] = (_) => g("update:http-path", _))
|
|
2667
2659
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
2668
|
-
u(
|
|
2660
|
+
u(N, {
|
|
2669
2661
|
autocomplete: "off",
|
|
2670
2662
|
"data-testid": "active-healthcheck-timeout",
|
|
2671
2663
|
label: e(i)("upstreams.form.fields.timeout.label"),
|
|
@@ -2674,9 +2666,9 @@ const pe = {
|
|
|
2674
2666
|
"model-value": a.timeout,
|
|
2675
2667
|
readonly: a.readonly,
|
|
2676
2668
|
type: "number",
|
|
2677
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2669
|
+
"onUpdate:modelValue": p[2] || (p[2] = (_) => g("update:timeout", _))
|
|
2678
2670
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2679
|
-
u(
|
|
2671
|
+
u(N, {
|
|
2680
2672
|
autocomplete: "off",
|
|
2681
2673
|
"data-testid": "active-healthcheck-concurrency",
|
|
2682
2674
|
label: e(i)("upstreams.form.fields.concurrency.label"),
|
|
@@ -2685,10 +2677,10 @@ const pe = {
|
|
|
2685
2677
|
"model-value": a.concurrency,
|
|
2686
2678
|
readonly: a.readonly,
|
|
2687
2679
|
type: "number",
|
|
2688
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
2680
|
+
"onUpdate:modelValue": p[3] || (p[3] = (_) => g("update:concurrency", _))
|
|
2689
2681
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2690
|
-
j.value ? (
|
|
2691
|
-
u(
|
|
2682
|
+
j.value ? (q(), oe(Ce, { key: 1 }, [
|
|
2683
|
+
u(N, {
|
|
2692
2684
|
autocomplete: "off",
|
|
2693
2685
|
class: "margin-bottom-6",
|
|
2694
2686
|
"data-testid": "active-healthcheck-https-sni",
|
|
@@ -2696,18 +2688,18 @@ const pe = {
|
|
|
2696
2688
|
"model-value": a.httpsSni,
|
|
2697
2689
|
readonly: a.readonly,
|
|
2698
2690
|
type: "text",
|
|
2699
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
2691
|
+
"onUpdate:modelValue": p[4] || (p[4] = (_) => g("update:https-sni", _))
|
|
2700
2692
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2701
|
-
u(
|
|
2693
|
+
u(X, {
|
|
2702
2694
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
2703
2695
|
disabled: a.readonly,
|
|
2704
2696
|
label: e(i)("upstreams.form.fields.verify_ssl.label"),
|
|
2705
2697
|
"model-value": a.verifySsl,
|
|
2706
|
-
"onUpdate:modelValue": p[5] || (p[5] = (
|
|
2698
|
+
"onUpdate:modelValue": p[5] || (p[5] = (_) => g("update:verify-ssl", _))
|
|
2707
2699
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
2708
2700
|
], 64)) : B("", !0),
|
|
2709
|
-
|
|
2710
|
-
u(
|
|
2701
|
+
v("div", null, [
|
|
2702
|
+
u(k, {
|
|
2711
2703
|
info: e(i)("upstreams.form.fields.headers.tooltip_active"),
|
|
2712
2704
|
"tooltip-attributes": { maxWidth: "250px" }
|
|
2713
2705
|
}, {
|
|
@@ -2716,36 +2708,36 @@ const pe = {
|
|
|
2716
2708
|
]),
|
|
2717
2709
|
_: 1
|
|
2718
2710
|
}, 8, ["info"]),
|
|
2719
|
-
|
|
2720
|
-
(
|
|
2721
|
-
key: `${
|
|
2722
|
-
class:
|
|
2711
|
+
v("div", null, [
|
|
2712
|
+
(q(!0), oe(Ce, null, Pt(C.value, (_, O) => (q(), oe("div", {
|
|
2713
|
+
key: `${_.header}_${O}`,
|
|
2714
|
+
class: $t(["headers-row", { "margin-top-6": O > 0 }])
|
|
2723
2715
|
}, [
|
|
2724
|
-
u(
|
|
2725
|
-
modelValue: C.value[
|
|
2726
|
-
"onUpdate:modelValue": (
|
|
2716
|
+
u(N, {
|
|
2717
|
+
modelValue: C.value[O].key,
|
|
2718
|
+
"onUpdate:modelValue": (W) => C.value[O].key = W,
|
|
2727
2719
|
autocomplete: "off",
|
|
2728
|
-
"data-testid": `active-healthcheck-headers-header-${
|
|
2720
|
+
"data-testid": `active-healthcheck-headers-header-${O + 1}`,
|
|
2729
2721
|
readonly: a.readonly,
|
|
2730
2722
|
type: "text",
|
|
2731
2723
|
onBlur: m
|
|
2732
2724
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2733
|
-
u(
|
|
2734
|
-
modelValue: C.value[
|
|
2735
|
-
"onUpdate:modelValue": (
|
|
2725
|
+
u(N, {
|
|
2726
|
+
modelValue: C.value[O].values,
|
|
2727
|
+
"onUpdate:modelValue": (W) => C.value[O].values = W,
|
|
2736
2728
|
autocomplete: "off",
|
|
2737
|
-
"data-testid": `active-healthcheck-headers-value-${
|
|
2729
|
+
"data-testid": `active-healthcheck-headers-value-${O + 1}`,
|
|
2738
2730
|
readonly: a.readonly,
|
|
2739
2731
|
type: "text",
|
|
2740
2732
|
onBlur: m
|
|
2741
2733
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2742
|
-
u(
|
|
2734
|
+
u(T, {
|
|
2743
2735
|
appearance: "tertiary",
|
|
2744
2736
|
class: "btn-remove",
|
|
2745
2737
|
"data-testid": "btn-remove-header",
|
|
2746
2738
|
disabled: C.value.length === 1,
|
|
2747
2739
|
icon: "",
|
|
2748
|
-
onClick: (
|
|
2740
|
+
onClick: (W) => V(O)
|
|
2749
2741
|
}, {
|
|
2750
2742
|
default: n(() => [
|
|
2751
2743
|
u(e(Bt), {
|
|
@@ -2755,7 +2747,7 @@ const pe = {
|
|
|
2755
2747
|
]),
|
|
2756
2748
|
_: 2
|
|
2757
2749
|
}, 1032, ["disabled", "onClick"]),
|
|
2758
|
-
C.value &&
|
|
2750
|
+
C.value && O === C.value.length - 1 ? (q(), E(T, {
|
|
2759
2751
|
key: 0,
|
|
2760
2752
|
appearance: "tertiary",
|
|
2761
2753
|
class: "btn-add-header",
|
|
@@ -2764,18 +2756,18 @@ const pe = {
|
|
|
2764
2756
|
onClick: t
|
|
2765
2757
|
}, {
|
|
2766
2758
|
default: n(() => [
|
|
2767
|
-
u(e(
|
|
2759
|
+
u(e(we))
|
|
2768
2760
|
]),
|
|
2769
2761
|
_: 1
|
|
2770
2762
|
})) : B("", !0)
|
|
2771
2763
|
], 2))), 128))
|
|
2772
2764
|
])
|
|
2773
2765
|
]),
|
|
2774
|
-
u(
|
|
2766
|
+
u(A, null, {
|
|
2775
2767
|
default: n(() => [
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
u(
|
|
2768
|
+
v("h5", Fa, f(e(i)("upstreams.form.healthy.label")), 1),
|
|
2769
|
+
v("p", xa, f(e(i)("upstreams.form.healthy.help")), 1),
|
|
2770
|
+
u(N, {
|
|
2779
2771
|
autocomplete: "off",
|
|
2780
2772
|
class: "margin-bottom-6",
|
|
2781
2773
|
"data-testid": "active-healthcheck-healthy-interval",
|
|
@@ -2786,42 +2778,42 @@ const pe = {
|
|
|
2786
2778
|
"model-value": a.healthyInterval,
|
|
2787
2779
|
readonly: a.readonly,
|
|
2788
2780
|
type: "number",
|
|
2789
|
-
"onUpdate:modelValue": p[6] || (p[6] = (
|
|
2781
|
+
"onUpdate:modelValue": p[6] || (p[6] = (_) => g("update:healthy-interval", _))
|
|
2790
2782
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2791
|
-
u(
|
|
2783
|
+
u(N, {
|
|
2792
2784
|
autocomplete: "off",
|
|
2793
2785
|
"data-testid": "active-healthcheck-healthy-successes",
|
|
2794
2786
|
label: e(i)("upstreams.form.fields.successes.label"),
|
|
2795
|
-
max: e(
|
|
2796
|
-
min: e(
|
|
2787
|
+
max: e(be),
|
|
2788
|
+
min: e(ge),
|
|
2797
2789
|
"model-value": a.healthySuccesses,
|
|
2798
2790
|
readonly: a.readonly,
|
|
2799
2791
|
type: "number",
|
|
2800
|
-
"onUpdate:modelValue": p[7] || (p[7] = (
|
|
2792
|
+
"onUpdate:modelValue": p[7] || (p[7] = (_) => g("update:healthy-successes", _))
|
|
2801
2793
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2802
|
-
F.value ? B("", !0) : (
|
|
2794
|
+
F.value ? B("", !0) : (q(), E($, {
|
|
2803
2795
|
key: 0,
|
|
2804
2796
|
autocomplete: "off",
|
|
2805
2797
|
class: "margin-top-6 active-healthcheck-healthy-http-statuses",
|
|
2806
2798
|
"data-testid": "active-healthcheck-healthy-http-statuses",
|
|
2807
2799
|
"enable-item-creation": "",
|
|
2808
|
-
items: e(
|
|
2800
|
+
items: e(Te),
|
|
2809
2801
|
label: e(i)("upstreams.form.fields.http_statuses.label"),
|
|
2810
2802
|
"model-value": a.healthyHttpStatuses,
|
|
2811
2803
|
readonly: a.readonly,
|
|
2812
2804
|
width: "100%",
|
|
2813
|
-
onItemAdded: p[8] || (p[8] = (
|
|
2814
|
-
onItemRemoved: p[9] || (p[9] = (
|
|
2815
|
-
"onUpdate:modelValue": p[10] || (p[10] = (
|
|
2805
|
+
onItemAdded: p[8] || (p[8] = (_) => e(l)(_, !0)),
|
|
2806
|
+
onItemRemoved: p[9] || (p[9] = (_) => e(l)(_, !1)),
|
|
2807
|
+
"onUpdate:modelValue": p[10] || (p[10] = (_) => g("update:healthy-http-statuses", _))
|
|
2816
2808
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2817
2809
|
]),
|
|
2818
2810
|
_: 1
|
|
2819
2811
|
}),
|
|
2820
|
-
u(
|
|
2812
|
+
u(A, null, {
|
|
2821
2813
|
default: n(() => [
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
u(
|
|
2814
|
+
v("h5", Oa, f(e(i)("upstreams.form.unhealthy.label")), 1),
|
|
2815
|
+
v("p", Pa, f(e(i)("upstreams.form.unhealthy.help")), 1),
|
|
2816
|
+
u(N, {
|
|
2825
2817
|
autocomplete: "off",
|
|
2826
2818
|
class: "margin-bottom-6",
|
|
2827
2819
|
"data-testid": "active-healthcheck-unhealthy-interval",
|
|
@@ -2832,49 +2824,49 @@ const pe = {
|
|
|
2832
2824
|
"model-value": a.unhealthyInterval,
|
|
2833
2825
|
readonly: a.readonly,
|
|
2834
2826
|
type: "number",
|
|
2835
|
-
"onUpdate:modelValue": p[11] || (p[11] = (
|
|
2827
|
+
"onUpdate:modelValue": p[11] || (p[11] = (_) => g("update:unhealthy-interval", _))
|
|
2836
2828
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2837
|
-
u(
|
|
2829
|
+
u(N, {
|
|
2838
2830
|
autocomplete: "off",
|
|
2839
2831
|
class: "margin-bottom-6",
|
|
2840
2832
|
"data-testid": "active-healthcheck-unhealthy-tcp-failures",
|
|
2841
2833
|
label: e(i)("upstreams.form.fields.tcp_failures.label"),
|
|
2842
|
-
max: e(
|
|
2843
|
-
min: e(
|
|
2834
|
+
max: e(be),
|
|
2835
|
+
min: e(ge),
|
|
2844
2836
|
"model-value": a.unhealthyTcpFailures,
|
|
2845
2837
|
readonly: a.readonly,
|
|
2846
2838
|
type: "number",
|
|
2847
|
-
"onUpdate:modelValue": p[12] || (p[12] = (
|
|
2839
|
+
"onUpdate:modelValue": p[12] || (p[12] = (_) => g("update:unhealthy-tcp-failures", _))
|
|
2848
2840
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2849
|
-
F.value ? B("", !0) : (
|
|
2841
|
+
F.value ? B("", !0) : (q(), E(N, {
|
|
2850
2842
|
key: 0,
|
|
2851
2843
|
autocomplete: "off",
|
|
2852
2844
|
class: "margin-bottom-6",
|
|
2853
2845
|
"data-testid": "active-healthcheck-unhealthy-http-failures",
|
|
2854
2846
|
label: e(i)("upstreams.form.fields.http_failures.label"),
|
|
2855
|
-
max: e(
|
|
2856
|
-
min: e(
|
|
2847
|
+
max: e(be),
|
|
2848
|
+
min: e(ge),
|
|
2857
2849
|
"model-value": a.unhealthyHttpFailures,
|
|
2858
2850
|
readonly: a.readonly,
|
|
2859
2851
|
type: "number",
|
|
2860
|
-
"onUpdate:modelValue": p[13] || (p[13] = (
|
|
2852
|
+
"onUpdate:modelValue": p[13] || (p[13] = (_) => g("update:unhealthy-http-failures", _))
|
|
2861
2853
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2862
|
-
F.value ? B("", !0) : (
|
|
2854
|
+
F.value ? B("", !0) : (q(), E($, {
|
|
2863
2855
|
key: 1,
|
|
2864
2856
|
autocomplete: "off",
|
|
2865
2857
|
class: "margin-bottom-6 active-healthcheck-unhealthy-http-statuses",
|
|
2866
2858
|
"data-testid": "active-healthcheck-unhealthy-http-statuses",
|
|
2867
2859
|
"enable-item-creation": "",
|
|
2868
|
-
items: e(
|
|
2860
|
+
items: e(Te),
|
|
2869
2861
|
label: e(i)("upstreams.form.fields.http_statuses.label"),
|
|
2870
2862
|
"model-value": a.unhealthyHttpStatuses,
|
|
2871
2863
|
readonly: a.readonly,
|
|
2872
2864
|
width: "100%",
|
|
2873
|
-
onItemAdded: p[14] || (p[14] = (
|
|
2874
|
-
onItemRemoved: p[15] || (p[15] = (
|
|
2875
|
-
"onUpdate:modelValue": p[16] || (p[16] = (
|
|
2865
|
+
onItemAdded: p[14] || (p[14] = (_) => e(c)(_, !0)),
|
|
2866
|
+
onItemRemoved: p[15] || (p[15] = (_) => e(c)(_, !1)),
|
|
2867
|
+
"onUpdate:modelValue": p[16] || (p[16] = (_) => g("update:unhealthy-http-statuses", _))
|
|
2876
2868
|
}, null, 8, ["items", "label", "model-value", "readonly"])),
|
|
2877
|
-
u(
|
|
2869
|
+
u(N, {
|
|
2878
2870
|
autocomplete: "off",
|
|
2879
2871
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
2880
2872
|
label: e(i)("upstreams.form.fields.timeouts.label"),
|
|
@@ -2883,7 +2875,7 @@ const pe = {
|
|
|
2883
2875
|
"model-value": a.unhealthyTimeouts,
|
|
2884
2876
|
readonly: a.readonly,
|
|
2885
2877
|
type: "number",
|
|
2886
|
-
"onUpdate:modelValue": p[17] || (p[17] = (
|
|
2878
|
+
"onUpdate:modelValue": p[17] || (p[17] = (_) => g("update:unhealthy-timeouts", _))
|
|
2887
2879
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2888
2880
|
]),
|
|
2889
2881
|
_: 1
|
|
@@ -2893,7 +2885,7 @@ const pe = {
|
|
|
2893
2885
|
}, 8, ["title"]);
|
|
2894
2886
|
};
|
|
2895
2887
|
}
|
|
2896
|
-
}), Aa = /* @__PURE__ */ me(
|
|
2888
|
+
}), Aa = /* @__PURE__ */ me($a, [["__scopeId", "data-v-cfc70316"]]), Ma = { class: "fields-group-title" }, Ka = { class: "fields-group-text" }, Va = { class: "fields-group-title" }, Ea = { class: "fields-group-text" }, Na = /* @__PURE__ */ ne({
|
|
2897
2889
|
__name: "UpstreamsFormPassiveHealthCheck",
|
|
2898
2890
|
props: {
|
|
2899
2891
|
type: {
|
|
@@ -2932,7 +2924,7 @@ const pe = {
|
|
|
2932
2924
|
},
|
|
2933
2925
|
emits: ["update:type", "update:healthy-successes", "update:healthy-http-statuses", "update:unhealthy-timeouts", "update:unhealthy-http-failures", "update:unhealthy-http-statuses", "update:unhealthy-tcp-failures"],
|
|
2934
2926
|
setup(a, { emit: D }) {
|
|
2935
|
-
const { i18n: { t: i } } = pe.useI18n(),
|
|
2927
|
+
const { i18n: { t: i } } = pe.useI18n(), s = a, h = D, g = R([
|
|
2936
2928
|
{
|
|
2937
2929
|
label: i("upstreams.form.healthcheck_type_labels.http"),
|
|
2938
2930
|
value: "http",
|
|
@@ -2958,25 +2950,25 @@ const pe = {
|
|
|
2958
2950
|
value: "grpcs",
|
|
2959
2951
|
selected: !1
|
|
2960
2952
|
}
|
|
2961
|
-
]), y =
|
|
2953
|
+
]), y = U(() => s.type === "tcp"), {
|
|
2962
2954
|
trackNewItems: j
|
|
2963
2955
|
} = Se({ replaceId: !0 }), {
|
|
2964
2956
|
trackNewItems: F
|
|
2965
2957
|
} = Se({ replaceId: !0 });
|
|
2966
|
-
return de(() =>
|
|
2967
|
-
c === "tcp" &&
|
|
2968
|
-
}), (
|
|
2969
|
-
const C =
|
|
2970
|
-
return
|
|
2958
|
+
return de(() => s.type, (l, c) => {
|
|
2959
|
+
c === "tcp" && l !== c && h("update:unhealthy-tcp-failures", "5"), c !== "tcp" && l === "tcp" && (h("update:healthy-http-statuses", xe), h("update:unhealthy-http-statuses", Pe));
|
|
2960
|
+
}), (l, c) => {
|
|
2961
|
+
const C = P("KExternalLink"), m = P("KSelect"), t = P("KInput"), V = P("KMultiselect"), w = P("KCard");
|
|
2962
|
+
return q(), E(e(He), {
|
|
2971
2963
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
2972
2964
|
title: e(i)("upstreams.form.passive_health_check.title")
|
|
2973
2965
|
}, {
|
|
2974
2966
|
description: n(() => [
|
|
2975
|
-
|
|
2967
|
+
v("p", null, [
|
|
2976
2968
|
Q(f(e(i)("upstreams.form.passive_health_check.help")) + " ", 1),
|
|
2977
2969
|
u(C, {
|
|
2978
2970
|
"hide-icon": "",
|
|
2979
|
-
href: e(
|
|
2971
|
+
href: e(Me).upstreamObject
|
|
2980
2972
|
}, {
|
|
2981
2973
|
default: n(() => [
|
|
2982
2974
|
Q(f(e(i)("upstreams.form.buttons.view_documentation")), 1)
|
|
@@ -2988,33 +2980,33 @@ const pe = {
|
|
|
2988
2980
|
default: n(() => [
|
|
2989
2981
|
u(m, {
|
|
2990
2982
|
class: "passive-healthcheck-type-select",
|
|
2991
|
-
items:
|
|
2983
|
+
items: g.value,
|
|
2992
2984
|
label: e(i)("upstreams.form.fields.passive_health_check_type.label"),
|
|
2993
2985
|
"model-value": a.type,
|
|
2994
2986
|
readonly: a.readonly,
|
|
2995
2987
|
width: "100%",
|
|
2996
2988
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => h("update:type", p))
|
|
2997
2989
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2998
|
-
u(
|
|
2990
|
+
u(w, null, {
|
|
2999
2991
|
default: n(() => [
|
|
3000
|
-
|
|
3001
|
-
|
|
2992
|
+
v("h5", Ma, f(e(i)("upstreams.form.passive_healthy.label")), 1),
|
|
2993
|
+
v("p", Ka, f(e(i)("upstreams.form.passive_healthy.help")), 1),
|
|
3002
2994
|
u(t, {
|
|
3003
2995
|
autocomplete: "off",
|
|
3004
2996
|
"data-testid": "passive-healthcheck-healthy-successes",
|
|
3005
2997
|
label: e(i)("upstreams.form.fields.successes.label"),
|
|
3006
|
-
max: e(
|
|
3007
|
-
min: e(
|
|
2998
|
+
max: e(be),
|
|
2999
|
+
min: e(ge),
|
|
3008
3000
|
"model-value": a.healthySuccesses,
|
|
3009
3001
|
readonly: a.readonly,
|
|
3010
3002
|
type: "number",
|
|
3011
3003
|
"onUpdate:modelValue": c[1] || (c[1] = (p) => h("update:healthy-successes", p))
|
|
3012
3004
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
3013
|
-
y.value ? B("", !0) : (
|
|
3005
|
+
y.value ? B("", !0) : (q(), E(V, {
|
|
3014
3006
|
key: 0,
|
|
3015
3007
|
class: "margin-top-6 passive-healthcheck-healthy-http-statuses",
|
|
3016
3008
|
"enable-item-creation": "",
|
|
3017
|
-
items: e(
|
|
3009
|
+
items: e(Te),
|
|
3018
3010
|
label: e(i)("upstreams.form.fields.http_statuses.label"),
|
|
3019
3011
|
"model-value": a.healthyHttpStatuses,
|
|
3020
3012
|
readonly: a.readonly,
|
|
@@ -3026,10 +3018,10 @@ const pe = {
|
|
|
3026
3018
|
]),
|
|
3027
3019
|
_: 1
|
|
3028
3020
|
}),
|
|
3029
|
-
u(
|
|
3021
|
+
u(w, null, {
|
|
3030
3022
|
default: n(() => [
|
|
3031
|
-
|
|
3032
|
-
|
|
3023
|
+
v("h5", Va, f(e(i)("upstreams.form.passive_unhealthy.label")), 1),
|
|
3024
|
+
v("p", Ea, f(e(i)("upstreams.form.passive_unhealthy.help")), 1),
|
|
3033
3025
|
u(t, {
|
|
3034
3026
|
autocomplete: "off",
|
|
3035
3027
|
"data-testid": "passive-healthcheck-unhealthy-timeouts",
|
|
@@ -3046,33 +3038,33 @@ const pe = {
|
|
|
3046
3038
|
class: "margin-top-6",
|
|
3047
3039
|
"data-testid": "passive-healthcheck-unhealthy-tcp-failures",
|
|
3048
3040
|
label: e(i)("upstreams.form.fields.tcp_failures.label"),
|
|
3049
|
-
max: e(
|
|
3050
|
-
min: e(
|
|
3041
|
+
max: e(be),
|
|
3042
|
+
min: e(ge),
|
|
3051
3043
|
"model-value": a.unhealthyTcpFailures,
|
|
3052
3044
|
readonly: a.readonly,
|
|
3053
3045
|
type: "number",
|
|
3054
3046
|
"onUpdate:modelValue": c[6] || (c[6] = (p) => h("update:unhealthy-tcp-failures", p))
|
|
3055
3047
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
3056
|
-
y.value ? B("", !0) : (
|
|
3048
|
+
y.value ? B("", !0) : (q(), E(t, {
|
|
3057
3049
|
key: 0,
|
|
3058
3050
|
autocomplete: "off",
|
|
3059
3051
|
class: "margin-top-6",
|
|
3060
3052
|
"data-testid": "passive-healthcheck-unhealthy-http-failures",
|
|
3061
3053
|
label: e(i)("upstreams.form.fields.http_failures.label"),
|
|
3062
|
-
max: e(
|
|
3063
|
-
min: e(
|
|
3054
|
+
max: e(be),
|
|
3055
|
+
min: e(ge),
|
|
3064
3056
|
"model-value": a.unhealthyHttpFailures,
|
|
3065
3057
|
readonly: a.readonly,
|
|
3066
3058
|
type: "number",
|
|
3067
3059
|
"onUpdate:modelValue": c[7] || (c[7] = (p) => h("update:unhealthy-http-failures", p))
|
|
3068
3060
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
3069
|
-
y.value ? B("", !0) : (
|
|
3061
|
+
y.value ? B("", !0) : (q(), E(V, {
|
|
3070
3062
|
key: 1,
|
|
3071
3063
|
autocomplete: "off",
|
|
3072
3064
|
class: "margin-top-6 passive-healthcheck-unhealthy-http-statuses",
|
|
3073
3065
|
"data-testid": "passive-healthcheck-unhealthy-http-statuses",
|
|
3074
3066
|
"enable-item-creation": "",
|
|
3075
|
-
items: e(
|
|
3067
|
+
items: e(Te),
|
|
3076
3068
|
label: e(i)("upstreams.form.fields.http_statuses.label"),
|
|
3077
3069
|
"model-value": a.unhealthyHttpStatuses,
|
|
3078
3070
|
readonly: a.readonly,
|
|
@@ -3107,40 +3099,40 @@ const pe = {
|
|
|
3107
3099
|
},
|
|
3108
3100
|
emits: ["update", "error", "loading"],
|
|
3109
3101
|
setup(a, { emit: D }) {
|
|
3110
|
-
var
|
|
3111
|
-
const i = a,
|
|
3102
|
+
var Y;
|
|
3103
|
+
const i = a, s = D, { inRange: h, stringToNumberArray: g, upstreamsResponseToFields: y, getDefaultUpstreamFields: j, objectsAreEqual: F, cloneDeep: l } = Ae(), { axiosInstance: c } = $e((Y = i.config) == null ? void 0 : Y.axiosRequestConfig), { getMessageFromError: C } = qt(), m = Tt(), t = qe({
|
|
3112
3104
|
fields: j(),
|
|
3113
3105
|
readonly: !1,
|
|
3114
3106
|
errorMessage: ""
|
|
3115
|
-
}), V =
|
|
3116
|
-
t.fields.activeHealthCheck.healthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.healthy.successes = d ? "5" : "0", t.fields.activeHealthCheck.healthy.httpStatuses = d ?
|
|
3107
|
+
}), V = qe(j()), w = U(() => !F(t.fields, V)), p = (d) => {
|
|
3108
|
+
t.fields.activeHealthCheck.healthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.healthy.successes = d ? "5" : "0", t.fields.activeHealthCheck.healthy.httpStatuses = d ? Fe : [], t.fields.activeHealthCheck.unhealthy.httpStatuses = d ? Oe : [], t.fields.activeHealthCheck.unhealthy.httpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.tcpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.timeouts = d ? "5" : "0", t.fields.activeHealthCheck.timeout = d ? "1" : "0", t.fields.activeHealthCheck.concurrency = d ? "10" : "0", t.fields.activeHealthCheck.httpPath = d ? "/" : "", t.fields.activeHealthCheck.httpsSni = "", t.fields.activeHealthCheck.type = "http";
|
|
3117
3109
|
}, S = (d) => {
|
|
3118
|
-
t.fields.passiveHealthCheck.healthy.successes = d ? "80" : "0", t.fields.passiveHealthCheck.healthy.httpStatuses = d ?
|
|
3119
|
-
},
|
|
3110
|
+
t.fields.passiveHealthCheck.healthy.successes = d ? "80" : "0", t.fields.passiveHealthCheck.healthy.httpStatuses = d ? xe : [], t.fields.passiveHealthCheck.unhealthy.timeouts = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.tcpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.httpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.httpStatuses = d ? Pe : [], t.fields.passiveHealthCheck.type = "http";
|
|
3111
|
+
}, G = U(() => t.fields.algorithm !== "sticky-sessions" ? !0 : !!t.fields.stickySessionsCookie && !!t.fields.stickySessionsCookiePath), N = U(() => t.fields.slots ? h(t.fields.slots, Ne, Be) : !0), X = U(() => t.fields.hashOn === "header" ? !!t.fields.hashOnHeader : !0), k = U(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookie : !0), T = U(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookiePath : !0), $ = U(() => t.fields.hashOn === "query_arg" ? !!t.fields.hashOnQueryArgument : !0), A = U(() => t.fields.hashOn === "uri_capture" ? !!t.fields.hashOnUriCapture : !0), _ = U(() => t.fields.hashFallback === "header" ? !!t.fields.hashFallbackHeader : !0), O = U(() => t.fields.hashFallback === "query_arg" ? !!t.fields.hashFallbackQueryArgument : !0), W = U(() => t.fields.hashFallback === "uri_capture" ? !!t.fields.hashFallbackUriCapture : !0), le = U(() => !!t.fields.name && G.value && N.value && X.value && k.value && T.value && $.value && A.value && _.value && O.value && W.value), z = U(() => i.upstreamId ? ue.Edit : ue.Create), re = U(() => {
|
|
3120
3112
|
var d, o;
|
|
3121
|
-
return (o =
|
|
3122
|
-
}),
|
|
3123
|
-
Object.assign(t.fields, y(d)), Object.assign(V,
|
|
3113
|
+
return (o = ve.form[(d = i.config) == null ? void 0 : d.app]) == null ? void 0 : o.edit;
|
|
3114
|
+
}), M = (d) => {
|
|
3115
|
+
Object.assign(t.fields, y(d)), Object.assign(V, l(t.fields));
|
|
3124
3116
|
}, K = () => {
|
|
3125
3117
|
var d;
|
|
3126
3118
|
m.push(((d = i.config) == null ? void 0 : d.cancelRoute) || { name: "upstreams-list" });
|
|
3127
3119
|
}, ee = (d) => {
|
|
3128
|
-
|
|
3120
|
+
s("loading", d);
|
|
3129
3121
|
}, se = (d) => {
|
|
3130
|
-
|
|
3131
|
-
}, ae =
|
|
3122
|
+
s("error", d);
|
|
3123
|
+
}, ae = U(() => {
|
|
3132
3124
|
const d = i.config.stickySessionsAvailable ? {
|
|
3133
3125
|
sticky_sessions_cookie: null,
|
|
3134
3126
|
sticky_sessions_cookie_path: null
|
|
3135
3127
|
} : {};
|
|
3136
3128
|
return t.fields.algorithm === "sticky-sessions" && (d.sticky_sessions_cookie = t.fields.stickySessionsCookie || null, d.sticky_sessions_cookie_path = t.fields.stickySessionsCookiePath || null), d;
|
|
3137
|
-
}), te =
|
|
3129
|
+
}), te = U(() => {
|
|
3138
3130
|
const d = {};
|
|
3139
3131
|
return t.fields.hashOn === "header" && (d.hash_on_header = t.fields.hashOnHeader), (t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie") && (d.hash_on_cookie = t.fields.hashOnCookie, d.hash_on_cookie_path = t.fields.hashOnCookiePath), t.fields.hashOn === "query_arg" && (d.hash_on_query_arg = t.fields.hashOnQueryArgument), t.fields.hashOn === "uri_capture" && (d.hash_on_uri_capture = t.fields.hashOnUriCapture), t.fields.hashFallback === "header" && (d.hash_fallback_header = t.fields.hashFallbackHeader), t.fields.hashFallback === "query_arg" && (d.hash_fallback_query_arg = t.fields.hashFallbackQueryArgument), t.fields.hashFallback === "uri_capture" && (d.hash_fallback_uri_capture = t.fields.hashFallbackUriCapture), d;
|
|
3140
|
-
}),
|
|
3132
|
+
}), H = U(() => {
|
|
3141
3133
|
var o, r, J;
|
|
3142
3134
|
if (!t.fields.activeHealthSwitch)
|
|
3143
|
-
return ((o = i.config) == null ? void 0 : o.app) === "kongManager" &&
|
|
3135
|
+
return ((o = i.config) == null ? void 0 : o.app) === "kongManager" && z.value === ue.Edit ? {
|
|
3144
3136
|
type: t.fields.activeHealthCheck.type,
|
|
3145
3137
|
headers: {},
|
|
3146
3138
|
healthy: {
|
|
@@ -3170,22 +3162,22 @@ const pe = {
|
|
|
3170
3162
|
};
|
|
3171
3163
|
if (t.fields.activeHealthCheck.type !== "tcp") {
|
|
3172
3164
|
d.http_path = t.fields.activeHealthCheck.httpPath || "/", d.unhealthy.http_failures = Number(t.fields.activeHealthCheck.unhealthy.httpFailures || "5");
|
|
3173
|
-
const
|
|
3174
|
-
d.unhealthy.http_statuses =
|
|
3175
|
-
const ie = (J = t.fields.activeHealthCheck.healthy.httpStatuses) != null && J.length ? t.fields.activeHealthCheck.healthy.httpStatuses :
|
|
3176
|
-
d.healthy.http_statuses =
|
|
3165
|
+
const Z = (r = t.fields.activeHealthCheck.unhealthy.httpStatuses) != null && r.length ? t.fields.activeHealthCheck.unhealthy.httpStatuses : Oe;
|
|
3166
|
+
d.unhealthy.http_statuses = g(Z);
|
|
3167
|
+
const ie = (J = t.fields.activeHealthCheck.healthy.httpStatuses) != null && J.length ? t.fields.activeHealthCheck.healthy.httpStatuses : Fe;
|
|
3168
|
+
d.healthy.http_statuses = g(ie);
|
|
3177
3169
|
}
|
|
3178
|
-
return ["https", "grpcs"].includes(t.fields.activeHealthCheck.type) && (d.https_sni = t.fields.activeHealthCheck.httpsSni || null, d.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), d.headers = t.fields.activeHealthCheck.headers.reduce((
|
|
3170
|
+
return ["https", "grpcs"].includes(t.fields.activeHealthCheck.type) && (d.https_sni = t.fields.activeHealthCheck.httpsSni || null, d.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), d.headers = t.fields.activeHealthCheck.headers.reduce((Z, ie) => {
|
|
3179
3171
|
var fe, ye;
|
|
3180
3172
|
return ie.key ? {
|
|
3181
|
-
...
|
|
3173
|
+
...Z,
|
|
3182
3174
|
[ie.key]: (ye = (fe = ie.values.split(",")) == null ? void 0 : fe.map((Ue) => Ue.trim())) == null ? void 0 : ye.filter(Boolean)
|
|
3183
|
-
} :
|
|
3175
|
+
} : Z;
|
|
3184
3176
|
}, {}), d;
|
|
3185
|
-
}), L =
|
|
3177
|
+
}), L = U(() => {
|
|
3186
3178
|
var o, r, J;
|
|
3187
3179
|
if (!t.fields.passiveHealthSwitch)
|
|
3188
|
-
return ((o = i.config) == null ? void 0 : o.app) === "kongManager" &&
|
|
3180
|
+
return ((o = i.config) == null ? void 0 : o.app) === "kongManager" && z.value === ue.Edit ? {
|
|
3189
3181
|
type: t.fields.passiveHealthCheck.type,
|
|
3190
3182
|
healthy: { successes: 0 },
|
|
3191
3183
|
unhealthy: {
|
|
@@ -3206,13 +3198,13 @@ const pe = {
|
|
|
3206
3198
|
};
|
|
3207
3199
|
if (t.fields.passiveHealthCheck.type !== "tcp") {
|
|
3208
3200
|
d.unhealthy.http_failures = Number(t.fields.passiveHealthCheck.unhealthy.httpFailures || "5");
|
|
3209
|
-
const
|
|
3210
|
-
d.healthy.http_statuses =
|
|
3211
|
-
const ie = (J = t.fields.passiveHealthCheck.unhealthy.httpStatuses) != null && J.length ? t.fields.passiveHealthCheck.unhealthy.httpStatuses :
|
|
3212
|
-
d.unhealthy.http_statuses =
|
|
3201
|
+
const Z = (r = t.fields.passiveHealthCheck.healthy.httpStatuses) != null && r.length ? t.fields.passiveHealthCheck.healthy.httpStatuses : xe;
|
|
3202
|
+
d.healthy.http_statuses = g(Z);
|
|
3203
|
+
const ie = (J = t.fields.passiveHealthCheck.unhealthy.httpStatuses) != null && J.length ? t.fields.passiveHealthCheck.unhealthy.httpStatuses : Pe;
|
|
3204
|
+
d.unhealthy.http_statuses = g(ie);
|
|
3213
3205
|
}
|
|
3214
3206
|
return d;
|
|
3215
|
-
}),
|
|
3207
|
+
}), b = U(() => {
|
|
3216
3208
|
const d = {
|
|
3217
3209
|
name: t.fields.name,
|
|
3218
3210
|
slots: Number(t.fields.slots),
|
|
@@ -3224,7 +3216,7 @@ const pe = {
|
|
|
3224
3216
|
},
|
|
3225
3217
|
host_header: t.fields.hostHeader || null,
|
|
3226
3218
|
client_certificate: t.fields.clientCertificate ? { id: t.fields.clientCertificate } : null
|
|
3227
|
-
}, o =
|
|
3219
|
+
}, o = H.value, r = L.value, J = {
|
|
3228
3220
|
...d,
|
|
3229
3221
|
...ae.value,
|
|
3230
3222
|
healthchecks: {
|
|
@@ -3233,36 +3225,36 @@ const pe = {
|
|
|
3233
3225
|
passive: r || void 0
|
|
3234
3226
|
}
|
|
3235
3227
|
};
|
|
3236
|
-
return J.tags = t.fields.tags ? t.fields.tags.split(",").map((
|
|
3237
|
-
}),
|
|
3238
|
-
var r, J,
|
|
3239
|
-
let o = `${(r = i.config) == null ? void 0 : r.apiBaseUrl}${
|
|
3240
|
-
return ((
|
|
3228
|
+
return J.tags = t.fields.tags ? t.fields.tags.split(",").map((Z) => String(Z || "").trim()).filter((Z) => Z !== "") : [], Object.assign(J, te.value), J;
|
|
3229
|
+
}), I = (d) => {
|
|
3230
|
+
var r, J, Z, ie, fe, ye;
|
|
3231
|
+
let o = `${(r = i.config) == null ? void 0 : r.apiBaseUrl}${ve.form[(J = i.config) == null ? void 0 : J.app][d]}`;
|
|
3232
|
+
return ((Z = i.config) == null ? void 0 : Z.app) === "konnect" ? o = o.replace(/{controlPlaneId}/gi, ((ie = i.config) == null ? void 0 : ie.controlPlaneId) || "") : ((fe = i.config) == null ? void 0 : fe.app) === "kongManager" && (o = o.replace(/\/{workspace}/gi, (ye = i.config) != null && ye.workspace ? `/${i.config.workspace}` : "")), o = o.replace(/{id}/gi, i.upstreamId), o;
|
|
3241
3233
|
}, x = async () => {
|
|
3242
3234
|
var d;
|
|
3243
3235
|
try {
|
|
3244
|
-
t.readonly = !0
|
|
3236
|
+
t.readonly = !0;
|
|
3245
3237
|
let o;
|
|
3246
|
-
|
|
3238
|
+
z.value === ue.Create ? o = await c.post(I("create"), b.value) : z.value === ue.Edit && (o = ((d = i.config) == null ? void 0 : d.app) === "konnect" ? await c.put(I("edit"), b.value) : await c.patch(I("edit"), b.value)), s("update", o == null ? void 0 : o.data);
|
|
3247
3239
|
} catch (o) {
|
|
3248
|
-
t.errorMessage = C(o),
|
|
3240
|
+
t.errorMessage = C(o), s("error", o);
|
|
3249
3241
|
} finally {
|
|
3250
3242
|
t.readonly = !1;
|
|
3251
3243
|
}
|
|
3252
3244
|
};
|
|
3253
|
-
return (d, o) => (
|
|
3245
|
+
return (d, o) => (q(), oe("div", Ra, [
|
|
3254
3246
|
u(e(wt), {
|
|
3255
|
-
"can-submit": le.value &&
|
|
3247
|
+
"can-submit": le.value && w.value,
|
|
3256
3248
|
config: a.config,
|
|
3257
3249
|
"edit-id": a.upstreamId,
|
|
3258
3250
|
"entity-type": e(Le).Upstream,
|
|
3259
3251
|
"error-message": t.errorMessage,
|
|
3260
3252
|
"fetch-url": re.value,
|
|
3261
|
-
"form-fields":
|
|
3253
|
+
"form-fields": b.value,
|
|
3262
3254
|
"is-readonly": t.readonly,
|
|
3263
3255
|
onCancel: K,
|
|
3264
3256
|
"onFetch:error": se,
|
|
3265
|
-
"onFetch:success":
|
|
3257
|
+
"onFetch:success": M,
|
|
3266
3258
|
onLoading: ee,
|
|
3267
3259
|
onSubmit: x
|
|
3268
3260
|
}, {
|
|
@@ -3326,7 +3318,7 @@ const pe = {
|
|
|
3326
3318
|
],
|
|
3327
3319
|
readonly: t.readonly
|
|
3328
3320
|
}, null, 8, ["active-health-switch", "healthchecks-threshold", "passive-health-switch", "readonly"]),
|
|
3329
|
-
t.fields.activeHealthSwitch ? (
|
|
3321
|
+
t.fields.activeHealthSwitch ? (q(), E(Aa, {
|
|
3330
3322
|
key: 0,
|
|
3331
3323
|
concurrency: t.fields.activeHealthCheck.concurrency,
|
|
3332
3324
|
"onUpdate:concurrency": o[21] || (o[21] = (r) => t.fields.activeHealthCheck.concurrency = r),
|
|
@@ -3361,7 +3353,7 @@ const pe = {
|
|
|
3361
3353
|
config: a.config,
|
|
3362
3354
|
readonly: t.readonly
|
|
3363
3355
|
}, null, 8, ["concurrency", "headers", "healthy-http-statuses", "healthy-interval", "healthy-successes", "http-path", "https-sni", "timeout", "type", "unhealthy-http-failures", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-tcp-failures", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) : B("", !0),
|
|
3364
|
-
t.fields.passiveHealthSwitch ? (
|
|
3356
|
+
t.fields.passiveHealthSwitch ? (q(), E(Ba, {
|
|
3365
3357
|
key: 1,
|
|
3366
3358
|
"healthy-http-statuses": t.fields.passiveHealthCheck.healthy.httpStatuses,
|
|
3367
3359
|
"onUpdate:healthyHttpStatuses": o[36] || (o[36] = (r) => t.fields.passiveHealthCheck.healthy.httpStatuses = r),
|
|
@@ -3384,7 +3376,7 @@ const pe = {
|
|
|
3384
3376
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
3385
3377
|
]));
|
|
3386
3378
|
}
|
|
3387
|
-
}), Ya = /* @__PURE__ */ me(Da, [["__scopeId", "data-v-
|
|
3379
|
+
}), Ya = /* @__PURE__ */ me(Da, [["__scopeId", "data-v-ee1ce06f"]]), La = { "data-testid": "client_certificate-plain-text" }, Za = /* @__PURE__ */ ne({
|
|
3388
3380
|
__name: "UpstreamsConfigCard",
|
|
3389
3381
|
props: {
|
|
3390
3382
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3411,7 +3403,7 @@ const pe = {
|
|
|
3411
3403
|
},
|
|
3412
3404
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
3413
3405
|
setup(a) {
|
|
3414
|
-
const D = a, { i18n: { t: i }, i18nT:
|
|
3406
|
+
const D = a, { i18n: { t: i }, i18nT: s } = pe.useI18n(), { getPropValue: h } = Kt(), g = U(() => ve.form[D.config.app].edit), y = R({
|
|
3415
3407
|
id: {},
|
|
3416
3408
|
name: {},
|
|
3417
3409
|
created_at: {},
|
|
@@ -3485,212 +3477,212 @@ const pe = {
|
|
|
3485
3477
|
tooltip: i("upstreams.form.hash_tooltips.client_certificate")
|
|
3486
3478
|
}
|
|
3487
3479
|
});
|
|
3488
|
-
return (j, F) => (
|
|
3480
|
+
return (j, F) => (q(), oe("div", null, [
|
|
3489
3481
|
u(e(Et), {
|
|
3490
3482
|
config: a.config,
|
|
3491
3483
|
"config-card-doc": a.configCardDoc,
|
|
3492
3484
|
"config-schema": y.value,
|
|
3493
3485
|
"entity-type": e(Le).Upstream,
|
|
3494
|
-
"fetch-url":
|
|
3486
|
+
"fetch-url": g.value,
|
|
3495
3487
|
"hide-title": a.hideTitle,
|
|
3496
|
-
"onFetch:error": F[0] || (F[0] = (
|
|
3497
|
-
"onFetch:success": F[1] || (F[1] = (
|
|
3498
|
-
onLoading: F[2] || (F[2] = (
|
|
3488
|
+
"onFetch:error": F[0] || (F[0] = (l) => j.$emit("fetch:error", l)),
|
|
3489
|
+
"onFetch:success": F[1] || (F[1] = (l) => j.$emit("fetch:success", l)),
|
|
3490
|
+
onLoading: F[2] || (F[2] = (l) => j.$emit("loading", l))
|
|
3499
3491
|
}, {
|
|
3500
3492
|
"name-label-tooltip": n(() => [
|
|
3501
|
-
u(e(
|
|
3493
|
+
u(e(s), {
|
|
3502
3494
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
3503
3495
|
scope: "global"
|
|
3504
3496
|
}, {
|
|
3505
3497
|
host: n(() => [
|
|
3506
|
-
|
|
3498
|
+
v("code", null, f(e(i)("upstreams.form.fields.name.host")), 1)
|
|
3507
3499
|
]),
|
|
3508
3500
|
_: 1
|
|
3509
3501
|
})
|
|
3510
3502
|
]),
|
|
3511
|
-
"hash_on-label-tooltip": n(({ row:
|
|
3512
|
-
u(e(
|
|
3503
|
+
"hash_on-label-tooltip": n(({ row: l }) => [
|
|
3504
|
+
u(e(s), {
|
|
3513
3505
|
keypath: "upstreams.form.fields.hash_on.tooltip",
|
|
3514
3506
|
scope: "global"
|
|
3515
3507
|
}, {
|
|
3516
3508
|
result: n(() => [
|
|
3517
|
-
|
|
3509
|
+
v("code", null, f(l.value), 1)
|
|
3518
3510
|
]),
|
|
3519
3511
|
_: 2
|
|
3520
3512
|
}, 1024)
|
|
3521
3513
|
]),
|
|
3522
3514
|
"hash_on_header-label-tooltip": n(() => [
|
|
3523
|
-
u(e(
|
|
3515
|
+
u(e(s), {
|
|
3524
3516
|
keypath: "upstreams.form.hash_tooltips.hash_on_header.text",
|
|
3525
3517
|
scope: "global"
|
|
3526
3518
|
}, {
|
|
3527
3519
|
hash_on: n(() => [
|
|
3528
|
-
|
|
3520
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_header.hash_on")), 1)
|
|
3529
3521
|
]),
|
|
3530
3522
|
header: n(() => [
|
|
3531
|
-
|
|
3523
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_header.header")), 1)
|
|
3532
3524
|
]),
|
|
3533
3525
|
_: 1
|
|
3534
3526
|
})
|
|
3535
3527
|
]),
|
|
3536
3528
|
"hash_on_uri_capture-label-tooltip": n(() => [
|
|
3537
|
-
u(e(
|
|
3529
|
+
u(e(s), {
|
|
3538
3530
|
keypath: "upstreams.form.hash_tooltips.hash_on_uri_capture.text",
|
|
3539
3531
|
scope: "global"
|
|
3540
3532
|
}, {
|
|
3541
3533
|
hash_on: n(() => [
|
|
3542
|
-
|
|
3534
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")), 1)
|
|
3543
3535
|
]),
|
|
3544
3536
|
uri_capture: n(() => [
|
|
3545
|
-
|
|
3537
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")), 1)
|
|
3546
3538
|
]),
|
|
3547
3539
|
_: 1
|
|
3548
3540
|
})
|
|
3549
3541
|
]),
|
|
3550
3542
|
"hash_on_query_arg-label-tooltip": n(() => [
|
|
3551
|
-
u(e(
|
|
3543
|
+
u(e(s), {
|
|
3552
3544
|
keypath: "upstreams.form.hash_tooltips.hash_on_query_arg.text",
|
|
3553
3545
|
scope: "global"
|
|
3554
3546
|
}, {
|
|
3555
3547
|
hash_on: n(() => [
|
|
3556
|
-
|
|
3548
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")), 1)
|
|
3557
3549
|
]),
|
|
3558
3550
|
query_arg: n(() => [
|
|
3559
|
-
|
|
3551
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")), 1)
|
|
3560
3552
|
]),
|
|
3561
3553
|
_: 1
|
|
3562
3554
|
})
|
|
3563
3555
|
]),
|
|
3564
3556
|
"hash_on_cookie-label-tooltip": n(() => [
|
|
3565
|
-
u(e(
|
|
3557
|
+
u(e(s), {
|
|
3566
3558
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie.text",
|
|
3567
3559
|
scope: "global"
|
|
3568
3560
|
}, {
|
|
3569
3561
|
hash_on: n(() => [
|
|
3570
|
-
|
|
3562
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")), 1)
|
|
3571
3563
|
]),
|
|
3572
3564
|
hash_fallback: n(() => [
|
|
3573
|
-
|
|
3565
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")), 1)
|
|
3574
3566
|
]),
|
|
3575
3567
|
cookie: n(() => [
|
|
3576
|
-
|
|
3568
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")), 1)
|
|
3577
3569
|
]),
|
|
3578
3570
|
_: 1
|
|
3579
3571
|
})
|
|
3580
3572
|
]),
|
|
3581
3573
|
"hash_on_cookie_path-label-tooltip": n(() => [
|
|
3582
|
-
u(e(
|
|
3574
|
+
u(e(s), {
|
|
3583
3575
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie_path.text",
|
|
3584
3576
|
scope: "global"
|
|
3585
3577
|
}, {
|
|
3586
3578
|
hash_on: n(() => [
|
|
3587
|
-
|
|
3579
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")), 1)
|
|
3588
3580
|
]),
|
|
3589
3581
|
hash_fallback: n(() => [
|
|
3590
|
-
|
|
3582
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")), 1)
|
|
3591
3583
|
]),
|
|
3592
3584
|
cookie: n(() => [
|
|
3593
|
-
|
|
3585
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")), 1)
|
|
3594
3586
|
]),
|
|
3595
3587
|
_: 1
|
|
3596
3588
|
})
|
|
3597
3589
|
]),
|
|
3598
3590
|
"slots-label-tooltip": n(() => [
|
|
3599
|
-
u(e(
|
|
3591
|
+
u(e(s), {
|
|
3600
3592
|
keypath: "upstreams.form.hash_tooltips.slots.text",
|
|
3601
3593
|
scope: "global"
|
|
3602
3594
|
}, {
|
|
3603
3595
|
algorithm: n(() => [
|
|
3604
|
-
|
|
3596
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.algorithm")), 1)
|
|
3605
3597
|
]),
|
|
3606
3598
|
round_robin: n(() => [
|
|
3607
|
-
|
|
3599
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.round_robin")), 1)
|
|
3608
3600
|
]),
|
|
3609
3601
|
consistent_hashing: n(() => [
|
|
3610
|
-
|
|
3602
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.consistent_hashing")), 1)
|
|
3611
3603
|
]),
|
|
3612
3604
|
min: n(() => F[3] || (F[3] = [
|
|
3613
|
-
|
|
3605
|
+
v("code", null, "10", -1)
|
|
3614
3606
|
])),
|
|
3615
3607
|
max: n(() => F[4] || (F[4] = [
|
|
3616
|
-
|
|
3608
|
+
v("code", null, "65536", -1)
|
|
3617
3609
|
])),
|
|
3618
3610
|
_: 1
|
|
3619
3611
|
})
|
|
3620
3612
|
]),
|
|
3621
3613
|
"hash_fallback-label-tooltip": n(() => [
|
|
3622
|
-
u(e(
|
|
3614
|
+
u(e(s), {
|
|
3623
3615
|
keypath: "upstreams.form.hash_tooltips.hash_fallback.text",
|
|
3624
3616
|
scope: "global"
|
|
3625
3617
|
}, {
|
|
3626
3618
|
hash_on: n(() => [
|
|
3627
|
-
|
|
3619
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback.hash_on")), 1)
|
|
3628
3620
|
]),
|
|
3629
3621
|
cookie: n(() => [
|
|
3630
|
-
|
|
3622
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback.cookie")), 1)
|
|
3631
3623
|
]),
|
|
3632
3624
|
_: 1
|
|
3633
3625
|
})
|
|
3634
3626
|
]),
|
|
3635
3627
|
"hash_fallback_header-label-tooltip": n(() => [
|
|
3636
|
-
u(e(
|
|
3628
|
+
u(e(s), {
|
|
3637
3629
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_header.text",
|
|
3638
3630
|
scope: "global"
|
|
3639
3631
|
}, {
|
|
3640
3632
|
hash_fallback: n(() => [
|
|
3641
|
-
|
|
3633
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")), 1)
|
|
3642
3634
|
]),
|
|
3643
3635
|
header: n(() => [
|
|
3644
|
-
|
|
3636
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_header.header")), 1)
|
|
3645
3637
|
]),
|
|
3646
3638
|
_: 1
|
|
3647
3639
|
})
|
|
3648
3640
|
]),
|
|
3649
3641
|
"hash_fallback_query_arg-label-tooltip": n(() => [
|
|
3650
|
-
u(e(
|
|
3642
|
+
u(e(s), {
|
|
3651
3643
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_query_arg.text",
|
|
3652
3644
|
scope: "global"
|
|
3653
3645
|
}, {
|
|
3654
3646
|
hash_fallback: n(() => [
|
|
3655
|
-
|
|
3647
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")), 1)
|
|
3656
3648
|
]),
|
|
3657
3649
|
query_arg: n(() => [
|
|
3658
|
-
|
|
3650
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")), 1)
|
|
3659
3651
|
]),
|
|
3660
3652
|
_: 1
|
|
3661
3653
|
})
|
|
3662
3654
|
]),
|
|
3663
3655
|
"hash_fallback_uri_capture-label-tooltip": n(() => [
|
|
3664
|
-
u(e(
|
|
3656
|
+
u(e(s), {
|
|
3665
3657
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",
|
|
3666
3658
|
scope: "global"
|
|
3667
3659
|
}, {
|
|
3668
3660
|
hash_fallback: n(() => [
|
|
3669
|
-
|
|
3661
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")), 1)
|
|
3670
3662
|
]),
|
|
3671
3663
|
uri_capture: n(() => [
|
|
3672
|
-
|
|
3664
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")), 1)
|
|
3673
3665
|
]),
|
|
3674
3666
|
_: 1
|
|
3675
3667
|
})
|
|
3676
3668
|
]),
|
|
3677
3669
|
"host_header-label-tooltip": n(() => [
|
|
3678
|
-
u(e(
|
|
3670
|
+
u(e(s), {
|
|
3679
3671
|
keypath: "upstreams.form.hash_tooltips.host_header.text",
|
|
3680
3672
|
scope: "global"
|
|
3681
3673
|
}, {
|
|
3682
3674
|
host: n(() => [
|
|
3683
|
-
|
|
3675
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.host_header.host")), 1)
|
|
3684
3676
|
]),
|
|
3685
3677
|
_: 1
|
|
3686
3678
|
})
|
|
3687
3679
|
]),
|
|
3688
|
-
client_certificate: n((
|
|
3680
|
+
client_certificate: n((l) => {
|
|
3689
3681
|
var c;
|
|
3690
3682
|
return [
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3683
|
+
v("div", null, [
|
|
3684
|
+
v("div", La, [
|
|
3685
|
+
v("span", null, f((c = e(h)("rowValue", l)) == null ? void 0 : c.id), 1)
|
|
3694
3686
|
])
|
|
3695
3687
|
])
|
|
3696
3688
|
];
|