mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
reset* confirmation
This commit is contained in:
parent
4e108c35e8
commit
5a80d98f04
@ -212,11 +212,15 @@ function Hid() {
|
||||
};
|
||||
|
||||
var __clickResetButton = function() {
|
||||
var http = tools.makeRequest("POST", "/kvmd/hid/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("HID reset error:<br>", http.responseText);
|
||||
}
|
||||
wm.confirm("Are you sure you want to reset HID (keyboard & mouse)?").then(function(ok) {
|
||||
if (ok) {
|
||||
var http = tools.makeRequest("POST", "/kvmd/hid/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("HID reset error:<br>", http.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -99,15 +99,19 @@ function Msd() {
|
||||
};
|
||||
|
||||
var __clickResetButton = function() {
|
||||
var http = tools.makeRequest("POST", "/kvmd/msd/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("MSD reset error:<br>", http.responseText);
|
||||
}
|
||||
wm.confirm("Are you sure you want to reset Mass Storage Device?").then(function(ok) {
|
||||
if (ok) {
|
||||
var http = tools.makeRequest("POST", "/kvmd/msd/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("MSD reset error:<br>", http.responseText);
|
||||
}
|
||||
}
|
||||
__applyState();
|
||||
});
|
||||
__applyState();
|
||||
}
|
||||
__applyState();
|
||||
});
|
||||
__applyState();
|
||||
};
|
||||
|
||||
var __applyState = function() {
|
||||
|
||||
@ -185,11 +185,15 @@ function Streamer() {
|
||||
};
|
||||
|
||||
var __clickResetButton = function() {
|
||||
var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("Can't reset stream:<br>", http.responseText);
|
||||
}
|
||||
wm.confirm("Are you sure you want to reset stream?").then(function (ok) {
|
||||
if (ok) {
|
||||
var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
wm.error("Can't reset stream:<br>", http.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user