1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 19:37:28 +00:00

[system admin] statistic/traffic: modified 'order_by' value according to python API, for sort of users/orgs traffic (#4691)

This commit is contained in:
llj
2020-10-13 11:45:08 +08:00
committed by GitHub
parent 62c2f0bc9e
commit a3342df76a
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class OrgsTraffic extends React.Component {
getTrafficList = (month, page) => {
const { perPage, sortBy, sortOrder } = this.state;
const orderBy = `${sortBy}_${sortOrder}`;
const orderBy = sortOrder == 'asc' ? sortBy : `${sortBy}_${sortOrder}`;
this.setState({isLoading: true, errorMessage: ''});
seafileAPI.sysAdminListOrgTraffic(month, page, perPage, orderBy).then(res => {
let orgTrafficList = res.data.org_monthly_traffic_list.slice(0);

View File

@@ -74,7 +74,7 @@ class UsersTraffic extends React.Component {
getTrafficList = (month, page) => {
const { perPage, sortBy, sortOrder } = this.state;
const orderBy = `${sortBy}_${sortOrder}`;
const orderBy = sortOrder == 'asc' ? sortBy : `${sortBy}_${sortOrder}`;
this.setState({
isLoading: true,
errorMessage: ''