Bug 1834695 - Charts on Cluster Logging Details page use different color for Running and Pending pods
Summary: Charts on Cluster Logging Details page use different color for Running and Pe...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.6.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-12 09:12 UTC by Yadan Pei
Modified: 2020-06-02 18:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-02 18:50:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
DC Donut Color (89.36 KB, image/png)
2020-05-12 09:13 UTC, Yadan Pei
no flags Details
Cluster Logging Details Color (272.72 KB, image/png)
2020-05-12 09:13 UTC, Yadan Pei
no flags Details

Description Yadan Pei 2020-05-12 09:12:53 UTC
Description of problem:
on Cluster Logging Details page we show donut with pods number, dark blue color represents notready pods and light blue color represents running pods, this is contrast from charts on other resources page, also current two colors are not easy to distinguish the difference, it's very close to each other

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-05-11-211039

How reproducible:
Always

Steps to Reproduce:
1. Deploy Cluster Logging 4.5.0
2. Create Cluster Logging instance
3. View Cluster Logging details info

Actual results:
3. it use style="fill: rgb(81, 157, 233)" for notready pods, style="fill: rgb(139, 193, 247)" for ready pods. On Deployment Config page, we use style="fill: rgb(0, 102, 204)" for running pods, style="fill: rgb(81, 157, 233)" for notready pods

Expected results:
3. 
1) We use exactly the same colors with donut on other resource pages, dark bluergb(0, 102, 204) for running pods,  light blue rgb(81, 157, 233) for notready pods 
2) We can use different colors on operand details page, but it's better we can user darker color for running pods then user can distinguish easily

Additional info:

Comment 1 Yadan Pei 2020-05-12 09:13:31 UTC
Created attachment 1687592 [details]
DC Donut Color

Comment 2 Yadan Pei 2020-05-12 09:13:59 UTC
Created attachment 1687593 [details]
Cluster Logging Details Color

Comment 4 Jon Jackson 2020-05-28 22:09:34 UTC
Started work on this between 4.5 blockers and found the source of the problem. Solution still in the works. Will circle back soon.

Comment 5 Jon Jackson 2020-06-02 16:17:28 UTC
Digging further into this, it seems like we will not be able to fully recreate the behavior of the PodStatus component used in DeploymentConfigs. Operator-defined resources using the podStatuses statusDescriptor do not have a deterministic set of statuses that can be mapped to specific colors. The closest we can get is to create a color scale that uses similar colors to the PodStatus component.

Comment 6 Jon Jackson 2020-06-02 18:50:48 UTC
(In reply to Jon Jackson from comment #5)
> Digging further into this, it seems like we will not be able to fully
> recreate the behavior of the PodStatus component used in DeploymentConfigs.
> Operator-defined resources using the podStatuses statusDescriptor do not
> have a deterministic set of statuses that can be mapped to specific colors.
> The closest we can get is to create a color scale that uses similar colors
> to the PodStatus component.

I'm going to close this as not a bug. The podStatuses descriptor component is working as expected and designed. We are already using the same blue scale that is used in the PodStatus component. We just have no way to associate specific colors to statuses in this component, since the statuses are arbitrary. 

I think the podStatuses descriptor just has a slightly misleading name. You could point this descriptor at any correctly formatted data and it would produce a donut chart. This means that the resulting component is 'ignorant' of the categories (i.e. 'pod statuses') it is rendering in the chart, and therefore cannot assign specific colors to specific categories. For example, the following would be perfectly valid and would produce a donut chart on the custom resource details page:


statusDescriptors:
  - displayName: This Is a Donut Chart
    description: I want to show some stuff as a donut chart on the details page.
    path: donutChartData
    x-descriptors:
      - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
---
status:
  donutChartData:
    category1:
      - item-1
      - item-2
      - item-3
    category2:
      - item-5
      - item-6
    category3:
      - item-7
    category4:
      - item-8


Note You need to log in before you can comment on or make changes to this bug.