[JIRA] (JENKINS-56594) Warnings trend graph has no y-axis legend

0 views
Skip to first unread message

david.aldrich@emea.nec.com (JIRA)

unread,
Mar 18, 2019, 9:42:02 AM3/18/19
to jenkinsc...@googlegroups.com
David Aldrich created an issue
 
Jenkins / Bug JENKINS-56594
Warnings trend graph has no y-axis legend
Issue Type: Bug Bug
Assignee: Ulli Hafner
Attachments: image-2019-03-18-09-41-33-293.png
Components: warnings-ng-plugin
Created: 2019-03-18 09:41
Environment: Warnings NG plugin 4.0.0
Jenkins 2.164.1
Priority: Minor Minor
Reporter: David Aldrich

When the warnings count is successively zero, no y-axis legend is shown on the trend graph.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 18, 2019, 10:58:01 AM3/18/19
to jenkinsc...@googlegroups.com
Ulli Hafner commented on Bug JENKINS-56594
 
Re: Warnings trend graph has no y-axis legend

What is your expected visualization? An arbitrary range 1-10, or not chart at all?

david.aldrich@emea.nec.com (JIRA)

unread,
Mar 18, 2019, 11:02:03 AM3/18/19
to jenkinsc...@googlegroups.com

I suggest a minimum range of 1. So the y-axis would show ticks '0' and '1' as a minimum.

reitzmichnicht@gmx.de (JIRA)

unread,
Mar 21, 2019, 3:19:02 PM3/21/19
to jenkinsc...@googlegroups.com
Michael D updated an issue
 
Change By: Michael D
Attachment: warnings-ng-y-scale.png

reitzmichnicht@gmx.de (JIRA)

unread,
Mar 21, 2019, 3:20:02 PM3/21/19
to jenkinsc...@googlegroups.com
Michael D commented on Bug JENKINS-56594
 
Re: Warnings trend graph has no y-axis legend

Same if only one issue is found, 0.4 errors does not make sense. The old warnings plugin had only 0 and 1, nothing between.

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 21, 2019, 3:39:02 PM3/21/19
to jenkinsc...@googlegroups.com

Yes, the new EChart JS lib that I am using seems to provide no integer based axis yet. We need to ask on their mailing list if and how that is possible.

ullrich.hafner@gmail.com (JIRA)

unread,
Sep 20, 2019, 6:13:02 PM9/20/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
 
Change By: Ulli Hafner
Labels: newbie-friendly
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

unread,
Oct 1, 2019, 9:17:03 AM10/1/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
Change By: Ulli Hafner
Attachment: Bildschirmfoto 2019-10-01 um 11.15.53.png

ullrich.hafner@gmail.com (JIRA)

unread,
Oct 1, 2019, 9:18:02 AM10/1/19
to jenkinsc...@googlegroups.com
 
Re: Warnings trend graph has no y-axis legend

Maybe it would make sense to hide the chart if there are no warnings and show the same screen as in the details:

ullrich.hafner@gmail.com (JIRA)

unread,
Oct 1, 2019, 9:18:03 AM10/1/19
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56594
Maybe it would make sense to hide the chart if there are no warnings and show the same screen as in the details:   

  !Bildschirmfoto 2019-10-01 um 11.15.53.png|thumbnail!

wlodkowc@dickinson.edu (JIRA)

unread,
Jan 31, 2020, 7:40:03 PM1/31/20
to jenkinsc...@googlegroups.com
Colin Wlodkowski assigned an issue to Colin Wlodkowski
 
Change By: Colin Wlodkowski
Assignee: Ulli Hafner Colin Wlodkowski

wlodkowc@dickinson.edu (JIRA)

unread,
Feb 20, 2020, 6:57:03 PM2/20/20
to jenkinsc...@googlegroups.com
Colin Wlodkowski commented on Bug JENKINS-56594
 
Re: Warnings trend graph has no y-axis legend

I recently reached out to the EChart mailing list to see if it is possible to provide an integer based axis, however, have yet to receive a response. In the meantime, does anyone have any documentation on how the EChart JS lib is being used to display graphs within the plugin or where in the source code the graph is being displayed to the UI? Im rather new and would like to try and create a POC for hiding the chart and showing the no issues screen when there are no warnings so I'll take any help I can get, thanks!

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 20, 2020, 8:55:03 PM2/20/20
to jenkinsc...@googlegroups.com

I think it would make sense to show a different screen should be one layer up and not in the chart code. So the UI should simply have an if-else. This could be done similar to the other UI view: https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/IssuesDetail/index.jelly#L23.

