AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.116.86.92
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/report/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/report/lrpdialog.min.js
BX.namespace("BX.Report");if(typeof BX.Report.LongRunningProcessState==="undefined"){BX.Report.LongRunningProcessState={intermediate:0,running:1,completed:2,stoped:3,error:4}}if(typeof BX.Report.LongRunningProcessDialog==="undefined"){BX.Report.LongRunningProcessDialog=function(){this._id="";this._settings={};this._serviceUrl="";this._params={};this._initialOptions={};this._dlg=null;this._buttons={};this._summary=null;this._initialOptionsBlock=null;this._isSummaryHtml=false;this._isShown=false;this._state=BX.Report.LongRunningProcessState.intermediate;this._cancelRequest=false;this._requestIsRunning=false};BX.Report.LongRunningProcessDialog.prototype={initialize:function(t,e){this._id=BX.type.isNotEmptyString(t)?t:"report_long_run_proc_"+Math.random().toString().substring(2);this._settings=e?e:{};this._serviceUrl=this.getSetting("serviceUrl","");if(!BX.type.isNotEmptyString(this._serviceUrl)){throw"BX.Report.LongRunningProcessDialog: Could not find service url."}this._action=this.getSetting("action","");if(!BX.type.isNotEmptyString(this._action)){throw"BX.Report.LongRunningProcessDialog: Could not find action."}this._params=this.getSetting("params");if(!this._params){this._params={}}this._initialOptions=this.getSetting("initialOptions");if(!this._initialOptions){this._initialOptions={}}this._isSummaryHtml=!!this.getSetting("isSummaryHtml",false)},getId:function(){return this._id},getSetting:function(t,e){return this._settings.hasOwnProperty(t)?this._settings[t]:e},setSetting:function(t,e){this._settings[t]=e},getMessage:function(t){var e="";if(BX.Report.LongRunningProcessDialog.messages&&BX.Report.LongRunningProcessDialog.messages.hasOwnProperty(t)){e=BX.Report.LongRunningProcessDialog.messages[t]}return e},getState:function(){return this._state},getServiceUrl:function(){return this._serviceUrl},getAction:function(){return this._action},getParams:function(){return this._params},show:function(){if(this._isShown){return}this._dlg=BX.PopupWindowManager.create(this._id.toLowerCase(),this._anchor,{className:"bx-report-dialog-wrap bx-report-dialog-long-run-proc",autoHide:false,bindOptions:{forceBindPosition:false},buttons:this._prepareDialogButtons(),closeByEsc:false,closeIcon:false,content:this._prepareDialogContent(),draggable:true,events:{onPopupClose:BX.delegate(this._onDialogClose,this)},offsetLeft:0,offsetTop:0,titleBar:this.getSetting("title","")});if(!this._dlg.isShown()){this._dlg.show()}this._isShown=this._dlg.isShown()},close:function(){if(!this._isShown){return}if(this._dlg){this._dlg.close()}this._isShown=false},start:function(){if(this._state===BX.Report.LongRunningProcessState.intermediate||this._state===BX.Report.LongRunningProcessState.stoped){this._startRequest()}},stop:function(){if(this._state===BX.Report.LongRunningProcessState.running){this._cancelRequest=true}},_prepareDialogContent:function(){var t=this.getSetting("summary","");var e={attrs:{className:"bx-report-dialog-long-run-proc-summary"}};if(this._isSummaryHtml){e["html"]=t}else{e["text"]=t}this._summary=BX.create("DIV",e);var s,i,n,o,r=0;for(i in this._initialOptions){if(this._initialOptions.hasOwnProperty(i)){s=this._initialOptions[i];if(BX.type.isPlainObject(s)&&s.hasOwnProperty("name")&&s.hasOwnProperty("type")&&s.hasOwnProperty("title")&&s.hasOwnProperty("value")){n=null;switch(s["type"]){case"checkbox":o=this._id+"_opt_"+i;var a={id:o,type:s["type"],name:i};if(s["value"]==="Y")a["checked"]="checked";n=BX.create("DIV",{children:[BX.create("SPAN",{children:[BX.create("INPUT",{attrs:a}),BX.create("LABEL",{attrs:{for:o},text:s["title"]})]})]});a=null;break}if(n!==null){if(this._initialOptionsBlock===null){this._initialOptionsBlock=BX.create("DIV",{attrs:{className:"bx-report-dialog-long-run-proc-options"}})}this._initialOptionsBlock.appendChild(n);r++}}}}var u=[this._summary];if(this._initialOptionsBlock)u.push(this._initialOptionsBlock);return BX.create("DIV",{attrs:{className:"bx-report-dialog-long-run-proc-popup"},children:u})},_prepareDialogButtons:function(){this._buttons={};var t=this.getMessage("startButton");this._buttons["start"]=new BX.PopupWindowButton({text:t!==""?t:"Start",className:"popup-window-button-accept",events:{click:BX.delegate(this._handleStartButtonClick,this)}});var e=this.getMessage("stopButton");this._buttons["stop"]=new BX.PopupWindowButton({text:e!==""?e:"Stop",className:"popup-window-button-disable",events:{click:BX.delegate(this._handleStopButtonClick,this)}});var s=this.getMessage("closeButton");this._buttons["close"]=new BX.PopupWindowButtonLink({text:s!==""?s:"Close",className:"popup-window-button-link-cancel",events:{click:BX.delegate(this._handleCloseButtonClick,this)}});return[this._buttons["start"],this._buttons["stop"],this._buttons["close"]]},_onDialogClose:function(t){if(this._dlg){this._dlg.destroy();this._dlg=null}this._setState(BX.Report.LongRunningProcessState.intermediate);this._buttons={};this._summary=null;this._isShown=false;BX.onCustomEvent(this,"ON_CLOSE",[this])},_handleStartButtonClick:function(){this.start()},_handleStopButtonClick:function(){this.stop()},_handleCloseButtonClick:function(){if(this._state!==BX.Report.LongRunningProcessState.running){this._dlg.close()}},_lockButton:function(t,e){var s=typeof this._buttons[t]!=="undefined"?this._buttons[t]:null;if(!s){return}if(!!e){BX.removeClass(s.buttonNode,"popup-window-button-accept");BX.addClass(s.buttonNode,"popup-window-button-disable")}else{BX.removeClass(s.buttonNode,"popup-window-button-disable");BX.addClass(s.buttonNode,"popup-window-button-accept")}},_showButton:function(t,e){var s=typeof this._buttons[t]!=="undefined"?this._buttons[t]:null;if(s){s.buttonNode.style.display=!!e?"":"none"}},_setSummary:function(t,e){if(this._initialOptionsBlock){BX.remove(this._initialOptionsBlock);this._initialOptionsBlock=null}e=!!e;if(this._summary){if(e)this._summary.innerHTML=t;else this._summary.innerHTML=BX.util.htmlspecialchars(t)}},_setState:function(t){if(this._state===t){return}this._state=t;if(t===BX.Report.LongRunningProcessState.intermediate||t===BX.Report.LongRunningProcessState.stoped){this._lockButton("start",false);this._lockButton("stop",true);this._showButton("close",true)}else if(t===BX.Report.LongRunningProcessState.running){this._lockButton("start",true);this._lockButton("stop",false);this._showButton("close",false)}else if(t===BX.Report.LongRunningProcessState.completed||t===BX.Report.LongRunningProcessState.error){this._lockButton("start",true);this._lockButton("stop",true);this._showButton("close",true)}BX.onCustomEvent(this,"ON_STATE_CHANGE",[this])},_startRequest:function(){if(this._requestIsRunning){return}this._requestIsRunning=true;this._setState(BX.Report.LongRunningProcessState.running);var t={ACTION:this._action,PARAMS:this._params};if(this._initialOptionsBlock){var e={};var s=0;var i,n,o,r,a,u;for(n in this._initialOptions){if(this._initialOptions.hasOwnProperty(n)){i=this._initialOptions[n];if(BX.type.isPlainObject(i)&&i.hasOwnProperty("name")&&i.hasOwnProperty("type")&&i.hasOwnProperty("title")&&i.hasOwnProperty("value")){u=false;switch(i["type"]){case"checkbox":o=this._id+"_opt_"+n;r=BX(o);if(r){a=r.checked?"Y":"N";u=true}break}if(u){e[n]=a;s++}}}}if(s>0){t["INITIAL_OPTIONS"]=e}}BX.ajax({url:this._serviceUrl,method:"POST",dataType:"json",data:t,onsuccess:BX.delegate(this._onRequestSuccsess,this),onfailure:BX.delegate(this._onRequestFailure,this)})},_onRequestSuccsess:function(t){this._requestIsRunning=false;if(!t){this._setSummary(this.getMessage("requestError"));this._setState(BX.Report.LongRunningProcessState.error);return}if(BX.type.isNotEmptyString(t["ERROR"])){this._setState(BX.Report.LongRunningProcessState.error);this._setSummary(t["ERROR"]);return}var e=BX.type.isNotEmptyString(t["STATUS"])?t["STATUS"]:"";var s=BX.type.isNotEmptyString(t["SUMMARY"])?t["SUMMARY"]:"";var i=false;if(!BX.type.isNotEmptyString(s)){s=BX.type.isNotEmptyString(t["SUMMARY_HTML"])?t["SUMMARY_HTML"]:"";i=true}if(e==="PROGRESS"){if(s!==""){this._setSummary(s,i)}if(this._cancelRequest){this._setState(BX.Report.LongRunningProcessState.stoped);this._cancelRequest=false}else{window.setTimeout(BX.delegate(this._startRequest,this),100)}return}if(e==="NOT_REQUIRED"||e==="COMPLETED"){this._setState(BX.Report.LongRunningProcessState.completed);if(s!==""){this._setSummary(s,i)}}else{this._setSummary(this.getMessage("requestError"));this._setState(BX.Report.LongRunningProcessState.error)}if(this._cancelRequest){this._cancelRequest=false}},_onRequestFailure:function(t){this._requestIsRunning=false;this._setSummary(this.getMessage("requestError"));this._setState(BX.Report.LongRunningProcessState.error)}};if(typeof BX.Report.LongRunningProcessDialog.messages==="undefined"){BX.Report.LongRunningProcessDialog.messages={}}BX.Report.LongRunningProcessDialog.items={};BX.Report.LongRunningProcessDialog.create=function(t,e){var s=new BX.Report.LongRunningProcessDialog;s.initialize(t,e);this.items[s.getId()]=s;return s}}

Anon7 - 2022
AnonSec Team