summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--inc/trigger.inc.php6
-rw-r--r--lang/de/templates/page-main.json1
-rw-r--r--lang/de/templates/sysconfig/ldap-start.json2
-rw-r--r--lang/en/templates/page-main.json1
-rw-r--r--lang/en/templates/sysconfig/ldap-start.json2
-rw-r--r--modules/main.inc.php22
-rw-r--r--templates/page-main.html13
-rw-r--r--templates/sysconfig/ldap-start.html2
8 files changed, 36 insertions, 13 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 5ad11a91..13854589 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -119,7 +119,11 @@ class Trigger
$vmstore = Property::getVmStoreConfig();
if (!is_array($vmstore))
return false;
- $storetype = $vmstore['storetype'];
+ if (isset($vmstore['storetype'])) {
+ $storetype = $vmstore['storetype'];
+ } else {
+ $storetype = 'unknown';
+ }
if ($storetype === 'nfs')
$addr = $vmstore['nfsaddr'];
if ($storetype === 'cifs')
diff --git a/lang/de/templates/page-main.json b/lang/de/templates/page-main.json
index f2db5ac6..a927e4ce 100644
--- a/lang/de/templates/page-main.json
+++ b/lang/de/templates/page-main.json
@@ -3,6 +3,7 @@
"lang_configure": "Konfigurieren",
"lang_intro": "Dies ist die bwLehrpool Konfigurationsoberfl\u00e4che.",
"lang_minilinuxMissing": "Wichtige Dateien der MiniLinux-Installation fehlen.",
+ "lang_numerOfImagesMarkedForDeletion": "Zur L\u00f6schung markierte Abbilder",
"lang_systemConfiguration": "Systemkonfiguration",
"lang_systemConfigurationNotChosen": "Es wurde noch keine Systemkonfiguration ausgew\u00e4hlt.",
"lang_vmLocationNotSet": "Es ist noch kein Speicherort f\u00fcr die Virtuellen Maschinen festgelegt.",
diff --git a/lang/de/templates/sysconfig/ldap-start.json b/lang/de/templates/sysconfig/ldap-start.json
index 6e88e660..3ad85b86 100644
--- a/lang/de/templates/sysconfig/ldap-start.json
+++ b/lang/de/templates/sysconfig/ldap-start.json
@@ -3,7 +3,7 @@
"lang_close": "Schlie\u00dfen",
"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.",
- "lang_moduleTitle": "LDAP-Authentifizierung",
+ "lang_moduleTitle": "Modulname",
"lang_next": "Weiter",
"lang_password": "Passwort",
"lang_searchBase": "Suchbasis (Search base)",
diff --git a/lang/en/templates/page-main.json b/lang/en/templates/page-main.json
index 86f4eb52..8031ac1c 100644
--- a/lang/en/templates/page-main.json
+++ b/lang/en/templates/page-main.json
@@ -3,6 +3,7 @@
"lang_configure": "Configure",
"lang_intro": "This is the bwLehrpool configuration interface.",
"lang_minilinuxMissing": "Important files from the mini Linux installation are missing.",
+ "lang_numerOfImagesMarkedForDeletion": "Images marked for deletion",
"lang_systemConfiguration": "System Configuration",
"lang_systemConfigurationNotChosen": "A system configuration has not been chosen yet.",
"lang_vmLocationNotSet": "A location for the virtual machine is not set yet.",
diff --git a/lang/en/templates/sysconfig/ldap-start.json b/lang/en/templates/sysconfig/ldap-start.json
index 1e40cf02..d2953f45 100644
--- a/lang/en/templates/sysconfig/ldap-start.json
+++ b/lang/en/templates/sysconfig/ldap-start.json
@@ -3,7 +3,7 @@
"lang_close": "Close",
"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.",
- "lang_moduleTitle": "LDAP-authentication",
+ "lang_moduleTitle": "Module name",
"lang_next": "Next",
"lang_password": "Password",
"lang_searchBase": "Search base",
diff --git a/modules/main.inc.php b/modules/main.inc.php
index 71d5071a..edff14e0 100644
--- a/modules/main.inc.php
+++ b/modules/main.inc.php
@@ -6,14 +6,19 @@ class Page_Main extends Page
private $sysconfig;
private $minilinux;
private $vmstore;
+ private $delPending;
protected function doPreprocess()
{
User::load();
- $this->sysconfig = !file_exists(CONFIG_HTTP_DIR . '/default/config.tgz');
- $this->minilinux = !file_exists(CONFIG_HTTP_DIR . '/default/kernel') || !file_exists(CONFIG_HTTP_DIR . '/default/initramfs-stage31') || !file_exists(CONFIG_HTTP_DIR . '/default/stage32.sqfs');
- $this->vmstore = !is_array(Property::getVmStoreConfig());
- Property::setNeedsSetup(($this->sysconfig || $this->minilinux || $this->vmstore) ? 1 : 0);
+ if (User::isLoggedIn()) {
+ $this->sysconfig = !file_exists(CONFIG_HTTP_DIR . '/default/config.tgz');
+ $this->minilinux = !file_exists(CONFIG_HTTP_DIR . '/default/kernel') || !file_exists(CONFIG_HTTP_DIR . '/default/initramfs-stage31') || !file_exists(CONFIG_HTTP_DIR . '/default/stage32.sqfs');
+ $this->vmstore = !is_array(Property::getVmStoreConfig());
+ Property::setNeedsSetup(($this->sysconfig || $this->minilinux || $this->vmstore) ? 1 : 0);
+ $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'");
+ $this->delPending = isset($res['cnt']) ? $res['cnt'] : 0;
+ }
}
protected function doRender()
@@ -32,8 +37,15 @@ class Page_Main extends Page
'user' => User::getName(),
'sysconfig' => $this->sysconfig,
'minilinux' => $this->minilinux,
- 'vmstore' => $this->vmstore
+ 'vmstore' => $this->vmstore,
+ 'delpending' => $this->delPending
));
}
+ protected function doAjax()
+ {
+ User::isLoggedIn();
+ die('Status: DB running');
+ }
+
}
diff --git a/templates/page-main.html b/templates/page-main.html
index 40ea8176..64264a5d 100644
--- a/templates/page-main.html
+++ b/templates/page-main.html
@@ -4,27 +4,32 @@
</div>
<ul class="list-group">
{{#vmstore}}
- <li class="list-group-item list-group-item-info">
+ <li class="list-group-item list-group-item-text">
{{lang_vmLocationNotSet}}
<a class="btn btn-sm btn-primary" href="?do=VmStore">{{lang_configure}} &raquo;</a>
</li>
{{/vmstore}}
{{#ipxe}}
- <li class="list-group-item list-group-item-info">
+ <li class="list-group-item list-group-item-text">
{{lang_bootMenuWarning}}
<a class="btn btn-sm btn-primary" href="?do=ServerSetup">{{lang_configure}} &raquo;</a>
</li>
{{/ipxe}}
{{#minilinux}}
- <li class="list-group-item list-group-item-info">
+ <li class="list-group-item list-group-item-text">
{{lang_minilinuxMissing}}
<a class="btn btn-sm btn-primary" href="?do=MiniLinux">MiniLinux &raquo;</a>
</li>
{{/minilinux}}
{{#sysconfig}}
- <li class="list-group-item list-group-item-info">
+ <li class="list-group-item list-group-item-text">
{{lang_systemConfigurationNotChosen}}
<a class="btn btn-sm btn-primary" href="?do=SysConfig">{{lang_systemConfiguration}} &raquo;</a>
</li>
{{/sysconfig}}
+{{#delpending}}
+ <li class="list-group-item list-group-item-text">
+ <a href="?do=DozMod">{{lang_numerOfImagesMarkedForDeletion}}: {{delpending}}</a>
+ </li>
+{{/delpending}}
</ul>
diff --git a/templates/sysconfig/ldap-start.html b/templates/sysconfig/ldap-start.html
index 05710aad..8fa7cb9f 100644
--- a/templates/sysconfig/ldap-start.html
+++ b/templates/sysconfig/ldap-start.html
@@ -20,7 +20,7 @@
</div>
<div class="input-group">
<span class="input-group-addon slx-ga">{{lang_bindDN}}</span>
- <input tabindex="3" name="binddn" value="{{binddn}}" type="text" class="form-control" placeholder="domain\bwlp *ODER* CN=bwlp,OU=Benutzer,DC=domain,DC=hs-beispiel,DC=de">
+ <input tabindex="3" name="binddn" value="{{binddn}}" type="text" class="form-control" placeholder="CN=bwlp,OU=Benutzer,DC=domain,DC=hs-beispiel,DC=de">
<!--span class="input-group-btn">
<a class="btn btn-default"><span class="glyphicon glyphicon-question-sign"></span></a>
</span-->