Skip to content

Commit

Permalink
add small link to the miner-dashboard homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
selaux committed Jun 13, 2014
1 parent f0b354d commit effcc42
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions frontend/routes/index.js
@@ -1,6 +1,7 @@
'use strict';

var _ = require('lodash');
var _ = require('lodash'),
pkg = require('../../package.json');

module.exports = function (webinterface) {
webinterface.get('/', function(req, res) {
Expand All @@ -23,7 +24,11 @@ module.exports = function (webinterface) {
title: app.title,
modules: JSON.stringify(config),
dataMap: JSON.stringify(dataMap),
allViews: _.map(app.views, function (view) { return view.getFullHtml(); }).join('')
allViews: _.map(app.views, function (view) { return view.getFullHtml(); }).join(''),
dashboard: {
homepage: pkg.homepage,
version: pkg.version
}
});
});
};
Expand Down
1 change: 1 addition & 0 deletions frontend/views/index.hbs
Expand Up @@ -2,5 +2,6 @@
<article id="modules">
{{{ allViews }}}
</article>
<article class="text-right"><small>Software: <a href="{{dashboard.homepage}}">miner-dashboard</a> - Version {{dashboard.version}}</small></article>
<script>var config = {{{modules}}};</script>
<script>var dataMap = {{{dataMap}}};</script>
4 changes: 2 additions & 2 deletions lib/views/mixins/renderHistoricalDataGraph.js
Expand Up @@ -15,9 +15,9 @@ function getValueRange(series, stacked) {
});

if (stacked) {
values = _.map(_.zip(values), (function (ser) {
values = _.map(_.zip(values), function (ser) {
return _.reduce(ser, function (a, b) { return a + b; }, 0);
}));
});
} else {
values = _.flatten(values);
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -12,6 +12,7 @@
"monitoring"
],
"private": true,
"homepage": "https://github.com/selaux/miner-dashboard",
"repository": {
"type": "git",
"url": "git://github.com/selaux/miner-dashboard.git"
Expand Down

0 comments on commit effcc42

Please sign in to comment.