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,15 +119,18 @@
<input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding"> <input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding">
</div> </div>
</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>
<div class="max-width centered-content large-vertical-margin"> <div class="max-width centered-content large-vertical-margin">
<table class="table-default"> <table id="historyTable" class="table-default">
<thead>
<tr class="bottom-border"> <tr class="bottom-border">
<th>Timestamp</th> <th>Timestamp</th>
<th>Type</th> <th>Type</th>
</tr> </tr>
</thead>
<tbody>
<tr class="even"> <tr class="even">
<td>2021-01-01T10:57:26</td> <td>2021-01-01T10:57:26</td>
<td>Client request</td> <td>Client request</td>
@@ -136,6 +139,7 @@
<td>2021-01-01T10:57:26</td> <td>2021-01-01T10:57:26</td>
<td>Client request</td> <td>Client request</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@@ -56,7 +56,8 @@ function historyToHtml(){
var innerHTML = ''; var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations; var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;
for(let i=0; i<iterations; i++){ 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].dateTimeStamp + '</td>' +
'<td>' + historyJson[i].interfaceName + '</td>' + '<td>' + historyJson[i].interfaceName + '</td>' +
'</tr>'; '</tr>';

View File

@@ -119,15 +119,18 @@
<input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding"> <input id="historyTimeTo" type="time" class="small-vertical-margin bordered-field max-width with-padding">
</div> </div>
</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>
<div class="max-width centered-content large-vertical-margin"> <div class="max-width centered-content large-vertical-margin">
<table class="table-default"> <table id="historyTable" class="table-default">
<thead>
<tr class="bottom-border"> <tr class="bottom-border">
<th>Timestamp</th> <th>Timestamp</th>
<th>Type</th> <th>Type</th>
</tr> </tr>
</thead>
<tbody>
<tr class="even"> <tr class="even">
<td>2021-01-01T10:57:26</td> <td>2021-01-01T10:57:26</td>
<td>Client request</td> <td>Client request</td>
@@ -136,6 +139,7 @@
<td>2021-01-01T10:57:26</td> <td>2021-01-01T10:57:26</td>
<td>Client request</td> <td>Client request</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@@ -56,7 +56,8 @@ function historyToHtml(){
var innerHTML = ''; var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations; var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;
for(let i=0; i<iterations; i++){ 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].dateTimeStamp + '</td>' +
'<td>' + historyJson[i].interfaceName + '</td>' + '<td>' + historyJson[i].interfaceName + '</td>' +
'</tr>'; '</tr>';