Skip to content

Commit

Permalink
Display current time in settings (issue arkime#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
awick committed Mar 24, 2015
1 parent 1f731c7 commit 31c53ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions viewer/views/settings.jade
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ block content
select#timezone.setting(name="timezone")
option(value="local") local time
option(value="gmt") gmt time
label#currentTime
br
h3 Sessions Tab
label(for='detailFormat') Session Detail Format:
Expand Down Expand Up @@ -174,6 +175,11 @@ block content
var settings = !{JSON.stringify(suser.settings)};


function updateTime() {
$("#currentTime").text(dateString(new Date()/1000, " "));
}
setInterval(updateTime, 1000);

$(document).ready(function() {
// Selects
var defaults = {
Expand Down Expand Up @@ -227,6 +233,7 @@ block content
}
]
});
updateTime();
});


Expand Down Expand Up @@ -266,6 +273,11 @@ block content
});
});

$(document).on('change', '#timezone', function (e) {
molochSettings.timezone = $("#timezone option:selected").val();
updateTime();
});

$('#createViewForm').submit(function() {
$.ajax( {
"dataType": 'json',
Expand Down

0 comments on commit 31c53ee

Please sign in to comment.