[enh] There should be a route to view a single log
This commit is contained in:
parent
ca8dd606b7
commit
724539d88e
5 changed files with 159 additions and 132 deletions
|
|
@ -32,14 +32,21 @@ title = function(string){
|
|||
function updatePage(data){
|
||||
|
||||
var content = "";
|
||||
var item = {};
|
||||
var id = '';
|
||||
// If the log entry is unique, simulate a search result
|
||||
if( ! data['hits'] ){
|
||||
data = {hits:{hits:[data]}};
|
||||
}
|
||||
$.each(data.hits.hits, (k,v)=>{
|
||||
var item = v._source;
|
||||
|
||||
item = v._source;
|
||||
id = v._id;
|
||||
content += `
|
||||
|
||||
<div class="log row-fluid">
|
||||
<div class="span9">
|
||||
<p>${escape(item.created_at)} -- ${escape(item.author)} -- ${escape(item.server)}
|
||||
<p><a href="/log/${id}">${escape(item.created_at)} -- ${escape(item.author)} -- ${escape(item.server)}</a></p>
|
||||
<pre> ${title(url(escape(item.content)))}</pre>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue