Merge "[BUGFIX] Add missing "strExclusionSet" element when using "exclusionValues""

This commit is contained in:
Jenkins 2015-10-27 22:47:30 +00:00 committed by Gerrit Code Review
commit 4905458c69
3 changed files with 59 additions and 0 deletions

View File

@ -3420,6 +3420,9 @@ def plot(parser, xml_parent, data):
.. literalinclude:: /../../tests/publishers/fixtures/plot004.yaml
:language: yaml
.. literalinclude:: /../../tests/publishers/fixtures/plot005.yaml
:language: yaml
"""
top = XML.SubElement(xml_parent, 'hudson.plugins.plot.PlotPublisher')
plots = XML.SubElement(top, 'plots')
@ -3462,6 +3465,12 @@ def plot(parser, xml_parent, data):
inclusion_dict.get(inclusion_flag)
XML.SubElement(subserie, 'exclusionValues').text = \
serie.get('exclude', '')
if serie.get('exclude', ''):
exclude_strings = serie.get('exclude', '').split(',')
exclusionset = XML.SubElement(subserie, 'strExclusionSet')
for exclude_string in exclude_strings:
XML.SubElement(exclusionset, 'string').text = \
exclude_string
XML.SubElement(subserie, 'url').text = serie.get('url', '')
XML.SubElement(subserie, 'displayTableFlag').text = \
str(plot.get('display-table', False)).lower()

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<publishers>
<hudson.plugins.plot.PlotPublisher>
<plots>
<hudson.plugins.plot.Plot>
<title>Sample graph</title>
<yaxis/>
<csvFileName>persisted.csv</csvFileName>
<series>
<hudson.plugins.plot.CSVSeries>
<file>data.csv</file>
<inclusionFlag>INCLUDE_BY_STRING</inclusionFlag>
<exclusionValues>Column 1,Column 2,Column 3</exclusionValues>
<strExclusionSet>
<string>Column 1</string>
<string>Column 2</string>
<string>Column 3</string>
</strExclusionSet>
<url/>
<displayTableFlag>false</displayTableFlag>
<fileType>csv</fileType>
</hudson.plugins.plot.CSVSeries>
</series>
<group>bench</group>
<useDescr>false</useDescr>
<exclZero>false</exclZero>
<logarithmic>false</logarithmic>
<keepRecords>false</keepRecords>
<numBuilds/>
<style>line</style>
</hudson.plugins.plot.Plot>
</plots>
</hudson.plugins.plot.PlotPublisher>
</publishers>
</project>

View File

@ -0,0 +1,14 @@
publishers:
- plot:
- title: 'Sample graph'
yaxis: ''
csv-file-name: 'persisted.csv'
group: 'bench'
numbuilds: '1'
style: 'line'
use-description: false
series:
- file: 'data.csv'
format: 'csv'
inclusion-flag: 'include-by-string'
exclude: 'Column 1,Column 2,Column 3'