Skip to content
Snippets Groups Projects
Commit 6efbc1aa authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'restyle-adminlte' into 'master'

fast access to errors

See merge request !9
parents 18d234a0 9b881c6e
No related branches found
No related tags found
1 merge request!9fast access to errors
......@@ -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
*
......@@ -198,9 +214,9 @@ class cronlogrenderer extends cronlog{
. '</p>'
. '<div>'
. $this->_renderAccessAndAge($iLast)
. ($iErrors ? '<span class="btn bg-danger">' . $iErrors.'</span> ' : '')
. ( $iOK ? '<span class="btn bg-success">' . $iOK.'</span>' : '')
. ($iErrors && $iOK ? ' ... gesamt: <span class="btn bg-gray">' . count($aData).'</span>' : '' )
. ($iErrors ? '<a href="#" class="btn bg-danger" onclick="'.$this->_filterDatatable($sIdTable, "FEHLER").'">' . $iErrors.'</a> ' : '')
. ( $iOK ? '<a href="#" class="btn bg-success" onclick="'.$this->_filterDatatable($sIdTable, "OK").'">' . $iOK.'</a>' : '')
. ($iErrors && $iOK ? ' ... gesamt: <a href="#" class="btn bg-gray" onclick="'.$this->_filterDatatable($sIdTable, "").'">' . count($aData).'</a>' : '' )
. '<br>'
. '</div>'
. '<table id="'.$sIdTable.'" class="table-striped">'
......
<?php
define("APP_VERSION", '2.0.2');
define("APP_VERSION", '2.0.3');
require_once('classes/render-adminlte.class.php');
$renderAdminLTE=new renderadminlte();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment