Skip to main content
Skip table of contents

Part 2 - Creating the admin dashboard

Now we will create the admin dashboard, which will allow admin to have a detailed overview of all created tasks by team members.

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:


Click here for the source code...
CODE
    <ac:structured-macro ac:macro-id="c4f3574c-fc97-4542-a3ae-1f2da3b2efcb" 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="d13b3de0-03c7-4062-9e53-79bf4b0a710b" 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="7afd4ea1-eef3-4ec7-b441-a28bc40694ca" 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:structured-macro ac:macro-id="4d15cd00-5537-4e16-8e84-7ac6d9bf0671" 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="b8f896b0-0ce0-4d60-aba5-a8c2af00ad2b" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="">Task&gt;data:User</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="144ddd8d-b326-4071-b4e4-773b60c477d9" ac:name="report-column" ac:schema-version="1">
          <ac:parameter ac:name="title">Description</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="eab678f6-0a92-42e0-9715-12eb7eacb4ff" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="render">richtext</ac:parameter>
                <ac:parameter ac:name="">Task&gt;data:Description</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="3c63709b-334f-436e-b27e-f411dcebc414" ac:name="report-column" ac:schema-version="1">
          <ac:parameter ac:name="title">Due Date</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="c091ebb3-30b3-44f9-b066-a18e0ca1f40b" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="format">dd MMMM, yyyy</ac:parameter>
                <ac:parameter ac:name="">Task&gt;data:Due Date</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="c751c8ea-de06-41bb-a1d3-eb9a8d36a1d3" ac:name="report-column" ac:schema-version="1">
          <ac:parameter ac:name="title">Status</ac:parameter>
          <ac:rich-text-body>
            <p>
              <ac:structured-macro ac:macro-id="09bf8230-502c-4935-8998-2a0c634ab08b" ac:name="report-info" ac:schema-version="1">
                <ac:parameter ac:name="">Task&gt;data:Status</ac:parameter>
              </ac:structured-macro>
            </p>
          </ac:rich-text-body>
        </ac:structured-macro>
        <ac:structured-macro ac:macro-id="67a18664-776a-4320-9d1b-82a889b0a41e" ac:name="report-footer" ac:schema-version="1">
          <ac:rich-text-body>
            <table class="wrapped relative-table" style="width: 20.6701%;">
              <colgroup>
                <col style="width: 27.5482%;"/>
                <col style="width: 72.4518%;"/>
              </colgroup>
              <tbody>
                <tr>
                  <td class="highlight-red" colspan="2" data-highlight-colour="red" style="text-align: center;" title="Background colour : Red">
                    <p title="">Total Number of Tasks: </p>
                    <div class="content-wrapper" title="">
                      <p>
                        <ac:structured-macro ac:macro-id="4d430aff-a9d6-4053-b7c9-7401b6539883" ac:name="report-info" ac:schema-version="1">
                          <ac:parameter ac:name="">report:query&gt;size</ac:parameter>
                        </ac:structured-macro>
                      </p>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </ac:rich-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>

Steps

  1. Create a Report Table macro.

  2. Within the Report Table add an Expanding Reporter macro.
    Set its Key and As parameters to "data:Task" and "Task" respectively. 

  3. Within the Expanding Reporter, create a Local Reporter and set the Key parameter to "page:children"
    Add four Report Column macros and set their titles to "Assignee", "Task Description", "Due Date" and "Status" respectively for each cell.
    Then add a Report Footer macro.

  4. In the "Assignee" Report Column macro, add a Report Info macro.
    Set its Key parameter to "Task>data:User" .
    This is so we can get the value of the the Scaffolding User field.

  5. In the "Task DescriptionReport Column macro, add a Report Info macro and set the Key parameter to "Task>data:Description".
    This is so we can get the value of the Scaffolding Description field. 

  6. In the "Due DateReport Column macro, add a Report Info macro and set its Key parameter to "Task>data:Due Date".
    This is so we can get the value of the Scaffolding Due Date field. 

  7. In the "Status" Report Column macro, add a Report Info macro and set its Key parameter to "Task>data:Status".
    This is so we can get the value of the Scaffolding Status field.

  8. Finally, add a 1x1 table in the Report Footer macro, color it as desired. (Orange is used in this example).
    Write "Total Number of Tasks:", Add a Report Info macro and set the Key parameter to "Report:query>size".

Macro structure


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.