History search operational

This commit is contained in:
2021-04-15 12:34:44 +02:00
parent cced38ceac
commit e40fc4efb7
4 changed files with 40 additions and 30 deletions

View File

@@ -119,23 +119,27 @@
<input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding">
</div>
</div>
<button class="quater-width action-button active small-margins">Search</button>
<button id="btn-searchHistory" class="quater-width action-button active small-margins">Search</button>
</div>
<div class="max-width centered-content large-vertical-margin">
<table class="table-default">
<tr class="bottom-border">
<th>Timestamp</th>
<th>Type</th>
</tr>
<tr class="even">
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<tr>
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<table id="historyTable" class="table-default">
<thead>
<tr class="bottom-border">
<th>Timestamp</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr class="even">
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<tr>
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -56,7 +56,8 @@ function historyToHtml(){
var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;
for(let i=0; i<iterations; i++){
innerHTML += '<tr>' +
let style = i%2==0 ? ' class="even"' : '';
innerHTML += '<tr' + style + '>' +
'<td>' + historyJson[i].dateTimeStamp + '</td>' +
'<td>' + historyJson[i].interfaceName + '</td>' +
'</tr>';

View File

@@ -119,23 +119,27 @@
<input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding">
</div>
</div>
<button class="quater-width action-button active small-margins">Search</button>
<button id="btn-searchHistory" class="quater-width action-button active small-margins">Search</button>
</div>
<div class="max-width centered-content large-vertical-margin">
<table class="table-default">
<tr class="bottom-border">
<th>Timestamp</th>
<th>Type</th>
</tr>
<tr class="even">
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<tr>
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<table id="historyTable" class="table-default">
<thead>
<tr class="bottom-border">
<th>Timestamp</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr class="even">
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
<tr>
<td>2021-01-01T10:57:26</td>
<td>Client request</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -56,7 +56,8 @@ function historyToHtml(){
var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;
for(let i=0; i<iterations; i++){
innerHTML += '<tr>' +
let style = i%2==0 ? ' class="even"' : '';
innerHTML += '<tr' + style + '>' +
'<td>' + historyJson[i].dateTimeStamp + '</td>' +
'<td>' + historyJson[i].interfaceName + '</td>' +
'</tr>';