"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/reports/snapin_log.report.php" between
fogproject-1.5.7.tar.gz and fogproject-1.5.8.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

snapin_log.report.php  (fogproject-1.5.7):snapin_log.report.php  (fogproject-1.5.8)
skipping to change at line 38 skipping to change at line 38
'${input}' '${input}'
); );
$this->attributes = array( $this->attributes = array(
array('class' => 'col-xs-4'), array('class' => 'col-xs-4'),
array('class' => 'col-xs-8 form-group') array('class' => 'col-xs-8 form-group')
); );
$snapinNames = self::getSubObjectIDs( $snapinNames = self::getSubObjectIDs(
'Snapin', 'Snapin',
'', '',
'name' 'name'
); );
$snapinHostIDs = self::getSubObjectIDs( $snapinHostIDs = self::getSubObjectIDs(
'SnapinAssociation', 'SnapinAssociation',
'', '',
'hostID' 'hostID'
); );
$HostNames = self::getSubObjectIDs( $HostNames = self::getSubObjectIDs(
'Host', 'Host',
array('id' => $snapinHostIDs), array('id' => $snapinHostIDs),
'name' 'name'
); );
unset($snapinHostIDs); unset($snapinHostIDs);
$snapinNames = array_values( $snapinNames = array_values(
array_filter( array_filter(
array_unique( array_unique(
(array)$snapinNames (array)$snapinNames
) )
) )
); );
$HostNames = array_values( $HostNames = array_values(
array_filter( array_filter(
array_unique( array_unique(
(array)$HostNames (array)$HostNames
) )
) )
); );
natcasesort($snapinNames); natcasesort($snapinNames);
natcasesort($HostNames); natcasesort($HostNames);
if (count($snapinNames) > 0) { if (is_array($snapinNames) && count($snapinNames) > 0) {
$snapinSelForm = self::selectForm( $snapinSelForm = self::selectForm(
'snapinsearch', 'snapinsearch',
$snapinNames $snapinNames
); );
unset($snapinNames); unset($snapinNames);
} }
if (count($HostNames) > 0) { if (is_array($HostNames) && count($HostNames) > 0) {
$hostSelForm = self::selectForm( $hostSelForm = self::selectForm(
'hostsearch', 'hostsearch',
$HostNames $HostNames
); );
unset($HostNames); unset($HostNames);
} }
$fields = array( $fields = array(
'<label for="snapinsearch">' '<label for="snapinsearch">'
. _('Enter a snapin name to search for') . _('Enter a snapin name to search for')
. '</label>' => $snapinSelForm, . '</label>' => $snapinSelForm,
'<label for="hostsearch">' '<label for="hostsearch">'
. _('Enter a hostname to search for') . _('Enter a hostname to search for')
. '</label>' => $hostSelForm, . '</label>' => $hostSelForm,
'<label for="performsearch">' '<label for="performsearch">'
skipping to change at line 124 skipping to change at line 124
* Initial display * Initial display
* *
* @return void * @return void
*/ */
public function filePost() public function filePost()
{ {
$this->title = _('Found snapin information'); $this->title = _('Found snapin information');
$hostsearch = filter_input( $hostsearch = filter_input(
INPUT_POST, INPUT_POST,
'hostsearch' 'hostsearch'
); );
$snapinsearch = filter_input( $snapinsearch = filter_input(
INPUT_POST, INPUT_POST,
'snapinsearch' 'snapinsearch'
); );
if (!$hostsearch) { if (!$hostsearch) {
$hostsearch = '%'; $hostsearch = '%';
} }
if (!$snapinsearch) { if (!$snapinsearch) {
$snapinsearch = '%'; $snapinsearch = '%';
} }
$hostIDs = self::getSubObjectIDs( $hostIDs = self::getSubObjectIDs(
'Host', 'Host',
array('name' => $hostsearch) array('name' => $hostsearch)
); );
skipping to change at line 210 skipping to change at line 210
} }
$this->ReportMaker->endCSVLine(); $this->ReportMaker->endCSVLine();
Route::listem( Route::listem(
'snapintask', 'snapintask',
'jobID', 'jobID',
'false', 'false',
array( array(
'snapinID' => $snapinIDs, 'snapinID' => $snapinIDs,
'jobID' => $jobIDs 'jobID' => $jobIDs
) )
);
);
$SnapinTasks = json_decode( $SnapinTasks = json_decode(
Route::getData() Route::getData()
); );
$SnapinTasks = $SnapinTasks->snapintasks; $SnapinTasks = $SnapinTasks->snapintasks;
foreach ((array)$SnapinTasks as &$SnapinTask) { foreach ((array)$SnapinTasks as &$SnapinTask) {
$start = self::niceDate($SnapinTask->checkin); $start = self::niceDate($SnapinTask->checkin);
$end = self::niceDate($SnapinTask->complete); $end = self::niceDate($SnapinTask->complete);
if (!self::validDate($start)) { if (!self::validDate($start)) {
continue; continue;
} }
skipping to change at line 332 skipping to change at line 331
} }
$this->ReportMaker->appendHTML($this->process(12)); $this->ReportMaker->appendHTML($this->process(12));
echo '<div class="col-xs-9">'; echo '<div class="col-xs-9">';
echo '<div class="panel panel-info">'; echo '<div class="panel panel-info">';
echo '<div class="panel-heading text-center">'; echo '<div class="panel-heading text-center">';
echo '<h4 class="title">'; echo '<h4 class="title">';
echo $this->title; echo $this->title;
echo '</h4>'; echo '</h4>';
echo '</div>'; echo '</div>';
echo '<div class="panel-body">'; echo '<div class="panel-body">';
if (count($this->data) > 0) { if (is_array($this->data) && count($this->data) > 0) {
echo '<div class="text-center">'; echo '<div class="text-center">';
printf( printf(
$this->reportString, $this->reportString,
'SnapinLog', 'SnapinLog',
_('Export CSV'), _('Export CSV'),
_('Export CSV'), _('Export CSV'),
self::$csvfile, self::$csvfile,
'SnapinLog', 'SnapinLog',
_('Export PDF'), _('Export PDF'),
_('Export PDF'), _('Export PDF'),
 End of changes. 13 change blocks. 
18 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)