mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
msd pinout
This commit is contained in:
@@ -69,9 +69,7 @@
|
||||
<div class="ctl-dropdown-content">
|
||||
<div class="ctl-dropdown-content-buttons">
|
||||
<button id="show-about-button">• Show about</button>
|
||||
<hr>
|
||||
<button id="show-keyboard-button">• Show keyboard</button>
|
||||
<hr>
|
||||
<button id="show-stream-button">• Show stream</button>
|
||||
<hr>
|
||||
<button disabled id="stream-screenshot-button">• Take a screenshot</button>
|
||||
@@ -91,6 +89,7 @@
|
||||
<hr>
|
||||
<div class="ctl-dropdown-content-buttons">
|
||||
<button disabled id="stream-reset-button">• Reset stream</button>
|
||||
<button disabled id="msd-reset-button">• Reset mass storage</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,8 @@ function Msd() {
|
||||
|
||||
tools.setOnClick($("msd-switch-to-kvm-button"), () => __clickSwitchButton("kvm"));
|
||||
tools.setOnClick($("msd-switch-to-server-button"), () => __clickSwitchButton("server"));
|
||||
|
||||
tools.setOnClick($("msd-reset-button"), __clickResetButton);
|
||||
};
|
||||
|
||||
/********************************************************************************/
|
||||
@@ -86,6 +88,18 @@ function Msd() {
|
||||
__applyState();
|
||||
};
|
||||
|
||||
var __clickResetButton = function() {
|
||||
var http = tools.makeRequest("POST", "/kvmd/msd/reset", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status !== 200) {
|
||||
ui.error("MSD reset error:<br>", http.responseText);
|
||||
}
|
||||
}
|
||||
__applyState();
|
||||
});
|
||||
__applyState();
|
||||
};
|
||||
|
||||
var __applyState = function() {
|
||||
if (__state.connected_to === "server") {
|
||||
$("msd-another-another-user-uploads").style.display = "none";
|
||||
@@ -123,6 +137,7 @@ function Msd() {
|
||||
$("msd-select-new-image-button").disabled = (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || __upload_http);
|
||||
$("msd-upload-new-image-button").disabled = (!__state.in_operate || __state.connected_to !== "kvm" || __state.busy || !__image_file);
|
||||
$("msd-abort-uploading-button").disabled = (!__state.in_operate || !__upload_http);
|
||||
$("msd-reset-button").disabled = (!__state.in_operate || __upload_http);
|
||||
|
||||
$("msd-new-image").style.display = (__image_file ? "block" : "none");
|
||||
$("msd-progress").setAttribute("data-label", "Waiting for upload ...");
|
||||
|
||||
Reference in New Issue
Block a user