diff options
Diffstat (limited to 'src/web/gui/v2/8505.b10bf3549c213fe15d55.chunk.js')
-rw-r--r-- | src/web/gui/v2/8505.b10bf3549c213fe15d55.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/8505.b10bf3549c213fe15d55.chunk.js b/src/web/gui/v2/8505.b10bf3549c213fe15d55.chunk.js new file mode 100644 index 000000000..ff2663285 --- /dev/null +++ b/src/web/gui/v2/8505.b10bf3549c213fe15d55.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="368bde50-4a85-43ce-83bc-c6aa0712f1d0",e._sentryDebugIdIdentifier="sentry-dbid-368bde50-4a85-43ce-83bc-c6aa0712f1d0")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[8505],{8505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});n(62953);var a=n(96540),r=n(84929),o=n(16074),l=n(63933),i=n(82526),d=n(48168),c=n(87991),s=n(26655),u=n(47444),f=n(10058),p=n(5396),g=n(4659),b=n(87659);const m=(0,u.gD)({key:"fetchLicense",get:()=>s.A.get("/api/v1/license").then((e=>e.data)).catch((()=>null))}),w=(0,u.eU)({key:"licenseAtom",default:m}),y=()=>{if(!window.envSettings.onprem)return null;const e=(0,u.xf)(w),[t,n]=(0,b.A)(),[s,m]=(0,a.useState)(),[y,E]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if("hasValue"!==e.state)return;const t=e.contents,a=(0,r.H)(t.exp);if(m(a),!(0,o.f)(a))return;const i=parseInt((a-new Date)/1e3/60/60/24);if(i>30)return;const d=localStorage.getItem("dismissLicenceWarning");d&&(0,o.f)((0,r.H)(d))&&!(0,l.R)((0,r.H)(d))&&i>0||(n(!0),i<0&&E(!0))}),[e]),t?y?a.createElement(f.Layer,{full:!0,backdropProps:{backdropBlur:"3px"}},a.createElement(p.A,{testId:"onprem-banner",width:"100%",background:"errorBackground",position:"absolute",top:"0",tooltipProps:{align:"top"},zIndex:20},a.createElement(f.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},a.createElement(f.Text,null,"Your Netdata Enterprise On-prem License has expired on ",(0,c.GP)(s,"PPPP"),". Please contact your admin /"," ",a.createElement(g.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main"},"billing@netdata.cloud")," ","to renew your license.")))):a.createElement(p.A,{testId:"onprem-banner",width:"100%",background:"warningBackground",position:"absolute",top:"0",onClose:()=>{n(),localStorage.setItem("dismissLicenceWarning",(0,i.W)(new Date,{days:1}).toISOString())},tooltipProps:{align:"top"},zIndex:20},a.createElement(f.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},a.createElement(f.Text,null,"Your Netdata Enterprise On-prem License will expire in ",(0,d.m)(s),". Please contact your admin /"," ",a.createElement(g.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main"},"billing@netdata.cloud")," ","to renew your license."))):null}}}]);
\ No newline at end of file |