1(globalThis.webpackChunkvar=globalThis.webpackChunkvar||[]).push([[1569],{74246(t,e,s){s.d(e,{A:()=>l});var i=s(85186),a=s(64810),r=s(72234),n=s.n(r),o=s(18815);class l extends a.Component{constructor(t){super(t),this.state={value:t.value}}componentDidUpdate(t){t.value!==this.props.value&&this.setState({value:this.props.value})}render(){return(0,i.jsx)("span",{className:"cwm-select",children:(0,i.jsx)("select",{name:"pageSizeSelect",disabled:this.props.disabled,onChange:this.onChange.bind(this),value:this.state.value,children:o.B.sizes.map(t=>(0,i.jsx)("option",{value:t,children:t},t))})})}onChange(t){const e=parseInt(t.target.value,10);this.setState({value:e}),this.props.fnChange(e)}}l.propTypes={value:n().number.isRequired,small:n().bool,fnChange:n().func.isRequired,disabled:n().bool},l.defaultProps={disabled:!1}},86071(t,e,s){s.d(e,{A:()=>h});var i=s(85186),a=s(64810),r=s(74246),n=s(81160),o=s(72234),l=s.n(o);class h extends a.Component{constructor(t){super(t),this.pageSizeSelected=this.pageSizeSelected.bind(this),this.previousPageClicked=this.previousPageClicked.bind(this),this.nextPageClicked=this.nextPageClicked.bind(this)}paginationText(){let t=this.props.itemKindLabel?this.props.itemKindLabel:this.props.itemKind;if(this.props.subPagination)return 0!==this.props.total?`Showing ${this.props.firstElement} - ${this.props.lastElement} ${this.props.itemKind}`:`Showing 0 - ${this.props.lastElement} ${this.props.itemKind}`;const e=this.props.filter.replace(/,/g,",â");return 0!=this.props.total?e?`Showing ${this.props.firstElement} - ${this.props.lastElement} filtered by keyword [${e}],\ntotal of ${this.props.total} ${t}`:`Showing ${this.props.firstElement} - ${this.props.lastElement} of ${this.props.total} ${t}`:e?`Showing 0 - ${this.props.lastElement} filtered by keyword [${e}],\ntotal of ${this.props.total} ${t}`:`Showing 0 - ${this.props.lastElement} of ${this.props.total} ${t}`}render(){const t=!!this.props.isSplit;let e=!0;this.props.previous&&this.props.next&&this.props.previous.props.style&&"hidden"===this.props.previous.props.style.visibility&&this.props.next.props.style&&"hidden"===this.props.next.props.style.visibility&&(e=!1);let s=(0,i.jsx)("div",{className:this.props.subPagination?"col-xs-12 col-sm-7 padding-right-0 padding-left-0 subPagination-buttons-width-200":t?"col-xs-12 padding-right-0 margin-bottom-25":"col-xs-12 col-sm-4 padding-right-0",children:(0,i.jsxs)("div",{className:"pull-right text-right",children:[this.props.previous,this.props.next]})});e||(s="");let a="col-xs-12 pagination-margin padding-left-0 ";this.props.subPagination?a+="margin-bottom-5 subPagination-width":a+=!e||t?"col-sm-12":"col-sm-8";const n=(0,i.jsx)("div",{className:a,children:this.props.showInfo?(0,i.jsxs)("label",{className:"text-black white-space",children:[this.paginationText(),",",(0,i.jsx)("div",{className:"btn-group hidden-sm hidden-md hidden-lg margin-left-10",children:(0,i.jsx)(r.A,{disabled:this.props.disablePagination,value:this.props.size,small:!0,fnChange:this.pageSizeSelected})}),(0,i.jsx)("div",{className:"btn-group margin-left-10 hidden-xs",children:(0,i.jsx)(r.A,{disabled:this.props.disablePagination,value:this.props.size,fnChange:this.pageSizeSelected})}),(0,i.jsx)("span",{className:"no-wrap",children:"Per page"})]}):null});return t?(0,i.jsxs)("div",{className:"row margin-top-20"+(this.props.subPagination?" pagination-indicator-history":""),children:[s,n]}):(0,i.jsxs)("div",{className:"row margin-top-20",children:[n,s]})}pageSizeSelected(t){n.A.setPaginationItemsSize(this.props.itemKind,t),this.props.fnSizeChange(t)}previousPageClicked(){this.props.fnPreviousClicked()}nextPageClicked(){this.props.fnNextClicked()}}h.propTypes={filter:l().string,size:l().number.isRequired,firstElement:l().number,lastElement:l().number,total:l().number,next:l().any,previous:l().any,itemKind:l().string,itemKindLabel:l().string,fnSizeChange:l().func.isRequired,isSplit:l().bool,showInfo:l().bool,subPagination:l().bool,disablePagination:l().bool},h.defaultProps={showInfo:!0,subPagination:!1,disablePagination:!1}},31569(t,e,s){s.r(e),s.d(e,{default:()=>x});var i=s(85186),a=s(64810),r=s(18654),n=s(38578),o=s(16598),l=s(81160),h=s(48694),d=s(42195),p=s(86071),c=s(72234),m=s.n(c),u=s(81529),g=s(58709);class x extends a.Component{constructor(t){super(t),this._isActive=!0,this._fnChange=this.onChange.bind(this),this.state={nextClick:!1,prevClick:!1,status:l.A.DATA_INIT,data:null,error:null,fromDate:null,toDate:null,pickDate:!1,hFromDt:null,hToDt:null,warning:null,hFilter:null},this.itemKind="logs",this.usersItemKind="users"}componentWillReceiveProps(t){t.location&&t.location.query&&this.props.location&&(0===Object.keys(this.props.location.query).length||t.location.query.filter===this.props.location.query.filter&&t.location.query.from===this.props.location.query.from&&t.location.query.nItems===this.props.location.query.nItems)&&this.listItems(t)}componentDidMount(){this._isActive=!0,d.A.on(l.A.DATA_CHANGE,this._fnChange);const t=this.listItemsParams();if(t.hToDt&&!this.isTimeStampValid(1e3*t.hToDt)||t.hFromDt>t.hToDt){const t=this.getCurrentPath();this.context.router.push({pathname:t,query:Object.assign({},this.listItemsParams(),{hFromDt:"",hToDt:"",hNext:1,hSkip:0,hFrom:"",hFilter:""})})}else this.listItems()}componentWillUnmount(){d.A.removeListener(l.A.DATA_CHANGE,this._fnChange),this._isActive=!1}onChange(){let t=d.A.historyLoading();t===l.A.DATA_LOADED&&this._isActive?this.setState({status:t,data:d.A.historyData()}):this.setState({status:t})}renderError(){if(!this.state.error)return null;let t=n.A.errorMessage(this.state.error);return(0,i.jsx)(g.A,{type:"error",message:t})}filterDates(){const t=this.state.data&&this.state.data.items&&this.state.data.items.length>0;let e=this.state.toDate||t&&this.convertToISOString(this.state.data.items[0].dt)||new Date,s=this.state.fromDate||t&&this.convertToISOString(this.state.data.items[this.state.data.items.length-1].dt)||new Date;e=new Date(e),s=new Date(s),e.setUTCHours(23,59,59,0),s.setUTCHours(0,0,0,0);const i=(e.getTime()/1e3).toFixed(),a=(s.getTime()/1e3).toFixed();this.setState({pickDate:!0,hToDt:e.toISOString(),hFromDt:s.toISOString(),warning:null});const r=this.getCurrentPath();this.context.router.push({pathname:r,query:Object.assign({},this.listItemsParams(),{hFrom:i,hNext:1,hSkip:0,hFromDt:a,hToDt:i})})}listItems(t=null){const e=this.listItemsParams(t);h.A.getHistoryRows(this.props.params.userId,e.hNItems,e.hFrom,e.hNext,e.hSkip,e.hToDt,e.hFromDt,e.hFilter)}sizeChanged(t){const e=this.getCurrentPath();let s=e.hToDt||null;this.context.router.push({pathname:e,query:Object.assign({},this.listItemsParams(),{hNItems:t,hNext:1,skip:0,hFrom:s})})}listItemsParams(t=null){return t||(t=this.props),{hNItems:parseInt(t.location.query.hNItems||l.A.getLocalPaginationItemsSize(this.itemKind)),hFrom:t.location.query.hFrom||"",hFilter:t.location.query.hFilter||"",hNext:t.location.query.hNext>1?t.location.query.hNext:1,hSkip:t.location.query.hSkip||0,auxFilter:t.params.site||"0",filter:t.location.query.filter||"",nItems:parseInt(t.location.query.nItems||l.A.getLocalPaginationItemsSize(this.usersItemKind)),from:t.location.query.from||"",hFromDt:this.isTimeStampValid(t.location.query.hFromDt)||"",hToDt:this.isTimeStampValid(t.location.query.hToDt)}}itemSelected(t){this.setState({hFilter:t.target.value});const e=this.getCurrentPath();let s=e.hToDt||null;this.context.router.push({pathname:e,query:Object.assign({},this.listItemsParams(),{hFilter:t.target.value,hNext:1,hSkip:0,hFrom:s})})}renderPagination(){if(!this.state.data)return;const t=this.state.status!==l.A.DATA_LOADED||!this.state.data||this.props.params.userId!==this.state.data.userId;let e=this.listItemsParams();const s=this.getCurrentPath();let a=this.props.location.query.hNItems&&this.state.data.size.toString()!==this.props.location.query.hNItems,n=(this.state.nextClick||this.state.prevClick)&&this.state.data.from!==this.props.location.query.hFrom&&this.props.location.query.hFrom&&(1!==this.state.data.firstElement||this.state.nextClick),o=this.state.nextClick&&n?(0,i.jsxs)("span",{children:["Loading",(0,i.jsx)("i",{className:"fa spinner"})]}):(0,i.jsxs)(i.Fragment,{children:["Next",(0,i.jsx)("i",{className:"fal fa-angle-double-right margin-left-7"})]}),h=this.state.prevClick&&n?(0,i.jsxs)("span",{children:["Loading",(0,i.jsx)("i",{className:"fa spinner"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("i",{className:"fal fa-angle-double-left margin-right-7"}),"Previous"]}),d=t?null:(0,i.jsx)(r.N_,{to:{pathname:s,query:Object.assign({},e,{hFrom:this.state.data.nextDate},{hNext:this.state.data.next},{hSkip:this.state.data.nextSkip})},onClick:()=>{this.setState({status:l.A.DATA_LOADING,nextClick:!0,prevClick:!1})},disabled:n||a,className:"btn btn-default btn-squared text-dark margin-left-5",style:{visibility:this.state.data.nextDate?"visible":"hidden"},children:o}),c=(0,i.jsx)(r.N_,{to:{pathname:s,query:Object.assign({},e,{hFrom:this.state.data.prevDate},{hNext:this.state.data.firstElement-this.state.data.size>1?this.state.data.firstElement-this.state.data.size:1},{hSkip:this.state.data.prevSkip})},onClick:()=>{this.setState({status:l.A.DATA_LOADING,prevClick:!0,nextClick:!1})},disabled:n||a,className:"btn btn-default btn-squared text-dark",style:{visibility:this.state.data.prevDate?"visible":"hidden"},children:h});return this.state.data.items.length>0||this.state.data.filter?(0,i.jsx)(p.A,{filter:this.state.data.filter,size:this.state.data.size,firstElement:this.state.data.firstElement,lastElement:this.state.data.lastElement,total:this.state.data.total,next:d,previous:c,itemKind:this.itemKind,fnSizeChange:this.sizeChanged.bind(this),subPagination:!0,isSplit:!0,disablePagination:n}):null}renderList(){return this.state.error||!this.state.data?null:this.state.data.items.length?(0,i.jsxs)("table",{className:"report-table billing-log margin-top-20",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"dt",children:"Date"}),(0,i.jsx)("th",{className:"dt",children:"Operation"}),(0,i.jsx)("th",{children:"Info"}),(0,i.jsx)("th",{className:"status",children:"Status"})]})}),(0,i.jsx)("tbody",{children:this.state.data.items.map((t,e)=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"dt",children:(0,i.jsx)("strong",{children:t.dt})}),(0,i.jsx)("td",{className:"service",children:t.op}),(0,i.jsx)("td",{style:{"white-space":"pre-line","line-height":"15px","word-break":"break-word"},children:t.info}),(0,i.jsx)("td",{className:"status",children:t.status})]},e))})]}):(0,i.jsx)(g.A,{type:"info",className:"margin-top-20",message:"Entries not found."})}render(){const t=this.state.status!==l.A.DATA_LOADED||!this.state.data||this.props.params.userId!==this.state.data.userId;return(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"form-info",children:(0,i.jsxs)("fieldset",{className:"fs-info padding-bottom-30",children:[(0,i.jsx)("legend",{className:"label-form",children:"History Report"}),this.renderPickDateWarning(),this.renderFilter(),t?(0,i.jsx)(o.A,{children:"Loading History Entries"}):(0,i.jsxs)(i.Fragment,{children:[this.renderError(),this.renderList(),this.renderPagination()]})]})})})}renderFilter(){let t=this.state.fromDate,e=this.state.toDate,s=this.state.hFilter;const a=this.listItemsParams(),r=this.getOptionsList();return a.hFromDt&&a.hToDt&&(t=t||new Date(1e3*Number(a.hFromDt)).toISOString(),e=e||new Date(1e3*Number(a.hToDt)).toISOString()),(0,i.jsxs)("div",{className:"filter-holder padding-bottom-25",children:[(0,i.jsx)("span",{className:"cwm-select pull-left padding-bottom-5",children:(0,i.jsxs)("select",{className:"select-product history",value:s,onChange:this.itemSelected.bind(this),children:[(0,i.jsx)("option",{value:"",children:"All Operation"},"ALL"),r.map((t,e)=>(0,i.jsx)("option",{value:t,children:t},e))]})}),(0,i.jsx)("div",{className:"range-date-holder history pull-right",children:(0,i.jsx)("div",{className:"calendar-holder inline-flex",children:(0,i.jsx)(u.U,{range:!0,value:[t,e],size:"middle",placeholder:["From","To"],onChange:this.pickDateRange.bind(this),maxDate:new Date})})})]})}getCurrentPath(){let t=`/users/${encodeURIComponent(this.props.params.site?this.props.params.site:"0")}`;if(this.props.routes.length>4&&this.props.params.userId){let e=this.props.routes[4].path.split("/");t=t.concat(`/${this.props.params.userId}/${encodeURIComponent(e[e.length-1])}`)}return t}convertToISOString(t){const[e,s]=t.split(" "),[i,a,r]=e.split("/");return new Date(`${r}-${a}-${i}T${s}.000Z`).toISOString()}pickDateRange([t,e]){this.setState({fromDate:t,toDate:e},()=>{t&&e?this.filterDates():t||e||this.clearDatePick()})}renderPickDateWarning(){return this.state.warning?(0,i.jsx)(g.A,{type:"warning",className:"margin-bottom-20",message:this.state.warning}):null}clearDatePick(){const t=this.listItemsParams();if(t.hFromDt||t.hToDt){const t=this.getCurrentPath();this.context.router.push({pathname:t,query:Object.assign({},this.listItemsParams(),{hFromDt:"",hToDt:"",hNext:1,hSkip:0,hFrom:"",hFilter:""})})}this.setState({toDate:null,fromDate:null,warning:null,hFilter:""})}isTimeStampValid(t){const e=new Date;e.setDate(e.getDate()+1);const s=e.getTime();return!(!t||NaN===Number(t)||s<=t||0>=t)&&t}getOptionsList(){return["Login Audit","Server","File Server","Disk Images","Object Storage","Billing","CSP"].sort()}}x.contextTypes={router:m().object.isRequired}},81529(t,e,s){s.d(e,{U:()=>w});var i=s(85186),a=s(64810),r=s(15751),n=s(62286),o=s(34576),l=s(72234),h=s.n(l),d=s(35291),p=s.n(d),c=s(81160),m=Object.defineProperty,u=Object.defineProperties,g=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,D=(t,e,s)=>e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,y=(t,e)=>{for(var s in e||(e={}))b.call(e,s)&&D(t,s,e[s]);if(x)for(var s of x(e))f.call(e,s)&&D(t,s,e[s]);return t};const{RangePicker:v}=n.A,j=t=>{if(!t)return null;if(p().isDayjs(t))return t;const e=p()(t);return e.isValid()?e:null},S=(t,e)=>t?p()(t).format(e):null,C=t=>{const e=j(t);return e?e.startOf("day").valueOf():null},I=(t,e)=>s=>{if(!s)return!1;const i=j(t),a=j(e);return!(!i||!s.isBefore(i,"day"))||!(!a||!s.isAfter(a,"day"))},A=({value:t,onChange:e,placeholder:s,format:l,showGoToCurrentMonth:h,showIcon:d,size:c,allowClear:m,disabled:u,minDate:g,maxDate:x,tabIndex:b})=>{const[f,D]=(0,a.useState)(j(t)),[y,v]=(0,a.useState)(j(t)||p()()),S=C(t),A=C(g),N=C(x),w=(0,a.useMemo)(()=>I(g,x),[A,N]);(0,a.useEffect)(()=>{const e=j(t);D(e),e&&v(e)},[S]);const P=t=>{D(t),t?(v(t),e(p()(t).format(l))):e(null)},k=()=>{v(p()())},T=y.isSame(p()(),"month");return(0,i.jsx)(n.A,{size:c,value:f,pickerValue:y,allowClear:m,onChange:P,onBlur:t=>m&&""===t.target.value?P(null):null,onPanelChange:t=>v(t),placeholder:s||"Select a date",suffixIcon:d?(0,i.jsx)(o.A,{}):null,disabled:u,tabIndex:b,format:l,disabledDate:w,style:{width:"100%"},classNames:{popup:{root:"smart-datepicker-dropdown"}},renderExtraFooter:()=>h?(0,i.jsx)("div",{style:{textAlign:"center"},children:(0,i.jsx)(r.Ay,{type:"link",size:"small",disabled:T,onClick:k,children:"Go to current month"})}):null})},N=({value:t,onChange:e,placeholder:s,format:r,showIcon:n,size:l,allowClear:h,disabled:d,minDate:p,maxDate:c,tabIndex:m})=>{const[u,g]=Array.isArray(t)?t:[],x=C(u),b=C(g),f=C(p),D=C(c),y=(0,a.useMemo)(()=>(t=>Array.isArray(t)?[j(t[0]),j(t[1])]:[null,null])(t),[x,b]),A=(0,a.useMemo)(()=>I(p,c),[f,D]);let N;
1return N=Array.isArray(s)?s:s?[s,s]:["Start date","End date"],(0,i.jsx)(v,{size:l,value:y,allowClear:h,onChange:t=>{const s=t?[t[0]||null,t[1]||null]:[null,null];e([S(s[0],r),S(s[1],r)])},placeholder:N,suffixIcon:n?(0,i.jsx)(o.A,{}):null,disabled:d,tabIndex:m,disabledDate:A,format:r,style:{width:"100%"},classNames:{popup:{root:"smart-datepicker-dropdown"}}})},w=({range:t=!1,value:e,onChange:s,placeholder:a,format:r=c.A.ISO_DATE_FORMAT,showGoToCurrentMonth:n=!0,showIcon:o=!1,size:l="small",allowClear:h=!0,disabled:d=!1,minDate:p,maxDate:m,tabIndex:x})=>{const b={value:e,onChange:s,placeholder:a,format:r,showIcon:o,size:l,allowClear:h,disabled:d,minDate:p,maxDate:m,tabIndex:x};return t?(0,i.jsx)(N,y({},b)):(0,i.jsx)(A,(f=y({},b),u(f,g({showGoToCurrentMonth:n}))));var f};w.propTypes={range:h().bool,value:h().oneOfType([h().string,h().object,h().array]),onChange:h().func.isRequired,placeholder:h().oneOfType([h().string,h().array]),format:h().string,showGoToCurrentMonth:h().bool,showIcon:h().bool,size:h().oneOf(["small","middle","large"]),allowClear:h().bool,disabled:h().bool,minDate:h().oneOfType([h().string,h().object]),maxDate:h().oneOfType([h().string,h().object]),tabIndex:h().number}}}]); 2//# sourceMappingURL=1569.0e20aa1f.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.