"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/fog/host.class.php" between
fogproject-1.5.5.tar.gz and fogproject-1.5.6.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.

host.class.php  (fogproject-1.5.5):host.class.php  (fogproject-1.5.6)
skipping to change at line 1299 skipping to change at line 1299
$taskName = '', $taskName = '',
$shutdown = false, $shutdown = false,
$debug = false, $debug = false,
$deploySnapins = false, $deploySnapins = false,
$isGroupTask = false, $isGroupTask = false,
$username = '', $username = '',
$passreset = '', $passreset = '',
$sessionjoin = false, $sessionjoin = false,
$wol = false $wol = false
) { ) {
$taskName .= ' - ' . $this->get('name');
try { try {
if (!$this->isValid()) { if (!$this->isValid()) {
throw new Exception(self::$foglang['HostNotValid']); throw new Exception(self::$foglang['HostNotValid']);
} }
$Task = $this->get('task'); $Task = $this->get('task');
$TaskType = new TaskType($taskTypeID); $TaskType = new TaskType($taskTypeID);
if (!$TaskType->isValid()) { if (!$TaskType->isValid()) {
throw new Exception(self::$foglang['TaskTypeNotValid']); throw new Exception(self::$foglang['TaskTypeNotValid']);
} }
if ($Task->isValid()) { if ($Task->isValid()) {
skipping to change at line 2160 skipping to change at line 2161
} }
/** /**
* Translates the ping status code to string * Translates the ping status code to string
* *
* @return string * @return string
*/ */
public function getPingCodeStr() public function getPingCodeStr()
{ {
$val = (int)$this->get('pingstatus'); $val = (int)$this->get('pingstatus');
$socketstr = socket_strerror($val); $socketstr = socket_strerror($val);
$strtoupdate = '<i class="icon-ping-%s fa fa-exclamation-circle %s' $strtoupdate = '<i class="icon-ping-%s fa fa-%s %s'
. '" data-toggle="tooltip" ' . '" data-toggle="tooltip" '
. 'data-placement="right" ' . 'data-placement="right" '
. 'title="' . 'title="%s'
. $socketstr
. '"></i>'; . '"></i>';
ob_start(); ob_start();
if ($val === 0) { switch ($val) {
printf($strtoupdate, 'up', 'green'); case 0:
} else { printf($strtoupdate, 'windows', 'windows', 'green', 'Win
printf($strtoupdate, 'down', 'red'); dows');
break;
case 111:
$taskID = self::getSubObjectIDs(
'Task',
array('hostID' => $this->get('id'),
'stateID' => 2
),
'id'
);
if (is_null($taskID)) {
printf($strtoupdate, 'linux', 'linux', 'blue', 'Linu
x');
} else {
printf($strtoupdate, 'fos', 'cogs', 'green', 'FOS');
}
break;
default:
printf($strtoupdate, 'down', 'exclamation-circle', 'red'
, 'Unknown');
} }
return ob_get_clean(); return ob_get_clean();
} }
} }
 End of changes. 5 change blocks. 
7 lines changed or deleted 28 lines changed or added

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