Class SummaryDashlet
- java.lang.Object
-
- org.opennms.features.vaadin.dashboard.model.AbstractDashlet
-
- org.opennms.features.vaadin.dashboard.dashlets.SummaryDashlet
-
- All Implemented Interfaces:
Dashlet
public class SummaryDashlet extends AbstractDashlet
This class implements aDashletfor testing purposes.- Author:
- Christian Pape
-
-
Constructor Summary
Constructors Constructor Description SummaryDashlet(String name, DashletSpec dashletSpec, AlarmDao alarmDao)Constructor for instantiating new objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountBySeverity(boolean acknowledged, long age, OnmsSeverity onmsSeverity)Searches for alarms with the given criterias and returns the number found.intcountByUei(boolean acknowledged, long age, String uei)Searches for alarms with the given criterias and returns the number found.DashletComponentgetDashboardComponent(com.vaadin.ui.UI ui)StringgetHumanReadableFormat(long secondsAll)Returns a human-readableStringrepresentation of a timestamp in the past.DashletComponentgetWallboardComponent(com.vaadin.ui.UI ui)Updates the dashlet contents and computes new boosted state-
Methods inherited from class org.opennms.features.vaadin.dashboard.model.AbstractDashlet
getDashletSpec, getName, isBoosted, setDashletSpec, setName
-
-
-
-
Constructor Detail
-
SummaryDashlet
public SummaryDashlet(String name, DashletSpec dashletSpec, AlarmDao alarmDao)
Constructor for instantiating new objects.- Parameters:
dashletSpec- theDashletSpecto be used
-
-
Method Detail
-
getHumanReadableFormat
public String getHumanReadableFormat(long secondsAll)
Returns a human-readableStringrepresentation of a timestamp in the past.- Parameters:
secondsAll- the timestamp to be used- Returns:
- a human-readable representation
-
countBySeverity
public int countBySeverity(boolean acknowledged, long age, OnmsSeverity onmsSeverity)Searches for alarms with the given criterias and returns the number found.- Parameters:
acknowledged- search for acknowledged or unacknowledged alarmsage- the age of the alarmsonmsSeverity- theOnmsSeverityto search for- Returns:
- number of alarms found
-
countByUei
public int countByUei(boolean acknowledged, long age, String uei)Searches for alarms with the given criterias and returns the number found.- Parameters:
acknowledged- search for acknowledged or unacknowledged alarmsage- the age of the alarmsuei- search for alarms with the specified uei- Returns:
- number of alarms found
-
getWallboardComponent
public DashletComponent getWallboardComponent(com.vaadin.ui.UI ui)
Description copied from interface:DashletUpdates the dashlet contents and computes new boosted state- Specified by:
getWallboardComponentin interfaceDashlet- Overrides:
getWallboardComponentin classAbstractDashlet- Parameters:
ui- TheUIwhich holds the component.
-
getDashboardComponent
public DashletComponent getDashboardComponent(com.vaadin.ui.UI ui)
- Specified by:
getDashboardComponentin interfaceDashlet- Overrides:
getDashboardComponentin classAbstractDashlet
-
-