This package brings a set of api tools as well as a new newspace to orion. orion.dashboard
. With this package you will be able to
This package is an extension of Orion and has a dependency on the orionjs:base
package along with others.
- Install the package
$ meteor add rwatts:orionjs-dashboard
- Register your widget by following Example 1 Below
Client
- Register access to the dashboard by setting
Options.set('showDashboard', true)
within your lib directory. If you have used the Example project from the Orion repository this will typically be in the lib/options.js file. - If using the default widget template follow the instructions in Example 1 Below
- Navigate to
/admin/dashboard/
to see your new widget.
- From the instructions above register a new widget
Client
. - In your widget declaration pass your template as the template key.
- Ensure that the values you want to display in your widget is passed in the registration as individual keys.
Note
orion.dashboard.registerWidget
must be passed as an object, and template is a required field. If you do not set the template, it will default to your themes default template.
For the best experience, if utilizing the default widgets, you will need to use tmeasday:publish-counts
to publish the total Count of a collections records. See their documentation for instructions on publishing the record counts.
A tutorial will be provided in the documentation demonstrating how to complete this task.
// Client
// Basic options passed to the default template
orion.dashboard.registerWidget({
template: 'default', // use default if you have not created a custom widget
count: Counts.get('somePublication'), // you must publish the counts from within the publication for them to be accessible from the widget.
baseColor: 'teal', // the base color of the widget
textColor: 'white', // sets the text color to white
label: 'Users', // sets the label of the widget
icon: 'books', // sets the icon for materialize use google's icon set for bootstrap use font awesome icons.
path: '/admin/users/' // sets the path the widget will navigate to upon clicking on it
});
The full API is available here.
- v0.1.1 next
- Write default widget for the
orionjs:bootstrap
theme.
- Write default widget for the