allow easypiecharts to render arbitrary ranges; fixes #2455
Costa Tsaousis (ktsaou) committed
Jul 24, 2017 at 00:11 UTC
ae9e05096f4e879696443b22ee6f28a0bbccd801
10 files changed
+11
-20
web/dashboard.html
+1
-1
@@ -652,4 +652,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up
652
<!-- <script> netdataServer = "http://box:19999"; </script> -->
653
654
<!-- load the dashboard manager - it will do the rest -->
655
-<script type="text/javascript" src="dashboard.js?v20170715-1"></script>
655
+<script type="text/javascript" src="dashboard.js?v20170724-1"></script>
web/dashboard.js
+2
-11
@@ -5565,17 +5565,8 @@ var NETDATA = window.NETDATA || {};
5565
if(state.tmp.easyPieChartMin === null && min > 0) min = 0;
5566
if(state.tmp.easyPieChartMax === null && max < 0) max = 0;
5567
5568
- var pcent = 0;
5569
- if(value >= 0) {
5570
- if(max !== 0)
5571
- pcent = Math.round(value * 100 / max);
5572
- if(pcent === 0) pcent = 0.1;
5573
- }
5574
- else {
5575
- if(min !== 0)
5576
- pcent = Math.round(-value * 100 / min);
5577
- if(pcent === 0) pcent = -0.1;
5578
- }
5568
+ var pcent = Math.round((value - min) * 100 / (max - min));
5569
+ if(pcent === 0) pcent = 0.1;
5570
5571
return pcent;
5572
};
web/demo.html
+1
-1
@@ -20,7 +20,7 @@
20
<meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
</head>
23
-<script type="text/javascript" src="dashboard.js?v20170715-1"></script>
23
+<script type="text/javascript" src="dashboard.js?v20170724-1"></script>
24
<body>
25
26
<div style="width: 100%; text-align: center;">
web/demo2.html
+1
-1
@@ -21,7 +21,7 @@
21
<meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
</head>
23
<script>var netdataTheme = 'slate';</script>
24
-<script type="text/javascript" src="http://my-netdata.io/dashboard.js?v20170715-1"></script>
24
+<script type="text/javascript" src="http://my-netdata.io/dashboard.js?v20170724-1"></script>
25
<body>
26
27
<div class="container" style="width: 90%; padding-top: 10px; text-align: center; color: #AAA">
web/demosites.html
+1
-1
@@ -516,7 +516,7 @@ p {
516
and that you have chown it to be owned by netdata:netdata
517
-->
518
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
519
-<script type="text/javascript" src="dashboard.js?v20170715-1"></script>
519
+<script type="text/javascript" src="dashboard.js?v20170724-1"></script>
520
521
<script>
522
// --- OPTIONS FOR THE CHARTS --
web/demosites2.html
+1
-1
@@ -52,7 +52,7 @@
52
and that you have chown it to be owned by netdata:netdata
53
-->
54
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
55
- <script type="text/javascript" src="dashboard.js?v20170715-1"></script>
55
+ <script type="text/javascript" src="dashboard.js?v20170724-1"></script>
56
57
<script>
58
// --- OPTIONS FOR THE CHARTS --
web/goto-host-from-alarm.html
+1
-1
@@ -18,7 +18,7 @@
18
var netdataTheme = 'slate';
19
var netdataShowHelp = true;
20
</script>
21
-<script type="text/javascript" src="dashboard.js?v20170105-7"></script>
21
+<script type="text/javascript" src="dashboard.js?v20170724-7"></script>
22
23
<script>
24
var urlOptions = {
web/index.html
+1
-1
@@ -3589,4 +3589,4 @@
3589
</div>
3590
</body>
3591
</html>
3592
-<script type="text/javascript" src="dashboard.js?v20170715-1"></script>
3592
+<script type="text/javascript" src="dashboard.js?v20170724-1"></script>
web/registry.html
+1
-1
@@ -169,7 +169,7 @@ var netdataRegistryCallback = function(machines_array) {
169
and that you have chown it to be owned by netdata:netdata
170
-->
171
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
172
-<script type="text/javascript" src="dashboard.js?v20170105-7"></script>
172
+<script type="text/javascript" src="dashboard.js?v20170724-7"></script>
173
174
<script>
175
// Set options for TV operation
web/tv.html
+1
-1
@@ -50,7 +50,7 @@ var netdataTheme = 'slate'; // this is dark
50
and that you have chown it to be owned by netdata:netdata
51
-->
52
<!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
53
-<script type="text/javascript" src="dashboard.js?v20170105-7"></script>
53
+<script type="text/javascript" src="dashboard.js?v20170724-7"></script>
54
55
<script>
56
// Set options for TV operation