[enh] display a single journal

This commit is contained in:
Laurent Peuch 2016-06-28 05:38:17 +02:00
parent eee142fbec
commit 12670632cf
2 changed files with 56 additions and 0 deletions

View file

@ -108,6 +108,15 @@
}); });
}); });
// One journal
app.get('#/tools/journals/:file_name', function (c) {
c.api("/journals/" + c.params["file_name"], function(journal) {
c.view('tools/tools_journal', {
"journal": journal,
});
});
});
// Download SSL Certificate Authority // Download SSL Certificate Authority
app.get('#/tools/ca', function (c) { app.get('#/tools/ca', function (c) {
c.view('tools/tools_ca'); c.view('tools/tools_ca');

View file

@ -0,0 +1,47 @@
{{#journal}}
<div class="btn-breadcrumb">
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/tools">{{t 'tools'}}</a>
<a href="#/tools/journals">{{t 'journals'}}</a>
<a href="#/tools/journals/" + {{ file_name }}>{{ name }} - {{ started_at }}</a>
</div>
<div class="separator"></div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-info-circle"></span> {{t 'infos'}}</h2>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt>{{t 'name'}}</dt><dd>{{ name }}</dd>
<dt>{{t 'started_at'}}</dt> <dd>{{ started_at }}</dd>
<dt>{{t 'path'}}</dt> <dd>{{ path }}</dd>
{{#each metadata}}
<dt>{{@key}}</dt>
<dd>{{.}}</dd>
{{/each}}
</dl>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-file-text"></span> {{t 'logs'}}</h2>
</div>
<div class="panel-body">
<table>
<tr>
<td> <!-- no indent because pre is sensible to whitespaces -->
<pre>{{#logs}}{{datetime}}
{{/logs}}</pre>
</td>
<td> <!-- no indent because pre is sensible to whitespaces -->
<pre>{{#logs}}{{{line}}}
{{/logs}}</pre>
</td>
</tr>
</table>
</div>
</div>
{{/journal}}