diff --git a/config/env/torrents.js b/config/env/torrents.js index efa20cce..f6334361 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -103,7 +103,8 @@ module.exports = { * @announcePrefix: prefix of torrent file name, is will auto add when user download the torrent files * @clientBlackListUrl: forbidden download client list url, user can view this list to check forbidden client software * @announceLogDays: setting of days to write announce log to db, because the data is too more too big, do not to set a big value - * @daysLogMonths: setting of months to write user days log + * @userDaysLogDays: setting of days to write user days log + * @userMonthsLogMonths: setting of months to write user months log * @seedingInFinishedCheck: settings to check whether can seeding an un-download finished torrent * @downloadCheck: announce download(leech) settings * @ratio: if less than this value, can not download(leech) @@ -137,7 +138,8 @@ module.exports = { sourceInfo: '{MEAN.im} Present by meanTorrent.', clientBlackListUrl: '/about/black', announceLogDays: 30, - daysLogMonths: 12, + userDaysLogDays: 30, + userMonthsLogMonths: 12, seedingInFinishedCheck: true, downloadCheck: { ratio: 1, diff --git a/modules/core/client/app/trans-string-en.js b/modules/core/client/app/trans-string-en.js index 9c984a1c..5f4c3dfa 100644 --- a/modules/core/client/app/trans-string-en.js +++ b/modules/core/client/app/trans-string-en.js @@ -88,6 +88,7 @@ MENU_MESSAGE_BOX: 'Message Box', MENU_SCORE_LEVEL: 'Score Level', MENU_MY_INVITE: 'My Invitations', + MENU_MY_DATA_CENTER: 'Data center', MENU_ACCOUNT_STATUS: 'Account Status', EDIT_PROFILE: 'Edit Profile', EDIT_PROFILE_PIC: 'Edit Profile Picture', @@ -289,7 +290,8 @@ MY_FOLLOWING: 'My Following', USER_FOLLOWERS: 'User`s Followers', USER_FOLLOWING: 'User`s Following', - ADMIN_TICKETS: 'Support Services Center' + ADMIN_TICKETS: 'Support Services Center', + DATA_CENTER: 'User Data Center' }, //sign in, sign up, password @@ -1450,6 +1452,23 @@ } }, + // data center + DATA_CENTER: { + ITEM_SCORE: 'Score data analysis', + ITEM_UPLOADED: 'Uploaded data analysis', + ITEM_DOWNLOADED: 'Downloaded data analysis', + LAST_30_DAYS_DATA_SCORE: 'The last 30 days score data', + LAST_30_DAYS_DATA_UPLOADED: 'The last 30 days uploaded data', + LAST_30_DAYS_DATA_DOWNLOADED: 'The last 30 days downloaded data', + LAST_12_MONTHS_DATA_SCORE: 'The last 12 months score data', + LAST_12_MONTHS_DATA_UPLOADED: 'The last 12 months uploaded data', + LAST_12_MONTHS_DATA_DOWNLOADED: 'The last 12 months downloaded data', + GET_USER_LOGS_ERROR: 'Get user logs data failed', + SERIES_SCORE: 'score', + SERIES_UPLOADED: 'uploaded', + SERIES_DOWNLOADED: 'downloaded' + }, + //status pages STATUS_PAGE: { BAD_REQUEST: 'Bad Request', diff --git a/modules/core/client/app/trans-string-zh-tw.js b/modules/core/client/app/trans-string-zh-tw.js index 9ad0dfc5..6b886c97 100644 --- a/modules/core/client/app/trans-string-zh-tw.js +++ b/modules/core/client/app/trans-string-zh-tw.js @@ -88,6 +88,7 @@ MENU_MESSAGE_BOX: '站內訊息', MENU_SCORE_LEVEL: '積分等級', MENU_MY_INVITE: '我的邀請', + MENU_MY_DATA_CENTER: '數據中心', MENU_ACCOUNT_STATUS: '帳戶狀態', EDIT_PROFILE: '修改個人資訊', EDIT_PROFILE_PIC: '修改個人頭像', @@ -289,7 +290,8 @@ MY_FOLLOWING: '我關注的', USER_FOLLOWERS: '關注他的', USER_FOLLOWING: '他的關注', - ADMIN_TICKETS: '客戶服務中心' + ADMIN_TICKETS: '客戶服務中心', + DATA_CENTER: '用戶數據中心' }, //sign in, sign up, password @@ -1450,6 +1452,23 @@ } }, + // data center + DATA_CENTER: { + ITEM_SCORE: '積分數據分析', + ITEM_UPLOADED: '上傳量數據分析', + ITEM_DOWNLOADED: '下載量數據分析', + LAST_30_DAYS_DATA_SCORE: '最近30天的積分數據', + LAST_30_DAYS_DATA_UPLOADED: '最近30天的上傳量數據', + LAST_30_DAYS_DATA_DOWNLOADED: '最近30天的下載量數據', + LAST_12_MONTHS_DATA_SCORE: '最近12個月的積分數據', + LAST_12_MONTHS_DATA_UPLOADED: '最近12個月的上傳量數據', + LAST_12_MONTHS_DATA_DOWNLOADED: '最近12個月的下載量量數據', + GET_USER_LOGS_ERROR: '獲取用戶日誌數據失敗', + SERIES_SCORE: '積分', + SERIES_UPLOADED: '上傳量', + SERIES_DOWNLOADED: '下載量' + }, + //status pages STATUS_PAGE: { BAD_REQUEST: '請求錯誤', diff --git a/modules/core/client/app/trans-string-zh.js b/modules/core/client/app/trans-string-zh.js index be15ef96..7e72e1ee 100644 --- a/modules/core/client/app/trans-string-zh.js +++ b/modules/core/client/app/trans-string-zh.js @@ -88,6 +88,7 @@ MENU_MESSAGE_BOX: '站内消息', MENU_SCORE_LEVEL: '积分等级', MENU_MY_INVITE: '我的邀请', + MENU_MY_DATA_CENTER: '数据中心', MENU_ACCOUNT_STATUS: '帐户状态', EDIT_PROFILE: '修改个人信息', EDIT_PROFILE_PIC: '修改个人头像', @@ -289,7 +290,8 @@ MY_FOLLOWING: '我关注的', USER_FOLLOWERS: '关注他的', USER_FOLLOWING: '他的关注', - ADMIN_TICKETS: '客户服务中心' + ADMIN_TICKETS: '客户服务中心', + DATA_CENTER: '用户数据中心' }, //sign in, sign up, password @@ -1450,6 +1452,23 @@ } }, + // data center + DATA_CENTER: { + ITEM_SCORE: '积分数据分析', + ITEM_UPLOADED: '上传量数据分析', + ITEM_DOWNLOADED: '下载量数据分析', + LAST_30_DAYS_DATA_SCORE: '最近30天的积分数据', + LAST_30_DAYS_DATA_UPLOADED: '最近30天的上传量数据', + LAST_30_DAYS_DATA_DOWNLOADED: '最近30天的下载量数据', + LAST_12_MONTHS_DATA_SCORE: '最近12个月的积分数据', + LAST_12_MONTHS_DATA_UPLOADED: '最近12个月的上传量数据', + LAST_12_MONTHS_DATA_DOWNLOADED: '最近12个月的下载量数据', + GET_USER_LOGS_ERROR: '获取用户日志数据失败', + SERIES_SCORE: '积分', + SERIES_UPLOADED: '上传量', + SERIES_DOWNLOADED: '下载量' + }, + //status pages STATUS_PAGE: { BAD_REQUEST: '请求错误', diff --git a/modules/core/client/controllers/header.client.controller.js b/modules/core/client/controllers/header.client.controller.js index 485422fe..b59f3fa1 100644 --- a/modules/core/client/controllers/header.client.controller.js +++ b/modules/core/client/controllers/header.client.controller.js @@ -29,6 +29,7 @@ vm.scoreMenu = menuService.getMenu('mt-user').items[1]; vm.followMenu = menuService.getMenu('mt-user').items[2]; vm.inviteMenu = menuService.getMenu('mt-invite').items[0]; + vm.dataCenterMenu = menuService.getMenu('mt-data-log'); vm.authentication = Authentication; vm.isCollapsed = false; vm.menu = menuService.getMenu('topbar'); diff --git a/modules/core/client/services/NotifycationService.client.service.js b/modules/core/client/services/NotifycationService.client.service.js index 81bf3db9..3152ea7e 100644 --- a/modules/core/client/services/NotifycationService.client.service.js +++ b/modules/core/client/services/NotifycationService.client.service.js @@ -68,7 +68,7 @@ function showErrorNofity(msg, titleMsgId, params) { var title_msg = titleMsgId ? $translate.instant(titleMsgId) : undefined; - msg = $translate.instant(msg, params); + msg = $translate.instant(msg, params) || 'error'; if (msg && titleMsgId) { Notification.error({ diff --git a/modules/core/client/views/header.client.view.html b/modules/core/client/views/header.client.view.html index cb141a65..f7625c77 100644 --- a/modules/core/client/views/header.client.view.html +++ b/modules/core/client/views/header.client.view.html @@ -93,6 +93,12 @@
+