Closed coderpop closed 6 years ago
@coderpop Support included in the SNAPSHOT version,
Add OS Reboot
and Date
button on the dashboard.
Select OS Commands
from widget list,
Update button details as follows,
If we enabled confirmation
for a button, will be displayed as follows, Here it is reboot button
Button JSON content:
[
{
"name": "<i class='fa fa-power-off'></i>",
"os": "linux",
"command": "reboot",
"btnType": "danger",
"confirmation": true
},
{
"name": "Date",
"os": "linux",
"command": "date"
}
]
name
- (Mandatory) Name of the button. can be in the form of HTML also. HTML or icons(recommended: font awesome icons)os
- (Optional) Operating System, supports, linux
and common
. If we leave, will be considered as common
.btnType
- (Optional) can be any one of value in the list [default
, primary
, success
, info
, warning
, danger
] when we leave this field field as blank, default
will be selected. Each value giveconfirmation
- (Optional) If you want to confirm before execute this command. Will be good to add on reboot
, poweroff
commands. Default: false
.
As per forum post request.....
Implement this feature by executing direct Linux command. Add an API to execute OS commands and provide an example to add custom buttons on the dashboard.