mirror of https://github.com/grafana/grafana
parent
908b6c8d0b
commit
af1f3dd77b
@ -0,0 +1,27 @@ |
||||
import React from "react"; |
||||
import PageHeader from "app/core/components/PageHeader/PageHeader"; |
||||
import { NavModel, NavModelSrv } from "app/core/nav_model_srv"; |
||||
|
||||
export interface IState { |
||||
navModel: NavModel; |
||||
} |
||||
|
||||
export default class ServerStats extends React.Component<any, IState> { |
||||
constructor(props) { |
||||
super(props); |
||||
|
||||
const navModelSrv = new NavModelSrv(); |
||||
|
||||
this.state = { |
||||
navModel: navModelSrv.getNav("cfg", "admin", "server-stats", 1) |
||||
}; |
||||
} |
||||
|
||||
render() { |
||||
return ( |
||||
<PageHeader model={this.state.navModel}> |
||||
<h2>ServerStats</h2> |
||||
</PageHeader> |
||||
); |
||||
} |
||||
} |
@ -1,12 +1,14 @@ |
||||
import { react2AngularDirective } from 'app/core/utils/react2angular'; |
||||
import { PasswordStrength } from './components/PasswordStrength'; |
||||
import PageHeader from './components/PageHeader/PageHeader'; |
||||
import EmptyListCTA from './components/EmptyListCTA/EmptyListCTA'; |
||||
import LoginBackground from './components/Login/LoginBackground'; |
||||
import { react2AngularDirective } from "app/core/utils/react2angular"; |
||||
import { PasswordStrength } from "./components/PasswordStrength"; |
||||
import PageHeader from "./components/PageHeader/PageHeader"; |
||||
import EmptyListCTA from "./components/EmptyListCTA/EmptyListCTA"; |
||||
import LoginBackground from "./components/Login/LoginBackground"; |
||||
import ServerStats from "app/containers/ServerStats"; |
||||
|
||||
export function registerAngularDirectives() { |
||||
react2AngularDirective('passwordStrength', PasswordStrength, ['password']); |
||||
react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']); |
||||
react2AngularDirective('emptyListCta', EmptyListCTA, ['model']); |
||||
react2AngularDirective('loginBackground', LoginBackground, []); |
||||
react2AngularDirective("passwordStrength", PasswordStrength, ["password"]); |
||||
react2AngularDirective("pageHeader", PageHeader, ["model", "noTabs"]); |
||||
react2AngularDirective("emptyListCta", EmptyListCTA, ["model"]); |
||||
react2AngularDirective("loginBackground", LoginBackground, []); |
||||
react2AngularDirective("containerServerStats", ServerStats, []); |
||||
} |
||||
|
@ -1,54 +1,55 @@ |
||||
<page-header model="ctrl.navModel"></page-header> |
||||
|
||||
<div class="page-container page-body"> |
||||
<table class="filter-table form-inline"> |
||||
<thead> |
||||
<tr> |
||||
<th>Name</th> |
||||
<th>Value</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<tr> |
||||
<td>Total dashboards</td> |
||||
<td>{{ctrl.stats.dashboards}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total users</td> |
||||
<td>{{ctrl.stats.users}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Active users (seen last 14 days)</td> |
||||
<td>{{ctrl.stats.activeUsers}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total organizations</td> |
||||
<td>{{ctrl.stats.orgs}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total datasources</td> |
||||
<td>{{ctrl.stats.datasources}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total playlists</td> |
||||
<td>{{ctrl.stats.playlists}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total snapshots</td> |
||||
<td>{{ctrl.stats.snapshots}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total dashboard tags</td> |
||||
<td>{{ctrl.stats.tags}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total starred dashboards</td> |
||||
<td>{{ctrl.stats.stars}}</td> |
||||
</tr> |
||||
<tr> |
||||
<td>Total alerts</td> |
||||
<td>{{ctrl.stats.alerts}}</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
<container-server-stats /> |
||||
<!-- <page-header model="ctrl.navModel"></page-header> --> |
||||
<!-- --> |
||||
<!-- <div class="page-container page-body"> --> |
||||
<!-- <table class="filter-table form-inline"> --> |
||||
<!-- <thead> --> |
||||
<!-- <tr> --> |
||||
<!-- <th>Name</th> --> |
||||
<!-- <th>Value</th> --> |
||||
<!-- </tr> --> |
||||
<!-- </thead> --> |
||||
<!-- <tbody> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total dashboards</td> --> |
||||
<!-- <td>{{ctrl.stats.dashboards}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total users</td> --> |
||||
<!-- <td>{{ctrl.stats.users}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Active users (seen last 14 days)</td> --> |
||||
<!-- <td>{{ctrl.stats.activeUsers}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total organizations</td> --> |
||||
<!-- <td>{{ctrl.stats.orgs}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total datasources</td> --> |
||||
<!-- <td>{{ctrl.stats.datasources}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total playlists</td> --> |
||||
<!-- <td>{{ctrl.stats.playlists}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total snapshots</td> --> |
||||
<!-- <td>{{ctrl.stats.snapshots}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total dashboard tags</td> --> |
||||
<!-- <td>{{ctrl.stats.tags}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total starred dashboards</td> --> |
||||
<!-- <td>{{ctrl.stats.stars}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- <tr> --> |
||||
<!-- <td>Total alerts</td> --> |
||||
<!-- <td>{{ctrl.stats.alerts}}</td> --> |
||||
<!-- </tr> --> |
||||
<!-- </tbody> --> |
||||
<!-- </table> --> |
||||
<!-- </div> --> |
||||
|
@ -0,0 +1,16 @@ |
||||
import { types } from "mobx-state-tree"; |
||||
|
||||
const Search = types.model({ |
||||
name: "", |
||||
done: false |
||||
}); |
||||
|
||||
const RootStore = types.model({ |
||||
search: types.map(Search) |
||||
}); |
||||
|
||||
const store = RootStore.create({ |
||||
search: {} |
||||
}); |
||||
|
||||
export { store }; |
Loading…
Reference in new issue