Esempio n. 1
0
        echo format_bytes($client['bytes_sent']);
        ?>
</td>
						<td><?php 
        echo format_bytes($client['bytes_recv']);
        ?>
</td>
						<td>
							<table>
								<tr>
									<td>
										<?php 
        $ssvc = find_service_by_openvpn_vpnid($client['vpnid']);
        ?>
										<?php 
        echo get_service_status_icon($ssvc, false, true);
        ?>
										<?php 
        echo get_service_control_GET_links($ssvc, true);
        ?>
									</td>
								</tr>
							</table>
						</td>
					</tr>
<?php 
    }
    ?>
				</tbody>
			</table>
		</div>
Esempio n. 2
0
<?php 
if (count($services) > 0) {
    foreach ($services as $service) {
        ?>
                <tr>
                    <td><?php 
        echo $service['name'];
        ?>
</td>
                    <td><?php 
        echo $service['description'];
        ?>
</td>
                    <td>
                      <?php 
        echo get_service_status_icon($service, true, true);
        ?>
                      <?php 
        echo get_service_control_links($service);
        ?>
                      <?php 
        echo !empty(get_shortcut_by_service_name($service['name'])) ? get_shortcut_log_link($scut, true) : "";
        ?>
                    </td>
                </tr>
<?php 
    }
} else {
    ?>
                <tr>
                  <td colspan="3"> <?php 
Esempio n. 3
0
    uasort($services, "service_name_compare");
    foreach ($services as $service) {
        if (!$service['name'] || in_array($service['name'], $skipservices)) {
            continue;
        }
        $service_desc = explode(".", $service['description']);
        echo "<tr><td class=\"listlr\">" . $service['name'] . "</td>\n";
        echo "<td class=\"listr\">" . $service_desc[0] . "</td>\n";
        // if service is running then listr else listbg
        $bgclass = null;
        if (get_service_status($service)) {
            $bgclass = "listr";
        } else {
            $bgclass = "listbg";
        }
        echo "<td class=\"" . $bgclass . "\" align=\"center\">" . str_replace('btn ', 'btn btn-xs ', get_service_status_icon($service, false, true)) . "</td>\n";
        echo "<td valign=\"middle\" class=\"list nowrap\">" . str_replace('btn ', 'btn btn-xs ', get_service_control_links($service)) . "</td></tr>\n";
    }
} else {
    echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . " . </td></tr>\n";
}
?>
</table>

<!-- needed to display the widget settings menu -->
<script type="text/javascript">
//<![CDATA[
	selectIntLink = "services_status-configure";
	textlink = document.getElementById(selectIntLink);
	textlink.style.display = "inline";
//]]>
Esempio n. 4
0
        if (empty($service['name'])) {
            continue;
        }
        if (empty($service['description'])) {
            $service['description'] = get_pkg_descr($service['name']);
        }
        echo "<tr><td class=\"listlr\" width=\"20%\">" . $service['name'] . "</td>\n";
        echo "<td class=\"listr\" width=\"55%\">" . $service['description'] . "</td>\n";
        // if service is running then listr else listbg
        $bgclass = null;
        if (get_service_status($service)) {
            $bgclass = "listr";
        } else {
            $bgclass = "listbg";
        }
        echo "<td class=\"" . $bgclass . "\" align=\"center\">" . get_service_status_icon($service, true, true) . "</td>\n";
        echo "<td valign=\"middle\" class=\"list nowrap\">" . get_service_control_links($service);
        $scut = get_shortcut_by_service_name($service['name']);
        if (!empty($scut)) {
            echo get_shortcut_main_link($scut, true, $service);
            echo get_shortcut_status_link($scut, true, $service);
            echo get_shortcut_log_link($scut, true);
        }
        echo "</td></tr>\n";
    }
} else {
    echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . " . </td></tr>\n";
}
?>
	</tbody>
</table>
<?php 
$skipservices = explode(",", $user_settings['widgets']['servicestatusfilter']);
if (count($services) > 0) {
    uasort($services, "service_dispname_compare");
    foreach ($services as $service) {
        if (!$service['dispname'] || in_array($service['dispname'], $skipservices) || !is_service_enabled($service['dispname'])) {
            continue;
        }
        if (empty($service['description'])) {
            $service['description'] = get_pkg_descr($service['name']);
        }
        $service_desc = explode(".", $service['description']);
        ?>
		<tr>
			<td><?php 
        echo get_service_status_icon($service, false, true, false, "state");
        ?>
</td>
			<td><?php 
        echo $service['dispname'];
        ?>
</td>
			<td><?php 
        echo $service_desc[0];
        ?>
</td>
			<td><?php 
        echo get_service_control_links($service);
        ?>
</td>
		</tr>