# ORC WEB - Add freeze logs textarea button - tested!

dev-linux
Ivan Maslov 4 years ago
parent 67e06960e3
commit de9f0cc3df

@ -548,6 +548,26 @@ $(document).ready(function() {
/// v1.2.0 pyOpenRPA ServerLogs /// v1.2.0 pyOpenRPA ServerLogs
mGlobal.pyOpenRPA.ServerLogList = null mGlobal.pyOpenRPA.ServerLogList = null
mGlobal.pyOpenRPA.ServerLogListHashStr = "" mGlobal.pyOpenRPA.ServerLogListHashStr = ""
mGlobal.pyOpenRPA.ServerLogListDoRenderBool = true
///Turn OFF rendering
mGlobal.pyOpenRPA.ServerLogListDoRenderFalse = function() {
///Set unfreeze button
$("a.mGlobal-pyOpenRPA-ServerLogListDoRender").html("Unfreeze textarea")
$("a.mGlobal-pyOpenRPA-ServerLogListDoRender").attr("onclick","mGlobal.pyOpenRPA.ServerLogListDoRenderTrue()")
$("textarea.mGlobal-pyOpenRPA-ServerLogList").css("background-color","#b9e2e8")
mGlobal.pyOpenRPA.ServerLogListDoRenderBool = false
}
///Turn ON rendering
mGlobal.pyOpenRPA.ServerLogListDoRenderTrue = function() {
mGlobal.pyOpenRPA.ServerLogListDoRenderBool = true
///Render last data
mGlobal.pyOpenRPA.ServerLogListRefreshDef_TechnicalRender()
///Set unfreeze button
$("a.mGlobal-pyOpenRPA-ServerLogListDoRender").html("Freeze textarea")
$("a.mGlobal-pyOpenRPA-ServerLogListDoRender").attr("onclick","mGlobal.pyOpenRPA.ServerLogListDoRenderFalse()")
$("textarea.mGlobal-pyOpenRPA-ServerLogList").css("background-color","")
}
mGlobal.pyOpenRPA.ServerLogListScrollBottomDef = function() { mGlobal.pyOpenRPA.ServerLogListScrollBottomDef = function() {
var lTA = $("textarea.mGlobal-pyOpenRPA-ServerLogList")[0]; var lTA = $("textarea.mGlobal-pyOpenRPA-ServerLogList")[0];
lTA.scrollTop = lTA.scrollHeight; lTA.scrollTop = lTA.scrollHeight;
@ -555,7 +575,7 @@ $(document).ready(function() {
mGlobal.pyOpenRPA.ServerLogListRefreshDef_TechnicalRender = function() mGlobal.pyOpenRPA.ServerLogListRefreshDef_TechnicalRender = function()
{ {
lResponseJSON = mGlobal.pyOpenRPA.ServerLogList lResponseJSON = mGlobal.pyOpenRPA.ServerLogList
if (lResponseJSON!= null) { if (lResponseJSON!= null && mGlobal.pyOpenRPA.ServerLogListDoRenderBool==true) {
lText = lResponseJSON.join("\n") /// Code for the processing the text lText = lResponseJSON.join("\n") /// Code for the processing the text
$("textarea.mGlobal-pyOpenRPA-ServerLogList")[0].value= lText ///Прогрузить новую таблицу $("textarea.mGlobal-pyOpenRPA-ServerLogList")[0].value= lText ///Прогрузить новую таблицу
mGlobal.pyOpenRPA.ServerLogListScrollBottomDef() //Scroll to the bottom mGlobal.pyOpenRPA.ServerLogListScrollBottomDef() //Scroll to the bottom
@ -869,5 +889,6 @@ $(document).ready(function() {
mGlobal.pyOpenRPA.ServerJSInitDef() // Recieve JS from server (if exist) and then call anothe url ServerData mGlobal.pyOpenRPA.ServerJSInitDef() // Recieve JS from server (if exist) and then call anothe url ServerData
mGlobal.pyOpenRPA.ServerDataRefreshDef() // Init the refresh data def from server side mGlobal.pyOpenRPA.ServerDataRefreshDef() // Init the refresh data def from server side
mGlobal.pyOpenRPA.ServerLogListRefreshDef() // Init the refresh data def from the log window mGlobal.pyOpenRPA.ServerLogListRefreshDef() // Init the refresh data def from the log window
mGlobal.pyOpenRPA.ServerLogListDoRenderTrue() // Init button to freeze/unfreeze textare with logs
}); });

@ -286,9 +286,11 @@
<i class="clipboard list icon"></i> <i class="clipboard list icon"></i>
Logs Logs
</h4> </h4>
<textarea class="mGlobal-pyOpenRPA-ServerLogList UACClient-pyOpenRPADict-AdminDict-LogViewerBool" readonly="readonly" style="width:100%; display:none; resize: none; font-family:monospace; font-weight: bold;" id="textarea_id" rows="20"> <textarea class="mGlobal-pyOpenRPA-ServerLogList UACClient-pyOpenRPADict-AdminDict-LogViewerBool" readonly="readonly" style="width:100%; display:none; resize: none; font-family:monospace; font-weight: bold;" id="textarea_id" rows="20">
</textarea> </textarea>
<a class="mGlobal-pyOpenRPA-ServerLogListDoRender" onclick="" style="cursor: pointer;">Freeze textarea</a>
<div class="ui fluid action input UACClient-pyOpenRPADict-AdminDict-CMDInputBool" style="display:none;"> <div class="ui fluid action input UACClient-pyOpenRPADict-AdminDict-CMDInputBool" style="display:none;">
<input class="openrpa-controller-cmd-run-input" type="text" placeholder="CMD Code..."> <input class="openrpa-controller-cmd-run-input" type="text" placeholder="CMD Code...">
<div class="ui button" onclick="mGlobal.Controller.CMDRun();">Run!</div> <div class="ui button" onclick="mGlobal.Controller.CMDRun();">Run!</div>

Loading…
Cancel
Save