summaryrefslogtreecommitdiffstats
path: root/modules-available/backup
diff options
context:
space:
mode:
authorSimon Rettberg2020-02-26 15:19:34 +0100
committerSimon Rettberg2020-02-26 15:19:34 +0100
commit92527b0b2d8a76ee8ae368541c60d0a07c889dbc (patch)
treefa84f70230e2d444d426fdd0b798f693d035fc8a /modules-available/backup
parent[dnbd3] Run mount script when toggling dnbd3 usage (diff)
downloadslx-admin-92527b0b2d8a76ee8ae368541c60d0a07c889dbc.tar.gz
slx-admin-92527b0b2d8a76ee8ae368541c60d0a07c889dbc.tar.xz
slx-admin-92527b0b2d8a76ee8ae368541c60d0a07c889dbc.zip
[backup/systemstatus] Show up/downloads in backup page
Add AJAX API to dozmod module to query the fileserver status of dmsd.
Diffstat (limited to 'modules-available/backup')
-rw-r--r--modules-available/backup/lang/de/template-tags.json3
-rw-r--r--modules-available/backup/lang/en/template-tags.json3
-rw-r--r--modules-available/backup/templates/_page.html21
3 files changed, 26 insertions, 1 deletions
diff --git a/modules-available/backup/lang/de/template-tags.json b/modules-available/backup/lang/de/template-tags.json
index 907e6b07..7f5e05ab 100644
--- a/modules-available/backup/lang/de/template-tags.json
+++ b/modules-available/backup/lang/de/template-tags.json
@@ -1,4 +1,5 @@
{
+ "lang_automaticRebootHint": "Nach dem Import der Konfiguration wird der Server automatisch neugestartet. Bitte stellen Sie daher sicher, dass zur Zeit keine wichtigen Veranstaltungen laufen, oder Up-\/Downloads der bwLehrpool-Suite.",
"lang_backup": "Sichern",
"lang_backupDescription": "Hier k\u00f6nnen Sie die Konfiguration des Satellitenservers sichern. Dies beinhaltet die Datenbank \u00fcber alle Virtuellen Maschinen, Veranstaltungen, Authentifizerungsmodule, Passw\u00f6rter, Proxies, den konfigurierten VM-Store sowie weitere Konfiguration des MiniLinux.\r\nDie Festplattenabbilder der Virtuellen Maschinen auf dem VM-Store werden hierbei nicht gesichert. Eventuelle Backups des Stores m\u00fcssen separat durchgef\u00fchrt werden.",
"lang_backupRestore": "Sichern und Wiederherstellen",
@@ -13,6 +14,8 @@
"lang_restoreDozmodConfig": "bwLehrpool-Suite-Konfiguration wiederherstellen",
"lang_restoreFailed": "Wiederherstellung der Konfiguration fehlgeschlagen.",
"lang_restoreSystemConfig": "Systemkonfiguration wiederherstellen",
+ "lang_runningDownloads": "Laufende VM-Downloads",
+ "lang_runningUploads": "Laufenden VM-Uploads",
"lang_selectFile": "Bitte w\u00e4hlen Sie ein Backup-Archiv",
"lang_stopping": "Stoppe",
"lang_systemExplanation": "Die Grundkonfiguration des Satelliten wiederherstellen: Authentifizierungmethode, Passw\u00f6rter, Proxies, VM-Storage, etc.\r\nACHTUNG: Wenn Sie ein Backup von vor WS15\/16 einspielen (Backup-Format vor Version 10), wird die Systemkonfiguration in jedem Fall wiederhergestellt, auch wenn Sie diesen Haken nicht setzen.",
diff --git a/modules-available/backup/lang/en/template-tags.json b/modules-available/backup/lang/en/template-tags.json
index b70ce793..d14c9070 100644
--- a/modules-available/backup/lang/en/template-tags.json
+++ b/modules-available/backup/lang/en/template-tags.json
@@ -1,4 +1,5 @@
{
+ "lang_automaticRebootHint": "The server will be rebooted once the import is finished. Please make sure there are no important courses or bwLehrpool-Suite up-\/downloads running.",
"lang_backup": "Backup",
"lang_backupDescription": "Here you can backup the complete configuration of this satellite server. This includes lecture and virtual machine meta data. The HDD images of the virtual machines on the vm store are not included in this backup, because of their size. If desired, the store needs to be backed up manually.",
"lang_backupRestore": "Backup and Restore",
@@ -13,6 +14,8 @@
"lang_restoreDozmodConfig": "Restore bwLehrpool-Suite config",
"lang_restoreFailed": "Restoring configuration failed.",
"lang_restoreSystemConfig": "Restore system config",
+ "lang_runningDownloads": "Running VM downloads",
+ "lang_runningUploads": "Running VM uploads",
"lang_selectFile": "Please select a backup archive",
"lang_stopping": "Stopping",
"lang_systemExplanation": "Restore basic configuration like authentication method, passwords, vm storage location, proxy config, etc. WARNING: If you restore a configuration backup that was made before WS15\/16 (backup format version <10), the system configuration will be restored regardless of this check mark.",
diff --git a/modules-available/backup/templates/_page.html b/modules-available/backup/templates/_page.html
index fa88b966..3e57c033 100644
--- a/modules-available/backup/templates/_page.html
+++ b/modules-available/backup/templates/_page.html
@@ -48,7 +48,26 @@
</div>
<p><i>{{lang_dozmodExplanation}}</i></p>
</div>
+ <p>{{lang_automaticRebootHint}}</p>
+ <div id="dmsd-users">
+ {{lang_runningUploads}}: <span class="uploads">??</span>,
+ {{lang_runningDownloads}}: <span class="downloads">??</span>
+ </div>
<button {{perms.restore.disabled}} class="btn btn-primary pull-right" type="submit"><span class="glyphicon glyphicon-open"></span> {{lang_restore}}</button>
</div>
</div>
-</form> \ No newline at end of file
+</form>
+
+<script>
+ document.addEventListener('DOMContentLoaded', function () {
+ var $dmsd = $('#dmsd-users');
+ $.ajax({
+ url: '?do=dozmod&section=special&action=dmsd-status',
+ timeout: 3000,
+ dataType: 'json'
+ }).done(function (data) {
+ if (data.downloads !== null) $dmsd.find('.downloads').text(data.downloads);
+ if (data.uploads !== null) $dmsd.find('.uploads').text(data.uploads);
+ });
+ });
+</script> \ No newline at end of file