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