web: make eslint happy

This commit is contained in:
Peter Keresztes Schmidt 2021-03-21 21:40:41 +01:00
parent 5f5648317c
commit 7f9c9c6624
3 changed files with 5 additions and 8 deletions

View File

@ -58,8 +58,8 @@ function processRows(rows) {
var emailed = row.Emailed == yesString ? emailedString : ''; var emailed = row.Emailed == yesString ? emailedString : '';
row.Id = '<a href="?view=event&amp;eid=' + eid + filterQuery + sortQuery + '&amp;page=1">' + eid + '</a>'; row.Id = '<a href="?view=event&amp;eid=' + eid + filterQuery + sortQuery + '&amp;page=1">' + eid + '</a>';
row.Name = '<a href="?view=event&amp;eid=' + eid + filterQuery + sortQuery + '&amp;page=1">' + row.Name + '</a>' row.Name = '<a href="?view=event&amp;eid=' + eid + filterQuery + sortQuery + '&amp;page=1">' + row.Name + '</a>' +
+ '<br/><div class="small text-nowrap text-muted">' + archived + emailed + '</div>'; '<br/><div class="small text-nowrap text-muted">' + archived + emailed + '</div>';
if ( canEdit.Monitors ) row.Monitor = '<a href="?view=event&amp;eid=' + eid + '">' + row.Monitor + '</a>'; if ( canEdit.Monitors ) row.Monitor = '<a href="?view=event&amp;eid=' + eid + '">' + row.Monitor + '</a>';
if ( canEdit.Events ) row.Cause = '<a href="#" title="' + row.Notes + '" class="eDetailLink" data-eid="' + eid + '">' + row.Cause + '</a>'; if ( canEdit.Events ) row.Cause = '<a href="#" title="' + row.Notes + '" class="eDetailLink" data-eid="' + eid + '">' + row.Cause + '</a>';
if ( row.Notes.indexOf('detected:') >= 0 ) { if ( row.Notes.indexOf('detected:') >= 0 ) {

View File

@ -40,10 +40,8 @@ function validateForm(form) {
var have_endtime_term = false; var have_endtime_term = false;
for ( var i = 0; i < rows.length; i++ ) { for ( var i = 0; i < rows.length; i++ ) {
if ( if (
( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndDateTime' ) ( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndDateTime' ) ||
|| ( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndTime' ) ||
( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndTime' )
||
( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndDate' ) ( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndDate' )
) { ) {
have_endtime_term = true; have_endtime_term = true;

View File

@ -48,7 +48,6 @@ function ajaxRequest(params) {
function processRows(rows) { function processRows(rows) {
$j.each(rows, function(ndx, row) { $j.each(rows, function(ndx, row) {
var id = row.Id; var id = row.Id;
row.Id = '<a href="?view=snapshot&amp;id=' + id + '">' + id + '</a>'; row.Id = '<a href="?view=snapshot&amp;id=' + id + '">' + id + '</a>';
row.Name = '<a href="?view=snapshot&amp;id=' + id + '">' + row.Name + '</a>'; row.Name = '<a href="?view=snapshot&amp;id=' + id + '">' + row.Name + '</a>';
@ -192,7 +191,7 @@ function initPage() {
window.location.reload(true); window.location.reload(true);
}); });
/* /*
// Manage the ARCHIVE button // Manage the ARCHIVE button
document.getElementById("archiveBtn").addEventListener("click", function onArchiveClick(evt) { document.getElementById("archiveBtn").addEventListener("click", function onArchiveClick(evt) {
var selections = getIdSelections(); var selections = getIdSelections();