Files
grafana-zabbix/src/styles/_panel-triggers.scss
2024-10-15 10:54:06 +01:00

322 lines
5.6 KiB
SCSS

.alert-rule-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
list-style-type: none;
}
.alert-rule-item {
display: flex;
align-items: center;
width: 100%;
height: 100%;
background: $card-background;
box-shadow: $card-shadow;
padding: 4px 8px;
border-radius: 4px;
margin-bottom: 4px;
}
.alert-rule-item__icon {
display: flex;
justify-content: center;
align-items: center;
width: 40px;
padding: 0 4px 0 2px;
.icon-gf,
.fa {
font-size: 200%;
position: relative;
top: 2px;
}
}
.alert-list__btn {
margin: 0 2px;
display: flex;
align-items: center;
justify-content: center;
}
.triggers-panel-scroll {
overflow: auto;
}
.triggers-panel-container {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
.card-section {
padding: 2px;
margin-bottom: 0.4rem;
overflow: auto;
.alert-rule-list {
.alert-rule-item {
.alert-rule-item__text {
display: flex;
max-height: 1.6em;
overflow: hidden;
align-items: center;
padding-right: 1em;
&.zbx-description--newline {
max-height: unset;
.zbx-description {
margin-left: 0px;
}
}
.zbx-description {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
span {
padding-right: 0.4em;
}
}
}
@for $i from 8 through 9 {
&.font-size--#{$i * 10} {
&,
.alert-rule-item__name {
font-size: 1% * $i * 10;
}
.alert-rule-item__icon {
width: unset;
font-size: 1% * $i * 10;
}
.alert-rule-item__time,
.alert-rule-item__text,
.zabbix-hostname {
font-size: 1% * $i * 10 * 0.8;
}
.zbx-trigger-tags .label-tag {
font-size: 1% * $i * 10 * 0.6;
padding: 0.3em 0.3em;
}
}
}
@for $i from 11 through 25 {
&.font-size--#{$i * 10} {
&,
.alert-rule-item__name {
font-size: 1% * $i * 10;
}
.alert-rule-item__icon {
width: unset;
font-size: 1% * $i * 10;
}
.alert-rule-item__time,
.alert-rule-item__text,
.zabbix-hostname {
font-size: 1% * $i * 10 * 0.8;
}
.zbx-trigger-tags .label-tag {
font-size: 1% * $i * 10 * 0.6;
padding: 0.3em 0.3em;
}
}
}
}
}
.zabbix-trigger-name {
font-weight: bold;
}
.zabbix-hostname {
color: $gray-2;
margin-left: 1em;
font-weight: 500;
i {
padding-right: 0.2em;
}
}
.zbx-description {
color: $gray-3;
font-weight: normal;
margin-left: 0.6em;
&--newline {
margin-left: 0rem;
}
}
.zbx-trigger-tags {
margin-left: 0.6rem;
.zbx-tag {
color: $zbx-tag-color;
font-weight: 500;
font-size: 12px;
margin-right: 4px;
padding: 1px 6px;
cursor: pointer;
}
}
.trigger-info-block {
display: flex;
i, a {
margin-right: 0.3rem;
color: $gray-2;
}
}
.zabbix-trigger-source {
margin-right: 1.5rem;
margin-left: 1rem;
font-weight: 500;
i {
padding-right: 0.4em;
}
}
.alert-rule-item__icon .icon-gf {
right: 0.4rem;
}
}
.zbx-trigger-card {
position: relative;
padding: 0.5rem 1rem;
}
.zabbix-trigger {
&--blinked {
opacity: 0.4;
animation: zabbix-triggers-icon 0.8s cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s infinite alternate;
}
}
.zbx-maintenance-icon {
color: $orange;
}
.zbx-trigger-highlighted {
color: $zbx-text-highlighted;
background: linear-gradient(135deg, $zbx-card-background-start, $zbx-card-background-stop);
.alert-rule-item__body,
.alert-rule-item__header,
.alert-rule-item__time,
.zabbix-hostname,
.zbx-description {
color: $zbx-text-highlighted;
}
.alert-rule-item__text {
.zbx-trigger-state,
.zbx-trigger-severity {
color: $zbx-text-highlighted;
}
}
.zbx-trigger-lastchange .trigger-info-block.zbx-status-icons {
a, i {
color: $zbx-text-highlighted;
}
}
}
@keyframes zabbix-triggers-icon {
100% {
opacity: 1;
}
}
.triggers-panel-footer {
margin-top: auto;
text-align: center;
font-size: 90%;
line-height: 2px;
ul {
position: relative;
display: inline-block;
margin-left: 0;
margin-bottom: 0;
}
ul > li {
display: inline; // Remove list-style and block-level defaults
}
ul > li > a {
float: left; // Collapse white-space
padding: 4px 12px;
text-decoration: none;
border-left-width: 0;
&:hover {
background-color: $tight-form-func-bg;
}
&.active {
font-weight: bold;
color: $blue;
}
}
}
.ack-tooltip {
&.popper {
max-width: 800px;
}
.ack-comments {
width: 60%;
}
.ack-add-button {
padding-top: 0.4rem;
text-align: left;
}
table td, th {
padding-right: 1rem;
text-align: left;
}
}
.triggers-severity-config {
&.gf-form-label {
padding-top: 5px;
padding-bottom: 5px;
border-radius: 0px;
}
.icon-gf {
font-size: 200%;
}
}
// fix for phantomjs (it has troubles with flex blocks rendering)
.body--phantomjs {
.triggers-panel-container {
.alert-rule-list {
display: block;
}
.alert-rule-item__body,
.alert-rule-item__icon {
display: block;
}
}
}