Skip to end of banner
Go to start of banner

Part 1 - Building a quick view panel

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

Let's build the first component of the Moderator Dashboard where a Confluence admin can immediately view recently updated or created pages.

Something that looks like this:

Step 1

  1. Create a section with 3 columns
  2. In the first column, create a panel.
  3. Then create a Report Block macro.
  4. Within the Report Block, create a Content Reporter macro and set the Types parameter to "page".
  5. Within the Content Reporter, create a Date Filter macro and set the Key to content:modification date.
  6. Now back within the Report Block, create a Report Header macro.
  7. Within the Report Header macro, create a Report Info macro and set the Key to report:query>collection:size.
  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 to content:title.

Step 2

  1. In the second column, create a panel.
  2. Then create a Report Block.
  3. Within the Report Block, create a Content Reporter and set the Types parameter to "page".
  4. Within the Content Reporter, create a Date Filter and set the Key to content:creation date.
  5. Now back within the Report Block, create a Report Header macro.
  6. Within the Report Header macro, create a Report Info macro and set the Key to report:query>collection:size.
  7. Back within the Report Block, create a Report Body macro.
  8. Within the Report Body macro, create a Hidden Data macro.
  9. Within the Hidden Data macro, create a Report Info macro and set the Key to content:title.

Step 3

  1. In the third column, create a panel.
  2. Then create a Report Block.
  3. Within the Report Block, create a Content Reporter and set the Types parameter to "comment".
  4. Within the Content Reporter, create a Date Filter and set the Key to content:modification date.
  5. Now back within the Report Block, create a Report Header macro.
  6. Within the Report Header macro, create a Report Info macro and set the Key to report:query>collection:size.
  7. Back within the Report Block, create a Report Body macro.
  8. Within the Report Body macro, create a Hidden Data macro.
  9. Within the Hidden Data macro, create a Report Info macro and set the Key to content:title.

Editor View

You should have an editor that looks like this:

Storage Format

