Custom chart using the buildtype-graphs tag?

Hi. I'm trying to set up a custom graph, but am having trouble getting this to work for a build configuration-level chart (via the buildtype-graphs XML node). I'm not seeing anything appearing in the statistics tab at all. However, if I try to do it for a project (via the project-graphs XML node), it does appear for that project.

To test, I created a simple setup using a brand new install of TeamCity 9 ...

I have a project called "Graph Test", which uses a build configuration called "MyBuildConf", which is based on a build configuration template called "MyBuildConfigTemplate".

Then if I make this file ...

C:\ProgramData\JetBrains\TeamCity\config\projects\GraphTest\pluginData\plugin-settings.xml

... look like this ...

<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <project-graphs>
    <graph title="My Test Graph" seriesTitle="Key" format="duration">
      <valueType key="key1" title="Metric 1" />
      <valueType key="key2" title="Metric 1" />
    </graph>
  </project-graphs>
</settings>

I can see the chart appear in this URL:

http://localhost:1234/project.html?projectId=GraphTest&tab=stats

However, if instead, I set the same file (or even the root version) to ...

<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <buildtype-graphs>
    <graph title="My Test Graph" seriesTitle="Key" format="duration">
      <valueType key="key1" title="Metric 1" />
      <valueType key="key2" title="Metric 1" />
    </graph>
  </buildtype-graphs>
</settings>


Then it doesn't appear in the build type. Ie. here:




http://localhost:1234/viewType.html?buildTypeId=GraphTest_MyBuildConfig&tab=buildTypeStatistics




Perhaps I'm misunderstanding how this works. Does anyone know what I'm doing wrong? How do I get a chart to appear using the buildtype-graphs tag?



Thanks for your help,
Dan


3 comments
Comment actions Permalink

Hi Dan,

There are both tag <buildtype-graphs> and </project-graphs> in your second example. It should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <buildtype-graphs>
    <graph title="My Test Graph" seriesTitle="Key" format="duration">
      <valueType key="key1" title="Metric 1" />
      <valueType key="key2" title="Metric 1" />
    </graph>
  </buildtype-graphs>
</settings>

0
Comment actions Permalink

Hi Alina,

Sorry, that was a typo in the post. The XML was correct (matching that in your post) when I tried it. My editor would have certainly barked about that one ;)

Thanks for spotting that - I'll update my post now.

Thanks,
Dan

0
Comment actions Permalink

Dan,

Do I correctly understand that build configuration custom chart still does not appear?  
Please try to create the same graph from TeamCity Web UI. Are you able to create it? If yes, then the related graph description will be added to plugin-setting.xml file.

0

Please sign in to leave a comment.