Example #1
0
    // TODO: move to sitedef.php
    $df_dir1 = df_available($dir1);
    // check if /data/ directory is externally mounted (returns array)
    $devloc = str_replace("/", "\\/", $EXT_MOUNT_DIR);
    // read from device location stored in /xGDBvm/admin/devloc via sitedef.php
    $dir1_mount = preg_match("/{$devloc}/", $df_dir1[0]) ? "<span class=\"checked_mount\">Ext vol mounted</span>" : "<span class=\"lightgrayfont\">Ext vol not mounted</span>";
    //flag for dir1 mount
    $dir1_status = "<span class=\"normalfont \" style=\"font-weight:normal\"><a class='help-button' title='Mount status of /xGDBvm/data/' id='config_input_ebs'> {$dir1_mount} </a></span>";
}
# data store directory:/input/ ($dir2)
$dir2_status = "";
if (file_exists("/xGDBvm/admin/iplant")) {
    // xGDBvm-iPlant only
    $dir2 = "{$inputDirRoot}";
    // TODO: move to sitedef.php
    $df_dir2 = df_available($dir2);
    // check if /input/ directory is fuse-mounted (returns array)
    $dir2_dropdown = $df_dir2[0] == "fuse" || $df_dir2[0] == "irodsFs" ? "/xGDBvm/input/" : "";
    //only show input dir if fuse-mounted
    $dir2_mount = $df_dir2[0] == "fuse" || $df_dir2[0] == "irodsFs" ? "<span class=\"checked_mount nowrap\">DataStore mounted</span>" : "<span class=\"lightgrayfont\">DataStore not mounted</span>";
    //flag for dir2 mount (Data Store) top of form
    $mount_status_alert = $df_dir2[0] == "fuse" || $df_dir2[0] == "irodsFs" ? "<span class=\"checked nowrap\">DataStore mounted</span>" : "<span class=\"warning\">DataStore not mounted</span>";
    //more intrusive flag
    $dir2_status = "<span class=\"normalfont \" style=\"font-weight:normal\"><a class='help-button' title='Mount status of {$inputDirRoot}' id='config_input_irods'> {$dir2_mount} </a></span>";
}
## Get GTH GSQ app info
$gsq_query = "SELECT app_id from {$global_DB1}.apps WHERE program='GeneSeqer-MPI' AND is_default='Y' ";
$get_gsq = mysql_query($gsq_query);
while ($row = mysql_fetch_array($get_gsq)) {
    $gsq_default = $row["app_id"];
}
Example #2
0
$df_array1 = df_available($path1);
$filesys1 = $df_array1[0];
$available1 = $df_array1[1];
$gb1 = round($available1 / 1000000, 1);
$path2 = "/xGDBvm/data/";
$df_array2 = df_available($path2);
$filesys2 = $df_array2[0];
$available2 = $df_array2[1];
$gb2 = round($available2 / 1000000, 1);
$path3 = "/xGDBvm/data/scratch/";
$df_array3 = df_available($path3);
$filesys3 = $df_array3[0];
$available3 = $df_array3[1];
$gb3 = round($available3 / 1000000, 1);
$path4 = "/xGDBvm/data/mysql/";
$df_array4 = df_available($path4);
$filesys4 = $df_array4[0];
$available4 = $df_array4[1];
$gb4 = round($available4 / 1000000, 1);
## License key status
# Validate license keys (conf_functions.inc.php validate_dir($dir, $target, $description, $present, $absent)
$validate_gm = validate_dir($GENEMARK_KEY_DIR, $GENEMARK_KEY, "GeneMark License Key", "installed", "not installed");
$gm_valid = $validate_gm[0];
$gm_class = $validate_gm[1];
$validate_gth = validate_dir($GENOMETHREADER_KEY_DIR, $GENOMETHREADER_KEY, "GenomeThreader License Key", "installed", "not installed");
$gth_valid = $validate_gth[0];
$gth_class = $validate_gth[1];
$validate_vm = validate_dir($VMATCH_KEY_DIR, $VMATCH_KEY, "Vmatch License Key", "installed", "not installed");
$vm_valid = $validate_vm[0];
$vm_class = $validate_vm[1];
## Set GDB message (list items) based on status totals
Example #3
0
// 1-26-16
if (file_exists("/xGDBvm/admin/iplant")) {
    // xGDBvm-iPlant only
    $df_dir1 = df_available($dir1_dropdown);
    // check if /data/ directory is externally mounted (returns array)
    $devloc = str_replace("/", "\\/", $ext_mount_dir);
    // read from device location stored in /xGDBvm/admin/devloc via sitedef.php
    $dir1_mount = preg_match("/{$devloc}/", $df_dir1[0]) ? "<span class=\"checked_mount\">Ext vol mounted</span>" : "<span class=\"lightgrayfont\">Ext vol not mounted</span>";
    //flag for dir1 mount
}
# data store directory:/input/ ($dir2)
$dir2_dropdown = "{$inputDir}";
// 1-26-16
if (file_exists("/xGDBvm/admin/iplant")) {
    // xGDBvm-iPlant only
    $df_dir2 = df_available($dir2_dropdown);
    // check if /input/ directory is fuse-mounted (returns array)
    #   $dir2_dropdown=($df_dir2[0]=="fuse"  || $df_dir2[0]=="irodsFs")?"/xGDBvm/input/":""; //only show input dir if fuse-mounted. REMOVED THIS REQUIREMENT 4/16/2014
    $dir2_mount = $df_dir2[0] == "fuse" || $df_dir2[0] == "irodsFs" ? "<span class=\"checked_mount\">DataStore mounted</span>" : "<span class=\"lightgrayfont\">DataStore not mounted</span>";
    //flag for dir1 mount
}
$dir3_dropdown = "/xGDBvm/examples/";
// TODO: move to sitedef.php
$input_dirlist = dirlist_dropdown($dir1_dropdown, $dir2_dropdown, $dir3_dropdown, "{$Input_Data_Path}");
//build dropdown for input dir(s), to include /xGDBvm/input (preferred) or /xGDBvm/data
#$input_dirlist=dirlist_dropdown("", $dir2_dropdown, $dir3_dropdown, "$Input_Data_Path");// To prevent use of /xGDBvm/data for inputs, uncomment this line and comment out previous.
# display mount status (iPlant only)
$dir1_status = file_exists("/xGDBvm/admin/iplant") ? "<span class=\"normalfont\" style=\"font-weight:normal\">&nbsp; &nbsp;<a class='help-button' title='Mount status of /xGDBvm/data/' id='config_output_dir_mount'> {$dir1_mount} </a></span>" : "";
$dir2_status = file_exists("/xGDBvm/admin/iplant") ? "<span class=\"normalfont\" style=\"font-weight:normal\">&nbsp; &nbsp;<a class='help-button' title='Mount status of /xGDBvm/input/' id='config_input_datastore'> {$dir2_mount} </a></span>" : "";
# repeat mask directory and files
$dir4_dropdown = "{$inputDir}/repeatmask/";
Example #4
0
//$data_directory4=data_directory($path4);// permissions prevents listing
$mount4 = $df_array4[2];
#$location4=($filesys4==$filesys1)?"Internal":"External";
$path5 = "/xGDBvm/data/tmp";
$df_array5 = df_available($path5);
$filesys5 = $df_array5[0];
$available5 = $df_array5[1];
$gb5 = $available5 / 1000000;
$gb5_display = round($gb5, 0);
$available5 = preg_replace('/(?<=\\d)(?=(\\d\\d\\d)+$)/', ',', $available5);
$data_directory5 = data_directory($path5);
// list entire directory contents as a string
$mount5 = $df_array5[2];
#$location5=($filesys4==$filesys1)?"Internal":"External";
$path6 = $inputDirRoot;
$df_array6 = df_available($path6);
$filesys6 = $df_array6[0];
$available6 = $df_array6[1];
$gb6 = $available6 / 1000000;
$gb6_display = round($gb6, 0);
$available6 = preg_replace('/(?<=\\d)(?=(\\d\\d\\d)+$)/', ',', $available6);
$data_directory6 = data_directory($path6);
// list entire directory contents as a string
$mount6 = $df_array6[2];
#$location6=($filesys6==$filesys1)?"Internal":"External";
## Validate volumes
$validate_mysql = validate_dir("/xGDBvm/data/", "mysql", "mysql directory", "present", "missing");
$mysql_valid = $validate_mysql[0];
$mysql_class = $validate_mysql[1];
$validate_scratch = validate_dir("/xGDBvm/data/", "scratch", "scratch directory", "present", "missing");
$scratch_valid = $validate_scratch[0];