public class SummaryDashlet extends AbstractDashlet
Dashlet
for testing purposes.Constructor and Description |
---|
SummaryDashlet(String name,
DashletSpec dashletSpec,
AlarmDao alarmDao)
Constructor for instantiating new objects.
|
Modifier and Type | Method and Description |
---|---|
int |
countBySeverity(boolean acknowledged,
long age,
OnmsSeverity onmsSeverity)
Searches for alarms with the given criterias and returns the number found.
|
int |
countByUei(boolean acknowledged,
long age,
String uei)
Searches for alarms with the given criterias and returns the number found.
|
DashletComponent |
getDashboardComponent(com.vaadin.ui.UI ui) |
String |
getHumanReadableFormat(long secondsAll)
Returns a human-readable
String representation of a timestamp in the past. |
DashletComponent |
getWallboardComponent(com.vaadin.ui.UI ui)
Updates the dashlet contents and computes new boosted state
|
getDashletSpec, getName, isBoosted, setDashletSpec, setName
public SummaryDashlet(String name, DashletSpec dashletSpec, AlarmDao alarmDao)
dashletSpec
- the DashletSpec
to be usedpublic String getHumanReadableFormat(long secondsAll)
String
representation of a timestamp in the past.secondsAll
- the timestamp to be usedpublic int countBySeverity(boolean acknowledged, long age, OnmsSeverity onmsSeverity)
acknowledged
- search for acknowledged or unacknowledged alarmsage
- the age of the alarmsonmsSeverity
- the OnmsSeverity
to search forpublic int countByUei(boolean acknowledged, long age, String uei)
acknowledged
- search for acknowledged or unacknowledged alarmsage
- the age of the alarmsuei
- search for alarms with the specified ueipublic DashletComponent getWallboardComponent(com.vaadin.ui.UI ui)
Dashlet
getWallboardComponent
in interface Dashlet
getWallboardComponent
in class AbstractDashlet
ui
- The UI
which holds the component.public DashletComponent getDashboardComponent(com.vaadin.ui.UI ui)
getDashboardComponent
in interface Dashlet
getDashboardComponent
in class AbstractDashlet
Copyright © 2021. All rights reserved.