(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/default/app/uploaded"],{1120:(e,s,t)=>{"use strict";t.r(s);var a=t(144);const n="working";class o extends a.Component{_initConfiguration(e){super._initConfiguration(e),this._message=this._getConfigParam("message"),this.updateInterval=5}_addEvents(){this._processStatus({status:n,message:this._message,progress:0})}_scheduleDownloadStatus(){this._statusDownload.bind(this).delay(this.updateInterval)}_statusDownload(){new Ajax.Request((0,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>",n===e.status?this._scheduleDownloadStatus():(0,a.redirect)("/app/uploaded/downloadStatus/".concat(e.status))):this._scheduleDownloadStatus()}}s.default=({downloadInProgress:e,data:s,searchFilters:t})=>{const n=a.Locale.getSection("admin.controllers.app.uploaded"),i=a.Locale.getSection("admin.components.lists.appuploaded");e&&new o({renderTo:"content-body",renderMode:"top",message:n.lmsg("downloadInProgress")}),new a.Hint({renderTo:"main",hint:n.lmsg("hint")}),new a.Panel({cls:"list-box",renderTo:"main",items:[new a.List({data:s,searchFilters:t,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:()=>{(0,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:()=>{(0,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=>{(0,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:s,version:t,release:n,visible:o,configured:l})=>{let p=1!=o?' <span class="hint-attention ">'.concat(i.lmsg("appInvisible"),"</span>"):"";return p+=1!=l?' <span class="hint-attention ">'.concat(i.lmsg("appGlobalSettingsNotSet"),"</span>"):"",'<a href="'.concat((0,a.prepareUrl)("/app/info/id/".concat(e)),'">')+"".concat((0,a.escapeHtml)(s)," (").concat((0,a.escapeHtml)(t),"-").concat((0,a.escapeHtml)(n),")")+"</a>".concat(p)}},{header:i.lmsg("numberOfInstances"),sortable:!0,dataIndex:"numberOfInstances",renderer:({numberOfInstances:e})=>(0,a.escapeHtml)(e)}]})]})}}}]);
//# sourceMappingURL=uploaded.js.map?fe85005282119502428b