(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["views/default/scheduler/list"],{1115:function(e,t,n){"use strict";n.r(t);var s=n(145);t.default=({tasksList:e,serverWide:t})=>{const c=s.Locale.getSection("components.lists.scheduler.tasks"),o={exec:n(564),http:n(1116),php:n(1117)};new s.Panel({cls:"list-box",renderTo:"main",items:[new s.List({...e,id:"scheduler-tasks",columns:[s.list.COLUMN_SELECTION,{header:c.lmsg("headerCommand"),sortable:!0,dataIndex:"command",renderer(e){const t="/scheduler/edit-task/id/".concat(encodeURIComponent(e.id)),n=e.description?'<div class="hint-sub hint">'.concat(Object(s.escapeHtml)(e.description),"</div>"):"";return"<a href=".concat(Object(s.prepareUrl)(t),">")+'<img src="'.concat(o[e.type],'" />')+"<span>".concat(Object(s.escapeHtml)(e.command+(e.arguments?" ".concat(e.arguments):"")),"</span>")+"</a>".concat(n)}},{header:c.lmsg("headerSchedule"),sortable:!0,dataIndex:"period",cls:"nowrap",renderer(e){const t="/scheduler/toggle-task/id/".concat(encodeURIComponent(e.id),"/turn/").concat("1"===e.isActive?"off":"on"),o="1"===e.isActive?n(936):n(792),a=Object(s.escapeHtml)(e.schedule.trim()).replace(/\((.*)\)/,'<span class="hint">($1)</span>');return'<span class="tooltipData">'.concat("1"===e.isActive?c.lmsg("buttonToggleHintOn"):c.lmsg("buttonToggleHintOff"),"</span>")+'<a href="'.concat(Object(s.prepareUrl)(t),'" data-method="post">')+'<img src="'.concat(o,'" />')+"</a>".concat(a)}},t.showSubscription?{header:c.lmsg("headerSubscription"),sortable:!0,dataIndex:"domainName",renderer(e){if(!e.domainName)return c.lmsg("serverTask",{user:e.sysUserLogin?Object(s.escapeHtml)(e.sysUserLogin):c.lmsg("unknownUser")});const n=t.subscriptionLink?t.subscriptionLink.replace(/%%id%%/,encodeURIComponent(e.domainId)):null;return n?'<a href="'.concat(n,'">').concat(Object(s.escapeHtml)(e.domainName),"</a>"):Object(s.escapeHtml)(e.domainName)}}:"",{header:"",sortable:!1,renderer:e=>new s.Button({renderTo:document.body,title:c.lmsg("runTaskNow"),description:c.lmsg("runTaskNowHint"),cls:"s-btn sb-task-run-now",handler:t=>{const n=Object(s.escapeHtml)(e.command).replace(/"/g,"&quot;"),o=c.lmsg("runningTask"),a=Object(s.getComponent)("asyncProgressBarWrapper"),r=a.fly(Element.cumulativeOffset(t.target),o.replace("%%task%%",Object(s.escapeHtml)(n)),(function(){s.api.post(Object(s.prepareUrl)("/scheduler/run-task"),{id:e.id}).then((function(){a.removePreparingItem(r),a.update()}))}))}})}],operations:[{componentType:s.SmallButton,id:"buttonAddTask",title:c.lmsg("add"),description:c.lmsg("hintAdd"),addCls:"sb-task-add",href:"/scheduler/add-task"},{componentType:s.SmallButton,id:"buttonSync",title:c.lmsg("sync"),description:c.lmsg("hintSync"),addCls:"sb-refresh",handler(){Object(s.getComponent)("scheduler-tasks").disable(),s.api.post(Object(s.prepareUrl)("/scheduler/refresh")).then(()=>{s.api.post(Object(s.prepareUrl)("/scheduler/sync")).then(()=>{Object(s.getComponent)("scheduler-tasks").reload()}).catch(()=>{Object(s.getComponent)("scheduler-tasks").enable()})})}},{componentType:s.bar.Separator},{componentType:s.SmallButton,id:"buttonRemoveTask",title:c.lmsg("remove"),description:c.lmsg("hintRemove"),addCls:"sb-remove-selected",handler(e){Object(s.getComponent)("scheduler-tasks").execGroupOperation({url:"/scheduler/delete",subtype:"delete",mouseEvent:e,locale:{confirmOnGroupOperation:c.lmsg("confirmOnDelete")}})}},{componentType:s.bar.Separator},{componentType:s.SmallButton,id:"buttonSettings",title:c.lmsg("settings"),description:c.lmsg("hintSettings"),addCls:"sb-settings",href:"/scheduler/settings"}]})]})}},1116:function(e,t){e.exports=Jsw.skinUrl+"/icons/16/plesk/web.png?81ffe26a62cd93520c381c205cfc08f8"},1117:function(e,t){e.exports=Jsw.skinUrl+"/icons/16/plesk/php.png?f73ac111074ad961fcae73bdf43e0354"},792:function(e,t){e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},936:function(e,t){e.exports=Jsw.skinUrl+"/icons/16/plesk/on.png?7f7c68cae29103cdfe0278b2fc8d1d9f"}}]);
//# sourceMappingURL=list.js.map?b3167c6883c6d27e3ca7