@kong-ui-public/analytics-utilities 11.1.1-pr.2402.a80357eea.0 → 11.1.1-pr.2453.528a1744f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/request-export.d.ts +11 -0
- package/dist/types/types/request-export.d.ts.map +1 -0
- package/dist/vitals-utilities.cjs +1 -1
- package/dist/vitals-utilities.cjs.map +1 -1
- package/dist/vitals-utilities.es.js +50 -48
- package/dist/vitals-utilities.es.js.map +1 -1
- package/dist/vitals-utilities.umd.js +1 -1
- package/dist/vitals-utilities.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var jn = Object.defineProperty;
|
|
2
2
|
var zn = (e, t, r) => t in e ? jn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var b = (e, t, r) => zn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
const Ds = 3e4;
|
|
4
|
+
const Ds = 3e4, Ms = 250, Os = "analytics-query-provider";
|
|
5
5
|
var m = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(m || {});
|
|
6
|
-
const
|
|
6
|
+
const Ss = [
|
|
7
7
|
"horizontal_bar",
|
|
8
8
|
"vertical_bar",
|
|
9
9
|
"timeseries_line",
|
|
@@ -11,7 +11,7 @@ const Ms = [
|
|
|
11
11
|
"timeseries_bar",
|
|
12
12
|
"donut",
|
|
13
13
|
"single_value"
|
|
14
|
-
], Vn = ["in", "not_in", "selector"],
|
|
14
|
+
], Vn = ["in", "not_in", "selector"], vs = ["=", "!="], Es = ["=", "!=", "<", ">", "<=", ">="], Bn = ["empty", "not_empty"], xs = ["starts_with", "ends_with"], Ns = ["absolute", "relative"], Xn = [
|
|
15
15
|
"15m",
|
|
16
16
|
"1h",
|
|
17
17
|
"6h",
|
|
@@ -169,7 +169,7 @@ const Ms = [
|
|
|
169
169
|
"service_protocol",
|
|
170
170
|
"trace_id",
|
|
171
171
|
"upstream_uri"
|
|
172
|
-
],
|
|
172
|
+
], Ps = Jn, ea = [
|
|
173
173
|
"ai_count",
|
|
174
174
|
"latencies_response_ms",
|
|
175
175
|
"latencies_upstream_ms",
|
|
@@ -179,18 +179,18 @@ const Ms = [
|
|
|
179
179
|
"response_header_content_length",
|
|
180
180
|
"status_code",
|
|
181
181
|
"upstream_status_code"
|
|
182
|
-
], ta = ie(ea),
|
|
182
|
+
], ta = ie(ea), Is = [
|
|
183
183
|
"15M",
|
|
184
184
|
"1H",
|
|
185
185
|
"6H",
|
|
186
186
|
"12H",
|
|
187
187
|
"24H",
|
|
188
188
|
"7D"
|
|
189
|
-
],
|
|
189
|
+
], Cs = ["basic", "api_usage", "llm_usage"], ra = {
|
|
190
190
|
basic: new Set(Me),
|
|
191
191
|
api_usage: new Set(Oe),
|
|
192
192
|
llm_usage: new Set(Se)
|
|
193
|
-
},
|
|
193
|
+
}, Rs = (e, t) => t.filter((r) => ra[e].has(r.field)), na = [
|
|
194
194
|
"AF",
|
|
195
195
|
// Afghanistan
|
|
196
196
|
"AX",
|
|
@@ -689,7 +689,7 @@ const Ms = [
|
|
|
689
689
|
// Zambia
|
|
690
690
|
"ZW"
|
|
691
691
|
// Zimbabwe
|
|
692
|
-
],
|
|
692
|
+
], ks = [
|
|
693
693
|
"horizontal_bar",
|
|
694
694
|
"vertical_bar",
|
|
695
695
|
"gauge",
|
|
@@ -1156,7 +1156,7 @@ const Ms = [
|
|
|
1156
1156
|
},
|
|
1157
1157
|
required: ["type", "definition", "layout"],
|
|
1158
1158
|
additionalProperties: !1
|
|
1159
|
-
},
|
|
1159
|
+
}, Ys = {
|
|
1160
1160
|
type: "object",
|
|
1161
1161
|
properties: {
|
|
1162
1162
|
tiles: {
|
|
@@ -1175,7 +1175,7 @@ const Ms = [
|
|
|
1175
1175
|
},
|
|
1176
1176
|
required: ["tiles"],
|
|
1177
1177
|
additionalProperties: !1
|
|
1178
|
-
},
|
|
1178
|
+
}, Gs = (e) => {
|
|
1179
1179
|
const t = [];
|
|
1180
1180
|
return Me.includes(e) && t.push("basic"), Oe.includes(e) && t.push("api_usage"), Se.includes(e) && t.push("llm_usage"), (Kn.includes(e) || ta.includes(e)) && t.push("requests"), t;
|
|
1181
1181
|
}, sr = 6048e5, Da = 864e5, Ma = 60, Oa = 3600, Rt = Symbol.for("constructDateFrom");
|
|
@@ -2869,7 +2869,7 @@ function us(e, t, r) {
|
|
|
2869
2869
|
function yr(e, t) {
|
|
2870
2870
|
return -ue(e, t);
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2872
|
+
function As(e) {
|
|
2873
2873
|
return lr(e, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
|
|
2874
2874
|
}
|
|
2875
2875
|
function Jt(e, t = {}) {
|
|
@@ -2885,7 +2885,7 @@ function Jt(e, t = {}) {
|
|
|
2885
2885
|
return console.error("Invalid value passed to formatTime", e), "(invalid date)";
|
|
2886
2886
|
}
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function Hs(e, t) {
|
|
2889
2889
|
return `${Jt(e.getTime())} - ${Jt(t.getTime(), { includeTZ: !0 })}`;
|
|
2890
2890
|
}
|
|
2891
2891
|
const Te = {
|
|
@@ -2903,7 +2903,7 @@ const Te = {
|
|
|
2903
2903
|
weekly: 60 * 60 * 24 * 7 * 1e3,
|
|
2904
2904
|
trend: 0
|
|
2905
2905
|
};
|
|
2906
|
-
function
|
|
2906
|
+
function Fs(e, t) {
|
|
2907
2907
|
return e.map((r) => ({
|
|
2908
2908
|
value: r,
|
|
2909
2909
|
label: t.t(`configuration.vitals.reports.granularity.${r}`)
|
|
@@ -2916,7 +2916,7 @@ function cs(e, t) {
|
|
|
2916
2916
|
origin: t
|
|
2917
2917
|
};
|
|
2918
2918
|
}
|
|
2919
|
-
function
|
|
2919
|
+
function Ws(e) {
|
|
2920
2920
|
return e && er.find((r) => e <= Te[r]) || null;
|
|
2921
2921
|
}
|
|
2922
2922
|
function gr(e, t, r, n) {
|
|
@@ -2970,7 +2970,7 @@ class Ee {
|
|
|
2970
2970
|
return Wt(this.endDate());
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
2973
|
-
class
|
|
2973
|
+
class Ls extends Ee {
|
|
2974
2974
|
constructor(r, n, i, o, c) {
|
|
2975
2975
|
super(r, i, o);
|
|
2976
2976
|
b(this, "granularity");
|
|
@@ -2997,7 +2997,7 @@ class ds extends Ee {
|
|
|
2997
2997
|
return this.endDate().getTime() - this.startDate().getTime();
|
|
2998
2998
|
}
|
|
2999
2999
|
}
|
|
3000
|
-
class
|
|
3000
|
+
class qs extends ds {
|
|
3001
3001
|
startDate() {
|
|
3002
3002
|
return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity, 2);
|
|
3003
3003
|
}
|
|
@@ -3742,7 +3742,7 @@ const ws = /* @__PURE__ */ new Map([
|
|
|
3742
3742
|
})
|
|
3743
3743
|
]
|
|
3744
3744
|
]);
|
|
3745
|
-
function
|
|
3745
|
+
function Us(e) {
|
|
3746
3746
|
const t = new Date(e.start), r = new Date(e.end), n = (r.getTime() - t.getTime()) / 1e3;
|
|
3747
3747
|
return e.timePeriodsKey && ms(ws.get(e.timePeriodsKey)) || new I({
|
|
3748
3748
|
key: "custom",
|
|
@@ -3757,14 +3757,14 @@ function Ls(e) {
|
|
|
3757
3757
|
allowedTiers: ["free", "plus", "enterprise"]
|
|
3758
3758
|
});
|
|
3759
3759
|
}
|
|
3760
|
-
function
|
|
3760
|
+
function js(e) {
|
|
3761
3761
|
return {
|
|
3762
3762
|
...e.key !== "custom" && { timePeriodsKey: e.key },
|
|
3763
3763
|
start: e.rawStart(),
|
|
3764
3764
|
end: e.rawEnd()
|
|
3765
3765
|
};
|
|
3766
3766
|
}
|
|
3767
|
-
function
|
|
3767
|
+
function zs(e) {
|
|
3768
3768
|
return {
|
|
3769
3769
|
key: e.key,
|
|
3770
3770
|
display: e.display,
|
|
@@ -3778,7 +3778,7 @@ function Us(e) {
|
|
|
3778
3778
|
function bs(e, t) {
|
|
3779
3779
|
return ki(e.getTimezoneOffset() - t.getTimezoneOffset());
|
|
3780
3780
|
}
|
|
3781
|
-
const
|
|
3781
|
+
const Vs = {
|
|
3782
3782
|
"15M": m.FIFTEEN_MIN,
|
|
3783
3783
|
"1H": m.ONE_HOUR,
|
|
3784
3784
|
"6H": m.SIX_HOUR,
|
|
@@ -3807,7 +3807,7 @@ class Qe {
|
|
|
3807
3807
|
return Math.floor(i * (r - t + 1)) + t;
|
|
3808
3808
|
}
|
|
3809
3809
|
}
|
|
3810
|
-
const
|
|
3810
|
+
const Bs = (e, t, r) => {
|
|
3811
3811
|
const n = _r(10, 1e4), i = new Qe(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = [];
|
|
3812
3812
|
let h = 0;
|
|
3813
3813
|
for (let y = o; y <= c; y += 60 * 60 * 1e3)
|
|
@@ -3864,7 +3864,7 @@ const zs = (e, t, r) => {
|
|
|
3864
3864
|
data: d,
|
|
3865
3865
|
meta: _
|
|
3866
3866
|
};
|
|
3867
|
-
},
|
|
3867
|
+
}, Xs = (e, t) => {
|
|
3868
3868
|
const r = _r(10, 1e4), n = new Qe(r), i = Date.now() - 6 * 60 * 60 * 1e3, o = Date.now(), c = [], d = {};
|
|
3869
3869
|
e.forEach((f) => {
|
|
3870
3870
|
d[f.name] = 0;
|
|
@@ -3898,7 +3898,7 @@ const zs = (e, t, r) => {
|
|
|
3898
3898
|
data: c,
|
|
3899
3899
|
meta: h
|
|
3900
3900
|
};
|
|
3901
|
-
},
|
|
3901
|
+
}, $s = (e, t, r) => {
|
|
3902
3902
|
const n = Math.floor(Math.random() * 9991) + 10, i = new Qe(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = new Date((o + c) / 2).toISOString(), h = [];
|
|
3903
3903
|
if (t) {
|
|
3904
3904
|
const y = Object.keys(t), g = Object.values(t), x = (N, P) => {
|
|
@@ -3959,15 +3959,17 @@ function _r(e, t) {
|
|
|
3959
3959
|
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1) + e);
|
|
3960
3960
|
}
|
|
3961
3961
|
export {
|
|
3962
|
-
|
|
3962
|
+
qs as DeltaQueryTime,
|
|
3963
|
+
Ms as EXPORT_RECORD_LIMIT,
|
|
3963
3964
|
Te as Granularities,
|
|
3965
|
+
Os as INJECT_QUERY_PROVIDER,
|
|
3964
3966
|
Ds as REFRESH_INTERVAL_MS,
|
|
3965
3967
|
Qe as SeededRandom,
|
|
3966
|
-
|
|
3968
|
+
Vs as TIMEFRAME_LOOKUP,
|
|
3967
3969
|
ws as TimePeriods,
|
|
3968
3970
|
I as Timeframe,
|
|
3969
3971
|
m as TimeframeKeys,
|
|
3970
|
-
|
|
3972
|
+
Ls as TimeseriesQueryTime,
|
|
3971
3973
|
ds as UnaryQueryTime,
|
|
3972
3974
|
Zn as aiExploreAggregations,
|
|
3973
3975
|
ya as apiUsageQuerySchema,
|
|
@@ -3977,10 +3979,10 @@ export {
|
|
|
3977
3979
|
pr as ceilToNearestTimeGrain,
|
|
3978
3980
|
fa as choroplethMapSchema,
|
|
3979
3981
|
na as countryISOA2,
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
+
Ys as dashboardConfigSchema,
|
|
3983
|
+
ks as dashboardTileTypes,
|
|
3982
3984
|
ra as datasourceToFilterableDimensions,
|
|
3983
|
-
|
|
3985
|
+
Us as datePickerSelectionToTimeframe,
|
|
3984
3986
|
ua as donutChartSchema,
|
|
3985
3987
|
bs as dstOffsetHours,
|
|
3986
3988
|
$n as exploreAggregations,
|
|
@@ -3990,23 +3992,23 @@ export {
|
|
|
3990
3992
|
Oe as filterableExploreDimensions,
|
|
3991
3993
|
Kn as filterableRequestDimensions,
|
|
3992
3994
|
ta as filterableRequestMetrics,
|
|
3993
|
-
|
|
3995
|
+
Ps as filterableRequestWildcardDimensions,
|
|
3994
3996
|
ls as floorToNearestTimeGrain,
|
|
3995
|
-
|
|
3997
|
+
As as formatISOTimeWithTZ,
|
|
3996
3998
|
Jt as formatTime,
|
|
3997
|
-
|
|
3999
|
+
Hs as formatTimeRange,
|
|
3998
4000
|
oa as gaugeChartSchema,
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4001
|
+
$s as generateCrossSectionalData,
|
|
4002
|
+
Xs as generateMultipleMetricTimeSeriesData,
|
|
4003
|
+
Bs as generateSingleMetricTimeSeriesData,
|
|
4004
|
+
Gs as getFieldDataSources,
|
|
4005
|
+
Fs as granularitiesToOptions,
|
|
4004
4006
|
cs as granularityMsToQuery,
|
|
4005
4007
|
er as granularityValues,
|
|
4006
4008
|
pa as llmUsageSchema,
|
|
4007
4009
|
la as metricCardSchema,
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
+
Ws as msToGranularity,
|
|
4011
|
+
Cs as queryDatasources,
|
|
4010
4012
|
nr as queryableAiExploreDimensions,
|
|
4011
4013
|
Ve as queryableBasicExploreDimensions,
|
|
4012
4014
|
rr as queryableExploreDimensions,
|
|
@@ -4014,22 +4016,22 @@ export {
|
|
|
4014
4016
|
ea as queryableRequestMetrics,
|
|
4015
4017
|
Jn as queryableRequestWildcardDimensions,
|
|
4016
4018
|
_r as rand,
|
|
4017
|
-
|
|
4019
|
+
Is as relativeTimeRangeValuesRequestV2,
|
|
4018
4020
|
Xn as relativeTimeRangeValuesV4,
|
|
4019
|
-
|
|
4021
|
+
Ss as reportChartTypes,
|
|
4020
4022
|
Bn as requestFilterTypeEmptyV2,
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4023
|
+
vs as requestFilterTypeEqualsV2,
|
|
4024
|
+
Es as requestFilterTypeMetricV2,
|
|
4025
|
+
xs as requestFilterTypeWildcardV2,
|
|
4024
4026
|
da as singleValueSchema,
|
|
4025
4027
|
aa as slottableSchema,
|
|
4026
|
-
|
|
4028
|
+
Rs as stripUnknownFilters,
|
|
4027
4029
|
Ta as tileConfigSchema,
|
|
4028
4030
|
wa as tileDefinitionSchema,
|
|
4029
4031
|
ba as tileLayoutSchema,
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4032
|
+
Ns as timeRangeTypeV2,
|
|
4033
|
+
js as timeframeToDatepickerSelection,
|
|
4034
|
+
zs as timeframeToDatepickerTimeperiod,
|
|
4033
4035
|
sa as timeseriesChartSchema,
|
|
4034
4036
|
ca as topNTableSchema,
|
|
4035
4037
|
_a as validDashboardQuery
|