mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
refactoring
This commit is contained in:
@@ -42,14 +42,17 @@ export function WakeOnLan() {
|
||||
|
||||
self.setState = function(state) {
|
||||
if (state) {
|
||||
tools.setFeatureEnabled($("wol"), state.enabled);
|
||||
tools.featureSetEnabled($("wol"), state.enabled);
|
||||
__target = state.target;
|
||||
}
|
||||
wm.switchEnabled($("wol-wakeup-button"), (state && state.enabled));
|
||||
};
|
||||
|
||||
var __clickWakeupButton = function() {
|
||||
let msg = `Are you sure to send Wake-on-LAN packet to the server?<br>Target: <b>${__target.mac}</b> (${__target.ip}:${__target.port})?`;
|
||||
let msg = `
|
||||
Are you sure to send Wake-on-LAN packet to the server?<br>
|
||||
Target: <b>${__target.mac}</b> (${__target.ip}:${__target.port})?
|
||||
`;
|
||||
wm.confirm(msg).then(function(ok) {
|
||||
if (ok) {
|
||||
let http = tools.makeRequest("POST", "/api/wol/wakeup", function() {
|
||||
|
||||
Reference in New Issue
Block a user