renamed class label to badge

This commit is contained in:
dg9vh 2018-02-11 21:59:54 +00:00
parent 23143f4adf
commit f728542480
7 changed files with 27 additions and 27 deletions

Binary file not shown.

View file

@ -184,40 +184,40 @@ function getEnabled ($mode, $mmdvmconfigs) {
function showMode($mode, $mmdvmconfigs) {
// shows if mode is enabled or not.
?>
<td><span class="label <?php
<td><span class="badge <?php
if (getEnabled($mode, $mmdvmconfigs) == 1) {
switch ($mode) {
case "D-Star Network":
if (getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "localhost" || getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning(IRCDDBGATEWAY)) {
echo "label-success";
echo "badge-success";
} else {
echo "label-danger\" title=\""._("ircddbgateway is down!");
echo "badge-danger\" title=\""._("ircddbgateway is down!");
}
} else {
echo "label-default\" title=\""._("Remote gateway configured - not checked!");
echo "badge-default\" title=\""._("Remote gateway configured - not checked!");
}
break;
case "System Fusion Network":
if (getConfigItem("System Fusion Network", "GatewayAddress", $mmdvmconfigs) == "localhost" || getConfigItem("System Fusion Network", "GatewayAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning("YSFGateway")) {
echo "label-success";
echo "badge-success";
} else {
echo "label-danger\" title=\""._("YSFGateway is down!");
echo "badge-danger\" title=\""._("YSFGateway is down!");
}
} else {
echo "label-default\" title=\""._("Remote gateway configured - not checked!");
echo "badge-default\" title=\""._("Remote gateway configured - not checked!");
}
break;
default:
if (isProcessRunning("MMDVMHost")) {
echo "label-success";
echo "badge-success";
} else {
echo "label-danger\" title=\""._("MMDVMHost is down!");
echo "badge-danger\" title=\""._("MMDVMHost is down!");
}
}
} else {
echo "label-default";
echo "badge-default";
}
?>"><?php echo $mode ?></span></td>
<?php
@ -577,7 +577,7 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
$mode = "DMR";
}
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
return "<span class=\"label label-danger\">".$mode."</span>";
return "<span class=\"badge badge-danger\">".$mode."</span>";
} else {
$now = new DateTime('NOW',new DateTimeZone(TIMEZONE));
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
@ -596,7 +596,7 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
if ($now->format('U') > $timestamp->format('U')) {
return _("idle");
} else {
return "<span class=\"label label-warning\">".$mode."</span>";
return "<span class=\"badge badge-warning\">".$mode."</span>";
}
}
}

View file

@ -87,9 +87,9 @@
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
echo"<td>";
if (getDMRMasterState()) {
echo "<span class=\"label label-success\" title=\"Master connected\">";
echo "<span class=\"badge badge-success\" title=\"Master connected\">";
} else {
echo "<span class=\"label label-danger\" title=\"Master not connected\">";
echo "<span class=\"badge badge-danger\" title=\"Master not connected\">";
}
echo getConfigItem("DMR Network", "Address", $mmdvmconfigs);
if (strlen(getDMRNetwork()) > 0 ) {
@ -98,18 +98,18 @@
?>
</span>
</td>
<td><span class="label <?php
<td><span class="badge <?php
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == 1) {
echo 'label-success">'._("enabled");
echo 'badge-success">'._("enabled");
} else {
echo 'label-default">'._("disabled");
echo 'badge-default">'._("disabled");
}
?></span></td>
<td><span class="label <?php
<td><span class="badge <?php
if (getConfigItem("DMR Network", "Slot2", $mmdvmconfigs) == 1) {
echo 'label-success">'._("enabled");
echo 'badge-success">'._("enabled");
} else {
echo 'label-default">'._("disabled");
echo 'badge-default">'._("disabled");
}
?></span></td>
<?php

View file

@ -7,12 +7,12 @@
<!-- Tabelle -->
<table class="table">
<tr>
<td><span class="label <?php
<td><span class="badge <?php
if (isProcessRunning("YSFGateway")) {
echo "label-success";
echo "badge-success";
?>"><?php echo _("YSFGateway Process is running"); ?></span></td><?php
} else {
echo "label-danger\" title=\"YSFGateway is down!";
echo "badge-danger\" title=\"YSFGateway is down!";
?>"><?php echo _("YSFGateway Process is down!"); ?></span></td><?php
}
?>

View file

@ -69,7 +69,7 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && VIEWLOGUSER !== "" && VIEWLOGPW !== "")
</div>
<div class="panel panel-log">
<div class="panel-heading">
<span class="label label-info"><?php echo _("Viewing log"); ?> <?php echo $fileName ?></span>
<span class="badge badge-info"><?php echo _("Viewing log"); ?> <?php echo $fileName ?></span>
</div>
<div class="table-responsive">
<table id="log" class="table table-condensed table-striped table-hover">

View file

@ -32,7 +32,7 @@ foreach ($lastHeard as $listElem) {
echo"<td nowrap>$listElem[4]</td>";
echo"<td nowrap>$listElem[5]</td>";
if ($listElem[6] == "RF"){
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
}else{
echo"<td nowrap>$listElem[6]</td>";
}
@ -46,7 +46,7 @@ foreach ($lastHeard as $listElem) {
echo"<td nowrap>$listElem[3]</td>";
echo"<td nowrap>$listElem[4]</td>";
if ($listElem[5] == "RF"){
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
}else{
echo"<td nowrap>$listElem[5]</td>";
}

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20171031-1 (".getGitVersion().")");
define("VERSION", "20180211-1 (".getGitVersion().")");
?>