summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael pereira2011-04-12 14:04:59 +0200
committermichael pereira2011-04-12 14:04:59 +0200
commit967b36157bff99cf6d91735f12c4f1cf40e176b6 (patch)
treed435b0878949758d066116b59e1abb4ac7b9c9f0
parentpreboot fix (diff)
parentGroupGraph padding hinzugefügt (diff)
downloadpbs2-967b36157bff99cf6d91735f12c4f1cf40e176b6.tar.gz
pbs2-967b36157bff99cf6d91735f12c4f1cf40e176b6.tar.xz
pbs2-967b36157bff99cf6d91735f12c4f1cf40e176b6.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
-rw-r--r--application/models/GroupGroupsMapper.php5
-rw-r--r--application/modules/user/controllers/IndexController.php2
-rw-r--r--application/modules/user/views/scripts/bootiso/index.phtml5
-rw-r--r--application/modules/user/views/scripts/bootmenu/index.phtml10
-rw-r--r--application/modules/user/views/scripts/bootos/index.phtml5
-rw-r--r--application/modules/user/views/scripts/client/index.phtml4
-rw-r--r--application/modules/user/views/scripts/config/index.phtml5
-rw-r--r--application/modules/user/views/scripts/filter/index.phtml4
-rw-r--r--application/modules/user/views/scripts/group/showall.phtml5
-rw-r--r--application/modules/user/views/scripts/person/showall.phtml5
-rw-r--r--application/modules/user/views/scripts/pool/index.phtml14
-rw-r--r--application/modules/user/views/scripts/preboot/index.phtml5
-rw-r--r--application/modules/user/views/scripts/role/index.phtml5
-rw-r--r--application/modules/user/views/scripts/session/index.phtml5
-rw-r--r--library/Pbs/Graph.php34
-rw-r--r--public/media/css/style.css4
-rw-r--r--public/media/css/user.css15
-rw-r--r--public/media/img/sub-logo-small-transparent.gifbin1591 -> 0 bytes
-rw-r--r--public/media/img/sub-logo-small-transparent.pngbin0 -> 2354 bytes
-rwxr-xr-xpublic/media/img/sub-logo-small.gifbin2114 -> 0 bytes
-rw-r--r--public/media/img/sub-logo-small.pngbin0 -> 3347 bytes
-rwxr-xr-xpublic/media/img/unilogo-200x66.gifbin2575 -> 0 bytes
-rw-r--r--public/media/img/unilogo-200x66.pngbin0 -> 4348 bytes
23 files changed, 104 insertions, 28 deletions
diff --git a/application/models/GroupGroupsMapper.php b/application/models/GroupGroupsMapper.php
index 535c380..702d6d9 100644
--- a/application/models/GroupGroupsMapper.php
+++ b/application/models/GroupGroupsMapper.php
@@ -117,7 +117,7 @@ class Application_Model_GroupGroupsMapper
// Gets All groupIDs of the parent groups begins with the
public function getParentGroups($groupID, &$data=null, $level=0) {
if($this->crawledNodes['parent'][$groupID] == 1)
- return;
+ return $data;
$this->crawledNodes['parent'][$groupID] = 1;
$data[$level][] = $groupID;
@@ -134,9 +134,8 @@ class Application_Model_GroupGroupsMapper
// Gets all childs-groups from a given group
public function getChildGroups($groupID, &$data=null, $level=0) {
if($this->crawledNodes['child'][$groupID] == 1)
- return;
+ return $data;
$this->crawledNodes['child'][$groupID] = 1;
-
$data[$level][] = $groupID;
$db = Zend_Db_Table::getDefaultAdapter();
$query = 'SELECT groupID FROM pbs_groupgroups WHERE parentID="'.$groupID.'"';
diff --git a/application/modules/user/controllers/IndexController.php b/application/modules/user/controllers/IndexController.php
index ce5c994..1205f7a 100644
--- a/application/modules/user/controllers/IndexController.php
+++ b/application/modules/user/controllers/IndexController.php
@@ -21,7 +21,7 @@ class User_IndexController extends Zend_Controller_Action
'/user/config' => 'Create your own Configuration',
'/user/bootmenu' => 'Create your Bootmenu',
);
- $this->view->links = $links;
+ $this->view->links = $links;
}
}
}
diff --git a/application/modules/user/views/scripts/bootiso/index.phtml b/application/modules/user/views/scripts/bootiso/index.phtml
index d0e8dd1..a8c4e1c 100644
--- a/application/modules/user/views/scripts/bootiso/index.phtml
+++ b/application/modules/user/views/scripts/bootiso/index.phtml
@@ -28,7 +28,10 @@
echo "There are no BootISO entries to display." ?>
<?php foreach ($this->bootisolist as $k => $bootiso): ?>
<div class='element'>
- <div class='number'><?php echo $k+1; ?></div>
+ <div class='number'>
+ <div class='smallnumber'>BootIso</div>
+ <?php echo $k+1; ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('bdld')): ?>
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml
index cda6f87..332a1a4 100644
--- a/application/modules/user/views/scripts/bootmenu/index.phtml
+++ b/application/modules/user/views/scripts/bootmenu/index.phtml
@@ -36,7 +36,10 @@
$class= 'highlight';
?>
<div class='element<?php echo " $class";?>'>
- <div class='number'><?php echo $k+1 ?></div>
+ <div class='number'>
+ <div class='smallnumber'>BMenu</div>
+ <?php echo $k+1 ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('boodbm') && $this->type == 'group'): ?>
@@ -107,7 +110,10 @@
<?php endif; ?>
<?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $k => $bootmenuentry): ?>
<div class='element'>
- <div class='number'><?php echo $k+1 ?></div>
+ <div class='number'>
+ <div class='smallnumber'>BMEntry</div>
+ <?php echo $k+1 ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if((Pbs_Acl::checkRight('booai') && $this->type == 'group') || (Pbs_Acl::checkRight('booaio') && $this->type == 'own')): ?>
diff --git a/application/modules/user/views/scripts/bootos/index.phtml b/application/modules/user/views/scripts/bootos/index.phtml
index d135ed3..00a0eb8 100644
--- a/application/modules/user/views/scripts/bootos/index.phtml
+++ b/application/modules/user/views/scripts/bootos/index.phtml
@@ -36,7 +36,10 @@
echo "There are no BootOs's to display." ?>
<?php foreach ($this->bootoslist as $k => $bootos): ?>
<div class='element'>
- <div class='number'><?php echo $k+1 ?></div>
+ <div class='number'>
+ <div class='smallnumber'>BootOs</div>
+ <?php echo $k+1 ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('bou')): ?>
diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml
index 0d6145c..15918cc 100644
--- a/application/modules/user/views/scripts/client/index.phtml
+++ b/application/modules/user/views/scripts/client/index.phtml
@@ -18,7 +18,9 @@
echo "There are no Clients to display." ?>
<?php foreach ($this->clients as $client): ?>
<div class='element'>
- <div class='number'><?php echo $this->escape($client['clientID']) ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Client</div>
+ <?php echo $this->escape($client['clientID']) ?></div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('cle')): ?>
diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml
index 7966a3e..40a9715 100644
--- a/application/modules/user/views/scripts/config/index.phtml
+++ b/application/modules/user/views/scripts/config/index.phtml
@@ -31,7 +31,10 @@
echo "There are no Config's to display." ?>
<?php foreach ($this->configlist as $k => $config): ?>
<div class='element'>
- <div class='number'><?php echo $k+1; ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Config</div>
+ <?php echo $k+1; ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(((Pbs_Acl::checkRight('ce') || Pbs_Acl::checkRight('cem')) && $this->type == 'group') || ($this->type == 'own' && Pbs_Acl::checkRight('ceo'))): ?>
diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml
index a242a7b..bb11da7 100644
--- a/application/modules/user/views/scripts/filter/index.phtml
+++ b/application/modules/user/views/scripts/filter/index.phtml
@@ -22,7 +22,9 @@
echo "There are no Filters to display." ?>
<?php foreach ($this->filters as $filter): ?>
<div class='element'>
- <div class='number'><acronym title='<?php echo $this->escape($filter->getID()) ?>'><?php echo $this->escape($filter->priority) ?></acronym></div>
+ <div class='number'>
+ <div class='smallnumber'>Priority</div>
+ <acronym title='<?php echo $this->escape($filter->getID()) ?>'><?php echo $this->escape($filter->priority) ?></acronym></div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('fe') || Pbs_Acl::checkRight('fefp')):?>
diff --git a/application/modules/user/views/scripts/group/showall.phtml b/application/modules/user/views/scripts/group/showall.phtml
index 5e53f87..2e376b3 100644
--- a/application/modules/user/views/scripts/group/showall.phtml
+++ b/application/modules/user/views/scripts/group/showall.phtml
@@ -21,7 +21,10 @@ $class= 'highlight checked';
?>
<div class='element<?php echo " $class";?>'><?php if($group->getID() != $this->userIDsNamespace['groupID']) {
?>
-<div class='number'><?php echo $k+1; ?></div>
+<div class='number'>
+ <div class='smallnumber'>Group</div>
+ <?php echo $k+1; ?>
+</div>
<?php
}
?>
diff --git a/application/modules/user/views/scripts/person/showall.phtml b/application/modules/user/views/scripts/person/showall.phtml
index 1521744..1909782 100644
--- a/application/modules/user/views/scripts/person/showall.phtml
+++ b/application/modules/user/views/scripts/person/showall.phtml
@@ -18,7 +18,10 @@ $class= 'highlight checked';
<div class='element<?php echo " $class";?>'>
<?php if($person->getID() != $this->userIDsNamespace['personID']) {
?>
- <div class='number'><?php echo $k+1; ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Person</div>
+ <?php echo $k+1; ?>
+ </div>
<?php
}
?>
diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml
index fbdb8f8..49ad5f7 100644
--- a/application/modules/user/views/scripts/pool/index.phtml
+++ b/application/modules/user/views/scripts/pool/index.phtml
@@ -26,7 +26,10 @@
echo "There are no Pools to display." ?>
<?php foreach ($this->pools as $pool): ?>
<div class='element'>
- <div class='number'><?php echo $this->escape($pool->getID()) ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Pool</div>
+ <?php echo $this->escape($pool->getID()) ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('poe')): ?>
@@ -84,7 +87,10 @@
$clientMapper->find($client['clientID'],$cli);
?>
<div class='element'>
- <div class='number'><?php echo $client['clientID'];?></div>
+ <div class='number'>
+ <div class='smallnumber'>Client</div>
+ <?php echo $client['clientID'];?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('pouc')):?>
@@ -132,7 +138,9 @@
<?php
foreach ($this->freeclients as $client): ?>
<div class='element'>
- <div class='number'>5</div>
+ <div class='number'>
+ <div class='smallnumber'>Client</div>
+ <?php echo $client['clientID'];?></div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('polc')):?>
diff --git a/application/modules/user/views/scripts/preboot/index.phtml b/application/modules/user/views/scripts/preboot/index.phtml
index 8d8da26..620fb4f 100644
--- a/application/modules/user/views/scripts/preboot/index.phtml
+++ b/application/modules/user/views/scripts/preboot/index.phtml
@@ -25,7 +25,10 @@
echo "There are no Preboot entries to display." ?>
<?php foreach ($this->prebootlist as $k => $preboot): ?>
<div class='element'>
- <div class='number'><?php echo $k+1 ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Preboot</div>
+ <?php echo $k+1 ?>
+ </div>
<div class='content'>
<div class='actions'>
<?php if(Pbs_Acl::checkRight('pru')): ?>
diff --git a/application/modules/user/views/scripts/role/index.phtml b/application/modules/user/views/scripts/role/index.phtml
index cc34869..0488211 100644
--- a/application/modules/user/views/scripts/role/index.phtml
+++ b/application/modules/user/views/scripts/role/index.phtml
@@ -24,7 +24,10 @@ $class= 'highlight checked';
?>
<div class='element<?php echo " $class";?>'><?php if($role['roleID'] != $this->userIDsNamespace['roleID']) {
?>
-<div class='number'><?php echo $k+1; ?></div>
+<div class='number'>
+ <div class='smallnumber'>Role</div>
+ <?php echo $k+1; ?>
+</div>
<?php
}
?>
diff --git a/application/modules/user/views/scripts/session/index.phtml b/application/modules/user/views/scripts/session/index.phtml
index c4225f3..67c8b8d 100644
--- a/application/modules/user/views/scripts/session/index.phtml
+++ b/application/modules/user/views/scripts/session/index.phtml
@@ -19,7 +19,10 @@
echo "There are no Sessions to display." ?>
<?php foreach ($this->sessions as $session): ?>
<div class='element'>
- <div class='number'><?php echo $this->escape($session->getID()) ?></div>
+ <div class='number'>
+ <div class='smallnumber'>Session</div>
+ <?php echo $this->escape($session->getID()) ?>
+ </div>
<div class='content'>
<div class='title'>Alphasession <?php echo $this->escape($session->getAlphasessionID()) ?></div>
<div class='subtitle'><?php echo $this->escape($session->getTime()) ?></div>
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index c924b59..e7ebc55 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -17,6 +17,7 @@ class Pbs_Graph{
$this->graphstring = 'digraph groups {
size="5,5";
+ pad=0.1;
graph[ bgcolor=transparent ];
node [ style=filled fillcolor="#ffffffff" ];
"'.$this->getGroupTitle($groupID).'" [ fontcolor="#ffffffff", style=filled, fillcolor="#004A99FF"];
@@ -26,11 +27,34 @@ class Pbs_Graph{
$this->graphstring .= '}';
$this->graphstring = str_replace(array("\t","\n"),"",$this->graphstring);
$this->graphstring = str_replace('"','\"',$this->graphstring);
-
- $str = 'echo "';
- $str .= $this->graphstring;
- $str .= '" | dot -Tpng ';
- passthru($str, $result);
+
+ $md5 = md5($this->graphstring);
+ $path = "../resources/groupgraphs/";
+ @mkdir($path ,0777, true);
+
+ // randomly delete cached files, old files are not needed
+ // so delete it sometimes
+ if(rand(0,20) == 1){
+ $days = "14"; // delete all files older than this many days
+ $seconds = ($days*24*60*60);
+
+ $files = scandir($path);
+ foreach ($files as $num => $fname){
+ if (file_exists("{$path}{$fname}") && ((time() - filemtime("{$path}{$fname}")) > $seconds)) {
+ $mod_time = filemtime("{$path}{$fname}");
+ unlink("{$path}{$fname}");
+ }
+ }
+ }
+
+ if(!file_exists($path.$md5.".png")){
+ $str = 'echo "';
+ $str .= $this->graphstring;
+ $str .= '" | dot -Tpng >'.$path.$md5.".png";
+ exec($str);
+ }
+
+ passthru("cat ".$path.$md5.".png", $result);
return $result;
}
private function getGroupTitle($groupID){
diff --git a/public/media/css/style.css b/public/media/css/style.css
index 54dc213..3cbe1e3 100644
--- a/public/media/css/style.css
+++ b/public/media/css/style.css
@@ -9,7 +9,7 @@ body {
#logo {
height: 200px;
width: 200px;
- background: url(/media/img/unilogo-200x66.gif) bottom right no-repeat;
+ background: url(/media/img/unilogo-200x66.png) bottom right no-repeat;
}
#logo-bar-gray {
@@ -68,7 +68,7 @@ body {
#head {
height: 116px;
background: url(/media/img/siegel-93x55.png) bottom left no-repeat,
- url(/media/img/sub-logo-small-transparent.gif) bottom right no-repeat;
+ url(/media/img/sub-logo-small-transparent.png) bottom right no-repeat;
}
#head h1,h2 {
diff --git a/public/media/css/user.css b/public/media/css/user.css
index 19d86cd..8b16f52 100644
--- a/public/media/css/user.css
+++ b/public/media/css/user.css
@@ -84,6 +84,7 @@
.listelement .element .number {
font-size: 28px;
+ clear:left;
float: left;
padding: 0px 5px 0px 0px;
width: 40px;
@@ -91,8 +92,18 @@
color: #CCC;
font-style: italic;
font-weight: bold;
+ line-height:26px;
+}
+.listelement .element .smallnumber{
+ font-size: 10px;
+ float: left;
+ padding: 0px 5px 0px 0px;
+ width: 40px;
+ text-align: center;
+ color: #CCC;
+ font-weight: bold;
+ line-height:12px;
}
-
.listelement .element .content {
margin-left: 50px;
}
@@ -199,4 +210,4 @@
.noBold {
font-weight: normal;
-} \ No newline at end of file
+}
diff --git a/public/media/img/sub-logo-small-transparent.gif b/public/media/img/sub-logo-small-transparent.gif
deleted file mode 100644
index 6ac7b92..0000000
--- a/public/media/img/sub-logo-small-transparent.gif
+++ /dev/null
Binary files differ
diff --git a/public/media/img/sub-logo-small-transparent.png b/public/media/img/sub-logo-small-transparent.png
new file mode 100644
index 0000000..337b113
--- /dev/null
+++ b/public/media/img/sub-logo-small-transparent.png
Binary files differ
diff --git a/public/media/img/sub-logo-small.gif b/public/media/img/sub-logo-small.gif
deleted file mode 100755
index faa5b8e..0000000
--- a/public/media/img/sub-logo-small.gif
+++ /dev/null
Binary files differ
diff --git a/public/media/img/sub-logo-small.png b/public/media/img/sub-logo-small.png
new file mode 100644
index 0000000..f9107d7
--- /dev/null
+++ b/public/media/img/sub-logo-small.png
Binary files differ
diff --git a/public/media/img/unilogo-200x66.gif b/public/media/img/unilogo-200x66.gif
deleted file mode 100755
index a7e6666..0000000
--- a/public/media/img/unilogo-200x66.gif
+++ /dev/null
Binary files differ
diff --git a/public/media/img/unilogo-200x66.png b/public/media/img/unilogo-200x66.png
new file mode 100644
index 0000000..70bf6df
--- /dev/null
+++ b/public/media/img/unilogo-200x66.png
Binary files differ