Beispiel #1
0
function renderDeployQueue()
{
    global $nextorder, $dqtitle;
    $order = 'odd';
    $dqcode = getBypassValue();
    $allq = get8021QDeployQueues();
    foreach ($allq as $qcode => $data) {
        if ($dqcode == $qcode) {
            echo "<h2 align=center>Queue '" . $dqtitle[$qcode] . "' (" . count($data) . ")</h2>";
            if (!count($data)) {
                continue;
            }
            echo '<table cellspacing=0 cellpadding=5 align=center class=widetable>';
            echo '<tr><th>switch</th><th>changed</th><th>';
            foreach ($data as $item) {
                echo "<tr class=row_{$order}><td>";
                renderCell(spotEntity('object', $item['object_id']));
                echo "</td><td>" . formatAge($item['last_change']) . "</td></tr>";
                $order = $nextorder[$order];
            }
            echo '</table>';
        }
    }
}
Beispiel #2
0
function renderDeployQueue()
{
    global $nextorder, $dqtitle;
    $order = 'odd';
    $dqcode = getBypassValue();
    $allq = get8021QDeployQueues();
    $en_key = $dqcode == 'disabled' ? 'disabled' : 'enabled';
    foreach ($allq as $qcode => $data) {
        if ($dqcode == 'disabled' || $dqcode == $qcode) {
            if (!count($data[$en_key])) {
                continue;
            }
            if ($dqcode == 'disabled') {
                echo "<h2 align=center>Queue " . $dqtitle[$qcode] . " (" . count($data[$en_key]) . ")</h2>";
            }
            echo '<table cellspacing=0 cellpadding=5 align=center class=widetable>';
            echo '<tr><th>switch</th><th>age</th><th>';
            foreach ($data[$en_key] as $item) {
                echo "<tr class=row_{$order}><td>";
                renderCell(spotEntity('object', $item['object_id']));
                echo "</td><td>{$item['last_change_age']}</td></tr>";
                $order = $nextorder[$order];
            }
            echo '</table>';
        }
    }
}