TimersDashboard
Extends:
This is the main component, it shows a list of editable timers and a button/box to create a new timer It also handle all the logic and communication with the server
Static Method Summary
Static Public Methods | ||
public static |
Return a function for filter/find in an array an element with the specified id |
Member Summary
Public Members | ||
public |
Ref of the setInterval This variable is used to clear the interval when the element is unmounted |
Method Summary
Public Methods | ||
public |
Reload the data from the server every 5s |
|
public |
Stop loading the data from the server |
|
public |
createTimer(timer: APITimer) Create a new timer |
|
public |
deleteTimer(timerId: string) Delete the specified timerId from the server |
|
public |
render(): XML Render |
|
public |
startTimer(timerId: string) Start a timer |
|
public |
Stop a timer |
|
public |
updateTimer(attrs: APITimer) Update a timer |
|
public |
updateTimerById(id: string, attrs: APITimer) Update a timer using the defined id |
Static Public Methods
Public Members
Public Methods
public createTimer(timer: APITimer) source
Create a new timer
Params:
Name | Type | Attribute | Description |
timer | APITimer |
public deleteTimer(timerId: string) source
Delete the specified timerId from the server
Params:
Name | Type | Attribute | Description |
timerId | string |
public startTimer(timerId: string) source
Start a timer
Params:
Name | Type | Attribute | Description |
timerId | string |
public stopTimer(timerId: string) source
Stop a timer
Params:
Name | Type | Attribute | Description |
timerId | string |