Skip to content
Snippets Groups Projects

fast access to errors

Merged Hahn Axel (hahn) requested to merge restyle-adminlte into master
2 files
+ 20
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -57,6 +57,22 @@ class cronlogrenderer extends cronlog{
@@ -57,6 +57,22 @@ class cronlogrenderer extends cronlog{
;
;
}
}
 
/**
 
* get onclick value to filter a datatable
 
* @param string $sDatatable id of table
 
* @param string $sFiltertext text to filter
 
* @return string
 
*
 
*/
 
protected function _filterDatatable($sDatatable, $sFiltertext){
 
/*
 
<a href="#" title="Filtere nach VHost «crawler.ascii.iml.unibe.ch:443»"
 
onclick="$('#tableRenderedallrequestsphp1_filter>INPUT').val('crawler.ascii.iml.unibe.ch:443');
 
$('#tableRenderedallrequestsphp1').dataTable().fnFilter('crawler.ascii.iml.unibe.ch:443'); return false;">crawler.ascii.iml.unibe.ch:443</a>
 
*/
 
return '$(\'#'.$sDatatable.'\').dataTable().fnFilter(\''.$sFiltertext.'\'); return false;';
 
}
 
/**
/**
* get html code for a table with events of executed cronjobs
* get html code for a table with events of executed cronjobs
*
*
@@ -198,9 +214,9 @@ class cronlogrenderer extends cronlog{
@@ -198,9 +214,9 @@ class cronlogrenderer extends cronlog{
. '</p>'
. '</p>'
. '<div>'
. '<div>'
. $this->_renderAccessAndAge($iLast)
. $this->_renderAccessAndAge($iLast)
. ($iErrors ? '<span class="btn bg-danger">' . $iErrors.'</span> ' : '')
. ($iErrors ? '<a href="#" class="btn bg-danger" onclick="'.$this->_filterDatatable($sIdTable, "FEHLER").'">' . $iErrors.'</a> ' : '')
. ( $iOK ? '<span class="btn bg-success">' . $iOK.'</span>' : '')
. ( $iOK ? '<a href="#" class="btn bg-success" onclick="'.$this->_filterDatatable($sIdTable, "OK").'">' . $iOK.'</a>' : '')
. ($iErrors && $iOK ? ' ... gesamt: <span class="btn bg-gray">' . count($aData).'</span>' : '' )
. ($iErrors && $iOK ? ' ... gesamt: <a href="#" class="btn bg-gray" onclick="'.$this->_filterDatatable($sIdTable, "").'">' . count($aData).'</a>' : '' )
. '<br>'
. '<br>'
. '</div>'
. '</div>'
. '<table id="'.$sIdTable.'" class="table-striped">'
. '<table id="'.$sIdTable.'" class="table-striped">'
Loading