Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleTable of Contents
Table of Contents
maxLevel2

Dashboards provide a way to display any kind of data through widgets at different levels:

Overview

Concepts and mechanisms describe below apply for both global and project dashboards.

Creating Dashboard

Logged users can create as many dashboards as they need.

Image Removed

Click on Manage dashboards and fill the form to create a new dashboard:

Image Removed

The newly created dashboard will appear immediately in the left navigation bar and and can be customised by adding widgets.

When administrators create a dashboard, they have the ability to share it. This means that this dashboard can be followed by authenticated users and can also be used as a default dashboard. This is done by ticking Shared:

Image Removed

Customizing Dashboard

The content of a dashboard can be fully customized.

Changing Layout

To change the layout of a dashboard (e.g. three columns instead of two), click on Configure widgets and then pick a layout on the right hand side:

Image Removed

Adding a Widget

To add a widget, click on Configure widgets. The list of available widgets is shown at the top of the page. Click on Add widget to add the desired widget:

Image Removed

Customizing a Widget

Some widgets can be customized. To change their properties, click on Edit on the desired widget:

Image Removed

Moving a Widget

To move a widget within a dashboard, click on Configure widgets, then drag & drop the widget:

Image Removed

Removing a Widget

To remove a widget, click on Configure widgets and then click on Delete:

Image Removed

Managing Dashboards

Click on Manage dashboards to manage available dashboards:

Image Removed

From there you can:

  1. Follow / Unfollow a shared dashboard
  2. Change the order of the dashboards in the left navigation bar
  3. Delete a dashboard
  4. Configure widgets

Managing Default Dashboards

An administrator can customise the list and the content of the default dashboards. The default dashboards are the ones presented to unauthenticated users as well as authenticated users that have not done any customization. This is done by logging in, go to Configuration > Default dashboards and then select default dashboards to display and their order,

Image Removed

...

Project Dashboards

...

Each box on this page is called a widget. Any widget can be added to a project dashboard. Thus, any kinds of information from a project or from the SonarQube instance can be displayed at will, although project dashboards typically contain only project widgets.

Project dashboards are the entry point when looking at a project. They display an overview of the project data: measures, violationsissues, reviews, etc.

Dashboard: Default Project Dashboard Shipped with Sonar

This default dashboard The Default Dashboard gives an overview of your projects project (with widgets like Size, etc.) and its quality (with widgets like Violations, Comments & Issues and Technical Debt, Duplications, etc.).

From The metrics in each widget click through to some sort of drilldown.  From there, you will be able to to hunt for the 7 quality flowsDevelopers' Seven Deadly Sins:

Duplications

Image RemovedImage Added

See See Duplications for  for detailed explanation on this quality flowflaw.

Bad

distribution

Distribution of

complexity

Complexity

See See Bad Distribution of Complexity for detailed explanation on this quality flowflaw.

Spaghetti

design

Design

See See Spaghetti Design for detailed explanation on this quality flowflaw.

Lack of

unit tests

Unit Tests

See Lack of Unit Tests for detailed explanation on this quality flow.

No coding standards

Coding Standards and Potential

bugs

Bugs

Image RemovedImage Added

See No Coding Standards Breach for detailed explanation on this quality flowflaw.

See Bugs and Potential Bugs for detailed explanation on this quality flowflaw.

Not

enough or too many commentsImage Removed

Enough or Too Many Comments

Image Added

See Not Enough or Too Many Comments for detailed explanation on this quality flowflaw.

 

Clicking on any measure opens the the Measures Drilldown, zooming on the chosen chosen measure.

All the widget widgets above are compatible with with differential views to  to help you focus on quality flows on new code.

Many other widgets are available out of the box, just just give them a try. Even more are available through through plugins.

Events

The Events widget is used to highlight events occurring during the lifetime of the project. There are two kinds of events:

  • Manual: it  it is possible to add manual events. See Events for more details.
  • Automated: a  a mechanism exists in Sonar to pick automatically events and record them. This is the case for version events (picked when the version changes in the pom.xml) and for alert events that are triggered when a threshold has been reachedquality profile and a quality gate status change.

Treemap

The Treemap is a generic component that adapts depending on the structure of the project: modules, packages and files. 

It shows the components that are at the top level, regardless of the type. It is then possible to drill down into any component to get a view on the component.

Three actions are available in the treemap:

  1. Click on a component name to access the component dashboard
  2. Left click on a box to zoom in a component
  3. Right click on a box to zoom out of a component 

Hunting Services

Measures Drilldown

Wherever in a project, it is always possible to access the Measures Drilldown by clicking on a measure:

Image Removed
The component structure is displayed: hierarchy is represented from left (higher) to right (lower).

Components are sorted in a descending way, worst measure for the metric first.

An optimisation mechanism is in place whereby Sonar does not display components with best value for the metric.

By clicking on a file, you will access the Resource Viewer.

Violations Drilldown

Wherever in a project, it is always possible to access the Violations Drilldown through the left menu:
Image Removed

The component structure is displayed: hierarchy is represented from left (higher) to right (lower).

Components are sorted in a descending way, the one with the most violations first.

An optimisation mechanism is in place whereby Sonar does not display components with no violations.

The Violations drilldown is compatible with the differential views mechanism.

By clicking on a file, you will access the Resource Viewer. Anchordashboardcloudsdashboardclouds

Clouds

Wherever in a project, it is always possible to access the Clouds through the left menu:

Image Removed

On the Top risk tab, the size represents the average complexy by method in the file.

On the Quick wins tab: the size represents the lines of code in the file.

Regarding the color, blue indicates good quality according to Coverage or Rules compliance (depending the selected value in the drop down list), red indicates bad quality.

By clicking on a file, you will access the Resource Viewer.

Components

Wherever in a project, it is always possible to access the Components dashboard through the left menu.

From there you can access the dashboard of a specific component. You will get the same information as for the project but in the scope of the sub-component.

Image Removed

Anchorglobaldashboardglobaldashboard

Global Dashboards

Overview

Global dashboards are available at instance level and can be accessed through the menu on the left. One of those global dashboards is set as your home page.

Any widget can be added to a global dashboard. Thus, any kinds of information from a project or from the Sonar instance can be displayed at will.

Global Dashboards Shipped with Sonar

By default, Sonar is shipped with two global dashboards:

Projects

This dashboard includes one filter that lists all the projects of the Sonar instance:

Image Removed

Treemap

This dashboard includes one filter that displays all the projects of the Sonar instance as a Treemap (size = number of lines, color = rules compliance):

Image Removed