Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Filters

The Filters service is the default Sonar homepage when accessing a Sonar web server. The goal of this service is to answer to a maximum number of questions without any need to drilldown to secondary pages. Here are the common use cases covered by this service :

  • List my favourite projects 
  • List the worst projects from the desired perspectives : technical debt, code coverage, duplications, ...
  • List the modules of a project
  • List the most complex files
  • List the most longest unit test files
  • ...

From there, you can click on any resource to drilldown to this resource.

"My favourites" tab

This tab is displayed only when a user is logged into Sonar and list all resources, whatever they are projects, modules, packages or files, that have been flagged as favourite by the user :

A resource can be flagged as favourite by simply clicking on a star icon available in the "Dashboard" and "Components" pages :

"Projects" tab

This tab is available and displayed by default for all Sonar users on any new Sonar instance. As expected, this page displays all available projects. This table as any other tables can be sorted by clicking on a column header.

Creating a new filter

Creating a filter requires to be logged in and then to click on the "Add filter" button :

A creation filter form can then be filled :

Here the list of available fields :

Field name

Description

Mandatory

Advanced

Name

Name of the filter.

(tick)

 

Shared

This option is only available for user with global admin role. Those administrators can share some filters with all Sonar users .

 

 

Path

Filter mechanism to display only resources sharing a root path.

 

 

Type

Filter mechanism to display only resources having a given type.

 

 

Criteria

Filter mechanism to display only resources whose a given measure is greater than or less than a threshold. Three criteria can be defined.

 

 

Language

Filter mechanism to display only resources from a given language

 

(tick)

Favourites only

Filter mechanism to display only favourites

 

(tick)

Resource key like

Filter mechanism to display only resources whose key matches a given pattern

 

(tick)

Resource name like

Filter mechanism to display only resources whose name matches a given pattern

 

(tick)

Build date

Filter mechanism to display only resources according to their last build date

 

(tick)

Once a filter has been defined, two actions are available :

  • "Save & Close" : to save the current filter and come back to the "view" mode
  • "Save & Display" : to save the current filter, stay in the "edit" mode, customize the "Display" and start seeing the filter result.

Editing a filter

Once a filter has been created, it can be edited at anytime by clicking on the "Edit filter" button :

Managing filters

Once several filters has been created, the need can appears to be able

  • To order those filters in the Sonar web interface,
  • To quickly delete or edit some of them
  • To follow/unfollow some shared filters

Those features are available by clicking on the "Manage filters" button :

Managing default filters

Once logged in, a user can fully customize his filters but an administrator can also fully customize the default filters available for new Sonar users or for anonymous users. The "Default filters" service allows to do such things :

  • No labels