|
@@ -48,12 +48,29 @@
|
|
|
|
|
|
|
|
|
function shutdown(){
|
|
|
+ var apiObject = {
|
|
|
+ api: "/system/power/shutdown",
|
|
|
+ data: {},
|
|
|
+ title: "Shutdown Host",
|
|
|
+ desc: "Authentication is required in order to proceed the shutdown process. Make sure you have access to the host hardware before shutdown.",
|
|
|
+ thisuser: true, //This username as default, set to false for entering other user
|
|
|
+ method: "GET"
|
|
|
+ }
|
|
|
+
|
|
|
+ apiObject = encodeURIComponent(JSON.stringify(apiObject));
|
|
|
|
|
|
+ ao_module_newfw({
|
|
|
+ url: "SystemAO/security/authreq.html#" + apiObject,
|
|
|
+ width: 380,
|
|
|
+ height: 200,
|
|
|
+ appicon: "SystemAO/security/img/lock.svg",
|
|
|
+ title: "Shutdown - Authentication Required"
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function restart(){
|
|
|
var apiObject = {
|
|
|
- api: "system/power/restart",
|
|
|
+ api: "/system/power/restart",
|
|
|
data: {},
|
|
|
title: "Restart Host",
|
|
|
desc: "Authentication is required in order to proceed the restart process",
|