DashboardBase Class |
Namespace: Dynamicweb.Dashboards
The DashboardBase type exposes the following members.
Name | Description | |
---|---|---|
DashboardBase | Initializes a new instance of the DashboardBase class |
Name | Description | |
---|---|---|
Title |
Gets or sets the Dashboard title
| |
Widgets |
Gets or sets collection of widgets to show
|
Name | Description | |
---|---|---|
GetAllAvailableWidgets |
Gets widget types for the Dashboard
| |
GetDefault |
Gets default dashboard configuration
| |
Load(String, IDictionaryString, String) |
Loads the widgets to the Dashboard from database.
| |
Load(String, Boolean, IDictionaryString, String) | Obsolete.
Loads the widgets to the Dashboard from database.
| |
Save |
Saves the Dashboard to storage
|
Name | Description | |
---|---|---|
Id |
Return Id of the dashboard
(Defined by DashboardExtensions.) | |
IsDashboardReadOnly |
Return true if dashboard is read only
(Defined by DashboardExtensions.) | |
IsVisibleOnInsightsPublisher |
Return true if dashboard visible on Insights Publisher App
(Defined by DashboardExtensions.) |
[site]/Admin/Dashboard/[DashboardId]/View/[path*]
using Dynamicweb.Dashboards.Widgets; using System; using System.Collections.Generic; using System.ComponentModel.Composition; namespace Dynamicweb.Dashboards.Examples { [Export(DashboardSystemName)] public class SimpleDashboard : DashboardBase { private const string DashboardSystemName = "MySimple"; private static readonly IEnumerable<Type> mySpecificWidgetsTypes = new Type[] { typeof(MemoryUsageCounter), typeof(FilesFolderSizes) }; protected override DashboardConfiguration GetDefault(string path) { if (string.IsNullOrEmpty(path)) { return new DashboardConfiguration() { Widgets = new DashboardWidget[] { new MemoryUsageCounter() } }; } return new DashboardConfiguration() { Widgets = new DashboardWidget[] { } }; } public override IEnumerable<Type> GetAllAvailableWidgets(string path, IEnumerable<Type> allWidgets) { if (string.IsNullOrEmpty(path)) { return base.GetAllAvailableWidgets(path, allWidgets); } return mySpecificWidgetsTypes; } } }