hostmanagementpage.class.php (fogproject-1.5.5) | : | hostmanagementpage.class.php (fogproject-1.5.6) | ||
---|---|---|---|---|
skipping to change at line 826 | skipping to change at line 826 | |||
'dow' => $PowerManagement->dow, | 'dow' => $PowerManagement->dow, | |||
'action' => self::getClass('PowerManagementManager') | 'action' => self::getClass('PowerManagementManager') | |||
->getActionSelect( | ->getActionSelect( | |||
$PowerManagement->action, | $PowerManagement->action, | |||
true | true | |||
) | ) | |||
); | ); | |||
unset($PowerManagement); | unset($PowerManagement); | |||
} | } | |||
// Current data. | // Current data. | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
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 _('Current Power Management settings'); | echo _('Current Power Management settings'); | |||
echo '</h4>'; | echo '</h4>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '<div class="body">'; | echo '<div class="body">'; | |||
echo '<form class="deploy-container form-horizontal" ' | echo '<form class="deploy-container form-horizontal" ' | |||
. 'method="post" action="' | . 'method="post" action="' | |||
. $this->formAction | . $this->formAction | |||
skipping to change at line 1586 | skipping to change at line 1586 | |||
echo '</label>'; | echo '</label>'; | |||
echo '<div class="col-xs-8">'; | echo '<div class="col-xs-8">'; | |||
echo '<button type="submit" name="levelup" class=' | echo '<button type="submit" name="levelup" class=' | |||
. '"btn btn-info btn-block" id="levelup">' | . '"btn btn-info btn-block" id="levelup">' | |||
. _('Update') | . _('Update') | |||
. '</button>'; | . '</button>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '</div>'; | echo '</div>'; | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
self::$HookManager | self::$HookManager | |||
->processEvent( | ->processEvent( | |||
'HOST_ADD_PRINTER', | 'HOST_ADD_PRINTER', | |||
array( | array( | |||
'headerData' => &$this->headerData, | 'headerData' => &$this->headerData, | |||
'data' => &$this->data, | 'data' => &$this->data, | |||
'templates' => &$this->templates, | 'templates' => &$this->templates, | |||
'attributes' => &$this->attributes | 'attributes' => &$this->attributes | |||
) | ) | |||
); | ); | |||
skipping to change at line 1688 | skipping to change at line 1688 | |||
), | ), | |||
'printer_name' => $Printer->name, | 'printer_name' => $Printer->name, | |||
'printer_type' => ( | 'printer_type' => ( | |||
stripos($Printer->config, 'local') !== false ? | stripos($Printer->config, 'local') !== false ? | |||
_('TCP/IP') : | _('TCP/IP') : | |||
$Printer->config | $Printer->config | |||
) | ) | |||
); | ); | |||
unset($Printer); | unset($Printer); | |||
} | } | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
self::$HookManager | self::$HookManager | |||
->processEvent( | ->processEvent( | |||
'HOST_EDIT_PRINTER', | 'HOST_EDIT_PRINTER', | |||
array( | array( | |||
'headerData' => &$this->headerData, | 'headerData' => &$this->headerData, | |||
'data' => &$this->data, | 'data' => &$this->data, | |||
'templates' => &$this->templates, | 'templates' => &$this->templates, | |||
'attributes' => &$this->attributes | 'attributes' => &$this->attributes | |||
) | ) | |||
); | ); | |||
skipping to change at line 1811 | skipping to change at line 1811 | |||
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 _('Host Snapins'); | echo _('Host Snapins'); | |||
echo '</h4>'; | echo '</h4>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '<div class="panel-body">'; | echo '<div class="panel-body">'; | |||
echo '<form class="form-horizontal" method="post" action="' | echo '<form class="form-horizontal" method="post" action="' | |||
. $this->formAction | . $this->formAction | |||
. '&tab=host-snapins">'; | . '&tab=host-snapins">'; | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
self::$HookManager | self::$HookManager | |||
->processEvent( | ->processEvent( | |||
'HOST_ADD_SNAPIN', | 'HOST_ADD_SNAPIN', | |||
array( | array( | |||
'headerData' => &$this->headerData, | 'headerData' => &$this->headerData, | |||
'data' => &$this->data, | 'data' => &$this->data, | |||
'templates' => &$this->templates, | 'templates' => &$this->templates, | |||
'attributes' => &$this->attributes | 'attributes' => &$this->attributes | |||
) | ) | |||
); | ); | |||
skipping to change at line 1897 | skipping to change at line 1897 | |||
} | } | |||
$this->data[] = array( | $this->data[] = array( | |||
'snapin_id' => $Snapin->id, | 'snapin_id' => $Snapin->id, | |||
'snapin_name' => $Snapin->name, | 'snapin_name' => $Snapin->name, | |||
'snapin_created' => self::niceDate( | 'snapin_created' => self::niceDate( | |||
$Snapin->createdTime | $Snapin->createdTime | |||
)->format('Y-m-d H:i:s') | )->format('Y-m-d H:i:s') | |||
); | ); | |||
unset($Snapin); | unset($Snapin); | |||
} | } | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
self::$HookManager | self::$HookManager | |||
->processEvent( | ->processEvent( | |||
'HOST_EDIT_SNAPIN', | 'HOST_EDIT_SNAPIN', | |||
array( | array( | |||
'headerData' => &$this->headerData, | 'headerData' => &$this->headerData, | |||
'data' => &$this->data, | 'data' => &$this->data, | |||
'templates' => &$this->templates, | 'templates' => &$this->templates, | |||
'attributes' => &$this->attributes | 'attributes' => &$this->attributes | |||
) | ) | |||
); | ); | |||
skipping to change at line 2611 | skipping to change at line 2611 | |||
->processEvent( | ->processEvent( | |||
'HOST_VIRUS', | 'HOST_VIRUS', | |||
array( | array( | |||
'headerData' => &$this->headerData, | 'headerData' => &$this->headerData, | |||
'data' => &$this->data, | 'data' => &$this->data, | |||
'templates' => &$this->templates, | 'templates' => &$this->templates, | |||
'attributes' => &$this->attributes | 'attributes' => &$this->attributes | |||
) | ) | |||
); | ); | |||
$paneltype = 'info'; | $paneltype = 'info'; | |||
if (count($this->data) > 0) { | if (is_array($this->data) && count($this->data) > 0) { | |||
$paneltype = 'warning'; | $paneltype = 'warning'; | |||
} | } | |||
echo '<!-- Virus -->'; | echo '<!-- Virus -->'; | |||
echo '<div class="tab-pane fade" id="host-virus-history">'; | echo '<div class="tab-pane fade" id="host-virus-history">'; | |||
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 _('Host Virus History'); | echo _('Host Virus History'); | |||
echo '</h4>'; | echo '</h4>'; | |||
echo '</div>'; | echo '</div>'; | |||
skipping to change at line 2944 | skipping to change at line 2944 | |||
$typeName = $Task->type->name; | $typeName = $Task->type->name; | |||
if (!$typeName) { | if (!$typeName) { | |||
$typeName = $Log->type; | $typeName = $Log->type; | |||
} | } | |||
if (in_array($typeName, array('up', 'down'))) { | if (in_array($typeName, array('up', 'down'))) { | |||
$typeName = $imgTypes[$typeName]; | $typeName = $imgTypes[$typeName]; | |||
} | } | |||
$stateName = $Task->state->name; | $stateName = $Task->state->name; | |||
unset($Task); | unset($Task); | |||
$createdBy = ( | $createdBy = ( | |||
$log->createdBy ?: | $Log->createdBy ?: | |||
self::$FOGUser->get('name') | self::$FOGUser->get('name') | |||
); | ); | |||
$Image = $Log->image; | $Image = $Log->image; | |||
if (!$Image->id) { | if (!$Image->id) { | |||
$imgName = $Image; | $imgName = $Image; | |||
$imgPath = _('N/A'); | $imgPath = _('N/A'); | |||
} else { | } else { | |||
$imgName = $Image->name; | $imgName = $Image->name; | |||
$imgPath = $Image->path; | $imgPath = $Image->path; | |||
} | } | |||
skipping to change at line 3767 | skipping to change at line 3767 | |||
* @return void | * @return void | |||
*/ | */ | |||
public function hostlogins() | public function hostlogins() | |||
{ | { | |||
$date = filter_input(INPUT_GET, 'dte'); | $date = filter_input(INPUT_GET, 'dte'); | |||
$MainDate = self::niceDate($date) | $MainDate = self::niceDate($date) | |||
->getTimestamp(); | ->getTimestamp(); | |||
$MainDate_1 = self::niceDate($date) | $MainDate_1 = self::niceDate($date) | |||
->modify('+1 day') | ->modify('+1 day') | |||
->getTimestamp(); | ->getTimestamp(); | |||
Route::listem('UserTracking'); | Route::listem( | |||
'UserTracking', | ||||
array( | ||||
'hostID' => $this->obj->get('id'), | ||||
'action' => array('', 0, 1) | ||||
) | ||||
); | ||||
$UserTracks = json_decode( | $UserTracks = json_decode( | |||
Route::getData() | Route::getData() | |||
); | ); | |||
$UserTracks = $UserTracks->usertrackings; | $UserTracks = $UserTracks->usertrackings; | |||
$data = null; | $data = null; | |||
$Data = array(); | $Data = array(); | |||
foreach ((array)$UserTracks as &$Login) { | foreach ((array)$UserTracks as &$Login) { | |||
$ldate = self::niceDate($Login->date) | $ldate = self::niceDate($Login->date) | |||
->format('Y-m-d'); | ->format('Y-m-d'); | |||
if ($Login->hostID != $this->obj->get('id') | if ($Login->hostID != $this->obj->get('id') | |||
End of changes. 8 change blocks. | ||||
8 lines changed or deleted | 14 lines changed or added |