0, "s_location" =>1, "s_status" =>17, "s_mediaType" =>19, "s_wwnn" =>3 ); $s_columnMap = array( "s_partitionName" =>0, "s_location" =>1, "s_mediaType" =>19); $a_columnMap = array( "a_partitionName" =>0, "a_location" =>1, "a_mediaType" =>19); $f_columnMap = array( "f_partitionName" =>0, "f_location" =>1, "f_mediaType" =>19); $u_columnMap = array( "u_partitionName" =>0, "u_location" =>1, "u_mediaType" =>19); $columnMap = array("partitionName"=>"name", "location"=>"location", "status"=>"status", "vendor"=>"vendor", "mediaType"=>"driveType", "wwnn"=>"wwnn"); if ($_SERVER[REQUEST_METHOD] == "GET") { $type = $_GET['type']; if( $type == 'SCSI') $sortCriteria = new SortCriteria($s_columnMap["s_partitionName"], "1"); else if( $type == 'SAS') $sortCriteria = new SortCriteria($a_columnMap["a_partitionName"], "1"); else if( $type == 'Fibre') $sortCriteria = new SortCriteria($f_columnMap["f_partitionName"], "1"); else $sortCriteria = new SortCriteria($u_columnMap["u_partitionName"], "1"); } else { error_log("_POST = ". print_r($_POST, true) ); // The user must have pressed a column header to change sorting $type = $_POST['type']; if( $type == 'SCSI') $sortCriteria = new SortCriteria($s_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); else if( $type == 'SAS') $sortCriteria = new SortCriteria($a_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); else if( $type == 'Fibre') $sortCriteria = new SortCriteria($f_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); else $sortCriteria = new SortCriteria($u_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); error_log("\n\n\n\n $sortCriteria->sortColumn = " . $sortCriteria->sortColumn ); } // Get the licensing information to know what the user has rights to do. // !?! Waiting on CMI function to give back the # of unused DPS licenses. // This licnense includes DPF, CPF and Lun Mapping. $currentType = $type; $drives = $_SESSION['drives']; $drives = columnSort($drives, $columnMap[substr($_POST['orderOn'], 2)], $_POST['orderBy']); // count the drives with this type // $numRows = 0; foreach($drives as $drive) { if( $drive->interfaceType == "$currentType" || (( !($drive->interfaceType) || ($drive->interfaceType == 'Unknown')) && ($currentType == 'unknown') )) { $numRows++; // If th4 Drive has 2 ports - count the second port //if( $drive->portCount == 2 ) // $numRows++; } } // insure that the document is empty if there are no drives of this type if( $numRows <= 0 ) { return; } $numPages = ceil($numRows / DRIVES_PER_PAGE); $lowPageList = 1; $highPageList = min($numRows, DRIVES_PER_PAGE); ?> parent.document.getElementById( 'driveTypeHeader' ).innerHTML = 'Modify the settings on SCSI drives:';"; } else if( $currentType == 'SCSI' ) { echo ""; } else { echo ""; } } else { echo "\n"; echo "\n"; } ?>
interfaceType ) { ?> interfaceType == 'Unknown' ) { ?> isReady ? '' : ' disabled'; $disabled = ''; if( $currentType == 'SCSI' && ($drive->interfaceType == 'SCSI') ) { echo '"; echo ''; } else if( $currentType == 'SAS' && ($drive->interfaceType == 'SAS') ) { // Remove the colon from the SAS Address (pcr 18226) $sasWwpn = $drive->wwpn ? str_replace(":", "", $drive->wwpn) : ""; echo ''; } else if( $currentType == 'Fibre' && ($drive->interfaceType == 'Fibre') ) { $isBlade = is_blade_connected( $user, $drive->guid )?1:0; // Show the Port Failover Checkbox /* !?!DPF echo ''; */ echo '"; /*############################################################ # Note: Even though the CMI mode states that 0 = No change. # For the Actual FC Topo and Speed setting 0 = Unknown ############################################################*/ $sTopo = array("Unknown", "Auto (LN)", "Loop (L)", "Point to Point", "Auto (NL)"); echo '"; $sSpeed = array("Auto", "1 Gb/s", "2 Gb/s", "4 Gb/s", "8 Gb/s" ); $sSpeedAct = array("Unknown", "1 Gb/s", "2 Gb/s", "4 Gb/s", "8 Gb/s" ); echo '"; echo ''; // !?! Put actual Topo here echo ''; // !?! Put actual Speed here //echo ''; // !?! Put actual Speed here --> echo ''; echo ''; if( $drive->portCount == 2 && false ) // Not showing port 2 { echo "\n\n"; $currentIndex++; echo ''; echo ''; // !?! This code will need to use port 2's data when I'm getiing it back from the CMI echo '"; /*############################################################ # Note: Even though the CMI mode states that 0 = No change. # For the Actual FC Topo and Speed setting 0 = Unknown ############################################################*/ $sTopo = array("Unknown", "Auto (LN)", "Loop (L)", "Point to Point", "Auto (NL)"); echo '"; $sSpeed = array("Auto", "1 Gb/s", "2 Gb/s", "4 Gb/s", "8 Gb/s" ); $sSpeedAct = array("Unknown", "1 Gb/s", "2 Gb/s", "4 Gb/s", "8 Gb/s" ); echo '"; echo ''; // !?! Put actual Topo here echo ''; // !?! Put actual Speed here echo ''; } } // Add the partition to the end. if( $currentType == $drive->interfaceType ) { echo ''; echo ' '; echo "\n\n"; } // Don't create a new page if we don't have a drive to put in it yet. if( !$gotOne ) continue; $currentIndex++; if((($currentIndex % DRIVES_PER_PAGE) == 0) && ($currentIndex != 0 )) { $lowPageList += DRIVES_PER_PAGE; $highPageList = min($numRows, ($highPageList + DRIVES_PER_PAGE)); $currentPage++; if ($currentIndex < $numRows) { ?>