summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-28 10:33:08 +0200
committerSimon Rettberg2018-03-28 10:33:08 +0200
commit21d784d55adeefc63ed23d50fadedd1c463a166a (patch)
tree41c66e48e18bcc0bf03d1ced506fe376c1073645
parent[permissionmanager] fixed tree issue with deselecting parent-permissions (Tic... (diff)
parent[minilinux] permission 'show' => 'view' (diff)
downloadslx-admin-21d784d55adeefc63ed23d50fadedd1c463a166a.tar.gz
slx-admin-21d784d55adeefc63ed23d50fadedd1c463a166a.tar.xz
slx-admin-21d784d55adeefc63ed23d50fadedd1c463a166a.zip
Merge branch 'master' into permission-manager
-rw-r--r--inc/database.inc.php2
-rw-r--r--inc/dictionary.inc.php4
-rw-r--r--inc/event.inc.php2
-rw-r--r--inc/taskmanager.inc.php2
-rw-r--r--inc/taskmanagercallback.inc.php5
-rw-r--r--inc/trigger.inc.php7
-rw-r--r--inc/util.inc.php21
-rw-r--r--lang/de/messages-hardcoded.json24
-rw-r--r--lang/de/messages.json14
-rw-r--r--lang/en/messages-hardcoded.json35
-rw-r--r--lang/en/messages.json14
-rw-r--r--lang/pt/messages-hardcoded.json26
-rw-r--r--lang/pt/messages.json11
-rw-r--r--modules-available/adduser/lang/de/messages.json3
-rw-r--r--modules-available/adduser/lang/de/permissions.json6
-rw-r--r--modules-available/adduser/lang/de/template-tags.json8
-rw-r--r--modules-available/adduser/lang/en/messages.json3
-rw-r--r--modules-available/adduser/lang/en/permissions.json6
-rw-r--r--modules-available/adduser/lang/en/template-tags.json8
-rw-r--r--modules-available/adduser/page.inc.php4
-rw-r--r--modules-available/adduser/style.css4
-rw-r--r--modules-available/adduser/templates/page-adduser.html36
-rw-r--r--modules-available/adduser/templates/page-userlist.html24
-rw-r--r--modules-available/baseconfig/lang/de/permissions.json4
-rw-r--r--modules-available/baseconfig/lang/en/permissions.json4
-rw-r--r--modules-available/dnbd3/lang/de/permissions.json8
-rw-r--r--modules-available/dnbd3/lang/de/template-tags.json14
-rw-r--r--modules-available/dnbd3/lang/en/permissions.json8
-rw-r--r--modules-available/dnbd3/lang/en/template-tags.json8
-rw-r--r--modules-available/dnbd3/page.inc.php48
-rw-r--r--modules-available/dnbd3/permissions/permissions.json6
-rw-r--r--modules-available/dnbd3/templates/page-proxy-altservers.html12
-rw-r--r--modules-available/dnbd3/templates/page-proxy-clients.html69
-rw-r--r--modules-available/dnbd3/templates/page-proxy-config.html2
-rw-r--r--modules-available/dnbd3/templates/page-proxy-header.html3
-rw-r--r--modules-available/dnbd3/templates/page-proxy-images.html31
-rw-r--r--modules-available/dnbd3/templates/page-proxy-loclist.html27
-rw-r--r--modules-available/dnbd3/templates/page-proxy-stats.html30
-rw-r--r--modules-available/dozmod/pages/users.inc.php2
-rw-r--r--modules-available/locationinfo/lang/de/permissions.json8
-rw-r--r--modules-available/locationinfo/lang/en/permissions.json8
-rw-r--r--modules-available/locations/lang/de/template-tags.json4
-rw-r--r--modules-available/locations/lang/en/template-tags.json4
-rw-r--r--modules-available/main/install.inc.php15
-rw-r--r--modules-available/minilinux/lang/de/permissions.json2
-rw-r--r--modules-available/minilinux/lang/de/template-tags.json5
-rw-r--r--modules-available/minilinux/lang/en/permissions.json2
-rw-r--r--modules-available/minilinux/lang/en/template-tags.json5
-rw-r--r--modules-available/minilinux/page.inc.php2
-rw-r--r--modules-available/minilinux/permissions/permissions.json2
-rw-r--r--modules-available/minilinux/templates/filelist.html2
-rw-r--r--modules-available/rebootcontrol/page.inc.php2
-rw-r--r--modules-available/runmode/lang/de/messages.json1
-rw-r--r--modules-available/runmode/lang/de/permissions.json3
-rw-r--r--modules-available/runmode/lang/de/template-tags.json1
-rw-r--r--modules-available/runmode/lang/en/messages.json1
-rw-r--r--modules-available/runmode/lang/en/permissions.json3
-rw-r--r--modules-available/runmode/lang/en/template-tags.json1
-rw-r--r--modules-available/serversetup-bwlp/lang/de/permissions.json6
-rw-r--r--modules-available/statistics/inc/parser.inc.php26
-rw-r--r--modules-available/statistics/lang/de/permissions.json15
-rw-r--r--modules-available/statistics/lang/en/permissions.json15
-rw-r--r--modules-available/statistics/page.inc.php6
-rw-r--r--modules-available/statistics/pages/projectors.inc.php2
-rw-r--r--modules-available/statistics/templates/machine-hdds.html6
-rw-r--r--modules-available/sysconfig/addmodule_adauth.inc.php18
-rw-r--r--modules-available/sysconfig/addmodule_ldapauth.inc.php19
-rw-r--r--modules-available/sysconfig/inc/configmodule/adauth.inc.php2
-rw-r--r--modules-available/sysconfig/inc/configmodule/ldapauth.inc.php2
-rw-r--r--modules-available/sysconfig/inc/configmodulebaseldap.inc.php5
-rw-r--r--modules-available/sysconfig/lang/de/permissions.json8
-rw-r--r--modules-available/sysconfig/lang/de/template-tags.json6
-rw-r--r--modules-available/sysconfig/lang/en/permissions.json8
-rw-r--r--modules-available/sysconfig/lang/en/template-tags.json6
-rw-r--r--modules-available/sysconfig/templates/ad_ldap-homedir.html14
-rw-r--r--modules-available/systemstatus/lang/de/permissions.json2
-rw-r--r--modules-available/translation/page.inc.php21
-rw-r--r--modules-available/translation/templates/edit.html4
-rw-r--r--modules-available/vmstore/baseconfig/getconfig.inc.php6
-rw-r--r--modules-available/vmstore/lang/de/template-tags.json4
-rw-r--r--modules-available/vmstore/lang/en/template-tags.json4
-rw-r--r--modules-available/vmstore/page.inc.php7
-rw-r--r--modules-available/vmstore/templates/page-vmstore.html6
83 files changed, 523 insertions, 311 deletions
diff --git a/inc/database.inc.php b/inc/database.inc.php
index 082b13b6..d5992795 100644
--- a/inc/database.inc.php
+++ b/inc/database.inc.php
@@ -132,7 +132,7 @@ class Database
if (!isset(self::$statements[$query])) {
self::$statements[$query] = self::$dbh->prepare($query);
} else {
- self::$statements[$query]->closeCursor();
+ //self::$statements[$query]->closeCursor();
}
$start = microtime(true);
if (self::$statements[$query]->execute($args) === false) {
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php
index ee196f59..fcbfdfb8 100644
--- a/inc/dictionary.inc.php
+++ b/inc/dictionary.inc.php
@@ -17,6 +17,8 @@ class Dictionary
{
self::$languages = array();
foreach (glob('lang/??', GLOB_ONLYDIR) as $lang) {
+ if (!file_exists($lang . '/name.txt') && !file_exists($lang . '/flag.png'))
+ continue;
$lang = basename($lang);
if ($lang === '..')
continue;
@@ -191,6 +193,8 @@ class Dictionary
foreach (self::$languages as $lang) {
if (file_exists("lang/$lang/name.txt")) {
$name = file_get_contents("lang/$lang/name.txt");
+ } else {
+ $name = false;
}
if (!isset($name) || $name === false) {
$name = $lang;
diff --git a/inc/event.inc.php b/inc/event.inc.php
index 66601607..fe59b2b9 100644
--- a/inc/event.inc.php
+++ b/inc/event.inc.php
@@ -111,6 +111,8 @@ class Event
public static function activeConfigChanged()
{
$task = Trigger::ldadp();
+ if ($task === false)
+ return;
TaskmanagerCallback::addCallback($task, 'ldadpStartup');
}
diff --git a/inc/taskmanager.inc.php b/inc/taskmanager.inc.php
index cdc90f55..ed64c613 100644
--- a/inc/taskmanager.inc.php
+++ b/inc/taskmanager.inc.php
@@ -210,7 +210,7 @@ class Taskmanager
private static function readReply($seq)
{
$tries = 0;
- while (($bytes = socket_recvfrom(self::$sock, $buf, 90000, 0, $bla1, $bla2)) !== false || socket_last_error() === 11) {
+ while (($bytes = @socket_recvfrom(self::$sock, $buf, 90000, 0, $bla1, $bla2)) !== false || socket_last_error() === 11) {
$parts = explode(',', $buf, 2);
// Do we have compressed data?
if (substr($parts[0], 0, 3) === '+z:') {
diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php
index ab8affac..55e01ba2 100644
--- a/inc/taskmanagercallback.inc.php
+++ b/inc/taskmanagercallback.inc.php
@@ -22,7 +22,7 @@ class TaskmanagerCallback
if (is_array($task) && isset($task['id']))
$task = $task['id'];
if (!is_string($task)) {
- EventLog::warning("addCallback: Not a valid task id: $task");
+ EventLog::warning("addCallback: Not a valid task id: $task", print_r(debug_backtrace(), true));
return;
}
$data = array(
@@ -172,7 +172,8 @@ class TaskmanagerCallback
Property::setVmStoreConfig($args);
return;
}
- if ($task['data']['exitCode'] > 0) {
+ // If code is 99 then the script failed to even unmount -- don't change anything
+ if ($task['data']['exitCode'] != 99) {
// Manual mount failed with non-taskmanager related error - reset storage type to reflect situation
$data = Property::getVmStoreConfig();
if (isset($data['storetype'])) {
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 2af73872..f055d384 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -127,14 +127,21 @@ class Trigger
}
if ($storetype === 'nfs') {
$addr = $vmstore['nfsaddr'];
+ $opts = 'nfsopts';
} elseif ($storetype === 'cifs') {
$addr = $vmstore['cifsaddr'];
+ $opts = 'cifsopts';
} else {
+ $opts = null;
$addr = 'null';
}
+ if (isset($vmstore[$opts])) {
+ $opts = $vmstore[$opts];
+ }
return Taskmanager::submit('MountVmStore', array(
'address' => $addr,
'type' => 'images',
+ 'opts' => $opts,
'username' => $vmstore['cifsuser'],
'password' => $vmstore['cifspasswd']
));
diff --git a/inc/util.inc.php b/inc/util.inc.php
index 69eaf941..9f6f63db 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -179,6 +179,13 @@ SADFACE;
$location .= '&' . implode('&', self::$redirectParams);
}
}
+ if (CONFIG_DEBUG) {
+ global $global_start;
+ $duration = microtime(true) - $global_start;
+ error_log('Redirect: ' . round($duration, 3) . 's, '
+ . Database::getQueryCount() . ' queries, '
+ . round(Database::getQueryTime(), 3) . 's query time total');
+ }
Header('Location: ' . $location);
exit(0);
}
@@ -227,18 +234,22 @@ SADFACE;
*
* @param float|int $bytes numeric value of the filesize to make readable
* @param int $decimals number of decimals to show, -1 for automatic
- * @return string human readable string representing the given filesize
+ * @return string human readable string representing the given file size
*/
public static function readableFileSize($bytes, $decimals = -1)
{
+ $bytes = round($bytes);
static $sz = array('Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB');
$factor = (int)floor((strlen($bytes) - 1) / 3);
- if ($factor == 0) {
+ if ($factor === 0) {
$decimals = 0;
- } elseif ($decimals === -1) {
- $decimals = 2 - floor((strlen($bytes) - 1) % 3);
+ } else {
+ $bytes = $bytes / pow(1024, $factor);
+ if ($decimals === -1) {
+ $decimals = 2 - floor(strlen((int)$bytes) - 1);
+ }
}
- return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . $sz[$factor];
+ return sprintf("%.{$decimals}f", $bytes) . "\xe2\x80\x89" . $sz[$factor];
}
public static function sanitizeFilename($name)
diff --git a/lang/de/messages-hardcoded.json b/lang/de/messages-hardcoded.json
deleted file mode 100644
index 692bc9bc..00000000
--- a/lang/de/messages-hardcoded.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "lang_clientSshConfig": "SSH-Konfiguration",
- "lang_configurationCompilation": "Konfiguration zusammenstellen",
- "lang_contentOf": "Inhalt von",
- "lang_createUser": "Benutzer anlegen",
- "lang_days": "Tag(e)",
- "lang_eventLog": "Server Log",
- "lang_hours": "Stunde(n)",
- "lang_location": "Lokalisierung",
- "lang_login": "Anmelden",
- "lang_moduleAdd": "Modul hinzuf\u00fcgen",
- "lang_noModuleFromThisGroup": "(Kein Modul dieser Gruppe)",
- "lang_serverConfiguration": "Serverseitige Konfiguration",
- "lang_serverStatus": "Server Status",
- "lang_status": "Status",
- "lang_titleBackup": "Sichern und Wiederherstellen",
- "lang_titleClientStatistics": "Client-Statistiken",
- "lang_titleEventLog": "Ereignisprotokoll",
- "lang_titleWebinterface": "Webschnittstelle",
- "lang_unknwonTaskManager": "Unbekannter Taskmanager-Fehler",
- "today": "Heute",
- "unused": "Ungenutzt",
- "yesterday": "Gestern"
-} \ No newline at end of file
diff --git a/lang/de/messages.json b/lang/de/messages.json
deleted file mode 100644
index a7e81351..00000000
--- a/lang/de/messages.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "ad-config-failed": "Wiederherstellen der Active Directory Konfiguration fehlgeschlagen",
- "db-update-done": "Datenbank wurde aktualisiert",
- "deleted-tag": "Tag wurde entfernt",
- "empty-archive": "Das Archiv enth\u00e4lt keine Dateien oder Verzeichnisse",
- "error-archive": "Korruptes Archiv oder nicht unterst\u00fctztes Format",
- "error-extract": "Konnte Archiv nicht nach {{0}} entpacken - {{1}}",
- "error-nodir": "Das Verzeichnis {{0}} existiert nicht.",
- "error-rename": "Konnte {{0}} nicht in {{1}} umbenennen",
- "invalid-file": "Die Datei {{0}} existiert nicht!",
- "invalid-path": "Ung\u00fcltiger Pfad.",
- "remote-parse-failed": "Parsen der empfangenen Daten fehlgeschlagen ({{0}})",
- "upload-complete": "Upload von {{0}} war erfolgreich"
-} \ No newline at end of file
diff --git a/lang/en/messages-hardcoded.json b/lang/en/messages-hardcoded.json
deleted file mode 100644
index 55ac6a50..00000000
--- a/lang/en/messages-hardcoded.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "lang_administration": "Translations",
- "lang_cities": "Cities",
- "lang_clientLog": "Client Log",
- "lang_clientSshConfig": "SSH configuration",
- "lang_configurationCompilation": "Compile configuration",
- "lang_content": "Content",
- "lang_contentOf": "Content of \"",
- "lang_createUser": "Create User",
- "lang_days": "Day(s)",
- "lang_eventLog": "Server Log",
- "lang_hours": "Hour(s)",
- "lang_login": "Login",
- "lang_modules": "Modules",
- "lang_moduleAdd": "Add Module",
- "lang_noModuleFromThisGroup": "(No module from this group)",
- "lang_server": "iPXE \/ Boot Menu",
- "lang_serverConfiguration": "Server-side Configuration",
- "lang_serverStatus": "Server",
- "lang_settings": "Settings",
- "lang_status": "Status",
- "lang_titleBackup": "Save and Restore",
- "lang_titleClientStatistics": "Client statistics",
- "lang_titleEventLog": "Event log",
- "lang_user": "Users",
- "lang_userManagement": "Management",
- "lang_users": "Users",
- "lang_variables": "Variables",
- "lang_vmLocation": "Virtual Machine",
- "lang_titleWebinterface": "Web Interface",
- "lang_unknwonTaskManager": "Unknown Task Manager error",
- "today": "Today",
- "unused": "Unused",
- "yesterday": "Yesterday"
-} \ No newline at end of file
diff --git a/lang/en/messages.json b/lang/en/messages.json
deleted file mode 100644
index edf07a85..00000000
--- a/lang/en/messages.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "ad-config-failed": "Rebuilding the Active Directory configuration failed",
- "db-update-done": "Database successfully updated",
- "deleted-tag": "Tag was successfully removed",
- "empty-archive": "The archive contains no files or directories",
- "error-archive": "Corrupted archive or unsupported format",
- "error-extract": "Could not unpack archive {{0}} to {{1}}",
- "error-nodir": "The directory {{0}} does not exist.",
- "error-rename": "Could not rename {{0}} into {{1}}",
- "invalid-file": "The file {{0}} does not exist!",
- "invalid-path": "Invalid path.",
- "remote-parse-failed": "Parsing the received data failed ({{0}})",
- "upload-complete": "Upload of {{0}} was successful"
-} \ No newline at end of file
diff --git a/lang/pt/messages-hardcoded.json b/lang/pt/messages-hardcoded.json
deleted file mode 100644
index 0f500e07..00000000
--- a/lang/pt/messages-hardcoded.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "lang_administration": "Tradu\u00e7\u00f5es",
- "lang_cities": "Cidades",
- "lang_clientLog": "Log dos Clientes",
- "lang_content": "Conte\u00fado",
- "lang_createUser": "Criar Usu\u00e1rio",
- "lang_days": "Dia(s)",
- "lang_eventLog": "Log dos Servidores",
- "lang_hours": "Hora(s)",
- "lang_login": "Entrar",
- "lang_modules": "M\u00f3dulos",
- "lang_server": "iPXE \/ Boot Menu",
- "lang_serverConfiguration": "Configura\u00e7\u00e3o do servidor",
- "lang_serverStatus": "Servidor",
- "lang_settings": "Configura\u00e7\u00f5es",
- "lang_status": "Status",
- "lang_titleBackup": "Salvar e Recuperar",
- "lang_titleEventLog": "Log de Eventos",
- "lang_user": "Usu\u00e1rios",
- "lang_userManagement": "Gerenciamento",
- "lang_users": "Usu\u00e1rios",
- "lang_variables": "Vari\u00e1veis",
- "lang_vmLocation": "M\u00e1quina Virtual",
- "today": "Hoje",
- "yesterday": "Ontem"
-} \ No newline at end of file
diff --git a/lang/pt/messages.json b/lang/pt/messages.json
deleted file mode 100644
index 8738840f..00000000
--- a/lang/pt/messages.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "deleted-tag": "Tag foi removida com sucesso",
- "empty-archive": "O arquivo n\u00e3o cont\u00e9m arquivos ou diret\u00f3rios",
- "error-archive": "Arquivo corrompido ou formato n\u00e3o suportado",
- "error-extract": "N\u00e3o foi poss\u00edvel descompactar arquivo {{0}} para {{1}}",
- "error-nodir": "O diret\u00f3rio {{0}} n\u00e3o existe.",
- "error-rename": "N\u00e3o foi poss\u00edvel renomear {{0}} em {{1}}",
- "invalid-file": "O arquivo {{0}} n\u00e3o existe!",
- "remote-parse-failed": "An\u00e1lise dos dados recebidos falhou ({{0}})",
- "upload-complete": "Envio de {{0}} foi bem sucedido"
-} \ No newline at end of file
diff --git a/modules-available/adduser/lang/de/messages.json b/modules-available/adduser/lang/de/messages.json
index 0ab4571f..a744ae5f 100644
--- a/modules-available/adduser/lang/de/messages.json
+++ b/modules-available/adduser/lang/de/messages.json
@@ -1,8 +1,11 @@
{
"adduser-success": "Benutzer erfolgreich hinzugef\u00fcgt",
+ "cannot-delete-1-self": "Sie k\u00f6nnen nicht den Benutzer mit der ID 1 oder sich selbst l\u00f6schen",
"db-error": "Datenbankfehler: {{0}}",
"password-changed": "Passwort ge\u00e4ndert",
"password-mismatch": "Passwort und Passwortbest\u00e4tigung stimmen nicht \u00fcberein",
+ "roles-updated": "Rollen aktualisiert",
+ "user-deleted": "Benutzer {{0}} (ID={1}}) gel\u00f6scht",
"user-edited": "Benutzerdaten wurden ge\u00e4ndert",
"user-not-found": "Benutzer mit ID {{0}} nicht gefunden"
} \ No newline at end of file
diff --git a/modules-available/adduser/lang/de/permissions.json b/modules-available/adduser/lang/de/permissions.json
new file mode 100644
index 00000000..636b73ff
--- /dev/null
+++ b/modules-available/adduser/lang/de/permissions.json
@@ -0,0 +1,6 @@
+{
+ "list.view": "Nutzerliste anzeigen",
+ "user.add": "Neuen Nutzer hinzuf\u00fcgen",
+ "user.edit": "Nutzer bearbeiten",
+ "user.remove": "Nutzer l\u00f6schen"
+} \ No newline at end of file
diff --git a/modules-available/adduser/lang/de/template-tags.json b/modules-available/adduser/lang/de/template-tags.json
index 0b6b2530..e13c3876 100644
--- a/modules-available/adduser/lang/de/template-tags.json
+++ b/modules-available/adduser/lang/de/template-tags.json
@@ -1,16 +1,24 @@
{
"lang_addUser": "Nutzer hinzuf\u00fcgen",
+ "lang_assignRoles": "Rollen zuweisen",
"lang_changeLoginHint": "Sie k\u00f6nnen den Namen, den der Nutzer beim Login angeben muss, \u00e4ndern. Dies ist nur bei lokalen Nutzern m\u00f6glich, die nicht \u00fcber LDAP\/AD authentifiziert werden.",
"lang_changeOwnPasswordHint": "Ihr eigenes Passwort k\u00f6nnen Sie \u00fcber den Button \"Passwort \u00e4ndern\" im Men\u00fc \u00e4ndern.",
"lang_changePassword": "Neues Passwort",
+ "lang_confirmDelete": "L\u00f6schen best\u00e4tigen",
"lang_confirmation": "Wiederholen",
"lang_createUser": "Benutzer anlegen",
"lang_editUser": "Benutzer bearbeiten",
"lang_email": "E-Mail",
"lang_fullName": "Vollst\u00e4ndiger Name",
+ "lang_fullnameMissing": "Kein Name angegeben",
"lang_login": "Login",
+ "lang_loginTooShort": "Login zu kurz",
"lang_name": "Name",
+ "lang_passwordTooShort": "Passwort zu kurz",
+ "lang_passwordsDontMatch": "Passworte stimmen nicht \u00fcberein",
"lang_phone": "Telefon",
+ "lang_role": "Rolle",
+ "lang_userDeleteConfirm": "M\u00f6chten Sie diesen Benutzer wirklich l\u00f6schen?",
"lang_userManagement": "Benutzerverwaltung",
"lang_userlist": "Benutzerliste"
} \ No newline at end of file
diff --git a/modules-available/adduser/lang/en/messages.json b/modules-available/adduser/lang/en/messages.json
index 69af3227..67bca6f9 100644
--- a/modules-available/adduser/lang/en/messages.json
+++ b/modules-available/adduser/lang/en/messages.json
@@ -1,8 +1,11 @@
{
"adduser-success": "User successfully added",
+ "cannot-delete-1-self": "Cannot delete user with ID 1 or yourself",
"db-error": "Database error: {{0}}",
"password-changed": "Password changed",
"password-mismatch": "Password and password confirmation do not match",
+ "roles-updated": "Roles have been updated",
+ "user-deleted": "Deleted user {{0}} (ID={{1}})",
"user-edited": "User data has been updated",
"user-not-found": "User with ID {{0}} not found"
} \ No newline at end of file
diff --git a/modules-available/adduser/lang/en/permissions.json b/modules-available/adduser/lang/en/permissions.json
new file mode 100644
index 00000000..d12d100e
--- /dev/null
+++ b/modules-available/adduser/lang/en/permissions.json
@@ -0,0 +1,6 @@
+{
+ "list.view": "Show userlist",
+ "user.add": "Add new user",
+ "user.edit": "Edit user",
+ "user.remove": "Remove user"
+} \ No newline at end of file
diff --git a/modules-available/adduser/lang/en/template-tags.json b/modules-available/adduser/lang/en/template-tags.json
index 2c9b8b53..de57b385 100644
--- a/modules-available/adduser/lang/en/template-tags.json
+++ b/modules-available/adduser/lang/en/template-tags.json
@@ -1,16 +1,24 @@
{
"lang_addUser": "Add user",
+ "lang_assignRoles": "Assign roles",
"lang_changeLoginHint": "You can change the login identifier used for logging in. This is only enabled for local acounts that are not linked to LDAP\/AD servers.",
"lang_changeOwnPasswordHint": "You can change your own password by clicking the \"change password\" button in the menu.",
"lang_changePassword": "Change password",
+ "lang_confirmDelete": "Confirm delete",
"lang_confirmation": "Confirm Password",
"lang_createUser": "Create User",
"lang_editUser": "Edit user",
"lang_email": "Email",
"lang_fullName": "Full Name",
+ "lang_fullnameMissing": "Full name missing",
"lang_login": "Login",
+ "lang_loginTooShort": "Login too short",
"lang_name": "Name",
+ "lang_passwordTooShort": "Password too short",
+ "lang_passwordsDontMatch": "Passwords don't match",
"lang_phone": "Phone",
+ "lang_role": "Role",
+ "lang_userDeleteConfirm": "Do you want to delete this user?",
"lang_userManagement": "User management",
"lang_userlist": "User list"
} \ No newline at end of file
diff --git a/modules-available/adduser/page.inc.php b/modules-available/adduser/page.inc.php
index 60785d6c..c43a04e6 100644
--- a/modules-available/adduser/page.inc.php
+++ b/modules-available/adduser/page.inc.php
@@ -129,7 +129,7 @@ class Page_AddUser extends Page
return;
}
//\\
- $user = Database::queryFirst('SELECT userid, login, fullname, phone, email
+ $user = Database::queryFirst('SELECT userid, login
FROM user WHERE userid = :userid', compact('userid'));
if ($user === false) {
Message::addError('user-not-found', $userid);
@@ -140,7 +140,7 @@ class Page_AddUser extends Page
return;
}
Database::exec('DELETE FROM user WHERE userid = :userid', compact('userid'));
- Message::addSuccess('user-deleted', $userid);
+ Message::addSuccess('user-deleted', $user['login'], $userid);
}
private function saveRoles($userid)
diff --git a/modules-available/adduser/style.css b/modules-available/adduser/style.css
index e459352b..15f04b80 100644
--- a/modules-available/adduser/style.css
+++ b/modules-available/adduser/style.css
@@ -13,3 +13,7 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
+
+#add-msg {
+ height: 1em;
+} \ No newline at end of file
diff --git a/modules-available/adduser/templates/page-adduser.html b/modules-available/adduser/templates/page-adduser.html
index bd16dbbf..18d79a3b 100644
--- a/modules-available/adduser/templates/page-adduser.html
+++ b/modules-available/adduser/templates/page-adduser.html
@@ -3,18 +3,18 @@
<h2>{{lang_createUser}}</h2>
<div class="row">
<div class="col-md-4"><label for="login">{{lang_login}} *</label></div>
- <div class="col-md-4"><input id="label" type="text" name="login" value="{{login}}" class="form-control" placeholder="{{lang_username}}" autofocus></div>
+ <div class="col-md-4"><input id="login" type="text" name="login" value="{{login}}" class="form-control event-box" placeholder="{{lang_username}}" autofocus></div>
</div>
<br>
<div class="row">
<div class="col-md-4"><label for="pass1">{{lang_password}} *</label></div>
- <div class="col-md-4"><input id="pass1" type="password" name="pass1" class="form-control" placeholder="{{lang_password}}"></div>
- <div class="col-md-4"><input type="password" name="pass2" class="form-control" placeholder="{{lang_confirmation}}"></div>
+ <div class="col-md-4"><input id="pass1" type="password" name="pass1" class="form-control event-box" placeholder="{{lang_password}}"></div>
+ <div class="col-md-4"><input id="pass2" type="password" name="pass2" class="form-control event-box" placeholder="{{lang_confirmation}}"></div>
</div>
<br>
<div class="row">
<div class="col-md-4"><label for="fullname">{{lang_fullName}} *</label></div>
- <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control" placeholder="{{lang_fullName}}"></div>
+ <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control event-box" placeholder="{{lang_fullName}}"></div>
</div>
<br>
<div class="row">
@@ -30,8 +30,34 @@
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-8">
- <button class="btn btn-lg btn-primary btn-block" type="submit">{{lang_createUser}}</button>
+ <button id="add-btn" class="btn btn-lg btn-primary btn-block" type="submit" disabled>{{lang_createUser}}</button>
+ <div id="add-msg" class="text-danger slx-bold"></div>
</div>
</div>
<input type="hidden" name="action" value="adduser">
<input type="hidden" name="token" value="{{token}}">
+<script><!--
+document.addEventListener('DOMContentLoaded', function() {
+ var $login = $('#login');
+ var $pass1 = $('#pass1');
+ var $pass2 = $('#pass2');
+ var $fullname = $('#fullname');
+ var $msg = $('#add-msg');
+ var $btn = $('#add-btn');
+ var ev = function() {
+ var msg = '';
+ if ($login.val().length < 2) {
+ msg = '{{lang_loginTooShort}}';
+ } else if ($pass1.val() !== $pass2.val()) {
+ msg = '{{lang_passwordsDontMatch}}';
+ } else if ($pass1.val().length < 2) {
+ msg = '{{lang_passwordTooShort}}';
+ } else if ($fullname.val().length < 1) {
+ msg = '{{lang_fullnameMissing}}';
+ }
+ $msg.text(msg);
+ $btn.prop('disabled', !!msg);
+ };
+ $('.event-box').change(ev).keyup(ev);
+});
+//--></script> \ No newline at end of file
diff --git a/modules-available/adduser/templates/page-userlist.html b/modules-available/adduser/templates/page-userlist.html
index 5b14f7e5..8d9c6de0 100644
--- a/modules-available/adduser/templates/page-userlist.html
+++ b/modules-available/adduser/templates/page-userlist.html
@@ -18,7 +18,7 @@
<tbody>
{{#list}}
<tr>
- <td>{{login}}</td>
+ <td id="user-{{userid}}">{{login}}</td>
<td>{{fullname}}</td>
<td>{{phone}}</td>
<td>{{email}}</td>
@@ -27,8 +27,8 @@
<span class="glyphicon glyphicon-edit"></span>
</button>
{{^hide_delete}}
- <button type="button" {{perms.user.remove.disabled}} class="btn btn-danger btn-xs"
- data-target="#delete-modal" data-toggle="modal" onclick="$('#delete-userid').val({{userid}})">
+ <button type="button" {{perms.user.remove.disabled}} class="btn btn-danger btn-xs del-user-btn"
+ data-target="#delete-modal" data-toggle="modal" data-user="{{userid}}">
<span class="glyphicon glyphicon-trash"></span>
</button>
{{/hide_delete}}
@@ -44,6 +44,19 @@
</a>
</div>
</form>
+<script>
+ document.addEventListener('DOMContentLoaded', function() {
+ $('.del-user-btn').click(function (e) {
+ var uid = $(this).data('user');
+ if (!uid) {
+ alert('ERROR');
+ return false;
+ }
+ $('#delete-userid').val(uid);
+ $('#delete-user-field').text($('#user-' + uid).text());
+ });
+ });
+</script>
<!-- Modals -->
<div class ="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
@@ -52,11 +65,10 @@
<form method="post">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="myModalLabel">{{lang_confirmDelete}}</h4>
+ <h4 class="modal-title" id="myModalLabel">{{lang_confirmDelete}}: <span id="delete-user-field"></span></h4>
</div>
<div class="modal-body">
- <p>{{lang_roleDeleteConfirm}}</p>
- {{lang_numAssignedUsers}}: <span id="delete-role-users"></span>
+ <p>{{lang_userDeleteConfirm}}</p>
</div>
<div class="modal-footer">
<input type="hidden" name="action" value="deleteuser">
diff --git a/modules-available/baseconfig/lang/de/permissions.json b/modules-available/baseconfig/lang/de/permissions.json
new file mode 100644
index 00000000..a010cebe
--- /dev/null
+++ b/modules-available/baseconfig/lang/de/permissions.json
@@ -0,0 +1,4 @@
+{
+ "edit": "Konfigurationsvariablen bearbeiten",
+ "view": "Konfigurationsvariablen anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/baseconfig/lang/en/permissions.json b/modules-available/baseconfig/lang/en/permissions.json
new file mode 100644
index 00000000..9fe69752
--- /dev/null
+++ b/modules-available/baseconfig/lang/en/permissions.json
@@ -0,0 +1,4 @@
+{
+ "edit": "Edit config variables",
+ "view": "Show config variables"
+} \ No newline at end of file
diff --git a/modules-available/dnbd3/lang/de/permissions.json b/modules-available/dnbd3/lang/de/permissions.json
new file mode 100644
index 00000000..15d17336
--- /dev/null
+++ b/modules-available/dnbd3/lang/de/permissions.json
@@ -0,0 +1,8 @@
+{
+ "access-page": "Seite sehen",
+ "configure.external": "Externen Proxy bearbeiten",
+ "configure.proxy": "Automatischen Proxy bearbeiten",
+ "refresh": "Serverliste aktualisieren",
+ "toggle-usage": "Aktivieren\/Deaktivieren",
+ "view.details": "Proxydetails anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/dnbd3/lang/de/template-tags.json b/modules-available/dnbd3/lang/de/template-tags.json
index 5406f1b5..4f3116a0 100644
--- a/modules-available/dnbd3/lang/de/template-tags.json
+++ b/modules-available/dnbd3/lang/de/template-tags.json
@@ -10,12 +10,14 @@
"lang_client": "Client",
"lang_clientCount": "Clients",
"lang_clientList": "Liste der Clients",
+ "lang_clients": "Clients",
"lang_clientsByLocation": "Clients nach Raum\/Ort",
"lang_comment": "Kommentar",
+ "lang_complete": "Komplett",
"lang_count": "Anzahl",
"lang_disabled": "Deaktiviert",
"lang_diskFree": "Freier Speicher",
- "lang_dnbd3IntroText": "DNBD3 ist ein verteiltes Speichersystem speziell f\u00fcr die Anforderungen von bwLehrpool. Erst in Verbindung mit mindestens einem Proxy (zus\u00e4tzlich zum Satellitenserver) kann das System seine Geschwindigkeitsvorteile gegen\u00fcber NFS\/CIFS ausspielen. F\u00fcr schlecht angebundene Poolr\u00e4ume empfiehlt sich jeweils ein eigener Proxy-Server.\r\nBitte beachten Sie die Hinweise im Wiki.",
+ "lang_dnbd3IntroText": "DNBD3 ist ein verteiltes Speichersystem speziell f\u00fcr die Anforderungen von bwLehrpool. Erst in Verbindung mit mindestens einem Proxy (zus\u00e4tzlich zum Satellitenserver) kann das System seine Geschwindigkeitsvorteile gegen\u00fcber NFS\/CIFS ausspielen. F\u00fcr schlecht angebundene Poolr\u00e4ume empfiehlt sich jeweils ein eigener Proxy-Server. Bitte beachten Sie die Hinweise im Wiki.",
"lang_dnbd3Management": "DNBD3 Verwaltung",
"lang_dnbd3Status": "DNBD3 Status",
"lang_editProxyHeading": "Proxy-Einstellungen bearbeiten",
@@ -24,11 +26,13 @@
"lang_enterIpOfServer": "Bitte geben Sie die IP-Adresse des hinzuzuf\u00fcgenden Servers ein",
"lang_externalServer": "Externer DNBD3-Server",
"lang_externalServerAdd": "Externen Server hinzuf\u00fcgen",
- "lang_externalServerHelp": "Ein externer Server wird nicht \u00fcber den Satellitenserver konfiguriert und verwaltet. Das Installieren, Einrichten und ggf. Aktualisieren der DNBD3-Serversoftware muss manuell durchgef\u00fchrt werden.\r\nDies bietet mehr Flexibilit\u00e4t bei der Konfiguration und Anpassung, z.B. bei der Verwendung von RAID- oder bcache-Setups, oder wenn der DNBD3-Server auf einer Maschine laufen soll, die noch andere Services bereitstellt.\r\nWeitere Informationen dazu finden Sie im Wiki.",
+ "lang_externalServerHelp": "Ein externer Server wird nicht \u00fcber den Satellitenserver konfiguriert und verwaltet. Das Installieren, Einrichten und ggf. Aktualisieren der DNBD3-Serversoftware muss manuell durchgef\u00fchrt werden. Dies bietet mehr Flexibilit\u00e4t bei der Konfiguration und Anpassung, z.B. bei der Verwendung von RAID- oder bcache-Setups, oder wenn der DNBD3-Server auf einer Maschine laufen soll, die noch andere Services bereitstellt. Weitere Informationen dazu finden Sie im Wiki.",
"lang_firewallInfo": "Wird ein Proxy auf einen oder mehrere R\u00e4ume beschr\u00e4nkt, werden Clients aus anderen R\u00e4umen diesen Proxy nicht verwenden. Technisch ist der Zugriff aus anderen R\u00e4umen jedoch trotzdem noch m\u00f6glich. Mit aktivieren dieser Option wird der Zugriff aus anderen R\u00e4umen per Firewall verhindert.",
"lang_firewalled": "Zugriff auf zugewiesene R\u00e4ume beschr\u00e4nken",
"lang_flags": "Flags",
"lang_global": "Global",
+ "lang_image": "Image",
+ "lang_imageList": "Image-Liste",
"lang_lastSeen": "Letzte Aktivit\u00e4t",
"lang_latency": "Latenz",
"lang_location": "Ort",
@@ -36,7 +40,9 @@
"lang_manageAccessTo": "Zugriff auf Server festlegen:",
"lang_managedServer": "Automatisch konfigurierter DNBD3-Proxy",
"lang_managedServerAdd": "Automatisch konfigurierten Proxy hinzuf\u00fcgen",
- "lang_managedServerHelp": "Automatisch konfigurierte DNBD3-Proxies booten wie gew\u00f6hnliche bwLehrpool-Clients via PXE \u00fcber den Satelliten-Server. Sobald ein bwLehrpool-Client als DNBD3-Proxy konfiguriert wird, erh\u00e4lt er beim Booten eine gesonderte Konfiguration, sodass er fortan exklusiv als DNBD3-Proxy arbeitet, und nicht mehr als Arbeitsstation zur Verf\u00fcgung steht.\r\nDer Vorteil ist, dass die Konfiguration automatisiert erfolgt, und durch w\u00f6chentliche Reboots sichergestellt wird, dass eventuelle Updates des MiniLinux angewendet werden.\r\nIn diesem Fall legen Sie bitte eine Partition mit der ID 45 auf der Festplatte des Proxy-Servers an; diese wird persistent Behandelt und im Gegensatz zur ID44-Partition nicht beim Booten formatiert. Generell sollte diese Partition so gro\u00df wie m\u00f6glich sein, abh\u00e4ngig von der Anzahl der genutzten VMs. Bei Platzmangel l\u00f6scht der Proxy automatisch die VM, die am l\u00e4ngsten nicht verwendet wurde, um neuen VMs Platz zu machen.\r\nWeitere Informationen dazu finden Sie im Wiki.",
+ "lang_managedServerHelp": "Automatisch konfigurierte DNBD3-Proxies booten wie gew\u00f6hnliche bwLehrpool-Clients via PXE \u00fcber den Satelliten-Server. Sobald ein bwLehrpool-Client als DNBD3-Proxy konfiguriert wird, erh\u00e4lt er beim Booten eine gesonderte Konfiguration, sodass er fortan exklusiv als DNBD3-Proxy arbeitet, und nicht mehr als Arbeitsstation zur Verf\u00fcgung steht. Der Vorteil ist, dass die Konfiguration automatisiert erfolgt, und durch w\u00f6chentliche Reboots sichergestellt wird, dass eventuelle Updates des MiniLinux angewendet werden. In diesem Fall legen Sie bitte eine Partition mit der ID 45 auf der Festplatte des Proxy-Servers an; diese wird persistent Behandelt und im Gegensatz zur ID44-Partition nicht beim Booten formatiert. Generell sollte diese Partition so gro\u00df wie m\u00f6glich sein, abh\u00e4ngig von der Anzahl der genutzten VMs. Bei Platzmangel l\u00f6scht der Proxy automatisch die VM, die am l\u00e4ngsten nicht verwendet wurde, um neuen VMs Platz zu machen. Weitere Informationen dazu finden Sie im Wiki.",
+ "lang_manualRefresh": "Jetzt abfragen",
+ "lang_manualRefreshInfo": "Normalerweile werden die in dieser Tabelle angezeigten Daten alle 5 Minuten aktualisiert. Mit diesem Button k\u00f6nnen Sie die Daten sofort aktualisieren.",
"lang_numFails": "Fehler",
"lang_overrideIp": "Zu verwendende IP-Adresse",
"lang_overrideIpInfo": "Normalerweise wird die automatisch per DHCP zugewiesene Adresse auf dem Boot-Interface verwendet. Falls der Proxy mit weiteren Netzwerkkarten ausgestattet ist (die ebenfalls per DHCP konfiguriert werden) kann durch Angabe einer solchen Alternativadresse hier die Verwendung der entsprechenden Karte erzwungen werden.",
@@ -52,9 +58,11 @@
"lang_sessionRx": "Seit Neustart empfangen",
"lang_sessionTx": "Seit Neustart gesendet",
"lang_settings": "Einstellungen",
+ "lang_size": "Gr\u00f6\u00dfe",
"lang_storageSize": "Speichergr\u00f6\u00dfe",
"lang_test": "Testen",
"lang_txTotal": "Gesamt gesendet",
+ "lang_uplink": "Uplink",
"lang_uptime": "Aktuelle Laufzeit",
"lang_wantToDelete": "Wollen Sie diesen Server wirklich entfernen? (Rebooten\/Ausschalten muss in diesem Fall manuell vorgenommen werden)"
} \ No newline at end of file
diff --git a/modules-available/dnbd3/lang/en/permissions.json b/modules-available/dnbd3/lang/en/permissions.json
new file mode 100644
index 00000000..112deb94
--- /dev/null
+++ b/modules-available/dnbd3/lang/en/permissions.json
@@ -0,0 +1,8 @@
+{
+ "access-page": "View this page",
+ "configure.external": "Edit external proxy",
+ "configure.proxy": "Edit automatic proxy",
+ "refresh": "Refresh server list",
+ "toggle-usage": "Activate\/Deactivate",
+ "view.details": "Show proxy details"
+} \ No newline at end of file
diff --git a/modules-available/dnbd3/lang/en/template-tags.json b/modules-available/dnbd3/lang/en/template-tags.json
index 81b9d538..aef8ae75 100644
--- a/modules-available/dnbd3/lang/en/template-tags.json
+++ b/modules-available/dnbd3/lang/en/template-tags.json
@@ -10,8 +10,10 @@
"lang_client": "Client",
"lang_clientCount": "Clients",
"lang_clientList": "List of clients",
+ "lang_clients": "Clients",
"lang_clientsByLocation": "Clients by location",
"lang_comment": "Comment",
+ "lang_complete": "Complete",
"lang_count": "Count",
"lang_disabled": "Disabled",
"lang_diskFree": "Free space",
@@ -29,6 +31,8 @@
"lang_firewalled": "Limit access to corresponding locations",
"lang_flags": "Flags",
"lang_global": "Global",
+ "lang_image": "Image",
+ "lang_imageList": "Image list",
"lang_lastSeen": "Last seen",
"lang_latency": "Latency",
"lang_location": "Location",
@@ -37,6 +41,8 @@
"lang_managedServer": "Automatically configured DNBD3-Proxy",
"lang_managedServerAdd": "Add automatically configured proxy",
"lang_managedServerHelp": "Automatically configured DNBD3-Proxies will boot like normal bwLehrpool-Clients over PXE and the satellite server. If a client is configured as proxy it will boot with a different configuration and acts exclusively as proxy. The client can therefore not be used as a normal working station.\r\nThe advantage is that you don't need to install or configure anything else. The client will reboot every week to get possible updates ot the minilinux.\r\nIf you want to use this feature, please create a partition with ID 45 on the local hard disk of the proxy server. In contrast to the ID 44 partition which is formated after every reboot, this partition is persistent. As a rule of thumb the partition should be as big as possible. If there is no space left the proxy will delete the VM which hasn't be used for the longest time. More information in the wiki.",
+ "lang_manualRefresh": "Manual refresh",
+ "lang_manualRefreshInfo": "All servers are queried every 5 minutes to update the table below. Hit the refresh button to update the table immediately.",
"lang_numFails": "Errors",
"lang_overrideIp": "IP address to use",
"lang_overrideIpInfo": "Usually the address that the DHCP server assigns to the boot interface of the proxy will be used. If the proxy has multiple interfaces (that also get an address assigned via DHCP) you can specify that address here to enforce their usage instead.",
@@ -52,9 +58,11 @@
"lang_sessionRx": "Received since boot",
"lang_sessionTx": "Sent since boot",
"lang_settings": "Settings",
+ "lang_size": "Size",
"lang_storageSize": "Storage size",
"lang_test": "Test",
"lang_txTotal": "Total sent",
+ "lang_uplink": "Uplink",
"lang_uptime": "Uptime",
"lang_wantToDelete": "Do you really want to delete this server? (Reboot\/Shutdown has to be done manually)"
} \ No newline at end of file
diff --git a/modules-available/dnbd3/page.inc.php b/modules-available/dnbd3/page.inc.php
index afcb9b2c..6e4f8885 100644
--- a/modules-available/dnbd3/page.inc.php
+++ b/modules-available/dnbd3/page.inc.php
@@ -163,7 +163,7 @@ class Page_Dnbd3 extends Page
private function showServerList()
{
- User::assertPermission('view.list');
+ User::assertPermission('access-page');
$dynClients = RunMode::getForMode(Page::getModule(), 'proxy', true, true);
$res = Database::simpleQuery('SELECT s.serverid, s.machineuuid, s.fixedip, s.lastseen AS dnbd3lastseen,
s.uptime, s.totalup, s.totaldown, s.clientcount, s.disktotal, s.diskfree, GROUP_CONCAT(sxl.locationid) AS locations,
@@ -264,41 +264,46 @@ class Page_Dnbd3 extends Page
User::assertPermission('view.details');
$server = $this->getServerById();
Render::addTemplate('page-proxy-header', $server);
- $stats = Dnbd3Rpc::query($server['ip'], 5003, true, true, false, true);
+ $stats = Dnbd3Rpc::query($server['ip'], 5003, true, true, true, true, true, true);
if (!is_array($stats) || !isset($stats['runId'])) {
Message::addError('server-unreachable');
return;
}
- $stats['bytesSent_s'] = Util::readableFileSize($stats['bytesSent']);
- $stats['bytesReceived_s'] = Util::readableFileSize($stats['bytesReceived']);
+ foreach (['bytesSent', 'bytesReceived', 'spaceTotal', 'spaceFree'] as $key) {
+ $stats[$key . '_s'] = Util::readableFileSize($stats[$key]);
+ }
+ if ($stats['spaceTotal'] > 0) {
+ $stats['percentFree'] = ($stats['spaceFree'] / $stats['spaceTotal']) * 100;
+ $stats['percentFree'] = round($stats['percentFree'], $stats['percentFree'] < 10 ? 1 : 0);
+ }
$stats['uptime_s'] = floor($stats['uptime'] / 86400) . 'd ' . gmdate('H:i:s', $stats['uptime']);
+ $stats['tab_config'] = is_string($stats['config']);
+ $stats['tab_altservers'] = is_array($stats['altservers']);
Render::addTemplate('page-proxy-stats', $stats);
- // TODO $images = Dnbd3Rpc::query($server['ip'], 5003, false, false, true);
- $confAlts = Dnbd3Rpc::query($server['ip'], 5003, false, false, false, false, true, true);
+ Render::openTag('div', ['class' => 'tab-content']);
$ips = array();
$sort = array();
foreach ($stats['clients'] as &$c) {
$c['bytesSent_s'] = Util::readableFileSize($c['bytesSent']);
$sort[] = $c['bytesSent'];
- $ips[] = preg_replace('/:\d+$/', '', $c['address']);
+ $ips[preg_replace('/:\d+$/', '', $c['address'])] = true;
}
+ $ips = array_keys($ips);
array_multisort($sort, SORT_DESC, $stats['clients']);
- Render::openTag('div', ['class' => 'row']);
// Config
- if (is_string($confAlts['config'])) {
- Render::addTemplate('page-proxy-config', $confAlts);
+ if (is_string($stats['config'])) {
+ Render::addTemplate('page-proxy-config', $stats);
}
- if (is_array($confAlts['altservers'])) {
- foreach ($confAlts['altservers'] as &$as) {
+ if (is_array($stats['altservers'])) {
+ foreach ($stats['altservers'] as &$as) {
$as['rtt'] = round(array_sum($as['rtt']) / count($as['rtt']) / 1000, 2);
}
unset($as);
- Render::addTemplate('page-proxy-altservers', $confAlts);
+ Render::addTemplate('page-proxy-altservers', $stats);
}
- Render::closeTag('div');
- Render::openTag('div', ['class' => 'row']);
// Count locations
- $res = Database::simpleQuery('SELECT locationid, Count(*) AS cnt FROM machine WHERE clientip IN (:ips) GROUP BY locationid', compact('ips'));
+ $res = Database::simpleQuery("SELECT locationid, Count(*) AS cnt FROM machine
+ WHERE clientip IN (:ips) AND state IN ('IDLE', 'OCCUPIED') GROUP BY locationid", compact('ips'));
$locCount = Location::getLocationsAssoc();
$locCount[0] = array(
'locationname' => '/',
@@ -326,10 +331,17 @@ class Page_Dnbd3 extends Page
}
}
if ($showLocs) {
- $locCount = array_filter($locCount, function ($v) { return isset($v['keep']); });
- Render::addTemplate('page-proxy-loclist', array('list' => array_values($locCount)));
+ $stats['loclist'] = array_values(array_filter($locCount, function ($v) { return isset($v['keep']); }));
}
Render::addTemplate('page-proxy-clients', $stats);
+ $sort1 = $sort2 = [];
+ foreach ($stats['images'] as &$image) {
+ $image['size_s'] = Util::readableFileSize($image['size']);
+ $sort1[] = $image['users'];
+ $sort2[] = $image['name'];
+ }
+ array_multisort($sort1, SORT_NUMERIC | SORT_DESC, $sort2, SORT_ASC, $stats['images']);
+ Render::addTemplate('page-proxy-images', $stats);
Render::closeTag('div');
}
diff --git a/modules-available/dnbd3/permissions/permissions.json b/modules-available/dnbd3/permissions/permissions.json
index 1939e32a..77a72d62 100644
--- a/modules-available/dnbd3/permissions/permissions.json
+++ b/modules-available/dnbd3/permissions/permissions.json
@@ -1,11 +1,11 @@
{
- "toggle-usage": {
+ "access-page": {
"location-aware": false
},
- "refresh": {
+ "toggle-usage": {
"location-aware": false
},
- "view.list": {
+ "refresh": {
"location-aware": false
},
"view.details": {
diff --git a/modules-available/dnbd3/templates/page-proxy-altservers.html b/modules-available/dnbd3/templates/page-proxy-altservers.html
index 00a884cc..d2e520f9 100644
--- a/modules-available/dnbd3/templates/page-proxy-altservers.html
+++ b/modules-available/dnbd3/templates/page-proxy-altservers.html
@@ -1,11 +1,11 @@
-<div class="col-md-6">
+<div role="tabpanel" class="tab-pane" id="tab-altservers">
<h2>{{lang_altservers}}</h2>
<table class="table table-condensed">
<tr>
- <th>{{lang_proxyServerTHead}}</th>
- <th>{{lang_numFails}}</th>
- <th class="text-right">{{lang_latency}}</th>
- <th>{{lang_flags}}</th>
+ <th class="slx-smallcol">{{lang_proxyServerTHead}}</th>
+ <th class="slx-smallcol">{{lang_numFails}}</th>
+ <th class="text-right slx-smallcol">{{lang_latency}}</th>
+ <th class="slx-smallcol">{{lang_flags}}</th>
<th>{{lang_comment}}</th>
</tr>
{{#altservers}}
@@ -21,7 +21,7 @@
{{rtt}}&thinsp;ms
{{/isClientOnly}}
</td>
- <td>
+ <td class="text-nowrap">
{{#isClientOnly}}
[CO]
{{/isClientOnly}}
diff --git a/modules-available/dnbd3/templates/page-proxy-clients.html b/modules-available/dnbd3/templates/page-proxy-clients.html
index 9e7cec4c..6733a056 100644
--- a/modules-available/dnbd3/templates/page-proxy-clients.html
+++ b/modules-available/dnbd3/templates/page-proxy-clients.html
@@ -1,20 +1,53 @@
-<div class="col-md-6">
- <h2>{{lang_clientList}}</h2>
+<div role="tabpanel" class="tab-pane active" id="tab-clients">
+ <div class="row">
+ <div class="col-md-6">
+ {{#loclist.0}}
+ <h2>{{lang_clientsByLocation}}</h2>
- <table class="table table-condensed">
- <tr>
- <th>{{lang_client}}</th>
- <th class="text-right">{{lang_bytesSent}}</th>
- </tr>
- {{#clients}}
- <tr>
- <td>
- {{address}}
- </td>
- <td data-sort="int" data-sort-value="{{bytesSent}}" class="text-right">
- {{bytesSent_s}}
- </td>
- </tr>
- {{/clients}}
- </table>
+ <table class="table table-condensed">
+ <tr>
+ <th>{{lang_location}}</th>
+ <th class="text-right">{{lang_count}}</th>
+ <th class="text-right">{{lang_recursiveCount}}</th>
+ </tr>
+ {{#loclist}}
+ <tr>
+ <td>
+ {{#depth}}
+ <div style="display:inline-block;width:{{depth}}em"></div>
+ {{/depth}}
+ {{locationname}}
+ </td>
+ <td class="text-right">
+ {{clientCount}}
+ </td>
+ <td class="text-right">
+ {{recCount}}
+ </td>
+ </tr>
+ {{/loclist}}
+ </table>
+ {{/loclist.0}}
+ </div>
+ <div class="col-md-6">
+ <h2>{{lang_clientList}}</h2>
+
+ <table class="table table-condensed">
+ <tr>
+ <th>{{lang_client}}</th>
+ <th class="text-right">{{lang_bytesSent}}</th>
+ </tr>
+ {{#clients}}
+ <tr>
+ <td>
+ {{address}}
+ </td>
+ <td data-sort="int" data-sort-value="{{bytesSent}}" class="text-right">
+ {{bytesSent_s}}
+ </td>
+ </tr>
+ {{/clients}}
+ </table>
+ </div>
+ </div>
</div> \ No newline at end of file
diff --git a/modules-available/dnbd3/templates/page-proxy-config.html b/modules-available/dnbd3/templates/page-proxy-config.html
index adc73a57..79f56015 100644
--- a/modules-available/dnbd3/templates/page-proxy-config.html
+++ b/modules-available/dnbd3/templates/page-proxy-config.html
@@ -1,4 +1,4 @@
-<div class="col-md-6">
+<div role="tabpanel" class="tab-pane" id="tab-config">
<h2>{{lang_proxyConfig}}</h2>
<pre>{{config}}</pre>
</div> \ No newline at end of file
diff --git a/modules-available/dnbd3/templates/page-proxy-header.html b/modules-available/dnbd3/templates/page-proxy-header.html
index 6f3f1b7f..7f3418cc 100644
--- a/modules-available/dnbd3/templates/page-proxy-header.html
+++ b/modules-available/dnbd3/templates/page-proxy-header.html
@@ -1 +1,2 @@
-<h1>{{ip}}</h1> \ No newline at end of file
+<h1>{{ip}}</h1>
+
diff --git a/modules-available/dnbd3/templates/page-proxy-images.html b/modules-available/dnbd3/templates/page-proxy-images.html
new file mode 100644
index 00000000..7e30de20
--- /dev/null
+++ b/modules-available/dnbd3/templates/page-proxy-images.html
@@ -0,0 +1,31 @@
+<div role="tabpanel" class="tab-pane" id="tab-images">
+ <h2>{{lang_imageList}}</h2>
+ <table class="table table-condensed">
+ <tr>
+ <th>{{lang_image}}</th>
+ <th class="text-right slx-smallcol">{{lang_clients}}</th>
+ <th class="text-right slx-smallcol">{{lang_size}}</th>
+ <th class="text-right slx-smallcol">{{lang_complete}}</th>
+ <th class="slx-smallcol">{{lang_uplink}}</th>
+ </tr>
+ {{#images}}
+ <tr>
+ <td class="text-nowrap">
+ {{name}}:{{rid}}
+ </td>
+ <td class="text-right text-nowrap">
+ {{users}}
+ </td>
+ <td class="text-right text-nowrap">
+ {{size_s}}
+ </td>
+ <td class="text-right text-nowrap">
+ {{complete}}&thinsp;%
+ </td>
+ <td class="text-nowrap">
+ {{uplinkServer}}
+ </td>
+ </tr>
+ {{/images}}
+ </table>
+</div> \ No newline at end of file
diff --git a/modules-available/dnbd3/templates/page-proxy-loclist.html b/modules-available/dnbd3/templates/page-proxy-loclist.html
deleted file mode 100644
index 67c90683..00000000
--- a/modules-available/dnbd3/templates/page-proxy-loclist.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<div class="col-md-6">
- <h2>{{lang_clientsByLocation}}</h2>
-
- <table class="table table-condensed">
- <tr>
- <th>{{lang_location}}</th>
- <th class="text-right">{{lang_count}}</th>
- <th class="text-right">{{lang_recursiveCount}}</th>
- </tr>
- {{#list}}
- <tr>
- <td>
- {{#depth}}
- <div style="display:inline-block;width:{{depth}}em"></div>
- {{/depth}}
- {{locationname}}
- </td>
- <td class="text-right">
- {{clientCount}}
- </td>
- <td class="text-right">
- {{recCount}}
- </td>
- </tr>
- {{/list}}
- </table>
-</div> \ No newline at end of file
diff --git a/modules-available/dnbd3/templates/page-proxy-stats.html b/modules-available/dnbd3/templates/page-proxy-stats.html
index e7811028..a866903c 100644
--- a/modules-available/dnbd3/templates/page-proxy-stats.html
+++ b/modules-available/dnbd3/templates/page-proxy-stats.html
@@ -1,9 +1,27 @@
<div class="panel panel-default">
<div class="panel-body">
- {{lang_sessionTx}}: <b>{{bytesSent_s}}</b>
- ––
- {{lang_sessionRx}}: <b>{{bytesReceived_s}}</b>
- ––
- {{lang_uptime}}: <b>{{uptime_s}}</b>
+ <div>
+ {{lang_sessionTx}}: <b>{{bytesSent_s}}</b>
+ ––
+ {{lang_sessionRx}}: <b>{{bytesReceived_s}}</b>
+ ––
+ {{lang_uptime}}: <b>{{uptime_s}}</b>
+ </div>
+ <div>
+ {{lang_storageSize}}: <b>{{spaceTotal_s}}</b>
+ ––
+ {{lang_diskFree}}: <b>{{spaceFree_s}} ({{percentFree}}&thinsp;%)</b>
+ </div>
</div>
-</div> \ No newline at end of file
+</div>
+
+<ul class="nav nav-tabs text-center" role="tablist">
+ {{#tab_config}}
+ <li role="presentation"><a href="#tab-config" role="tab" data-toggle="tab">{{lang_proxyConfig}}</a></li>
+ {{/tab_config}}
+ <li role="presentation" class="active"><a href="#tab-clients" role="tab" data-toggle="tab">{{lang_clientList}}</a></li>
+ <li role="presentation"><a href="#tab-images" role="tab" data-toggle="tab">{{lang_imageList}}</a></li>
+ {{#tab_altservers}}
+ <li role="presentation"><a href="#tab-altservers" role="tab" data-toggle="tab">{{lang_altservers}}</a></li>
+ {{/tab_altservers}}
+</ul> \ No newline at end of file
diff --git a/modules-available/dozmod/pages/users.inc.php b/modules-available/dozmod/pages/users.inc.php
index 79d13827..0791da2e 100644
--- a/modules-available/dozmod/pages/users.inc.php
+++ b/modules-available/dozmod/pages/users.inc.php
@@ -14,7 +14,7 @@ class SubPage
self::listOrganizations();
}
- protected static function doAjax()
+ public static function doAjax()
{
User::load();
diff --git a/modules-available/locationinfo/lang/de/permissions.json b/modules-available/locationinfo/lang/de/permissions.json
new file mode 100644
index 00000000..1cd78eab
--- /dev/null
+++ b/modules-available/locationinfo/lang/de/permissions.json
@@ -0,0 +1,8 @@
+{
+ "backend.check": "Backend Verbindung pr\u00fcfen",
+ "backend.edit": "Backend bearbeiten",
+ "location.edit": "Raum\/Ort Einstellungen bearbeiten",
+ "panel.assign-client": "Client als Infoscreen festlegen",
+ "panel.edit": "Panel bearbeiten",
+ "panel.list": "Panel anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/locationinfo/lang/en/permissions.json b/modules-available/locationinfo/lang/en/permissions.json
new file mode 100644
index 00000000..4b620b04
--- /dev/null
+++ b/modules-available/locationinfo/lang/en/permissions.json
@@ -0,0 +1,8 @@
+{
+ "backend.check": "Test backend connection",
+ "backend.edit": "Edit backend",
+ "location.edit": "Edit location settings",
+ "panel.assign-client": "Set client as infoscreen",
+ "panel.edit": "Edit panel",
+ "panel.list": "List panels"
+} \ No newline at end of file
diff --git a/modules-available/locations/lang/de/template-tags.json b/modules-available/locations/lang/de/template-tags.json
index 04d10d06..43142555 100644
--- a/modules-available/locations/lang/de/template-tags.json
+++ b/modules-available/locations/lang/de/template-tags.json
@@ -6,7 +6,7 @@
"lang_deleteChildLocations": "Untergeordnete Orte ebenfalls l\u00f6schen",
"lang_deleteLocation": "Ort l\u00f6schen",
"lang_deleteSubnet": "Bereich l\u00f6schen",
- "lang_deleteSubnetWarning": "Alle zum L\u00f6schen markierten Subnetze werden gelöscht. Diese Aktion kann nicht r\u00fcckg\u00e4ngig gemacht werden.",
+ "lang_deleteSubnetWarning": "Alle zum L\u00f6schen markierten Subnetze werden gel\u00f6scht. Diese Aktion kann nicht r\u00fcckg\u00e4ngig gemacht werden.",
"lang_editConfigVariables": "Konfig.-Variablen",
"lang_editRoomplan": "Raumplan bearbeiten",
"lang_endAddress": "Endadresse",
@@ -22,10 +22,10 @@
"lang_machineLoad": "Besetzt",
"lang_matchingMachines": "Enthaltene Rechner",
"lang_name": "Name",
- "lang_noParent": "Kein \u00fcbergeordneter Ort",
"lang_overrideCount": "Angepasst",
"lang_parentLocation": "\u00dcbergeordneter Ort",
"lang_referencingLectures": "Veranstaltungen",
+ "lang_showRoomplan": "Raumplan anzeigen",
"lang_startAddress": "Startadresse",
"lang_subnet": "IP-Bereich",
"lang_sysConfig": "Lokalisierung",
diff --git a/modules-available/locations/lang/en/template-tags.json b/modules-available/locations/lang/en/template-tags.json
index ddb90f83..41261726 100644
--- a/modules-available/locations/lang/en/template-tags.json
+++ b/modules-available/locations/lang/en/template-tags.json
@@ -22,14 +22,14 @@
"lang_machineLoad": "In use",
"lang_matchingMachines": "Matching clients",
"lang_name": "Name",
- "lang_noParent": "No parent",
"lang_overrideCount": "Overridden",
"lang_parentLocation": "Parent location",
"lang_referencingLectures": "Assigned Lectures",
+ "lang_showRoomplan": "Show room plan",
"lang_startAddress": "Start address",
"lang_subnet": "IP range",
"lang_sysConfig": "Localization\/Integration",
"lang_thisListByLocation": "Locations",
"lang_thisListBySubnet": "Subnets",
"lang_unassignedMachines": "Machines not matching any location"
-}
+} \ No newline at end of file
diff --git a/modules-available/main/install.inc.php b/modules-available/main/install.inc.php
index e364a905..ec8554fd 100644
--- a/modules-available/main/install.inc.php
+++ b/modules-available/main/install.inc.php
@@ -43,6 +43,7 @@ $res[] = tableCreate('user', "
`email` varchar(100) DEFAULT NULL,
`permissions` int(10) unsigned NOT NULL,
`lasteventid` int(10) unsigned NOT NULL DEFAULT '0',
+ `serverid` int(10) unsigned NULL DEFAULT NULL,
PRIMARY KEY (`userid`),
UNIQUE KEY `login` (`login`)
");
@@ -72,6 +73,20 @@ if (!tableHasColumn('callback', 'args')) {
Database::exec("ALTER TABLE `callback` ADD `args` TEXT NOT NULL DEFAULT ''");
}
+// #######################
+// ##### 2018-03-19
+// In preparation for LDAP/AD auth: Column to rembember origin server
+if (!tableHasColumn('user', 'serverid')) {
+ Database::exec("ALTER TABLE `user` ADD `serverid` int(10) unsigned NULL DEFAULT NULL");
+}
+
+// Make sure that if any users exist, one of the has UID=1, otherwise if the permission module is
+// used we'd lock out everyone
+$someUser = Database::queryFirst('SELECT userid FROM user ORDER BY userid ASC LIMIT 1');
+if ($someUser !== false && (int)$someUser['userid'] !== 1) {
+ Database::exec('UPDATE user SET userid = 1 WHERE userid = :oldid', ['oldid' => $someUser['userid']]);
+}
+
// Create response for browser
if (in_array(UPDATE_DONE, $res)) {
diff --git a/modules-available/minilinux/lang/de/permissions.json b/modules-available/minilinux/lang/de/permissions.json
index 372ffc88..29012620 100644
--- a/modules-available/minilinux/lang/de/permissions.json
+++ b/modules-available/minilinux/lang/de/permissions.json
@@ -1,4 +1,4 @@
{
- "show": "Zeige Komponenten des Minilinux. Wird nicht benötigt, wenn Nutzer eine der anderen Rechte hat.",
+ "view": "Zeige Komponenten des Minilinux. Wird nicht benötigt, wenn Nutzer eine der anderen Rechte hat.",
"update": "Aktualisieren von Komponenten des Minilinux."
} \ No newline at end of file
diff --git a/modules-available/minilinux/lang/de/template-tags.json b/modules-available/minilinux/lang/de/template-tags.json
index 18a8b7af..60a11db9 100644
--- a/modules-available/minilinux/lang/de/template-tags.json
+++ b/modules-available/minilinux/lang/de/template-tags.json
@@ -1,5 +1,4 @@
{
- "lang_uptodate": "Aktuell",
"lang_canUpdate1": "Mindestens eine Komponente von",
"lang_canUpdate2": "kann aktualisiert werden. F\u00fcr einen reibungslosen Betrieb wird empfohlen, alle Komponenten auf dem aktuellen Stand zu halten.",
"lang_configurationPackageNotFound": "Keine Konfigurationspakete gefunden!",
@@ -10,5 +9,7 @@
"lang_outdated": "Veraltet",
"lang_redownload": "Erneut herunterladen",
"lang_systemUpdated": "Das System ist auf dem aktuellen Stand.",
- "lang_update": "Aktualisieren"
+ "lang_update": "Aktualisieren",
+ "lang_updateAll": "Alle Module aktualisieren",
+ "lang_uptodate": "Aktuell"
} \ No newline at end of file
diff --git a/modules-available/minilinux/lang/en/permissions.json b/modules-available/minilinux/lang/en/permissions.json
index 878388b0..b8389e62 100644
--- a/modules-available/minilinux/lang/en/permissions.json
+++ b/modules-available/minilinux/lang/en/permissions.json
@@ -1,4 +1,4 @@
{
- "show": "Show list of minilinux components. Not needed if User has any of the other permissions.",
+ "view": "Show list of minilinux components. Not needed if User has any of the other permissions.",
"update": "Update minilinux components."
} \ No newline at end of file
diff --git a/modules-available/minilinux/lang/en/template-tags.json b/modules-available/minilinux/lang/en/template-tags.json
index aef15c03..48ba0c15 100644
--- a/modules-available/minilinux/lang/en/template-tags.json
+++ b/modules-available/minilinux/lang/en/template-tags.json
@@ -1,5 +1,4 @@
{
- "lang_uptodate": "Up to date",
"lang_canUpdate1": "At least one component of",
"lang_canUpdate2": "Can be updated. For a smooth operation, it is recommended to keep all components up to date.",
"lang_configurationPackageNotFound": "Configuration package not found!",
@@ -10,5 +9,7 @@
"lang_outdated": "Outdated",
"lang_redownload": "Download again",
"lang_systemUpdated": "The system is up to date.",
- "lang_update": "Update"
+ "lang_update": "Update",
+ "lang_updateAll": "Update all modules",
+ "lang_uptodate": "Up to date"
} \ No newline at end of file
diff --git a/modules-available/minilinux/page.inc.php b/modules-available/minilinux/page.inc.php
index 6a331e1e..2488b2dc 100644
--- a/modules-available/minilinux/page.inc.php
+++ b/modules-available/minilinux/page.inc.php
@@ -12,7 +12,7 @@ class Page_MiniLinux extends Page
Util::redirect('?do=Main');
}
- User::assertPermission('show');
+ User::assertPermission('view');
}
protected function doRender()
diff --git a/modules-available/minilinux/permissions/permissions.json b/modules-available/minilinux/permissions/permissions.json
index 650f7e71..b018ee72 100644
--- a/modules-available/minilinux/permissions/permissions.json
+++ b/modules-available/minilinux/permissions/permissions.json
@@ -1,5 +1,5 @@
{
- "show": {
+ "view": {
"location-aware": false
},
"update": {
diff --git a/modules-available/minilinux/templates/filelist.html b/modules-available/minilinux/templates/filelist.html
index 8df868d2..3c840c57 100644
--- a/modules-available/minilinux/templates/filelist.html
+++ b/modules-available/minilinux/templates/filelist.html
@@ -18,7 +18,7 @@
<p>
{{lang_canUpdate1}} <b>{{title}}</b> {{lang_canUpdate2}}
</p>
- <button {{perms.update.disabled}} class="btn btn-primary" onclick="slxUpdateAll(this, 'download-{{id}}')"><span class="glyphicon glyphicon-refresh"></span> {{lang_update}}<span></span></button>
+ <button {{perms.update.disabled}} class="btn btn-primary" onclick="slxUpdateAll(this, 'download-{{id}}')"><span class="glyphicon glyphicon-refresh"></span> {{lang_updateAll}}<span></span></button>
{{/systemChanged}}
{{^systemChanged}}
<p>{{lang_systemUpdated}}</p>
diff --git a/modules-available/rebootcontrol/page.inc.php b/modules-available/rebootcontrol/page.inc.php
index fa7688d8..abbdb2c3 100644
--- a/modules-available/rebootcontrol/page.inc.php
+++ b/modules-available/rebootcontrol/page.inc.php
@@ -38,7 +38,7 @@ class Page_RebootControl extends Page
// Filter ones with no permission
foreach (array_keys($actualClients) as $idx) {
if (!User::hasPermission('action.' . $this->action, $actualClients[$idx]['locationid'])) {
- Message::addWarning('main.location-no-permission', $actualClients[$idx]['locationid']);
+ Message::addWarning('locations.no-permission-location', $actualClients[$idx]['locationid']);
unset($actualClients[$idx]);
} else {
$locationId = $actualClients[$idx]['locationid'];
diff --git a/modules-available/runmode/lang/de/messages.json b/modules-available/runmode/lang/de/messages.json
index 911d48d4..bca70019 100644
--- a/modules-available/runmode/lang/de/messages.json
+++ b/modules-available/runmode/lang/de/messages.json
@@ -2,6 +2,7 @@
"cannot-edit-module": "Modul {{0}} kann nicht direkt editiert werden",
"enabled-removed-save": "{{0}} Rechner gespeichert, {{1}} entfernt",
"invalid-modeid": "{{1}} ist kein g\u00fcltiger Betriebsmodus f\u00fcr Modul {{0}}",
+ "machine-no-permission": "Keine Berechtigung f\u00fcr client {{0}}",
"machine-not-found": "Rechner {{0}} nicht gefunden",
"machine-not-runmode": "Rechner {{0}} hatte keinen speziellen Betriebsmodus aktiviert",
"machine-removed": "Rechner {{0}} entfernt",
diff --git a/modules-available/runmode/lang/de/permissions.json b/modules-available/runmode/lang/de/permissions.json
new file mode 100644
index 00000000..0a89e027
--- /dev/null
+++ b/modules-available/runmode/lang/de/permissions.json
@@ -0,0 +1,3 @@
+{
+ "list-all": "Betriebsmodi anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/runmode/lang/de/template-tags.json b/modules-available/runmode/lang/de/template-tags.json
index 6b45b82c..989e5b1d 100644
--- a/modules-available/runmode/lang/de/template-tags.json
+++ b/modules-available/runmode/lang/de/template-tags.json
@@ -3,6 +3,7 @@
"lang_assignMachineIntroText": "Definieren Sie hier Clients, die in einem speziellen Betriebsmodus gestartet werden sollen. Sie k\u00f6nnen Rechner anhand der UUID, IP, Hostname oder MAC-Adresse suchen.",
"lang_assignRunmodeToMachine": "Betriebsmodus",
"lang_confirmDelete": "Wollen Sie den Betriebsmodus f\u00fcr diesen Client entfernen?",
+ "lang_existingClients": "Vorhandene Clients mit diesem Betriebsmodus",
"lang_isclient": "Pool-Client",
"lang_machine": "Client",
"lang_mode": "Modus",
diff --git a/modules-available/runmode/lang/en/messages.json b/modules-available/runmode/lang/en/messages.json
index 6d890428..1ca1567a 100644
--- a/modules-available/runmode/lang/en/messages.json
+++ b/modules-available/runmode/lang/en/messages.json
@@ -2,6 +2,7 @@
"cannot-edit-module": "Module {{0}} cannot be edited directly",
"enabled-removed-save": "Saved {{0}} clients, deleted {{1}}",
"invalid-modeid": "Module {{0}} doesn't provide mode {{1}}",
+ "machine-no-permission": "No permission for client {{0}}",
"machine-not-found": "Client {{0}} not found",
"machine-not-runmode": "No special mode of operation configured for client {{0}}",
"machine-removed": "Removed client {{0}}",
diff --git a/modules-available/runmode/lang/en/permissions.json b/modules-available/runmode/lang/en/permissions.json
new file mode 100644
index 00000000..8b3a6e62
--- /dev/null
+++ b/modules-available/runmode/lang/en/permissions.json
@@ -0,0 +1,3 @@
+{
+ "list-all": "Show runmodes"
+} \ No newline at end of file
diff --git a/modules-available/runmode/lang/en/template-tags.json b/modules-available/runmode/lang/en/template-tags.json
index 43fd3da5..89cf6b15 100644
--- a/modules-available/runmode/lang/en/template-tags.json
+++ b/modules-available/runmode/lang/en/template-tags.json
@@ -3,6 +3,7 @@
"lang_assignMachineIntroText": "Define the clients which should start a special runmode configuration. You can search for clients by UUID, IP address, host name or MAC address.",
"lang_assignRunmodeToMachine": "Runmode",
"lang_confirmDelete": "Do you want to delete the runmode for this client?",
+ "lang_existingClients": "Existing clients with this run mode",
"lang_isclient": "Pool-Client",
"lang_machine": "Client",
"lang_mode": "Mode",
diff --git a/modules-available/serversetup-bwlp/lang/de/permissions.json b/modules-available/serversetup-bwlp/lang/de/permissions.json
index 673bf153..65367c51 100644
--- a/modules-available/serversetup-bwlp/lang/de/permissions.json
+++ b/modules-available/serversetup-bwlp/lang/de/permissions.json
@@ -1,5 +1,5 @@
{
- "edit.address": "Boot-Adresse des Servers auswählen.",
- "edit.menu": "Bootmenü anpassen.",
- "download": "USB-Image herunteladen."
+ "download": "USB-Image herunterladen.",
+ "edit.address": "Boot-Adresse des Servers ausw\u00e4hlen.",
+ "edit.menu": "Bootmen\u00fc anpassen."
} \ No newline at end of file
diff --git a/modules-available/statistics/inc/parser.inc.php b/modules-available/statistics/inc/parser.inc.php
index 679055a7..b179b4a3 100644
--- a/modules-available/statistics/inc/parser.inc.php
+++ b/modules-available/statistics/inc/parser.inc.php
@@ -151,24 +151,44 @@ class Parser {
$type = strtolower($out[4]);
if ($type === '5' || $type === 'f' || $type === '85') {
continue;
+ } elseif ($type === '44') {
+ $out[5] = 'OpenSLX-ID44';
+ $color = '#5c1';
+ } elseif ($type === '45') {
+ $out[5] = 'OpenSLX-ID45';
+ $color = '#0d7';
+ } elseif ($type === '82') {
+ $color = '#48f';
+ } else {
+ $color = '#e55';
}
+
$partsize = round(($out[3] - $out[2]) * $mbrToMbFactor);
$hdd['partitions'][] = array(
'id' => $out[1],
'name' => $out[1],
'size' => round($partsize / 1024, $partsize < 1024 ? 1 : 0),
- 'type' => ($type === '44' ? 'OpenSLX' : $out[5]),
+ 'type' => $out[5],
);
$hdd['json'][] = array(
'label' => $out[1],
'value' => $partsize,
- 'color' => ($type === '44' ? '#4d4' : ($type === '82' ? '#48f' : '#e55')),
+ 'color' => $color,
);
$hdd['used'] += $partsize;
} elseif (isset($hdd) && $sectorToMbFactor !== 0 && preg_match(',^\s*(\d+)\s+(\d+)[\+\-]?\s+(\d+)[\+\-]?\s+\S+\s+([0-9a-f]+)\s+(.*)$,i', $line, $out)) {
// --- GPT: Partition entry ---
// Some partition
$type = $out[5];
+ if ($type === 'OpenSLX-ID44') {
+ $color = '#5c1';
+ } elseif ($type === 'OpenSLX-ID45') {
+ $color = '#0d7';
+ } elseif ($type === 'Linux swap') {
+ $color = '#48f';
+ } else {
+ $color = '#e55';
+ }
$id = $hdd['devid'] . '-' . $out[1];
$partsize = round(($out[3] - $out[2]) * $sectorToMbFactor);
$hdd['partitions'][] = array(
@@ -180,7 +200,7 @@ class Parser {
$hdd['json'][] = array(
'label' => $id,
'value' => $partsize,
- 'color' => ($type === 'OpenSLX-ID44' ? '#4d4' : ($type === 'Linux swap' ? '#48f' : '#e55')),
+ 'color' => $color,
);
$hdd['used'] += $partsize;
}
diff --git a/modules-available/statistics/lang/de/permissions.json b/modules-available/statistics/lang/de/permissions.json
index 7b7db89a..8579b28f 100644
--- a/modules-available/statistics/lang/de/permissions.json
+++ b/modules-available/statistics/lang/de/permissions.json
@@ -1,5 +1,12 @@
{
- "view": "Statistiken anschauen.",
- "machine.note": "Anmerkungen zu einem Rechner speichern.",
- "machine.delete": "Rechner löschen."
-}
+ "hardware.projectors.edit": "Beamerzuweisung bearbeiten",
+ "hardware.projectors.view": "Beamerzuweisung anzeigen",
+ "machine.delete": "Rechner l\u00f6schen.",
+ "machine.note": "Anmerkungen zu einem Rechner speichern.",
+ "machine.note.edit": "Anmerkungen bearbeiten",
+ "machine.note.view": "Anmerkungen anzeigen",
+ "machine.view-details": "Clientinformationen anzeigen",
+ "view": "Statistiken anschauen.",
+ "view.list": "Clientliste anzeigen",
+ "view.summary": "Visualisierung anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/statistics/lang/en/permissions.json b/modules-available/statistics/lang/en/permissions.json
index 01acdb8a..445f96b8 100644
--- a/modules-available/statistics/lang/en/permissions.json
+++ b/modules-available/statistics/lang/en/permissions.json
@@ -1,5 +1,12 @@
{
- "view": "View statistics.",
- "machine.note": "Save client notes.",
- "machine.delete": "Delete clients."
-}
+ "hardware.projectors.edit": "Edit beamer assignment",
+ "hardware.projectors.view": "Show beamer assignment",
+ "machine.delete": "Delete clients.",
+ "machine.note": "Save client notes.",
+ "machine.note.edit": "Edit notes",
+ "machine.note.view": "Show notes",
+ "machine.view-details": "Show client details",
+ "view": "View statistics.",
+ "view.list": "Show client list",
+ "view.summary": "Show visualization"
+} \ No newline at end of file
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php
index 3baac190..a1c4f0c9 100644
--- a/modules-available/statistics/page.inc.php
+++ b/modules-available/statistics/page.inc.php
@@ -227,7 +227,7 @@ class Page_Statistics extends Page
if (in_array($row['locationid'], $allowedLocations)) {
$delete[] = $row['machineuuid'];
} else {
- Message::addError('no-permission-location', $row['locationid']);
+ Message::addError('locations.no-permission-location', $row['locationid']);
}
}
if (!empty($delete)) {
@@ -266,7 +266,7 @@ class Page_Statistics extends Page
if (!$filterSet->setAllowedLocationsFromPermission('view.' . $this->show)) {
Message::addError('main.no-permission');
- Util::redirect('?do=statistics');
+ Util::redirect('?do=main');
}
if ($this->show === 'list') {
@@ -866,7 +866,7 @@ class Page_Statistics extends Page
Parser::parsePci($client['lspci1'], $client['lspci2'], $section[2]);
}
if (isset($hdds['hdds']) && $section[1] === 'smartctl') {
- // This currently required that the partition table section comes first...
+ // This currently requires that the partition table section comes first...
Parser::parseSmartctl($hdds['hdds'], $section[2]);
}
}
diff --git a/modules-available/statistics/pages/projectors.inc.php b/modules-available/statistics/pages/projectors.inc.php
index cdd0195e..cc808cf0 100644
--- a/modules-available/statistics/pages/projectors.inc.php
+++ b/modules-available/statistics/pages/projectors.inc.php
@@ -19,7 +19,7 @@ class SubPage
Util::traceError('Param hwid missing');
}
if ($action === 'addprojector') {
- Database::exec('INSERT INTO statistic_hw_prop (hwid, prop, value)'
+ Database::exec('INSERT IGNORE INTO statistic_hw_prop (hwid, prop, value)'
. ' VALUES (:hwid, :prop, :value)', array(
'hwid' => $hwid,
'prop' => 'projector',
diff --git a/modules-available/statistics/templates/machine-hdds.html b/modules-available/statistics/templates/machine-hdds.html
index fd6cf1be..b839dfca 100644
--- a/modules-available/statistics/templates/machine-hdds.html
+++ b/modules-available/statistics/templates/machine-hdds.html
@@ -20,7 +20,7 @@
<div>{{lang_powerOnTime}}: {{s_PowerOnHours}}&thinsp;{{lang_hours}} ({{PowerOnTime}})</div>
{{/s_PowerOnHours}}
<div class="row">
- <div class="col-sm-6">
+ <div class="col-sm-7">
<table class="table table-condensed table-striped table-responsive">
<tr>
<th>{{lang_partName}}</th>
@@ -30,14 +30,14 @@
{{#partitions}}
<tr id="{{id}}">
<td>{{name}}</td>
- <td class="text-right">{{size}}&thinsp;GiB</td>
+ <td class="text-right text-nowrap">{{size}}&thinsp;GiB</td>
<td>{{type}}</td>
</tr>
{{/partitions}}
</table>
<div class="slx-bold">{{lang_total}}: {{size}}&thinsp;GiB</div>
</div>
- <div class="col-sm-6">
+ <div class="col-sm-5">
<canvas id="{{devid}}-chart" style="width:100%;height:250px"></canvas>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
diff --git a/modules-available/sysconfig/addmodule_adauth.inc.php b/modules-available/sysconfig/addmodule_adauth.inc.php
index df7f385d..7d30e15b 100644
--- a/modules-available/sysconfig/addmodule_adauth.inc.php
+++ b/modules-available/sysconfig/addmodule_adauth.inc.php
@@ -434,9 +434,11 @@ class AdAuth_HomeDir extends AddModule_Base
$data[$key . '_c'] = 'checked="checked"';
}
}
- $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
- $data['shareDomain'] = $this->edit->getData('shareDomain');
$letter = $this->edit->getData('shareHomeDrive');
+ $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
+ foreach (['shareDomain', 'shareHomeMountOpts', 'ldapAttrMountOpts'] as $key) {
+ $data[$key] = $this->edit->getData($key);
+ }
} else {
$data['shareDownloads_c'] = $data['shareMedia_c'] = $data['shareDocuments_c'] = $data['shareRemapCreate_c'] = 'checked="checked"';
$data['shareRemapMode_1'] = 'selected="selected"';
@@ -475,16 +477,12 @@ class AdAuth_Finish extends AddModule_Base
else
$module = $this->edit;
$ssl = Request::post('ssl', 'off') === 'on';
- $module->setData('server', Request::post('server'));
- $module->setData('searchbase', Request::post('searchbase'));
- $module->setData('binddn', Request::post('binddn'));
- $module->setData('bindpw', Request::post('bindpw'));
- $module->setData('home', Request::post('home'));
- $module->setData('homeattr', Request::post('homeattr'));
- $module->setData('certificate', Request::post('certificate'));
+ foreach (['searchbase', 'binddn', 'server', 'bindpw', 'home', 'homeattr', 'certificate', 'fixnumeric',
+ 'ldapAttrMountOpts', 'shareHomeMountOpts'] as $key) {
+ $module->setData($key, Request::post($key, '', 'string'));
+ }
$module->setData('ssl', $ssl);
$module->setData('mapping', Request::post('mapping', false, 'array'));
- $module->setData('fixnumeric', Request::post('fixnumeric', '', 'string'));
foreach (AdAuth_HomeDir::getAttributes() as $key) {
$value = Request::post($key);
if (is_numeric($value)) {
diff --git a/modules-available/sysconfig/addmodule_ldapauth.inc.php b/modules-available/sysconfig/addmodule_ldapauth.inc.php
index 1db6cb51..6490ff20 100644
--- a/modules-available/sysconfig/addmodule_ldapauth.inc.php
+++ b/modules-available/sysconfig/addmodule_ldapauth.inc.php
@@ -205,9 +205,11 @@ class LdapAuth_HomeDir extends AddModule_Base
$data[$key . '_c'] = 'checked="checked"';
}
}
- $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
- $data['shareDomain'] = $this->edit->getData('shareDomain');
$letter = $this->edit->getData('shareHomeDrive');
+ $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
+ foreach (['shareDomain', 'shareHomeMountOpts', 'ldapAttrMountOpts'] as $key) {
+ $data[$key] = $this->edit->getData($key);
+ }
} else {
$data['shareDownloads_c'] = $data['shareMedia_c'] = $data['shareDocuments_c'] = $data['shareRemapCreate_c'] = 'checked="checked"';
$data['shareRemapMode_1'] = 'selected="selected"';
@@ -238,8 +240,6 @@ class LdapAuth_Finish extends AddModule_Base
protected function preprocessInternal()
{
- $binddn = Request::post('binddn');
- $searchbase = Request::post('searchbase');
$title = Request::post('title');
if (empty($title))
$title = 'LDAP: ' . Request::post('server');
@@ -248,15 +248,12 @@ class LdapAuth_Finish extends AddModule_Base
else
$module = $this->edit;
$ssl = Request::post('ssl', 'off') === 'on';
- $module->setData('server', Request::post('server'));
- $module->setData('searchbase', $searchbase);
- $module->setData('binddn', $binddn);
- $module->setData('bindpw', Request::post('bindpw'));
- $module->setData('home', Request::post('home'));
- $module->setData('certificate', Request::post('certificate'));
+ foreach (['searchbase', 'binddn', 'server', 'bindpw', 'home', 'certificate', 'fixnumeric',
+ 'ldapAttrMountOpts', 'shareHomeMountOpts'] as $key) {
+ $module->setData($key, Request::post($key, '', 'string'));
+ }
$module->setData('ssl', $ssl);
$module->setData('mapping', Request::post('mapping', false, 'array'));
- $module->setData('fixnumeric', Request::post('fixnumeric', '', 'string'));
foreach (LdapAuth_HomeDir::getAttributes() as $key) {
$value = Request::post($key);
if (is_numeric($value)) {
diff --git a/modules-available/sysconfig/inc/configmodule/adauth.inc.php b/modules-available/sysconfig/inc/configmodule/adauth.inc.php
index db06a4a4..ed7b318d 100644
--- a/modules-available/sysconfig/inc/configmodule/adauth.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/adauth.inc.php
@@ -12,5 +12,5 @@ ConfigModule::registerModule(
Dictionary::translateFileModule('sysconfig', 'config-module', 'adAuth_title'), // Title
Dictionary::translateFileModule('sysconfig', 'config-module', 'adAuth_description'), // Description
Dictionary::translateFileModule('sysconfig', 'config-module', 'group_authentication'), // Group
- true // Only one per config?
+ false // Only one per config?
);
diff --git a/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php b/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
index 1a706234..e8df2877 100644
--- a/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
@@ -19,5 +19,5 @@ ConfigModule::registerModule(
Dictionary::translateFileModule('sysconfig', 'config-module', 'ldapAuth_title'), // Title
Dictionary::translateFileModule('sysconfig', 'config-module', 'ldapAuth_description'), // Description
Dictionary::translateFileModule('sysconfig', 'config-module', 'group_authentication'), // Group
- true // Only one per config?
+ false // Only one per config?
);
diff --git a/modules-available/sysconfig/inc/configmodulebaseldap.inc.php b/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
index d6fc3ed9..c5df8697 100644
--- a/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
+++ b/modules-available/sysconfig/inc/configmodulebaseldap.inc.php
@@ -3,12 +3,13 @@
abstract class ConfigModuleBaseLdap extends ConfigModule
{
- const VERSION = 2;
+ const VERSION = 3;
private static $REQUIRED_FIELDS = array('server', 'searchbase');
private static $OPTIONAL_FIELDS = array('binddn', 'bindpw', 'home', 'ssl', 'fixnumeric', 'fingerprint', 'certificate', 'homeattr',
'shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia',
- 'shareOther', 'shareHomeDrive', 'shareDomain', 'credentialPassthrough', 'mapping');
+ 'shareOther', 'shareHomeDrive', 'shareDomain', 'credentialPassthrough', 'mapping',
+ 'ldapAttrMountOpts', 'shareHomeMountOpts');
public static function getMapping($config = false, &$empty = true)
{
diff --git a/modules-available/sysconfig/lang/de/permissions.json b/modules-available/sysconfig/lang/de/permissions.json
new file mode 100644
index 00000000..c32c488b
--- /dev/null
+++ b/modules-available/sysconfig/lang/de/permissions.json
@@ -0,0 +1,8 @@
+{
+ "config.assign": "Systemkonfiguration zuweisen",
+ "config.edit": "Systemkonfiguration bearbeiten",
+ "config.view-list": "Systemkonfigurationen anzeigen",
+ "module.download": "Konfigurationsmodul herunterladen",
+ "module.edit": "Konfigurationsmodul bearbeiten",
+ "module.view-list": "Konfigurationsmodule anzeigen"
+} \ No newline at end of file
diff --git a/modules-available/sysconfig/lang/de/template-tags.json b/modules-available/sysconfig/lang/de/template-tags.json
index 7f8511e6..c2738ca4 100644
--- a/modules-available/sysconfig/lang/de/template-tags.json
+++ b/modules-available/sysconfig/lang/de/template-tags.json
@@ -53,11 +53,11 @@
"lang_helpHomeAttrText": "Hier k\u00f6nnen Sie alternativ zum fest vorgegebenem Template des Home-Verzeichnis Servers den Attributsnamen im Active Directory angeben, der diesen Pfad bereitstellt. Normalerweise ist dies \"homeDirectory\". Wird das Feld leer gelassen, versucht der Assistent, das Attribut selbstst\u00e4ndig zu ermitteln. Falls das Einbinden der Home-Verzeichnisse anschlie\u00dfend nicht funktioniert, \u00fcberpr\u00fcfen Sie bitte den Client-Log (Status->Client Log) und den LDAP-Proxy-Log (Status->Server Status).",
"lang_helpModuleConfiguration": "Konfigurationsmodule sind die Bausteine, aus denen eine Systemkonfiguration erstellt wird. Hier lassen sich sowohl generische Module durch einen Wizard anlegen, als auch komplett eigene Module erstellen (fortgeschritten, Linuxkenntnisse erforderlich).",
"lang_helpSystemConfiguration": "\u00dcber eine Systemkonfiguration wird die grundlegende Lokalisierung des bwLehrpool-Systems durchgef\u00fchrt. Dazu geh\u00f6ren Aspekte wie das Authentifizierungsverfahren f\u00fcr Benutzer (z.B. Active Directory, LDAP), Druckerkonfiguration, Home-Verzeichnisse, etc. Eine Systemkonfiguration setzt sich aus einem oder mehreren Konfigurationsmodulen zusammen, welche im angrenzenden Panel verwaltet werden k\u00f6nnen.",
- "lang_homeAttr": "Home-Attribut",
"lang_homeAttributeExplanation": "Bitte w\u00e4hlen Sie das Attribut, welches das Home-Verzeichnis der User enth\u00e4lt.",
"lang_homeFallback": "Home-Fallback",
"lang_homedirHandling": "(Home-)Verzeichnis Einbindung",
"lang_inheritFromParentLoc": "Von \u00fcbergeordnetem Ort erben",
+ "lang_ldapAttrMountOpts": "LDAP-Attribut f\u00fcr Mount-Optionen",
"lang_ldapStarted": "Der LDAP-Proxy wurde gestartet",
"lang_ldapText1": "Mit diesem Wizard k\u00f6nnen Sie Authentifizierung gegen einen LDAP-Server einrichten.",
"lang_ldapText2": "Zu diesem Zweck wird ein LDAP-Proxy auf dem Satelliten-Server gestartet. Dies bedeutet, dass der LDAP-Server von diesem Server aus erreichbar sein muss. Die Pool-PCs hingegen m\u00fcssen nicht direkt mit dem LDAP-Server kommunizieren k\u00f6nnen.",
@@ -72,6 +72,7 @@
"lang_moduleConfiguration": "Konfigurationsmodule",
"lang_moduleName": "Modulname",
"lang_moduleTitle": "Titel",
+ "lang_mountOptionsNote": "Diese Einstellungen beziehen sich nur auf Linux und \u00e4hnliche Systeme (sowohl das MiiLinux als auch laufende VMs) und beeinflussen die Optionen, die beim Mounten des Verzeichnisses verwendet werden sollen. Sofern es im LDAP\/AD ein Nutzerattribut gibt, welches die passenden Optionen enth\u00e4lt, k\u00f6nnen Sie dieses hier angeben. Das Attribut wird dann vorrangig behandelt. Ist das Attribut leer oder nicht vorhanden, werden die Optionen verwendet, die Sie im Feld \"feste Mount-Optionen\" eingetragen haben. Sind beide Felder leer, werden verschiedene Optionen automatisch durchprobiert.",
"lang_name": "Name",
"lang_newConfiguration": "Neue Konfiguration",
"lang_newModule": "Neues Modul",
@@ -99,6 +100,7 @@
"lang_shareDomainNote": "Der Dom\u00e4nenname wird beim Einbinden des Home-Verzeichnisses dem Benutzernamen vorangestellt (DOMAIN\\user). Normalerweise wird der Dom\u00e4nenname automatisch ermittelt, er l\u00e4sst sich hiermit aber explizit \u00fcberschreiben.",
"lang_shareDownloads": "Downloads",
"lang_shareHomeDrive": "Home-Verzeichnis Buchstabe (Windows)",
+ "lang_shareHomeMountOpts": "Fest vorgegebene Mount-Optionen",
"lang_shareMapCreate": "Ordner auf dem Netzlaufwerk bei Bedarf anlegen",
"lang_shareMedia": "Eigene Musik, Videos, Bilder",
"lang_shareModeNote": "\"Nativer Modus mit Fallback auf VMware\" ist experimentell und kann dazu f\u00fchren, dass die VM in regelm\u00e4\u00dfigen Abst\u00e4nden H\u00e4nger hat.",
@@ -124,4 +126,4 @@
"lang_userDirectoryInfo1": "Optionale Angabe: Wenn die Clients f\u00fcr die Benutzer ein eigenes Verzeichnis (Homeverzeichnis, Benutzerverzeichnis) von einem Server einbinden sollen, geben Sie bitte hier das Format in UNC-Notation an, also z.B.",
"lang_userDirectoryInfo2": "%s ist dabei ein Platzhalter f\u00fcr den Login-Namen des Benutzers.",
"lang_userDirectoryInfo3": "Das Verzeichnis wird mit den gleichen Zugangsdaten eingebunden, die der Benutzer beim Login angibt. (D.h. kein Kerberos Support o.\u00e4.)"
-}
+} \ No newline at end of file
diff --git a/modules-available/sysconfig/lang/en/permissions.json b/modules-available/sysconfig/lang/en/permissions.json
new file mode 100644
index 00000000..14757383
--- /dev/null
+++ b/modules-available/sysconfig/lang/en/permissions.json
@@ -0,0 +1,8 @@
+{
+ "config.assign": "Assign system configuration",
+ "config.edit": "Edit system configuration",
+ "config.view-list": "Show system configurations",
+ "module.download": "Download configuration module",
+ "module.edit": "Edit configuration module",
+ "module.view-list": "Show configuration modules"
+} \ No newline at end of file
diff --git a/modules-available/sysconfig/lang/en/template-tags.json b/modules-available/sysconfig/lang/en/template-tags.json
index 5a73c254..e98038a9 100644
--- a/modules-available/sysconfig/lang/en/template-tags.json
+++ b/modules-available/sysconfig/lang/en/template-tags.json
@@ -53,11 +53,11 @@
"lang_helpHomeAttrText": "Here you can specify the name of the attribute on the Active Directory that contains the path of the home directory server. Usually this is \"homeDirectory\". If you leave this blank, the wiszard will try to determine the attribute name automatically. If home directories don't work, check the client log (Status->Client log) and the LDAP proxy log (Status->Server status).",
"lang_helpModuleConfiguration": "Configuration modules are the building blocks from which a system configuration is created. Here you can create both generic modules by a wizard, as well as create completely custom modules (advanced Linux knowledge required).",
"lang_helpSystemConfiguration": "The fundamental localization of the bwLehrpool system is done through a system configuration. These include aspects such as the authentication method for users (eg Active Directory, LDAP), printer configuration, home directories, etc. A system configuration is composed of one or more configuration modules, which can be managed in the panel next to this one.",
- "lang_homeAttr": "Home attribute",
"lang_homeAttributeExplanation": "Please select the attribute which holds the user's home directory.",
"lang_homeFallback": "Home fallback",
"lang_homedirHandling": "(Home) directory handling",
"lang_inheritFromParentLoc": "Inherit from parent location",
+ "lang_ldapAttrMountOpts": "LDAP attribute containing mount options",
"lang_ldapStarted": "The LDAP proxy has been launched",
"lang_ldapText1": "Here you can create a configuration module to authenticate agains an LDAP server",
"lang_ldapText2": "An LDAP-Proxy will be launched on this server. This means the LDAP-Server must be reachable from it. The client PCs in the labs however don't have to be able to talk to the LDAP server \u2013 they will use the proxy running on this server.",
@@ -72,6 +72,7 @@
"lang_moduleConfiguration": "Module Configuration",
"lang_moduleName": "Module Name",
"lang_moduleTitle": "Title",
+ "lang_mountOptionsNote": "These settings are relevant for the MiniLinux and VMs containing non-Windows OSes. If you specify an LDAP user attribute, its contents will be used as mount options when mounting the user's home directory. If the attribute is not specified or its contents are empty, the mount attributes specified in the other field will be used. If you leave both fields empty, the clients will try to determine the options automatically.",
"lang_name": "Name",
"lang_newConfiguration": "New Configuration",
"lang_newModule": "New Module",
@@ -99,6 +100,7 @@
"lang_shareDomainNote": "The user name will be prefixed by the domain when trying to mount home directories (DOMAIN\\user). Usually this will be determined automatically, but you can always override it here.",
"lang_shareDownloads": "Downloads",
"lang_shareHomeDrive": "Home drive letter (Windows)",
+ "lang_shareHomeMountOpts": "Fixed mount options",
"lang_shareMapCreate": "Create folders on network share if they don't exist",
"lang_shareMedia": "My Music, Videos, Pictures",
"lang_shareModeNote": "\"Native mode with fallback\" is experimental and known to cause temporary freezes with some VMs. Use with care.",
@@ -124,4 +126,4 @@
"lang_userDirectoryInfo1": "Optional: If the clients should embed a separate directory (home directory, user directory) from a server for the user, please enter here the format in UNC notation, eg",
"lang_userDirectoryInfo2": "%s is a placeholder for the user's login name.",
"lang_userDirectoryInfo3": "The directory is loaded with the same credentials that the user specifies when login. (That is no Kerberos support, etc.)"
-}
+} \ No newline at end of file
diff --git a/modules-available/sysconfig/templates/ad_ldap-homedir.html b/modules-available/sysconfig/templates/ad_ldap-homedir.html
index ad543594..a8c9441a 100644
--- a/modules-available/sysconfig/templates/ad_ldap-homedir.html
+++ b/modules-available/sysconfig/templates/ad_ldap-homedir.html
@@ -61,6 +61,20 @@
<p><i>{{lang_driveLetterNote}}</i></p>
</div>
</div>
+ <div class="form-group row">
+ <label for="inputldapAttrMountOpts" class="control-label col-xs-4">{{lang_ldapAttrMountOpts}}</label>
+ <div class="col-xs-8">
+ <input type="text" class="form-control" id="inputldapAttrMountOpts" name="ldapAttrMountOpts" value="{{ldapAttrMountOpts}}">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="inputshareHomeMountOpts" class="control-label col-xs-4">{{lang_shareHomeMountOpts}}</label>
+ <div class="col-xs-8">
+ <input type="text" class="form-control" id="inputshareHomeMountOpts" name="shareHomeMountOpts" value="{{shareHomeMountOpts}}"
+ placeholder="vers=3.0,forceuid,forcegid,nounix,file_mode=0700,dir_mode=0700,noacl,nobrl">
+ <p><i>{{lang_mountOptionsNote}}</i></p>
+ </div>
+ </div>
<hr>
<div class="slx-bold">{{lang_folderRedirection}}</div>
diff --git a/modules-available/systemstatus/lang/de/permissions.json b/modules-available/systemstatus/lang/de/permissions.json
index 5508beb5..a3041fbc 100644
--- a/modules-available/systemstatus/lang/de/permissions.json
+++ b/modules-available/systemstatus/lang/de/permissions.json
@@ -8,6 +8,6 @@
"tab.dmsdlog": "Zugriff auf bwLehrpool-Suite-Server Statusausgabe.",
"tab.ldadplog": "Zugriff auf LDAP\/AD-Proxy Logs.",
"tab.lighttpdlog": "Zugriff auf Webserver-Logs.",
- "tab.netstat": "Zeige Aufgabe von netstat.",
+ "tab.netstat": "Zeige Ausgabe von netstat.",
"tab.pslist": "Zeige Prozessliste."
} \ No newline at end of file
diff --git a/modules-available/translation/page.inc.php b/modules-available/translation/page.inc.php
index df7bc15e..7d5229d7 100644
--- a/modules-available/translation/page.inc.php
+++ b/modules-available/translation/page.inc.php
@@ -464,19 +464,21 @@ class Page_Translation extends Page
$allFiles = array_merge($allFiles, $this->getAllFiles('apis', '.php'), $this->getAllFiles('inc', '.php'));
$allFiles[] = 'index.php';
}
- $tags = $this->loadTagsFromPhp('/Message\s*::\s*add\w+\s*\(\s*[\'"](?<module>[^\'"\.]*)\.(?<tag>[^\'"]*)[\'"]\s*(?<data>\)|\,.*)/i',
+ $full = $this->loadTagsFromPhp('/Message\s*::\s*add\w+\s*\(\s*[\'"](?<tag>[^\'"\.]*\.[^\'"]*)[\'"]\s*(?<data>\)|\,.*)/i',
$allFiles);
+ $tags = [];
// Filter out tags that don't refer to this module
- foreach (array_keys($tags) as $tag) {
+ foreach ($full as $tag) {
+ $p = explode('.', $tag['tag'], 2);
// Figure out if this is a message from this module or not
- if ($tags[$tag]['module'] === $module->getIdentifier()) {
+ if ($p[0] === $module->getIdentifier()) {
// Direct reference to this module via module.id
- continue;
+ $tag['tag'] = $p[1];
+ $tags[$p[1]] = $tag;
}
- unset($tags[$tag]);
}
- $tags += $this->loadTagsFromPhp('/Message\s*::\s*add\w+\s*\(\s*[\'"](?<tag>[^\'"\.]*)[\'"]\s*(?<data>\)|\,.*)/i',
- $this->getModulePhpFiles($module));
+ $tags = $this->loadTagsFromPhp('/Message\s*::\s*add\w+\s*\(\s*[\'"](?<tag>[^\'"\.]*)[\'"]\s*(?<data>\)|\,.*)/i',
+ $this->getModulePhpFiles($module), $tags);
return $tags;
}
@@ -831,12 +833,12 @@ class Page_Translation extends Page
*
* @param string $regexp regular expression
* @param array $files list of files to scan
+ * @param array $tags existing tag array to append to
* @return array of all tags found, where the tag is the key, and the value is as described above
*/
- private function loadTagsFromPhp($regexp, $files)
+ private function loadTagsFromPhp($regexp, $files, $tags = [])
{
// Get all php files, so we can find all strings that need to be translated
- $tags = array();
// Now find all tags in all php files. Only works for literal usage, not something like $foo = 'bar'; Dictionary::translate($foo);
foreach ($files as $file) {
$content = file_get_contents($file);
@@ -999,6 +1001,7 @@ class Page_Translation extends Page
//find the tag requests to change the file
$tags = Request::post('langtag', array(), 'array');
foreach ($tags as $tag => $value) {
+ error_log($tag . '=' . $value);
$tag = trim($tag);
if (empty($tag)) {
Message::addWarning('i18n-empty-tag');
diff --git a/modules-available/translation/templates/edit.html b/modules-available/translation/templates/edit.html
index 15e69f3b..5b957067 100644
--- a/modules-available/translation/templates/edit.html
+++ b/modules-available/translation/templates/edit.html
@@ -38,7 +38,7 @@
<input type="text" class="form-control switchable {{#missing}}txt-empty{{/missing}}" value="{{translation}}" ondblclick="slxMb(this)" name="langtag[{{tag}}]" placeholder="{{placeholder}}">
{{/big}}
{{#big}}
- <textarea rows="3" class="form-control {{#missing}}txt-empty{{/missing}}" name="lang#!#{{tag}}" placeholder="{{placeholder}}">{{translation}}</textarea>
+ <textarea rows="3" class="form-control {{#missing}}txt-empty{{/missing}}" name="langtag[{{tag}}]" placeholder="{{placeholder}}">{{translation}}</textarea>
{{/big}}
</td>
@@ -81,7 +81,7 @@
var slxNewTagCounter = 0;
function slxAddTag()
{
- $('#moduleTable tr:last').after(
+ $('#moduleTable').find('tr:last').after(
'<tr id="new-delete-' + slxNewTagCounter + '">' +
' <td class="col-sm-3">' +
' <input type="text" name="new-id[' + slxNewTagCounter + ']" class="form-control">' +
diff --git a/modules-available/vmstore/baseconfig/getconfig.inc.php b/modules-available/vmstore/baseconfig/getconfig.inc.php
index 75f7279b..3bad16e1 100644
--- a/modules-available/vmstore/baseconfig/getconfig.inc.php
+++ b/modules-available/vmstore/baseconfig/getconfig.inc.php
@@ -9,11 +9,17 @@ if (is_array($vmstore) && isset($vmstore['storetype'])) {
break;
case 'nfs';
ConfigHolder::add("SLX_VM_NFS", $vmstore['nfsaddr']);
+ if (!empty($vmstore['nfsopts'])) {
+ ConfigHolder::add("SLX_VM_NFS_OPTS", $vmstore['nfsopts']);
+ }
break;
case 'cifs';
ConfigHolder::add("SLX_VM_NFS", $vmstore['cifsaddr']);
ConfigHolder::add("SLX_VM_NFS_USER", $vmstore['cifsuserro']);
ConfigHolder::add("SLX_VM_NFS_PASSWD", $vmstore['cifspasswdro']);
+ if (!empty($vmstore['cifsopts'])) {
+ ConfigHolder::add("SLX_VM_NFS_OPTS", $vmstore['cifsopts']);
+ }
break;
}
}
diff --git a/modules-available/vmstore/lang/de/template-tags.json b/modules-available/vmstore/lang/de/template-tags.json
index 0b56d84f..021e019b 100644
--- a/modules-available/vmstore/lang/de/template-tags.json
+++ b/modules-available/vmstore/lang/de/template-tags.json
@@ -9,7 +9,7 @@
"lang_nfsHelp3": "Die erste Zeile erlaubt den Lese- und Schreibzugriff des\r\nSatellitenservers. Die zweite Zeile erteilt allen anderen Rechnern\r\nausschlie\u00dflich Lesezugriff. Sie k\u00f6nnen dies nat\u00fcrlich auch auf\r\nspezielle Subnetze oder IP-Bereiche beschr\u00e4nken.",
"lang_nfsHelp4": "Wenn exklusiv DNBD3 verwendet wird, kann die zweite Zeile ausgelassen\r\nwerden. Dies erh\u00f6ht die Sicherheit.",
"lang_noAdditionalInformation": "Keine weitere Konfiguration notwendig",
- "lang_path": "Pfad",
+ "lang_optionalMountOptions": "Zu verwendende Mount-Optionen (optional):",
"lang_readOnly": "Nur-Lese-Zugangsdaten",
"lang_readWrite": "Lese\/Schreib-Zugangsdaten",
"lang_vmLocation": "VM Speicherort",
@@ -19,4 +19,4 @@
"lang_vmLocationHelp2": "Im Produktivbetrieb bietet es sich an, hierf\u00fcr einen performanten\r\nNetzwerkspeicher zu benutzen. Dieser Netzwerkspeicher kann per NFS oder\r\nCIFS\/SMB eingebunden werden. In jedem Fall muss sichergestellt werden,\r\ndass der Satellitenserver zum Hinzuf\u00fcgen neuer Virtueller Maschinen\r\nSchreibzugriff auf diesen Netzwerkspeicher hat. Bei der Nutzung von\r\nNFSv3 kann dies IP-Basiert eingerichtet werden, f\u00fcr die Nutzung von\r\nCIFS\/SMB k\u00f6nnen Sie Zugangsdaten angeben, die zum Schreiben\r\nberechtigen.",
"lang_vmLocationHelp3": "Im Fall von NFS und CIFS ben\u00f6tigen die bwLehrpool-Clients\r\nausschlie\u00dflich Lesezugriff auf den Netzwerkspeicher (und sollten aus\r\nSicherheitsgr\u00fcnden auch wirklich nur lesen k\u00f6nnen). Wenn Sie exklusiv\r\nDNBD3 verwenden, sind f\u00fcr die Clients keine Freigaben oder\r\nBerechtigungen notwendig, da der Zugriff \u00fcber den Sallitenserver\r\nstattfindet.",
"lang_vmLocationHelp4": "Sie k\u00f6nnen DNBD3 entweder exklusiv oder mit Fallback auf NFS\/CIFS verwenden. Im exklusiven Modus wird der Zugriff der Clients auf den kompletten VM-Speicher verhindert bzw. erschwert. Die Clients ben\u00f6tigen keinerlei Berechtigungen auf dem konfigurierten Share. Wenn Sie den Fallback Modus nutzen, werden f\u00fcr die Clients weiterhin Leseberechtigungen ben\u00f6tigt."
-}
+} \ No newline at end of file
diff --git a/modules-available/vmstore/lang/en/template-tags.json b/modules-available/vmstore/lang/en/template-tags.json
index 1e712b13..5ec68318 100644
--- a/modules-available/vmstore/lang/en/template-tags.json
+++ b/modules-available/vmstore/lang/en/template-tags.json
@@ -9,7 +9,7 @@
"lang_nfsHelp3": "The first line allows read\/write access for the satellite server. The second line grants read-only access for every other IP address. You could limit the second line to specific IP ranges only if desired.",
"lang_nfsHelp4": "If using DNBD3 in exclusive mode, you can remove the second line completely, so only the satellite server has access to the NFS store.",
"lang_noAdditionalInformation": "No additional cofiguration required",
- "lang_path": "Path",
+ "lang_optionalMountOptions": "Mount options to use (optional):",
"lang_readOnly": "Read-only Access",
"lang_readWrite": "Read\/Write Access",
"lang_vmLocation": "VM Storage Location",
@@ -19,4 +19,4 @@
"lang_vmLocationHelp2": "In productive operation, it makes sense for this to use a high-performance network storage. This network storage can be integrated via NFS or CIFS \/ SMB. In any case, it must be ensured that the satellite server has write access to this network storage to add a new Virtual Machine . When using NFSv3 this can be set up IP-based, for the use of CIFS \/ SMB, you can access data disclosures that would entitle them to write.",
"lang_vmLocationHelp3": "The bwLehrpool clients only need read access to the network storage (and for security reasons, really can only read). In CIFS \/ SMB You can do this most easily by allowing passwordless guest access with read access to the share.",
"lang_vmLocationHelp4": "You can use DNBD3 exclusively or with NFS\/CIFS as fallback. In exclusive mode, you can deny direct access to the NFS\/CIFS store for clients, to prevent anyone from browsing the VM store directly. In fallback mode, the clients first try to use DNBD3 to run a VM and if that fails, they use NFS\/CIFS directly."
-}
+} \ No newline at end of file
diff --git a/modules-available/vmstore/page.inc.php b/modules-available/vmstore/page.inc.php
index 126e56d3..1e0cc619 100644
--- a/modules-available/vmstore/page.inc.php
+++ b/modules-available/vmstore/page.inc.php
@@ -36,8 +36,13 @@ class Page_VmStore extends Page
private function setStore()
{
$vmstore = array();
- foreach (array('storetype', 'nfsaddr', 'cifsaddr', 'cifsuser', 'cifspasswd', 'cifsuserro', 'cifspasswdro') as $key) {
+ foreach (array('storetype', 'nfsaddr', 'nfsopts', 'cifsaddr', 'cifsuser', 'cifspasswd', 'cifsuserro', 'cifspasswdro', 'cifsopts') as $key) {
$vmstore[$key] = trim(Request::post($key, '', 'string'));
+ // Remove rw setting
+ if ($key === 'cifsopts' || $key === 'nfsopts') {
+ $vmstore[$key] = preg_replace('/\s+,\s+/', ',', $vmstore[$key]);
+ $vmstore[$key] = preg_replace('/^rw,|,rw$/', '', str_replace(',rw,', ',', $vmstore[$key]));
+ }
}
$storetype = $vmstore['storetype'];
if (!in_array($storetype, array('internal', 'nfs', 'cifs'))) {
diff --git a/modules-available/vmstore/templates/page-vmstore.html b/modules-available/vmstore/templates/page-vmstore.html
index 10eccc68..0e1ad601 100644
--- a/modules-available/vmstore/templates/page-vmstore.html
+++ b/modules-available/vmstore/templates/page-vmstore.html
@@ -32,6 +32,9 @@
<div class="panel-body">
<label for="nfsaddr">NFS-Export</label>
<input type="text" class="form-control" name="nfsaddr" value="{{nfsaddr}}" placeholder="1.2.3.4:/export/bwlp" id="nfsaddr">
+ <br>
+ <label for="nfsopts">{{lang_optionalMountOptions}}</label>
+ <input type="text" class="form-control" name="nfsopts" value="{{nfsopts}}" placeholder="vers=4.0,async,nolock" id="nfsopts">
</div>
</div>
@@ -49,6 +52,9 @@
<label for="cifsaddr">UNC-Pfad</label>
<input type="text" class="form-control" name="cifsaddr" value="{{cifsaddr}}" placeholder="\\samba.server.example.com\bwlp" id="cifsaddr">
<br>
+ <label for="cifsopts">{{lang_optionalMountOptions}}</label>
+ <input type="text" class="form-control" name="cifsopts" value="{{cifsopts}}" placeholder="vers=3.0,sec=ntlmssp,nobrl,nounix" id="cifsopts">
+ <br>
<label for="cifsuser">{{lang_readWrite}}</label>
<div class="input-group">
<span class="input-group-addon slx-ga">