Embed a systemd service table widget with page reload.
The following parameters are recognized:
One or more systemd service units that are space separated. The ".service" extension must be included.
Optional URL or ID tag to navigate or jump to within page.
This macro is used to embed a systemd service table widget into an NST WUI page for one or more services. The page will reload if the action was one of "start", "stop" or "reload".
Example of using the macro:
@systemdTablePageReload("messagebus.service") or @systemdTablePageReload("nst-ws.service promisc.service") @systemdTablePageReload("rpcbind.service","#service") @systemdTablePageReload("chronyd.service","/nstwui/cgi-bin/time/ntp_info.cgi")
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH
and the
config/html.at
macros file has been
generated (Hint: run make atmacros in the
wui
directory), a developer should be able to
run the above example by copy/pasting from below:
[root@probe root]#
java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
@systemdTablePageReload("messagebus.service") or @systemdTablePageReload("nst-ws.service promisc.service") @systemdTablePageReload("rpcbind.service","#service") @systemdTablePageReload("chronyd.service","/nstwui/cgi-bin/time/ntp_info.cgi")
EOF
This macro is defined as:
@systemdTable("@param(0)") @javascriptBegin() NstSystemd.getInstance().addListener({ actionPerformed: function(self, unitid, action, results) { NstSystemd.reloadActionCheck("@param(0)".split(' '), unitid, action, results@ifEqual("@param(1)",,,", '@param(1)'")); } }); @javascriptEnd()