@kong-ui-public/entities-upstreams-targets 3.5.58 → 3.5.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as V, defineComponent as se, computed as
|
|
1
|
+
import { ref as V, defineComponent as se, computed as F, watch as ce, onBeforeMount as Pe, resolveComponent as K, openBlock as x, createElementBlock as ae, createVNode as h, unref as e, withCtx as n, createBlock as R, Teleport as dt, createTextVNode as Q, toDisplayString as f, createElementVNode as v, reactive as Ie, renderSlot as pt, createCommentVNode as L, createSlots as xt, Fragment as Ue, renderList as Ot, normalizeClass as $t } from "vue";
|
|
2
2
|
import { useAxios as we, useFetcher as mt, useDeleteUrlBuilder as ft, FetcherStatus as yt, EntityBaseTable as gt, EntityFilter as Pt, PermissionsWrapper as ne, TableTags as vt, EntityDeleteModal as bt, EntityTypes as kt, useErrors as _t, EntityBaseFormType as oe, EntityBaseForm as Ct, SupportedEntityType as Me, useDebouncedFilter as ht, EntityFormSection as _e, useHelpers as Mt, ConfigurationSchemaSection as re, ConfigurationSchemaType as At, EntityBaseConfigCard as Kt } from "@kong-ui-public/entities-shared";
|
|
3
3
|
import { useRouter as Ht } from "vue-router";
|
|
4
4
|
import { AddIcon as Ae, TrashIcon as Vt } from "@kong/icons";
|
|
@@ -370,15 +370,15 @@ function jt() {
|
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
function ke(a) {
|
|
373
|
-
const { replaceId:
|
|
373
|
+
const { replaceId: N = !1 } = a, i = V([]);
|
|
374
374
|
return {
|
|
375
375
|
addedItems: i,
|
|
376
|
-
trackNewItems: (u,
|
|
377
|
-
if (
|
|
378
|
-
const
|
|
379
|
-
|
|
376
|
+
trackNewItems: (u, b) => {
|
|
377
|
+
if (b) {
|
|
378
|
+
const k = { ...u };
|
|
379
|
+
N && (k.value = u.label), i.value.push(k);
|
|
380
380
|
} else
|
|
381
|
-
i.value = i.value.filter((
|
|
381
|
+
i.value = i.value.filter((k) => k.value !== u.value);
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}
|
|
@@ -751,79 +751,79 @@ const qe = [
|
|
|
751
751
|
label: "599",
|
|
752
752
|
value: "599"
|
|
753
753
|
}
|
|
754
|
-
], Oe = 10, $e = 65536, Lt = 0, Qt = 65535, fe = 0, ye = 255, St = 0,
|
|
754
|
+
], Oe = 10, $e = 65536, Lt = 0, Qt = 65535, fe = 0, ye = 255, St = 0, It = 255, Wt = 0, Jt = 65535, ut = 0, ct = 65535, zt = 0, Gt = 2 ** 31, Ut = ["200", "302"], qt = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], wt = ["429", "404", "500", "501", "502", "503", "504", "505"], Ft = ["429", "500", "503"];
|
|
755
755
|
function Fe() {
|
|
756
|
-
const a = (
|
|
757
|
-
if (a(
|
|
758
|
-
const m = Number(
|
|
756
|
+
const a = (s) => /^\d+$/.test(s), N = (s, c, H) => {
|
|
757
|
+
if (a(s)) {
|
|
758
|
+
const m = Number(s);
|
|
759
759
|
return m >= c && m <= H;
|
|
760
760
|
} else
|
|
761
761
|
return !1;
|
|
762
|
-
}, i = (
|
|
763
|
-
var H, m, t,
|
|
762
|
+
}, i = (s) => s.map((c) => Number(c)), l = (s) => s.map((c) => c.toString()), u = (s) => {
|
|
763
|
+
var H, m, t, E, I, p, S, W, A, X, z, g, U, q, O, y, D, J, te, le, M, $, G, C, T, P, _, d, r, o, Y, j, Z, ee, ie, ve, be, de, Ke, Ve, Ne, Ee, Re, Be, De, je, Le, Qe, We, Je, ze, Ge, Xe, Ye, Ze, et, tt, at, lt, st, it, rt, ot, nt;
|
|
764
764
|
return {
|
|
765
|
-
name: (
|
|
766
|
-
hostHeader: (
|
|
767
|
-
clientCertificate: ((H =
|
|
768
|
-
tags: ((m =
|
|
769
|
-
algorithm: (
|
|
770
|
-
slots: ((t =
|
|
771
|
-
hashOn: (
|
|
772
|
-
hashFallback: (
|
|
773
|
-
hashOnHeader: (
|
|
774
|
-
hashOnCookie: (
|
|
775
|
-
hashOnCookiePath: (
|
|
776
|
-
hashOnQueryArgument: (
|
|
777
|
-
hashOnUriCapture: (
|
|
778
|
-
hashFallbackHeader: (
|
|
779
|
-
hashFallbackQueryArgument: (
|
|
780
|
-
hashFallbackUriCapture: (
|
|
781
|
-
activeHealthSwitch:
|
|
782
|
-
passiveHealthSwitch:
|
|
783
|
-
healthchecksThreshold: ((y =
|
|
765
|
+
name: (s == null ? void 0 : s.name) || "",
|
|
766
|
+
hostHeader: (s == null ? void 0 : s.host_header) || "",
|
|
767
|
+
clientCertificate: ((H = s == null ? void 0 : s.client_certificate) == null ? void 0 : H.id) || "",
|
|
768
|
+
tags: ((m = s == null ? void 0 : s.tags) == null ? void 0 : m.join(", ")) || "",
|
|
769
|
+
algorithm: (s == null ? void 0 : s.algorithm) || "round-robin",
|
|
770
|
+
slots: ((t = s == null ? void 0 : s.slots) == null ? void 0 : t.toString()) || "10000",
|
|
771
|
+
hashOn: (s == null ? void 0 : s.hash_on) || "none",
|
|
772
|
+
hashFallback: (s == null ? void 0 : s.hash_fallback) || "none",
|
|
773
|
+
hashOnHeader: (s == null ? void 0 : s.hash_on_header) || "",
|
|
774
|
+
hashOnCookie: (s == null ? void 0 : s.hash_on_cookie) || "",
|
|
775
|
+
hashOnCookiePath: (s == null ? void 0 : s.hash_on_cookie_path) || "/",
|
|
776
|
+
hashOnQueryArgument: (s == null ? void 0 : s.hash_on_query_arg) || "",
|
|
777
|
+
hashOnUriCapture: (s == null ? void 0 : s.hash_on_uri_capture) || "",
|
|
778
|
+
hashFallbackHeader: (s == null ? void 0 : s.hash_fallback_header) || "",
|
|
779
|
+
hashFallbackQueryArgument: (s == null ? void 0 : s.hash_fallback_query_arg) || "",
|
|
780
|
+
hashFallbackUriCapture: (s == null ? void 0 : s.hash_fallback_uri_capture) || "",
|
|
781
|
+
activeHealthSwitch: s ? ((I = (E = s.healthchecks.active) == null ? void 0 : E.healthy) == null ? void 0 : I.interval) !== 0 || ((S = (p = s.healthchecks.active) == null ? void 0 : p.unhealthy) == null ? void 0 : S.interval) !== 0 : !1,
|
|
782
|
+
passiveHealthSwitch: s ? ((A = (W = s.healthchecks.passive) == null ? void 0 : W.healthy) == null ? void 0 : A.successes) !== 0 || ((z = (X = s.healthchecks.passive) == null ? void 0 : X.unhealthy) == null ? void 0 : z.timeouts) !== 0 || ((U = (g = s.healthchecks.passive) == null ? void 0 : g.unhealthy) == null ? void 0 : U.tcp_failures) !== 0 || ((O = (q = s.healthchecks.passive) == null ? void 0 : q.unhealthy) == null ? void 0 : O.http_failures) !== 0 : !1,
|
|
783
|
+
healthchecksThreshold: ((y = s == null ? void 0 : s.healthchecks.threshold) == null ? void 0 : y.toString()) || "0",
|
|
784
784
|
activeHealthCheck: {
|
|
785
|
-
type: ((D =
|
|
786
|
-
httpPath: ((J =
|
|
787
|
-
timeout: ((le = (te =
|
|
788
|
-
concurrency: (($ = (M =
|
|
789
|
-
httpsSni: ((G =
|
|
790
|
-
verifySsl: ((C =
|
|
791
|
-
headers: (T =
|
|
792
|
-
interval: ((d = (_ = (P =
|
|
793
|
-
successes: ((Y = (o = (r =
|
|
794
|
-
httpStatuses: (Z = (j =
|
|
795
|
-
unhealthyInterval: ((ve = (ie = (ee =
|
|
796
|
-
httpFailures: ((Ke = (de = (be =
|
|
797
|
-
tcpFailures: ((Ee = (Ne = (Ve =
|
|
798
|
-
unhealthyHttpStatuses: (Be = (Re =
|
|
799
|
-
unhealthyTimeouts: ((Le = (je = (De =
|
|
785
|
+
type: ((D = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : D.type) || "http",
|
|
786
|
+
httpPath: ((J = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : J.http_path) || "/",
|
|
787
|
+
timeout: ((le = (te = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : te.timeout) == null ? void 0 : le.toString()) || "1",
|
|
788
|
+
concurrency: (($ = (M = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : M.concurrency) == null ? void 0 : $.toString()) || "10",
|
|
789
|
+
httpsSni: ((G = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : G.https_sni) || "",
|
|
790
|
+
verifySsl: ((C = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : C.https_verify_certificate) || !1,
|
|
791
|
+
headers: (T = s == null ? void 0 : s.healthchecks.active) != null && T.headers && Object.entries(s.healthchecks.active.headers).length > 0 ? Object.entries(s.healthchecks.active.headers).map(([Tt, xe]) => ({ key: Tt, values: xe == null ? void 0 : xe.join(", ") })) : [{ key: "", values: "" }],
|
|
792
|
+
interval: ((d = (_ = (P = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : P.healthy) == null ? void 0 : _.interval) == null ? void 0 : d.toString()) || "0",
|
|
793
|
+
successes: ((Y = (o = (r = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : r.healthy) == null ? void 0 : o.successes) == null ? void 0 : Y.toString()) || "5",
|
|
794
|
+
httpStatuses: (Z = (j = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : j.healthy) != null && Z.http_statuses ? l(s.healthchecks.active.healthy.http_statuses) : Ut,
|
|
795
|
+
unhealthyInterval: ((ve = (ie = (ee = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : ee.unhealthy) == null ? void 0 : ie.interval) == null ? void 0 : ve.toString()) || "0",
|
|
796
|
+
httpFailures: ((Ke = (de = (be = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : be.unhealthy) == null ? void 0 : de.http_failures) == null ? void 0 : Ke.toString()) || "5",
|
|
797
|
+
tcpFailures: ((Ee = (Ne = (Ve = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : Ve.unhealthy) == null ? void 0 : Ne.tcp_failures) == null ? void 0 : Ee.toString()) || "5",
|
|
798
|
+
unhealthyHttpStatuses: (Be = (Re = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : Re.unhealthy) != null && Be.http_statuses ? l(s.healthchecks.active.unhealthy.http_statuses) : wt,
|
|
799
|
+
unhealthyTimeouts: ((Le = (je = (De = s == null ? void 0 : s.healthchecks.active) == null ? void 0 : De.unhealthy) == null ? void 0 : je.timeouts) == null ? void 0 : Le.toString()) || "0"
|
|
800
800
|
},
|
|
801
801
|
passiveHealthCheck: {
|
|
802
|
-
type: ((Qe =
|
|
803
|
-
successes: ((ze = (Je = (We =
|
|
804
|
-
httpStatuses: (Xe = (Ge =
|
|
805
|
-
timeouts: ((et = (Ze = (Ye =
|
|
806
|
-
httpFailures: ((lt = (at = (tt =
|
|
807
|
-
tcpFailures: ((rt = (it = (st =
|
|
808
|
-
unhealthyHttpStatuses: (nt = (ot =
|
|
802
|
+
type: ((Qe = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : Qe.type) || "http",
|
|
803
|
+
successes: ((ze = (Je = (We = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : We.healthy) == null ? void 0 : Je.successes) == null ? void 0 : ze.toString()) || "0",
|
|
804
|
+
httpStatuses: (Xe = (Ge = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : Ge.healthy) != null && Xe.http_statuses ? l(s.healthchecks.passive.healthy.http_statuses) : qt,
|
|
805
|
+
timeouts: ((et = (Ze = (Ye = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : Ye.unhealthy) == null ? void 0 : Ze.timeouts) == null ? void 0 : et.toString()) || "0",
|
|
806
|
+
httpFailures: ((lt = (at = (tt = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : tt.unhealthy) == null ? void 0 : at.http_failures) == null ? void 0 : lt.toString()) || "5",
|
|
807
|
+
tcpFailures: ((rt = (it = (st = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : st.unhealthy) == null ? void 0 : it.tcp_failures) == null ? void 0 : rt.toString()) || "5",
|
|
808
|
+
unhealthyHttpStatuses: (nt = (ot = s == null ? void 0 : s.healthchecks.passive) == null ? void 0 : ot.unhealthy) != null && nt.http_statuses ? l(s.healthchecks.passive.unhealthy.http_statuses) : Ft
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
};
|
|
812
812
|
return {
|
|
813
813
|
isInteger: a,
|
|
814
|
-
inRange:
|
|
814
|
+
inRange: N,
|
|
815
815
|
stringToNumberArray: i,
|
|
816
|
-
numberToStringArray:
|
|
817
|
-
upstreamsResponseToFields: (
|
|
816
|
+
numberToStringArray: l,
|
|
817
|
+
upstreamsResponseToFields: (s) => u(s),
|
|
818
818
|
getDefaultUpstreamFields: () => u(),
|
|
819
|
-
objectsAreEqual: (
|
|
819
|
+
objectsAreEqual: (s, c) => {
|
|
820
820
|
try {
|
|
821
|
-
return JSON.stringify(
|
|
821
|
+
return JSON.stringify(s) === JSON.stringify(c);
|
|
822
822
|
} catch {
|
|
823
823
|
return !1;
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
|
-
cloneDeep: (
|
|
826
|
+
cloneDeep: (s) => JSON.parse(JSON.stringify(s))
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
829
|
const he = {
|
|
@@ -896,34 +896,38 @@ const he = {
|
|
|
896
896
|
}
|
|
897
897
|
},
|
|
898
898
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
899
|
-
setup(a, { emit:
|
|
899
|
+
setup(a, { emit: N }) {
|
|
900
900
|
var G;
|
|
901
|
-
const i =
|
|
901
|
+
const i = N, l = a, { i18n: { t: u } } = he.useI18n(), b = Ht(), { axiosInstance: k } = we((G = l.config) == null ? void 0 : G.axiosRequestConfig), B = F(() => l.config.app !== "kongManager" || !!l.config.disableSorting), w = {
|
|
902
902
|
// the Name column is non-hidable
|
|
903
903
|
name: { label: u("upstreams.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
904
904
|
slots: { label: u("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
905
905
|
tags: { label: u("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
906
|
-
},
|
|
906
|
+
}, s = w, c = F(() => {
|
|
907
907
|
var T, P;
|
|
908
|
-
let C = `${
|
|
909
|
-
return
|
|
910
|
-
}),
|
|
911
|
-
const C =
|
|
908
|
+
let C = `${l.config.apiBaseUrl}${ge.list[l.config.app]}`;
|
|
909
|
+
return l.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((T = l.config) == null ? void 0 : T.controlPlaneId) || "") : l.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (P = l.config) != null && P.workspace ? `/${l.config.workspace}` : "")), C;
|
|
910
|
+
}), H = V(""), m = F(() => {
|
|
911
|
+
const C = l.config.app === "konnect" || l.config.isExactMatch;
|
|
912
912
|
if (C)
|
|
913
913
|
return {
|
|
914
914
|
isExactMatch: C,
|
|
915
915
|
placeholder: u("upstreams.search.placeholder")
|
|
916
916
|
};
|
|
917
|
-
const { name: T, slots: P } =
|
|
917
|
+
const { name: T, slots: P } = w;
|
|
918
918
|
return {
|
|
919
919
|
isExactMatch: C,
|
|
920
920
|
fields: { name: T, slots: P },
|
|
921
|
-
schema:
|
|
921
|
+
schema: l.config.filterSchema
|
|
922
922
|
};
|
|
923
|
-
}), {
|
|
924
|
-
|
|
923
|
+
}), {
|
|
924
|
+
fetcher: t,
|
|
925
|
+
fetcherState: E,
|
|
926
|
+
fetcherCacheKey: I
|
|
927
|
+
} = mt({ ...l.config, cacheIdentifier: l.cacheIdentifier }, c.value), p = () => {
|
|
928
|
+
H.value = "";
|
|
925
929
|
}, S = () => {
|
|
926
|
-
|
|
930
|
+
I.value++;
|
|
927
931
|
}, W = V(null), A = (C, T) => {
|
|
928
932
|
const P = C.id;
|
|
929
933
|
if (!T(P)) {
|
|
@@ -954,23 +958,23 @@ const he = {
|
|
|
954
958
|
});
|
|
955
959
|
}, z = async (C) => {
|
|
956
960
|
var P;
|
|
957
|
-
await ((P =
|
|
958
|
-
},
|
|
961
|
+
await ((P = l.canRetrieve) == null ? void 0 : P.call(l, C)) && b.push(l.config.getViewRoute(C.id));
|
|
962
|
+
}, g = (C) => ({
|
|
959
963
|
label: u("upstreams.actions.view"),
|
|
960
|
-
to:
|
|
964
|
+
to: l.config.getViewRoute(C)
|
|
961
965
|
}), U = (C) => ({
|
|
962
966
|
label: u("upstreams.actions.edit"),
|
|
963
|
-
to:
|
|
964
|
-
}),
|
|
965
|
-
|
|
967
|
+
to: l.config.getEditRoute(C)
|
|
968
|
+
}), q = V(void 0), O = V(!1), y = V(!1), D = V(""), J = ft(l.config, c.value), te = (C) => {
|
|
969
|
+
q.value = C, O.value = !0;
|
|
966
970
|
}, le = () => {
|
|
967
971
|
O.value = !1;
|
|
968
972
|
}, M = async () => {
|
|
969
973
|
var C, T, P;
|
|
970
|
-
if ((C =
|
|
974
|
+
if ((C = q.value) != null && C.id) {
|
|
971
975
|
y.value = !0;
|
|
972
976
|
try {
|
|
973
|
-
await
|
|
977
|
+
await k.delete(J(q.value.id)), y.value = !1, O.value = !1, I.value++, i("delete:success", q.value);
|
|
974
978
|
} catch (_) {
|
|
975
979
|
D.value = ((P = (T = _.response) == null ? void 0 : T.data) == null ? void 0 : P.message) || _.message || u("upstreams.errors.delete"), i("error", _);
|
|
976
980
|
} finally {
|
|
@@ -978,7 +982,7 @@ const he = {
|
|
|
978
982
|
}
|
|
979
983
|
}
|
|
980
984
|
};
|
|
981
|
-
ce(
|
|
985
|
+
ce(E, (C) => {
|
|
982
986
|
var T, P, _;
|
|
983
987
|
if (C.status === yt.Error) {
|
|
984
988
|
W.value = {
|
|
@@ -989,41 +993,41 @@ const he = {
|
|
|
989
993
|
W.value = null;
|
|
990
994
|
});
|
|
991
995
|
const $ = V({
|
|
992
|
-
ctaPath:
|
|
996
|
+
ctaPath: l.config.createRoute,
|
|
993
997
|
ctaText: void 0,
|
|
994
|
-
message: `${u("upstreams.list.empty_state.description")}${
|
|
998
|
+
message: `${u("upstreams.list.empty_state.description")}${l.config.additionMessageForEmptyState ? ` ${l.config.additionMessageForEmptyState}` : ""}`,
|
|
995
999
|
title: u("upstreams.title")
|
|
996
1000
|
});
|
|
997
1001
|
return Pe(async () => {
|
|
998
|
-
await
|
|
1002
|
+
await l.canCreate() && ($.value.title = u("upstreams.list.empty_state.title"), $.value.ctaText = u("upstreams.actions.create"));
|
|
999
1003
|
}), (C, T) => {
|
|
1000
1004
|
const P = K("KButton"), _ = K("KDropdownItem"), d = K("KClipboardProvider");
|
|
1001
1005
|
return x(), ae("div", Xt, [
|
|
1002
1006
|
h(e(gt), {
|
|
1003
1007
|
"cache-identifier": a.cacheIdentifier,
|
|
1004
|
-
"disable-sorting":
|
|
1008
|
+
"disable-sorting": B.value,
|
|
1005
1009
|
"empty-state-options": $.value,
|
|
1006
1010
|
"enable-entity-actions": "",
|
|
1007
1011
|
"error-message": W.value,
|
|
1008
|
-
fetcher: e(
|
|
1009
|
-
"fetcher-cache-key":
|
|
1012
|
+
fetcher: e(t),
|
|
1013
|
+
"fetcher-cache-key": e(I),
|
|
1010
1014
|
"pagination-type": "offset",
|
|
1011
1015
|
"preferences-storage-key": "kong-ui-entities-upstreams-list",
|
|
1012
|
-
query:
|
|
1013
|
-
"table-headers": e(
|
|
1016
|
+
query: H.value,
|
|
1017
|
+
"table-headers": e(s),
|
|
1014
1018
|
onClearSearchInput: p,
|
|
1015
1019
|
"onClick:row": T[1] || (T[1] = (r) => z(r)),
|
|
1016
1020
|
onSort: S
|
|
1017
1021
|
}, {
|
|
1018
1022
|
"toolbar-filter": n(() => [
|
|
1019
1023
|
h(e(Pt), {
|
|
1020
|
-
modelValue:
|
|
1021
|
-
"onUpdate:modelValue": T[0] || (T[0] = (r) =>
|
|
1022
|
-
config:
|
|
1024
|
+
modelValue: H.value,
|
|
1025
|
+
"onUpdate:modelValue": T[0] || (T[0] = (r) => H.value = r),
|
|
1026
|
+
config: m.value
|
|
1023
1027
|
}, null, 8, ["modelValue", "config"])
|
|
1024
1028
|
]),
|
|
1025
1029
|
"toolbar-button": n(() => [
|
|
1026
|
-
(x(),
|
|
1030
|
+
(x(), R(dt, {
|
|
1027
1031
|
disabled: !a.useActionOutside,
|
|
1028
1032
|
to: "#kong-ui-app-page-header-action-button"
|
|
1029
1033
|
}, [
|
|
@@ -1049,7 +1053,7 @@ const he = {
|
|
|
1049
1053
|
], 8, ["disabled"]))
|
|
1050
1054
|
]),
|
|
1051
1055
|
name: n(({ rowValue: r }) => [
|
|
1052
|
-
|
|
1056
|
+
v("span", Yt, f(r), 1)
|
|
1053
1057
|
]),
|
|
1054
1058
|
tags: n(({ rowValue: r }) => [
|
|
1055
1059
|
h(e(vt), {
|
|
@@ -1093,7 +1097,7 @@ const he = {
|
|
|
1093
1097
|
h(_, {
|
|
1094
1098
|
"data-testid": "action-entity-view",
|
|
1095
1099
|
"has-divider": "",
|
|
1096
|
-
item:
|
|
1100
|
+
item: g(r.id)
|
|
1097
1101
|
}, null, 8, ["item"])
|
|
1098
1102
|
]),
|
|
1099
1103
|
_: 2
|
|
@@ -1133,7 +1137,7 @@ const he = {
|
|
|
1133
1137
|
h(e(bt), {
|
|
1134
1138
|
"action-pending": y.value,
|
|
1135
1139
|
description: e(u)("upstreams.delete.description"),
|
|
1136
|
-
"entity-name":
|
|
1140
|
+
"entity-name": q.value && (q.value.name || q.value.id),
|
|
1137
1141
|
"entity-type": e(kt).Upstream,
|
|
1138
1142
|
error: D.value,
|
|
1139
1143
|
title: e(u)("upstreams.delete.title"),
|
|
@@ -1144,12 +1148,12 @@ const he = {
|
|
|
1144
1148
|
]);
|
|
1145
1149
|
};
|
|
1146
1150
|
}
|
|
1147
|
-
}), ue = (a,
|
|
1151
|
+
}), ue = (a, N) => {
|
|
1148
1152
|
const i = a.__vccOpts || a;
|
|
1149
|
-
for (const [
|
|
1150
|
-
i[
|
|
1153
|
+
for (const [l, u] of N)
|
|
1154
|
+
i[l] = u;
|
|
1151
1155
|
return i;
|
|
1152
|
-
}, La = /* @__PURE__ */ ue(Zt, [["__scopeId", "data-v-
|
|
1156
|
+
}, La = /* @__PURE__ */ ue(Zt, [["__scopeId", "data-v-cf46ca5f"]]), Ce = "/v2/control-planes/{controlPlaneId}/core-entities", He = "/{workspace}", Se = {
|
|
1153
1157
|
list: {
|
|
1154
1158
|
konnect: `${Ce}/upstreams/{upstreamId}/targets`,
|
|
1155
1159
|
kongManager: `${He}/upstreams/{upstreamId}/targets`
|
|
@@ -1192,12 +1196,12 @@ const he = {
|
|
|
1192
1196
|
}
|
|
1193
1197
|
},
|
|
1194
1198
|
emits: ["update", "error", "loading", "cancel"],
|
|
1195
|
-
setup(a, { emit:
|
|
1199
|
+
setup(a, { emit: N }) {
|
|
1196
1200
|
var z;
|
|
1197
|
-
const i =
|
|
1198
|
-
var
|
|
1199
|
-
return Se.form[
|
|
1200
|
-
}),
|
|
1201
|
+
const i = N, l = a, { i18n: { t: u } } = he.useI18n(), { getMessageFromError: b } = _t(), { axiosInstance: k } = we((z = l.config) == null ? void 0 : z.axiosRequestConfig), B = F(() => {
|
|
1202
|
+
var g;
|
|
1203
|
+
return Se.form[l.config.app].edit.replace(/{upstreamId}/gi, ((g = l.config) == null ? void 0 : g.upstreamId) || "");
|
|
1204
|
+
}), w = F(() => l.targetId ? oe.Edit : oe.Create), s = F(() => w.value === oe.Edit ? u("targets.form.edit.title") : u("targets.form.create.title")), c = Ie({
|
|
1201
1205
|
fields: {
|
|
1202
1206
|
target: "",
|
|
1203
1207
|
weight: 100,
|
|
@@ -1205,7 +1209,7 @@ const he = {
|
|
|
1205
1209
|
},
|
|
1206
1210
|
isReadonly: !1,
|
|
1207
1211
|
errorMessage: ""
|
|
1208
|
-
}), H =
|
|
1212
|
+
}), H = Ie({
|
|
1209
1213
|
target: "",
|
|
1210
1214
|
weight: 100,
|
|
1211
1215
|
tags: ""
|
|
@@ -1213,81 +1217,81 @@ const he = {
|
|
|
1213
1217
|
target: "",
|
|
1214
1218
|
weight: 100,
|
|
1215
1219
|
tags: ""
|
|
1216
|
-
}, t =
|
|
1217
|
-
const
|
|
1218
|
-
return
|
|
1219
|
-
}),
|
|
1220
|
+
}, t = F(() => {
|
|
1221
|
+
const g = parseInt(c.fields.weight.toString(), 10);
|
|
1222
|
+
return g < 0 || g > 65535;
|
|
1223
|
+
}), E = F(
|
|
1220
1224
|
() => JSON.stringify(c.fields) !== JSON.stringify(H) && !!c.fields.target && !!c.fields.weight && !t.value
|
|
1221
|
-
),
|
|
1225
|
+
), I = (g) => {
|
|
1222
1226
|
var U;
|
|
1223
|
-
c.fields.target = (
|
|
1227
|
+
c.fields.target = (g == null ? void 0 : g.target) || "", c.fields.weight = (g == null ? void 0 : g.weight) ?? "", c.fields.tags = ((U = g == null ? void 0 : g.tags) == null ? void 0 : U.join(", ")) || "", Object.assign(H, c.fields);
|
|
1224
1228
|
}, p = () => {
|
|
1225
1229
|
c.errorMessage = "", i("cancel");
|
|
1226
|
-
}, S =
|
|
1227
|
-
var U,
|
|
1228
|
-
let
|
|
1229
|
-
return
|
|
1230
|
-
}), W =
|
|
1231
|
-
var U,
|
|
1232
|
-
let
|
|
1233
|
-
return
|
|
1234
|
-
}), A =
|
|
1235
|
-
var
|
|
1230
|
+
}, S = F(() => {
|
|
1231
|
+
var U, q;
|
|
1232
|
+
let g = `${l.config.apiBaseUrl}${Se.form[l.config.app].validate}`;
|
|
1233
|
+
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((U = l.config) == null ? void 0 : U.controlPlaneId) || "") : l.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (q = l.config) != null && q.workspace ? `/${l.config.workspace}` : "")), g = g.replace(/{id}/gi, l.targetId), g;
|
|
1234
|
+
}), W = F(() => {
|
|
1235
|
+
var U, q, O, y;
|
|
1236
|
+
let g = `${l.config.apiBaseUrl}${Se.form[l.config.app][w.value]}`;
|
|
1237
|
+
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((U = l.config) == null ? void 0 : U.controlPlaneId) || "").replace(/{upstreamId}/gi, ((q = l.config) == null ? void 0 : q.upstreamId) || "") : l.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (O = l.config) != null && O.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((y = l.config) == null ? void 0 : y.upstreamId) || "")), g = g.replace(/{id}/gi, l.targetId), g;
|
|
1238
|
+
}), A = F(() => {
|
|
1239
|
+
var g, U, q;
|
|
1236
1240
|
return {
|
|
1237
1241
|
target: c.fields.target,
|
|
1238
1242
|
weight: parseInt(c.fields.weight),
|
|
1239
|
-
tags: (
|
|
1240
|
-
upstream: { id:
|
|
1243
|
+
tags: (q = (U = (g = c.fields.tags) == null ? void 0 : g.split(",")) == null ? void 0 : U.map((O) => String(O || "").trim())) == null ? void 0 : q.filter((O) => O !== ""),
|
|
1244
|
+
upstream: { id: l.config.upstreamId }
|
|
1241
1245
|
};
|
|
1242
1246
|
}), X = async () => {
|
|
1243
|
-
var
|
|
1247
|
+
var g, U;
|
|
1244
1248
|
try {
|
|
1245
1249
|
c.isReadonly = !0, c.errorMessage = "";
|
|
1246
|
-
let
|
|
1247
|
-
if (await
|
|
1248
|
-
const { data: O } =
|
|
1250
|
+
let q;
|
|
1251
|
+
if (await k.post(S.value, A.value), w.value === "create" ? q = await k.post(W.value, A.value) : w.value === "edit" && (q = ((g = l.config) == null ? void 0 : g.app) === "konnect" ? await k.put(W.value, A.value) : await k.patch(W.value, A.value)), q) {
|
|
1252
|
+
const { data: O } = q;
|
|
1249
1253
|
c.fields.target = (O == null ? void 0 : O.name) || "", c.fields.weight = (O == null ? void 0 : O.weight) ?? 100, c.fields.tags = ((U = O == null ? void 0 : O.tags) == null ? void 0 : U.join(", ")) || "", i("update", O), Object.assign(c.fields, m);
|
|
1250
1254
|
}
|
|
1251
|
-
} catch (
|
|
1252
|
-
c.errorMessage =
|
|
1255
|
+
} catch (q) {
|
|
1256
|
+
c.errorMessage = b(q), i("error", q);
|
|
1253
1257
|
} finally {
|
|
1254
1258
|
c.isReadonly = !1;
|
|
1255
1259
|
}
|
|
1256
1260
|
};
|
|
1257
|
-
return ce(() =>
|
|
1261
|
+
return ce(() => l.targetId, () => {
|
|
1258
1262
|
Object.assign(c.fields, m);
|
|
1259
|
-
}), (
|
|
1260
|
-
const
|
|
1261
|
-
return x(),
|
|
1262
|
-
"action-button-disabled": !
|
|
1263
|
+
}), (g, U) => {
|
|
1264
|
+
const q = K("KInput"), O = K("KPrompt");
|
|
1265
|
+
return x(), R(O, {
|
|
1266
|
+
"action-button-disabled": !E.value || c.isReadonly,
|
|
1263
1267
|
"action-button-text": e(u)("targets.form.buttons.save"),
|
|
1264
1268
|
"cancel-button-text": e(u)("targets.form.buttons.cancel"),
|
|
1265
|
-
title:
|
|
1269
|
+
title: s.value,
|
|
1266
1270
|
visible: a.isVisible,
|
|
1267
1271
|
onCancel: p,
|
|
1268
1272
|
onProceed: X
|
|
1269
1273
|
}, {
|
|
1270
1274
|
default: n(() => [
|
|
1271
|
-
|
|
1275
|
+
v("div", ea, [
|
|
1272
1276
|
h(e(Ct), {
|
|
1273
1277
|
config: a.config,
|
|
1274
1278
|
"edit-id": a.targetId,
|
|
1275
1279
|
"entity-type": e(Me).Target,
|
|
1276
1280
|
"error-message": c.errorMessage,
|
|
1277
|
-
"fetch-url":
|
|
1281
|
+
"fetch-url": B.value,
|
|
1278
1282
|
"form-fields": A.value,
|
|
1279
1283
|
"is-readonly": c.isReadonly,
|
|
1280
1284
|
onCancel: p,
|
|
1281
|
-
"onFetch:error": U[3] || (U[3] = (y) =>
|
|
1282
|
-
"onFetch:success":
|
|
1283
|
-
onLoading: U[4] || (U[4] = (y) =>
|
|
1285
|
+
"onFetch:error": U[3] || (U[3] = (y) => g.$emit("error", y)),
|
|
1286
|
+
"onFetch:success": I,
|
|
1287
|
+
onLoading: U[4] || (U[4] = (y) => g.$emit("loading", y))
|
|
1284
1288
|
}, {
|
|
1285
1289
|
default: n(() => [
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
pt(
|
|
1290
|
+
v("div", ta, [
|
|
1291
|
+
g.$slots.info ? (x(), ae("div", aa, [
|
|
1292
|
+
pt(g.$slots, "info", {}, void 0, !0)
|
|
1289
1293
|
])) : L("", !0),
|
|
1290
|
-
h(
|
|
1294
|
+
h(q, {
|
|
1291
1295
|
modelValue: c.fields.target,
|
|
1292
1296
|
"onUpdate:modelValue": U[0] || (U[0] = (y) => c.fields.target = y),
|
|
1293
1297
|
modelModifiers: { trim: !0 },
|
|
@@ -1304,7 +1308,7 @@ const he = {
|
|
|
1304
1308
|
required: "",
|
|
1305
1309
|
type: "text"
|
|
1306
1310
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1307
|
-
h(
|
|
1311
|
+
h(q, {
|
|
1308
1312
|
modelValue: c.fields.weight,
|
|
1309
1313
|
"onUpdate:modelValue": U[1] || (U[1] = (y) => c.fields.weight = y),
|
|
1310
1314
|
autocomplete: "off",
|
|
@@ -1323,7 +1327,7 @@ const he = {
|
|
|
1323
1327
|
required: "",
|
|
1324
1328
|
type: "number"
|
|
1325
1329
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "readonly"]),
|
|
1326
|
-
h(
|
|
1330
|
+
h(q, {
|
|
1327
1331
|
modelValue: c.fields.tags,
|
|
1328
1332
|
"onUpdate:modelValue": U[2] || (U[2] = (y) => c.fields.tags = y),
|
|
1329
1333
|
modelModifiers: { trim: !0 },
|
|
@@ -1385,20 +1389,24 @@ const he = {
|
|
|
1385
1389
|
}
|
|
1386
1390
|
},
|
|
1387
1391
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
1388
|
-
setup(a, { emit:
|
|
1392
|
+
setup(a, { emit: N }) {
|
|
1389
1393
|
var P;
|
|
1390
|
-
const i =
|
|
1394
|
+
const i = N, l = a, { i18n: { t: u } } = he.useI18n(), { axiosInstance: b } = we((P = l.config) == null ? void 0 : P.axiosRequestConfig), k = F(() => l.config.app !== "kongManager" || !!l.config.disableSorting), w = {
|
|
1391
1395
|
// the Target Address column is non-hidable
|
|
1392
1396
|
target: { label: u("targets.list.table_headers.target_address"), sortable: !0, hidable: !1 },
|
|
1393
1397
|
weight: { label: u("targets.list.table_headers.weight"), sortable: !0 },
|
|
1394
1398
|
tags: { label: u("targets.list.table_headers.tags"), sortable: !1 }
|
|
1395
|
-
},
|
|
1399
|
+
}, s = F(() => {
|
|
1396
1400
|
var d, r, o, Y;
|
|
1397
|
-
let _ = `${
|
|
1398
|
-
return
|
|
1399
|
-
}), {
|
|
1400
|
-
|
|
1401
|
-
|
|
1401
|
+
let _ = `${l.config.apiBaseUrl}${Se.list[l.config.app]}`;
|
|
1402
|
+
return l.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((d = l.config) == null ? void 0 : d.controlPlaneId) || "").replace(/{upstreamId}/gi, ((r = l.config) == null ? void 0 : r.upstreamId) || "") : l.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (o = l.config) != null && o.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((Y = l.config) == null ? void 0 : Y.upstreamId) || "")), _;
|
|
1403
|
+
}), {
|
|
1404
|
+
fetcher: c,
|
|
1405
|
+
fetcherState: H,
|
|
1406
|
+
fetcherCacheKey: m
|
|
1407
|
+
} = mt({ ...l.config, cacheIdentifier: l.cacheIdentifier }, s.value), t = () => {
|
|
1408
|
+
m.value++;
|
|
1409
|
+
}, E = V(null), I = () => {
|
|
1402
1410
|
$.value = !0;
|
|
1403
1411
|
}, p = (_, d) => {
|
|
1404
1412
|
const r = _.id;
|
|
@@ -1430,62 +1438,62 @@ const he = {
|
|
|
1430
1438
|
});
|
|
1431
1439
|
}, W = (_) => {
|
|
1432
1440
|
M.value = _, $.value = !0;
|
|
1433
|
-
}, A = (_) =>
|
|
1434
|
-
z.value = _,
|
|
1441
|
+
}, A = (_) => l.config.app === "konnect" ? !1 : l.config.canMarkHealthy(_), X = (_) => l.config.app === "konnect" ? !1 : l.config.canMarkUnhealthy(_), z = V(void 0), g = V(!1), U = V(!1), q = V(""), O = ft(l.config, s.value), y = (_) => {
|
|
1442
|
+
z.value = _, g.value = !0;
|
|
1435
1443
|
}, D = () => {
|
|
1436
|
-
|
|
1444
|
+
g.value = !1;
|
|
1437
1445
|
}, J = async () => {
|
|
1438
1446
|
var _, d, r;
|
|
1439
1447
|
if ((_ = z.value) != null && _.id) {
|
|
1440
1448
|
U.value = !0;
|
|
1441
1449
|
try {
|
|
1442
|
-
await
|
|
1450
|
+
await b.delete(O(z.value.id)), U.value = !1, g.value = !1, m.value++, i("delete:success", z.value);
|
|
1443
1451
|
} catch (o) {
|
|
1444
|
-
|
|
1452
|
+
q.value = ((r = (d = o.response) == null ? void 0 : d.data) == null ? void 0 : r.message) || o.message || u("targets.errors.delete"), i("error", o);
|
|
1445
1453
|
} finally {
|
|
1446
1454
|
U.value = !1;
|
|
1447
1455
|
}
|
|
1448
1456
|
}
|
|
1449
1457
|
};
|
|
1450
|
-
ce(
|
|
1458
|
+
ce(H, (_) => {
|
|
1451
1459
|
var d, r, o;
|
|
1452
1460
|
if (_.status === yt.Error) {
|
|
1453
|
-
|
|
1461
|
+
E.value = {
|
|
1454
1462
|
title: u("targets.errors.general")
|
|
1455
|
-
}, (o = (r = (d = _.error) == null ? void 0 : d.response) == null ? void 0 : r.data) != null && o.message && (
|
|
1463
|
+
}, (o = (r = (d = _.error) == null ? void 0 : d.response) == null ? void 0 : r.data) != null && o.message && (E.value.message = _.error.response.data.message), i("error", _.error);
|
|
1456
1464
|
return;
|
|
1457
1465
|
}
|
|
1458
|
-
|
|
1466
|
+
E.value = null;
|
|
1459
1467
|
});
|
|
1460
1468
|
const te = V({
|
|
1461
1469
|
ctaText: void 0,
|
|
1462
|
-
message: `${u("targets.list.empty_state.description")}${
|
|
1470
|
+
message: `${u("targets.list.empty_state.description")}${l.config.additionMessageForEmptyState ? ` ${l.config.additionMessageForEmptyState}` : ""}`,
|
|
1463
1471
|
title: u("targets.title"),
|
|
1464
|
-
...
|
|
1472
|
+
...l.config.createRoute && {
|
|
1465
1473
|
// If `createRoute` provided in config, add a `ctaPath` to empty state CTA button so it becomes a link
|
|
1466
|
-
ctaPath:
|
|
1474
|
+
ctaPath: l.config.createRoute
|
|
1467
1475
|
}
|
|
1468
1476
|
});
|
|
1469
1477
|
Pe(async () => {
|
|
1470
|
-
await
|
|
1478
|
+
await l.canCreate() && (te.value.title = u("targets.list.empty_state.title"), te.value.ctaText = u("targets.actions.create"));
|
|
1471
1479
|
});
|
|
1472
|
-
const le =
|
|
1473
|
-
app:
|
|
1474
|
-
apiBaseUrl:
|
|
1475
|
-
upstreamId:
|
|
1476
|
-
axiosRequestConfig:
|
|
1480
|
+
const le = F(() => ({
|
|
1481
|
+
app: l.config.app,
|
|
1482
|
+
apiBaseUrl: l.config.apiBaseUrl,
|
|
1483
|
+
upstreamId: l.config.upstreamId,
|
|
1484
|
+
axiosRequestConfig: l.config.axiosRequestConfig,
|
|
1477
1485
|
// Depending on the app, we need to pass in the control plane ID or workspace
|
|
1478
1486
|
// see KonnectTargetFormConfig and KongManagerTargetFormConfig types
|
|
1479
|
-
...
|
|
1480
|
-
controlPlaneId:
|
|
1487
|
+
...l.config.app === "konnect" && {
|
|
1488
|
+
controlPlaneId: l.config.controlPlaneId
|
|
1481
1489
|
},
|
|
1482
|
-
...
|
|
1483
|
-
workspace:
|
|
1490
|
+
...l.config.app === "kongManager" && {
|
|
1491
|
+
workspace: l.config.workspace
|
|
1484
1492
|
}
|
|
1485
1493
|
})), M = V(""), $ = V(!1), G = (_) => {
|
|
1486
1494
|
M.value ? i("update:target", _) : i("create:target", _), C();
|
|
1487
1495
|
}, C = () => {
|
|
1488
|
-
T(),
|
|
1496
|
+
T(), m.value++;
|
|
1489
1497
|
}, T = () => {
|
|
1490
1498
|
$.value = !1, M.value = "";
|
|
1491
1499
|
};
|
|
@@ -1494,20 +1502,20 @@ const he = {
|
|
|
1494
1502
|
return x(), ae("div", ia, [
|
|
1495
1503
|
h(e(gt), {
|
|
1496
1504
|
"cache-identifier": a.cacheIdentifier,
|
|
1497
|
-
"disable-sorting":
|
|
1505
|
+
"disable-sorting": k.value,
|
|
1498
1506
|
"empty-state-options": te.value,
|
|
1499
1507
|
"enable-entity-actions": "",
|
|
1500
|
-
"error-message":
|
|
1501
|
-
fetcher: e(
|
|
1502
|
-
"fetcher-cache-key":
|
|
1508
|
+
"error-message": E.value,
|
|
1509
|
+
fetcher: e(c),
|
|
1510
|
+
"fetcher-cache-key": e(m),
|
|
1503
1511
|
"pagination-type": "offset",
|
|
1504
1512
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
1505
|
-
"table-headers": e(
|
|
1506
|
-
onEmptyStateCtaClicked: d[1] || (d[1] = () =>
|
|
1513
|
+
"table-headers": e(w),
|
|
1514
|
+
onEmptyStateCtaClicked: d[1] || (d[1] = () => l.config.createRoute ? void 0 : I()),
|
|
1507
1515
|
onSort: t
|
|
1508
1516
|
}, {
|
|
1509
1517
|
"toolbar-button": n(() => [
|
|
1510
|
-
(x(),
|
|
1518
|
+
(x(), R(dt, {
|
|
1511
1519
|
disabled: !a.useActionOutside,
|
|
1512
1520
|
to: "#kong-ui-app-page-header-action-button"
|
|
1513
1521
|
}, [
|
|
@@ -1519,8 +1527,8 @@ const he = {
|
|
|
1519
1527
|
appearance: "primary",
|
|
1520
1528
|
"data-testid": "toolbar-new-target",
|
|
1521
1529
|
size: a.useActionOutside ? "medium" : "large",
|
|
1522
|
-
to:
|
|
1523
|
-
onClick: d[0] || (d[0] = () =>
|
|
1530
|
+
to: l.config.createRoute ? l.config.createRoute : void 0,
|
|
1531
|
+
onClick: d[0] || (d[0] = () => l.config.createRoute ? void 0 : I())
|
|
1524
1532
|
}, {
|
|
1525
1533
|
default: n(() => [
|
|
1526
1534
|
h(e(Ae)),
|
|
@@ -1534,7 +1542,7 @@ const he = {
|
|
|
1534
1542
|
], 8, ["disabled"]))
|
|
1535
1543
|
]),
|
|
1536
1544
|
target: n(({ rowValue: j }) => [
|
|
1537
|
-
|
|
1545
|
+
v("span", ra, f(j), 1)
|
|
1538
1546
|
]),
|
|
1539
1547
|
tags: n(({ rowValue: j }) => [
|
|
1540
1548
|
h(e(vt), {
|
|
@@ -1645,10 +1653,10 @@ const he = {
|
|
|
1645
1653
|
"action-pending": U.value,
|
|
1646
1654
|
description: e(u)("targets.delete.description"),
|
|
1647
1655
|
"entity-type": e(kt).Target,
|
|
1648
|
-
error:
|
|
1656
|
+
error: q.value,
|
|
1649
1657
|
"need-confirm": !1,
|
|
1650
1658
|
title: e(u)("targets.delete.title"),
|
|
1651
|
-
visible:
|
|
1659
|
+
visible: g.value,
|
|
1652
1660
|
onCancel: D,
|
|
1653
1661
|
onProceed: J
|
|
1654
1662
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"]),
|
|
@@ -1670,7 +1678,7 @@ const he = {
|
|
|
1670
1678
|
]);
|
|
1671
1679
|
};
|
|
1672
1680
|
}
|
|
1673
|
-
}), Qa = /* @__PURE__ */ ue(oa, [["__scopeId", "data-v-
|
|
1681
|
+
}), Qa = /* @__PURE__ */ ue(oa, [["__scopeId", "data-v-4c844f80"]]), na = { key: 1 }, ha = /* @__PURE__ */ se({
|
|
1674
1682
|
__name: "UpstreamsFormGeneralInfo",
|
|
1675
1683
|
props: {
|
|
1676
1684
|
config: {
|
|
@@ -1700,13 +1708,13 @@ const he = {
|
|
|
1700
1708
|
}
|
|
1701
1709
|
},
|
|
1702
1710
|
emits: ["update:name", "update:host-header", "update:client-certificate", "update:tags"],
|
|
1703
|
-
setup(a, { emit:
|
|
1711
|
+
setup(a, { emit: N }) {
|
|
1704
1712
|
var D, J, te, le;
|
|
1705
|
-
const { i18nT: i, i18n: { t:
|
|
1706
|
-
debouncedQueryChange:
|
|
1707
|
-
loading:
|
|
1708
|
-
loadItems:
|
|
1709
|
-
results:
|
|
1713
|
+
const { i18nT: i, i18n: { t: l } } = he.useI18n(), u = a, b = N, {
|
|
1714
|
+
debouncedQueryChange: k,
|
|
1715
|
+
loading: B,
|
|
1716
|
+
loadItems: w,
|
|
1717
|
+
results: s,
|
|
1710
1718
|
allRecords: c
|
|
1711
1719
|
} = ht(u.config, (J = ge.form[(D = u.config) == null ? void 0 : D.app]) == null ? void 0 : J.getServices, "", {
|
|
1712
1720
|
fetchedItemsKey: "data",
|
|
@@ -1715,47 +1723,47 @@ const he = {
|
|
|
1715
1723
|
debouncedQueryChange: H,
|
|
1716
1724
|
loading: m,
|
|
1717
1725
|
loadItems: t,
|
|
1718
|
-
results:
|
|
1719
|
-
} = ht(u.config, (le = ge.form[(te = u.config) == null ? void 0 : te.app]) == null ? void 0 : le.getCertificates),
|
|
1726
|
+
results: E
|
|
1727
|
+
} = ht(u.config, (le = ge.form[(te = u.config) == null ? void 0 : te.app]) == null ? void 0 : le.getCertificates), I = V(""), p = F(() => {
|
|
1720
1728
|
var M;
|
|
1721
1729
|
return !!u.name && !((M = c.value) != null && M.some(($) => $.host === u.name));
|
|
1722
|
-
}), S =
|
|
1730
|
+
}), S = F(() => {
|
|
1723
1731
|
var $, G, C;
|
|
1724
|
-
const M = p.value && u.name.includes(($ =
|
|
1725
|
-
return (C =
|
|
1732
|
+
const M = p.value && u.name.includes(($ = I.value) == null ? void 0 : $.toLowerCase());
|
|
1733
|
+
return (C = s.value) == null ? void 0 : C.map((T) => ({ label: T.host, value: T.id })).concat(
|
|
1726
1734
|
M ? [{ label: u.name, value: ((G = X.value) == null ? void 0 : G.value) || u.name }] : []
|
|
1727
1735
|
);
|
|
1728
|
-
}), W =
|
|
1736
|
+
}), W = F(() => {
|
|
1729
1737
|
var M;
|
|
1730
|
-
return (M =
|
|
1731
|
-
}), A = V(""), X = V({ value: "", label: "" }), z =
|
|
1738
|
+
return (M = E.value) == null ? void 0 : M.map(($) => ({ label: $.id, value: $.id }));
|
|
1739
|
+
}), A = V(""), X = V({ value: "", label: "" }), z = F(() => {
|
|
1732
1740
|
var M, $;
|
|
1733
1741
|
return ((M = S.value.find((G) => G.value === A.value)) == null ? void 0 : M.label) || (($ = X.value) == null ? void 0 : $.label);
|
|
1734
|
-
}),
|
|
1735
|
-
|
|
1742
|
+
}), g = (M) => {
|
|
1743
|
+
I.value = M, k(M);
|
|
1736
1744
|
}, U = (M) => {
|
|
1737
1745
|
X.value = M;
|
|
1738
|
-
},
|
|
1746
|
+
}, q = () => {
|
|
1739
1747
|
X.value = { value: "", label: "" };
|
|
1740
1748
|
}, O = (M) => {
|
|
1741
|
-
A.value = M,
|
|
1749
|
+
A.value = M, b("update:name", z.value);
|
|
1742
1750
|
}, y = V(!1);
|
|
1743
1751
|
return Pe(async () => {
|
|
1744
1752
|
var M, $;
|
|
1745
1753
|
try {
|
|
1746
|
-
y.value = !0, await
|
|
1754
|
+
y.value = !0, await w(), u.name && (A.value = (($ = (M = S.value.find((G) => G.label === u.name)) == null ? void 0 : M.value) == null ? void 0 : $.toString()) || u.name), await t();
|
|
1747
1755
|
} finally {
|
|
1748
1756
|
y.value = !1;
|
|
1749
1757
|
}
|
|
1750
1758
|
}), (M, $) => {
|
|
1751
1759
|
const G = K("KSkeleton"), C = K("KSelect"), T = K("KInput");
|
|
1752
|
-
return x(),
|
|
1760
|
+
return x(), R(e(_e), {
|
|
1753
1761
|
class: "kong-ui-entities-upstreams-general-info",
|
|
1754
|
-
description: e(
|
|
1755
|
-
title: e(
|
|
1762
|
+
description: e(l)("upstreams.form.general_info.help"),
|
|
1763
|
+
title: e(l)("upstreams.form.general_info.title")
|
|
1756
1764
|
}, {
|
|
1757
1765
|
default: n(() => [
|
|
1758
|
-
y.value ? (x(),
|
|
1766
|
+
y.value ? (x(), R(G, {
|
|
1759
1767
|
key: 0,
|
|
1760
1768
|
type: "form"
|
|
1761
1769
|
})) : (x(), ae("div", na, [
|
|
@@ -1767,17 +1775,17 @@ const he = {
|
|
|
1767
1775
|
"enable-item-creation": "",
|
|
1768
1776
|
"filter-function": () => !0,
|
|
1769
1777
|
items: S.value,
|
|
1770
|
-
label: e(
|
|
1778
|
+
label: e(l)("upstreams.form.fields.name.label"),
|
|
1771
1779
|
"label-attributes": { tooltipAttributes: { "max-width": "400" } },
|
|
1772
|
-
loading: e(
|
|
1780
|
+
loading: e(B),
|
|
1773
1781
|
"model-value": A.value,
|
|
1774
|
-
placeholder: e(
|
|
1782
|
+
placeholder: e(l)("upstreams.form.fields.name.placeholder"),
|
|
1775
1783
|
readonly: a.readonly,
|
|
1776
1784
|
required: "",
|
|
1777
1785
|
width: "100%",
|
|
1778
1786
|
onItemAdded: U,
|
|
1779
|
-
onItemRemoved:
|
|
1780
|
-
onQueryChange:
|
|
1787
|
+
onItemRemoved: q,
|
|
1788
|
+
onQueryChange: g,
|
|
1781
1789
|
"onUpdate:modelValue": O
|
|
1782
1790
|
}, {
|
|
1783
1791
|
"label-tooltip": n(() => [
|
|
@@ -1786,7 +1794,7 @@ const he = {
|
|
|
1786
1794
|
scope: "global"
|
|
1787
1795
|
}, {
|
|
1788
1796
|
host: n(() => [
|
|
1789
|
-
|
|
1797
|
+
v("code", null, f(e(l)("upstreams.form.fields.name.host")), 1)
|
|
1790
1798
|
]),
|
|
1791
1799
|
_: 1
|
|
1792
1800
|
})
|
|
@@ -1797,11 +1805,11 @@ const he = {
|
|
|
1797
1805
|
autocomplete: "off",
|
|
1798
1806
|
class: "margin-bottom-6",
|
|
1799
1807
|
"data-testid": "upstreams-form-host-header",
|
|
1800
|
-
label: e(
|
|
1808
|
+
label: e(l)("upstreams.form.fields.host_header.label"),
|
|
1801
1809
|
"model-value": a.hostHeader,
|
|
1802
1810
|
readonly: a.readonly,
|
|
1803
1811
|
type: "text",
|
|
1804
|
-
"onUpdate:modelValue": $[0] || ($[0] = (P) =>
|
|
1812
|
+
"onUpdate:modelValue": $[0] || ($[0] = (P) => b("update:host-header", P))
|
|
1805
1813
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
1806
1814
|
h(C, {
|
|
1807
1815
|
class: "certificate-select margin-bottom-6",
|
|
@@ -1810,33 +1818,33 @@ const he = {
|
|
|
1810
1818
|
"enable-filtering": "",
|
|
1811
1819
|
"filter-function": () => !0,
|
|
1812
1820
|
items: W.value,
|
|
1813
|
-
label: e(
|
|
1821
|
+
label: e(l)("upstreams.form.fields.client_certificate.label"),
|
|
1814
1822
|
"label-attributes": {
|
|
1815
|
-
info: e(
|
|
1823
|
+
info: e(l)("upstreams.form.fields.client_certificate.tooltip"),
|
|
1816
1824
|
tooltipAttributes: { maxWidth: "400" }
|
|
1817
1825
|
},
|
|
1818
1826
|
loading: e(m),
|
|
1819
1827
|
"model-value": a.clientCertificate,
|
|
1820
|
-
placeholder: e(
|
|
1828
|
+
placeholder: e(l)("upstreams.form.fields.client_certificate.placeholder"),
|
|
1821
1829
|
readonly: a.readonly,
|
|
1822
1830
|
width: "100%",
|
|
1823
1831
|
onQueryChange: e(H),
|
|
1824
|
-
"onUpdate:modelValue": $[1] || ($[1] = (P) =>
|
|
1832
|
+
"onUpdate:modelValue": $[1] || ($[1] = (P) => b("update:client-certificate", P))
|
|
1825
1833
|
}, null, 8, ["items", "label", "label-attributes", "loading", "model-value", "placeholder", "readonly", "onQueryChange"]),
|
|
1826
1834
|
h(T, {
|
|
1827
1835
|
autocomplete: "off",
|
|
1828
1836
|
"data-testid": "upstreams-form-tags",
|
|
1829
|
-
help: e(
|
|
1830
|
-
label: e(
|
|
1837
|
+
help: e(l)("upstreams.form.fields.tags.help"),
|
|
1838
|
+
label: e(l)("upstreams.form.fields.tags.label"),
|
|
1831
1839
|
"label-attributes": {
|
|
1832
|
-
info: e(
|
|
1840
|
+
info: e(l)("upstreams.form.fields.tags.tooltip"),
|
|
1833
1841
|
tooltipAttributes: { maxWidth: "400" }
|
|
1834
1842
|
},
|
|
1835
1843
|
"model-value": a.tags,
|
|
1836
|
-
placeholder: e(
|
|
1844
|
+
placeholder: e(l)("upstreams.form.fields.tags.placeholder"),
|
|
1837
1845
|
readonly: a.readonly,
|
|
1838
1846
|
type: "text",
|
|
1839
|
-
"onUpdate:modelValue": $[2] || ($[2] = (P) =>
|
|
1847
|
+
"onUpdate:modelValue": $[2] || ($[2] = (P) => b("update:tags", P))
|
|
1840
1848
|
}, null, 8, ["help", "label", "label-attributes", "model-value", "placeholder", "readonly"])
|
|
1841
1849
|
]))
|
|
1842
1850
|
]),
|
|
@@ -1905,210 +1913,210 @@ const he = {
|
|
|
1905
1913
|
}
|
|
1906
1914
|
},
|
|
1907
1915
|
emits: ["update:algorithm", "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"],
|
|
1908
|
-
setup(a, { emit:
|
|
1909
|
-
const { i18nT: i, i18n: { t:
|
|
1916
|
+
setup(a, { emit: N }) {
|
|
1917
|
+
const { i18nT: i, i18n: { t: l } } = he.useI18n(), { inRange: u } = Fe(), b = a, k = N, B = V([
|
|
1910
1918
|
{
|
|
1911
|
-
label:
|
|
1919
|
+
label: l("upstreams.form.algorithms.round_robin_label"),
|
|
1912
1920
|
value: "round-robin",
|
|
1913
1921
|
selected: !1
|
|
1914
1922
|
},
|
|
1915
1923
|
{
|
|
1916
|
-
label:
|
|
1924
|
+
label: l("upstreams.form.algorithms.least_connections_label"),
|
|
1917
1925
|
value: "least-connections",
|
|
1918
1926
|
selected: !1
|
|
1919
1927
|
},
|
|
1920
1928
|
{
|
|
1921
|
-
label:
|
|
1929
|
+
label: l("upstreams.form.algorithms.consistent_hashing_label"),
|
|
1922
1930
|
value: "consistent-hashing",
|
|
1923
1931
|
selected: !1
|
|
1924
1932
|
},
|
|
1925
1933
|
{
|
|
1926
|
-
label:
|
|
1934
|
+
label: l("upstreams.form.algorithms.latency_label"),
|
|
1927
1935
|
value: "latency",
|
|
1928
1936
|
selected: !1
|
|
1929
1937
|
}
|
|
1930
|
-
]),
|
|
1938
|
+
]), w = V([
|
|
1931
1939
|
{
|
|
1932
|
-
label:
|
|
1940
|
+
label: l("upstreams.form.hash_labels.none"),
|
|
1933
1941
|
value: "none",
|
|
1934
1942
|
selected: !1
|
|
1935
1943
|
},
|
|
1936
1944
|
{
|
|
1937
|
-
label:
|
|
1945
|
+
label: l("upstreams.form.hash_labels.consumer"),
|
|
1938
1946
|
value: "consumer",
|
|
1939
1947
|
selected: !1
|
|
1940
1948
|
},
|
|
1941
1949
|
{
|
|
1942
|
-
label:
|
|
1950
|
+
label: l("upstreams.form.hash_labels.ip"),
|
|
1943
1951
|
value: "ip",
|
|
1944
1952
|
selected: !1
|
|
1945
1953
|
},
|
|
1946
1954
|
{
|
|
1947
|
-
label:
|
|
1955
|
+
label: l("upstreams.form.hash_labels.header"),
|
|
1948
1956
|
value: "header",
|
|
1949
1957
|
selected: !1
|
|
1950
1958
|
},
|
|
1951
1959
|
{
|
|
1952
|
-
label:
|
|
1960
|
+
label: l("upstreams.form.hash_labels.cookie"),
|
|
1953
1961
|
value: "cookie",
|
|
1954
1962
|
selected: !1
|
|
1955
1963
|
},
|
|
1956
1964
|
{
|
|
1957
|
-
label:
|
|
1965
|
+
label: l("upstreams.form.hash_labels.path"),
|
|
1958
1966
|
value: "path",
|
|
1959
1967
|
selected: !1
|
|
1960
1968
|
},
|
|
1961
1969
|
{
|
|
1962
|
-
label:
|
|
1970
|
+
label: l("upstreams.form.hash_labels.query_argument"),
|
|
1963
1971
|
value: "query_arg",
|
|
1964
1972
|
selected: !1
|
|
1965
1973
|
},
|
|
1966
1974
|
{
|
|
1967
|
-
label:
|
|
1975
|
+
label: l("upstreams.form.hash_labels.uri_capture"),
|
|
1968
1976
|
value: "uri_capture",
|
|
1969
1977
|
selected: !1
|
|
1970
1978
|
}
|
|
1971
1979
|
]);
|
|
1972
|
-
ce(() =>
|
|
1973
|
-
m === "header" && H !== m &&
|
|
1974
|
-
}), ce(() =>
|
|
1975
|
-
m === "header" && H !== m &&
|
|
1980
|
+
ce(() => b.hashOn, (H, m) => {
|
|
1981
|
+
m === "header" && H !== m && k("update:hash-on-header", ""), m === "cookie" && H !== m && (k("update:hash-on-cookie", ""), k("update:hash-on-cookie-path", "/")), m === "query_arg" && H !== m && k("update:hash-on-query-argument", ""), m === "uri_capture" && H !== m && k("update:hash-on-uri-capture", ""), (H === "cookie" || H === "none") && (k("update:hash-fallback", "none"), k("update:hash-fallback-header", ""), k("update:hash-fallback-query-argument", ""), k("update:hash-fallback-uri-capture", ""));
|
|
1982
|
+
}), ce(() => b.hashFallback, (H, m) => {
|
|
1983
|
+
m === "header" && H !== m && k("update:hash-fallback-header", ""), m === "cookie" && H !== m && (k("update:hash-on-cookie", ""), k("update:hash-on-cookie-path", "/")), m === "query_arg" && H !== m && k("update:hash-fallback-query-argument", ""), m === "uri_capture" && H !== m && k("update:hash-fallback-uri-capture", "");
|
|
1976
1984
|
});
|
|
1977
|
-
const
|
|
1985
|
+
const s = F(() => b.hashOn === "cookie" || b.hashOn === "none"), c = F(() => b.slots ? u(b.slots, Oe, $e) ? "" : l("upstreams.form.errors.in_range") : "");
|
|
1978
1986
|
return (H, m) => {
|
|
1979
|
-
const t = K("KExternalLink"),
|
|
1980
|
-
return x(),
|
|
1987
|
+
const t = K("KExternalLink"), E = K("KSelect"), I = K("KInput"), p = K("KCard");
|
|
1988
|
+
return x(), R(e(_e), {
|
|
1981
1989
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
1982
|
-
title: e(
|
|
1990
|
+
title: e(l)("upstreams.form.load_balancing.title")
|
|
1983
1991
|
}, {
|
|
1984
1992
|
description: n(() => [
|
|
1985
|
-
|
|
1986
|
-
Q(f(e(
|
|
1993
|
+
v("p", null, [
|
|
1994
|
+
Q(f(e(l)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
1987
1995
|
h(t, {
|
|
1988
1996
|
"hide-icon": "",
|
|
1989
1997
|
href: e(Te).upstreamObject
|
|
1990
1998
|
}, {
|
|
1991
1999
|
default: n(() => [
|
|
1992
|
-
Q(f(e(
|
|
2000
|
+
Q(f(e(l)("upstreams.form.buttons.view_documentation")), 1)
|
|
1993
2001
|
]),
|
|
1994
2002
|
_: 1
|
|
1995
2003
|
}, 8, ["href"])
|
|
1996
2004
|
])
|
|
1997
2005
|
]),
|
|
1998
2006
|
default: n(() => [
|
|
1999
|
-
h(
|
|
2007
|
+
h(E, {
|
|
2000
2008
|
class: "algorithm-select",
|
|
2001
|
-
items:
|
|
2002
|
-
label: e(
|
|
2009
|
+
items: B.value,
|
|
2010
|
+
label: e(l)("upstreams.form.fields.algorithm.label"),
|
|
2003
2011
|
"model-value": a.algorithm,
|
|
2004
2012
|
readonly: a.readonly,
|
|
2005
2013
|
width: "100%",
|
|
2006
|
-
"onUpdate:modelValue": m[0] || (m[0] = (S) =>
|
|
2014
|
+
"onUpdate:modelValue": m[0] || (m[0] = (S) => k("update:algorithm", S))
|
|
2007
2015
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2008
|
-
h(
|
|
2016
|
+
h(I, {
|
|
2009
2017
|
autocomplete: "off",
|
|
2010
2018
|
"data-testid": "upstreams-form-slots",
|
|
2011
2019
|
error: !!c.value,
|
|
2012
2020
|
"error-message": c.value,
|
|
2013
|
-
help: e(
|
|
2014
|
-
label: e(
|
|
2021
|
+
help: e(l)("upstreams.form.fields.slots.help"),
|
|
2022
|
+
label: e(l)("upstreams.form.fields.slots.label"),
|
|
2015
2023
|
max: e($e),
|
|
2016
2024
|
min: e(Oe),
|
|
2017
2025
|
"model-value": a.slots,
|
|
2018
2026
|
readonly: a.readonly,
|
|
2019
2027
|
type: "number",
|
|
2020
|
-
"onUpdate:modelValue": m[1] || (m[1] = (S) =>
|
|
2028
|
+
"onUpdate:modelValue": m[1] || (m[1] = (S) => k("update:slots", S))
|
|
2021
2029
|
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"]),
|
|
2022
2030
|
h(p, null, {
|
|
2023
2031
|
default: n(() => [
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
h(
|
|
2032
|
+
v("h5", ca, f(e(l)("upstreams.form.fields.hash_on.label")), 1),
|
|
2033
|
+
v("p", da, f(e(l)("upstreams.form.fields.hash_on.help")), 1),
|
|
2034
|
+
h(E, {
|
|
2027
2035
|
class: "hash-on-select",
|
|
2028
|
-
items:
|
|
2029
|
-
label: e(
|
|
2036
|
+
items: w.value,
|
|
2037
|
+
label: e(l)("upstreams.form.fields.hash_on.label"),
|
|
2030
2038
|
"model-value": a.hashOn,
|
|
2031
2039
|
readonly: a.readonly,
|
|
2032
2040
|
width: "100%",
|
|
2033
|
-
"onUpdate:modelValue": m[2] || (m[2] = (S) =>
|
|
2041
|
+
"onUpdate:modelValue": m[2] || (m[2] = (S) => k("update:hash-on", S))
|
|
2034
2042
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2035
|
-
a.hashOn === "header" ? (x(),
|
|
2043
|
+
a.hashOn === "header" ? (x(), R(I, {
|
|
2036
2044
|
key: 0,
|
|
2037
2045
|
autocomplete: "off",
|
|
2038
2046
|
class: "margin-top-6",
|
|
2039
2047
|
"data-testid": "upstreams-form-hash-on-header",
|
|
2040
|
-
label: e(
|
|
2048
|
+
label: e(l)("upstreams.form.fields.header.label"),
|
|
2041
2049
|
"model-value": a.hashOnHeader,
|
|
2042
2050
|
readonly: a.readonly,
|
|
2043
2051
|
required: "",
|
|
2044
2052
|
type: "text",
|
|
2045
|
-
"onUpdate:modelValue": m[3] || (m[3] = (S) =>
|
|
2053
|
+
"onUpdate:modelValue": m[3] || (m[3] = (S) => k("update:hash-on-header", S))
|
|
2046
2054
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0),
|
|
2047
|
-
a.hashOn === "cookie" ? (x(), ae(
|
|
2048
|
-
h(
|
|
2055
|
+
a.hashOn === "cookie" ? (x(), ae(Ue, { key: 1 }, [
|
|
2056
|
+
h(I, {
|
|
2049
2057
|
autocomplete: "off",
|
|
2050
2058
|
class: "margin-top-6",
|
|
2051
2059
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2052
|
-
label: e(
|
|
2060
|
+
label: e(l)("upstreams.form.fields.cookie.label"),
|
|
2053
2061
|
"model-value": a.hashOnCookie,
|
|
2054
2062
|
readonly: a.readonly,
|
|
2055
2063
|
required: "",
|
|
2056
2064
|
type: "text",
|
|
2057
|
-
"onUpdate:modelValue": m[4] || (m[4] = (S) =>
|
|
2065
|
+
"onUpdate:modelValue": m[4] || (m[4] = (S) => k("update:hash-on-cookie", S))
|
|
2058
2066
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2059
|
-
h(
|
|
2067
|
+
h(I, {
|
|
2060
2068
|
autocomplete: "off",
|
|
2061
2069
|
class: "margin-top-6",
|
|
2062
2070
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2063
|
-
label: e(
|
|
2071
|
+
label: e(l)("upstreams.form.fields.cookie_path.label"),
|
|
2064
2072
|
"model-value": a.hashOnCookiePath,
|
|
2065
2073
|
readonly: a.readonly,
|
|
2066
2074
|
required: "",
|
|
2067
2075
|
type: "text",
|
|
2068
|
-
"onUpdate:modelValue": m[5] || (m[5] = (S) =>
|
|
2076
|
+
"onUpdate:modelValue": m[5] || (m[5] = (S) => k("update:hash-on-cookie-path", S))
|
|
2069
2077
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2070
2078
|
], 64)) : L("", !0),
|
|
2071
|
-
a.hashOn === "query_arg" ? (x(),
|
|
2079
|
+
a.hashOn === "query_arg" ? (x(), R(I, {
|
|
2072
2080
|
key: 2,
|
|
2073
2081
|
autocomplete: "off",
|
|
2074
2082
|
class: "margin-top-6",
|
|
2075
2083
|
"data-testid": "upstreams-form-query-argument",
|
|
2076
|
-
label: e(
|
|
2084
|
+
label: e(l)("upstreams.form.fields.query_argument.label"),
|
|
2077
2085
|
"model-value": a.hashOnQueryArgument,
|
|
2078
2086
|
readonly: a.readonly,
|
|
2079
2087
|
required: "",
|
|
2080
2088
|
type: "text",
|
|
2081
|
-
"onUpdate:modelValue": m[6] || (m[6] = (S) =>
|
|
2089
|
+
"onUpdate:modelValue": m[6] || (m[6] = (S) => k("update:hash-on-query-argument", S))
|
|
2082
2090
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0),
|
|
2083
|
-
a.hashOn === "uri_capture" ? (x(),
|
|
2091
|
+
a.hashOn === "uri_capture" ? (x(), R(I, {
|
|
2084
2092
|
key: 3,
|
|
2085
2093
|
autocomplete: "off",
|
|
2086
2094
|
class: "margin-top-6",
|
|
2087
2095
|
"data-testid": "upstreams-form-uri-capture",
|
|
2088
|
-
label: e(
|
|
2096
|
+
label: e(l)("upstreams.form.fields.uri_capture.label"),
|
|
2089
2097
|
"model-value": a.hashOnUriCapture,
|
|
2090
2098
|
readonly: a.readonly,
|
|
2091
2099
|
required: "",
|
|
2092
2100
|
type: "text",
|
|
2093
|
-
"onUpdate:modelValue": m[7] || (m[7] = (S) =>
|
|
2101
|
+
"onUpdate:modelValue": m[7] || (m[7] = (S) => k("update:hash-on-uri-capture", S))
|
|
2094
2102
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0)
|
|
2095
2103
|
]),
|
|
2096
2104
|
_: 1
|
|
2097
2105
|
}),
|
|
2098
2106
|
h(p, null, {
|
|
2099
2107
|
default: n(() => [
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
h(
|
|
2108
|
+
v("h5", pa, f(e(l)("upstreams.form.fields.hash_fallback.label")), 1),
|
|
2109
|
+
v("p", ma, f(e(l)("upstreams.form.fields.hash_fallback.help")), 1),
|
|
2110
|
+
h(E, {
|
|
2103
2111
|
class: "hash-fallback-select",
|
|
2104
|
-
disabled:
|
|
2105
|
-
items:
|
|
2106
|
-
label: e(
|
|
2112
|
+
disabled: s.value,
|
|
2113
|
+
items: w.value,
|
|
2114
|
+
label: e(l)("upstreams.form.fields.hash_fallback.label"),
|
|
2107
2115
|
"label-attributes": { tooltipAttributes: { "max-width": "400" } },
|
|
2108
2116
|
"model-value": a.hashFallback,
|
|
2109
2117
|
readonly: a.readonly,
|
|
2110
2118
|
width: "100%",
|
|
2111
|
-
"onUpdate:modelValue": m[8] || (m[8] = (S) =>
|
|
2119
|
+
"onUpdate:modelValue": m[8] || (m[8] = (S) => k("update:hash-fallback", S))
|
|
2112
2120
|
}, {
|
|
2113
2121
|
"label-tooltip": n(() => [
|
|
2114
2122
|
h(e(i), {
|
|
@@ -2116,75 +2124,75 @@ const he = {
|
|
|
2116
2124
|
scope: "global"
|
|
2117
2125
|
}, {
|
|
2118
2126
|
hash_on: n(() => [
|
|
2119
|
-
|
|
2127
|
+
v("code", null, f(e(l)("upstreams.form.fields.hash_fallback.hash_on")), 1)
|
|
2120
2128
|
]),
|
|
2121
2129
|
cookie: n(() => [
|
|
2122
|
-
|
|
2130
|
+
v("code", null, f(e(l)("upstreams.form.fields.hash_fallback.cookie")), 1)
|
|
2123
2131
|
]),
|
|
2124
2132
|
_: 1
|
|
2125
2133
|
})
|
|
2126
2134
|
]),
|
|
2127
2135
|
_: 1
|
|
2128
2136
|
}, 8, ["disabled", "items", "label", "model-value", "readonly"]),
|
|
2129
|
-
a.hashFallback === "header" ? (x(),
|
|
2137
|
+
a.hashFallback === "header" ? (x(), R(I, {
|
|
2130
2138
|
key: 0,
|
|
2131
2139
|
autocomplete: "off",
|
|
2132
2140
|
class: "margin-top-6",
|
|
2133
2141
|
"data-testid": "upstreams-form-hash-fallback-header",
|
|
2134
|
-
label: e(
|
|
2142
|
+
label: e(l)("upstreams.form.fields.header.label"),
|
|
2135
2143
|
"model-value": a.hashFallbackHeader,
|
|
2136
2144
|
readonly: a.readonly,
|
|
2137
2145
|
required: "",
|
|
2138
2146
|
type: "text",
|
|
2139
|
-
"onUpdate:modelValue": m[9] || (m[9] = (S) =>
|
|
2147
|
+
"onUpdate:modelValue": m[9] || (m[9] = (S) => k("update:hash-fallback-header", S))
|
|
2140
2148
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0),
|
|
2141
|
-
a.hashFallback === "cookie" ? (x(), ae(
|
|
2142
|
-
h(
|
|
2149
|
+
a.hashFallback === "cookie" ? (x(), ae(Ue, { key: 1 }, [
|
|
2150
|
+
h(I, {
|
|
2143
2151
|
autocomplete: "off",
|
|
2144
2152
|
class: "margin-top-6",
|
|
2145
2153
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2146
|
-
label: e(
|
|
2154
|
+
label: e(l)("upstreams.form.fields.cookie.label"),
|
|
2147
2155
|
"model-value": a.hashOnCookie,
|
|
2148
2156
|
readonly: a.readonly,
|
|
2149
2157
|
required: "",
|
|
2150
2158
|
type: "text",
|
|
2151
|
-
"onUpdate:modelValue": m[10] || (m[10] = (S) =>
|
|
2159
|
+
"onUpdate:modelValue": m[10] || (m[10] = (S) => k("update:hash-on-cookie", S))
|
|
2152
2160
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2153
|
-
h(
|
|
2161
|
+
h(I, {
|
|
2154
2162
|
autocomplete: "off",
|
|
2155
2163
|
class: "margin-top-6",
|
|
2156
2164
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2157
|
-
label: e(
|
|
2165
|
+
label: e(l)("upstreams.form.fields.cookie_path.label"),
|
|
2158
2166
|
"model-value": a.hashOnCookiePath,
|
|
2159
2167
|
readonly: a.readonly,
|
|
2160
2168
|
required: "",
|
|
2161
2169
|
type: "text",
|
|
2162
|
-
"onUpdate:modelValue": m[11] || (m[11] = (S) =>
|
|
2170
|
+
"onUpdate:modelValue": m[11] || (m[11] = (S) => k("update:hash-on-cookie-path", S))
|
|
2163
2171
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2164
2172
|
], 64)) : L("", !0),
|
|
2165
|
-
a.hashFallback === "query_arg" ? (x(),
|
|
2173
|
+
a.hashFallback === "query_arg" ? (x(), R(I, {
|
|
2166
2174
|
key: 2,
|
|
2167
2175
|
autocomplete: "off",
|
|
2168
2176
|
class: "margin-top-6",
|
|
2169
2177
|
"data-testid": "upstreams-form-hash-fallback-query-argument",
|
|
2170
|
-
label: e(
|
|
2178
|
+
label: e(l)("upstreams.form.fields.query_argument.label"),
|
|
2171
2179
|
"model-value": a.hashFallbackQueryArgument,
|
|
2172
2180
|
readonly: a.readonly,
|
|
2173
2181
|
required: "",
|
|
2174
2182
|
type: "text",
|
|
2175
|
-
"onUpdate:modelValue": m[12] || (m[12] = (S) =>
|
|
2183
|
+
"onUpdate:modelValue": m[12] || (m[12] = (S) => k("update:hash-fallback-query-argument", S))
|
|
2176
2184
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0),
|
|
2177
|
-
a.hashFallback === "uri_capture" ? (x(),
|
|
2185
|
+
a.hashFallback === "uri_capture" ? (x(), R(I, {
|
|
2178
2186
|
key: 3,
|
|
2179
2187
|
autocomplete: "off",
|
|
2180
2188
|
class: "margin-top-6",
|
|
2181
2189
|
"data-testid": "upstreams-form-hash-fallback-uri-capture",
|
|
2182
|
-
label: e(
|
|
2190
|
+
label: e(l)("upstreams.form.fields.uri_capture.label"),
|
|
2183
2191
|
"model-value": a.hashFallbackUriCapture,
|
|
2184
2192
|
readonly: a.readonly,
|
|
2185
2193
|
required: "",
|
|
2186
2194
|
type: "text",
|
|
2187
|
-
"onUpdate:modelValue": m[13] || (m[13] = (S) =>
|
|
2195
|
+
"onUpdate:modelValue": m[13] || (m[13] = (S) => k("update:hash-fallback-uri-capture", S))
|
|
2188
2196
|
}, null, 8, ["label", "model-value", "readonly"])) : L("", !0)
|
|
2189
2197
|
]),
|
|
2190
2198
|
_: 1
|
|
@@ -2216,18 +2224,18 @@ const he = {
|
|
|
2216
2224
|
}
|
|
2217
2225
|
},
|
|
2218
2226
|
emits: ["update:active-health-switch", "update:passive-health-switch", "update:healthchecks-threshold"],
|
|
2219
|
-
setup(a, { emit:
|
|
2220
|
-
const { i18n: { t: i } } = he.useI18n(),
|
|
2221
|
-
return (u,
|
|
2222
|
-
const
|
|
2223
|
-
return x(),
|
|
2227
|
+
setup(a, { emit: N }) {
|
|
2228
|
+
const { i18n: { t: i } } = he.useI18n(), l = N;
|
|
2229
|
+
return (u, b) => {
|
|
2230
|
+
const k = K("KExternalLink"), B = K("KInputSwitch"), w = K("KCard"), s = K("KInput");
|
|
2231
|
+
return x(), R(e(_e), {
|
|
2224
2232
|
class: "kong-ui-entities-upstreams-healthchecks",
|
|
2225
2233
|
title: e(i)("upstreams.form.health_check.title")
|
|
2226
2234
|
}, {
|
|
2227
2235
|
description: n(() => [
|
|
2228
|
-
|
|
2236
|
+
v("p", null, [
|
|
2229
2237
|
Q(f(e(i)("upstreams.form.health_check.help")) + " ", 1),
|
|
2230
|
-
h(
|
|
2238
|
+
h(k, {
|
|
2231
2239
|
"hide-icon": "",
|
|
2232
2240
|
href: e(Te).loadBalancing
|
|
2233
2241
|
}, {
|
|
@@ -2239,35 +2247,35 @@ const he = {
|
|
|
2239
2247
|
])
|
|
2240
2248
|
]),
|
|
2241
2249
|
default: n(() => [
|
|
2242
|
-
h(
|
|
2250
|
+
h(w, null, {
|
|
2243
2251
|
default: n(() => [
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
h(
|
|
2252
|
+
v("h5", ga, f(e(i)("upstreams.form.fields.active_health_checks.label")), 1),
|
|
2253
|
+
v("p", va, f(e(i)("upstreams.form.fields.active_health_checks.help")), 1),
|
|
2254
|
+
h(B, {
|
|
2247
2255
|
class: "active-health-switch",
|
|
2248
2256
|
"data-testid": "active-health-switch",
|
|
2249
2257
|
disabled: a.readonly,
|
|
2250
2258
|
"model-value": a.activeHealthSwitch,
|
|
2251
|
-
onChange:
|
|
2259
|
+
onChange: b[0] || (b[0] = (c) => l("update:active-health-switch", c))
|
|
2252
2260
|
}, null, 8, ["disabled", "model-value"])
|
|
2253
2261
|
]),
|
|
2254
2262
|
_: 1
|
|
2255
2263
|
}),
|
|
2256
|
-
h(
|
|
2264
|
+
h(w, null, {
|
|
2257
2265
|
default: n(() => [
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
h(
|
|
2266
|
+
v("h5", ba, f(e(i)("upstreams.form.fields.passive_health_checks.label")), 1),
|
|
2267
|
+
v("p", ka, f(e(i)("upstreams.form.fields.passive_health_checks.help")), 1),
|
|
2268
|
+
h(B, {
|
|
2261
2269
|
class: "passive-health-switch",
|
|
2262
2270
|
"data-testid": "passive-health-switch",
|
|
2263
2271
|
disabled: a.readonly,
|
|
2264
2272
|
"model-value": a.passiveHealthSwitch,
|
|
2265
|
-
onChange:
|
|
2273
|
+
onChange: b[1] || (b[1] = (c) => l("update:passive-health-switch", c))
|
|
2266
2274
|
}, null, 8, ["disabled", "model-value"])
|
|
2267
2275
|
]),
|
|
2268
2276
|
_: 1
|
|
2269
2277
|
}),
|
|
2270
|
-
h(
|
|
2278
|
+
h(s, {
|
|
2271
2279
|
autocomplete: "off",
|
|
2272
2280
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
2273
2281
|
label: e(i)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
@@ -2276,14 +2284,14 @@ const he = {
|
|
|
2276
2284
|
"model-value": a.healthchecksThreshold,
|
|
2277
2285
|
readonly: a.readonly,
|
|
2278
2286
|
type: "number",
|
|
2279
|
-
"onUpdate:modelValue":
|
|
2287
|
+
"onUpdate:modelValue": b[2] || (b[2] = (c) => l("update:healthchecks-threshold", c))
|
|
2280
2288
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2281
2289
|
]),
|
|
2282
2290
|
_: 1
|
|
2283
2291
|
}, 8, ["title"]);
|
|
2284
2292
|
};
|
|
2285
2293
|
}
|
|
2286
|
-
}), Ca = /* @__PURE__ */ ue(_a, [["__scopeId", "data-v-bfdc5a59"]]), Ha = "#d60027", Sa = { key: 2 },
|
|
2294
|
+
}), Ca = /* @__PURE__ */ ue(_a, [["__scopeId", "data-v-bfdc5a59"]]), Ha = "#d60027", Sa = { key: 2 }, Ia = { class: "fields-group-title" }, Ua = { class: "fields-group-text" }, qa = { class: "fields-group-title" }, wa = { class: "fields-group-text" }, Fa = /* @__PURE__ */ se({
|
|
2287
2295
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
2288
2296
|
props: {
|
|
2289
2297
|
config: {
|
|
@@ -2357,8 +2365,8 @@ const he = {
|
|
|
2357
2365
|
}
|
|
2358
2366
|
},
|
|
2359
2367
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:interval", "update:successes", "update:http-statuses", "update:unhealthy-interval", "update:http-failures", "update:tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
2360
|
-
setup(a, { emit:
|
|
2361
|
-
const { i18n: { t: i } } = he.useI18n(), { objectsAreEqual:
|
|
2368
|
+
setup(a, { emit: N }) {
|
|
2369
|
+
const { i18n: { t: i } } = he.useI18n(), { objectsAreEqual: l } = Fe(), u = a, b = N, k = V([
|
|
2362
2370
|
{
|
|
2363
2371
|
label: i("upstreams.form.healthcheck_type_labels.http"),
|
|
2364
2372
|
value: "http",
|
|
@@ -2384,36 +2392,36 @@ const he = {
|
|
|
2384
2392
|
value: "grpcs",
|
|
2385
2393
|
selected: !1
|
|
2386
2394
|
}
|
|
2387
|
-
]),
|
|
2388
|
-
trackNewItems:
|
|
2395
|
+
]), B = F(() => u.type === "https" || u.type === "grpcs"), w = F(() => u.type === "tcp"), {
|
|
2396
|
+
trackNewItems: s
|
|
2389
2397
|
} = ke({ replaceId: !0 }), {
|
|
2390
2398
|
trackNewItems: c
|
|
2391
2399
|
} = ke({ replaceId: !0 });
|
|
2392
|
-
ce(() => u.type, (
|
|
2393
|
-
p === "tcp" &&
|
|
2400
|
+
ce(() => u.type, (I, p) => {
|
|
2401
|
+
p === "tcp" && I !== p && b("update:tcp-failures", "5"), (p === "https" || p === "grpcs") && I !== p && (b("update:https-sni", ""), b("update:verify-ssl", !1)), p !== "tcp" && I === "tcp" && (b("update:http-path", "/"), b("update:http-statuses", Ut), b("update:unhealthy-http-statuses", wt));
|
|
2394
2402
|
});
|
|
2395
2403
|
const H = V([{ key: "", values: "" }]);
|
|
2396
|
-
ce(() => u.headers, (
|
|
2397
|
-
|
|
2404
|
+
ce(() => u.headers, (I) => {
|
|
2405
|
+
l(H.value, I) || (H.value = [...I]);
|
|
2398
2406
|
}, {
|
|
2399
2407
|
immediate: !0,
|
|
2400
2408
|
deep: !0
|
|
2401
2409
|
});
|
|
2402
2410
|
const m = () => {
|
|
2403
|
-
|
|
2411
|
+
b("update:headers", H.value);
|
|
2404
2412
|
}, t = () => {
|
|
2405
2413
|
H.value.push({ key: "", values: "" }), m();
|
|
2406
|
-
},
|
|
2407
|
-
|
|
2414
|
+
}, E = (I) => {
|
|
2415
|
+
I === 0 && H.value.length === 1 ? H.value[0] = { key: "", values: "" } : H.value.splice(I, 1), m();
|
|
2408
2416
|
};
|
|
2409
|
-
return (
|
|
2410
|
-
const S = K("KExternalLink"), W = K("KSelect"), A = K("KInput"), X = K("KCheckbox"), z = K("KLabel"),
|
|
2411
|
-
return x(),
|
|
2417
|
+
return (I, p) => {
|
|
2418
|
+
const S = K("KExternalLink"), W = K("KSelect"), A = K("KInput"), X = K("KCheckbox"), z = K("KLabel"), g = K("KButton"), U = K("KMultiselect"), q = K("KCard");
|
|
2419
|
+
return x(), R(e(_e), {
|
|
2412
2420
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
2413
2421
|
title: e(i)("upstreams.form.active_health_check.title")
|
|
2414
2422
|
}, {
|
|
2415
2423
|
description: n(() => [
|
|
2416
|
-
|
|
2424
|
+
v("p", null, [
|
|
2417
2425
|
Q(f(e(i)("upstreams.form.active_health_check.help")) + " ", 1),
|
|
2418
2426
|
h(S, {
|
|
2419
2427
|
"hide-icon": "",
|
|
@@ -2431,14 +2439,14 @@ const he = {
|
|
|
2431
2439
|
return [
|
|
2432
2440
|
h(W, {
|
|
2433
2441
|
class: "active-healthcheck-type-select",
|
|
2434
|
-
items:
|
|
2442
|
+
items: k.value,
|
|
2435
2443
|
label: e(i)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
2436
2444
|
"model-value": a.type,
|
|
2437
2445
|
readonly: a.readonly,
|
|
2438
2446
|
width: "100%",
|
|
2439
|
-
"onUpdate:modelValue": p[0] || (p[0] = (y) =>
|
|
2447
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => b("update:type", y))
|
|
2440
2448
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2441
|
-
|
|
2449
|
+
w.value ? L("", !0) : (x(), R(A, {
|
|
2442
2450
|
key: 0,
|
|
2443
2451
|
autocomplete: "off",
|
|
2444
2452
|
"data-testid": "active-healthcheck-http-path",
|
|
@@ -2446,7 +2454,7 @@ const he = {
|
|
|
2446
2454
|
"model-value": a.httpPath,
|
|
2447
2455
|
readonly: a.readonly,
|
|
2448
2456
|
type: "text",
|
|
2449
|
-
"onUpdate:modelValue": p[1] || (p[1] = (y) =>
|
|
2457
|
+
"onUpdate:modelValue": p[1] || (p[1] = (y) => b("update:http-path", y))
|
|
2450
2458
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
2451
2459
|
h(A, {
|
|
2452
2460
|
autocomplete: "off",
|
|
@@ -2457,7 +2465,7 @@ const he = {
|
|
|
2457
2465
|
"model-value": a.timeout,
|
|
2458
2466
|
readonly: a.readonly,
|
|
2459
2467
|
type: "number",
|
|
2460
|
-
"onUpdate:modelValue": p[2] || (p[2] = (y) =>
|
|
2468
|
+
"onUpdate:modelValue": p[2] || (p[2] = (y) => b("update:timeout", y))
|
|
2461
2469
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2462
2470
|
h(A, {
|
|
2463
2471
|
autocomplete: "off",
|
|
@@ -2468,9 +2476,9 @@ const he = {
|
|
|
2468
2476
|
"model-value": a.concurrency,
|
|
2469
2477
|
readonly: a.readonly,
|
|
2470
2478
|
type: "number",
|
|
2471
|
-
"onUpdate:modelValue": p[3] || (p[3] = (y) =>
|
|
2479
|
+
"onUpdate:modelValue": p[3] || (p[3] = (y) => b("update:concurrency", y))
|
|
2472
2480
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2473
|
-
|
|
2481
|
+
B.value ? (x(), ae(Ue, { key: 1 }, [
|
|
2474
2482
|
h(A, {
|
|
2475
2483
|
autocomplete: "off",
|
|
2476
2484
|
class: "margin-bottom-6",
|
|
@@ -2479,14 +2487,14 @@ const he = {
|
|
|
2479
2487
|
"model-value": a.httpsSni,
|
|
2480
2488
|
readonly: a.readonly,
|
|
2481
2489
|
type: "text",
|
|
2482
|
-
"onUpdate:modelValue": p[4] || (p[4] = (y) =>
|
|
2490
|
+
"onUpdate:modelValue": p[4] || (p[4] = (y) => b("update:https-sni", y))
|
|
2483
2491
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2484
2492
|
h(X, {
|
|
2485
2493
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
2486
2494
|
disabled: a.readonly,
|
|
2487
2495
|
label: e(i)("upstreams.form.fields.verify_ssl.label"),
|
|
2488
2496
|
"model-value": a.verifySsl,
|
|
2489
|
-
"onUpdate:modelValue": p[5] || (p[5] = (y) =>
|
|
2497
|
+
"onUpdate:modelValue": p[5] || (p[5] = (y) => b("update:verify-ssl", y))
|
|
2490
2498
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
2491
2499
|
], 64)) : L("", !0),
|
|
2492
2500
|
((O = a.config) == null ? void 0 : O.app) === "kongManager" ? (x(), ae("div", Sa, [
|
|
@@ -2499,8 +2507,8 @@ const he = {
|
|
|
2499
2507
|
]),
|
|
2500
2508
|
_: 1
|
|
2501
2509
|
}, 8, ["info"]),
|
|
2502
|
-
|
|
2503
|
-
(x(!0), ae(
|
|
2510
|
+
v("div", null, [
|
|
2511
|
+
(x(!0), ae(Ue, null, Ot(H.value, (y, D) => (x(), ae("div", {
|
|
2504
2512
|
key: `${y.header}_${D}`,
|
|
2505
2513
|
class: $t(["headers-row", { "margin-top-6": D > 0 }])
|
|
2506
2514
|
}, [
|
|
@@ -2522,13 +2530,13 @@ const he = {
|
|
|
2522
2530
|
type: "text",
|
|
2523
2531
|
onBlur: m
|
|
2524
2532
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2525
|
-
h(
|
|
2533
|
+
h(g, {
|
|
2526
2534
|
appearance: "tertiary",
|
|
2527
2535
|
class: "btn-remove",
|
|
2528
2536
|
"data-testid": "btn-remove-header",
|
|
2529
2537
|
disabled: H.value.length === 1,
|
|
2530
2538
|
icon: "",
|
|
2531
|
-
onClick: (J) =>
|
|
2539
|
+
onClick: (J) => E(D)
|
|
2532
2540
|
}, {
|
|
2533
2541
|
default: n(() => [
|
|
2534
2542
|
h(e(Vt), {
|
|
@@ -2538,7 +2546,7 @@ const he = {
|
|
|
2538
2546
|
]),
|
|
2539
2547
|
_: 2
|
|
2540
2548
|
}, 1032, ["disabled", "onClick"]),
|
|
2541
|
-
H.value && D === H.value.length - 1 ? (x(),
|
|
2549
|
+
H.value && D === H.value.length - 1 ? (x(), R(g, {
|
|
2542
2550
|
key: 0,
|
|
2543
2551
|
appearance: "tertiary",
|
|
2544
2552
|
class: "btn-add-header",
|
|
@@ -2554,10 +2562,10 @@ const he = {
|
|
|
2554
2562
|
], 2))), 128))
|
|
2555
2563
|
])
|
|
2556
2564
|
])) : L("", !0),
|
|
2557
|
-
h(
|
|
2565
|
+
h(q, null, {
|
|
2558
2566
|
default: n(() => [
|
|
2559
|
-
|
|
2560
|
-
|
|
2567
|
+
v("h5", Ia, f(e(i)("upstreams.form.healthy.label")), 1),
|
|
2568
|
+
v("p", Ua, f(e(i)("upstreams.form.healthy.help")), 1),
|
|
2561
2569
|
h(A, {
|
|
2562
2570
|
autocomplete: "off",
|
|
2563
2571
|
class: "margin-bottom-6",
|
|
@@ -2569,7 +2577,7 @@ const he = {
|
|
|
2569
2577
|
"model-value": a.interval,
|
|
2570
2578
|
readonly: a.readonly,
|
|
2571
2579
|
type: "number",
|
|
2572
|
-
"onUpdate:modelValue": p[6] || (p[6] = (y) =>
|
|
2580
|
+
"onUpdate:modelValue": p[6] || (p[6] = (y) => b("update:interval", y))
|
|
2573
2581
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2574
2582
|
h(A, {
|
|
2575
2583
|
autocomplete: "off",
|
|
@@ -2580,9 +2588,9 @@ const he = {
|
|
|
2580
2588
|
"model-value": a.successes,
|
|
2581
2589
|
readonly: a.readonly,
|
|
2582
2590
|
type: "number",
|
|
2583
|
-
"onUpdate:modelValue": p[7] || (p[7] = (y) =>
|
|
2591
|
+
"onUpdate:modelValue": p[7] || (p[7] = (y) => b("update:successes", y))
|
|
2584
2592
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2585
|
-
|
|
2593
|
+
w.value ? L("", !0) : (x(), R(U, {
|
|
2586
2594
|
key: 0,
|
|
2587
2595
|
autocomplete: "off",
|
|
2588
2596
|
class: "margin-top-6 active-healthcheck-http-statuses",
|
|
@@ -2592,17 +2600,17 @@ const he = {
|
|
|
2592
2600
|
"model-value": a.httpStatuses,
|
|
2593
2601
|
readonly: a.readonly,
|
|
2594
2602
|
width: "100%",
|
|
2595
|
-
onItemAdded: p[8] || (p[8] = (y) => e(
|
|
2596
|
-
onItemRemoved: p[9] || (p[9] = (y) => e(
|
|
2597
|
-
"onUpdate:modelValue": p[10] || (p[10] = (y) =>
|
|
2603
|
+
onItemAdded: p[8] || (p[8] = (y) => e(s)(y, !0)),
|
|
2604
|
+
onItemRemoved: p[9] || (p[9] = (y) => e(s)(y, !1)),
|
|
2605
|
+
"onUpdate:modelValue": p[10] || (p[10] = (y) => b("update:http-statuses", y))
|
|
2598
2606
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2599
2607
|
]),
|
|
2600
2608
|
_: 1
|
|
2601
2609
|
}),
|
|
2602
|
-
h(
|
|
2610
|
+
h(q, null, {
|
|
2603
2611
|
default: n(() => [
|
|
2604
|
-
|
|
2605
|
-
|
|
2612
|
+
v("h5", qa, f(e(i)("upstreams.form.unhealthy.label")), 1),
|
|
2613
|
+
v("p", wa, f(e(i)("upstreams.form.unhealthy.help")), 1),
|
|
2606
2614
|
h(A, {
|
|
2607
2615
|
autocomplete: "off",
|
|
2608
2616
|
class: "margin-bottom-6",
|
|
@@ -2614,7 +2622,7 @@ const he = {
|
|
|
2614
2622
|
"model-value": a.unhealthyInterval,
|
|
2615
2623
|
readonly: a.readonly,
|
|
2616
2624
|
type: "number",
|
|
2617
|
-
"onUpdate:modelValue": p[11] || (p[11] = (y) =>
|
|
2625
|
+
"onUpdate:modelValue": p[11] || (p[11] = (y) => b("update:unhealthy-interval", y))
|
|
2618
2626
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2619
2627
|
h(A, {
|
|
2620
2628
|
autocomplete: "off",
|
|
@@ -2626,9 +2634,9 @@ const he = {
|
|
|
2626
2634
|
"model-value": a.tcpFailures,
|
|
2627
2635
|
readonly: a.readonly,
|
|
2628
2636
|
type: "number",
|
|
2629
|
-
"onUpdate:modelValue": p[12] || (p[12] = (y) =>
|
|
2637
|
+
"onUpdate:modelValue": p[12] || (p[12] = (y) => b("update:tcp-failures", y))
|
|
2630
2638
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2631
|
-
|
|
2639
|
+
w.value ? L("", !0) : (x(), R(A, {
|
|
2632
2640
|
key: 0,
|
|
2633
2641
|
autocomplete: "off",
|
|
2634
2642
|
class: "margin-bottom-6",
|
|
@@ -2639,9 +2647,9 @@ const he = {
|
|
|
2639
2647
|
"model-value": a.httpFailures,
|
|
2640
2648
|
readonly: a.readonly,
|
|
2641
2649
|
type: "number",
|
|
2642
|
-
"onUpdate:modelValue": p[13] || (p[13] = (y) =>
|
|
2650
|
+
"onUpdate:modelValue": p[13] || (p[13] = (y) => b("update:http-failures", y))
|
|
2643
2651
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2644
|
-
|
|
2652
|
+
w.value ? L("", !0) : (x(), R(U, {
|
|
2645
2653
|
key: 1,
|
|
2646
2654
|
autocomplete: "off",
|
|
2647
2655
|
class: "margin-bottom-6 active-healthcheck-unhealthy-http-statuses",
|
|
@@ -2653,18 +2661,18 @@ const he = {
|
|
|
2653
2661
|
width: "100%",
|
|
2654
2662
|
onItemAdded: p[14] || (p[14] = (y) => e(c)(y, !0)),
|
|
2655
2663
|
onItemRemoved: p[15] || (p[15] = (y) => e(c)(y, !1)),
|
|
2656
|
-
"onUpdate:modelValue": p[16] || (p[16] = (y) =>
|
|
2664
|
+
"onUpdate:modelValue": p[16] || (p[16] = (y) => b("update:unhealthy-http-statuses", y))
|
|
2657
2665
|
}, null, 8, ["items", "label", "model-value", "readonly"])),
|
|
2658
2666
|
h(A, {
|
|
2659
2667
|
autocomplete: "off",
|
|
2660
2668
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
2661
2669
|
label: e(i)("upstreams.form.fields.timeouts.label"),
|
|
2662
|
-
max: e(
|
|
2670
|
+
max: e(It),
|
|
2663
2671
|
min: e(St),
|
|
2664
2672
|
"model-value": a.unhealthyTimeouts,
|
|
2665
2673
|
readonly: a.readonly,
|
|
2666
2674
|
type: "number",
|
|
2667
|
-
"onUpdate:modelValue": p[17] || (p[17] = (y) =>
|
|
2675
|
+
"onUpdate:modelValue": p[17] || (p[17] = (y) => b("update:unhealthy-timeouts", y))
|
|
2668
2676
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2669
2677
|
]),
|
|
2670
2678
|
_: 1
|
|
@@ -2713,8 +2721,8 @@ const he = {
|
|
|
2713
2721
|
}
|
|
2714
2722
|
},
|
|
2715
2723
|
emits: ["update:type", "update:successes", "update:http-statuses", "update:timeouts", "update:http-failures", "update:unhealthy-http-statuses", "update:tcp-failures"],
|
|
2716
|
-
setup(a, { emit:
|
|
2717
|
-
const { i18n: { t: i } } = he.useI18n(),
|
|
2724
|
+
setup(a, { emit: N }) {
|
|
2725
|
+
const { i18n: { t: i } } = he.useI18n(), l = a, u = N, b = V([
|
|
2718
2726
|
{
|
|
2719
2727
|
label: i("upstreams.form.healthcheck_type_labels.http"),
|
|
2720
2728
|
value: "http",
|
|
@@ -2740,21 +2748,21 @@ const he = {
|
|
|
2740
2748
|
value: "grpcs",
|
|
2741
2749
|
selected: !1
|
|
2742
2750
|
}
|
|
2743
|
-
]),
|
|
2744
|
-
trackNewItems:
|
|
2751
|
+
]), k = F(() => l.type === "tcp"), {
|
|
2752
|
+
trackNewItems: B
|
|
2745
2753
|
} = ke({ replaceId: !0 }), {
|
|
2746
|
-
trackNewItems:
|
|
2754
|
+
trackNewItems: w
|
|
2747
2755
|
} = ke({ replaceId: !0 });
|
|
2748
|
-
return ce(() =>
|
|
2749
|
-
c === "tcp" &&
|
|
2750
|
-
}), (
|
|
2751
|
-
const H = K("KExternalLink"), m = K("KSelect"), t = K("KInput"),
|
|
2752
|
-
return x(),
|
|
2756
|
+
return ce(() => l.type, (s, c) => {
|
|
2757
|
+
c === "tcp" && s !== c && u("update:tcp-failures", "5"), c !== "tcp" && s === "tcp" && (u("update:http-statuses", qt), u("update:unhealthy-http-statuses", Ft));
|
|
2758
|
+
}), (s, c) => {
|
|
2759
|
+
const H = K("KExternalLink"), m = K("KSelect"), t = K("KInput"), E = K("KMultiselect"), I = K("KCard");
|
|
2760
|
+
return x(), R(e(_e), {
|
|
2753
2761
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
2754
2762
|
title: e(i)("upstreams.form.passive_health_check.title")
|
|
2755
2763
|
}, {
|
|
2756
2764
|
description: n(() => [
|
|
2757
|
-
|
|
2765
|
+
v("p", null, [
|
|
2758
2766
|
Q(f(e(i)("upstreams.form.passive_health_check.help")) + " ", 1),
|
|
2759
2767
|
h(H, {
|
|
2760
2768
|
"hide-icon": "",
|
|
@@ -2770,17 +2778,17 @@ const he = {
|
|
|
2770
2778
|
default: n(() => [
|
|
2771
2779
|
h(m, {
|
|
2772
2780
|
class: "passive-healthcheck-type-select",
|
|
2773
|
-
items:
|
|
2781
|
+
items: b.value,
|
|
2774
2782
|
label: e(i)("upstreams.form.fields.passive_health_check_type.label"),
|
|
2775
2783
|
"model-value": a.type,
|
|
2776
2784
|
readonly: a.readonly,
|
|
2777
2785
|
width: "100%",
|
|
2778
2786
|
"onUpdate:modelValue": c[0] || (c[0] = (p) => u("update:type", p))
|
|
2779
2787
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2780
|
-
h(
|
|
2788
|
+
h(I, null, {
|
|
2781
2789
|
default: n(() => [
|
|
2782
|
-
|
|
2783
|
-
|
|
2790
|
+
v("h5", xa, f(e(i)("upstreams.form.passive_healthy.label")), 1),
|
|
2791
|
+
v("p", Oa, f(e(i)("upstreams.form.passive_healthy.help")), 1),
|
|
2784
2792
|
h(t, {
|
|
2785
2793
|
autocomplete: "off",
|
|
2786
2794
|
"data-testid": "passive-healthcheck-successes",
|
|
@@ -2792,7 +2800,7 @@ const he = {
|
|
|
2792
2800
|
type: "number",
|
|
2793
2801
|
"onUpdate:modelValue": c[1] || (c[1] = (p) => u("update:successes", p))
|
|
2794
2802
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2795
|
-
|
|
2803
|
+
k.value ? L("", !0) : (x(), R(E, {
|
|
2796
2804
|
key: 0,
|
|
2797
2805
|
class: "margin-top-6 passive-healthcheck-http-statuses",
|
|
2798
2806
|
"enable-item-creation": "",
|
|
@@ -2801,22 +2809,22 @@ const he = {
|
|
|
2801
2809
|
"model-value": a.httpStatuses,
|
|
2802
2810
|
readonly: a.readonly,
|
|
2803
2811
|
width: "100%",
|
|
2804
|
-
onItemAdded: c[2] || (c[2] = (p) => e(
|
|
2805
|
-
onItemRemoved: c[3] || (c[3] = (p) => e(
|
|
2812
|
+
onItemAdded: c[2] || (c[2] = (p) => e(B)(p, !0)),
|
|
2813
|
+
onItemRemoved: c[3] || (c[3] = (p) => e(B)(p, !1)),
|
|
2806
2814
|
"onUpdate:modelValue": c[4] || (c[4] = (p) => u("update:http-statuses", p))
|
|
2807
2815
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2808
2816
|
]),
|
|
2809
2817
|
_: 1
|
|
2810
2818
|
}),
|
|
2811
|
-
h(
|
|
2819
|
+
h(I, null, {
|
|
2812
2820
|
default: n(() => [
|
|
2813
|
-
|
|
2814
|
-
|
|
2821
|
+
v("h5", $a, f(e(i)("upstreams.form.passive_unhealthy.label")), 1),
|
|
2822
|
+
v("p", Pa, f(e(i)("upstreams.form.passive_unhealthy.help")), 1),
|
|
2815
2823
|
h(t, {
|
|
2816
2824
|
autocomplete: "off",
|
|
2817
2825
|
"data-testid": "passive-healthcheck-timeouts",
|
|
2818
2826
|
label: e(i)("upstreams.form.fields.timeouts.label"),
|
|
2819
|
-
max: e(
|
|
2827
|
+
max: e(It),
|
|
2820
2828
|
min: e(St),
|
|
2821
2829
|
"model-value": a.timeouts,
|
|
2822
2830
|
readonly: a.readonly,
|
|
@@ -2835,7 +2843,7 @@ const he = {
|
|
|
2835
2843
|
type: "number",
|
|
2836
2844
|
"onUpdate:modelValue": c[6] || (c[6] = (p) => u("update:tcp-failures", p))
|
|
2837
2845
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2838
|
-
|
|
2846
|
+
k.value ? L("", !0) : (x(), R(t, {
|
|
2839
2847
|
key: 0,
|
|
2840
2848
|
autocomplete: "off",
|
|
2841
2849
|
class: "margin-top-6",
|
|
@@ -2848,7 +2856,7 @@ const he = {
|
|
|
2848
2856
|
type: "number",
|
|
2849
2857
|
"onUpdate:modelValue": c[7] || (c[7] = (p) => u("update:http-failures", p))
|
|
2850
2858
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2851
|
-
|
|
2859
|
+
k.value ? L("", !0) : (x(), R(E, {
|
|
2852
2860
|
key: 1,
|
|
2853
2861
|
autocomplete: "off",
|
|
2854
2862
|
class: "margin-top-6 passive-healthcheck-unhealthy-http-statuses",
|
|
@@ -2858,8 +2866,8 @@ const he = {
|
|
|
2858
2866
|
"model-value": a.unhealthyHttpStatuses,
|
|
2859
2867
|
readonly: a.readonly,
|
|
2860
2868
|
width: "100%",
|
|
2861
|
-
onItemAdded: c[8] || (c[8] = (p) => e(
|
|
2862
|
-
onItemRemoved: c[9] || (c[9] = (p) => e(
|
|
2869
|
+
onItemAdded: c[8] || (c[8] = (p) => e(w)(p, !0)),
|
|
2870
|
+
onItemRemoved: c[9] || (c[9] = (p) => e(w)(p, !1)),
|
|
2863
2871
|
"onUpdate:modelValue": c[10] || (c[10] = (p) => u("update:unhealthy-http-statuses", p))
|
|
2864
2872
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2865
2873
|
]),
|
|
@@ -2887,29 +2895,29 @@ const he = {
|
|
|
2887
2895
|
}
|
|
2888
2896
|
},
|
|
2889
2897
|
emits: ["update", "error", "loading"],
|
|
2890
|
-
setup(a, { emit:
|
|
2898
|
+
setup(a, { emit: N }) {
|
|
2891
2899
|
var _;
|
|
2892
|
-
const i = a,
|
|
2893
|
-
fields:
|
|
2900
|
+
const i = a, l = N, { inRange: u, stringToNumberArray: b, upstreamsResponseToFields: k, getDefaultUpstreamFields: B, objectsAreEqual: w, cloneDeep: s } = Fe(), { axiosInstance: c } = we((_ = i.config) == null ? void 0 : _.axiosRequestConfig), { getMessageFromError: H } = _t(), m = Ht(), t = Ie({
|
|
2901
|
+
fields: B(),
|
|
2894
2902
|
readonly: !1,
|
|
2895
2903
|
errorMessage: ""
|
|
2896
|
-
}),
|
|
2904
|
+
}), E = Ie(B()), I = F(() => !w(t.fields, E)), p = (d) => {
|
|
2897
2905
|
t.fields.activeHealthCheck.interval = d ? "5" : "0", t.fields.activeHealthCheck.successes = d ? "5" : "0", t.fields.activeHealthCheck.httpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthyInterval = d ? "5" : "0", t.fields.activeHealthCheck.tcpFailures = d ? "5" : "0";
|
|
2898
2906
|
}, S = (d) => {
|
|
2899
2907
|
t.fields.passiveHealthCheck.timeouts = d ? "5" : "0", t.fields.passiveHealthCheck.successes = d ? "80" : "0", t.fields.passiveHealthCheck.tcpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.httpFailures = d ? "5" : "0";
|
|
2900
|
-
}, W =
|
|
2908
|
+
}, W = F(() => t.fields.slots ? u(t.fields.slots, Oe, $e) : !0), A = F(() => t.fields.hashOn === "header" ? !!t.fields.hashOnHeader : !0), X = F(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookie : !0), z = F(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookiePath : !0), g = F(() => t.fields.hashOn === "query_arg" ? !!t.fields.hashOnQueryArgument : !0), U = F(() => t.fields.hashOn === "uri_capture" ? !!t.fields.hashOnUriCapture : !0), q = F(() => t.fields.hashFallback === "header" ? !!t.fields.hashFallbackHeader : !0), O = F(() => t.fields.hashFallback === "query_arg" ? !!t.fields.hashFallbackQueryArgument : !0), y = F(() => t.fields.hashFallback === "uri_capture" ? !!t.fields.hashFallbackUriCapture : !0), D = F(() => !!t.fields.name && W.value && A.value && X.value && z.value && g.value && U.value && q.value && O.value && y.value), J = F(() => i.upstreamId ? oe.Edit : oe.Create), te = F(() => {
|
|
2901
2909
|
var d, r;
|
|
2902
2910
|
return (r = ge.form[(d = i.config) == null ? void 0 : d.app]) == null ? void 0 : r.edit;
|
|
2903
2911
|
}), le = (d) => {
|
|
2904
|
-
Object.assign(t.fields,
|
|
2912
|
+
Object.assign(t.fields, k(d)), Object.assign(E, s(t.fields));
|
|
2905
2913
|
}, M = () => {
|
|
2906
2914
|
var d;
|
|
2907
2915
|
m.push(((d = i.config) == null ? void 0 : d.cancelRoute) || { name: "upstreams-list" });
|
|
2908
2916
|
}, $ = (d) => {
|
|
2909
|
-
|
|
2917
|
+
l("loading", d);
|
|
2910
2918
|
}, G = (d) => {
|
|
2911
|
-
|
|
2912
|
-
}, C =
|
|
2919
|
+
l("error", d);
|
|
2920
|
+
}, C = F(() => {
|
|
2913
2921
|
var r, o, Y, j, Z;
|
|
2914
2922
|
const d = {
|
|
2915
2923
|
name: t.fields.name,
|
|
@@ -2931,7 +2939,7 @@ const he = {
|
|
|
2931
2939
|
} : {
|
|
2932
2940
|
...ee
|
|
2933
2941
|
};
|
|
2934
|
-
}, {})), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && t.fields.activeHealthCheck.httpsSni && (d.healthchecks.active.https_sni = t.fields.activeHealthCheck.httpsSni), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && (d.healthchecks.active.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), t.fields.activeHealthCheck.interval && (d.healthchecks.active.healthy.interval = Number(t.fields.activeHealthCheck.interval)), t.fields.activeHealthCheck.successes && (d.healthchecks.active.healthy.successes = Number(t.fields.activeHealthCheck.successes)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpStatuses && (d.healthchecks.active.healthy.http_statuses =
|
|
2942
|
+
}, {})), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && t.fields.activeHealthCheck.httpsSni && (d.healthchecks.active.https_sni = t.fields.activeHealthCheck.httpsSni), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && (d.healthchecks.active.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), t.fields.activeHealthCheck.interval && (d.healthchecks.active.healthy.interval = Number(t.fields.activeHealthCheck.interval)), t.fields.activeHealthCheck.successes && (d.healthchecks.active.healthy.successes = Number(t.fields.activeHealthCheck.successes)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpStatuses && (d.healthchecks.active.healthy.http_statuses = b(t.fields.activeHealthCheck.httpStatuses)), t.fields.activeHealthCheck.unhealthyInterval && (d.healthchecks.active.unhealthy.interval = Number(t.fields.activeHealthCheck.unhealthyInterval)), t.fields.activeHealthCheck.unhealthyTimeouts && (d.healthchecks.active.unhealthy.timeouts = Number(t.fields.activeHealthCheck.unhealthyTimeouts)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.unhealthyHttpStatuses && (d.healthchecks.active.unhealthy.http_statuses = b(t.fields.activeHealthCheck.unhealthyHttpStatuses)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpFailures && (d.healthchecks.active.unhealthy.http_failures = Number(t.fields.activeHealthCheck.httpFailures)), t.fields.activeHealthCheck.tcpFailures && (d.healthchecks.active.unhealthy.tcp_failures = Number(t.fields.activeHealthCheck.tcpFailures))) : ((j = i.config) == null ? void 0 : j.app) === "kongManager" && J.value === oe.Edit && (d.healthchecks.active = {
|
|
2935
2943
|
type: t.fields.activeHealthCheck.type,
|
|
2936
2944
|
headers: {},
|
|
2937
2945
|
healthy: {
|
|
@@ -2947,7 +2955,7 @@ const he = {
|
|
|
2947
2955
|
type: t.fields.passiveHealthCheck.type,
|
|
2948
2956
|
healthy: {},
|
|
2949
2957
|
unhealthy: {}
|
|
2950
|
-
}, t.fields.passiveHealthCheck.successes && (d.healthchecks.passive.healthy.successes = Number(t.fields.passiveHealthCheck.successes)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.httpStatuses && (d.healthchecks.passive.healthy.http_statuses =
|
|
2958
|
+
}, t.fields.passiveHealthCheck.successes && (d.healthchecks.passive.healthy.successes = Number(t.fields.passiveHealthCheck.successes)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.httpStatuses && (d.healthchecks.passive.healthy.http_statuses = b(t.fields.passiveHealthCheck.httpStatuses)), t.fields.passiveHealthCheck.timeouts && (d.healthchecks.passive.unhealthy.timeouts = Number(t.fields.passiveHealthCheck.timeouts)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.unhealthyHttpStatuses && (d.healthchecks.passive.unhealthy.http_statuses = b(t.fields.passiveHealthCheck.unhealthyHttpStatuses)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.httpFailures && (d.healthchecks.passive.unhealthy.http_failures = Number(t.fields.passiveHealthCheck.httpFailures)), t.fields.passiveHealthCheck.tcpFailures && (d.healthchecks.passive.unhealthy.tcp_failures = Number(t.fields.passiveHealthCheck.tcpFailures))) : ((Z = i.config) == null ? void 0 : Z.app) === "kongManager" && J.value === oe.Edit && (d.healthchecks.passive = {
|
|
2951
2959
|
type: t.fields.passiveHealthCheck.type,
|
|
2952
2960
|
healthy: {
|
|
2953
2961
|
successes: 0
|
|
@@ -2967,16 +2975,16 @@ const he = {
|
|
|
2967
2975
|
try {
|
|
2968
2976
|
t.readonly = !0, await c.post(T("validate"), C.value);
|
|
2969
2977
|
let r;
|
|
2970
|
-
J.value === oe.Create ? r = await c.post(T("create"), C.value) : J.value === oe.Edit && (r = ((d = i.config) == null ? void 0 : d.app) === "konnect" ? await c.put(T("edit"), C.value) : await c.patch(T("edit"), C.value)),
|
|
2978
|
+
J.value === oe.Create ? r = await c.post(T("create"), C.value) : J.value === oe.Edit && (r = ((d = i.config) == null ? void 0 : d.app) === "konnect" ? await c.put(T("edit"), C.value) : await c.patch(T("edit"), C.value)), l("update", r == null ? void 0 : r.data);
|
|
2971
2979
|
} catch (r) {
|
|
2972
|
-
t.errorMessage = H(r),
|
|
2980
|
+
t.errorMessage = H(r), l("error", r);
|
|
2973
2981
|
} finally {
|
|
2974
2982
|
t.readonly = !1;
|
|
2975
2983
|
}
|
|
2976
2984
|
};
|
|
2977
2985
|
return (d, r) => (x(), ae("div", Ka, [
|
|
2978
2986
|
h(e(Ct), {
|
|
2979
|
-
"can-submit": D.value &&
|
|
2987
|
+
"can-submit": D.value && I.value,
|
|
2980
2988
|
config: a.config,
|
|
2981
2989
|
"edit-id": a.upstreamId,
|
|
2982
2990
|
"entity-type": e(Me).Upstream,
|
|
@@ -3045,7 +3053,7 @@ const he = {
|
|
|
3045
3053
|
],
|
|
3046
3054
|
readonly: t.readonly
|
|
3047
3055
|
}, null, 8, ["active-health-switch", "healthchecks-threshold", "passive-health-switch", "readonly"]),
|
|
3048
|
-
t.fields.activeHealthSwitch ? (x(),
|
|
3056
|
+
t.fields.activeHealthSwitch ? (x(), R(Ta, {
|
|
3049
3057
|
key: 0,
|
|
3050
3058
|
concurrency: t.fields.activeHealthCheck.concurrency,
|
|
3051
3059
|
"onUpdate:concurrency": r[19] || (r[19] = (o) => t.fields.activeHealthCheck.concurrency = o),
|
|
@@ -3080,7 +3088,7 @@ const he = {
|
|
|
3080
3088
|
config: a.config,
|
|
3081
3089
|
readonly: t.readonly
|
|
3082
3090
|
}, null, 8, ["concurrency", "headers", "http-failures", "http-path", "http-statuses", "https-sni", "interval", "successes", "tcp-failures", "timeout", "type", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) : L("", !0),
|
|
3083
|
-
t.fields.passiveHealthSwitch ? (x(),
|
|
3091
|
+
t.fields.passiveHealthSwitch ? (x(), R(Aa, {
|
|
3084
3092
|
key: 1,
|
|
3085
3093
|
"http-failures": t.fields.passiveHealthCheck.httpFailures,
|
|
3086
3094
|
"onUpdate:httpFailures": r[34] || (r[34] = (o) => t.fields.passiveHealthCheck.httpFailures = o),
|
|
@@ -3130,7 +3138,7 @@ const he = {
|
|
|
3130
3138
|
},
|
|
3131
3139
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
3132
3140
|
setup(a) {
|
|
3133
|
-
const
|
|
3141
|
+
const N = a, { i18n: { t: i }, i18nT: l } = he.useI18n(), { getPropValue: u } = Mt(), b = F(() => ge.form[N.config.app].edit), k = V({
|
|
3134
3142
|
id: {},
|
|
3135
3143
|
name: {},
|
|
3136
3144
|
created_at: {},
|
|
@@ -3204,212 +3212,212 @@ const he = {
|
|
|
3204
3212
|
tooltip: i("upstreams.form.hash_tooltips.client_certificate")
|
|
3205
3213
|
}
|
|
3206
3214
|
});
|
|
3207
|
-
return (
|
|
3215
|
+
return (B, w) => (x(), ae("div", null, [
|
|
3208
3216
|
h(e(Kt), {
|
|
3209
3217
|
config: a.config,
|
|
3210
3218
|
"config-card-doc": a.configCardDoc,
|
|
3211
|
-
"config-schema":
|
|
3219
|
+
"config-schema": k.value,
|
|
3212
3220
|
"entity-type": e(Me).Upstream,
|
|
3213
|
-
"fetch-url":
|
|
3221
|
+
"fetch-url": b.value,
|
|
3214
3222
|
"hide-title": a.hideTitle,
|
|
3215
|
-
"onFetch:error":
|
|
3216
|
-
"onFetch:success":
|
|
3217
|
-
onLoading:
|
|
3223
|
+
"onFetch:error": w[0] || (w[0] = (s) => B.$emit("fetch:error", s)),
|
|
3224
|
+
"onFetch:success": w[1] || (w[1] = (s) => B.$emit("fetch:success", s)),
|
|
3225
|
+
onLoading: w[2] || (w[2] = (s) => B.$emit("loading", s))
|
|
3218
3226
|
}, {
|
|
3219
3227
|
"name-label-tooltip": n(() => [
|
|
3220
|
-
h(e(
|
|
3228
|
+
h(e(l), {
|
|
3221
3229
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
3222
3230
|
scope: "global"
|
|
3223
3231
|
}, {
|
|
3224
3232
|
host: n(() => [
|
|
3225
|
-
|
|
3233
|
+
v("code", null, f(e(i)("upstreams.form.fields.name.host")), 1)
|
|
3226
3234
|
]),
|
|
3227
3235
|
_: 1
|
|
3228
3236
|
})
|
|
3229
3237
|
]),
|
|
3230
|
-
"hash_on-label-tooltip": n(({ row:
|
|
3231
|
-
h(e(
|
|
3238
|
+
"hash_on-label-tooltip": n(({ row: s }) => [
|
|
3239
|
+
h(e(l), {
|
|
3232
3240
|
keypath: "upstreams.form.fields.hash_on.tooltip",
|
|
3233
3241
|
scope: "global"
|
|
3234
3242
|
}, {
|
|
3235
3243
|
result: n(() => [
|
|
3236
|
-
|
|
3244
|
+
v("code", null, f(s.value), 1)
|
|
3237
3245
|
]),
|
|
3238
3246
|
_: 2
|
|
3239
3247
|
}, 1024)
|
|
3240
3248
|
]),
|
|
3241
3249
|
"hash_on_header-label-tooltip": n(() => [
|
|
3242
|
-
h(e(
|
|
3250
|
+
h(e(l), {
|
|
3243
3251
|
keypath: "upstreams.form.hash_tooltips.hash_on_header.text",
|
|
3244
3252
|
scope: "global"
|
|
3245
3253
|
}, {
|
|
3246
3254
|
hash_on: n(() => [
|
|
3247
|
-
|
|
3255
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_header.hash_on")), 1)
|
|
3248
3256
|
]),
|
|
3249
3257
|
header: n(() => [
|
|
3250
|
-
|
|
3258
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_header.header")), 1)
|
|
3251
3259
|
]),
|
|
3252
3260
|
_: 1
|
|
3253
3261
|
})
|
|
3254
3262
|
]),
|
|
3255
3263
|
"hash_on_uri_capture-label-tooltip": n(() => [
|
|
3256
|
-
h(e(
|
|
3264
|
+
h(e(l), {
|
|
3257
3265
|
keypath: "upstreams.form.hash_tooltips.hash_on_uri_capture.text",
|
|
3258
3266
|
scope: "global"
|
|
3259
3267
|
}, {
|
|
3260
3268
|
hash_on: n(() => [
|
|
3261
|
-
|
|
3269
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")), 1)
|
|
3262
3270
|
]),
|
|
3263
3271
|
uri_capture: n(() => [
|
|
3264
|
-
|
|
3272
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")), 1)
|
|
3265
3273
|
]),
|
|
3266
3274
|
_: 1
|
|
3267
3275
|
})
|
|
3268
3276
|
]),
|
|
3269
3277
|
"hash_on_query_arg-label-tooltip": n(() => [
|
|
3270
|
-
h(e(
|
|
3278
|
+
h(e(l), {
|
|
3271
3279
|
keypath: "upstreams.form.hash_tooltips.hash_on_query_arg.text",
|
|
3272
3280
|
scope: "global"
|
|
3273
3281
|
}, {
|
|
3274
3282
|
hash_on: n(() => [
|
|
3275
|
-
|
|
3283
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")), 1)
|
|
3276
3284
|
]),
|
|
3277
3285
|
query_arg: n(() => [
|
|
3278
|
-
|
|
3286
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")), 1)
|
|
3279
3287
|
]),
|
|
3280
3288
|
_: 1
|
|
3281
3289
|
})
|
|
3282
3290
|
]),
|
|
3283
3291
|
"hash_on_cookie-label-tooltip": n(() => [
|
|
3284
|
-
h(e(
|
|
3292
|
+
h(e(l), {
|
|
3285
3293
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie.text",
|
|
3286
3294
|
scope: "global"
|
|
3287
3295
|
}, {
|
|
3288
3296
|
hash_on: n(() => [
|
|
3289
|
-
|
|
3297
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")), 1)
|
|
3290
3298
|
]),
|
|
3291
3299
|
hash_fallback: n(() => [
|
|
3292
|
-
|
|
3300
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")), 1)
|
|
3293
3301
|
]),
|
|
3294
3302
|
cookie: n(() => [
|
|
3295
|
-
|
|
3303
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")), 1)
|
|
3296
3304
|
]),
|
|
3297
3305
|
_: 1
|
|
3298
3306
|
})
|
|
3299
3307
|
]),
|
|
3300
3308
|
"hash_on_cookie_path-label-tooltip": n(() => [
|
|
3301
|
-
h(e(
|
|
3309
|
+
h(e(l), {
|
|
3302
3310
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie_path.text",
|
|
3303
3311
|
scope: "global"
|
|
3304
3312
|
}, {
|
|
3305
3313
|
hash_on: n(() => [
|
|
3306
|
-
|
|
3314
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")), 1)
|
|
3307
3315
|
]),
|
|
3308
3316
|
hash_fallback: n(() => [
|
|
3309
|
-
|
|
3317
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")), 1)
|
|
3310
3318
|
]),
|
|
3311
3319
|
cookie: n(() => [
|
|
3312
|
-
|
|
3320
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")), 1)
|
|
3313
3321
|
]),
|
|
3314
3322
|
_: 1
|
|
3315
3323
|
})
|
|
3316
3324
|
]),
|
|
3317
3325
|
"slots-label-tooltip": n(() => [
|
|
3318
|
-
h(e(
|
|
3326
|
+
h(e(l), {
|
|
3319
3327
|
keypath: "upstreams.form.hash_tooltips.slots.text",
|
|
3320
3328
|
scope: "global"
|
|
3321
3329
|
}, {
|
|
3322
3330
|
algorithm: n(() => [
|
|
3323
|
-
|
|
3331
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.algorithm")), 1)
|
|
3324
3332
|
]),
|
|
3325
3333
|
round_robin: n(() => [
|
|
3326
|
-
|
|
3334
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.round_robin")), 1)
|
|
3327
3335
|
]),
|
|
3328
3336
|
consistent_hashing: n(() => [
|
|
3329
|
-
|
|
3337
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.slots.consistent_hashing")), 1)
|
|
3330
3338
|
]),
|
|
3331
|
-
min: n(() =>
|
|
3332
|
-
|
|
3339
|
+
min: n(() => w[3] || (w[3] = [
|
|
3340
|
+
v("code", null, "10", -1)
|
|
3333
3341
|
])),
|
|
3334
|
-
max: n(() =>
|
|
3335
|
-
|
|
3342
|
+
max: n(() => w[4] || (w[4] = [
|
|
3343
|
+
v("code", null, "65536", -1)
|
|
3336
3344
|
])),
|
|
3337
3345
|
_: 1
|
|
3338
3346
|
})
|
|
3339
3347
|
]),
|
|
3340
3348
|
"hash_fallback-label-tooltip": n(() => [
|
|
3341
|
-
h(e(
|
|
3349
|
+
h(e(l), {
|
|
3342
3350
|
keypath: "upstreams.form.hash_tooltips.hash_fallback.text",
|
|
3343
3351
|
scope: "global"
|
|
3344
3352
|
}, {
|
|
3345
3353
|
hash_on: n(() => [
|
|
3346
|
-
|
|
3354
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback.hash_on")), 1)
|
|
3347
3355
|
]),
|
|
3348
3356
|
cookie: n(() => [
|
|
3349
|
-
|
|
3357
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback.cookie")), 1)
|
|
3350
3358
|
]),
|
|
3351
3359
|
_: 1
|
|
3352
3360
|
})
|
|
3353
3361
|
]),
|
|
3354
3362
|
"hash_fallback_header-label-tooltip": n(() => [
|
|
3355
|
-
h(e(
|
|
3363
|
+
h(e(l), {
|
|
3356
3364
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_header.text",
|
|
3357
3365
|
scope: "global"
|
|
3358
3366
|
}, {
|
|
3359
3367
|
hash_fallback: n(() => [
|
|
3360
|
-
|
|
3368
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")), 1)
|
|
3361
3369
|
]),
|
|
3362
3370
|
header: n(() => [
|
|
3363
|
-
|
|
3371
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_header.header")), 1)
|
|
3364
3372
|
]),
|
|
3365
3373
|
_: 1
|
|
3366
3374
|
})
|
|
3367
3375
|
]),
|
|
3368
3376
|
"hash_fallback_query_arg-label-tooltip": n(() => [
|
|
3369
|
-
h(e(
|
|
3377
|
+
h(e(l), {
|
|
3370
3378
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_query_arg.text",
|
|
3371
3379
|
scope: "global"
|
|
3372
3380
|
}, {
|
|
3373
3381
|
hash_fallback: n(() => [
|
|
3374
|
-
|
|
3382
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")), 1)
|
|
3375
3383
|
]),
|
|
3376
3384
|
query_arg: n(() => [
|
|
3377
|
-
|
|
3385
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")), 1)
|
|
3378
3386
|
]),
|
|
3379
3387
|
_: 1
|
|
3380
3388
|
})
|
|
3381
3389
|
]),
|
|
3382
3390
|
"hash_fallback_uri_capture-label-tooltip": n(() => [
|
|
3383
|
-
h(e(
|
|
3391
|
+
h(e(l), {
|
|
3384
3392
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",
|
|
3385
3393
|
scope: "global"
|
|
3386
3394
|
}, {
|
|
3387
3395
|
hash_fallback: n(() => [
|
|
3388
|
-
|
|
3396
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")), 1)
|
|
3389
3397
|
]),
|
|
3390
3398
|
uri_capture: n(() => [
|
|
3391
|
-
|
|
3399
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")), 1)
|
|
3392
3400
|
]),
|
|
3393
3401
|
_: 1
|
|
3394
3402
|
})
|
|
3395
3403
|
]),
|
|
3396
3404
|
"host_header-label-tooltip": n(() => [
|
|
3397
|
-
h(e(
|
|
3405
|
+
h(e(l), {
|
|
3398
3406
|
keypath: "upstreams.form.hash_tooltips.host_header.text",
|
|
3399
3407
|
scope: "global"
|
|
3400
3408
|
}, {
|
|
3401
3409
|
host: n(() => [
|
|
3402
|
-
|
|
3410
|
+
v("code", null, f(e(i)("upstreams.form.hash_tooltips.host_header.host")), 1)
|
|
3403
3411
|
]),
|
|
3404
3412
|
_: 1
|
|
3405
3413
|
})
|
|
3406
3414
|
]),
|
|
3407
|
-
client_certificate: n((
|
|
3415
|
+
client_certificate: n((s) => {
|
|
3408
3416
|
var c;
|
|
3409
3417
|
return [
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3418
|
+
v("div", null, [
|
|
3419
|
+
v("div", Na, [
|
|
3420
|
+
v("span", null, f((c = e(u)("rowValue", s)) == null ? void 0 : c.id), 1)
|
|
3413
3421
|
])
|
|
3414
3422
|
])
|
|
3415
3423
|
];
|