Skip to content

Conversation

@TheRealJon
Copy link
Member

@TheRealJon TheRealJon commented Apr 17, 2019

screencast-localhost-9000-2019 04 29-15-27-13

Replaces the Line chart component with Area component which uses pf-react ChartArea. Uses composition instead of inheritance to get Prometheus data. Old line chart implementation is still available as Line component.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2019
@TheRealJon TheRealJon requested review from rhamilto and spadgett April 17, 2019 20:23
@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 17, 2019
@spadgett spadgett added this to the v4.2 milestone Apr 18, 2019
@kyoto
Copy link
Member

kyoto commented Apr 19, 2019

Thanks @TheRealJon. This is looking really good.

Since we have now started using React Hooks (#1456), I'm thinking it probably makes sense use them here?

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 29, 2019
@TheRealJon TheRealJon changed the title [WIP] Replace plotly line chart with pf-react area chart Replace plotly line chart with pf-react area chart Apr 29, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 29, 2019
@TheRealJon
Copy link
Member Author

@spadgett I think this is ready for review now

@TheRealJon
Copy link
Member Author

/retest

@TheRealJon TheRealJon changed the base branch from master to master-next April 30, 2019 14:40
@TheRealJon TheRealJon force-pushed the console-1365 branch 2 times, most recently from 4a15a86 to 51cb9e9 Compare May 2, 2019 16:33
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 2, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 2, 2019
@TheRealJon
Copy link
Member Author

@spadgett I think this is ready for review. It will probably fail CI because of patternfly/patternfly-react#1898, but once that issue is fixed upstream this should be good to go. I have a PR open to fix the issue, so it shouldn't be long.

@TheRealJon
Copy link
Member Author

Found a bug with the chart titles. I removed the css that center aligned them, but that breaks the Status graph, and maybe some others. I'll make a modifier to left align just the area chart titles.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this 👍

@spadgett
Copy link
Member

spadgett commented May 6, 2019

@TheRealJon is this the patternfly/react-charts problem you mentioned?

ERROR in /go/src/github.com/openshift/console/frontend/node_modules/@patternfly/react-charts/dist/js/components/ChartLegend/ChartLegend.d.ts
(5,25): Type '[]' does not satisfy the constraint 'number | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | ... 29 more ... | "trimRight"'.
  Type '[]' is not assignable to type '"trimRight"'.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we just need to get the pf charts to compile

@TheRealJon
Copy link
Member Author

@TheRealJon is this the patternfly/react-charts problem you mentioned?

ERROR in /go/src/github.com/openshift/console/frontend/node_modules/@patternfly/react-charts/dist/js/components/ChartLegend/ChartLegend.d.ts
(5,25): Type '[]' does not satisfy the constraint 'number | "toString" | "valueOf" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | "split" | "substring" | ... 29 more ... | "trimRight"'.
  Type '[]' is not assignable to type '"trimRight"'.

Sorry, missed this comment, but yes, this was the typescript error we were seeing from pf react-charts

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spadgett, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 8, 2019
@openshift-merge-robot openshift-merge-robot merged commit d08fd2f into openshift:master-next May 8, 2019
@TheRealJon TheRealJon deleted the console-1365 branch June 26, 2019 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants