Browse Source

floating numbers locale progressbar problems

pull/5/merge
Kai Kretschmann 4 years ago
parent
commit
047bf0ebfe
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      index.php

+ 4
- 1
index.php View File

@@ -102,6 +102,7 @@ require 'tpl/nav.inc.php';
$aLevelCount = array();
foreach($aLevels as $level) {
$aLevelCount[$level->level] = $level->c;
$level->f = round($level->f);
switch($level->level) {
case 'emerg':
case 'crit':
@@ -121,7 +122,7 @@ foreach($aLevels as $level) {
} // switch

echo <<<EOL
<div class="progress-bar $label" style="width: {$level->f}%" title="{$level->level} {$level->f}%">
<div class="progress-bar $label" role="progressbar" aria-valuenow="{$level->f}" style="width: {$level->f}%" title="{$level->level} {$level->f}%">
<span class="sr-only">{$level->f}%</span>
</div>
EOL;
@@ -156,6 +157,8 @@ if(isset($aLevelCount['notice'])) {
foreach($aServers as $server) {
if($server->f < 5) continue;

$server->f = round($server->f);

echo <<<EOL
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{$server->f}" aria-valuemin="0" aria-valuemax="100" style="width: {$server->f}%; min-width: 3em" title="{$server->host} {$server->f}%">


Loading…
Cancel
Save
Social stuff:
Mastodon