DEV Community

Cover image for Creating a release info dashboard
Roman Sery
Roman Sery

Posted on • Originally published at


Creating a release info dashboard

Hopefully, you are in the position of having an online software product/website with multiple clients. The problem you run into when deploying to multiple clients and environments is keeping track of which release is where. Let’s also assume that you have testing, stage, and production environments for each client; that quickly becomes a headache.

In this post, we look at how to create a simple dashboard for displaying this info. There are three basic steps:

  1. Use the git-commit-id-plugin maven plugin in your project to output the brach and commit information to a file.
  2. Create an HTTP endpoint for retrieving the deployed branch.
  3. Create a page that will invoke these endpoints and display them in a table.

Creating git properties

The first step is to make our project create a file with the git repository info at build time. To accomplish this, we will use the git-commit-id-plugin plugin. Let’s add the plugin in our pom.xml file:


When we do a maven build, a file named will be created that will have all of the information about the branch, build, and last commit info.

Creating the endpoint

The next step is to expose an HTTP endpoint in our application that will use to return the current git branch. We will use Wicket-rest annotations which is a great library for creating REST endpoints.

public class VersionDetailsEndpoints extends AbstractRestResource<JsonWebSerialDeserial> {
    public VersionDetailsEndpoints() {
        super(new JsonWebSerialDeserial(new JacksonObjectSerialDeserial()));
    @MethodMapping(value = "/")
    public String details() {
        getCurrentWebResponse().addHeader("Access-Control-Allow-Origin", "*");
        return ApplicationDetailsService.getBranch();

ApplicationDetailsService is a simple utility class that reads and parses the generated file from our maven build process. We also set the CORS header to allow invoking this endpoint using Javascript from a different domain as will be necessary for the last step.

We register it in our WebApplication init() method by mounting a resource:

mountResource("/releaseinfo", new ResourceReference("/releaseinfo") {            
    VersionDetailsEndpoints versionDetailsEndpoints = new VersionDetailsEndpoints();
    public IResource getResource() {
    return versionDetailsEndpoints;

Creating the dashboard

Now the fun part! We will use the Javascript fetch API to iterate a map of clients and URL’s, invoking the /releaseinfo endpoint for each and populate a table with the results. The below code will go into the HEAD section of our HTML page:

let urlMap = {};
urlMap["ABC Corp"] = ["", "", ""];
urlMap["Oracle"] = ["", "", ""];
urlMap["Microsoft"] = ["", "", ""];

const clients = Object.keys(urlMap);

$(document).ready(function() {
  clients.forEach(function(client) {
    const clientId = client.replace(/ /g, "_");

    $("#releasesTable").append('<tr id="' + clientId + '"><td>' + client + "</td><td></td><td></td><td></td><td></td></tr>");

    urlMap[client].forEach(function(url, index) {
      if (url.length == 0) {
      const tdNum = index + 2;
      const fullUrl = "http://" + url + "/releaseinfo";
        .then(response => {
          $("#" + clientId + " td:nth-child(" + tdNum + ")").html(response);
        .catch(e => {
          $("#" + clientId + " td:nth-child(" + tdNum + ")").html("ERR");
          $("#" + clientId + " td:nth-child(" + tdNum + ")").addClass("text-danger");

async function getReleaseBranch(url) {
  let response = await fetch(url, { cache: "no-store" });
  return await response.json();

We need to make sure that the fetch call does not hit the browser cache which is done by passing the “no-store” argument. If we fail to get a response from the endpoint we highlight that in the table as an error.

You can also add other useful info to this dashboard such as database connectivity, the status of some ‘health’ check, number of active users; use your imagination!

The full dashboard code along with the HTML can be found on Github.

Top comments (0)