diff --git a/ivette/.eslintrc.js b/ivette/.eslintrc.js index 5a3a472d6a2dddb2ad443fbe21354075b6731341..9158c04e76fbd190057fb2ac7ec8de887dbe6d15 100644 --- a/ivette/.eslintrc.js +++ b/ivette/.eslintrc.js @@ -79,6 +79,8 @@ module.exports = { "react/jsx-one-expression-per-line": "off", // Allow property spreading since with aim at using TSC "react/jsx-props-no-spreading": "off", + // Allow using functions in JSX props + "react/jsx-no-bind": "off", // Allow all sorts of linebreaking for operators "operator-linebreak": "off", // Force curly brackets on newline if some item is diff --git a/ivette/src/frama-c/plugins/eva/CoverageMeter.tsx b/ivette/src/frama-c/plugins/eva/CoverageMeter.tsx index a6468e552e62c2c1d11c263787bf3a4818ca502e..b540dc668669eaeabf30532803a5f4e80eb8ac8c 100644 --- a/ivette/src/frama-c/plugins/eva/CoverageMeter.tsx +++ b/ivette/src/frama-c/plugins/eva/CoverageMeter.tsx @@ -40,7 +40,8 @@ export default function(props: { coverage: CoverageProps }) { <meter min={0} max={total} - low={0.8 * total} + low={0.50 * total} + high={0.85 * total} optimum={total} value={reachable} /> diff --git a/ivette/src/renderer/style.css b/ivette/src/renderer/style.css index c210426cfccbb0b7b70c7e638c4a6bc3077225a9..a345a1844183fc546a80e154eedc19e4360b5e04 100644 --- a/ivette/src/renderer/style.css +++ b/ivette/src/renderer/style.css @@ -65,3 +65,34 @@ .dome-window-active .labview-icon { fill: #7d7d7d ; } + +/* -------------------------------------------------------------------------- */ +/* --- Meters --- */ +/* -------------------------------------------------------------------------- */ + +meter { + background: white; + border-radius: 5px; + box-shadow: + 0 0 4px 4px rgba(0,0,0,0.15) inset; + height: 16px; + width: 70px; +} + +meter::-webkit-meter-bar { + background: transparent; + border-radius: 5px; + height: 14px; +} + +meter::-webkit-meter-optimum-value { + background: linear-gradient(to bottom, #4a0 0%, #8f0 20%, #4a0 100%); +} + +meter::-webkit-meter-suboptimum-value { + background: linear-gradient(to bottom, #aa0 0%, #ff0 20%, #aa0 100%); +} + +meter::-webkit-meter-even-less-good-value { + background: linear-gradient(to bottom, #a40 0%, #f80 20%, #a40 100%); +}