mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
Fix sys admin in no Pro version (#7336)
* fix repo history is less than 0 * fix setting button icon is green * fix admin statistic time lang * fix statistics traffic list when change page
This commit is contained in:
@@ -50,11 +50,9 @@ class SysAdminLibHistorySettingDialog extends React.Component {
|
||||
days = this.state.expireDays;
|
||||
}
|
||||
let repoID = this.props.repoID;
|
||||
let reg = /^-?\d+$/;
|
||||
let flag = reg.test(days);
|
||||
if (flag) {
|
||||
if (Number(days) > 0) {
|
||||
let message = gettext('Successfully set library history.');
|
||||
systemAdminAPI.sysAdminUpdateRepoHistorySetting(repoID, days).then(res => {
|
||||
systemAdminAPI.sysAdminUpdateRepoHistorySetting(repoID, parseInt(days)).then(res => {
|
||||
toaster.success(message);
|
||||
this.setState({ keepDays: res.data.keep_days });
|
||||
this.props.toggleDialog();
|
||||
|
Reference in New Issue
Block a user