Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Update dashboard charts for more visibility #98

Merged
merged 1 commit into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 41 additions & 10 deletions assets/js/app/dashboard/02_dashboard-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,38 @@
server : {
labels : [
'Accepted',
'Active',
'Handled',
'Total Requests'
],
options: {
scales: {
xAxes: [{
ticks: {
autoSkip: false,
maxRotation: 0,
minRotation: 0
}
}],
yAxes: [{
ticks: {
min: 0
}
}]
}
},
series : ['Connections'],
data : [
$scope.status.server.connections_accepted,
$scope.status.server.connections_handled,
$scope.status.server.total_requests
]
},
activity : {
labels : [
'Active',
'Reading',
'Waiting',
'Writing',
'Total Requests'
],
options: {
scales: {
Expand All @@ -64,30 +90,35 @@
maxRotation: 0,
minRotation: 0
}
}],
yAxes: [{
ticks: {
min: 0
}
}]
}
},
series : ['Connections'],
data : [
$scope.status.server.connections_accepted,
$scope.status.server.connections_active,
$scope.status.server.connections_handled,
$scope.status.server.connections_reading,
$scope.status.server.connections_waiting,
$scope.status.server.connections_writing,
$scope.status.server.total_requests,
$scope.status.server.connections_writing
]


},
timers : {
labels : [
'Pending',
'Running'
],
options : {
//title: {
// display: true,
// text: 'timers'
//},
yAxes: [{
ticks: {
min: 0
}
}]
},
series : ['Timers'],
data : [
Expand Down
29 changes: 24 additions & 5 deletions assets/js/app/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ <h2>

<div data-ng-if="!loading && !error && info">
<div class="row" vertilize-container>
<!-- CONNECTIONS -->
<div class="col-md-8">
<!-- REQUESTS -->
<div class="col-md-4">
<div class="panel panel-default" vertilize>
<div class="panel-heading">
<div class="panel-title">
<i class="mdi mdi-cast-connected"></i>&nbsp;
CONNECTIONS
REQUESTS
</div>
</div>
<div class="panel-body">
<canvas id="server"
height="75"
class="chart chart-bar"
chart-data="data.server.data"
chart-labels="data.server.labels"
Expand All @@ -53,8 +52,28 @@ <h2>
</div>
</div>
</div>
<!-- END REQUESTS -->
<!-- CONNECTIONS -->
<div class="col-md-4">
<div class="panel panel-default" vertilize>
<div class="panel-heading">
<div class="panel-title">
<i class="mdi mdi-cast-connected"></i>&nbsp;
CONNECTIONS
</div>
</div>
<div class="panel-body">
<canvas id="activity"
class="chart chart-bar"
chart-data="data.activity.data"
chart-labels="data.activity.labels"
chart-options="data.activity.options"
chart-series="data.activity.series">
</canvas>
</div>
</div>
</div>
<!-- END CONNECTIONS -->

<!-- TIMERS -->
<div class="col-md-4">
<div class="panel panel-default" vertilize>
Expand Down