diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-02-27 16:13:37 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-02-27 16:13:37 +0300 |
commit | 59e8c916390a3eb215c8b4be49a919bb3319b014 (patch) | |
tree | 26e3c3e9276a350747777a81d851ff69e0cad8bb /index.html | |
parent | Python server can now be run as root (diff) | |
download | linux-status-59e8c916390a3eb215c8b4be49a919bb3319b014.tar.gz linux-status-59e8c916390a3eb215c8b4be49a919bb3319b014.zip |
remove obsolete user panels
Diffstat (limited to '')
-rw-r--r-- | index.html | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -107,7 +107,7 @@ function add_user(name) { return; } let text = ` -<div class="row"> +<div class="row" id="user_${name}"> <div class="col"> <h2>${name}</h2> <hr> @@ -147,6 +147,15 @@ function set_user(name, data) { } function set_users(data) { + users.forEach(function(name) { + if (!(name in data)) { + $('#user_' + name).remove(); + let i = users.indexOf(name); + if (i > -1) { + users.splice(i, 1); + } + } + }); Object.keys(data).forEach(function(name) { set_user(name, data[name]); }); |