diff --git a/classes/cronlog-renderer.class.php b/classes/cronlog-renderer.class.php index 295216063d071f77605dcbcdd1db8eff205e4306..05c350d36b57b792e5e7ee188de2876a92c649b9 100644 --- a/classes/cronlog-renderer.class.php +++ b/classes/cronlog-renderer.class.php @@ -74,7 +74,7 @@ class cronlogrenderer extends cronlog{ $sClass='message-ok'; } - $sHtml.='<tr class="'.$sClass.'" onclick="showFile(\''.$aEntry['logfile'].'\');">' + $sHtml.='<tr class="'.$sClass.'" onclick="showFile(\''.$aEntry['logfile'].'\');" title="Klick=['.$aEntry['logfile'].'] anzeigen ">' . '<td>'.date("Y-m-d H:i:s", $aEntry['SCRIPTSTARTTIME']).'</td>' // . '<td>'.$aEntry['SCRIPTNAME'].'</td>' . '<td>'.$aEntry['SCRIPTLABEL'].'</td>' @@ -221,6 +221,18 @@ class cronlogrenderer extends cronlog{ $this->_writeCacheData($sTaskId, $sHtml); return $sHtml; } + + public function renderJoblistOfAllServers(){ + $aData=array(); + foreach (array_keys($this->getServers()) as $sServer){ + $this->setServer($sServer); + $aData=array_merge($aData, $this->getServerJobHistory()); + } + $this->setServer('ALL'); + // echo '<pre>'.print_r($aData, 1).'</pre>'; + return $this->renderJoblist($aData); + } + /** * get html code for a timeline with events of executed cronjobs * @@ -300,6 +312,18 @@ class cronlogrenderer extends cronlog{ return $sHtml; } + public function renderJobGraphOfAllServers(){ + $aData=array(); + foreach (array_keys($this->getServers()) as $sServer){ + $this->setServer($sServer); + $aData=array_merge($aData, $this->getServerJobHistory()); + } + $this->setServer('ALL'); + // echo '<pre>'.print_r($aData, 1).'</pre>'; + return $this->renderJobGraph($aData); + } + + /** * show a single log file * @@ -323,7 +347,7 @@ class cronlogrenderer extends cronlog{ if ($fileHandle = fopen($sMyFile, "r")) { - $sHtml.='<div style="float: left;" onclick="showFileBack();"><pre>'; + $sHtml.='<div style="float: left;" onclick="showFileBack();" title="Klick=zurück"><pre>'; while (($line = fgets($fileHandle)) !== false) { # do same stuff with the $line $bIsComment=strstr($line, 'REM '); @@ -347,7 +371,9 @@ class cronlogrenderer extends cronlog{ // remove terminal color $sValue=preg_replace('/(\[[0-9]{1,3}m)/', '', $sValue); - $sHtml.='<div'.($sDivClass ? ' class="'.$sDivClass.'"' : '').'><span class="log-var">'.$sKey.'</span>=<span class="log-value">'.$sValue.'</span></div>'; + $sHtml.='<div'.($sDivClass ? ' class="'.$sDivClass.'"' : '') + // . ' title="'.$sKey.'='.$sValue.'" ' + . '><span class="log-var">'.$sKey.'</span>=<span class="log-value">'.$sValue.'</span></div>'; } } $sHtml.='</pre></div>'; diff --git a/get.php b/get.php index 4fc5e321e3e5589d1def5a58c971b743f4a1d196..d0c7dac24f0bbd90e86a492ca4336a0bdb3bfc40 100644 --- a/get.php +++ b/get.php @@ -21,7 +21,11 @@ if($sServer){ } switch ($sItem){ case 'crontable': - $sHtml.=$oCL->renderJoblist(); + if($sServer==='ALL'){ + $sHtml.=$oCL->renderJoblistOfAllServers(); + } else { + $sHtml.=$oCL->renderJoblist(); + } break; case 'cronlogs': if($sServer==='ALL'){ @@ -31,7 +35,11 @@ switch ($sItem){ } break; case 'graph': - $sHtml.=$oCL->renderJobGraph(); + if($sServer==='ALL'){ + $sHtml.=$oCL->renderJobGraphOfAllServers(); + } else { + $sHtml.=$oCL->renderJobGraph(); + } break; case 'selectserver': $sHtml.=$oCL->renderServerlist($sServer); diff --git a/index.php b/index.html similarity index 100% rename from index.php rename to index.html diff --git a/main.css b/main.css index 43ae9240b72ea63d0a3bf04b028a09c28335a16e..b032e025a8b0694759b0e8f11b7b9c2b41875d6a 100644 --- a/main.css +++ b/main.css @@ -42,6 +42,10 @@ td{padding:0.3em;} #crontable,#cronlogs,#graph{display: none;} #tabcontent div.active{display: block;} +.log-rem{color:#aaa; font-style: italic;} +.log-var{color:#088;} +.log-value{color:#008;} +pre div:hover{background:rgba(0,0,0,0.1);} /* ----- override datatable defaukts */ .dataTables_wrapper{clear: none;float: left; margin: auto 1px;} @@ -50,12 +54,10 @@ table.dataTable{margin: 0; width: auto;} table.dataTable tbody td{padding: 3px;} .message{border: 1px solid rgba(0,0,0,0.1); padding: 1em; float: right;} -.message-ok{background:#cfc !important; color:#080 !important;} -.message-error{background:#fee !important; color:#800 !important;} +table.dataTable tbody tr.message-ok, .message-ok{background:#cfc; color:#080 !important;} +table.dataTable tbody tr.message-error, .message-error{background:#fdd; color:#800 !important;} +table.dataTable tbody tr:hover{background:rgba(0,0,0,0.1);} -.log-rem{color:#aaa; font-style: italic;} -.log-var{color:#088;} -.log-value{color:#008;} /* timeline */