Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced PF3 charts with PF4 #1048

Merged
merged 8 commits into from Sep 10, 2019
Merged

Replaced PF3 charts with PF4 #1048

merged 8 commits into from Sep 10, 2019

Conversation

bond95
Copy link
Contributor

@bond95 bond95 commented Jun 24, 2019

Fixes: #1031

Big screen
image

Small screen
image

@lwrigh
Copy link

lwrigh commented Jun 24, 2019

Was the font changed back to Overpass? Is the color of the chart a PatternFly standard?

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Travis CI is failing on yarn test
The standard ci build failed (initially) due to needing a pre-seed on ovirt-engine-nodejs-modules

@sjd78
Copy link
Member

sjd78 commented Jun 25, 2019

ci test please

@bond95
Copy link
Contributor Author

bond95 commented Jun 27, 2019

Was the font changed back to Overpass?

Good catch, I forgot to change font.

Is the color of the chart a PatternFly standard?

Yes, this is default color for Donut in Patternfly 4, but in History charts I changed color to be same as in Patternfly 3.

@bond95
Copy link
Contributor Author

bond95 commented Jun 27, 2019

ci test please

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

I have a VM that uses the qemu guest agent and it isn't reporting disk partitions. This results in an empty graph with the old charts. With the new charts, the CustomLabel errors out and the GlobalErrorBoundary kicks in:

Uncaught TypeError: number must be a number, an array of numbers or an object of numbers
    at round (round.js:21)
    at additionalLabel (DiskCharts.js:124)
    at CustomLabel (BarChart.js:7)
    at mountIndeterminateComponent (react-dom.development.js:13272)
    at beginWork (react-dom.development.js:13711)
    at performUnitOfWork (react-dom.development.js:15741)
    at workLoop (react-dom.development.js:15780)
    at HTMLUnknownElement.callCallback (react-dom.development.js:100)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
    at invokeGuardedCallback (react-dom.development.js:187)

error  The above error occurred in the <CustomLabel> component:
    in CustomLabel (created by BarChart)
    in g
    in VictoryBar (created by ChartBar)
    in ChartBar (created by BarChart)
    in g
    in VictoryStack (created by ChartStack)
    in ChartStack (created by BarChart)
    in svg (created by VictoryContainer)
    in div (created by VictoryContainer)
    in VictoryContainer
    in VictoryChart (created by Chart)
    in Chart (created by BarChart)
    in BarChart (created by DiskCharts)
    in div (created by DiskCharts)
    in div (created by CardBody)
    in CardBody (created by DiskCharts)
    in div (created by Card)
    in Card (created by UtilizationCard)
    in UtilizationCard (created by DiskCharts)
    in DiskCharts (created by UtilizationCard)

From what I can tell, the error happens because the DiskCharts component considers an empty diskDetails (VM.statistics.disk.usage === []). This is ugly but will work:

  const diskDetails = diskStats && diskStats.usage && diskStats.usage.datum && diskStats.usage.datum.length > 0 ? diskStats.usage.datum : false

I get the following error in the browser console when mousing over the history charts for Memory and Networking:

delaunator.js:80 Uncaught Error: No Delaunay triangulation exists for this input.
    at new Delaunator (delaunator.js:80)
    at new Delaunay (index.js:38)
    at Function.Delaunay.from (index.js:158)
    at Object.getVoronoiPoints (voronoi-helpers.js:151)
    at Object.onMouseMove (voronoi-helpers.js:279)
    at invokeFunc (debounce.js:95)
    at leadingEdge (debounce.js:105)
    at Object.debounced [as onMouseMove] (debounce.js:172)
    at Object.onMouseMove (victory-voronoi-container.js:352)
    at Object.onEvent (events.js:240)

@sjd78
Copy link
Member

sjd78 commented Jun 28, 2019

CI tests appear to be failing because with the package.json files updated, jest is now 24.8.0 and we're hitting this error: jestjs/jest#8426

/projects/sjd78-ovirt-web-ui > rm -rf node_modules                            
                      
/projects/sjd78-ovirt-web-ui > yarn install                                                         
yarn install v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > connected-react-router@4.3.0" has incorrect peer dependency "redux@^3.6.0".
warning "patternfly-react > table-resolver@3.3.0" has incorrect peer dependency "redux@>= 3.0.0 < 4.0.0".
warning " > babel-loader@7.1.4" has incorrect peer dependency "webpack@2 || 3 || 4".
warning " > eslint-loader@2.0.0" has incorrect peer dependency "webpack@>=2.0.0 <5.0.0".
[4/4] Building fresh packages...
Done in 10.28s.

/projects/sjd78-ovirt-web-ui > node_modules/.bin/jest --version                                     
24.8.0

So in package.json, under the jest section, the transform block needs to be fixed.

    "transform": {
      ".+\\.(jsx?)$": "<rootDir>/config/jest/transform.js"
    },

@bond95 bond95 force-pushed the charts-replace branch 2 times, most recently from 100953c to 054d68c Compare July 2, 2019 12:15
@bond95
Copy link
Contributor Author

bond95 commented Jul 2, 2019

ci build please

@sjd78
Copy link
Member

sjd78 commented Jul 2, 2019

ci test please

1 similar comment
@sjd78
Copy link
Member

sjd78 commented Jul 3, 2019

ci test please

@sjd78
Copy link
Member

sjd78 commented Jul 3, 2019

ci build please

