Esempio n. 1
0
<?php

namespace lib;

use lib\Services;
$services = Services::services();
function label_service($status)
{
    echo '<span class="label label-';
    switch ($status) {
        case '+':
            echo 'success';
            break;
        case '?':
            echo 'warning';
            break;
        default:
            echo 'important';
    }
    echo '">';
    switch ($status) {
        case '+':
            echo 'Running';
            break;
        case '?':
            echo 'Unknown';
            break;
        default:
            echo 'Stopped';
    }
    echo '</span>';
Esempio n. 2
0
function build_services($response)
{
    $response['services'] = Services::services();
    return $response;
}