agentic-ui-libs 1.2.0-beta.20 → 1.2.0-beta.21
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/assets/agentic-ui-libs.css +9 -0
- package/dist/features/dashboard/AnalyticsChart.d.ts.map +1 -1
- package/dist/features/dashboard/Dashboard.d.ts.map +1 -1
- package/dist/features/dashboard/DashboardSection.d.ts.map +1 -1
- package/dist/features/dashboard/MetricCard.d.ts.map +1 -1
- package/dist/features/dashboard/ModelListView.d.ts +1 -0
- package/dist/features/dashboard/ModelListView.d.ts.map +1 -1
- package/dist/features/dashboard/ToolListView.d.ts.map +1 -1
- package/dist/index.js +535 -355
- package/dist/lib/dashboard-api.service.d.ts +1 -0
- package/dist/lib/dashboard-api.service.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +7 -0
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/ui-libs.umd.js +535 -355
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4291,7 +4291,7 @@ const MetricCard = ({
|
|
|
4291
4291
|
onClick,
|
|
4292
4292
|
isFirst = false
|
|
4293
4293
|
}) => {
|
|
4294
|
-
const { title, value, change, info, highlighted } = data;
|
|
4294
|
+
const { title, value, change, info, highlighted, failedCount } = data;
|
|
4295
4295
|
const formatValue2 = (val) => {
|
|
4296
4296
|
if (typeof val === "number") {
|
|
4297
4297
|
return val.toLocaleString();
|
|
@@ -4345,6 +4345,11 @@ const MetricCard = ({
|
|
|
4345
4345
|
] }),
|
|
4346
4346
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-baseline gap-3", "data-test-id": `dashboard_metric_card_value_container_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: [
|
|
4347
4347
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-semibold text-gray-900", "data-test-id": `dashboard_metric_card_value_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: formatValue2(value) }),
|
|
4348
|
+
(failedCount ?? 0) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs font-medium text-red-500", "data-test-id": `dashboard_metric_card_failed_${data.metricType}`, children: [
|
|
4349
|
+
"(",
|
|
4350
|
+
failedCount,
|
|
4351
|
+
" failed)"
|
|
4352
|
+
] }),
|
|
4348
4353
|
change && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4349
4354
|
"div",
|
|
4350
4355
|
{
|
|
@@ -21355,7 +21360,7 @@ function _toPrimitive$g(t2, r2) {
|
|
|
21355
21360
|
if ("object" != _typeof$i(i2)) return i2;
|
|
21356
21361
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
21357
21362
|
}
|
|
21358
|
-
return
|
|
21363
|
+
return String(t2);
|
|
21359
21364
|
}
|
|
21360
21365
|
var Bar = /* @__PURE__ */ function(_PureComponent) {
|
|
21361
21366
|
function Bar2() {
|
|
@@ -28662,7 +28667,7 @@ const CustomTooltip = ({
|
|
|
28662
28667
|
return null;
|
|
28663
28668
|
}
|
|
28664
28669
|
const filteredPayload = payload.filter(
|
|
28665
|
-
(entry) => entry.name && entry.name !== "" && entry.name !== entry.dataKey
|
|
28670
|
+
(entry) => entry.name && entry.name !== "" && entry.name !== entry.dataKey && entry.value != null && !(typeof entry.value === "number" && Number.isNaN(entry.value)) && !(entry.dataKey === "failedModelRuns" && Number(entry.value) === 0)
|
|
28666
28671
|
);
|
|
28667
28672
|
if (filteredPayload.length === 0) {
|
|
28668
28673
|
return null;
|
|
@@ -28762,6 +28767,7 @@ const AnalyticsChart = ({
|
|
|
28762
28767
|
agentRuns: 0,
|
|
28763
28768
|
toolRuns: 0,
|
|
28764
28769
|
modelRuns: 0,
|
|
28770
|
+
failedModelRuns: null,
|
|
28765
28771
|
codeTools: 0,
|
|
28766
28772
|
workflowTools: 0,
|
|
28767
28773
|
knowledgeTools: 0,
|
|
@@ -28864,6 +28870,8 @@ const AnalyticsChart = ({
|
|
|
28864
28870
|
label: config2.title,
|
|
28865
28871
|
strokeWidth: 2
|
|
28866
28872
|
}];
|
|
28873
|
+
const lineSeries = chartLines.filter((c3) => (c3.seriesType ?? "line") === "line");
|
|
28874
|
+
const barSeries = chartLines.filter((c3) => c3.seriesType === "bar");
|
|
28867
28875
|
if (isLoading) {
|
|
28868
28876
|
console.log("AnalyticsChart: Loading state active");
|
|
28869
28877
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ChartSkeleton, { className, chartType: config2.type, height });
|
|
@@ -28970,7 +28978,7 @@ const AnalyticsChart = ({
|
|
|
28970
28978
|
bottom: 20
|
|
28971
28979
|
},
|
|
28972
28980
|
children: [
|
|
28973
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children:
|
|
28981
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("defs", { children: lineSeries.map((lineConfig, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs("linearGradient", { id: `gradient-${lineConfig.dataKey}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
28974
28982
|
/* @__PURE__ */ jsxRuntimeExports.jsx("stop", { offset: "5%", stopColor: lineConfig.color, stopOpacity: 0.08 }),
|
|
28975
28983
|
/* @__PURE__ */ jsxRuntimeExports.jsx("stop", { offset: "95%", stopColor: lineConfig.color, stopOpacity: 0.01 })
|
|
28976
28984
|
] }, `gradient-${index}`)) }),
|
|
@@ -29022,7 +29030,7 @@ const AnalyticsChart = ({
|
|
|
29022
29030
|
allowEscapeViewBox: { x: false, y: false }
|
|
29023
29031
|
}
|
|
29024
29032
|
),
|
|
29025
|
-
|
|
29033
|
+
lineSeries.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29026
29034
|
Area,
|
|
29027
29035
|
{
|
|
29028
29036
|
type: "monotone",
|
|
@@ -29030,12 +29038,13 @@ const AnalyticsChart = ({
|
|
|
29030
29038
|
stroke: "none",
|
|
29031
29039
|
fill: `url(#gradient-${lineConfig.dataKey})`,
|
|
29032
29040
|
fillOpacity: 1,
|
|
29041
|
+
connectNulls: false,
|
|
29033
29042
|
isAnimationActive: false,
|
|
29034
29043
|
name: ""
|
|
29035
29044
|
},
|
|
29036
29045
|
`area-${lineConfig.dataKey}`
|
|
29037
29046
|
)),
|
|
29038
|
-
|
|
29047
|
+
lineSeries.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29039
29048
|
Line,
|
|
29040
29049
|
{
|
|
29041
29050
|
type: "monotone",
|
|
@@ -29043,6 +29052,7 @@ const AnalyticsChart = ({
|
|
|
29043
29052
|
stroke: lineConfig.color,
|
|
29044
29053
|
strokeWidth: 2.5,
|
|
29045
29054
|
strokeDasharray: lineConfig.strokeDasharray,
|
|
29055
|
+
connectNulls: false,
|
|
29046
29056
|
dot: false,
|
|
29047
29057
|
activeDot: {
|
|
29048
29058
|
r: 5,
|
|
@@ -29053,6 +29063,19 @@ const AnalyticsChart = ({
|
|
|
29053
29063
|
name: lineConfig.label
|
|
29054
29064
|
},
|
|
29055
29065
|
lineConfig.dataKey
|
|
29066
|
+
)),
|
|
29067
|
+
barSeries.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29068
|
+
Bar,
|
|
29069
|
+
{
|
|
29070
|
+
dataKey: lineConfig.dataKey,
|
|
29071
|
+
fill: lineConfig.color,
|
|
29072
|
+
fillOpacity: 0.9,
|
|
29073
|
+
name: lineConfig.label,
|
|
29074
|
+
maxBarSize: 14,
|
|
29075
|
+
radius: [3, 3, 0, 0],
|
|
29076
|
+
isAnimationActive: false
|
|
29077
|
+
},
|
|
29078
|
+
`bar-${lineConfig.dataKey}`
|
|
29056
29079
|
))
|
|
29057
29080
|
]
|
|
29058
29081
|
}
|
|
@@ -29074,8 +29097,15 @@ const AnalyticsChart = ({
|
|
|
29074
29097
|
})
|
|
29075
29098
|
] })
|
|
29076
29099
|
] }) }),
|
|
29077
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4", "data-test-id": "dashboard_analytics_chart_legend", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", "data-test-id": "dashboard_analytics_chart_legend_items", children: chartLines.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `dashboard_analytics_chart_legend_item_${lineConfig.dataKey}`, children: [
|
|
29078
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29100
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4", "data-test-id": "dashboard_analytics_chart_legend", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", "data-test-id": "dashboard_analytics_chart_legend_items", children: chartLines.filter((lineConfig) => !lineConfig.hideInLegend).map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `dashboard_analytics_chart_legend_item_${lineConfig.dataKey}`, children: [
|
|
29101
|
+
lineConfig.seriesType === "bar" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29102
|
+
"div",
|
|
29103
|
+
{
|
|
29104
|
+
className: "w-2 h-2 rounded-[2px]",
|
|
29105
|
+
style: { backgroundColor: lineConfig.color },
|
|
29106
|
+
"data-test-id": `dashboard_analytics_chart_legend_color_${lineConfig.dataKey}`
|
|
29107
|
+
}
|
|
29108
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29079
29109
|
"div",
|
|
29080
29110
|
{
|
|
29081
29111
|
className: "w-[8px] h-[8px] rounded-full",
|
|
@@ -29632,6 +29662,8 @@ function getToolTypeStyle(type) {
|
|
|
29632
29662
|
return "bg-green-100 text-green-800 border-green-200";
|
|
29633
29663
|
if (["knowledge", "KNOWLEDGE", "knowledge tool"].includes(type) || ["knowledge", "knowledge tool"].includes(normalized))
|
|
29634
29664
|
return "bg-purple-100 text-purple-800 border-purple-200";
|
|
29665
|
+
if (["PRE_PROCESSOR", "POST_PROCESSOR", "INPUT_PROCESSOR", "input_processor", "pre_processor", "post_processor", "processor"].includes(type) || ["pre_processor", "post_processor", "processor", "input_processor"].includes(normalized))
|
|
29666
|
+
return "bg-yellow-100 text-yellow-800 border-yellow-200";
|
|
29635
29667
|
return "bg-gray-100 text-gray-800 border-gray-200";
|
|
29636
29668
|
}
|
|
29637
29669
|
function getToolTypeName(type) {
|
|
@@ -29640,6 +29672,8 @@ function getToolTypeName(type) {
|
|
|
29640
29672
|
if (["toollibrary", "workflow tool"].includes(normalized)) return "Workflow Tool";
|
|
29641
29673
|
if (["mcp", "mcptool"].includes(normalized)) return "MCP Tool";
|
|
29642
29674
|
if (["knowledge", "knowledge tool", "knowledge"].includes(normalized) || type === "KNOWLEDGE") return "Knowledge";
|
|
29675
|
+
if (["pre_processor", "post_processor", "processor", "input_processor"].includes(normalized) || type === "PRE_PROCESSOR" || type === "POST_PROCESSOR" || type === "INPUT_PROCESSOR" || type === "input_processor")
|
|
29676
|
+
return "Processor";
|
|
29643
29677
|
if (type === "inlineTool") return "Code Tool";
|
|
29644
29678
|
if (type === "toolLibrary") return "Workflow Tool";
|
|
29645
29679
|
if (type === "KNOWLEDGE") return "Knowledge";
|
|
@@ -29866,7 +29900,14 @@ const ModelListView = ({
|
|
|
29866
29900
|
model.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 truncate", "data-test-id": `dashboard_model_list_view_row_provider_${index}`, children: getProviderDisplayName(model.provider) })
|
|
29867
29901
|
] })
|
|
29868
29902
|
] }),
|
|
29869
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
29903
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center font-medium text-xs text-gray-700 flex items-center justify-center gap-1", "data-test-id": `dashboard_model_list_view_row_runs_${index}`, children: [
|
|
29904
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: formatValue2(model.runs || 0) }),
|
|
29905
|
+
(model.failedRuns ?? 0) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-red-500 text-[10px] font-medium", "data-test-id": `dashboard_model_list_view_row_failed_${index}`, children: [
|
|
29906
|
+
"(",
|
|
29907
|
+
model.failedRuns,
|
|
29908
|
+
" failed)"
|
|
29909
|
+
] })
|
|
29910
|
+
] }),
|
|
29870
29911
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_model_list_view_row_tokens_${index}`, children: formatValue2(model.tokens || model.totalTokens || 0) }),
|
|
29871
29912
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_model_list_view_row_response_time_${index}`, children: model.responseTime || (model.avgResponseTime ? `${model.avgResponseTime}ms` : "N/A") })
|
|
29872
29913
|
]
|
|
@@ -30546,6 +30587,7 @@ class DashboardApiService {
|
|
|
30546
30587
|
{
|
|
30547
30588
|
title: "Model Runs",
|
|
30548
30589
|
value: data.data.modelRuns,
|
|
30590
|
+
failedCount: data.data.failedModelRuns || 0,
|
|
30549
30591
|
metricType: "modelRuns",
|
|
30550
30592
|
icon: "cpu",
|
|
30551
30593
|
info: "Number of times the AI agents called various language models to generate responses",
|
|
@@ -30622,8 +30664,12 @@ class DashboardApiService {
|
|
|
30622
30664
|
basePoint.toolRuns = point2.count || 0;
|
|
30623
30665
|
break;
|
|
30624
30666
|
case "modelRuns":
|
|
30667
|
+
case "modelruns": {
|
|
30668
|
+
const failed = point2.failedModelRuns;
|
|
30625
30669
|
basePoint.modelRuns = point2.count || 0;
|
|
30670
|
+
basePoint.failedModelRuns = typeof failed === "number" && failed >= 0 ? failed : 0;
|
|
30626
30671
|
break;
|
|
30672
|
+
}
|
|
30627
30673
|
default:
|
|
30628
30674
|
basePoint.users = point2.count || 0;
|
|
30629
30675
|
basePoint.sessions = point2.count || 0;
|
|
@@ -30632,6 +30678,10 @@ class DashboardApiService {
|
|
|
30632
30678
|
basePoint.agentRuns = point2.count || 0;
|
|
30633
30679
|
basePoint.toolRuns = point2.count || 0;
|
|
30634
30680
|
basePoint.modelRuns = point2.count || 0;
|
|
30681
|
+
{
|
|
30682
|
+
const failed = point2.failedModelRuns;
|
|
30683
|
+
basePoint.failedModelRuns = typeof failed === "number" && failed >= 0 ? failed : 0;
|
|
30684
|
+
}
|
|
30635
30685
|
}
|
|
30636
30686
|
console.log(`Transformed point ${index} for metric ${metricType}:`, basePoint);
|
|
30637
30687
|
return basePoint;
|
|
@@ -30716,22 +30766,16 @@ class DashboardApiService {
|
|
|
30716
30766
|
id: `model-${index + 1}`,
|
|
30717
30767
|
name: item.connectionName ? `${item.modelName} - ${item.connectionName}` : item.modelName || `Model ${index + 1}`,
|
|
30718
30768
|
modelName: item.modelName,
|
|
30719
|
-
// Keep original modelName field
|
|
30720
30769
|
provider: item.provider,
|
|
30721
|
-
// Include provider information
|
|
30722
30770
|
runs: item.count || 0,
|
|
30771
|
+
failedRuns: item.failedRuns || 0,
|
|
30723
30772
|
responseTime: item.avgResponseTime ? item.avgResponseTime < 1e3 ? `${Math.round(item.avgResponseTime)}ms` : `${(item.avgResponseTime / 1e3).toFixed(2)}s` : "0ms",
|
|
30724
30773
|
avgResponseTime: item.avgResponseTime,
|
|
30725
|
-
// Keep original avgResponseTime
|
|
30726
30774
|
tokens: item.tokens || item.totalTokens || Math.floor((item.count || 0) * 300),
|
|
30727
|
-
// Use actual token data when available
|
|
30728
30775
|
totalTokens: item.totalTokens || item.tokens,
|
|
30729
|
-
// Include totalTokens field
|
|
30730
30776
|
successRate: item.successRate ? `${Math.round(item.successRate)}%` : "98%",
|
|
30731
|
-
// Default success rate for models
|
|
30732
30777
|
lastRun: item.lastRun || new Date(Date.now() - Math.random() * 7 * 24 * 60 * 60 * 1e3).toLocaleDateString(),
|
|
30733
30778
|
icon: item.icon
|
|
30734
|
-
// Preserve original icon data if available
|
|
30735
30779
|
}));
|
|
30736
30780
|
}
|
|
30737
30781
|
// Extract control options from listView data for agents
|
|
@@ -30785,9 +30829,11 @@ class DashboardApiService {
|
|
|
30785
30829
|
if (["toollibrary", "workflow tool"].includes(normalized)) return "Workflow Tool";
|
|
30786
30830
|
if (["mcp", "mcptool"].includes(normalized)) return "MCP Tool";
|
|
30787
30831
|
if (["knowledge", "knowledge tool"].includes(normalized) || toolType === "KNOWLEDGE") return "Knowledge";
|
|
30832
|
+
if (["pre_processor", "post_processor", "processor", "input_processor"].includes(normalized)) return "Processor";
|
|
30788
30833
|
if (toolType === "inlineTool") return "Code Tool";
|
|
30789
30834
|
if (toolType === "toolLibrary") return "Workflow Tool";
|
|
30790
30835
|
if (toolType === "MCP" || toolType === "mcpTool") return "MCP Tool";
|
|
30836
|
+
if (toolType === "PRE_PROCESSOR" || toolType === "POST_PROCESSOR" || toolType === "INPUT_PROCESSOR" || toolType === "input_processor") return "Processor";
|
|
30791
30837
|
return "Code Tool";
|
|
30792
30838
|
};
|
|
30793
30839
|
options.push({
|
|
@@ -30914,6 +30960,7 @@ class DashboardApiService {
|
|
|
30914
30960
|
if (aggregated.has(key)) {
|
|
30915
30961
|
const existing = aggregated.get(key);
|
|
30916
30962
|
existing.count = (existing.count || 0) + (item.count || 0);
|
|
30963
|
+
existing.failedRuns = (existing.failedRuns || 0) + (item.failedRuns || 0);
|
|
30917
30964
|
existing.avgResponseTime = existing.avgResponseTime && item.avgResponseTime ? (existing.avgResponseTime + item.avgResponseTime) / 2 : existing.avgResponseTime || item.avgResponseTime;
|
|
30918
30965
|
existing.tokens = (existing.tokens || 0) + (item.tokens || 0);
|
|
30919
30966
|
} else {
|
|
@@ -30925,11 +30972,24 @@ class DashboardApiService {
|
|
|
30925
30972
|
// Batch fetch enhanced data for all metrics with table and control data
|
|
30926
30973
|
async fetchEnhancedMetricsData(fromTimestamp, toTimestamp, timeDimension, filters = []) {
|
|
30927
30974
|
try {
|
|
30928
|
-
const
|
|
30975
|
+
const results = await Promise.allSettled([
|
|
30929
30976
|
this.fetchTimeSeriesDataWithTableData("agent-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
30930
30977
|
this.fetchTimeSeriesDataWithTableData("tool-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
30931
30978
|
this.fetchTimeSeriesDataWithTableData("model-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters)
|
|
30932
30979
|
]);
|
|
30980
|
+
if (results[0].status === "rejected") {
|
|
30981
|
+
console.error("Error fetching agent runs enhanced data:", results[0].reason);
|
|
30982
|
+
}
|
|
30983
|
+
if (results[1].status === "rejected") {
|
|
30984
|
+
console.error("Error fetching tool runs enhanced data:", results[1].reason);
|
|
30985
|
+
}
|
|
30986
|
+
if (results[2].status === "rejected") {
|
|
30987
|
+
console.error("Error fetching model runs enhanced data:", results[2].reason);
|
|
30988
|
+
}
|
|
30989
|
+
const emptyData = { chartData: [], tableData: [], controlOptions: [] };
|
|
30990
|
+
const agentsData = results[0].status === "fulfilled" ? results[0].value : emptyData;
|
|
30991
|
+
const toolsData = results[1].status === "fulfilled" ? results[1].value : emptyData;
|
|
30992
|
+
const modelsData = results[2].status === "fulfilled" ? results[2].value : emptyData;
|
|
30933
30993
|
return {
|
|
30934
30994
|
agents: agentsData,
|
|
30935
30995
|
tools: toolsData,
|
|
@@ -30946,13 +31006,30 @@ class DashboardApiService {
|
|
|
30946
31006
|
const getChangeType = (changePercent) => {
|
|
30947
31007
|
return changePercent > 0 ? "increase" : "decrease";
|
|
30948
31008
|
};
|
|
30949
|
-
const
|
|
31009
|
+
const results = await Promise.allSettled([
|
|
30950
31010
|
this.fetchTimeSeriesDataWithTableData("agent-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
30951
31011
|
this.fetchTimeSeriesDataWithTableData("tool-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
30952
31012
|
this.fetchTimeSeriesDataWithTableData("model-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
30953
31013
|
this.fetchTimeSeriesData("tool-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters)
|
|
30954
31014
|
]);
|
|
30955
|
-
|
|
31015
|
+
if (results[0].status === "rejected") {
|
|
31016
|
+
console.error("Error fetching agent runs data:", results[0].reason);
|
|
31017
|
+
}
|
|
31018
|
+
if (results[1].status === "rejected") {
|
|
31019
|
+
console.error("Error fetching tool runs data:", results[1].reason);
|
|
31020
|
+
}
|
|
31021
|
+
if (results[2].status === "rejected") {
|
|
31022
|
+
console.error("Error fetching model runs data:", results[2].reason);
|
|
31023
|
+
}
|
|
31024
|
+
if (results[3].status === "rejected") {
|
|
31025
|
+
console.error("Error fetching tool runs time series data:", results[3].reason);
|
|
31026
|
+
}
|
|
31027
|
+
const emptyEnhancedData = { chartData: [], tableData: [], controlOptions: [] };
|
|
31028
|
+
const agentsData = results[0].status === "fulfilled" ? results[0].value : emptyEnhancedData;
|
|
31029
|
+
const toolsData = results[1].status === "fulfilled" ? results[1].value : emptyEnhancedData;
|
|
31030
|
+
const modelsData = results[2].status === "fulfilled" ? results[2].value : emptyEnhancedData;
|
|
31031
|
+
const toolRunsTimeSeriesData = results[3].status === "fulfilled" ? results[3].value : void 0;
|
|
31032
|
+
const enhancedToolRunsChartData = toolRunsTimeSeriesData ? this.transformTimeSeriesDataForToolRuns(toolRunsTimeSeriesData) : [];
|
|
30956
31033
|
return [
|
|
30957
31034
|
{
|
|
30958
31035
|
title: "Agent Runs",
|
|
@@ -30966,68 +31043,70 @@ class DashboardApiService {
|
|
|
30966
31043
|
value: Math.abs(trends.agentRuns.changePercent),
|
|
30967
31044
|
type: getChangeType(trends.agentRuns.changePercent)
|
|
30968
31045
|
} : void 0,
|
|
30969
|
-
|
|
30970
|
-
|
|
30971
|
-
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30975
|
-
|
|
30976
|
-
|
|
30977
|
-
|
|
30978
|
-
|
|
30979
|
-
|
|
30980
|
-
|
|
30981
|
-
|
|
30982
|
-
|
|
30983
|
-
|
|
30984
|
-
|
|
30985
|
-
|
|
30986
|
-
},
|
|
30987
|
-
table: {
|
|
30988
|
-
title: "Agent Runs",
|
|
30989
|
-
data: agentsData.tableData,
|
|
30990
|
-
columns: [
|
|
30991
|
-
{
|
|
30992
|
-
key: "name",
|
|
30993
|
-
title: "Name",
|
|
30994
|
-
width: 200,
|
|
30995
|
-
align: "left"
|
|
30996
|
-
},
|
|
30997
|
-
{
|
|
30998
|
-
key: "runs",
|
|
30999
|
-
title: "Runs",
|
|
31000
|
-
width: 100,
|
|
31001
|
-
align: "right",
|
|
31002
|
-
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31003
|
-
},
|
|
31004
|
-
{
|
|
31005
|
-
key: "responseTime",
|
|
31006
|
-
title: "Response Time",
|
|
31007
|
-
width: 120,
|
|
31008
|
-
align: "right"
|
|
31009
|
-
},
|
|
31010
|
-
{
|
|
31011
|
-
key: "tokens",
|
|
31012
|
-
title: "Tokens",
|
|
31013
|
-
width: 100,
|
|
31014
|
-
align: "right",
|
|
31015
|
-
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31046
|
+
...agentsData && {
|
|
31047
|
+
view: {
|
|
31048
|
+
type: "chart",
|
|
31049
|
+
chart: {
|
|
31050
|
+
type: "line",
|
|
31051
|
+
title: "Agent Runs",
|
|
31052
|
+
data: agentsData.chartData,
|
|
31053
|
+
dataKey: "agentRuns",
|
|
31054
|
+
color: "#0BA5EC",
|
|
31055
|
+
yAxisLabel: "Number of Agent Runs",
|
|
31056
|
+
height: 300,
|
|
31057
|
+
showGrid: true,
|
|
31058
|
+
curve: "monotone",
|
|
31059
|
+
tooltip: { show: true, style: "dark" },
|
|
31060
|
+
dateRange: {
|
|
31061
|
+
start: fromTimestamp.split("T")[0],
|
|
31062
|
+
end: toTimestamp.split("T")[0]
|
|
31016
31063
|
}
|
|
31017
|
-
|
|
31018
|
-
|
|
31019
|
-
|
|
31020
|
-
|
|
31021
|
-
|
|
31022
|
-
|
|
31023
|
-
|
|
31024
|
-
|
|
31025
|
-
|
|
31026
|
-
|
|
31064
|
+
},
|
|
31065
|
+
table: {
|
|
31066
|
+
title: "Agent Runs",
|
|
31067
|
+
data: agentsData.tableData,
|
|
31068
|
+
columns: [
|
|
31069
|
+
{
|
|
31070
|
+
key: "name",
|
|
31071
|
+
title: "Name",
|
|
31072
|
+
width: 200,
|
|
31073
|
+
align: "left"
|
|
31074
|
+
},
|
|
31075
|
+
{
|
|
31076
|
+
key: "runs",
|
|
31077
|
+
title: "Runs",
|
|
31078
|
+
width: 100,
|
|
31079
|
+
align: "right",
|
|
31080
|
+
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31081
|
+
},
|
|
31082
|
+
{
|
|
31083
|
+
key: "responseTime",
|
|
31084
|
+
title: "Response Time",
|
|
31085
|
+
width: 120,
|
|
31086
|
+
align: "right"
|
|
31087
|
+
},
|
|
31088
|
+
{
|
|
31089
|
+
key: "tokens",
|
|
31090
|
+
title: "Tokens",
|
|
31091
|
+
width: 100,
|
|
31092
|
+
align: "right",
|
|
31093
|
+
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31094
|
+
}
|
|
31095
|
+
]
|
|
31096
|
+
}
|
|
31027
31097
|
},
|
|
31028
|
-
|
|
31029
|
-
|
|
31030
|
-
|
|
31098
|
+
controls: {
|
|
31099
|
+
dropdown: {
|
|
31100
|
+
label: "All Agents",
|
|
31101
|
+
options: agentsData.controlOptions,
|
|
31102
|
+
defaultValue: ["all"],
|
|
31103
|
+
multiSelect: true,
|
|
31104
|
+
searchable: true
|
|
31105
|
+
},
|
|
31106
|
+
toggle: {
|
|
31107
|
+
chartView: true,
|
|
31108
|
+
tableView: true
|
|
31109
|
+
}
|
|
31031
31110
|
}
|
|
31032
31111
|
}
|
|
31033
31112
|
},
|
|
@@ -31042,99 +31121,107 @@ class DashboardApiService {
|
|
|
31042
31121
|
value: Math.abs(trends.toolRuns.changePercent.total),
|
|
31043
31122
|
type: getChangeType(trends.toolRuns.changePercent.total)
|
|
31044
31123
|
} : void 0,
|
|
31045
|
-
|
|
31046
|
-
|
|
31047
|
-
|
|
31048
|
-
|
|
31049
|
-
|
|
31050
|
-
|
|
31051
|
-
|
|
31052
|
-
|
|
31053
|
-
|
|
31054
|
-
|
|
31055
|
-
|
|
31056
|
-
|
|
31057
|
-
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31063
|
-
|
|
31064
|
-
|
|
31065
|
-
|
|
31066
|
-
|
|
31067
|
-
|
|
31068
|
-
|
|
31069
|
-
|
|
31070
|
-
|
|
31071
|
-
|
|
31072
|
-
|
|
31073
|
-
|
|
31074
|
-
|
|
31075
|
-
|
|
31076
|
-
|
|
31124
|
+
...toolsData && {
|
|
31125
|
+
view: {
|
|
31126
|
+
type: "chart",
|
|
31127
|
+
chart: {
|
|
31128
|
+
type: "line",
|
|
31129
|
+
title: "Tool Runs",
|
|
31130
|
+
data: enhancedToolRunsChartData,
|
|
31131
|
+
yAxisLabel: "Number of Tool Runs",
|
|
31132
|
+
lines: [
|
|
31133
|
+
{
|
|
31134
|
+
dataKey: "toolRuns",
|
|
31135
|
+
color: "#667085",
|
|
31136
|
+
label: "Tool Runs"
|
|
31137
|
+
},
|
|
31138
|
+
{
|
|
31139
|
+
dataKey: "codeTools",
|
|
31140
|
+
color: "#F38744",
|
|
31141
|
+
label: "Code Tools"
|
|
31142
|
+
},
|
|
31143
|
+
{
|
|
31144
|
+
dataKey: "workflowTools",
|
|
31145
|
+
color: "#2970FF",
|
|
31146
|
+
label: "Workflow Tools"
|
|
31147
|
+
},
|
|
31148
|
+
{
|
|
31149
|
+
dataKey: "knowledgeTools",
|
|
31150
|
+
color: "#7A5AF8",
|
|
31151
|
+
label: "Knowledge"
|
|
31152
|
+
},
|
|
31153
|
+
{
|
|
31154
|
+
dataKey: "mcpTools",
|
|
31155
|
+
color: "#47CD89",
|
|
31156
|
+
label: "MCP Tools"
|
|
31157
|
+
},
|
|
31158
|
+
{
|
|
31159
|
+
dataKey: "processors",
|
|
31160
|
+
color: "#EAB308",
|
|
31161
|
+
label: "Processors"
|
|
31162
|
+
}
|
|
31163
|
+
],
|
|
31164
|
+
height: 300,
|
|
31165
|
+
showGrid: true,
|
|
31166
|
+
showLegend: true,
|
|
31167
|
+
curve: "monotone",
|
|
31168
|
+
tooltip: { show: true, style: "dark" },
|
|
31169
|
+
dateRange: {
|
|
31170
|
+
start: fromTimestamp.split("T")[0],
|
|
31171
|
+
end: toTimestamp.split("T")[0]
|
|
31077
31172
|
}
|
|
31078
|
-
|
|
31079
|
-
|
|
31080
|
-
|
|
31081
|
-
|
|
31082
|
-
|
|
31083
|
-
|
|
31084
|
-
|
|
31085
|
-
|
|
31086
|
-
|
|
31173
|
+
},
|
|
31174
|
+
table: {
|
|
31175
|
+
title: "Tool Runs",
|
|
31176
|
+
data: toolsData.tableData,
|
|
31177
|
+
columns: [
|
|
31178
|
+
{
|
|
31179
|
+
key: "name",
|
|
31180
|
+
title: "Name",
|
|
31181
|
+
width: 200,
|
|
31182
|
+
align: "left"
|
|
31183
|
+
},
|
|
31184
|
+
{
|
|
31185
|
+
key: "type",
|
|
31186
|
+
title: "Type",
|
|
31187
|
+
width: 150,
|
|
31188
|
+
align: "left"
|
|
31189
|
+
},
|
|
31190
|
+
{
|
|
31191
|
+
key: "runs",
|
|
31192
|
+
title: "Runs",
|
|
31193
|
+
width: 100,
|
|
31194
|
+
align: "right",
|
|
31195
|
+
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31196
|
+
},
|
|
31197
|
+
{
|
|
31198
|
+
key: "responseTime",
|
|
31199
|
+
title: "Response Time",
|
|
31200
|
+
width: 120,
|
|
31201
|
+
align: "right"
|
|
31202
|
+
}
|
|
31203
|
+
]
|
|
31087
31204
|
}
|
|
31088
31205
|
},
|
|
31089
|
-
|
|
31090
|
-
|
|
31091
|
-
|
|
31092
|
-
|
|
31093
|
-
|
|
31094
|
-
|
|
31095
|
-
|
|
31096
|
-
|
|
31097
|
-
|
|
31098
|
-
|
|
31099
|
-
|
|
31100
|
-
|
|
31101
|
-
title: "Type",
|
|
31102
|
-
width: 150,
|
|
31103
|
-
align: "left"
|
|
31104
|
-
},
|
|
31105
|
-
{
|
|
31106
|
-
key: "runs",
|
|
31107
|
-
title: "Runs",
|
|
31108
|
-
width: 100,
|
|
31109
|
-
align: "right",
|
|
31110
|
-
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31111
|
-
},
|
|
31112
|
-
{
|
|
31113
|
-
key: "responseTime",
|
|
31114
|
-
title: "Response Time",
|
|
31115
|
-
width: 120,
|
|
31116
|
-
align: "right"
|
|
31117
|
-
}
|
|
31118
|
-
]
|
|
31119
|
-
}
|
|
31120
|
-
},
|
|
31121
|
-
controls: {
|
|
31122
|
-
dropdown: {
|
|
31123
|
-
label: "All Tools",
|
|
31124
|
-
options: toolsData.controlOptions,
|
|
31125
|
-
defaultValue: ["all"],
|
|
31126
|
-
multiSelect: true,
|
|
31127
|
-
searchable: true
|
|
31128
|
-
},
|
|
31129
|
-
toggle: {
|
|
31130
|
-
chartView: true,
|
|
31131
|
-
tableView: true
|
|
31206
|
+
controls: {
|
|
31207
|
+
dropdown: {
|
|
31208
|
+
label: "All Tools",
|
|
31209
|
+
options: toolsData.controlOptions,
|
|
31210
|
+
defaultValue: ["all"],
|
|
31211
|
+
multiSelect: true,
|
|
31212
|
+
searchable: true
|
|
31213
|
+
},
|
|
31214
|
+
toggle: {
|
|
31215
|
+
chartView: true,
|
|
31216
|
+
tableView: true
|
|
31217
|
+
}
|
|
31132
31218
|
}
|
|
31133
31219
|
}
|
|
31134
31220
|
},
|
|
31135
31221
|
{
|
|
31136
31222
|
title: "Model Runs",
|
|
31137
31223
|
value: data.data.modelRuns,
|
|
31224
|
+
failedCount: data.data.failedModelRuns || 0,
|
|
31138
31225
|
metricType: "modelRuns",
|
|
31139
31226
|
icon: "cpu",
|
|
31140
31227
|
highlighted: false,
|
|
@@ -31143,68 +31230,79 @@ class DashboardApiService {
|
|
|
31143
31230
|
value: Math.abs(trends.modelRuns.changePercent),
|
|
31144
31231
|
type: getChangeType(trends.modelRuns.changePercent)
|
|
31145
31232
|
} : void 0,
|
|
31146
|
-
|
|
31147
|
-
|
|
31148
|
-
|
|
31149
|
-
|
|
31150
|
-
|
|
31151
|
-
|
|
31152
|
-
|
|
31153
|
-
|
|
31154
|
-
|
|
31155
|
-
|
|
31156
|
-
|
|
31157
|
-
|
|
31158
|
-
|
|
31159
|
-
|
|
31160
|
-
|
|
31161
|
-
|
|
31162
|
-
|
|
31163
|
-
|
|
31164
|
-
|
|
31165
|
-
|
|
31166
|
-
|
|
31167
|
-
|
|
31168
|
-
{
|
|
31169
|
-
|
|
31170
|
-
|
|
31171
|
-
|
|
31172
|
-
align: "left"
|
|
31173
|
-
},
|
|
31174
|
-
{
|
|
31175
|
-
key: "runs",
|
|
31176
|
-
title: "Runs",
|
|
31177
|
-
width: 100,
|
|
31178
|
-
align: "right",
|
|
31179
|
-
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31180
|
-
},
|
|
31181
|
-
{
|
|
31182
|
-
key: "tokens",
|
|
31183
|
-
title: "Tokens",
|
|
31184
|
-
width: 120,
|
|
31185
|
-
align: "right",
|
|
31186
|
-
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31187
|
-
},
|
|
31188
|
-
{
|
|
31189
|
-
key: "responseTime",
|
|
31190
|
-
title: "Response Time",
|
|
31191
|
-
width: 120,
|
|
31192
|
-
align: "right"
|
|
31233
|
+
...modelsData && {
|
|
31234
|
+
view: {
|
|
31235
|
+
type: "chart",
|
|
31236
|
+
chart: {
|
|
31237
|
+
type: "line",
|
|
31238
|
+
title: "Model Runs",
|
|
31239
|
+
data: modelsData.chartData,
|
|
31240
|
+
yAxisLabel: "Number of Model Runs",
|
|
31241
|
+
lines: [
|
|
31242
|
+
{ dataKey: "modelRuns", color: "#47CD89", label: "Model Runs" },
|
|
31243
|
+
{
|
|
31244
|
+
dataKey: "failedModelRuns",
|
|
31245
|
+
color: "#ef4444",
|
|
31246
|
+
label: "Failed",
|
|
31247
|
+
seriesType: "bar",
|
|
31248
|
+
hideInLegend: true
|
|
31249
|
+
}
|
|
31250
|
+
],
|
|
31251
|
+
height: 300,
|
|
31252
|
+
showGrid: true,
|
|
31253
|
+
showLegend: true,
|
|
31254
|
+
curve: "monotone",
|
|
31255
|
+
tooltip: { show: true, style: "dark" },
|
|
31256
|
+
dateRange: {
|
|
31257
|
+
start: fromTimestamp.split("T")[0],
|
|
31258
|
+
end: toTimestamp.split("T")[0]
|
|
31193
31259
|
}
|
|
31194
|
-
|
|
31195
|
-
|
|
31196
|
-
|
|
31197
|
-
|
|
31198
|
-
|
|
31199
|
-
|
|
31200
|
-
|
|
31201
|
-
|
|
31202
|
-
|
|
31203
|
-
|
|
31260
|
+
},
|
|
31261
|
+
table: {
|
|
31262
|
+
title: "Model Runs",
|
|
31263
|
+
data: modelsData.tableData,
|
|
31264
|
+
columns: [
|
|
31265
|
+
{
|
|
31266
|
+
key: "name",
|
|
31267
|
+
title: "Model Name",
|
|
31268
|
+
width: 200,
|
|
31269
|
+
align: "left"
|
|
31270
|
+
},
|
|
31271
|
+
{
|
|
31272
|
+
key: "runs",
|
|
31273
|
+
title: "Runs",
|
|
31274
|
+
width: 100,
|
|
31275
|
+
align: "right",
|
|
31276
|
+
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31277
|
+
},
|
|
31278
|
+
{
|
|
31279
|
+
key: "tokens",
|
|
31280
|
+
title: "Tokens",
|
|
31281
|
+
width: 120,
|
|
31282
|
+
align: "right",
|
|
31283
|
+
formatter: (value) => `${Math.floor(value / 1e3)}k`
|
|
31284
|
+
},
|
|
31285
|
+
{
|
|
31286
|
+
key: "responseTime",
|
|
31287
|
+
title: "Response Time",
|
|
31288
|
+
width: 120,
|
|
31289
|
+
align: "right"
|
|
31290
|
+
}
|
|
31291
|
+
]
|
|
31292
|
+
}
|
|
31204
31293
|
},
|
|
31205
|
-
|
|
31206
|
-
|
|
31207
|
-
|
|
31294
|
+
controls: {
|
|
31295
|
+
dropdown: {
|
|
31296
|
+
label: "All Models",
|
|
31297
|
+
options: modelsData.controlOptions,
|
|
31298
|
+
defaultValue: ["all"],
|
|
31299
|
+
multiSelect: true,
|
|
31300
|
+
searchable: true
|
|
31301
|
+
},
|
|
31302
|
+
toggle: {
|
|
31303
|
+
chartView: true,
|
|
31304
|
+
tableView: true
|
|
31305
|
+
}
|
|
31208
31306
|
}
|
|
31209
31307
|
}
|
|
31210
31308
|
}
|
|
@@ -31216,12 +31314,34 @@ class DashboardApiService {
|
|
|
31216
31314
|
const getChangeType = (changePercent) => {
|
|
31217
31315
|
return changePercent > 0 ? "increase" : "decrease";
|
|
31218
31316
|
};
|
|
31219
|
-
const
|
|
31317
|
+
const results = await Promise.allSettled([
|
|
31220
31318
|
this.fetchTimeSeriesData("users", "usage-analytics", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
31221
31319
|
this.fetchTimeSeriesData("sessions", "usage-analytics", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
31222
31320
|
this.fetchTimeSeriesData("messages", "usage-analytics", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
31223
31321
|
this.fetchTimeSeriesData("tokens", "usage-analytics", fromTimestamp, toTimestamp, timeDimension, filters)
|
|
31224
31322
|
]);
|
|
31323
|
+
if (results[0].status === "rejected") {
|
|
31324
|
+
console.error("Error fetching users data:", results[0].reason);
|
|
31325
|
+
}
|
|
31326
|
+
if (results[1].status === "rejected") {
|
|
31327
|
+
console.error("Error fetching sessions data:", results[1].reason);
|
|
31328
|
+
}
|
|
31329
|
+
if (results[2].status === "rejected") {
|
|
31330
|
+
console.error("Error fetching messages data:", results[2].reason);
|
|
31331
|
+
}
|
|
31332
|
+
if (results[3].status === "rejected") {
|
|
31333
|
+
console.error("Error fetching tokens data:", results[3].reason);
|
|
31334
|
+
}
|
|
31335
|
+
const emptyTimeSeries = {
|
|
31336
|
+
type: "time-series",
|
|
31337
|
+
category: "usage-analytics",
|
|
31338
|
+
metric: "",
|
|
31339
|
+
data: []
|
|
31340
|
+
};
|
|
31341
|
+
const usersData = results[0].status === "fulfilled" ? results[0].value : { ...emptyTimeSeries, metric: "users" };
|
|
31342
|
+
const sessionsData = results[1].status === "fulfilled" ? results[1].value : { ...emptyTimeSeries, metric: "sessions" };
|
|
31343
|
+
const messagesData = results[2].status === "fulfilled" ? results[2].value : { ...emptyTimeSeries, metric: "messages" };
|
|
31344
|
+
const tokensData = results[3].status === "fulfilled" ? results[3].value : { ...emptyTimeSeries, metric: "tokens" };
|
|
31225
31345
|
return [
|
|
31226
31346
|
{
|
|
31227
31347
|
title: "Users",
|
|
@@ -31235,22 +31355,24 @@ class DashboardApiService {
|
|
|
31235
31355
|
value: Math.abs(trends.users.changePercent),
|
|
31236
31356
|
type: getChangeType(trends.users.changePercent)
|
|
31237
31357
|
} : void 0,
|
|
31238
|
-
|
|
31239
|
-
|
|
31240
|
-
|
|
31241
|
-
|
|
31242
|
-
|
|
31243
|
-
|
|
31244
|
-
|
|
31245
|
-
|
|
31246
|
-
|
|
31247
|
-
|
|
31248
|
-
|
|
31249
|
-
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
|
|
31358
|
+
...usersData && {
|
|
31359
|
+
view: {
|
|
31360
|
+
type: "chart",
|
|
31361
|
+
chart: {
|
|
31362
|
+
type: "line",
|
|
31363
|
+
title: "Total Users",
|
|
31364
|
+
data: this.transformTimeSeriesDataForMetric(usersData, "users"),
|
|
31365
|
+
dataKey: "users",
|
|
31366
|
+
color: "#4E5BA6",
|
|
31367
|
+
yAxisLabel: "Number of Users",
|
|
31368
|
+
height: 300,
|
|
31369
|
+
showGrid: true,
|
|
31370
|
+
curve: "monotone",
|
|
31371
|
+
tooltip: { show: true, style: "dark" },
|
|
31372
|
+
dateRange: {
|
|
31373
|
+
start: fromTimestamp.split("T")[0],
|
|
31374
|
+
end: toTimestamp.split("T")[0]
|
|
31375
|
+
}
|
|
31254
31376
|
}
|
|
31255
31377
|
}
|
|
31256
31378
|
}
|
|
@@ -31266,22 +31388,24 @@ class DashboardApiService {
|
|
|
31266
31388
|
value: Math.abs(trends.sessions.changePercent),
|
|
31267
31389
|
type: getChangeType(trends.sessions.changePercent)
|
|
31268
31390
|
} : void 0,
|
|
31269
|
-
|
|
31270
|
-
|
|
31271
|
-
|
|
31272
|
-
|
|
31273
|
-
|
|
31274
|
-
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
31391
|
+
...sessionsData && {
|
|
31392
|
+
view: {
|
|
31393
|
+
type: "chart",
|
|
31394
|
+
chart: {
|
|
31395
|
+
type: "line",
|
|
31396
|
+
title: "Total Sessions",
|
|
31397
|
+
data: this.transformTimeSeriesDataForMetric(sessionsData, "sessions"),
|
|
31398
|
+
dataKey: "sessions",
|
|
31399
|
+
color: "#0BA5EC",
|
|
31400
|
+
yAxisLabel: "Number of Sessions",
|
|
31401
|
+
height: 300,
|
|
31402
|
+
showGrid: true,
|
|
31403
|
+
curve: "monotone",
|
|
31404
|
+
tooltip: { show: true, style: "dark" },
|
|
31405
|
+
dateRange: {
|
|
31406
|
+
start: fromTimestamp.split("T")[0],
|
|
31407
|
+
end: toTimestamp.split("T")[0]
|
|
31408
|
+
}
|
|
31285
31409
|
}
|
|
31286
31410
|
}
|
|
31287
31411
|
}
|
|
@@ -31297,22 +31421,24 @@ class DashboardApiService {
|
|
|
31297
31421
|
value: Math.abs(trends.messages.changePercent.total),
|
|
31298
31422
|
type: getChangeType(trends.messages.changePercent.total)
|
|
31299
31423
|
} : void 0,
|
|
31300
|
-
|
|
31301
|
-
|
|
31302
|
-
|
|
31303
|
-
|
|
31304
|
-
|
|
31305
|
-
|
|
31306
|
-
|
|
31307
|
-
|
|
31308
|
-
|
|
31309
|
-
|
|
31310
|
-
|
|
31311
|
-
|
|
31312
|
-
|
|
31313
|
-
|
|
31314
|
-
|
|
31315
|
-
|
|
31424
|
+
...messagesData && {
|
|
31425
|
+
view: {
|
|
31426
|
+
type: "chart",
|
|
31427
|
+
chart: {
|
|
31428
|
+
type: "line",
|
|
31429
|
+
title: "Total Messages",
|
|
31430
|
+
data: this.transformTimeSeriesDataForMetric(messagesData, "messages"),
|
|
31431
|
+
dataKey: "messages",
|
|
31432
|
+
color: "#E478FA",
|
|
31433
|
+
yAxisLabel: "Number of Messages",
|
|
31434
|
+
height: 300,
|
|
31435
|
+
showGrid: true,
|
|
31436
|
+
curve: "monotone",
|
|
31437
|
+
tooltip: { show: true, style: "dark" },
|
|
31438
|
+
dateRange: {
|
|
31439
|
+
start: fromTimestamp.split("T")[0],
|
|
31440
|
+
end: toTimestamp.split("T")[0]
|
|
31441
|
+
}
|
|
31316
31442
|
}
|
|
31317
31443
|
}
|
|
31318
31444
|
}
|
|
@@ -31328,38 +31454,40 @@ class DashboardApiService {
|
|
|
31328
31454
|
value: Math.abs(trends.tokens.changePercent.total),
|
|
31329
31455
|
type: getChangeType(trends.tokens.changePercent.total)
|
|
31330
31456
|
} : void 0,
|
|
31331
|
-
|
|
31332
|
-
|
|
31333
|
-
|
|
31334
|
-
|
|
31335
|
-
|
|
31336
|
-
|
|
31337
|
-
|
|
31338
|
-
|
|
31339
|
-
|
|
31340
|
-
|
|
31341
|
-
|
|
31342
|
-
|
|
31343
|
-
|
|
31344
|
-
|
|
31345
|
-
|
|
31346
|
-
|
|
31347
|
-
|
|
31348
|
-
|
|
31349
|
-
|
|
31350
|
-
|
|
31351
|
-
|
|
31352
|
-
|
|
31457
|
+
...tokensData && {
|
|
31458
|
+
view: {
|
|
31459
|
+
type: "chart",
|
|
31460
|
+
chart: {
|
|
31461
|
+
type: "line",
|
|
31462
|
+
title: "Token Usage Breakdown",
|
|
31463
|
+
data: this.transformTimeSeriesDataForMetric(tokensData, "tokens"),
|
|
31464
|
+
yAxisLabel: "Number of Tokens",
|
|
31465
|
+
lines: [
|
|
31466
|
+
{
|
|
31467
|
+
dataKey: "totalTokens",
|
|
31468
|
+
color: "#FF692E",
|
|
31469
|
+
label: "Total Tokens"
|
|
31470
|
+
},
|
|
31471
|
+
{
|
|
31472
|
+
dataKey: "inputTokens",
|
|
31473
|
+
color: "#5925DC",
|
|
31474
|
+
label: "Input Tokens"
|
|
31475
|
+
},
|
|
31476
|
+
{
|
|
31477
|
+
dataKey: "outputTokens",
|
|
31478
|
+
color: "#E478FA",
|
|
31479
|
+
label: "Output Tokens"
|
|
31480
|
+
}
|
|
31481
|
+
],
|
|
31482
|
+
height: 300,
|
|
31483
|
+
showGrid: true,
|
|
31484
|
+
showLegend: true,
|
|
31485
|
+
curve: "monotone",
|
|
31486
|
+
tooltip: { show: true, style: "dark" },
|
|
31487
|
+
dateRange: {
|
|
31488
|
+
start: fromTimestamp.split("T")[0],
|
|
31489
|
+
end: toTimestamp.split("T")[0]
|
|
31353
31490
|
}
|
|
31354
|
-
],
|
|
31355
|
-
height: 300,
|
|
31356
|
-
showGrid: true,
|
|
31357
|
-
showLegend: true,
|
|
31358
|
-
curve: "monotone",
|
|
31359
|
-
tooltip: { show: true, style: "dark" },
|
|
31360
|
-
dateRange: {
|
|
31361
|
-
start: fromTimestamp.split("T")[0],
|
|
31362
|
-
end: toTimestamp.split("T")[0]
|
|
31363
31491
|
}
|
|
31364
31492
|
}
|
|
31365
31493
|
}
|
|
@@ -31387,35 +31515,27 @@ class DashboardApiService {
|
|
|
31387
31515
|
let workflowTools = 0;
|
|
31388
31516
|
let knowledgeTools = 0;
|
|
31389
31517
|
let mcpTools = 0;
|
|
31518
|
+
let processors = 0;
|
|
31390
31519
|
if (point2.listView && Array.isArray(point2.listView)) {
|
|
31391
31520
|
point2.listView.forEach((item) => {
|
|
31392
31521
|
const count = item.count || 0;
|
|
31393
|
-
const toolType =
|
|
31394
|
-
const toolName = (item.toolName || item.tool_name || "").toLowerCase();
|
|
31395
|
-
console.log(`Processing listView item:`, { toolType, toolName, count });
|
|
31522
|
+
const toolType = item.toolType || item.tool_type || "";
|
|
31396
31523
|
const normalizedToolType = toolType.toLowerCase();
|
|
31397
|
-
if (["inlinetool", "
|
|
31524
|
+
if (["inlinetool", "tool", "code", "codetool", "event"].includes(normalizedToolType)) {
|
|
31398
31525
|
codeTools += count;
|
|
31399
|
-
} else if (["toollibrary", "
|
|
31526
|
+
} else if (["toollibrary", "workflow"].includes(normalizedToolType)) {
|
|
31400
31527
|
workflowTools += count;
|
|
31401
|
-
} else if (["knowledge", "
|
|
31528
|
+
} else if (["knowledge", "knowledgetool"].includes(normalizedToolType) || toolType === "KNOWLEDGE") {
|
|
31402
31529
|
knowledgeTools += count;
|
|
31403
|
-
} else if (["mcp", "
|
|
31530
|
+
} else if (["mcp", "mcptool"].includes(normalizedToolType)) {
|
|
31404
31531
|
mcpTools += count;
|
|
31532
|
+
} else if (["pre_processor", "post_processor", "processor", "input_processor"].includes(normalizedToolType) || toolType === "INPUT_PROCESSOR" || toolType === "input_processor") {
|
|
31533
|
+
processors += count;
|
|
31405
31534
|
} else {
|
|
31406
|
-
console.log(`Unknown tool type '${toolType}' for tool '${toolName}', defaulting to code tools`);
|
|
31407
31535
|
codeTools += count;
|
|
31408
31536
|
}
|
|
31409
31537
|
});
|
|
31410
|
-
|
|
31411
|
-
codeTools,
|
|
31412
|
-
workflowTools,
|
|
31413
|
-
knowledgeTools,
|
|
31414
|
-
mcpTools,
|
|
31415
|
-
total: codeTools + workflowTools + knowledgeTools + mcpTools,
|
|
31416
|
-
expectedTotal: totalToolRuns
|
|
31417
|
-
});
|
|
31418
|
-
const calculatedTotal = codeTools + workflowTools + knowledgeTools + mcpTools;
|
|
31538
|
+
const calculatedTotal = codeTools + workflowTools + knowledgeTools + mcpTools + processors;
|
|
31419
31539
|
if (Math.abs(calculatedTotal - totalToolRuns) > 1) {
|
|
31420
31540
|
console.warn(`Breakdown total (${calculatedTotal}) doesn't match expected total (${totalToolRuns}) for point ${index}`);
|
|
31421
31541
|
const difference = totalToolRuns - calculatedTotal;
|
|
@@ -31423,7 +31543,6 @@ class DashboardApiService {
|
|
|
31423
31543
|
console.log(`Adjusted codeTools by ${difference} to balance total`);
|
|
31424
31544
|
}
|
|
31425
31545
|
} else {
|
|
31426
|
-
console.log(`No listView data for point ${index}, assigning all ${totalToolRuns} to codeTools`);
|
|
31427
31546
|
codeTools = totalToolRuns;
|
|
31428
31547
|
}
|
|
31429
31548
|
const basePoint = {
|
|
@@ -31434,11 +31553,11 @@ class DashboardApiService {
|
|
|
31434
31553
|
toolRuns: totalToolRuns,
|
|
31435
31554
|
value: totalToolRuns,
|
|
31436
31555
|
count: totalToolRuns,
|
|
31437
|
-
// Tool breakdown data for multi-line chart (using actual data)
|
|
31438
31556
|
codeTools,
|
|
31439
31557
|
workflowTools,
|
|
31440
31558
|
knowledgeTools,
|
|
31441
31559
|
mcpTools,
|
|
31560
|
+
processors,
|
|
31442
31561
|
// Token data
|
|
31443
31562
|
input_tokens: point2.input_tokens || 0,
|
|
31444
31563
|
output_tokens: point2.output_tokens || 0,
|
|
@@ -31476,14 +31595,33 @@ class DashboardApiService {
|
|
|
31476
31595
|
// Enhanced batch fetch method that returns complete MetricData with embedded view and controls
|
|
31477
31596
|
async fetchAllCardsDataWithEnhancedViews(fromTimestamp, toTimestamp, timeDimension, filters = []) {
|
|
31478
31597
|
try {
|
|
31479
|
-
const
|
|
31598
|
+
const cardsResults = await Promise.allSettled([
|
|
31480
31599
|
this.fetchUsageAnalyticsCards(fromTimestamp, toTimestamp, timeDimension, filters),
|
|
31481
31600
|
this.fetchRunsCards(fromTimestamp, toTimestamp, timeDimension, filters)
|
|
31482
31601
|
]);
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
|
|
31602
|
+
if (cardsResults[0].status === "rejected") {
|
|
31603
|
+
console.error("Error fetching usage analytics cards:", cardsResults[0].reason);
|
|
31604
|
+
}
|
|
31605
|
+
if (cardsResults[1].status === "rejected") {
|
|
31606
|
+
console.error("Error fetching runs cards:", cardsResults[1].reason);
|
|
31607
|
+
}
|
|
31608
|
+
if (cardsResults[0].status === "rejected" && cardsResults[1].status === "rejected") {
|
|
31609
|
+
throw new Error("Both usage analytics and runs cards failed to load");
|
|
31610
|
+
}
|
|
31611
|
+
const usageAnalyticsCards = cardsResults[0].status === "fulfilled" ? cardsResults[0].value : void 0;
|
|
31612
|
+
const runsCards = cardsResults[1].status === "fulfilled" ? cardsResults[1].value : void 0;
|
|
31613
|
+
const enhancementResults = await Promise.allSettled([
|
|
31614
|
+
usageAnalyticsCards ? this.transformUsageAnalyticsCardsWithEnhancedData(usageAnalyticsCards, fromTimestamp, toTimestamp, timeDimension, filters) : Promise.resolve([]),
|
|
31615
|
+
runsCards ? this.transformRunsCardsWithEnhancedData(runsCards, fromTimestamp, toTimestamp, timeDimension, filters) : Promise.resolve([])
|
|
31486
31616
|
]);
|
|
31617
|
+
if (enhancementResults[0].status === "rejected") {
|
|
31618
|
+
console.error("Error transforming usage analytics cards:", enhancementResults[0].reason);
|
|
31619
|
+
}
|
|
31620
|
+
if (enhancementResults[1].status === "rejected") {
|
|
31621
|
+
console.error("Error transforming runs cards:", enhancementResults[1].reason);
|
|
31622
|
+
}
|
|
31623
|
+
const enhancedUsageAnalytics = enhancementResults[0].status === "fulfilled" ? enhancementResults[0].value : [];
|
|
31624
|
+
const enhancedRuns = enhancementResults[1].status === "fulfilled" ? enhancementResults[1].value : [];
|
|
31487
31625
|
return {
|
|
31488
31626
|
usageAnalytics: enhancedUsageAnalytics,
|
|
31489
31627
|
runs: enhancedRuns
|
|
@@ -31496,13 +31634,21 @@ class DashboardApiService {
|
|
|
31496
31634
|
// Batch fetch time series data for default selected metrics
|
|
31497
31635
|
async fetchDefaultTimeSeriesData(fromTimestamp, toTimestamp, timeDimension, filters = []) {
|
|
31498
31636
|
try {
|
|
31499
|
-
const
|
|
31637
|
+
const results = await Promise.allSettled([
|
|
31500
31638
|
this.fetchTimeSeriesData("sessions", "usage-analytics", fromTimestamp, toTimestamp, timeDimension, filters),
|
|
31501
31639
|
this.fetchTimeSeriesData("agent-runs", "runs", fromTimestamp, toTimestamp, timeDimension, filters)
|
|
31502
31640
|
]);
|
|
31641
|
+
if (results[0].status === "rejected") {
|
|
31642
|
+
console.error("Error fetching sessions data:", results[0].reason);
|
|
31643
|
+
}
|
|
31644
|
+
if (results[1].status === "rejected") {
|
|
31645
|
+
console.error("Error fetching agent runs data:", results[1].reason);
|
|
31646
|
+
}
|
|
31647
|
+
const sessionsData = results[0].status === "fulfilled" ? results[0].value : void 0;
|
|
31648
|
+
const agentRunsData = results[1].status === "fulfilled" ? results[1].value : void 0;
|
|
31503
31649
|
return {
|
|
31504
|
-
sessions: this.transformTimeSeriesData(sessionsData),
|
|
31505
|
-
agentRuns: this.transformTimeSeriesData(agentRunsData)
|
|
31650
|
+
sessions: sessionsData ? this.transformTimeSeriesData(sessionsData) : [],
|
|
31651
|
+
agentRuns: agentRunsData ? this.transformTimeSeriesData(agentRunsData) : []
|
|
31506
31652
|
};
|
|
31507
31653
|
} catch (error) {
|
|
31508
31654
|
console.error("Error fetching default time series data:", error);
|
|
@@ -32229,6 +32375,10 @@ const SectionControls = ({
|
|
|
32229
32375
|
] })
|
|
32230
32376
|
] });
|
|
32231
32377
|
};
|
|
32378
|
+
function modelListViewRowLabel(listItem) {
|
|
32379
|
+
if (!listItem.modelName) return "";
|
|
32380
|
+
return listItem.connectionName ? `${listItem.modelName} - ${listItem.connectionName}` : listItem.modelName;
|
|
32381
|
+
}
|
|
32232
32382
|
const DashboardSection = ({
|
|
32233
32383
|
section,
|
|
32234
32384
|
className,
|
|
@@ -32326,16 +32476,17 @@ const DashboardSection = ({
|
|
|
32326
32476
|
});
|
|
32327
32477
|
return baseData.map((item) => {
|
|
32328
32478
|
let filteredValue = 0;
|
|
32479
|
+
let matchingItems = [];
|
|
32329
32480
|
if (item["listView"] && Array.isArray(item["listView"])) {
|
|
32330
|
-
|
|
32481
|
+
matchingItems = item["listView"].filter((listItem) => {
|
|
32331
32482
|
if (metricType === "agentRuns" && listItem.agentName) {
|
|
32332
32483
|
return listItem.agentName === selectedLabel || listItem.agentName.toLowerCase() === (selectedLabel == null ? void 0 : selectedLabel.toLowerCase());
|
|
32333
32484
|
}
|
|
32334
32485
|
if (metricType === "toolRuns" && listItem.toolName) {
|
|
32335
32486
|
return listItem.toolName === selectedLabel || listItem.toolName.toLowerCase() === (selectedLabel == null ? void 0 : selectedLabel.toLowerCase());
|
|
32336
32487
|
}
|
|
32337
|
-
if (metricType === "modelRuns" && listItem.modelName) {
|
|
32338
|
-
return listItem
|
|
32488
|
+
if (metricType === "modelRuns" && listItem.modelName && selectedLabel) {
|
|
32489
|
+
return modelListViewRowLabel(listItem) === selectedLabel;
|
|
32339
32490
|
}
|
|
32340
32491
|
return false;
|
|
32341
32492
|
});
|
|
@@ -32345,10 +32496,17 @@ const DashboardSection = ({
|
|
|
32345
32496
|
);
|
|
32346
32497
|
}
|
|
32347
32498
|
console.log("📊 Filtered value for", selectedLabel, ":", filteredValue);
|
|
32499
|
+
const failedModelRunsSum = metricType === "modelRuns" ? matchingItems.reduce(
|
|
32500
|
+
(sum2, listItem) => sum2 + (Number(listItem.failedRuns) || 0),
|
|
32501
|
+
0
|
|
32502
|
+
) : 0;
|
|
32348
32503
|
const result = {
|
|
32349
32504
|
...item,
|
|
32350
32505
|
[metricType]: filteredValue
|
|
32351
32506
|
};
|
|
32507
|
+
if (metricType === "modelRuns") {
|
|
32508
|
+
result.failedModelRuns = failedModelRunsSum;
|
|
32509
|
+
}
|
|
32352
32510
|
return result;
|
|
32353
32511
|
});
|
|
32354
32512
|
}
|
|
@@ -32360,8 +32518,9 @@ const DashboardSection = ({
|
|
|
32360
32518
|
const selectedLabels = selectedOptions.map((opt) => opt.label);
|
|
32361
32519
|
return baseData.map((item) => {
|
|
32362
32520
|
let aggregatedValue = 0;
|
|
32521
|
+
let matchingItems = [];
|
|
32363
32522
|
if (item["listView"] && Array.isArray(item["listView"])) {
|
|
32364
|
-
|
|
32523
|
+
matchingItems = item["listView"].filter((listItem) => {
|
|
32365
32524
|
if (metricType === "agentRuns" && listItem.agentName) {
|
|
32366
32525
|
return selectedLabels.some(
|
|
32367
32526
|
(label) => listItem.agentName === label || listItem.agentName.toLowerCase() === (label == null ? void 0 : label.toLowerCase())
|
|
@@ -32373,9 +32532,8 @@ const DashboardSection = ({
|
|
|
32373
32532
|
);
|
|
32374
32533
|
}
|
|
32375
32534
|
if (metricType === "modelRuns" && listItem.modelName) {
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
);
|
|
32535
|
+
const rowLabel = modelListViewRowLabel(listItem);
|
|
32536
|
+
return selectedLabels.some((label) => rowLabel === label);
|
|
32379
32537
|
}
|
|
32380
32538
|
return false;
|
|
32381
32539
|
});
|
|
@@ -32384,10 +32542,18 @@ const DashboardSection = ({
|
|
|
32384
32542
|
0
|
|
32385
32543
|
);
|
|
32386
32544
|
}
|
|
32387
|
-
|
|
32545
|
+
const failedModelRunsMulti = metricType === "modelRuns" ? matchingItems.reduce(
|
|
32546
|
+
(sum2, listItem) => sum2 + (Number(listItem.failedRuns) || 0),
|
|
32547
|
+
0
|
|
32548
|
+
) : 0;
|
|
32549
|
+
const multiResult = {
|
|
32388
32550
|
...item,
|
|
32389
32551
|
[metricType]: aggregatedValue
|
|
32390
32552
|
};
|
|
32553
|
+
if (metricType === "modelRuns") {
|
|
32554
|
+
multiResult.failedModelRuns = failedModelRunsMulti;
|
|
32555
|
+
}
|
|
32556
|
+
return multiResult;
|
|
32391
32557
|
});
|
|
32392
32558
|
}
|
|
32393
32559
|
return baseData;
|
|
@@ -32619,35 +32785,30 @@ const DashboardSection = ({
|
|
|
32619
32785
|
data: filteredData,
|
|
32620
32786
|
yAxisLabel: "Number of Tool Runs",
|
|
32621
32787
|
lines: [
|
|
32622
|
-
{
|
|
32623
|
-
dataKey: "toolRuns",
|
|
32624
|
-
color: "#06b6d4",
|
|
32625
|
-
// Blue for Tool Runs
|
|
32626
|
-
label: "Tool Runs"
|
|
32627
|
-
},
|
|
32628
32788
|
{
|
|
32629
32789
|
dataKey: "codeTools",
|
|
32630
32790
|
color: "#f97316",
|
|
32631
|
-
// Orange for Code Tools
|
|
32632
32791
|
label: "Code Tools"
|
|
32633
32792
|
},
|
|
32634
32793
|
{
|
|
32635
32794
|
dataKey: "workflowTools",
|
|
32636
32795
|
color: "#10b981",
|
|
32637
|
-
// Green for Workflow Tools
|
|
32638
32796
|
label: "Workflow Tools"
|
|
32639
32797
|
},
|
|
32640
32798
|
{
|
|
32641
32799
|
dataKey: "knowledgeTools",
|
|
32642
32800
|
color: "#8b5cf6",
|
|
32643
|
-
// Purple for Knowledge
|
|
32644
32801
|
label: "Knowledge"
|
|
32645
32802
|
},
|
|
32646
32803
|
{
|
|
32647
32804
|
dataKey: "mcpTools",
|
|
32648
32805
|
color: "#ef4444",
|
|
32649
|
-
// Red for MCP Tools
|
|
32650
32806
|
label: "MCP Tools"
|
|
32807
|
+
},
|
|
32808
|
+
{
|
|
32809
|
+
dataKey: "processors",
|
|
32810
|
+
color: "#eab308",
|
|
32811
|
+
label: "Processors"
|
|
32651
32812
|
}
|
|
32652
32813
|
],
|
|
32653
32814
|
height: 300,
|
|
@@ -32667,12 +32828,20 @@ const DashboardSection = ({
|
|
|
32667
32828
|
type: "line",
|
|
32668
32829
|
title: getChartTitle("Model Runs"),
|
|
32669
32830
|
data: getFilteredData(baseData, "modelRuns"),
|
|
32670
|
-
dataKey: "modelRuns",
|
|
32671
|
-
color: "#10b981",
|
|
32672
|
-
// Green as shown in Figma
|
|
32673
32831
|
yAxisLabel: "Number of Model Runs",
|
|
32832
|
+
lines: [
|
|
32833
|
+
{ dataKey: "modelRuns", color: "#10b981", label: "Model Runs" },
|
|
32834
|
+
{
|
|
32835
|
+
dataKey: "failedModelRuns",
|
|
32836
|
+
color: "#ef4444",
|
|
32837
|
+
label: "Failed",
|
|
32838
|
+
seriesType: "bar",
|
|
32839
|
+
hideInLegend: true
|
|
32840
|
+
}
|
|
32841
|
+
],
|
|
32674
32842
|
height: 300,
|
|
32675
32843
|
showGrid: true,
|
|
32844
|
+
showLegend: true,
|
|
32676
32845
|
curve: "monotone",
|
|
32677
32846
|
tooltip: { show: true, style: "dark" },
|
|
32678
32847
|
dateRange: {
|
|
@@ -32685,12 +32854,20 @@ const DashboardSection = ({
|
|
|
32685
32854
|
type: "line",
|
|
32686
32855
|
title: getChartTitle("Model Runs"),
|
|
32687
32856
|
data: filteredData,
|
|
32688
|
-
dataKey: "modelRuns",
|
|
32689
|
-
color: "#10b981",
|
|
32690
|
-
// Green as shown in Figma
|
|
32691
32857
|
yAxisLabel: "Number of Model Runs",
|
|
32858
|
+
lines: [
|
|
32859
|
+
{ dataKey: "modelRuns", color: "#10b981", label: "Model Runs" },
|
|
32860
|
+
{
|
|
32861
|
+
dataKey: "failedModelRuns",
|
|
32862
|
+
color: "#ef4444",
|
|
32863
|
+
label: "Failed",
|
|
32864
|
+
seriesType: "bar",
|
|
32865
|
+
hideInLegend: true
|
|
32866
|
+
}
|
|
32867
|
+
],
|
|
32692
32868
|
height: 300,
|
|
32693
32869
|
showGrid: true,
|
|
32870
|
+
showLegend: true,
|
|
32694
32871
|
curve: "monotone",
|
|
32695
32872
|
tooltip: { show: true, style: "dark" },
|
|
32696
32873
|
dateRange: {
|
|
@@ -34942,8 +35119,11 @@ const Dashboard = ({
|
|
|
34942
35119
|
if (appConfig) {
|
|
34943
35120
|
try {
|
|
34944
35121
|
apiServiceRef.current = new DashboardApiService(appConfig);
|
|
34945
|
-
|
|
34946
|
-
|
|
35122
|
+
const initDashboard = async () => {
|
|
35123
|
+
await loadEnvironments();
|
|
35124
|
+
await loadInitialData();
|
|
35125
|
+
};
|
|
35126
|
+
initDashboard();
|
|
34947
35127
|
} catch (err) {
|
|
34948
35128
|
console.error("Failed to initialize API service:", err);
|
|
34949
35129
|
}
|