From 83c4b75d82fd86fe742b93ef52be225f518d3ec9 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Sat, 20 Apr 2019 10:42:00 +0300 Subject: [PATCH] #GetScreenshots --- .../RobotDaemonServerWeb/Index.xhtml | 38 +++++++++++++++++-- Orchestrator/RobotDaemon/robotDaemonServer.py | 3 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Orchestrator/RobotDaemon/RobotDaemonServerWeb/Index.xhtml b/Orchestrator/RobotDaemon/RobotDaemonServerWeb/Index.xhtml index 280732ac..bdde7a29 100644 --- a/Orchestrator/RobotDaemon/RobotDaemonServerWeb/Index.xhtml +++ b/Orchestrator/RobotDaemon/RobotDaemonServerWeb/Index.xhtml @@ -33,6 +33,26 @@ on: 'hover' }); + mGlobal.Monitor={}; + mGlobal.Monitor.ScreenshotModal={}; + mGlobal.Monitor.GenerateUniqueID=function(inPrefix="tempUID=") { + return inPrefix+Math.round(Math.random()*1000)+"-"+Math.round(Math.random()*10000)+"-"+Math.round(Math.random()*1000) + } + mGlobal.Monitor.ScreenshotModal.Show=function() { + $('.ui.modal.daemon-screenshot').modal('show'); + + //Функция обновления картинки + lScreenshotUpdate=function() { + lScreenshotSrc="/GetScreenshot?"+mGlobal.Monitor.GenerateUniqueID() + $(".daemon-screenshot img").attr('src', lScreenshotSrc); + } + + mGlobal.Monitor.ScreenshotModal.timerId=setInterval(lScreenshotUpdate,1500) + + } + mGlobal.Monitor.ScreenshotModal.Close=function() { + clearInterval(mGlobal.Monitor.ScreenshotModal.timerId); + } }) ; @@ -129,8 +149,7 @@
- - GetScreenshot + GetScreenshot
@@ -199,7 +218,20 @@
- +