Skip to end of banner
Go to start of banner

Part 3 - Creating the first component of the product manager dashboard

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 7 Next »

Overview

Next, let's build the the product manager dashboard.

We'll start with the first component of the product manager dashboard which contains a chart displaying the number of tasks team members have created.

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

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 - How do I use Recipes that use the Storage Format with the Confluence Source Editor?

 Source code
     <ac:structured-macro ac:macro-id="3f3161e3-9c4a-4bbe-bb17-4f177e3d8991" ac:name="chart" ac:schema-version="1">
  <ac:parameter ac:name="dataDisplay">after</ac:parameter>
  <ac:parameter ac:name="type">bar</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="f0907a97-f086-4fd4-a56c-84441de0387c" ac:name="report-table" ac:schema-version="1">
      <ac:parameter ac:name="injected">true</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="0f078eba-e0e2-438e-a86b-e510be82f114" ac:name="grouping-reporter" ac:schema-version="1">
          <ac:parameter ac:name="as">Assignee</ac:parameter>
          <ac:parameter ac:name="">Task>data:User</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="e1d78c94-2ec2-43cd-86a3-a96854f03087" ac:name="grouping-stats" ac:schema-version="1">
                <ac:parameter ac:name="as">AssigneeTasks</ac:parameter>
                <ac:parameter ac:name="">Task>size</ac:parameter>
              </ac:structured-macro>
            </p>
            <ac:structured-macro ac:macro-id="802b6cd8-0ec9-41d6-8dc4-fa9a95cc31d8" ac:name="expanding-reporter" ac:schema-version="1">
              <ac:parameter ac:name="as">Task</ac:parameter>
              <ac:parameter ac:name="">data:Task</ac:parameter>
              <ac:rich-text-body>
                <ac:structured-macro ac:macro-id="972328d1-8c83-4a46-843b-5b60caa0cc04" ac:name="local-reporter" ac:schema-version="1">
                  <ac:parameter ac:name="">page:children</ac:parameter>
                  <ac:rich-text-body>
                    <p>
                      <br/>
                    </p>
                  </ac:rich-text-body>
                </ac:structured-macro>
              </ac:rich-text-body>
            </ac:structured-macro>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="acdc39ff-74bb-4a41-9505-eb45f14ea54b" ac:name="report-column" ac:schema-version="1">
          <ac:parameter ac:name="injected">true</ac:parameter>
          <ac:parameter ac:name="title">Assignee</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="a9ef8cd5-f592-4679-9643-7c71c92d76ee" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="">Assignee</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="4d104604-e4cc-4e6e-a95c-25801b158f4f" ac:name="report-column" ac:schema-version="1">
          <ac:parameter ac:name="title">Number of Tasks</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="a4f515b2-eae1-4dd7-bd4e-136ed2c02440" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="">AssigneeTasks>stats:item count</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>

Steps

On a draft page

  1. Add a Chart macro.
    Set the Type to "bar" and dataDisplay to "after".

  2. Then create a Report Table macro inside the Chart macro.

  3. Within the Report Table macro, add a Grouping Reporter macro
    Set the Key and As parameters to "Task>data:User" and "Assignee" respectively. 

  4. Within the Grouping Reporter macro, add a Grouping Stats macro.
    Set the Key and As parameters to "Task>size" and "AssigneeTasks"  respectively.

  5. Still within the Grouping Reporter macro, create an Expanding Reporter macro.
    Set the Key and As parameters to "data:Task" and "Task" respectively.

  6. Within the Expanding Reporter macro, create a Local Reporter macro.
    Set the Key parameter to "page:children".

  7. Within the Report Table macro, add two Report Column macros.
    Set their Titles to "Assignee" and "Number of Tasks".

  8. In the "Assignee" Report Column macro, add a Report Info macro.
    Set the Key parameter to "Assignee"

  9. In the "Number of TasksReport Column macro, add a Report Info macro.
    Set the Key parameter to "AssigneeTasks>stats:item count".
    This is so we can get the value of the Scaffolding Description field.

Macro structure


  • No labels