From 5a80d98f046e99cfc49e6b233101b0562c463ef8 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Mon, 22 Apr 2019 21:22:59 +0300 Subject: reset* confirmation --- web/share/js/kvm/stream.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'web/share/js/kvm/stream.js') diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 97d08ea3..f804d555 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -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:
", 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:
", http.responseText); + } + } + }); } }); }; -- cgit v1.2.3