fnordmetric 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/fnordmetric/html_widget.rb +10 -10
- data/lib/fnordmetric/version.rb +1 -1
- data/pub/fnordmetric.js +9 -5
- metadata +1 -1
data/README.md
CHANGED
@@ -188,7 +188,7 @@ Resources
|
|
188
188
|
+ [PHP API for FnordMetric (github.com/leemachin/fnordmetric-php-api)](https://github.com/leemachin/fnordmetric-php-api)
|
189
189
|
+ [Python API for FnordMetric (github.com/sholiday/pyfnordmetric)](https://github.com/sholiday/pyfnordmetric)
|
190
190
|
+ [FnordMetric and C (Blog/Howto)](http://johnmurray.io/log/2012/01/19/FnordMetrics-and-C%23.md)
|
191
|
-
|
191
|
+
+ [FnordMetric HowTo in russian](http://www.pvsm.ru/ruby/2723)
|
192
192
|
+ [The "fnordmetric" google group](http://groups.google.com/group/fnordmetric)
|
193
193
|
|
194
194
|
|
@@ -5,22 +5,22 @@ class FnordMetric::HtmlWidget < FnordMetric::Widget
|
|
5
5
|
)
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
def add_gauges(gauges)
|
9
|
+
@gauges = []
|
10
|
+
@tick = 0
|
11
|
+
|
12
|
+
if !gauges.blank?
|
13
13
|
error! "initializing a html widget with gauges is void"
|
14
14
|
end
|
15
|
-
|
15
|
+
end
|
16
16
|
|
17
17
|
def data_gauges
|
18
|
-
|
18
|
+
{}
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
def default_range(now=Time.now)
|
22
|
+
0..0
|
23
|
+
end
|
24
24
|
|
25
25
|
def has_tick?
|
26
26
|
false
|
data/lib/fnordmetric/version.rb
CHANGED
data/pub/fnordmetric.js
CHANGED
@@ -11,11 +11,15 @@ var FnordMetric = (function(){
|
|
11
11
|
}
|
12
12
|
|
13
13
|
function formatTimeOfDay(_time){
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
if(_time === null) {
|
15
|
+
return "";
|
16
|
+
} else {
|
17
|
+
var time = new Date();
|
18
|
+
time.setTime(_time*1000);
|
19
|
+
return decPrint(time.getHours()) + ':' +
|
20
|
+
decPrint(time.getMinutes()) + ':' +
|
21
|
+
decPrint(time.getSeconds());
|
22
|
+
}
|
19
23
|
}
|
20
24
|
|
21
25
|
function formatTimeRange(range){
|