From d658d6c614d87340b9724099bb8cd2f589e30681 Mon Sep 17 00:00:00 2001 From: lian Date: Wed, 25 Dec 2024 15:02:16 +0800 Subject: [PATCH] update --- frontend/src/pages/org-admin/org-info.js | 12 ++++++------ seahub/organizations/api/admin/info.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/org-admin/org-info.js b/frontend/src/pages/org-admin/org-info.js index 394e6c91936..6bb5fbb7973 100644 --- a/frontend/src/pages/org-admin/org-info.js +++ b/frontend/src/pages/org-admin/org-info.js @@ -12,7 +12,7 @@ class OrgInfo extends Component { super(props); this.state = { org_name: '', - monthly_traffic: '', + traffic_this_month: '', storage_quota: 0, storage_usage: 0, member_quota: 0, @@ -24,12 +24,12 @@ class OrgInfo extends Component { componentDidMount() { orgAdminAPI.orgAdminGetOrgInfo().then(res => { const { - org_id, org_name, monthly_traffic, + org_id, org_name, traffic_this_month, member_quota, member_usage, active_members, storage_quota, storage_usage } = res.data; this.setState({ - org_id, org_name, monthly_traffic, + org_id, org_name, traffic_this_month, member_quota, member_usage, active_members, storage_quota, storage_usage }); @@ -38,7 +38,7 @@ class OrgInfo extends Component { render() { const { - org_id, org_name, monthly_traffic, + org_id, org_name, traffic_this_month, member_quota, member_usage, active_members, storage_quota, storage_usage } = this.state; @@ -107,9 +107,9 @@ class OrgInfo extends Component {

{gettext('Traffic this month')}

- {gettext('Download')} {Utils.bytesToSize(monthly_traffic.link_file_download + monthly_traffic.sync_file_download + monthly_traffic.web_file_download)} + {gettext('Download')} {Utils.bytesToSize(traffic_this_month.link_file_download + traffic_this_month.sync_file_download + traffic_this_month.web_file_download)}
- {gettext('Upload')} {Utils.bytesToSize(monthly_traffic.link_file_upload + monthly_traffic.sync_file_upload + monthly_traffic.web_file_upload)} + {gettext('Upload')} {Utils.bytesToSize(traffic_this_month.link_file_upload + traffic_this_month.sync_file_upload + traffic_this_month.web_file_upload)}
diff --git a/seahub/organizations/api/admin/info.py b/seahub/organizations/api/admin/info.py index 56eee474644..dfe8e1fe698 100644 --- a/seahub/organizations/api/admin/info.py +++ b/seahub/organizations/api/admin/info.py @@ -89,7 +89,7 @@ def get_org_info(request, org_id): info[FORCE_ADFS_LOGIN] = False current_date = datetime.now() - info['monthly_traffic'] = get_org_traffic_by_month(org_id, current_date) + info['traffic_this_month'] = get_org_traffic_by_month(org_id, current_date) info['storage_quota'] = storage_quota info['storage_usage'] = storage_usage info['user_default_quota'] = user_default_quota