Hi,
I am curious how to add a custom notification to the status page, that include buttons which will run scripts as LuCi ?
And then how to package these scripts as a "LuCi app" which can be easily installed on other openwrt routers
First here is a mock up of what I'm talking about
So, it would be a script that adds this custom notification
Which might be invoked as follows
/usr/bin/luci-notif mynotif1 "This is a message" "Do nothing" "Run a script|/opt/myscript" "Dismiss this notification|/usr/bin/luci-notif mynotif1 delete|red"
so usage
/usr/bin/luci-notif ...
creates a notification at the top of the status page
if there are multiple notification, they are shown in alphanumeric order of the name of the notification
/usr/bin/luci-notif delete
will delete an existing notification, returns an error if notification did not exist
Now, this could do a lot more than this but I think it is very important to keep it simple for the first concept and it can be made more capable at a later date.
Further improvements could include, showing the notification on pages other than the status page, for instance the interface page, or even more interestingly, the login page !
Also the notification text, might instead of text, be a path to an html file, so the notification could presumably have more complex formatting, contain images or even embed arbitrary dynamic content, for instance a graph generated on the router itself.
And the reason why I thought of this is I would like to do the following but I don't remember much html and I don't really want to hard code stuff in luci's pages. It would just break next update anyway. But a method as I describe here could be re-usable, packagable and shareable.
Here is what I wanted to do, offer options for mounting usb drives from the webui