Ejemplo n.º 1
0
function DisplayPipelineTree($viewname, $viewlevel, $viewowner, $viewstatus, $viewenabled, $viewall)
{
    MarkTime("DisplayPipelineTree()");
    $urllist['Pipelines'] = "pipelines.php";
    $urllist['New Pipeline'] = "pipelines.php?action=addform";
    NavigationBar("Analysis", $urllist);
    $username = $GLOBALS['username'];
    ?>
	<style>
		.ui-tooltip { padding: 7px 7px; border-radius: 5px; font-size: 10px; border: 1px solid black; }
		a { color: #224ea5; }
	</style>
	<span style="font-size:10pt">View: <a href="pipelines.php?viewall=1">All</a> | <a href="pipelines.php?viewall=1" title="Does not display hidden pipelines">Normal</a></span>
	<br>
	<!--<details>-->
	<!-- display the cluster load -->
	<!--<summary style="font-size:10pt; color:#666">View cluster load</summary>
		<?php 
    list($statsoutput, $report, $queues, $hostnames) = GetClusterStats();
    $slotsusedcolor = "FF4500";
    $slotsunusedcolor = "EEEEEE";
    ?>

		<table border="0" cellspacing="0" cellpadding="0" style="font-size:8pt">
			<?php 
    foreach ($queues as $queue) {
        $slotsused = 0;
        $slotsunused = 0;
        foreach ($hostnames as $hostname) {
            if (isset($report[$hostname]['queues'][$queue])) {
                //echo "<pre>";
                //print_r($report[$hostname]['queues'][$queue]['jobs']);
                $slotsused += $report[$hostname]['queues'][$queue]['slotsused'];
                $slotsunused += $report[$hostname]['queues'][$queue]['slotsavailable'];
                //echo "</pre>";
            }
        }
        ?>
					<tr>
						<td><?php 
        echo $queue;
        ?>
 &nbsp;</td>
						<td>
							<img src="horizontalchart.php?b=yes&w=200&h=12&v=<?php 
        echo $slotsused;
        ?>
,<?php 
        echo $slotsunused - $slotsused;
        ?>
&c=<?php 
        echo $slotsusedcolor;
        ?>
,<?php 
        echo $slotsunusedcolor;
        ?>
">
							<?php 
        if ($slotsused == 0) {
            echo "Idle";
        } else {
            echo "{$slotsused} of {$slotsunused}";
        }
        ?>
						</td>
					</tr>
					<?php 
    }
    ?>
		</table>
		<br><br>
	</details> -->
	
	<table class="smallgraydisplaytable" width="100%">
		<thead>
			<tr style="vertical-align: top;text-align:left">
				<th style="font-size:12pt">Pipeline Group</th>
				<th style="font-size:12pt">Name <span class="tiny">Mouseover for description</span></th>
				<th style="font-size:12pt" align="right">Level</th>
				<!--<th style="font-size:12pt">Study Group(s)</th>-->
				<th style="font-size:12pt">Owner<br>
					<!--<span style="font-weight: normal; font-size:8pt">
					<a class="linkhighlight" href="pipelines.php?action=viewpipelinelist&viewname=<?php 
    echo $viewname;
    ?>
&viewlevel=<?php 
    echo $viewlevel;
    ?>
&viewowner=all&viewstatus=<?php 
    echo $viewstatus;
    ?>
&viewenabled=<?php 
    echo $viewenabled;
    ?>
">All</a><br>
					<a class="linkhighlight" href="pipelines.php?action=viewpipelinelist&viewname=<?php 
    echo $viewname;
    ?>
&viewlevel=<?php 
    echo $viewlevel;
    ?>
&viewowner=mine&viewstatus=<?php 
    echo $viewstatus;
    ?>
&viewenabled=<?php 
    echo $viewenabled;
    ?>
">Mine</a>
					</span>-->
				</th>
				<th style="font-size:12pt">Status</th>
				<th style="font-size:12pt" align="right" title="processing / complete">Analyses</th>
				<th style="font-size:12pt" align="right">Disk size</th>
				<th style="font-size:12pt" align="left">Path</th>
				<th style="font-size:12pt">Queue</th>
			</tr>
		</thead>
		<tbody>
			<?php 
    $pipelinetree = GetPipelineTree($viewall);
    global $imgdata;
    /* create the graphs for each pipeline group */
    $sqlstring = "select distinct(pipeline_group) 'pipeline_group' from pipelines where pipeline_group <> ''";
    $result = MySQLiQuery($sqlstring, __FILE__, __LINE__);
    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
        $group = $row['pipeline_group'];
        //$imgdata[$group] = CreatePipelineGraph($group);
    }
    GetPipelineInfo();
    PrintTree($pipelinetree, 0);
    ?>
		</tbody>
	</table>
	
	<br><br><br><br><br>
	<?php 
}
Ejemplo n.º 2
0
        }
        // Нам нужны только подкаталоги.
        if (!@is_dir($e)) {
            continue;
        }
        // Печатаем пробелы, чтобы сместить вывод.
        for ($i = 0; $i < $level; $i++) {
            echo "  ";
        }
        // Выводим текущий элемент.
        echo "{$e}\n";
        // Входим в текущий подкаталог и печатаем его
        if (!chdir($e)) {
            continue;
        }
        printTree($level + 1);
        // Возвращаемся назад
        chdir("..");
        // Отправляем данные в браузер, чтобы избежать видимости зависания
        // для больших распечаток.
        flush();
    }
    closedir($d);
}
// Выводим остальной текст фиксированным шрифтом
echo "<pre>";
echo "/\n";
// Входим в корневой каталог и печатаем его
chdir($_SERVER['DOCUMENT_ROOT']);
PrintTree();
echo "</pre>";