Part 3 - Building the Admin dashboard

In this section, we will build a dashboard for the Admin.

The first step will be building an information panel which displays recently created surveys and second step will be adding a pie chart that will display the result of the surveys.

Source code

The following source code is shared using Confluence Storage Format, the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article:

⚙️ Expand

Step 1

Let's build the first component of the Admin dashboard where a Confluence admin can immediately view recently created surveys.

Something that looks like this:

  1. Add a Show If macro and set the group parameter to "confluence-administrators" or set the user parameter to specific admin account as you preferred.

  2. Create a panel. Insert text "Surveys created in the last 24h" within this panel.
    We're going to retrieve survey count that is created within 24 hours.

  3. Then create a Report Block macro.

  4. Within the Report Block macro, create a Local Reporter macro and set the Key parameter to "page:children".

  5. Within the Local Reporter macro, create a Date Filter macro.
    Set the Key parameter to "content:creation date" and Minimum Value parameter to "-1d".

  6. Now back within the Report Block, create a Report Header macro.

  7. Within the Report Header macro, create a Report Info macro.
    Set the Key parameter to "report:query>collection:size".
    Add text "Surveys" next to this macro.

  8. Back within the Report Block, create a Report Body macro.

  9. Within the Report Body macro, create a Hidden Data macro.

  10. Within the Hidden Data macro, create a Report Info macro and set the Key parameter to "content:title".

  11. Extra: After Report Body macro, add Report Empty macro and insert text "0 Surveys" within this macro.
    When there is no survey created, the report will display message "0 Surveys".

Step 2

Now let's add a pie chart showing the result of surveys.

By the end of this section you will have something that looks like this:


  1. Add a Chart from Table macro and set aggregation to "Rating".

  2. Then create a Report Table macro.

  3. Within the Report Table macro, create a Local Reporter macro and set the Key parameter to "page:children".

  4. Now within the Report Table macro, create two Report Column macros.

  5. Within the first Report Column macro set the title as "Rating".
    Add a Report Info macro and set the Key parameter to "data:rate".

  6. Within the second Report Column macro set the title as "Suggestions".
    Add a Report Info macro and set the Key parameter to "data:comment".

Macro structure


add NEXT: Building the Quality Assurance team dashboard