Commit 310c9154e8842360fffeadcb2a5619445455c1a0
1 parent
a90cf032ba
Exists in
master
more data on dashboard
Showing 2 changed files with 23 additions and 5 deletions Side-by-side Diff
index.js
... | ... | @@ -144,12 +144,13 @@ function renderConfigAskDelete(req, res) { |
144 | 144 | function renderDashboardIndex(req, res) { |
145 | 145 | var template = "dashboard.index.html"; |
146 | 146 | |
147 | - var data = JSON.stringify(matrix, null, 2); | |
148 | - | |
149 | 147 | res.render(template, { |
150 | 148 | gateway_name: config.globals.gateway_name, |
151 | 149 | title: 'Dashboard', |
152 | - matrix: data, | |
150 | + matrix: JSON.stringify(matrix, null, 2), | |
151 | + config: JSON.stringify(config, null, 2), | |
152 | + versions: JSON.stringify(process.versions, null, 2), | |
153 | + pendings: JSON.stringify(aaa.getPendingList(), null, 2), | |
153 | 154 | }); |
154 | 155 | } |
155 | 156 | |
... | ... | @@ -211,7 +212,7 @@ function createServer() { |
211 | 212 | done(null, user); |
212 | 213 | }); |
213 | 214 | |
214 | - app.get('/', loggedIn, function(req, res) { res.redirect('/config'); }); | |
215 | + app.get('/', loggedIn, function(req, res) { res.redirect('/dashboard'); }); | |
215 | 216 | app.get('/config', loggedIn, renderConfigIndex); |
216 | 217 | app.get('/login', renderLoginPage); |
217 | 218 | app.post('/login', passport.authenticate('local', { successRedirect: '/config', failureRedirect: '/login' })); |
views/dashboard.index.html
1 | 1 | {% extends "layout-with-topbar.html" %} |
2 | 2 | |
3 | 3 | {% block content %} |
4 | +<h2>The Matrix</h2> | |
4 | 5 | <pre> |
5 | -{{ matrix }} | |
6 | + {{ matrix }} | |
7 | +</pre> | |
8 | + | |
9 | +<h2>Pending Transactions</h2> | |
10 | +<pre> | |
11 | + {{ pendings }} | |
12 | +</pre> | |
13 | + | |
14 | + | |
15 | +<h2>Config</h2> | |
16 | +<pre> | |
17 | + {{ config }} | |
18 | +</pre> | |
19 | + | |
20 | +<h2>Versions</h2> | |
21 | +<pre> | |
22 | + {{ versions }} | |
6 | 23 | </pre> |
7 | 24 | {% endblock %} |