@nethru/kit 1.1.10 → 1.1.11
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/components/charts/Number.js +1 -13
- package/dist/components/charts/Time.js +24 -0
- package/dist/components/chat/content/ToolContent.js +1 -1
- package/dist/components/chat/content/wisecollector/PeriodCompareChartContent.js +4 -2
- package/dist/components/chat/mock.js +148 -197
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { formatDuration } from "./Time";
|
|
1
2
|
export function toValue(value) {
|
|
2
3
|
return value && typeof value === 'object' ? value.value : value;
|
|
3
4
|
}
|
|
@@ -16,19 +17,6 @@ export function formatPercent(value) {
|
|
|
16
17
|
export function formatDiffPercent(value) {
|
|
17
18
|
return value !== undefined ? `${value > 0 ? '+' : ''}${formatToPercent(value)}` : '-';
|
|
18
19
|
}
|
|
19
|
-
export function formatDuration(value) {
|
|
20
|
-
value = toValue(value);
|
|
21
|
-
if (!value) return '-';
|
|
22
|
-
let day = Math.floor(value / (60 * 60 * 24));
|
|
23
|
-
let hour = Math.floor(value / (60 * 60)) - day * 24;
|
|
24
|
-
let minute = Math.floor(value / 60) - (day * 24 + hour) * 60;
|
|
25
|
-
let second = Math.round(value % 60);
|
|
26
|
-
day = day > 0 ? `${day.toLocaleString()}일 ` : '';
|
|
27
|
-
hour = hour > 0 ? `${hour >= 10 ? hour : '0' + hour}시간 ` : '';
|
|
28
|
-
minute = `${minute >= 10 ? minute : '0' + minute}분 `;
|
|
29
|
-
second = `${second >= 10 ? second : '0' + second}초`;
|
|
30
|
-
return `${day}${hour}${minute}${second}`;
|
|
31
|
-
}
|
|
32
20
|
export function formatBytes(value) {
|
|
33
21
|
return value !== undefined ? `${value.toLocaleString()} bytes` : '-';
|
|
34
22
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { toValue } from "./Number";
|
|
2
|
+
export function formatMinutes(minutes) {
|
|
3
|
+
if (!Number.isInteger(minutes) || minutes < 0) {
|
|
4
|
+
throw new Error("minutes는 0 이상의 정수여야 합니다");
|
|
5
|
+
}
|
|
6
|
+
const hours = Math.floor(minutes / 60);
|
|
7
|
+
const mins = minutes % 60;
|
|
8
|
+
if (hours === 0) return `${mins}분`;
|
|
9
|
+
if (mins === 0) return `${hours}시간`;
|
|
10
|
+
return `${hours}시간 ${mins}분`;
|
|
11
|
+
}
|
|
12
|
+
export function formatDuration(value) {
|
|
13
|
+
value = toValue(value);
|
|
14
|
+
if (!value) return '-';
|
|
15
|
+
let day = Math.floor(value / (60 * 60 * 24));
|
|
16
|
+
let hour = Math.floor(value / (60 * 60)) - day * 24;
|
|
17
|
+
let minute = Math.floor(value / 60) - (day * 24 + hour) * 60;
|
|
18
|
+
let second = Math.round(value % 60);
|
|
19
|
+
day = day > 0 ? `${day.toLocaleString()}일 ` : '';
|
|
20
|
+
hour = hour > 0 ? `${hour >= 10 ? hour : '0' + hour}시간 ` : '';
|
|
21
|
+
minute = `${minute >= 10 ? minute : '0' + minute}분 `;
|
|
22
|
+
second = `${second >= 10 ? second : '0' + second}초`;
|
|
23
|
+
return `${day}${hour}${minute}${second}`;
|
|
24
|
+
}
|
|
@@ -73,7 +73,7 @@ function groupTools(hasCompare, tools) {
|
|
|
73
73
|
if (items.length < 2) continue;
|
|
74
74
|
const distinctPeriods = new Set(items.map(periodKey));
|
|
75
75
|
if (distinctPeriods.size < 2) continue;
|
|
76
|
-
periodTrendTools.push(items);
|
|
76
|
+
periodTrendTools.push(items.sort((a, b) => b.arguments.from - a.arguments.from));
|
|
77
77
|
for (const item of items) {
|
|
78
78
|
used.add(item);
|
|
79
79
|
}
|
|
@@ -3,6 +3,8 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
import { formatDateRange, isOneDay } from "../../../../js/dateHelper";
|
|
4
4
|
import PeriodCompareChart from "../../../charts/PeriodCompareChart";
|
|
5
5
|
import { useToolContext } from "../../contexts/ToolContext";
|
|
6
|
+
import { formatDuration } from "../../../charts/Number";
|
|
7
|
+
import { formatMinutes } from "../../../charts/Time";
|
|
6
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
export default function PeriodCompareChartContent({
|
|
8
10
|
tools
|
|
@@ -45,10 +47,10 @@ function toChartData(tools) {
|
|
|
45
47
|
}
|
|
46
48
|
}));
|
|
47
49
|
const averages = [{
|
|
48
|
-
label: `${current.unit}
|
|
50
|
+
label: `${formatMinutes(current.unit)} 평균 (${current.period})`,
|
|
49
51
|
value: current.records.length ? currentSum / current.records.length : null
|
|
50
52
|
}, {
|
|
51
|
-
label: `${current.unit}
|
|
53
|
+
label: `${formatMinutes(current.unit)} 평균 (${prev.period})`,
|
|
52
54
|
value: prev.records.length ? sum(prev.records, 'output') / prev.records.length : null
|
|
53
55
|
}];
|
|
54
56
|
return {
|
|
@@ -74,70 +74,20 @@ const mockCollectSummary1 = {
|
|
|
74
74
|
"cacheValidUntil": "2025-12-22 15:07:20"
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
const
|
|
78
|
-
"type": "tool",
|
|
79
|
-
"name": "query-summary-by-task-id",
|
|
80
|
-
"arguments": {
|
|
81
|
-
"taskId": "wc_convert_1",
|
|
82
|
-
"from": "20251203",
|
|
83
|
-
"to": "20251203"
|
|
84
|
-
},
|
|
85
|
-
"result": {
|
|
86
|
-
"code": "SUCCESS",
|
|
87
|
-
"message": "",
|
|
88
|
-
"result": [{
|
|
89
|
-
"id": "1",
|
|
90
|
-
"name": "에이전트1",
|
|
91
|
-
"metric": {
|
|
92
|
-
"input": 22,
|
|
93
|
-
"output": 13,
|
|
94
|
-
"filter": 10,
|
|
95
|
-
"error": 5
|
|
96
|
-
}
|
|
97
|
-
}],
|
|
98
|
-
"queryTimestamp": "2025-12-04 09:33:48",
|
|
99
|
-
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const mockConvertSummary2 = {
|
|
103
|
-
"type": "tool",
|
|
104
|
-
"name": "query-summary-by-task-id",
|
|
105
|
-
"arguments": {
|
|
106
|
-
"taskId": "wc_convert_1",
|
|
107
|
-
"from": "20251204",
|
|
108
|
-
"to": "20251204"
|
|
109
|
-
},
|
|
110
|
-
"result": {
|
|
111
|
-
"code": "SUCCESS",
|
|
112
|
-
"message": "",
|
|
113
|
-
"result": [{
|
|
114
|
-
"id": "1",
|
|
115
|
-
"name": "에이전트1",
|
|
116
|
-
"metric": {
|
|
117
|
-
"input": 20,
|
|
118
|
-
"output": 13,
|
|
119
|
-
"filter": 5,
|
|
120
|
-
"error": 2
|
|
121
|
-
}
|
|
122
|
-
}],
|
|
123
|
-
"queryTimestamp": "2025-12-04 09:33:48",
|
|
124
|
-
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const mockCollectTrend1 = {
|
|
77
|
+
const mockPrevTrend = {
|
|
128
78
|
"type": "tool",
|
|
129
79
|
"name": "query-trend-by-container-id",
|
|
130
80
|
"arguments": {
|
|
131
81
|
"containerId": "00001",
|
|
132
|
-
"from": "
|
|
133
|
-
"to": "
|
|
134
|
-
"unit": "
|
|
82
|
+
"from": "20251223",
|
|
83
|
+
"to": "20251223",
|
|
84
|
+
"unit": "60"
|
|
135
85
|
},
|
|
136
86
|
"result": {
|
|
137
87
|
"code": "SUCCESS",
|
|
138
88
|
"message": "",
|
|
139
89
|
"result": [{
|
|
140
|
-
"time":
|
|
90
|
+
"time": 1766415600000,
|
|
141
91
|
"metric": {
|
|
142
92
|
"input": 0,
|
|
143
93
|
"output": 0,
|
|
@@ -145,7 +95,7 @@ const mockCollectTrend1 = {
|
|
|
145
95
|
"error": 0
|
|
146
96
|
}
|
|
147
97
|
}, {
|
|
148
|
-
"time":
|
|
98
|
+
"time": 1766419200000,
|
|
149
99
|
"metric": {
|
|
150
100
|
"input": 0,
|
|
151
101
|
"output": 0,
|
|
@@ -153,7 +103,7 @@ const mockCollectTrend1 = {
|
|
|
153
103
|
"error": 0
|
|
154
104
|
}
|
|
155
105
|
}, {
|
|
156
|
-
"time":
|
|
106
|
+
"time": 1766422800000,
|
|
157
107
|
"metric": {
|
|
158
108
|
"input": 0,
|
|
159
109
|
"output": 0,
|
|
@@ -161,7 +111,7 @@ const mockCollectTrend1 = {
|
|
|
161
111
|
"error": 0
|
|
162
112
|
}
|
|
163
113
|
}, {
|
|
164
|
-
"time":
|
|
114
|
+
"time": 1766426400000,
|
|
165
115
|
"metric": {
|
|
166
116
|
"input": 0,
|
|
167
117
|
"output": 0,
|
|
@@ -169,7 +119,7 @@ const mockCollectTrend1 = {
|
|
|
169
119
|
"error": 0
|
|
170
120
|
}
|
|
171
121
|
}, {
|
|
172
|
-
"time":
|
|
122
|
+
"time": 1766430000000,
|
|
173
123
|
"metric": {
|
|
174
124
|
"input": 0,
|
|
175
125
|
"output": 0,
|
|
@@ -177,7 +127,7 @@ const mockCollectTrend1 = {
|
|
|
177
127
|
"error": 0
|
|
178
128
|
}
|
|
179
129
|
}, {
|
|
180
|
-
"time":
|
|
130
|
+
"time": 1766433600000,
|
|
181
131
|
"metric": {
|
|
182
132
|
"input": 0,
|
|
183
133
|
"output": 0,
|
|
@@ -185,7 +135,7 @@ const mockCollectTrend1 = {
|
|
|
185
135
|
"error": 0
|
|
186
136
|
}
|
|
187
137
|
}, {
|
|
188
|
-
"time":
|
|
138
|
+
"time": 1766437200000,
|
|
189
139
|
"metric": {
|
|
190
140
|
"input": 0,
|
|
191
141
|
"output": 0,
|
|
@@ -193,7 +143,7 @@ const mockCollectTrend1 = {
|
|
|
193
143
|
"error": 0
|
|
194
144
|
}
|
|
195
145
|
}, {
|
|
196
|
-
"time":
|
|
146
|
+
"time": 1766440800000,
|
|
197
147
|
"metric": {
|
|
198
148
|
"input": 0,
|
|
199
149
|
"output": 0,
|
|
@@ -201,7 +151,7 @@ const mockCollectTrend1 = {
|
|
|
201
151
|
"error": 0
|
|
202
152
|
}
|
|
203
153
|
}, {
|
|
204
|
-
"time":
|
|
154
|
+
"time": 1766444400000,
|
|
205
155
|
"metric": {
|
|
206
156
|
"input": 0,
|
|
207
157
|
"output": 0,
|
|
@@ -209,31 +159,31 @@ const mockCollectTrend1 = {
|
|
|
209
159
|
"error": 0
|
|
210
160
|
}
|
|
211
161
|
}, {
|
|
212
|
-
"time":
|
|
162
|
+
"time": 1766448000000,
|
|
213
163
|
"metric": {
|
|
214
|
-
"input":
|
|
215
|
-
"output":
|
|
164
|
+
"input": 21,
|
|
165
|
+
"output": 21,
|
|
216
166
|
"filter": 0,
|
|
217
167
|
"error": 0
|
|
218
168
|
}
|
|
219
169
|
}, {
|
|
220
|
-
"time":
|
|
170
|
+
"time": 1766451600000,
|
|
221
171
|
"metric": {
|
|
222
|
-
"input":
|
|
223
|
-
"output":
|
|
172
|
+
"input": 17,
|
|
173
|
+
"output": 17,
|
|
224
174
|
"filter": 0,
|
|
225
175
|
"error": 0
|
|
226
176
|
}
|
|
227
177
|
}, {
|
|
228
|
-
"time":
|
|
178
|
+
"time": 1766455200000,
|
|
229
179
|
"metric": {
|
|
230
|
-
"input":
|
|
231
|
-
"output":
|
|
180
|
+
"input": 7,
|
|
181
|
+
"output": 7,
|
|
232
182
|
"filter": 0,
|
|
233
183
|
"error": 0
|
|
234
184
|
}
|
|
235
185
|
}, {
|
|
236
|
-
"time":
|
|
186
|
+
"time": 1766458800000,
|
|
237
187
|
"metric": {
|
|
238
188
|
"input": 0,
|
|
239
189
|
"output": 0,
|
|
@@ -241,7 +191,7 @@ const mockCollectTrend1 = {
|
|
|
241
191
|
"error": 0
|
|
242
192
|
}
|
|
243
193
|
}, {
|
|
244
|
-
"time":
|
|
194
|
+
"time": 1766462400000,
|
|
245
195
|
"metric": {
|
|
246
196
|
"input": 0,
|
|
247
197
|
"output": 0,
|
|
@@ -249,7 +199,7 @@ const mockCollectTrend1 = {
|
|
|
249
199
|
"error": 0
|
|
250
200
|
}
|
|
251
201
|
}, {
|
|
252
|
-
"time":
|
|
202
|
+
"time": 1766466000000,
|
|
253
203
|
"metric": {
|
|
254
204
|
"input": 0,
|
|
255
205
|
"output": 0,
|
|
@@ -257,15 +207,15 @@ const mockCollectTrend1 = {
|
|
|
257
207
|
"error": 0
|
|
258
208
|
}
|
|
259
209
|
}, {
|
|
260
|
-
"time":
|
|
210
|
+
"time": 1766469600000,
|
|
261
211
|
"metric": {
|
|
262
|
-
"input":
|
|
263
|
-
"output":
|
|
212
|
+
"input": 23,
|
|
213
|
+
"output": 23,
|
|
264
214
|
"filter": 0,
|
|
265
215
|
"error": 0
|
|
266
216
|
}
|
|
267
217
|
}, {
|
|
268
|
-
"time":
|
|
218
|
+
"time": 1766473200000,
|
|
269
219
|
"metric": {
|
|
270
220
|
"input": 0,
|
|
271
221
|
"output": 0,
|
|
@@ -273,23 +223,7 @@ const mockCollectTrend1 = {
|
|
|
273
223
|
"error": 0
|
|
274
224
|
}
|
|
275
225
|
}, {
|
|
276
|
-
"time":
|
|
277
|
-
"metric": {
|
|
278
|
-
"input": 22,
|
|
279
|
-
"output": 22,
|
|
280
|
-
"filter": 0,
|
|
281
|
-
"error": 0
|
|
282
|
-
}
|
|
283
|
-
}, {
|
|
284
|
-
"time": 1765324800000,
|
|
285
|
-
"metric": {
|
|
286
|
-
"input": 16,
|
|
287
|
-
"output": 16,
|
|
288
|
-
"filter": 0,
|
|
289
|
-
"error": 0
|
|
290
|
-
}
|
|
291
|
-
}, {
|
|
292
|
-
"time": 1765326600000,
|
|
226
|
+
"time": 1766476800000,
|
|
293
227
|
"metric": {
|
|
294
228
|
"input": 0,
|
|
295
229
|
"output": 0,
|
|
@@ -297,15 +231,15 @@ const mockCollectTrend1 = {
|
|
|
297
231
|
"error": 0
|
|
298
232
|
}
|
|
299
233
|
}, {
|
|
300
|
-
"time":
|
|
234
|
+
"time": 1766480400000,
|
|
301
235
|
"metric": {
|
|
302
|
-
"input":
|
|
303
|
-
"output":
|
|
236
|
+
"input": 6,
|
|
237
|
+
"output": 6,
|
|
304
238
|
"filter": 0,
|
|
305
239
|
"error": 0
|
|
306
240
|
}
|
|
307
241
|
}, {
|
|
308
|
-
"time":
|
|
242
|
+
"time": 1766484000000,
|
|
309
243
|
"metric": {
|
|
310
244
|
"input": 0,
|
|
311
245
|
"output": 0,
|
|
@@ -313,7 +247,7 @@ const mockCollectTrend1 = {
|
|
|
313
247
|
"error": 0
|
|
314
248
|
}
|
|
315
249
|
}, {
|
|
316
|
-
"time":
|
|
250
|
+
"time": 1766487600000,
|
|
317
251
|
"metric": {
|
|
318
252
|
"input": 0,
|
|
319
253
|
"output": 0,
|
|
@@ -321,7 +255,7 @@ const mockCollectTrend1 = {
|
|
|
321
255
|
"error": 0
|
|
322
256
|
}
|
|
323
257
|
}, {
|
|
324
|
-
"time":
|
|
258
|
+
"time": 1766491200000,
|
|
325
259
|
"metric": {
|
|
326
260
|
"input": 0,
|
|
327
261
|
"output": 0,
|
|
@@ -329,23 +263,40 @@ const mockCollectTrend1 = {
|
|
|
329
263
|
"error": 0
|
|
330
264
|
}
|
|
331
265
|
}, {
|
|
332
|
-
"time":
|
|
266
|
+
"time": 1766494800000,
|
|
333
267
|
"metric": {
|
|
334
|
-
"input":
|
|
335
|
-
"output":
|
|
268
|
+
"input": 4,
|
|
269
|
+
"output": 4,
|
|
336
270
|
"filter": 0,
|
|
337
271
|
"error": 0
|
|
338
272
|
}
|
|
339
273
|
}, {
|
|
340
|
-
"time":
|
|
274
|
+
"time": 1766498400000,
|
|
341
275
|
"metric": {
|
|
342
276
|
"input": 0,
|
|
343
277
|
"output": 0,
|
|
344
278
|
"filter": 0,
|
|
345
279
|
"error": 0
|
|
346
280
|
}
|
|
347
|
-
},
|
|
348
|
-
|
|
281
|
+
}],
|
|
282
|
+
"queryTimestamp": "2025-12-24 16:25:36",
|
|
283
|
+
"cacheValidUntil": "2025-12-24 16:26:36"
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const mockCurrentTrend = {
|
|
287
|
+
"type": "tool",
|
|
288
|
+
"name": "query-trend-by-container-id",
|
|
289
|
+
"arguments": {
|
|
290
|
+
"containerId": "00001",
|
|
291
|
+
"from": "20251224",
|
|
292
|
+
"to": "20251224",
|
|
293
|
+
"unit": "60"
|
|
294
|
+
},
|
|
295
|
+
"result": {
|
|
296
|
+
"code": "SUCCESS",
|
|
297
|
+
"message": "",
|
|
298
|
+
"result": [{
|
|
299
|
+
"time": 1766502000000,
|
|
349
300
|
"metric": {
|
|
350
301
|
"input": 0,
|
|
351
302
|
"output": 0,
|
|
@@ -353,15 +304,7 @@ const mockCollectTrend1 = {
|
|
|
353
304
|
"error": 0
|
|
354
305
|
}
|
|
355
306
|
}, {
|
|
356
|
-
"time":
|
|
357
|
-
"metric": {
|
|
358
|
-
"input": 2,
|
|
359
|
-
"output": 2,
|
|
360
|
-
"filter": 0,
|
|
361
|
-
"error": 0
|
|
362
|
-
}
|
|
363
|
-
}, {
|
|
364
|
-
"time": 1765342800000,
|
|
307
|
+
"time": 1766505600000,
|
|
365
308
|
"metric": {
|
|
366
309
|
"input": 0,
|
|
367
310
|
"output": 0,
|
|
@@ -369,7 +312,7 @@ const mockCollectTrend1 = {
|
|
|
369
312
|
"error": 0
|
|
370
313
|
}
|
|
371
314
|
}, {
|
|
372
|
-
"time":
|
|
315
|
+
"time": 1766509200000,
|
|
373
316
|
"metric": {
|
|
374
317
|
"input": 0,
|
|
375
318
|
"output": 0,
|
|
@@ -377,7 +320,7 @@ const mockCollectTrend1 = {
|
|
|
377
320
|
"error": 0
|
|
378
321
|
}
|
|
379
322
|
}, {
|
|
380
|
-
"time":
|
|
323
|
+
"time": 1766512800000,
|
|
381
324
|
"metric": {
|
|
382
325
|
"input": 0,
|
|
383
326
|
"output": 0,
|
|
@@ -385,15 +328,7 @@ const mockCollectTrend1 = {
|
|
|
385
328
|
"error": 0
|
|
386
329
|
}
|
|
387
330
|
}, {
|
|
388
|
-
"time":
|
|
389
|
-
"metric": {
|
|
390
|
-
"input": 3,
|
|
391
|
-
"output": 3,
|
|
392
|
-
"filter": 0,
|
|
393
|
-
"error": 0
|
|
394
|
-
}
|
|
395
|
-
}, {
|
|
396
|
-
"time": 1765350000000,
|
|
331
|
+
"time": 1766516400000,
|
|
397
332
|
"metric": {
|
|
398
333
|
"input": 0,
|
|
399
334
|
"output": 0,
|
|
@@ -401,128 +336,154 @@ const mockCollectTrend1 = {
|
|
|
401
336
|
"error": 0
|
|
402
337
|
}
|
|
403
338
|
}, {
|
|
404
|
-
"time":
|
|
405
|
-
"metric": {
|
|
406
|
-
"input": 144,
|
|
407
|
-
"output": 144,
|
|
408
|
-
"filter": 0,
|
|
409
|
-
"error": 0
|
|
410
|
-
}
|
|
411
|
-
}, {
|
|
412
|
-
"time": 1765353600000,
|
|
339
|
+
"time": 1766520000000,
|
|
413
340
|
"metric": {
|
|
414
|
-
"input":
|
|
415
|
-
"output":
|
|
341
|
+
"input": 0,
|
|
342
|
+
"output": 0,
|
|
416
343
|
"filter": 0,
|
|
417
344
|
"error": 0
|
|
418
345
|
}
|
|
419
346
|
}, {
|
|
420
|
-
"time":
|
|
347
|
+
"time": 1766523600000,
|
|
421
348
|
"metric": {
|
|
422
|
-
"input":
|
|
423
|
-
"output":
|
|
349
|
+
"input": 0,
|
|
350
|
+
"output": 0,
|
|
424
351
|
"filter": 0,
|
|
425
352
|
"error": 0
|
|
426
353
|
}
|
|
427
354
|
}, {
|
|
428
|
-
"time":
|
|
355
|
+
"time": 1766527200000,
|
|
429
356
|
"metric": {
|
|
430
|
-
"input":
|
|
431
|
-
"output":
|
|
357
|
+
"input": 0,
|
|
358
|
+
"output": 0,
|
|
432
359
|
"filter": 0,
|
|
433
360
|
"error": 0
|
|
434
361
|
}
|
|
435
362
|
}, {
|
|
436
|
-
"time":
|
|
363
|
+
"time": 1766530800000,
|
|
437
364
|
"metric": {
|
|
438
|
-
"input":
|
|
439
|
-
"output":
|
|
365
|
+
"input": 0,
|
|
366
|
+
"output": 0,
|
|
440
367
|
"filter": 0,
|
|
441
368
|
"error": 0
|
|
442
369
|
}
|
|
443
370
|
}, {
|
|
444
|
-
"time":
|
|
371
|
+
"time": 1766534400000,
|
|
445
372
|
"metric": {
|
|
446
|
-
"input":
|
|
447
|
-
"output":
|
|
373
|
+
"input": 0,
|
|
374
|
+
"output": 0,
|
|
448
375
|
"filter": 0,
|
|
449
376
|
"error": 0
|
|
450
377
|
}
|
|
451
378
|
}, {
|
|
452
|
-
"time":
|
|
379
|
+
"time": 1766538000000,
|
|
453
380
|
"metric": {
|
|
454
|
-
"input":
|
|
455
|
-
"output":
|
|
381
|
+
"input": 0,
|
|
382
|
+
"output": 0,
|
|
456
383
|
"filter": 0,
|
|
457
384
|
"error": 0
|
|
458
385
|
}
|
|
459
386
|
}, {
|
|
460
|
-
"time":
|
|
387
|
+
"time": 1766541600000,
|
|
461
388
|
"metric": {
|
|
462
|
-
"input":
|
|
463
|
-
"output":
|
|
389
|
+
"input": 0,
|
|
390
|
+
"output": 0,
|
|
464
391
|
"filter": 0,
|
|
465
392
|
"error": 0
|
|
466
393
|
}
|
|
467
394
|
}, {
|
|
468
|
-
"time":
|
|
395
|
+
"time": 1766545200000,
|
|
469
396
|
"metric": {
|
|
470
|
-
"input":
|
|
471
|
-
"output":
|
|
397
|
+
"input": 0,
|
|
398
|
+
"output": 0,
|
|
472
399
|
"filter": 0,
|
|
473
400
|
"error": 0
|
|
474
401
|
}
|
|
475
402
|
}, {
|
|
476
|
-
"time":
|
|
403
|
+
"time": 1766548800000,
|
|
477
404
|
"metric": {
|
|
478
|
-
"input":
|
|
479
|
-
"output":
|
|
405
|
+
"input": 0,
|
|
406
|
+
"output": 0,
|
|
480
407
|
"filter": 0,
|
|
481
408
|
"error": 0
|
|
482
409
|
}
|
|
483
410
|
}, {
|
|
484
|
-
"time":
|
|
411
|
+
"time": 1766552400000,
|
|
485
412
|
"metric": {
|
|
486
|
-
"input":
|
|
487
|
-
"output":
|
|
413
|
+
"input": 60,
|
|
414
|
+
"output": 60,
|
|
488
415
|
"filter": 0,
|
|
489
416
|
"error": 0
|
|
490
417
|
}
|
|
491
418
|
}, {
|
|
492
|
-
"time":
|
|
419
|
+
"time": 1766556000000,
|
|
493
420
|
"metric": {
|
|
494
|
-
"input":
|
|
495
|
-
"output":
|
|
421
|
+
"input": 14,
|
|
422
|
+
"output": 14,
|
|
496
423
|
"filter": 0,
|
|
497
424
|
"error": 0
|
|
498
425
|
}
|
|
499
426
|
}, {
|
|
500
|
-
"time":
|
|
427
|
+
"time": 1766559600000,
|
|
501
428
|
"metric": {
|
|
502
|
-
"input":
|
|
503
|
-
"output":
|
|
429
|
+
"input": 13,
|
|
430
|
+
"output": 13,
|
|
504
431
|
"filter": 0,
|
|
505
432
|
"error": 0
|
|
506
433
|
}
|
|
507
|
-
},
|
|
508
|
-
|
|
434
|
+
}],
|
|
435
|
+
"queryTimestamp": "2025-12-24 16:25:37",
|
|
436
|
+
"cacheValidUntil": "2025-12-24 16:26:37"
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
const mockConvertSummary1 = {
|
|
440
|
+
"type": "tool",
|
|
441
|
+
"name": "query-summary-by-task-id",
|
|
442
|
+
"arguments": {
|
|
443
|
+
"taskId": "wc_convert_1",
|
|
444
|
+
"from": "20251203",
|
|
445
|
+
"to": "20251203"
|
|
446
|
+
},
|
|
447
|
+
"result": {
|
|
448
|
+
"code": "SUCCESS",
|
|
449
|
+
"message": "",
|
|
450
|
+
"result": [{
|
|
451
|
+
"id": "1",
|
|
452
|
+
"name": "에이전트1",
|
|
509
453
|
"metric": {
|
|
510
|
-
"input":
|
|
511
|
-
"output":
|
|
512
|
-
"filter":
|
|
513
|
-
"error":
|
|
454
|
+
"input": 22,
|
|
455
|
+
"output": 13,
|
|
456
|
+
"filter": 10,
|
|
457
|
+
"error": 5
|
|
514
458
|
}
|
|
515
|
-
},
|
|
516
|
-
|
|
459
|
+
}],
|
|
460
|
+
"queryTimestamp": "2025-12-04 09:33:48",
|
|
461
|
+
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
const mockConvertSummary2 = {
|
|
465
|
+
"type": "tool",
|
|
466
|
+
"name": "query-summary-by-task-id",
|
|
467
|
+
"arguments": {
|
|
468
|
+
"taskId": "wc_convert_1",
|
|
469
|
+
"from": "20251204",
|
|
470
|
+
"to": "20251204"
|
|
471
|
+
},
|
|
472
|
+
"result": {
|
|
473
|
+
"code": "SUCCESS",
|
|
474
|
+
"message": "",
|
|
475
|
+
"result": [{
|
|
476
|
+
"id": "1",
|
|
477
|
+
"name": "에이전트1",
|
|
517
478
|
"metric": {
|
|
518
|
-
"input":
|
|
519
|
-
"output":
|
|
520
|
-
"filter":
|
|
521
|
-
"error":
|
|
479
|
+
"input": 20,
|
|
480
|
+
"output": 13,
|
|
481
|
+
"filter": 5,
|
|
482
|
+
"error": 2
|
|
522
483
|
}
|
|
523
484
|
}],
|
|
524
|
-
"queryTimestamp": "2025-12-
|
|
525
|
-
"cacheValidUntil": "2025-12-
|
|
485
|
+
"queryTimestamp": "2025-12-04 09:33:48",
|
|
486
|
+
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
526
487
|
}
|
|
527
488
|
};
|
|
528
489
|
const mockConvertTrend1 = {
|
|
@@ -1177,17 +1138,7 @@ export const defaultMessages = [{
|
|
|
1177
1138
|
// mockConvertSummary2,
|
|
1178
1139
|
|
|
1179
1140
|
// PeriodCompareChart
|
|
1180
|
-
|
|
1181
|
-
// {
|
|
1182
|
-
// ...mockCollectTrend1,
|
|
1183
|
-
// "arguments": {
|
|
1184
|
-
// "containerId": "00001",
|
|
1185
|
-
// "from": "20251209",
|
|
1186
|
-
// "to": "20251209",
|
|
1187
|
-
// "unit": "30"
|
|
1188
|
-
// }
|
|
1189
|
-
// },
|
|
1190
|
-
|
|
1141
|
+
mockPrevTrend, mockCurrentTrend,
|
|
1191
1142
|
// StackedAreadTrendChart
|
|
1192
1143
|
// mockConvertTrend1,
|
|
1193
1144
|
// mockConvertTrend1,
|