mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-10 18:34:18 +08:00
🎨 Sync 2026-08-05 00:15:00
This commit is contained in:
@@ -6,8 +6,15 @@ XHR.poll(5, '<%=url("admin/services/kaiplus_status")%>', null, function(x, st) {
|
||||
el.innerHTML = '<br/><em style=\"color:red\"><%:The KaiPlus service is not running.%></em>';
|
||||
}
|
||||
if (st.running) {
|
||||
var basePath = st.base_path || "/apps/kaiplus/";
|
||||
if (basePath.charAt(0) !== "/") {
|
||||
basePath = "/" + basePath;
|
||||
}
|
||||
if (basePath.charAt(basePath.length - 1) !== "/") {
|
||||
basePath = basePath + "/";
|
||||
}
|
||||
el.innerHTML = '<br/><em style=\"color:green\"><%:The KaiPlus service is running.%></em>'
|
||||
+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open KaiPlus%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>";
|
||||
+ "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:Click to open KaiPlus%> \" onclick=\"window.open('http://' + window.location.hostname + ':' + st.port + basePath)\"/>";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user