From c353e7cb5199adb3709c174f35abab8c06b086b6 Mon Sep 17 00:00:00 2001 From: Dean Sellis Date: Tue, 19 Sep 2017 10:31:00 +0100 Subject: [PATCH] Update dashboard charts for more visibility The connections data gets obscured in the requests chart soon after Kong starts because the requests is cummulative and the connections are a current status count. This change simply splits the data into two charts so you can see the connection status. --- .../app/dashboard/02_dashboard-controller.js | 51 +++++++++++++++---- assets/js/app/dashboard/dashboard.html | 29 +++++++++-- 2 files changed, 65 insertions(+), 15 deletions(-) diff --git a/assets/js/app/dashboard/02_dashboard-controller.js b/assets/js/app/dashboard/02_dashboard-controller.js index 309211807..678f0b720 100644 --- a/assets/js/app/dashboard/02_dashboard-controller.js +++ b/assets/js/app/dashboard/02_dashboard-controller.js @@ -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: { @@ -64,19 +90,23 @@ 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 : [ @@ -84,10 +114,11 @@ 'Running' ], options : { - //title: { - // display: true, - // text: 'timers' - //}, + yAxes: [{ + ticks: { + min: 0 + } + }] }, series : ['Timers'], data : [ diff --git a/assets/js/app/dashboard/dashboard.html b/assets/js/app/dashboard/dashboard.html index b9a9142c4..775e41a4c 100644 --- a/assets/js/app/dashboard/dashboard.html +++ b/assets/js/app/dashboard/dashboard.html @@ -32,18 +32,17 @@

- -
+ +
  - CONNECTIONS + REQUESTS
+ + +
+
+
+
+   + CONNECTIONS +
+
+
+ + +
+
+
-