store last_activity in the database

fetch it periodically (10 minutes) from the proxy
and display it on the admin page
This commit is contained in:
MinRK
2014-09-22 17:25:10 -07:00
parent 34cebb5dba
commit bb9ca0e040
4 changed files with 48 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
require(["jquery", "bootstrap", "jhapi"], function ($, bs, JHAPI) {
require(["jquery", "bootstrap", "moment", "jhapi"], function ($, bs, moment, JHAPI) {
"use strict";
var base_url = window.jhdata.base_url;
@@ -14,6 +14,12 @@ require(["jquery", "bootstrap", "jhapi"], function ($, bs, JHAPI) {
return element;
};
$(".time-col").map(function (i, el) {
// convert ISO datestamps to nice momentjs ones
el = $(el);
el.text(moment(new Date(el.text())).fromNow());
});
$(".stop-server").click(function () {
var el = $(this);
var row = get_row(el);