1.8.2 Structure of <dashboard:section>

Add the following section to the manifest (Product Management example). It defines two canvases, each showing an interactive table - one for products and the other for categories.

<dashboard:section xmlns:dashboard="https://blueprint.retailys.com/blueprint.xsd">

    <icon type="svg" source="/icon.svg"/>

    <routes>
        <route name="products" node="menu" canvas="productsList">
            <label>Products</label>
        </route>
        <route name="categories" node="menu" canvas="categoriesList">
            <label>Product Categories</label>
        </route>
    </routes>

    <canvases>
        <canvas name="productsList">
            <label>Product List</label>
            <controls>
                <tablegrid name="productsGrid" dataset="productsList" width="1/1">
                    <label>Product Table</label>
                </tablegrid>
            </controls>
        </canvas>
        <canvas name="categoriesList">
            <label>Product Categories</label>
            <controls>
                <tablegrid name="categoriesGrid" dataset="categoriesList" width="1/1">
                    <label>Category Table</label>
                </tablegrid>
            </controls>
        </canvas>
    </canvases>

    <datasets>
        <dataset name="productsList">
            <resources>
                <resource from="product" resourceType="entity" as="product"/>
            </resources>
            <record>
                <field name="name" resource="product.name"/>
                <field name="sku" resource="product.sku"/>
                <field name="weight" resource="product.weight"/>
                <field name="categories" resource="product.category.name"/>
            </record>
        </dataset>
        <dataset name="categoriesList">
            <resources>
                <resource from="category" resourceType="entity" as="category"/>
            </resources>
            <record>
                <field name="name" resource="category.name"/>
                <field name="parent" resource="category.parent.name"/>
                <field name="productCount" resource="count(category.product)"/>
            </record>
        </dataset>
    </datasets>

</dashboard:section>

Once the entire manifest is published and the application is registered with the manifest URL, the Dashboard portion (<dashboard:section>) is automatically detected. The Dashboard then:

  1. Reads the routes definitions to create menu items.

  2. Finds the canvases, along with their controls, and the datasets.

  3. Dynamically builds the user interface.

See THE DASHBOARD APP section below for detailed discussion.

Last updated