Bug 1386427

Summary: HTML color coding and stats don't fit the severities
Product: Red Hat Enterprise Linux 6 Reporter: Alois Mahdal <amahdal>
Component: preupgrade-assistantAssignee: Michal Bocek <mbocek>
Status: CLOSED WONTFIX QA Contact: Alois Mahdal <amahdal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: phracek, pstodulk
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-01 15:47:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
realistic use case: bar
none
realistic use case: boxes
none
realistic use case: full report
none
fake upgrade path: bar
none
fake upgrade path: full report none

Description Alois Mahdal 2016-10-18 22:42:43 UTC
Description of problem
======================

Colors in result.html don't reflect nature of the result properly:

    RESULT           || COLOR
                     ||-------.-------
                     || bar   | box
    =================||=======|=======
    passed           || green | green
    fixed            || red   | green
    failed           || ???   | red
    informational    || red   | grey
    needs_action     || red   | grey
    needs_inspection || red   | grey
    notapplicable    || ???   | grey
    error            || ???   | red

Legend:

 *  'bar' - the colored proportion bar under "Compliance and Scoring"
    section

 *  'box' - individual result boxes you can see when you click "Show
    all result details"

 *  'color: ???' - the result is not represented or misrepresented
    (e.g. XYZ counted as "passed") in the bar

See attached screenshots and reports for illustration.


Version-Release number of selected component
============================================

preupgrade-assistant-2.1.10-6.el6


How reproducible
================

Always


Steps to Reproduce
==================

 1. Run upgrade path with various results

    For example, test /CoreOS/preupgrade-assistant/preupg/result-files runs
    a fake upgrade path that contains one of each valid results

 2. Open result.html
 3. Observe result severity color coding


Actual results
==============

Colors and gauges don't match nature of result

 *  (A) in bar, 'informational' and 'fixed' are red

 *  (B) in bar, something is misinterpreted as "passed" (there's only one
    'passed' in the test but the bar counts 2)

 *  (C) 'needs_inspection', 'needs_action' and 'informational' boxes
    are all grey

 *  (D) there's also another similar bar called "Severity of failed
    rules", which apparently only contains 'failed' statistics, however
    it's coded green here.

 *  (E) 'error' is missing from the bar

 *  could be more...


Expected results
================

Colors should match nature of result, the report should be intuitive.

For example:

 *  (A) 'informational' and 'fixed' should have good/neutral color

 *  (B) only 'passed' should show as 'passed' here

 *  (C) at leasr 'needs_action' and 'needs_inspection' should not be grey

 *  (D) hard to say what to expect and whether this bar could make sense
    given we have only one "failed" severity type.

 *  (E) 'error' should not be missing from the bar


Additional info
===============

We're using custom results inherited from original XCCDF results.  My first guess is that the definition we give is not complete so these custom results inherit some "default" values inappropriate fot their new meaning, which further messes up the stats and color coding.

Comment 1 Alois Mahdal 2016-10-18 22:43:46 UTC
Created attachment 1211900 [details]
realistic use case: bar

Comment 2 Alois Mahdal 2016-10-18 22:44:19 UTC
Created attachment 1211901 [details]
realistic use case: boxes

Comment 3 Alois Mahdal 2016-10-18 22:44:48 UTC
Created attachment 1211902 [details]
realistic use case: full report

Comment 4 Alois Mahdal 2016-10-18 22:45:27 UTC
Created attachment 1211903 [details]
fake upgrade path: bar

Comment 5 Alois Mahdal 2016-10-18 22:45:52 UTC
Created attachment 1211904 [details]
fake upgrade path: full report

Comment 6 Alois Mahdal 2016-10-18 22:48:27 UTC
Note about attachments:

 *  "realistic use case" is simple preupg run on a fresh ppc64 install.

 *  "fake upgrade path" is a mock upgrade path forged to generate each
    result type exactly once (a modified version from test mentioned above).

Comment 9 Michal Bocek 2019-07-01 15:47:26 UTC
Closing this bugzilla as the component is under a maintenance mode in which the maintainers are going to fix only critical bugs. If you consider the bugzilla critical, feel free to reopen the bug with an explanation.