@kong-ui-public/entities-upstreams-targets 3.5.35 → 3.5.36
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 { AddIcon as
|
|
5
|
-
import { createI18n as
|
|
6
|
-
const
|
|
1
|
+
import { ref as M, defineComponent as oe, computed as q, watch as me, onBeforeMount as Me, resolveComponent as x, openBlock as I, createElementBlock as se, createVNode as h, unref as e, withCtx as n, createBlock as E, Teleport as mt, withDirectives as ft, createTextVNode as W, toDisplayString as f, vShow as yt, createElementVNode as b, Fragment as be, renderList as Ae, reactive as Ie, renderSlot as gt, createCommentVNode as z, createSlots as $t, normalizeClass as Pt } from "vue";
|
|
2
|
+
import { useAxios as Te, useFetcher as vt, useDeleteUrlBuilder as bt, FetcherStatus as we, EntityBaseTable as kt, EntityFilter as Mt, PermissionsWrapper as ue, EntityDeleteModal as _t, EntityTypes as Ct, useErrors as Ht, EntityBaseFormType as he, EntityBaseForm as St, SupportedEntityType as Ke, useDebouncedFilter as ct, EntityFormSection as Ce, useHelpers as At, ConfigurationSchemaSection as ne, ConfigurationSchemaType as Kt, EntityBaseConfigCard as Nt } from "@kong-ui-public/entities-shared";
|
|
3
|
+
import { useRouter as Ut } from "vue-router";
|
|
4
|
+
import { AddIcon as Ne, TrashIcon as Vt } from "@kong/icons";
|
|
5
|
+
import { createI18n as Bt, i18nTComponent as Et } from "@kong-ui-public/i18n";
|
|
6
|
+
const Rt = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
id: "ID",
|
|
@@ -289,7 +289,7 @@ const Oa = {
|
|
|
289
289
|
labels: {
|
|
290
290
|
created_at: "Created at"
|
|
291
291
|
}
|
|
292
|
-
},
|
|
292
|
+
}, Dt = {
|
|
293
293
|
list: {
|
|
294
294
|
table_headers: {
|
|
295
295
|
id: "ID",
|
|
@@ -357,28 +357,28 @@ const Oa = {
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
},
|
|
361
|
-
upstreams:
|
|
362
|
-
targets:
|
|
360
|
+
}, jt = {
|
|
361
|
+
upstreams: Rt,
|
|
362
|
+
targets: Dt
|
|
363
363
|
};
|
|
364
|
-
function
|
|
365
|
-
const a =
|
|
364
|
+
function Lt() {
|
|
365
|
+
const a = Bt("en-us", jt);
|
|
366
366
|
return {
|
|
367
367
|
i18n: a,
|
|
368
|
-
i18nT:
|
|
368
|
+
i18nT: Et(a)
|
|
369
369
|
// Translation component <i18n-t>
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
function _e(a) {
|
|
373
|
-
const { replaceId: R = !1 } = a, r =
|
|
373
|
+
const { replaceId: R = !1 } = a, r = M([]);
|
|
374
374
|
return {
|
|
375
375
|
addedItems: r,
|
|
376
|
-
trackNewItems: (u,
|
|
377
|
-
if (
|
|
378
|
-
const
|
|
379
|
-
R && (
|
|
376
|
+
trackNewItems: (u, k) => {
|
|
377
|
+
if (k) {
|
|
378
|
+
const g = { ...u };
|
|
379
|
+
R && (g.value = u.label), r.value.push(g);
|
|
380
380
|
} else
|
|
381
|
-
r.value = r.value.filter((
|
|
381
|
+
r.value = r.value.filter((g) => g.value !== u.value);
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
}
|
|
@@ -751,90 +751,89 @@ const qe = [
|
|
|
751
751
|
label: "599",
|
|
752
752
|
value: "599"
|
|
753
753
|
}
|
|
754
|
-
], $e = 10, Pe = 65536,
|
|
755
|
-
function
|
|
756
|
-
const a = (
|
|
757
|
-
if (a(
|
|
758
|
-
const
|
|
759
|
-
return
|
|
754
|
+
], $e = 10, Pe = 65536, Qt = 0, Wt = 65535, ge = 0, ve = 255, It = 0, wt = 255, Jt = 0, zt = 65535, dt = 0, pt = 65535, Gt = 0, Xt = 2 ** 31, qt = ["200", "302"], Tt = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], Ft = ["429", "404", "500", "501", "502", "503", "504", "505"], xt = ["429", "500", "503"];
|
|
755
|
+
function Fe() {
|
|
756
|
+
const a = (l) => /^\d+$/.test(l), R = (l, c, C) => {
|
|
757
|
+
if (a(l)) {
|
|
758
|
+
const m = Number(l);
|
|
759
|
+
return m >= c && m <= C;
|
|
760
760
|
} else
|
|
761
761
|
return !1;
|
|
762
|
-
}, r = (
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
762
|
+
}, r = (l) => l.map((c) => Number(c)), s = (l) => l.map((c) => c.toString()), u = (l) => {
|
|
763
|
+
var C, m, t, D, U, p, H, Y, O, ee, ae, v, S, F, w, y, j, G, re, ie, P, K, J, L, Z, _, N, d, i, o, A, Q, $, B, le, X, te, pe, Ve, Be, Ee, Re, De, je, Le, Qe, We, Je, ze, Ge, Xe, Ye, Ze, et, tt, at, lt, st, it, rt, ot, nt, ht, ut;
|
|
764
|
+
return {
|
|
765
|
+
name: (l == null ? void 0 : l.name) || "",
|
|
766
|
+
hostHeader: (l == null ? void 0 : l.host_header) || "",
|
|
767
|
+
clientCertificate: ((C = l == null ? void 0 : l.client_certificate) == null ? void 0 : C.id) || "",
|
|
768
|
+
tags: ((m = l == null ? void 0 : l.tags) == null ? void 0 : m.join(", ")) || "",
|
|
769
|
+
algorithm: (l == null ? void 0 : l.algorithm) || "round-robin",
|
|
770
|
+
slots: ((t = l == null ? void 0 : l.slots) == null ? void 0 : t.toString()) || "10000",
|
|
771
|
+
hashOn: (l == null ? void 0 : l.hash_on) || "none",
|
|
772
|
+
hashFallback: (l == null ? void 0 : l.hash_fallback) || "none",
|
|
773
|
+
hashOnHeader: (l == null ? void 0 : l.hash_on_header) || "",
|
|
774
|
+
hashOnCookie: (l == null ? void 0 : l.hash_on_cookie) || "",
|
|
775
|
+
hashOnCookiePath: (l == null ? void 0 : l.hash_on_cookie_path) || "/",
|
|
776
|
+
hashOnQueryArgument: (l == null ? void 0 : l.hash_on_query_arg) || "",
|
|
777
|
+
hashOnUriCapture: (l == null ? void 0 : l.hash_on_uri_capture) || "",
|
|
778
|
+
hashFallbackHeader: (l == null ? void 0 : l.hash_fallback_header) || "",
|
|
779
|
+
hashFallbackQueryArgument: (l == null ? void 0 : l.hash_fallback_query_arg) || "",
|
|
780
|
+
hashFallbackUriCapture: (l == null ? void 0 : l.hash_fallback_uri_capture) || "",
|
|
781
|
+
activeHealthSwitch: l ? ((U = (D = l.healthchecks.active) == null ? void 0 : D.healthy) == null ? void 0 : U.interval) !== 0 || ((H = (p = l.healthchecks.active) == null ? void 0 : p.unhealthy) == null ? void 0 : H.interval) !== 0 : !1,
|
|
782
|
+
passiveHealthSwitch: l ? ((O = (Y = l.healthchecks.passive) == null ? void 0 : Y.healthy) == null ? void 0 : O.successes) !== 0 || ((ae = (ee = l.healthchecks.passive) == null ? void 0 : ee.unhealthy) == null ? void 0 : ae.timeouts) !== 0 || ((S = (v = l.healthchecks.passive) == null ? void 0 : v.unhealthy) == null ? void 0 : S.tcp_failures) !== 0 || ((w = (F = l.healthchecks.passive) == null ? void 0 : F.unhealthy) == null ? void 0 : w.http_failures) !== 0 : !1,
|
|
783
|
+
healthchecksThreshold: ((y = l == null ? void 0 : l.healthchecks.threshold) == null ? void 0 : y.toString()) || "0",
|
|
784
|
+
activeHealthCheck: {
|
|
785
|
+
type: ((j = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : j.type) || "http",
|
|
786
|
+
httpPath: ((G = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : G.http_path) || "/",
|
|
787
|
+
timeout: ((ie = (re = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : re.timeout) == null ? void 0 : ie.toString()) || "1",
|
|
788
|
+
concurrency: ((K = (P = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : P.concurrency) == null ? void 0 : K.toString()) || "10",
|
|
789
|
+
httpsSni: ((J = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : J.https_sni) || "",
|
|
790
|
+
verifySsl: ((L = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : L.https_verify_certificate) || !1,
|
|
791
|
+
headers: (Z = l == null ? void 0 : l.healthchecks.active) != null && Z.headers && Object.entries(l.healthchecks.active.headers).length > 0 ? Object.entries(l.healthchecks.active.headers).map(([Ot, Oe]) => ({ key: Ot, values: Oe == null ? void 0 : Oe.join(", ") })) : [{ key: "", values: "" }],
|
|
792
|
+
interval: ((d = (N = (_ = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : _.healthy) == null ? void 0 : N.interval) == null ? void 0 : d.toString()) || "0",
|
|
793
|
+
successes: ((A = (o = (i = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : i.healthy) == null ? void 0 : o.successes) == null ? void 0 : A.toString()) || "5",
|
|
794
|
+
httpStatuses: ($ = (Q = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Q.healthy) != null && $.http_statuses ? s(l.healthchecks.active.healthy.http_statuses) : qt,
|
|
795
|
+
unhealthyInterval: ((X = (le = (B = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : B.unhealthy) == null ? void 0 : le.interval) == null ? void 0 : X.toString()) || "0",
|
|
796
|
+
httpFailures: ((Ve = (pe = (te = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : te.unhealthy) == null ? void 0 : pe.http_failures) == null ? void 0 : Ve.toString()) || "5",
|
|
797
|
+
tcpFailures: ((Re = (Ee = (Be = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Be.unhealthy) == null ? void 0 : Ee.tcp_failures) == null ? void 0 : Re.toString()) || "5",
|
|
798
|
+
unhealthyHttpStatuses: (je = (De = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : De.unhealthy) != null && je.http_statuses ? s(l.healthchecks.active.unhealthy.http_statuses) : Ft,
|
|
799
|
+
unhealthyTimeouts: ((We = (Qe = (Le = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Le.unhealthy) == null ? void 0 : Qe.timeouts) == null ? void 0 : We.toString()) || "0"
|
|
800
|
+
},
|
|
801
|
+
passiveHealthCheck: {
|
|
802
|
+
type: ((Je = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Je.type) || "http",
|
|
803
|
+
successes: ((Xe = (Ge = (ze = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ze.healthy) == null ? void 0 : Ge.successes) == null ? void 0 : Xe.toString()) || "0",
|
|
804
|
+
httpStatuses: (Ze = (Ye = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Ye.healthy) != null && Ze.http_statuses ? s(l.healthchecks.passive.healthy.http_statuses) : Tt,
|
|
805
|
+
timeouts: ((at = (tt = (et = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : et.unhealthy) == null ? void 0 : tt.timeouts) == null ? void 0 : at.toString()) || "0",
|
|
806
|
+
httpFailures: ((it = (st = (lt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : lt.unhealthy) == null ? void 0 : st.http_failures) == null ? void 0 : it.toString()) || "5",
|
|
807
|
+
tcpFailures: ((nt = (ot = (rt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : rt.unhealthy) == null ? void 0 : ot.tcp_failures) == null ? void 0 : nt.toString()) || "5",
|
|
808
|
+
unhealthyHttpStatuses: (ut = (ht = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ht.unhealthy) != null && ut.http_statuses ? s(l.healthchecks.passive.unhealthy.http_statuses) : xt
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
};
|
|
809
812
|
return {
|
|
810
813
|
isInteger: a,
|
|
811
814
|
inRange: R,
|
|
812
815
|
stringToNumberArray: r,
|
|
813
|
-
numberToStringArray:
|
|
814
|
-
upstreamsResponseToFields: (
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
return m.name = i.name || "", m.algorithm = i.algorithm || "round-robin", m.hostHeader = i.host_header || "", m.clientCertificate = i.client_certificate ? (d = i.client_certificate) == null ? void 0 : d.id : "", m.tags = ((H = i.tags) == null ? void 0 : H.join(", ")) || "", m.slots = i.slots !== null && i.slots !== void 0 ? i.slots.toString() : "10000", m.hashOn = i.hash_on || "none", m.hashFallback = i.hash_fallback || "none", m.hashOnHeader = i.hash_on_header || "", m.hashOnCookie = i.hash_on_cookie || "", m.hashOnCookiePath = i.hash_on_cookie_path || "/", m.hashOnQueryArgument = i.hash_on_query_arg || "", m.hashOnUriCapture = i.hash_on_uri_capture || "", m.hashFallbackHeader = i.hash_fallback_header || "", m.hashFallbackQueryArgument = i.hash_fallback_query_arg || "", m.hashFallbackUriCapture = i.hash_fallback_uri_capture || "", m.healthchecksThreshold = i.healthchecks.threshold !== null && i.healthchecks.threshold !== void 0 ? i.healthchecks.threshold.toString() : "", m.activeHealthSwitch = ((t = (f = i.healthchecks.active) == null ? void 0 : f.healthy) == null ? void 0 : t.interval) !== 0 || ((I = (D = i.healthchecks.active) == null ? void 0 : D.unhealthy) == null ? void 0 : I.interval) !== 0, m.activeHealthCheck.type = ((p = i.healthchecks.active) == null ? void 0 : p.type) || "http", m.activeHealthCheck.httpPath = ((S = i.healthchecks.active) == null ? void 0 : S.http_path) || "/", m.activeHealthCheck.timeout = ((Y = i.healthchecks.active) == null ? void 0 : Y.timeout) !== null && ((O = i.healthchecks.active) == null ? void 0 : O.timeout) !== void 0 ? (ae = (ee = i.healthchecks.active) == null ? void 0 : ee.timeout) == null ? void 0 : ae.toString() : "", m.activeHealthCheck.concurrency = ((b = i.healthchecks.active) == null ? void 0 : b.concurrency) !== null && ((U = i.healthchecks.active) == null ? void 0 : U.concurrency) !== void 0 ? (q = (T = i.healthchecks.active) == null ? void 0 : T.concurrency) == null ? void 0 : q.toString() : "", m.activeHealthCheck.httpsSni = ((g = i.healthchecks.active) == null ? void 0 : g.https_sni) || "", m.activeHealthCheck.verifySsl = ((j = i.healthchecks.active) == null ? void 0 : j.https_verify_certificate) || !1, m.activeHealthCheck.headers = (G = i.healthchecks.active) != null && G.headers && Object.entries((ie = i.healthchecks.active) == null ? void 0 : ie.headers).length > 0 ? Object.entries((re = i.healthchecks.active) == null ? void 0 : re.headers).map(([Ca, Oe]) => ({ key: Ca, values: Oe == null ? void 0 : Oe.join(", ") })) : [{ key: "", values: "" }], m.activeHealthCheck.interval = ((K = (P = i.healthchecks.active) == null ? void 0 : P.healthy) == null ? void 0 : K.interval) !== null && ((Q = (J = i.healthchecks.active) == null ? void 0 : J.healthy) == null ? void 0 : Q.interval) !== void 0 ? (N = (C = (Z = i.healthchecks.active) == null ? void 0 : Z.healthy) == null ? void 0 : C.interval) == null ? void 0 : N.toString() : "0", m.activeHealthCheck.interval = ((s = (c = i.healthchecks.active) == null ? void 0 : c.healthy) == null ? void 0 : s.interval) !== null && ((M = (o = i.healthchecks.active) == null ? void 0 : o.healthy) == null ? void 0 : M.interval) !== void 0 ? (B = ($ = (L = i.healthchecks.active) == null ? void 0 : L.healthy) == null ? void 0 : $.interval) == null ? void 0 : B.toString() : "0", m.activeHealthCheck.successes = ((X = (le = i.healthchecks.active) == null ? void 0 : le.healthy) == null ? void 0 : X.successes) !== null && ((pe = (te = i.healthchecks.active) == null ? void 0 : te.healthy) == null ? void 0 : pe.successes) !== void 0 ? (Qe = (je = (De = i.healthchecks.active) == null ? void 0 : De.healthy) == null ? void 0 : je.successes) == null ? void 0 : Qe.toString() : "0", m.activeHealthCheck.httpStatuses = (We = (Le = i.healthchecks.active) == null ? void 0 : Le.healthy) != null && We.http_statuses ? l(((ze = (Je = i.healthchecks.active) == null ? void 0 : Je.healthy) == null ? void 0 : ze.http_statuses) || []) : Ae, m.activeHealthCheck.unhealthyInterval = ((Xe = (Ge = i.healthchecks.active) == null ? void 0 : Ge.unhealthy) == null ? void 0 : Xe.interval) !== null && ((Ze = (Ye = i.healthchecks.active) == null ? void 0 : Ye.unhealthy) == null ? void 0 : Ze.interval) !== void 0 ? (at = (tt = (et = i.healthchecks.active) == null ? void 0 : et.unhealthy) == null ? void 0 : tt.interval) == null ? void 0 : at.toString() : "0", m.activeHealthCheck.httpFailures = ((st = (lt = i.healthchecks.active) == null ? void 0 : lt.unhealthy) == null ? void 0 : st.http_failures) !== null && ((it = (rt = i.healthchecks.active) == null ? void 0 : rt.unhealthy) == null ? void 0 : it.http_failures) !== void 0 ? (ht = (nt = (ot = i.healthchecks.active) == null ? void 0 : ot.unhealthy) == null ? void 0 : nt.http_failures) == null ? void 0 : ht.toString() : "0", m.activeHealthCheck.unhealthyTimeouts = ((ct = (ut = i.healthchecks.active) == null ? void 0 : ut.unhealthy) == null ? void 0 : ct.timeouts) !== null && ((pt = (dt = i.healthchecks.active) == null ? void 0 : dt.unhealthy) == null ? void 0 : pt.timeouts) !== void 0 ? (vt = (ft = (mt = i.healthchecks.active) == null ? void 0 : mt.unhealthy) == null ? void 0 : ft.timeouts) == null ? void 0 : vt.toString() : "0", m.activeHealthCheck.unhealthyHttpStatuses = (yt = (gt = i.healthchecks.active) == null ? void 0 : gt.unhealthy) != null && yt.http_statuses ? l(((kt = (bt = i.healthchecks.active) == null ? void 0 : bt.unhealthy) == null ? void 0 : kt.http_statuses) || []) : Ke, m.passiveHealthSwitch = ((Ct = (_t = i.healthchecks.passive) == null ? void 0 : _t.healthy) == null ? void 0 : Ct.successes) !== 0 || ((St = (Ht = i.healthchecks.passive) == null ? void 0 : Ht.unhealthy) == null ? void 0 : St.timeouts) !== 0 || ((It = (Ut = i.healthchecks.passive) == null ? void 0 : Ut.unhealthy) == null ? void 0 : It.tcp_failures) !== 0 || ((qt = (wt = i.healthchecks.passive) == null ? void 0 : wt.unhealthy) == null ? void 0 : qt.http_failures) !== 0, m.passiveHealthCheck.type = ((Ft = i.healthchecks.passive) == null ? void 0 : Ft.type) || "http", m.passiveHealthCheck.successes = ((xt = (Tt = i.healthchecks.passive) == null ? void 0 : Tt.healthy) == null ? void 0 : xt.successes) !== null && (($t = (Ot = i.healthchecks.passive) == null ? void 0 : Ot.healthy) == null ? void 0 : $t.successes) !== void 0 ? (Mt = (At = (Pt = i.healthchecks.passive) == null ? void 0 : Pt.healthy) == null ? void 0 : At.successes) == null ? void 0 : Mt.toString() : "0", m.passiveHealthCheck.httpStatuses = (Nt = (Kt = i.healthchecks.passive) == null ? void 0 : Kt.healthy) != null && Nt.http_statuses ? l(((Bt = (Vt = i.healthchecks.passive) == null ? void 0 : Vt.healthy) == null ? void 0 : Bt.http_statuses) || []) : Me, m.passiveHealthCheck.timeouts = ((Rt = (Et = i.healthchecks.passive) == null ? void 0 : Et.unhealthy) == null ? void 0 : Rt.timeouts) !== null && ((jt = (Dt = i.healthchecks.passive) == null ? void 0 : Dt.unhealthy) == null ? void 0 : jt.timeouts) !== void 0 ? (Wt = (Lt = (Qt = i.healthchecks.passive) == null ? void 0 : Qt.unhealthy) == null ? void 0 : Lt.timeouts) == null ? void 0 : Wt.toString() : "0", m.passiveHealthCheck.tcpFailures = ((zt = (Jt = i.healthchecks.passive) == null ? void 0 : Jt.unhealthy) == null ? void 0 : zt.tcp_failures) !== null && ((Xt = (Gt = i.healthchecks.passive) == null ? void 0 : Gt.unhealthy) == null ? void 0 : Xt.tcp_failures) !== void 0 ? (ea = (Zt = (Yt = i.healthchecks.passive) == null ? void 0 : Yt.unhealthy) == null ? void 0 : Zt.tcp_failures) == null ? void 0 : ea.toString() : "", m.passiveHealthCheck.unhealthyHttpStatuses = (aa = (ta = i.healthchecks.passive) == null ? void 0 : ta.unhealthy) != null && aa.http_statuses ? l(((sa = (la = i.healthchecks.passive) == null ? void 0 : la.unhealthy) == null ? void 0 : sa.http_statuses) || []) : Ne, m;
|
|
818
|
-
},
|
|
819
|
-
getDefaultUpstreamFields: u,
|
|
820
|
-
objectsAreEqual: (i, m) => {
|
|
816
|
+
numberToStringArray: s,
|
|
817
|
+
upstreamsResponseToFields: (l) => u(l),
|
|
818
|
+
getDefaultUpstreamFields: () => u(),
|
|
819
|
+
objectsAreEqual: (l, c) => {
|
|
821
820
|
try {
|
|
822
|
-
return JSON.stringify(
|
|
821
|
+
return JSON.stringify(l) === JSON.stringify(c);
|
|
823
822
|
} catch {
|
|
824
823
|
return !1;
|
|
825
824
|
}
|
|
826
825
|
},
|
|
827
|
-
cloneDeep: (
|
|
826
|
+
cloneDeep: (l) => JSON.parse(JSON.stringify(l))
|
|
828
827
|
};
|
|
829
828
|
}
|
|
830
829
|
const ce = {
|
|
831
|
-
useI18n:
|
|
830
|
+
useI18n: Lt,
|
|
832
831
|
useMultiselectCreation: _e,
|
|
833
|
-
useHelpers:
|
|
834
|
-
}, fe = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
832
|
+
useHelpers: Fe
|
|
833
|
+
}, fe = "/v2/control-planes/{controlPlaneId}/core-entities", ye = "/{workspace}", ke = {
|
|
835
834
|
list: {
|
|
836
835
|
konnect: `${fe}/upstreams`,
|
|
837
|
-
kongManager: `${
|
|
836
|
+
kongManager: `${ye}/upstreams`
|
|
838
837
|
},
|
|
839
838
|
form: {
|
|
840
839
|
konnect: {
|
|
@@ -845,14 +844,14 @@ const ce = {
|
|
|
845
844
|
edit: `${fe}/upstreams/{id}`
|
|
846
845
|
},
|
|
847
846
|
kongManager: {
|
|
848
|
-
getServices: `${
|
|
849
|
-
getCertificates: `${
|
|
850
|
-
validate: `${
|
|
851
|
-
create: `${
|
|
852
|
-
edit: `${
|
|
847
|
+
getServices: `${ye}/services`,
|
|
848
|
+
getCertificates: `${ye}/certificates`,
|
|
849
|
+
validate: `${ye}/schemas/upstreams/validate`,
|
|
850
|
+
create: `${ye}/upstreams`,
|
|
851
|
+
edit: `${ye}/upstreams/{id}`
|
|
853
852
|
}
|
|
854
853
|
}
|
|
855
|
-
},
|
|
854
|
+
}, Yt = { class: "kong-ui-entities-upstreams-list" }, Zt = { class: "upstream-name" }, ea = /* @__PURE__ */ oe({
|
|
856
855
|
__name: "UpstreamsList",
|
|
857
856
|
props: {
|
|
858
857
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -899,111 +898,111 @@ const ce = {
|
|
|
899
898
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
900
899
|
setup(a, { emit: R }) {
|
|
901
900
|
var Z;
|
|
902
|
-
const r = R,
|
|
901
|
+
const r = R, s = a, { i18n: { t: u } } = ce.useI18n(), k = Ut(), { axiosInstance: g } = Te((Z = s.config) == null ? void 0 : Z.axiosRequestConfig), V = M(1), T = q(() => s.config.app !== "kongManager" || !!s.config.disableSorting), l = {
|
|
903
902
|
// the Name column is non-hidable
|
|
904
903
|
name: { label: u("upstreams.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
905
904
|
slots: { label: u("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
906
905
|
tags: { label: u("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
907
|
-
},
|
|
908
|
-
var N,
|
|
909
|
-
let
|
|
910
|
-
return
|
|
911
|
-
}),
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
906
|
+
}, c = l, C = q(() => {
|
|
907
|
+
var N, d;
|
|
908
|
+
let _ = `${s.config.apiBaseUrl}${ke.list[s.config.app]}`;
|
|
909
|
+
return s.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((N = s.config) == null ? void 0 : N.controlPlaneId) || "") : s.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (d = s.config) != null && d.workspace ? `/${s.config.workspace}` : "")), _;
|
|
910
|
+
}), m = M(""), t = q(() => {
|
|
911
|
+
const _ = s.config.app === "konnect" || s.config.isExactMatch;
|
|
912
|
+
if (_)
|
|
914
913
|
return {
|
|
915
|
-
isExactMatch:
|
|
914
|
+
isExactMatch: _,
|
|
916
915
|
placeholder: u("upstreams.search.placeholder")
|
|
917
916
|
};
|
|
918
|
-
const { name: N, slots:
|
|
917
|
+
const { name: N, slots: d } = l;
|
|
919
918
|
return {
|
|
920
|
-
isExactMatch:
|
|
921
|
-
fields: { name: N, slots:
|
|
922
|
-
schema:
|
|
919
|
+
isExactMatch: _,
|
|
920
|
+
fields: { name: N, slots: d },
|
|
921
|
+
schema: s.config.filterSchema
|
|
923
922
|
};
|
|
924
|
-
}), { fetcher: D, fetcherState:
|
|
925
|
-
|
|
926
|
-
},
|
|
923
|
+
}), { fetcher: D, fetcherState: U } = vt(s.config, C.value), p = () => {
|
|
924
|
+
m.value = "";
|
|
925
|
+
}, H = () => {
|
|
927
926
|
V.value++;
|
|
928
|
-
}, Y =
|
|
929
|
-
const
|
|
930
|
-
if (!N(
|
|
927
|
+
}, Y = M(null), O = M(!1), ee = (_, N) => {
|
|
928
|
+
const d = _.id;
|
|
929
|
+
if (!N(d)) {
|
|
931
930
|
r("copy:error", {
|
|
932
|
-
entity:
|
|
931
|
+
entity: _,
|
|
933
932
|
field: "id",
|
|
934
933
|
message: u("upstreams.errors.copy")
|
|
935
934
|
});
|
|
936
935
|
return;
|
|
937
936
|
}
|
|
938
937
|
r("copy:success", {
|
|
939
|
-
entity:
|
|
938
|
+
entity: _,
|
|
940
939
|
field: "id",
|
|
941
|
-
message: u("upstreams.copy.success", { val:
|
|
940
|
+
message: u("upstreams.copy.success", { val: d })
|
|
942
941
|
});
|
|
943
|
-
}, ae = (
|
|
944
|
-
const
|
|
945
|
-
if (!N(
|
|
942
|
+
}, ae = (_, N) => {
|
|
943
|
+
const d = JSON.stringify(_);
|
|
944
|
+
if (!N(d)) {
|
|
946
945
|
r("copy:error", {
|
|
947
|
-
entity:
|
|
946
|
+
entity: _,
|
|
948
947
|
message: u("upstreams.errors.copy")
|
|
949
948
|
});
|
|
950
949
|
return;
|
|
951
950
|
}
|
|
952
951
|
r("copy:success", {
|
|
953
|
-
entity:
|
|
952
|
+
entity: _,
|
|
954
953
|
message: u("upstreams.copy.success_brief")
|
|
955
954
|
});
|
|
956
|
-
},
|
|
957
|
-
var
|
|
958
|
-
await ((
|
|
959
|
-
},
|
|
955
|
+
}, v = async (_) => {
|
|
956
|
+
var d;
|
|
957
|
+
await ((d = s.canRetrieve) == null ? void 0 : d.call(s, _)) && k.push(s.config.getViewRoute(_.id));
|
|
958
|
+
}, S = (_) => ({
|
|
960
959
|
label: u("upstreams.actions.view"),
|
|
961
|
-
to:
|
|
962
|
-
}),
|
|
960
|
+
to: s.config.getViewRoute(_)
|
|
961
|
+
}), F = (_) => ({
|
|
963
962
|
label: u("upstreams.actions.edit"),
|
|
964
|
-
to:
|
|
965
|
-
}),
|
|
966
|
-
|
|
963
|
+
to: s.config.getEditRoute(_)
|
|
964
|
+
}), w = M(void 0), y = M(!1), j = M(!1), G = M(""), re = bt(s.config, C.value), ie = (_) => {
|
|
965
|
+
w.value = _, y.value = !0;
|
|
967
966
|
}, P = () => {
|
|
968
|
-
|
|
967
|
+
y.value = !1;
|
|
969
968
|
}, K = async () => {
|
|
970
|
-
var
|
|
971
|
-
if ((
|
|
969
|
+
var _, N, d;
|
|
970
|
+
if ((_ = w.value) != null && _.id) {
|
|
972
971
|
j.value = !0;
|
|
973
972
|
try {
|
|
974
|
-
await
|
|
975
|
-
} catch (
|
|
976
|
-
G.value = ((
|
|
973
|
+
await g.delete(re(w.value.id)), j.value = !1, y.value = !1, V.value++, r("delete:success", w.value);
|
|
974
|
+
} catch (i) {
|
|
975
|
+
G.value = ((d = (N = i.response) == null ? void 0 : N.data) == null ? void 0 : d.message) || i.message || u("upstreams.errors.delete"), r("error", i);
|
|
977
976
|
} finally {
|
|
978
977
|
j.value = !1;
|
|
979
978
|
}
|
|
980
979
|
}
|
|
981
|
-
}, J =
|
|
982
|
-
me(
|
|
983
|
-
var N,
|
|
984
|
-
if (Array.isArray((N =
|
|
980
|
+
}, J = M(!1);
|
|
981
|
+
me(U, (_) => {
|
|
982
|
+
var N, d, i, o;
|
|
983
|
+
if (Array.isArray((N = _ == null ? void 0 : _.response) == null ? void 0 : N.data) && (J.value = _.response.data.length > 0), _.status === we.NoRecords ? O.value = !0 : O.value = !1, _.status === we.Error) {
|
|
985
984
|
Y.value = {
|
|
986
985
|
title: u("upstreams.errors.general")
|
|
987
|
-
}, (o = (
|
|
986
|
+
}, (o = (i = (d = _.error) == null ? void 0 : d.response) == null ? void 0 : i.data) != null && o.message && (Y.value.message = _.error.response.data.message), r("error", _.error);
|
|
988
987
|
return;
|
|
989
988
|
}
|
|
990
989
|
Y.value = null;
|
|
991
990
|
});
|
|
992
|
-
const
|
|
993
|
-
ctaPath:
|
|
991
|
+
const L = M({
|
|
992
|
+
ctaPath: s.config.createRoute,
|
|
994
993
|
ctaText: void 0,
|
|
995
|
-
message: `${u("upstreams.list.empty_state.description")}${
|
|
994
|
+
message: `${u("upstreams.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
996
995
|
title: u("upstreams.title")
|
|
997
996
|
});
|
|
998
|
-
return
|
|
999
|
-
await
|
|
1000
|
-
}), (
|
|
1001
|
-
const
|
|
1002
|
-
return
|
|
1003
|
-
h(e(
|
|
997
|
+
return Me(async () => {
|
|
998
|
+
await s.canCreate() && (L.value.title = u("upstreams.list.empty_state.title"), L.value.ctaText = u("upstreams.actions.create"));
|
|
999
|
+
}), (_, N) => {
|
|
1000
|
+
const d = x("KButton"), i = x("KBadge"), o = x("KTruncate"), A = x("KDropdownItem"), Q = x("KClipboardProvider");
|
|
1001
|
+
return I(), se("div", Yt, [
|
|
1002
|
+
h(e(kt), {
|
|
1004
1003
|
"cache-identifier": a.cacheIdentifier,
|
|
1005
|
-
"disable-sorting":
|
|
1006
|
-
"empty-state-options":
|
|
1004
|
+
"disable-sorting": T.value,
|
|
1005
|
+
"empty-state-options": L.value,
|
|
1007
1006
|
"enable-entity-actions": "",
|
|
1008
1007
|
"error-message": Y.value,
|
|
1009
1008
|
fetcher: e(D),
|
|
@@ -1011,21 +1010,21 @@ const ce = {
|
|
|
1011
1010
|
"hide-toolbar": O.value,
|
|
1012
1011
|
"pagination-type": "offset",
|
|
1013
1012
|
"preferences-storage-key": "kong-ui-entities-upstreams-list",
|
|
1014
|
-
query:
|
|
1015
|
-
"table-headers": e(
|
|
1013
|
+
query: m.value,
|
|
1014
|
+
"table-headers": e(c),
|
|
1016
1015
|
onClearSearchInput: p,
|
|
1017
|
-
"onClick:row": N[1] || (N[1] = ($) =>
|
|
1018
|
-
onSort:
|
|
1016
|
+
"onClick:row": N[1] || (N[1] = ($) => v($)),
|
|
1017
|
+
onSort: H
|
|
1019
1018
|
}, {
|
|
1020
1019
|
"toolbar-filter": n(() => [
|
|
1021
|
-
h(e(
|
|
1022
|
-
modelValue:
|
|
1023
|
-
"onUpdate:modelValue": N[0] || (N[0] = ($) =>
|
|
1020
|
+
h(e(Mt), {
|
|
1021
|
+
modelValue: m.value,
|
|
1022
|
+
"onUpdate:modelValue": N[0] || (N[0] = ($) => m.value = $),
|
|
1024
1023
|
config: t.value
|
|
1025
1024
|
}, null, 8, ["modelValue", "config"])
|
|
1026
1025
|
]),
|
|
1027
1026
|
"toolbar-button": n(() => [
|
|
1028
|
-
(
|
|
1027
|
+
(I(), E(mt, {
|
|
1029
1028
|
disabled: !a.useActionOutside,
|
|
1030
1029
|
to: "#kong-ui-app-page-header-action-button"
|
|
1031
1030
|
}, [
|
|
@@ -1033,19 +1032,19 @@ const ce = {
|
|
|
1033
1032
|
"auth-function": () => a.canCreate()
|
|
1034
1033
|
}, {
|
|
1035
1034
|
default: n(() => [
|
|
1036
|
-
|
|
1035
|
+
ft(h(d, {
|
|
1037
1036
|
appearance: "primary",
|
|
1038
1037
|
"data-testid": "toolbar-add-upstream",
|
|
1039
1038
|
size: a.useActionOutside ? "medium" : "large",
|
|
1040
1039
|
to: a.config.createRoute
|
|
1041
1040
|
}, {
|
|
1042
1041
|
default: n(() => [
|
|
1043
|
-
h(e(
|
|
1044
|
-
W(" " +
|
|
1042
|
+
h(e(Ne)),
|
|
1043
|
+
W(" " + f(e(u)("upstreams.list.toolbar_actions.new_upstream")), 1)
|
|
1045
1044
|
]),
|
|
1046
1045
|
_: 1
|
|
1047
1046
|
}, 8, ["size", "to"]), [
|
|
1048
|
-
[
|
|
1047
|
+
[yt, J.value]
|
|
1049
1048
|
])
|
|
1050
1049
|
]),
|
|
1051
1050
|
_: 1
|
|
@@ -1053,17 +1052,17 @@ const ce = {
|
|
|
1053
1052
|
], 8, ["disabled"]))
|
|
1054
1053
|
]),
|
|
1055
1054
|
name: n(({ rowValue: $ }) => [
|
|
1056
|
-
|
|
1055
|
+
b("span", Zt, f($), 1)
|
|
1057
1056
|
]),
|
|
1058
1057
|
tags: n(({ rowValue: $ }) => [
|
|
1059
1058
|
h(o, null, {
|
|
1060
1059
|
default: n(() => [
|
|
1061
|
-
(
|
|
1060
|
+
(I(!0), se(be, null, Ae($, (B) => (I(), E(i, {
|
|
1062
1061
|
key: B,
|
|
1063
1062
|
"max-width": "auto"
|
|
1064
1063
|
}, {
|
|
1065
1064
|
default: n(() => [
|
|
1066
|
-
W(
|
|
1065
|
+
W(f(B), 1)
|
|
1067
1066
|
]),
|
|
1068
1067
|
_: 2
|
|
1069
1068
|
}, 1024))), 128))
|
|
@@ -1072,28 +1071,28 @@ const ce = {
|
|
|
1072
1071
|
}, 1024)
|
|
1073
1072
|
]),
|
|
1074
1073
|
actions: n(({ row: $ }) => [
|
|
1075
|
-
h(
|
|
1074
|
+
h(Q, null, {
|
|
1076
1075
|
default: n(({ copyToClipboard: B }) => [
|
|
1077
|
-
h(
|
|
1076
|
+
h(A, {
|
|
1078
1077
|
"data-testid": "action-entity-copy-id",
|
|
1079
1078
|
onClick: (le) => ee($, B)
|
|
1080
1079
|
}, {
|
|
1081
1080
|
default: n(() => [
|
|
1082
|
-
W(
|
|
1081
|
+
W(f(e(u)("upstreams.actions.copy_id")), 1)
|
|
1083
1082
|
]),
|
|
1084
1083
|
_: 2
|
|
1085
1084
|
}, 1032, ["onClick"])
|
|
1086
1085
|
]),
|
|
1087
1086
|
_: 2
|
|
1088
1087
|
}, 1024),
|
|
1089
|
-
h(
|
|
1088
|
+
h(Q, null, {
|
|
1090
1089
|
default: n(({ copyToClipboard: B }) => [
|
|
1091
|
-
h(
|
|
1090
|
+
h(A, {
|
|
1092
1091
|
"data-testid": "action-entity-copy-json",
|
|
1093
1092
|
onClick: (le) => ae($, B)
|
|
1094
1093
|
}, {
|
|
1095
1094
|
default: n(() => [
|
|
1096
|
-
W(
|
|
1095
|
+
W(f(e(u)("upstreams.actions.copy_json")), 1)
|
|
1097
1096
|
]),
|
|
1098
1097
|
_: 2
|
|
1099
1098
|
}, 1032, ["onClick"])
|
|
@@ -1104,10 +1103,10 @@ const ce = {
|
|
|
1104
1103
|
"auth-function": () => a.canRetrieve($)
|
|
1105
1104
|
}, {
|
|
1106
1105
|
default: n(() => [
|
|
1107
|
-
h(
|
|
1106
|
+
h(A, {
|
|
1108
1107
|
"data-testid": "action-entity-view",
|
|
1109
1108
|
"has-divider": "",
|
|
1110
|
-
item:
|
|
1109
|
+
item: S($.id)
|
|
1111
1110
|
}, null, 8, ["item"])
|
|
1112
1111
|
]),
|
|
1113
1112
|
_: 2
|
|
@@ -1116,9 +1115,9 @@ const ce = {
|
|
|
1116
1115
|
"auth-function": () => a.canEdit($)
|
|
1117
1116
|
}, {
|
|
1118
1117
|
default: n(() => [
|
|
1119
|
-
h(
|
|
1118
|
+
h(A, {
|
|
1120
1119
|
"data-testid": "action-entity-edit",
|
|
1121
|
-
item:
|
|
1120
|
+
item: F($.id)
|
|
1122
1121
|
}, null, 8, ["item"])
|
|
1123
1122
|
]),
|
|
1124
1123
|
_: 2
|
|
@@ -1127,14 +1126,14 @@ const ce = {
|
|
|
1127
1126
|
"auth-function": () => a.canDelete($)
|
|
1128
1127
|
}, {
|
|
1129
1128
|
default: n(() => [
|
|
1130
|
-
h(
|
|
1129
|
+
h(A, {
|
|
1131
1130
|
danger: "",
|
|
1132
1131
|
"data-testid": "action-entity-delete",
|
|
1133
1132
|
"has-divider": "",
|
|
1134
|
-
onClick: (B) =>
|
|
1133
|
+
onClick: (B) => ie($)
|
|
1135
1134
|
}, {
|
|
1136
1135
|
default: n(() => [
|
|
1137
|
-
W(
|
|
1136
|
+
W(f(e(u)("upstreams.actions.delete")), 1)
|
|
1138
1137
|
]),
|
|
1139
1138
|
_: 2
|
|
1140
1139
|
}, 1032, ["onClick"])
|
|
@@ -1144,14 +1143,14 @@ const ce = {
|
|
|
1144
1143
|
]),
|
|
1145
1144
|
_: 1
|
|
1146
1145
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "query", "table-headers"]),
|
|
1147
|
-
h(e(
|
|
1146
|
+
h(e(_t), {
|
|
1148
1147
|
"action-pending": j.value,
|
|
1149
1148
|
description: e(u)("upstreams.delete.description"),
|
|
1150
|
-
"entity-name":
|
|
1151
|
-
"entity-type": e(
|
|
1149
|
+
"entity-name": w.value && (w.value.name || w.value.id),
|
|
1150
|
+
"entity-type": e(Ct).Upstream,
|
|
1152
1151
|
error: G.value,
|
|
1153
1152
|
title: e(u)("upstreams.delete.title"),
|
|
1154
|
-
visible:
|
|
1153
|
+
visible: y.value,
|
|
1155
1154
|
onCancel: P,
|
|
1156
1155
|
onProceed: K
|
|
1157
1156
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -1160,10 +1159,10 @@ const ce = {
|
|
|
1160
1159
|
}
|
|
1161
1160
|
}), de = (a, R) => {
|
|
1162
1161
|
const r = a.__vccOpts || a;
|
|
1163
|
-
for (const [
|
|
1164
|
-
r[
|
|
1162
|
+
for (const [s, u] of R)
|
|
1163
|
+
r[s] = u;
|
|
1165
1164
|
return r;
|
|
1166
|
-
},
|
|
1165
|
+
}, Qa = /* @__PURE__ */ de(ea, [["__scopeId", "data-v-f95599ac"]]), He = "/v2/control-planes/{controlPlaneId}/core-entities", Se = "/{workspace}", Ue = {
|
|
1167
1166
|
list: {
|
|
1168
1167
|
konnect: `${He}/upstreams/{upstreamId}/targets`,
|
|
1169
1168
|
kongManager: `${Se}/upstreams/{upstreamId}/targets`
|
|
@@ -1180,10 +1179,10 @@ const ce = {
|
|
|
1180
1179
|
validate: `${Se}/schemas/targets/validate`
|
|
1181
1180
|
}
|
|
1182
1181
|
}
|
|
1183
|
-
},
|
|
1182
|
+
}, ta = { class: "kong-ui-entities-target-form" }, aa = { class: "target-form-container" }, la = {
|
|
1184
1183
|
key: 0,
|
|
1185
1184
|
class: "target-form-info"
|
|
1186
|
-
},
|
|
1185
|
+
}, sa = /* @__PURE__ */ oe({
|
|
1187
1186
|
__name: "TargetForm",
|
|
1188
1187
|
props: {
|
|
1189
1188
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1208,10 +1207,10 @@ const ce = {
|
|
|
1208
1207
|
emits: ["update", "error", "loading", "cancel"],
|
|
1209
1208
|
setup(a, { emit: R }) {
|
|
1210
1209
|
var ae;
|
|
1211
|
-
const r = R,
|
|
1212
|
-
var
|
|
1213
|
-
return Ue.form[
|
|
1214
|
-
}),
|
|
1210
|
+
const r = R, s = a, { i18n: { t: u } } = ce.useI18n(), { getMessageFromError: k } = Ht(), { axiosInstance: g } = Te((ae = s.config) == null ? void 0 : ae.axiosRequestConfig), V = q(() => {
|
|
1211
|
+
var v;
|
|
1212
|
+
return Ue.form[s.config.app].edit.replace(/{upstreamId}/gi, ((v = s.config) == null ? void 0 : v.upstreamId) || "");
|
|
1213
|
+
}), T = q(() => s.targetId ? he.Edit : he.Create), l = q(() => T.value === he.Edit ? u("targets.form.edit.title") : u("targets.form.create.title")), c = Ie({
|
|
1215
1214
|
fields: {
|
|
1216
1215
|
target: "",
|
|
1217
1216
|
weight: 100,
|
|
@@ -1219,91 +1218,91 @@ const ce = {
|
|
|
1219
1218
|
},
|
|
1220
1219
|
isReadonly: !1,
|
|
1221
1220
|
errorMessage: ""
|
|
1222
|
-
}),
|
|
1221
|
+
}), C = Ie({
|
|
1223
1222
|
target: "",
|
|
1224
1223
|
weight: 100,
|
|
1225
1224
|
tags: ""
|
|
1226
|
-
}),
|
|
1225
|
+
}), m = {
|
|
1227
1226
|
target: "",
|
|
1228
1227
|
weight: 100,
|
|
1229
1228
|
tags: ""
|
|
1230
|
-
}, t =
|
|
1231
|
-
const
|
|
1232
|
-
return
|
|
1233
|
-
}), D =
|
|
1234
|
-
() => JSON.stringify(
|
|
1235
|
-
),
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1229
|
+
}, t = q(() => {
|
|
1230
|
+
const v = parseInt(c.fields.weight.toString(), 10);
|
|
1231
|
+
return v < 0 || v > 65535;
|
|
1232
|
+
}), D = q(
|
|
1233
|
+
() => JSON.stringify(c.fields) !== JSON.stringify(C) && !!c.fields.target && !!c.fields.weight && !t.value
|
|
1234
|
+
), U = (v) => {
|
|
1235
|
+
var S;
|
|
1236
|
+
c.fields.target = (v == null ? void 0 : v.target) || "", c.fields.weight = (v == null ? void 0 : v.weight) ?? "", c.fields.tags = ((S = v == null ? void 0 : v.tags) == null ? void 0 : S.join(", ")) || "", Object.assign(C, c.fields);
|
|
1238
1237
|
}, p = () => {
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
var
|
|
1242
|
-
let
|
|
1243
|
-
return
|
|
1244
|
-
}), Y =
|
|
1245
|
-
var
|
|
1246
|
-
let
|
|
1247
|
-
return
|
|
1248
|
-
}), O =
|
|
1249
|
-
var
|
|
1238
|
+
c.errorMessage = "", r("cancel");
|
|
1239
|
+
}, H = q(() => {
|
|
1240
|
+
var S, F;
|
|
1241
|
+
let v = `${s.config.apiBaseUrl}${Ue.form[s.config.app].validate}`;
|
|
1242
|
+
return s.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((S = s.config) == null ? void 0 : S.controlPlaneId) || "") : s.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (F = s.config) != null && F.workspace ? `/${s.config.workspace}` : "")), v = v.replace(/{id}/gi, s.targetId), v;
|
|
1243
|
+
}), Y = q(() => {
|
|
1244
|
+
var S, F, w, y;
|
|
1245
|
+
let v = `${s.config.apiBaseUrl}${Ue.form[s.config.app][T.value]}`;
|
|
1246
|
+
return s.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((S = s.config) == null ? void 0 : S.controlPlaneId) || "").replace(/{upstreamId}/gi, ((F = s.config) == null ? void 0 : F.upstreamId) || "") : s.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (w = s.config) != null && w.workspace ? `/${s.config.workspace}` : "").replace(/{upstreamId}/gi, ((y = s.config) == null ? void 0 : y.upstreamId) || "")), v = v.replace(/{id}/gi, s.targetId), v;
|
|
1247
|
+
}), O = q(() => {
|
|
1248
|
+
var v, S, F;
|
|
1250
1249
|
return {
|
|
1251
|
-
target:
|
|
1252
|
-
weight: parseInt(
|
|
1253
|
-
tags: (
|
|
1254
|
-
upstream: { id:
|
|
1250
|
+
target: c.fields.target,
|
|
1251
|
+
weight: parseInt(c.fields.weight),
|
|
1252
|
+
tags: (F = (S = (v = c.fields.tags) == null ? void 0 : v.split(",")) == null ? void 0 : S.map((w) => String(w || "").trim())) == null ? void 0 : F.filter((w) => w !== ""),
|
|
1253
|
+
upstream: { id: s.config.upstreamId }
|
|
1255
1254
|
};
|
|
1256
1255
|
}), ee = async () => {
|
|
1257
|
-
var
|
|
1256
|
+
var v, S;
|
|
1258
1257
|
try {
|
|
1259
|
-
|
|
1260
|
-
let
|
|
1261
|
-
if (await
|
|
1262
|
-
const { data:
|
|
1263
|
-
|
|
1258
|
+
c.isReadonly = !0, c.errorMessage = "";
|
|
1259
|
+
let F;
|
|
1260
|
+
if (await g.post(H.value, O.value), T.value === "create" ? F = await g.post(Y.value, O.value) : T.value === "edit" && (F = ((v = s.config) == null ? void 0 : v.app) === "konnect" ? await g.put(Y.value, O.value) : await g.patch(Y.value, O.value)), F) {
|
|
1261
|
+
const { data: w } = F;
|
|
1262
|
+
c.fields.target = (w == null ? void 0 : w.name) || "", c.fields.weight = (w == null ? void 0 : w.weight) ?? 100, c.fields.tags = ((S = w == null ? void 0 : w.tags) == null ? void 0 : S.join(", ")) || "", r("update", w), Object.assign(c.fields, m);
|
|
1264
1263
|
}
|
|
1265
|
-
} catch (
|
|
1266
|
-
|
|
1264
|
+
} catch (F) {
|
|
1265
|
+
c.errorMessage = k(F), r("error", F);
|
|
1267
1266
|
} finally {
|
|
1268
|
-
|
|
1267
|
+
c.isReadonly = !1;
|
|
1269
1268
|
}
|
|
1270
1269
|
};
|
|
1271
|
-
return me(() =>
|
|
1272
|
-
Object.assign(
|
|
1273
|
-
}), (
|
|
1274
|
-
const
|
|
1275
|
-
return
|
|
1276
|
-
"action-button-disabled": !D.value ||
|
|
1270
|
+
return me(() => s.targetId, () => {
|
|
1271
|
+
Object.assign(c.fields, m);
|
|
1272
|
+
}), (v, S) => {
|
|
1273
|
+
const F = x("KInput"), w = x("KPrompt");
|
|
1274
|
+
return I(), E(w, {
|
|
1275
|
+
"action-button-disabled": !D.value || c.isReadonly,
|
|
1277
1276
|
"action-button-text": e(u)("targets.form.buttons.save"),
|
|
1278
1277
|
"cancel-button-text": e(u)("targets.form.buttons.cancel"),
|
|
1279
|
-
title:
|
|
1278
|
+
title: l.value,
|
|
1280
1279
|
visible: a.isVisible,
|
|
1281
1280
|
onCancel: p,
|
|
1282
1281
|
onProceed: ee
|
|
1283
1282
|
}, {
|
|
1284
1283
|
default: n(() => [
|
|
1285
|
-
|
|
1286
|
-
h(e(
|
|
1284
|
+
b("div", ta, [
|
|
1285
|
+
h(e(St), {
|
|
1287
1286
|
config: a.config,
|
|
1288
1287
|
"edit-id": a.targetId,
|
|
1289
|
-
"entity-type": e(
|
|
1290
|
-
"error-message":
|
|
1288
|
+
"entity-type": e(Ke).Target,
|
|
1289
|
+
"error-message": c.errorMessage,
|
|
1291
1290
|
"fetch-url": V.value,
|
|
1292
1291
|
"form-fields": O.value,
|
|
1293
|
-
"is-readonly":
|
|
1292
|
+
"is-readonly": c.isReadonly,
|
|
1294
1293
|
onCancel: p,
|
|
1295
|
-
"onFetch:error":
|
|
1296
|
-
"onFetch:success":
|
|
1297
|
-
onLoading:
|
|
1294
|
+
"onFetch:error": S[3] || (S[3] = (y) => v.$emit("error", y)),
|
|
1295
|
+
"onFetch:success": U,
|
|
1296
|
+
onLoading: S[4] || (S[4] = (y) => v.$emit("loading", y))
|
|
1298
1297
|
}, {
|
|
1299
1298
|
default: n(() => [
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1299
|
+
b("div", aa, [
|
|
1300
|
+
v.$slots.info ? (I(), se("div", la, [
|
|
1301
|
+
gt(v.$slots, "info", {}, void 0, !0)
|
|
1303
1302
|
])) : z("", !0),
|
|
1304
|
-
h(
|
|
1305
|
-
modelValue:
|
|
1306
|
-
"onUpdate:modelValue":
|
|
1303
|
+
h(F, {
|
|
1304
|
+
modelValue: c.fields.target,
|
|
1305
|
+
"onUpdate:modelValue": S[0] || (S[0] = (y) => c.fields.target = y),
|
|
1307
1306
|
modelModifiers: { trim: !0 },
|
|
1308
1307
|
autocomplete: "off",
|
|
1309
1308
|
class: "target-form-input",
|
|
@@ -1314,13 +1313,13 @@ const ce = {
|
|
|
1314
1313
|
tooltipAttributes: { maxWidth: "400" }
|
|
1315
1314
|
},
|
|
1316
1315
|
placeholder: e(u)("targets.form.fields.target.placeholder"),
|
|
1317
|
-
readonly:
|
|
1316
|
+
readonly: c.isReadonly,
|
|
1318
1317
|
required: "",
|
|
1319
1318
|
type: "text"
|
|
1320
1319
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1321
|
-
h(
|
|
1322
|
-
modelValue:
|
|
1323
|
-
"onUpdate:modelValue":
|
|
1320
|
+
h(F, {
|
|
1321
|
+
modelValue: c.fields.weight,
|
|
1322
|
+
"onUpdate:modelValue": S[1] || (S[1] = (y) => c.fields.weight = y),
|
|
1324
1323
|
autocomplete: "off",
|
|
1325
1324
|
class: "target-form-input",
|
|
1326
1325
|
"data-testid": "target-form-weight",
|
|
@@ -1333,13 +1332,13 @@ const ce = {
|
|
|
1333
1332
|
},
|
|
1334
1333
|
max: "65535",
|
|
1335
1334
|
min: "0",
|
|
1336
|
-
readonly:
|
|
1335
|
+
readonly: c.isReadonly,
|
|
1337
1336
|
required: "",
|
|
1338
1337
|
type: "number"
|
|
1339
1338
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "readonly"]),
|
|
1340
|
-
h(
|
|
1341
|
-
modelValue:
|
|
1342
|
-
"onUpdate:modelValue":
|
|
1339
|
+
h(F, {
|
|
1340
|
+
modelValue: c.fields.tags,
|
|
1341
|
+
"onUpdate:modelValue": S[2] || (S[2] = (y) => c.fields.tags = y),
|
|
1343
1342
|
modelModifiers: { trim: !0 },
|
|
1344
1343
|
autocomplete: "off",
|
|
1345
1344
|
class: "target-form-input",
|
|
@@ -1347,7 +1346,7 @@ const ce = {
|
|
|
1347
1346
|
help: e(u)("targets.form.fields.tags.help"),
|
|
1348
1347
|
label: e(u)("targets.form.fields.tags.label"),
|
|
1349
1348
|
placeholder: e(u)("targets.form.fields.tags.placeholder"),
|
|
1350
|
-
readonly:
|
|
1349
|
+
readonly: c.isReadonly,
|
|
1351
1350
|
type: "text"
|
|
1352
1351
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
1353
1352
|
])
|
|
@@ -1360,7 +1359,7 @@ const ce = {
|
|
|
1360
1359
|
}, 8, ["action-button-disabled", "action-button-text", "cancel-button-text", "title", "visible"]);
|
|
1361
1360
|
};
|
|
1362
1361
|
}
|
|
1363
|
-
}),
|
|
1362
|
+
}), ia = /* @__PURE__ */ de(sa, [["__scopeId", "data-v-6a64b86e"]]), ra = { class: "kong-ui-entities-targets-list" }, oa = { class: "target-address" }, na = /* @__PURE__ */ oe({
|
|
1364
1363
|
__name: "TargetsList",
|
|
1365
1364
|
props: {
|
|
1366
1365
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1400,129 +1399,129 @@ const ce = {
|
|
|
1400
1399
|
},
|
|
1401
1400
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
1402
1401
|
setup(a, { emit: R }) {
|
|
1403
|
-
var
|
|
1404
|
-
const r = R,
|
|
1402
|
+
var d;
|
|
1403
|
+
const r = R, s = a, { i18n: { t: u } } = ce.useI18n(), { axiosInstance: k } = Te((d = s.config) == null ? void 0 : d.axiosRequestConfig), g = M(1), V = q(() => s.config.app !== "kongManager" || !!s.config.disableSorting), l = {
|
|
1405
1404
|
// the Target Address column is non-hidable
|
|
1406
1405
|
target: { label: u("targets.list.table_headers.target_address"), sortable: !0, hidable: !1 },
|
|
1407
1406
|
weight: { label: u("targets.list.table_headers.weight"), sortable: !0 },
|
|
1408
1407
|
tags: { label: u("targets.list.table_headers.tags"), sortable: !1 }
|
|
1409
|
-
},
|
|
1410
|
-
var o,
|
|
1411
|
-
let
|
|
1412
|
-
return
|
|
1413
|
-
}), { fetcher:
|
|
1414
|
-
|
|
1415
|
-
}, D =
|
|
1416
|
-
|
|
1417
|
-
},
|
|
1418
|
-
const
|
|
1419
|
-
if (!o(
|
|
1408
|
+
}, c = q(() => {
|
|
1409
|
+
var o, A, Q, $;
|
|
1410
|
+
let i = `${s.config.apiBaseUrl}${Ue.list[s.config.app]}`;
|
|
1411
|
+
return s.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((o = s.config) == null ? void 0 : o.controlPlaneId) || "").replace(/{upstreamId}/gi, ((A = s.config) == null ? void 0 : A.upstreamId) || "") : s.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (Q = s.config) != null && Q.workspace ? `/${s.config.workspace}` : "").replace(/{upstreamId}/gi, (($ = s.config) == null ? void 0 : $.upstreamId) || "")), i;
|
|
1412
|
+
}), { fetcher: C, fetcherState: m } = vt(s.config, c.value), t = () => {
|
|
1413
|
+
g.value++;
|
|
1414
|
+
}, D = M(null), U = M(!1), p = () => {
|
|
1415
|
+
L.value = !0;
|
|
1416
|
+
}, H = (i, o) => {
|
|
1417
|
+
const A = i.id;
|
|
1418
|
+
if (!o(A)) {
|
|
1420
1419
|
r("copy:error", {
|
|
1421
|
-
entity:
|
|
1420
|
+
entity: i,
|
|
1422
1421
|
field: "id",
|
|
1423
1422
|
message: u("targets.errors.copy")
|
|
1424
1423
|
});
|
|
1425
1424
|
return;
|
|
1426
1425
|
}
|
|
1427
1426
|
r("copy:success", {
|
|
1428
|
-
entity:
|
|
1427
|
+
entity: i,
|
|
1429
1428
|
field: "id",
|
|
1430
|
-
message: u("targets.copy.success", { val:
|
|
1429
|
+
message: u("targets.copy.success", { val: A })
|
|
1431
1430
|
});
|
|
1432
|
-
}, Y = (
|
|
1433
|
-
const
|
|
1434
|
-
if (!o(
|
|
1431
|
+
}, Y = (i, o) => {
|
|
1432
|
+
const A = JSON.stringify(i);
|
|
1433
|
+
if (!o(A)) {
|
|
1435
1434
|
r("copy:error", {
|
|
1436
|
-
entity:
|
|
1435
|
+
entity: i,
|
|
1437
1436
|
message: u("targets.errors.copy")
|
|
1438
1437
|
});
|
|
1439
1438
|
return;
|
|
1440
1439
|
}
|
|
1441
1440
|
r("copy:success", {
|
|
1442
|
-
entity:
|
|
1441
|
+
entity: i,
|
|
1443
1442
|
message: u("targets.copy.success_brief")
|
|
1444
1443
|
});
|
|
1445
|
-
}, O = (
|
|
1446
|
-
J.value =
|
|
1447
|
-
}, ee = (
|
|
1448
|
-
|
|
1444
|
+
}, O = (i) => {
|
|
1445
|
+
J.value = i, L.value = !0;
|
|
1446
|
+
}, ee = (i) => s.config.app === "konnect" ? !1 : s.config.canMarkHealthy(i), ae = (i) => s.config.app === "konnect" ? !1 : s.config.canMarkUnhealthy(i), v = M(void 0), S = M(!1), F = M(!1), w = M(""), y = bt(s.config, c.value), j = (i) => {
|
|
1447
|
+
v.value = i, S.value = !0;
|
|
1449
1448
|
}, G = () => {
|
|
1450
|
-
|
|
1451
|
-
},
|
|
1452
|
-
var
|
|
1453
|
-
if ((
|
|
1454
|
-
|
|
1449
|
+
S.value = !1;
|
|
1450
|
+
}, re = async () => {
|
|
1451
|
+
var i, o, A;
|
|
1452
|
+
if ((i = v.value) != null && i.id) {
|
|
1453
|
+
F.value = !0;
|
|
1455
1454
|
try {
|
|
1456
|
-
await
|
|
1457
|
-
} catch (
|
|
1458
|
-
|
|
1455
|
+
await k.delete(y(v.value.id)), F.value = !1, S.value = !1, g.value++, r("delete:success", v.value);
|
|
1456
|
+
} catch (Q) {
|
|
1457
|
+
w.value = ((A = (o = Q.response) == null ? void 0 : o.data) == null ? void 0 : A.message) || Q.message || u("targets.errors.delete"), r("error", Q);
|
|
1459
1458
|
} finally {
|
|
1460
|
-
|
|
1459
|
+
F.value = !1;
|
|
1461
1460
|
}
|
|
1462
1461
|
}
|
|
1463
|
-
},
|
|
1464
|
-
me(
|
|
1465
|
-
var o,
|
|
1466
|
-
if (Array.isArray((o =
|
|
1462
|
+
}, ie = M(!1);
|
|
1463
|
+
me(m, (i) => {
|
|
1464
|
+
var o, A, Q, $;
|
|
1465
|
+
if (Array.isArray((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) && (ie.value = i.response.data.length > 0), i.status === we.NoRecords ? U.value = !0 : U.value = !1, i.status === we.Error) {
|
|
1467
1466
|
D.value = {
|
|
1468
1467
|
title: u("targets.errors.general")
|
|
1469
|
-
}, ($ = (
|
|
1468
|
+
}, ($ = (Q = (A = i.error) == null ? void 0 : A.response) == null ? void 0 : Q.data) != null && $.message && (D.value.message = i.error.response.data.message), r("error", i.error);
|
|
1470
1469
|
return;
|
|
1471
1470
|
}
|
|
1472
1471
|
D.value = null;
|
|
1473
1472
|
});
|
|
1474
|
-
const P =
|
|
1473
|
+
const P = M({
|
|
1475
1474
|
ctaText: void 0,
|
|
1476
|
-
message: `${u("targets.list.empty_state.description")}${
|
|
1475
|
+
message: `${u("targets.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
1477
1476
|
title: u("targets.title"),
|
|
1478
|
-
...
|
|
1477
|
+
...s.config.createRoute && {
|
|
1479
1478
|
// If `createRoute` provided in config, add a `ctaPath` to empty state CTA button so it becomes a link
|
|
1480
|
-
ctaPath:
|
|
1479
|
+
ctaPath: s.config.createRoute
|
|
1481
1480
|
}
|
|
1482
1481
|
});
|
|
1483
|
-
|
|
1484
|
-
await
|
|
1482
|
+
Me(async () => {
|
|
1483
|
+
await s.canCreate() && (P.value.title = u("targets.list.empty_state.title"), P.value.ctaText = u("targets.actions.create"));
|
|
1485
1484
|
});
|
|
1486
|
-
const K =
|
|
1487
|
-
app:
|
|
1488
|
-
apiBaseUrl:
|
|
1489
|
-
upstreamId:
|
|
1490
|
-
axiosRequestConfig:
|
|
1485
|
+
const K = q(() => ({
|
|
1486
|
+
app: s.config.app,
|
|
1487
|
+
apiBaseUrl: s.config.apiBaseUrl,
|
|
1488
|
+
upstreamId: s.config.upstreamId,
|
|
1489
|
+
axiosRequestConfig: s.config.axiosRequestConfig,
|
|
1491
1490
|
// Depending on the app, we need to pass in the control plane ID or workspace
|
|
1492
1491
|
// see KonnectTargetFormConfig and KongManagerTargetFormConfig types
|
|
1493
|
-
...
|
|
1494
|
-
controlPlaneId:
|
|
1492
|
+
...s.config.app === "konnect" && {
|
|
1493
|
+
controlPlaneId: s.config.controlPlaneId
|
|
1495
1494
|
},
|
|
1496
|
-
...
|
|
1497
|
-
workspace:
|
|
1495
|
+
...s.config.app === "kongManager" && {
|
|
1496
|
+
workspace: s.config.workspace
|
|
1498
1497
|
}
|
|
1499
|
-
})), J =
|
|
1500
|
-
J.value ? r("update:target",
|
|
1501
|
-
},
|
|
1502
|
-
N(),
|
|
1498
|
+
})), J = M(""), L = M(!1), Z = (i) => {
|
|
1499
|
+
J.value ? r("update:target", i) : r("create:target", i), _();
|
|
1500
|
+
}, _ = () => {
|
|
1501
|
+
N(), g.value++;
|
|
1503
1502
|
}, N = () => {
|
|
1504
|
-
|
|
1503
|
+
L.value = !1, J.value = "";
|
|
1505
1504
|
};
|
|
1506
|
-
return (
|
|
1507
|
-
const
|
|
1508
|
-
return
|
|
1509
|
-
h(e(
|
|
1505
|
+
return (i, o) => {
|
|
1506
|
+
const A = x("KButton"), Q = x("KBadge"), $ = x("KTruncate"), B = x("KDropdownItem"), le = x("KClipboardProvider");
|
|
1507
|
+
return I(), se("div", ra, [
|
|
1508
|
+
h(e(kt), {
|
|
1510
1509
|
"cache-identifier": a.cacheIdentifier,
|
|
1511
1510
|
"disable-sorting": V.value,
|
|
1512
1511
|
"empty-state-options": P.value,
|
|
1513
1512
|
"enable-entity-actions": "",
|
|
1514
1513
|
"error-message": D.value,
|
|
1515
|
-
fetcher: e(
|
|
1516
|
-
"fetcher-cache-key":
|
|
1517
|
-
"hide-toolbar":
|
|
1514
|
+
fetcher: e(C),
|
|
1515
|
+
"fetcher-cache-key": g.value,
|
|
1516
|
+
"hide-toolbar": U.value,
|
|
1518
1517
|
"pagination-type": "offset",
|
|
1519
1518
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
1520
|
-
"table-headers": e(
|
|
1521
|
-
onEmptyStateCtaClicked: o[1] || (o[1] = () =>
|
|
1519
|
+
"table-headers": e(l),
|
|
1520
|
+
onEmptyStateCtaClicked: o[1] || (o[1] = () => s.config.createRoute ? void 0 : p()),
|
|
1522
1521
|
onSort: t
|
|
1523
1522
|
}, {
|
|
1524
1523
|
"toolbar-button": n(() => [
|
|
1525
|
-
(
|
|
1524
|
+
(I(), E(mt, {
|
|
1526
1525
|
disabled: !a.useActionOutside,
|
|
1527
1526
|
to: "#kong-ui-app-page-header-action-button"
|
|
1528
1527
|
}, [
|
|
@@ -1530,20 +1529,20 @@ const ce = {
|
|
|
1530
1529
|
"auth-function": () => a.canCreate()
|
|
1531
1530
|
}, {
|
|
1532
1531
|
default: n(() => [
|
|
1533
|
-
|
|
1532
|
+
ft(h(A, {
|
|
1534
1533
|
appearance: "primary",
|
|
1535
1534
|
"data-testid": "toolbar-new-target",
|
|
1536
1535
|
size: a.useActionOutside ? "medium" : "large",
|
|
1537
|
-
to:
|
|
1538
|
-
onClick: o[0] || (o[0] = () =>
|
|
1536
|
+
to: s.config.createRoute ? s.config.createRoute : void 0,
|
|
1537
|
+
onClick: o[0] || (o[0] = () => s.config.createRoute ? void 0 : p())
|
|
1539
1538
|
}, {
|
|
1540
1539
|
default: n(() => [
|
|
1541
|
-
h(e(
|
|
1542
|
-
W(" " +
|
|
1540
|
+
h(e(Ne)),
|
|
1541
|
+
W(" " + f(e(u)("targets.list.toolbar_actions.new_target")), 1)
|
|
1543
1542
|
]),
|
|
1544
1543
|
_: 1
|
|
1545
1544
|
}, 8, ["size", "to"]), [
|
|
1546
|
-
[
|
|
1545
|
+
[yt, ie.value]
|
|
1547
1546
|
])
|
|
1548
1547
|
]),
|
|
1549
1548
|
_: 1
|
|
@@ -1551,17 +1550,17 @@ const ce = {
|
|
|
1551
1550
|
], 8, ["disabled"]))
|
|
1552
1551
|
]),
|
|
1553
1552
|
target: n(({ rowValue: X }) => [
|
|
1554
|
-
|
|
1553
|
+
b("span", oa, f(X), 1)
|
|
1555
1554
|
]),
|
|
1556
1555
|
tags: n(({ rowValue: X }) => [
|
|
1557
1556
|
h($, null, {
|
|
1558
1557
|
default: n(() => [
|
|
1559
|
-
(
|
|
1558
|
+
(I(!0), se(be, null, Ae(X, (te) => (I(), E(Q, {
|
|
1560
1559
|
key: te,
|
|
1561
1560
|
"max-width": "auto"
|
|
1562
1561
|
}, {
|
|
1563
1562
|
default: n(() => [
|
|
1564
|
-
W(
|
|
1563
|
+
W(f(te), 1)
|
|
1565
1564
|
]),
|
|
1566
1565
|
_: 2
|
|
1567
1566
|
}, 1024))), 128))
|
|
@@ -1574,10 +1573,10 @@ const ce = {
|
|
|
1574
1573
|
default: n(({ copyToClipboard: te }) => [
|
|
1575
1574
|
h(B, {
|
|
1576
1575
|
"data-testid": "action-entity-copy-id",
|
|
1577
|
-
onClick: (pe) =>
|
|
1576
|
+
onClick: (pe) => H(X, te)
|
|
1578
1577
|
}, {
|
|
1579
1578
|
default: n(() => [
|
|
1580
|
-
W(
|
|
1579
|
+
W(f(e(u)("targets.actions.copy_id")), 1)
|
|
1581
1580
|
]),
|
|
1582
1581
|
_: 2
|
|
1583
1582
|
}, 1032, ["onClick"])
|
|
@@ -1591,7 +1590,7 @@ const ce = {
|
|
|
1591
1590
|
onClick: (pe) => Y(X, te)
|
|
1592
1591
|
}, {
|
|
1593
1592
|
default: n(() => [
|
|
1594
|
-
W(
|
|
1593
|
+
W(f(e(u)("targets.actions.copy_json")), 1)
|
|
1595
1594
|
]),
|
|
1596
1595
|
_: 2
|
|
1597
1596
|
}, 1032, ["onClick"])
|
|
@@ -1608,7 +1607,7 @@ const ce = {
|
|
|
1608
1607
|
onClick: (te) => O(X.id)
|
|
1609
1608
|
}, {
|
|
1610
1609
|
default: n(() => [
|
|
1611
|
-
W(
|
|
1610
|
+
W(f(e(u)("targets.actions.edit")), 1)
|
|
1612
1611
|
]),
|
|
1613
1612
|
_: 2
|
|
1614
1613
|
}, 1032, ["onClick"])
|
|
@@ -1624,7 +1623,7 @@ const ce = {
|
|
|
1624
1623
|
onClick: (te) => r("health-actions:healthy", X)
|
|
1625
1624
|
}, {
|
|
1626
1625
|
default: n(() => [
|
|
1627
|
-
W(
|
|
1626
|
+
W(f(e(u)("targets.actions.mark_healthy")), 1)
|
|
1628
1627
|
]),
|
|
1629
1628
|
_: 2
|
|
1630
1629
|
}, 1032, ["onClick"])
|
|
@@ -1640,7 +1639,7 @@ const ce = {
|
|
|
1640
1639
|
onClick: (te) => r("health-actions:unhealthy", X)
|
|
1641
1640
|
}, {
|
|
1642
1641
|
default: n(() => [
|
|
1643
|
-
W(
|
|
1642
|
+
W(f(e(u)("targets.actions.mark_unhealthy")), 1)
|
|
1644
1643
|
]),
|
|
1645
1644
|
_: 2
|
|
1646
1645
|
}, 1032, ["onClick"])
|
|
@@ -1658,7 +1657,7 @@ const ce = {
|
|
|
1658
1657
|
onClick: (te) => j(X)
|
|
1659
1658
|
}, {
|
|
1660
1659
|
default: n(() => [
|
|
1661
|
-
W(
|
|
1660
|
+
W(f(e(u)("targets.actions.delete")), 1)
|
|
1662
1661
|
]),
|
|
1663
1662
|
_: 2
|
|
1664
1663
|
}, 1032, ["onClick"])
|
|
@@ -1668,28 +1667,28 @@ const ce = {
|
|
|
1668
1667
|
]),
|
|
1669
1668
|
_: 1
|
|
1670
1669
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "hide-toolbar", "table-headers"]),
|
|
1671
|
-
h(e(
|
|
1672
|
-
"action-pending":
|
|
1670
|
+
h(e(_t), {
|
|
1671
|
+
"action-pending": F.value,
|
|
1673
1672
|
description: e(u)("targets.delete.description"),
|
|
1674
|
-
"entity-type": e(
|
|
1675
|
-
error:
|
|
1673
|
+
"entity-type": e(Ct).Target,
|
|
1674
|
+
error: w.value,
|
|
1676
1675
|
"need-confirm": !1,
|
|
1677
1676
|
title: e(u)("targets.delete.title"),
|
|
1678
|
-
visible:
|
|
1677
|
+
visible: S.value,
|
|
1679
1678
|
onCancel: G,
|
|
1680
|
-
onProceed:
|
|
1679
|
+
onProceed: re
|
|
1681
1680
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"]),
|
|
1682
|
-
h(
|
|
1681
|
+
h(ia, {
|
|
1683
1682
|
config: K.value,
|
|
1684
|
-
"is-visible":
|
|
1683
|
+
"is-visible": L.value,
|
|
1685
1684
|
"target-id": J.value,
|
|
1686
1685
|
onCancel: N,
|
|
1687
1686
|
onUpdate: Z
|
|
1688
|
-
},
|
|
1689
|
-
|
|
1687
|
+
}, $t({ _: 2 }, [
|
|
1688
|
+
i.$slots["form-info"] ? {
|
|
1690
1689
|
name: "info",
|
|
1691
1690
|
fn: n(() => [
|
|
1692
|
-
|
|
1691
|
+
gt(i.$slots, "form-info", {}, void 0, !0)
|
|
1693
1692
|
]),
|
|
1694
1693
|
key: "0"
|
|
1695
1694
|
} : void 0
|
|
@@ -1697,7 +1696,7 @@ const ce = {
|
|
|
1697
1696
|
]);
|
|
1698
1697
|
};
|
|
1699
1698
|
}
|
|
1700
|
-
}),
|
|
1699
|
+
}), Wa = /* @__PURE__ */ de(na, [["__scopeId", "data-v-980cfece"]]), ha = { key: 1 }, ua = /* @__PURE__ */ oe({
|
|
1701
1700
|
__name: "UpstreamsFormGeneralInfo",
|
|
1702
1701
|
props: {
|
|
1703
1702
|
config: {
|
|
@@ -1728,84 +1727,84 @@ const ce = {
|
|
|
1728
1727
|
},
|
|
1729
1728
|
emits: ["update:name", "update:host-header", "update:client-certificate", "update:tags"],
|
|
1730
1729
|
setup(a, { emit: R }) {
|
|
1731
|
-
var j, G,
|
|
1732
|
-
const { i18nT: r, i18n: { t:
|
|
1733
|
-
debouncedQueryChange:
|
|
1730
|
+
var j, G, re, ie;
|
|
1731
|
+
const { i18nT: r, i18n: { t: s } } = ce.useI18n(), u = a, k = R, {
|
|
1732
|
+
debouncedQueryChange: g,
|
|
1734
1733
|
loading: V,
|
|
1735
|
-
loadItems:
|
|
1736
|
-
results:
|
|
1737
|
-
allRecords:
|
|
1738
|
-
} =
|
|
1734
|
+
loadItems: T,
|
|
1735
|
+
results: l,
|
|
1736
|
+
allRecords: c
|
|
1737
|
+
} = ct(u.config, (G = ke.form[(j = u.config) == null ? void 0 : j.app]) == null ? void 0 : G.getServices, "", {
|
|
1739
1738
|
fetchedItemsKey: "data",
|
|
1740
1739
|
searchKeys: ["host"]
|
|
1741
1740
|
}), {
|
|
1742
|
-
debouncedQueryChange:
|
|
1743
|
-
loading:
|
|
1741
|
+
debouncedQueryChange: C,
|
|
1742
|
+
loading: m,
|
|
1744
1743
|
loadItems: t,
|
|
1745
1744
|
results: D
|
|
1746
|
-
} =
|
|
1745
|
+
} = ct(u.config, (ie = ke.form[(re = u.config) == null ? void 0 : re.app]) == null ? void 0 : ie.getCertificates), U = M(""), p = q(() => {
|
|
1747
1746
|
var P;
|
|
1748
|
-
return !!u.name && !((P =
|
|
1749
|
-
}),
|
|
1750
|
-
var K, J,
|
|
1751
|
-
const P = p.value && u.name.includes((K =
|
|
1752
|
-
return (
|
|
1747
|
+
return !!u.name && !((P = c.value) != null && P.some((K) => K.host === u.name));
|
|
1748
|
+
}), H = q(() => {
|
|
1749
|
+
var K, J, L;
|
|
1750
|
+
const P = p.value && u.name.includes((K = U.value) == null ? void 0 : K.toLowerCase());
|
|
1751
|
+
return (L = l.value) == null ? void 0 : L.map((Z) => ({ label: Z.host, value: Z.id })).concat(
|
|
1753
1752
|
P ? [{ label: u.name, value: ((J = ee.value) == null ? void 0 : J.value) || u.name }] : []
|
|
1754
1753
|
);
|
|
1755
|
-
}), Y =
|
|
1754
|
+
}), Y = q(() => {
|
|
1756
1755
|
var P;
|
|
1757
1756
|
return (P = D.value) == null ? void 0 : P.map((K) => ({ label: K.id, value: K.id }));
|
|
1758
|
-
}), O =
|
|
1757
|
+
}), O = M(""), ee = M({ value: "", label: "" }), ae = q(() => {
|
|
1759
1758
|
var P, K;
|
|
1760
|
-
return ((P =
|
|
1761
|
-
}),
|
|
1762
|
-
|
|
1763
|
-
},
|
|
1759
|
+
return ((P = H.value.find((J) => J.value === O.value)) == null ? void 0 : P.label) || ((K = ee.value) == null ? void 0 : K.label);
|
|
1760
|
+
}), v = (P) => {
|
|
1761
|
+
U.value = P, g(P);
|
|
1762
|
+
}, S = (P) => {
|
|
1764
1763
|
ee.value = P;
|
|
1765
|
-
},
|
|
1764
|
+
}, F = () => {
|
|
1766
1765
|
ee.value = { value: "", label: "" };
|
|
1767
|
-
},
|
|
1768
|
-
O.value = P,
|
|
1769
|
-
},
|
|
1770
|
-
return
|
|
1766
|
+
}, w = (P) => {
|
|
1767
|
+
O.value = P, k("update:name", ae.value);
|
|
1768
|
+
}, y = M(!1);
|
|
1769
|
+
return Me(async () => {
|
|
1771
1770
|
var P, K;
|
|
1772
1771
|
try {
|
|
1773
|
-
|
|
1772
|
+
y.value = !0, await T(), u.name && (O.value = ((K = (P = H.value.find((J) => J.label === u.name)) == null ? void 0 : P.value) == null ? void 0 : K.toString()) || u.name), await t();
|
|
1774
1773
|
} finally {
|
|
1775
|
-
|
|
1774
|
+
y.value = !1;
|
|
1776
1775
|
}
|
|
1777
1776
|
}), (P, K) => {
|
|
1778
|
-
const J = x("KSkeleton"),
|
|
1779
|
-
return
|
|
1777
|
+
const J = x("KSkeleton"), L = x("KSelect"), Z = x("KInput");
|
|
1778
|
+
return I(), E(e(Ce), {
|
|
1780
1779
|
class: "kong-ui-entities-upstreams-general-info",
|
|
1781
|
-
description: e(
|
|
1782
|
-
title: e(
|
|
1780
|
+
description: e(s)("upstreams.form.general_info.help"),
|
|
1781
|
+
title: e(s)("upstreams.form.general_info.title")
|
|
1783
1782
|
}, {
|
|
1784
1783
|
default: n(() => [
|
|
1785
|
-
|
|
1784
|
+
y.value ? (I(), E(J, {
|
|
1786
1785
|
key: 0,
|
|
1787
1786
|
type: "form"
|
|
1788
|
-
})) : (
|
|
1789
|
-
h(
|
|
1787
|
+
})) : (I(), se("div", ha, [
|
|
1788
|
+
h(L, {
|
|
1790
1789
|
class: "name-select margin-bottom-6",
|
|
1791
1790
|
clearable: "",
|
|
1792
1791
|
"data-testid": "upstreams-form-name",
|
|
1793
1792
|
"enable-filtering": "",
|
|
1794
1793
|
"enable-item-creation": "",
|
|
1795
1794
|
"filter-function": () => !0,
|
|
1796
|
-
items:
|
|
1797
|
-
label: e(
|
|
1795
|
+
items: H.value,
|
|
1796
|
+
label: e(s)("upstreams.form.fields.name.label"),
|
|
1798
1797
|
"label-attributes": { tooltipAttributes: { "max-width": "400" } },
|
|
1799
1798
|
loading: e(V),
|
|
1800
1799
|
"model-value": O.value,
|
|
1801
|
-
placeholder: e(
|
|
1800
|
+
placeholder: e(s)("upstreams.form.fields.name.placeholder"),
|
|
1802
1801
|
readonly: a.readonly,
|
|
1803
1802
|
required: "",
|
|
1804
1803
|
width: "100%",
|
|
1805
|
-
onItemAdded:
|
|
1806
|
-
onItemRemoved:
|
|
1807
|
-
onQueryChange:
|
|
1808
|
-
"onUpdate:modelValue":
|
|
1804
|
+
onItemAdded: S,
|
|
1805
|
+
onItemRemoved: F,
|
|
1806
|
+
onQueryChange: v,
|
|
1807
|
+
"onUpdate:modelValue": w
|
|
1809
1808
|
}, {
|
|
1810
1809
|
"label-tooltip": n(() => [
|
|
1811
1810
|
h(e(r), {
|
|
@@ -1813,7 +1812,7 @@ const ce = {
|
|
|
1813
1812
|
scope: "global"
|
|
1814
1813
|
}, {
|
|
1815
1814
|
host: n(() => [
|
|
1816
|
-
|
|
1815
|
+
b("code", null, f(e(s)("upstreams.form.fields.name.host")), 1)
|
|
1817
1816
|
]),
|
|
1818
1817
|
_: 1
|
|
1819
1818
|
})
|
|
@@ -1824,46 +1823,46 @@ const ce = {
|
|
|
1824
1823
|
autocomplete: "off",
|
|
1825
1824
|
class: "margin-bottom-6",
|
|
1826
1825
|
"data-testid": "upstreams-form-host-header",
|
|
1827
|
-
label: e(
|
|
1826
|
+
label: e(s)("upstreams.form.fields.host_header.label"),
|
|
1828
1827
|
"model-value": a.hostHeader,
|
|
1829
1828
|
readonly: a.readonly,
|
|
1830
1829
|
type: "text",
|
|
1831
|
-
"onUpdate:modelValue": K[0] || (K[0] = (
|
|
1830
|
+
"onUpdate:modelValue": K[0] || (K[0] = (_) => k("update:host-header", _))
|
|
1832
1831
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
1833
|
-
h(
|
|
1832
|
+
h(L, {
|
|
1834
1833
|
class: "certificate-select margin-bottom-6",
|
|
1835
1834
|
clearable: "",
|
|
1836
1835
|
"data-testid": "upstreams-form-client-certificate",
|
|
1837
1836
|
"enable-filtering": "",
|
|
1838
1837
|
"filter-function": () => !0,
|
|
1839
1838
|
items: Y.value,
|
|
1840
|
-
label: e(
|
|
1839
|
+
label: e(s)("upstreams.form.fields.client_certificate.label"),
|
|
1841
1840
|
"label-attributes": {
|
|
1842
|
-
info: e(
|
|
1841
|
+
info: e(s)("upstreams.form.fields.client_certificate.tooltip"),
|
|
1843
1842
|
tooltipAttributes: { maxWidth: "400" }
|
|
1844
1843
|
},
|
|
1845
|
-
loading: e(
|
|
1844
|
+
loading: e(m),
|
|
1846
1845
|
"model-value": a.clientCertificate,
|
|
1847
|
-
placeholder: e(
|
|
1846
|
+
placeholder: e(s)("upstreams.form.fields.client_certificate.placeholder"),
|
|
1848
1847
|
readonly: a.readonly,
|
|
1849
1848
|
width: "100%",
|
|
1850
|
-
onQueryChange: e(
|
|
1851
|
-
"onUpdate:modelValue": K[1] || (K[1] = (
|
|
1849
|
+
onQueryChange: e(C),
|
|
1850
|
+
"onUpdate:modelValue": K[1] || (K[1] = (_) => k("update:client-certificate", _))
|
|
1852
1851
|
}, null, 8, ["items", "label", "label-attributes", "loading", "model-value", "placeholder", "readonly", "onQueryChange"]),
|
|
1853
1852
|
h(Z, {
|
|
1854
1853
|
autocomplete: "off",
|
|
1855
1854
|
"data-testid": "upstreams-form-tags",
|
|
1856
|
-
help: e(
|
|
1857
|
-
label: e(
|
|
1855
|
+
help: e(s)("upstreams.form.fields.tags.help"),
|
|
1856
|
+
label: e(s)("upstreams.form.fields.tags.label"),
|
|
1858
1857
|
"label-attributes": {
|
|
1859
|
-
info: e(
|
|
1858
|
+
info: e(s)("upstreams.form.fields.tags.tooltip"),
|
|
1860
1859
|
tooltipAttributes: { maxWidth: "400" }
|
|
1861
1860
|
},
|
|
1862
1861
|
"model-value": a.tags,
|
|
1863
|
-
placeholder: e(
|
|
1862
|
+
placeholder: e(s)("upstreams.form.fields.tags.placeholder"),
|
|
1864
1863
|
readonly: a.readonly,
|
|
1865
1864
|
type: "text",
|
|
1866
|
-
"onUpdate:modelValue": K[2] || (K[2] = (
|
|
1865
|
+
"onUpdate:modelValue": K[2] || (K[2] = (_) => k("update:tags", _))
|
|
1867
1866
|
}, null, 8, ["help", "label", "label-attributes", "model-value", "placeholder", "readonly"])
|
|
1868
1867
|
]))
|
|
1869
1868
|
]),
|
|
@@ -1871,10 +1870,10 @@ const ce = {
|
|
|
1871
1870
|
}, 8, ["description", "title"]);
|
|
1872
1871
|
};
|
|
1873
1872
|
}
|
|
1874
|
-
}),
|
|
1873
|
+
}), ca = /* @__PURE__ */ de(ua, [["__scopeId", "data-v-626ed41f"]]), xe = {
|
|
1875
1874
|
upstreamObject: "https://docs.konghq.com/gateway/latest/admin-api/#upstream-object",
|
|
1876
1875
|
loadBalancing: "https://docs.konghq.com/gateway/latest/how-kong-works/load-balancing/#main"
|
|
1877
|
-
},
|
|
1876
|
+
}, da = { class: "fields-group-title" }, pa = { class: "fields-group-text" }, ma = { class: "fields-group-title" }, fa = { class: "fields-group-text" }, ya = /* @__PURE__ */ oe({
|
|
1878
1877
|
__name: "UpstreamsFormLoadBalancing",
|
|
1879
1878
|
props: {
|
|
1880
1879
|
algorithm: {
|
|
@@ -1933,90 +1932,90 @@ const ce = {
|
|
|
1933
1932
|
},
|
|
1934
1933
|
emits: ["update:algorithm", "update:slots", "update:hash-on", "update:hash-fallback", "update:hash-on-header", "update:hash-on-cookie", "update:hash-on-cookie-path", "update:hash-on-query-argument", "update:hash-on-uri-capture", "update:hash-fallback-header", "update:hash-fallback-query-argument", "update:hash-fallback-uri-capture"],
|
|
1935
1934
|
setup(a, { emit: R }) {
|
|
1936
|
-
const { i18nT: r, i18n: { t:
|
|
1935
|
+
const { i18nT: r, i18n: { t: s } } = ce.useI18n(), { inRange: u } = Fe(), k = a, g = R, V = M([
|
|
1937
1936
|
{
|
|
1938
|
-
label:
|
|
1937
|
+
label: s("upstreams.form.algorithms.round_robin_label"),
|
|
1939
1938
|
value: "round-robin",
|
|
1940
1939
|
selected: !1
|
|
1941
1940
|
},
|
|
1942
1941
|
{
|
|
1943
|
-
label:
|
|
1942
|
+
label: s("upstreams.form.algorithms.least_connections_label"),
|
|
1944
1943
|
value: "least-connections",
|
|
1945
1944
|
selected: !1
|
|
1946
1945
|
},
|
|
1947
1946
|
{
|
|
1948
|
-
label:
|
|
1947
|
+
label: s("upstreams.form.algorithms.consistent_hashing_label"),
|
|
1949
1948
|
value: "consistent-hashing",
|
|
1950
1949
|
selected: !1
|
|
1951
1950
|
},
|
|
1952
1951
|
{
|
|
1953
|
-
label:
|
|
1952
|
+
label: s("upstreams.form.algorithms.latency_label"),
|
|
1954
1953
|
value: "latency",
|
|
1955
1954
|
selected: !1
|
|
1956
1955
|
}
|
|
1957
|
-
]),
|
|
1956
|
+
]), T = M([
|
|
1958
1957
|
{
|
|
1959
|
-
label:
|
|
1958
|
+
label: s("upstreams.form.hash_labels.none"),
|
|
1960
1959
|
value: "none",
|
|
1961
1960
|
selected: !1
|
|
1962
1961
|
},
|
|
1963
1962
|
{
|
|
1964
|
-
label:
|
|
1963
|
+
label: s("upstreams.form.hash_labels.consumer"),
|
|
1965
1964
|
value: "consumer",
|
|
1966
1965
|
selected: !1
|
|
1967
1966
|
},
|
|
1968
1967
|
{
|
|
1969
|
-
label:
|
|
1968
|
+
label: s("upstreams.form.hash_labels.ip"),
|
|
1970
1969
|
value: "ip",
|
|
1971
1970
|
selected: !1
|
|
1972
1971
|
},
|
|
1973
1972
|
{
|
|
1974
|
-
label:
|
|
1973
|
+
label: s("upstreams.form.hash_labels.header"),
|
|
1975
1974
|
value: "header",
|
|
1976
1975
|
selected: !1
|
|
1977
1976
|
},
|
|
1978
1977
|
{
|
|
1979
|
-
label:
|
|
1978
|
+
label: s("upstreams.form.hash_labels.cookie"),
|
|
1980
1979
|
value: "cookie",
|
|
1981
1980
|
selected: !1
|
|
1982
1981
|
},
|
|
1983
1982
|
{
|
|
1984
|
-
label:
|
|
1983
|
+
label: s("upstreams.form.hash_labels.path"),
|
|
1985
1984
|
value: "path",
|
|
1986
1985
|
selected: !1
|
|
1987
1986
|
},
|
|
1988
1987
|
{
|
|
1989
|
-
label:
|
|
1988
|
+
label: s("upstreams.form.hash_labels.query_argument"),
|
|
1990
1989
|
value: "query_arg",
|
|
1991
1990
|
selected: !1
|
|
1992
1991
|
},
|
|
1993
1992
|
{
|
|
1994
|
-
label:
|
|
1993
|
+
label: s("upstreams.form.hash_labels.uri_capture"),
|
|
1995
1994
|
value: "uri_capture",
|
|
1996
1995
|
selected: !1
|
|
1997
1996
|
}
|
|
1998
1997
|
]);
|
|
1999
|
-
me(() =>
|
|
2000
|
-
|
|
2001
|
-
}), me(() =>
|
|
2002
|
-
|
|
1998
|
+
me(() => k.hashOn, (C, m) => {
|
|
1999
|
+
m === "header" && C !== m && g("update:hash-on-header", ""), m === "cookie" && C !== m && (g("update:hash-on-cookie", ""), g("update:hash-on-cookie-path", "/")), m === "query_arg" && C !== m && g("update:hash-on-query-argument", ""), m === "uri_capture" && C !== m && g("update:hash-on-uri-capture", ""), (C === "cookie" || C === "none") && (g("update:hash-fallback", "none"), g("update:hash-fallback-header", ""), g("update:hash-fallback-query-argument", ""), g("update:hash-fallback-uri-capture", ""));
|
|
2000
|
+
}), me(() => k.hashFallback, (C, m) => {
|
|
2001
|
+
m === "header" && C !== m && g("update:hash-fallback-header", ""), m === "cookie" && C !== m && (g("update:hash-on-cookie", ""), g("update:hash-on-cookie-path", "/")), m === "query_arg" && C !== m && g("update:hash-fallback-query-argument", ""), m === "uri_capture" && C !== m && g("update:hash-fallback-uri-capture", "");
|
|
2003
2002
|
});
|
|
2004
|
-
const
|
|
2005
|
-
return (
|
|
2006
|
-
const t = x("KExternalLink"), D = x("KSelect"),
|
|
2007
|
-
return
|
|
2003
|
+
const l = q(() => k.hashOn === "cookie" || k.hashOn === "none"), c = q(() => k.slots ? u(k.slots, $e, Pe) ? "" : s("upstreams.form.errors.in_range") : "");
|
|
2004
|
+
return (C, m) => {
|
|
2005
|
+
const t = x("KExternalLink"), D = x("KSelect"), U = x("KInput"), p = x("KCard");
|
|
2006
|
+
return I(), E(e(Ce), {
|
|
2008
2007
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
2009
|
-
title: e(
|
|
2008
|
+
title: e(s)("upstreams.form.load_balancing.title")
|
|
2010
2009
|
}, {
|
|
2011
2010
|
description: n(() => [
|
|
2012
|
-
|
|
2013
|
-
W(
|
|
2011
|
+
b("p", null, [
|
|
2012
|
+
W(f(e(s)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
2014
2013
|
h(t, {
|
|
2015
2014
|
"hide-icon": "",
|
|
2016
2015
|
href: e(xe).upstreamObject
|
|
2017
2016
|
}, {
|
|
2018
2017
|
default: n(() => [
|
|
2019
|
-
W(
|
|
2018
|
+
W(f(e(s)("upstreams.form.buttons.view_documentation")), 1)
|
|
2020
2019
|
]),
|
|
2021
2020
|
_: 1
|
|
2022
2021
|
}, 8, ["href"])
|
|
@@ -2026,116 +2025,116 @@ const ce = {
|
|
|
2026
2025
|
h(D, {
|
|
2027
2026
|
class: "algorithm-select",
|
|
2028
2027
|
items: V.value,
|
|
2029
|
-
label: e(
|
|
2028
|
+
label: e(s)("upstreams.form.fields.algorithm.label"),
|
|
2030
2029
|
"model-value": a.algorithm,
|
|
2031
2030
|
readonly: a.readonly,
|
|
2032
2031
|
width: "100%",
|
|
2033
|
-
"onUpdate:modelValue":
|
|
2032
|
+
"onUpdate:modelValue": m[0] || (m[0] = (H) => g("update:algorithm", H))
|
|
2034
2033
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2035
|
-
h(
|
|
2034
|
+
h(U, {
|
|
2036
2035
|
autocomplete: "off",
|
|
2037
2036
|
"data-testid": "upstreams-form-slots",
|
|
2038
|
-
error: !!
|
|
2039
|
-
"error-message":
|
|
2040
|
-
help: e(
|
|
2041
|
-
label: e(
|
|
2037
|
+
error: !!c.value,
|
|
2038
|
+
"error-message": c.value,
|
|
2039
|
+
help: e(s)("upstreams.form.fields.slots.help"),
|
|
2040
|
+
label: e(s)("upstreams.form.fields.slots.label"),
|
|
2042
2041
|
max: e(Pe),
|
|
2043
2042
|
min: e($e),
|
|
2044
2043
|
"model-value": a.slots,
|
|
2045
2044
|
readonly: a.readonly,
|
|
2046
2045
|
type: "number",
|
|
2047
|
-
"onUpdate:modelValue":
|
|
2046
|
+
"onUpdate:modelValue": m[1] || (m[1] = (H) => g("update:slots", H))
|
|
2048
2047
|
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"]),
|
|
2049
2048
|
h(p, null, {
|
|
2050
2049
|
default: n(() => [
|
|
2051
|
-
|
|
2052
|
-
|
|
2050
|
+
b("h5", da, f(e(s)("upstreams.form.fields.hash_on.label")), 1),
|
|
2051
|
+
b("p", pa, f(e(s)("upstreams.form.fields.hash_on.help")), 1),
|
|
2053
2052
|
h(D, {
|
|
2054
2053
|
class: "hash-on-select",
|
|
2055
|
-
items:
|
|
2056
|
-
label: e(
|
|
2054
|
+
items: T.value,
|
|
2055
|
+
label: e(s)("upstreams.form.fields.hash_on.label"),
|
|
2057
2056
|
"model-value": a.hashOn,
|
|
2058
2057
|
readonly: a.readonly,
|
|
2059
2058
|
width: "100%",
|
|
2060
|
-
"onUpdate:modelValue":
|
|
2059
|
+
"onUpdate:modelValue": m[2] || (m[2] = (H) => g("update:hash-on", H))
|
|
2061
2060
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2062
|
-
a.hashOn === "header" ? (
|
|
2061
|
+
a.hashOn === "header" ? (I(), E(U, {
|
|
2063
2062
|
key: 0,
|
|
2064
2063
|
autocomplete: "off",
|
|
2065
2064
|
class: "margin-top-6",
|
|
2066
2065
|
"data-testid": "upstreams-form-hash-on-header",
|
|
2067
|
-
label: e(
|
|
2066
|
+
label: e(s)("upstreams.form.fields.header.label"),
|
|
2068
2067
|
"model-value": a.hashOnHeader,
|
|
2069
2068
|
readonly: a.readonly,
|
|
2070
2069
|
required: "",
|
|
2071
2070
|
type: "text",
|
|
2072
|
-
"onUpdate:modelValue":
|
|
2071
|
+
"onUpdate:modelValue": m[3] || (m[3] = (H) => g("update:hash-on-header", H))
|
|
2073
2072
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0),
|
|
2074
|
-
a.hashOn === "cookie" ? (
|
|
2075
|
-
h(
|
|
2073
|
+
a.hashOn === "cookie" ? (I(), se(be, { key: 1 }, [
|
|
2074
|
+
h(U, {
|
|
2076
2075
|
autocomplete: "off",
|
|
2077
2076
|
class: "margin-top-6",
|
|
2078
2077
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2079
|
-
label: e(
|
|
2078
|
+
label: e(s)("upstreams.form.fields.cookie.label"),
|
|
2080
2079
|
"model-value": a.hashOnCookie,
|
|
2081
2080
|
readonly: a.readonly,
|
|
2082
2081
|
required: "",
|
|
2083
2082
|
type: "text",
|
|
2084
|
-
"onUpdate:modelValue":
|
|
2083
|
+
"onUpdate:modelValue": m[4] || (m[4] = (H) => g("update:hash-on-cookie", H))
|
|
2085
2084
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2086
|
-
h(
|
|
2085
|
+
h(U, {
|
|
2087
2086
|
autocomplete: "off",
|
|
2088
2087
|
class: "margin-top-6",
|
|
2089
2088
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2090
|
-
label: e(
|
|
2089
|
+
label: e(s)("upstreams.form.fields.cookie_path.label"),
|
|
2091
2090
|
"model-value": a.hashOnCookiePath,
|
|
2092
2091
|
readonly: a.readonly,
|
|
2093
2092
|
required: "",
|
|
2094
2093
|
type: "text",
|
|
2095
|
-
"onUpdate:modelValue":
|
|
2094
|
+
"onUpdate:modelValue": m[5] || (m[5] = (H) => g("update:hash-on-cookie-path", H))
|
|
2096
2095
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2097
2096
|
], 64)) : z("", !0),
|
|
2098
|
-
a.hashOn === "query_arg" ? (
|
|
2097
|
+
a.hashOn === "query_arg" ? (I(), E(U, {
|
|
2099
2098
|
key: 2,
|
|
2100
2099
|
autocomplete: "off",
|
|
2101
2100
|
class: "margin-top-6",
|
|
2102
2101
|
"data-testid": "upstreams-form-query-argument",
|
|
2103
|
-
label: e(
|
|
2102
|
+
label: e(s)("upstreams.form.fields.query_argument.label"),
|
|
2104
2103
|
"model-value": a.hashOnQueryArgument,
|
|
2105
2104
|
readonly: a.readonly,
|
|
2106
2105
|
required: "",
|
|
2107
2106
|
type: "text",
|
|
2108
|
-
"onUpdate:modelValue":
|
|
2107
|
+
"onUpdate:modelValue": m[6] || (m[6] = (H) => g("update:hash-on-query-argument", H))
|
|
2109
2108
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0),
|
|
2110
|
-
a.hashOn === "uri_capture" ? (
|
|
2109
|
+
a.hashOn === "uri_capture" ? (I(), E(U, {
|
|
2111
2110
|
key: 3,
|
|
2112
2111
|
autocomplete: "off",
|
|
2113
2112
|
class: "margin-top-6",
|
|
2114
2113
|
"data-testid": "upstreams-form-uri-capture",
|
|
2115
|
-
label: e(
|
|
2114
|
+
label: e(s)("upstreams.form.fields.uri_capture.label"),
|
|
2116
2115
|
"model-value": a.hashOnUriCapture,
|
|
2117
2116
|
readonly: a.readonly,
|
|
2118
2117
|
required: "",
|
|
2119
2118
|
type: "text",
|
|
2120
|
-
"onUpdate:modelValue":
|
|
2119
|
+
"onUpdate:modelValue": m[7] || (m[7] = (H) => g("update:hash-on-uri-capture", H))
|
|
2121
2120
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0)
|
|
2122
2121
|
]),
|
|
2123
2122
|
_: 1
|
|
2124
2123
|
}),
|
|
2125
2124
|
h(p, null, {
|
|
2126
2125
|
default: n(() => [
|
|
2127
|
-
|
|
2128
|
-
|
|
2126
|
+
b("h5", ma, f(e(s)("upstreams.form.fields.hash_fallback.label")), 1),
|
|
2127
|
+
b("p", fa, f(e(s)("upstreams.form.fields.hash_fallback.help")), 1),
|
|
2129
2128
|
h(D, {
|
|
2130
2129
|
class: "hash-fallback-select",
|
|
2131
|
-
disabled:
|
|
2132
|
-
items:
|
|
2133
|
-
label: e(
|
|
2130
|
+
disabled: l.value,
|
|
2131
|
+
items: T.value,
|
|
2132
|
+
label: e(s)("upstreams.form.fields.hash_fallback.label"),
|
|
2134
2133
|
"label-attributes": { tooltipAttributes: { "max-width": "400" } },
|
|
2135
2134
|
"model-value": a.hashFallback,
|
|
2136
2135
|
readonly: a.readonly,
|
|
2137
2136
|
width: "100%",
|
|
2138
|
-
"onUpdate:modelValue":
|
|
2137
|
+
"onUpdate:modelValue": m[8] || (m[8] = (H) => g("update:hash-fallback", H))
|
|
2139
2138
|
}, {
|
|
2140
2139
|
"label-tooltip": n(() => [
|
|
2141
2140
|
h(e(r), {
|
|
@@ -2143,75 +2142,75 @@ const ce = {
|
|
|
2143
2142
|
scope: "global"
|
|
2144
2143
|
}, {
|
|
2145
2144
|
hash_on: n(() => [
|
|
2146
|
-
|
|
2145
|
+
b("code", null, f(e(s)("upstreams.form.fields.hash_fallback.hash_on")), 1)
|
|
2147
2146
|
]),
|
|
2148
2147
|
cookie: n(() => [
|
|
2149
|
-
|
|
2148
|
+
b("code", null, f(e(s)("upstreams.form.fields.hash_fallback.cookie")), 1)
|
|
2150
2149
|
]),
|
|
2151
2150
|
_: 1
|
|
2152
2151
|
})
|
|
2153
2152
|
]),
|
|
2154
2153
|
_: 1
|
|
2155
2154
|
}, 8, ["disabled", "items", "label", "model-value", "readonly"]),
|
|
2156
|
-
a.hashFallback === "header" ? (
|
|
2155
|
+
a.hashFallback === "header" ? (I(), E(U, {
|
|
2157
2156
|
key: 0,
|
|
2158
2157
|
autocomplete: "off",
|
|
2159
2158
|
class: "margin-top-6",
|
|
2160
2159
|
"data-testid": "upstreams-form-hash-fallback-header",
|
|
2161
|
-
label: e(
|
|
2160
|
+
label: e(s)("upstreams.form.fields.header.label"),
|
|
2162
2161
|
"model-value": a.hashFallbackHeader,
|
|
2163
2162
|
readonly: a.readonly,
|
|
2164
2163
|
required: "",
|
|
2165
2164
|
type: "text",
|
|
2166
|
-
"onUpdate:modelValue":
|
|
2165
|
+
"onUpdate:modelValue": m[9] || (m[9] = (H) => g("update:hash-fallback-header", H))
|
|
2167
2166
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0),
|
|
2168
|
-
a.hashFallback === "cookie" ? (
|
|
2169
|
-
h(
|
|
2167
|
+
a.hashFallback === "cookie" ? (I(), se(be, { key: 1 }, [
|
|
2168
|
+
h(U, {
|
|
2170
2169
|
autocomplete: "off",
|
|
2171
2170
|
class: "margin-top-6",
|
|
2172
2171
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2173
|
-
label: e(
|
|
2172
|
+
label: e(s)("upstreams.form.fields.cookie.label"),
|
|
2174
2173
|
"model-value": a.hashOnCookie,
|
|
2175
2174
|
readonly: a.readonly,
|
|
2176
2175
|
required: "",
|
|
2177
2176
|
type: "text",
|
|
2178
|
-
"onUpdate:modelValue":
|
|
2177
|
+
"onUpdate:modelValue": m[10] || (m[10] = (H) => g("update:hash-on-cookie", H))
|
|
2179
2178
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2180
|
-
h(
|
|
2179
|
+
h(U, {
|
|
2181
2180
|
autocomplete: "off",
|
|
2182
2181
|
class: "margin-top-6",
|
|
2183
2182
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2184
|
-
label: e(
|
|
2183
|
+
label: e(s)("upstreams.form.fields.cookie_path.label"),
|
|
2185
2184
|
"model-value": a.hashOnCookiePath,
|
|
2186
2185
|
readonly: a.readonly,
|
|
2187
2186
|
required: "",
|
|
2188
2187
|
type: "text",
|
|
2189
|
-
"onUpdate:modelValue":
|
|
2188
|
+
"onUpdate:modelValue": m[11] || (m[11] = (H) => g("update:hash-on-cookie-path", H))
|
|
2190
2189
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2191
2190
|
], 64)) : z("", !0),
|
|
2192
|
-
a.hashFallback === "query_arg" ? (
|
|
2191
|
+
a.hashFallback === "query_arg" ? (I(), E(U, {
|
|
2193
2192
|
key: 2,
|
|
2194
2193
|
autocomplete: "off",
|
|
2195
2194
|
class: "margin-top-6",
|
|
2196
2195
|
"data-testid": "upstreams-form-hash-fallback-query-argument",
|
|
2197
|
-
label: e(
|
|
2196
|
+
label: e(s)("upstreams.form.fields.query_argument.label"),
|
|
2198
2197
|
"model-value": a.hashFallbackQueryArgument,
|
|
2199
2198
|
readonly: a.readonly,
|
|
2200
2199
|
required: "",
|
|
2201
2200
|
type: "text",
|
|
2202
|
-
"onUpdate:modelValue":
|
|
2201
|
+
"onUpdate:modelValue": m[12] || (m[12] = (H) => g("update:hash-fallback-query-argument", H))
|
|
2203
2202
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0),
|
|
2204
|
-
a.hashFallback === "uri_capture" ? (
|
|
2203
|
+
a.hashFallback === "uri_capture" ? (I(), E(U, {
|
|
2205
2204
|
key: 3,
|
|
2206
2205
|
autocomplete: "off",
|
|
2207
2206
|
class: "margin-top-6",
|
|
2208
2207
|
"data-testid": "upstreams-form-hash-fallback-uri-capture",
|
|
2209
|
-
label: e(
|
|
2208
|
+
label: e(s)("upstreams.form.fields.uri_capture.label"),
|
|
2210
2209
|
"model-value": a.hashFallbackUriCapture,
|
|
2211
2210
|
readonly: a.readonly,
|
|
2212
2211
|
required: "",
|
|
2213
2212
|
type: "text",
|
|
2214
|
-
"onUpdate:modelValue":
|
|
2213
|
+
"onUpdate:modelValue": m[13] || (m[13] = (H) => g("update:hash-fallback-uri-capture", H))
|
|
2215
2214
|
}, null, 8, ["label", "model-value", "readonly"])) : z("", !0)
|
|
2216
2215
|
]),
|
|
2217
2216
|
_: 1
|
|
@@ -2221,7 +2220,7 @@ const ce = {
|
|
|
2221
2220
|
}, 8, ["title"]);
|
|
2222
2221
|
};
|
|
2223
2222
|
}
|
|
2224
|
-
}),
|
|
2223
|
+
}), ga = /* @__PURE__ */ de(ya, [["__scopeId", "data-v-d662db8e"]]), va = { class: "fields-group-title" }, ba = { class: "fields-group-text" }, ka = { class: "fields-group-title" }, _a = { class: "fields-group-text" }, Ca = /* @__PURE__ */ oe({
|
|
2225
2224
|
__name: "UpstreamsFormHealthChecks",
|
|
2226
2225
|
props: {
|
|
2227
2226
|
activeHealthSwitch: {
|
|
@@ -2244,73 +2243,73 @@ const ce = {
|
|
|
2244
2243
|
},
|
|
2245
2244
|
emits: ["update:active-health-switch", "update:passive-health-switch", "update:healthchecks-threshold"],
|
|
2246
2245
|
setup(a, { emit: R }) {
|
|
2247
|
-
const { i18n: { t: r } } = ce.useI18n(),
|
|
2248
|
-
return (u,
|
|
2249
|
-
const
|
|
2250
|
-
return
|
|
2246
|
+
const { i18n: { t: r } } = ce.useI18n(), s = R;
|
|
2247
|
+
return (u, k) => {
|
|
2248
|
+
const g = x("KExternalLink"), V = x("KInputSwitch"), T = x("KCard"), l = x("KInput");
|
|
2249
|
+
return I(), E(e(Ce), {
|
|
2251
2250
|
class: "kong-ui-entities-upstreams-healthchecks",
|
|
2252
2251
|
title: e(r)("upstreams.form.health_check.title")
|
|
2253
2252
|
}, {
|
|
2254
2253
|
description: n(() => [
|
|
2255
|
-
|
|
2256
|
-
W(
|
|
2257
|
-
h(
|
|
2254
|
+
b("p", null, [
|
|
2255
|
+
W(f(e(r)("upstreams.form.health_check.help")) + " ", 1),
|
|
2256
|
+
h(g, {
|
|
2258
2257
|
"hide-icon": "",
|
|
2259
2258
|
href: e(xe).loadBalancing
|
|
2260
2259
|
}, {
|
|
2261
2260
|
default: n(() => [
|
|
2262
|
-
W(
|
|
2261
|
+
W(f(e(r)("upstreams.form.buttons.view_documentation")), 1)
|
|
2263
2262
|
]),
|
|
2264
2263
|
_: 1
|
|
2265
2264
|
}, 8, ["href"])
|
|
2266
2265
|
])
|
|
2267
2266
|
]),
|
|
2268
2267
|
default: n(() => [
|
|
2269
|
-
h(
|
|
2268
|
+
h(T, null, {
|
|
2270
2269
|
default: n(() => [
|
|
2271
|
-
|
|
2272
|
-
|
|
2270
|
+
b("h5", va, f(e(r)("upstreams.form.fields.active_health_checks.label")), 1),
|
|
2271
|
+
b("p", ba, f(e(r)("upstreams.form.fields.active_health_checks.help")), 1),
|
|
2273
2272
|
h(V, {
|
|
2274
2273
|
class: "active-health-switch",
|
|
2275
2274
|
"data-testid": "active-health-switch",
|
|
2276
2275
|
disabled: a.readonly,
|
|
2277
2276
|
"model-value": a.activeHealthSwitch,
|
|
2278
|
-
onChange:
|
|
2277
|
+
onChange: k[0] || (k[0] = (c) => s("update:active-health-switch", c))
|
|
2279
2278
|
}, null, 8, ["disabled", "model-value"])
|
|
2280
2279
|
]),
|
|
2281
2280
|
_: 1
|
|
2282
2281
|
}),
|
|
2283
|
-
h(
|
|
2282
|
+
h(T, null, {
|
|
2284
2283
|
default: n(() => [
|
|
2285
|
-
|
|
2286
|
-
|
|
2284
|
+
b("h5", ka, f(e(r)("upstreams.form.fields.passive_health_checks.label")), 1),
|
|
2285
|
+
b("p", _a, f(e(r)("upstreams.form.fields.passive_health_checks.help")), 1),
|
|
2287
2286
|
h(V, {
|
|
2288
2287
|
class: "passive-health-switch",
|
|
2289
2288
|
"data-testid": "passive-health-switch",
|
|
2290
2289
|
disabled: a.readonly,
|
|
2291
2290
|
"model-value": a.passiveHealthSwitch,
|
|
2292
|
-
onChange:
|
|
2291
|
+
onChange: k[1] || (k[1] = (c) => s("update:passive-health-switch", c))
|
|
2293
2292
|
}, null, 8, ["disabled", "model-value"])
|
|
2294
2293
|
]),
|
|
2295
2294
|
_: 1
|
|
2296
2295
|
}),
|
|
2297
|
-
h(
|
|
2296
|
+
h(l, {
|
|
2298
2297
|
autocomplete: "off",
|
|
2299
2298
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
2300
2299
|
label: e(r)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
2301
|
-
max: e(
|
|
2302
|
-
min: e(
|
|
2300
|
+
max: e(Wt),
|
|
2301
|
+
min: e(Qt),
|
|
2303
2302
|
"model-value": a.healthchecksThreshold,
|
|
2304
2303
|
readonly: a.readonly,
|
|
2305
2304
|
type: "number",
|
|
2306
|
-
"onUpdate:modelValue":
|
|
2305
|
+
"onUpdate:modelValue": k[2] || (k[2] = (c) => s("update:healthchecks-threshold", c))
|
|
2307
2306
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2308
2307
|
]),
|
|
2309
2308
|
_: 1
|
|
2310
2309
|
}, 8, ["title"]);
|
|
2311
2310
|
};
|
|
2312
2311
|
}
|
|
2313
|
-
}),
|
|
2312
|
+
}), Ha = /* @__PURE__ */ de(Ca, [["__scopeId", "data-v-bfdc5a59"]]), Sa = "#d60027", Ua = { key: 2 }, Ia = { class: "fields-group-title" }, wa = { class: "fields-group-text" }, qa = { class: "fields-group-title" }, Ta = { class: "fields-group-text" }, Fa = /* @__PURE__ */ oe({
|
|
2314
2313
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
2315
2314
|
props: {
|
|
2316
2315
|
config: {
|
|
@@ -2385,7 +2384,7 @@ const ce = {
|
|
|
2385
2384
|
},
|
|
2386
2385
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:interval", "update:successes", "update:http-statuses", "update:unhealthy-interval", "update:http-failures", "update:tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
2387
2386
|
setup(a, { emit: R }) {
|
|
2388
|
-
const { i18n: { t: r } } = ce.useI18n(), { objectsAreEqual:
|
|
2387
|
+
const { i18n: { t: r } } = ce.useI18n(), { objectsAreEqual: s } = Fe(), u = a, k = R, g = M([
|
|
2389
2388
|
{
|
|
2390
2389
|
label: r("upstreams.form.healthcheck_type_labels.http"),
|
|
2391
2390
|
value: "http",
|
|
@@ -2411,61 +2410,61 @@ const ce = {
|
|
|
2411
2410
|
value: "grpcs",
|
|
2412
2411
|
selected: !1
|
|
2413
2412
|
}
|
|
2414
|
-
]), V =
|
|
2415
|
-
trackNewItems:
|
|
2413
|
+
]), V = q(() => u.type === "https" || u.type === "grpcs"), T = q(() => u.type === "tcp"), {
|
|
2414
|
+
trackNewItems: l
|
|
2416
2415
|
} = _e({ replaceId: !0 }), {
|
|
2417
|
-
trackNewItems:
|
|
2416
|
+
trackNewItems: c
|
|
2418
2417
|
} = _e({ replaceId: !0 });
|
|
2419
|
-
me(() => u.type, (
|
|
2420
|
-
p === "tcp" &&
|
|
2418
|
+
me(() => u.type, (U, p) => {
|
|
2419
|
+
p === "tcp" && U !== p && k("update:tcp-failures", "5"), (p === "https" || p === "grpcs") && U !== p && (k("update:https-sni", ""), k("update:verify-ssl", !1)), p !== "tcp" && U === "tcp" && (k("update:http-path", "/"), k("update:http-statuses", qt), k("update:unhealthy-http-statuses", Ft));
|
|
2421
2420
|
});
|
|
2422
|
-
const
|
|
2423
|
-
me(() => u.headers, (
|
|
2424
|
-
|
|
2421
|
+
const C = M([{ key: "", values: "" }]);
|
|
2422
|
+
me(() => u.headers, (U) => {
|
|
2423
|
+
s(C.value, U) || (C.value = [...U]);
|
|
2425
2424
|
}, {
|
|
2426
2425
|
immediate: !0,
|
|
2427
2426
|
deep: !0
|
|
2428
2427
|
});
|
|
2429
|
-
const
|
|
2430
|
-
|
|
2428
|
+
const m = () => {
|
|
2429
|
+
k("update:headers", C.value);
|
|
2431
2430
|
}, t = () => {
|
|
2432
|
-
|
|
2433
|
-
}, D = (
|
|
2434
|
-
|
|
2431
|
+
C.value.push({ key: "", values: "" }), m();
|
|
2432
|
+
}, D = (U) => {
|
|
2433
|
+
U === 0 && C.value.length === 1 ? C.value[0] = { key: "", values: "" } : C.value.splice(U, 1), m();
|
|
2435
2434
|
};
|
|
2436
|
-
return (
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2435
|
+
return (U, p) => {
|
|
2436
|
+
const H = x("KExternalLink"), Y = x("KSelect"), O = x("KInput"), ee = x("KCheckbox"), ae = x("KLabel"), v = x("KButton"), S = x("KMultiselect"), F = x("KCard");
|
|
2437
|
+
return I(), E(e(Ce), {
|
|
2439
2438
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
2440
2439
|
title: e(r)("upstreams.form.active_health_check.title")
|
|
2441
2440
|
}, {
|
|
2442
2441
|
description: n(() => [
|
|
2443
|
-
|
|
2444
|
-
W(
|
|
2445
|
-
h(
|
|
2442
|
+
b("p", null, [
|
|
2443
|
+
W(f(e(r)("upstreams.form.active_health_check.help")) + " ", 1),
|
|
2444
|
+
h(H, {
|
|
2446
2445
|
"hide-icon": "",
|
|
2447
2446
|
href: e(xe).upstreamObject
|
|
2448
2447
|
}, {
|
|
2449
2448
|
default: n(() => [
|
|
2450
|
-
W(
|
|
2449
|
+
W(f(e(r)("upstreams.form.buttons.view_documentation")), 1)
|
|
2451
2450
|
]),
|
|
2452
2451
|
_: 1
|
|
2453
2452
|
}, 8, ["href"])
|
|
2454
2453
|
])
|
|
2455
2454
|
]),
|
|
2456
2455
|
default: n(() => {
|
|
2457
|
-
var
|
|
2456
|
+
var w;
|
|
2458
2457
|
return [
|
|
2459
2458
|
h(Y, {
|
|
2460
2459
|
class: "active-healthcheck-type-select",
|
|
2461
|
-
items:
|
|
2460
|
+
items: g.value,
|
|
2462
2461
|
label: e(r)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
2463
2462
|
"model-value": a.type,
|
|
2464
2463
|
readonly: a.readonly,
|
|
2465
2464
|
width: "100%",
|
|
2466
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2465
|
+
"onUpdate:modelValue": p[0] || (p[0] = (y) => k("update:type", y))
|
|
2467
2466
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2468
|
-
|
|
2467
|
+
T.value ? z("", !0) : (I(), E(O, {
|
|
2469
2468
|
key: 0,
|
|
2470
2469
|
autocomplete: "off",
|
|
2471
2470
|
"data-testid": "active-healthcheck-http-path",
|
|
@@ -2473,31 +2472,31 @@ const ce = {
|
|
|
2473
2472
|
"model-value": a.httpPath,
|
|
2474
2473
|
readonly: a.readonly,
|
|
2475
2474
|
type: "text",
|
|
2476
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2475
|
+
"onUpdate:modelValue": p[1] || (p[1] = (y) => k("update:http-path", y))
|
|
2477
2476
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
2478
2477
|
h(O, {
|
|
2479
2478
|
autocomplete: "off",
|
|
2480
2479
|
"data-testid": "active-healthcheck-timeout",
|
|
2481
2480
|
label: e(r)("upstreams.form.fields.timeout.label"),
|
|
2482
|
-
max: e(
|
|
2483
|
-
min: e(
|
|
2481
|
+
max: e(zt),
|
|
2482
|
+
min: e(Jt),
|
|
2484
2483
|
"model-value": a.timeout,
|
|
2485
2484
|
readonly: a.readonly,
|
|
2486
2485
|
type: "number",
|
|
2487
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2486
|
+
"onUpdate:modelValue": p[2] || (p[2] = (y) => k("update:timeout", y))
|
|
2488
2487
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2489
2488
|
h(O, {
|
|
2490
2489
|
autocomplete: "off",
|
|
2491
2490
|
"data-testid": "active-healthcheck-concurrency",
|
|
2492
2491
|
label: e(r)("upstreams.form.fields.concurrency.label"),
|
|
2493
|
-
max: e(
|
|
2494
|
-
min: e(
|
|
2492
|
+
max: e(Xt),
|
|
2493
|
+
min: e(Gt),
|
|
2495
2494
|
"model-value": a.concurrency,
|
|
2496
2495
|
readonly: a.readonly,
|
|
2497
2496
|
type: "number",
|
|
2498
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
2497
|
+
"onUpdate:modelValue": p[3] || (p[3] = (y) => k("update:concurrency", y))
|
|
2499
2498
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2500
|
-
V.value ? (
|
|
2499
|
+
V.value ? (I(), se(be, { key: 1 }, [
|
|
2501
2500
|
h(O, {
|
|
2502
2501
|
autocomplete: "off",
|
|
2503
2502
|
class: "margin-bottom-6",
|
|
@@ -2506,66 +2505,66 @@ const ce = {
|
|
|
2506
2505
|
"model-value": a.httpsSni,
|
|
2507
2506
|
readonly: a.readonly,
|
|
2508
2507
|
type: "text",
|
|
2509
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
2508
|
+
"onUpdate:modelValue": p[4] || (p[4] = (y) => k("update:https-sni", y))
|
|
2510
2509
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2511
2510
|
h(ee, {
|
|
2512
2511
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
2513
2512
|
disabled: a.readonly,
|
|
2514
2513
|
label: e(r)("upstreams.form.fields.verify_ssl.label"),
|
|
2515
2514
|
"model-value": a.verifySsl,
|
|
2516
|
-
"onUpdate:modelValue": p[5] || (p[5] = (
|
|
2515
|
+
"onUpdate:modelValue": p[5] || (p[5] = (y) => k("update:verify-ssl", y))
|
|
2517
2516
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
2518
2517
|
], 64)) : z("", !0),
|
|
2519
|
-
((
|
|
2518
|
+
((w = a.config) == null ? void 0 : w.app) === "kongManager" ? (I(), se("div", Ua, [
|
|
2520
2519
|
h(ae, {
|
|
2521
2520
|
info: e(r)("upstreams.form.fields.headers.tooltip_active"),
|
|
2522
2521
|
"tooltip-attributes": { maxWidth: "250px" }
|
|
2523
2522
|
}, {
|
|
2524
2523
|
default: n(() => [
|
|
2525
|
-
W(
|
|
2524
|
+
W(f(e(r)("upstreams.form.fields.headers.label")), 1)
|
|
2526
2525
|
]),
|
|
2527
2526
|
_: 1
|
|
2528
2527
|
}, 8, ["info"]),
|
|
2529
|
-
|
|
2530
|
-
(
|
|
2531
|
-
key: `${
|
|
2532
|
-
class:
|
|
2528
|
+
b("div", null, [
|
|
2529
|
+
(I(!0), se(be, null, Ae(C.value, (y, j) => (I(), se("div", {
|
|
2530
|
+
key: `${y.header}_${j}`,
|
|
2531
|
+
class: Pt(["headers-row", { "margin-top-6": j > 0 }])
|
|
2533
2532
|
}, [
|
|
2534
2533
|
h(O, {
|
|
2535
|
-
modelValue:
|
|
2536
|
-
"onUpdate:modelValue": (G) =>
|
|
2534
|
+
modelValue: C.value[j].key,
|
|
2535
|
+
"onUpdate:modelValue": (G) => C.value[j].key = G,
|
|
2537
2536
|
autocomplete: "off",
|
|
2538
2537
|
"data-testid": `active-healthcheck-headers-header-${j + 1}`,
|
|
2539
2538
|
readonly: a.readonly,
|
|
2540
2539
|
type: "text",
|
|
2541
|
-
onBlur:
|
|
2540
|
+
onBlur: m
|
|
2542
2541
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2543
2542
|
h(O, {
|
|
2544
|
-
modelValue:
|
|
2545
|
-
"onUpdate:modelValue": (G) =>
|
|
2543
|
+
modelValue: C.value[j].values,
|
|
2544
|
+
"onUpdate:modelValue": (G) => C.value[j].values = G,
|
|
2546
2545
|
autocomplete: "off",
|
|
2547
2546
|
"data-testid": `active-healthcheck-headers-value-${j + 1}`,
|
|
2548
2547
|
readonly: a.readonly,
|
|
2549
2548
|
type: "text",
|
|
2550
|
-
onBlur:
|
|
2549
|
+
onBlur: m
|
|
2551
2550
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2552
|
-
h(
|
|
2551
|
+
h(v, {
|
|
2553
2552
|
appearance: "tertiary",
|
|
2554
2553
|
class: "btn-remove",
|
|
2555
2554
|
"data-testid": "btn-remove-header",
|
|
2556
|
-
disabled:
|
|
2555
|
+
disabled: C.value.length === 1,
|
|
2557
2556
|
icon: "",
|
|
2558
2557
|
onClick: (G) => D(j)
|
|
2559
2558
|
}, {
|
|
2560
2559
|
default: n(() => [
|
|
2561
|
-
h(e(
|
|
2560
|
+
h(e(Vt), {
|
|
2562
2561
|
class: "delete-item",
|
|
2563
|
-
color:
|
|
2562
|
+
color: C.value.length > 1 ? e(Sa) : void 0
|
|
2564
2563
|
}, null, 8, ["color"])
|
|
2565
2564
|
]),
|
|
2566
2565
|
_: 2
|
|
2567
2566
|
}, 1032, ["disabled", "onClick"]),
|
|
2568
|
-
|
|
2567
|
+
C.value && j === C.value.length - 1 ? (I(), E(v, {
|
|
2569
2568
|
key: 0,
|
|
2570
2569
|
appearance: "tertiary",
|
|
2571
2570
|
class: "btn-add-header",
|
|
@@ -2574,42 +2573,42 @@ const ce = {
|
|
|
2574
2573
|
onClick: t
|
|
2575
2574
|
}, {
|
|
2576
2575
|
default: n(() => [
|
|
2577
|
-
h(e(
|
|
2576
|
+
h(e(Ne))
|
|
2578
2577
|
]),
|
|
2579
2578
|
_: 1
|
|
2580
2579
|
})) : z("", !0)
|
|
2581
2580
|
], 2))), 128))
|
|
2582
2581
|
])
|
|
2583
2582
|
])) : z("", !0),
|
|
2584
|
-
h(
|
|
2583
|
+
h(F, null, {
|
|
2585
2584
|
default: n(() => [
|
|
2586
|
-
|
|
2587
|
-
|
|
2585
|
+
b("h5", Ia, f(e(r)("upstreams.form.healthy.label")), 1),
|
|
2586
|
+
b("p", wa, f(e(r)("upstreams.form.healthy.help")), 1),
|
|
2588
2587
|
h(O, {
|
|
2589
2588
|
autocomplete: "off",
|
|
2590
2589
|
class: "margin-bottom-6",
|
|
2591
2590
|
"data-testid": "active-healthcheck-interval",
|
|
2592
2591
|
help: e(r)("upstreams.form.fields.interval.help"),
|
|
2593
2592
|
label: e(r)("upstreams.form.fields.interval.label"),
|
|
2594
|
-
max: e(
|
|
2595
|
-
min: e(
|
|
2593
|
+
max: e(pt),
|
|
2594
|
+
min: e(dt),
|
|
2596
2595
|
"model-value": a.interval,
|
|
2597
2596
|
readonly: a.readonly,
|
|
2598
2597
|
type: "number",
|
|
2599
|
-
"onUpdate:modelValue": p[6] || (p[6] = (
|
|
2598
|
+
"onUpdate:modelValue": p[6] || (p[6] = (y) => k("update:interval", y))
|
|
2600
2599
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2601
2600
|
h(O, {
|
|
2602
2601
|
autocomplete: "off",
|
|
2603
2602
|
"data-testid": "active-healthcheck-successes",
|
|
2604
2603
|
label: e(r)("upstreams.form.fields.successes.label"),
|
|
2605
|
-
max: e(
|
|
2604
|
+
max: e(ve),
|
|
2606
2605
|
min: e(ge),
|
|
2607
2606
|
"model-value": a.successes,
|
|
2608
2607
|
readonly: a.readonly,
|
|
2609
2608
|
type: "number",
|
|
2610
|
-
"onUpdate:modelValue": p[7] || (p[7] = (
|
|
2609
|
+
"onUpdate:modelValue": p[7] || (p[7] = (y) => k("update:successes", y))
|
|
2611
2610
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2612
|
-
|
|
2611
|
+
T.value ? z("", !0) : (I(), E(S, {
|
|
2613
2612
|
key: 0,
|
|
2614
2613
|
autocomplete: "off",
|
|
2615
2614
|
class: "margin-top-6 active-healthcheck-http-statuses",
|
|
@@ -2619,56 +2618,56 @@ const ce = {
|
|
|
2619
2618
|
"model-value": a.httpStatuses,
|
|
2620
2619
|
readonly: a.readonly,
|
|
2621
2620
|
width: "100%",
|
|
2622
|
-
onItemAdded: p[8] || (p[8] = (
|
|
2623
|
-
onItemRemoved: p[9] || (p[9] = (
|
|
2624
|
-
"onUpdate:modelValue": p[10] || (p[10] = (
|
|
2621
|
+
onItemAdded: p[8] || (p[8] = (y) => e(l)(y, !0)),
|
|
2622
|
+
onItemRemoved: p[9] || (p[9] = (y) => e(l)(y, !1)),
|
|
2623
|
+
"onUpdate:modelValue": p[10] || (p[10] = (y) => k("update:http-statuses", y))
|
|
2625
2624
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2626
2625
|
]),
|
|
2627
2626
|
_: 1
|
|
2628
2627
|
}),
|
|
2629
|
-
h(
|
|
2628
|
+
h(F, null, {
|
|
2630
2629
|
default: n(() => [
|
|
2631
|
-
|
|
2632
|
-
|
|
2630
|
+
b("h5", qa, f(e(r)("upstreams.form.unhealthy.label")), 1),
|
|
2631
|
+
b("p", Ta, f(e(r)("upstreams.form.unhealthy.help")), 1),
|
|
2633
2632
|
h(O, {
|
|
2634
2633
|
autocomplete: "off",
|
|
2635
2634
|
class: "margin-bottom-6",
|
|
2636
2635
|
"data-testid": "active-healthcheck-unhealthy-interval",
|
|
2637
2636
|
help: e(r)("upstreams.form.fields.interval.help"),
|
|
2638
2637
|
label: e(r)("upstreams.form.fields.interval.label"),
|
|
2639
|
-
max: e(
|
|
2640
|
-
min: e(
|
|
2638
|
+
max: e(pt),
|
|
2639
|
+
min: e(dt),
|
|
2641
2640
|
"model-value": a.unhealthyInterval,
|
|
2642
2641
|
readonly: a.readonly,
|
|
2643
2642
|
type: "number",
|
|
2644
|
-
"onUpdate:modelValue": p[11] || (p[11] = (
|
|
2643
|
+
"onUpdate:modelValue": p[11] || (p[11] = (y) => k("update:unhealthy-interval", y))
|
|
2645
2644
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2646
2645
|
h(O, {
|
|
2647
2646
|
autocomplete: "off",
|
|
2648
2647
|
class: "margin-bottom-6",
|
|
2649
2648
|
"data-testid": "active-healthcheck-tcp-failures",
|
|
2650
2649
|
label: e(r)("upstreams.form.fields.tcp_failures.label"),
|
|
2651
|
-
max: e(
|
|
2650
|
+
max: e(ve),
|
|
2652
2651
|
min: e(ge),
|
|
2653
2652
|
"model-value": a.tcpFailures,
|
|
2654
2653
|
readonly: a.readonly,
|
|
2655
2654
|
type: "number",
|
|
2656
|
-
"onUpdate:modelValue": p[12] || (p[12] = (
|
|
2655
|
+
"onUpdate:modelValue": p[12] || (p[12] = (y) => k("update:tcp-failures", y))
|
|
2657
2656
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2658
|
-
|
|
2657
|
+
T.value ? z("", !0) : (I(), E(O, {
|
|
2659
2658
|
key: 0,
|
|
2660
2659
|
autocomplete: "off",
|
|
2661
2660
|
class: "margin-bottom-6",
|
|
2662
2661
|
"data-testid": "active-healthcheck-http-failures",
|
|
2663
2662
|
label: e(r)("upstreams.form.fields.http_failures.label"),
|
|
2664
|
-
max: e(
|
|
2663
|
+
max: e(ve),
|
|
2665
2664
|
min: e(ge),
|
|
2666
2665
|
"model-value": a.httpFailures,
|
|
2667
2666
|
readonly: a.readonly,
|
|
2668
2667
|
type: "number",
|
|
2669
|
-
"onUpdate:modelValue": p[13] || (p[13] = (
|
|
2668
|
+
"onUpdate:modelValue": p[13] || (p[13] = (y) => k("update:http-failures", y))
|
|
2670
2669
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2671
|
-
|
|
2670
|
+
T.value ? z("", !0) : (I(), E(S, {
|
|
2672
2671
|
key: 1,
|
|
2673
2672
|
autocomplete: "off",
|
|
2674
2673
|
class: "margin-bottom-6 active-healthcheck-unhealthy-http-statuses",
|
|
@@ -2678,20 +2677,20 @@ const ce = {
|
|
|
2678
2677
|
"model-value": a.unhealthyHttpStatuses,
|
|
2679
2678
|
readonly: a.readonly,
|
|
2680
2679
|
width: "100%",
|
|
2681
|
-
onItemAdded: p[14] || (p[14] = (
|
|
2682
|
-
onItemRemoved: p[15] || (p[15] = (
|
|
2683
|
-
"onUpdate:modelValue": p[16] || (p[16] = (
|
|
2680
|
+
onItemAdded: p[14] || (p[14] = (y) => e(c)(y, !0)),
|
|
2681
|
+
onItemRemoved: p[15] || (p[15] = (y) => e(c)(y, !1)),
|
|
2682
|
+
"onUpdate:modelValue": p[16] || (p[16] = (y) => k("update:unhealthy-http-statuses", y))
|
|
2684
2683
|
}, null, 8, ["items", "label", "model-value", "readonly"])),
|
|
2685
2684
|
h(O, {
|
|
2686
2685
|
autocomplete: "off",
|
|
2687
2686
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
2688
2687
|
label: e(r)("upstreams.form.fields.timeouts.label"),
|
|
2689
|
-
max: e(
|
|
2690
|
-
min: e(
|
|
2688
|
+
max: e(wt),
|
|
2689
|
+
min: e(It),
|
|
2691
2690
|
"model-value": a.unhealthyTimeouts,
|
|
2692
2691
|
readonly: a.readonly,
|
|
2693
2692
|
type: "number",
|
|
2694
|
-
"onUpdate:modelValue": p[17] || (p[17] = (
|
|
2693
|
+
"onUpdate:modelValue": p[17] || (p[17] = (y) => k("update:unhealthy-timeouts", y))
|
|
2695
2694
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2696
2695
|
]),
|
|
2697
2696
|
_: 1
|
|
@@ -2702,7 +2701,7 @@ const ce = {
|
|
|
2702
2701
|
}, 8, ["title"]);
|
|
2703
2702
|
};
|
|
2704
2703
|
}
|
|
2705
|
-
}),
|
|
2704
|
+
}), xa = /* @__PURE__ */ de(Fa, [["__scopeId", "data-v-efccf560"]]), Oa = { class: "fields-group-title" }, $a = { class: "fields-group-text" }, Pa = { class: "fields-group-title" }, Ma = { class: "fields-group-text" }, Aa = /* @__PURE__ */ oe({
|
|
2706
2705
|
__name: "UpstreamsFormPassiveHealthCheck",
|
|
2707
2706
|
props: {
|
|
2708
2707
|
type: {
|
|
@@ -2741,7 +2740,7 @@ const ce = {
|
|
|
2741
2740
|
},
|
|
2742
2741
|
emits: ["update:type", "update:successes", "update:http-statuses", "update:timeouts", "update:http-failures", "update:unhealthy-http-statuses", "update:tcp-failures"],
|
|
2743
2742
|
setup(a, { emit: R }) {
|
|
2744
|
-
const { i18n: { t: r } } = ce.useI18n(),
|
|
2743
|
+
const { i18n: { t: r } } = ce.useI18n(), s = a, u = R, k = M([
|
|
2745
2744
|
{
|
|
2746
2745
|
label: r("upstreams.form.healthcheck_type_labels.http"),
|
|
2747
2746
|
value: "http",
|
|
@@ -2767,59 +2766,59 @@ const ce = {
|
|
|
2767
2766
|
value: "grpcs",
|
|
2768
2767
|
selected: !1
|
|
2769
2768
|
}
|
|
2770
|
-
]),
|
|
2769
|
+
]), g = q(() => s.type === "tcp"), {
|
|
2771
2770
|
trackNewItems: V
|
|
2772
2771
|
} = _e({ replaceId: !0 }), {
|
|
2773
|
-
trackNewItems:
|
|
2772
|
+
trackNewItems: T
|
|
2774
2773
|
} = _e({ replaceId: !0 });
|
|
2775
|
-
return me(() =>
|
|
2776
|
-
|
|
2777
|
-
}), (
|
|
2778
|
-
const
|
|
2779
|
-
return
|
|
2774
|
+
return me(() => s.type, (l, c) => {
|
|
2775
|
+
c === "tcp" && l !== c && u("update:tcp-failures", "5"), c !== "tcp" && l === "tcp" && (u("update:http-statuses", Tt), u("update:unhealthy-http-statuses", xt));
|
|
2776
|
+
}), (l, c) => {
|
|
2777
|
+
const C = x("KExternalLink"), m = x("KSelect"), t = x("KInput"), D = x("KMultiselect"), U = x("KCard");
|
|
2778
|
+
return I(), E(e(Ce), {
|
|
2780
2779
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
2781
2780
|
title: e(r)("upstreams.form.passive_health_check.title")
|
|
2782
2781
|
}, {
|
|
2783
2782
|
description: n(() => [
|
|
2784
|
-
|
|
2785
|
-
W(
|
|
2786
|
-
h(
|
|
2783
|
+
b("p", null, [
|
|
2784
|
+
W(f(e(r)("upstreams.form.passive_health_check.help")) + " ", 1),
|
|
2785
|
+
h(C, {
|
|
2787
2786
|
"hide-icon": "",
|
|
2788
2787
|
href: e(xe).upstreamObject
|
|
2789
2788
|
}, {
|
|
2790
2789
|
default: n(() => [
|
|
2791
|
-
W(
|
|
2790
|
+
W(f(e(r)("upstreams.form.buttons.view_documentation")), 1)
|
|
2792
2791
|
]),
|
|
2793
2792
|
_: 1
|
|
2794
2793
|
}, 8, ["href"])
|
|
2795
2794
|
])
|
|
2796
2795
|
]),
|
|
2797
2796
|
default: n(() => [
|
|
2798
|
-
h(
|
|
2797
|
+
h(m, {
|
|
2799
2798
|
class: "passive-healthcheck-type-select",
|
|
2800
|
-
items:
|
|
2799
|
+
items: k.value,
|
|
2801
2800
|
label: e(r)("upstreams.form.fields.passive_health_check_type.label"),
|
|
2802
2801
|
"model-value": a.type,
|
|
2803
2802
|
readonly: a.readonly,
|
|
2804
2803
|
width: "100%",
|
|
2805
|
-
"onUpdate:modelValue":
|
|
2804
|
+
"onUpdate:modelValue": c[0] || (c[0] = (p) => u("update:type", p))
|
|
2806
2805
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2807
|
-
h(
|
|
2806
|
+
h(U, null, {
|
|
2808
2807
|
default: n(() => [
|
|
2809
|
-
|
|
2810
|
-
|
|
2808
|
+
b("h5", Oa, f(e(r)("upstreams.form.passive_healthy.label")), 1),
|
|
2809
|
+
b("p", $a, f(e(r)("upstreams.form.passive_healthy.help")), 1),
|
|
2811
2810
|
h(t, {
|
|
2812
2811
|
autocomplete: "off",
|
|
2813
2812
|
"data-testid": "passive-healthcheck-successes",
|
|
2814
2813
|
label: e(r)("upstreams.form.fields.successes.label"),
|
|
2815
|
-
max: e(
|
|
2814
|
+
max: e(ve),
|
|
2816
2815
|
min: e(ge),
|
|
2817
2816
|
"model-value": a.successes,
|
|
2818
2817
|
readonly: a.readonly,
|
|
2819
2818
|
type: "number",
|
|
2820
|
-
"onUpdate:modelValue":
|
|
2819
|
+
"onUpdate:modelValue": c[1] || (c[1] = (p) => u("update:successes", p))
|
|
2821
2820
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2822
|
-
|
|
2821
|
+
g.value ? z("", !0) : (I(), E(D, {
|
|
2823
2822
|
key: 0,
|
|
2824
2823
|
class: "margin-top-6 passive-healthcheck-http-statuses",
|
|
2825
2824
|
"enable-item-creation": "",
|
|
@@ -2828,54 +2827,54 @@ const ce = {
|
|
|
2828
2827
|
"model-value": a.httpStatuses,
|
|
2829
2828
|
readonly: a.readonly,
|
|
2830
2829
|
width: "100%",
|
|
2831
|
-
onItemAdded:
|
|
2832
|
-
onItemRemoved:
|
|
2833
|
-
"onUpdate:modelValue":
|
|
2830
|
+
onItemAdded: c[2] || (c[2] = (p) => e(V)(p, !0)),
|
|
2831
|
+
onItemRemoved: c[3] || (c[3] = (p) => e(V)(p, !1)),
|
|
2832
|
+
"onUpdate:modelValue": c[4] || (c[4] = (p) => u("update:http-statuses", p))
|
|
2834
2833
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2835
2834
|
]),
|
|
2836
2835
|
_: 1
|
|
2837
2836
|
}),
|
|
2838
|
-
h(
|
|
2837
|
+
h(U, null, {
|
|
2839
2838
|
default: n(() => [
|
|
2840
|
-
|
|
2841
|
-
|
|
2839
|
+
b("h5", Pa, f(e(r)("upstreams.form.passive_unhealthy.label")), 1),
|
|
2840
|
+
b("p", Ma, f(e(r)("upstreams.form.passive_unhealthy.help")), 1),
|
|
2842
2841
|
h(t, {
|
|
2843
2842
|
autocomplete: "off",
|
|
2844
2843
|
"data-testid": "passive-healthcheck-timeouts",
|
|
2845
2844
|
label: e(r)("upstreams.form.fields.timeouts.label"),
|
|
2846
|
-
max: e(
|
|
2847
|
-
min: e(
|
|
2845
|
+
max: e(wt),
|
|
2846
|
+
min: e(It),
|
|
2848
2847
|
"model-value": a.timeouts,
|
|
2849
2848
|
readonly: a.readonly,
|
|
2850
2849
|
type: "number",
|
|
2851
|
-
"onUpdate:modelValue":
|
|
2850
|
+
"onUpdate:modelValue": c[5] || (c[5] = (p) => u("update:timeouts", p))
|
|
2852
2851
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2853
2852
|
h(t, {
|
|
2854
2853
|
autocomplete: "off",
|
|
2855
2854
|
class: "margin-top-6",
|
|
2856
2855
|
"data-testid": "passive-healthcheck-tcp-failures",
|
|
2857
2856
|
label: e(r)("upstreams.form.fields.tcp_failures.label"),
|
|
2858
|
-
max: e(
|
|
2857
|
+
max: e(ve),
|
|
2859
2858
|
min: e(ge),
|
|
2860
2859
|
"model-value": a.tcpFailures,
|
|
2861
2860
|
readonly: a.readonly,
|
|
2862
2861
|
type: "number",
|
|
2863
|
-
"onUpdate:modelValue":
|
|
2862
|
+
"onUpdate:modelValue": c[6] || (c[6] = (p) => u("update:tcp-failures", p))
|
|
2864
2863
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2865
|
-
|
|
2864
|
+
g.value ? z("", !0) : (I(), E(t, {
|
|
2866
2865
|
key: 0,
|
|
2867
2866
|
autocomplete: "off",
|
|
2868
2867
|
class: "margin-top-6",
|
|
2869
2868
|
"data-testid": "passive-healthcheck-http-failures",
|
|
2870
2869
|
label: e(r)("upstreams.form.fields.http_failures.label"),
|
|
2871
|
-
max: e(
|
|
2870
|
+
max: e(ve),
|
|
2872
2871
|
min: e(ge),
|
|
2873
2872
|
"model-value": a.httpFailures,
|
|
2874
2873
|
readonly: a.readonly,
|
|
2875
2874
|
type: "number",
|
|
2876
|
-
"onUpdate:modelValue":
|
|
2875
|
+
"onUpdate:modelValue": c[7] || (c[7] = (p) => u("update:http-failures", p))
|
|
2877
2876
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2878
|
-
|
|
2877
|
+
g.value ? z("", !0) : (I(), E(D, {
|
|
2879
2878
|
key: 1,
|
|
2880
2879
|
autocomplete: "off",
|
|
2881
2880
|
class: "margin-top-6 passive-healthcheck-unhealthy-http-statuses",
|
|
@@ -2885,9 +2884,9 @@ const ce = {
|
|
|
2885
2884
|
"model-value": a.unhealthyHttpStatuses,
|
|
2886
2885
|
readonly: a.readonly,
|
|
2887
2886
|
width: "100%",
|
|
2888
|
-
onItemAdded:
|
|
2889
|
-
onItemRemoved:
|
|
2890
|
-
"onUpdate:modelValue":
|
|
2887
|
+
onItemAdded: c[8] || (c[8] = (p) => e(T)(p, !0)),
|
|
2888
|
+
onItemRemoved: c[9] || (c[9] = (p) => e(T)(p, !1)),
|
|
2889
|
+
"onUpdate:modelValue": c[10] || (c[10] = (p) => u("update:unhealthy-http-statuses", p))
|
|
2891
2890
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2892
2891
|
]),
|
|
2893
2892
|
_: 1
|
|
@@ -2897,7 +2896,7 @@ const ce = {
|
|
|
2897
2896
|
}, 8, ["title"]);
|
|
2898
2897
|
};
|
|
2899
2898
|
}
|
|
2900
|
-
}),
|
|
2899
|
+
}), Ka = /* @__PURE__ */ de(Aa, [["__scopeId", "data-v-5bd9952e"]]), Na = { class: "kong-ui-entities-upstreams-form" }, Va = /* @__PURE__ */ oe({
|
|
2901
2900
|
__name: "UpstreamsForm",
|
|
2902
2901
|
props: {
|
|
2903
2902
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2916,29 +2915,29 @@ const ce = {
|
|
|
2916
2915
|
emits: ["update", "error", "loading"],
|
|
2917
2916
|
setup(a, { emit: R }) {
|
|
2918
2917
|
var N;
|
|
2919
|
-
const r = a,
|
|
2918
|
+
const r = a, s = R, { inRange: u, stringToNumberArray: k, upstreamsResponseToFields: g, getDefaultUpstreamFields: V, objectsAreEqual: T, cloneDeep: l } = Fe(), { axiosInstance: c } = Te((N = r.config) == null ? void 0 : N.axiosRequestConfig), { getMessageFromError: C } = Ht(), m = Ut(), t = Ie({
|
|
2920
2919
|
fields: V(),
|
|
2921
2920
|
readonly: !1,
|
|
2922
2921
|
errorMessage: ""
|
|
2923
|
-
}), D = Ie(V()),
|
|
2924
|
-
t.fields.activeHealthCheck.interval =
|
|
2925
|
-
},
|
|
2926
|
-
t.fields.passiveHealthCheck.timeouts =
|
|
2927
|
-
}, Y =
|
|
2928
|
-
var
|
|
2929
|
-
return (
|
|
2930
|
-
}),
|
|
2931
|
-
Object.assign(t.fields,
|
|
2922
|
+
}), D = Ie(V()), U = q(() => !T(t.fields, D)), p = (d) => {
|
|
2923
|
+
t.fields.activeHealthCheck.interval = d ? "5" : "0", t.fields.activeHealthCheck.successes = d ? "5" : "0", t.fields.activeHealthCheck.httpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthyInterval = d ? "5" : "0", t.fields.activeHealthCheck.tcpFailures = d ? "5" : "0";
|
|
2924
|
+
}, H = (d) => {
|
|
2925
|
+
t.fields.passiveHealthCheck.timeouts = d ? "5" : "0", t.fields.passiveHealthCheck.successes = d ? "80" : "0", t.fields.passiveHealthCheck.tcpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.httpFailures = d ? "5" : "0";
|
|
2926
|
+
}, Y = q(() => t.fields.slots ? u(t.fields.slots, $e, Pe) : !0), O = q(() => t.fields.hashOn === "header" ? !!t.fields.hashOnHeader : !0), ee = q(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookie : !0), ae = q(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookiePath : !0), v = q(() => t.fields.hashOn === "query_arg" ? !!t.fields.hashOnQueryArgument : !0), S = q(() => t.fields.hashOn === "uri_capture" ? !!t.fields.hashOnUriCapture : !0), F = q(() => t.fields.hashFallback === "header" ? !!t.fields.hashFallbackHeader : !0), w = q(() => t.fields.hashFallback === "query_arg" ? !!t.fields.hashFallbackQueryArgument : !0), y = q(() => t.fields.hashFallback === "uri_capture" ? !!t.fields.hashFallbackUriCapture : !0), j = q(() => !!t.fields.name && Y.value && O.value && ee.value && ae.value && v.value && S.value && F.value && w.value && y.value), G = q(() => r.upstreamId ? he.Edit : he.Create), re = q(() => {
|
|
2927
|
+
var d, i;
|
|
2928
|
+
return (i = ke.form[(d = r.config) == null ? void 0 : d.app]) == null ? void 0 : i.edit;
|
|
2929
|
+
}), ie = (d) => {
|
|
2930
|
+
Object.assign(t.fields, g(d)), Object.assign(D, l(t.fields));
|
|
2932
2931
|
}, P = () => {
|
|
2933
|
-
var
|
|
2934
|
-
|
|
2935
|
-
}, K = (
|
|
2936
|
-
|
|
2937
|
-
}, J = (
|
|
2938
|
-
|
|
2939
|
-
},
|
|
2940
|
-
var
|
|
2941
|
-
const
|
|
2932
|
+
var d;
|
|
2933
|
+
m.push(((d = r.config) == null ? void 0 : d.cancelRoute) || { name: "upstreams-list" });
|
|
2934
|
+
}, K = (d) => {
|
|
2935
|
+
s("loading", d);
|
|
2936
|
+
}, J = (d) => {
|
|
2937
|
+
s("error", d);
|
|
2938
|
+
}, L = q(() => {
|
|
2939
|
+
var i, o, A, Q, $;
|
|
2940
|
+
const d = {
|
|
2942
2941
|
name: t.fields.name,
|
|
2943
2942
|
slots: Number(t.fields.slots),
|
|
2944
2943
|
algorithm: t.fields.algorithm,
|
|
@@ -2946,11 +2945,11 @@ const ce = {
|
|
|
2946
2945
|
hash_fallback: t.fields.hashFallback,
|
|
2947
2946
|
healthchecks: {}
|
|
2948
2947
|
};
|
|
2949
|
-
return t.fields.hostHeader && (
|
|
2948
|
+
return t.fields.hostHeader && (d.host_header = t.fields.hostHeader), t.fields.clientCertificate && (d.client_certificate = { id: t.fields.clientCertificate }), t.fields.healthchecksThreshold && (d.healthchecks.threshold = Number(t.fields.healthchecksThreshold)), t.fields.tags && (d.tags = (o = (i = t.fields.tags.split(",")) == null ? void 0 : i.map((B) => String(B || "").trim())) == null ? void 0 : o.filter((B) => B !== "")), 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), t.fields.activeHealthSwitch ? (d.healthchecks.active = {
|
|
2950
2949
|
type: t.fields.activeHealthCheck.type,
|
|
2951
2950
|
healthy: {},
|
|
2952
2951
|
unhealthy: {}
|
|
2953
|
-
}, t.fields.activeHealthCheck.timeout && (
|
|
2952
|
+
}, t.fields.activeHealthCheck.timeout && (d.healthchecks.active.timeout = Number(t.fields.activeHealthCheck.timeout)), t.fields.activeHealthCheck.concurrency && (d.healthchecks.active.concurrency = Number(t.fields.activeHealthCheck.concurrency)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpPath && (d.healthchecks.active.http_path = t.fields.activeHealthCheck.httpPath), ((A = r.config) == null ? void 0 : A.app) === "kongManager" && (t.fields.activeHealthCheck.headers.length === 0 ? d.healthchecks.active.headers = [] : d.healthchecks.active.headers = t.fields.activeHealthCheck.headers.reduce((B, le) => {
|
|
2954
2953
|
var X, te;
|
|
2955
2954
|
return le.key ? {
|
|
2956
2955
|
...B,
|
|
@@ -2958,7 +2957,7 @@ const ce = {
|
|
|
2958
2957
|
} : {
|
|
2959
2958
|
...B
|
|
2960
2959
|
};
|
|
2961
|
-
}, {})), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && t.fields.activeHealthCheck.httpsSni && (
|
|
2960
|
+
}, {})), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && t.fields.activeHealthCheck.httpsSni && (d.healthchecks.active.https_sni = t.fields.activeHealthCheck.httpsSni), (t.fields.activeHealthCheck.type === "https" || t.fields.activeHealthCheck.type === "grpcs") && (d.healthchecks.active.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), t.fields.activeHealthCheck.interval && (d.healthchecks.active.healthy.interval = Number(t.fields.activeHealthCheck.interval)), t.fields.activeHealthCheck.successes && (d.healthchecks.active.healthy.successes = Number(t.fields.activeHealthCheck.successes)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpStatuses && (d.healthchecks.active.healthy.http_statuses = k(t.fields.activeHealthCheck.httpStatuses)), t.fields.activeHealthCheck.unhealthyInterval && (d.healthchecks.active.unhealthy.interval = Number(t.fields.activeHealthCheck.unhealthyInterval)), t.fields.activeHealthCheck.unhealthyTimeouts && (d.healthchecks.active.unhealthy.timeouts = Number(t.fields.activeHealthCheck.unhealthyTimeouts)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.unhealthyHttpStatuses && (d.healthchecks.active.unhealthy.http_statuses = k(t.fields.activeHealthCheck.unhealthyHttpStatuses)), t.fields.activeHealthCheck.type !== "tcp" && t.fields.activeHealthCheck.httpFailures && (d.healthchecks.active.unhealthy.http_failures = Number(t.fields.activeHealthCheck.httpFailures)), t.fields.activeHealthCheck.tcpFailures && (d.healthchecks.active.unhealthy.tcp_failures = Number(t.fields.activeHealthCheck.tcpFailures))) : ((Q = r.config) == null ? void 0 : Q.app) === "kongManager" && G.value === he.Edit && (d.healthchecks.active = {
|
|
2962
2961
|
type: t.fields.activeHealthCheck.type,
|
|
2963
2962
|
headers: {},
|
|
2964
2963
|
healthy: {
|
|
@@ -2970,11 +2969,11 @@ const ce = {
|
|
|
2970
2969
|
http_failures: 0,
|
|
2971
2970
|
tcp_failures: 0
|
|
2972
2971
|
}
|
|
2973
|
-
}), t.fields.passiveHealthSwitch ? (
|
|
2972
|
+
}), t.fields.passiveHealthSwitch ? (d.healthchecks.passive = {
|
|
2974
2973
|
type: t.fields.passiveHealthCheck.type,
|
|
2975
2974
|
healthy: {},
|
|
2976
2975
|
unhealthy: {}
|
|
2977
|
-
}, t.fields.passiveHealthCheck.successes && (
|
|
2976
|
+
}, t.fields.passiveHealthCheck.successes && (d.healthchecks.passive.healthy.successes = Number(t.fields.passiveHealthCheck.successes)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.httpStatuses && (d.healthchecks.passive.healthy.http_statuses = k(t.fields.passiveHealthCheck.httpStatuses)), t.fields.passiveHealthCheck.timeouts && (d.healthchecks.passive.unhealthy.timeouts = Number(t.fields.passiveHealthCheck.timeouts)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.unhealthyHttpStatuses && (d.healthchecks.passive.unhealthy.http_statuses = k(t.fields.passiveHealthCheck.unhealthyHttpStatuses)), t.fields.passiveHealthCheck.type !== "tcp" && t.fields.passiveHealthCheck.httpFailures && (d.healthchecks.passive.unhealthy.http_failures = Number(t.fields.passiveHealthCheck.httpFailures)), t.fields.passiveHealthCheck.tcpFailures && (d.healthchecks.passive.unhealthy.tcp_failures = Number(t.fields.passiveHealthCheck.tcpFailures))) : (($ = r.config) == null ? void 0 : $.app) === "kongManager" && G.value === he.Edit && (d.healthchecks.passive = {
|
|
2978
2977
|
type: t.fields.passiveHealthCheck.type,
|
|
2979
2978
|
healthy: {
|
|
2980
2979
|
successes: 0
|
|
@@ -2984,145 +2983,145 @@ const ce = {
|
|
|
2984
2983
|
tcp_failures: 0,
|
|
2985
2984
|
http_failures: 0
|
|
2986
2985
|
}
|
|
2987
|
-
}),
|
|
2988
|
-
}), Z = (
|
|
2989
|
-
var o,
|
|
2990
|
-
let
|
|
2991
|
-
return ((
|
|
2992
|
-
},
|
|
2993
|
-
var
|
|
2986
|
+
}), d;
|
|
2987
|
+
}), Z = (d) => {
|
|
2988
|
+
var o, A, Q, $, B, le;
|
|
2989
|
+
let i = `${(o = r.config) == null ? void 0 : o.apiBaseUrl}${ke.form[(A = r.config) == null ? void 0 : A.app][d]}`;
|
|
2990
|
+
return ((Q = r.config) == null ? void 0 : Q.app) === "konnect" ? i = i.replace(/{controlPlaneId}/gi, (($ = r.config) == null ? void 0 : $.controlPlaneId) || "") : ((B = r.config) == null ? void 0 : B.app) === "kongManager" && (i = i.replace(/\/{workspace}/gi, (le = r.config) != null && le.workspace ? `/${r.config.workspace}` : "")), i = i.replace(/{id}/gi, r.upstreamId), i;
|
|
2991
|
+
}, _ = async () => {
|
|
2992
|
+
var d;
|
|
2994
2993
|
try {
|
|
2995
|
-
t.readonly = !0, await
|
|
2996
|
-
let
|
|
2997
|
-
G.value === he.Create ?
|
|
2998
|
-
} catch (
|
|
2999
|
-
t.errorMessage =
|
|
2994
|
+
t.readonly = !0, await c.post(Z("validate"), L.value);
|
|
2995
|
+
let i;
|
|
2996
|
+
G.value === he.Create ? i = await c.post(Z("create"), L.value) : G.value === he.Edit && (i = ((d = r.config) == null ? void 0 : d.app) === "konnect" ? await c.put(Z("edit"), L.value) : await c.patch(Z("edit"), L.value)), s("update", i == null ? void 0 : i.data);
|
|
2997
|
+
} catch (i) {
|
|
2998
|
+
t.errorMessage = C(i), s("error", i);
|
|
3000
2999
|
} finally {
|
|
3001
3000
|
t.readonly = !1;
|
|
3002
3001
|
}
|
|
3003
3002
|
};
|
|
3004
|
-
return (
|
|
3005
|
-
h(e(
|
|
3006
|
-
"can-submit": j.value &&
|
|
3003
|
+
return (d, i) => (I(), se("div", Na, [
|
|
3004
|
+
h(e(St), {
|
|
3005
|
+
"can-submit": j.value && U.value,
|
|
3007
3006
|
config: a.config,
|
|
3008
3007
|
"edit-id": a.upstreamId,
|
|
3009
|
-
"entity-type": e(
|
|
3008
|
+
"entity-type": e(Ke).Upstream,
|
|
3010
3009
|
"error-message": t.errorMessage,
|
|
3011
|
-
"fetch-url":
|
|
3012
|
-
"form-fields":
|
|
3010
|
+
"fetch-url": re.value,
|
|
3011
|
+
"form-fields": L.value,
|
|
3013
3012
|
"is-readonly": t.readonly,
|
|
3014
3013
|
onCancel: P,
|
|
3015
3014
|
"onFetch:error": J,
|
|
3016
|
-
"onFetch:success":
|
|
3015
|
+
"onFetch:success": ie,
|
|
3017
3016
|
onLoading: K,
|
|
3018
|
-
onSubmit:
|
|
3017
|
+
onSubmit: _
|
|
3019
3018
|
}, {
|
|
3020
3019
|
default: n(() => [
|
|
3021
|
-
h(
|
|
3020
|
+
h(ca, {
|
|
3022
3021
|
"client-certificate": t.fields.clientCertificate,
|
|
3023
|
-
"onUpdate:clientCertificate":
|
|
3022
|
+
"onUpdate:clientCertificate": i[0] || (i[0] = (o) => t.fields.clientCertificate = o),
|
|
3024
3023
|
"host-header": t.fields.hostHeader,
|
|
3025
|
-
"onUpdate:hostHeader":
|
|
3024
|
+
"onUpdate:hostHeader": i[1] || (i[1] = (o) => t.fields.hostHeader = o),
|
|
3026
3025
|
name: t.fields.name,
|
|
3027
|
-
"onUpdate:name":
|
|
3026
|
+
"onUpdate:name": i[2] || (i[2] = (o) => t.fields.name = o),
|
|
3028
3027
|
tags: t.fields.tags,
|
|
3029
|
-
"onUpdate:tags":
|
|
3028
|
+
"onUpdate:tags": i[3] || (i[3] = (o) => t.fields.tags = o),
|
|
3030
3029
|
config: a.config,
|
|
3031
3030
|
readonly: t.readonly
|
|
3032
3031
|
}, null, 8, ["client-certificate", "host-header", "name", "tags", "config", "readonly"]),
|
|
3033
|
-
h(
|
|
3032
|
+
h(ga, {
|
|
3034
3033
|
algorithm: t.fields.algorithm,
|
|
3035
|
-
"onUpdate:algorithm":
|
|
3034
|
+
"onUpdate:algorithm": i[4] || (i[4] = (o) => t.fields.algorithm = o),
|
|
3036
3035
|
"hash-fallback": t.fields.hashFallback,
|
|
3037
|
-
"onUpdate:hashFallback":
|
|
3036
|
+
"onUpdate:hashFallback": i[5] || (i[5] = (o) => t.fields.hashFallback = o),
|
|
3038
3037
|
"hash-fallback-header": t.fields.hashFallbackHeader,
|
|
3039
|
-
"onUpdate:hashFallbackHeader":
|
|
3038
|
+
"onUpdate:hashFallbackHeader": i[6] || (i[6] = (o) => t.fields.hashFallbackHeader = o),
|
|
3040
3039
|
"hash-fallback-query-argument": t.fields.hashFallbackQueryArgument,
|
|
3041
|
-
"onUpdate:hashFallbackQueryArgument":
|
|
3040
|
+
"onUpdate:hashFallbackQueryArgument": i[7] || (i[7] = (o) => t.fields.hashFallbackQueryArgument = o),
|
|
3042
3041
|
"hash-fallback-uri-capture": t.fields.hashFallbackUriCapture,
|
|
3043
|
-
"onUpdate:hashFallbackUriCapture":
|
|
3042
|
+
"onUpdate:hashFallbackUriCapture": i[8] || (i[8] = (o) => t.fields.hashFallbackUriCapture = o),
|
|
3044
3043
|
"hash-on": t.fields.hashOn,
|
|
3045
|
-
"onUpdate:hashOn":
|
|
3044
|
+
"onUpdate:hashOn": i[9] || (i[9] = (o) => t.fields.hashOn = o),
|
|
3046
3045
|
"hash-on-cookie": t.fields.hashOnCookie,
|
|
3047
|
-
"onUpdate:hashOnCookie":
|
|
3046
|
+
"onUpdate:hashOnCookie": i[10] || (i[10] = (o) => t.fields.hashOnCookie = o),
|
|
3048
3047
|
"hash-on-cookie-path": t.fields.hashOnCookiePath,
|
|
3049
|
-
"onUpdate:hashOnCookiePath":
|
|
3048
|
+
"onUpdate:hashOnCookiePath": i[11] || (i[11] = (o) => t.fields.hashOnCookiePath = o),
|
|
3050
3049
|
"hash-on-header": t.fields.hashOnHeader,
|
|
3051
|
-
"onUpdate:hashOnHeader":
|
|
3050
|
+
"onUpdate:hashOnHeader": i[12] || (i[12] = (o) => t.fields.hashOnHeader = o),
|
|
3052
3051
|
"hash-on-query-argument": t.fields.hashOnQueryArgument,
|
|
3053
|
-
"onUpdate:hashOnQueryArgument":
|
|
3052
|
+
"onUpdate:hashOnQueryArgument": i[13] || (i[13] = (o) => t.fields.hashOnQueryArgument = o),
|
|
3054
3053
|
"hash-on-uri-capture": t.fields.hashOnUriCapture,
|
|
3055
|
-
"onUpdate:hashOnUriCapture":
|
|
3054
|
+
"onUpdate:hashOnUriCapture": i[14] || (i[14] = (o) => t.fields.hashOnUriCapture = o),
|
|
3056
3055
|
slots: t.fields.slots,
|
|
3057
|
-
"onUpdate:slots":
|
|
3056
|
+
"onUpdate:slots": i[15] || (i[15] = (o) => t.fields.slots = o),
|
|
3058
3057
|
readonly: t.readonly
|
|
3059
3058
|
}, 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", "readonly"]),
|
|
3060
|
-
h(
|
|
3059
|
+
h(Ha, {
|
|
3061
3060
|
"active-health-switch": t.fields.activeHealthSwitch,
|
|
3062
3061
|
"onUpdate:activeHealthSwitch": [
|
|
3063
|
-
|
|
3062
|
+
i[16] || (i[16] = (o) => t.fields.activeHealthSwitch = o),
|
|
3064
3063
|
p
|
|
3065
3064
|
],
|
|
3066
3065
|
"healthchecks-threshold": t.fields.healthchecksThreshold,
|
|
3067
|
-
"onUpdate:healthchecksThreshold":
|
|
3066
|
+
"onUpdate:healthchecksThreshold": i[17] || (i[17] = (o) => t.fields.healthchecksThreshold = o),
|
|
3068
3067
|
"passive-health-switch": t.fields.passiveHealthSwitch,
|
|
3069
3068
|
"onUpdate:passiveHealthSwitch": [
|
|
3070
|
-
|
|
3071
|
-
|
|
3069
|
+
i[18] || (i[18] = (o) => t.fields.passiveHealthSwitch = o),
|
|
3070
|
+
H
|
|
3072
3071
|
],
|
|
3073
3072
|
readonly: t.readonly
|
|
3074
3073
|
}, null, 8, ["active-health-switch", "healthchecks-threshold", "passive-health-switch", "readonly"]),
|
|
3075
|
-
t.fields.activeHealthSwitch ? (
|
|
3074
|
+
t.fields.activeHealthSwitch ? (I(), E(xa, {
|
|
3076
3075
|
key: 0,
|
|
3077
3076
|
concurrency: t.fields.activeHealthCheck.concurrency,
|
|
3078
|
-
"onUpdate:concurrency":
|
|
3077
|
+
"onUpdate:concurrency": i[19] || (i[19] = (o) => t.fields.activeHealthCheck.concurrency = o),
|
|
3079
3078
|
headers: t.fields.activeHealthCheck.headers,
|
|
3080
|
-
"onUpdate:headers":
|
|
3079
|
+
"onUpdate:headers": i[20] || (i[20] = (o) => t.fields.activeHealthCheck.headers = o),
|
|
3081
3080
|
"http-failures": t.fields.activeHealthCheck.httpFailures,
|
|
3082
|
-
"onUpdate:httpFailures":
|
|
3081
|
+
"onUpdate:httpFailures": i[21] || (i[21] = (o) => t.fields.activeHealthCheck.httpFailures = o),
|
|
3083
3082
|
"http-path": t.fields.activeHealthCheck.httpPath,
|
|
3084
|
-
"onUpdate:httpPath":
|
|
3083
|
+
"onUpdate:httpPath": i[22] || (i[22] = (o) => t.fields.activeHealthCheck.httpPath = o),
|
|
3085
3084
|
"http-statuses": t.fields.activeHealthCheck.httpStatuses,
|
|
3086
|
-
"onUpdate:httpStatuses":
|
|
3085
|
+
"onUpdate:httpStatuses": i[23] || (i[23] = (o) => t.fields.activeHealthCheck.httpStatuses = o),
|
|
3087
3086
|
"https-sni": t.fields.activeHealthCheck.httpsSni,
|
|
3088
|
-
"onUpdate:httpsSni":
|
|
3087
|
+
"onUpdate:httpsSni": i[24] || (i[24] = (o) => t.fields.activeHealthCheck.httpsSni = o),
|
|
3089
3088
|
interval: t.fields.activeHealthCheck.interval,
|
|
3090
|
-
"onUpdate:interval":
|
|
3089
|
+
"onUpdate:interval": i[25] || (i[25] = (o) => t.fields.activeHealthCheck.interval = o),
|
|
3091
3090
|
successes: t.fields.activeHealthCheck.successes,
|
|
3092
|
-
"onUpdate:successes":
|
|
3091
|
+
"onUpdate:successes": i[26] || (i[26] = (o) => t.fields.activeHealthCheck.successes = o),
|
|
3093
3092
|
"tcp-failures": t.fields.activeHealthCheck.tcpFailures,
|
|
3094
|
-
"onUpdate:tcpFailures":
|
|
3093
|
+
"onUpdate:tcpFailures": i[27] || (i[27] = (o) => t.fields.activeHealthCheck.tcpFailures = o),
|
|
3095
3094
|
timeout: t.fields.activeHealthCheck.timeout,
|
|
3096
|
-
"onUpdate:timeout":
|
|
3095
|
+
"onUpdate:timeout": i[28] || (i[28] = (o) => t.fields.activeHealthCheck.timeout = o),
|
|
3097
3096
|
type: t.fields.activeHealthCheck.type,
|
|
3098
|
-
"onUpdate:type":
|
|
3097
|
+
"onUpdate:type": i[29] || (i[29] = (o) => t.fields.activeHealthCheck.type = o),
|
|
3099
3098
|
"unhealthy-http-statuses": t.fields.activeHealthCheck.unhealthyHttpStatuses,
|
|
3100
|
-
"onUpdate:unhealthyHttpStatuses":
|
|
3099
|
+
"onUpdate:unhealthyHttpStatuses": i[30] || (i[30] = (o) => t.fields.activeHealthCheck.unhealthyHttpStatuses = o),
|
|
3101
3100
|
"unhealthy-interval": t.fields.activeHealthCheck.unhealthyInterval,
|
|
3102
|
-
"onUpdate:unhealthyInterval":
|
|
3101
|
+
"onUpdate:unhealthyInterval": i[31] || (i[31] = (o) => t.fields.activeHealthCheck.unhealthyInterval = o),
|
|
3103
3102
|
"unhealthy-timeouts": t.fields.activeHealthCheck.unhealthyTimeouts,
|
|
3104
|
-
"onUpdate:unhealthyTimeouts":
|
|
3103
|
+
"onUpdate:unhealthyTimeouts": i[32] || (i[32] = (o) => t.fields.activeHealthCheck.unhealthyTimeouts = o),
|
|
3105
3104
|
"verify-ssl": t.fields.activeHealthCheck.verifySsl,
|
|
3106
|
-
"onUpdate:verifySsl":
|
|
3105
|
+
"onUpdate:verifySsl": i[33] || (i[33] = (o) => t.fields.activeHealthCheck.verifySsl = o),
|
|
3107
3106
|
config: a.config,
|
|
3108
3107
|
readonly: t.readonly
|
|
3109
3108
|
}, null, 8, ["concurrency", "headers", "http-failures", "http-path", "http-statuses", "https-sni", "interval", "successes", "tcp-failures", "timeout", "type", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) : z("", !0),
|
|
3110
|
-
t.fields.passiveHealthSwitch ? (
|
|
3109
|
+
t.fields.passiveHealthSwitch ? (I(), E(Ka, {
|
|
3111
3110
|
key: 1,
|
|
3112
3111
|
"http-failures": t.fields.passiveHealthCheck.httpFailures,
|
|
3113
|
-
"onUpdate:httpFailures":
|
|
3112
|
+
"onUpdate:httpFailures": i[34] || (i[34] = (o) => t.fields.passiveHealthCheck.httpFailures = o),
|
|
3114
3113
|
"http-statuses": t.fields.passiveHealthCheck.httpStatuses,
|
|
3115
|
-
"onUpdate:httpStatuses":
|
|
3114
|
+
"onUpdate:httpStatuses": i[35] || (i[35] = (o) => t.fields.passiveHealthCheck.httpStatuses = o),
|
|
3116
3115
|
successes: t.fields.passiveHealthCheck.successes,
|
|
3117
|
-
"onUpdate:successes":
|
|
3116
|
+
"onUpdate:successes": i[36] || (i[36] = (o) => t.fields.passiveHealthCheck.successes = o),
|
|
3118
3117
|
"tcp-failures": t.fields.passiveHealthCheck.tcpFailures,
|
|
3119
|
-
"onUpdate:tcpFailures":
|
|
3118
|
+
"onUpdate:tcpFailures": i[37] || (i[37] = (o) => t.fields.passiveHealthCheck.tcpFailures = o),
|
|
3120
3119
|
timeouts: t.fields.passiveHealthCheck.timeouts,
|
|
3121
|
-
"onUpdate:timeouts":
|
|
3120
|
+
"onUpdate:timeouts": i[38] || (i[38] = (o) => t.fields.passiveHealthCheck.timeouts = o),
|
|
3122
3121
|
type: t.fields.passiveHealthCheck.type,
|
|
3123
|
-
"onUpdate:type":
|
|
3122
|
+
"onUpdate:type": i[39] || (i[39] = (o) => t.fields.passiveHealthCheck.type = o),
|
|
3124
3123
|
"unhealthy-http-statuses": t.fields.passiveHealthCheck.unhealthyHttpStatuses,
|
|
3125
|
-
"onUpdate:unhealthyHttpStatuses":
|
|
3124
|
+
"onUpdate:unhealthyHttpStatuses": i[40] || (i[40] = (o) => t.fields.passiveHealthCheck.unhealthyHttpStatuses = o),
|
|
3126
3125
|
readonly: t.readonly
|
|
3127
3126
|
}, null, 8, ["http-failures", "http-statuses", "successes", "tcp-failures", "timeouts", "type", "unhealthy-http-statuses", "readonly"])) : z("", !0)
|
|
3128
3127
|
]),
|
|
@@ -3130,7 +3129,7 @@ const ce = {
|
|
|
3130
3129
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
3131
3130
|
]));
|
|
3132
3131
|
}
|
|
3133
|
-
}),
|
|
3132
|
+
}), Ja = /* @__PURE__ */ de(Va, [["__scopeId", "data-v-0669debc"]]), Ba = { "data-testid": "client_certificate-plain-text" }, za = /* @__PURE__ */ oe({
|
|
3134
3133
|
__name: "UpstreamsConfigCard",
|
|
3135
3134
|
props: {
|
|
3136
3135
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3157,7 +3156,7 @@ const ce = {
|
|
|
3157
3156
|
},
|
|
3158
3157
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
3159
3158
|
setup(a) {
|
|
3160
|
-
const R = a, { i18n: { t: r }, i18nT:
|
|
3159
|
+
const R = a, { i18n: { t: r }, i18nT: s } = ce.useI18n(), { getPropValue: u } = At(), k = q(() => ke.form[R.config.app].edit), g = M({
|
|
3161
3160
|
id: {},
|
|
3162
3161
|
name: {},
|
|
3163
3162
|
created_at: {},
|
|
@@ -3200,7 +3199,7 @@ const ce = {
|
|
|
3200
3199
|
order: 13,
|
|
3201
3200
|
section: ne.Basic,
|
|
3202
3201
|
// TODO: change to JsonArray
|
|
3203
|
-
type:
|
|
3202
|
+
type: Kt.Json
|
|
3204
3203
|
},
|
|
3205
3204
|
tags: {
|
|
3206
3205
|
order: 14,
|
|
@@ -3231,212 +3230,212 @@ const ce = {
|
|
|
3231
3230
|
tooltip: r("upstreams.form.hash_tooltips.client_certificate")
|
|
3232
3231
|
}
|
|
3233
3232
|
});
|
|
3234
|
-
return (V,
|
|
3235
|
-
h(e(
|
|
3233
|
+
return (V, T) => (I(), se("div", null, [
|
|
3234
|
+
h(e(Nt), {
|
|
3236
3235
|
config: a.config,
|
|
3237
3236
|
"config-card-doc": a.configCardDoc,
|
|
3238
|
-
"config-schema":
|
|
3239
|
-
"entity-type": e(
|
|
3240
|
-
"fetch-url":
|
|
3237
|
+
"config-schema": g.value,
|
|
3238
|
+
"entity-type": e(Ke).Upstream,
|
|
3239
|
+
"fetch-url": k.value,
|
|
3241
3240
|
"hide-title": a.hideTitle,
|
|
3242
|
-
"onFetch:error":
|
|
3243
|
-
"onFetch:success":
|
|
3244
|
-
onLoading:
|
|
3241
|
+
"onFetch:error": T[0] || (T[0] = (l) => V.$emit("fetch:error", l)),
|
|
3242
|
+
"onFetch:success": T[1] || (T[1] = (l) => V.$emit("fetch:success", l)),
|
|
3243
|
+
onLoading: T[2] || (T[2] = (l) => V.$emit("loading", l))
|
|
3245
3244
|
}, {
|
|
3246
3245
|
"name-label-tooltip": n(() => [
|
|
3247
|
-
h(e(
|
|
3246
|
+
h(e(s), {
|
|
3248
3247
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
3249
3248
|
scope: "global"
|
|
3250
3249
|
}, {
|
|
3251
3250
|
host: n(() => [
|
|
3252
|
-
|
|
3251
|
+
b("code", null, f(e(r)("upstreams.form.fields.name.host")), 1)
|
|
3253
3252
|
]),
|
|
3254
3253
|
_: 1
|
|
3255
3254
|
})
|
|
3256
3255
|
]),
|
|
3257
|
-
"hash_on-label-tooltip": n(({ row:
|
|
3258
|
-
h(e(
|
|
3256
|
+
"hash_on-label-tooltip": n(({ row: l }) => [
|
|
3257
|
+
h(e(s), {
|
|
3259
3258
|
keypath: "upstreams.form.fields.hash_on.tooltip",
|
|
3260
3259
|
scope: "global"
|
|
3261
3260
|
}, {
|
|
3262
3261
|
result: n(() => [
|
|
3263
|
-
|
|
3262
|
+
b("code", null, f(l.value), 1)
|
|
3264
3263
|
]),
|
|
3265
3264
|
_: 2
|
|
3266
3265
|
}, 1024)
|
|
3267
3266
|
]),
|
|
3268
3267
|
"hash_on_header-label-tooltip": n(() => [
|
|
3269
|
-
h(e(
|
|
3268
|
+
h(e(s), {
|
|
3270
3269
|
keypath: "upstreams.form.hash_tooltips.hash_on_header.text",
|
|
3271
3270
|
scope: "global"
|
|
3272
3271
|
}, {
|
|
3273
3272
|
hash_on: n(() => [
|
|
3274
|
-
|
|
3273
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_header.hash_on")), 1)
|
|
3275
3274
|
]),
|
|
3276
3275
|
header: n(() => [
|
|
3277
|
-
|
|
3276
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_header.header")), 1)
|
|
3278
3277
|
]),
|
|
3279
3278
|
_: 1
|
|
3280
3279
|
})
|
|
3281
3280
|
]),
|
|
3282
3281
|
"hash_on_uri_capture-label-tooltip": n(() => [
|
|
3283
|
-
h(e(
|
|
3282
|
+
h(e(s), {
|
|
3284
3283
|
keypath: "upstreams.form.hash_tooltips.hash_on_uri_capture.text",
|
|
3285
3284
|
scope: "global"
|
|
3286
3285
|
}, {
|
|
3287
3286
|
hash_on: n(() => [
|
|
3288
|
-
|
|
3287
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")), 1)
|
|
3289
3288
|
]),
|
|
3290
3289
|
uri_capture: n(() => [
|
|
3291
|
-
|
|
3290
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")), 1)
|
|
3292
3291
|
]),
|
|
3293
3292
|
_: 1
|
|
3294
3293
|
})
|
|
3295
3294
|
]),
|
|
3296
3295
|
"hash_on_query_arg-label-tooltip": n(() => [
|
|
3297
|
-
h(e(
|
|
3296
|
+
h(e(s), {
|
|
3298
3297
|
keypath: "upstreams.form.hash_tooltips.hash_on_query_arg.text",
|
|
3299
3298
|
scope: "global"
|
|
3300
3299
|
}, {
|
|
3301
3300
|
hash_on: n(() => [
|
|
3302
|
-
|
|
3301
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")), 1)
|
|
3303
3302
|
]),
|
|
3304
3303
|
query_arg: n(() => [
|
|
3305
|
-
|
|
3304
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")), 1)
|
|
3306
3305
|
]),
|
|
3307
3306
|
_: 1
|
|
3308
3307
|
})
|
|
3309
3308
|
]),
|
|
3310
3309
|
"hash_on_cookie-label-tooltip": n(() => [
|
|
3311
|
-
h(e(
|
|
3310
|
+
h(e(s), {
|
|
3312
3311
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie.text",
|
|
3313
3312
|
scope: "global"
|
|
3314
3313
|
}, {
|
|
3315
3314
|
hash_on: n(() => [
|
|
3316
|
-
|
|
3315
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")), 1)
|
|
3317
3316
|
]),
|
|
3318
3317
|
hash_fallback: n(() => [
|
|
3319
|
-
|
|
3318
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")), 1)
|
|
3320
3319
|
]),
|
|
3321
3320
|
cookie: n(() => [
|
|
3322
|
-
|
|
3321
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")), 1)
|
|
3323
3322
|
]),
|
|
3324
3323
|
_: 1
|
|
3325
3324
|
})
|
|
3326
3325
|
]),
|
|
3327
3326
|
"hash_on_cookie_path-label-tooltip": n(() => [
|
|
3328
|
-
h(e(
|
|
3327
|
+
h(e(s), {
|
|
3329
3328
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie_path.text",
|
|
3330
3329
|
scope: "global"
|
|
3331
3330
|
}, {
|
|
3332
3331
|
hash_on: n(() => [
|
|
3333
|
-
|
|
3332
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")), 1)
|
|
3334
3333
|
]),
|
|
3335
3334
|
hash_fallback: n(() => [
|
|
3336
|
-
|
|
3335
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")), 1)
|
|
3337
3336
|
]),
|
|
3338
3337
|
cookie: n(() => [
|
|
3339
|
-
|
|
3338
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")), 1)
|
|
3340
3339
|
]),
|
|
3341
3340
|
_: 1
|
|
3342
3341
|
})
|
|
3343
3342
|
]),
|
|
3344
3343
|
"slots-label-tooltip": n(() => [
|
|
3345
|
-
h(e(
|
|
3344
|
+
h(e(s), {
|
|
3346
3345
|
keypath: "upstreams.form.hash_tooltips.slots.text",
|
|
3347
3346
|
scope: "global"
|
|
3348
3347
|
}, {
|
|
3349
3348
|
algorithm: n(() => [
|
|
3350
|
-
|
|
3349
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.slots.algorithm")), 1)
|
|
3351
3350
|
]),
|
|
3352
3351
|
round_robin: n(() => [
|
|
3353
|
-
|
|
3352
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.slots.round_robin")), 1)
|
|
3354
3353
|
]),
|
|
3355
3354
|
consistent_hashing: n(() => [
|
|
3356
|
-
|
|
3355
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.slots.consistent_hashing")), 1)
|
|
3357
3356
|
]),
|
|
3358
|
-
min: n(() =>
|
|
3359
|
-
|
|
3357
|
+
min: n(() => T[3] || (T[3] = [
|
|
3358
|
+
b("code", null, "10", -1)
|
|
3360
3359
|
])),
|
|
3361
|
-
max: n(() =>
|
|
3362
|
-
|
|
3360
|
+
max: n(() => T[4] || (T[4] = [
|
|
3361
|
+
b("code", null, "65536", -1)
|
|
3363
3362
|
])),
|
|
3364
3363
|
_: 1
|
|
3365
3364
|
})
|
|
3366
3365
|
]),
|
|
3367
3366
|
"hash_fallback-label-tooltip": n(() => [
|
|
3368
|
-
h(e(
|
|
3367
|
+
h(e(s), {
|
|
3369
3368
|
keypath: "upstreams.form.hash_tooltips.hash_fallback.text",
|
|
3370
3369
|
scope: "global"
|
|
3371
3370
|
}, {
|
|
3372
3371
|
hash_on: n(() => [
|
|
3373
|
-
|
|
3372
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback.hash_on")), 1)
|
|
3374
3373
|
]),
|
|
3375
3374
|
cookie: n(() => [
|
|
3376
|
-
|
|
3375
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback.cookie")), 1)
|
|
3377
3376
|
]),
|
|
3378
3377
|
_: 1
|
|
3379
3378
|
})
|
|
3380
3379
|
]),
|
|
3381
3380
|
"hash_fallback_header-label-tooltip": n(() => [
|
|
3382
|
-
h(e(
|
|
3381
|
+
h(e(s), {
|
|
3383
3382
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_header.text",
|
|
3384
3383
|
scope: "global"
|
|
3385
3384
|
}, {
|
|
3386
3385
|
hash_fallback: n(() => [
|
|
3387
|
-
|
|
3386
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")), 1)
|
|
3388
3387
|
]),
|
|
3389
3388
|
header: n(() => [
|
|
3390
|
-
|
|
3389
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_header.header")), 1)
|
|
3391
3390
|
]),
|
|
3392
3391
|
_: 1
|
|
3393
3392
|
})
|
|
3394
3393
|
]),
|
|
3395
3394
|
"hash_fallback_query_arg-label-tooltip": n(() => [
|
|
3396
|
-
h(e(
|
|
3395
|
+
h(e(s), {
|
|
3397
3396
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_query_arg.text",
|
|
3398
3397
|
scope: "global"
|
|
3399
3398
|
}, {
|
|
3400
3399
|
hash_fallback: n(() => [
|
|
3401
|
-
|
|
3400
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")), 1)
|
|
3402
3401
|
]),
|
|
3403
3402
|
query_arg: n(() => [
|
|
3404
|
-
|
|
3403
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")), 1)
|
|
3405
3404
|
]),
|
|
3406
3405
|
_: 1
|
|
3407
3406
|
})
|
|
3408
3407
|
]),
|
|
3409
3408
|
"hash_fallback_uri_capture-label-tooltip": n(() => [
|
|
3410
|
-
h(e(
|
|
3409
|
+
h(e(s), {
|
|
3411
3410
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",
|
|
3412
3411
|
scope: "global"
|
|
3413
3412
|
}, {
|
|
3414
3413
|
hash_fallback: n(() => [
|
|
3415
|
-
|
|
3414
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")), 1)
|
|
3416
3415
|
]),
|
|
3417
3416
|
uri_capture: n(() => [
|
|
3418
|
-
|
|
3417
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")), 1)
|
|
3419
3418
|
]),
|
|
3420
3419
|
_: 1
|
|
3421
3420
|
})
|
|
3422
3421
|
]),
|
|
3423
3422
|
"host_header-label-tooltip": n(() => [
|
|
3424
|
-
h(e(
|
|
3423
|
+
h(e(s), {
|
|
3425
3424
|
keypath: "upstreams.form.hash_tooltips.host_header.text",
|
|
3426
3425
|
scope: "global"
|
|
3427
3426
|
}, {
|
|
3428
3427
|
host: n(() => [
|
|
3429
|
-
|
|
3428
|
+
b("code", null, f(e(r)("upstreams.form.hash_tooltips.host_header.host")), 1)
|
|
3430
3429
|
]),
|
|
3431
3430
|
_: 1
|
|
3432
3431
|
})
|
|
3433
3432
|
]),
|
|
3434
|
-
client_certificate: n((
|
|
3435
|
-
var
|
|
3433
|
+
client_certificate: n((l) => {
|
|
3434
|
+
var c;
|
|
3436
3435
|
return [
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3436
|
+
b("div", null, [
|
|
3437
|
+
b("div", Ba, [
|
|
3438
|
+
b("span", null, f((c = e(u)("rowValue", l)) == null ? void 0 : c.id), 1)
|
|
3440
3439
|
])
|
|
3441
3440
|
])
|
|
3442
3441
|
];
|
|
@@ -3447,9 +3446,9 @@ const ce = {
|
|
|
3447
3446
|
}
|
|
3448
3447
|
});
|
|
3449
3448
|
export {
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3449
|
+
ia as TargetForm,
|
|
3450
|
+
Wa as TargetsList,
|
|
3451
|
+
za as UpstreamsConfigCard,
|
|
3452
|
+
Ja as UpstreamsForm,
|
|
3453
|
+
Qa as UpstreamsList
|
|
3455
3454
|
};
|