GitLab Issues on Status Board

GitLab Issues on Status Board

Writen by: Petr|Date: 16.6.2014

iPad app Status Board by Panic lets you view different data on the screen (either directly on the iPad or on a monitor or television). It’s possible to use the base selection of panels, such as time, date, calendar, emails, weather, twitter and rss. Another option is to view your own data using three expansion panels: graph, chart and HTML. As a result, it is possible to show, for example: statistics of traffic on a Web, various server load graphs or active projects.

GitLab (see the Gitlab installation manual) enables communication via the API. Thanks to this, it is possible to extract data and view it as necessary. In this article I will show Issues on the Status Board.

Basic Requirements

  • Gitlab in version 6 or higher.
  • Status Board
  • Web Server (Hosting) with PHP 5.3.2 with cURL extension.
  • Composer

Installation

The core installation happens in three steps:

  1. Installation by Composer (composer install)
  2. Upload of files on a hosting (i.e. using an FTP client)
  3. Configuration

Configuration

After a successful installation, it is necessary to fill in the settings for the script. This is done by copying the file to gitlab.config.sample.php to gitlab.config.php.

In the copied file, you must fill out the URL to GitLab a user token (best one of an administrator or of someone who has access to all relevant projects on display). The token can be obtained from the profile in GitLab.

It is also possible to fill in names, update times, etc. Due to the limited size of the panel on the Status Board, there is the possibility of using a nickname for both users and projects. Both then serve as a filter – what is not mentioned, it does not appear. It is possible to display only relevant projects (mostly active) and relevant users.

In the settings it can be specified what type of graph is set as a default. There are two options:

  • Issues per users (ipu)
  • Issues per user and project (ipup)

It is then necessary to add the script as a URL to the new chart panel. URL might look like https://www.domena.cz/gitlab.php. Using the type parameter it is possible to set the type of graph (ipu or ipup) and using of a parameter save_json is possible to save a json file. In this case it is necessary to point to the generated file.

Options

Chart per user

When selecting ipu, an aggregate number of issues per User shows up (see below).

Issues per users

Issues per users

For the example see generated json file that Status Board processed into a graph.

Chart by user and project

When selecting ipup, an aggregate number of issues per User and per Project shows up (see below).

Issues per user and project

Issues per user and project

For the example see generated json file that Status Board processed into a graph.

Adding into the file

Unfortunately the script is quite challenging, especially in the case where there is a large number of repositories in GitLab. In this case you do not call this script every time a Status Board requests the current data, it is possible to store the resulting json file and then refer to that. The generation (storage) may then automatically take care Cron in an suitable interval.

Summary

Complete instructions are available on GitHubu. In case of a question, please use the comments section below.