summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-20 11:01:44 +0200
committerSimon Rettberg2020-10-20 11:01:44 +0200
commit6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c (patch)
treeb8f09b9c7612a9bce32b6dca2c9e07c4f575e4cd
parent[systemstatus] Add main-warning hook for low disk space (diff)
downloadslx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.tar.gz
slx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.tar.xz
slx-admin-6e3ddb4d23d8740fa6b6ce8920717a3cd2bb090c.zip
[baseconfig_bwlp/locationinfo] Add SLX_TTY_SWITCH
This will be used (to be implemented client side) to diallow tty switching from within the X session, as the exam mode currently already does. References #3793
-rw-r--r--modules-available/baseconfig_bwlp/baseconfig/settings.json6
-rw-r--r--modules-available/baseconfig_bwlp/lang/de/config-variables.json2
-rw-r--r--modules-available/baseconfig_bwlp/lang/en/config-variables.json2
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php1
-rw-r--r--modules-available/locationinfo/inc/locationinfohooks.inc.php3
-rw-r--r--modules-available/locationinfo/lang/de/messages.json4
-rw-r--r--modules-available/locationinfo/lang/de/template-tags.json4
-rw-r--r--modules-available/locationinfo/lang/en/messages.json4
-rw-r--r--modules-available/locationinfo/lang/en/template-tags.json4
-rw-r--r--modules-available/locationinfo/page.inc.php2
-rw-r--r--modules-available/locationinfo/templates/page-config-panel-url.html27
11 files changed, 49 insertions, 10 deletions
diff --git a/modules-available/baseconfig_bwlp/baseconfig/settings.json b/modules-available/baseconfig_bwlp/baseconfig/settings.json
index bbdd0a4e..fa8dd437 100644
--- a/modules-available/baseconfig_bwlp/baseconfig/settings.json
+++ b/modules-available/baseconfig_bwlp/baseconfig/settings.json
@@ -103,6 +103,12 @@
"permissions": "2",
"validator": "function:linuxPassword"
},
+ "SLX_TTY_SWITCH": {
+ "catid": "sysconfig",
+ "defaultvalue": "yes",
+ "permissions": "2",
+ "validator": "list:no|yes"
+ },
"SLX_SHUTDOWN_SCHEDULE": {
"catid": "power",
"defaultvalue": "22:10 00:00",
diff --git a/modules-available/baseconfig_bwlp/lang/de/config-variables.json b/modules-available/baseconfig_bwlp/lang/de/config-variables.json
index 69c56098..9ba946fc 100644
--- a/modules-available/baseconfig_bwlp/lang/de/config-variables.json
+++ b/modules-available/baseconfig_bwlp/lang/de/config-variables.json
@@ -22,6 +22,7 @@
"SLX_PVS_DEFAULT": "Legt fest, ob der Haken zur PVS-Teilnahme im vmChooser standardm\u00e4\u00dfig gesetzt ist oder nicht.",
"SLX_REBOOT_SCHEDULE": "Feste Uhrzeit, zu der sich die Rechner neustarten, auch wenn noch ein Benutzer aktiv ist.\r\nMehrere Zeitpunkte k\u00f6nnen durch Leerzeichen getrennt angegeben werden.",
"SLX_REMOTE_LOG_SESSIONS": "Legt fest, ob Logins und Logouts der Benutzer an den Satelliten gemeldet werden sollen.\r\n*yes* = Mit Benutzerkennung loggen\r\n*anonymous* = Anonym loggen\r\n*no* = Nicht loggen",
+ "SLX_RESOLUTION_MAPPING": "Hier k\u00f6nnen Sie statische Zuweisung von Bildschirmanschl\u00fcssen zu Aufl\u00f6sungen aus *SLX_FORCE_RESOLUTION* vornehmen. Das Format ist eine durch Leerzeichen getrennte Liste von OUTPUTNAME=Index, z.B.\r\n\r\nHDMI1=0 HDMI2=0 HDMI3=1\r\n\r\nSofern die Variable *SLX_FORCE_RESOLUTION* den Wert *1024x768 800x600* hat, werden jetzt die Ausg\u00e4nge HDMI1 und HDMI2 die Aufl\u00f6sung 1024x768 haben und den gleichen Inhalt zeigen (\"linker Bildschirm\"), und HDMI3 wird die Aufl\u00f6sung 800x600 haben, und den Desktop nach rechts erweitern.\r\n\r\nDie Verwendung dieser Konfigurationsoption sollte nur f\u00fcr ungew\u00f6hnliche Bildschirm-Setups notwendig sein.",
"SLX_ROOT_PASS": "Das root-Passwort des Grundsystems. Wird nur f\u00fcr Diagnosezwecke am Client ben\u00f6tigt.\r\nFeld leer lassen, um root-Logins zu verbieten.\r\n\/Hinweis\/: Das Passwort wird im Klartext in der lokalen Datenbank hinterlegt, jedoch immer gehasht an die Clients \u00fcbermittelt (SHA-512 mit Salt). Wenn Sie das Passwort auch im Satelliten nicht im Klartext speichern wollen, k\u00f6nnen Sie hier auch ein vorgehashtes Passwort eintragen (im *$6$....*-Format).",
"SLX_SCREEN_SAVER_GRACE_TIME": "Wenn sich der Bildschirmschoner nach dem konfigurierten Timeout automatisch aktiviert, kann er f\u00fcr die hier angegebene Zeit (in Sekunden) durch Tastendruck oder Mausbewegen wieder deaktiviert werden, ohne dass das Benutzerkennwort angefordert wird.",
"SLX_SCREEN_SAVER_TIMEOUT": "Zeit in Sekunden, nach der sich bei Nutzerinaktivit\u00e4t der Bildschirmschoner aktiviert. Der Bildschirmschoner sperrt zugleich die Sitzung und fordert zum Entsperren das Nutzerkennwort an.",
@@ -29,6 +30,7 @@
"SLX_SHUTDOWN_SCHEDULE": "Feste Uhrzeit, zu der sich die Rechner ausschalten, auch wenn noch ein Benutzer aktiv ist.\r\nMehrere Zeitpunkte k\u00f6nnen durch Leerzeichen getrennt angegeben werden.",
"SLX_SHUTDOWN_TIMEOUT": "Zeit in Sekunden, nach der ein Rechner abgeschaltet wird, sofern kein Benutzer angemeldet ist.\r\nFeld leer lassen, um die Funktion zu deaktivieren.",
"SLX_SYSTEM_STANDBY_TIMEOUT": "Zeit in Sekunden, nach der ein Rechner in den Standby-Modus versetzt wird, sofern kein Benutzer angemeldet ist.\r\nFeld leer lassen, um die Funktion zu deaktivieren.\r\n\r\nBitte beachten Sie, dass der Standby-Modus auf bestimmter Hardware nicht oder nur unzuverl\u00e4ssig funktioniert. Es empfiehlt sich, diese Funktion nur in R\u00e4umen zu aktivieren bei denen vorher \u00fcberpr\u00fcft wurde, dass der Standby-Modus ordnungsgem\u00e4\u00df funktioniert.\r\nDer Standby-Modus kann manuell ausgel\u00f6st werden, indem auf dem Client als root-Benutzer der Befehl *systemctl suspend* ausgef\u00fchrt wird.",
+ "SLX_TTY_SWITCH": "Legt fest, ob der X-Server einen Wechsel zur Textkonsole mittels Strg-Alt-F1 etc. zul\u00e4sst.",
"SLX_VMCHOOSER_FORLOCATION": "Legt das Verhalten fest, wenn es Veranstaltungen gibt, die an einen bestimmten Ort\/Raum gebunden sind.\r\n*IGNORE*: Mit den restlichen, globalen Veranstaltungen alphabetisch sortiert auflisten.\r\n*BUMP*: Die spezifischen Veranstaltungen oben auflisten, die globalen darunter.\r\n*EXCLUSIVE*: Spezifische Veranstaltungen oben auflisten, globale Veranstaltungen zun\u00e4chst ausblenden. Die globalen Veranstaltungen befinden sich unter einem eingeklappten Listenknoten.",
"SLX_VMCHOOSER_TAB": "Bestimmt, welcher Karteireiter im vmChooser standardm\u00e4\u00dfig ausgew\u00e4hlt wird.\r\n*0*: Native Linux-Sessions\r\n*1*: Nutzerspezifische Kurse\r\n*2*: Alle Kurse\r\n*AUTO*: Hat der Rechner beschr\u00e4nkte Ressourcen, werden die Linux-Sitzungen angezeigt, sonst alle Kurse\r\n\r\nHat der Benutzer ein persistentes Home-Verzeichnis, wirkt sich diese Einstellung nur beim ersten Anmelden aus. Bei sp\u00e4teren Sitzungen markiert der vmChooser die zuletzt gestartete Sitzung und wechselt zum entsprechenden Karteireiter.",
"SLX_VMCHOOSER_TEMPLATES": "Legt fest, wie Veranstaltungen in der Sortierung behandelt werden, welche auf eine VM linken, die eine Vorlage ist.\r\n*IGNORE*: Wie regul\u00e4re Veranstaltungen behandeln\r\n*BUMP*: Weiter oben in der Liste einsortieren",
diff --git a/modules-available/baseconfig_bwlp/lang/en/config-variables.json b/modules-available/baseconfig_bwlp/lang/en/config-variables.json
index 6b10d1cf..b5fc62cd 100644
--- a/modules-available/baseconfig_bwlp/lang/en/config-variables.json
+++ b/modules-available/baseconfig_bwlp/lang/en/config-variables.json
@@ -22,6 +22,7 @@
"SLX_PVS_DEFAULT": "Set whether the \"Join PVS\" checkbox in vmChooser is checked by default.",
"SLX_REBOOT_SCHEDULE": "Fixed time to reboot the computer, even if there is a user active.\r\nSeveral times can be specified, separated by spaces.",
"SLX_REMOTE_LOG_SESSIONS": "Determines whether logins and logouts of the users should be reported to the satellite.\r\n*yes* = log with user ID\r\n*anonymous* = anonymous logging\r\n*no* = no logging",
+ "SLX_RESOLUTION_MAPPING": "Here you can make static assignments of display outputs to resolutions from *SLX_FORCE_RESOLUTION*. The format is a list of OUTPUTNAME=Index, separated by spaces, e.g.\r\n\r\nHDMI1=0 HDMI2=0 HDMI3=1\r\n\r\nIf the variable *SLX_FORCE_RESOLUTION* has the value *1024x768 800x600*, then the outputs HDMI1 and HDMI2 will have the resolution 1024x768 and show the same content (\"cloned left screen\"), and HDMI3 will have the resolution 800x600 and extend the desktop to the right.\r\n\r\nUsing this configuration option should only be necessary for unusual screen setups.",
"SLX_ROOT_PASS": "The root password of the client system. Only required for diagnostic purposes on the client.Leave field blank to disallow root logins.\r\n\/Hint\/: The password SHA-512-with-salt hashed before it's being sent to the client. It's only stored in clear text on the Satellite Server. If you want to have it hashed on the server too, you can supply a pre-hashed password in \/$6$...$...\/-format.",
"SLX_SCREEN_SAVER_GRACE_TIME": "If the screen saver activates after the configured timeout, the user can disable it again by just moving the mouse or pressing a key, without entering their password again. This is called the screen saver grace period, which is configurable in seconds.",
"SLX_SCREEN_SAVER_TIMEOUT": "Timeout for screen saver activation. If the user is idle for this long (in seconds), the screen saver will activate and lock the screen, so the user password is required to unlock the screen again.",
@@ -29,6 +30,7 @@
"SLX_SHUTDOWN_SCHEDULE": "Fixed time to turn off the computer, even if there is a user active.\r\nSeveral times can be specified, separated by spaces.",
"SLX_SHUTDOWN_TIMEOUT": "Time in seconds after which a computer is switched off, if no user is logged on.\r\nLeave blank to disable the function.",
"SLX_SYSTEM_STANDBY_TIMEOUT": "Timeout in seconds after which the computer enters stand-by mode if no user is logged on.\r\nLeave blank to disable.\r\n\r\nNote that some hardware might not properly support stand-by and crash or freeze on wakeup. It's recommended to only enable this feature for rooms where it's known that the hardware supports stand-by mode. You can manually trigger stand-by mode on a client by logging in as root and executing *systemctl suspend*.",
+ "SLX_TTY_SWITCH": "Whether or not the X-server allows switching to the text console via Ctrl-Alt-F1 etc.",
"SLX_VMCHOOSER_FORLOCATION": "Defines how lectures special to the user's location are handled in the vmChooser.\r\n*IGNORE*: Sort them alphabetically among the global lectures.\r\n*BUMP*: Put them atop the global lectures.\r\n*EXCLUSIVE*: Put them atop the global lectures and additionally collapse the node which contains the global lectures.",
"SLX_VMCHOOSER_TAB": "Defines which tab is show by default, if the user doesn't have stored a last used session on his persistent home directory.\r\n*0*: Native Linux sessions\r\n*1*: User specific lectures\r\n*2*: All lectures\r\n*AUTO*: If the computer has low system specs, show the Linux sessions, otherwise, show all lectures",
"SLX_VMCHOOSER_TEMPLATES": "Defines how lectures that link to template VMs are treated wrt sorting.\r\n*IGNORE*: Sort among regular lectures\r\n*BUMP*: Move to top of list",
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index 5a66f15a..80b8e66a 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -126,6 +126,7 @@ class LocationInfo
'browser' => 'slx-browser',
'interactive' => 0,
'bookmarks' => '',
+ 'allow-tty' => '',
);
}
return array();
diff --git a/modules-available/locationinfo/inc/locationinfohooks.inc.php b/modules-available/locationinfo/inc/locationinfohooks.inc.php
index 15c4dc19..b0596c10 100644
--- a/modules-available/locationinfo/inc/locationinfohooks.inc.php
+++ b/modules-available/locationinfo/inc/locationinfohooks.inc.php
@@ -61,6 +61,9 @@ class LocationInfoHooks
if (!empty($data['bookmarks'])) {
ConfigHolder::add('SLX_BROWSER_BOOKMARKS', $data['bookmarks'], 1000);
}
+ if ($data['allow-tty'] === 'yes' || $data['allow-tty'] === 'no') {
+ ConfigHolder::add('SLX_TTY_SWITCH', $data['allow-tty'], 1000);
+ }
} else {
// Not URL panel
ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid);
diff --git a/modules-available/locationinfo/lang/de/messages.json b/modules-available/locationinfo/lang/de/messages.json
index bcaf687d..fe024d44 100644
--- a/modules-available/locationinfo/lang/de/messages.json
+++ b/modules-available/locationinfo/lang/de/messages.json
@@ -1,9 +1,5 @@
{
"config-saved": "Einstellungen erfolgreich gespeichert.",
- "ignored-invalid-end": "Eintrag mit ung\u00fcltiger Endzeit ignoriert",
- "ignored-invalid-range": "Eintrag mit ung\u00fcltiger Range ignoriert",
- "ignored-invalid-start": "Eintrag mit ung\u00fcltiger Startzeit ignoriert",
- "ignored-line-no-days": "Eintrag ohne ausgew\u00e4hlte Tage ignoriert",
"invalid-backend-type": "Ung\u00fcltiger Backend-Typ '{{0}}'",
"invalid-panel-id": "Ung\u00fcltige Panel-ID '{{0}}'",
"invalid-panel-type": "Ung\u00fcltiger Panel-Typ '{{0}}'",
diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json
index 42d6c936..443f5ae2 100644
--- a/modules-available/locationinfo/lang/de/template-tags.json
+++ b/modules-available/locationinfo/lang/de/template-tags.json
@@ -1,5 +1,7 @@
{
"lang_addServer": "Server",
+ "lang_allowTtySwitch": "Wechsel auf Textkonsole erlauben",
+ "lang_allowTtySwitchTooltip": "Legt fest, ob ein wechsel auf die Textkonsole mittels Strg-Alt-F1 erlaubt ist",
"lang_autoScale": "Auto Tage",
"lang_autoscaleTooltip": "Berechnet anhand der Bildschirmbreite die optimale Anzahl an Tagen, die der Kalender anzeigt",
"lang_backend": "Backend",
@@ -36,7 +38,6 @@
"lang_editUrlPanelHints": "Hier k\u00f6nnen Sie konfigurieren, welche URL das Panel aufrufen soll. Dies erm\u00f6glicht Ihnen z.B. in Eingangsbereichen aktuelle Meldungen der Hochschule oder sonstige Webseiten anzuzeigen.",
"lang_entryName": "Name",
"lang_error": "Fehler",
- "lang_expertMode": "Expertenmodus",
"lang_for": "f\u00fcr",
"lang_fourLocsHint": "Hier k\u00f6nnen Sie bis zu vier Orte ausw\u00e4hlen, die in diesem Panel angezeigt werden.",
"lang_free": "Ge\u00f6ffnet",
@@ -152,6 +153,7 @@
"lang_urlPanel": "URL-Panel",
"lang_urlTooltip": "URL die aufgerufen wird",
"lang_urlWhitelist": "Whitelist",
+ "lang_useDefault": "Vorgabe f\u00fcr Raum\/Rechner verwenden",
"lang_useRoomplanner": "Rechner z\u00e4hlen",
"lang_vertical": "Vertikaler Modus",
"lang_verticalTooltip": "Legt fest, ob Kalender und Raum \u00fcbereinander angezeigt werden sollen",
diff --git a/modules-available/locationinfo/lang/en/messages.json b/modules-available/locationinfo/lang/en/messages.json
index 5111a408..c459f1ee 100644
--- a/modules-available/locationinfo/lang/en/messages.json
+++ b/modules-available/locationinfo/lang/en/messages.json
@@ -1,9 +1,5 @@
{
"config-saved": "Config successfully saved.",
- "ignored-invalid-end": "Ignored entry with invalid end time",
- "ignored-invalid-range": "Ignored entry with invalid range",
- "ignored-invalid-start": "Ignored entry with invalid start time",
- "ignored-line-no-days": "Ignored entry with no days selected",
"invalid-backend-type": "Invalid backend type '{{0}}'",
"invalid-panel-id": "Invalid panel id '{{0}}'",
"invalid-panel-type": "Invalid panel type '{{0}}'",
diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json
index c95208af..0ebae3f9 100644
--- a/modules-available/locationinfo/lang/en/template-tags.json
+++ b/modules-available/locationinfo/lang/en/template-tags.json
@@ -1,5 +1,7 @@
{
"lang_addServer": "Server",
+ "lang_allowTtySwitch": "Allow switching to text console",
+ "lang_allowTtySwitchTooltip": "Set whether the user can switch to the text console via Ctrl-Alt-F1",
"lang_autoScale": "Auto Days",
"lang_autoscaleTooltip": "Calculates the optimum amount of days to show from the display width",
"lang_backend": "Backend",
@@ -36,7 +38,6 @@
"lang_editUrlPanelHints": "Here you can define which URL is opened by the panel. This enables you to show news about your university or any other website.",
"lang_entryName": "Name",
"lang_error": "Error",
- "lang_expertMode": "Expert mode",
"lang_for": "for",
"lang_fourLocsHint": "You can pick up to four locations that will be shown in this panel.",
"lang_free": "Open",
@@ -152,6 +153,7 @@
"lang_urlPanel": "URL panel",
"lang_urlTooltip": "URL which is shown by the panel",
"lang_urlWhitelist": "Whitelist",
+ "lang_useDefault": "Use setting from location\/machine",
"lang_useRoomplanner": "Count PCs",
"lang_vertical": "Vertical mode",
"lang_verticalTooltip": "Defines whether the room and calendar are shown above each other",
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 8032642d..845398f0 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -356,6 +356,7 @@ class Page_LocationInfo extends Page
'browser' => Request::post('browser', 'slx-browser', 'string'),
'interactive' => Request::post('interactive', '0', 'bool'),
'bookmarks' => $bookmarkString ? $bookmarkString : '',
+ 'allow-tty' => Request::post('allow-tty', '', 'string'),
);
return array('config' => $conf, 'locationids' => []);
}
@@ -982,6 +983,7 @@ class Page_LocationInfo extends Page
'browser' => $config['browser'],
'interactive_checked' => $config['interactive'] ? 'checked' : '',
'bookmarks' => $bookmarksArray,
+ 'allow-tty_' . $config['allow-tty'] . '_checked' => 'checked',
));
} else {
Render::addTemplate('page-config-panel-summary', array(
diff --git a/modules-available/locationinfo/templates/page-config-panel-url.html b/modules-available/locationinfo/templates/page-config-panel-url.html
index 86915729..8d4d7148 100644
--- a/modules-available/locationinfo/templates/page-config-panel-url.html
+++ b/modules-available/locationinfo/templates/page-config-panel-url.html
@@ -71,6 +71,33 @@
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
+ <label>{{lang_allowTtySwitch}}</label>
+ </div>
+ <div class="col-sm-7">
+ <div class="radio">
+ <input id="tty1" type="radio" name="allow-tty" {{allow-tty__checked}} value="">
+ <label for="tty1">{{lang_useDefault}}</label>
+ </div>
+ <div class="radio">
+ <input id="tty2" type="radio" name="allow-tty" {{allow-tty_yes_checked}} value="yes">
+ <label for="tty2">{{lang_yes}}</label>
+ </div>
+ <div class="radio">
+ <input id="tty3" type="radio" name="allow-tty" {{allow-tty_no_checked}} value="no">
+ <label for="tty3">{{lang_no}}</label>
+ </div>
+ </div>
+ <div class="col-sm-2">
+ <p class="btn btn-static helptext" title="{{lang_allowTtySwitchTooltip}}">
+ <span class="glyphicon glyphicon-question-sign"></span>
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div class="list-group-item">
+ <div class="row">
+ <div class="col-sm-3">
<label for="input-reload">{{lang_reloadIntervalMins}}</label>
</div>
<div class="col-sm-7">