Admin: add reports
Drop domain_count because it's less important
This commit is contained in:
parent
d3daf63dd5
commit
248a33e79a
2 changed files with 12 additions and 6 deletions
|
@ -14,6 +14,10 @@ class AdminNav extends React.PureComponent {
|
|||
<Icon id='tachometer' className='promo-panel-item__icon' fixedWidth />
|
||||
<FormattedMessage id='admin_nav.dashboard' defaultMessage='Dashboard' />
|
||||
</NavLink>
|
||||
<a className='promo-panel-item' href='/pleroma/admin/#/reports/index' target='_blank'>
|
||||
<Icon id='gavel' className='promo-panel-item__icon' fixedWidth />
|
||||
<FormattedMessage id='admin_nav.reports' defaultMessage='Reports' />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -13,6 +13,7 @@ const messages = defineMessages({
|
|||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
instance: state.get('instance'),
|
||||
openReportCount: state.getIn(['admin', 'open_report_count']),
|
||||
});
|
||||
|
||||
export default @connect(mapStateToProps)
|
||||
|
@ -22,6 +23,7 @@ class Dashboard extends ImmutablePureComponent {
|
|||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
instance: ImmutablePropTypes.map.isRequired,
|
||||
openReportCount: PropTypes.number,
|
||||
};
|
||||
|
||||
render() {
|
||||
|
@ -32,7 +34,7 @@ class Dashboard extends ImmutablePureComponent {
|
|||
<Column icon='tachometer' heading={intl.formatMessage(messages.heading)} backBtnSlim>
|
||||
<div className='dashcounters'>
|
||||
<div className='dashcounter'>
|
||||
<a href='/pleroma/admin/#/users/index'>
|
||||
<a href='/pleroma/admin/#/users/index' target='_blank'>
|
||||
<div className='dashcounter__num'>
|
||||
<FormattedNumber value={instance.getIn(['stats', 'user_count'])} />
|
||||
</div>
|
||||
|
@ -42,7 +44,7 @@ class Dashboard extends ImmutablePureComponent {
|
|||
</a>
|
||||
</div>
|
||||
<div className='dashcounter'>
|
||||
<a href='/pleroma/admin/#/statuses/index'>
|
||||
<a href='/pleroma/admin/#/statuses/index' target='_blank'>
|
||||
<div className='dashcounter__num'>
|
||||
<FormattedNumber value={instance.getIn(['stats', 'status_count'])} />
|
||||
</div>
|
||||
|
@ -52,14 +54,14 @@ class Dashboard extends ImmutablePureComponent {
|
|||
</a>
|
||||
</div>
|
||||
<div className='dashcounter'>
|
||||
<div>
|
||||
<a href='/pleroma/admin/#/reports/index' target='_blank'>
|
||||
<div className='dashcounter__num'>
|
||||
<FormattedNumber value={instance.getIn(['stats', 'domain_count'])} />
|
||||
<FormattedNumber value={this.props.openReportCount} />
|
||||
</div>
|
||||
<div className='dashcounter__label'>
|
||||
<FormattedMessage id='admin.dashcounters.domain_count_label' defaultMessage='known instances' />
|
||||
<FormattedMessage id='admin.dashcounters.open_report_count_label' defaultMessage='open reports' />
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className='dashwidgets'>
|
||||
|
|
Loading…
Reference in a new issue