[icinga-checkins] icinga.org: icingaweb2/feature/redesign-7144: tinystatesummary: use h1, styling

git at icinga.org git at icinga.org
Wed Nov 19 07:54:19 CET 2014


Module: icingaweb2
Branch: feature/redesign-7144
Commit: a20fa3201d74b906991a2c3f8cd357934da855cd
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=a20fa3201d74b906991a2c3f8cd357934da855cd

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Nov 19 07:53:16 2014 +0100

tinystatesummary: use h1, styling

---

 .../scripts/list/components/hostssummary.phtml     |    7 +++--
 .../scripts/list/components/servicesummary.phtml   |    6 ++--
 .../show/components/hostservicesummary.phtml       |    7 +++--
 modules/monitoring/public/css/module.less          |   30 ++++++++++----------
 4 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
index c455d26..2e19ff3 100644
--- a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
+++ b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml
@@ -6,9 +6,9 @@ $selfUrl = 'monitoring/list/hosts';
 $currentUrl = Url::fromRequest()->getRelativeUrl();
 
 ?>
-<h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
+<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
     <?= $this->qlink(sprintf($this->translate('%s hosts:'), $this->stats->hosts_total), $selfUrl); ?>
-
+  <span class="badges">
     <?php if($this->stats->hosts_up): ?>
     <span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 0))->getRelativeUrl() ? ' active' : '' ?>">
         <?= $this->qlink(
@@ -80,4 +80,5 @@ $currentUrl = Url::fromRequest()->getRelativeUrl();
         ) ?>
     </span>
     <?php endif; ?>
-</h3>
+  </span>
+</h1>
diff --git a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
index 8533c80..dab7071 100644
--- a/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
+++ b/modules/monitoring/application/views/scripts/list/components/servicesummary.phtml
@@ -4,8 +4,9 @@ use Icinga\Web\Url;
 $selfUrl = 'monitoring/list/services';
 $currentUrl = Url::fromRequest()->getRelativeUrl();
 
-?><h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
+?><h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
 <?= $this->qlink(sprintf($this->translate('%s services:'), $this->stats->services_total), $selfUrl) ?>
+<span class="badges">
 <?php if ($this->stats->services_ok): ?>
  <span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 0))->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
     $this->stats->services_ok,
@@ -79,5 +80,6 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
     array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('pending'))))
 )  ?></span>
 <?php endif ?>
-</h3>
+</span>
+</h1>
 
diff --git a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
index 26a0da0..f42e702 100644
--- a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
@@ -5,13 +5,13 @@ $selfUrl = Url::fromPath('monitoring/show/services', array('host' => $this->obje
 $currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
 
 ?>
-<h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
+<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
 <?php if ($object->stats->services_total > 0): ?>
 <?= $this->qlink(sprintf($this->translate('%s configured services:'), $object->stats->services_total), $selfUrl) ?>
 <?php else: ?>
 <?= $this->translate('No services configured on this host'); ?>
 <?php endif; ?>
-
+<span class="badges">
 <?php if ($object->stats->services_ok > 0): ?>
  <span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
     $object->stats->services_ok,
@@ -84,5 +84,6 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
     array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('pending'))))
 )  ?></span>
 <?php endif ?>
-</h3>
+</span>
+</h1>
 
diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less
index 030eba7..84b3ba8 100644
--- a/modules/monitoring/public/css/module.less
+++ b/modules/monitoring/public/css/module.less
@@ -92,36 +92,36 @@ div.contacts div.notification-periods {
   margin-top: 0.5em;
 }
 
-h3.tinystatesummary {
-  line-height: 2em;
-  font-size: 0.95em;
-  margin-right: 1em;
-  border-bottom: 2px solid @colorPetrol;
+h1.tinystatesummary .badges {
+    display: inline-block;
+    margin-bottom: 4px;
+    margin-left: 1em;
 }
 
-h3.tinystatesummary a {
-    color: inherit;
-    text-decoration: none;
-    padding: 1px 3px;
+h1.tinystatesummary .state {
+    border-radius: 0.3em;
 }
 
-h3.tinystatesummary a:hover {
-    text-decoration: underline;
+h1.tinystatesummary .state > a {
+    color: white;
+    font-size: 0.7em;
+    padding: 2px 5px;
+}
+
+h1.tinystatesummary .state.handled a {
 }
 
 /* State badges */
 span.state {
-    font-size: 1em;
-    font-weight: 700;
+    font-weight: bold;
     color: white;
     font-weight: bold;
     padding: 1px 2px;
     margin-right: 5px;
-
 }
 
 span.state.active {
-    border: 2px solid white;
+    border: 2px solid #555;
 }
 
 span.state span.state {



More information about the icinga-checkins mailing list