Skip to content

Commit

Permalink
Fix state badges in tiles not having a border
Browse files Browse the repository at this point in the history
  • Loading branch information
martialblog committed Jul 12, 2024
1 parent b574bb7 commit 375b17a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ please see the documentation on details.
## Requirements

* Icinga Web 2 >= 2.5.0
* Icinga DB Web >=1.0.0
* Icinga DB Web >= 1.0.0
* php-yaml

Also see [Introduction in docs](doc/01-Introduction.md).
Expand Down
50 changes: 17 additions & 33 deletions public/css/module.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

.tlv-overview-tiles .tlv-overview-tile {
display: block;

float: left;

padding: 1em;
margin: 1em;

position: relative;

width: 20em;
height: 10em;

border: 1px solid @gray;

text-decoration: none;

.tlv-title {
Expand All @@ -35,16 +29,13 @@
.unsaved {
display: inline-block;
padding: 0.2em;

font-weight: bold;

background: @tlv-color-warning-bg;
color: @tlv-color-warning-fg;
}
}

// see Icinga Web 2: public/css/icinga/base.less
//@import '../../vendor/icingaweb2/public/css/icinga/base.less';
@tlv-color-critical-bg: @color-critical;
@tlv-color-critical-fg: white;
@tlv-color-critical-handled-bg: #FFCCBC; // Material Design Deep Orange 100
Expand All @@ -69,6 +60,13 @@
@tlv-color-missing-fg: #333;

.tlv-status-tile {
.badges {
.badge {
border: 0.1em solid @white;
margin-left: 0.2em;
}
}

&.critical, &.down {
background-color: @tlv-color-critical-bg;
color: @tlv-color-critical-fg;
Expand Down Expand Up @@ -153,7 +151,6 @@
position: relative;
width: 100%;
height: 100%;

padding-right: 0 !important;
padding-left: 0 !important;

Expand All @@ -163,9 +160,9 @@
}
}

/** BEGIN of header **/
.tlv-header {
position: relative;

line-height: 2em;
height: 2em;

Expand All @@ -190,25 +187,23 @@
display: inline-block;
position: absolute;
right: 0;

font-size: 1.2em;

.badge {
margin-left: 0.2em;
}
}
}
/** END of header **/

/** BEGIN of tiles **/
.tlv-view-tiles {
position: relative;

clear: both;
display: flex;
flex-wrap: wrap;
align-content: stretch;

height: 100%;

margin-top: -2em;
padding-top: 2em;

Expand All @@ -217,30 +212,25 @@
flex-wrap: wrap;
align-content: stretch;
flex-grow: 1;

width: 100%;
height: 100%;

margin-top: -2.3em; // - padding title - margin tile
padding-top: 2.3em; // + padding title + margin tile
}

.tlv-tile {
margin: 0.1em;
flex-grow: 1;

overflow: hidden;

.badges {
display: inline-block;

font-weight: normal;
margin-left: 0.2em;

.badge {
font-size: 0.7em;

border: 0.1em solid white;
border: 0.1em solid @white;
margin-left: 0.2em;
}
}
Expand All @@ -250,16 +240,13 @@
display: inline-block;
height: 1.8em;
width: 100%;

padding: 0.1em;
}

> .tlv-tile { // first level
min-width: 40%;

border-style: solid;
border-width: 1px 1px 1px 4px;

padding: 0.1em;
margin: 0.3em 0.5em;

Expand Down Expand Up @@ -292,6 +279,7 @@
}
}
}
/** END of tiles **/

#layout.wide-layout .tlv-view-tiles .tlv-tile-title {
font-size: 1.3em;
Expand All @@ -301,12 +289,12 @@
font-size: 1.1em;
}

/** BEGIN of tree **/
.tlv-view-tree {
.tlv-tree-node {
display: flex;
flex-wrap: wrap;
flex-grow: 1;

width: 100%;

&.tlv-collapsed {
Expand All @@ -315,9 +303,7 @@

background: none;
border-style: solid;

border-width: 2px 0 0 5px;

padding: 0.2em 0 0 1em;

&.tlv-collapsed {
Expand All @@ -330,8 +316,8 @@
display: inline-block;
font-size: 0.9em;

.badge {
border: 0.1em solid white;
.badge {
border: 0.1em solid @white;
margin-left: 0.2em;
}
}
Expand Down Expand Up @@ -359,16 +345,14 @@

.tlv-node-icinga {
flex-grow: 1;

margin: 0.2em;
padding: 0.2em 1em;
white-space: nowrap;

border-radius: 0.5em;

font-size: 0.9em;
}
}
/** END of tree **/

.tlv-collapsible {
.icon.tlv-collapse-handle::before {
Expand All @@ -389,7 +373,7 @@
list-style: none;
overflow: hidden;
padding: 0;

// breadcrumb badges
.badges {
display: inline-block;
padding: 0 0 0 0.5em;
Expand Down

0 comments on commit 375b17a

Please sign in to comment.