File

core/dashboard/wiget-time-context/widget-time-context-helper.service.ts

Index

Methods

Methods

getActionBarPriority
getActionBarPriority(displaySettings: WidgetDisplaySettings)

Defines priority for single action bar item of bar items that has the 'timecontext' groupId. Widgets that uses WidgetTimeContextComponent can be assigned to three levels of priority: HIGH priority means that widget is using time range pickers, realtime and aggregation features. Widgets: Data points graph, Data points graph 2.0, Data points table. MEDIUM priority means that widget is using time range pickers and realtime features. Widgets: Event list. LOW priority means that widget is using realtime feature only. Widgets: Map

Parameters :
Name Type Optional Description
displaySettings WidgetDisplaySettings No

Settings indicating which features of WidgetTimeContextComponent are used by widget.

priority of widget action bar item.

getDateTimeContextByInterval
getDateTimeContextByInterval(intervalId: Interval)

Calculates date time context according to provided interval.

Parameters :
Name Type Optional Description
intervalId Interval No

Interval id indicating time range.

Returns : DateTimeContext

Tuple of dates- the first one is date "from" according to selected interval, second one is date "to" (now).

isSelectableInterval
isSelectableInterval(intervalId: Interval)

Validates provided param for being selectable Interval id.

Parameters :
Name Type Optional Description
intervalId Interval No

Interval id to be validated.

Returns : any

True if provided id is valid, selectable Interval id and false if it's not.

isValidAggregation
isValidAggregation(aggregation: aggregationType)

Validates provided aggregation:

Parameters :
Name Type Optional Description
aggregation aggregationType No

Date "from" that should be validated.

Returns : boolean

Result of validation of aggregation.

isValidDateRange
isValidDateRange(stringifiedDateFrom: string, stringifiedDateTo: string)

Validates provided date "from" and date "to":

  • if both dates are proper date strings
  • if provided date from is earlier than date to.
Parameters :
Name Type Optional Description
stringifiedDateFrom string No

Date "from" that should be validated.

stringifiedDateTo string No

Date "to" that should be validated.

Returns : boolean

Result of validation of dates range.

results matching ""

    No results matching ""