1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[968],{24363(e,t,a){a.r(t),a.d(t,{default:()=>P});var s=a(75832),r=a(42059),n=a(22915),o=a(66251),i=a(57425),u=a(56896),d=a(64351),l=a(42496),p=a(96967),g=a(62207),c=a(11288),h=a(3760),f=a(48837),m=a(59946),A=a(57415),y=a.n(A),M=a(51509),U=a(98675);var b=a(38914),C=a(55894),w=a(12536),S=a(23049),v=a(7260),k=a(46560),R=a.n(k),_=a(53714),I=s.createElement;const D=(0,h.defineMessages)({back:{id:"Back",defaultMessage:"Back"},upgradeInformation:{id:"Upgrade Plone Site",defaultMessage:"Upgrade Plone Site"},upgrade:{id:"Upgrade Plone Site",defaultMessage:"Upgrade Plone Site"},upgradeSuccess:{id:"Your site is up to date.",defaultMessage:"Your site is up to date."},dryRunSuccess:{id:"Dry run selected, transaction aborted.",defaultMessage:"Dry run selected, transaction aborted."},upgradeError:{id:"There was an error with the upgrade.",defaultMessage:"There was an error with the upgrade."}}),B=({title:e,steps:t})=>{const a=t.map((e=>e.title));return I(u.A,null,I(u.A.Header,null,e),I(u.A.List,{items:a}))};class L extends s.Component{constructor(e){super(e),this.runUpgrade=this.runUpgrade.bind(this),this.state={isClient:!1,dryRun:!1}}componentDidMount(){this.props.getUpgradeInformation(),this.props.getSystemInformation(),this.setState({isClient:!0,dryRun:!1})}runUpgrade(e){this.props.runUpgrade(e).then((()=>{e?_.toast.success(I(w.A,{success:!0,title:this.props.intl.formatMessage(D.upgrade),content:this.props.intl.formatMessage(D.dryRunSuccess)})):(this.props.getUpgradeInformation(),_.toast.success(I(w.A,{success:!0,title:this.props.intl.formatMessage(D.upgrade),content:this.props.intl.formatMessage(D.upgradeSuccess)})))})).catch((()=>{_.toast.error(I(w.A,{error:!0,title:this.props.intl.formatMessage(D.upgrade),content:this.props.intl.formatMessage(D.upgradeError)}))}))}render(){const e=this.props.upgradeInformation,t=e?Object.entries(e.upgrade_steps):null;return e?I(d.A,{id:"upgrade-page",className:"controlpanel-upgrade"},I(b.A,{title:this.props.intl.formatMessage(D.upgradeInformation)}),I(l.A.Group,{raised:!0},I(l.A,{className:"primary"},I(f.A,{id:"Upgrade Plone Site",defaultMessage:"Upgrade Plone Site"})),I(l.A,{className:"secondary"},I(f.A,{id:"More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide.",defaultMessage:"More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide."})),I(u.A,{attached:!0},I(u.A.Header,null,I(f.A,{id:"Configuration Versions",defaultMessage:"Configuration Versions"}))),I(l.A,null,e.versions.fs===e.versions.instance?I(u.A,{attached:!0,success:!0},I(f.A,{id:"Your site is up to date.",defaultMessage:"Your site is up to date."})):I(u.A,{attached:!0,warning:!0},I(f.A,{id:"The site configuration is outdated and needs to be upgraded.",defaultMessage:"The site configuration is outdated and needs to be upgraded."})),I(p.A,{celled:!0,padded:!0,columns:"2"},I(p.A.Body,null,I(p.A.Row,null,I(p.A.Cell,null,I(f.A,{id:"Current active configuration",defaultMessage:"Current active configuration"})),I(p.A.Cell,null,e.versions.instance)),I(p.A.Row,null,I(p.A.Cell,null,I(f.A,{id:"Latest available configuration",defaultMessage:"Latest available configuration"})),I(p.A.Cell,null,e.versions.fs))))),t.length>0&&I(s.Fragment,null,I(u.A,{attached:!0},I(u.A.Header,null,I(f.A,{id:"Upgrade Steps",defaultMessage:"Upgrade Steps"})),I(u.A.Content,null,I(f.A,{id:"The following list shows which upgrade steps are going to be run. Upgrading sometimes performs a catalog/security update, which may take a long time on large sites. Be patient.",defaultMessage:"The following list shows which upgrade steps are going to be run. Upgrading sometimes performs a catalog/security update, which may take a long time on large sites. Be patient."}))),I(l.A,null,I(d.A,null,y()(t,(e=>[I(B,{key:e[0],title:e[0],steps:e[1]})]))),I(u.A,{negative:!0},I(f.A,{id:"Please ensure you have a backup of your site before performing the upgrade.",defaultMessage:"Please ensure you have a backup of your site before performing the upgrade."})),I(g.A.Checkbox,{onChange:(e,t)=>
1this.setState({dryRun:t.checked}),checked:this.state.dryRun,label:"Dry run mode"}),I("br",null),I(c.A,{"aria-label":this.props.intl.formatMessage({id:"Upgrade",defaultMessage:"Upgrade"}),onClick:()=>this.runUpgrade(this.state.dryRun),primary:!0},I(f.A,{id:"Upgrade",defaultMessage:"Upgrade"})))),this.props.upgradeReport?I(s.Fragment,null,I(u.A,{attached:!0},I(u.A.Header,null,I(f.A,{id:"Upgrade Report",defaultMessage:"Upgrade Report"}))),I(l.A,null,I("pre",null,this.props.upgradeReport.report))):null,I(u.A,{attached:!0},I(u.A.Header,null,I(f.A,{id:"Version Overview",defaultMessage:"Version Overview"}))),I(l.A,null,this.props.systemInformation?I(v._s,this.props.systemInformation):null)),this.state.isClient&&(0,i.createPortal)(I(S.A,{pathname:this.props.pathname,hideDefaultViewButtons:!0,inner:I(s.Fragment,null,I(o.N_,{to:"/controlpanel",className:"item"},I(C.A,{name:R(),"aria-label":this.props.intl.formatMessage(D.back),className:"contents circled",size:"30px",title:this.props.intl.formatMessage(D.back)})))}),document.getElementById("toolbar"))):null}}const P=(0,n.compose)(m.Ay,(0,r.connect)(((e,t)=>({upgradeInformation:e.upgrade.upgradeinformation,pathname:t.location.pathname,systemInformation:e.controlpanels.systeminformation,upgradeReport:e.upgrade.upgradereport})),{getUpgradeInformation:function(){return{type:U.Cy,request:{op:"get",path:"/@upgrade"}}},getSystemInformation:M.Ck,runUpgrade:function(e){return{type:U.uC,request:{op:"post",path:"/@upgrade",data:{dryRun:e}}}}}))(L)}}]); 2//# sourceMappingURL=plone-volto-components-manage-Controlpanels-UpgradeControlPanel.a7a89b3e.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.