@antelopejs/dms-api 0.0.2 → 0.1.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/index.js
CHANGED
|
@@ -25,7 +25,7 @@ let pruneTask = null;
|
|
|
25
25
|
async function construct(config) {
|
|
26
26
|
(0, config_1.setConfig)(config);
|
|
27
27
|
await (0, page_1.AddFrontendModule)({
|
|
28
|
-
name: "@antelopejs/dms-api",
|
|
28
|
+
name: "@antelopejs/dms-api-frontend-vue",
|
|
29
29
|
sourcePath: node_path_1.default.join(__dirname, "../frontend-vue"),
|
|
30
30
|
renderer: { name: "vue", version: "3" },
|
|
31
31
|
configKey: "dmsApi",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAqCA,8BAUC;AAED,sBAgBC;AAED,0BAAkC;AAElC,oBAMC;AAxED,gBAAc;AACd,oBAAkB;AAClB,yBAAuB;AACvB,mBAAiB;AAEjB,0DAA6B;AAC7B,6DAAgE;AAChE,6FAGmD;AACnD,yDAAmE;AACnE,0DAAqD;AACrD,6CAGsB;AACtB,qCAAwD;AACxD,6BAKc;AACd,yCAKoB;AACpB,iDAAgD;AAEhD,IAAI,SAAS,GAAyB,IAAI,CAAC;AAEpC,KAAK,UAAU,SAAS,CAAC,MAA8B;IAC5D,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;IAElB,MAAM,IAAA,wBAAiB,EAAC;QACtB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAqCA,8BAUC;AAED,sBAgBC;AAED,0BAAkC;AAElC,oBAMC;AAxED,gBAAc;AACd,oBAAkB;AAClB,yBAAuB;AACvB,mBAAiB;AAEjB,0DAA6B;AAC7B,6DAAgE;AAChE,6FAGmD;AACnD,yDAAmE;AACnE,0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;IAC5B,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QACvB,SAAS,GAAG,IAAI,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed } from 'vue'
|
|
3
3
|
import type {
|
|
4
4
|
ChartDataPoint,
|
|
5
|
-
|
|
5
|
+
ApiChartResponse,
|
|
6
6
|
RouteStatsPayload,
|
|
7
7
|
} from '../composables/useApiIntrospection'
|
|
8
8
|
import ApiMethodBadge from './internal/ApiMethodBadge.vue'
|
|
@@ -57,7 +57,7 @@ const C_WORST = STATUS_CLASSES[2].color
|
|
|
57
57
|
const LATENCY_UNIT = 'ms'
|
|
58
58
|
|
|
59
59
|
function seriesByCategory(
|
|
60
|
-
payload:
|
|
60
|
+
payload: ApiChartResponse,
|
|
61
61
|
colors: Record<string, string>,
|
|
62
62
|
) {
|
|
63
63
|
const buckets = new Map<string, ChartDataPoint[]>()
|
|
@@ -121,7 +121,13 @@ export interface ChartDataPoint {
|
|
|
121
121
|
category?: string
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Payload shape of the dms-api statistics chart endpoints. Deliberately not
|
|
126
|
+
* named `ChartResponse`: the DMS UI layer exports an unrelated `ChartResponse`
|
|
127
|
+
* (`{ series: ChartSeries[] }`) under that name, and the two would shadow each
|
|
128
|
+
* other across layers.
|
|
129
|
+
*/
|
|
130
|
+
export interface ApiChartResponse {
|
|
125
131
|
data?: ChartDataPoint[]
|
|
126
132
|
}
|
|
127
133
|
|
|
@@ -155,8 +161,8 @@ export interface RouteStatsPayload {
|
|
|
155
161
|
route: { id: string; location: string; method: string }
|
|
156
162
|
aggregate?: RouteAggregate
|
|
157
163
|
charts: {
|
|
158
|
-
counts:
|
|
159
|
-
latency:
|
|
164
|
+
counts: ApiChartResponse
|
|
165
|
+
latency: ApiChartResponse
|
|
160
166
|
}
|
|
161
167
|
recent: RequestLogSummary[]
|
|
162
168
|
}
|