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:
Reads the
routesdefinitions to create menu items.Finds the
canvases, along with their controls, and thedatasets.Dynamically builds the user interface.
See THE DASHBOARD APP section below for detailed discussion.
Last updated