function index()
entry({"servicectl"}, alias("servicectl", "status")).sysauth = "root"
entry({"servicectl", "status"}, call("action_status")).leaf = true
- entry({"servicectl", "restart"}, call("action_restart")).leaf = true
+ entry({"servicectl", "restart"}, post("action_restart")).leaf = true
end
function action_status()
<script type="text/javascript">//<![CDATA[
var apply_xhr = new XHR();
- apply_xhr.get('<%=luci.dispatcher.build_url("servicectl", "restart", table.concat(configs, ","))%>', null,
+ apply_xhr.post('<%=luci.dispatcher.build_url("servicectl", "restart", table.concat(configs, ","))%>', { token: '<%=token%>' },
function() {
var checkfinish = function() {
apply_xhr.get('<%=luci.dispatcher.build_url("servicectl", "status")%>', null,