CLI reports framework overview

TeamForge CLI (command line interface) reporting framework lets you create reports from either the TeamForge database or datamart.

The CLI reporting framework is based on CLI and CLI server. The CLI reporting framework uses CLI to connect to the database. It also allows scheduling report generation by virtue of CLI Server. In TeamForge, Project Life Cycle Metric Charts are powered by CLI reporting framework.

See CLI and CLI-Server for more information.

Continue reading to know more about CLI-based reporting framework in CollabNet TeamForge and how to add new reports.

CLI reports installation folder structure

The default location of CLI reports in TeamForge is /opt/collabnet/teamforge/var/cliserver/app/reports. This location, hereinafter, is referred to as <cli-reports-installation-folder>.

The CLI reports folders include:
  • tools: The folder that holds all supporting scripts/web resources.
  • pkg: The parent folder for all CLI reports.
  • types: The parent folder for all chart types. Each sub-folder signifies a specific chart type.
  • tests: The folder that contains CLI scripts for testing.
tools folder

One of the main scripts in this folder is editComponent.ctf. This file is responsible for parsing the report configuration file and preparing the end HTML to show the configuration screen for that particular report. The editComponent.ctf is associated with a HTML file editComponent.html file. This HTML file holds the conditional static content and the Java script code required for final report configuration page. This folder also holds the supporting CLI scripts and required web resources such as CSS, JavaScript, etc.

pkg folder
Every immediate child folder represents a CLI report. It should contain the following files:
  • config.ini: This file holds the list of configuration widgets required for the particular report.
  • example.html: This is a static example chart that will be shown to the user while trying to add a new CLI report component to a TeamForge project home page. See An overview of life cycle metric charts for more information.
  • script: The 'script' file is responsible for preparing SQL queries based on the parameters configured for a given report. It contains the CLI/Perl code that dynamically prepares the final SQL query.
types folder
Every child folder represents a specific chart implementation. Type of the chart should be obvious by the folder name. Every child folder contains the following files:
  • Script: Holds the business logic, if any, to process the data returned from the database. Also, uses the associated template.html to prepare the final chart rendering HTML.
  • template.html: Holds the parameterized implementation in HTML and JavaScript for rendering the final report chart.
  • README: This is a readme file that elaborates the code in the other two files.
tests folder

This folder contains testing scripts.

Supported Chart Types

CLI reports use HighCharts as the rendering tool. As discussed earlier, all the supported chart types are placed under <cli-reports-installation-folder>/types folder. See "types" folder section for more information about files in a specific chart type folder.

List of reports

The following CLI-based reports are available until TeamForge 7.2:
  • Artifact Distribution Chart (Multiple Trackers)
  • Artifact Distribution Chart (Single Tracker)
  • Artifact Open/Close Chart (Multiple Trackers)
  • Agile Report - Burn Down Chart
  • Agile Report - Release Burn Up Chart
  • Average Age Report