solarium 0.2.1 → 0.2.2
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.
- checksums.yaml +4 -4
- data/bin/solarium-chart +0 -1
- data/lib/solarium/dygraph/index.html +54 -0
- data/lib/solarium/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33185c8fe55cb8856617c3fb01dd8df50e421b1c
|
|
4
|
+
data.tar.gz: 2abe0c81a737243bfd143550048b84a461cfeddc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cec1951d0c52309322093796aee41c03024fea2e18e15aa428d4f5c9fdd78e34660125b56017dee02c4ba08c08b1fe7aca4a6244fcd9c1dc021e7e66c80b80c
|
|
7
|
+
data.tar.gz: 6200b7e7708a48683cb1e20e1ac6f4c1b633e8ca24e987860ba3919d6aa1bf2503c9c395b5588222f9f99031961f067061163bb376ff950001ca61133953dc65
|
data/bin/solarium-chart
CHANGED
|
@@ -43,7 +43,6 @@ database = Solarium::Database.new options[:database_url]
|
|
|
43
43
|
unless database.error.nil?
|
|
44
44
|
STDERR.puts "A fatal error was encountered whilst connecting to the database:"
|
|
45
45
|
STDERR.puts "#{database.error.class}: #{database.error.message}"
|
|
46
|
-
STDERR.puts database.error.backtrace
|
|
47
46
|
exit 1
|
|
48
47
|
end
|
|
49
48
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Solarium Power Generation Report</title>
|
|
6
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.0.0/dygraph.min.css"/>
|
|
7
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
|
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.0.0/dygraph.min.js"></script>
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
padding: 20px;
|
|
12
|
+
}
|
|
13
|
+
hr {
|
|
14
|
+
margin-bottom: 50px;
|
|
15
|
+
}
|
|
16
|
+
.solarium-chart {
|
|
17
|
+
font-family: sans-serif;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
height: 500px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
<script type="text/javascript">
|
|
24
|
+
window.onload = function() {
|
|
25
|
+
const datasets = {
|
|
26
|
+
'Generation': 'generation',
|
|
27
|
+
'Today': 'today',
|
|
28
|
+
'Past Week': 'week',
|
|
29
|
+
'Lifetime': 'lifetime',
|
|
30
|
+
}
|
|
31
|
+
Object.keys(datasets).forEach(function(title) {
|
|
32
|
+
const element = document.getElementById(`solarium-${datasets[title]}`);
|
|
33
|
+
new Dygraph(element, `${datasets[title]}.csv`, {
|
|
34
|
+
fillGraph: true,
|
|
35
|
+
labelsSeparateLines: true,
|
|
36
|
+
legend: 'always',
|
|
37
|
+
title: title,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
</head>
|
|
43
|
+
<body>
|
|
44
|
+
<div id="solarium-container">
|
|
45
|
+
<div class="solarium-chart" id="solarium-generation"></div>
|
|
46
|
+
<hr/>
|
|
47
|
+
<div class="solarium-chart" id="solarium-today"></div>
|
|
48
|
+
<hr/>
|
|
49
|
+
<div class="solarium-chart" id="solarium-week"></div>
|
|
50
|
+
<hr/>
|
|
51
|
+
<div class="solarium-chart" id="solarium-lifetime"></div>
|
|
52
|
+
</div>
|
|
53
|
+
</body>
|
|
54
|
+
</html>
|
data/lib/solarium/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solarium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter "SaberUK" Powell
|
|
@@ -119,6 +119,7 @@ files:
|
|
|
119
119
|
- lib/solarium/collector.rb
|
|
120
120
|
- lib/solarium/database.rb
|
|
121
121
|
- lib/solarium/dygraph/dygraph.rb
|
|
122
|
+
- lib/solarium/dygraph/index.html
|
|
122
123
|
- lib/solarium/version.rb
|
|
123
124
|
homepage: https://github.com/SaberUK/solarium
|
|
124
125
|
licenses:
|