Tweak problem details styles

This commit is contained in:
Alexander Zobnin
2021-08-10 14:05:16 +03:00
parent 19f939e3f6
commit 2a6642811e
2 changed files with 61 additions and 43 deletions

View File

@@ -6,12 +6,12 @@ import { APIExecuteScriptResponse, ZBXScript } from '../../../datasource-zabbix/
import { GFTimeRange, RTRow, ZBXItem } from '../../types'; import { GFTimeRange, RTRow, ZBXItem } from '../../types';
import { AckModal, AckProblemData } from '../AckModal'; import { AckModal, AckProblemData } from '../AckModal';
import EventTag from '../EventTag'; import EventTag from '../EventTag';
import ProblemStatusBar from './ProblemStatusBar';
import AcknowledgesList from './AcknowledgesList'; import AcknowledgesList from './AcknowledgesList';
import ProblemTimeline from './ProblemTimeline'; import ProblemTimeline from './ProblemTimeline';
import { AckButton, ExecScriptButton, ExploreButton, FAIcon, ModalController, Tooltip } from '../../../components'; import { AckButton, ExecScriptButton, ExploreButton, FAIcon, ModalController, Tooltip } from '../../../components';
import { ExecScriptData, ExecScriptModal } from '../ExecScriptModal'; import { ExecScriptData, ExecScriptModal } from '../ExecScriptModal';
import { TimeRange } from "@grafana/data"; import { TimeRange } from "@grafana/data";
import ProblemStatusBar from "./ProblemStatusBar";
interface ProblemDetailsProps extends RTRow<ProblemDTO> { interface ProblemDetailsProps extends RTRow<ProblemDTO> {
rootWidth: number; rootWidth: number;
@@ -105,6 +105,8 @@ export class ProblemDetails extends PureComponent<ProblemDetailsProps, ProblemDe
return ( return (
<div className={`problem-details-container ${displayClass}`}> <div className={`problem-details-container ${displayClass}`}>
<div className="problem-details-body">
<div className="problem-details">
<div className="problem-details-head"> <div className="problem-details-head">
<div className="problem-actions-left"> <div className="problem-actions-left">
<ExploreButton problem={problem} panelId={panelId} range={range}/> <ExploreButton problem={problem} panelId={panelId} range={range}/>
@@ -144,8 +146,6 @@ export class ProblemDetails extends PureComponent<ProblemDetailsProps, ProblemDe
} }
<ProblemStatusBar problem={problem} alerts={alerts} className={compactStatusBar && 'compact'}/> <ProblemStatusBar problem={problem} alerts={alerts} className={compactStatusBar && 'compact'}/>
</div> </div>
<div className="problem-details-body">
<div className="problem-details">
<div className="problem-details-row"> <div className="problem-details-row">
<div className="problem-value-container"> <div className="problem-value-container">
<div className="problem-age"> <div className="problem-age">

View File

@@ -4,6 +4,7 @@
.fa-icon-container { .fa-icon-container {
padding-right: 0.4rem; padding-right: 0.4rem;
color: $gray-2; color: $gray-2;
i { i {
width: 1rem; width: 1rem;
} }
@@ -34,6 +35,7 @@
&.-sort-desc { &.-sort-desc {
box-shadow: inset 0 -3px 0 0 $blue; box-shadow: inset 0 -3px 0 0 $blue;
} }
&.-sort-asc { &.-sort-asc {
box-shadow: inset 0 3px 0 0 $blue; box-shadow: inset 0 3px 0 0 $blue;
} }
@@ -108,6 +110,7 @@
.-pageJump { .-pageJump {
margin: 0px 0.4rem; margin: 0px 0.4rem;
input { input {
height: $footer-height; height: $footer-height;
} }
@@ -149,10 +152,12 @@
&.custom-expander { &.custom-expander {
text-align: center; text-align: center;
padding: 0.6em 0 0 0; padding: 0.6em 0 0 0;
i { i {
color: #676767; color: #676767;
font-size: 1.2rem; font-size: 1.2rem;
} }
& .expanded { & .expanded {
i { i {
color: $problem-expander-expanded-color; color: $problem-expander-expanded-color;
@@ -162,6 +167,7 @@
&.custom-expander:hover { &.custom-expander:hover {
background-color: $problem-expander-highlighted-background; background-color: $problem-expander-highlighted-background;
i { i {
color: $problem-expander-highlighted-color; color: $problem-expander-highlighted-color;
} }
@@ -184,6 +190,7 @@
&.zbx-problem { &.zbx-problem {
color: $problem-icon-problem-color; color: $problem-icon-problem-color;
} }
&.zbx-ok { &.zbx-ok {
color: $problem-icon-ok-color; color: $problem-icon-ok-color;
} }
@@ -194,6 +201,7 @@
.comments-icon { .comments-icon {
float: right; float: right;
padding-right: 0.6rem; padding-right: 0.6rem;
i { i {
color: $gray-2; color: $gray-2;
} }
@@ -203,6 +211,7 @@
&.rt-td { &.rt-td {
padding-left: 0.6rem; padding-left: 0.6rem;
} }
.label-tag, .zbx-tag { .label-tag, .zbx-tag {
cursor: pointer; cursor: pointer;
margin-right: 0.6rem; margin-right: 0.6rem;
@@ -247,7 +256,6 @@
.problem-details-head { .problem-details-head {
display: flex; display: flex;
padding: 0.5rem 1rem 0.5rem 1.2rem;
} }
.problem-details-body { .problem-details-body {
@@ -357,8 +365,10 @@
color: $problem-statusbar-muted; color: $problem-statusbar-muted;
} }
} }
&.fired { &.fired {
box-shadow: $problem-statusbar-glow; box-shadow: $problem-statusbar-glow;
.fa-icon-container { .fa-icon-container {
color: $problem-statusbar-fired; color: $problem-statusbar-fired;
text-shadow: 0px 0px 10px rgba($problem-statusbar-fired, 0.5); text-shadow: 0px 0px 10px rgba($problem-statusbar-fired, 0.5);
@@ -482,6 +492,7 @@
&--ok { &--ok {
fill: $problem-event-ok-color; fill: $problem-event-ok-color;
} }
&--problem { &--problem {
fill: $problem-event-problem-color; fill: $problem-event-problem-color;
} }
@@ -503,6 +514,7 @@
&--ok .point-border { &--ok .point-border {
fill: $problem-event-ok-color; fill: $problem-event-ok-color;
} }
&--problem .point-border { &--problem .point-border {
fill: $problem-event-problem-color; fill: $problem-event-problem-color;
} }
@@ -519,6 +531,7 @@
stroke-width: 1; stroke-width: 1;
filter: url(#glowShadow); filter: url(#glowShadow);
} }
.point-core { .point-core {
fill: $problem-event-core-highlighted; fill: $problem-event-core-highlighted;
} }
@@ -545,6 +558,7 @@
stroke-width: 1; stroke-width: 1;
filter: url(#glowShadow); filter: url(#glowShadow);
} }
.point-core { .point-core {
fill: $problem-event-core-highlighted; fill: $problem-event-core-highlighted;
} }
@@ -555,7 +569,9 @@
} }
@for $i from 8 through 9 { @for $i from 8 through 9 {
.item-#{$i} { width: 2em * $i; } .item-#{$i} {
width: 2em * $i;
}
&.font-size--#{$i * 10} .rt-table { &.font-size--#{$i * 10} .rt-table {
font-size: 1% * $i * 10; font-size: 1% * $i * 10;
@@ -570,7 +586,9 @@
} }
@for $i from 11 through 25 { @for $i from 11 through 25 {
.item-#{$i} { width: 2em * $i; } .item-#{$i} {
width: 2em * $i;
}
&.font-size--#{$i * 10} { &.font-size--#{$i * 10} {
.rt-table { .rt-table {
font-size: 1% * $i * 10; font-size: 1% * $i * 10;