Storage Format
<ac:layout>
  <ac:layout-section ac:type="three_equal">
    <ac:layout-cell>
      <ac:structured-macro ac:macro-id="8903159b-04da-4a00-8679-78dcf64293bc" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#36B37E</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);"> </span>
          </h2>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);">Edited in the last 24h</span>
          </h2>
          <ac:structured-macro ac:macro-id="5be23bb4-7f0f-4005-9f78-20b3c2f1c35b" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <ac:structured-macro ac:macro-id="94fcd368-faa5-441e-bff4-e1f2ada33ccf" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">page</ac:parameter>
                <ac:rich-text-body>
                  <h1>
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="cd8360c2-2657-49ff-a745-dffa7148a0f9" ac:name="date-filter" ac:schema-version="1">
                        <ac:parameter ac:name="minValue">-1m</ac:parameter>
                        <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                        <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                        <ac:parameter ac:name="">content:modification date</ac:parameter>
                      </ac:structured-macro> </span>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="aa9b7107-1cd0-4390-b0e1-469ff008b92b" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="f8c60628-4721-43cb-b69f-4fb83b026077" ac:name="report-info" ac:schema-version="1">
                        <ac:parameter ac:name="">report:query>collection:size</ac:parameter>
                      </ac:structured-macro> </span>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="15e0fc0d-a29d-4834-a139-867098df3329" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <ac:structured-macro ac:macro-id="e14931f4-f5f1-4415-aa69-e7d9d44a8833" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h1>
                        <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="3b421be3-11b8-456b-9e9d-c847f2635379" ac:name="report-info" ac:schema-version="1">
                            <ac:parameter ac:name="">content:title</ac:parameter>
                          </ac:structured-macro> </span>
                      </h1>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                </ac:rich-text-body>
              </ac:structured-macro>
            </ac:rich-text-body>
          </ac:structured-macro>
        </ac:rich-text-body>
      </ac:structured-macro>
    </ac:layout-cell>
    <ac:layout-cell>
      <ac:structured-macro ac:macro-id="126252d6-7180-46e1-a247-2577d56712bb" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#00B8D9</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);"> </span>
          </h2>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);">Created in the last 24h</span>
          </h2>
          <ac:structured-macro ac:macro-id="5ce2d14b-3234-4e66-8a0c-2ea0078cf45b" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <ac:structured-macro ac:macro-id="7c647e70-8cd8-4988-b43f-60767aa4791d" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">page</ac:parameter>
                <ac:rich-text-body>
                  <h2>
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="4c8cbade-6d82-4242-a745-9e5f7da1e9c1" ac:name="date-filter" ac:schema-version="1">
                        <ac:parameter ac:name="minValue">-1d</ac:parameter>
                        <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                        <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                        <ac:parameter ac:name="">content:creation date</ac:parameter>
                      </ac:structured-macro> </span>
                  </h2>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="b81d9955-cac0-48b2-b439-fdd12ebcaeb0" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="639aa3c0-cc0d-4a80-9ba7-01bb65e0f585" ac:name="report-info" ac:schema-version="1">
                        <ac:parameter ac:name="">report:query>collection:size</ac:parameter>
                      </ac:structured-macro> </span>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="7f12049d-f107-4f44-8c47-fff669a74a2c" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <ac:structured-macro ac:macro-id="b0804e24-822d-42d1-9753-4da4c1012ccf" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h2>
                        <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="7016e14d-9ffc-4c22-95a5-83c06ea0944b" ac:name="report-info" ac:schema-version="1">
                            <ac:parameter ac:name="">content:title</ac:parameter>
                          </ac:structured-macro> </span>
                      </h2>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                </ac:rich-text-body>
              </ac:structured-macro>
            </ac:rich-text-body>
          </ac:structured-macro>
        </ac:rich-text-body>
      </ac:structured-macro>
    </ac:layout-cell>
    <ac:layout-cell>
      <ac:structured-macro ac:macro-id="1a6a2ca1-fa36-4c2c-8045-5b73f36d45e6" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#FFAB00</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);"> </span>
          </h2>
          <h2 style="text-align: center;">
            <span style="color: rgb(51,51,51);">Comments in the last 24h</span>
          </h2>
          <ac:structured-macro ac:macro-id="4e06cbbe-f21e-42bc-befb-195f0aadc88e" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <ac:structured-macro ac:macro-id="e5fe9946-b959-4a08-b70f-a00335d18eae" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">comment</ac:parameter>
                <ac:rich-text-body>
                  <h1>
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="30a72078-8b90-4a99-9501-01dc6a1ac1ad" ac:name="date-filter" ac:schema-version="1">
                        <ac:parameter ac:name="minValue">-3m</ac:parameter>
                        <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                        <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                        <ac:parameter ac:name="">content:modification date</ac:parameter>
                      </ac:structured-macro> </span>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="c56f33fc-1e92-478c-8a10-c205f2978ee2" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="4f74f1ff-290d-488c-a9e3-a3e63d04a6e8" ac:name="report-info" ac:schema-version="1">
                        <ac:parameter ac:name="">report:query>collection:size</ac:parameter>
                      </ac:structured-macro> </span>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <ac:structured-macro ac:macro-id="70cc4bf3-4769-47ec-8208-424c7c36e2a0" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <ac:structured-macro ac:macro-id="ae43ac7f-004b-4b1f-99ec-cc9248533f78" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h1>
                        <span style="color: rgb(51,51,51);"> <ac:structured-macro ac:macro-id="1471bd79-228d-47ae-810b-33b3899bd126" ac:name="report-info" ac:schema-version="1">
                            <ac:parameter ac:name="">content:title</ac:parameter>
                          </ac:structured-macro> </span>
                      </h1>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                </ac:rich-text-body>
              </ac:structured-macro>
            </ac:rich-text-body>
          </ac:structured-macro>
        </ac:rich-text-body>
      </ac:structured-macro>
    </ac:layout-cell>
  </ac:layout-section>
</ac:layout>


  • No labels