summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/5100.70bf09de4a0223d97932.chunk.js
blob: b56dde4428530e8cacc1f43abd0bdf2a3b8c4c27 (plain)
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]="e073a29c-fd8e-4724-8d9c-9c0d3b9bac7c",e._sentryDebugIdIdentifier="sentry-dbid-e073a29c-fd8e-4724-8d9c-9c0d3b9bac7c")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5100],{95665:function(e,t,n){n.d(t,{Z:function(){return Be}});var r=n(87462),o=n(29439),a=n(45987),i=(n(66992),n(41539),n(33948),n(92222),n(67294)),l=n(65565),c=n(28789),u=n(69119),s=n(83894),d=n(93416),m=n(92432),f=n(46667),p=n(23109),g=(n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),v=n(71893);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var b=(0,v.default)(d.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({position:"relative",width:{min:200},height:{min:45},column:!0,background:"dropdown",color:"text",zIndex:60,round:!0,alignItems:"end"},e)})).withConfig({displayName:"styled__PickerBox",componentId:"sc-gwjt9o-0"})([""]),y=v.default.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"sc-gwjt9o-1"})(["margin-bottom:",";cursor:pointer;width:187px;height:",";&:last-of-type{margin-bottom:0;}& > span:hover{color:",";}"],(0,d.getSizeBy)(1.5),(0,d.getSizeBy)(2),(0,d.getColor)("textLite")),w=(0,v.default)(d.Flex).attrs((function(e){return{color:e.isSelected?"primary":"text",margin:[2,6,0]}})).withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"sc-gwjt9o-2"})(["cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],(0,d.getColor)("textLite")),E=(0,v.default)(d.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},color:"text",flexWrap:!1,height:8,justifyContent:"center",padding:[2,0],round:1,width:22}).withConfig({displayName:"styled__TimePeriodDropdownButton",componentId:"sc-gwjt9o-3"})([""]),C=(0,v.default)(d.Drop).attrs({background:"mainBackground",column:!0,overflow:{vertical:"auto"},margin:[.5,0,0],padding:[2,0],round:1}).withConfig({displayName:"styled__TimePeriodDrop",componentId:"sc-gwjt9o-4"})([""]),x=(0,v.default)(d.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,d.getColor)("text")),O=v.default.input.withConfig({displayName:"styled__CustomInput",componentId:"sc-gwjt9o-6"})(["border:1px solid ",";background:",";box-sizing:border-box;border-radius:4px;color:",";height:32px;margin-left:10px;margin-right:10px;outline:none;padding:4px;width:32px;&:focus{border:1px solid ",";}"],(0,d.getColor)("border"),(0,d.getColor)("mainBackground"),(0,d.getColor)("text"),(0,d.getColor)("primary")),k=(0,v.default)(d.Drop).attrs({background:"dropdown",round:2,margin:[.5,0,0],border:{side:"all",color:"borderSecondary"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"sc-gwjt9o-7"})([""]),Z=(0,v.default)(d.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["width:100%;"]),S=v.default.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-gwjt9o-9"})(["background:",";border:0;&.react-datepicker{background:",";border:0;}.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__month-container{height:260px;}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],(0,d.getColor)("dropdown"),(0,d.getColor)("dropdown"),(0,d.getColor)("text"),(0,d.getColor)("dropdown"),(0,d.getColor)("main"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("elementBackground"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("primary"),(0,d.getColor)("elementBackground"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8)),P=function(e){var t=e.value,n=e.period,r=e.resolution,o=e.isSelected,a=e.setTimeRange,l=e.tagging,c=(0,i.useCallback)((function(){return a(t,r)}),[t,r]);return i.createElement(y,{key:t,onClick:c,"data-ga":"date-picker::click-quick-selector::".concat(l,"::").concat(-t),"data-testid":"timePeriod-value"},i.createElement(d.Text,{color:o?"primary":"text"},n))},I=(0,i.memo)(P),j=(n(39714),n(83112),n(66528),n(29422)),D=n(99982),N=n(49546),T=n(38431),F=n(76417),M=n(12195),_=60,L=3600,A=86400,B=["minutes","hours","days","months"],R={minutes:_,hours:L,days:A,months:2592e3},V=function(e,t){return Math.round(e/R[t])},U=function(e,t){var n=(0,j.Z)(new Date(0),(0,g.Z)({},t,e));return-(0,D.Z)(n)},z={startDate:"start",endDate:"finish"},H=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 10 minutes",value:-600,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last hour",value:-3600,resolution:"hours"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last day",value:-A,resolution:"days"},{period:"Last 2 days",value:-2*A,resolution:"days"},{period:"Last 7 days",value:-7*A,resolution:"days"}],W=function(e,t){var n=(0,T.Z)(e,"MMMM d yyyy, H:mm")?e:(0,F.default)(e,"MMMM d yyyy, H:mm",Date.now());return(0,F.default)("".concat(n," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),n=t[0]>0?"+":"-",r=Math.abs(t[0]).toString(),o="".concat(n).concat(r.padStart(2,0));return t.length>1?"".concat(o,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(o,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},G=