Skip to content

Commit

Permalink
Show more info
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoDanin committed Dec 8, 2019
1 parent 35106ba commit a482ee4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,19 @@ app.get(['/', '/dashboard'], async (req, res) => {
qtTitle: 'Block',
list: await database.maxTime()
}]

const configFile = await database.get('SHOW config_file;', [])
const blockSize = await database.get('SHOW block_size;', [])
const maxConnections = await database.get('SHOW max_connections;', [])
const timeZone = await database.get('SHOW timezone;', [])

return res.render('dashboard', {
...handlebarsContext,
result: result.map(elemt => {
return {
configFile: configFile[0].config_file,
blockSize: blockSize[0].block_size,
maxConnections: maxConnections[0].max_connections,
timeZone: timeZone[0].TimeZone,
...elemt,
...handlebarsContext
}
Expand Down
6 changes: 5 additions & 1 deletion views/dashboard.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
<div class="uk-card uk-card-default uk-card-body" id="card-query">
<p class="uk-card-title uk-margin-remove">Info</p>
<div class="uk-overflow-hidden">
<ul class="uk-list uk-list-bullet">
<ul class="uk-list">
<li>Database: {{database}}</li>
<li>ConfigFile: {{configFile}}</li>
<li>BlockSize: {{blockSize}}</li>
<li>MaxConnections: {{maxConnections}}</li>
<li>TimeZone: {{timeZone}}</li>
{{#isDevMode}}
<li>DevMode: true</li>
{{/isDevMode}}
Expand Down
2 changes: 1 addition & 1 deletion views/search.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</thead>
<tbody>
{{#each data}}
<tr id="tr-query" onclick="modalQuery(this)">
<tr id="tr-query">
{{#each .}}
<td>{{.}}</td>
{{/each}}
Expand Down

0 comments on commit a482ee4

Please sign in to comment.