diff --git a/src/panel-triggers/components/Problems/ProblemDetails.tsx b/src/panel-triggers/components/Problems/ProblemDetails.tsx index cccc0a6..37c076b 100644 --- a/src/panel-triggers/components/Problems/ProblemDetails.tsx +++ b/src/panel-triggers/components/Problems/ProblemDetails.tsx @@ -102,106 +102,110 @@ export class ProblemDetails extends PureComponent -
-
-
-
- - {age} +
+
+ +
+ {problem.showAckButton && +
+ + {({ showModal, hideModal }) => ( + { + showModal(ExecScriptModal, { + getScripts: this.getScripts, + onSubmit: this.onExecuteScript, + onDismiss: hideModal, + }); + }} + /> + )} + + + {({ showModal, hideModal }) => ( + { + showModal(AckModal, { + canClose: problem.manual_close === '1', + severity: problemSeverity, + onSubmit: this.ackProblem, + onDismiss: hideModal, + }); + }} + /> + )} + +
+ } + +
+
+
+
+
+
+ + {age} +
+ {problem.items && }
- {problem.items && }
-
- -
- - {problem.showAckButton && -
- - {({ showModal, hideModal }) => ( - { - showModal(ExecScriptModal, { - getScripts: this.getScripts, - onSubmit: this.onExecuteScript, - onDismiss: hideModal, - }); - }} - /> - )} - - - {({ showModal, hideModal }) => ( - { - showModal(AckModal, { - canClose: problem.manual_close === '1', - severity: problemSeverity, - onSubmit: this.ackProblem, - onDismiss: hideModal, - }); - }} - /> - )} - + {problem.comments && +
+
+ + Description:  + + {problem.comments} +
+
+ } + {problem.tags && problem.tags.length > 0 && +
+ {problem.tags && problem.tags.map(tag => + ) + } +
+ } + {this.props.showTimeline && this.state.events.length > 0 && + + } + {showAcknowledges && !wideLayout && +
+
Acknowledges
+
}
- {problem.comments && -
-
- - Description:  - - {problem.comments} + {showAcknowledges && wideLayout && +
+
+
Acknowledges
+
} - {problem.tags && problem.tags.length > 0 && -
- {problem.tags && problem.tags.map(tag => - ) - } -
- } - {this.props.showTimeline && this.state.events.length > 0 && - - } - {showAcknowledges && !wideLayout && -
-
Acknowledges
- -
- } -
- {showAcknowledges && wideLayout && -
-
-
Acknowledges
- -
-
- } -
-
- - {problem.datasource} -
- {problem.proxy && +
- - {problem.proxy} + + {problem.datasource}
- } - {problem.groups && } - {problem.hosts && } + {problem.proxy && +
+ + {problem.proxy} +
+ } + {problem.groups && } + {problem.hosts && } +
); diff --git a/src/sass/_panel-problems.scss b/src/sass/_panel-problems.scss index 4ce953c..ac14843 100644 --- a/src/sass/_panel-problems.scss +++ b/src/sass/_panel-problems.scss @@ -215,6 +215,7 @@ .problem-details-container { display: flex; + flex-direction: column; padding-top: 4px; background-color: $problem-details-background; border-bottom-width: 0px; @@ -227,7 +228,7 @@ transition-property: opacity, max-height; &.show { - max-height: 20rem; + max-height: 23rem; opacity: 1; box-shadow: inset -3px 3px 10px $problem-container-shadow; } @@ -244,6 +245,15 @@ } } + .problem-details-head { + display: flex; + padding: 0.5rem 1rem 0.5rem 1.2rem; + } + + .problem-details-body { + display: flex; + } + .problem-details { position: relative; flex: 10 1 auto; @@ -256,7 +266,8 @@ .problem-description { position: relative; - height: 4.5rem; + max-height: 4.5rem; + min-height: 3rem; overflow: hidden; &:after { @@ -358,7 +369,11 @@ .problem-actions { display: flex; - margin-left: 1.6rem; + margin-right: 1.6rem; + } + + .problem-action-button { + margin-right: 0.2rem; } .problem-actions-left { @@ -376,6 +391,7 @@ } .problem-ack-container { + max-height: 8rem; margin-top: 0.6rem; margin-left: -0.6rem; padding: 1.2rem 0.6rem;