From f52a44be2aa1919ef6750dcde34c2defa4488939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Wed, 20 Oct 2021 17:48:40 +0200 Subject: [PATCH] [ivette] Centers the Eva analysis summary in its panel. --- ivette/src/frama-c/plugins/eva/Summary.tsx | 27 +++++++++++----------- ivette/src/frama-c/plugins/eva/summary.css | 17 ++++++++++---- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ivette/src/frama-c/plugins/eva/Summary.tsx b/ivette/src/frama-c/plugins/eva/Summary.tsx index 1302c487dd6..ef65916c46d 100644 --- a/ivette/src/frama-c/plugins/eva/Summary.tsx +++ b/ivette/src/frama-c/plugins/eva/Summary.tsx @@ -23,7 +23,6 @@ // React & Dome import React from 'react'; import * as Ivette from 'ivette'; -import { Vfill } from 'dome/layout/boxes'; import * as States from 'frama-c/states'; import * as Eva from 'frama-c/api/plugins/eva/general'; @@ -225,16 +224,18 @@ export function EvaSummary(): JSX.Element { if (state === 'computed' && data && alarmCategories) return ( - <div className="eva-summary computed"> - <h1>Analysis Summary</h1> - <h2>Coverage</h2> - {CoverageTable(data)} - <h2>Errors</h2> - {Errors(data)} - <h2>Alarms</h2> - {Alarms(data, alarmCategories)} - <h2>Statuses</h2> - {Statuses(data)} + <div className="eva-summary-box"> + <div className="eva-summary"> + <h1>Analysis Summary</h1> + <h2>Coverage</h2> + {CoverageTable(data)} + <h2>Errors</h2> + {Errors(data)} + <h2>Alarms</h2> + {Alarms(data, alarmCategories)} + <h2>Statuses</h2> + {Statuses(data)} + </div> </div> ); @@ -245,9 +246,7 @@ function EvaSummaryComponent(): JSX.Element { return ( <> <Ivette.TitleBar /> - <Vfill> - <EvaSummary /> - </Vfill> + <EvaSummary /> </> ); } diff --git a/ivette/src/frama-c/plugins/eva/summary.css b/ivette/src/frama-c/plugins/eva/summary.css index 1b67fd4d29d..41de1d07440 100644 --- a/ivette/src/frama-c/plugins/eva/summary.css +++ b/ivette/src/frama-c/plugins/eva/summary.css @@ -1,5 +1,5 @@ .eva-summary-status { - margin: 6px; + margin: auto; } .eva-summary-status .dome-xButton-led { @@ -7,11 +7,20 @@ vertical-align: baseline; } -.eva-summary { - padding: 10px; +.eva-summary-box { background-color: white; height: 100%; + width: 100%; + display: flex; + flex-direction: column; + flex-wrap: wrap; + align-items: center; + justify-content: center; overflow: auto; +} + +.eva-summary { + min-height: 0px; user-select: text; } @@ -66,7 +75,7 @@ .eva-summary .alarms-table tr:nth-child(2n) { background-color: #eee; -} +} .eva-summary .alarms-table td:nth-child(1) { text-align: right; -- GitLab