Widget - Execute Operating System commands
-
Now it is possible to execute Operating System commands from MyController dashboard. This request created based on the input from https://github.com/mycontroller-org/mycontroller/issues/450
Add OS
Reboot
andDate
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" } ]
Supported fields:
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
andcommon
. If we leave, will be considered ascommon
.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 onreboot
,poweroff
commands. Default:false
.
-
This is excellent news - now even more control from within myc !!!
There are so many uses for this flexibility - I only asked for a reboot/shutdown button as it would eliminate an ssh connection each time I need to work on the pi - but this is just way better than that!
Thank you sooooo much