icingadb-web/public/css/widgets.less
2020-03-04 13:15:00 +01:00

956 lines
15 KiB
Text

.cancel-button {
.button();
background-color: white;
border: 1px solid @color-critical;
color: @color-critical;
&:hover {
background-color: @color-critical;
color: white;
}
}
.card {
.rounded-corners(.5em);
border: 1px solid @gray-light;
}
.card-body {
padding: .5em;
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: .5em;
}
.card-header {
border-bottom: 1px solid @gray-light;
}
.check-statistics,
.downtime-progress {
.vertical-key-value {
.key {
color: @gray;
}
.value {
font-size: 1em;
line-height: 1;
}
}
.last .vertical-key-value,
.next .vertical-key-value,
.start .vertical-key-value,
.end .vertical-key-value {
width: 6em;
}
.check-attempt {
display: inline-flex;
}
.above,
.below {
list-style-type: none;
margin: 0;
position: relative;
}
.above {
padding: 0;
}
.bubble {
.rounded-corners(.25em);
background-color: white;
border: 1px solid @gray-light;
bottom: 0;
box-shadow: 0 0 1em 0 rgba(0,0,0,.1);
margin-left: -4em;
padding: .25em .5em;
text-align: center;
width: 8em;
z-index: 1;
> * {
position: relative;
z-index: 2;
}
&:hover {
z-index: 5;
}
&.now {
margin-left: -2em;
width: 4em;
z-index: 2;
}
&.next,
&.end {
margin-right: -4em;
}
&:before {
background-color: white;
border-bottom: 1px solid @gray-light;
border-right: 1px solid @gray-light;
content: "";
display: block;
height: 1em;
margin-left: -.5em;
transform: rotate(45deg);
width: 1em;
z-index: 1;
position: absolute;
bottom: -.5em;
left: 50%;
}
&.upwards:before {
bottom: auto;
top: -.5em;
transform: rotate(225deg);
}
&.right {
margin-left: -1.25em;
margin-right: 0;
}
&.right:before {
bottom: auto;
left: 1.175em;
top: -.5em;
}
&.left {
margin-left: -6.75em;
}
&.left:before {
bottom: auto;
left: auto;
right: .675em;
top: -.5em;
}
}
.above .bubble {
bottom: 0;
top: auto;
}
.below .bubble {
bottom: auto;
top: 0;
}
}
.downtime-progress {
.above,
.below {
padding: 2em 10%;
}
.above .bubble,
.below .bubble {
position: absolute;
}
}
.timeline {
.rounded-corners(.5em);
background-color: @gray-lighter;
height: 1em;
margin: 1em 0;
position: relative;
width: 100%;
z-index: 1;
.marker {
.rounded-corners(50%);
background-color: @gray-light;
height: .857em;
margin-left: -.857/2em;
margin-top: -1/12em;
width: .857em;
z-index: 2;
position: absolute;
top: 2/12em;
&.now {
background-color: @gray;
}
&.start,
&.last,
&.end,
&.next {
background-color: @icinga-blue;
}
}
&.overdue {
background-color: @color-down;
width: auto;
}
}
.flexible.in-effect .marker {
&.start,
&.end {
background-color: @gray-light;
}
&.flex-start,
&.flex-end {
background-color: @icinga-blue;
}
}
.check-statistics {
.below-wrapper {
// The wrapper is needed because IE11 doesn't ignore absolutely positioned elements with
// justify-content:space-between: https://github.com/philipwalton/flexbugs/issues/111
position: relative;
margin-left: 10%;
margin-right: auto;
.interval-line {
position: absolute;
top: 50%;
width: 100%;
margin: 0;
border-style: solid;
border-color: @gray;
border-width: .125em 0;
}
}
.below {
padding: 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.interval {
background-color: @body-bg-color;
position: relative;
}
.bubble {
position: relative;
}
}
.timeline .progress-bar,
.timeline .progress-in-effect {
height: 100%;
opacity: .6;
position: absolute;
&:before,
&:after {
content: "";
display: block;
height: 1em;
width: .5em;
position: absolute;
top: 0;
}
&:before {
border-bottom-left-radius: .5em;
border-top-left-radius: .5em;
left: -.5em;
}
&:after {
border-bottom-right-radius: .5em;
border-top-right-radius: .5em;
right: -.5em;
}
}
.progress-bar {
background-color: @color-ok;
&:before,
&:after {
background-color: @color-ok;
}
&.overdue {
background-color: @color-down;
opacity: 1;
&:before,
&:after {
background-color: @color-down;
}
}
}
.progress-in-effect {
background-color: @color-down;
&:before,
&:after {
background-color: @color-down;
}
}
.progress-bar + .progress-in-effect {
&:before {
display: none;
}
}
.custom-var-table {
.level-1 th {
padding-left: .5em;
}
.level-2 th {
padding-left: 1em;
}
.level-3 th {
padding-left: 1.5em;
}
.level-4 th {
padding-left: 2em;
}
.level-5 th {
padding-left: 2.5em;
}
.level-6 th {
padding-left: 3em;
}
}
.horizontal-key-value {
display: flex;
padding: .25em 0;
.key {
color: @gray;
flex: 0 0 auto;
white-space: nowrap;
width: 12em;
}
.value {
flex: 1 1 auto;
}
}
.tag-list {
line-height: 1.5;
list-style-type: none;
margin: -.25em 0 0 0;
padding: 0;
> li {
display: inline-block;
&:not(:last-child) {
margin-right: .417em;
margin-bottom: .25em;
}
i {
opacity: 0.8;
}
}
> li > a {
.rounded-corners();
background-color: @gray-lighter;
display: block;
padding: .25em .5em;
&:hover {
background-color: @gray-light;
text-decoration: none;
}
}
}
.event-box {
.rounded-corners(.5em);
background-color: fade(@gray, 80);
border: 1px solid @gray-light;
color: white;
margin-bottom: .25em;
padding: .5em;
header {
display: flex;
time {
margin-left: auto;
}
}
.title {
font-size: 1em;
font-weight: normal;
margin: 0;
padding: 0;
em {
font-style: normal;
text-transform: uppercase;
}
a {
font-weight: bold;
}
}
.caption {
margin: 0;
opacity: .8;
&.output {
.monospace();
}
}
&.state-critical {
background-color: fade(@color-critical, 80);
border-color: @color-critical;
}
&.state-down {
background-color: fade(@color-down, 80);
border-color: @color-down;
}
&.state-ok {
background-color: fade(@color-ok, 80);
border-color: @color-ok;
}
&.state-pending {
background-color: fade(@color-pending, 80);
border-color: @color-pending;
}
&.state-unknown {
background-color: fade(@color-unknown, 80);
border-color: @color-unknown;
}
&.state-up {
background-color: fade(@color-up, 80);
border-color: @color-up;
}
&.state-warning {
background-color: fade(@color-warning, 80);
border-color: @color-warning;
}
&.collapsible.collapsed {
&.state-critical:before,
&.state-critical:after {
background: linear-gradient(fade(@color-critical, 0), fade(@color-critical, 80));
}
&.state-down:before,
&.state-down:after {
background: linear-gradient(fade(@color-down, 0), fade(@color-down, 80));
}
&.state-ok:before,
&.state-ok:after {
background: linear-gradient(fade(@color-ok, 0), fade(@color-ok, 80));
}
&.state-pending:before,
&.state-pending:after {
background: linear-gradient(fade(@color-pending, 0), fade(@color-pending, 80));
}
&.state-unknown:before,
&.state-unknown:after {
background: linear-gradient(fade(@color-unknown, 0), fade(@color-unknown, 80));
}
&.state-up:before,
&.state-up:after {
background: linear-gradient(fade(@color-up, 0), fade(@color-up, 80));
}
&.state-warning:before,
&.state-warning:after {
background: linear-gradient(fade(@color-warning, 0), fade(@color-warning, 80));
}
}
}
.quick-actions {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
list-style-type: none;
margin: 0 -.25em;
max-width: 60em;
padding: 0;
a {
text-decoration: none;
}
li {
.rounded-corners();
padding: .25em;
vertical-align: middle;
white-space: nowrap;
&:hover {
background: @gray-lighter;
}
}
}
form.object-features {
span.description {
text-align: left;
}
.control-label-group {
text-align: left;
margin-right: 0;
width: @name-value-table-name-width;
color: @gray;
label {
font-size: inherit;
}
}
.control-group {
margin-top: 0;
margin-bottom: 0;
&.indeterminate {
justify-content: flex-start;
.control-label-group {
flex: 0 1 auto;
}
select {
width: auto;
flex: 0 1 auto;
& + span.hint {
flex: 0 1 auto;
}
}
}
}
.toggle-switch {
margin-left: @table-column-padding;
}
select {
margin-right: .5em;
margin-left: @table-column-padding;
& + span.hint {
margin: .35em;
color: @gray-light;
font-style: italic;
}
}
}
.state-change {
.state-ball {
box-shadow: 0 0 0 1px white;
}
.state-ball ~ .state-ball {
margin-left: -.875em;
}
.state-ball.state-ok,
.state-ball.state-up {
background-color: white;
}
}
.key-value-list {
list-style-type: none;
margin: 0;
padding: 0;
li {
display: flex;
}
li > span {
padding: .25em;
&.label {
display: block;
padding-left: 0;
width: 12em;
}
}
}
.empty-state {
color: @gray-semilight;
}
/* migrate popup */
#migrate-popup {
@transitionLength: 350ms;
display: flex;
min-width: 16em;
z-index: 1000;
position: fixed;
top: 0;
right: 4em;
pointer-events: none;
.transform(translateY(-100%));
.transition(transform @transitionLength ease-in);
&.active {
.transform(translateY(0%));
.transition(transform @transitionLength ease-out);
}
.suggestion-area {
.transform(translateY(0%));
.transition(transform 0s linear @transitionLength);
}
&.active .suggestion-area {
.transition(transform @transitionLength ease-out);
}
&.minimized .suggestion-area {
.transform(translateY(-100%));
.transition(transform @transitionLength ease-in);
}
&.hidden .suggestion-area {
.transition(none);
}
.minimizer {
width: 1.25em;
height: 1.5em;
margin-left: -1px;
z-index: 1;
pointer-events: auto;
border-bottom-right-radius: 4px;
background-color: @body-bg-color;
.transition(none);
i:before {
width: 1em;
margin: .1em 0 0 0;
content: '\f102';
font-size: 1.25em;
cursor: pointer;
color: @gray-light;
}
i:hover:before {
color: @menu-highlight-color;
}
}
&.minimized .minimizer {
border-bottom-left-radius: 4px;
.transition(border-bottom-left-radius 0s linear @transitionLength);
}
&.hidden .minimizer i:before {
content: '\f103';
}
&:not(.active) .suggestion-area, &.hidden .suggestion-area {
box-shadow: none;
}
.suggestion-area {
padding: .75em .75em .25em;
flex-grow: 1;
pointer-events: auto;
background: @body-bg-color;
border-radius: 0 0 4px 4px;
box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.3);
button {
.link-button();
}
p {
margin-bottom: .5em;
font-size: 90%;
color: @text-color-light;
}
& > button.close {
float: right;
margin-top: 1em;
font-size: 75%;
&:hover {
text-decoration: underline;
}
}
ul {
padding: 0;
margin: .5em 0 0;
list-style-type: none;
}
li {
margin: .5em 0;
display: flex;
&:last-of-type {
margin-bottom: 0;
}
}
li {
:not(:last-child) {
margin-right: .5em;
}
button[value="1"] {
flex-grow: 1;
color: @text-color;
font-weight: bold;
font-size: 90%;
&:hover {
text-decoration: underline;
}
}
button[value="0"] {
i:before {
margin: 0;
content: '\e804';
font-size: 80%;
}
}
}
}
}
.actions a {
border-bottom: 1px solid @gray-light;
display: inline-block;
margin-bottom: .25em;
&:hover {
border-color: fade(@icinga-blue, 60);
color: @icinga-blue;
text-decoration: none;
}
}
.monitoring-health {
max-width: 65em;
> section:not(:last-child) {
margin-bottom: 4em;
}
.vertical-key-value .value {
display: inline-block;
margin-bottom: .25em;
}
.check-summary {
.col {
padding: 0 1em .5em 1em;
}
.col:not(:last-child) {
border-right: 1px solid @gray-light;
}
}
.check-summary,
.instance-features {
.rounded-corners();
border: 1px solid @gray-light;
display: flex;
padding: .5em 0;
width: 100%;
}
.check-summary,
.col-content,
.icinga-info {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.col {
flex: 1 1 auto;
text-align: center;
> h3 {
margin: 0 0 1em;
}
}
.icinga-health {
.rounded-corners();
margin-bottom: 2em;
padding: 1em;
text-align: center;
width: 100%;
font-weight: bold;
&.up {
border: 1px solid @color-up;
color: #399c63;
color: darken(@color-up, 5);
}
&.down {
background-color: @color-down;
color: @body-bg-color;
}
}
.instance-features {
.control-group {
flex: 1 1 auto;
margin: 0;
padding: .5em;
width: 0;
display: flex;
align-items: center;
flex-direction: column-reverse;
justify-content: flex-end;
&:not(:last-of-type) {
border-right: 1px solid @gray-light;
}
.control-label-group {
font-size: 10/12em;
margin-right: 0;
margin-top: 1em;
padding: 0;
text-align: center;
width: auto;
}
.toggle-switch {
margin: 0;
}
}
}
}
div.show-more {
.clearfix();
float: right;
}
ul.object-statistics {
// Reset defaults
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
> li:not(:last-child) {
margin-right: 1em;
}
}
.object-statistics-graph .donut-graph {
height: 2.25em;
width: 2.25em;
vertical-align: middle;
}
.object-statistics-total a {
line-height: 1;
position: relative;
&:hover:before {
.rounded-corners();
background-color: @gray-lighter;
content: "";
display: block;
z-index: 1;
position: absolute;
bottom: -.4em;
left: -.4em;
top: -.4em;
right: -.4em;
}
.vertical-key-value {
position: relative;
z-index: 2;
}
}
.donut-container {
h2 {
margin: 0;
}
.state-badges {
text-align: center;
}
&:not(:last-of-type) {
margin-right: 1em;
}
}