mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 22:43:00 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user