(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/app/info"],{774:(e,t,s)=>{"use strict";s.r(t);var a=s(153),r=s(260),n=s.n(r),i=s(143),l=s(608),o=s(576),d=s(775);const p=i.Locale.getSection("admin.controllers.app.info"),u=({...e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.default,null,(()=>new i.Hint({hint:p.lmsg("hint")}))),(0,a.createElement)(o.default,null,(()=>(0,d.default)(e))));u.propTypes={packageId:n().string.isRequired,updatesList:n().array.isRequired,data:n().object.isRequired,searchFilters:n().object.isRequired,dataUrl:n().string.isRequired,isClassicMode:n().bool.isRequired,hasSettings:n().bool},u.defaultProps={hasSettings:!1},t.default=(0,l.withPageLayout)(u)},775:(e,t,s)=>{"use strict";s.r(t);var a=s(143);const r=a.Locale.getSection("admin.components.lists.appinfo");t.default=({packageId:e,updatesList:t,data:s,dataUrl:n,searchFilters:i,hasSettings:l,isClassicMode:o})=>new a.Panel({cls:"list-box",items:[new a.List({data:s,dataUrl:n,searchFilters:i,id:"admin-app-info-list",searchOveral:"installedAt",operations:[l?{componentType:a.SmallButton,title:r.lmsg("buttonChangeSettings"),description:r.lmsg("buttonChangeSettingsDescription"),addCls:"sb-app-configure",href:`/app/configure/id/${e}`}:null,s.data.length?{componentType:a.SmallButton,id:"buttonCheckForUpdates",title:r.lmsg("buttonCheckForUpdates"),description:r.lmsg("buttonCheckForUpdatesDescription"),addCls:"sb-upload-new-app",handler:()=>{new Ajax.Request((0,a.prepareUrl)("/app/get-updates-data/"),{method:"post",parameters:{ids:e},onSuccess:({responseText:e})=>{(0,a.clearStatusMessages)(),t=JSON.parse(e);let s=r.lmsg(t.length?"foundUpdates":"noUpdates");document.querySelectorAll(".update-available").forEach((e=>{e.style.display="none"})),t.forEach((({resourceId:e,name:t,version:a})=>{s+=`<br>${t} ${a}`;const r=document.getElementById(`app-info-update-${e}`);r&&(r.style.display="")})),(0,a.addStatusMessage)("info",s)},onFailure:()=>{(0,a.addStatusMessage)("error",r.lmsg("updateFailed"))}})}}:null],columns:[{header:r.lmsg("installedAt"),sortable:!0,dataIndex:"installedAt",renderer(s){const n=`/app-update/index/resourceId/${s.resourceId}`,i=(0,a.prepareUrl)(`/app/info/id/${(0,a.escapeHtml)(e)}`),l=(0,a.prepareUrl)(`/subscription/login/id/${s.subscriptionId}?pageUrl=${n}&returnUrl=${i}`),o=s.installedAt?`<a href="${(0,a.escapeHtml)(s.installedAt)}" target="_top">${(0,a.escapeHtml)(s.installedAt)}</a>`:r.lmsg("noInstallationUrlAvailable"),d=(p=s.resourceId,t.some((({resourceId:e})=>e===p))?"":' style="display:none"');var p;const u=`<div id="app-info-update-${(0,a.escapeHtml)(s.resourceId)}" class="hint-attention update-available" ${d}<a href="${l}" target="${"admin"!==s.subscriptionOwnerType?"_blank":"_top"}">${r.lmsg("update")}</a></div>`;let c="";return s.notConfigured&&(c=` <span class="hint-attention ">${r.lmsg("appNotConfigured")}</span>`),o+u+c}},{header:r.lmsg("subscriptionName"),sortable:!0,dataIndex:"subscriptionName",renderer:e=>`<a href="${(0,a.prepareUrl)(`/subscription/overview/id/${e.subscriptionId}`)}">${(0,a.escapeHtml)(e.subscriptionName)}</a>`},o?{header:r.lmsg("subscriptionOwner"),sortable:!0,dataIndex:"subscriptionOwner",renderer(e){if("admin"===e.subscriptionOwnerType)return(0,a.escapeHtml)(e.subscriptionOwner);let t="";return t="reseller"===e.subscriptionOwnerType?(0,a.prepareUrl)("/reseller/overview/id/"):(0,a.prepareUrl)("/customer/overview/id/"),`<a href="${t}${e.subscriptionOwnerId}">${(0,a.escapeHtml)(e.subscriptionOwner)}</a>`}}:null,o?{header:"",sortable:!1,renderer(t){let s="hintLoginClassicMode";return o||(s="admin"===t.subscriptionOwnerType?"hintAdminLogin":"hintLogin"),(0,a.getControlPanelLoginHtml)(t.subscriptionId,{openInNew:"admin"!==t.subscriptionOwnerType,label:r.lmsg(o?"buttonLoginClassicMode":"buttonLogin"),hint:r.lmsg(s),returnUrl:"admin"===t.subscriptionOwnerType?`/app/info/id/${e}`:null,isClassicUi:o?"true":"false"})}}:null].filter((e=>e))})]})},773:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a.default});var a=s(774)}}]);
//# sourceMappingURL=info.js.map?cc2b2c1c5d10f9b767de