The code for the trend is located in https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/JobAction/floatingBox.jelly. So you need to have the if-else here and show the trend or something else. The if needs to test an boolean property of ${from} which is the instance of the https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java Here we should have a method in the style of https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java#L201 that iterates over all the results and checks if the number of warnings = 0. 

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 20, 2020, 8:57:05 PM2/20/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56594
I think it would make sense to move the decision of what to show a different screen should be one layer up and not in the chart code. So the UI should simply have an {{if-else}}. This could be done similar to the other UI view: [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/IssuesDetail/index.jelly#L23.]


The code for the trend is located in [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/JobAction/floatingBox.jelly.] So you need to have the {{if-else}} here and show the trend or something else. The {{if}} needs to test an boolean property of {{$\{from}}} which is the instance of the [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java] Here we should have a method in the style of [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java#L201] that iterates over all the results and checks if the number of warnings = 0. 

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 20, 2020, 8:58:03 PM2/20/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56594
I think it would make sense to move the decision of what to show one layer up and not in the chart code. So the UI should simply have an {{if-else}}. This could be done similar to the other UI view: [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/IssuesDetail/index.jelly#L23 . ]


The code for the trend is located in [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/JobAction/floatingBox.jelly.] So you need to have the {{if-else}} here and show the trend or something else. The {{if}} needs to test an boolean property of {{$\{from}}} which is the instance of the [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java] Here we should have a method in the style of [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java#L201] that iterates over all the results and checks if the number of warnings = 0. 

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 20, 2020, 8:58:04 PM2/20/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56594
I think it would make sense to move the decision of what to show one layer up and not in the chart code. So the UI should simply have an {{if-else}}. This could be done similar to the other UI view: [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/IssuesDetail/index.jelly#L23] .


The code for the trend is located in [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/resources/io/jenkins/plugins/analysis/core/model/JobAction/floatingBox.jelly
. ] .  So you need to have the {{if-else}} here and show the trend or something else. The {{if}} needs to test an boolean property of {{$\{from}}} which is the instance of the [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java] Here we should have a method in the style of [https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/core/model/JobAction.java#L201] that iterates over all the results and checks if the number of warnings = 0. 

chig@dickinson.edu (JIRA)

unread,
Feb 21, 2020, 7:13:03 PM2/21/20
to jenkinsc...@googlegroups.com
Allan C updated an issue
 
Change By: Allan C
Attachment: image-2020-02-21-14-12-22-279.png

chig@dickinson.edu (JIRA)

unread,
Feb 21, 2020, 7:13:04 PM2/21/20
to jenkinsc...@googlegroups.com
Allan C commented on Bug JENKINS-56594
 
Re: Warnings trend graph has no y-axis legend

Replicated this bug successfully on Jenkins 2.204.2, with a simple freestyle sample (execute shell).

chig@dickinson.edu (JIRA)

unread,
Apr 4, 2020, 7:52:02 PM4/4/20
to jenkinsc...@googlegroups.com
Allan C commented on Bug JENKINS-56594

Ulli Hafner Hi Ulli. Hope you are safe and sound. Colin Wlodkowski and I haven't been working on this remotely. We created a boolean method in JobAction class to iterate through all previous results, and check if the number of warnings is 0. Now we are trying to test this new method. 

We found JobActionITest.java but it does not seem to be a proper test class for us. Do you mind sharing some of your insights? Should we create our own test class, or is there one available that we are not aware of? If we do need to create a new test class, what is the simplest way to create a build result with different numbers of warnings and errors? Thank you and take care.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

unread,
Apr 6, 2020, 9:47:02 PM4/6/20
to jenkinsc...@googlegroups.com

This actually depends a little bit on your implementation. Can't you create a draft PR where we can discuss it directly in the source code?

I think the `JobAction` class still is missing a unit test (JENKINS-59619). So without seeing your code I think there are two ways to test the new method: use an integration test that creates some builds with 0 warnings - and another test case that has one build with > 0 warnings. You can reuse any of the integration tests that build a project with warning. Then you can check the boolean property. The other way would be to extract your code into a separate class that has as input a `BuildHistory` and as output a boolean. Then you can use a stub to simulate the build results.

ullrich.hafner@gmail.com (JIRA)

unread,
Apr 6, 2020, 9:48:03 PM4/6/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-56594

chig@dickinson.edu (JIRA)

unread,
Apr 7, 2020, 7:08:03 PM4/7/20
to jenkinsc...@googlegroups.com

chig@dickinson.edu (JIRA)

unread,
Apr 13, 2020, 2:48:03 AM4/13/20
to jenkinsc...@googlegroups.com
Allan C edited a comment on Bug JENKINS-56594
[~drulli] Hi Ulli. Hope you are safe and sound. [~wlodkowc] and I haven't have been working on this remotely. We created a boolean method in JobAction class to iterate through all previous results, and check if the number of warnings is 0. Now we are trying to test this new method. 


We found JobActionITest.java but it does not seem to be a proper test class for us. Do you mind sharing some of your insights? Should we create our own test class, or is there one available that we are not aware of? If we do need to create a new test class, what is the simplest way to create a build result with different numbers of warnings and errors? Thank you and take care.
Reply all
Reply to author
Forward
0 new messages