(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["views/default/app/uploaded"],{1108:function(e,t,s){"use strict";s.r(t);var a=s(145);class n extends a.Component{_initConfiguration(e){super._initConfiguration(e),this._message=this._getConfigParam("message"),this.updateInterval=5}_addEvents(){this._processStatus({status:"working",message:this._message,progress:0})}_scheduleDownloadStatus(){this._statusDownload.bind(this).delay(this.updateInterval)}_statusDownload(){new Ajax.Request(Object(a.prepareUrl)("/app/get-download-data"),{method:"get",onSuccess:this._onSuccess.bind(this),onFailure:this._onFailure.bind(this)})}_onSuccess(e){try{this._processStatus(JSON.parse(e.responseText))}catch(e){this._scheduleDownloadStatus()}}_onFailure(){this._scheduleDownloadStatus()}_processStatus(e){e?(this._componentElement.innerHTML='<div class="msg-box msg-progress"><div class="msg-content"><table class="msg-progress-container" cellspacing="0" width="100%"><tr>'+'<td class="msg-progress-info"><span>'.concat(this._message,"</span></td>")+'<td class="msg-progress-indicator"><div class="progress-box progress-box-horizontal">'+'<div class="progress-label" id="downloadProgress">'.concat(e.progress,"%</div>")+'<div class="progress progress-sm">'+'<div class="progress-bar" id="downloadProgressGauge" style="width: '.concat(e.progress,'%"></div>')+"</div></div></td></tr></table></div></div>","working"===e.status?this._scheduleDownloadStatus():Object(a.redirect)("/app/uploaded/downloadStatus/".concat(e.status))):this._scheduleDownloadStatus()}}t.default=({downloadInProgress:e,data:t,searchFilters:s})=>{const o=a.Locale.getSection("admin.controllers.app.uploaded"),i=a.Locale.getSection("admin.components.lists.appuploaded");e&&new n({renderTo:"content-body",renderMode:"top",message:o.lmsg("downloadInProgress")}),new a.Hint({renderTo:"main",hint:o.lmsg("hint")}),new a.Panel({cls:"list-box",renderTo:"main",items:[new a.List({data:t,searchFilters:s,id:"admin-app-uploaded-list",dataUrl:"/app/uploaded-data",operations:[{componentType:a.SmallButton,id:"buttonUploadApplication",title:i.lmsg("buttonUploadNewApp"),description:i.lmsg("buttonUploadNewAppDescription"),addCls:"sb-upload-new-app",href:"/app/upload"},{componentType:a.bar.Separator},{componentType:a.SmallButton,id:"buttonMakeVisible",title:i.lmsg("buttonMakeAppVisible"),description:i.lmsg("buttonMakeAppVisibleDescription"),addCls:"sb-make-visible",handler:()=>{Object(a.getComponent)("admin-app-uploaded-list").execGroupOperation({url:"/app/make-visible",skipConfirmation:!0})}},{componentType:a.SmallButton,id:"buttonMakeInvisible",title:i.lmsg("buttonMakeAppInvisible"),description:i.lmsg("buttonMakeAppInvisibleDescription"),addCls:"sb-make-invisible",handler:()=>{Object(a.getComponent)("admin-app-uploaded-list").execGroupOperation({url:"/app/make-invisible",skipConfirmation:!0})}},{componentType:a.bar.Separator},{componentType:a.SmallButton,id:"buttonRemoveApplication",title:i.lmsg("buttonRemove"),description:i.lmsg("buttonRemoveDescription"),addCls:"sb-remove-selected",handler:e=>{Object(a.getComponent)("admin-app-uploaded-list").execGroupOperation({url:"/app/remove/?redirect=/app/uploaded/",subtype:"delete",mouseEvent:e,locale:{confirmOnGroupOperation:i.lmsg("confirmOnDelete")}})}}],columns:[a.list.COLUMN_SELECTION,{header:i.lmsg("name"),sortable:!0,dataIndex:"name",renderer:({id:e,name:t,version:s,release:n,visible:o,configured:p})=>{let l=1!=o?' <span class="hint-attention ">'.concat(i.lmsg("appInvisible"),"</span>"):"";return l+=1!=p?' <span class="hint-attention ">'.concat(i.lmsg("appGlobalSettingsNotSet"),"</span>"):"",'<a href="'.concat(Object(a.prepareUrl)("/app/info/id/".concat(e)),'">')+"".concat(Object(a.escapeHtml)(t)," (").concat(Object(a.escapeHtml)(s),"-").concat(Object(a.escapeHtml)(n),")")+"</a>".concat(l)}},{header:i.lmsg("numberOfInstances"),sortable:!0,dataIndex:"numberOfInstances",renderer:({numberOfInstances:e})=>Object(a.escapeHtml)(e)}]})]})}}}]);
//# sourceMappingURL=uploaded.js.map?d70e0a8e869e9fd82d77