Esempio n. 1
0
            echo " ";
            echo link_to("https://github.com/" . $title['package'], "contribute", array('class' => 'github contribute'));
        }
        echo "</li>\n";
    }
    if ($group_name == "Other") {
        $q = db()->prepare("SELECT * FROM site_statistics WHERE is_recent=1 LIMIT 1");
        $q->execute();
        $stats = $q->fetch();
        if ($stats) {
            echo "<li><span class=\"title\">" . t("Free user job delay") . "</span> ";
            echo "<span class=\"status_percent " . get_error_class($stats['free_delay_minutes'] / 60 / (get_site_config('refresh_queue_hours') * 3) * 100) . "\">";
            echo expected_delay_html($stats['free_delay_minutes']);
            echo "</span></li>\n";
            echo "<li><span class=\"title\">" . t(":premium_user job delay", array(':premium_user' => link_to(url_for('premium'), t("Premium user")))) . "</span> ";
            echo "<span class=\"status_percent " . get_error_class($stats['premium_delay_minutes'] / 60 / (get_site_config('refresh_queue_hours_premium') * 3) * 100) . "\">";
            echo expected_delay_html($stats['premium_delay_minutes']);
            echo "</span></li>\n";
        }
    }
    echo "</ul></li>\n";
}
?>
</ul>

<p>
<?php 
echo t("This data is refreshed automatically once per hour (last updated :ago).", array(':ago' => recent_format_html($last_updated)));
?>
</p>
<?php 
foreach ($jobs as $job) {
    ?>
  <tr>
    <td><?php 
    echo htmlspecialchars($job['job_type']);
    ?>
</td>
    <td class="number"><?php 
    echo "<span class=\"status_percent " . get_error_class($job['execs'] / $job['c']) . "\">";
    echo number_format($job['execs'] / $job['c'], 2);
    echo "</span>";
    ?>
</td>
    <td class="number"><?php 
    echo "<span class=\"status_percent " . get_error_class($job['errors'] / $job['c'] * 3) . "\">";
    echo number_format($job['errors'] / $job['c'], 2);
    echo "</span>";
    ?>
    <td class="number"><?php 
    echo number_format($job['priority'], 2);
    ?>
</td>
    <td class="number"><?php 
    echo number_format($job['c']);
    ?>
</td>
    <td class="number"><?php 
    echo number_format($job['c'] / $total_c * 100) . "%";
    ?>
</td>
Esempio n. 3
0
                $q->execute(array($data['job_type']));
                $job = $q->fetch();
            }
        }
        echo "<td class=\"number\">" . number_format($summary['s']) . "</td>\n";
        if ($data['disabled']) {
            echo "<td class=\"disabled\">disabled</a>\n";
        } else {
            if ($summary['s'] == 0) {
                echo "<td class=\"disabled\">no data</a>\n";
            } else {
                if ($summary['s'] == $summary['manually_disabled']) {
                    echo "<td class=\"disabled\">all manually disabled</a>\n";
                } else {
                    $pct = 1 - ($summary['disabled'] - $summary['manually_disabled']) / ($summary['s'] - $summary['manually_disabled']);
                    echo "<td class=\"status_percent " . get_error_class($pct) . "\">" . number_format_autoprecision($pct * 100, 2) . " %</td>\n";
                }
            }
        }
        echo "<td class=\"number\">" . number_format($summary['manually_disabled']) . "</td>\n";
        echo "<td>" . recent_format_html($summary['lq']) . "</td>\n";
        ?>
      <td class="number">
        <?php 
        if ($job) {
            ?>
        <a href="<?php 
            echo htmlspecialchars(url_for('admin_run_job', array('job_id' => $job['id'], 'force' => true)));
            ?>
"><?php 
            echo number_format($job['id']);