mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 11:21:29 +00:00
fix: set the duration and scroll position for on-demand logs (#104)
This commit is contained in:
@@ -31,6 +31,7 @@ interface DemandLogState {
|
||||
logs: Log[];
|
||||
loadLogs: boolean;
|
||||
message: string;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export const demandLogStore = defineStore({
|
||||
@@ -47,6 +48,7 @@ export const demandLogStore = defineStore({
|
||||
logs: [],
|
||||
loadLogs: false,
|
||||
message: "",
|
||||
total: 0,
|
||||
}),
|
||||
actions: {
|
||||
setLogCondition(data: Conditions) {
|
||||
@@ -109,6 +111,7 @@ export const demandLogStore = defineStore({
|
||||
this.setLogs("", res.data.data.logs.errorReason);
|
||||
return res.data;
|
||||
}
|
||||
this.total = res.data.data.logs.logs.length;
|
||||
const logs = res.data.data.logs.logs
|
||||
.map((d: Log) => d.content)
|
||||
.join("\n");
|
||||
|
Reference in New Issue
Block a user