Display RHEL and OCP hours for each image
Summary
As a customer, I want to see the cumulative running hours alongside each individual image row so that I can understand how that image contributed to the overall total running hours.
Observe specifically the clock icons and numbers of hours for each image line in this mockup as annotated by the purple rectangles:
Screenshot taken on 2018-10-16 from https://redhat.invisionapp.com/share/UFI078IZVAW#/screens/298847568
Acceptance Criteria
-
Verify an image with no usage during the selected time period shows "0 hours" -
Verify a RHEL-only image with usage during the selected time period shows "X hours" by the RHEL label -
Verify an OCP-only image with usage during the selected time period shows "X hours" by the RHOCP label -
Verify a RHEL-and-OCP image with usage during the selected time period shows "X hours" by the RHEL label and "X hours" by the RHOCP label - Q: Do we want the hours displayed twice like this?
- A: YES, we want separate display for two reasons. a) consistency with other views (namely the account-level list), and b) to allow for future changes where you will have different information powering different graphs
-
Verify that the displayed hours are always rounded up to the nearest integer -
Verify the documentation concept topic about the behavior is updated: -
"Data for images in the list view" https://docs.google.com/document/d/1O2vBNGkP8zRLRzdrbWb9C8RpkBDFGpmbImuipmo7HcA/edit#heading=h.fa7d1nu8aeh3 explains the latest behavior for the display of the hours.
-
Assumptions and Questions
- This story is not intended to include the additional miniature graphs seen in the mockup.
- Do we actually want to show two "clocks" when the values for RHEL and OCP will always be the same for a given image if it has RHEL and OCP? RHEL and OCP presence is tied to the image definition itself, not to some period in time, meaning that the image has exactly possible states for displaying their times:
- neither RHEL nor OCP, meaning 0 hours for both
- both RHEL and OCP, meaning X hours for both
- only RHEL, meaning X hours for RHEL and 0 for OCP
- only OCP, meaning 0 hours for RHEL and some for OCP
- Answer: YES, show the two values. See the explanation up in the Acceptance Criteria.
- The existing API output from
/api/v1/report/images/
should include enough information for this by usingruntime_seconds
,rhel
, andopenshift
. An example:{ "cloud_image_id": "ami-rhel7", "id": 2, "instances_seen": 2, "is_encrypted": false, "name": null, "openshift": false, "openshift_challenged": false, "openshift_detected": false, "rhel": true, "rhel_challenged": false, "rhel_detected": true, "runtime_seconds": 7200.0, "status": "inspected" } ```!
Edited by Calvin Spealman