Dashboard - a way to visually present information in the database in the form of graphs, diagrams, maps and other understandable representations.
In the ozma.io dashboards areassembled in a "form" user view (@type = 'form'
) from other views:
Dashboard example:
Charts and diagrams are implemented using the functionality of iframes. If you are going to use charts in your dashboard, learn how to work with them in a separate article.
SELECT
@title = 'Dashboard',
@type = 'form',
-- Location and sizes of the blocks on the form
@block_sizes = [
4, 4, 4,
8, 4
],
{
ref: &analytics.deals_sources,
args: {
date_from: $$transaction_time - '1 week'::interval,
date_to: $$transaction_time
}
} as deals_sources @{
form_block = 0,
control = 'user_view'
},
-- ...
{
ref: &analytics.accounts_receivable,
args: {
date_from: $$transaction_time - '2 months'::interval,
date_to: $$transaction_time
}
} as accounts_receivable @{
form_block = 4,
control = 'user_view'
}
How to create a new dashboard:
@type = 'form'
@block_sizes
ref
) to each user view, arguments (args
). Set block (using form_block
) and control type - user view (control = 'user_view'
)