diff --git a/src/panel-triggers/components/Problems.tsx b/src/panel-triggers/components/Problems.tsx index 77533ee..9c493a2 100644 --- a/src/panel-triggers/components/Problems.tsx +++ b/src/panel-triggers/components/Problems.tsx @@ -12,6 +12,13 @@ export interface ProblemListProps { } export class ProblemList extends PureComponent { + rootWidth: number; + rootRef: any; + + setRootRef = ref => { + this.rootRef = ref; + } + buildColumns() { const result = []; const options = this.props.panelOptions; @@ -41,17 +48,18 @@ export class ProblemList extends PureComponent { } render() { - console.log(this.props.problems, this.props.panelOptions); + // console.log(this.props.problems, this.props.panelOptions); const columns = this.buildColumns(); - // const data = this.props.problems.map(p => [p.host, p.description]); + this.rootWidth = this.rootRef && this.rootRef.clientWidth; + return ( -
+
} + SubComponent={props => } />
); @@ -244,7 +252,7 @@ function ProblemStatusBar(props: ProblemStatusBarProps) { - +
); } @@ -289,11 +297,10 @@ class ProblemDetails extends PureComponent { render() { const problem = this.props.original as Trigger; + const rootWidth = this.props.rootWidth; const displayClass = this.state.show ? 'show' : ''; - let groups = ""; - if (problem && problem.groups) { - groups = problem.groups.map(g => g.name).join(', '); - } + const wideLayout = rootWidth > 1000; + return (
@@ -317,8 +324,14 @@ class ProblemDetails extends PureComponent {
{problem.tags && problem.tags.map(tag => )}
+ {problem.acknowledges && !wideLayout && +
+
Acknowledges
+ +
+ }
- {problem.acknowledges && + {problem.acknowledges && wideLayout &&
Acknowledges
diff --git a/src/sass/_panel-problems.scss b/src/sass/_panel-problems.scss index 6608429..3385cb4 100644 --- a/src/sass/_panel-problems.scss +++ b/src/sass/_panel-problems.scss @@ -167,6 +167,7 @@ .problem-details-row { display: flex; margin-bottom: 0.6rem; + min-height: 3rem; .problem-value-container { flex: 1 0 auto; @@ -176,7 +177,7 @@ .problem-details { position: relative; flex: 10 0 auto; - padding: 0.5rem 1rem; + padding: 0.5rem 1rem 0.5rem 1.2rem; display: flex; flex-direction: column; } @@ -193,7 +194,7 @@ .problem-tags { padding-top: 0.6rem; - padding-bottom: 0.6rem; + padding-bottom: 0.8rem; margin-top: auto; } @@ -243,7 +244,7 @@ .problem-details-middle { flex: 1 0 auto; - padding: 0.5rem 1rem; + padding: 0.6rem 1rem; // border: 1px solid $dark-4; border-width: 0 1px; border-style: solid; @@ -251,6 +252,12 @@ overflow: auto; } + .problem-ack-container { + padding: 0.8rem 0; + border-top: 2px solid $dark-4; + overflow: auto; + } + .problem-ack-list { display: flex; overflow: auto;