Resources¶
configurations/resources.js
The resources file contains all the possible resources for the front-end report pages. Each resource represents a Tastypie resource, and define how a resource will be retrieved, processed and displayed by the LayoutTableGraph component.
Required Properties¶
Property |
Description |
|---|---|
category |
This property defines which Tastypie resource group we will be requesting data from. For report pages the value will always be 'report'. The category also forms part of the request URL, e.g. dash.withcubed.com/api/report/... |
id |
The id must match the resource_name of the Tastypie resource. |
displayName |
The display name will appear on the report page in both the breadcrumb and the table dimension column:![]() The 'displayName' value in the report page breadcrumb ![]() The 'displayName' value in the table dimension column |
defaultDimensions |
This is the field that will appear in the report table dimension column by default, either when first navigating to a report page or when selecting a resource in the breadcrumb dropdown. |
dimensions |
These are the fields that are available as further break-down dimensions for the resource. |
defaultOrderBy |
This defines which field will be used to order by in the table columns by default: ![]() This resource's defaultOrderBy is set to 'Cubed Sales' (fm_sales) |
Optional Properties¶
Property |
Description |
|---|---|
ignoreRefererDimension |
You can use this workaround if you don't want your resource to persist the referer in your report, i.e. if set to 'true' it will not include "referer__name=" as part of your request params. |
isDate |
If set to 'true' the date param in your api request will be 'YYYY-MM-DD' format instead of ISO format. |
graphGroupByOverride |
This allows you to specify a field with which to override the graph group by. |
graphOrderByOverride |
This allows you to specify a field with which to override the graph order by. |
onlyYesterday |
If set to 'true', the date param in your api will request data from the previous day only. |
forceDefaultOrderBy |
If set to 'true', the report will use the specified 'order by' field of the current resource, rather than the previously viewed resource. |
forceDefaultOrderDir |
If set to 'true', the report will use the 'order direction' as specified in the order field of the current resource, rather than the previously viewed resource. |


