Commit eea7e6223c03f1e2fc4c70aa5205eb06373639a5

Authored by Adhidarma Hadiwinoto
1 parent ebbb18a0bb
Exists in master

cleaning up dasbboard

Showing 2 changed files with 11 additions and 10 deletions Side-by-side Diff

... ... @@ -149,7 +149,7 @@ function renderDashboardIndex(req, res) {
149 149 title: 'Dashboard',
150 150 matrix: JSON.stringify(matrix, null, 2),
151 151 config: JSON.stringify(config, null, 2),
152   - versions: JSON.stringify(process.versions, null, 2),
  152 + nodejs_versions: JSON.stringify(process.versions, null, 2),
153 153 pendings: JSON.stringify(aaa.getPendingList(), null, 2),
154 154 });
155 155 }
... ... @@ -215,7 +215,7 @@ function createServer() {
215 215 app.get('/', loggedIn, function(req, res) { res.redirect('/dashboard'); });
216 216 app.get('/config', loggedIn, renderConfigIndex);
217 217 app.get('/login', renderLoginPage);
218   - app.post('/login', passport.authenticate('local', { successRedirect: '/config', failureRedirect: '/login' }));
  218 + app.post('/login', passport.authenticate('local', { successRedirect: '/dashboard', failureRedirect: '/login' }));
219 219 app.get('/logout', function(req, res){
220 220 req.logout();
221 221 res.redirect('/login');
views/dashboard.index.html
1 1 {% extends "layout-with-topbar.html" %}
2 2  
3 3 {% block content %}
4   -<h2>The Matrix</h2>
  4 +<h2 id="matrix">The Matrix</h2>
5 5 <pre>
6   - {{ matrix }}
  6 +{{ matrix }}
7 7 </pre>
8 8  
9   -<h2>Pending Transactions</h2>
  9 +<h2 id="pendings">Pending Transactions</h2>
10 10 <pre>
11   - {{ pendings }}
  11 +{{ pendings }}
12 12 </pre>
13 13  
14 14  
15   -<h2>Config</h2>
  15 +<h2 id="config">Config</h2>
16 16 <pre>
17   - {{ config }}
  17 +{{ config }}
18 18 </pre>
19 19  
20   -<h2>Versions</h2>
  20 +<h2 id="nodejs_versions">Node.js Versions</h2>
21 21 <pre>
22   - {{ versions }}
  22 +{{ nodejs_versions }}
23 23 </pre>
  24 +
24 25 {% endblock %}