include('user_inc.htm');
if ($_SERVER[REQUEST_METHOD] == "POST")
{
$operationInProgress = true;
$status = new ReturnStatus();
$libInfo = $_POST['libraryGUID'];
$identify = $_POST['identify'];
$driveDetails = get_all_drives($user, $sortCriteria);
// Create a hash table to see if the drive is ready or not for Command Path drives.
foreach($driveDetails as $driveDetail)
{
$driveComp[$driveDetail->guid] = $driveDetail->isReady;
}
if( $identify == 'command_path' )// identify only command path drives
{
if( $libInfo == 'unassigned')//
{
$status->setErrorCode( 0x51001 );
}
else if( $libInfo == 'all')
{
$libs = get_logical_libraries($user, $sortCriteria);
foreach( $libs as $partition)
{
$libraryCommandPathDrives = get_command_path_drives($user, $partition->guid);
if( $drives )
{
$drives = array_merge($drives, $libraryCommandPathDrives);
}
else
{
$drives = $libraryCommandPathDrives;
}
}
}
else
{
$drives = get_command_path_drives($user, $libInfo);
if (count($drives) <= 0)
{
$status->setErrorCode( 0x51001 );
}
}
// Filter out the Not-Ready Drives
foreach( $drives as $drive )
{
if( $driveComp[$drive] == '1' )
$driveList[] = $drive;
}
}
else if( $identify == 'all')// identify all shown drives
{
if( $libInfo == 'unassigned')// only unassigned drives
{
$driveDetails = get_available_drives_by_type($user, $sortCriteria, 1);
}
else if( $libInfo != 'all' )// all drives
{
// Reload Drive Deatals with just the Logical Librarys version.
$driveDetails = get_all_drives_by_library($user, $libInfo, $sortCriteria,
(int)0,(int)MEDIA_TYPE_ANY);
}
foreach($driveDetails as $driveDetail)
{
// Filter out the Not-Ready Drives.
if( $driveDetail->isReady == '1' )
{
$driveGUID = $driveDetail->guid;
$driveList[] = $driveGUID;
}
}
}
error_log( "Drives that are going to be Indentified are:" . print_r($driveList, true ) );
if( $driveList && count($driveList) > 0)
{
identify_drives($user, $driveList);
}
print $status->out();
return;
}
$counts = get_all_resource_counts($user);
?>
UnLoad Drive
Identify Drive - LibraryName |
"Identify All" flashes the LEDs on the back of the drives of all of the Ready drives within the selected partition for 1 minute. |
"Identify Control Path" flashes the LED on the back of the control path drive within the selected partition for 1 minute. |
Note: Only drives that are Ready will be identified. |
include('progressWin_inc.htm');
?>