Thought: When we have to update the nodejs-modules, it would also be good to update the spec.in file here to require >= the new pre-seed version. That can help cut down on bad builds that happen after the pre-seed patch on nodejs-modules is merged but before the final artifact build is done and distributed as appropriate...

@sjd78
Copy link
Member

sjd78 commented Jul 3, 2019

ci build please

sjd78
sjd78 previously requested changes Jul 3, 2019
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Tests and tooltips on the history charts are working well and without error.

From the last review, I filed #1055 with PR #1056.

As is, I think the sizing on the charts still needs some work as the labels are difficult to read:
ezgif com-gif-maker

@bond95 bond95 dismissed sjd78’s stale review July 9, 2019 12:56

Modified bar chart, updated version of react-charts, change size of donut charts

@bond95
Copy link
Contributor Author

bond95 commented Jul 9, 2019

@sjd78 @lwrigh Made DonutCharts a little bit bigger and BarChart more responsive for long file system names.
image

@bond95
Copy link
Contributor Author

bond95 commented Jul 9, 2019

Suggest to wait until they fix this issue patternfly/patternfly-react#2486 (in worth case I'll fix it), to be more flexible in title and subTitle sizes.

@bond95
Copy link
Contributor Author

bond95 commented Jul 9, 2019

Created PR to speed up fixing: patternfly/patternfly-react#2488

@bond95
Copy link
Contributor Author

bond95 commented Jul 10, 2019

Bug fix was released in version 4.4.17: patternfly/patternfly-react#2488 (comment) Current version in npm is 4.4.7.

@lwrigh
Copy link

lwrigh commented Jul 11, 2019

@sjd78 @lwrigh Made DonutCharts a little bit bigger and BarChart more responsive for long file system names.
image

Increasing the text inside of the charts looks good to me in comparison with the initial pass of it. The updated bar chart looks good to me as well.


const AreaChart = ({ data, labels, id }) => {
return (
<div id={id}>
Copy link
Contributor

Choose a reason for hiding this comment

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

@sjd78 suggested this to avoid tooltips being cut off outside of div

.area-container svg {
    overflow: visible !important ;
}

@bond95 bond95 dismissed thaorell’s stale review July 17, 2019 12:46

Made container overflow

@bond95
Copy link
Contributor Author

bond95 commented Jul 17, 2019

@lwrigh @sjd78 @thaorell Made title and subTitle bigger for DonutChart
image

@sjd78
Copy link
Member

sjd78 commented Jul 18, 2019

Note: https://gerrit.ovirt.org/#/c/101875/ for the standard ci ovirt-engine-nodejs-modules pre-seed is failing CI because jenkin cannot currently clone that repo. I'll check it again later. (@bond95, @sgratch)

As of this evening, the problem persists. I raised an issue with ovirt infra so hopefully it can get fixed soon and this PR can pass standard-ci.

@sjd78
Copy link
Member

sjd78 commented Jul 22, 2019

ci test please

@sjd78 sjd78 added the Flag: Needs QE needs testing by QE team before merging PR and closing issue label Jul 22, 2019
@sjd78
Copy link
Member

sjd78 commented Jul 22, 2019

@bond95 - Reviewed, pre-seed is all set, and builds properly now. You should be good to hand it off to QE now.

@bond95 bond95 added Status: ON_QA status ON_QA (currently being tested) and removed Flag: Needs QE needs testing by QE team before merging PR and closing issue labels Jul 23, 2019
@sjd78 sjd78 added this to the 1.5.z (ovirt 4.3.z) milestone Aug 6, 2019
@bond95
Copy link
Contributor Author

bond95 commented Aug 28, 2019

ci test please

@michalskrivanek
Copy link
Member

since you opened https://gerrit.ovirt.org/#/c/102906/ - you should update the requirement in ovirt-web-ui.spec

@sjd78
Copy link
Member

sjd78 commented Aug 28, 2019

ci test please

@bond95
Copy link
Contributor Author

bond95 commented Sep 5, 2019

ci test please

@isaranova
Copy link

LGTM

@bond95 bond95 merged commit e052308 into oVirt:master Sep 10, 2019
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
  - remove pre-seeds from 2018
  - pre-seed for:
    - ovirt-web-ui 2019-06-24 (oVirt/ovirt-web-ui#1048)
    - ovirt-web-ui 2019-06-25 (oVirt/ovirt-web-ui#1047)
    - ovirt-engine-ui-extensions (https://gerrit.ovirt.org/101012)

Change-Id: I360ef83f6e9ca8d7d2c7196b63644628bebd5d77
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
Pull Request: oVirt/ovirt-web-ui#1048

Change-Id: I2e89d0d668a32b7fee1ee5003a6d6d46a1cdfbff
Signed-off-by: Bohdan Iakymets <biakymet@redhat.com>
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
Pull Request: oVirt/ovirt-web-ui#1048

Change-Id: I38a4846b12d9df08af9eb6e20e70820993b77711
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
gerrit-ovirt-org pushed a commit to oVirt/ovirt-engine-nodejs-modules that referenced this pull request Nov 4, 2021
PR: oVirt/ovirt-web-ui#1048

Removed pre-seed for ui-extentions
Patch: https://gerrit.ovirt.org/#/c/103041/

Change-Id: I662b8edd455e6448ad6a878ff9d63597b272a810
Signed-off-by: Bohdan Iakymets <biakymet@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: ON_QA status ON_QA (currently being tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak in C3 charts when navigating on to and off of VM details
6 participants