mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
Org admin page (#5298)
* orgadmin import users * orgadmin devices page * orgadmin statistic page * orgadmin devices page use seafile_api.list_org_repo_sync_errors * [org admin] bugfix & improvements Co-authored-by: lian <lian@seafile.com> Co-authored-by: llj <lingjun.li1@gmail.com>
This commit is contained in:
43
frontend/src/pages/org-admin/statistic/statistic-nav.js
Normal file
43
frontend/src/pages/org-admin/statistic/statistic-nav.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from '@reach/router';
|
||||
import { siteRoot, gettext } from '../../../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
currentItem: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
class Nav extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.navItems = [
|
||||
{name: 'fileStatistic', urlPart: 'statistics-admin/file', text: gettext('File')},
|
||||
{name: 'storageStatistic', urlPart: 'statistics-admin/total-storage', text: gettext('Storage')},
|
||||
{name: 'usersStatistic', urlPart: 'statistics-admin/active-users', text: gettext('Users')},
|
||||
{name: 'trafficStatistic', urlPart: 'statistics-admin/traffic', text: gettext('Traffic')},
|
||||
{name: 'reportsStatistic', urlPart: 'statistics-admin/reports', text: gettext('Reports')},
|
||||
];
|
||||
}
|
||||
|
||||
render() {
|
||||
const { currentItem } = this.props;
|
||||
return (
|
||||
<div className="cur-view-path tab-nav-container">
|
||||
<ul className="nav">
|
||||
{this.navItems.map((item, index) => {
|
||||
return (
|
||||
<li className="nav-item" key={index}>
|
||||
<Link to={`${siteRoot}org/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Nav.propTypes = propTypes;
|
||||
|
||||
export default Nav;
|
Reference in New Issue
Block a user