mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-13 06:55:59 +00:00
* Refactor seafevents msg and add traffic stats API Squashed commit of the following: commit 85fe5369f711e1514762d93008f9ebb3c5d49041 Author: zhengxie <xiez1989@gmail.com> Date: Mon Aug 6 15:48:55 2018 +0800 Add '-link' to access_token op type when generate download/upload link commit 1817833fc3374f54030e16f3a1283ff6f34ddbf5 Author: zhengxie <xiez1989@gmail.com> Date: Mon Aug 6 15:28:38 2018 +0800 Refactor file/dir events 1. Remove traffic related msg 2. Rename seahub.stats to seahub.audit for audit related msg * Fix share link zip task traffic owner * [admin api] Add org traffic * [system admin] statistic: added 'traffic', fixed 'storage' * [system admin] statistic: added 3 more charts for 'traffic', and modified the top nav * [system admin] statistic: added 'traffic' for org; added a traffic nav, improved chart dot title
20 lines
523 B
Python
20 lines
523 B
Python
from django.core.urlresolvers import reverse
|
|
|
|
from seahub.test_utils import BaseTestCase
|
|
|
|
try:
|
|
from seahub.settings import LOCAL_PRO_DEV_ENV
|
|
except ImportError:
|
|
LOCAL_PRO_DEV_ENV = False
|
|
|
|
|
|
class AdminOrgStatsTrafficTest(BaseTestCase):
|
|
def test_get(self):
|
|
self.login_as(self.admin)
|
|
|
|
url = reverse('api-v2.1-admin-org-stats-traffic', args=[1])
|
|
url += '?start=2017-06-01 07:00:00&end=2017-06-03 07:00:00'
|
|
|
|
resp = self.client.get(url)
|
|
self.assertEqual(200, resp.status_code)
|