Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf977ce8

Browse files
fetch data on chart zoom event
1 parent220ae93 commitf977ce8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

‎client/packages/lowcoder/src/pages/setting/audit/charts/eventTypesTime.tsx‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,16 @@ const EventTypeTimeChart = ({ data, eventTypeLabels, eventTypes, setDateRange }:
6262
}));
6363

6464
consthandleChartEvents=(params:any)=>{
65-
if(params.start!==undefined&&params.end!==undefined){
66-
conststartIndex=Math.floor((params.start/100)*(fullDateRange.length-1));
67-
constendIndex=Math.floor((params.end/100)*(fullDateRange.length-1));
65+
// const {start, end} = params.batch?.[0];
66+
let{start, end}=params;
67+
if(params?.batch){
68+
start=params.batch?.[0]?.start;
69+
end=params.batch?.[0]?.end;
70+
}
71+
if(start!==undefined&&end!==undefined){
72+
// debugger;
73+
conststartIndex=Math.floor((start/100)*(fullDateRange.length-1));
74+
constendIndex=Math.floor((end/100)*(fullDateRange.length-1));
6875

6976
constfromDate=newDate(fullDateRange[startIndex]||fullDateRange[0]);// Keep start of day
7077
consttoDate=newDate(fullDateRange[endIndex]||fullDateRange[fullDateRange.length-1]);

‎client/packages/lowcoder/src/pages/setting/audit/dashboard.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ export function AuditLogDashboard() {
221221
constendDate=dayjs(toTimestamp);
222222
form.setFieldsValue({dateRange:[startDate,endDate]});
223223

224-
setPagination({pageSize:25,current:1});
224+
//setPagination({ pageSize: 25, current: 1 });
225225
setAllLogs([]);
226226
setCurrentPageLogs([]);
227-
fetchLogs(1,LOG_PAGE_SIZE,true);
227+
fetchLogs(1,total,true);
228228
};
229229

230230
// Debounce handler for input fields
@@ -477,6 +477,7 @@ export function AuditLogDashboard() {
477477
<Divider/>
478478
<divstyle={{overflowX:"auto",width:"100%"}}>
479479
<Table
480+
rowKey="id"
480481
columns={columns}
481482
dataSource={currentPageLogs}
482483
size="small"// Compact Layout

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp