mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[6901],{26901:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var n=a(72791),s=a(99779),o=a(29945),d=a(78687),r=a(56028),l=a(44690),i=a(54756),c=a(23814),u=a(80184);const w=e=>{let{closeModalAndRefresh:t,open:a,bucketName:w}=e;const b=(0,l.TL)(),h=(0,d.v9)((e=>e.objectBrowser.rewind.rewindEnabled)),j=(0,d.v9)((e=>e.objectBrowser.rewind.dateToRewind)),[x,S]=(0,n.useState)(!1),[k,m]=(0,n.useState)(!0),[p,f]=(0,n.useState)(s.ou.fromJSDate(new Date));(0,n.useEffect)((()=>{h&&(m(!0),f(s.ou.fromISO(j||s.ou.now().toISO()||"")))}),[h,j]);return(0,u.jsx)(r.Z,{modalOpen:a,onClose:()=>{t()},title:"Rewind - ".concat(w),children:(0,u.jsxs)(o.ltY,{withBorders:!1,containerPadding:!1,children:[(0,u.jsx)(o.YgR,{value:p,onChange:e=>e?f(e):null,id:"rewind-selector",label:"Rewind to",timeFormat:"24h",secondsSelector:!1,disabled:!k}),h&&(0,u.jsx)(o.rsf,{value:"status",id:"status",name:"status",checked:k,onChange:e=>{m(e.target.checked)},label:"Current Status",indicatorLabels:["Enabled","Disabled"]}),(0,u.jsx)(o.rjZ,{item:!0,xs:12,sx:c.ID.modalButtonBar,children:(0,u.jsx)(o.zxk,{type:"button",variant:"callAction",disabled:x||!p&&k,onClick:()=>{!k&&h?b((0,i._w)()):(S(!0),b((0,i.SV)({state:!0,bucket:w,dateRewind:p.toISO()}))),b((0,i.$3)(!0)),t()},id:"rewind-apply-button",label:!k&&h?"Show Current Data":"Show Rewind Data"})}),x&&(0,u.jsx)(o.rjZ,{item:!0,xs:12,children:(0,u.jsx)(o.kod,{})})]})})}}}]);
|
|
//# sourceMappingURL=6901.bc8e3c58.chunk.js.map
|