registerFunction("getDevMaps"); session_start(); $user = $_SESSION['user']; $in_xAjax = false; $xAjax_objResponse; $NoInactivityTimer = true; // Set so the xajax calls don't look at the inactivity timer. include('IOB_inc.htm'); include('common_admin_inc.htm'); // Note: This must be here to beable to use the error_handler and other functions. class CBDevice { var $id; var $deviceId; var $bladeId; var $mapped; var $in_lun; var $ex_lun; var $desc; var $type; var $sn; var $wwpn; var $portId; var $vendor; var $product; function CBDevice($id, $deviceId, $bladeId, $mapped, $in_lun, $ex_lun, $desc, $type, $sn, $wwpn, $portId, $vendor, $product) { $this->id = $id; $this->deviceId = $deviceId; $this->bladeId = $bladeId; $this->mapped = $mapped; $this->in_lun = $in_lun; $this->ex_lun = $ex_lun; $this->desc = $desc; $this->type = $type; $this->sn = $sn; $this->wwpn = $wwpn; $this->portId = $portId; $this->vendor = $vendor; $this->product = $product; } }; // The php function that is called from JavaScript tough xAjax when the user selects a Host and presses apply. function getDevMaps($aHostId, $aHostName, $aBladeLoc) { global $IOB_DevTypes; global $in_xAjax; global $xAjax_objResponse; error_log( "\n\n\nIN xAjaX - getDevMaps\n\n\n"); $user = $_SESSION['user']; $xAjax_objResponse = new xajaxResponse(); $in_xAjax = true; // This must be called because we set NoInactivityTimer to true because of xajax loading the page behind the sheets. // Whihc causes an xajax XML error if the user is redirected to the login page durring the xajax call setup. // If we are logged out this function will reload the page which will take the user back to the login page. CheckLoggedOut(); $devices = get_device_maps_by_host($user, $aHostId); error_log("devices for Host($aHostId) = ". print_r($devices,true) ); $i = 0; $theContent = ''; $allContent = ''; foreach( $devices as $device ) { // Fix any 2048 values that come by. if( $device->ex_lun > 255 ) $device->ex_lun = 1; // Fix any NonMapped values that come by. if( ! $device->mapped ) $device->ex_lun = -1; $checked = $device->mapped ? 'CHECKED' : ''; $disabled = $device->mapped ? '' : 'DISABLED'; $theContent = '
' . '' . ' | ' . ''.$device->desc.'' . ' | ' . ''.$IOB_DevTypes[$device->type].'' . ' | ' . ''.$device->sn.'' . ' | ' . ''.$device->vendor.'' . ' | ' . ''.$device->product.'' . ' | ' . '' . ' |