Class WidgetArea
Represents the WidgetArea class which extends the Widget class.
Inherited Members
Namespace: DataWeb.Dashboard.Widgets
Assembly: DataWeb.Core.dll
Syntax
public class WidgetArea : Widget
Constructors
WidgetArea(IServiceProvider)
Represents the WidgetArea class which extends the Widget class.
Declaration
public WidgetArea(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider |
Methods
GetDataAsync(Panel, Dictionary<string, object>, IUser, CancellationToken)
Gets the data for the widget.
Declaration
public override Task<WidgetContentData> GetDataAsync(Panel panel, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel that the widget belongs to. |
Dictionary<string, object> | widgetSettings | The widget settings. |
IUser | user | The IUser who is viewing the widget. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<WidgetContentData> | The widget data. |
Overrides
GetDefaultSettingsAsync(Panel, IUser, CancellationToken)
Gets the default settings for the widget.
Declaration
public override Task<Dictionary<string, object>> GetDefaultSettingsAsync(Panel panel, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel that the widget belongs to. |
IUser | user | The IUser who is viewing the widget. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Dictionary<string, object>> | A dictionary of default settings. |
Overrides
GetOptionsAsync(Panel, Dictionary<string, object>, IUser, CancellationToken)
Gets the options for the widget.
Declaration
public override Task<WidgetOptions> GetOptionsAsync(Panel panel, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel that the widget belongs to. |
Dictionary<string, object> | widgetSettings | The widget settings. |
IUser | user | The IUser who is viewing the widget. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<WidgetOptions> | The widget options. |
Overrides
UpdateSettingsAsync(Panel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)
Updates the widget settings.
Declaration
public override Task UpdateSettingsAsync(Panel panel, Dictionary<string, object> providedSettings, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel that the widget belongs to. |
Dictionary<string, object> | providedSettings | The provided settings. |
Dictionary<string, object> | widgetSettings | The widget settings. |
IUser | user | The IUser who is viewing the widget. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
Overrides
ValidateSettingsAsync(Panel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)
Validates the widget settings.
Declaration
public override Task<List<ValidationError>> ValidateSettingsAsync(Panel panel, Dictionary<string, object> providedSettings, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel that the widget belongs to. |
Dictionary<string, object> | providedSettings | The provided settings. |
Dictionary<string, object> | widgetSettings | The widget settings. |
IUser | user | The IUser who is viewing the widget. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ValidationError>> | The list of validation errors. |