From 0f36c36eafeab7f4ac27079a25d94e30b0ebc794 Mon Sep 17 00:00:00 2001 From: Todd Bruner Date: Mon, 4 May 2020 16:57:51 -0600 Subject: [PATCH] pick up the changed javascript --- ...nifest.27656edbf9bb584b60bba432846fa70a.js | 30 +++++++++++++++++++ public/static/js/main.39925231.chunk.js | 2 ++ public/static/js/main.39925231.chunk.js.map | 1 + 3 files changed, 33 insertions(+) create mode 100644 public/precache-manifest.27656edbf9bb584b60bba432846fa70a.js create mode 100644 public/static/js/main.39925231.chunk.js create mode 100644 public/static/js/main.39925231.chunk.js.map diff --git a/public/precache-manifest.27656edbf9bb584b60bba432846fa70a.js b/public/precache-manifest.27656edbf9bb584b60bba432846fa70a.js new file mode 100644 index 000000000..c82b058c8 --- /dev/null +++ b/public/precache-manifest.27656edbf9bb584b60bba432846fa70a.js @@ -0,0 +1,30 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "854d640aaede16c7ac885f7bd5204d37", + "url": "/index.html" + }, + { + "revision": "10fd921022a925167791", + "url": "/static/css/main.f9bff169.chunk.css" + }, + { + "revision": "4b3fe1d7e7684fc8f216", + "url": "/static/js/2.16b92249.chunk.js" + }, + { + "revision": "900427a96803e543ecada678e9a78fb6", + "url": "/static/js/2.16b92249.chunk.js.LICENSE.txt" + }, + { + "revision": "10fd921022a925167791", + "url": "/static/js/main.39925231.chunk.js" + }, + { + "revision": "9728aed1c948044a7930", + "url": "/static/js/runtime-main.fff72596.js" + }, + { + "revision": "981c5c79f3644d601a8bfd8c4f4d3bfd", + "url": "/static/media/scot_logo_473x473.981c5c79.png" + } +]); \ No newline at end of file diff --git a/public/static/js/main.39925231.chunk.js b/public/static/js/main.39925231.chunk.js new file mode 100644 index 000000000..8170ee5fb --- /dev/null +++ b/public/static/js/main.39925231.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpscotui=this.webpackJsonpscotui||[]).push([[0],{291:function(e,t,a){},447:function(e,t,a){e.exports=a.p+"static/media/scot_logo_473x473.981c5c79.png"},539:function(e,t,a){e.exports=a(931)},931:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(18),o=a.n(i),s=a(6),l=a(4),c=a(8),d=a(7),p=a(143),u=a.n(p),h=a(285),m=a.n(h),g=a(122),y=a.n(g),f=a(461),v=a.n(f),b=a(34),E=a.n(b),k=a(72),w=a(22),S=a(54),T=a(43),C=a(12),x=a(977),j=a(1005),O=a(978),D=a(979),N=a(980),_=a(1),A=a.n(_),M=a(441),L=a(287),P={key:A.a.string.isRequired,default:A.a.any.isRequired},I={getUserConfig:A.a.func,setUserConfig:A.a.func},F=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={userConfig:{loading:!0}},n.update=n.update.bind(Object(l.a)(n)),n.setUserConfig=n.setUserConfig.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"getChildContext",value:function(){return{getUserConfig:this.getUserConfig,setUserConfig:this.setUserConfig}}},{key:"getUserConfig",value:function(){return new Promise((function(e,t){var a=localStorage["userConfig"];e(a?JSON.parse(a):{})}))}},{key:"setUserConfig",value:function(e){var t=this;return new Promise((function(t,a){var n,r;n="userConfig",r=JSON.stringify(e),localStorage.setItem(n,r),t()})).then((function(){t.update()}))}},{key:"update",value:function(){var e=this;this.getUserConfig().then((function(t){e.setState({userConfig:t})}))}},{key:"componentDidMount",value:function(){this.update()}},{key:"render",value:function(){return r.a.createElement(L.a,{value:this.state.userConfig,channel:"userConfig"},r.a.createElement("div",null,this.props.children))}}]),a}(n.PureComponent);F.childContextTypes=I;A.a.shape({config:A.a.any.isRequired,setUserConfig:A.a.func.isRequired,getUserConfig:A.a.func.isRequired,loading:A.a.bool}).isRequired;var R=a(288),U=a.n(R),H=a(968),W=a(444),B=a(1e3),V=function(e,t){return r.a.createElement("div",{style:{position:"relative"}},e,r.a.createElement("span",{className:"panel-button right"},r.a.createElement(W.a,{onClick:t,bsSize:"small"},r.a.createElement("i",{className:"fa fa-close"}))))},z=function(e){var t=e.children,a=e.onRemove,n=e.editable,i=e.title;return r.a.createElement("div",{className:"widget ".concat(n&&"editable")},!n&&t,n&&r.a.createElement(B.a,{header:V(i,a)},r.a.cloneElement(t,{editMode:n})))},q=a(1001),K=function(e){var t=e.widgets,a=e.layout,n=e.isOpen,i=e.onClose,o=e.onSelect,s=new Set;a.rows.forEach((function(e){e.columns.forEach((function(e){e.widgets.forEach((function(e){s.add(e.key)}))}))}));var l=Object.keys(t).filter((function(e){return!s.has(e)})).map((function(e,a){var n=t[e];return r.a.createElement("div",{key:a,className:"picker-item",onClick:function(){o(e)}},r.a.createElement("h3",null,n.title),r.a.createElement("p",null,n.description))}));return l.length||(l=r.a.createElement("h2",null,"No available widgets")),r.a.createElement(q.a,{show:n,onHide:i,className:"WidgetPicker"},r.a.createElement(q.a.Header,{closeButton:!0},r.a.createElement(q.a.Title,null,"Pick a Widget")),r.a.createElement(q.a.Body,{className:"picker-grid"},l),r.a.createElement(q.a.Footer,null,r.a.createElement(W.a,{onClick:i},"Cancel")))},G={rows:[{columns:[{className:"col-sm-4",widgets:[]},{className:"col-sm-4",widgets:[]},{className:"col-sm-4",widgets:[]}]}]},J=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={editable:null!=e.saveDashboard,editMode:e.isNew,layout:e.layout,title:e.title,widgetPicker:!1,newWidgetOptions:{}},n.onAdd=n.onAdd.bind(Object(l.a)(n)),n.updateLayout=n.updateLayout.bind(Object(l.a)(n)),n.updateTitle=n.updateTitle.bind(Object(l.a)(n)),n.reset=n.reset.bind(Object(l.a)(n)),n.saveDashboard=n.saveDashboard.bind(Object(l.a)(n)),n.toggleEdit=n.toggleEdit.bind(Object(l.a)(n)),n.togglePicker=n.togglePicker.bind(Object(l.a)(n)),n.selectWidget=n.selectWidget.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"onAdd",value:function(e,t,a){this.setState({widgetPicker:!0,newWidgetOptions:{row:t,col:a}})}},{key:"updateLayout",value:function(e){this.setState({layout:e})}},{key:"updateTitle",value:function(e){this.setState({title:e.target.value})}},{key:"toggleEdit",value:function(){this.setState({editMode:!this.state.editMode})}},{key:"saveDashboard",value:function(){this.state.title?(this.props.saveDashboard(this.state.title,this.state.layout),this.toggleEdit()):this.props.errorToggle("Please enter a dashboard title")}},{key:"reset",value:function(){this.setState({layout:this.props.layout,title:this.props.title,editMode:!1,widgetPicker:!1,newWidgetOptions:{}})}},{key:"togglePicker",value:function(){this.setState({widgetPicker:!this.state.widgetPicker})}},{key:"selectWidget",value:function(e){var t=this.state.newWidgetOptions,a=t.row,n=t.col;this.updateLayout(Object(R.addWidget)(this.state.layout,a,n,e)),this.togglePicker()}},{key:"render",value:function(){return r.a.createElement("div",{className:"dashboard"},r.a.createElement(K,{widgets:this.props.widgets,layout:this.state.layout,isOpen:this.state.widgetPicker,onClose:this.togglePicker,onSelect:this.selectWidget}),r.a.createElement(Y,{title:this.state.title,editable:this.state.editable,editMode:this.state.editMode,onEdit:this.toggleEdit,onSave:this.saveDashboard,onCancel:this.reset,handleTitleChange:this.updateTitle,isNew:this.props.isNew}),r.a.createElement(H.a,{fluid:!0},r.a.createElement(U.a,{onRemove:this.updateLayout,onMove:this.updateLayout,onAdd:this.onAdd,editable:this.state.editMode,layout:this.state.layout,widgets:this.props.widgets,frameComponent:z})))}}]),a}(n.PureComponent);J.defaultProps={title:"",layout:G,isNew:!1};var Y=function(e){var t=e.title,a=e.editMode,n=e.onEdit,i=e.onSave,o=e.onCancel,s=e.handleTitleChange,l=e.isNew;return e.editable?r.a.createElement("div",{className:"titleBar clearfix"},a&&r.a.createElement("form",{onSubmit:i},r.a.createElement("input",{type:"text",className:"title",value:t,placeholder:"Dashboard Title",onChange:s}),r.a.createElement(W.a,{bsStyle:"primary",bsSize:"small",onClick:i},"Save"),r.a.createElement(W.a,{bsStyle:"warning",bsSize:"small",disabled:l,onClick:o},"Cancel")),!a&&r.a.createElement("div",{className:"edit"},r.a.createElement(W.a,{bsSize:"xsmall",onClick:n},r.a.createElement("i",{className:"fa fa-edit"})))):null},Q=a(2),X=a.n(Q),$=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={statusData:{},error:null},n.updateData=n.updateData.bind(Object(l.a)(n)),n.fetchError=n.fetchError.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){X.a.ajax({type:"get",url:"scot/api/v2/status",success:this.updateData,error:this.fetchError}),this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"updateData",value:function(e){this._isMounted&&this.setState({statusData:e})}},{key:"fetchError",value:function(e){this._isMounted&&this.setState({error:e})}},{key:"render",value:function(){var e=this.props.className,t=void 0===e?"":e,a=[];if(Array.isArray(this.state.statusData)){var n,i=Object(w.a)(this.state.statusData);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=o.name,l=o.status;l||(l="unknown"),a.push(r.a.createElement(Z,{key:s,name:s,status:l}))}}catch(d){i.e(d)}finally{i.f()}}var c=["Status",t];return a.length>4&&c.push("cols-2"),r.a.createElement("div",{className:c.join(" ")},this.state.error&&r.a.createElement(B.a,{bsStyle:"danger",header:"Error"},this.state.error),a)}}]),a}(n.PureComponent),Z=function(e){var t=e.name,a=e.status;return r.a.createElement("div",{className:"service status-".concat(a),title:"Status: ".concat(a)},t)},ee=$,te=a(969),ae=a(970),ne=function(e){return r.a.createElement("span",{className:"emoji",role:"img","aria-label":e.label?e.label:"","aria-hidden":e.label?"false":"true"},e.symbol)},re=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ie=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).updateCategory=function(){var e=(n.state.categoryIndex+1)%n.state.gameCategories.length;n._isMounted&&n.setState({categoryIndex:e})},n.updateData=function(e){var t=[];for(var a in e)null!==a&&(console.log("".concat(re(a))),t.push(r.a.createElement(oe,{category:a,data:e[a]})));n._isMounted&&n.setState({gameData:e,gameCategories:t})},n.fetchError=function(e){n._isMounted&&n.setState({error:e})},n.state={gameData:[],gameCategories:[],categoryIndex:0,error:null},n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this._isMounted=!0,X.a.ajax({type:"get",url:"/scot/api/v2/game",success:this.updateData,error:this.fetchError}),this.categoryInterval=setInterval(this.updateCategory,5e3)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.categoryInterval&&clearInterval(this.categoryInterval),this._isMounted=!1}},{key:"render",value:function(){return r.a.createElement(te.a,{className:"Gamification"},r.a.createElement("h3",null,"Leaders"),this.state.error&&r.a.createElement(B.a,{bsStyle:"danger",header:"Error"},this.state.error),this.state.gameCategories[this.state.categoryIndex])}}]),a}(n.PureComponent),oe=function(e){var t=e.category,a=e.data;return r.a.createElement(B.a,{className:"category"},r.a.createElement(B.a.Title,null,r.a.createElement("b",null,"".concat(re(t)," - ").concat(a[0].tooltip))),r.a.createElement(B.a.Body,null,r.a.createElement("div",null,""!==a[0].username&&null!==a[0].username&&null!=a[0].count&&""!==a[0].count?r.a.createElement("div",null,r.a.createElement(ne,{symbol:"\ud83e\udd47"})," ",a[0].username," ",r.a.createElement(ae.a,null,a[0].count)):null,""!==a[1].username&&null!=a[1].username&&null!=a[1].count&&""!==a[1].count?r.a.createElement("div",null,r.a.createElement(ne,{symbol:"\ud83e\udd48"})," ",a[1].username," ",r.a.createElement(ae.a,null,a[1].count)):null,""!==a[2].username&&null!=a[2].username&&null!=a[2].count&&""!==a[2].count?r.a.createElement("div",null,r.a.createElement(ne,{symbol:"\ud83e\udd49"})," ",a[2].username," ",r.a.createElement(ae.a,null,a[2].count)):null)))},se=ie,le=function(e,t){localStorage.setItem(e,t)},ce=function(e){return localStorage[e]},de=function(e){return localStorage[e]},pe=a(971);var ue=a(113),he=a.n(ue),me=a(283),ge=Object(me.extendMoment)(he.a),ye=864e5,fe=function(e,t){return!e||Date.now()-e>1e3*t},ve=function(){return{start:Math.floor(new Date(Date.now()-ye).setHours(0,0,0,0)/1e3),end:Math.floor(new Date(Date.now()+ye).setHours(23,59,59,999)/1e3)}},be=function(){return{start:Math.floor(new Date(Date.now()-7*ye).setHours(0,0,0,0)/1e3),end:Math.floor(new Date(Date.now()+ye).setHours(23,59,59,999)/1e3)}},Ee=function(e){return[e.start,e.end]},ke=function(e){return e.start+", "+e.end},we={wall:"warning",create:"info",delete:"danger"},Se=["create","delete"],Te={create:120,delete:60,wall:3600},Ce=0,xe=1,je=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={users:[],notifications:n.loadWall()},n.updateActivity=n.updateActivity.bind(Object(l.a)(n)),n.updateUsers=n.updateUsers.bind(Object(l.a)(n)),n.wallMessage=n.wallMessage.bind(Object(l.a)(n)),n.notification=n.notification.bind(Object(l.a)(n)),n.fetchError=n.fetchError.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.refreshTimer=setInterval(this.updateActivity,3e4),this.updateActivity(),this.props.createCallback("wall",this.wallMessage)}},{key:"componentWillUnmount",value:function(){this.refreshTimer&&clearInterval(this.refreshTimer)}},{key:"updateActivity",value:function(){this.updateUsers();var e=this.state.notifications.filter((function(e){return!fe(1e3*e.time,Te[e.action])}));this.setState({notifications:e},this.persistWall)}},{key:"updateUsers",value:function(){var e=this;X.a.ajax({type:"get",url:"/scot/api/v2/who",success:function(t){e.setState({users:t.records.map((function(e){return{type:Ce,who:e.username,time:(t=e.last_activity,(Date.now()-1e3*t)/1e3)};var t}))})},error:this.fetchError})}},{key:"persistWall",value:function(){var e=this.state.notifications.filter((function(e){return"wall"===e.action}));le("walls",JSON.stringify(e))}},{key:"loadWall",value:function(){var e=ce("walls");return e?JSON.parse(e):[]}},{key:"wallMessage",value:function(e){var t=this.state.notifications;t.push({type:xe,time:e.activemqwhen,who:e.activemqwho,message:e.activemqmessage,level:we.wall,action:"wall"}),this.setState({notifications:t},this.persistWall)}},{key:"notification",value:function(e){if(!["scot-flair","scot-alerts","scot-admin","","api"].includes(e.activemqwho)&&!0!==e.activemqwall&&"entity"!==e.activemqtype&&["create","delete"].includes(e.activemqstate)){var t=this.state.notifications;t.push({type:xe,time:Date.now()/1e3,who:e.activemqwho,message:e.activemqmessage+e.activemqid,level:we[e.activemqstate],action:e.activemqstate}),this.setState({notifications:t})}}},{key:"addDebugItems",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=this.state.notifications,a=0;a1?t+" years":(t=Math.floor(e/2592e3))>1?t+" months":(t=Math.floor(e/86400))>1?t+" days":(t=Math.floor(e/3600))>1?t+" hours":(t=Math.floor(e/60))>1?t+" minutes":Math.floor(e)+" seconds"}((a=e.time,(Date.now()-1e3*a)/1e3)),i="";switch(e.type){default:case Ce:i=e.who;break;case xe:i="".concat(e.who,": ").concat(e.message)}return r.a.createElement(Oe,{key:t,badge:n,style:e.level},i)}},{key:"render",value:function(){var e=this,t=this.props.className,a=["Activity",void 0===t?"":t],n=this.state.users.concat(this.state.notifications).sort((function(e,t){return t.time-e.time})).map(this.buildActivityItem),i=!0;if(this.marquee&&this.well){var s=window.getComputedStyle(this.marquee);parseInt(s.width,10)-parseInt(s.paddingLeft,10)>this.well.offsetWidth&&(i=!1)}return r.a.createElement(te.a,{bsSize:"small",className:a.join(" "),ref:function(t){return e.well=o.a.findDOMNode(t)}},r.a.createElement("div",{className:"marquee ".concat(i?"stopped":""),ref:function(t){return e.marquee=t}},n))}}]),a}(n.Component),Oe=function(e){var t=e.children,a=e.badge,n=void 0===a?null:a,i=e.style,o=void 0===i?"default":i;return r.a.createElement("div",{className:"activity-item"},r.a.createElement(pe.a,{bsStyle:o},t,null!==n&&r.a.createElement(ae.a,null,n)))},De=je,Ne=a(36),_e=a(24),Ae=a(38),Me=a.n(Ae),Le=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).getData=function(){var e="/scot/api/v2/graph/dhheatmap?collection="+n.state.collection+"&type="+n.state.type+"&year="+n.state.year;Me.a.get(e).then((function(e){n.setState({data:e.data})}))},n.loadHeatMap=function(){if(!n.props.editMode){var e=30,t=30,a=1e3-(t-0),r=300-(e-30),i=Math.floor(a/24),o=1.5*i,s=["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],l=_e.n("#report_heatmap"),c=l.select("g");c.empty()&&(c=l.append("g").attr("transform","translate( "+t+", "+e+" )")),c.selectAll(".dayLabel").data(["Mo","Tu","We","Th","Fr","Sa","Su"]).enter().append("text").text((function(e){return e})).attr("x",0).attr("y",(function(e,t){return t*i})).style("text-anchor","end").attr("transform","translate( -6, "+i/1.5+" )").attr("class",(function(e,t){return t>=0&&t<=4?"dayLabel axis axis-worktime":"dayLabel axis"})),c.selectAll(".timeLabel").data(["1a","2a","3a","4a","5a","6a","7a","8a","9a","10a","11a","12a","1p","2p","3p","4p","5p","6p","7p","8p","9p","10p","11p","12p"]).enter().append("text").text((function(e){return e})).attr("x",(function(e,t){return t*i})).attr("y",0).style("text-anchor","middle").attr("transform","translate( "+i/2+", -6 )").attr("class",(function(e,t){return t>=7&&t<=16?"timeLabel axis axis-worktime":"timeLabel axis"})),l.selectAll(".legend").remove(),l.selectAll(".legend-text").remove();var d=_e.k().domain([0,8,_e.g(n.state.data,(function(e){return e.value}))]).range(s),p=c.selectAll(".hour").data(n.state.data,(function(e){return e.day+":"+e.hour}));p.append("title"),p.enter().append("rect").style("fill",s[0]).merge(p).attr("x",(function(e){return(e.hour-1)*i})).attr("y",(function(e){return(e.day-1)*i})).attr("rx",4).attr("ry",4).attr("class","hour").attr("width",i).attr("height",i).transition().duration(1e3).style("fill",(function(e){return d(e.value)})),p.select("title").text((function(e){return e.value})),p.exit().remove();var u=c.selectAll(".legend").data([0].concat(d.quantiles()),(function(e){return e}));u.enter().append("rect").attr("class","legend").attr("x",(function(e,t){return o*t})).attr("y",r).attr("width",o).attr("height",i/2).style("fill",(function(e,t){return s[t]})),u.enter().append("text").text((function(e){return"\u2265 "+Math.round(e)})).attr("class","legend-text").attr("x",(function(e,t){return o*t})).attr("y",r+i)}},n.collectionChange=function(e){n.setState({collection:e.target.value})},n.yearChange=function(e){n.setState({year:e.target.value})},n.exportToPNG=function(){var e=(new XMLSerializer).serializeToString(document.querySelector("#report_heatmap")),t=document.createElement("canvas"),a=t.getContext("2d"),n=window.self.URL||window.self.webkitURL||window.self,r=new Image,i=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=n.createObjectURL(i);r.onload=function(){a.drawImage(r,0,0);var e=t.toDataURL("image/png");document.querySelector("#png-container").innerHTML='',n.revokeObjectURL(e);var i=X()("").attr("href",e).attr("download","img.png").appendTo("body");i[0].click(),i.remove()},r.src=o},n.state={collection:"event",type:"created",year:"2017",data:[]},n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.getData(),this.loadHeatMap()}},{key:"componentDidUpdate",value:function(){this.loadHeatMap()}},{key:"render",value:function(){var e=this.props.editMode;return r.a.createElement("div",{className:"dashboard"},!this.props.editMode&&r.a.createElement("h1",null,"Day of Week, Hour of Day Heatmap"),r.a.createElement("label",{htmlFor:"year",style:{display:"inline-block",width:"240px",textAlign:"right"}},"Year = ",r.a.createElement("span",{id:"year-value"}),r.a.createElement("input",{className:"report_input",type:"number",min:"2013",step:"1",value:this.state.year,id:"year",onChange:this.yearChange,disabled:e})),r.a.createElement("label",{htmlFor:"collection",style:{display:"inline-block",width:"240px",textAlign:"right"}},"Collection = ",r.a.createElement("span",{id:"year-value"}),r.a.createElement("select",{id:"collection",value:this.state.collection,onChange:this.collectionChange,disabled:e},r.a.createElement("option",{value:"event"},"event"),r.a.createElement("option",{value:"alert"},"alert"),r.a.createElement("option",{value:"incident"},"incident"))),r.a.createElement(W.a,{id:"export",bsSize:"xsmall",bsStyle:"default",onClick:this.exportToPNG,disabled:e},"Export to PNG"),r.a.createElement("div",{id:"chart"},r.a.createElement("svg",{id:"report_heatmap",viewBox:"0 0 1000 380"})),r.a.createElement("div",{id:"png-container",hidden:!0}))}}]),a}(n.PureComponent);function Pe(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r=this,i=arguments.length,o=new Array(i),s=0;s1&&void 0!==arguments[1]?arguments[1]:10,a=e[0],n=e[e.length-1],r=_e.o(a,n,t);return function(e){var t=Math.floor(e/86400),a=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),i=Math.floor(e%60);return t?r<86400?"".concat(t,"d ").concat(a,"h"):t+"d":a?r<3600?"".concat(a,"h ").concat(n,"m"):a+"h":n?r<60?"".concat(n,"m ").concat(i,"s"):n+"m":i+"s"}}(o.domain(),20));n.xAxisEl.transition().call(s),n.yAxisEl.transition().call(l);var c=n.svg.selectAll(".date").data(n.state.chartData.dates,(function(e){return e.date}));c.exit().transition().style("opacity",0).attr("height",0).attr("y",We).remove(),c.enter().append("g").attr("class","date").attr("transform",(function(e){return"translate( ".concat(r(e.date),", 0 )")})).selectAll(".bar").data((function(e){return e.values})).enter().append("rect").attr("class","bar").style("fill",(function(e){return Be[e.name]})).attr("width",i.bandwidth()).attr("x",(function(e){return i(e.name)})).attr("y",We).attr("height",0).append("title").text((function(e){return Ie(e.value)})),c.transition().attr("transform",(function(e){return"translate( ".concat(r(e.date),", 0 )")})),n.svg.selectAll(".date").selectAll(".bar").transition().attr("width",i.bandwidth()).attr("x",(function(e){return i(e.name)})).attr("y",(function(e){return o(e.value)})).attr("height",(function(e){return We-o(e.value)})),n.svg.select(".avg-holder").remove(),n.svg.select(".avg-holder-border").remove();var d=n.svg.append("g").attr("class","avg-holder"),p=d.selectAll(".avg").data(n.state.chartData.lines).enter().append("text").attr("class","avg").attr("transform",(function(e,t){return"translate( 0, ".concat(15*t," )")}));p.append("tspan").attr("x",0).attr("font-weight","bold").text((function(e){return"".concat(e.name,":")})),p.append("tspan").attr("x",100).text((function(e){return Ie(e.value)}));var u=d.node().getBBox();d.attr("transform","translate( ".concat(He-u.width,", 0 )"));n.svg.append("rect").attr("fill","none").attr("stroke","black").attr("class","avg-holder-border").attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4).node().transform.baseVal.initialize(d.node().transform.baseVal.getItem(0));n.svg.select(".legend-holder").remove();var h=n.svg.append("g").attr("class","legend-holder"),m=h.selectAll(".legend").data(Array.from(e)).enter().append("g").attr("class","legend");m.append("rect").attr("width",20).attr("x",0).attr("y",0).attr("height",20).style("fill",(function(e){return Be[e]})),m.append("text").attr("x",25).attr("y",10).attr("dy",".35em").style("text-anchor","start").text((function(e){return e}));var g=0;h.selectAll(".legend").attr("transform",(function(e,t){var a=g;return g+=this.getBBox().width+15,"translate( ".concat(a,", 0 )")}));var y=h.node().getBBox().width;h.attr("transform","translate( ".concat(He/2-y/2,", ").concat(We+Re/2," )"))},n.loadArt=function(){if(n.state.date&&n.state.length&&!n.props.editMode){var e="?days=".concat(n.state.length,"&targetdate=").concat(n.state.date,"&unit=").concat(n.state.unit);Me.a.get("/scot/api/v2/metric/response_avg_last_x_days"+e).then((function(e){n.setState({chartData:e.data})}))}},n.unitChange=function(e){n.setState({unit:e.target.value},(function(){return n.loadArt()}))},n.lengthChange=function(e){n.setState({length:e.target.value},(function(){return n.loadArt()}))},n.dateChange=function(e){n.setState({date:e.target.value},(function(){return n.loadArt()}))},n.exportToPNG=function(){var e=(new XMLSerializer).serializeToString(document.querySelector("#report_art")),t=document.createElement("canvas"),a=t.getContext("2d"),n=window.self.URL||window.self.webkitURL||window.self,r=new Image,i=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=n.createObjectURL(i);r.onload=function(){a.drawImage(r,0,0);var e=t.toDataURL("image/png");document.querySelector("#png-container").innerHTML='',n.revokeObjectURL(e);var i=X()("").attr("href",e).attr("download","img.png").appendTo("body");i[0].click(),i.remove()},r.src=o};var r=(new Date).toISOString().slice(0,10);return n.state={length:7,date:r,unit:"day",chartData:{dates:[],lines:[]}},n.loadArt=Pe(n.loadArt),n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.initChart(),this.loadArt()}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){this.chartInit&&this.updateChart();var e=this.props.editMode;return r.a.createElement("div",{className:"dashboard"},!this.props.editMode&&r.a.createElement("h1",null,"Alert Response Time"),r.a.createElement("label",{htmlFor:"date",style:{display:"inline-block",textAlign:"right"}},"Initial Date =\xa0",r.a.createElement("input",{className:"report_input",type:"date",value:this.state.date,onChange:this.dateChange,placeholder:"yyyy-mm-dd",pattern:"[0-9]{4}-[0-9]{2}-[0-9]{2}",disabled:e})),r.a.createElement("label",{htmlFor:"length",style:{display:"inline-block",textAlign:"right"}},"Length =\xa0",r.a.createElement("input",{className:"report_name",type:"number",min:"1",step:"1",value:this.state.length,id:"length",onChange:this.lengthChange,disabled:e})),r.a.createElement("label",{htmlFor:"unit",style:{display:"inline-block",width:"240px",textAlign:"right"}},"Unit =\xa0",r.a.createElement("select",{id:"unit",value:this.state.unit,onChange:this.unitChange,disabled:!0},r.a.createElement("option",{value:"hour"},"hourly"),r.a.createElement("option",{value:"day"},"daily"),r.a.createElement("option",{value:"month"},"monthly"),r.a.createElement("option",{value:"year"},"yearly"))),r.a.createElement(W.a,{id:"export",bsSize:"xsmall",bsStyle:"default",onClick:this.exportToPNG,disabled:e},"Export to PNG"),r.a.createElement("div",{id:"chart"},r.a.createElement("svg",{id:"report_art",viewBox:"0 0 1000 500"})),r.a.createElement("div",{id:"png-container",hidden:!0}))}}]),a}(n.PureComponent),ze=a(31),qe=function(e,t){e.each((function(e,a){if(!(this.getComputedTextLength()t&&(s++,o.pop(),p.text(o.join(" ")),o=[i],p=n.append("tspan").attr("x",l).attr("y",c).attr("dy",.8+d+"em").text(i));var u=this.getBBox().height/(2*s)*(s-1);n.attr("transform","translate( 0, -".concat(u," )"))}}))},Ke=5,Ge=200,Je=60,Ye=1e3-Ge-30,Qe=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).initChart=function(){n.height=0,n.xScale=_e.i().rangeRound([0,Ye]),n.yScale=_e.h().rangeRound([0,n.height]).padding(.3),n.colors=_e.j(_e.m),n.xAxis=_e.a().scale(n.xScale),n.yAxis=_e.b().scale(n.yScale),n.svg=_e.n("#report_alertpower").attr("viewBox","0 0 1000 ".concat(n.height+Ke+Je)).append("g").attr("transform","translate( ".concat(Ge,", ").concat(Ke," )")),n.yAxisEl=n.svg.append("g").attr("class","y axis"),n.xAxisEl=n.svg.append("g").attr("class","x axis").attr("transform","translate( 0, ".concat(n.height," )")),n.xAxisEl.append("text").attr("text-anchor","middle").attr("x",Ye/2).attr("y",30).style("fill","black").style("font-size","12px").text("Alert Count"),n.LegendHolder=n.svg.append("g").attr("class","legend-holder"),n.chartInit=!0},n.updateChart=function(){var e=n.state.chartData;n.height=32*e.length,_e.n("#report_alertpower").transition().attr("viewBox","0 0 1000 ".concat(n.height+Ke+Je)),n.dataTypes=_e.e(e[0]).filter((function(e){return!["name","values","total","score","max"].includes(e)})),n.colors.domain(n.dataTypes),e.forEach((function(e){e.name=e.name.replace(/ \([0-9]+\)/,""),"number"===typeof e.score&&(e.score=""+e.score);var t=0;e.values=n.dataTypes.map((function(a){var n=t,r=t+e[a];return t+=e[a],{name:a,count:e[a],start:n,end:r}})),e.total=e.values[e.values.length-1].end,e.max=_e.g(n.dataTypes,(function(t){return e[t]}))})),n.stackedMax=_e.g(e,(function(e){return e.total})),n.groupedMax=_e.g(e,(function(e){return _e.g(n.dataTypes,(function(t){return e[t]}))})),n.yScale.rangeRound([0,n.height]).domain(e.map((function(e){return e.name}))),n.yAxisEl.call(n.yAxis),n.svg.selectAll(".y.axis .tick text").call(qe,Ge-20);var t=n.svg.selectAll(".alert").data(e,(function(e){return e.name}));t.exit().transition().attr("height",0).style("opacity",0).remove(),t.enter().append("g").attr("class","alert").attr("transform",(function(e){return"translate( 1, ".concat(n.yScale(e.name)," )")})).append("text").attr("dy","1.2em"),t.transition().attr("transform",(function(e){return"translate( 1, ".concat(n.yScale(e.name)," )")}));var a=n.svg.selectAll(".alert").selectAll("rect").data((function(e){return e.values})),r=a.enter().append("rect").attr("x",0).attr("y",0).attr("width",0).attr("height",n.yScale.bandwidth());r.merge(a).style("fill",(function(e){return n.colors(e.name)})),r.append("title").merge(a.select("title")).text((function(e){return"".concat(e.name,": ").concat(e.count)}));var i=n.LegendHolder.selectAll(".legend").data(n.dataTypes);i.exit().remove(),(i=i.enter().append("g").attr("class","legend")).append("rect").attr("width",20).attr("x",0).attr("y",0).attr("height",20).style("fill",(function(e){return n.colors(e)})),i.append("text").attr("x",25).attr("y",10).attr("dy",".35em").style("text-anchor","start").style("text-transform","capitalize").text((function(e){return e}));var o=0;n.LegendHolder.selectAll(".legend").attr("transform",(function(e,t){var a=o;return o+=this.getBBox().width+15,"translate( ".concat(a,", 0 )")}));var s=n.LegendHolder.node().getBBox().width;n.LegendHolder.transition().attr("transform","translate( ".concat(Ye/2-s/2,", ").concat(n.height+Je-20," )")),"grouped"===n.state.displayMode?n.transitionGrouped():n.transitionStacked()},n.transitionStacked=function(){n.xScale.domain([0,n.stackedMax]).nice(),n.xAxisEl.transition().call(n.xAxis).attr("transform","translate( 0, ".concat(n.height," )")),n.svg.selectAll(".alert rect").transition().delay((function(e,t){return 5*t})).duration(500).attr("width",(function(e){return n.xScale(e.end)-n.xScale(e.start)})).attr("x",(function(e){return n.xScale(e.start)})).transition().attr("height",n.yScale.bandwidth()).attr("y",0),n.svg.selectAll(".alert text").transition().delay((function(e,t){return t*n.dataTypes.length*5+t})).duration(500).attr("transform",(function(e){return"translate( ".concat(n.xScale(e.total)+10,", 0 )")})).tween("text",(function(e){var t=_e.n(this),a=_e.d(t.text(),e.score),n=e.score.split("."),r=n.length>1?Math.pow(10,n[0].length):1;return function(e){return t.text(Math.round(a(e)*r)/r)}}))},n.transitionGrouped=function(){n.xScale.domain([0,n.groupedMax]).nice(),n.xAxisEl.transition().call(n.xAxis).attr("transform","translate( 0, ".concat(n.height," )"));var e=n.displayModeChanged?500:0;n.svg.selectAll(".alert").selectAll("rect").transition().delay((function(e,t){return 5*t})).duration(e).attr("height",n.yScale.bandwidth()/n.dataTypes.length).attr("y",(function(e,t){return n.yScale.bandwidth()/n.dataTypes.length*t})).transition().duration(500).attr("x",0).attr("width",(function(e){return n.xScale(e.end)-n.xScale(e.start)})),n.svg.selectAll(".alert text").transition().delay((function(t,a){return 5*a+e})).attr("transform",(function(e){return"translate( ".concat(n.xScale(e.max)+10,", 0 )")})).tween("text",(function(e){var t=_e.n(this),a=_e.d(t.text(),e.score),n=e.score.split("."),r=n.length>1?Math.pow(10,n[0].length):1;return function(e){return t.text(Math.round(a(e)*r)/r)}})),n.displayModeChanged=!1},n.loadData=function(){if(n.state.chartResults&&!n.props.editMode){var e="?sort=".concat(n.state.chartSort,"&dir=").concat(n.state.chartSortDir,"&count=").concat(n.state.chartResults,"&filter=").concat(encodeURIComponent(n.state.chartFilter));Me.a.get("/scot/api/v2/metric/alert_power"+e).then((function(e){n.setState({chartData:e.data})}))}},n.dataChange=function(e){var t=e.target;"chartResults"===t.name&&t.value&&(t.value>50&&(t.value=50),t.value<1&&(t.value=1)),n.setState(Object(ze.a)({},t.name,t.value),n.loadData)},n.displayModeChang=function(e){n.displayModeChanged=!0,n.setState({displayMode:e.target.value})},n.preventSubmit=function(e){e.preventDefault(),e.stopPropagation()},n.exportToPNG=function(){var e=(new XMLSerializer).serializeToString(document.querySelector("#report_alertpower")),t=document.createElement("canvas"),a=t.getContext("2d"),n=window.self.URL||window.self.webkitURL||window.self,r=new Image,i=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=n.createObjectURL(i);r.onload=function(){a.drawImage(r,0,0);var e=t.toDataURL("image/png");document.querySelector("#png-container").innerHTML=""),n.revokeObjectURL(e);var i=X()("").attr("href",e).attr("download","img.png").appendTo("body");i[0].click(),i.remove()},r.src=o},n.state={displayMode:"stacked",chartData:[],chartResults:20,chartSort:"power",chartSortDir:"desc",chartFilter:""},n.loadData=Pe(n.loadData),n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.initChart(),this.updateChart(),this.loadData()}},{key:"render",value:function(){this.chartInit&&this.updateChart();var e=this.props.editMode;return r.a.createElement("div",{className:"dashboard"},!this.props.editMode&&r.a.createElement("h1",null,"Alert Power"),r.a.createElement("form",{onSubmit:this.preventSubmit},r.a.createElement("label",null,"Filter =\xa0",r.a.createElement("input",{className:"report_input",type:"text",style:{background:"initial",border:"1px solid #ccc"},name:"chartFilter",value:this.state.chartFilter,onChange:this.dataChange,placeholder:"All",disabled:e}))),r.a.createElement("form",{onSubmit:this.preventSubmit},r.a.createElement("label",null,"Sort by =\xa0",r.a.createElement("select",{name:"chartSort",value:this.state.chartSort,onChange:this.dataChange,disabled:e},r.a.createElement("option",{value:"power"},"Power Score"),r.a.createElement("option",{value:"count"},"Alert Count"),r.a.createElement("option",{value:"promoted"},"Promoted Count"),r.a.createElement("option",{value:"incident"},"Incident Count")),r.a.createElement("select",{name:"chartSortDir",value:this.state.chartSortDir,onChange:this.dataChange,disabled:e},r.a.createElement("option",{value:"desc"},"Desc"),r.a.createElement("option",{value:"asc"},"Asc"))),r.a.createElement("label",null,"Results =\xa0",r.a.createElement("input",{className:"report_input",type:"number",min:1,max:50,name:"chartResults",value:this.state.chartResults,onChange:this.dataChange,disabled:e}))),r.a.createElement("form",null,r.a.createElement("label",null,r.a.createElement("input",{className:"report_input",type:"radio",name:"mode",value:"grouped",checked:"grouped"===this.state.displayMode,onChange:this.displayModeChange,disabled:e})," ","Grouped"),"\xa0",r.a.createElement("label",null,r.a.createElement("input",{className:"report_input",type:"radio",name:"mode",value:"stacked",checked:"stacked"===this.state.displayMode,onChange:this.displayModeChange,disabled:e})," ","Stacked"),r.a.createElement(W.a,{id:"export",bsSize:"xsmall",bsStyle:"default",onClick:this.exportToPNG,disabled:e},"Export to PNG")),r.a.createElement("div",{id:"chart"},r.a.createElement("svg",{id:"report_alertpower",viewBox:"0 0 1000 100"})),r.a.createElement("div",{id:"png-container",hidden:!0}))}}]),a}(n.PureComponent),Xe=5,$e=40,Ze=60,et=1e3-$e-20,tt=600-Xe-Ze,at=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).initChart=function(){var e=new Date;n.xScale=_e.l().rangeRound([0,et]).domain([e-6048e5,e]),n.yScale=_e.i().rangeRound([tt,0]).domain([0,0]),n.xAxis=_e.a().scale(n.xScale),n.yAxis=_e.b().scale(n.yScale),n.svg=_e.n("#report_created").attr("viewBox","0 0 1000 ".concat(tt+Xe+Ze)).append("g").attr("transform","translate( ".concat($e,", ").concat(Xe," )")),n.yAxisEl=n.svg.append("g").attr("class","y axis"),n.yAxisEl.call(n.yAxis),n.xAxisEl=n.svg.append("g").attr("class","x axis").attr("transform","translate( 0, ".concat(tt," )")),n.xAxisEl.append("text").attr("text-anchor","middle").attr("x",et/2).attr("y",Ze-10).style("font-size","10px").style("fill","black").text("Toggle Trendlines"),n.xAxisEl.call(n.xAxis),n.statusLine=_e.f().curve(_e.c).x((function(e){return n.xScale(new Date(1e3*e.time))})).y((function(e){return n.yScale(e.value)})),n.lineHolder=n.svg.append("g").attr("class","lines").attr("clip-path","url(#bounds)"),n.LegendHolder=n.svg.append("g").attr("class","legend-holder").style("font-family","sans-serif"),n.chartInit=!0},n.updateChart=function(){n.yScale.domain([0,Math.max(_e.g(n.state.chartData,(function(e){return e.shown&&e.data.length?_e.g(e.data,(function(e){return e.value})):0})),10)]).nice(),n.colors=_e.j(_e.m).domain(n.state.chartData.map((function(e){return e.name})));var e=n.lineHolder.selectAll(".line").data(n.state.chartData,(function(e){return e.name}));e.exit().transition().style("opacity",0).remove(),e.enter().append("path").attr("class",(function(e){return"line ".concat(e.name)})).style("stroke",(function(e){return n.colors(e.name)})).style("stroke-width",2).style("fill","none").attr("d",(function(e){return n.statusLine(e.data)})),n.LegendHolder.selectAll(".legend").remove();var t=n.LegendHolder.selectAll(".legend").data(n.state.chartData,(function(e){return e.name}));(t=t.enter().append("g").attr("class","legend").style("cursor","pointer").on("click",(function(e){var t=n.state.chartData.map((function(t){return t.name===e.name&&(t.shown=!e.shown),t}));console.log("newData = ".concat(t)),n.setState({chartData:t})}))).append("rect").attr("width",20).attr("x",0).attr("y",7.5).attr("height",5).style("fill",(function(e){return e.shown?n.colors(e.name):"transparent"})).style("stroke",(function(e){return n.colors(e.name)})).style("stroke-width",1),t.append("text").attr("x",25).attr("y",10).attr("dy",".35em").style("text-anchor","start").style("text-transform","capitalize").text((function(e){return e.name})).append("title").text((function(e){return"Toggle ".concat(e.name," line")}));var a=0;n.LegendHolder.selectAll(".legend").attr("transform",(function(e,t){var n=a;return a+=this.getBBox().width+15,"translate( ".concat(n,", 0 )")}));var r=n.LegendHolder.node().getBBox().width;n.LegendHolder.attr("transform","translate( ".concat(et/2-r/2,", ").concat(tt+Ze-40," )")),n.yAxisEl.transition().call(n.yAxis),e.transition().attr("d",(function(e){return n.statusLine(e.data)})).style("stroke",(function(e){return e.shown?n.colors(e.name):"transparent"}))},n.loadData=function(){if(n.props.editMode){var e=n.genData();return e=e.map((function(e){return e.shown=n.state.chartData.reduce((function(t,a){return t&&(a.name!==e.name||a.shown)}),!0),e})),void n.setState({chartData:e})}Me.a.get("/scot/api/v2/metric/create_histo?range=7").then((function(e){try{console.log(e),e=e.data.map((function(e){return e.shown=n.state.chartData.reduce((function(t,a){return t&&(a.name!==e.name||a.shown)}),!0),e})),n.setState({chartData:e})}catch(t){console.log("Malformed data"),console.log(e),console.error(t)}}))},n.genData=function(){var e={alerts:5e3,alertgroups:500,entries:100,events:15,intel:5,incidents:5},t=new Date,a=new Date(Date.now()-6048e5),n=[];for(["alerts","alertgroups","events","incidents","entries","intel"].forEach((function(e){n.push({name:e,data:[]})}));a<=t;a=new Date(a.getTime()+216e5))n.forEach((function(t){t.data.push({time:a.getTime()/1e3,value:Math.random()*e[t.name]})}));return n},n.exportToPNG=function(){var e=(new XMLSerializer).serializeToString(document.querySelector("#report_created")),t=document.createElement("canvas"),a=t.getContext("2d"),n=window.self.URL||window.self.webkitURL||window.self,r=new Image,i=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),o=n.createObjectURL(i);r.onload=function(){a.drawImage(r,0,0);var e=t.toDataURL("image/png");document.querySelector("#png-container").innerHTML=""),n.revokeObjectURL(e);var i=X()("").attr("href",e).attr("download","img.png").appendTo("body");i[0].click(),i.remove()},r.src=o},n.state={chartData:[]},n.loadData=Pe(n.loadData),n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.initChart(),this.loadData()}},{key:"dataChange",value:function(e){var t=e.target;"chartResults"===t.name&&t.value&&(t.value>50&&(t.value=50),t.value<1&&(t.value=1)),this.setState(Object(ze.a)({},t.name,t.value),this.loadData)}},{key:"render",value:function(){this.chartInit&&this.updateChart();var e=this.props.editMode;return r.a.createElement("div",{className:"dashboard"},!this.props.editMode&&r.a.createElement("h1",null,"Items Created"),r.a.createElement("form",null,r.a.createElement(W.a,{id:"export",bsSize:"xsmall",bsStyle:"default",onClick:this.exportToPNG,disabled:e},"Export to PNG")),r.a.createElement("div",{id:"chart"},r.a.createElement("svg",{id:"report_created",viewBox:"0 0 1000 600"})),r.a.createElement("div",{id:"png-container",hidden:!0}))}}]),a}(n.Component),nt=function(e){switch(e){default:case"heatmap":return Le;case"alertpower":return Qe;case"art":return Ve;case"created":return at}},rt=function(e){switch(e){default:case"heatmap":return"Heatmap";case"alertpower":return"Alert Power";case"art":return"Alert Response Time";case"created":return"Items Created"}},it=function(e){switch(e){default:case"heatmap":return"Heatmap of incoming alerts, event, and incidents";case"alertpower":return"Chart of alerts in terms of how frequently they're promoted or become incidents";case"art":return"Chart of average alert, event, and incident response time";case"created":return"Chart of newly created items"}},ot=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r.a.createElement("div",{style:{position:"relative"}},rt(e),t&&r.a.createElement(Ne.Link,{to:"/reports/".concat(e),className:"panel-button right"},r.a.createElement(W.a,{bsSize:"small"},r.a.createElement("i",{className:"fa fa-external-link","aria-hidden":!0}))),a&&r.a.createElement(Ne.Link,{to:"/reports",className:"panel-button left"},r.a.createElement(W.a,{bsSize:"small"},r.a.createElement("i",{className:"fa fa-arrow-left","aria-hidden":!0}))))},st=function(){return r.a.createElement("div",{id:"report",className:"dashboard",style:{height:"calc( 100vh - 51px )",overflow:"auto"}},r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("h2",null,"Reports")),r.a.createElement("div",{className:"container-fluid"},r.a.createElement("div",{className:"col-md-6"},r.a.createElement(B.a,{header:ot("heatmap",!0)},r.a.createElement(Le,null)),r.a.createElement(B.a,{header:ot("alertpower",!0)},r.a.createElement(Qe,null))),r.a.createElement("div",{className:"col-md-6"},r.a.createElement(B.a,{header:ot("art",!0)},r.a.createElement(Ve,null)),r.a.createElement(B.a,{header:ot("created",!0)},r.a.createElement(at,null)))))},lt=function(e){var t=e.reportType,a=void 0===t?"heatmap":t;return r.a.createElement("div",{id:"report",className:"dashboard",style:{height:"calc( 100vh - 51px )",overflow:"auto"}},r.a.createElement("div",{className:"container"},r.a.createElement(B.a,{header:ot(a,!1,!0)},function(e){switch(e){default:case"heatmap":return r.a.createElement(Le,null);case"alertpower":return r.a.createElement(Qe,null);case"art":return r.a.createElement(Ve,null);case"created":return r.a.createElement(at,null)}}(a))))},ct=a(1009),dt=a(972),pt=a(16);var ut=Object(pt.a)((function(e){return{progress:{margin:2*e.spacing.unit}}}))((function(e){var t=e.classes,a=e.loading;return r.a.createElement("div",{className:"LoadingContainer"},a&&r.a.createElement(dt.a,{className:t.progress}))})),ht=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={data:[],loading:!1},n}return Object(C.a)(a,[{key:"fetchData",value:function(){var e=this;this.setState({loading:!0});var t=X.a.extend(!0,{},this.props.queryOptions);t.sort&&(t.sort=JSON.stringify(t.sort)),t.filter&&delete(t=Object(S.a)({},t,{},t.filter)).filter,this.props.newBadge&&t.columns.push("created"),X.a.ajaxSetup({traditional:!0}),X.a.ajax({type:"get",url:"/scot/api/v2/"+this.props.thingType,data:t}).then((function(t){e.setState({data:e.props.processData(t.records),loading:!1})}),(function(t){e.props.errorToggle("Failed to fetch data: "+t),e.setState({loading:!1})}))}},{key:"componentDidMount",value:function(){this.props.editMode||this.fetchData()}},{key:"genThingItem",value:function(e,t){return r.a.createElement(Ne.Link,{key:t,to:this.props.getLink(this.props.thingType,e),className:"list-group-item"},this.props.getSummary(e),this.props.newBadge&&(a=e.created,!fe(1e3*a,86400))&&r.a.createElement(pe.a,{bsStyle:"primary"},"New!"),r.a.createElement("i",{className:"fa fa-angle-right"}));var a}},{key:"render",value:function(){var e=this,t=this.state.data.map((function(t,a){return e.genThingItem(t,a)}));return this.props.editMode?t=[1,2,3,4,5].map((function(t){return r.a.createElement("div",{className:"list-group-item"},e.props.thingType," - ",t)})):0===t.length&&(t=r.a.createElement("div",{className:"list-group-item list-group-item-".concat(this.props.emptyStyle)},this.props.emptyString)),r.a.createElement("div",{className:"ThingList"},!this.props.editMode&&r.a.createElement("h1",null,this.props.title),this.state.loading?r.a.createElement(ut,{loading:!0}):r.a.createElement(ct.a,null,t))}}]),a}(n.PureComponent);ht.defaultProps={queryOptions:{limit:5,offset:0,sort:{id:-1},columns:["id","subject"]},processData:function(e){return e},getSummary:function(e){return e.subject},getLink:function(e,t){return"".concat(e,"/").concat(t.id)},emptyString:"No Data",emptyStyle:"warning",newBadge:!0};var mt,gt={intel:{type:ht,title:"Recent Intel",description:"List of the 5 most recent Intel entries",props:{thingType:"intel",title:"Recent Intel"}}},yt={events:{type:ht,title:"Recent Events",description:"List of the 5 most recent events",props:{thingType:"event",title:"Recent Events"}}},ft={incidents:{type:ht,title:"Recent Incidents",description:"List of the 5 most recent Incidents",props:{thingType:"incident",title:"Recent Incidents"}}},vt={tasks:{type:ht,title:"Open Tasks",description:"List of recent open tasks",props:{thingType:"task",title:"Open Tasks",queryOptions:{limit:5,offset:0,sort:{updated:-1},filter:{"metadata.task.status":"open"},columns:["id","body_plain","target"]},getSummary:function(e){return e.body_plain.length>200?e.body_plain.substr(0,200)+"...":e.body_plain},getLink:function(e,t){var a=t.target;return"".concat(e,"/").concat(a.type,"/").concat(a.id,"/").concat(t.id)},emptyString:"None",emptyStyle:"info"}}},bt={yourTasks:{type:ht,title:"Your Tasks",description:"List of open tasks that you own",props:{thingType:"task",title:"Your Tasks",queryOptions:{limit:5,offset:0,sort:{updated:1},filter:{"metadata.task.status":"open",owner:ce("whoami")},columns:["id","body_plain","target"]},getSummary:function(e){return e.body_plain.length>200?e.body_plain.substr(0,200)+"...":e.body_plain},getLink:function(e,t){var a=t.target;return"".concat(e,"/").concat(a.type,"/").concat(a.id,"/").concat(t.id)},emptyString:"None!",emptyStyle:"success"}}},Et={unviewedAlerts:{type:ht,title:"Unviewed Alerts",description:"Recent alerts with zero views",props:{thingType:"alertgroup",title:"Unviewed Alerts",queryOptions:{limit:5,offset:0,sort:{id:-1},filter:{created:JSON.stringify(Ee(ve())),views:0},columns:["id","subject"]},newBadge:!1,emptyString:"None!",emptyStyle:"success"}}},kt={topEvents:{type:ht,title:"Important Events",description:"Recent Events with open tasks",props:{thingType:"event",title:"Important Events",queryOptions:{limit:5,offset:0,sort:{has_tasks:1},filter:{created:JSON.stringify(Ee(ve()))},columns:["id","subject","has_tasks"]},processData:function(e){return e.filter((function(e){return e.has_tasks}))},getSummary:function(e){return"".concat(e.subject," (").concat(e.has_tasks," open task").concat(e.has_tasks>1?"s":"",")")},newBadge:!1,emptyString:"None!",emptyStyle:"success"}}},wt={viewedEvents:{type:ht,title:"Most Viewed Events",description:"Events with the most views over the last week",props:{thingType:"event",title:"Most Viewed Events",queryOptions:{limit:5,offset:0,sort:{views:-1},filter:{created:JSON.stringify(Ee(be()))},columns:["id","subject","views"]},processData:function(e){return e.filter((function(e){return e.views>0}))},getSummary:function(e){return"".concat(e.subject," (").concat(e.views," view").concat(e.views>1?"s":"",")")}}}},St={entryEvents:{type:ht,title:"Events with Entries",description:"Events with the most entries over the last week",props:{thingType:"event",title:"Events with Entries",queryOptions:{limit:5,offset:0,sort:{entry_count:-1},filter:{created:JSON.stringify(Ee(be()))},columns:["id","subject","entry_count"]},processData:function(e){return e.filter((function(e){return e.entry_count>0}))},getSummary:function(e){return"".concat(e.subject," (").concat(e.entry_count," ").concat(e.entry_count>1?"entries":"entry",")")}}}},Tt=Object(S.a)({},Object(S.a)({},gt,{},yt,{},ft,{},vt,{},bt,{},Et,{},kt,{},wt,{},St),{},function(){for(var e={},t=0,a=["heatmap","art","alertpower","created"];t=n.state.maxTags?n.setState({placeholder:"Only "+n.state.maxTags+" allowed. Please delete a tag to add another one"}):(t.push(e),n.props.onChange(t),n.setState({tags:t,placeholder:""}))},n.handleInputChange=function(e){if(e&&e.length>=2){var t=[];X.a.ajax({type:"get",url:"/scot/api/v2/ac/"+n.props.type+"/"+e,success:function(e){e=e.records;for(var a=0;a=n.props.maxTags?X()(".react-tags__search").hide():X()(".react-tags__search").show()};var r=[];n.props.value&&(r=n.props.value);var i=void 0;return n.props.maxTags&&(i=n.props.maxTags),n.state={suggestions:[],tags:r,maxTags:i,placeholder:""},n}return Object(C.a)(a,[{key:"componentDidUpdate",value:function(){this.showHideInput()}},{key:"render",value:function(){return r.a.createElement("div",{className:"TagInput"},r.a.createElement(aa.a,{tags:this.state.tags,suggestions:this.state.suggestions,handleAddition:this.handleAdd,handleDelete:this.handleDelete,handleInputChange:this.handleInputChange,autoresize:!1,autofocus:!1,allowBackspace:!1,allowNew:!0,placeholder:this.state.placeholder,tagComponent:ra}))}}]),a}(n.Component),ra=function(e){var t=e.classNames,a=e.onDelete,n=e.tag;return r.a.createElement("div",{className:t.selectedTag},r.a.createElement("span",{className:t.selectedTagName},n.name),r.a.createElement("i",{className:"fa fa-remove","aria-hidden":"true",onClick:a}))},ia=na,oa=a(983),sa=a(91),la=a.n(sa),ca=a(168);function da(e,t){return pa.apply(this,arguments)}function pa(){return(pa=Object(ca.a)(la.a.mark((function e(t,a){return la.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==a){e.next=6;break}return e.next=3,Me.a.get(t);case 3:return e.abrupt("return",e.sent);case 6:return e.next=8,Me.a.get(t,{params:a});case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ua(){return(ua=Object(ca.a)(la.a.mark((function e(t,a){return la.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===a){e.next=6;break}return e.next=3,Me.a.post(t,a);case 3:return e.abrupt("return",e.sent);case 6:return e.next=8,Me.a.post(t);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ha(e,t){return ma.apply(this,arguments)}function ma(){return(ma=Object(ca.a)(la.a.mark((function e(t,a){return la.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me.a.put(t,a);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ga(){return(ga=Object(ca.a)(la.a.mark((function e(t){return la.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me.a.delete(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ya=a(165),fa=a.n(ya),va=a(450),ba=a.n(va),Ea={numberFilter:function(e){var t=e.filter,a=e.onChange;return r.a.createElement(ea.a,{debounceTimeout:200,type:"number",minLength:1,min:0,value:t?t.value:"",onChange:function(e){return a(e.target.value)},style:{width:"100%"}})},stringFilter:function(e){var t=e.filter,a=e.onChange;return r.a.createElement(ea.a,{debounceTimeout:200,minLength:1,value:t?t.value:"",onChange:function(e){return a(e.target.value)},style:{width:"100%"}})},dropdownFilter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["open","closed","promoted"],t=arguments.length>1?arguments[1]:void 0;return function(a){var n=a.filter,i=a.onChange;return r.a.createElement(Jt.a,{trigger:"focus",placement:"bottom",overlay:r.a.createElement(Yt.a,{id:"status_popover",style:{maxWidth:"400px"}},r.a.createElement(Qt.a,{vertical:!0,style:{maxHeight:"50vh",overflowY:"auto",position:"relative"}},e.map((function(e){return r.a.createElement(W.a,{key:e,onClick:function(){return i(e)},active:n&&n.value===e,style:{textTransform:"capitalize",textAlign:t||null}},e)}))),n&&r.a.createElement(W.a,{block:!0,onClick:function(){return i("")},bsStyle:"primary",style:{marginTop:"3px"}},"Clear"))},r.a.createElement("input",{type:"text",value:n?n.value:"",readOnly:!0,style:{width:"100%",cursor:"pointer"}}))}},dateRange:function(e){var t,a=e.filter,n=e.onChange;return r.a.createElement(Jt.a,{trigger:"click",rootClose:!0,placement:"bottom",overlay:r.a.createElement(Yt.a,{id:"daterange_popover",style:{maxWidth:"350px"}},r.a.createElement($t.a,{numberOfCalendars:2,selectionType:"range",showLegend:!1,singleDateRange:!0,onSelect:function(e,t){n(function(e){return{start:Math.round(e.start)/1e3,end:Math.round(e.end)/1e3}}(e))},value:a?(t=a.value,ge.range(1e3*t.start,1e3*t.end)):null}),a&&r.a.createElement(W.a,{block:!0,onClick:function(){n(""),document.dispatchEvent(new MouseEvent("click"))},bsStyle:"primary"},"Clear"))},r.a.createElement("input",{type:"text",value:a?ke(a.value):"",readOnly:!0,style:{width:"100%",cursor:"pointer"}}))},tagFilter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"tag";return function(t){var a=t.filter,n=t.onChange;return r.a.createElement(ia,{type:e,onChange:n,value:a?a.value:[]})}}},ka={dateFormater:function(e){var t=new Date(1e3*e.value);return r.a.createElement("span",null,t.toLocaleString())},alertStatus:function(e){var t=e.value.split("/").map((function(e){return parseInt(e.trim(),10)})),a=Object(Gt.a)(t,3),n=a[0],i=a[1],o="open btn-danger";return a[2]?o="promoted btn-warning":i&&(n||(o="closed btn-success")),r.a.createElement("div",{className:"alertStatusCell ".concat(o)},e.value)},textStatus:function(e){var t="green";return"open"===e.value||"disabled"===e.value||"assigned"===e.value?t="red":"promoted"===e.value&&(t="orange"),r.a.createElement("span",{style:{color:t}},e.value)},alertStatusAlerts:function(e){return r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},r.a.createElement(Oa,{row:e}))},flairCell:function(e){return void 0!==e?r.a.createElement(xa,{value:e.value}):null},appliesTo:function(e){if(void 0!==e){if(Array.isArray(e.original.data.applies_to)){var t=e.original.data.applies_to.map((function(e){return e}));return r.a.createElement("span",null,t.join(", "))}return r.a.createElement("span",null,e.original.data.applies_to)}}},wa={Id:{Header:"ID",accessor:"id",width:80,Filter:Ea.numberFilter},AlertStatus:{Header:"Status",accessor:function(e){return e.open_count+" / "+e.closed_count+" / "+e.promoted_count},column:["open_count","closed_count","promoted_count"],id:"status",width:150,Filter:Ea.dropdownFilter(),Cell:ka.alertStatus,style:{padding:0}},EventStatus:{Header:"Status",accessor:"status",maxWidth:100,Cell:ka.textStatus,Filter:Ea.dropdownFilter()},IncidentStatus:{Header:"Status",accessor:"status",maxWidth:100,Cell:ka.textStatus,Filter:Ea.dropdownFilter(["open","closed"])},SigStatus:{Header:"Status",accessor:"status",maxWidth:100,Cell:ka.textStatus,Filter:Ea.dropdownFilter(["enabled","disabled"])},TaskStatus:{Header:"Task Status",accessor:function(e){return e.metadata.task.status},id:"metadata.task.status",column:"metadata",Cell:ka.textStatus,Filter:Ea.dropdownFilter(["open","assigned","closed"])},TaskSummary:{Header:"Task Summary",accessor:function(e){return e.body_plain.length>200?e.body_plain.substr(0,200)+"...":e.body_plain},id:"summary",minWidth:400,maxWidth:5e3,Filter:Ea.stringFilter},Subject:{Header:"Subject",accessor:"subject",minWidth:400,maxWidth:5e3,Filter:Ea.stringFilter},Location:{Header:"Location",accessor:"location",minWidth:80,maxWidth:180,Filter:Ea.stringFilter},Created:{Header:"Created",accessor:"created",minWidth:100,maxWidth:180,Filter:Ea.dateRange,Cell:ka.dateFormater},Updated:{Header:"Updated",accessor:"updated",minWidth:100,maxWidth:180,Filter:Ea.dateRange,Cell:ka.dateFormater},Occurred:{Header:"When",accessor:"when",minWidth:100,maxWidth:180,Filter:Ea.dateRange,Cell:ka.dateFormater},Sources:{Header:"Sources",accessor:"source",column:"source",id:"source",minWidth:120,Filter:Ea.tagFilter("source")},Tags:{Header:"Tags",accessor:"tag",column:"tag",id:"tag",minWidth:120,Filter:Ea.tagFilter("tag")},TaskOwner:{Header:"Task Owner",accessor:"owner",maxWidth:80,Filter:Ea.stringFilter},Owner:{Header:"Owner",accessor:"owner",maxWidth:80,Filter:Ea.stringFilter},Entries:{Header:"Entries",accessor:"entry_count",maxWidth:70,Filter:Ea.numberFilter},Views:{Header:"Views",accessor:"views",maxWidth:70,Filter:Ea.numberFilter},DOE:{Header:"DOE",accessor:"doe_report_id",maxWidth:100,Filter:Ea.stringFilter},IncidentType:{Header:"Type",accessor:"type",minWidth:200,maxWidth:250,Filter:Ea.dropdownFilter(["Type 1 : Root Compromise","Type 1 : User Compromise","Type 1 : Loss/Theft/Missing Desktop","Type 1 : Loss/Theft/Missing Laptop","Type 1 : Loss/Theft/Missing Media","Type 1 : Loss/Theft/Missing Other","Type 1 : Malicious Code Trojan","Type 1 : Malicious Code Virus","Type 1 : Malicious Code Worm","Type 1 : Malicious Code Other","Type 1 : Web Site Defacement","Type 1 : Denial of Service","Type 1 : Critical Infrastructure Protection","Type 1 : Unauthorized Use","Type 1 : Information Compromise","Type 2 : Attempted Intrusion","Type 2 : Reconnaissance Activity"],"left")},AppliesTo:{Header:"Applies To",id:"data.applies_to",accessor:function(e){return e.data.applies_to},Cell:ka.appliesTo,Filter:Ea.tagFilter,minWidth:400,maxWidth:5e3},Value:{Header:"Value",accessor:"value",Filter:Ea.stringFilter,minWidth:400,maxWidth:5e3},Name:{Header:"Name",accessor:"name",Filter:Ea.stringFilter,minWidth:200,maxWidth:300},Group:{Header:"Group",accessor:function(e){return e.data.signature_group?e.data.signature_group.join(", "):""},column:"signature_group",id:"data.signature_group",Filter:Ea.stringFilter},Type:{Header:"Type",accessor:function(e){return e.data.type},id:"data.type",Filter:Ea.stringFilter,minWidth:100,maxWidth:150},EntityType:{Header:"Type",accessor:"type",Filter:Ea.stringFilter,minWidth:100,maxWidth:150},Description:{Header:"Description",accessor:function(e){return e.data.description},Filter:Ea.stringFilter,minWidth:400,id:"data.description",maxWidth:5e3},TargetType:{Header:"Type",accessor:function(e){return e.target.type},column:"target",id:"target_type",Filter:Ea.stringFilter},TargetId:{Header:"Target Id",accessor:function(e){return e.target.id},column:"target",id:"target_id",Filter:Ea.numberFilter},OpenTasks:{Header:"Open Tasks",accessor:"has_tasks",Filter:Ea.numberFilter,maxWidth:90,filterable:!1},Status:{accessor:"status",Header:"Status",width:100,Cell:ka.alertStatusAlerts},EntryCountColumn:{width:50,resizable:!0,expander:!0,filter:!1,accessor:"entry_count",Header:"Entries",Expander:function(e){var t=e.isExpanded,a=Object(k.a)(e,["isExpanded"]);return r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},t?r.a.createElement(oa.a,{variant:"contained",style:{backgroundColor:"orange",color:"white"}},"Close entries"):r.a.createElement("div",null,0==a.original.entry_count?r.a.createElement(fa.a,null):r.a.createElement(oa.a,{variant:"contained",size:"small",style:{backgroundColor:"#5bc0de",color:"white"}},a.original.entry_count," entries")))},getProps:function(e,t,a){return{className:"show-pointer"}}}},Sa={style:{padding:"5px 5px"}},Ta={alert:["Id","Status","EntryCountColumn"],alertgroup:["Id","Location","AlertStatus","Subject","Created","Sources","Tags","Views","OpenTasks"],event:["Id","Location","EventStatus","Subject","Created","Updated","Sources","Tags","Owner","Entries","Views","OpenTasks"],incident:["Id","Location","DOE","IncidentStatus","Owner","Subject","Occurred","IncidentType",{title:"Tags",options:{minWidth:100,maxWidth:150}},{title:"Sources",options:{minWidth:100,maxWidth:150}}],intel:["Id","Location","Subject","Created","Updated","Sources",{title:"Tags",options:{minWidth:200,maxWidth:250}},"Owner","Entries","Views"],task:["Id","Location","Subject","TargetType","TargetId",{title:"TaskOwner",options:{minWidth:150,maxWidth:500}},"TaskStatus","TaskSummary",{title:"Updated",options:{minWidth:150,maxWidth:500}}],signature:["Id","Location","Name","Type","SigStatus","Group","Description","Owner","Tags","Sources","Updated"],guide:["Id","Location","Subject","AppliesTo"],entity:["Id","Location","Value","EntityType","Entries"],default:["Id","Location","AlertStatus","Subject","Created","Sources","Tags","Views"]},Ca=function(e,t,a,n){function r(e){return e.reduce((function(e,t){return void 0!==e.width?e.width+t.width:e+t.width}))}Ta.hasOwnProperty(e)||(e="default"),!1===n&&"alert"===e&&(e="alertgroup");var i,o=[],s=Object(w.a)(Ta[e]);try{for(s.s();!(i=s.n()).done;){var l=i.value,c={};"object"===typeof l?c=Object(S.a)({},wa[l.title],{},l.options):"string"===typeof l&&(c=wa[l]),o.push(Object(S.a)({},Sa,{},c))}}catch(g){s.e(g)}finally{s.f()}if("alert"===e){a.length>0&&(a[0].data.columns&&a[0].data.columns.forEach(function(e,a){if("status"!==e){var n={accessor:e,Header:e,filter:!0,Cell:function(e){return ka.flairCell(e)},width:ja(t,e,e)};o.push(n)}else{var r={accessor:"status ",Header:e,filter:!0,Cell:function(e){return ka.flairCell(e)},width:80};o.push(r)}}.bind(void 0)),o.forEach((function(e,t){e.getProps=function(e,a){return{style:{backgroundColor:t%2===0?"#bababa45":""}}}})));var d=3;o.forEach((function(e){90===e.width&&d++,e.accessor.includes("time")&&d++}));var p=window.innerWidth-32,u=r(o);if(u0?t=n.props.alertsSelected:n.props.entryData.length>0&&(t=n.props.entryData);var a={alerts:t.map((function(t){var a={id:t.id,status:e};return"closed"===e&&(a.closed=Math.round((new Date).getTime()/1e3)),a}))};n.props.ToggleProcessingMessage(!0),ha("/scot/api/v2/".concat(n.props.type,"/").concat(n.props.id),a).then(function(){console.log("success"),this.props.ToggleProcessingMessage(!1)}.bind(Object(l.a)(n))).catch(function(t){this.props.errorToggle("failed to ".concat(e," selected alerts"),t),this.props.ToggleProcessingMessage(!1)}.bind(Object(l.a)(n)))},n.alertPromoteSelected=function(){var e=JSON.stringify({promote:"new"}),t=n.props.alertsSelected.map((function(e){return e.id}));n.props.ToggleProcessingMessage(!0),ha("/scot/api/v2/alert/".concat(t[0]),e).then(function(e){var a={promote:e.data.pid};1===t.length&&this.props.ToggleProcessingMessage(!1),t.forEach(function(e,n){0===n?console.log("promoting rest of alerts"):ha("/scot/api/v2/alert/".concat(e),a).then(function(){n+1===t.length&&this.props.ToggleProcessingMessage(!1)}.bind(this)).catch(function(e){this.props.errorToggle("failed to promoted selected alerts",e)}.bind(this))}.bind(this))}.bind(Object(l.a)(n)))},n.alertSelectExisting=function(){var e=prompt("Please Enter Event ID to promote into");""!==e&&null!==e&&(n.props.alertsSelected.forEach(function(t){var a={promote:parseInt(e,10)};ha("/scot/api/v2/alert/".concat(t.id),a).then((function(){console.log("Successfully promoted to event ".concat(e))})).catch(function(){prompt("Please use numbers only"),this.selectExisting()}.bind(this))}.bind(Object(l.a)(n))),window.open("#/event/"+e))},n.alertExportCSV=function(){var e=n.props.alertsSelected,t=[];e.forEach(function(e){Object.keys(e).forEach((function(t){if("string"===typeof e[t]){var a=e[t];e[t]=a.replace(/(<([^>]+)>)/gi,"")}})),t.push(e)}.bind(Object(l.a)(n))),n.setState({dataToDownload:t},(function(){n.csvLink.link.click()}))},n.PrintPrepare=function(){X()("iframe").contents().each((function(e,t){X()(t).find("blockquote").each((function(e,t){X()(t).css({"max-height":"5000px"})})),X()(t).find("pre").each((function(e,t){X()(t).css({"max-height":"5000px","word-wrap":"break-word"})}))})),setTimeout(function(){this.forceUpdate()}.bind(Object(l.a)(n)),500),setTimeout((function(){X()("#print-button").click()}),1e3)},n.Print=function(){window.print()},n.componentDidMount=function(){"alertgroup"!==n.props.type&&"alert"!==n.props.type||X()("#main-detail-container").keydown(function(e){X()("input").is(":focus")||(79===e.keyCode&&!0!==e.ctrlKey&&!0!==e.metaKey&&this.alertOpenOrCloseSelected("open"),67===e.keyCode&&!0!==e.ctrlKey&&!0!==e.metaKey&&this.alertOpenOrCloseSelected("closed"))}.bind(Object(l.a)(n))),X()("#main-detail-container").keydown(function(e){X()("input").is(":focus")||84===e.keyCode&&!0!==e.ctrlKey&&!0!==e.metaKey&&this.toggleFlair()}.bind(Object(l.a)(n)))},n.componentWillUnmount=function(){X()("#main-detail-container").unbind("keydown")},n.guideToggle=function(){n.props.flairToolbarToggle(n.props.guideID,null,"guide",{top:0,left:0},null)},n.sourceToggle=function(){n.props.flairToolbarToggle(n.props.id,null,"source",{top:0,left:0},null)},n.createGuide=function(){var e=JSON.stringify({subject:"ENTER A GUIDE NAME",data:{applies_to:[n.props.subjectName]}});X.a.ajax({type:"POST",url:"/scot/api/v2/guide",data:e,contentType:"application/json; charset=UTF-8",success:function(e){window.open("/#/guide/"+e.id)},error:function(e){this.props.errorToggle("failed to create a new guide",e)}.bind(Object(l.a)(n))})},n.reparseFlair=function(){X.a.ajax({type:"put",url:"/scot/api/v2/"+n.props.type+"/"+n.props.id,data:JSON.stringify({parsed:0}),contentType:"application/json; charset=UTF-8",success:function(){console.log("reparsing started")},error:function(e){this.props.errorToggle("failed to reparse flair",e)}.bind(Object(l.a)(n))})},n.createLinkSignature=function(){X.a.ajax({type:"POST",url:"/scot/api/v2/signature",data:JSON.stringify({target:{id:n.props.id,type:n.props.type},name:"Name your Signature",status:"disabled"}),contentType:"application/json; charset=UTF-8",success:function(e){var t="/#/signature/"+e.id;window.open(t,"_blank")},error:function(e){this.props.errorToggle("failed to create a signature",e)}.bind(Object(l.a)(n))})},n.manualUpdate=function(){n.props.updated(null,null)},n.render=function(){var e=n.props.subjectType,t=n.props.type,a=n.props.id,i=n.props.status,o="";if(n.props.headerData.subject?o=n.props.headerData.subject:n.props.headerData.value?o=n.props.headerData.value:n.props.headerData.name?o=n.props.headerData.name:n.props.headerData.body&&(o=n.props.headerData.body),"alertgroup"!==t){var s=!0;return"promoted"!==i?"alert"===t?"Event":"event"===t?"Incident":"incident"!==t&&"guide"!==t&&"intel"!==t&&"signature"!==t&&"entity"!==t||(s=!1):s=!1,r.a.createElement("div",{className:"entry-header detail-buttons"},"entity"!==t?r.a.createElement(Ba.a,{eventkey:"1",bsStyle:"success",onClick:n.props.entryToggle,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-plus-circle","aria-hidden":"true"})," Add Entry"):null,"entity"!==t?r.a.createElement(Ba.a,{eventkey:"2",onClick:n.props.fileUploadToggle,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-upload","aria-hidden":"true"})," Upload File"):null,r.a.createElement(Ba.a,{eventkey:"3",onClick:n.toggleFlair,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-eye-slash","aria-hidden":"true"})," Toggle Flair"),"alertgroup"===t||"event"===t||"intel"===t?r.a.createElement(Ba.a,{eventkey:"4",onClick:n.props.viewedByHistoryToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/clock.png",alt:""})," Viewed By History"):null,r.a.createElement(Ba.a,{eventkey:"5",onClick:n.props.changeHistoryToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/clock.png",alt:""})," ",e," History"),"entity"!==t?r.a.createElement(Ba.a,{eventkey:"6",onClick:n.props.permissionsToggle,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-users","aria-hidden":"true"})," Permissions"):null,r.a.createElement(cn,{type:t,id:a,tlp:n.props.headerData.tlp}),r.a.createElement(Ba.a,{eventkey:"7",onClick:n.props.entitiesToggle,bsSize:"xsmall"},r.a.createElement("span",{className:"entity"},"__")," View Entities"),"guide"===t?r.a.createElement(Ba.a,{eventkey:"8",onClick:n.props.guideRedirectToAlertListWithFilter,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-table","aria-hidden":"true"})," View Related Alerts"):null,r.a.createElement(Ba.a,{onClick:n.props.linksModalToggle,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-link","aria-hidden":"true"})," Links"),s?r.a.createElement(za,{type:t,id:a,updated:n.props.updated,errorToggle:n.props.errorToggle}):null,"signature"!==t?r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:n.createLinkSignature},r.a.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"})," Create & Link Signature"):null,"signature"===t?r.a.createElement(Ba.a,{eventkey:"11",onClick:n.props.showSignatureOptionsToggle,bsSize:"xsmall",bsStyle:"warning"},"View Custom Options"):null,r.a.createElement(Ba.a,{onClick:n.PrintPrepare,bsSize:"xsmall",bsStyle:"info"},r.a.createElement("i",{className:"fa fa-print","aria-hidden":"true"})," Print"),r.a.createElement(Ba.a,{onClick:n.Print,style:{display:"none"},id:"print-button"}),r.a.createElement(Ba.a,{onClick:n.props.exportToggle,bsSize:"xsmall",id:"export-button"},r.a.createElement("i",{className:"fa fa-share","aria-hidden":"true"})," Export"," ",e," "),r.a.createElement(Ba.a,{bsStyle:"danger",eventkey:"9",onClick:function(){return n.props.deleteToggle(t)},bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-trash","aria-hidden":"true"})," Delete"," ",e),r.a.createElement(Ha.a,{style:{float:"right"}},r.a.createElement(Ga,{type:t,id:a,string:o}),r.a.createElement(Ba.a,{onClick:n.props.markModalToggle,bsSize:"xsmall"},"Marked Objects"),r.a.createElement(Ba.a,{id:"refresh-detail",bsStyle:"info",eventkey:"10",onClick:n.manualUpdate,bsSize:"xsmall",style:{float:"right"}},r.a.createElement("i",{className:"fa fa-refresh","aria-hidden":"true"}))))}return r.a.createElement("div",{className:"entry-header second-menu detail-buttons"},r.a.createElement(Ha.a,{style:{float:"right"}},r.a.createElement(Ga,{type:t,id:a,string:o}),r.a.createElement(Ba.a,{onClick:n.props.markModalToggle,bsSize:"xsmall"},"Marked Actions"),r.a.createElement(Ba.a,{bsStyle:"info",eventkey:"16",onClick:n.manualUpdate,bsSize:"xsmall",style:{float:"right"}},r.a.createElement("i",{className:"fa fa-refresh","aria-hidden":"true"}))),r.a.createElement("span",{className:"entry-header detail-buttons"},r.a.createElement(Ba.a,{eventkey:"1",onClick:n.toggleFlair,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-eye-slash","aria-hidden":"true"})," Toggle Flair"),r.a.createElement(Ba.a,{eventkey:"2",onClick:n.reparseFlair,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-refresh","aria-hidden":"true"})," Reparse Flair"),r.a.createElement("span",null,null!==n.props.guideID?r.a.createElement(Ba.a,{eventkey:"3",onClick:n.guideToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/guide.png",alt:""})," Guide"):r.a.createElement(Ba.a,{eventkey:"3",onClick:n.createGuide,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/guide.png",alt:""})," Create Guide")),null==n.props.headerData?null:r.a.createElement(Ba.a,{eventkey:"4",onClick:n.sourceToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/code.png",alt:""})," View Source"),r.a.createElement(Ba.a,{eventkey:"5",onClick:n.props.entitiesToggle,bsSize:"xsmall"},r.a.createElement("span",{className:"entity"},"__")," View Entities"),"alertgroup"===t||"event"===t||"intel"===t?r.a.createElement(Ba.a,{eventkey:"6",onClick:n.props.viewedByHistoryToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/clock.png",alt:""})," Viewed By History"):null,r.a.createElement(Ba.a,{eventkey:"7",onClick:n.props.changeHistoryToggle,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/clock.png",alt:""})," ",e," History"),r.a.createElement(cn,{type:t,id:a,tlp:n.props.headerData.tlp}),r.a.createElement(Ba.a,{onClick:n.props.linksModalToggle,bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-link","aria-hidden":"true"})," Links"),r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:n.createLinkSignature},r.a.createElement("i",{className:"fa fa-pencil","aria-hidden":"true"})," Create & Link Signature"),r.a.createElement(Ba.a,{onClick:n.Print,style:{display:"none"},id:"print-button"}),r.a.createElement(Ba.a,{bsStyle:"danger",eventkey:"8",onClick:function(){return n.props.deleteToggle(t)},bsSize:"xsmall"},r.a.createElement("i",{className:"fa fa-trash","aria-hidden":"true"})," Delete"," ",e)),n.props.alertsSelected.length>0?r.a.createElement("span",null,r.a.createElement(Ba.a,{eventkey:"8",onClick:function(){return n.alertOpenOrCloseSelected("open")},bsSize:"xsmall",bsStyle:"danger"},r.a.createElement("img",{src:"/images/open.png",alt:""})," Open Selected"),r.a.createElement(Ba.a,{eventkey:"9",onClick:function(){return n.alertOpenOrCloseSelected("closed")},bsSize:"xsmall",bsStyle:"success"},r.a.createElement("i",{className:"fa fa-flag-checkered","aria-hidden":"true"})," Close Selected"),r.a.createElement(Ba.a,{eventkey:"10",onClick:n.alertPromoteSelected,bsSize:"xsmall",bsStyle:"warning"},r.a.createElement("img",{src:"/images/megaphone.png",alt:""})," Promote Selected"),r.a.createElement(Ba.a,{eventkey:"11",onClick:n.alertSelectExisting,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/megaphone_plus.png",alt:""})," Add Selected to"," ",r.a.createElement("b",null,"Existing Event")),r.a.createElement(dn.CSVLink,{data:n.state.dataToDownload,filename:"data.csv",className:"hidden",ref:function(e){return n.csvLink=e},target:"_blank"}),r.a.createElement(Ba.a,{eventkey:"14",onClick:n.alertExportCSV,bsSize:"xsmall"},r.a.createElement("img",{src:"/images/csv_text.png",alt:""})," Export to CSV"),r.a.createElement(Ga,{type:t,id:a,string:o,isAlert:!0,getSelectedAlerts:n.getSelectedAlerts,alertsSelected:n.props.alertsSelected}),r.a.createElement(Ba.a,{onClick:n.PrintPrepare,bsSize:"xsmall",bsStyle:"info"},r.a.createElement("i",{className:"fa fa-print","aria-hidden":"true"})," Print"),r.a.createElement(Ba.a,{onClick:n.Print,style:{display:"none"},id:"print-button"}),r.a.createElement(Ba.a,{eventkey:"15",onClick:function(){return n.props.deleteToggle("alert")},bsSize:"xsmall",bsStyle:"danger"},r.a.createElement("i",{className:"fa fa-trash","aria-hidden":"true"})," Delete Selected")):null)},n.state={globalFlairState:!0,promoteRemaining:null,dataToDownload:[]},n}return a}(r.a.Component),un=a(52),hn=a.n(un),mn=a(64),gn={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"},overlay:{zIndex:"1101"}},yn={READY:{style:"danger"},LOADING:{text:"Processing...",style:"default",disabled:!0},SUCCESS:{text:"Success!",style:"success"},ERROR:{text:"Error!",style:"warning"}},fn=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).deleteItems=function(){var e=n.props.deleteType,t=[];(t="alert"!==e?[parseInt(n.props.id,10)]:n.props.alertsSelected.map((function(e){return e.id}))).forEach(function(a,n){var r=this.props.enqueueSnackbar,i=function(e){return ga.apply(this,arguments)}("/scot/api/v2/".concat(e,"/").concat(a));this.props.removeCallback(parseInt(this.props.id,10)),i.then(function(){n===t.length-1&&"alert"===e&&this.props.updated(),"alert"!==e?(this.props.history.push("/"+e),r("Successfully deleted ".concat(this.props.id,"."),{variant:"success"})):"alert"===e&&r("Successfully deleted ".concat(a,"."),{variant:"success"})}.bind(this)).catch((function(e){r("Failed deleting exception.",{variant:"error"})}))}.bind(Object(l.a)(n))),n.props.deleteToggle(e)},n.state={key:e.id},n}return Object(C.a)(a,[{key:"render",value:function(){var e=this.props.deleteType,t="";if("alert"!==e)t=" ".concat(e,": ").concat(this.props.id);else if("alert"===e){var a=this.props.alertsSelected.map((function(e){return r.a.createElement("span",{style:{paddingRight:10}},e.id)}));t=r.a.createElement("span",null,e,"(s) : ",a)}return r.a.createElement(hn.a,{isOpen:!0,onRequestClose:this.props.deleteToggle,style:gn},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{alt:"",src:"images/close_toolbar.png",className:"close_toolbar",onClick:this.props.deleteToggle}),r.a.createElement("h3",{id:"myModalLabel"},"Are you sure you want to delete ",t,"?")),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(W.a,{id:"cancel-delete",onClick:this.props.deleteToggle},"Cancel"),r.a.createElement(W.a,{bsStyle:"danger",id:"delete",onClick:this.deleteItems},"Delete")))}}]),a}(r.a.Component),vn=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={key:e.id},n.toggle=n.toggle.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"toggle",value:function(){X.a.ajax({type:"delete",url:"scot/api/v2/entry/"+this.props.entryid,success:function(e){console.log("success: "+e);this.state.key}.bind(this),error:function(e){this.props.errorToggle("Failed to delete entry",e)}.bind(this)}),this.props.deleteToggle()}},{key:"render",value:function(){return r.a.createElement(hn.a,{isOpen:!0,onRequestClose:this.props.deleteToggle,style:gn},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{alt:"",src:"images/close_toolbar.png",className:"close_toolbar",onClick:this.props.deleteToggle}),r.a.createElement("h3",{id:"myModalLabel"},"Are you sure you want to delete Entry: ",this.props.entryid,"?")),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(W.a,{id:"cancel-delete",onClick:this.props.deleteToggle},"Cancel"),r.a.createElement(W.a,{bsStyle:"danger",id:"delete",onClick:this.toggle},"Delete")))}}]),a}(n.PureComponent),bn=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={deleteButton:yn.READY},n.deleteAll=n.deleteAll.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"deleteAll",value:function(){var e=this;this.setState({deleteButton:yn.LOADING});var t=!0,a=this.props.things;Array.isArray(a)||(a=[a]),X.a.when.apply(X.a,Object(T.a)(a.map((function(t){return e.deleteAjax(t)})))).then((function(){e.setState({deleteButton:yn.SUCCESS})}),(function(a){console.error(a),e.setState({deleteButton:yn.ERROR}),e.props.errorToggle("error deleting",a),t=!1})).always((function(){setTimeout((function(){e.setState({deleteButton:yn.READY}),e.props.callback(t)}),2e3)}))}},{key:"deleteAjax",value:function(e){return X.a.ajax({type:"delete",url:"/scot/api/v2/"+e.type+"/"+e.id,contentType:"application/json; charset=UTF-8"})}},{key:"render",value:function(){var e=this.props.things,t="";t=Array.isArray(e)?e.map((function(e){return"".concat(e.type,": ").concat(e.id)})).join(", "):"".concat(e.type,": ").concat(e.id);var a=this.state.deleteButton;return r.a.createElement(hn.a,{isOpen:!0,onRequestClose:this.props.callback,style:gn},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{alt:"",src:"images/close_toolbar.png",className:"close_toolbar",onClick:this.props.callback}),r.a.createElement("h3",{id:"myModalLabel"},"Are you sure you want to delete ",t,"?")),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(W.a,{id:"cancel-delete",onClick:this.props.callback},"Cancel"),r.a.createElement(W.a,{bsStyle:a.style,id:"delete",onClick:this.deleteAll,disabled:a.disabled},a.text?a.text:"Delete")))}}]),a}(n.PureComponent),En=Object(mn.withSnackbar)(fn),kn=a(293),wn=a.n(kn),Sn=a(105),Tn=a.n(Sn),Cn={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},xn=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).componentDidMount=function(){var e=de("whoami");e&&n.setState({whoami:e})},n.componentWillReceiveProps=function(){n.setState({currentOwner:n.props.data})},n.toggle=function(){if(void 0!==n.state.whoami){var e={owner:n.state.whoami};X.a.ajax({type:"put",url:"scot/api/v2/"+n.props.type+"/"+n.props.id,data:JSON.stringify(e),contentType:"application/json; charset=UTF-8",success:function(e){},error:function(e){this.props.errorToggle("Failed to change owner",e)}.bind(Object(l.a)(n))})}else n.props.errorToggle("Failed to detect current user");n.ownerToggle()},n.ownerToggle=function(){!1===n.state.ownerToolbar?n.setState({ownerToolbar:!0}):n.setState({ownerToolbar:!1})},n.render=function(){return r.a.createElement("div",null,r.a.createElement(Tn.a,{bsSize:"xsmall",id:"event_owner",title:n.state.currentOwner},r.a.createElement(E.a,{eventKey:"1",onClick:n.ownerToggle},"Take Ownership")),n.state.ownerToolbar?r.a.createElement(hn.a,{isOpen:!0,onRequestClose:n.ownerToggle,style:Cn},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{src:"images/close_toolbar.png",alt:"",className:"close_toolbar",onClick:n.ownerToggle}),r.a.createElement("h3",{id:"myModalLabel"},"Take Ownership")),r.a.createElement("div",{className:"modal-body"},"Are you sure you want to take ownership of this event?"),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(wn.a,{id:"cancel-ownership",onClick:n.ownerToggle},"Cancel"),r.a.createElement(wn.a,{bsStyle:"info",id:"take-ownership",onClick:n.toggle},"Take Ownership"))):null)},n.state={currentOwner:n.props.data,whoami:void 0,ownerToolbar:!1},n}return a}(r.a.Component),jn=a(52),On=a(14),Dn={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},Nn=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).render=function(){return r.a.createElement("div",null,r.a.createElement(jn,{isOpen:!0,onRequestClose:n.props.entitiesToggle,style:Dn},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{src:"/images/close_toolbar.png",className:"close_toolbar",alt:"",onClick:n.props.entitiesToggle}),r.a.createElement("h3",{id:"myModalLabel"},"List of Entities")),r.a.createElement("div",{className:"modal-body",style:{maxHeight:"50vh",overflowY:"auto"}},n.state.entitiesBody?r.a.createElement(_n,{data:n.props.entityData,flairToolbarToggle:n.props.flairToolbarToggle}):null),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(On,{onClick:n.props.entitiesToggle},"Done"))))},n.state={entitiesBody:!0},n}return a}(r.a.Component),_n=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){var e;Object(s.a)(this,a);for(var n=arguments.length,i=new Array(n),o=0;o]*)>/g,"<$1span$2>")+" "},relative_urls:!1,remove_script_host:!1,link_assume_external_targets:!0,toolbar1:"full screen spellchecker | undo redo | bold italic | alignleft aligncenter alignright | bullist numlist | forecolor backcolor fontsizeselect fontselect formatselect | blockquote code link image insertdatetime | customBlockquote",theme:"modern",content_css:"/css/entryeditor.css",height:250,verify_html:!1,setup:function(e){e.addButton("customBlockquote",{text:"500px max-height blockquote",tooltip:"Insert a 500px max-height div (blockquote)",onclick:function(){e.insertContent("


")}})}}}))),r.a.createElement("div",null,r.a.createElement("br",null),r.a.createElement(oa.a,{style:{marginLeft:5,backgroundColor:"red",color:"white"},onClick:this.handlePUT,variant:"contained"},"Send Update to Server"),r.a.createElement(oa.a,{style:{marginLeft:5},onClick:this.props.handleClose,variant:"contained"},"Cancel")))))}}]),a}(r.a.Component),ar=Object(mn.withSnackbar)(Object(pt.a)((function(e){return{card:{minWidth:700,marginBottom:20}}}))(tr)),nr=a(1007),rr=a(14),ir=a(36).Prompt,or=a(36).Link,sr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).componentDidMount=function(){var e=de("whoami");e&&n.setState({whoami:e}),"Edit"===n.props.entryAction&&X.a.ajax({type:"GET",url:"/scot/api/v2/entry/"+n.props.id,success:function(e){this.setState({content:e.body,asyncContentLoaded:!0,recentlyUpdated:e.updated}),this.forceUpdate()}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Error getting original data from source. Copy/Paste original",e),this.setState({content:"Error getting original data from source. Copy/Paste original",asyncContentLoaded:!0}),this.forceUpdate()}.bind(Object(l.a)(n))}),X()("#not_saved_entry_"+n.state.key).position()&&X()(".entry-wrapper").scrollTop(X()(".entry-wrapper").scrollTop()+X()("#not_saved_entry_"+n.state.key).position().top)},n.onCancel=function(){n.setState({leaveCatch:!1}),n.props.addedentry(),n.setState({change:!1})},n.submit=function(){if(""===X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").text()&&0===X()("#"+n.state.key+"_ifr").contents().find("#tinymce").find("img").length)alert("Please Add Some Text");else if("Reply"===n.props.entryAction){var e={};X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").each((function(e,t){X()(t).find("img").each((function(e,t){if(X()(t)[0].src.startsWith("blob")){var a=document.createElement("canvas"),n=new Image;n=X()(t),a.width=n[0].width,a.height=n[0].height,a.getContext("2d").drawImage(n[0],0,0);var r=a.toDataURL("image/png");X()(t).attr("src",r)}}))})),e=JSON.stringify({parent:Number(n.props.id),body:X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").html(),target_id:Number(n.props.targetid),target_type:n.props.type,tlp:"unset"}),X.a.ajax({type:"post",url:"/scot/api/v2/entry",data:e,contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){this.setState({leaveCatch:!1}),this.props.addedentry()}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to add entry.",e)}.bind(Object(l.a)(n))})}else"Edit"===n.props.entryAction?X.a.ajax({type:"GET",url:"/scot/api/v2/entry/"+n.props.id,success:function(e){this.state.recentlyUpdated!==e.updated?(this.forEdit(!1),this.setState({showConflict:!0,remoteconflict:e.body})):this.forEdit(!0)}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("failed to get data for edit",e)}.bind(Object(l.a)(n))}):"alert"===n.props.type?(X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").each((function(e,t){X()(t).find("img").each((function(e,t){if(X()(t)[0].src.startsWith("blob")){var a=document.createElement("canvas"),n=new Image;n=X()(t),a.width=n[0].width,a.height=n[0].height,a.getContext("2d").drawImage(n[0],0,0);var r=a.toDataURL("image/png");X()(t).attr("src",r)}}))})),e=JSON.stringify({body:X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").html(),target_id:Number(n.props.targetid),target_type:"alert",tlp:"unset",parent:0}),X.a.ajax({type:"post",url:"/scot/api/v2/entry",data:e,contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){this.setState({leaveCatch:!1}),this.props.addedentry(),this.props.toggleVisibility()}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to add entry.",e)}.bind(Object(l.a)(n))})):(X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").each((function(e,t){X()(t).find("img").each((function(e,t){if(X()(t)[0].src.startsWith("blob")){var a=document.createElement("canvas"),n=new Image;n=X()(t),a.width=n[0].width,a.height=n[0].height,a.getContext("2d").drawImage(n[0],0,0);var r=a.toDataURL("image/png");X()(t).attr("src",r)}}))})),e={parent:0,body:X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").html(),target_id:Number(n.props.targetid),target_type:n.props.type,tlp:"unset"},X.a.ajax({type:"post",url:"/scot/api/v2/entry",data:JSON.stringify(e),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){this.setState({leaveCatch:!1}),this.props.addedentry()}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to add entry.",e)}.bind(Object(l.a)(n))}))},n.exportContent=function(){if(n.props.recipients.length>0){var e;X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").each((function(e,t){X()(t).find("img").each((function(e,t){if(X()(t)[0].src.startsWith("blob")){var a=document.createElement("canvas"),n=new Image;n=X()(t),a.width=n[0].width,a.height=n[0].height,a.getContext("2d").drawImage(n[0],0,0);var r=a.toDataURL("image/png");X()(t).attr("src",r)}}))})),e=JSON.stringify({body:X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").html(),to:n.props.recipients,thing:n.props.type}),X.a.ajax({type:"post",url:"/scot/api/v2/sendexport",data:e,contentType:"application/json; charset=UTF-8",dataType:"json",success:function(){this.setState({leaveCatch:!1}),this.props.exportResponse("success")}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to export "+this.props.type,e),this.props.exportResponse("error")}.bind(Object(l.a)(n))})}else n.props.errorToggle("Please enter a valid email address")},n.handleClose=function(){n.setState({showConflict:!1})},n.forEdit=function(e){if(e){X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").each((function(e,t){X()(t).find("img").each((function(e,t){if(X()(t)[0].src.startsWith("blob")){var a=document.createElement("canvas"),n=new Image;n=X()(t),a.width=n[0].width,a.height=n[0].height,a.getContext("2d").drawImage(n[0],0,0);var r=a.toDataURL("image/png");X()(t).attr("src",r)}}))}));var t={parent:Number(n.props.parent),body:X()("#tiny_"+n.state.key+"_ifr").contents().find("#tinymce").html(),target_id:Number(n.props.targetid),target_type:n.props.type,parsed:0};X.a.ajax({type:"put",url:"/scot/api/v2/entry/"+n.props.id,data:JSON.stringify(t),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){this.setState({leaveCatch:!1}),this.props.addedentry()}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to edit entry.",e)}.bind(Object(l.a)(n))})}},n.handleEditorChange=function(e){n.setState({localcontent:e})},n.render=function(){var e="not_saved_entry_"+n.state.key;return r.a.createElement("div",{id:e,className:"not_saved_entry"},n.state.showConflict?r.a.createElement(nr.a,{fullWidth:!0,maxWidth:"md",open:n.state.showConflict,onClose:n.handleClose,"aria-labelledby":"simple-dialog-title"},r.a.createElement(ar,{targetid:n.props.targetid,type:n.props.type,parent:n.props.parent,addedEntry:n.props.addedentry,id:n.props.id,localconflict:n.state.localcontent,handleClose:n.handleClose,remoteconflict:n.state.remoteconflict})):null,r.a.createElement("div",{className:"row-fluid entry-outer",style:{border:"3px solid blue",marginLeft:"auto",marginRight:"auto",width:"99.3%"}},r.a.createElement("div",{className:"row-fluid entry-header"},r.a.createElement("div",{className:"entry-header-inner"},"[",r.a.createElement(or,{style:{color:"black"},to:"not_saved_0"},"Not_Saved_0"),"]by ",n.state.whoami,r.a.createElement("span",{className:"pull-right",style:{display:"inline-flex",paddingRight:"3px"}},"Export"===n.props.entryAction?r.a.createElement(rr,{bsSize:"xsmall",onClick:n.exportContent,bsStyle:"success"},"Export"):r.a.createElement(rr,{bsSize:"xsmall",onClick:n.submit,bsStyle:"success"},"Submit"),r.a.createElement(rr,{bsSize:"xsmall",onClick:n.onCancel},"Cancel")))),n.state.asyncContentLoaded?r.a.createElement(Xn.a,{id:n.state.tinyID,className:"inputtext",initialValue:n.state.content,plugins:"advlist lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking save table directionality emoticons template paste textpattern imagetools",onEditorChange:n.handleEditorChange,init:{table_default_attributes:{border:"5",borderStyle:"solid",borderColor:"blue"},auto_focus:n.state.tinyID,browser_spellcheck:!0,contextmenu:!1,codesample_languages:[{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"},{text:"Docker",value:"docker"},{text:"HTTP",value:"http"},{text:"JavaScript",value:"javascript"},{text:"Java",value:"java"},{text:"JSON",value:"json"},{text:"Markdown",value:"md"},{text:"Perl",value:"perl"},{text:"PHP",value:"php"},{text:"Powershell",value:"powershell"},{text:"Python",value:"python"},{text:"Ruby",value:"ruby"},{text:"Bash / Shell",value:"bash"},{text:"Splunk SPL ",value:"splunk-spl"},{text:"Visual Basic",value:"visual-basic"},{text:"HTML/XML",value:"markup"}],plugins:"advlist lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking save table directionality emoticons template paste textpattern imagetools codesample",table_clone_elements:"strong em b i font h1 h2 h3 h4 h5 h6 p div",paste_retain_style_properties:"all",paste_data_images:!0,paste_preprocess:function(e,t){t.content=t.content.replace(/<(\/)?a([^>]*)>/g,"<$1span$2>")+" "},paste_postprocess:function(e,t){t.node.querySelectorAll("table").forEach((function(e){e.setAttribute("border","1"),e.setAttribute("cellpadding","1"),e.setAttribute("cellspacing","0")}))},relative_urls:!1,remove_script_host:!1,link_assume_external_targets:!0,toolbar1:"full screen | undo redo | bold italic | alignleft aligncenter alignright | bullist numlist | forecolor backcolor fontsizeselect fontselect formatselect | blockquote code link image insertdatetime | customBlockquote | codesample",content_css:"/css/entryeditor.css",height:250,verify_html:!1,setup:function(e){e.ui.registry.addMenuButton("customBlockquote",{text:"500px max-height blockquote",tooltip:"Insert a 500px max-height div (blockquote)",fetch:function(){e.insertContent("


")}})}}}):r.a.createElement("div",null,"Loading Editor...")),r.a.createElement(ir,{when:n.state.leaveCatch,message:"Unsubmitted entry detected. You may want to submit or copy the contents of the entry before navigating elsewhere. Click CANCEL to prevent navigation elsewhere."}))};var i,o,c=new Date,d="tiny_"+(c=c.getTime());switch(n.props.entryAction){case"Add":case"Reply":i="",o=!0;break;case"Copy To Entry":i=n.props.content,o=!0;break;case"Edit":i="",o=!1;break;case"Export":i=n.props.content,o=!0;break;default:i="",o=!0}return n.state={tinyID:d,key:c,content:i,asyncContentLoaded:o,leaveCatch:!0,whoami:void 0,recentlyUpdated:0,showConflict:!1,localcontent:""},n}return a}(r.a.Component),lr=a(455),cr=a.n(lr),dr=a(166),pr=a.n(dr),ur=a(296),hr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).componentWillMount=function(){},n.onLoad=function(){if(void 0!==document.getElementById("iframe_"+n.props.id)&&null!==document.getElementById("iframe_"+n.props.id))if("complete"===document.getElementById("iframe_"+n.props.id).contentDocument.readyState){var e=X()("#iframe_"+n.props.id),t=X()(e).contents(),a=X()(t).find("head");a&&(X()(a).find("link")||a.append(X()("",{rel:"stylesheet",href:"css/sandbox.css",type:"text/css"}))),setTimeout(function(){void 0!==document.getElementById("iframe_"+this.props.id)&&document.getElementById("iframe_"+this.props.id).contentWindow.requestAnimationFrame(function(){var e;e=document.getElementById("iframe_"+this.props.id).contentWindow.document.body.scrollHeight,e+="px",this.state.height!==e&&this.setState({height:e})}.bind(this))}.bind(Object(l.a)(n)),250)}else setTimeout(n.onLoad,0)},n.componentDidMount=function(){n.setState({isMounted:!0});var e=n.state.tabs,t=n.props.entityvalue;if("source"!==n.props.entitytype)if(void 0===n.state.entityid||isNaN(n.state.entityid))X.a.ajax({type:"GET",url:"scot/api/v2/"+n.props.entitytype+"/byname",data:{name:t},success:function(t){var a=t.id;this.state.isMounted&&(this.setState({entityid:a}),X.a.ajax({type:"GET",url:"scot/api/v2/"+this.props.entitytype+"/"+a,success:function(t){var n={data:t,entityid:a,entitytype:this.props.entitytype,valueClicked:t.value};if(e.push(n),this.state.isMounted){var r=[];r.push(a),this.setState({tabs:e,currentKey:a,initialLoad:!0,processedIds:r}),this.props.createCallback(this.props.entityid,this.updated)}}.bind(this),error:function(e){this.props.errorToggle("failed to get entity detail information",e)}.bind(this)}))}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("failed to get entity detail id information ",e)}.bind(Object(l.a)(n))});else{var a=n.state.entityid;Array.isArray(a)||(a=[parseInt(a,10)]);for(var r=0;r586&&(t.style.width=Za+e.clientX-Xa+"px"),en+e.clientY-$a>386&&(t.style.height=en+e.clientY-$a+"px")},n.stopDrag=function(e){document.documentElement.removeEventListener("mousemove",n.doDrag,!1),document.documentElement.removeEventListener("mouseup",n.stopDrag,!1),n.allowiFrameMouseEvent()},n.moveDivInit=function(e){document.documentElement.addEventListener("mouseup",n.moveDivStop,!1),n.blockiFrameMouseEvent()},n.moveDivStop=function(e){document.documentElement.removeEventListener("mouseup",n.moveDivStop,!1),n.allowiFrameMouseEvent()},n.blockiFrameMouseEvent=function(){X()("iframe").each((function(e,t){X()(t).addClass("pointerEventsOff")}))},n.allowiFrameMouseEvent=function(){X()("iframe").each((function(e,t){X()(t).removeClass("pointerEventsOff")}))},n.handleSelectTab=function(e){n.setState({currentKey:e})},n.positionRightBoundsCheck=function(e){return e?X()(document).width()-(n.state.defaultEntityOffset.left+e)-n.state.entityWidthint:X()(document).width()-n.state.defaultEntityOffset.left-n.state.entityWidthint},n.containerHeightAdjust=function(){var e;!0===n.props.fullScreen&&(X()("#list-view-container")[0]?(e=X()(window).height()-X()("#list-view-container").height()-X()("#header").height()-70,e+="px"):(e=X()(window).height()-X()("#header").height()-70,e+="px"),n.state.isMounted&&n.setState({height:e}))},n.render=function(){var e,t=[],a="box react-draggable entityPopUp entityPopUpMaxSizeDefault";(!0===n.props.fullScreen||X()("react-draggable-dragged"))&&(a="box react-draggable entityPopUp"),!0===n.props.fullScreen&&(a+=" height100percent");for(var i=0;i"),this.props.data){var n=this.props.data[a];e.push(r.a.createElement("tr",null,r.a.createElement("td",{style:{paddingRight:"4px",paddingLeft:"4px"}},r.a.createElement("b",null,a)),r.a.createElement("td",{style:{paddingRight:"4px",paddingLeft:"4px"}},this.props.data[a]))),t.push(''+a+''+n+"")}t.push("");var i=t.join("");return r.a.createElement("div",null,r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:this.copyToEntity},"Copy to ",r.a.createElement("b",null,"entity")," entry"),"alertgroup"!==this.props.type?r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:this.copyToEntry},"Copy to"," ",r.a.createElement("b",null,this.props.type," ",this.props.id)," ","entry"):null,this.state.copyToEntryToolbar?r.a.createElement(sr,{entryAction:"Copy To Entry",type:this.props.type,targetid:this.props.id,id:this.props.id,addedentry:this.copyToEntry,content:i,errorToggle:this.props.errorToggle}):null,this.state.copyToEntityToolbar?r.a.createElement(sr,{entryAction:"Copy To Entry",type:"entity",targetid:this.props.entityData.id,id:this.props.entityData.id,addedentry:this.copyToEntity,content:i,errorToggle:this.props.errorToggle}):null,r.a.createElement("div",{className:"entityTableWrapper"},r.a.createElement("table",{className:"tablesorter entityTableHorizontal",id:"sortableentitytable",width:"100%"},e)))}}]),a}(r.a.Component),vr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){return Object(s.a)(this,a),t.apply(this,arguments)}return Object(C.a)(a,[{key:"render",value:function(){var e=this.props.dataSource;return r.a.createElement("div",{style:{overflowY:"auto",maxHeight:"70vh"}},r.a.createElement("div",null,r.a.createElement(Kn.a,{data:e,expandLevel:4})))}}]),a}(r.a.Component),br=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).componentDidMount=function(){n.setState({isMounted:!0});["incident","event","intel","guide","signature","alert"].forEach(function(e){var t=[],a=[],n=[],r=[];da("scot/api/v2/entity/".concat(this.props.entityid,"/").concat(e)).then(function(i){var o=i.data.records;this.props.updateAppearances(o.length),o.forEach(function(i){i.type=e,"open"===i.status?t.push(i):"closed"===i.status?a.push(i):"promoted"===i.status?n.push(i):r.push(i)}.bind(this)),t.sort(this.compareUpdatedDate),a.sort(this.compareUpdatedDate),n.sort(this.compareUpdatedDate),r.sort(this.compareUpdatedDate);var s=this.state.loadingType;s[e]=!1,this.setState({entityReferencesData:[].concat(Object(T.a)(this.state.entityReferencesData),n,t,a,r),loadingType:s})}.bind(this))}.bind(Object(l.a)(n))),n.state.entityReferencesData.length>0&&n.props.showFullEntityButton()},n.componentDidUpdate=function(){},n.componentWillUnmount=function(){n.setState({isMounted:!1})},n.compareUpdatedDate=function(e,t){return e.updated>t.updated?-1:1},n.render=function(){var e=n.state.loading;n.state.loadingSignature||n.state.loadingEvents||n.state.loadingAlerts||n.state.loadingIncidents||n.state.loadingIncidents||(e=!1);n.props.entityid;return n.state.entityReferencesData.length>0&&(console.log("got data"),console.log(n.state.entityReferencesData),n.state.entityReferencesData.length),r.a.createElement("div",null,e?r.a.createElement("span",null,"Loading: ",n.state.loadingAlerts?r.a.createElement("span",null,"Alerts "):null,n.state.loadingEvents?r.a.createElement("span",null,"Events "):null,n.state.loadingIncidents?r.a.createElement("span",null,"Incidents "):null,n.state.loadingIntel?r.a.createElement("span",null,"Intel "):null,n.state.loadingSignature?r.a.createElement("span",null,"Signature "):null):null,r.a.createElement(ur.a,null,r.a.createElement(Kt.a,{className:"-striped -highlight",data:n.state.entityReferencesData,columns:[{Header:"Status",accessor:"status",width:79,Cell:function(e){var t="";return void 0===e.original.status?r.a.createElement("div",null,"N/A"):"closed"===e.original.status?r.a.createElement("span",{style:{color:"green"}},e.original.status):"open"===e.original.status?r.a.createElement("span",{style:{color:"red"}},e.original.status):"promoted"===e.original.status?("alert"===e.original.type?t="/#/event/".concat(e.original.promotion_id):"event"===e.original.type&&(t="/#/incident/".concat(e.original.promotion_id)),r.a.createElement("div",{style:{display:"flex",alignItems:"center"}},r.a.createElement(W.a,{bsSize:"xsmall",bsStyle:"warning",href:t,target:"_blank",style:{lineHeight:"12pt",fontSize:"10pt",marginLeft:"auto"}},e.original.status))):void 0}},{Header:"ID",accessor:"id",width:85,Cell:function(e){if(e.original.id)return r.a.createElement(Ne.Link,{to:"/".concat(e.original.type,"/").concat(e.original.id),target:"_blank"},e.original.id)}},{Header:"type",accessor:"type",width:50},{Header:"Entries",accessor:"entry_count",width:66},{Header:"subject",accessor:"subject"},{Header:"updated",accessor:"updated",width:121,Cell:function(e){var t="Unknown";return void 0!==e.original.updated&&(t=Math.floor((Math.round((new Date).getTime()/1e3)-e.original.updated)/86400)),r.a.createElement("span",null,t," days ago")}}],minRows:0,sortable:!0})))};var i=100;return"entity"===n.props.type&&(i=void 0),n.state={entityReferencesData:[],maxRecords:i,loadingType:{alert:!0,event:!0,intel:!0,incident:!0,signature:!0,guide:!0},loading:!0,isMounted:!1,order:"asc",orderBy:"id"},n}return a}(r.a.Component),Er=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).entryToggle=function(){!1===n.state.entryToolbar?n.setState({entryToolbar:!0}):n.setState({entryToolbar:!1})},n.state={entryToolbar:!1},n}return Object(C.a)(a,[{key:"render",value:function(){return r.a.createElement(Jn.a,{className:"tab-content",defaultActiveKey:1,bsStyle:"pills"},r.a.createElement(Qn.a,{eventKey:1,style:{overflow:"auto",maxHeight:"70vh"}},r.a.createElement("div",null,r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:this.entryToggle},"Add Entry"),r.a.createElement("br",null)),this.state.entryToolbar?r.a.createElement(sr,{entryAction:"Add",type:"guide",targetid:this.props.entityid,id:"add_entry",addedentry:this.entryToggle,errorToggle:this.props.errorToggle}):null,r.a.createElement(Zr,{addFlair:this.props.addFlair,type:"guide",form:this.props.form,id:this.props.entityid,isPopUp:1,headerData:this.props.data,errorToggle:this.props.errorToggle,createCallback:this.props.createCallback,removeCallback:this.props.removeCallback})))}}]),a}(r.a.Component),kr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){return Object(s.a)(this,a),t.apply(this,arguments)}return Object(C.a)(a,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("h2",null,"Source"),r.a.createElement(Jn.a,{className:"tab-content",defaultActiveKey:1,bsStyle:"tabs"},r.a.createElement(Qn.a,{eventKey:1,className:"entityPopUpButtons",style:{overflow:"auto",maxHeight:"70vh"},title:"Rendered"},r.a.createElement(pr.a,{style:{width:"100%"},head:r.a.createElement("link",{rel:"stylesheet",type:"text/css",href:"/css/sandbox.css"}),frameBorder:"0",id:"iframe_"+this.props.entityid,sandbox:"allow-same-origin",height:"500px"},r.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.data.body}}))),r.a.createElement(Qn.a,{eventKey:2,className:"entityPopUpButtons",style:{overflow:"auto",maxHeight:"70vh"},title:"Raw Text"},r.a.createElement(pr.a,{head:r.a.createElement("link",{rel:"stylesheet",type:"text/css",href:"/css/sandbox.css"}),style:{width:"100%"},frameBorder:"0",id:"iframe_"+this.props.entityid,sandbox:"allow-same-origin",styleSheets:["/css/sandbox.css"],height:"500px"},">",r.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.data.body_plain}})))))}}]),a}(r.a.Component),wr=a(459),Sr=a.n(wr),Tr=a(464),Cr=a(14),xr=a(36).Link,jr=[],Or=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).onCancel=function(){jr=[],n.props.fileUploadToggle()},n.Close=function(e){for(var t=0;t0)for(var e=0;el&&(l=d)}if(void 0!=this.state.keyboardHandlers)for(var m=0;m=1){var t=[];X.a.ajax({type:"get",url:"/scot/api/v2/ac/"+this.props.type+"/"+e.target.value,success:function(e){e=e.records;for(var a=0;a=1&&this.state.match.length>=1?r.a.createElement(W.a,{onClick:this.Confirmation,bsStyle:"primary",type:"submit",active:!0},"Continue"):null,r.a.createElement(W.a,{onClick:this.props.ToggleCreateEntity},"Cancel"))))}}]),a}(n.Component),Wr=a(458),Br=a.n(Wr),Vr=a(1006),zr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){var e;Object(s.a)(this,a);for(var n=arguments.length,r=new Array(n),i=0;i0?r.a.createElement(Zr,{entryData:t.entryData,type:"alert",id:t.row.id,showEntryData:t.showEntryData,errorToggle:t.errorToggle,createCallback:t.createCallback,removeCallback:t.removeCallback,entityData:t.entityData,addFlair:t.addFlair}):null)},Zr=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).getEntryData=function(){var e=n.props,t=e.type,a=e.id;(n.setState({isMounted:!0}),"alert"===t||"entity"===t||1===n.props.isPopUp)&&da("scot/api/v2/".concat(t,"/").concat(a,"/entry"),null).then(function(e){this.state.isMounted&&(this.setState({showEntryData:!0,entryData:e.data.records}),e.data.records.forEach(function(t,a){this.props.createCallback(e.data.records[a].id,this.updatedCB)}.bind(this)),this.Watcher())}.bind(Object(l.a)(n))).catch(function(e){this.state.isMounted&&(this.setState({showEntryData:!0}),this.props.errorToggle("Failed to load entry data.",e))}.bind(Object(l.a)(n)))},n.getEntityData=function(){var e=n.props,t=e.addFlair,a=e.type,r=e.id;"alert"!==a&&"entity"!==a&&"incident"!==a&&"alertgroup"!==a&&1!==n.props.isPopUp||da("scot/api/v2/".concat(a,"/").concat(r,"/entity"),null).then(function(e){var n=e.data.records;if(this.state.isMounted){this.setState({showEntityData:!0,entityData:n});var i={waitEntry:function(){!1===this.state.showEntryData?setTimeout(i.waitEntry,50):setTimeout(function(){t(n,null,a,null,r)}.bind(this))}.bind(this)};i.waitEntry()}}.bind(Object(l.a)(n))).catch(function(e){this.state.isMounted&&(this.setState({showEntityData:!0}),this.props.errorToggle("Failed to load entity data.",e))}.bind(Object(l.a)(n)))},n.updatedCB=function(){n.getEntityData(),n.getEntryData()},n.flairToolbarToggle=function(e,t,a,r,i){n.state.isMounted&&n.setState({flairToolbar:!0,entityid:e,entityvalue:t,entitytype:a,entityoffset:r,entityobj:i})},n.flairToolbarOff=function(){if(n.state.isMounted){var e=n.state.entityDetailKey+1;n.setState({flairToolbar:!1,entityDetailKey:e})}},n.linkWarningToggle=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.state.isMounted&&(!1===n.state.linkWarningToolbar?n.setState({linkWarningToolbar:!0,link:e,nopop:t}):n.setState({linkWarningToolbar:!1,nopop:t}))},n.Watcher=function(){var e=n.props.type+"-detail-container";if("alertgroup"!=n.props.type){document.querySelectorAll("iframe").forEach(function(e,t){e.contentWindow.requestAnimationFrame(function(){if(null!=e.contentDocument){[].push(this.checkFlairHover),e.addEventListener("mouseenter",(function(t,a){var n=setInterval(this[0],50,e);console.log("Now watching iframe "+n)})),e.addEventListener("mouseleave",(function(){var t=X()(e).data("intervalID");window.clearInterval(t),console.log("No longer watching iframe "+t)}))}}.bind(this))}.bind(Object(l.a)(n)))}else X()(e).find("a, .entity").not(".not_selectable").each(function(e,t){X()(t).off("mousedown"),X()(t).on("mousedown",function(e){var t=e.target;if("extras"==X()(t)[0].className&&(t=X()(t)[0].parentNode),X()(t).attr("url")){var a=X()(t).attr("url");this.linkWarningToggle(a)}else{var n=X()(t).attr("data-entity-id"),r=X()(t).attr("data-entity-value"),i=X()(t).offset(),o=X()(t);this.flairToolbarToggle(n,r,"entity",i,o)}}.bind(this))}.bind(Object(l.a)(n)))},n.checkFlairHover=function(e){"alertgroup"!=n.props.type&&(null!=e.contentDocument&&X()(e).contents().find(".entity").each(function(t,a){if("rgb(255, 0, 0)"==X()(a).css("background-color"))X()(a).data("state","down");else if("down"==X()(a).data("state")){X()(a).data("state","up");var n=X()(a).attr("data-entity-id"),r=X()(a).attr("data-entity-value"),i=X()(a),o=e,s={top:X()(a).offset().top+X()(o).offset().top,left:X()(a).offset().left+X()(o).offset().left};this.flairToolbarToggle(n,r,"entity",s,i)}}.bind(Object(l.a)(n))),null!=e.contentDocument&&X()(e).contents().find("a").each(function(e,t){if("rgb(255, 0, 0)"==X()(t).css("color"))X()(t).data("state","down");else if("down"==X()(t).data("state")){X()(t).data("state","up");var a=X()(t).attr("url");this.linkWarningToggle(a)}}.bind(Object(l.a)(n))))},n.containerHeightAdjust=function(){setTimeout(function(){var e,t=document.getElementsByClassName("ReactTable")[0].clientHeight;void 0!==t&&(0!==t?(e=window.innerHeight-t-X()("#header").height()-90,e+="px"):(e=X()(window).height()-X()("#header").height()-78,e+="px"),this.state.isMounted&&this.setState({height:e}))}.bind(Object(l.a)(n)),500)},n.render=function(){var e="detail-container",t=n.state.height,a=n.props.entryData,i=n.props.type,o=n.props.id,s=n.props.showEntryData,l="row-fluid entry-wrapper entry-wrapper-main";return"alert"===i?(l="row-fluid entry-wrapper entry-wrapper-main-nh",a=n.state.entryData,s=n.state.showEntryData):"alertgroup"===i?l="row-fluid alert-wrapper entry-wrapper-main":"entity"!==i&&1!==n.props.isPopUp||(l="row-fluid entry-wrapper-entity",a=n.state.entryData,s=n.state.showEntryData),"alert"!==i&&1!==n.props.isPopUp||(e=n.props.type+"-detail-container",t=null),r.a.createElement("div",{id:e,key:o,className:l,style:{height:t}},"entity"!==i&&"alert"!==i?r.a.createElement(zr,{type:i,id:o,errorToggle:n.props.errorToggle,form:n.props.form,headerData:n.props.headerData}):null,"signature"===i&&null!==n.props.headerData?r.a.createElement(Pr,{type:i,id:o,headerData:n.props.headerData,errorToggle:n.props.errorToggle,showSignatureOptions:n.props.showSignatureOptions}):null,s?r.a.createElement(ei,Object.assign({updated:n.updatedCB,removeCallback:n.props.removeCallback,createCallback:n.props.createCallback,data:a,type:i,id:o,entityData:n.state.entityData,entryToggle:n.props.entryToggle,subcomponent:n.props.subcomponent,setAlertColumns:n.props.setAlertColumns,setEntryEntities:n.props.setEntryEntities},n.props)):r.a.createElement("span",null,"Loading..."),n.props.entryToolbar?r.a.createElement("div",null,r.a.createElement(sr,{entryAction:"Add",type:n.props.type,targetid:n.props.id,id:null,addedentry:n.props.entryToggle,updated:n.updatedCB,errorToggle:n.props.errorToggle})):null,n.props.fileUploadToolbar?r.a.createElement("div",null,r.a.createElement(Or,{type:n.props.type,targetid:n.props.id,id:"file_upload",fileUploadToggle:n.props.fileUploadToggle,updated:n.updatedCB,errorToggle:n.props.errorToggle})):null,n.state.flairToolbar?r.a.createElement(hr,{key:n.state.entityDetailKey,flairToolbarToggle:n.flairToolbarToggle,flairToolbarOff:n.flairToolbarOff,entityid:n.state.entityid,entityvalue:n.state.entityvalue,entitytype:n.state.entitytype,type:n.props.type,id:n.props.id,entityoffset:n.state.entityoffset,entityobj:n.state.entityobj,linkWarningToggle:n.linkWarningToggle,errorToggle:n.props.errorToggle,createCallback:n.props.createCallback,removeCallback:n.props.removeCallback,addFlair:n.props.addFlair}):null,n.state.linkWarningToolbar?r.a.createElement(Ar,{linkWarningToggle:n.linkWarningToggle,link:n.state.link,nopop:n.state.nopop}):null)};var i=Math.floor(1e3*Math.random());return n.state={showEntryData:n.props.showEntryData,showEntityData:n.props.showEntityData,entryData:n.props.entryData,entityData:void 0===n.props.entityData?null:n.props.entityData,entityid:null,entitytype:null,entityoffset:null,entityobj:null,key:n.props.id,flairToolbar:!1,notificationType:null,notificationMessage:"",height:null,entityDetailKey:i,isMounted:!1},n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){var e=this.props,t=e.type,a=e.id,n=e.addFlair;this.getEntryData(),null!==this.state.entityData&&n(this.state.entityData,null,t,null,a),this.props.createCallback(this.props.id,this.updatedCB),this.containerHeightAdjust(),window.addEventListener("resize",this.containerHeightAdjust),document.querySelector(".ReactTable").onresize=function(){this.containerHeightAdjust()}.bind(this)}},{key:"componentWillReceiveProps",value:function(){this.containerHeightAdjust()}},{key:"componentDidUpdate",value:function(){1==this.state.runWatcher&&this.Watcher()}},{key:"componentWillUnmount",value:function(){this.setState({isMounted:!1})}}]),a}(r.a.Component),ei=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){var e;Object(s.a)(this,a);for(var n=arguments.length,i=new Array(n),o=0;o0){var e=this.createData(),t=Ca("alert",e,this.props.items,!0);this.setState({data:e,columns:t})}this.props.type&&this.setState({type:this.props.type,entityData:this.props.entityData}),this.props.addFlair&&this.setState({addFlair:this.props.addFlair}),this.props.alertsSelected&&this.setState({selected:this.props.alertsSelected}),X()("#main-detail-container").keydown(function(e){X()("input").is(":focus")||65!==e.keyCode||!0!==e.ctrlKey&&!0!==e.metaKey||(this.handleSelectAll(),e.preventDefault())}.bind(this))}},{key:"componentDidUpdate",value:function(e,t){if(e.entityData!==this.props.entityData&&this.setState({entityData:this.props.entityData,columns:Ca("alert",this.state.data,this.props.items,!0,this.props.entityData)}),t.flairOff!==this.state.flairOff){var a=this.createData();this.setState({data:a})}if(e.items!==this.props.items){var n=this.createData();this.setState({data:n})}this.props.alertsSelected!==t.selected&&void 0!==this.props.alertsSelected&&this.setState({selected:this.props.alertsSelected})}},{key:"render",value:function(){var e=this,t=this.state,a=t.columns,n=t.data,i=this.props,o=i.addFlair,s=i.type,l=(i.headerData,i.entityData);i.updated;return r.a.createElement("div",null,r.a.createElement(Kt.a,{styleName:"styles.ReactTable",ref:function(t){return e.reactTable=t},key:2,data:n,columns:a,filterable:!0,expanded:this.state.expanded,onExpandedChange:function(t,a,n){e.setState({expanded:t}),o(l,null,"entry",null,null)},defaultFilterMethod:function(e,t){if(t[e.id].includes(e.value))return t},SubComponent:function(t){var a,n=t.row;return r.a.createElement($r,(a={flag:e.props.subcomponent,row:n,entryToggle:e.props.entryToggle,errorToggle:e.props.errorToggle,entryData:e.props.entryData,showEntryData:e.props.showEntryData},Object(ze.a)(a,"errorToggle",e.props.errorToggle),Object(ze.a)(a,"createCallback",e.props.createCallback),Object(ze.a)(a,"removeCallback",e.props.removeCallback),Object(ze.a)(a,"entityData",e.props.entityData),Object(ze.a)(a,"addFlair",e.props.addFlair),Object(ze.a)(a,"updated",e.props.updated),a))},onFilteredChange:function(e,t){o(l,null,s,null,null)},onSortedChange:function(e,t,a){o(l,null,s,null,null)},showPagination:!1,pageSize:n.length,getTdProps:function(e,t){return{style:{maxWidth:"fit-content"}}},getTrProps:function(t,a){return a&&a.row&&void 0!==e.props.alertsSelected?{onClick:function(n){(n.ctrlKey||n.metaKey&&83===n.keyCode)&&e.props.handleSelectAll(t.sortedData),n.ctrlKey||n.metaKey?(n.preventDefault(),e.props.handleMultiSelection(a.original)):n.shiftKey?(document.getSelection().removeAllRanges(),e.props.handleShiftSelect(e.state.selected[0].id,a.original.id,t.sortedData)):e.props.handleSelection(a.original)},style:{background:e.state.selected.some((function(e){return a.original.id===e.id}))?"#a7c6a5":"",borderBottom:"1px solid black",maxHeight:200,overflowY:"auto"}}:{style:{maxHeight:200,overflowY:"auto"}}}}),r.a.createElement(ai,{items:this.props.items,flairOff:this.props.flairOff,headerData:this.props.headerData}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.flairOff!==t.flairOff?{flairOff:e.flairOff}:e.alertsSelected!==t.selected?{selected:e.alertsSelected}:null}}]),a}(r.a.Component),ai=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){return Object(s.a)(this,a),t.call(this,e)}return Object(C.a)(a,[{key:"render",value:function(){var e=this,t=null,a=this.props.items;t=void 0===a[0].data_with_flair||this.props.flairOff?a[0].data.search:a[0].data_with_flair.search;var n=this.props.headerData.ahrefs.map((function(t,a){return r.a.createElement("div",{key:a},r.a.createElement("a",{href:e.props.headerData.ahrefs[a].link},e.props.headerData.ahrefs[a].subject),r.a.createElement("br",null))}));return r.a.createElement("div",null,void 0!==t?r.a.createElement("div",{className:"alertTableHorizontal",style:{outline:"1px solid black",borderRadius:5,padding:3,margin:"10px 0 15px"}},n,r.a.createElement("div",{dangerouslySetInnerHTML:{__html:t}})):null)}}]),a}(r.a.Component),ni=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).componentDidMount=function(){n.props.createCallback(n.props.items.id,n.refreshButton)},n.refreshButton=function(){X()("#refresh-detail")&&X()("#refresh-detail").click()},n.editEntryToggle=function(){!1===n.state.editEntryToolbar?n.setState({editEntryToolbar:!0}):n.setState({editEntryToolbar:!1})},n.replyEntryToggle=function(){!1===n.state.replyEntryToolbar?n.setState({replyEntryToolbar:!0}):n.setState({replyEntryToolbar:!1})},n.deleteToggle=function(){!1===n.state.deleteToolbar?n.setState({deleteToolbar:!0}):n.setState({deleteToolbar:!1})},n.permissionsToggle=function(){!1===n.state.permissionsToolbar?n.setState({permissionsToolbar:!0}):n.setState({permissionsToolbar:!1})},n.reparseFlair=function(){ha("/scot/api/v2/entry/".concat(n.props.items.id)).then((function(e){console.log("reparsing started")})).catch(function(e){this.props.errorToggle("failed to start reparsing of data",e)}.bind(Object(l.a)(n)))},n.fileUploadToggle=function(){!1===n.state.fileUploadToolbar?n.setState({fileUploadToolbar:!0}):n.setState({fileUploadToolbar:!1})},n.getEntryEntityData=function(e){da("scot/api/v2/entry/".concat(e,"/entity"),null).then(function(e){var t=e.data.records;this.props.setEntryEntities(t)}.bind(Object(l.a)(n))).catch(function(e){console.log("Couldnt get entry entity data: ".concat(e))}.bind(Object(l.a)(n)))},n.render=function(){var e=[],t=[],i=n.props.items,o=n.props.type,s=n.props.id,c=n.props.isPopUp,d=n.props.items.class,p=0,u=n.state.editEntryToolbar,h=n.editEntryToggle,m=n.props.errorToggle,g="row-fluid entry-outer",y="row-fluid entry-header",f="";for(var v in"summary"===d&&(g+=" summary_entry",p=1),"task"===d&&("open"===i.metadata.task.status||"assigned"===i.metadata.task.status?(f="-- Task Owner "+i.metadata.task.who+" ",g+=" todo_open_outer",y+=" todo_open"):"closed"!==i.metadata.task.status&&"completed"!==i.metadata.task.status||null==i.metadata.task.who?"closed"!==i.metadata.task.status&&"completed"!==i.metadata.task.status||(g+=" todo_undefined_outer",y+=" todo_undefined"):(f="-- Task Owner "+i.metadata.task.who+" ",g+=" todo_completed_outer",y+=" todo_completed")),"alert"===d&&(g+=" event_entry_container_alert"),e.push(r.a.createElement(ii,{id:i.id,key:i.id,subitem:i,type:o,targetid:s,editEntryToolbar:u,editEntryToggle:h,isPopUp:c,errorToggle:n.props.errorToggle,setEntryEntities:n.props.setEntryEntities})),i){!function(e){if("children"===e){i[e];i[e].forEach(function(e){t.push(new Array(r.a.createElement(a,{items:e,id:s,type:o,editEntryToolbar:u,editEntryToggle:h,isPopUp:c,errorToggle:m,createCallback:this.props.createCallback,removeCallback:this.props.removeCallback,setEntryEntities:this.props.setEntryEntities})))}.bind(Object(l.a)(n)))}}(v)}e.push(t);var b=[];if(n.props.items&&n.props.items.actions)for(var k=0;k0){var t=[],a=n.props.badgeType;da("/scot/api/v2/ac/".concat(a,"/").concat(e),null).then(function(e){t=e.data.records.map((function(e){return e})),this.setState({suggestions:t})}.bind(Object(l.a)(n))).catch(function(e){this.props.errorToggle("Failed to get autocomplete data for tag",e)}.bind(Object(l.a)(n)))}},n.state={suggestions:[]},n}return Object(C.a)(a,[{key:"render",value:function(){var e=this.state.suggestions;return e=this.handleSuggestionOrTagConversion(e),r.a.createElement("span",{className:"tag-new"},r.a.createElement(oi.WithContext,{suggestions:e,handleAddition:this.handleAddition,handleInputChange:this.handleInputChange,tags:[]}))}}]),a}(r.a.Component),di=a(136),pi=a.n(di);function ui(e,t){if(null===e)return null;if(0===e)return"0";t=!t||t<0?0:t;var a=e.toPrecision(2).split("e"),n=1===a.length?0:Math.floor(Math.min(a[1].slice(1),14)/3),r=n<1?e.toFixed(0+t):(e/Math.pow(10,3*n)).toFixed(1+t);return(r<0?r:Math.abs(r))+["","K","M","B","T"][n]}var hi={entityUpdate:function(e,t,a,n,r,i){setTimeout(function(){var t={};for(var n in e)t[X()("",{html:n}).html()]=e[n];"alertgroup"!==a?X()("iframe").each(function(e,a){a.contentWindow.requestAnimationFrame((function(){if(null!=a.contentDocument){var e=X()(a).contents();X()(a.contentDocument.body).find("a").attr("target","_blank"),e.find("a").each((function(e,t){var a=X()(t).attr("href");X()(t).attr("url",a)})),e.find(".entity").each((function(e,a){if(null==X()(a).find(".extras")[0]){var n=X()("",{html:X()(a).attr("data-entity-value")}).html();if(void 0!==n&&void 0!==t){var r=t;if(void 0!==(r=void 0!==r[n.toLowerCase()]?r[n.toLowerCase()]:r[n])){console.log("entity matched!");var i=r.id,o=ui(parseInt(r.count,10),0),s=r.data;console.log("entitydata for "+r.id),console.log(s);var l=r.entry,c=X()('');if(c.addClass("circleNumber"),c.addClass("extras"),c.text(o),X()(a).append(c),X()(a).attr("data-entity-id",i),X()(a).unbind("click"),void 0!==s){var d;if(void 0!==s.scanner&&"true"===s.scanner.active&&X()(a).append(X()('').attr("src","/images/flair/scanner.png")),void 0!==s.geoip)if(void 0!==s.geoip.data.isocode)if(null!==(d="Sandia National Laboratories"===s.geoip.data.isp?"sandia":s.geoip.data.isocode)){var p=X()('').attr("src","/images/flags/"+d.toLowerCase()+".png");p.addClass("extras"),X()(a).append(p)}void 0!==s.sidd&&0!==Object.keys(s.sidd.data).length&&s.sidd.data.constructor===Object&&X()(a).append(X()('').attr("src","/images/flair/sidd.png")),void 0!==s.blocklist3&&(0!==s.blocklist3.data.firewall&&X()(a).append(X()('').attr("src","/images/flair/firewalled.png")),0!==s.blocklist3.data.watch&&X()(a).append(X()('').attr("src","/images/flair/watch.png")),0!==s.blocklist3.data.whitelist&&X()(a).append(X()('').attr("src","/images/flair/white_list.jpg")),0!==s.blocklist3.data.blackhole&&X()(a).append(X()('').attr("src","/images/flair/blackholed.png")),0!==s.blocklist3.data.proxy_block?(console.log("proxy block detected!"),X()(a).append(X()('').attr("src","/images/flair/blocked.png"))):console.log("proxy where art thou"+s.blocklist3.data))}if(void 0!==l&&0!==l){var u=r.entries[0].body_plain;X()(a).append(X()('').attr("src","/images/flair/note.png"))}}}}}))}}))}.bind(this)):"alertgroup"===a&&X()(document.body).find(".alertTableHorizontal").find(".entity").each((function(e,a){if(null==X()(a).find(".extras")[0]){var n=X()(document.body).find(".alertTableHorizontal");n.find("a").attr("target","_blank"),n.find("a").find(".entity").wrap("
"),n.find("a").each((function(e,t){var a=X()(t).attr("href");X()(t).attr("url",a)}));var r=X()("",{html:X()(a).attr("data-entity-value")}).html();if(void 0!==r&&void 0!==t){var i=t;if(void 0!==(i=void 0!==i[r.toLowerCase()]?i[r.toLowerCase()]:i[r])){var o=i.id,s=ui(i.count),l=i.data;console.log("entitydata for "+i.id),console.log(l);var c=i.entry,d=X()('');if(d.addClass("circleNumber"),d.addClass("extras"),d.text(s),X()(a).append(d),X()(a).attr("data-entity-id",o),X()(a).unbind("click"),void 0!==l){if(void 0!==l.geoip&&void 0!==l.geoip.data.isocode){var p;p="Sandia National Laboratories"===l.geoip.data.isp?"sandia":l.geoip.data.isocode;var u=X()('').attr("src","/images/flags/"+p.toLowerCase()+".png");u.addClass("extras"),X()(a).append(u)}void 0!==l.blocklist3&&(0!==l.blocklist3.data.firewall&&X()(a).append(X()('').attr("src","/images/flair/firewalled.png")),0!==l.blocklist3.data.watch&&X()(a).append(X()('').attr("src","/images/flair/watch.png")),0!==l.blocklist3.data.whitelist&&X()(a).append(X()('').attr("src","/images/flair/white_list.jpg")),0!==l.blocklist3.data.blackhole&&X()(a).append(X()('').attr("src","/images/flair/blackholed.png")),0!==l.blocklist3.data.proxy_block?(console.log("proxy_block detected!"),X()(a).append(X()('').attr("src","/images/flair/blocked.png"))):console.log("Why no pblock? "+l.blocklist3.data))}if(void 0!==c&&0!==c){var h=i.entries[0].body_plain;X()(a).append(X()('').attr("src","/images/flair/note.png"))}}}}})),void 0!==i&&null!==i&&i()}.bind(this),1e3)}},mi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={data:[],allSelected:!1,loading:!1},n.getLinks=n.getLinks.bind(Object(l.a)(n)),n.handleTHeadCheckboxSelection=n.handleTHeadCheckboxSelection.bind(Object(l.a)(n)),n.handleRowSelection=n.handleRowSelection.bind(Object(l.a)(n)),n.handleCheckboxSelection=n.handleCheckboxSelection.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.getLinks(),this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=this,t=[{Header:function(t){return r.a.createElement("div",null,r.a.createElement("div",{className:"links-checkbox"},r.a.createElement("i",{className:"fa fa".concat(e.state.allSelected?"-check":"","-square-o"),"aria-hidden":"true"})))},id:"selected",accessor:function(e){return e.selected},Cell:function(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"links-checkbox"},r.a.createElement("i",{className:"fa fa".concat(e.row.selected?"-check":"","-square-o"),"aria-hidden":"true"})))},maxWidth:100,filterable:!1},{Header:"Type",accessor:"type",maxWidth:150,sortable:!0},{Header:"ID",accessor:"id",maxWidth:100,sortable:!0},{Header:"Context",accessor:"context",minWidth:100,maxWidth:800,sortable:!0},{Header:"Memo",accessor:"memo",minWidth:100,maxWidth:800,sortable:!0},{Header:"Link ID",accessor:"linkid",maxWidth:100,sortable:!0}];return r.a.createElement(q.a,{dialogClassName:"links-modal",show:this.props.modalActive,onHide:this.props.linksModalToggle},r.a.createElement(q.a.Header,{closeButton:!0},r.a.createElement(q.a.Title,null,this.state.data.length," items linked to ",this.props.type," ",this.props.id)),r.a.createElement(q.a.Body,null,r.a.createElement(Kt.a,{columns:t,data:this.state.data,defaultPageSize:10,getTdProps:this.handleCheckboxSelection,getTheadThProps:this.handleTHeadCheckboxSelection,getTrProps:this.handleRowSelection,minRows:0,noDataText:"No items Linked.",loading:this.state.loading,style:{maxHeight:"60vh"},filterable:!0})),r.a.createElement(q.a.Footer,null,r.a.createElement(gi,{data:this.state.data,id:this.props.id,type:this.props.type,getLinks:this.getLinks,errorToggle:this.props.errorToggle})))}},{key:"getLinks",value:function(){this.setState({loading:!0}),X.a.ajax({type:"get",url:"/scot/api/v2/"+this.props.type+"/"+this.props.id+"/link",success:function(e){for(var t=[],a=0;a0?r.a.createElement("h4",{style:{float:"left"}},"Select a link for options"):null," "),r.a.createElement(Qt.a,{style:{float:"right"}},a||t?r.a.createElement(W.a,{onClick:this.RemoveLink},"Remove Link"):null)))}},{key:"RemoveLink",value:function(){var e,t=Object(w.a)(this.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&this.RemoveLinkAjax(parseInt(a.linkid))}}catch(n){t.e(n)}finally{t.f()}}},{key:"RemoveLinkAjax",value:function(e){X.a.ajax({type:"delete",url:"/scot/api/v2/link/"+e,success:function(e){console.log("successfully removed link"),this.ToggleActionSuccess()}.bind(this),error:function(e){this.props.errorToggle("failed to remove link",e)}.bind(this)})}},{key:"ToggleActionSuccess",value:function(){var e=!this.state.actionSuccess;this.props.getLinks(),this.setState({actionSuccess:e})}}]),a}(n.Component),yi=a(990),fi={READY:{style:"default"},LOADING:{text:"Processing...",style:"default",disabled:!0},SUCCESS:{text:"Success!",style:"success"},ERROR:{text:"Error!",style:"danger"}},vi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).handleRowSelection=function(e,t,a){return{onClick:function(e){var a,r=n.state.data,i=Object(w.a)(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;t.row.id===o.id&&t.row.type===o.type?o.selected=!0:o.selected=!1}}catch(s){i.e(s)}finally{i.f()}n.setState({data:r,allSelected:!1})},style:{background:void 0!==t&&t.row.selected?"rgb(174, 218, 255)":null}}},n.handleCheckboxSelection=function(e,t,a){return"selected"===a.id?{onClick:function(e){var a,r=n.state.data,i=Object(w.a)(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(t.row.id===o.id&&t.row.type===o.type){o.selected=!o.selected;break}}}catch(s){i.e(s)}finally{i.f()}n.setState({data:r,allSelected:n.checkAllSelected(r)}),e.stopPropagation()}}:{}},n.handleTHeadCheckboxSelection=function(e,t,a,r){return"selected"===a.id?{onClick:function(t){var a,r=n.state.data,i=!n.state.allSelected,o=Object(w.a)(r);try{for(o.s();!(a=o.n()).done;){var s,l=a.value,c=Object(w.a)(e.pageRows);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(l.id===d.id&&l.type===d.type){l.selected=i;break}}}catch(p){c.e(p)}finally{c.f()}}}catch(p){o.e(p)}finally{o.f()}n.setState({data:r,allSelected:i})}}:{}},n.checkAllSelected=function(e){var t,a=Object(w.a)(e);try{for(a.s();!(t=a.n()).done;){if(!t.value.selected)return!1}}catch(n){a.e(n)}finally{a.f()}return!0},n.getMarkedItems=function(){var e=ce("marked"),t={id:n.props.id,type:n.props.type,subject:n.props.string};e&&((e=JSON.parse(e)).unshift(t),n.setState({data:e}))},n.state={data:[],allSelected:!1},n.handleTHeadCheckboxSelection=n.handleTHeadCheckboxSelection.bind(Object(l.a)(n)),n.handleRowSelection=n.handleRowSelection.bind(Object(l.a)(n)),n.handleCheckboxSelection=n.handleCheckboxSelection.bind(Object(l.a)(n)),n.getMarkedItems=n.getMarkedItems.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.mounted=!0,this.getMarkedItems()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=this,t=[{Header:function(t){return r.a.createElement("div",null,r.a.createElement("div",{className:"mark-checkbox"},r.a.createElement("i",{className:"fa fa".concat(e.state.allSelected?"-check":"","-square-o"),"aria-hidden":"true"})))},id:"selected",accessor:function(e){return e.selected},Cell:function(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"mark-checkbox"},r.a.createElement("i",{className:"fa fa".concat(e.row.selected?"-check":"","-square-o"),"aria-hidden":"true"})))},maxWidth:100,filterable:!1},{Header:"Type",accessor:"type",maxWidth:150,sortable:!0},{Header:"ID",accessor:"id",maxWidth:100,sortable:!0},{Header:"Subject",accessor:"subject",maxWidth:"100%",sortable:!0}];return r.a.createElement(q.a,{dialogClassName:"mark-modal",show:this.props.modalActive,onHide:this.props.markModalToggle},r.a.createElement(q.a.Header,{closeButton:!0},r.a.createElement(q.a.Title,null,"Marked Objects")),r.a.createElement(q.a.Body,null,this.state.data.length>0?r.a.createElement(Kt.a,{columns:t,data:this.state.data,defaultPageSize:10,getTdProps:this.handleCheckboxSelection,getTheadThProps:this.handleTHeadCheckboxSelection,getTrProps:this.handleRowSelection,minRows:0,noDataText:"No items marked.",style:{maxHeight:"60vh"},filterable:!0}):r.a.createElement("h3",null,"No marked items detected.")),r.a.createElement(q.a.Footer,null,r.a.createElement(bi,{data:this.state.data,id:this.props.id,type:this.props.type,getMarkedItems:this.getMarkedItems,errorToggle:this.props.errorToggle})))}}]),a}(n.Component),bi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).deleteCallback=function(e){!0===e&&n.RemoveSelected(),n.setState({pendingDelete:!1})},n.LinkContextChange=function(e){n.setState({linkContextString:e.target.value})},n.ExpandLinkToggle=function(e){if(!0===e||!1===e)n.setState({linkPanel:e,linkContextString:""});else{var t=!n.state.linkPanel;n.setState({linkPanel:t,linkContextString:""})}},n.RemoveSelected=function(){var e,t=Object(w.a)(n.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&Ja(a.type,a.id)}}catch(r){t.e(r)}finally{t.f()}n.props.getMarkedItems(),n.state.actionSuccess&&n.setState({actionSuccess:!1})},n.StartDelete=function(){n.setState({pendingDelete:!0})},n.MoveEntry=function(){var e,t=Object(w.a)(n.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&"entry"===a.type&&n.EntryAjax(a.id,!0)}}catch(r){t.e(r)}finally{t.f()}},n.CopyEntry=function(){var e,t=Object(w.a)(n.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&"entry"===a.type&&n.EntryAjax(a.id,!1)}}catch(r){t.e(r)}finally{t.f()}},n.Link=function(){var e,t=Object(w.a)(n.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;if(a.selected){var r=[],i={},o={};i.id=parseInt(a.id),i.type=a.type,o.id=parseInt(n.props.id),o.type=n.props.type,r.push(i),r.push(o),n.LinkAjax(r)}}}catch(s){t.e(s)}finally{t.f()}},n.Reparse=function(){n.setState({reparseButton:fi.LOADING}),X.a.when.apply(X.a,Object(T.a)(n.props.data.filter((function(e){return e.selected})).map((function(e){return n.ReparseAjax(e)})))).then((function(){n.setState({reparseButton:fi.SUCCESS})}),(function(e){console.error(e),n.setState({reparseButton:fi.ERROR}),n.props.errorToggle("error reparsing",e)})).always((function(){setTimeout((function(){n.setState({reparseButton:fi.READY})}),2e3)}))},n.ReparseAjax=function(e){return X.a.ajax({type:"put",url:"/scot/api/v2/"+e.type+"/"+e.id,data:JSON.stringify({parsed:0}),contentType:"application/json; charset=UTF-8"})},n.Promote=function(){n.setState({promoteButton:fi.LOADING});var e=!0;X.a.when.apply(X.a,Object(T.a)(n.props.data.filter((function(e){return e.selected})).map((function(e){return n.PromoteAjax(e)})))).then((function(){n.setState({promoteButton:fi.SUCCESS})}),(function(t){e=!1,console.error(t),n.setState({promoteButton:fi.ERROR}),n.props.errorToggle("error adding alerts to event",t)})).always((function(){setTimeout((function(){n.setState({promoteButton:fi.READY}),e&&window.location.reload()}),2e3)}))},n.PromoteAjax=function(e){return X.a.ajax({type:"put",url:"/scot/api/v2/alert/"+e.id,data:JSON.stringify({promote:parseInt(n.props.id)}),contentType:"application/json; charset=UTF-8"})},n.LinkAjax=function(e){var t={weight:1};t.vertices=e,n.state.linkContextString&&(t.context=n.state.linkContextString),X.a.ajax({type:"post",url:"/scot/api/v2/link",data:JSON.stringify(t),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){console.log("successfully linked"),this.ExpandLinkToggle(!1),this.ToggleActionSuccess(!0)}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("failed to link",e)}.bind(Object(l.a)(n))})},n.EntryAjax=function(e,t){X.a.ajax({type:"get",url:"/scot/api/v2/entry/"+e,success:function(a){var n;n={parent:0,body:a.body,target_id:parseInt(this.props.id),target_type:this.props.type},X.a.ajax({type:"post",url:"/scot/api/v2/entry",data:JSON.stringify(n),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(a){t?(this.RemoveEntryAfterMove(e),this.RemoveSelected()):this.state.actionSuccess||this.ToggleActionSuccess(!0)}.bind(this),error:function(e){this.props.errorToggle("failed to create new entry",e)}.bind(this)})}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("failed to get entry data",e)}.bind(Object(l.a)(n))})},n.RemoveEntryAfterMove=function(e){X.a.ajax({type:"delete",url:"/scot/api/v2/entry/"+e,success:function(e){console.log("removed original entry")},error:function(e){this.props.errorToggle("Failed to remove original entry",e)}})},n.ToggleActionSuccess=function(e){if(!0===e||!1===e)n.setState({actionSuccess:e});else{var t=!n.state.actionSuccess;n.setState({actionSuccess:t})}},n.state={entry:!1,thing:!1,actionSuccess:!1,linkContextString:null,linkPanel:!1,pendingDelete:!1,reparseButton:fi.READY,deleteButton:fi.READY,promoteButton:fi.READY},n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e,t=!1,a=!1,n=!0,i=0,o=Object(w.a)(this.props.data);try{for(o.s();!(e=o.n()).done;){var s=e.value;s.type&&s.selected&&(i++,"entry"===s.type?t=!0:a=!0,"alert"!==s.type&&(n=!1))}}catch(g){o.e(g)}finally{o.f()}var l=0!==i&&n&&"event"===this.props.type,c=this.state,d=c.reparseButton,p=c.deleteButton,u=c.promoteButton,h=c.pendingDelete,m=null;return h&&(m=this.props.data.filter((function(e){return e.selected})).map((function(e){return{type:e.type,id:e.id}}))),r.a.createElement("div",null,this.state.actionSuccess?r.a.createElement("div",null,r.a.createElement(W.a,{bsStyle:"success",onClick:this.RemoveSelected},"Action Successful! Remove Mark?"),r.a.createElement(W.a,{onClick:this.ToggleActionSuccess},"Keep Marked")):r.a.createElement("div",{style:{display:"grid"}},r.a.createElement("div",null,a||t?r.a.createElement("h4",{style:{float:"left"}},"Actions"):r.a.createElement("div",null," ",this.props.data.length>0?r.a.createElement("h4",{style:{float:"left"}},"Select a Marked Object"):null," "),r.a.createElement(Qt.a,{style:{float:"right"}},t&&!a&&"alertgroup"!==this.props.type?r.a.createElement(W.a,{onClick:this.MoveEntry},"Move to ",this.props.type," ",this.props.id):null,t&&!a&&"alertgroup"!==this.props.type?r.a.createElement(W.a,{onClick:this.CopyEntry},"Copy to ",this.props.type," ",this.props.id):null,a||t?r.a.createElement(W.a,{onClick:this.ExpandLinkToggle},"Link to ",this.props.type," ",this.props.id):null,l&&r.a.createElement(W.a,{bsStyle:u.style,onClick:this.Promote,disabled:u.disabled},u.text?u.text:"Add to ".concat(this.props.type," ").concat(this.props.id)),(a||t)&&r.a.createElement(W.a,{bsStyle:d.style,onClick:this.Reparse,disabled:d.disabled},d.text?d.text:"Reparse Flair"),(a||t)&&r.a.createElement(W.a,{bsStyle:"warning",onClick:this.RemoveSelected},"Unmark"),(a||t)&&r.a.createElement(W.a,{bsStyle:"danger",onClick:this.StartDelete,disabled:p.disabled},p.text?p.text:"Delete"))),this.state.linkPanel&&(a||t)?r.a.createElement(B.a,{collapsible:!0,expanded:this.state.linkPanel},r.a.createElement(yi.a,{horizontal:!0},r.a.createElement(D.a,{sm:2},"Provide context to this link:"),r.a.createElement(D.a,{sm:9},r.a.createElement(Vr.a,{type:"text",value:this.state.linkContextString,placeholder:"optional",onChange:this.LinkContextChange})),r.a.createElement(D.a,{sm:1},r.a.createElement(W.a,{onClick:this.Link,bsStyle:"success"},"Submit")))):null,h&&r.a.createElement(bn,{things:m,errorToggle:this.props.errorToggle,callback:this.deleteCallback})))}}]),a}(n.Component);bi.defaultProps={data:{}},vi.defaultProps={modalActive:!0};var Ei,ki,wi,Si,Ti,Ci=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).onBlur=function(e){var t=e.target.value;if(""!==t){var a=t.split(/[ ,]+/);n.setState({emailField:a})}},n.getData=function(){X.a.ajax({type:"get",url:"/scot/api/v2/prepexport/"+n.props.type+"/"+n.props.id,success:function(e){this.setState({data:e}),this.setState({leaveCatch:!1,showEditor:!0})}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("Failed to get export data from server!",e)}.bind(Object(l.a)(n))})},n.exportResponse=function(e){"success"===e&&n.setState({showEditor:!1,responseSuccess:!0})},n.state={showEditor:!1,data:null,responseSuccess:!1,emailField:[]},n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.getData()}},{key:"render",value:function(){var e=!1;return this.state.responseSuccess&&(e=!0),r.a.createElement("div",null,r.a.createElement(q.a,{dialogClassName:"links-modal",show:!0,onHide:this.props.exportToggle},r.a.createElement(q.a.Header,{closeButton:!0},r.a.createElement(q.a.Title,null,"Export ",this.props.type," ",this.props.id)),r.a.createElement(q.a.Body,null,r.a.createElement("div",null,r.a.createElement("label",{htmlFor:"exampleInputEmail1"},"Email addresses"),r.a.createElement("input",{type:"email",className:"form-control",id:"email","aria-describedby":"emailHelp",onBlur:this.onBlur,placeholder:"Enter emails (comma-separated)",disabled:e})),r.a.createElement("br",null),this.state.showEditor?r.a.createElement(sr,{entryAction:"Export",exportResponse:this.exportResponse,type:this.props.type,targetid:this.props.id,id:"add_entry",recipients:this.state.emailField,addedentry:this.props.exportToggle,content:this.state.data,errorToggle:this.props.errorToggle}):null,!this.state.showEditor&&this.state.responseSuccess?r.a.createElement(xi,null):null,this.state.showEditor||this.state.responseSuccess?null:r.a.createElement("i",{className:"fa fa-spinner fa-spin fa-2x","aria-hidden":"true"}))))}}]),a}(r.a.Component),xi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){return Object(s.a)(this,a),t.apply(this,arguments)}return Object(C.a)(a,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement("i",{className:"fa fa-check","aria-hidden":"true",style:{color:"green"}})," ","Export Successful!")}}]),a}(n.Component),ji={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},Oi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={showAllPromotedDataToolbar:!1},n.showAllPromotedDataToggle=n.showAllPromotedDataToggle.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"showAllPromotedDataToggle",value:function(){!1===this.state.showAllPromotedDataToolbar?this.setState({showAllPromotedDataToolbar:!0}):this.setState({showAllPromotedDataToolbar:!1})}},{key:"render",value:function(){var e=null,t=[],a=[],n=3;"event"===this.props.type?e="alert":"incident"===this.props.type&&(e="event");for(var i=0;i0&&t.push(r.a.createElement("span",null," , "));var o="/"+e+"/"+this.props.data[i];t.push(r.a.createElement("span",{key:this.props.data[i]},r.a.createElement(Ne.Link,{to:o},this.props.data[i])))}this.props.data.length<3&&(n=this.props.data.length);for(var s=0;s0&&a.push(r.a.createElement("div",null," , "));var l="/"+e+"/"+this.props.data[s];a.push(r.a.createElement("div",{key:this.props.data[s]},r.a.createElement(Ne.Link,{to:l},this.props.data[s])))}return this.props.data.length>3&&a.push(r.a.createElement("div",{onClick:this.showAllPromotedDataToggle},",",r.a.createElement("a",{href:"javascript:;"},"...more"))),r.a.createElement("td",null,r.a.createElement("span",{id:"promoted_from",style:{display:"flex"}},a),this.state.showAllPromotedDataToolbar?r.a.createElement(hn.a,{isOpen:!0,onRequestClose:this.showAllPromotedDataToggle,style:ji},r.a.createElement("div",{className:"modal-header"},r.a.createElement("img",{src:"images/close_toolbar.png",className:"close_toolbar",alt:"",onClick:this.showAllPromotedDataToggle}),r.a.createElement("h3",{id:"myModalLabel"},"Promoted From")),r.a.createElement("div",{className:"modal-body promoted-from-full"},t),r.a.createElement("div",{className:"modal-footer"},r.a.createElement(W.a,{id:"cancel-modal",onClick:this.showAllPromotedDataToggle},"Close"))):null)}}]),a}(n.Component),Di=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).updated=function(e,t){n.setState({refreshing:!0,eventLoaded:!1,entryLoaded:!1,entityLoaded:!1});var a="entry";"alertgroup"==n.props.type&&(a="alert"),X.a.ajax({type:"get",url:"scot/api/v2/"+n.props.type+"/"+n.props.id,success:function(e){if(this.state.isMounted){var t=e;this.setState({headerData:t,showEventData:!0,eventLoaded:!0,isNotFound:!1,tagData:t.tag,sourceData:t.source}),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1}),"alertgroup"==this.props.type&&-1===t.parsed?this.setState({flairing:!0}):this.setState({flairing:!1})}}.bind(Object(l.a)(n)),error:function(e){this.setState({showEventData:!0,eventLoaded:!0,isNotFound:!0}),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1}),this.props.errorToggle("Error: Failed to reload detail data. Error message: "+e.responseText,e)}.bind(Object(l.a)(n))}),X.a.ajax({type:"get",url:"scot/api/v2/"+n.props.type+"/"+n.props.id+"/"+a,success:function(e){if(this.state.isMounted){var t=e.records;this.setState({showEntryData:!0,entryLoaded:!0,entryData:t,runWatcher:!0}),this.Watcher(),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1})}}.bind(Object(l.a)(n)),error:function(e){this.setState({showEntryData:!0,entryLoaded:!0}),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1}),this.props.errorToggle("Error: Failed to reload entry data. Error message: "+e.responseText,e)}}),X.a.ajax({type:"get",url:"scot/api/v2/"+n.props.type+"/"+n.props.id+"/entity",success:function(e){if(this.state.isMounted){var t=e.records;this.setState({showEntityData:!0,entityLoaded:!0,entityData:t});var a={waitEntry:function(){0==this.state.entryLoaded?setTimeout(a.waitEntry,50):(setTimeout(function(){hi.entityUpdate(t,this.flairToolbarToggle,this.props.type,this.linkWarningToggle,this.props.id)}.bind(this)),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1}))}.bind(this)};a.waitEntry()}}.bind(Object(l.a)(n)),error:function(e){this.setState({showEntityData:!0}),1==this.state.eventLoaded&&1==this.state.entryLoaded&&1==this.state.entityLoaded&&this.setState({refreshing:!1}),this.props.errorToggle("Error: Failed to reload entity data.",e)}.bind(Object(l.a)(n))}),void 0!=e&&void 0!=t&&n.props.errorToggle(t)},n.flairToolbarToggle=function(e,t,a,r,i){n.setState({flairToolbar:!0,entityid:e,entityvalue:t,entitytype:a,entityoffset:r,entityobj:i})},n.flairToolbarOff=function(){if(n.state.isMounted){var e=n.state.entityDetailKey+1;n.setState({flairToolbar:!1,entityDetailKey:e})}},n.linkWarningToggle=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!1===n.state.linkWarningToolbar?n.setState({linkWarningToolbar:!0,link:e,nopop:t}):n.setState({linkWarningToolbar:!1,nopop:t})},n.exportToggle=function(){!1===n.state.exportModal?n.setState({exportModal:!0}):n.setState({exportModal:!1})},n.viewedbyfunc=function(e){var t=[];if(null!==e)for(var a in e.view_history)t.push(a);return t},n.entryToggle=function(){!1===n.state.entryToolbar?n.setState({entryToolbar:!0}):n.setState({entryToolbar:!1})},n.deleteToggle=function(e,t){!1===n.state.deleteToolbar?n.setState({deleteToolbar:!0,deleteType:e}):n.setState({deleteToolbar:!1,deleteType:e}),t&&n.setState({isDeleted:!0})},n.changeHistoryToggle=function(){!1===n.state.changeHistoryToolbar?n.setState({changeHistoryToolbar:!0}):n.setState({changeHistoryToolbar:!1})},n.viewedByHistoryToggle=function(){!1===n.state.viewedByHistoryToolbar?n.setState({viewedByHistoryToolbar:!0}):n.setState({viewedByHistoryToolbar:!1})},n.permissionsToggle=function(){!1===n.state.permissionsToolbar?n.setState({permissionsToolbar:!0}):n.setState({permissionsToolbar:!1})},n.entitiesToggle=function(){!1===n.state.entitiesToolbar?n.setState({entitiesToolbar:!0}):n.setState({entitiesToolbar:!1,entryEntityData:null})},n.promoteToggle=function(){!1===n.state.promoteToolbar?n.setState({promoteToolbar:!0}):n.setState({promoteToolbar:!1})},n.fileUploadToggle=function(){!1===n.state.fileUploadToolbar?n.setState({fileUploadToolbar:!0}):n.setState({fileUploadToolbar:!1})},n.titleCase=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},n.Watcher=function(){X()("iframe").each(function(e,t){t.contentWindow.requestAnimationFrame(function(){if(null!==t.contentDocument){var e=[];e.push(this.checkFlairHover),e.push(this.checkHighlight),X()(t).off("mouseenter"),X()(t).off("mouseleave"),X()(t).on("mouseenter",function(e,a){var n=setInterval(this[0],50,t),r=setInterval(this[1],50,t);X()(t).data("intervalID",n),X()(t).data("intervalID1",r),console.log("Now watching iframe "+n)}.bind(e)),X()(t).on("mouseleave",(function(){var e=X()(t).data("intervalID"),a=X()(t).data("intervalID1");window.clearInterval(e),window.clearInterval(a),console.log("No longer watching iframe "+e)}))}}.bind(this))}.bind(Object(l.a)(n))),"alertgroup"==n.props.type&&X()("#detail-container").find("a, .entity").not(".not_selectable").each(function(e,t){X()(t).off("mousedown"),X()(t).on("mousedown",function(e){var t=e.target;if("extras"==X()(t)[0].className&&(t=X()(t)[0].parentNode),X()(t).attr("url")){var a=X()(t).attr("url");this.linkWarningToggle(a)}else{var n=X()(t).attr("data-entity-id"),r=X()(t).attr("data-entity-value"),i=X()(t).offset(),o=X()(t);this.flairToolbarToggle(n,r,"entity",i,o)}}.bind(this))}.bind(Object(l.a)(n)))},n.checkHighlight=function(e){var t;if(null!==e.contentWindow){if(t=e.contentWindow.getSelection().toString(),n.state.highlightedText==t)return;n.setState({highlightedText:t})}},n.checkFlairHover=function(e,t){null!=e.contentDocument&&(X()(e).contents().find(".entity").each(function(t,a){if("rgb(255, 0, 0)"==X()(a).css("background-color"))X()(a).data("state","down");else if("down"==X()(a).data("state")){X()(a).data("state","up");var n=X()(a).attr("data-entity-id"),r=X()(a).attr("data-entity-value"),i=X()(a),o=e,s={top:X()(a).offset().top+X()(o).offset().top,left:X()(a).offset().left+X()(o).offset().left};this.flairToolbarToggle(n,r,"entity",s,i)}}.bind(Object(l.a)(n))),X()(e).contents().find("a").each(function(e,t){if("rgb(255, 0, 0)"==X()(t).css("color"))X()(t).data("state","down");else if("down"==X()(t).data("state")){X()(t).data("state","up");var a=X()(t).attr("url");this.linkWarningToggle(a)}}.bind(Object(l.a)(n))))},n.summaryUpdate=function(){n.forceUpdate()},n.scrollTo=function(){void 0!==n.props.taskid&&X()(".entry-wrapper").scrollTop(X()(".entry-wrapper").scrollTop()+X()("#iframe_"+n.props.taskid).position().top-30)},n.guideRedirectToAlertListWithFilter=function(){RegExp.escape=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},n.props.handleFilter(null,null,!0,"alertgroup"),n.props.handleFilter([{id:"subject",value:RegExp.escape(n.state.headerData.data.applies_to[0])}],null,!1,"alertgroup"),window.open("#/alertgroup/")},n.setEntryEntities=function(e){n.entitiesToggle(),n.setState({entryEntityData:e})},n.showSignatureOptionsToggle=function(){!1===n.state.showSignatureOptions?n.setState({showSignatureOptions:!0}):n.setState({showSignatureOptions:!1})},n.markModalToggle=function(){!1===n.state.showMarkModal?n.setState({showMarkModal:!0}):n.setState({showMarkModal:!1})},n.ToggleProcessingMessage=function(e){n.setState({processing:e}),n.props.togglePreventClick()},n.linksModalToggle=function(){var e=!n.state.showLinksModal;n.setState({showLinksModal:e})},n.toggleFlair=function(){n.state.flairOff?(n.setState({flairOff:!1,runWatcher:!0}),setTimeout(function(){hi.entityUpdate(this.state.entityData,this.flairToolbarToggle,this.props.type,this.linkWarningToggle,this.props.id)}.bind(Object(l.a)(n)))):n.setState({flairOff:!0})},n.handleSelection=function(e){console.log("Got selection click!"),n.setState({alertsSelected:[e]})},n.handleMultiSelection=function(e){if(n.checkSelection(e.id))n.setState({alertsSelected:n.state.alertsSelected.filter((function(t){return t.id!==e.id}))});else{var t=[].concat(Object(T.a)(n.state.alertsSelected),[e]);n.setState({alertsSelected:t})}},n.handleSelectAll=function(e){var t=e.map((function(e){return e.id}));n.setState({alertsSelected:t})},n.handleShiftSelect=function(e,t,a){e>t&&(e=[t,t=e][0]);var r=[];a.forEach(function(a){a.id<=t&&a.id>=e&&(this.checkSelection(a)||r.push(a))}.bind(Object(l.a)(n))),n.setState({alertsSelected:[].concat(Object(T.a)(n.state.alertsSelected),r)})};var r=Math.floor(1e3*Math.random());return n.state={showEventData:!1,headerData:{},sourceData:"",tagData:"",permissionsToolbar:!1,entitiesToolbar:!1,changeHistoryToolbar:!1,viewedByHistoryToolbar:!1,entryToolbar:!1,deleteToolbar:!1,deleteType:null,promoteToolbar:!1,notificationType:null,notificationMessage:null,key:n.props.id,showEntryData:!1,entryData:"",showEntityData:!1,entityData:[],entryEntityData:null,entityid:null,entitytype:null,entityoffset:null,entityobj:null,flairToolbar:!1,linkWarningToolbar:!1,exportModal:!1,refreshing:!1,loading:!1,eventLoaded:!1,entryLoaded:!1,entityLoaded:!1,guideID:null,fileUploadToolbar:!1,isNotFound:!1,runWatcher:!1,entityDetailKey:r,processing:!1,showSignatureOptions:!1,showMarkModal:!1,showLinksModal:!1,flairOff:!1,highlightedText:"",flairing:!1,isMounted:!1,alertsSelected:[],isDeleted:!1},n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.setState({loading:!0})}},{key:"componentDidMount",value:function(){this.setState({isMounted:!0});var e={delay:function(){var e="entry";"alertgroup"===this.props.type&&(e="alert"),X.a.ajax({type:"get",url:"scot/api/v2/"+this.props.type+"/"+this.props.id,success:function(e){if(this.state.isMounted){var t=e;this.setState({headerData:t,showEventData:!0,isNotFound:!1,tagData:t.tag,sourceData:t.source}),!0===this.state.showEventData&&!0===this.state.showEntryData&&!0===this.state.showEntityData&&this.setState({loading:!1}),"alertgroup"===this.props.type&&-1===t.parsed?this.setState({flairing:!0}):this.setState({flairing:!1})}}.bind(this),error:function(e){this.setState({showEventData:!0,isNotFound:!0}),!0===this.state.showEventData&&!0===this.state.showEntryData&&!0===this.state.showEntityData&&this.setState({loading:!1}),this.props.errorToggle("Error: Failed to load detail data. Error message: "+e.responseText,e)}.bind(this)}),X.a.ajax({type:"get",url:"scot/api/v2/"+this.props.type+"/"+this.props.id+"/"+e,success:function(e){if(this.state.isMounted){var t=e.records;this.setState({showEntryData:!0,entryData:t,runWatcher:!0}),this.Watcher(),!0===this.state.showEventData&&!0===this.state.showEntryData&&!0===this.state.showEntityData&&this.setState({loading:!1})}}.bind(this),error:function(e){this.setState({showEntryData:!0}),1==this.state.showEventData&&1==this.state.showEntryData&&1==this.state.showEntityData&&this.setState({loading:!1}),this.props.errorToggle("Error: Failed to load entry data. Error message: "+e.responseText,e)}}),X.a.ajax({type:"get",url:"scot/api/v2/"+this.props.type+"/"+this.props.id+"/entity",success:function(e){if(this.state.isMounted){var t=e.records;this.setState({showEntityData:!0,entityData:t});var a={waitEntry:function(){0==this.state.showEntryData?setTimeout(a.waitEntry,50):(setTimeout(function(){hi.entityUpdate(t,this.flairToolbarToggle,this.props.type,this.linkWarningToggle,this.props.id,this.scrollTo)}.bind(this)),1==this.state.showEventData&&1==this.state.showEntryData&&1==this.state.showEntityData&&this.setState({loading:!1}))}.bind(this)};a.waitEntry()}}.bind(this),error:function(e){this.setState({showEntityData:!0}),1==this.state.showEventData&&1==this.state.showEntryData&&1==this.state.showEntityData&&this.setState({loading:!1}),this.props.errorToggle("Error: Failed to load entity data.",e)}.bind(this)}),"alertgroup"==this.props.type&&X.a.ajax({type:"get",url:"scot/api/v2/"+this.props.type+"/"+this.props.id+"/guide",success:function(e){if(this.state.isMounted){for(var t=[],a=0;a0?r.a.createElement("th",null,"Promoted From:"):null,("event"===a||"incident"===a)&&this.state.showEventData&&this.state.headerData.promoted_from.length>0?r.a.createElement(Oi,{data:this.state.headerData.promoted_from,type:a,id:i}):null,"entity"!==a&&this.state.showEventData?r.a.createElement(si,{data:this.state.tagData,id:i,type:a,updated:this.updated,errorToggle:this.props.errorToggle,badgeType:"tag"}):null,"entity"!==a&&this.state.showEventData?r.a.createElement(si,{data:this.state.sourceData,id:i,type:a,updated:this.updated,errorToggle:this.props.errorToggle,badgeType:"source"}):null)))):null),r.a.createElement(pi.a,{ref:"notificationSystem"}),this.state.exportModal?r.a.createElement(Ci,{type:a,errorToggle:this.props.errorToggle,exportToggle:this.exportToggle,id:i}):null,this.state.linkWarningToolbar?r.a.createElement(Ar,{linkWarningToggle:this.linkWarningToggle,link:this.state.link,nopop:this.state.nopop}):null,this.state.viewedByHistoryToolbar?r.a.createElement(Un,{viewedByHistoryToggle:this.viewedByHistoryToggle,id:i,type:a,subjectType:n,viewedby:t,errorToggle:this.props.errorToggle}):null,this.state.changeHistoryToolbar?r.a.createElement(Pn,{changeHistoryToggle:this.changeHistoryToggle,id:i,type:a,subjectType:n,errorToggle:this.props.errorToggle}):null,this.state.entitiesToolbar?r.a.createElement("span",null,null!==this.state.entryEntityData?r.a.createElement(Nn,{entitiesToggle:this.entitiesToggle,entityData:this.state.entryEntityData,flairToolbarToggle:this.flairToolbarToggle,flairToolbarOff:this.flairToolbarOff}):r.a.createElement(Nn,{entitiesToggle:this.entitiesToggle,entityData:this.state.entityData,flairToolbarToggle:this.flairToolbarToggle,flairToolbarOff:this.flairToolbarOff})):null,this.state.deleteToolbar?r.a.createElement("div",null,"alert"!==this.state.deleteType?r.a.createElement(En,{deleteType:this.state.deleteType,subjectType:n,id:i,deleteToggle:this.deleteToggle,updated:this.updated,errorToggle:this.props.errorToggle,history:this.props.history,removeCallback:this.props.removeCallback}):r.a.createElement(En,{deleteType:this.state.deleteType,type:a,deleteToggle:this.deleteToggle,updated:this.updated,errorToggle:this.props.errorToggle,history:this.props.history,alertsSelected:this.state.alertsSelected,removeCallback:this.props.removeCallback})):null,this.state.showMarkModal?r.a.createElement(vi,{modalActive:!0,type:a,id:i,string:o,errorToggle:this.props.errorToggle,markModalToggle:this.markModalToggle}):null,this.state.showLinksModal?r.a.createElement(mi,{modalActive:!0,type:a,id:i,errorToggle:this.props.errorToggle,linksModalToggle:this.linksModalToggle}):null,this.state.showEventData?r.a.createElement(pn,{type:a,subjectType:n,id:i,entryData:this.state.entryData,headerData:this.state.headerData,status:this.state.headerData.status,promoteToggle:this.promoteToggle,permissionsToggle:this.permissionsToggle,entryToggle:this.entryToggle,entitiesToggle:this.entitiesToggle,changeHistoryToggle:this.changeHistoryToggle,viewedByHistoryToggle:this.viewedByHistoryToggle,exportToggle:this.exportToggle,deleteToggle:this.deleteToggle,updated:this.updated,flairToolbarToggle:this.flairToolbarToggle,flairToolbarOff:this.flairToolbarOff,sourceToggle:this.sourceToggle,subjectName:this.state.headerData.subject,fileUploadToggle:this.fileUploadToggle,fileUploadToolbar:this.state.fileUploadToolbar,guideRedirectToAlertListWithFilter:this.guideRedirectToAlertListWithFilter,showSignatureOptionsToggle:this.showSignatureOptionsToggle,markModalToggle:this.markModalToggle,linksModalToggle:this.linksModalToggle,ToggleProcessingMessage:this.ToggleProcessingMessage,errorToggle:this.props.errorToggle,toggleFlair:this.toggleFlair,alertsSelected:this.state.alertsSelected,guideID:this.state.guideID}):null,this.state.permissionsToolbar?r.a.createElement(Vn,{updateid:i,id:i,type:a,permissionData:this.state.headerData,permissionsToggle:this.permissionsToggle,updated:this.updated,errorToggle:this.props.errorToggle}):null),this.state.showEventData&&"entity"!==a?r.a.createElement(Zr,{id:i,type:a,entryToggle:this.entryToggle,updated:this.updated,entryData:this.state.entryData,headerData:this.state.headerData,showEntryData:this.state.showEntryData,showEntityData:this.state.showEntityData,summaryUpdate:this.summaryUpdate,flairToolbarToggle:this.flairToolbarToggle,flairToolbarOff:this.flairToolbarOff,linkWarningToggle:this.linkWarningToggle,entryToolbar:this.state.entryToolbar,alertPreSelectedId:this.props.alertPreSelectedId,errorToggle:this.props.errorToggle,fileUploadToggle:this.fileUploadToggle,fileUploadToolbar:this.state.fileUploadToolbar,showSignatureOptions:this.state.showSignatureOptions,flairOff:this.state.flairOff,highlightedText:this.state.highlightedText,form:this.props.form,createCallback:this.props.createCallback,removeCallback:this.props.removeCallback,addFlair:hi.entityUpdate,handleSelection:this.handleSelection,handleShiftSelect:this.handleShiftSelect,handleMultiSelection:this.handleMultiSelection,handleSelectAll:this.handleSelectAll,alertsSelected:this.state.alertsSelected,setEntryEntities:this.setEntryEntities}):null,this.state.showEventData&&"entity"===a?r.a.createElement(hr,{entityid:i,form:this.props.form,entitytype:"entity",id:i,type:"entity",fullScreen:!0,errorToggle:this.props.errorToggle,linkWarningToggle:this.linkWarningToggle,createCallback:this.props.createCallback,removeCallback:this.props.removeCallback,addFlair:hi.entityUpdate}):null,this.state.flairToolbar?r.a.createElement(hr,{key:this.state.entityDetailKey,form:this.props.form,flairToolbarToggle:this.flairToolbarToggle,flairToolbarOff:this.flairToolbarOff,linkWarningToggle:this.linkWarningToggle,entityid:parseInt(this.state.entityid,10),data:this.state.headerData,entityvalue:this.state.entityvalue,entitytype:this.state.entitytype,type:this.props.type,id:this.props.id,errorToggle:this.props.errorToggle,entityoffset:this.state.entityoffset,watcher:this.Watcher,entityobj:this.state.entityobj,createCallback:this.props.createCallback,removeCallback:this.props.removeCallback,addFlair:hi.entityUpdate}):null))}}]),a}(r.a.Component),Ni=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){return Object(s.a)(this,a),t.apply(this,arguments)}return Object(C.a)(a,[{key:"render",value:function(){var e=this.props.data;return r.a.createElement("div",null,r.a.createElement(Ra.a,{value:1e3*e,format:"MM/DD/YY hh:mm:ss a"}))}}]),a}(r.a.Component),_i=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;Object(s.a)(this,a),(n=t.call(this,e)).handleChange=function(e){if(null!==e){var t=n.state.keyName,a=Object(ze.a)({},t,e.target.value),r=e.target.value;X.a.ajax({type:"put",url:"scot/api/v2/"+n.props.type+"/"+n.props.id,data:JSON.stringify(a),contentType:"application/json; charset=UTF-8",success:function(e){console.log("success: "+e),this.setState({value:r}),this.calculateWidth(r)}.bind(Object(l.a)(n)),error:function(e){this.props.errorToggle("error: Failed to update the subject/name",e)}.bind(Object(l.a)(n))})}},n.onChange=function(e){n.setState({value:e.target.value})},n.handleEnterKey=function(e){"Enter"===e.key&&n.handleChange(e)},n.calculateWidth=function(e){var t;X()("#invisible").html(X()("").text(e)),t=X()("#invisible").width()+25+"px",n.setState({width:t})},n.componentWillReceiveProps=function(e){var t=e.data.subject;"signature"===e.type?t=e.data.name:"entity"===e.type&&(t=e.data.value),n.setState({value:t}),n.calculateWidth(t)};var r="subject",i=n.props.data.subject;return"signature"===n.props.type?(r="name",i=n.props.data.name):"entity"===n.props.type&&(r="value",i=n.props.data.value),n.state={value:i,width:"",keyName:r},n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.calculateWidth(this.state.value)}},{key:"render",value:function(){var e=!1;return"entity"===this.props.type&&""!==this.state.value&&(e=!0),r.a.createElement("div",null,this.props.subjectType," ",this.props.id,":"," ",r.a.createElement("input",{type:"text",value:this.state.value,onKeyPress:this.handleEnterKey,onChange:this.onChange,onBlur:this.handleChange,style:{width:this.state.width,lineHeight:"normal"},className:"detail-header-input",disabled:e}))}}]),a}(r.a.Component),Ai=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){var e;Object(s.a)(this,a);for(var n=arguments.length,i=new Array(n),o=0;o0&&(n.props.id,"landscape"===n.state.viewMode&&(e="30vh"));var s=[],c=n.props.type+":listview";n.props.createCallback(c,n.reloadactive);var d="/scot/api/v2/"+n.state.type;"alert"===n.props.type&&(d="/scot/api/v2/alertgroup");var p={limit:r,offset:i*r};if(void 0!==t||null===t){var u={};X.a.each(t,(function(e,t){var a=-1;t.desc||(a=1),u[t.id]=a})),p.sort=JSON.stringify(u)}void 0===t&&null!==t||X.a.each(a,(function(e,t){if("source"===t.id||"tag"===t.id){var a,n=[],r=Object(w.a)(t.value);try{for(r.s();!(a=r.n()).done;){var i=a.value;n.push(i.name)}}catch(s){r.e(s)}finally{r.f()}p[t.id]=JSON.stringify(n)}else if("created"===t.id||"updated"===t.id){var o=[];o.push(t.value.start),o.push(t.value.end),p[t.id]=JSON.stringify(o)}else p[t.id]=JSON.stringify(t.value)})),Ti=X.a.ajax({type:"GET",url:d,data:p,traditional:!0,success:function(t){ki=t,X.a.each(ki.records,function(e,t){s[e]={},X.a.each(t,function(t,a){if("sources"===t||"source"===t){if(void 0!==a){var n=a.join(", ");s[e].source=n}}else if("tags"===t||"tag"===t){if(void 0!==a){var r=a.join(", ");s[e].tag=r}}else s[e][t]=a;"id"===t&&(this.props.createCallback(a,this.reloadactive),o.push(a))}.bind(this)),s[e].classname=e%2===0?"table-row roweven":"table-row rowodd"}.bind(this));var a=this.getPages(t.totalRecordCount);this.setState({scrollheight:e,objectarray:s,totalCount:t.totalRecordCount,loading:!1,idsarray:o,totalPages:a}),"alert"===this.props.type&&!1===this.state.showSelectedContainer||void 0===this.state.id||null===this.state.id?this.setState({showSelectedContainer:!1}):this.setState({showSelectedContainer:!0})}.bind(Object(l.a)(n)),error:function(e){"abort"===!e.statusText&&this.props.errorToggle("failed to get list data",e)}.bind(Object(l.a)(n))}),X()("#list-view-container").keydown(n.keyNavigate),X()(document.body).keydown(function(e){X()("input").is(":focus")||X()("textarea").is(":focus")||70===e.keyCode&&!0!==e.ctrlKey&&!0!==e.metaKey&&this.toggleView()}.bind(Object(l.a)(n)))},n.componentWillUnmount=function(){document.removeEventListener("keydown",n.keyNavigate)},n.togglePreventClick=function(){n.setState({preventClick:!n.state.preventClick})},n.keyNavigate=function(e){if("click"!==e.type){if(!["j","k","ArrowUp","ArrowDown"].includes(e.key))return;var t=(e.target||e.srcElement).tagName.toLowerCase();if("input"===t||"textarea"===t)return}var a=document.querySelector(".ReactTable .rt-tbody .rt-tr.selected");if(a){var r=null;switch(e.key){case"j":case"ArrowDown":default:r=a.parentElement.nextElementSibling;break;case"k":case"ArrowUp":r=a.parentElement.previousElementSibling}if(r){var i=r.children[0].children[0].innerHTML;n.props.history.push("/".concat(n.state.type,"/").concat(i)),e.preventDefault(),e.stopPropagation()}}},n.reloadactive=function(){n.getNewData()},n.ToggleCreateEntity=function(){n.setState({showEntityCreateModal:!n.state.showEntityCreateModal})},n.render=function(){var e=!1,t=n.state.scrollheight;n.state.listViewContainerDisplay,null!=n.state.id&&null!=n.state.typeCapitalized&&(document.title=n.state.typeCapitalized.charAt(0)+"-"+n.state.id),null==jt("listViewFilter"+n.props.type)&&null==jt("listViewSort"+n.props.type)&&null==jt("listViewPage"+n.props.type)||(e=!0);var a=Ca(n.props.type,{},{},!1);return r.a.createElement("div",null,"entry"!==n.state.type?r.a.createElement("div",{key:n.state.listViewKey,className:"allComponents"},r.a.createElement("div",{className:"black-border-line"},r.a.createElement("div",{className:"mainview"},r.a.createElement("div",null,r.a.createElement("div",{className:"list-buttons"},"on"===n.props.notificationSetting?r.a.createElement(Ba.a,{eventkey:"1",onClick:n.props.notificationToggle,bsSize:"xsmall"},"Mute Notifications"):r.a.createElement(Ba.a,{eventkey:"2",onClick:n.props.notificationToggle,bsSize:"xsmall"},"Turn On Notifications"),"event"===n.props.type||"intel"===n.props.type||"incident"===n.props.type||"signature"===n.props.type||"guide"===n.props.type||"entity"===n.props.type?r.a.createElement(Ba.a,{onClick:n.createNewThing,eventkey:"6",bsSize:"xsmall"},"Create ",n.state.typeCapitalized):null,r.a.createElement(Ba.a,{eventkey:"5",bsSize:"xsmall",onClick:n.exportCSV},"Export to CSV"),r.a.createElement(Ba.a,{bsSize:"xsmall",onClick:n.toggleView},"Full Screen Toggle (f)"),e?r.a.createElement(Ba.a,{onClick:n.clearAll,eventkey:"3",bsSize:"xsmall",bsStyle:"info"},"Clear All Filters"):null),r.a.createElement("div",{id:"list-view-container",tabIndex:"1"},r.a.createElement("div",{id:"list-view",tabIndex:"2"},r.a.createElement(Kt.a,{columns:a,data:n.state.objectarray,style:{maxHeight:t},page:n.state.activepage.page,pages:n.state.totalPages,defaultPageSize:50,onPageChange:n.handlePageChange,onPageSizeChange:n.handlePageSizeChange,pageSize:n.state.activepage.limit,onFilteredChange:n.handleFilter,filtered:n.state.filter,onSortedChange:n.handleSort,sorted:n.state.sort,manual:!0,sortable:!0,filterable:!0,resizable:!0,styleName:"styles.ReactTable",className:"-striped -highlight",minRows:0,LoadingComponent:n.CustomTableLoader,loading:n.state.loading,getTrProps:n.handleRowSelection}))),r.a.createElement("div",{onMouseDown:n.dragdiv,className:"splitter",style:{display:"block",height:"10px",backgroundColor:"black",borderTop:"1px solid #AAA",borderBottom:"1px solid #AAA",cursor:"row-resize",overflow:"hidden"}}),n.state.showSelectedContainer?r.a.createElement(Ai,Object(ze.a)({key:n.state.id,id:n.state.id,type:n.state.queryType,alertPreSelectedId:n.state.alertPreSelectedId,taskid:n.state.entryid,handleFilter:n.handleFilter,errorToggle:n.props.errorToggle,history:n.props.history,togglePreventClick:n.togglePreventClick,form:n.state.form,createCallback:n.props.createCallback,removeCallback:n.props.removeCallback},"togglePreventClick",n.togglePreventClick)):null,n.state.showEntityCreateModal?r.a.createElement(Hr,{match:"",modalActive:n.state.showEntityCreateModal,ToggleCreateEntity:n.ToggleCreateEntity,errorToggle:n.props.errorToggle}):null)))):null)},n.CustomTableLoader=function(){return r.a.createElement("div",{className:"-loading"+(n.state.loading?" -active":"")},r.a.createElement(ut,{loading:n.state.loading}))},n.AutoScrollToId=function(){var e=document.querySelector(".ReactTable .rt-tbody .rt-tr.selected"),t=document.querySelector(".ReactTable .rt-tbody");e?((t.scrollTop+t.offsetHeight-e.offsetHeight0){var e=[];n.props.groups.forEach((function(t){var a={};a.id=t.name,a.text=t.name,e.push(a)})),n.setState({suggestions:e})}},n.resetState=function(){n.setState(Yi)},n.checkBlankInputs=function(e){var t=!1;return"user"===e?""!==n.state.username&&""!==n.state.fullname&&""!==n.state.password&&(t=!0):""!==n.state.name&&""!==n.state.description&&(t=!0),t},n.buildDataObj=function(e){var t={};return"user"===e?(t.username=n.state.username,t.fullname=n.state.fullname,t.password=n.state.password,t.groups=n.state.groups,t.active=n.state.active?1:0):"group"===e&&(t.name=n.state.name,t.description=n.state.description),t},n.handleGroups=function(e){var t=n.props,a=t.enqueueSnackbar,r=t.type;if(e.length>0){var i=[];e.forEach((function(e){i.push(e.id)})),n.setState({groups:i})}else a("Error handling groups ".concat(r),{variant:"error"})},n.handlePUT=function(){var e=n.props,t=e.enqueueSnackbar,a=e.type,r=n.buildDataObj(a);n.checkBlankInputs(a)&&Me.a.put("/scot/api/v2/".concat(a,"/").concat(n.state.id),r).then(function(e){t("Successfully updated ".concat(a,"."),{variant:"success"}),this.resetState(),this.props.fetchData(a),this.props.handleClose()}.bind(Object(l.a)(n))).catch((function(e){t("Failed updating ".concat(a),{variant:"error"})}))},n.handlePOST=function(){var e=n.props,t=e.enqueueSnackbar,a=e.type,r=n.buildDataObj(a);n.checkBlankInputs(a)&&Me.a.post("/scot/api/v2/".concat(a,"/"),r).then(function(e){console.log(e),t("Successfully added ".concat(a,"."),{variant:"success"}),this.resetState(),this.props.fetchData(a),this.props.handleClose()}.bind(Object(l.a)(n))).catch((function(e){t("Failed creating ".concat(a),{variant:"error"}),console.log(e)}))},n.handleChange=function(e,t){if("input"===e.nativeEvent.type){var a=e.target.value;n.setState(Object(ze.a)({},e.target.id,a))}else"click"===e.nativeEvent.type?"checkbox"===e.target.type&&n.setState(Object(ze.a)({},e.target.value,t)):n.setState(Object(ze.a)({},e.target.name,t.props.value))},n.state=Yi,n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){this.formatGroups(),this.props.editObject&&("user"===this.props.type?this.setState({username:this.props.editObject.username,fullname:this.props.editObject.fullname,password:this.props.editObject.password,id:this.props.editObject.id,active:this.props.editObject.active,groups:this.props.editObject.groups}):"group"===this.props.type&&this.setState({name:this.props.editObject.name,description:this.props.editObject.description,id:this.props.editObject.id}))}},{key:"render",value:function(){var e=this.props,t=e.classes;e.onClose,e.selectedValue,e.type,Object(k.a)(e,["classes","onClose","selectedValue","type"]);return r.a.createElement("div",null,r.a.createElement(Zn.a,{className:t.card},r.a.createElement(er.a,null,this.props.editObject?r.a.createElement($n.a,{variant:"h5",component:"h2"},"Edit ",this.props.type," ",r.a.createElement("b",null,this.props.editObject.username," ")):r.a.createElement($n.a,{variant:"h5",component:"h2"},"Create ",this.props.type," "),"group"===this.props.type?r.a.createElement("div",null,r.a.createElement(zi.a,{id:"name",label:"Group Name",value:this.state.name,onChange:this.handleChange,variant:"outlined",helperText:"Enter name of group",fullWidth:!0,InputLabelProps:{shrink:!0},style:{marginTop:8,marginBottom:8}}),r.a.createElement("br",null),r.a.createElement(zi.a,{id:"description",label:"Description",value:this.state.description,onChange:this.handleChange,variant:"outlined",helperText:"Enter description for group",InputLabelProps:{shrink:!0},fullWidth:!0,style:{marginTop:8,marginBottom:8}})):r.a.createElement("div",null,r.a.createElement(zi.a,{id:"username",label:"Username",value:this.state.username,onChange:this.handleChange,variant:"outlined",helperText:"Enter a valid username",fullWidth:!0,InputLabelProps:{shrink:!0},style:{marginTop:8,marginBottom:8}}),r.a.createElement("br",null),r.a.createElement(zi.a,{id:"fullname",label:"Full Name",value:this.state.fullname,onChange:this.handleChange,variant:"outlined",helperText:"Provide your full name",fullWidth:!0,InputLabelProps:{shrink:!0},style:{marginTop:8,marginBottom:8}}),r.a.createElement("br",null),r.a.createElement(zi.a,{id:"password",label:"Password",type:"password",autoComplete:"current-password",margin:"normal",variant:"outlined",helperText:"Enter a valid password",value:this.state.password,onChange:this.handleChange,fullWidth:!0,InputLabelProps:{shrink:!0},style:{marginTop:8,marginBottom:8}}),r.a.createElement("br",null),r.a.createElement(Ki.a,{control:r.a.createElement(Gi.a,{checked:this.state.active,onChange:this.handleChange,value:"active"}),label:"Active?"}),r.a.createElement("br",null),r.a.createElement("b",null,"Groups"),r.a.createElement($i,{editObject:this.props.editObject,handleGroups:this.handleGroups,id:this.state.id,suggestions:this.state.suggestions}),r.a.createElement("br",null)),r.a.createElement("br",null)),r.a.createElement(qi.a,null,this.props.editObject?r.a.createElement("div",{style:{marginLeft:350,marginBottom:5}},r.a.createElement(oa.a,{style:{marginRight:5},variant:"contained",onClick:this.props.handleClose,className:t.button},"Cancel"),r.a.createElement(oa.a,{variant:"contained",color:"secondary",onClick:this.handlePUT,className:t.button},"Submit")):r.a.createElement("div",{style:{marginLeft:350,marginBottom:5}},r.a.createElement(oa.a,{style:{marginRight:5},variant:"contained",onClick:this.props.handleClose,className:t.button},"Cancel"),r.a.createElement(oa.a,{variant:"contained",color:"secondary",onClick:this.handlePOST,className:t.button},"Submit")))))}}]),a}(r.a.Component),Xi=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).mapUsersGroupsToTags=function(){Me.a.get("/scot/api/v2/user?id=".concat(n.props.id)).then((function(e){var t=[];e.data.totalRecordCount>0&&(e.data.records.forEach((function(e){var a={};a.id=e.name,a.text=e.name,t.push(a)})),n.setState({groups:t}))}))},n.handleDelete=function(e){var t=n.state.groups;n.setState({groups:t.filter((function(t,a){return a!==e}))})},n.handleAddition=function(e){var t=n.props.enqueueSnackbar;if(n.checkValidGroup(e.id)){var a=n.state.groups;a.push(e),n.setState({groups:a}),n.props.handleGroups(n.state.groups)}else t("Invalid group. Please add an existing group")},n.state={groups:[]},n}return Object(C.a)(a,[{key:"componentDidMount",value:function(){if(this.props.editObject){var e=[];this.props.editObject.groups.forEach((function(t){var a={};a.id=t,a.text=t,e.push(a)})),this.setState({groups:e})}}},{key:"shouldComponentUpdate",value:function(e,t){return this.state!==t&&(this.props.handleGroups(t.groups),!0)}},{key:"checkValidGroup",value:function(e){return!!this.props.suggestions.some((function(t){return t.id===e}))}},{key:"render",value:function(){var e=this.state.groups,t=this.props.suggestions;this.props.classes;return r.a.createElement("div",null,r.a.createElement(oi.WithContext,{classNames:{tagInput:"tagInputClass",tagInputField:"tagInputFieldClass"},placeholder:"Add a new group",inline:!1,tags:e,suggestions:t,handleDelete:this.handleDelete,handleAddition:this.handleAddition}))}}]),a}(r.a.Component),$i=Object(pt.a)(Ji)(Xi),Zi=Object(mn.withSnackbar)(Object(pt.a)(Ji)(Qi)),eo=a(994),to=a(996),ao=a(295),no=a.n(ao),ro=a(995),io=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).handleDelete=function(){var e=n.props,t=e.enqueueSnackbar,a=e.type,r=e.id,i="/scot/api/v2/".concat(a,"/").concat(r);Me.a.delete(i).then(function(){t("Successfully deleted ".concat(a,"."),{variant:"success"}),this.props.fetchData(a),this.props.handleClose()}.bind(Object(l.a)(n))).catch((function(e){console.log(e),t("Failed deleting ".concat(a,"."),{variant:"error"}),this.props.handleClose()}))},n.state={deletetext:""},n}return Object(C.a)(a,[{key:"render",value:function(){var e=this,t=this.props.classes;return r.a.createElement("div",null,r.a.createElement(Zn.a,{className:t.card},r.a.createElement(er.a,null,r.a.createElement($n.a,{variant:"h5",component:"h2"},"Are you sure you want to delete ",this.props.type," ",this.props.text,"?"),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement(oa.a,{style:{marginLeft:5,backgroundColor:"red",color:"white"},onClick:function(){return e.handleDelete(e.props.id)},variant:"contained"},"Yes"),r.a.createElement(oa.a,{style:{marginLeft:5},onClick:this.props.handleClose,variant:"contained"},"Cancel")))))}}]),a}(r.a.Component),oo=Object(mn.withSnackbar)(Object(pt.a)((function(e){return{card:{minWidth:400,marginBottom:20}}}))(io)),so=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).edit=function(e,t){var a="/scot/api/v2/".concat(e,"?id=").concat(t);Me.a.get(a).then(function(t){this.setState({editObject:t.data.records[0],type:e,showModal:!0})}.bind(Object(l.a)(n))).catch((function(e){console.log(e)}))},n.showUserDialog=function(){n.setState({showModal:!0,type:"user"})},n.showGroupDialog=function(){n.setState({showModal:!0,type:"group"})},n.handleUserClose=function(){n.setState({showModal:!1})},n.handleClose=function(e){n.setState({showModal:!1,id:null,type:"",editObject:null})},n.handleListItemClick=function(e){n.props.onClose(e)},n.getColumns=function(e){var t=[];return"user"===e?t=[{Header:"ID",accessor:"id",width:50},{Header:"Full Name",accessor:"fullname",width:90},{Header:"Username",accessor:"username",width:70},{Header:"Active",id:"active",accessor:function(e){return r.a.createElement("center",null,(e.active,r.a.createElement("div",null,r.a.createElement(Ki.a,{control:r.a.createElement(Gi.a,{onChange:function(){return n.handleActiveToggle(e.id)},checked:e.active,value:e.active})}))))},width:80},{Header:"Edit / Delete",id:"edit",accessor:function(t){return r.a.createElement("center",null,r.a.createElement(oa.a,{size:"small",style:{marginLeft:5},onClick:function(){return n.edit(e,t.id)},variant:"contained"},"Edit"),r.a.createElement(oa.a,{size:"small",style:{marginLeft:5},onClick:function(){return n.toggleAreYouSure(t.id,e)},color:"secondary",variant:"contained"},r.a.createElement(no.a,null)))},width:200}]:"group"===e&&(t=[{Header:"ID",accessor:"id",width:50},{Header:"Group Name",accessor:"name",width:100},{Header:"Group Description",accessor:"description",width:100},{Header:"Edit / Delete",id:"edit",accessor:function(t){return r.a.createElement("center",null,r.a.createElement(oa.a,{size:"small",style:{marginLeft:5},onClick:function(){return n.edit(e,t.id)},variant:"contained"},"Edit"),r.a.createElement(oa.a,{size:"small",style:{marginLeft:5},onClick:function(){return n.toggleAreYouSure(t.id,e)},color:"secondary",variant:"contained"},r.a.createElement(no.a,null)))},width:200}]),t},n.setUserGroupResults=function(e,t){"user"===e?n.setState({userdata:t.records}):"group"===e&&n.setState({groupdata:t.records})},n.toggleAreYouSure=function(e,t){n.setState({areYouSure:!0,id:e,type:t})},n.handleAreYouSureClose=function(){n.setState({areYouSure:!1})},n.fetchData=function(e){Me.a.get("/scot/api/v2/".concat(e,"?limit=0")).then((function(t){var a=t.data;return n.setUserGroupResults(e,a)}))},n.handleActiveToggle=function(e){var t=n.getUserObject(e);n.setState({userdata:n.state.userdata.map((function(t){return t.id===e?Object(S.a)({},t,{active:!t.active}):t})),updateId:t.id})},n.getUserObject=function(e){return n.state.userdata.filter((function(t){return e===t.id?t:null}))[0]},n.state={userdata:[],groupdata:[],showModal:!1,editObject:null,id:null,type:"",areYouSure:!1,updateId:null},n}return Object(C.a)(a,[{key:"componentDidUpdate",value:function(e,t){var a=this.props.enqueueSnackbar;if(t.userdata!==this.state.userdata&&null!==this.state.updateId){var n=this.getUserObject(this.state.updateId);Me.a.put("/scot/api/v2/user/".concat(this.state.updateId),{active:n.active}).then(function(e){a("Successfully updated user.",{variant:"success"}),this.setState({updateId:null})}.bind(this)).catch((function(e){a("Failed updating user",{variant:"error"})}))}}},{key:"componentDidMount",value:function(){this.fetchData("user"),this.fetchData("group")}},{key:"render",value:function(){var e=this,t=this.props,a=t.classes,n=Object(k.a)(t,["classes"]),i=this.state,o=i.groupdata,s=i.userdata.length>10,l=o.length>10;return r.a.createElement("div",{className:a.root},r.a.createElement("br",null),r.a.createElement(ur.a,{className:a.paper,elevation:1},r.a.createElement($n.a,{variant:"h5",component:"h3"},"Please be advised"),r.a.createElement($n.a,{component:"p"},"In order to properly add a user, they must belong to a group. A user is added to a group at time of creatino or upon 'Edit'. Groups MUST include the string 'scot' in the name or they will be ignored by the system. You must activate a user in order to begin logging in as the user.")),r.a.createElement("br",null),r.a.createElement(Vi.a,{container:!0,spacing:8},r.a.createElement(Vi.a,{item:!0,xs:12,sm:6},r.a.createElement($n.a,{variant:"h4",gutterBottom:!0},"Users ",r.a.createElement(eo.a,null)),r.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},r.a.createElement($n.a,{variant:"h5",gutterBottom:!0},"Add User"),r.a.createElement(ro.a,{style:{marginLeft:5,marginBottom:10,marginTop:-6},size:"small",onClick:this.showUserDialog,color:"secondary","aria-label":"Add"},r.a.createElement(fa.a,null))),r.a.createElement(Kt.a,{data:this.state.userdata,columns:this.getColumns("user"),pageSize:this.state.userdata.length,defaultPageSize:10,showPagination:s})),r.a.createElement(Vi.a,{item:!0,xs:12,sm:6},r.a.createElement($n.a,{variant:"h4",gutterBottom:!0},"Groups ",r.a.createElement(to.a,null)),r.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},r.a.createElement($n.a,{variant:"h5",gutterBottom:!0},"Add Group"),r.a.createElement(ro.a,{style:{marginLeft:5,marginBottom:10,marginTop:-6},size:"small",onClick:this.showGroupDialog,color:"secondary","aria-label":"Add"},r.a.createElement(fa.a,null))),r.a.createElement(Kt.a,{data:this.state.groupdata,columns:this.getColumns("group"),pageSize:this.state.groupdata.length,defaultPageSize:10,showPagination:l}))),r.a.createElement(nr.a,{open:this.state.showModal,onClose:this.handleClose,"aria-labelledby":"simple-dialog-title"},r.a.createElement(Zi,{id:this.state.id,groups:this.state.groupdata,type:this.state.type,editObject:this.state.editObject,handleClose:this.handleClose,fetchData:function(t){e.fetchData(t)}})),this.state.areYouSure?r.a.createElement(nr.a,Object.assign({open:this.state.areYouSure,onClose:this.handleAreYouSureClose,"aria-labelledby":"simple-dialog-title"},n),r.a.createElement(oo,{type:this.state.type,fetchData:function(t){e.fetchData(t)},handleClose:this.handleAreYouSureClose,id:this.state.id})):null)}}]),a}(r.a.Component),lo=Object(mn.withSnackbar)(Object(pt.a)((function(e){return{root:{flexGrow:1},paper:Object(S.a)({},e.mixins.gutters(),{paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit})}}))(so)),co=a(460),po=a.n(co),uo=a(170),ho=a.n(uo),mo=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).GetKeys=n.GetKeys.bind(Object(l.a)(n)),n.GetAvailableGroups=n.GetAvailableGroups.bind(Object(l.a)(n)),n.CreateKey=n.CreateKey.bind(Object(l.a)(n)),n.DeleteKey=n.DeleteKey.bind(Object(l.a)(n)),n.GroupChange=n.GroupChange.bind(Object(l.a)(n)),n.ToggleActiveStatus=n.ToggleActiveStatus.bind(Object(l.a)(n)),n.state={Api:null,keys:null,availableGroups:null},n}return Object(C.a)(a,[{key:"GetKeys",value:function(){X.a.ajax({type:"get",url:"/scot/api/v2/apikey",success:function(e){this.setState({keys:e.records})}.bind(this),error:function(){this.setState({keys:"failed to get keys"})}.bind(this)})}},{key:"GetAvailableGroups",value:function(){X.a.ajax({type:"get",url:"/scot/api/v2/group?limit=0",success:function(e){this.setState({availableGroups:e.records})}.bind(this)})}},{key:"CreateKey",value:function(){X.a.ajax({type:"post",url:"/scot/api/v2/apikey",success:function(){this.GetKeys()}.bind(this)})}},{key:"DeleteKey",value:function(e){X.a.ajax({type:"delete",url:"/scot/api/v2/apikey/".concat(e.target.id),success:function(){this.GetKeys()}.bind(this)})}},{key:"GroupChange",value:function(e,t){X.a.ajax({type:"PUT",url:"/scot/api/v2/apikey/".concat(e),data:JSON.stringify({groups:t}),contentType:"application/json; charset=UTF-8",success:function(){this.GetKeys()}.bind(this)})}},{key:"ToggleActiveStatus",value:function(e,t){X.a.ajax({type:"PUT",url:"/scot/api/v2/apikey/".concat(e),contentType:"application/json; charset=UTF-8",data:JSON.stringify({active:t}),success:function(){this.GetKeys()}.bind(this)})}},{key:"componentDidMount",value:function(){this.GetKeys(),this.GetAvailableGroups()}},{key:"render",value:function(){var e=[];if(void 0!=this.state.keys)for(var t=0;t0?r.a.createElement(Kt.a,{columns:t,data:this.state.data,defaultPageSize:10,getTdProps:this.handleCheckboxSelection,getTheadThProps:this.handleTHeadCheckboxSelection,getTrProps:this.handleRowSelection,minRows:0,noDataText:"No deleted items were found.",style:{maxHeight:"60vh"},filterable:!0}):r.a.createElement("h3",null,"No deleted items were found."),this.state.data.length>0?r.a.createElement(vo,{data:this.state.data,id:this.props.id,type:this.props.type,getDeletedItems:this.getDeletedItems,errorToggle:this.props.errorToggle}):null)}},{key:"handleRowSelection",value:function(e,t,a){var n=this;return{onClick:function(e){var a,r=n.state.data,i=Object(w.a)(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;t.row["data.id"]==o.data.id&&t.row.type==o.type?o.selected=!0:o.selected=!1}}catch(s){i.e(s)}finally{i.f()}n.setState({data:r,allSelected:!1})},style:{background:void 0!=t&&t.row.selected?"rgb(174, 218, 255)":null}}}},{key:"handleCheckboxSelection",value:function(e,t,a){var n=this;return"selected"==a.id?{onClick:function(e){var a,r=n.state.data,i=Object(w.a)(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(t.row["data.id"]==o.data.id&&t.row.type==o.type){o.selected?o.selected=!o.selected:o.selected=!0;break}}}catch(s){i.e(s)}finally{i.f()}n.setState({data:r,allSelected:n.checkAllSelected(r)}),e.stopPropagation()}}:{}}},{key:"handleTHeadCheckboxSelection",value:function(e,t,a,n){var r=this;return"selected"===a.id?{onClick:function(t){var a,n=r.state.data,i=!r.state.allSelected,o=Object(w.a)(n);try{for(o.s();!(a=o.n()).done;){var s,l=a.value,c=Object(w.a)(e.pageRows);try{for(c.s();!(s=c.n()).done;){var d=s.value;if(l.data.id==d["data.id"]&&l.data.type==d["data.type"]){l.selected=i;break}}}catch(p){c.e(p)}finally{c.f()}}}catch(p){o.e(p)}finally{o.f()}r.setState({data:n,allSelected:i})}}:{}}},{key:"checkAllSelected",value:function(e){var t,a=Object(w.a)(e);try{for(a.s();!(t=a.n()).done;){if(!t.value.selected)return!1}}catch(n){a.e(n)}finally{a.f()}return!0}},{key:"getDeletedItems",value:function(){X.a.ajax({type:"get",url:"/scot/api/v2/deleted/?limit=0",success:function(e){this.setState({data:e.records})}.bind(this),error:function(e){console.log("unable to get deleted items")}.bind(this)})}}]),a}(n.Component),vo=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(e){var n;return Object(s.a)(this,a),(n=t.call(this,e)).state={entry:!1,thing:!1,actionSuccess:!1,linkContextString:null,linkPanel:!1,pendingDelete:!1,reparseButton:yo.READY,deleteButton:yo.READY,promoteButton:yo.READY},n.RemoveSelected=n.RemoveSelected.bind(Object(l.a)(n)),n.MoveEntry=n.MoveEntry.bind(Object(l.a)(n)),n.CopyEntry=n.CopyEntry.bind(Object(l.a)(n)),n.EntryAjax=n.EntryAjax.bind(Object(l.a)(n)),n.Link=n.Link.bind(Object(l.a)(n)),n.LinkAjax=n.LinkAjax.bind(Object(l.a)(n)),n.Reparse=n.Reparse.bind(Object(l.a)(n)),n.ReparseAjax=n.ReparseAjax.bind(Object(l.a)(n)),n.Promote=n.Promote.bind(Object(l.a)(n)),n.PromoteAjax=n.PromoteAjax.bind(Object(l.a)(n)),n.ToggleActionSuccess=n.ToggleActionSuccess.bind(Object(l.a)(n)),n.ExpandLinkToggle=n.ExpandLinkToggle.bind(Object(l.a)(n)),n.LinkContextChange=n.LinkContextChange.bind(Object(l.a)(n)),n.deleteCallback=n.deleteCallback.bind(Object(l.a)(n)),n.StartDelete=n.StartDelete.bind(Object(l.a)(n)),n.Restore=n.Restore.bind(Object(l.a)(n)),n.Purge=n.Purge.bind(Object(l.a)(n)),n}return Object(C.a)(a,[{key:"componentWillMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"deleteCallback",value:function(e){!0===e&&this.RemoveSelected(),this.setState({pendingDelete:!1})}},{key:"render",value:function(){var e,t=!0,a=0,n=Object(w.a)(this.props.data);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.type&&i.selected&&(a++,"entry"===i.type?!0:!0,"alert"!==i.type&&(t=!1))}}catch(s){n.e(s)}finally{n.f()}0!=a&&t&&this.props.type;var o=this.state;o.reparseButton,o.deleteButton,o.promoteButton;return o.pendingDelete&&this.props.data.filter((function(e){return e.selected})).map((function(e){return{type:e.type,id:e.id}})),r.a.createElement("div",null,r.a.createElement(pi.a,{ref:"notificationSystem"}),this.state.actionSuccess?r.a.createElement("div",null,r.a.createElement(W.a,{bsStyle:"success",onClick:this.props.getDeletedItems},"Action Successful! Click to reload data.")):r.a.createElement("div",{style:{display:"grid"}},r.a.createElement("div",null,r.a.createElement("h4",{style:{float:"left"}})," ",this.props.data.length>0?r.a.createElement("h4",{style:{float:"left"}},"Select a Deleted Object"):null,r.a.createElement(Qt.a,{style:{float:"right"}},r.a.createElement(W.a,{bsStyle:"success",onClick:this.Restore},"Restore"),r.a.createElement(W.a,{bsStyle:"danger",onClick:this.Purge},"Purge")))))}},{key:"Restore",value:function(e){var t,a=Object(w.a)(this.props.data);try{for(a.s();!(t=a.n()).done;){var n=t.value;n.selected&&X.a.ajax({type:"put",url:"/scot/api/v2/deleted/"+n.id,data:JSON.stringify({status:"undelete"}),success:function(){this.refs.notificationSystem.addNotification({message:"Successfully Restored",level:"success",autoDismiss:0}),this.props.getDeletedItems()}.bind(this),error:function(){console.log("failed to restore items")}.bind(this)})}}catch(r){a.e(r)}finally{a.f()}}},{key:"Purge",value:function(e){var t,a=Object(w.a)(this.props.data);try{for(a.s();!(t=a.n()).done;){var n=t.value;n.selected&&X.a.ajax({type:"delete",url:"/scot/api/v2/deleted/"+n.id,success:function(){this.refs.notificationSystem.addNotification({message:"Successfully Purged",level:"success",autoDismiss:0}),this.props.getDeletedItems()}.bind(this),error:function(){console.log("failed to purge items")}.bind(this)})}}catch(r){a.e(r)}finally{a.f()}}},{key:"LinkContextChange",value:function(e){this.setState({linkContextString:e.target.value})}},{key:"ExpandLinkToggle",value:function(e){if(1==e||0==e)this.setState({linkPanel:e,linkContextString:""});else{var t=!this.state.linkPanel;this.setState({linkPanel:t,linkContextString:""})}}},{key:"RemoveSelected",value:function(){var e,t=Object(w.a)(this.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&Ja(a.type,a.id)}}catch(n){t.e(n)}finally{t.f()}this.props.getDeletedItems(),this.state.actionSuccess&&this.setState({actionSuccess:!1})}},{key:"StartDelete",value:function(){this.setState({pendingDelete:!0})}},{key:"MoveEntry",value:function(){var e,t=Object(w.a)(this.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&"entry"==a.type&&this.EntryAjax(a.id,!0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"CopyEntry",value:function(){var e,t=Object(w.a)(this.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;a.selected&&"entry"==a.type&&this.EntryAjax(a.id,!1)}}catch(n){t.e(n)}finally{t.f()}}},{key:"Link",value:function(){var e,t=Object(w.a)(this.props.data);try{for(t.s();!(e=t.n()).done;){var a=e.value;if(a.selected){var n=[],r={},i={};r.id=parseInt(a.id),r.type=a.type,i.id=parseInt(this.props.id),i.type=this.props.type,n.push(r),n.push(i),this.LinkAjax(n)}}}catch(o){t.e(o)}finally{t.f()}}},{key:"Reparse",value:function(){var e=this;this.setState({reparseButton:yo.LOADING}),X.a.when.apply(X.a,Object(T.a)(this.props.data.filter((function(e){return e.selected})).map((function(t){return e.ReparseAjax(t)})))).then((function(){e.setState({reparseButton:yo.SUCCESS})}),(function(t){console.error(t),e.setState({reparseButton:yo.ERROR}),e.props.errorToggle("error reparsing",t)})).always((function(){setTimeout((function(){e.setState({reparseButton:yo.READY})}),2e3)}))}},{key:"ReparseAjax",value:function(e){return X.a.ajax({type:"put",url:"/scot/api/v2/"+e.type+"/"+e.id,data:JSON.stringify({parsed:0}),contentType:"application/json; charset=UTF-8"})}},{key:"Promote",value:function(){var e=this;this.setState({promoteButton:yo.LOADING});var t=!0;X.a.when.apply(X.a,Object(T.a)(this.props.data.filter((function(e){return e.selected})).map((function(t){return e.PromoteAjax(t)})))).then((function(){e.setState({promoteButton:yo.SUCCESS})}),(function(a){t=!1,console.error(a),e.setState({promoteButton:yo.ERROR}),e.props.errorToggle("error adding alerts to event",a)})).always((function(){setTimeout((function(){e.setState({promoteButton:yo.READY}),t&&window.location.reload()}),2e3)}))}},{key:"PromoteAjax",value:function(e){return X.a.ajax({type:"put",url:"/scot/api/v2/alert/"+e.id,data:JSON.stringify({promote:parseInt(this.props.id)}),contentType:"application/json; charset=UTF-8"})}},{key:"LinkAjax",value:function(e){var t={weight:1};t.vertices=e,this.state.linkContextString&&(t.context=this.state.linkContextString),X.a.ajax({type:"post",url:"/scot/api/v2/link",data:JSON.stringify(t),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(e){console.log("successfully linked"),this.ExpandLinkToggle(!1),this.ToggleActionSuccess(!0)}.bind(this),error:function(e){this.props.errorToggle("failed to link",e)}.bind(this)})}},{key:"EntryAjax",value:function(e,t){X.a.ajax({type:"get",url:"/scot/api/v2/entry/"+e,success:function(a){var n;n={parent:0,body:a.body,target_id:parseInt(this.props.id),target_type:this.props.type},X.a.ajax({type:"post",url:"/scot/api/v2/entry",data:JSON.stringify(n),contentType:"application/json; charset=UTF-8",dataType:"json",success:function(a){t?(this.RemoveEntryAfterMove(e),this.RemoveSelected()):this.state.actionSuccess||this.ToggleActionSuccess(!0)}.bind(this),error:function(e){this.props.errorToggle("failed to create new entry",e)}.bind(this)})}.bind(this),error:function(e){this.props.errorToggle("failed to get entry data",e)}.bind(this)})}},{key:"RemoveEntryAfterMove",value:function(e){X.a.ajax({type:"delete",url:"/scot/api/v2/entry/"+e,success:function(e){console.log("removed original entry")}.bind(this),error:function(e){this.props.errorToggle("Failed to remove original entry",e)}.bind(this)})}},{key:"ToggleActionSuccess",value:function(e){if(1==e||0==e)this.setState({actionSuccess:e});else{var t=!this.state.actionSuccess;this.setState({actionSuccess:t})}}}]),a}(n.Component);function bo(e){return r.a.createElement($n.a,{component:"div",style:{padding:24}},e.children)}vo.defaultProps={data:{}},fo.defaultProps={modalActive:!0};var Eo=Object(Wi.a)({typography:{fontSize:20}}),ko=function(e){Object(c.a)(a,e);var t=Object(d.a)(a);function a(){var e;Object(s.a)(this,a);for(var n=arguments.length,r=new Array(n),i=0;iLbh sbhaq gur rtt. Cbfg gb gur jnyy "V sbhaq gur rtt, pna lbh?"')},n.eeremove=function(){X()("#content").css("transform","rotateX(0deg)"),X()("#ee").remove()},n.componentWillUnmount=function(){var e;e="whoami",localStorage.removeItem(e)},n.componentWillMount=function(){var e=jt("notification");void 0==e&&(e="on"),n.setState({notificationSetting:e})},n.ee=function(e){var t="837279877769847269697171";if(t.includes(n.state.eestring))if(n.state.eestring+e.keyCode===t)n.eedraw(),setTimeout(n.eeremove,2e3);else{if(X()("input").is(":focus"))return;if(!0!==e.ctrlKey&&!0!==e.metaKey){var a=n.state.eestring+e.keyCode;n.setState({eestring:a})}}else n.setState({eestring:""})},n.notification=function(){if("/"!==n.props.match.path||!n.props.match.isExact||!Se.includes(n.props.stateProps.activemqstate)){var e=n.refs.notificationSystem;if("scot-alerts"!==n.AMQ.activemqwho&&"scot-admin"!==n.AMQ.activemqwho&&"scot-flair"!==n.AMQ.activemqwho&&void 0!==e&&n.AMQ.activemqwho!==n.state.whoami&&""!==n.AMQ.activemqwho&&"api"!==n.AMQ.activemqwho&&!0!==n.AMQ.activemqwall&&"entity"!==n.AMQ.activemqtype&&"on"===n.state.notificationSetting){var t="".concat(n.AMQ.activemqwho," ").concat(n.AMQ.activemqaction," ").concat(n.AMQ.activemqtype," : ").concat(n.AMQ.activemqid),a=n.AMQ.activemqtype,r=n.AMQ.activemqstate,i=n.AMQ.activemqid;e.addNotification({message:t,level:"info",autoDismiss:5,action:"delete"!==r?{label:"View",callback:function(){window.open("/#/"+a+"/"+i)}}:null})}}},n.wall=function(e){if("/"!==n.props.match.path||!n.props.match.isExact){var t=n.refs.notificationSystem,a=new Date(1e3*n.AMQ.activemqwhen);a=a.toLocaleString(),!0===n.AMQ.activemqwall&&t.addNotification({message:a+" "+n.AMQ.activemqwho+": "+n.AMQ.activemqmessage,level:"warning",autoDismiss:0})}},n.errorToggle=function(e,t){var a=e;if(t)if(t.responseJSON){if("Authentication Required"===t.responseJSON.error)return n.setState({csrf:t.responseJSON.csrf}),void n.loginToggle(t.responseJSON.csrf)}else"Service Unavailable"===t.statusText&&(a=t.statusText);n.refs.notificationSystem.addNotification({message:a,level:"error",autoDismiss:0})},n.notificationToggle=function(){"off"===n.state.notificationSetting?(n.setState({notificationSetting:"on"}),Nt("notification","on",1e3)):(n.setState({notificationSetting:"off"}),Nt("notification","off",1e3))},n.loginToggle=function(e,t){if(n.state.login||!0===t)n.state.login&&!0===t&&(n.setState({login:!1}),n.props.history.push(n.state.origurl));else{var a=n.props.location.pathname;n.props.history.push("/"),n.setState({login:!0,origurl:a})}},n.LogOut=function(){X.a.ajax({type:"get",url:"/logout",success:function(e){this.setState({login:!0}),console.log("Successfully logged out"),this.WhoAmIQuery()}.bind(Object(l.a)(n)),error:function(e){this.error("Failed to log out",e)}.bind(Object(l.a)(n))})},n.WhoAmIQuery=function(){X.a.ajax({type:"get",url:"scot/api/v2/whoami",success:function(e){var t,a;t="whoami",a=e.user,localStorage.setItem(t,a),e.data&&this.setState({sensitivity:e.data.sensitivity,whoami:e.user})}.bind(Object(l.a)(n)),error:function(e){this.errorToggle("Failed to get current user",e)}.bind(Object(l.a)(n))})},n.GetHandler=function(){X.a.ajax({type:"get",url:"/scot/api/v2/handler?current=1",success:function(e){this.setState({handler:e.records[0].username})}.bind(Object(l.a)(n)),error:function(e){this.errorToggle("Failed to get current user",e)}.bind(Object(l.a)(n))})},n.render=function(){var e,t="Incident Handler: "+n.state.handler;return n.props.match.params.value&&(e=n.props.match.params.value.toLowerCase()),r.a.createElement(F,null,r.a.createElement(u.a,{inverse:!0,fixedTop:!0,fluid:!0},r.a.createElement(u.a.Header,null,r.a.createElement(u.a.Brand,null,r.a.createElement(Ne.Link,{to:"/",style:{margin:"0",padding:"0"}},r.a.createElement("img",{src:"/images/scot-600h.png",alt:"",style:{width:"50px"}}))),r.a.createElement(u.a.Toggle,null)),r.a.createElement(u.a.Collapse,null,r.a.createElement(m.a,null,r.a.createElement(Pi.a,{to:"/alertgroup",activeClassName:"active"},r.a.createElement(y.a,null,"Alert")),r.a.createElement(Pi.a,{to:"/event",activeClassName:"active"},r.a.createElement(y.a,null,"Event")),r.a.createElement(Pi.a,{to:"/incident",activeClassName:"active"},r.a.createElement(y.a,null,"Incident")),r.a.createElement(Pi.a,{to:"/intel",activeClassName:"active"},r.a.createElement(y.a,null,"Intel")),r.a.createElement(v.a,{id:"nav-dropdown",title:"More"},r.a.createElement(Pi.a,{to:"/task",activeClassName:"active"},r.a.createElement(E.a,null,"Task")),r.a.createElement(Pi.a,{to:"/guide",activeClassName:"active"},r.a.createElement(E.a,null,"Guide")),r.a.createElement(Pi.a,{to:"/signature",activeClassName:"active"},r.a.createElement(E.a,null,"Signature")),r.a.createElement(Pi.a,{to:"/entity",activeClassName:"active"},r.a.createElement(E.a,null,"Entity")),r.a.createElement(Pi.a,{to:"/reports",activeClassName:"active"},r.a.createElement(E.a,null,"Reports")),r.a.createElement(E.a,{divider:!0}),r.a.createElement(Pi.a,{to:"/admin",activeClassName:"active"},r.a.createElement(E.a,null,"Administration")),r.a.createElement(E.a,{href:"/docs/index.html"},"Documentation"),r.a.createElement(E.a,{divider:!0}),r.a.createElement(E.a,{href:"/cyberchef/index.html"},"Cyber Chef"),r.a.createElement(E.a,{divider:!0}),r.a.createElement(E.a,{href:"/#/",onClick:n.LogOut},"Log Out")),r.a.createElement(y.a,{href:"/incident_handler.html"},t)),r.a.createElement("span",{id:"ouo_warning",className:"ouo-warning"},n.state.sensitivity),r.a.createElement("span",{id:"scot_version",style:{float:"right",marginTop:"3px",padding:"10px 10px",position:"relative",color:"white"},className:"scot_version"},"V3.7"),r.a.createElement(Pt,{errorToggle:n.errorToggle}))),r.a.createElement("div",{className:"mainNavPadding"},r.a.createElement(zt,{csrf:n.state.csrf,modalActive:n.state.login,loginToggle:n.loginToggle,WhoAmIQuery:n.WhoAmIQuery,GetHandler:n.GetHandler,errorToggle:n.errorToggle,origurl:n.state.origurl}),r.a.createElement(pi.a,{ref:"notificationSystem"}),r.a.createElement(qt.d,{exact:!0,path:"/",render:function(e){return r.a.createElement(xt,{loggedIn:!n.state.login,sensitivity:n.state.sensitivity,errorToggle:n.errorToggle,clientId:n.state.clientId,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object})}}),"admin"===e?r.a.createElement(qt.d,{exact:!0,path:"/admin"},r.a.createElement(wo,null)):null,"alert"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"alertgroup"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"entry"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"event"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"incident"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"task"===e?r.a.createElement(Mi,{isTask:!0,queryType:n.props.match.params.type,viewMode:n.state.viewMode,type:n.props.match.params.value,id:n.props.match.params.id,id2:n.props.match.params.id2,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"guide"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"intel"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"signature"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"entity"===e?r.a.createElement(Mi,{id:n.props.match.params.id,id2:n.props.match.params.id2,viewMode:n.state.viewMode,type:e,notificationToggle:n.notificationToggle,notificationSetting:n.state.notificationSetting,listViewFilter:n.state.listViewFilter,listViewSort:n.state.listViewSort,listViewPage:n.state.listViewPage,errorToggle:n.errorToggle,history:n.props.history,createCallback:n.AMQ.create_callback_object,removeCallback:n.AMQ.remove_callback_object}):null,"reports"===e&&!n.props.match.params.id&&r.a.createElement(st,null),"reports"===e&&n.props.match.params.id&&r.a.createElement(lt,{reportType:n.props.match.params.id}),"wall"===e?r.a.createElement(Ht,{errorToggle:n.errorToggle}):null))},n.state={open:!1,notificationSetting:"on",login:!1,csrf:"",origurl:"",sensitivity:"",whoami:void 0,handler:void 0,eestring:"",clientId:null},n.notification=n.notification.bind(Object(l.a)(n)),n.loginToggle=n.loginToggle.bind(Object(l.a)(n)),n.errorToggle=n.errorToggle.bind(Object(l.a)(n)),n.AMQ=new So,n}return a}(r.a.Component);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Co=a(463),xo=a(144),jo=a(462),Oo=a(62).createBrowserHistory;o.a.render(r.a.createElement(jo.a,{history:Oo()},r.a.createElement(mn.SnackbarProvider,null,r.a.createElement(Co.a,null,r.a.createElement(xo.a,{exact:!0,path:"/",component:To}),r.a.createElement(xo.a,{exact:!0,path:"/:value",component:To}),r.a.createElement(xo.a,{exact:!0,path:"/:value/:id",component:To}),r.a.createElement(xo.a,{exact:!0,path:"/:value/:id/:id2",component:To}),r.a.createElement(xo.a,{path:"/:value/:type/:id/:id2",component:To})))),document.getElementById("root"))}},[[539,1,2]]]); +//# sourceMappingURL=main.39925231.chunk.js.map \ No newline at end of file diff --git a/public/static/js/main.39925231.chunk.js.map b/public/static/js/main.39925231.chunk.js.map new file mode 100644 index 000000000..db95d0a39 --- /dev/null +++ b/public/static/js/main.39925231.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["images/scot_logo_473x473.png","utils/userConfig.js","components/local_storage.js","components/dashboard/dazzle/widgetWrapper.js","components/dashboard/dazzle/widgetPicker.js","components/dashboard/dazzle/dashboard.js","components/dashboard/status.js","components/dashboard/emoji.js","components/dashboard/gamification.js","utils/session_storage.js","utils/time.js","components/dashboard/activity.js","utils/timesince.js","components/dashboard/report_heatmap.js","utils/debounce.js","components/dashboard/report_art.js","components/dashboard/report_alertpower.js","components/dashboard/report_created.js","components/dashboard/report.js","list/LoadingContainer/index.js","components/dashboard/thinglist.js","components/dashboard/dazzle/widgets.js","main/home.js","utils/cookies.js","components/esearch.js","debug-components/wall.js","modal/login.js","components/TagInput/index.js","utils/XHR.js","list/tableConfig.js","utils/constants.js","utils/list-columns.js","components/detail_data_status.js","components/promote.js","components/marker.js","modal/entity_detail.js","components/traffic_light_protocol.js","detail/selected_header_options.js","modal/delete.js","modal/owner.js","modal/entities.js","modal/change_history.js","modal/viewed_by_history.js","components/permission.js","components/conflict.js","components/add_entry.js","components/file_upload.js","components/summary.js","components/task.js","modal/link_warning.js","components/signature_table.js","components/autocomplete_input.js","modal/entity_create.js","components/custom_metadata_table.js","detail/alert_subcomponent.js","detail/selected_entry.js","components/badge.js","components/add_flair.js","modal/links.js","modal/mark.js","detail/selected_header.js","list/list-view.js","modal/export_event.js","modal/promoted_data.js","detail/selected_container.js","components/admin/usergroupform.js","components/admin/areyousure.js","components/admin/usergroupcontainer.js","components/admin/api.js","components/admin/undelete.js","components/admin/index.js","utils/activemq.js","main/index.js","registerServiceWorker.js","index.js"],"names":["module","exports","UserConfigKeyShape","key","PropTypes","string","isRequired","default","any","UserConfigContextTypes","getUserConfig","func","setUserConfig","UserConfigProvider","props","state","userConfig","loading","update","bind","this","Promise","resolve","reject","json","localStorage","JSON","parse","config","name","value","stringify","setItem","then","setState","channel","children","PureComponent","childContextTypes","shape","bool","PanelHeader","title","onRemove","style","position","className","Button","onClick","bsSize","Wrapper","editable","Panel","header","React","cloneElement","editMode","WidgetPicker","widgets","layout","isOpen","onClose","onSelect","activeWidgets","Set","rows","forEach","row","columns","col","widget","add","widgetItems","Object","keys","filter","has","map","widgetObj","description","length","Modal","show","onHide","Header","closeButton","Title","Body","Footer","defaultLayout","Dashboard","saveDashboard","isNew","widgetPicker","newWidgetOptions","onAdd","updateLayout","updateTitle","reset","toggleEdit","togglePicker","selectWidget","rowIndex","columnIndex","target","errorToggle","addWidget","onEdit","onSave","onCancel","handleTitleChange","Grid","fluid","onMove","frameComponent","WidgetWrapper","defaultProps","TitleBar","onSubmit","type","placeholder","onChange","bsStyle","disabled","Status","statusData","error","updateData","fetchError","$","ajax","url","success","_isMounted","response","services","Array","isArray","service","status","push","classes","join","Service","Emoji","role","aria-label","label","aria-hidden","symbol","titleCase","str","charAt","toUpperCase","slice","Gamification","updateCategory","nextIndex","categoryIndex","gameCategories","data","categories","category","console","log","gameData","categoryInterval","setInterval","clearInterval","Well","Category","tooltip","username","count","setLocalStorage","getLocalStorage","getSessionStorage","moment","extendMoment","Moment","DAY","timeOlderThan","timestamp","secondsAgo","Date","now","todayRange","start","Math","floor","setHours","end","lastWeekRange","epochRangeToFilter","range","epochRangeToString","NOTIFICATION_LEVEL","wall","create","delete","NOTIFICATION_TYPES","NOTIFICATION_TIME","ACTIVITY_TYPE","Activity","users","notifications","loadWall","updateActivity","updateUsers","wallMessage","notification","refreshTimer","createCallback","pruned","time","action","persistWall","records","user","who","timeago","last_activity","walls","SessionStorage","message","activemqwhen","activemqwho","activemqmessage","level","includes","activemqwall","activemqtype","activemqstate","activemqid","i","item","epoch","badge","seconds","interval","timeSince","text","items","concat","sort","a","b","buildActivityItem","stopped","marquee","well","marqueeValues","window","getComputedStyle","parseInt","width","paddingLeft","offsetWidth","ref","ReactDOM","findDOMNode","Component","ActivityItem","Label","ReportHeatmap","getData","collection","year","axios","get","res","loadHeatMap","margin","height","gridSize","legendElementWidth","colors","container","d3","graph","select","empty","append","attr","selectAll","enter","d","remove","colorScale","domain","buckets","cards","day","hour","merge","transition","duration","exit","legend","quantiles","round","collectionChange","event","yearChange","exportToPNG","svgString","XMLSerializer","serializeToString","document","querySelector","canvas","createElement","ctx","getContext","DOMURL","self","URL","webkitURL","img","Image","svg","Blob","createObjectURL","onload","drawImage","png","toDataURL","innerHTML","revokeObjectURL","appendTo","click","src","formDisabled","htmlFor","display","textAlign","id","min","step","viewBox","hidden","debounce","callback","timeout","wait","immediate","args","clearTimeout","setTimeout","apply","formatTime","days","hours","minutes","output","barColors","All","Promoted","Incident","ReportArt","initChart","xAxisEl","yAxisEl","chartInit","updateChart","barNames","chartData","dates","values","lineNames","lines","maxValue","dateScale","padding","rangeRound","date","barScale","from","bandwidth","yScale","clamp","nice","xAxis","scale","yAxis","ticks","tickFormat","formatTickTime","call","AvgHolder","averages","AvgHolderBox","node","getBBox","x","y","borderOffset","transform","baseVal","initialize","getItem","LegendHolder","legendHeight","widthSums","legendWidth","loadArt","opts","unit","unitChange","lengthChange","dateChange","today","toISOString","pattern","wrapText","each","getComputedTextLength","words","split","reverse","word","line","lineCount","dy","parseFloat","pop","yOffset","ReportAlertpower","xScale","dataset","dataTypes","replace","score","curStart","curEnd","total","max","stackedMax","groupedMax","alerts","alertTypes","bars","displayMode","transitionGrouped","transitionStacked","delay","tween","prec","pow","t","initialDuration","displayModeChanged","loadData","chartResults","chartSort","chartSortDir","encodeURIComponent","chartFilter","dataChange","displayModeChang","preventSubmit","preventDefault","stopPropagation","background","border","checked","displayModeChange","ReportCreated","statusLine","curve","lineHolder","shown","on","newData","genData","reduce","e","dataMaxes","alertgroups","entries","events","intel","incidents","lineData","getTime","random","reportByType","reportType","reportTitleByType","reportDescriptionByType","reportPanelHeader","expandButton","backButton","to","ReportPage","overflow","SingleReport","reportComponentByType","withStyles","theme","progress","spacing","CircularProgress","ThingList","extend","queryOptions","newBadge","ajaxSetup","traditional","thingType","processData","fetchData","thing","getLink","getSummary","created","things","genThingItem","emptyStyle","emptyString","ListGroup","limit","offset","subject","configKey","RecentIntel","RecentEvents","RecentIncidents","OpenTasks","tasks","updated","body_plain","substr","YourTasks","yourTasks","owner","UnviewedAlerts","unviewedAlerts","views","TopEvents","topEvents","has_tasks","ViewedEvents","viewedEvents","EntryEvents","entryEvents","entry_count","Widgets","ReportWidgets","HomeDashboard","switchTab","closeTab","saveTab","dashboardConfig","tabs","updateDashboardConfig","curTab","tabConfig","index","tabLayout","newTabConfig","splice","newTab","newConfig","loggedIn","dashboardHeader","removeCallback","tabsConfig","defaultTab","buildTab","tabHeaders","tab","eventKey","cursor","tabContent","Tab","Pane","Container","activeKey","Row","Col","sm","Content","mountOnEnter","unmountOnExit","withUserConfig","checkPropTypes","WrappedComponent","UserConfigSubscriber","setUserSubConfig","subConfig","context","restProps","userConfigProps","contextTypes","displayName","getDisplayName","checkCookie","cookie","getCookie","cname","ca","c","substring","indexOf","deleteCookie","setCookie","cvalue","exdays","setTime","expires","toUTCString","Search","componentDidMount","keyup","undefined","keyCode","closeSearch","showSearchToolbar","searchString","doSearch","qstring","results","searching","handleEnterKey","componentDidUpdate","render","tableRows","dataOne","zIndex","marginTop","float","color","charSet","onKeyPress","flexFlow","right","top","borderStyle","overflowY","maxHeight","componentWillUnmount","off","searchResults","entityHeight","SearchDataEachHeader","flexGrow","textOverflow","whiteSpace","SearchDataEachRows","entryid","highlight","rowEvenOdd","isEven","rowClassName","href","search_string_array","activeClassName","styles","Active","highlightClassName","searchWords","autoEscape","textToHighlight","Highlight","backgroundColor","borderColor","borderWidth","overflowX","wordWrap","n","require","Wall","sendWallMessage","alert","buttonStatus","buttonText","buttonLoading","msg","inputChange","input","Login","pass","SSO","NormalAuth","isEnterPressed","mounted","origurl","dialogClassName","modalActive","ScotImage","alt","marginBottom","marginRight","marginLeft","defaultValue","crossDomain","WhoAmIQuery","GetHandler","loginToggle","refs","csrf","responseText","TagInput","handleDelete","tags","handleAdd","tag","maxTags","handleInputChange","arr","result","obj","suggestions","showHideInput","hide","handleAddition","autoresize","autofocus","allowBackspace","allowNew","tagComponent","Tag","classNames","onDelete","selectedTag","selectedTagName","get_data","endpoint","params","body","post","put_data","put","customFilters","numberFilter","debounceTimeout","minLength","stringFilter","dropdownFilter","options","align","OverlayTrigger","trigger","placement","overlay","Popover","maxWidth","ButtonGroup","vertical","option","active","textTransform","block","readOnly","dateRange","rootClose","numberOfCalendars","selectionType","showLegend","singleDateRange","states","momentRangeToEpoch","dispatchEvent","MouseEvent","tagFilter","customCellRenderers","dateFormater","toLocaleString","alertStatus","trim","open","closed","textStatus","alertStatusAlerts","justifyContent","flairCell","appliesTo","original","applies_to","columnDefinitions","Id","accessor","Filter","AlertStatus","open_count","closed_count","promoted_count","column","Cell","EventStatus","IncidentStatus","SigStatus","TaskStatus","metadata","task","TaskSummary","minWidth","Subject","Location","Created","Updated","Occurred","Sources","Tags","TaskOwner","Owner","Entries","Views","DOE","IncidentType","AppliesTo","Value","Name","Group","signature_group","Type","EntityType","Description","TargetType","TargetId","filterable","EntryCountColumn","resizable","expander","Expander","isExpanded","rest","variant","size","getProps","rowInfo","defaultColumnSettings","typeColumns","alertgroup","incident","signature","guide","entity","buildTypeColumns","rowData","propData","flag","get_current_combined_columnWidths","hasOwnProperty","colOptions","element","columnobj","getColumnWidth","status_code_obj","num_of_exemptions","windowsize","innerWidth","column_total_width","residual","residual_per_column","FlairObject","wordBreak","dangerouslySetInnerHTML","__html","headerText","String","cellLength","newtext","stripHtml","calc_width","PromotionButton","getPromotionInfo","prevProps","onMouseDown","listColumnsJSON","columnsDisplay","columnsClassName","ButtonToolbar","MenuItem","DropdownButton","Link","DetailDataStatus","keydown","is","ctrlKey","metaKey","statusAjax","unbind","trackAll","untrackAll","closeAll","openAll","enableAll","disableAll","newStatus","contentType","buttonStyle","classStatus","promotion_id","fontSize","Promote","newType","newURL","promote","location","assign","pid","eventkey","Marker","isMarked","removeMarkedItemsHandler","getMarkedItemsHandler","setMarkedItemsHandler","getSelectedAlerts","nextProps","isAlert","Tooltip","markedItems","getMarkedItems","selectedAlerts","removeMarkedItems","setMarkedItems","alertsSelected","currentMarked","nextMarked","startX","startY","startWidth","startHeight","DropdownToggle","DropdownMenu","TrafficLightProtocol","selectColor","tlp","serverRequest","r","cx","cy","fill","stroke","strokeWidth","divider","SelectedHeaderOptions","toggleFlair","newGlobalFlairState","globalFlairState","ifr","contentDocument","ifrContents","contents","find","addClass","removeClass","alertOpenOrCloseSelected","iterarray","entryData","object","ToggleProcessingMessage","catch","alertPromoteSelected","array","promoteTo","alert_id","alertSelectExisting","prompt","selectExisting","alertExportCSV","currentRecords","data_to_download","dataToDownload","csvLink","link","PrintPrepare","css","pre","forceUpdate","Print","print","guideToggle","flairToolbarToggle","guideID","left","sourceToggle","createGuide","subjectName","reparseFlair","parsed","createLinkSignature","manualUpdate","subjectType","headerData","showPromote","entryToggle","fileUploadToggle","viewedByHistoryToggle","changeHistoryToggle","permissionsToggle","entitiesToggle","guideRedirectToAlertListWithFilter","linksModalToggle","showSignatureOptionsToggle","exportToggle","deleteToggle","markModalToggle","filename","promoteRemaining","customStyles","content","bottom","ACTION_BUTTONS","READY","LOADING","SUCCESS","ERROR","DeleteThing","deleteItems","deleteType","iterator","enqueueSnackbar","delete_data","history","deleteText","deleteTempArray","paddingRight","onRequestClose","DeleteEntry","toggle","DeleteModal","deleteButton","deleteAll","when","deleteAjax","always","confirmText","DeleteThingComponent","withSnackbar","whoami","componentWillReceiveProps","currentOwner","ownerToggle","ownerToolbar","Entities","entitiesBody","entityData","EntitiesData","originalobj","entities","prop","subobj","EntitiesDataHeaderIterator","eachValue","entityId","entityValue","fontWeight","EntitiesDataValueIterator","ChangeHistory","historyBody","ChangeHistoryData","ChangeHistoryDataIterator","format","what","ViewedByHistory","ViewedByHistoryData","view_history","ViewedByHistoryDataIterator","where","ReactTags","WithContext","SelectedPermission","toggleNewReadPermission","readPermissionEntry","toggleNewModifyPermission","modifyPermissionEntry","permissionsfunc","permissionData","groups","writepermissionsarr","readpermissionsarr","readwritepermissionsarr","fullprop","modifyRows","readRows","dataRead","dataModify","updateid","read_modify","readUpdate","modifyUpdate","paddingTop","PermissionIterator","permissionDelete","newPermission","tempArr","read","modify","j","NewPermission","handleDrag","minQueryLength","customCSS","Conflict","handlePUT","editedtext","target_id","targetid","parent","target_type","handleClose","addedEntry","handleEditorChange","localconflict","Card","card","CardContent","Typography","component","initialValue","remoteconflict","plugins","onEditorChange","init","selector","table_clone_elements","paste_retain_style_properties","paste_data_images","paste_preprocess","plugin","relative_urls","remove_script_host","link_assume_external_targets","toolbar1","content_css","verify_html","setup","editor","addButton","onclick","insertContent","Prompt","AddEntryModal","entryAction","asyncContentLoaded","recentlyUpdated","scrollTop","leaveCatch","addedentry","change","submit","startsWith","set","dataURL","Number","html","dataType","forEdit","showConflict","toggleVisibility","exportContent","recipients","exportResponse","localcontent","not_saved_entry_id","Dialog","fullWidth","aria-labelledby","tinyID","table_default_attributes","auto_focus","browser_spellcheck","contextmenu","codesample_languages","paste_postprocess","querySelectorAll","tableNode","setAttribute","ui","registry","addMenuButton","fetch","EntityDetail","componentWillMount","onLoad","getElementById","readyState","ifrContentsHead","rel","contentWindow","requestAnimationFrame","newheight","scrollHeight","isMounted","currentTabArray","valueClicked","entityvalue","entitytype","entityid","isNaN","entityidsarray","currentKey","initialLoad","processedIds","flairToolbarOff","containerHeightAdjust","addEventListener","checkForInitialLoadComplete","addNewEntity","watcher","nextPropsEntityIdInt","addEntity","currentTabArrayIndex","checkFlairHover","linkWarningToggle","initDrag","hasClass","elem","clientX","clientY","defaultView","documentElement","doDrag","stopDrag","blockiFrameMouseEvent","removeEventListener","allowiFrameMouseEvent","moveDivInit","moveDivStop","handleSelectTab","positionRightBoundsCheck","defaultEntityOffset","entityWidthint","fullScreen","defaultOffsetX","tabsArr","DragmeClass","z","addFlair","form","entityobj","defaultActiveKey","animation","handle","entityWidth","flex","borderTop","borderBottom","entityMaxHeight","entityoffset","TabContents","minHeight","guideurl","isPopUp","EntityValue","entityurl","scanner","class","EntityBody","updateAppearances","appearancesNumber","newAppearancesNumber","appearances","entryToolbar","showFullEntityButton","linkOnClickIntercept","nopop","entityEnrichmentDataArr","entityEnrichmentLinkArr","entityEnrichmentGeoArr","enrichmentEventKey","dataSource","nopopup","data-nopop","GeoView","copyToEntry","copyToEntryToolbar","copyToEntity","copyToEntityToolbar","trArr","copyArr","copy","EntityEnrichmentButtons","expandLevel","EntityReferences","promoted","therest","result_array","compareUpdatedDate","loading_type","loadingType","entityReferencesData","loadingSignature","loadingEvents","loadingAlerts","loadingIncidents","loadingIntel","Paper","promotedHref","alignItems","lineHeight","daysSince","minRows","sortable","maxRecords","order","orderBy","GuideBody","SourceBody","head","frameBorder","sandbox","styleSheets","finalfiles","FileUpload","Close","files","onDrop","FormData","xhr","XMLHttpRequest","uploadProgress","uploadComplete","uploadFailed","uploadCancelled","send","edit","stagecolor","enable","addentry","saved","enablesave","getRootProps","getInputProps","file","Summary","newClass","summary","summaryDisplay","Task","makeTask","make_task","closeTask","close_task","takeTask","take_task","taskDisplay","taskData","LinkWarning","proceed","opener","apiOnly","myDomain","reg","RegExp","linkRegResult","match","myDomainRegResult","SignatureTable","submitSigBody","viewVersionid","ajaxType","viewSigBodyid","signature_id","revision","cursorEnabledDisabled","signatureData","editSigBody","lastViewVersionid","createNewSigBody","createNewSigBodyFromSig","Cancel","version","prod_sigbody_id","viewSigBody","keyboardHandlerUpdate","Cookies","currentKeyboardHandler","languageModeUpdate","currentLanguageMode","editorThemeUpdate","currentEditorTheme","loaded","keyboardHandlers","languageModes","editorThemes","versionsArray","keyboardHandlersArray","languageModesArray","editorThemesArray","not_saved_signature_entry_id","currentKeyboardHandlerApplied","highestVersionid","versionidrevision","versionidrevisionprodqual","versionidSigBodyid","qual_sigbody_id","showSignatureOptions","mode","editorProps","$blockScrolling","keyboardHandler","maxLines","minLines","showPrintMargin","SignatureMetaData","submitMetaData","k","v","err","optionsType","onOptionsChange","optionsValue","AutoCompleteInput","HandleAdd","HandleInputChange","OnChange","getItemValue","renderItem","isHighlighted","menuStyle","borderRadius","boxShadow","inputProps","wrapperProps","EntityCreateModal","HasSpacesCheck","test","multiword","GetCount","countLoading","Confirmation","confirmation","Submit","ToggleCreateEntity","responseJSON","error_msg","OnChangeMatch","OnChangeValue","userdef","CustomMetaDataTable","nextState","multiSelectArr","dropdownArr","datesArr","inputArr","textAreaArr","inputMultiArr","booleanArr","formType","o","referenceKey","dropdownValues","help","fetchURL","dynamic","onBlur","calendarValue","typeTitle","typeLower","mainType","mainId","DropdownComponent","getDynamic","selected","bsClass","InputComponent","inputOnChange","Calendar","data_string","_d","showCalendar","TextAreaComponent","InputMultiComponent","group","groupArr","inputValue","InputChange","clickedThing","bsType","BooleanComponent","MultiSelectComponent","makeForm","FormControl","componentClass","multiple","AddEntryToAlert","useState","visible","setVisibility","showEntryData","SelectedEntry","getEntryData","updatedCB","Watcher","getEntityData","entityResult","showEntityData","waitForEntry","waitEntry","flairToolbar","newEntityDetailKey","entityDetailKey","linkWarningToolbar","containerid","intervalID","not","tr","parentNode","ListViewTableHeight","getElementsByClassName","clientHeight","innerHeight","divid","divClass","subcomponent","setAlertColumns","setEntryEntities","fileUploadToolbar","notificationType","notificationMessage","onresize","runWatcher","EntryIterator","linkToSearch","data_with_flair","flairOff","search","ahrefs","NewAlertTable","createData","dataarray","dataitem","promotionId","expanded","handleSelectAll","prevState","styleName","reactTable","onExpandedChange","defaultFilterMethod","SubComponent","onFilteredChange","onSortedChange","newSorted","shiftKey","showPagination","pageSize","getTdProps","getTrProps","sortedData","handleMultiSelection","getSelection","removeAllRanges","handleShiftSelect","handleSelection","some","AlertTableSearchDiv","outline","EntryParent","refreshButton","editEntryToggle","editEntryToolbar","replyEntryToggle","replyEntryToolbar","deleteToolbar","permissionsToolbar","getEntryEntityData","itemarr","subitemarr","itemsClass","outerClassName","innerClassName","taskOwner","subitem","childobj","childfunc","entryActions","actions","send_to_name","send_to_url","datahref","tlpBorder","tlpColorCSS","header1","header2","createdTime","updatedTime","entryHeaderInnerId","showEntityCreateModal","highlightedText","body_flair","pullRight","header3","checkHighlight","iframe","toString","EntryAction","post_data","data-href","EntryData","setHeight","rawMarkup","entry_body_id","entry_body_inner_id","contentDidMount","Badge","toggleBadgeEntry","badgetype","source","badgevar","badgeType","BadgeDataIterator","badgeDelete","newBadgeArr","newobject","NewBadge","handleSuggestionOrTagConversion","oldarray","newobj","abbreviateNumber","num","fixed","toPrecision","toFixed","abs","AddFlair","entityUpdate","scrollTo","currentEntityValue","entityMatched","toLowerCase","entityCount","entitydata","entityEntryCount","entry","circle","country_code","geoip","isocode","isp","sidd","constructor","blocklist3","firewall","watch","whitelist","blackhole","proxy_block","entityEntry","subtable","wrap","Links","allSelected","getLinks","handleTHeadCheckboxSelection","handleRowSelection","handleCheckboxSelection","cell","defaultPageSize","getTheadThProps","noDataText","verticeObject","linkid","vertices","memo","checkAllSelected","instance","pageRows","pageRow","Actions","actionSuccess","RemoveLink","RemoveLinkAjax","ToggleActionSuccess","newActionSuccess","Mark","currentItem","unshift","deleteCallback","RemoveSelected","pendingDelete","LinkContextChange","linkContextString","ExpandLinkToggle","newState","linkPanel","StartDelete","MoveEntry","EntryAjax","CopyEntry","arrayToLink","currentobj","LinkAjax","Reparse","reparseButton","ReparseAjax","promoteButton","PromoteAjax","reload","removeOriginal","RemoveEntryAfterMove","numSelected","addToEvent","deleteThings","collapsible","Form","horizontal","InitialAjaxLoad","datasource","listStartY","listStartHeight","listQuery","ExportModal","emailArray","emailField","showEditor","responseSuccess","aria-describedby","PostResponse","PromotedData","showAllPromotedDataToolbar","showAllPromotedDataToggle","promotedFromType","fullarr","shortarr","shortforlength","SelectedHeader","_type","_message","refreshing","eventLoaded","entryLoaded","entityLoaded","entryType","eventResult","showEventData","isNotFound","tagData","sourceData","flairing","entryResult","exportModal","viewedbyfunc","viewedbyarr","isDeleted","changeHistoryToolbar","viewedByHistoryToolbar","entitiesToolbar","entryEntityData","promoteToggle","promoteToolbar","intervalID1","nicktype","summaryUpdate","taskid","escape","handleFilter","showMarkModal","processing","togglePreventClick","showLinksModal","checkSelection","temparray","selection","startIndex","endIndex","delayFunction","rowid","viewedby","promoted_from","alertPreSelectedId","EntryDataUpdated","EntryDataSubject","handleChange","keyName","newValue","calculateWidth","newWidth","isDisabled","SelectedContainer","datarows","toggleEventDisplay","viewEvent","tabIndex","ListView","viewMode","Landscape","Portrait","ConvertAlertIdToAlertgroupId","ConvertEntryIdToType","scrollheight","sortBy","filterBy","pageLimit","activepage","pageNumber","page","idsarray","finalarray","storeKey","reloadactive","sortObj","sortInt","desc","stringArr","sourcearr","tagarr","totalPages","getPages","totalRecordCount","objectarray","totalCount","showSelectedContainer","statusText","keyNavigate","toggleView","preventClick","targetType","srcElement","tagName","curRow","nextRow","parentElement","nextElementSibling","previousElementSibling","nextId","getNewData","showClearFilter","listViewContainerDisplay","typeCapitalized","listViewKey","notificationSetting","notificationToggle","createNewThing","exportCSV","clearAll","pages","onPageChange","handlePageChange","onPageSizeChange","handlePageSizeChange","filtered","handleSort","sorted","manual","LoadingComponent","CustomTableLoader","dragdiv","queryType","AutoScrollToId","tbody","offsetHeight","offsetTop","initialAutoScrollToId","idReference","id2","response1","newresponse","async","startdrag","manualScrollHeight","stopdrag","onmousemove","onmouseup","onmousedown","classname","splitter","maxheight","alldetail","differentviews","maxwidth","minwidth","scrollwidth","resize","listViewOrientation","newListViewKey","subid","newPage","newidsarray","newarray","abort","csv","storearray","data_uri","sortArr","clearall","newSortArr","sortEach","cookieName","filterObj","newFilterArr","filterEach","pageIndex","ceil","listViewSort","listViewPage","listViewFilter","selectedColor","sourcetags","startepoch","endepoch","idtext","statustext","subjecttext","viewsarrow","idarrow","subjectarrow","statusarrow","createdarrow","sourcearrow","tagsarrow","viewstext","entriestext","suggestiontags","suggestionssource","sourcetext","tagstext","viewfilter","viewevent","showevent","fsearch","textField","root","palette","paper","textInput","initstate","fullname","password","UserGroupFormComponent","formatGroups","allgroups","resetState","checkBlankInputs","buildDataObj","handleGroups","newgroups","handlePOST","nativeEvent","newval","editObject","selectedValue","TextField","helperText","InputLabelProps","shrink","autoComplete","FormControlLabel","control","Switch","GroupSelection","CardActions","button","GroupSelectionComponent","mapUsersGroupsToTags","usersgroups","checkValidGroup","el","tagInput","tagInputField","inline","UserGroupForm","AreYouSure","deletetext","UserGroupContainer","showModal","showUserDialog","showGroupDialog","handleUserClose","handleListItemClick","getColumns","handleActiveToggle","toggleAreYouSure","setUserGroupResults","userdata","groupdata","areYouSure","handleAreYouSureClose","getUserObject","updateId","other","showuserpagination","showgrouppagination","elevation","xs","gutterBottom","Person","flexDirection","Fab","mixins","gutters","paddingBottom","Api","GetKeys","GetAvailableGroups","CreateKey","DeleteKey","GroupChange","ToggleActiveStatus","availableGroups","newGroup","keysArr","keyActiveStatus","keyGroups","apikey","currentGroups","allGroups","keyActiveStatusCss","GroupModal","Open","DeleteGroup","newGroups","textContent","currentGroupArray","currentGroupArrayEdit","keyStatus","Undelete","getDeletedItems","dataArr","Restore","Purge","notificationSystem","addNotification","autoDismiss","TabContainer","createMuiTheme","typography","Admin","AppBar","appBar","indicatorColor","centered","Amq","s4","get_guid","register_client","restart","client","clientId","destination","process_message","handle_update","create_callback_object","intkey","checkNumber","cb_map","newset","remove_callback_object","payload","activemqaction","activemqguid","guid","activemqhostname","hostname","activemqpid","execute_callback_function","searchstring","f","noti","amqdebug","Map","number","App","viewModeSetting","listViewFilterSetting","listViewSortSetting","listViewPageSetting","handler","AMQ","ee","eedraw","prepend","eeremove","removeItem","eestring","path","isExact","stateProps","errorString","loggedin","login","pathname","LogOut","sensitivity","IH","inverse","fixedTop","Brand","Toggle","Collapse","exact","isTask","Boolean","customHistory","createBrowserHistory","HashRouter","Route"],"mappings":"2GAAAA,EAAOC,QAAU,IAA0B,+C,gWCwCrCC,EAAqB,CACzBC,IAAKC,IAAUC,OAAOC,WACtBC,QAASH,IAAUI,IAAIF,YAyBnBG,EAAyB,CAC7BC,cAAeN,IAAUO,KACzBC,cAAeR,IAAUO,MASdE,EAAb,kDACE,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAEDC,MAAQ,CACXC,WAAY,CACVC,SAAS,IAIb,EAAKC,OAAS,EAAKA,OAAOC,KAAZ,gBACd,EAAKP,cAAgB,EAAKA,cAAcO,KAAnB,gBAVJ,EADrB,8DAiBI,MAAO,CACLT,cAAeU,KAAKV,cACpBE,cAAeQ,KAAKR,iBAnB1B,s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KAAD,KACE,kBAACG,GAAA,EAAD,CAAON,OAAK,EAACf,KAAK,IAAI97B,UAAWi7B,KACjC,kBAACkC,GAAA,EAAD,CAAON,OAAK,EAACf,KAAK,UAAU97B,UAAWi7B,KACvC,kBAACkC,GAAA,EAAD,CAAON,OAAK,EAACf,KAAK,cAAc97B,UAAWi7B,KAC3C,kBAACkC,GAAA,EAAD,CAAON,OAAK,EAACf,KAAK,mBAAmB97B,UAAWi7B,KAChD,kBAACkC,GAAA,EAAD,CAAOrB,KAAK,yBAAyB97B,UAAWi7B,QAGvCptD,SAASs2B,eAAe,W","file":"static/js/main.39925231.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/scot_logo_473x473.981c5c79.png\";","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { getDisplayName } from \"recompose\";\nimport { Broadcast, Subscriber } from \"react-broadcast\";\nimport * as LocalStorage from \"../components/local_storage\";\n\n/**\n * This file defines everything needed to use user settings\n * in components.\n *\n * This uses React's context API so that we don't need to have\n * a giant prop chain\n *\n * The provider sets everything up and is included at the top\n * of the application.\n *\n * The HOC is included with every component that wants access\n * to the object\n *\n * userConfig data format:\n * {\n *\t\tkey1: { data },\n *\t\tkey2: [ data, data, data, ],\n *\t\tkey3: true,\n *\t\t...\n * }\n * where keys and data structures are defined in the UserConfigKeys\n * object\n *\n * Currently components may only access one key of userConfig.\n *\n * WARNING: The context API is likely to change in the future\n * and this will need to be updated. Hopefully though, only\n * this file will need to be updated as nothing else directly\n * accesses context\n */\n\n// Channel name for react-broadcast\nconst UserConfigChannel = \"userConfig\";\n\nconst UserConfigKeyShape = {\n key: PropTypes.string.isRequired,\n default: PropTypes.any.isRequired\n};\n\n/**\n * Unique keys for the structure of userConfig\n *\n * Structure:\n *\t\tKEY_ID: {\n *\t\t\tkey: KEY_VALUE,\n *\t\t\tdefault: DEFAULT_VALUE(S),\n *\t\t}\n *\n *\tThis is how to specify the top-level key into the userConfig object\n *\tand define the shape of the data as well as the default values\n */\nexport const UserConfigKeys = {\n DASHBOARD: {\n key: \"dashboard\",\n default: {\n curTab: 0,\n tabs: []\n }\n }\n};\n\nconst UserConfigContextTypes = {\n getUserConfig: PropTypes.func,\n setUserConfig: PropTypes.func\n};\n\n/**\n * This sets up the context provider for the userConfig object\n *\n * Only needs to be included once, somewhere at the top of the chain\n * Currently in main/index.js\n */\nexport class UserConfigProvider extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n userConfig: {\n loading: true\n }\n };\n\n this.update = this.update.bind(this);\n this.setUserConfig = this.setUserConfig.bind(this);\n }\n\n static childContextTypes = UserConfigContextTypes;\n\n getChildContext() {\n return {\n getUserConfig: this.getUserConfig,\n setUserConfig: this.setUserConfig\n };\n }\n\n /**\n * Load user config\n *\n * Return: Promise\n */\n getUserConfig() {\n // Currently just uses localstorage\n // This should be easy to change to use a backend at some point\n return new Promise((resolve, reject) => {\n let json = LocalStorage.getLocalStorage(UserConfigChannel);\n if (json) {\n resolve(JSON.parse(json));\n return;\n }\n\n resolve({});\n });\n }\n\n /**\n * Save user config\n *\n * Return: Promise\n */\n setUserConfig(config) {\n // Currently just uses localstorage\n // This should be easy to change to use a backend at some point\n return new Promise((resolve, reject) => {\n LocalStorage.setLocalStorage(UserConfigChannel, JSON.stringify(config));\n\n resolve();\n }).then(() => {\n this.update();\n });\n }\n\n update() {\n this.getUserConfig().then(config => {\n this.setState({\n userConfig: config\n });\n });\n }\n\n componentDidMount() {\n this.update();\n }\n\n render() {\n return (\n \n
{this.props.children}
\n
\n );\n }\n}\n\n/*\n * Defining shape for UserConfig props.\n *\n * This should be imported by wrapped components:\n * static propTypes = {\n *\t\t( all local propTypes ),\n *\t\t...UserConfigPropTypes,\n * };\n *\n * Children:\n *\t\tconfig: the actual data,\n *\t\tsetUserConfig( config ): save changes to config\n *\t\tgetUserConfig(): load the config from source again\n *\t\tloading: whether the config is currently loading\n */\nexport const UserConfigPropTypes = {\n userConfig: PropTypes.shape({\n config: PropTypes.any.isRequired,\n setUserConfig: PropTypes.func.isRequired,\n getUserConfig: PropTypes.func.isRequired,\n loading: PropTypes.bool\n }).isRequired\n};\n\n/**\n * Higher-order Component (HOC) for providing a subkey of userConfig\n * to a component\n *\n * Usage: (In component file)\n *\t\texport default withUserConfig( KEY ) (COMPONENT);\n * Where:\n *\t\tKEY: is one of the values above in UserConfigKeys\n *\t\tCOMPONENT: is the component needing access to userConfig\n *\n * Example:\n *\t\texport default withUserConfig( UserConfigKeys.DASHBOARD ) (HomeDashboard);\n *\n *\t\tThis gives HomeDashboard access to the dashboard portion of userConfig\n */\nexport const withUserConfig = configKey => {\n PropTypes.checkPropTypes(\n UserConfigKeyShape,\n configKey,\n \"argument\",\n \"withUserConfig\"\n );\n\n return WrappedComponent => {\n class UserConfigSubscriber extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {};\n\n this.setUserSubConfig = this.setUserSubConfig.bind(this);\n }\n\n static contextTypes = UserConfigContextTypes;\n static displayName = `withUserConfig(${getDisplayName(\n WrappedComponent\n )})`;\n static propTypes = {\n userConfig: PropTypes.object.isRequired\n };\n\n /**\n * This allows the wrapped component to only have to worry about its own\n * portion of userConfig. Its changes are automatically wrapped back into\n * the whole object\n */\n setUserSubConfig(subConfig) {\n let newConfig = {\n ...this.props.userConfig\n };\n newConfig[configKey.key] = subConfig;\n\n this.context.setUserConfig(newConfig);\n }\n\n render() {\n let { userConfig, ...restProps } = this.props;\n\n let data = userConfig[configKey.key] || configKey.default;\n const loading = userConfig.loading;\n\n const userConfigProps = {\n userConfig: {\n loading: loading === true,\n config: data,\n setUserConfig: this.setUserSubConfig,\n getUserConfig: this.context.getUserConfig\n }\n };\n\n return ;\n }\n }\n\n const UserConfigHelper = props => (\n \n {data => }\n \n );\n return UserConfigHelper;\n };\n};\n","export const setLocalStorage = ( name, value ) =>{\n localStorage.setItem( name, value );\n};\n\nexport const removeLocalStorage = ( name ) => {\n localStorage.removeItem( name );\n};\n\nexport const getLocalStorage = ( name ) => {\n return localStorage[ name ];\n};\n","import React from 'react';\n\nimport { Panel, Button } from 'react-bootstrap';\n\nconst PanelHeader = ( title, onRemove ) => (\n\t
\n\t\t{title}\n\t\t\n\t\t\t\n\t\t\n\t
\n)\n\nconst Wrapper = ( { children, onRemove, editable, title } ) => (\n\t
\n\t\t{ !editable && children }\n\t\t{ editable &&\n\t\t\t\n\t\t\t\t{React.cloneElement(children, { editMode: editable })}\n\t\t\t\n\t\t}\n\t
\n)\n\nexport default Wrapper;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, Button } from 'react-bootstrap';\n\nconst WidgetPicker = ( { widgets, layout, isOpen, onClose, onSelect } ) => {\n\tlet activeWidgets = new Set();\n\tlayout.rows.forEach( row => {\n\t\trow.columns.forEach( col => {\n\t\t\tcol.widgets.forEach( widget => {\n\t\t\t\tactiveWidgets.add( widget.key );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tlet widgetItems = Object.keys(widgets)\n\t\t.filter( widget => !activeWidgets.has( widget ) )\n\t\t.map( ( widget, key ) => {\n\t\t\tconst widgetObj = widgets[widget];\n\t\t\treturn (\n\t\t\t\t
{onSelect(widget);}}>\n\t\t\t\t\t

{widgetObj.title}

\n\t\t\t\t\t

{widgetObj.description}

\n\t\t\t\t
\n\t\t\t)\n\t\t} );\n\n\tif ( !widgetItems.length ) {\n\t\twidgetItems =

No available widgets

;\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\tPick a Widget\n\t\t\t\n\n\t\t\t{widgetItems}\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t)\n}\nWidgetPicker.propTypes = {\n\twidgets: PropTypes.object.isRequired,\n\tlayout: PropTypes.object.isRequired,\n\tisOpen: PropTypes.bool.isRequired,\n\tonClose: PropTypes.func.isRequired,\n\tonSelect: PropTypes.func.isRequired,\n};\n\nexport default WidgetPicker;\n","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Dazzle, { addWidget } from \"react-dazzle\";\nimport { Grid, Button } from \"react-bootstrap\";\nimport WidgetWrapper from \"./widgetWrapper\";\nimport WidgetPicker from \"./widgetPicker\";\n\nexport const defaultLayout = {\n rows: [\n {\n columns: [\n {\n className: \"col-sm-4\",\n widgets: []\n },\n {\n className: \"col-sm-4\",\n widgets: []\n },\n {\n className: \"col-sm-4\",\n widgets: []\n }\n ]\n }\n ]\n};\n\nexport default class Dashboard extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n editable: props.saveDashboard != null,\n editMode: props.isNew,\n layout: props.layout,\n title: props.title,\n widgetPicker: false,\n newWidgetOptions: {}\n };\n\n this.onAdd = this.onAdd.bind(this);\n this.updateLayout = this.updateLayout.bind(this);\n this.updateTitle = this.updateTitle.bind(this);\n this.reset = this.reset.bind(this);\n this.saveDashboard = this.saveDashboard.bind(this);\n this.toggleEdit = this.toggleEdit.bind(this);\n this.togglePicker = this.togglePicker.bind(this);\n this.selectWidget = this.selectWidget.bind(this);\n }\n\n static propTypes = {\n widgets: PropTypes.object.isRequired,\n title: PropTypes.string,\n saveDashboard: PropTypes.func,\n layout: PropTypes.object,\n isNew: PropTypes.bool,\n errorToggle: PropTypes.func\n };\n\n static defaultProps = {\n title: \"\",\n layout: defaultLayout,\n isNew: false\n };\n\n onAdd(layout, rowIndex, columnIndex) {\n this.setState({\n widgetPicker: true,\n newWidgetOptions: {\n row: rowIndex,\n col: columnIndex\n }\n });\n }\n\n updateLayout(layout) {\n this.setState({\n layout: layout\n });\n }\n\n updateTitle(title) {\n this.setState({\n title: title.target.value\n });\n }\n\n toggleEdit() {\n this.setState({\n editMode: !this.state.editMode\n });\n }\n\n saveDashboard() {\n // Handle upstream save\n if (!this.state.title) {\n this.props.errorToggle(\"Please enter a dashboard title\");\n return;\n }\n\n this.props.saveDashboard(this.state.title, this.state.layout);\n this.toggleEdit();\n }\n\n reset() {\n this.setState({\n layout: this.props.layout,\n title: this.props.title,\n editMode: false,\n widgetPicker: false,\n newWidgetOptions: {}\n });\n }\n\n togglePicker() {\n this.setState({\n widgetPicker: !this.state.widgetPicker\n });\n }\n\n selectWidget(widget) {\n let { row, col } = this.state.newWidgetOptions;\n this.updateLayout(addWidget(this.state.layout, row, col, widget));\n this.togglePicker();\n }\n\n render() {\n return (\n
\n \n \n \n \n \n
\n );\n }\n}\n\nconst TitleBar = ({\n title,\n editMode,\n onEdit,\n onSave,\n onCancel,\n handleTitleChange,\n isNew,\n editable\n}) => {\n if (!editable) {\n return null;\n }\n return (\n
\n {editMode && (\n
\n \n \n \n Cancel\n \n \n )}\n {!editMode && (\n
\n \n
\n )}\n
\n );\n};\nTitleBar.propTypes = {\n title: PropTypes.string.isRequired,\n editMode: PropTypes.bool.isRequired,\n onEdit: PropTypes.func.isRequired,\n onSave: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n handleTitleChange: PropTypes.func.isRequired,\n editable: PropTypes.bool.isRequired\n};\n","import React, { PureComponent } from \"react\";\nimport { Panel } from \"react-bootstrap\";\nimport $ from \"jquery\";\n\nclass Status extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n statusData: {},\n error: null\n };\n\n this.updateData = this.updateData.bind(this);\n this.fetchError = this.fetchError.bind(this);\n }\n\n componentDidMount() {\n /*\n\t\t * Expected structure:\n\t\t * [\n\t\t *\t\t{ name: \"SERVICE\", status: \"STATUS\" },\n\t\t *\t\t...\n\t\t * ]\n\t\t *\n\t\t * Service: name of service\n\t\t * Status: [ \"ok\", \"error\", \"warn\", \"unknown\" ]\n\t\t */\n $.ajax({\n type: \"get\",\n url: \"scot/api/v2/status\",\n success: this.updateData,\n error: this.fetchError\n });\n this._isMounted = true;\n }\n\n componentWillUnmount() {\n this._isMounted = false;\n }\n\n updateData(response) {\n if (this._isMounted) {\n this.setState({\n statusData: response\n });\n }\n }\n\n fetchError(error) {\n if (this._isMounted) {\n this.setState({\n error: error\n });\n }\n }\n\n render() {\n let { className = \"\" } = this.props;\n let services = [];\n if (Array.isArray(this.state.statusData)) {\n for (let service of this.state.statusData) {\n let { name, status } = service;\n if (!status) {\n status = \"unknown\";\n }\n\n services.push();\n }\n }\n\n let classes = [\"Status\", className];\n if (services.length > 4) {\n classes.push(\"cols-2\");\n }\n\n return (\n
\n {this.state.error && (\n \n {this.state.error}\n \n )}\n {services}\n
\n );\n }\n}\n\nconst Service = ({ name, status }) => (\n
\n {name}\n
\n);\n\nexport default Status;\n","import React from 'react';\nconst Emoji = props => (\n \n {props.symbol}\n
\n);\nexport default Emoji;","import React, { PureComponent } from \"react\";\nimport { Well, Panel, Badge } from \"react-bootstrap\";\nimport Emoji from './emoji'\nimport $ from \"jquery\";\nconst titleCase = str => str.charAt(0).toUpperCase() + str.slice(1);\nconst CATEGORY_INTERVAL = 5000;\n\nclass Gamification extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n gameData: [],\n gameCategories: [],\n categoryIndex: 0,\n error: null\n };\n }\n\n componentDidMount() {\n this._isMounted = true;\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/game\",\n success: this.updateData,\n error: this.fetchError\n });\n this.categoryInterval = setInterval(this.updateCategory, CATEGORY_INTERVAL);\n }\n\n componentWillUnmount() {\n this._isMounted = false;\n if (this.categoryInterval) {\n clearInterval(this.categoryInterval);\n }\n this._isMounted = false;\n }\n\n updateCategory = () => {\n let nextIndex =\n (this.state.categoryIndex + 1) % this.state.gameCategories.length;\n if (this._isMounted) {\n this.setState({\n categoryIndex: nextIndex\n });\n }\n }\n\n updateData = (data) => {\n let categories = [];\n for (let category in data) {\n if (category !== null) {\n console.log(`${titleCase(category)}`);\n categories.push();\n }\n }\n if (this._isMounted) {\n this.setState({ gameData: data, gameCategories: categories });\n }\n }\n\n fetchError = (error) => {\n if (this._isMounted) {\n this.setState({ error: error });\n }\n }\n\n render() {\n return (\n \n

Leaders

\n {this.state.error && (\n \n {this.state.error}\n \n )}\n {this.state.gameCategories[this.state.categoryIndex]}\n
\n );\n }\n}\n\nconst Category = ({ category, data }) => (\n \n {`${titleCase(category)} - ${data[0].tooltip}`}\n \n
\n {data[0].username !== \"\" && data[0].username !== null && data[0].count != null && data[0].count !== \"\" ?\n
\n {data[0].username} {data[0].count}\n
: null\n }\n {data[1].username !== \"\" && data[1].username != null && data[1].count != null && data[1].count !== \"\" ?\n
\n {data[1].username} {data[1].count}\n
: null\n }\n {data[2].username !== \"\" && data[2].username != null && data[2].count != null && data[2].count !== \"\" ?\n
\n {data[2].username} {data[2].count}\n
: null\n }\n
\n
\n \n);\n\nexport default Gamification;\n","export const setLocalStorage = ( name, value ) => {\n localStorage.setItem( name, value );\n};\n\nexport const removeLocalStorage = ( name ) =>{\n localStorage.removeItem( name );\n};\n\nexport const getLocalStorage = ( name ) => {\n return localStorage[ name ];\n};\n\nexport const setSessionStorage = ( name, value ) => {\n localStorage.setItem( name, value );\n};\n\nexport const removeSessionStorage = ( name ) => {\n localStorage.removeItem( name );\n};\n\nexport const getSessionStorage = ( name ) => {\n return localStorage[ name ];\n};","import Moment from 'moment';\nimport { extendMoment } from 'moment-range';\nconst moment = extendMoment( Moment );\n\nconst DAY = 24 * 60 * 60 * 1000;\n\n/**\n * Calculate if a timestamp is older than a number of seconds\n *\n * timestamp: Date() object to test against\n * secondsAgo: Number of seconds to test against\n */\nexport const timeOlderThan = ( timestamp, secondsAgo ) => {\n if ( !timestamp ) {\n return true;\n }\n\n return Date.now() - timestamp > ( secondsAgo * 1000 );\n};\n\n/**\n * Calculate if a timestamp is in the past and therefore data is expired\n *\n * expires: time data expires\n */\nexport const isExpired = ( expires ) => {\n return !expires || Date.now() >= expires;\n};\n\n/**\n * Return an Epoch Range from beginning of yesterday till end of tomorrow\n */\nexport const todayRange = () => {\n\treturn {\n\t\tstart: Math.floor( (new Date(Date.now() - DAY)).setHours(0, 0, 0, 0) / 1000 ),\n\t\tend: Math.floor( (new Date(Date.now() + DAY)).setHours(23, 59, 59, 999) / 1000 ),\n\t}\n}\n\n/**\n * Return an Epoch Range for the last week\n */\nexport const lastWeekRange = () => {\n\treturn {\n\t\tstart: Math.floor( (new Date(Date.now() - DAY * 7)).setHours(0, 0, 0, 0) / 1000 ),\n\t\tend: Math.floor( (new Date(Date.now() + DAY)).setHours(23, 59, 59, 999) / 1000 ),\n\t}\n}\n\n/**\n * Convert an epoch to seconds ago\n *\n * epoch: epoch to convert\n */\nexport const epochToTimeago = ( epoch ) => {\n\treturn ( Date.now() - epoch * 1000 ) / 1000;\n}\n\n/**\n * Convert seconds ago to epoch\n *\n * timeago: seconds ago to convert\n */\nexport const timeagoToEpoch = ( timeago ) => {\n\treturn ( Date.now() - timeago * 1000 ) / 1000;\n}\n\n/**\n * Epoch Range to filter array\n *\n * range: epoch range\n */\nexport const epochRangeToFilter = ( range ) => {\n\treturn [\n\t\trange.start,\n\t\trange.end,\n\t];\n}\n\n/**\n * Conversion Functions for DateRangeFilter\n *\n * epochRangeToString: stringify an epoch range\n * epochRangeToMoment: convert epoch range into MomentRange object\n * momentRangeToEpoch: convert MomentRange object to epoch range\n *\n * epoch range: { start: _epoch_, end: _epoch_ }\n */\nexport const epochRangeToString = range => {\n return range.start +', '+ range.end;\n};\n\nexport const epochRangeToMoment = range => {\n return moment.range( range.start * 1000, range.end * 1000 );\n};\n\nexport const momentRangeToEpoch = range => {\n return {\n start: Math.round( range.start ) / 1000,\n end: Math.round( range.end ) / 1000,\n };\n};\n","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport $ from \"jquery\";\nimport * as SessionStorage from \"../../utils/session_storage\";\nimport { Well, Label, Badge } from \"react-bootstrap\";\nimport timeSince from \"../../utils/timesince\";\nimport {\n timeOlderThan,\n epochToTimeago,\n timeagoToEpoch\n} from \"../../utils/time\";\n\nconst REFRESH_RATE = 30 * 1000; // 30 seconds\n\n// Bootstrap styles for different notification types\nconst NOTIFICATION_LEVEL = {\n wall: \"warning\",\n create: \"info\",\n delete: \"danger\"\n};\n\n// Types of notifications we're interested in\n// (used to hide normal notifications of these types)\nexport const NOTIFICATION_TYPES = [\"create\", \"delete\"];\n\n// Time notifications will stay in activity bar\nconst NOTIFICATION_TIME = {\n create: 120,\n delete: 60,\n wall: 60 * 60 // 1 hour\n};\nconst ACTIVITY_TYPE = {\n USER: 0,\n NOTIFICATION: 1\n};\n\n// localstorage key for persisting wall messages\nconst WALL_KEY = \"walls\";\n\nclass Activity extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n users: [],\n notifications: this.loadWall()\n };\n\n this.updateActivity = this.updateActivity.bind(this);\n this.updateUsers = this.updateUsers.bind(this);\n this.wallMessage = this.wallMessage.bind(this);\n this.notification = this.notification.bind(this);\n this.fetchError = this.fetchError.bind(this);\n }\n\n static propTypes = {};\n\n componentDidMount() {\n this.refreshTimer = setInterval(this.updateActivity, REFRESH_RATE);\n this.updateActivity();\n this.props.createCallback(\"wall\", this.wallMessage);\n }\n\n componentWillUnmount() {\n if (this.refreshTimer) {\n clearInterval(this.refreshTimer);\n }\n }\n\n updateActivity() {\n this.updateUsers();\n\n // Clean out notifications\n let pruned = this.state.notifications.filter(notification => {\n return !timeOlderThan(\n notification.time * 1000,\n NOTIFICATION_TIME[notification.action]\n );\n });\n\n this.setState(\n {\n notifications: pruned\n },\n this.persistWall\n );\n }\n\n updateUsers() {\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/who\",\n success: data => {\n this.setState({\n users: data.records.map(user => {\n return {\n type: ACTIVITY_TYPE.USER,\n who: user.username,\n time: timeagoToEpoch(user.last_activity)\n };\n })\n });\n },\n error: this.fetchError\n });\n }\n\n persistWall() {\n let walls = this.state.notifications.filter(notification => {\n return notification.action === \"wall\";\n });\n\n SessionStorage.setLocalStorage(WALL_KEY, JSON.stringify(walls));\n }\n\n loadWall() {\n let json = SessionStorage.getLocalStorage(WALL_KEY);\n if (json) {\n return JSON.parse(json);\n }\n return [];\n }\n\n wallMessage(message) {\n let notifications = this.state.notifications;\n notifications.push({\n type: ACTIVITY_TYPE.NOTIFICATION,\n time: message.activemqwhen,\n who: message.activemqwho,\n message: message.activemqmessage,\n level: NOTIFICATION_LEVEL.wall,\n action: \"wall\"\n });\n\n this.setState(\n {\n notifications: notifications\n },\n this.persistWall\n );\n }\n\n notification(message) {\n const ignoredUsers = [\"scot-flair\", \"scot-alerts\", \"scot-admin\", \"\", \"api\"];\n const interestedEvents = [\"create\", \"delete\"];\n\n // Ignore some notifications\n if (ignoredUsers.includes(message.activemqwho)) return;\n if (message.activemqwall === true) return;\n if (message.activemqtype === \"entity\") return;\n if (!interestedEvents.includes(message.activemqstate)) return;\n\n let notifications = this.state.notifications;\n notifications.push({\n type: ACTIVITY_TYPE.NOTIFICATION,\n time: Date.now() / 1000,\n who: message.activemqwho,\n message: message.activemqmessage + message.activemqid,\n level: NOTIFICATION_LEVEL[message.activemqstate],\n action: message.activemqstate\n });\n\n this.setState({\n notifications: notifications\n });\n }\n\n addDebugItems(count = 10) {\n let notifications = this.state.notifications;\n\n for (let i = 0; i < count; i++) {\n notifications.push({\n type: ACTIVITY_TYPE.NOTIFICATION,\n time: Date.now() / 1000,\n who: \"fred\",\n message: \"blah\",\n level: NOTIFICATION_LEVEL.create,\n action: \"create\"\n });\n }\n\n this.setState({\n notifications: notifications\n });\n }\n\n fetchError(error) { }\n\n buildActivityItem(item, i) {\n let badge = timeSince(epochToTimeago(item.time));\n let text = \"\";\n switch (item.type) {\n default:\n case ACTIVITY_TYPE.USER:\n text = item.who;\n break;\n case ACTIVITY_TYPE.NOTIFICATION:\n text = `${item.who}: ${item.message}`;\n break;\n }\n\n return (\n \n {text}\n \n );\n }\n\n render() {\n let { className = \"\" } = this.props;\n let classes = [\"Activity\", className];\n\n // Build activity items\n let items = this.state.users\n .concat(this.state.notifications)\n .sort((a, b) => {\n return b.time - a.time;\n })\n .map(this.buildActivityItem);\n\n // Calculate whether the marquee should scroll\n let stopped = true;\n if (this.marquee && this.well) {\n let marqueeValues = window.getComputedStyle(this.marquee);\n if (\n parseInt(marqueeValues.width, 10) -\n parseInt(marqueeValues.paddingLeft, 10) >\n this.well.offsetWidth\n ) {\n stopped = false;\n }\n }\n\n return (\n (this.well = ReactDOM.findDOMNode(well))}\n >\n (this.marquee = marquee)}\n >\n {items}\n \n \n );\n }\n}\n\nconst ActivityItem = ({ children, badge = null, style = \"default\" }) => (\n
\n \n
\n);\n\nexport default Activity;\n","//Calculates and displays time since a given time in seconds\n\nexport default function timeSince(seconds) {\n /*function timeSince(date) {\n var seconds = Math.floor((new Date() - date) / 1000);*/\n\n var interval = Math.floor(seconds / 31536000);\n\n if (interval > 1) {\n return interval + \" years\";\n }\n interval = Math.floor(seconds / 2592000);\n if (interval > 1) {\n return interval + \" months\";\n }\n interval = Math.floor(seconds / 86400);\n if (interval > 1) {\n return interval + \" days\";\n }\n interval = Math.floor(seconds / 3600);\n if (interval > 1) {\n return interval + \" hours\";\n }\n interval = Math.floor(seconds / 60);\n if (interval > 1) {\n return interval + \" minutes\";\n }\n return Math.floor(seconds) + \" seconds\";\n}\n","import React, { PureComponent } from 'react';\nimport { Button } from 'react-bootstrap';\nimport * as d3 from 'd3'\nimport $ from 'jquery'\nimport axios from 'axios'\n\n\n\nclass ReportHeatmap extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n collection: 'event',\n type: 'created',\n year: '2017',\n data: []\n }\n }\n\n getData = () => {\n var url = '/scot/api/v2/graph/dhheatmap?collection=' + this.state.collection + '&type=' + this.state.type + '&year=' + this.state.year\n\n axios.get(url).then(res => {\n this.setState({ data: res.data })\n });\n }\n\n componentDidMount() {\n this.getData();\n this.loadHeatMap();\n }\n\n componentDidUpdate() {\n this.loadHeatMap();\n }\n\n loadHeatMap = () => {\n // Don't load if dashboard in edit mode\n if (this.props.editMode) {\n return;\n }\n\n let margin = {\n top: 30,\n bottom: 30,\n left: 30,\n right: 0,\n },\n width = 1000 - (margin.left - margin.right),\n height = 300 - (margin.top - margin.bottom),\n gridSize = Math.floor(width / 24),\n legendElementWidth = gridSize * 1.5,\n buckets = 9,\n colors = ['#ffffd9', '#edf8b1', '#c7e9b4', '#7fcdbb', '#41b6c4', '#1d91c0', '#225ea8', '#253494', '#081d58'],\n days = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],\n times = ['1a', '2a', '3a', '4a', '5a', '6a', '7a', '8a', '9a', '10a', '11a', '12a', '1p', '2p', '3p', '4p', '5p', '6p', '7p', '8p', '9p', '10p', '11p', '12p'];\n\n let container = d3.select('#report_heatmap');\n let graph = container.select('g');\n if (graph.empty()) {\n graph = container.append('g')\n .attr('transform', 'translate( ' + margin.left + ', ' + margin.top + ' )');\n }\n\n // Day Labels\n graph.selectAll('.dayLabel')\n .data(days)\n .enter().append('text')\n .text((d) => d)\n .attr('x', 0)\n .attr('y', (d, i) => { return i * gridSize; })\n .style('text-anchor', 'end')\n .attr('transform', 'translate( -6, ' + gridSize / 1.5 + ' )')\n .attr('class', (d, i) => {\n return (i >= 0 && i <= 4) ? 'dayLabel axis axis-worktime' : 'dayLabel axis';\n });\n\n // Time Labels\n graph.selectAll('.timeLabel')\n .data(times)\n .enter().append('text')\n .text((d) => d)\n .attr('x', (d, i) => { return i * gridSize; })\n .attr('y', 0)\n .style('text-anchor', 'middle')\n .attr('transform', 'translate( ' + gridSize / 2 + ', -6 )')\n .attr('class', (d, i) => {\n return (i >= 7 && i <= 16) ? 'timeLabel axis axis-worktime' : 'timeLabel axis';\n });\n\n\n\n\n container.selectAll('.legend').remove();\n container.selectAll('.legend-text').remove();\n\n let colorScale = d3.scaleQuantile()\n .domain([0, buckets - 1, d3.max(this.state.data, (d) => { return d.value })])\n .range(colors);\n\n // Cards\n let cards = graph.selectAll('.hour')\n .data(this.state.data, (d) => { return d.day + ':' + d.hour; });\n cards.append('title');\n cards.enter().append('rect')\n .style('fill', colors[0])\n .merge(cards)\n .attr('x', (d) => (d.hour - 1) * gridSize)\n .attr('y', (d) => (d.day - 1) * gridSize)\n .attr('rx', 4)\n .attr('ry', 4)\n .attr('class', 'hour')\n .attr('width', gridSize)\n .attr('height', gridSize)\n .transition().duration(1000)\n .style('fill', (d) => { return colorScale(d.value); });\n cards.select('title').text((d) => d.value);\n cards.exit().remove();\n\n // Legend\n var legend = graph.selectAll('.legend')\n .data([0].concat(colorScale.quantiles()), (d) => d);\n\n legend.enter()\n .append('rect')\n .attr('class', 'legend')\n .attr('x', (d, i) => (legendElementWidth * i))\n .attr('y', height)\n .attr('width', legendElementWidth)\n .attr('height', gridSize / 2)\n .style('fill', (d, i) => colors[i])\n\n legend.enter().append('text')\n .text((d) => ('≥ ' + Math.round(d)))\n .attr('class', 'legend-text')\n .attr('x', (d, i) => legendElementWidth * i)\n .attr('y', height + gridSize);\n }\n\n\n collectionChange = (event) => {\n this.setState({ collection: event.target.value });\n }\n\n yearChange = (event) => {\n this.setState({ year: event.target.value });\n }\n\n exportToPNG = () => {\n var svgString = new XMLSerializer().serializeToString(document.querySelector('#report_heatmap'));\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n var DOMURL = window.self.URL || window.self.webkitURL || window.self;\n var img = new Image();\n var svg = new Blob([svgString], { type: \"image/svg+xml;charset=utf-8\" });\n var url = DOMURL.createObjectURL(svg);\n img.onload = function () {\n ctx.drawImage(img, 0, 0);\n var png = canvas.toDataURL(\"image/png\");\n document.querySelector('#png-container').innerHTML = '';\n DOMURL.revokeObjectURL(png);\n var a = $(\"\")\n .attr(\"href\", png)\n .attr(\"download\", \"img.png\")\n .appendTo(\"body\");\n\n a[0].click();\n\n a.remove();\n };\n img.src = url;\n }\n\n render() {\n let formDisabled = this.props.editMode;\n\n return (\n
\n {!this.props.editMode &&\n

Day of Week, Hour of Day Heatmap

\n }\n \n \n \n
\n \n
\n \n
\n\n )\n }\n}\n\nexport default ReportHeatmap;\nexport const Description = \"Heatmap of incoming alerts, event, and incidents\";\n","export default function debounce( callback, wait = 200, immediate = false ) {\n let timeout;\n\n return function( ...args ) {\n clearTimeout( timeout );\n\n timeout = setTimeout( () => {\n timeout = null;\n if ( !immediate ) callback.apply( this, args );\n }, wait );\n\n if ( immediate && !timeout ) callback.apply( this, [...args] );\n };\n}\n","import React, { PureComponent } from \"react\";\nimport { Button } from \"react-bootstrap\";\nimport * as d3 from \"d3\";\nimport debounce from \"../../utils/debounce\";\nimport $ from \"jquery\";\nimport axios from 'axios'\n\nconst formatTickTime = (domain, count = 10) => {\n let start = domain[0],\n end = domain[domain.length - 1],\n step = d3.tickStep(start, end, count);\n\n return d => {\n const daySeconds = 3600 * 24;\n let days = Math.floor(d / daySeconds),\n hours = Math.floor((d % daySeconds) / 3600),\n minutes = Math.floor((d % 3600) / 60),\n seconds = Math.floor(d % 60);\n\n if (days) {\n if (step < daySeconds) {\n return `${days}d ${hours}h`;\n }\n return days + \"d\";\n }\n if (hours) {\n if (step < 3600) {\n return `${hours}h ${minutes}m`;\n }\n return hours + \"h\";\n }\n if (minutes) {\n if (step < 60) {\n return `${minutes}m ${seconds}s`;\n }\n return minutes + \"m\";\n }\n return seconds + \"s\";\n };\n};\n\nconst formatTime = d => {\n const daySeconds = 3600 * 24;\n let days = Math.floor(d / daySeconds),\n hours = Math.floor((d % daySeconds) / 3600),\n minutes = Math.floor((d % 3600) / 60),\n seconds = Math.floor(d % 60);\n\n let output = seconds + \"s\";\n if (minutes) {\n output = minutes + \"m \" + output;\n }\n if (hours) {\n output = hours + \"h \" + output;\n }\n if (days) {\n output = days + \"d \" + output;\n }\n return output;\n};\n\nlet margin = { top: 20, right: 20, bottom: 60, left: 50 },\n width = 1000 - margin.left - margin.right,\n height = 500 - margin.top - margin.bottom,\n barColors = {\n All: \"#3b35a6\",\n Promoted: \"#eebd31\",\n Incident: \"#e63041\"\n };\n\nclass ReportArt extends PureComponent {\n constructor(props) {\n super(props);\n\n let today = new Date().toISOString().slice(0, 10);\n this.state = {\n length: 7,\n date: today,\n unit: \"day\",\n chartData: {\n dates: [],\n lines: []\n }\n };\n\n // Load Art is auto debounced\n this.loadArt = debounce(this.loadArt);\n }\n\n componentDidMount() {\n this.initChart();\n this.loadArt();\n }\n\n componentDidUpdate() { }\n\n initChart = () => {\n this.svg = d3\n .select(\"#report_art\")\n .append(\"g\")\n .attr(\"transform\", \"translate( \" + margin.left + \",\" + margin.top + \" )\");\n\n this.xAxisEl = this.svg\n .append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", `translate( 0, ${height} )`);\n\n this.yAxisEl = this.svg.append(\"g\").attr(\"class\", \"y axis\");\n\n this.yAxisEl\n .append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"x\", 0 - height / 2)\n .attr(\"y\", 0)\n .attr(\"dy\", \"1em\")\n .style(\"text-anchor\", \"start\")\n .style(\"fill\", \"black\")\n .text(\"Response Time\");\n\n this.chartInit = true;\n }\n\n updateChart = () => {\n // Bar names\n let barNames = new Set();\n this.state.chartData.dates.forEach(d => {\n d.values.forEach(b => {\n barNames.add(b.name);\n });\n });\n\n // Line names\n let lineNames = new Set();\n this.state.chartData.lines.forEach(d => {\n lineNames.add(d.name);\n });\n\n // Scales\n let maxValue = d3.max(this.state.chartData.dates, d => {\n return d3.max(d.values, b => b.value);\n });\n\n let dateScale = d3\n .scaleBand()\n .padding(0.1)\n .rangeRound([0, width])\n .domain(this.state.chartData.dates.map(d => d.date));\n let barScale = d3\n .scaleBand()\n .domain(Array.from(barNames))\n .rangeRound([0, dateScale.bandwidth()]);\n let yScale = d3\n .scaleLinear()\n .clamp(true)\n .range([height, 0])\n .domain([0, maxValue])\n .nice();\n\n // Axes\n var xAxis = d3.axisBottom().scale(dateScale);\n\n var yAxis = d3\n .axisLeft()\n .scale(yScale)\n .ticks(20)\n .tickFormat(formatTickTime(yScale.domain(), 20));\n\n this.xAxisEl.transition().call(xAxis);\n this.yAxisEl.transition().call(yAxis);\n\n // Bars\n let dates = this.svg\n .selectAll(\".date\")\n .data(this.state.chartData.dates, d => d.date);\n\n dates\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .attr(\"height\", 0)\n .attr(\"y\", height)\n .remove();\n\n let bars = dates\n .enter()\n .append(\"g\")\n .attr(\"class\", \"date\")\n .attr(\"transform\", d => `translate( ${dateScale(d.date)}, 0 )`)\n .selectAll(\".bar\")\n .data(d => d.values)\n .enter()\n .append(\"rect\")\n .attr(\"class\", \"bar\")\n .style(\"fill\", d => barColors[d.name])\n .attr(\"width\", barScale.bandwidth())\n .attr(\"x\", d => barScale(d.name))\n .attr(\"y\", height)\n .attr(\"height\", 0);\n\n bars.append(\"title\").text(d => formatTime(d.value));\n\n dates\n .transition()\n .attr(\"transform\", d => `translate( ${dateScale(d.date)}, 0 )`);\n\n this.svg\n .selectAll(\".date\")\n .selectAll(\".bar\")\n .transition()\n .attr(\"width\", barScale.bandwidth())\n .attr(\"x\", d => barScale(d.name))\n .attr(\"y\", d => yScale(d.value))\n .attr(\"height\", d => height - yScale(d.value));\n\n // Avg Box\n this.svg.select(\".avg-holder\").remove();\n this.svg.select(\".avg-holder-border\").remove();\n let AvgHolder = this.svg.append(\"g\").attr(\"class\", \"avg-holder\");\n\n let averages = AvgHolder.selectAll(\".avg\")\n .data(this.state.chartData.lines)\n .enter()\n .append(\"text\")\n .attr(\"class\", \"avg\")\n .attr(\"transform\", (d, i) => `translate( 0, ${i * 15} )`);\n\n averages\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"font-weight\", \"bold\")\n .text(d => `${d.name}:`);\n\n averages\n .append(\"tspan\")\n .attr(\"x\", 100)\n .text(d => formatTime(d.value));\n\n let AvgHolderBox = AvgHolder.node().getBBox();\n AvgHolder.attr(\n \"transform\",\n `translate( ${width - AvgHolderBox.width}, 0 )`\n );\n\n const borderOffset = 2;\n let border = this.svg\n .append(\"rect\")\n .attr(\"fill\", \"none\")\n .attr(\"stroke\", \"black\")\n .attr(\"class\", \"avg-holder-border\")\n .attr(\"x\", AvgHolderBox.x - borderOffset)\n .attr(\"y\", AvgHolderBox.y - borderOffset)\n .attr(\"width\", AvgHolderBox.width + borderOffset * 2)\n .attr(\"height\", AvgHolderBox.height + borderOffset * 2);\n border\n .node()\n .transform.baseVal.initialize(\n AvgHolder.node().transform.baseVal.getItem(0)\n );\n\n // Legend\n const legendHeight = 20,\n legendSpacing = 15,\n legendTextSpacing = 5;\n this.svg.select(\".legend-holder\").remove();\n let LegendHolder = this.svg.append(\"g\").attr(\"class\", \"legend-holder\");\n let legend = LegendHolder.selectAll(\".legend\")\n .data(Array.from(barNames))\n .enter()\n .append(\"g\")\n .attr(\"class\", \"legend\");\n\n // Legend Boxes\n legend\n .append(\"rect\")\n .attr(\"width\", legendHeight)\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"height\", legendHeight)\n .style(\"fill\", d => barColors[d]);\n\n // Legend Text\n legend\n .append(\"text\")\n .attr(\"x\", legendHeight + legendTextSpacing)\n .attr(\"y\", legendHeight / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"start\")\n .text(d => d);\n\n // Legend Position\n let widthSums = 0;\n LegendHolder.selectAll(\".legend\").attr(\"transform\", function (d, i) {\n let value = widthSums;\n widthSums += this.getBBox().width + legendSpacing;\n return `translate( ${value}, 0 )`;\n });\n let legendWidth = LegendHolder.node().getBBox().width;\n LegendHolder.attr(\n \"transform\",\n `translate( ${width / 2 - legendWidth / 2}, ${height +\n margin.bottom / 2} )`\n );\n }\n\n loadArt = () => {\n\n\n if (!this.state.date || !this.state.length || this.props.editMode) {\n return;\n }\n\n let url = \"/scot/api/v2/metric/response_avg_last_x_days\";\n let opts = `?days=${this.state.length}&targetdate=${this.state.date}&unit=${\n this.state.unit\n }`;\n\n axios.get(url + opts).then(res => {\n this.setState({\n chartData: res.data\n });\n });\n }\n\n unitChange = event => {\n this.setState({ unit: event.target.value }, () => this.loadArt());\n }\n\n lengthChange = event => {\n this.setState({ length: event.target.value }, () => this.loadArt());\n }\n\n dateChange = event => {\n this.setState({ date: event.target.value }, () => this.loadArt());\n }\n\n exportToPNG = () => {\n var svgString = new XMLSerializer().serializeToString(\n document.querySelector(\"#report_art\")\n );\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n var DOMURL = window.self.URL || window.self.webkitURL || window.self;\n var img = new Image();\n var svg = new Blob([svgString], { type: \"image/svg+xml;charset=utf-8\" });\n var url = DOMURL.createObjectURL(svg);\n img.onload = function () {\n ctx.drawImage(img, 0, 0);\n var png = canvas.toDataURL(\"image/png\");\n document.querySelector(\"#png-container\").innerHTML =\n '';\n DOMURL.revokeObjectURL(png);\n var a = $(\"
\")\n .attr(\"href\", png)\n .attr(\"download\", \"img.png\")\n .appendTo(\"body\");\n\n a[0].click();\n\n a.remove();\n };\n img.src = url;\n }\n\n render() {\n if (this.chartInit) {\n this.updateChart();\n }\n\n let formDisabled = this.props.editMode;\n\n return (\n
\n {!this.props.editMode &&

Alert Response Time

}\n \n Initial Date = \n \n \n \n Length = \n \n \n \n Unit = \n \n \n \n \n \n \n \n \n Export to PNG\n \n
\n \n
\n \n );\n }\n}\n\nexport default ReportArt;\nexport const Description =\n \"Chart of average alert, event, and incident response time\";\n","import React, { PureComponent } from \"react\";\nimport { Button } from \"react-bootstrap\";\nimport * as d3 from \"d3\";\nimport debounce from \"../../utils/debounce\";\nimport axios from 'axios'\nimport $ from \"jquery\";\nconst wrapText = (text, width) => {\n // FYI: not an arrow function because of 'this' injection\n text.each(function (value, i) {\n if (this.getComputedTextLength() < width) {\n return;\n }\n\n let text = d3.select(this),\n words = text\n .text()\n .split(/\\s+/)\n .reverse(),\n word = null,\n line = [],\n lineCount = 1,\n lineHeight = 0.8, // ems\n x = text.attr(\"x\"),\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")),\n row = text\n .text(null)\n .append(\"tspan\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"dy\", dy + \"em\");\n\n while ((word = words.pop())) {\n line.push(word);\n row.text(line.join(\" \"));\n if (row.node().getComputedTextLength() > width) {\n lineCount++;\n line.pop();\n row.text(line.join(\" \"));\n line = [word];\n row = text\n .append(\"tspan\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"dy\", lineHeight + dy + \"em\")\n .text(word);\n }\n }\n\n let yOffset = (this.getBBox().height / (2 * lineCount)) * (lineCount - 1);\n text.attr(\"transform\", `translate( 0, -${yOffset} )`);\n });\n};\n\nconst margin = {\n top: 5,\n left: 200,\n right: 30,\n bottom: 60\n},\n width = 1000 - margin.left - margin.right,\n legendHeight = 20,\n legendSpacing = 15,\n legendTextSpacing = 5;\n\nclass ReportAlertpower extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n displayMode: \"stacked\",\n chartData: [],\n chartResults: 20,\n chartSort: \"power\",\n chartSortDir: \"desc\",\n chartFilter: \"\"\n };\n\n // LoadData is automatically debounced\n this.loadData = debounce(this.loadData);\n }\n\n componentDidMount() {\n this.initChart();\n this.updateChart();\n this.loadData();\n }\n\n initChart = () => {\n // Height is initially 0, is calculated after we have data\n this.height = 0;\n\n this.xScale = d3.scaleLinear().rangeRound([0, width]);\n this.yScale = d3\n .scaleBand()\n .rangeRound([0, this.height])\n .padding(0.3);\n\n this.colors = d3.scaleOrdinal(d3.schemeCategory10);\n\n this.xAxis = d3.axisBottom().scale(this.xScale);\n\n this.yAxis = d3.axisLeft().scale(this.yScale);\n\n this.svg = d3\n .select(\"#report_alertpower\")\n .attr(\"viewBox\", `0 0 1000 ${this.height + margin.top + margin.bottom}`)\n .append(\"g\")\n .attr(\"transform\", `translate( ${margin.left}, ${margin.top} )`);\n\n this.yAxisEl = this.svg.append(\"g\").attr(\"class\", \"y axis\");\n\n this.xAxisEl = this.svg\n .append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", `translate( 0, ${this.height} )`);\n\n this.xAxisEl\n .append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"x\", width / 2)\n .attr(\"y\", 30)\n .style(\"fill\", \"black\")\n .style(\"font-size\", \"12px\")\n .text(\"Alert Count\");\n\n this.LegendHolder = this.svg.append(\"g\").attr(\"class\", \"legend-holder\");\n\n this.chartInit = true;\n }\n\n updateChart = () => {\n let dataset = this.state.chartData;\n\n // Calculate height\n this.height = 32 * dataset.length;\n d3.select(\"#report_alertpower\")\n .transition()\n .attr(\"viewBox\", `0 0 1000 ${this.height + margin.top + margin.bottom}`);\n\n this.dataTypes = d3\n .keys(dataset[0])\n .filter(\n key => ![\"name\", \"values\", \"total\", \"score\", \"max\"].includes(key)\n );\n\n // Build color domain from keys except name\n this.colors.domain(this.dataTypes);\n\n dataset.forEach(d => {\n // Remove number at the end\n d.name = d.name.replace(/ \\([0-9]+\\)/, \"\");\n\n /* // False Data\n\t\t\tthis.dataTypes.forEach( type => {\n\t\t\t\td[ type ] = Math.round( Math.random() * 5 );\n\t\t\t} );\n\t\t\tif ( !d.score ) {\n\t\t\t\td.score = ( Math.random() * 10 ).toPrecision( 2 );\n\t\t\t}\n\t\t\t/**/\n if (typeof d.score === \"number\") {\n d.score = \"\" + d.score;\n }\n\n // Calculate bar start/end points\n let start = 0;\n d.values = this.dataTypes.map(name => {\n let curStart = start,\n curEnd = start + d[name];\n\n start += d[name];\n return {\n name: name,\n count: d[name],\n start: curStart,\n end: curEnd\n };\n });\n\n d.total = d.values[d.values.length - 1].end;\n d.max = d3.max(this.dataTypes, b => {\n return d[b];\n });\n });\n\n this.stackedMax = d3.max(dataset, d => d.total);\n this.groupedMax = d3.max(dataset, d => {\n return d3.max(this.dataTypes, b => d[b]);\n });\n\n this.yScale.rangeRound([0, this.height]).domain(dataset.map(d => d.name));\n\n /*\n\t\t// Animated, but multiline flashes\n\t\tthis.yAxisEl.transition().call( g => {\n\t\t\tg.call( this.yAxis )\n\t\t\tsetTimeout( () => {\n\t\t\t\tg.selectAll( '.tick text' ).call( wrapText, margin.left - 20 );\n\t\t\t}, 50 )\n\t\t} )\n\t\t/**/\n /**/\n // Not animated\n this.yAxisEl.call(this.yAxis);\n this.svg.selectAll(\".y.axis .tick text\").call(wrapText, margin.left - 20); // Wrap axis labels\n /**/\n\n let alerts = this.svg.selectAll(\".alert\").data(dataset, d => d.name);\n\n alerts\n .exit()\n .transition()\n .attr(\"height\", 0)\n .style(\"opacity\", 0)\n .remove();\n\n alerts\n .enter()\n .append(\"g\")\n .attr(\"class\", \"alert\")\n .attr(\"transform\", d => `translate( 1, ${this.yScale(d.name)} )`)\n .append(\"text\")\n .attr(\"dy\", \"1.2em\");\n\n alerts\n .transition()\n .attr(\"transform\", d => `translate( 1, ${this.yScale(d.name)} )`);\n\n let alertTypes = this.svg\n .selectAll(\".alert\")\n .selectAll(\"rect\")\n .data(d => d.values);\n\n let bars = alertTypes\n .enter()\n .append(\"rect\")\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"width\", 0)\n .attr(\"height\", this.yScale.bandwidth());\n bars.merge(alertTypes).style(\"fill\", d => this.colors(d.name));\n\n bars\n .append(\"title\")\n .merge(alertTypes.select(\"title\"))\n .text(d => `${d.name}: ${d.count}`);\n\n // Legend\n let legend = this.LegendHolder.selectAll(\".legend\").data(this.dataTypes);\n\n legend.exit().remove();\n\n legend = legend\n .enter()\n .append(\"g\")\n .attr(\"class\", \"legend\");\n\n // Legend Boxes\n legend\n .append(\"rect\")\n .attr(\"width\", legendHeight)\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"height\", legendHeight)\n .style(\"fill\", d => this.colors(d));\n\n // Legend Text\n legend\n .append(\"text\")\n .attr(\"x\", legendHeight + legendTextSpacing)\n .attr(\"y\", legendHeight / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"start\")\n .style(\"text-transform\", \"capitalize\")\n .text(d => d);\n\n // Legend Position\n let widthSums = 0;\n this.LegendHolder.selectAll(\".legend\").attr(\"transform\", function (d, i) {\n let value = widthSums;\n widthSums += this.getBBox().width + legendSpacing;\n return `translate( ${value}, 0 )`;\n });\n let legendWidth = this.LegendHolder.node().getBBox().width;\n this.LegendHolder.transition().attr(\n \"transform\",\n `translate( ${width / 2 - legendWidth / 2}, ${this.height +\n margin.bottom -\n legendHeight} )`\n );\n\n if (this.state.displayMode === \"grouped\") {\n this.transitionGrouped();\n } else {\n this.transitionStacked();\n }\n }\n\n transitionStacked = () => {\n this.xScale.domain([0, this.stackedMax]).nice();\n this.xAxisEl\n .transition()\n .call(this.xAxis)\n .attr(\"transform\", `translate( 0, ${this.height} )`);\n\n this.svg\n .selectAll(\".alert rect\")\n .transition()\n .delay((d, i) => i * 5)\n .duration(500)\n .attr(\"width\", d => this.xScale(d.end) - this.xScale(d.start))\n .attr(\"x\", d => this.xScale(d.start))\n .transition()\n .attr(\"height\", this.yScale.bandwidth())\n .attr(\"y\", 0);\n\n this.svg\n .selectAll(\".alert text\")\n .transition()\n .delay((d, i) => i * this.dataTypes.length * 5 + i)\n .duration(500)\n .attr(\"transform\", d => `translate( ${this.xScale(d.total) + 10}, 0 )`)\n .tween(\"text\", function (d) {\n let text = d3.select(this);\n let i = d3.interpolateNumber(text.text(), d.score),\n prec = d.score.split(\".\"),\n round = prec.length > 1 ? Math.pow(10, prec[0].length) : 1;\n\n return t => text.text(Math.round(i(t) * round) / round);\n });\n }\n\n transitionGrouped = () => {\n this.xScale.domain([0, this.groupedMax]).nice();\n this.xAxisEl\n .transition()\n .call(this.xAxis)\n .attr(\"transform\", `translate( 0, ${this.height} )`);\n\n let initialDuration = this.displayModeChanged ? 500 : 0;\n\n this.svg\n .selectAll(\".alert\")\n .selectAll(\"rect\")\n .transition()\n .delay((d, i) => i * 5)\n .duration(initialDuration)\n .attr(\"height\", this.yScale.bandwidth() / this.dataTypes.length)\n .attr(\n \"y\",\n (d, i) => (this.yScale.bandwidth() / this.dataTypes.length) * i\n )\n .transition()\n .duration(500)\n .attr(\"x\", 0)\n .attr(\"width\", d => this.xScale(d.end) - this.xScale(d.start));\n\n this.svg\n .selectAll(\".alert text\")\n .transition()\n .delay((d, i) => i * 5 + initialDuration)\n .attr(\"transform\", d => `translate( ${this.xScale(d.max) + 10}, 0 )`)\n .tween(\"text\", function (d) {\n let text = d3.select(this);\n let i = d3.interpolateNumber(text.text(), d.score),\n prec = d.score.split(\".\"),\n round = prec.length > 1 ? Math.pow(10, prec[0].length) : 1;\n\n return t => text.text(Math.round(i(t) * round) / round);\n });\n\n this.displayModeChanged = false;\n }\n\n loadData = () => {\n if (!this.state.chartResults || this.props.editMode) {\n return;\n }\n\n let url = \"/scot/api/v2/metric/alert_power\";\n let opts = `?sort=${this.state.chartSort}&dir=${\n this.state.chartSortDir\n }&count=${this.state.chartResults}&filter=${encodeURIComponent(\n this.state.chartFilter\n )}`;\n\n axios.get(url + opts).then(res => {\n this.setState({\n chartData: res.data\n });\n });\n }\n\n\n\n dataChange = (event) => {\n let target = event.target;\n\n if (target.name === \"chartResults\" && target.value) {\n if (target.value > 50) target.value = 50;\n if (target.value < 1) target.value = 1;\n }\n\n this.setState(\n {\n [target.name]: target.value\n },\n this.loadData\n );\n }\n\n displayModeChang = (event) => {\n this.displayModeChanged = true;\n this.setState({\n displayMode: event.target.value\n });\n }\n\n preventSubmit = (event) => {\n event.preventDefault();\n event.stopPropagation();\n }\n\n exportToPNG = () => {\n var svgString = new XMLSerializer().serializeToString(\n document.querySelector(\"#report_alertpower\")\n );\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n var DOMURL = window.self.URL || window.self.webkitURL || window.self;\n var img = new Image();\n var svg = new Blob([svgString], { type: \"image/svg+xml;charset=utf-8\" });\n var url = DOMURL.createObjectURL(svg);\n img.onload = function () {\n ctx.drawImage(img, 0, 0);\n var png = canvas.toDataURL(\"image/png\");\n document.querySelector(\n \"#png-container\"\n ).innerHTML = ``;\n DOMURL.revokeObjectURL(png);\n var a = $(\"
\")\n .attr(\"href\", png)\n .attr(\"download\", \"img.png\")\n .appendTo(\"body\");\n\n a[0].click();\n\n a.remove();\n };\n img.src = url;\n }\n\n render() {\n if (this.chartInit) {\n this.updateChart();\n }\n\n let formDisabled = this.props.editMode;\n\n return (\n
\n {!this.props.editMode &&

Alert Power

}\n
\n \n
\n
\n \n \n
\n
\n \n  \n \n \n Export to PNG\n \n \n
\n \n
\n \n );\n }\n}\n\nexport default ReportAlertpower;\nexport const Description =\n \"Chart of alerts in terms of how frequently they're promoted or become incidents\";\n","import React, { Component } from \"react\";\nimport { Button } from \"react-bootstrap\";\nimport * as d3 from \"d3\";\nimport debounce from \"../../utils/debounce\";\nimport $ from \"jquery\";\nimport axios from 'axios'\n\nconst margin = {\n top: 5,\n left: 40,\n right: 20,\n bottom: 60\n},\n width = 1000 - margin.left - margin.right,\n height = 600 - margin.top - margin.bottom,\n timeWindow = 7 * 24 * 3600 * 1000,\n legendHeight = 20,\n legendSpacing = 15,\n legendTextSpacing = 5;\n\nclass ReportCreated extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n chartData: []\n };\n\n // LoadData is automatically debounced\n this.loadData = debounce(this.loadData);\n\n // this.dataChange = this.dataChange.bind( this );\n // this.displayModeChange = this.displayModeChange.bind( this );\n }\n\n initChart = () => {\n let now = new Date();\n\n this.xScale = d3\n .scaleTime()\n .rangeRound([0, width])\n .domain([now - timeWindow, now]);\n this.yScale = d3\n .scaleLinear()\n .rangeRound([height, 0])\n .domain([0, 0]);\n\n this.xAxis = d3.axisBottom().scale(this.xScale);\n\n this.yAxis = d3.axisLeft().scale(this.yScale);\n\n this.svg = d3\n .select(\"#report_created\")\n .attr(\"viewBox\", `0 0 1000 ${height + margin.top + margin.bottom}`)\n .append(\"g\")\n .attr(\"transform\", `translate( ${margin.left}, ${margin.top} )`);\n\n this.yAxisEl = this.svg.append(\"g\").attr(\"class\", \"y axis\");\n\n this.yAxisEl.call(this.yAxis);\n\n this.xAxisEl = this.svg\n .append(\"g\")\n .attr(\"class\", \"x axis\")\n .attr(\"transform\", `translate( 0, ${height} )`);\n\n this.xAxisEl\n .append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"x\", width / 2)\n .attr(\"y\", margin.bottom - 10)\n .style(\"font-size\", \"10px\")\n .style(\"fill\", \"black\")\n .text(\"Toggle Trendlines\");\n\n this.xAxisEl.call(this.xAxis);\n\n this.statusLine = d3\n .line()\n .curve(d3.curveBasis)\n .x(d => this.xScale(new Date(d.time * 1000)))\n .y(d => this.yScale(d.value));\n\n this.lineHolder = this.svg\n .append(\"g\")\n .attr(\"class\", \"lines\")\n .attr(\"clip-path\", \"url(#bounds)\");\n\n // Legend\n this.LegendHolder = this.svg\n .append(\"g\")\n .attr(\"class\", \"legend-holder\")\n .style(\"font-family\", \"sans-serif\");\n\n this.chartInit = true;\n }\n\n updateChart = () => {\n this.yScale\n .domain([\n 0,\n Math.max(\n d3.max(this.state.chartData, d => {\n if (!d.shown || !d.data.length) return 0;\n\n return d3.max(d.data, b => b.value);\n }),\n 10\n )\n ])\n .nice();\n\n this.colors = d3.scaleOrdinal(d3.schemeCategory10).domain(\n this.state.chartData.map(line => {\n return line.name;\n })\n );\n\n let lines = this.lineHolder\n .selectAll(\".line\")\n .data(this.state.chartData, d => d.name);\n\n lines\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove();\n\n lines\n .enter()\n .append(\"path\")\n .attr(\"class\", d => `line ${d.name}`)\n .style(\"stroke\", d => this.colors(d.name))\n .style(\"stroke-width\", 2)\n .style(\"fill\", \"none\")\n .attr(\"d\", d => this.statusLine(d.data));\n\n this.LegendHolder.selectAll(\".legend\").remove();\n\n let legend = this.LegendHolder.selectAll(\".legend\").data(\n this.state.chartData,\n d => d.name\n );\n\n legend = legend\n .enter()\n .append(\"g\")\n .attr(\"class\", \"legend\")\n .style(\"cursor\", \"pointer\")\n .on(\"click\", d => {\n let newData = this.state.chartData.map(row => {\n if (row.name === d.name) {\n row.shown = !d.shown;\n }\n return row;\n });\n console.log(`newData = ${newData}`)\n this.setState({\n chartData: newData\n });\n });\n\n // Legend Boxes\n legend\n .append(\"rect\")\n .attr(\"width\", legendHeight)\n .attr(\"x\", 0)\n .attr(\"y\", (legendHeight - 5) / 2)\n .attr(\"height\", 5)\n .style(\"fill\", d => (d.shown ? this.colors(d.name) : \"transparent\"))\n .style(\"stroke\", d => this.colors(d.name))\n .style(\"stroke-width\", 1);\n\n // Legend Text\n legend\n .append(\"text\")\n .attr(\"x\", legendHeight + legendTextSpacing)\n .attr(\"y\", legendHeight / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"start\")\n .style(\"text-transform\", \"capitalize\")\n .text(d => d.name)\n .append(\"title\")\n .text(d => `Toggle ${d.name} line`);\n\n // Legend Position\n let widthSums = 0;\n this.LegendHolder.selectAll(\".legend\").attr(\"transform\", function (d, i) {\n let value = widthSums;\n widthSums += this.getBBox().width + legendSpacing;\n return `translate( ${value}, 0 )`;\n });\n let legendWidth = this.LegendHolder.node().getBBox().width;\n this.LegendHolder.attr(\n \"transform\",\n `translate( ${width / 2 - legendWidth / 2}, ${height +\n margin.bottom -\n legendHeight * 2} )`\n );\n\n // Animate changes\n this.yAxisEl.transition().call(this.yAxis);\n\n lines\n .transition()\n .attr(\"d\", d => this.statusLine(d.data))\n .style(\"stroke\", d => (d.shown ? this.colors(d.name) : \"transparent\"));\n }\n\n loadData = () => {\n let url = \"/scot/api/v2/metric/create_histo\";\n let opts = `?range=7`;\n\n // Use dummy data while dashboard is in editMode\n if (this.props.editMode) {\n let dataset = this.genData();\n\n // Add line visibility to data\n dataset = dataset.map(line => {\n line.shown = this.state.chartData.reduce((shown, d) => {\n return shown && (d.name === line.name ? d.shown : true);\n }, true);\n\n return line;\n });\n\n this.setState({\n chartData: dataset\n });\n\n return;\n }\n axios.get(url + opts).then(res => {\n try {\n // Add line visibility to data\n console.log(res)\n res = res.data.map(line => {\n line.shown = this.state.chartData.reduce((shown, d) => {\n return shown && (d.name === line.name ? d.shown : true);\n }, true);\n\n return line;\n });\n\n this.setState({\n chartData: res\n });\n } catch (e) {\n console.log(\"Malformed data\");\n console.log(res);\n console.error(e);\n }\n });\n };\n\n genData = () => {\n let dataTypes = [\n \"alerts\",\n \"alertgroups\",\n \"events\",\n \"incidents\",\n \"entries\",\n \"intel\"\n ];\n let dataMaxes = {\n alerts: 5000,\n alertgroups: 500,\n entries: 100,\n events: 15,\n intel: 5,\n incidents: 5\n };\n\n let now = new Date(),\n date = new Date(Date.now() - timeWindow);\n let lineData = [];\n dataTypes.forEach(d => {\n lineData.push({\n name: d,\n data: []\n });\n });\n for (; date <= now; date = new Date(date.getTime() + 6 * 3600 * 1000)) {\n lineData.forEach(line => {\n line.data.push({\n time: date.getTime() / 1000,\n value: Math.random() * dataMaxes[line.name]\n });\n });\n }\n\n return lineData;\n }\n\n componentDidMount() {\n this.initChart();\n this.loadData();\n }\n\n dataChange(event) {\n let target = event.target;\n\n if (target.name === \"chartResults\" && target.value) {\n if (target.value > 50) target.value = 50;\n if (target.value < 1) target.value = 1;\n }\n\n this.setState(\n {\n [target.name]: target.value\n },\n this.loadData\n );\n }\n\n exportToPNG = () => {\n var svgString = new XMLSerializer().serializeToString(\n document.querySelector(\"#report_created\")\n );\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n var DOMURL = window.self.URL || window.self.webkitURL || window.self;\n var img = new Image();\n var svg = new Blob([svgString], { type: \"image/svg+xml;charset=utf-8\" });\n var url = DOMURL.createObjectURL(svg);\n img.onload = function () {\n ctx.drawImage(img, 0, 0);\n var png = canvas.toDataURL(\"image/png\");\n document.querySelector(\n \"#png-container\"\n ).innerHTML = ``;\n DOMURL.revokeObjectURL(png);\n var a = $(\"
\")\n .attr(\"href\", png)\n .attr(\"download\", \"img.png\")\n .appendTo(\"body\");\n\n a[0].click();\n\n a.remove();\n };\n img.src = url;\n }\n\n render() {\n if (this.chartInit) {\n this.updateChart();\n }\n\n let formDisabled = this.props.editMode;\n\n return (\n
\n {!this.props.editMode &&

Items Created

}\n
\n \n Export to PNG\n \n \n
\n \n
\n \n );\n }\n}\n\nexport default ReportCreated;\nexport const Description = \"Chart of newly created items\";\n","import React from \"react\";\nimport { Panel, Button } from \"react-bootstrap\";\nimport { Link } from \"react-router-dom\";\n\nimport ReportHeatmap, { Description as HeatmapDesc } from \"./report_heatmap\";\nimport ReportArt, { Description as ArtDesc } from \"./report_art\";\nimport ReportAlertpower, {\n Description as PowerDesc\n} from \"./report_alertpower\";\nimport ReportCreated, { Description as CreatedDesc } from \"./report_created\";\n\nexport const ReportWidgets = () => {\n const widgetTypes = [\"heatmap\", \"art\", \"alertpower\", \"created\"];\n\n let widgets = {};\n for (let type of widgetTypes) {\n widgets[type] = {\n type: reportByType(type),\n title: reportTitleByType(type),\n description: reportDescriptionByType(type)\n };\n }\n\n return widgets;\n};\n\nconst reportByType = reportType => {\n switch (reportType) {\n default:\n case \"heatmap\":\n return ReportHeatmap;\n case \"alertpower\":\n return ReportAlertpower;\n case \"art\":\n return ReportArt;\n case \"created\":\n return ReportCreated;\n }\n};\n\nconst reportComponentByType = reportType => {\n switch (reportType) {\n default:\n case \"heatmap\":\n return ;\n case \"alertpower\":\n return ;\n case \"art\":\n return ;\n case \"created\":\n return ;\n }\n};\n\nconst reportTitleByType = reportType => {\n switch (reportType) {\n default:\n case \"heatmap\":\n return \"Heatmap\";\n case \"alertpower\":\n return \"Alert Power\";\n case \"art\":\n return \"Alert Response Time\";\n case \"created\":\n return \"Items Created\";\n }\n};\n\nconst reportDescriptionByType = reportType => {\n switch (reportType) {\n default:\n case \"heatmap\":\n return HeatmapDesc;\n case \"alertpower\":\n return PowerDesc;\n case \"art\":\n return ArtDesc;\n case \"created\":\n return CreatedDesc;\n }\n};\n\nconst reportPanelHeader = (type, expandButton = false, backButton = false) => (\n
\n {reportTitleByType(type)}\n {expandButton && (\n \n \n \n )}\n {backButton && (\n \n \n \n )}\n
\n);\n\n//\n\nexport const ReportPage = () => (\n \n
\n

Reports

\n
\n
\n
\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n);\n\nexport const SingleReport = ({ reportType = \"heatmap\" }) => (\n \n
\n \n {reportComponentByType(reportType)}\n \n
\n
\n);\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst styles = theme => ({\n progress: {\n margin: theme.spacing.unit * 2,\n },\n});\nfunction LoadingContainer(props) {\n const { classes, loading } = props;\n return (\n
\n {loading &&\n \n }\n
\n );\n}\n\nLoadingContainer.propTypes = {\n classes: PropTypes.object.isRequired,\n};\nexport default withStyles(styles)(LoadingContainer);\n\n","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ListGroup, Label } from \"react-bootstrap\";\nimport { Link } from \"react-router-dom\";\nimport $ from \"jquery\";\nimport * as SessionStorage from \"../../utils/session_storage\";\nimport LoadingContainer from \"../../list/LoadingContainer\";\nimport {\n todayRange,\n lastWeekRange,\n epochRangeToFilter,\n timeOlderThan\n} from \"../../utils/time\";\n\nconst NEW_TIME = 24 * 60 * 60; // 1 day\nconst isNew = created => {\n return !timeOlderThan(created * 1000, NEW_TIME);\n};\n\nconst SCOT_API = \"/scot/api/v2/\";\n\nexport default class ThingList extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n data: [],\n loading: false\n };\n }\n\n static propTypes = {\n thingType: PropTypes.string.isRequired, // Type to query\n title: PropTypes.string.isRequired, // Title of Widget\n queryOptions: PropTypes.object, // Search query options (sort & filter)\n processData: PropTypes.func, // Function to process data\n getSummary: PropTypes.func, // Function to create a summary from data entry\n getLink: PropTypes.func, // Funciton to create a link from data entry\n emptyString: PropTypes.string, // String to show when no data returned\n emptyStyle: PropTypes.oneOf([\"success\", \"info\", \"warning\", \"danger\"]), // Style of emptyString\n newBadge: PropTypes.bool, // Display a badge if the data entry is newer than a day\n editMode: PropTypes.bool, // Whether the dashboard is in edit mode\n errorToggle: PropTypes.func\n };\n\n static defaultProps = {\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n id: -1\n },\n columns: [\"id\", \"subject\"]\n },\n processData: data => {\n return data;\n },\n getSummary: thing => {\n return thing.subject;\n },\n getLink: (thingType, thing) => {\n return `${thingType}/${thing.id}`;\n },\n emptyString: \"No Data\",\n emptyStyle: \"warning\",\n newBadge: true\n };\n\n fetchData() {\n this.setState({\n loading: true\n });\n\n // Force deep copy\n let data = $.extend(true, {}, this.props.queryOptions);\n if (data.sort) {\n data.sort = JSON.stringify(data.sort);\n }\n\n if (data.filter) {\n data = {\n ...data,\n ...data.filter\n };\n delete data.filter;\n }\n\n if (this.props.newBadge) {\n data.columns.push(\"created\");\n }\n\n $.ajaxSetup({ traditional: true });\n $.ajax({\n type: \"get\",\n url: SCOT_API + this.props.thingType,\n data: data\n }).then(\n data => {\n this.setState({\n data: this.props.processData(data.records),\n loading: false\n });\n },\n error => {\n this.props.errorToggle(\"Failed to fetch data: \" + error);\n this.setState({\n loading: false\n });\n }\n );\n }\n\n componentDidMount() {\n if (!this.props.editMode) {\n this.fetchData();\n }\n }\n\n genThingItem(thing, i) {\n // Using this instead of a subcomponent so I don't have to forward all the props\n return (\n \n {this.props.getSummary(thing)}\n {this.props.newBadge &&\n isNew(thing.created) && }\n \n \n );\n }\n\n render() {\n let things = this.state.data.map((thing, i) => this.genThingItem(thing, i));\n if (this.props.editMode) {\n things = [1, 2, 3, 4, 5].map(thing => (\n
\n {this.props.thingType} - {thing}\n
\n ));\n } else if (things.length === 0) {\n things = (\n \n {this.props.emptyString}\n
\n );\n }\n\n return (\n
\n {!this.props.editMode &&

{this.props.title}

}\n {this.state.loading ? (\n \n ) : (\n {things}\n )}\n
\n );\n }\n}\n\n/**\n * Hardcoded variants of Thinglist\n */\nexport const Widgets = () => {\n return {\n ...RecentIntel,\n ...RecentEvents,\n ...RecentIncidents,\n ...OpenTasks,\n ...YourTasks,\n ...UnviewedAlerts,\n ...TopEvents,\n ...ViewedEvents,\n ...EntryEvents\n };\n};\n\nexport const RecentIntel = {\n intel: {\n type: ThingList,\n title: \"Recent Intel\",\n description: \"List of the 5 most recent Intel entries\",\n props: {\n thingType: \"intel\",\n title: \"Recent Intel\"\n }\n }\n};\n\nexport const RecentEvents = {\n events: {\n type: ThingList,\n title: \"Recent Events\",\n description: \"List of the 5 most recent events\",\n props: {\n thingType: \"event\",\n title: \"Recent Events\"\n }\n }\n};\n\nexport const RecentIncidents = {\n incidents: {\n type: ThingList,\n title: \"Recent Incidents\",\n description: \"List of the 5 most recent Incidents\",\n props: {\n thingType: \"incident\",\n title: \"Recent Incidents\"\n }\n }\n};\n\nexport const OpenTasks = {\n tasks: {\n type: ThingList,\n title: \"Open Tasks\",\n description: \"List of recent open tasks\",\n props: {\n thingType: \"task\",\n title: \"Open Tasks\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n updated: -1\n },\n filter: {\n \"metadata.task.status\": \"open\"\n },\n columns: [\"id\", \"body_plain\", \"target\"]\n },\n getSummary: thing => {\n return thing.body_plain.length > 200\n ? thing.body_plain.substr(0, 200) + \"...\"\n : thing.body_plain;\n },\n getLink: (thingType, thing) => {\n let target = thing.target;\n return `${thingType}/${target.type}/${target.id}/${thing.id}`;\n },\n emptyString: \"None\",\n emptyStyle: \"info\"\n }\n }\n};\n\nexport const YourTasks = {\n yourTasks: {\n type: ThingList,\n title: \"Your Tasks\",\n description: \"List of open tasks that you own\",\n props: {\n thingType: \"task\",\n title: \"Your Tasks\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n updated: 1\n },\n filter: {\n \"metadata.task.status\": \"open\",\n owner: SessionStorage.getLocalStorage(\"whoami\")\n },\n columns: [\"id\", \"body_plain\", \"target\"]\n },\n getSummary: thing => {\n return thing.body_plain.length > 200\n ? thing.body_plain.substr(0, 200) + \"...\"\n : thing.body_plain;\n },\n getLink: (thingType, thing) => {\n let target = thing.target;\n return `${thingType}/${target.type}/${target.id}/${thing.id}`;\n },\n emptyString: \"None!\",\n emptyStyle: \"success\"\n }\n }\n};\n\nexport const UnviewedAlerts = {\n unviewedAlerts: {\n type: ThingList,\n title: \"Unviewed Alerts\",\n description: \"Recent alerts with zero views\",\n props: {\n thingType: \"alertgroup\",\n title: \"Unviewed Alerts\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n id: -1\n },\n filter: {\n created: JSON.stringify(epochRangeToFilter(todayRange())),\n views: 0\n },\n columns: [\"id\", \"subject\"]\n },\n newBadge: false,\n emptyString: \"None!\",\n emptyStyle: \"success\"\n }\n }\n};\n\nexport const TopEvents = {\n topEvents: {\n type: ThingList,\n title: \"Important Events\",\n description: \"Recent Events with open tasks\",\n props: {\n thingType: \"event\",\n title: \"Important Events\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n has_tasks: 1\n },\n filter: {\n created: JSON.stringify(epochRangeToFilter(todayRange()))\n },\n columns: [\"id\", \"subject\", \"has_tasks\"]\n },\n processData: data => {\n return data.filter(thing => thing.has_tasks);\n },\n getSummary: thing => {\n return `${thing.subject} (${thing.has_tasks} open task${\n thing.has_tasks > 1 ? \"s\" : \"\"\n })`;\n },\n newBadge: false,\n emptyString: \"None!\",\n emptyStyle: \"success\"\n }\n }\n};\n\nexport const ViewedEvents = {\n viewedEvents: {\n type: ThingList,\n title: \"Most Viewed Events\",\n description: \"Events with the most views over the last week\",\n props: {\n thingType: \"event\",\n title: \"Most Viewed Events\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n views: -1\n },\n filter: {\n created: JSON.stringify(epochRangeToFilter(lastWeekRange()))\n },\n columns: [\"id\", \"subject\", \"views\"]\n },\n processData: data => {\n return data.filter(thing => thing.views > 0);\n },\n getSummary: thing => {\n return `${thing.subject} (${thing.views} view${\n thing.views > 1 ? \"s\" : \"\"\n })`;\n }\n }\n }\n};\n\nexport const EntryEvents = {\n entryEvents: {\n type: ThingList,\n title: \"Events with Entries\",\n description: \"Events with the most entries over the last week\",\n props: {\n thingType: \"event\",\n title: \"Events with Entries\",\n queryOptions: {\n limit: 5,\n offset: 0,\n sort: {\n entry_count: -1\n },\n filter: {\n created: JSON.stringify(epochRangeToFilter(lastWeekRange()))\n },\n columns: [\"id\", \"subject\", \"entry_count\"]\n },\n processData: data => {\n return data.filter(thing => thing.entry_count > 0);\n },\n getSummary: thing => {\n return `${thing.subject} (${thing.entry_count} ${\n thing.entry_count > 1 ? \"entries\" : \"entry\"\n })`;\n }\n }\n }\n};\n","import { ReportWidgets } from \"../report\";\nimport { Widgets as ThingWidgets } from \"../thinglist\";\n\nexport const Widgets = {\n ...ThingWidgets(),\n ...ReportWidgets()\n};\n","import React, { PureComponent } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Tab, Row, Col, Nav, NavItem } from \"react-bootstrap\";\nimport {\n withUserConfig,\n UserConfigPropTypes,\n UserConfigKeys\n} from \"../utils/userConfig\";\nimport Dashboard, {\n defaultLayout\n} from \"../components/dashboard/dazzle/dashboard\";\nimport Status from \"../components/dashboard/status\";\nimport Gamification from \"../components/dashboard/gamification\";\nimport Activity from \"../components/dashboard/activity\";\nimport { Widgets } from \"../components/dashboard/dazzle/widgets\";\nimport $ from \"jquery\";\n\nconst NEWTABKEY = \"new\";\n\nclass HomeDashboard extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n _isMounted: false\n };\n\n this.switchTab = this.switchTab.bind(this);\n this.closeTab = this.closeTab.bind(this);\n this.saveTab = this.saveTab.bind(this);\n }\n\n static propTypes = {\n loggedIn: PropTypes.bool.isRequired,\n sensitivity: PropTypes.string,\n errorToggle: PropTypes.func,\n ...UserConfigPropTypes\n };\n\n defaultTab() {\n const layout = $.extend(true, {}, defaultLayout); // Deep copy\n\n // Default tab has 3 charts: heatmap, ART, and created\n layout.rows[0].columns[0].widgets.push({ key: \"heatmap\" });\n layout.rows[0].columns[1].widgets.push({ key: \"art\" });\n layout.rows[0].columns[2].widgets.push({ key: \"created\" });\n\n return {\n title: \"Default\",\n layout: (\n \n )\n };\n }\n\n newTab() {\n const dashboardConfig = this.props.userConfig.config;\n let tabs = [...dashboardConfig.tabs];\n tabs.push({});\n\n this.updateDashboardConfig({\n curTab: tabs.length,\n tabs: tabs\n });\n }\n\n buildTab(tabConfig, index) {\n let tabLayout = (\n {\n this.saveTab(index, title, layout);\n }}\n isNew={tabConfig.layout == null}\n errorToggle={this.props.errorToggle}\n />\n );\n return {\n title: tabConfig.title,\n layout: tabLayout\n };\n }\n\n saveTab(index, title, layout) {\n const dashboardConfig = this.props.userConfig.config;\n let tabs = [...dashboardConfig.tabs];\n\n let newTabConfig = {\n title: title,\n layout: layout\n };\n\n tabs[index] = newTabConfig;\n this.updateDashboardConfig({\n tabs: tabs\n });\n }\n\n closeTab(index) {\n if (index < 1) {\n return;\n }\n\n const dashboardConfig = this.props.userConfig.config;\n let tabs = [...dashboardConfig.tabs];\n tabs.splice(index - 1, 1);\n\n this.updateDashboardConfig({\n curTab: index - 1,\n tabs: tabs\n });\n }\n\n switchTab(key) {\n if (key === this.props.userConfig.config.curTab) {\n return;\n }\n if (key === NEWTABKEY) {\n this.newTab();\n return;\n }\n\n this.updateDashboardConfig({\n curTab: key\n });\n }\n\n updateDashboardConfig(newConfig) {\n const dashboardConfig = this.props.userConfig.config;\n\n this.props.userConfig.setUserConfig({\n ...dashboardConfig,\n ...newConfig\n });\n }\n\n render() {\n if (!this.props.loggedIn || this.props.userConfig.loading) {\n return (\n
\n
\n
\n

\n Sandia Cyber Omni Tracker\n
\n 3.5\n

\n
\n
\n
\n );\n }\n\n const dashboardHeader = (\n
\n
\n \n
\n \n
\n \n
\n );\n\n const dashboardConfig = this.props.userConfig.config;\n const tabsConfig = dashboardConfig.tabs;\n\n let tabs = [];\n tabs.push(this.defaultTab());\n\n let index = 0;\n for (let newTab of tabsConfig) {\n tabs.push(this.buildTab(newTab, index++));\n }\n\n let tabHeaders = tabs.map((tab, i) => {\n let { title = \"New Dashboard\", layout, ...props } = tab;\n return (\n \n {title}\n {i === dashboardConfig.curTab &&\n i !== 0 && (\n this.closeTab(i)}>\n  \n \n \n )}\n \n );\n });\n\n tabHeaders.push(\n \n +\n \n );\n\n const tabContent = tabs.map((tab, i) => {\n let { title, layout, ...props } = tab;\n return (\n \n {layout}\n \n );\n });\n\n return (\n
\n \n \n \n \n \n \n \n {dashboardHeader}\n {tabContent}\n \n \n \n \n
\n );\n }\n}\n\nexport default withUserConfig(UserConfigKeys.DASHBOARD)(HomeDashboard);\n","//Used to check for viewCookie which is used to determine if the default view should be portrait or landscape mode\n\nexport const checkCookie = string => {\n let cookie = getCookie(string);\n if (cookie !== \"\") {\n return cookie;\n }\n};\n\nexport const getCookie = cname => {\n let name = cname + \"=\";\n let ca = document.cookie.split(\";\");\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === \" \") {\n c = c.substring(1);\n }\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n};\n\nexport const deleteCookie = name => {\n document.cookie = name + \"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n};\n\nexport const setCookie = (cname, cvalue, exdays) => {\n let d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n let expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n};\n","import React from \"react\";\nimport $ from \"jquery\";\nimport { Link } from 'react-router-dom'\nimport Highlighter from \"react-highlight-words\";\nimport styles from './Highlighter.example.css'\nexport default class Search extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n showSearchToolbar: false,\n searchResults: null,\n entityHeight: \"60vh\",\n searching: false,\n searchString: \"\"\n };\n }\n\n componentDidMount = () => {\n function searchEscHandler(event) {\n if ($(\"#main-search-results\")[0] !== undefined) {\n if (event.keyCode === 27) {\n this.closeSearch();\n event.preventDefault();\n }\n }\n }\n $(document).keyup(searchEscHandler.bind(this));\n };\n\n closeSearch = () => {\n this.setState({\n showSearchToolbar: false, searchString:\"\"\n });\n };\n\n doSearch = string => {\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/esearch\",\n data: { qstring: string },\n success: function (response) {\n if (string === $(\"#main-search\")[0].value) {\n this.setState({\n results: response.records,\n showSearchToolbar: true,\n searching: false,\n searchString: string\n });\n }\n }.bind(this),\n error: function () {\n //this.props.errorToggle('search failed')\n this.setState({ searching: false });\n }.bind(this)\n });\n this.setState({ searching: true });\n };\n\n handleEnterKey = e => {\n if (e.key === \"Enter\") {\n this.doSearch(e.target.value);\n }\n };\n\n onChange = e => {\n //only do auto search if there are at least 3 characters\n //if (e.target.value.length > 2) {\n this.doSearch(e.target.value);\n //}\n };\n\n componentDidUpdate = () => {\n if (this.state.searchString !== undefined) {\n //var re = new RegExp(this.state.searchString,\"gi\");\n //$(\".search-snippet\").html(function(_, html) {\n // return html.replace(re, '$&');\n //});\n // $(\".search-snippet\").mark(this.state.searchString, {\n // element: \"span\",\n // className: \"search_highlight\"\n // });\n }\n };\n\n render = () => {\n let tableRows = [];\n if (this.state.results !== undefined) {\n if (this.state.results[0] !== undefined) {\n for (let i = 0; i < this.state.results.length; i++) {\n tableRows.push(\n \n );\n }\n } else {\n tableRows.push(\n
\n
No results returned
\n
\n );\n }\n }\n return (\n
\n
\n \n {this.state.searching ? (\n \n ) : null}\n
\n {this.state.showSearchToolbar ? (\n \n
\n \n \n\n {tableRows}\n
\n
\n
\n ) : null}\n \n );\n };\n\n componentWillUnmount = () => {\n $(document).off(\"keypress\");\n };\n}\n\nclass SearchDataEachHeader extends React.Component {\n render = () => {\n\n return (\n \n
\n \n Search Results - Score Displayed\n \n
\n \n \n );\n };\n}\n\nclass SearchDataEachRows extends React.Component {\n render = () => {\n let type = this.props.dataOne.type;\n let id = this.props.dataOne.id;\n let entryid = this.props.dataOne.entryid;\n let score = this.props.dataOne.score;\n let highlight = [];\n\n let rowEvenOdd = \"even\";\n if (!isEven(this.props.index)) {\n rowEvenOdd = \"odd\";\n }\n\n let rowClassName = \"search_result_row list-view-row\" + rowEvenOdd;\n\n let href = \"/\" + type + \"/\" + id;\n if (entryid !== undefined) {\n href = \"/\" + type + \"/\" + id + \"/\" + entryid;\n }\n\n if (this.props.dataOne.highlight !== undefined) {\n if (typeof this.props.dataOne.highlight === \"string\") {\n highlight.push(\n \n Snippet:\n \n {this.props.dataOne.highlight}\n \n \n );\n } else if ($.isArray(this.props.dataOne.highlight)) {\n highlight.push(\n \n Snippet:\n \n {this.props.dataOne.highlight[0]}\n \n \n );\n } else {\n for (let key in this.props.dataOne.highlight) {\n let search_string_array = this.props.searchString.split(\" \");\n highlight.push(\n \n );\n }\n }\n }\n return (\n
\n \n \n
\n {type} {id} - {score}\n
\n \n \n {highlight}\n \n
\n \n \n \n );\n /*\n return (\n
\n )*/\n };\n}\n\nfunction isEven(n) {\n return n % 2 === 0;\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nlet Button = require(\"react-bootstrap/lib/Button\");\n\nexport default class Wall extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n wallMessage: \"\",\n buttonStatus: \"primary\",\n buttonText: \"Send\",\n buttonLoading: false\n };\n }\n sendWallMessage = () => {\n if (this.state.wallMessage === \"\") {\n alert(\"Please enter text\");\n this.setState({ buttonStatus: \"warning\" });\n } else {\n this.setState({ buttonText: \"Loading\", buttonLoading: true });\n let data = { msg: this.state.wallMessage };\n $.ajax({\n type: \"post\",\n url: \"scot/api/v2/wall\",\n data: data,\n traditional: true,\n success: function() {\n this.setState({\n buttonStatus: \"success\",\n buttonText: \"Sent\",\n buttonLoading: false\n });\n }.bind(this),\n error: function(data) {\n this.setState({\n buttonStatus: \"danger\",\n buttonText: \"Failed - Try Again?\",\n buttonLoading: false\n });\n this.props.errorToggle(\"Failed to send message\", data);\n }.bind(this)\n });\n }\n };\n\n inputChange = input => {\n this.setState({ wallMessage: input.target.value });\n };\n\n render = () => {\n return (\n
\n
\n
\n
\n

Message to all SCOT users:

\n \n \n {this.state.buttonText}\n \n
\n
\n
\n
\n );\n };\n}\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Modal, Button } from \"react-bootstrap\";\nimport $ from \"jquery\";\nimport ScotImage from \"../images/scot_logo_473x473.png\";\n\nclass Login extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n user: \"\",\n pass: \"\"\n };\n this.SSO = this.SSO.bind(this);\n this.NormalAuth = this.NormalAuth.bind(this);\n this.isEnterPressed = this.isEnterPressed.bind(this);\n }\n\n componentWillMount() {\n this.mounted = true;\n }\n\n componentWillUnmount() {\n this.mounted = false;\n }\n\n render() {\n let origurl = this.props.origurl;\n let url = \"/sso?orig_url=/#\" + origurl;\n return (\n \n \n SCOT Login\n \n \n \"SCOT\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n Submit\n \n
\n
\n
\n );\n }\n isEnterPressed(e) {\n if (e.key === \"Enter\") {\n this.NormalAuth();\n }\n }\n\n SSO() {\n let data = {};\n data[\"orig_url\"] = \"%2f\";\n $.ajax({\n type: \"get\",\n url: \"sso\",\n crossDomain: true,\n data: data,\n success: function(data) {\n console.log(\"success logging in\");\n //TODO: Run restart code\n // Actions.restartClient(); //restart the amq client after successful login\n this.props.WhoAmIQuery(); //get new whoami after successful login\n this.props.GetHandler(); //get new handler after succesful login\n this.props.loginToggle(null, true);\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to log in using SSO\");\n }.bind(this)\n });\n }\n\n NormalAuth() {\n let data = {};\n data[\"user\"] = this.refs.user.value;\n data[\"pass\"] = this.refs.pass.value;\n data[\"csrf_token\"] = this.props.csrf;\n\n $.ajax({\n type: \"post\",\n url: \"auth\",\n data: data,\n success: function() {\n console.log(\"success logging in\");\n //TODO: Implemtn restart script\n //Actions.restartClient(); //restart the amq client after successful login\n this.props.WhoAmIQuery(); //get new whoami after successful login\n this.props.GetHandler(); //get new handler after succesful login\n this.props.loginToggle(null, true);\n }.bind(this),\n error: function(data) {\n if (data.responseText === \"Failed CSRF check\") {\n this.props.errorToggle(\n \"Failed to log in due to bad CSRF token. Please reload the page and then log in. Error: \" +\n data.responseText\n );\n } else {\n this.props.errorToggle(\n \"Failed to log in using normal auth: \" + data.responseText\n );\n }\n }.bind(this)\n });\n }\n}\n\nLogin.propTypes = {\n modalActive: PropTypes.bool\n};\n\nLogin.defaultProps = {\n modalActive: true\n};\n\nexport default Login;\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport ReactTags from \"react-tag-autocomplete\";\nimport $ from \"jquery\";\n\nclass TagInput extends Component {\n constructor(props) {\n super(props);\n\n let tags = [];\n if (this.props.value) {\n tags = this.props.value;\n }\n\n let maxTags = undefined;\n if (this.props.maxTags) {\n maxTags = this.props.maxTags;\n }\n this.state = {\n suggestions: [],\n tags: tags,\n maxTags: maxTags,\n placeholder: \"\"\n };\n }\n\n handleDelete = i => {\n const tags = this.state.tags;\n\n tags.splice(i, 1);\n if (tags.length === 0) {\n this.props.onChange(\"\");\n this.setState({ tags: tags, placeholder: \"\" });\n return;\n }\n\n this.props.onChange(tags);\n this.setState({ tags: tags, placeholder: \"\" });\n };\n\n handleAdd = tag => {\n const tags = this.state.tags;\n\n if (this.state.maxTags && tags.length >= this.state.maxTags) {\n this.setState({\n placeholder:\n \"Only \" +\n this.state.maxTags +\n \" allowed. Please delete a tag to add another one\"\n });\n return;\n } else {\n tags.push(tag);\n this.props.onChange(tags);\n this.setState({ tags: tags, placeholder: \"\" });\n }\n };\n\n componentDidUpdate() {\n this.showHideInput();\n }\n\n handleInputChange = input => {\n if (input && input.length >= 2) {\n let arr = [];\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/ac/\" + this.props.type + \"/\" + input,\n success: function(result) {\n result = result.records;\n for (let i = 0; i < result.length; i++) {\n let obj = {};\n obj.id = i + 1;\n obj.name = result[i];\n arr.push(obj);\n }\n this.setState({ suggestions: arr });\n }.bind(this),\n error: function(data) {\n console.log(\"failed to get autocomplete data\");\n }\n });\n }\n };\n\n showHideInput = () => {\n if (\n this.props.type === \"userdef\" &&\n this.props.maxTags &&\n this.state.tags.length >= this.props.maxTags\n ) {\n $(\".react-tags__search\").hide();\n } else {\n $(\".react-tags__search\").show();\n }\n };\n\n render() {\n return (\n
\n \n
\n );\n }\n}\n\nconst Tag = ({ classNames, onDelete, tag }) => (\n
\n {tag.name}\n \n
\n);\n\nexport default TagInput;\n","import axios from 'axios'\n\nexport async function get_data (endpoint, params) {\n if (params === null) {\n return await axios.get(endpoint)\n } else{\n return await axios.get(endpoint, {params: params});\n }\n};\n\nexport async function post_data (endpoint, body) {\n if (body !== null){\n return await axios.post(endpoint, body);\n } else{\n return await axios.post(endpoint);\n }\n\n}\n\nexport async function put_data (endpoint, body){\n return await axios.put(endpoint, body);\n};\n\nexport async function delete_data (endpoint){\n return await axios.delete(endpoint);\n};","import React from \"react\";\nimport { OverlayTrigger, ButtonGroup, Button, Popover } from \"react-bootstrap\";\nimport DateRangePicker from \"react-daterange-picker\";\nimport DebounceInput from \"react-debounce-input\";\nimport {\n epochRangeToString,\n epochRangeToMoment,\n momentRangeToEpoch\n} from \"../utils/time\";\nimport * as constants from \"../utils/constants\";\nimport LoadingContainer from \"./LoadingContainer\";\nimport TagInput from \"../components/TagInput\";\nimport Button2 from \"@material-ui/core/Button\";\nimport { get_data } from \"../utils/XHR\";\nimport Add from \"@material-ui/icons/Add\";\nimport stripHtml from \"string-strip-html\";\nimport { Link } from \"react-router-dom\";\n\nconst navigateTo = id => {\n window.open(\"#/event/\" + id);\n};\n\nconst customFilters = {\n numberFilter: ({ filter, onChange }) => (\n onChange(e.target.value)}\n style={{ width: \"100%\" }}\n />\n ),\n stringFilter: ({ filter, onChange }) => (\n onChange(e.target.value)}\n style={{ width: \"100%\" }}\n />\n ),\n dropdownFilter: (options = [\"open\", \"closed\", \"promoted\"], align) => ({\n filter,\n onChange\n }) => (\n \n \n {options.map(option => (\n onChange(option)}\n active={filter && filter.value === option}\n style={{\n textTransform: \"capitalize\",\n textAlign: align ? align : null\n }}\n >\n {option}\n \n ))}\n \n {filter && (\n onChange(\"\")}\n bsStyle=\"primary\"\n style={{ marginTop: \"3px\" }}\n >\n Clear\n \n )}\n \n }\n >\n \n \n ),\n dateRange: ({ filter, onChange }) => (\n \n {\n onChange(momentRangeToEpoch(range));\n }}\n value={filter ? epochRangeToMoment(filter.value) : null}\n />\n {filter && (\n {\n onChange(\"\");\n document.dispatchEvent(new MouseEvent(\"click\"));\n }}\n bsStyle=\"primary\"\n >\n Clear\n \n )}\n \n }\n >\n \n \n ),\n tagFilter: (type = \"tag\") => ({ filter, onChange }) => (\n \n )\n};\n\nexport const customCellRenderers = {\n dateFormater: row => {\n let date = new Date(row.value * 1000);\n return {date.toLocaleString()};\n },\n alertStatus: row => {\n let [open, closed, promoted] = row.value\n .split(\"/\")\n .map(value => parseInt(value.trim(), 10));\n let className = \"open btn-danger\";\n if (promoted) {\n className = \"promoted btn-warning\";\n } else if (closed) {\n if (!open) {\n className = \"closed btn-success\";\n }\n }\n\n return
{row.value}
;\n },\n textStatus: row => {\n let color = \"green\";\n if (\n row.value === \"open\" ||\n row.value === \"disabled\" ||\n row.value === \"assigned\"\n ) {\n color = \"red\";\n } else if (row.value === \"promoted\") {\n color = \"orange\";\n }\n\n return {row.value};\n },\n\n alertStatusAlerts: row => {\n return (\n
\n \n
\n );\n },\n flairCell: row => {\n if (row !== undefined) {\n return ;\n } else {\n return null;\n }\n },\n\n appliesTo: row => {\n if (row !== undefined) {\n if (Array.isArray(row.original.data.applies_to)) {\n let output = row.original.data.applies_to.map(item => {\n return item;\n });\n return {output.join(\", \")};\n } else {\n return {row.original.data.applies_to};\n }\n }\n }\n};\n\nconst customTableComponents = {\n loading: ({ loading }) => (\n
\n \n
\n )\n};\n\nconst columnDefinitions = {\n Id: {\n Header: \"ID\",\n accessor: \"id\",\n width: 80,\n Filter: customFilters.numberFilter\n },\n\n AlertStatus: {\n Header: \"Status\",\n accessor: d =>\n d.open_count + \" / \" + d.closed_count + \" / \" + d.promoted_count,\n column: [\"open_count\", \"closed_count\", \"promoted_count\"],\n id: \"status\",\n width: 150,\n Filter: customFilters.dropdownFilter(),\n Cell: customCellRenderers.alertStatus,\n style: {\n padding: 0\n }\n },\n\n EventStatus: {\n Header: \"Status\",\n accessor: \"status\",\n maxWidth: 100,\n Cell: customCellRenderers.textStatus,\n Filter: customFilters.dropdownFilter()\n },\n\n IncidentStatus: {\n Header: \"Status\",\n accessor: \"status\",\n maxWidth: 100,\n Cell: customCellRenderers.textStatus,\n Filter: customFilters.dropdownFilter([\"open\", \"closed\"])\n },\n\n SigStatus: {\n Header: \"Status\",\n accessor: \"status\",\n maxWidth: 100,\n Cell: customCellRenderers.textStatus,\n Filter: customFilters.dropdownFilter([\"enabled\", \"disabled\"])\n },\n\n TaskStatus: {\n Header: \"Task Status\",\n accessor: d => d.metadata.task.status,\n id: \"metadata.task.status\",\n column: \"metadata\",\n Cell: customCellRenderers.textStatus,\n Filter: customFilters.dropdownFilter([\"open\", \"assigned\", \"closed\"])\n },\n\n TaskSummary: {\n Header: \"Task Summary\",\n accessor: d =>\n d.body_plain.length > 200\n ? d.body_plain.substr(0, 200) + \"...\"\n : d.body_plain,\n id: \"summary\",\n minWidth: 400,\n maxWidth: 5000,\n Filter: customFilters.stringFilter\n },\n\n Subject: {\n Header: \"Subject\",\n accessor: \"subject\",\n minWidth: 400,\n maxWidth: 5000,\n Filter: customFilters.stringFilter\n },\n\n Location: {\n Header: \"Location\",\n accessor: \"location\",\n minWidth: 80,\n maxWidth: 180,\n Filter: customFilters.stringFilter\n },\n\n Created: {\n Header: \"Created\",\n accessor: \"created\",\n minWidth: 100,\n maxWidth: 180,\n Filter: customFilters.dateRange,\n Cell: customCellRenderers.dateFormater\n },\n\n Updated: {\n Header: \"Updated\",\n accessor: \"updated\",\n minWidth: 100,\n maxWidth: 180,\n Filter: customFilters.dateRange,\n Cell: customCellRenderers.dateFormater\n },\n\n Occurred: {\n Header: \"When\",\n accessor: \"when\",\n minWidth: 100,\n maxWidth: 180,\n Filter: customFilters.dateRange,\n Cell: customCellRenderers.dateFormater\n },\n\n Sources: {\n Header: \"Sources\",\n accessor: \"source\", //d => d.source ? d.source.join( ', ' ) : '',\n column: \"source\",\n id: \"source\",\n minWidth: 120,\n //maxWidth: 150,\n Filter: customFilters.tagFilter(\"source\")\n },\n\n Tags: {\n Header: \"Tags\",\n accessor: \"tag\", //d => d.tag ? d.tag.join( ', ' ) : '',\n column: \"tag\",\n id: \"tag\",\n minWidth: 120,\n //maxWidth: 150,\n Filter: customFilters.tagFilter(\"tag\")\n },\n\n TaskOwner: {\n Header: \"Task Owner\",\n accessor: \"owner\",\n maxWidth: 80,\n Filter: customFilters.stringFilter\n },\n\n Owner: {\n Header: \"Owner\",\n accessor: \"owner\",\n maxWidth: 80,\n Filter: customFilters.stringFilter\n },\n\n Entries: {\n Header: \"Entries\",\n accessor: \"entry_count\",\n maxWidth: 70,\n Filter: customFilters.numberFilter\n },\n\n Views: {\n Header: \"Views\",\n accessor: \"views\",\n maxWidth: 70,\n Filter: customFilters.numberFilter\n },\n\n DOE: {\n Header: \"DOE\",\n accessor: \"doe_report_id\",\n maxWidth: 100,\n Filter: customFilters.stringFilter\n },\n\n IncidentType: {\n Header: \"Type\",\n accessor: \"type\",\n minWidth: 200,\n maxWidth: 250,\n Filter: customFilters.dropdownFilter(constants.INCIDENT_TYPES, \"left\")\n },\n\n AppliesTo: {\n Header: \"Applies To\",\n id: \"data.applies_to\",\n accessor: d => d.data.applies_to,\n Cell: customCellRenderers.appliesTo,\n // Filter: customFilters.stringFilter,\n Filter: customFilters.tagFilter,\n minWidth: 400,\n maxWidth: 5000\n },\n\n Value: {\n Header: \"Value\",\n accessor: \"value\",\n Filter: customFilters.stringFilter,\n minWidth: 400,\n maxWidth: 5000\n },\n\n Name: {\n Header: \"Name\",\n accessor: \"name\",\n Filter: customFilters.stringFilter,\n minWidth: 200,\n maxWidth: 300\n },\n\n Group: {\n Header: \"Group\",\n accessor: d =>\n d.data.signature_group ? d.data.signature_group.join(\", \") : \"\",\n column: \"signature_group\",\n id: \"data.signature_group\",\n Filter: customFilters.stringFilter\n },\n\n Type: {\n Header: \"Type\",\n accessor: d => d.data.type,\n id: \"data.type\",\n Filter: customFilters.stringFilter,\n minWidth: 100,\n maxWidth: 150\n },\n\n EntityType: {\n Header: \"Type\",\n accessor: \"type\",\n Filter: customFilters.stringFilter,\n minWidth: 100,\n maxWidth: 150\n },\n\n Description: {\n Header: \"Description\",\n // accessor: 'description',\n accessor: d => d.data.description,\n Filter: customFilters.stringFilter,\n minWidth: 400,\n id: \"data.description\",\n maxWidth: 5000\n },\n\n TargetType: {\n Header: \"Type\",\n accessor: d => d.target.type,\n column: \"target\",\n id: \"target_type\",\n Filter: customFilters.stringFilter\n },\n\n TargetId: {\n Header: \"Target Id\",\n accessor: d => d.target.id,\n column: \"target\",\n id: \"target_id\",\n Filter: customFilters.numberFilter\n },\n\n OpenTasks: {\n Header: \"Open Tasks\",\n accessor: \"has_tasks\",\n Filter: customFilters.numberFilter,\n maxWidth: 90,\n filterable: false\n },\n\n //alert stuff - 2019 - bemonta\n Status: {\n accessor: \"status\",\n Header: \"Status\",\n width: 100,\n Cell: customCellRenderers.alertStatusAlerts\n },\n\n EntryCountColumn: {\n width: 50,\n resizable: true,\n expander: true,\n filter: false,\n\n accessor: \"entry_count\",\n Header: \"Entries\",\n Expander: ({ isExpanded, ...rest }) => {\n return (\n
\n {isExpanded ? (\n \n Close entries\n \n ) : (\n
\n {rest.original.entry_count == 0 ? (\n \n ) : (\n \n {rest.original.entry_count} entries\n \n )}\n
\n )}\n
\n );\n },\n getProps: (state, rowInfo, column) => {\n return {\n className: \"show-pointer\"\n };\n }\n }\n};\n\nconst defaultTableSettings = {\n manual: true,\n sortable: true,\n filterable: true,\n resizable: true,\n styleName: \"styles.ReactTable\",\n className: \"-striped -highlight\",\n minRows: 0,\n\n LoadingComponent: customTableComponents.loading\n};\n\nexport const defaultTypeTableSettings = {\n page: 0,\n pageSize: 50,\n sorted: [\n {\n id: \"id\",\n desc: true\n }\n ],\n filtered: []\n};\n\nconst defaultColumnSettings = {\n style: {\n padding: \"5px 5px\"\n }\n};\n\nconst typeColumns = {\n alert: [\"Id\", \"Status\", \"EntryCountColumn\"],\n\n alertgroup: [\n \"Id\",\n \"Location\",\n \"AlertStatus\",\n \"Subject\",\n \"Created\",\n \"Sources\",\n \"Tags\",\n \"Views\",\n \"OpenTasks\"\n ],\n event: [\n \"Id\",\n \"Location\",\n \"EventStatus\",\n \"Subject\",\n \"Created\",\n \"Updated\",\n \"Sources\",\n \"Tags\",\n \"Owner\",\n \"Entries\",\n \"Views\",\n \"OpenTasks\"\n ],\n incident: [\n \"Id\",\n \"Location\",\n \"DOE\",\n \"IncidentStatus\",\n \"Owner\",\n \"Subject\",\n \"Occurred\",\n \"IncidentType\",\n {\n title: \"Tags\",\n options: { minWidth: 100, maxWidth: 150 }\n },\n {\n title: \"Sources\",\n options: { minWidth: 100, maxWidth: 150 }\n }\n ],\n intel: [\n \"Id\",\n \"Location\",\n \"Subject\",\n \"Created\",\n \"Updated\",\n \"Sources\",\n {\n title: \"Tags\",\n options: { minWidth: 200, maxWidth: 250 }\n },\n \"Owner\",\n \"Entries\",\n \"Views\"\n ],\n task: [\n \"Id\",\n \"Location\",\n \"Subject\",\n \"TargetType\",\n \"TargetId\",\n {\n title: \"TaskOwner\",\n options: { minWidth: 150, maxWidth: 500 }\n },\n \"TaskStatus\",\n \"TaskSummary\",\n {\n title: \"Updated\",\n options: { minWidth: 150, maxWidth: 500 }\n }\n ],\n signature: [\n \"Id\",\n \"Location\",\n \"Name\",\n \"Type\",\n \"SigStatus\",\n \"Group\",\n \"Description\",\n \"Owner\",\n \"Tags\",\n \"Sources\",\n \"Updated\"\n ],\n guide: [\"Id\", \"Location\", \"Subject\", \"AppliesTo\"],\n entity: [\"Id\", \"Location\", \"Value\", \"EntityType\", \"Entries\"],\n default: [\n \"Id\",\n \"Location\",\n \"AlertStatus\",\n \"Subject\",\n \"Created\",\n \"Sources\",\n \"Tags\",\n \"Views\"\n ]\n};\n\nexport const buildTypeColumns = (type, rowData, propData, flag) => {\n function get_current_combined_columnWidths(columns) {\n let column_total_width = columns.reduce(function(a, b) {\n if (a.width !== undefined) {\n return a.width + b.width;\n } else {\n return a + b.width;\n }\n });\n return column_total_width;\n }\n\n if (!typeColumns.hasOwnProperty(type)) {\n // throw new Error( 'No columns defined for type: '+ type );\n type = \"default\";\n }\n\n if (flag === false && type === \"alert\") {\n type = \"alertgroup\";\n }\n\n let columns = [];\n for (let col of typeColumns[type]) {\n let colOptions = {};\n\n if (typeof col === \"object\") {\n colOptions = {\n ...columnDefinitions[col.title],\n ...col.options\n };\n } else if (typeof col === \"string\") {\n colOptions = columnDefinitions[col];\n }\n\n columns.push({\n ...defaultColumnSettings,\n ...colOptions\n });\n }\n\n if (type === \"alert\") {\n if (propData.length > 0) {\n if (propData[0].data.columns) {\n propData[0].data.columns.forEach(\n function(element, index) {\n if (element !== \"status\") {\n let columnobj = {\n accessor: element,\n Header: element,\n filter: true,\n Cell: row => customCellRenderers.flairCell(row),\n width: getColumnWidth(rowData, element, element)\n };\n columns.push(columnobj);\n } else {\n // Had to add space to account for SCOT status column which is a duplicate column.\n //React table hates duplicate columns. See SelectedEntry - NewAlertTable for data manipulation\n let status_code_obj = {\n accessor: \"status \",\n Header: element,\n filter: true,\n Cell: row => customCellRenderers.flairCell(row),\n width: 80\n };\n columns.push(status_code_obj);\n }\n }.bind(this)\n );\n }\n columns.forEach(function(column, index) {\n column[\"getProps\"] = function(state, rowInfo) {\n return {\n style: {\n backgroundColor: index % 2 === 0 ? \"#bababa45\" : \"\"\n }\n };\n };\n });\n }\n\n // this function looks at columns and calculates how many columns were initially set to 90\n // if it detects a column with width of 90 or time in name, it add an exception, meaning that we should not\n // increase this column\n let num_of_exemptions = 3;\n columns.forEach(function(column) {\n if (column.width === 90) {\n num_of_exemptions++;\n }\n if (column.accessor.includes(\"time\")) {\n num_of_exemptions++;\n }\n });\n\n let windowsize = window.innerWidth - 32;\n //calculate column widths\n let column_total_width = get_current_combined_columnWidths(columns);\n\n //if below conditional true, then we have empty white space in table and should increase column widths\n if (column_total_width < windowsize) {\n let residual = windowsize - column_total_width;\n let residual_per_column = residual / (columns.length - num_of_exemptions);\n columns.forEach(\n function(column) {\n //each iteration, we want to calculate the total width of columns\n column_total_width = get_current_combined_columnWidths(columns);\n if (column_total_width < windowsize) {\n if (\n column.accessor !== \"id\" &&\n column.accessor !== \"entry_count\" &&\n column.accessor !== \"status\" &&\n column.width !== 90 &&\n column.accessor.includes(\"time\") !== true\n ) {\n if (column.width + residual_per_column < residual) {\n column.width = column.width + residual_per_column;\n column_total_width = get_current_combined_columnWidths(columns);\n } else {\n column.width = column.width + residual;\n }\n }\n }\n }.bind(this)\n );\n }\n }\n\n return columns;\n};\n\nclass FlairObject extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n const { value } = this.props;\n\n return (\n \n );\n }\n}\n\nexport const getColumnWidth = (data, accessor, headerText) => {\n //get calc width of html element, we use this to calculate as accurate as possible, widths of headertext, and data in cellss\n function calc_width(input) {\n try {\n let strip = stripHtml(input);\n return strip.length;\n } catch {\n return input.length;\n }\n }\n\n if (typeof accessor === \"string\" || accessor instanceof String) {\n accessor = d => d[accessor]; // eslint-disable-line no-param-reassign\n }\n const maxWidth = 400;\n const magicSpacing = 9;\n const cellLength = Math.max(\n ...data.map(function(row) {\n let newtext = row[headerText];\n if (newtext !== undefined) {\n return calc_width(newtext);\n } else {\n return 0;\n }\n }),\n headerText.length\n );\n\n if (cellLength < 13 && headerText !== \"status\") {\n return 90;\n } else {\n return Math.min(maxWidth, cellLength * magicSpacing);\n }\n};\n\nclass PromotionButton extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n element: null,\n loading: true\n };\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.row.value !== this.props.row.value) {\n this.getPromotionInfo(this.props.row.original.id).then(element => {\n if (element) {\n this.setState({ element });\n }\n });\n }\n }\n\n componentDidMount() {\n this.getPromotionInfo(this.props.row.original.id).then(element => {\n if (element) {\n this.setState({ element });\n }\n });\n }\n\n getPromotionInfo = id => {\n let json = get_data(`/scot/api/v2/alert/${id}/event`, {});\n return json;\n };\n\n render() {\n if (this.props.row.value === \"closed\") {\n return

{this.props.row.value}

;\n } else if (this.props.row.value === \"open\") {\n return

{this.props.row.value}

;\n } else if (this.props.row.value === \"promoted\") {\n if (this.state.element) {\n return (\n \n navigateTo(this.state.element.data.records[0].id)\n }\n style={{ backgroundColor: \"orange\", color: \"white\" }}\n >\n {this.props.row.value}\n \n );\n } else {\n return Loading...;\n }\n }\n }\n}\n\nexport const getEntityPopupColumns = params => {\n const columns = [\n {\n Header: \"Status\",\n accessor: \"status\",\n width: 79,\n Cell: row => {\n let promotedHref = \"\";\n if (row.original.status !== undefined) {\n if (row.original.status === \"closed\") {\n return (\n {row.original.status}\n );\n } else if (row.original.status === \"open\") {\n return {row.original.status};\n } else if (row.original.status === \"promoted\") {\n if (row.original.type === \"alert\") {\n promotedHref = `/#/event/${row.original.promotion_id}`;\n } else if (row.original.type === \"event\") {\n promotedHref = `/#/incident/${row.original.promotion_id}`;\n }\n return (\n
\n \n {row.original.status}\n \n
\n );\n }\n } else {\n return
N/A
;\n }\n }\n },\n {\n Header: \"ID\",\n accessor: \"id\",\n width: 85,\n Cell: row => {\n if (row.original.id) {\n return (\n \n {row.original.id}\n \n );\n }\n }\n },\n {\n Header: \"type\",\n accessor: \"type\",\n width: 50\n },\n {\n Header: \"Entries\",\n accessor: \"entry_count\",\n width: 66\n },\n {\n Header: \"subject\",\n accessor: \"subject\"\n },\n {\n Header: \"updated\",\n accessor: \"updated\",\n width: 121,\n Cell: row => {\n let daysSince = \"Unknown\";\n if (row.original.updated !== undefined) {\n daysSince = Math.floor(\n (Math.round(new Date().getTime() / 1000) - row.original.updated) /\n 86400\n );\n }\n return {daysSince} days ago;\n }\n }\n ];\n return columns;\n};\n\nexport default defaultTableSettings;\n","\n/*****************************************************/\n/*************** Table Options *****************/\n/***************************************************/\nexport const INCIDENT_TYPES = [\n 'Type 1 : Root Compromise',\n 'Type 1 : User Compromise',\n 'Type 1 : Loss/Theft/Missing Desktop',\n 'Type 1 : Loss/Theft/Missing Laptop',\n 'Type 1 : Loss/Theft/Missing Media',\n 'Type 1 : Loss/Theft/Missing Other',\n 'Type 1 : Malicious Code Trojan',\n 'Type 1 : Malicious Code Virus',\n 'Type 1 : Malicious Code Worm',\n 'Type 1 : Malicious Code Other',\n 'Type 1 : Web Site Defacement',\n 'Type 1 : Denial of Service',\n 'Type 1 : Critical Infrastructure Protection',\n 'Type 1 : Unauthorized Use',\n 'Type 1 : Information Compromise',\n 'Type 2 : Attempted Intrusion',\n 'Type 2 : Reconnaissance Activity',\n];\n","var listColumnsJSON = {};\nlistColumnsJSON = {\n columnsDisplay: {\n alertgroup: ['ID', 'Status', 'Subject', 'Created', 'Sources', 'Tags', 'Views', 'Open Tasks'],\n alert: ['ID', 'Status', 'Subject', 'Created', 'Sources', 'Tags', 'Views'],\n event: ['ID', 'Status', 'Subject', 'Created', 'Updated', 'Sources', 'Tags', 'Owner', 'Entries', 'Views', 'Open Tasks'],\n incident: ['ID', 'DOE', 'Status', 'Owner', 'Subject', 'Occurred', 'Type', 'Tags', 'Sources'],\n task: [ 'Entry Id', 'Body', 'Type', 'ID', 'Status', 'Owner', 'Updated'],\n guide: ['ID', 'Subject', 'Applies To'],\n intel: ['ID', 'Subject', 'Created', 'Updated', 'Source', 'Tags', 'Owner', 'Entries', 'Views'],\n signature: ['ID', 'Name', 'Type', 'Status', 'Group', 'Description', 'Owner', 'Tag', 'Source', 'Updated'],\n entity: ['ID', 'Value', 'Type', 'Entries']\n },\n columns: {\n alertgroup: ['id', 'status', 'subject', 'created', 'source', 'tag', 'views', 'has_tasks'],\n alert: ['id', 'status', 'subject', 'created', 'source', 'tag', 'views'],\n event: ['id', 'status', 'subject', 'created', 'updated', 'source', 'tag', 'owner', 'entry_count', 'views', 'has_tasks'],\n incident: ['id', 'doe_report_id', 'status', 'owner', 'subject', 'occurred', 'type', 'tag', 'source'],\n task: [ 'id', 'body_plain', 'target.type', 'target.id', 'metadata.status', 'owner', 'updated'],\n guide: ['id', 'subject', 'applies_to'],\n intel: ['id', 'subject', 'created', 'updated', 'source', 'tag', 'owner', 'entry_count', 'views'],\n signature: ['id', 'name', 'type', 'status', 'signature_group', 'description', 'owner', 'tag', 'source', 'updated'],\n entity: ['id', 'value', 'type', 'entry_count']\n },\n columnsClassName: {\n alertgroup: ['id', 'status', 'subject', 'created', 'source', 'tag', 'views', 'has-tasks'],\n alert: ['id', 'status', 'subject', 'created', 'source', 'tag', 'views'],\n event: ['id', 'status', 'subject', 'created', 'updated', 'source', 'tag', 'owner', 'entry_count', 'views', 'has-tasks'],\n incident: ['id', 'doe_report_id', 'status', 'owner', 'subject', 'occurred', 'type', 'tag', 'source'],\n task: ['id', 'body_plain', 'target_type', 'target_id', 'task_status', 'owner', 'updated'],\n guide: ['id', 'subject', 'applies_to'] ,\n intel: ['id', 'subject', 'created', 'updated', 'source', 'tag', 'owner', 'entry_count', 'views'],\n signature: ['id', 'name', 'type', 'status', 'signature_group', 'description', 'owner', 'tag', 'source', 'updated'],\n entity: ['id', 'value', 'type', 'entry_count']\n }\n};\nexport default listColumnsJSON;","import React from \"react\";\nimport $ from \"jquery\";\nlet ButtonToolbar = require(\"react-bootstrap/lib/ButtonToolbar\");\nlet OverlayTrigger = require(\"react-bootstrap/lib/OverlayTrigger\");\nlet MenuItem = require(\"react-bootstrap/lib/MenuItem\");\nlet DropdownButton = require(\"react-bootstrap/lib/DropdownButton\");\nlet Popover = require(\"react-bootstrap/lib/Popover\");\nlet Link = require(\"react-router-dom\").Link;\n\nexport default class DetailDataStatus extends React.Component {\n componentDidMount = () => {\n //Adds open/close hot keys for alertgroup\n if (this.props.type === \"alertgroup\") {\n $(\"#list-view\").keydown(\n function(event) {\n //prevent from working when in input\n if ($(\"input\").is(\":focus\")) {\n return;\n }\n //check for character \"o\" for 79 or \"c\" for 67\n if (this.props.status !== \"promoted\") {\n if (\n event.keyCode === 79 &&\n (event.ctrlKey !== true && event.metaKey !== true)\n ) {\n this.statusAjax(\"open\");\n } else if (\n event.keyCode === 67 &&\n (event.ctrlKey !== true && event.metaKey !== true)\n ) {\n this.statusAjax(\"closed\");\n }\n }\n }.bind(this)\n );\n }\n };\n\n componentWillUnmount = () => {\n $(\"#list-view\").unbind(\"keydown\");\n };\n\n /*eventStatusToggle: function () {\n if (this.props.status == 'open') {\n this.statusAjax('closed');\n } else if (this.props.status == 'closed') {\n this.statusAjax('open');\n }\n },*/\n trackAll = () => {\n this.statusAjax(\"tracked\");\n };\n\n untrackAll = () => {\n this.statusAjax(\"untracked\");\n };\n\n closeAll = () => {\n this.statusAjax(\"closed\");\n };\n\n openAll = () => {\n this.statusAjax(\"open\");\n };\n\n enableAll = () => {\n this.statusAjax(\"enabled\");\n };\n\n disableAll = () => {\n this.statusAjax(\"disabled\");\n };\n\n statusAjax = newStatus => {\n console.log(newStatus);\n let json = { status: newStatus };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n console.log(\"success status change to: \" + data);\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to change status\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n let buttonStyle = \"\";\n let open = \"\";\n let closed = \"\";\n let promoted = \"\";\n let title = \"\";\n let classStatus = \"\";\n let href;\n if (\n this.props.status === \"open\" ||\n this.props.status === \"disabled\" ||\n this.props.status === \"untracked\"\n ) {\n buttonStyle = \"danger\";\n classStatus = \"alertgroup_open\";\n } else if (\n this.props.status === \"closed\" ||\n this.props.status === \"enabled\" ||\n this.props.status === \"tracked\"\n ) {\n buttonStyle = \"success\";\n classStatus = \"alertgroup_closed\";\n } else if (this.props.status === \"promoted\") {\n buttonStyle = \"default\";\n classStatus = \"alertgroup_promoted\";\n }\n\n if (this.props.type === \"alertgroup\") {\n open = this.props.data.open_count;\n closed = this.props.data.closed_count;\n promoted = this.props.data.promoted_count;\n title = open + \" / \" + closed + \" / \" + promoted;\n }\n\n if (this.props.type === \"event\") {\n href = \"/incident/\" + this.props.data.promotion_id;\n } else if (this.props.type === \"intel\") {\n href = \"/event/\" + this.props.data.promotion_id;\n }\n\n if (this.props.type === \"guide\" || this.props.type === \"intel\") {\n return
;\n } else if (this.props.type === \"alertgroup\") {\n return (\n \n open/closed/promoted alerts\n }\n >\n \n \n Open All Alerts\n \n \n Close All Alerts\n \n \n \n \n );\n } else if (this.props.type === \"incident\") {\n return (\n \n \n Open Incident\n \n \n Close Incident\n \n \n );\n } else if (this.props.type === \"signature\") {\n return (\n \n \n Enable Signature\n \n \n Disable Signature\n \n \n );\n } else if (this.props.type === \"entity\") {\n return (\n \n \n Track\n \n \n Untracked\n \n \n );\n } else {\n return (\n
\n {this.props.status === \"promoted\" ? (\n \n {this.props.status}\n \n ) : (\n \n \n Open\n \n \n Close\n \n \n )}\n
\n );\n }\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nlet Button = require(\"react-bootstrap/lib/Button.js\");\n\nexport default class Promote extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n newURL: null,\n newType: null\n };\n }\n\n componentDidMount = () => {\n if (this.props.type === \"alert\") {\n this.setState({ newType: \"Event\" });\n this.setState({ newURL: \"event\" });\n } else if (this.props.type === \"event\") {\n this.setState({ newType: \"Incident\" });\n this.setState({ newURL: \"incident\" });\n }\n };\n\n promote = () => {\n let data = JSON.stringify({ promote: \"new\" });\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: data,\n contentType: \"application/json; charset=UTF-8\",\n success: function (data) {\n console.log(\"successfully promoted\");\n window.location.assign(\"#/\" + this.state.newURL + \"/\" + data.pid);\n }.bind(this),\n error: function (data) {\n this.props.errorToggle(\"error\", \"Failed to promote\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n return (\n \n \"\"\n Promote to {this.state.newType}\n \n );\n };\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Button, MenuItem, OverlayTrigger, Tooltip } from \"react-bootstrap\";\nimport * as SessionStorage from \"../utils/session_storage\";\n\nexport default class Marker extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isMarked: false\n };\n\n this.removeMarkedItemsHandler = this.removeMarkedItemsHandler.bind(this);\n this.getMarkedItemsHandler = this.getMarkedItemsHandler.bind(this);\n this.setMarkedItemsHandler = this.setMarkedItemsHandler.bind(this);\n this.getSelectedAlerts = this.getSelectedAlerts.bind(this);\n }\n\n componentWillMount() {\n this.getMarkedItemsHandler();\n }\n\n componentWillReceiveProps(nextProps) {\n this.getMarkedItemsHandler();\n if (nextProps.isAlert) {\n //set marked to false if alert since we can't predict if new ones are selected\n this.setState({ isMarked: false });\n }\n }\n\n render() {\n if (this.props.type === \"entry\") {\n return (\n \n \n {this.state.isMarked ? Marked : Mark}\n \n );\n } else {\n return (\n \n Mark selected{\" \"}\n {this.props.isAlert ? alerts : this.props.type}\n \n }\n >\n \n \n {this.props.isAlert ? Mark selected : null}\n\n {/* { this.state.isMarked ? Marked : Mark }*/}\n \n \n );\n }\n }\n\n getMarkedItemsHandler() {\n let markedItems = getMarkedItems();\n let isMarked = false;\n\n if (markedItems) {\n for (let key of markedItems) {\n if (key.id === this.props.id && key.type === this.props.type) {\n isMarked = true;\n break;\n }\n }\n }\n this.setState({ isMarked: isMarked });\n }\n\n removeMarkedItemsHandler() {\n if (this.props.isAlert) {\n let selectedAlerts = this.getSelectedAlerts();\n for (let i = 0; i < selectedAlerts.length; i++) {\n removeMarkedItems(\"alert\", selectedAlerts[i]);\n }\n } else {\n removeMarkedItems(this.props.type, this.props.id);\n }\n this.setState({ isMarked: false });\n }\n\n setMarkedItemsHandler() {\n if (this.props.isAlert) {\n //parse alerts then iterate through them to add to marking list\n let selectedAlerts = this.getSelectedAlerts();\n for (let i = 0; i < selectedAlerts.length; i++) {\n setMarkedItems(\"alert\", selectedAlerts[i], this.props.string);\n }\n } else {\n setMarkedItems(this.props.type, this.props.id, this.props.string);\n }\n this.setState({ isMarked: true });\n }\n\n getSelectedAlerts() {\n return this.props.alertsSelected.map(alert => alert.id);\n }\n}\n\nexport const removeMarkedItems = (type, id) => {\n let currentMarked = getMarkedItems();\n\n if (currentMarked) {\n for (let i = 0; i < currentMarked.length; i++) {\n if (currentMarked[i].type === type && currentMarked[i].id === id) {\n currentMarked.splice(i, 1);\n break;\n }\n }\n\n SessionStorage.setLocalStorage(\"marked\", JSON.stringify(currentMarked));\n }\n};\n\nexport const getMarkedItems = () => {\n let markedItems = SessionStorage.getLocalStorage(\"marked\");\n if (markedItems) {\n markedItems = JSON.parse(markedItems);\n return markedItems;\n }\n};\n\nexport const setMarkedItems = (type, id, string) => {\n let nextMarked = [];\n let currentMarked = getMarkedItems();\n\n if (currentMarked) {\n for (let key of currentMarked) {\n if (key.type !== type || key.id !== id) {\n nextMarked.push(key);\n }\n }\n }\n\n nextMarked.push({ id: id, type: type, subject: string.substring(0, 120) });\n SessionStorage.setLocalStorage(\"marked\", JSON.stringify(nextMarked));\n};\n\nMarker.propTypes = {\n isMarked: PropTypes.bool\n};\n\nMarker.defaultProps = {\n isMarked: false\n};\n","import React from \"react\";\nimport $ from \"jquery\";\nimport SelectedEntry from \"../detail/selected_entry.js\";\nimport Inspector from \"react-inspector\";\nimport Button from \"react-bootstrap/lib/Button\";\nimport Tabs from \"react-bootstrap/lib/Tabs\";\nimport Tab from \"react-bootstrap/lib/Tab\";\nimport AddEntry from \"../components/add_entry\";\nimport Draggable from \"react-draggable\";\nimport DetailDataStatus from \"../components/detail_data_status\";\nimport { Link } from \"react-router-dom\";\nimport Marker from \"../components/marker\";\nimport Frame from \"react-frame-component\";\nimport { get_data } from \"../utils/XHR\";\nimport ReactTable from \"react-table\";\nimport Paper from \"@material-ui/core/Paper\";\nimport { getEntityPopupColumns } from \"../list/tableConfig\";\n\nlet startX;\nlet startY;\nlet startWidth;\nlet startHeight;\n\nexport default class EntityDetail extends React.Component {\n constructor(props) {\n super(props);\n let tabs = [];\n let processedIdsArray = [];\n let entityHeight = \"100%\"; //test\n let entityWidthint = 700;\n let entityWidth = entityWidthint + \"px\";\n let entityMaxHeight = \"70vh\";\n if (this.props.fullScreen === true) {\n entityHeight = \"95vh\";\n entityWidth = \"95%\";\n entityMaxHeight = \"95vh\";\n }\n this.state = {\n entityData: null,\n entityid: this.props.entityid,\n entityHeight: entityHeight,\n entityWidth: entityWidth,\n entityWidthint: entityWidthint,\n entityMaxHeight: entityMaxHeight,\n tabs: tabs,\n initialLoad: false,\n processedIds: processedIdsArray,\n valueClicked: \"\",\n defaultEntityOffset: this.props.entityoffset,\n entityobj: this.props.entityobj,\n height: null,\n isMounted: false\n };\n }\n\n componentWillMount = () => {};\n\n onLoad = () => {\n if (\n document.getElementById(\"iframe_\" + this.props.id) !== undefined &&\n document.getElementById(\"iframe_\" + this.props.id) !== null\n ) {\n if (\n document.getElementById(\"iframe_\" + this.props.id).contentDocument\n .readyState === \"complete\"\n ) {\n let ifr = $(\"#iframe_\" + this.props.id);\n let ifrContents = $(ifr).contents();\n let ifrContentsHead = $(ifrContents).find(\"head\");\n if (ifrContentsHead) {\n if (!$(ifrContentsHead).find(\"link\")) {\n ifrContentsHead.append(\n $(\"\", {\n rel: \"stylesheet\",\n href: \"css/sandbox.css\",\n type: \"text/css\"\n })\n );\n }\n }\n setTimeout(\n function() {\n if (\n document.getElementById(\"iframe_\" + this.props.id) !== undefined\n ) {\n document\n .getElementById(\"iframe_\" + this.props.id)\n .contentWindow.requestAnimationFrame(\n function() {\n let newheight;\n newheight = document.getElementById(\n \"iframe_\" + this.props.id\n ).contentWindow.document.body.scrollHeight;\n newheight = newheight + \"px\";\n if (this.state.height !== newheight) {\n this.setState({ height: newheight });\n }\n }.bind(this)\n );\n }\n }.bind(this),\n 250\n );\n //}\n } else {\n setTimeout(this.onLoad, 0);\n }\n }\n };\n\n componentDidMount = () => {\n this.setState({ isMounted: true });\n let currentTabArray = this.state.tabs;\n let valueClicked = this.props.entityvalue;\n if (this.props.entitytype !== \"source\") {\n if (this.state.entityid === undefined || isNaN(this.state.entityid)) {\n $.ajax({\n type: \"GET\",\n url: \"scot/api/v2/\" + this.props.entitytype + \"/byname\",\n data: { name: valueClicked },\n success: function(result) {\n let entityid = result.id;\n if (this.state.isMounted) {\n this.setState({ entityid: entityid });\n $.ajax({\n type: \"GET\",\n url: \"scot/api/v2/\" + this.props.entitytype + \"/\" + entityid,\n success: function(result) {\n //this.setState({entityData:result})\n let newTab = {\n data: result,\n entityid: entityid,\n entitytype: this.props.entitytype,\n valueClicked: result.value\n };\n currentTabArray.push(newTab);\n if (this.state.isMounted) {\n let entityidsarray = [];\n entityidsarray.push(entityid);\n this.setState({\n tabs: currentTabArray,\n currentKey: entityid,\n initialLoad: true,\n processedIds: entityidsarray\n });\n this.props.createCallback(\n this.props.entityid,\n this.updated\n );\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity detail information\",\n data\n );\n }.bind(this)\n });\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity detail id information \",\n data\n );\n }.bind(this)\n });\n } else {\n let id = this.state.entityid;\n if (!Array.isArray(id)) {\n id = [parseInt(id, 10)];\n }\n\n for (let i = 0; i < id.length; i++) {\n $.ajax({\n type: \"GET\",\n url: \"scot/api/v2/\" + this.props.entitytype + \"/\" + id[i],\n success: function(result) {\n //this.setState({entityData:result})\n let newTab = {\n data: result,\n entityid: result.id,\n entitytype: this.props.entitytype,\n valueClicked: result.value\n };\n currentTabArray.push(newTab);\n if (this.state.isMounted) {\n let entityidsarray = [];\n entityidsarray.push(result.id);\n this.setState({\n tabs: currentTabArray,\n currentKey: result.id,\n initialLoad: true,\n processedIds: entityidsarray\n });\n this.props.createCallback(this.props.entityid, this.updated);\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity detail information\",\n data\n );\n }.bind(this)\n });\n }\n }\n } else {\n let newTab = {\n data: this.props.data,\n entityid: this.props.entityid,\n entitytype: this.props.entitytype,\n valueClicked: this.props.entitytype\n };\n currentTabArray.push(newTab);\n // if (this.state.isMounted) {\n let entityidsarray = [];\n entityidsarray.push(this.props.entityid);\n this.setState({\n tabs: currentTabArray,\n currentKey: parseInt(this.props.entityid, 10),\n initialLoad: true,\n processedIds: entityidsarray\n });\n this.props.createCallback(this.props.entityid, this.updated);\n }\n //Esc key closes popup\n function escHandler(event) {\n //prevent from working when in input\n if ($(\"input\").is(\":focus\")) {\n return;\n }\n if ($(\"#main-search-results\")[0] !== undefined) {\n return;\n } //close search results before closing entity div\n //check for esc with keyCode\n if (event.keyCode === 27) {\n this.props.flairToolbarOff();\n event.preventDefault();\n }\n }\n\n $(document).keydown(escHandler.bind(this));\n this.containerHeightAdjust();\n window.addEventListener(\"resize\", this.containerHeightAdjust);\n this.onLoad();\n\n $(\"iframe\").each(function(index, ifr) {\n //requestAnimationFrame waits for the frame to be rendered (allowing the iframe to fully render before excuting the next bit of code!!!\n ifr.contentWindow.requestAnimationFrame(function() {\n if (ifr.contentDocument != null) {\n let ifrContents = $(ifr).contents();\n //This makes all href point to blank so they don't reload the iframe\n $(ifr.contentDocument.body)\n .find(\"a\")\n .attr(\"target\", \"_blank\");\n //Copies href to a new attribute, url, before we make href an anchor (so it doesn't go anywhere when clicked)\n ifrContents.find(\"a\").each(function(index, a) {\n let url = $(a).attr(\"href\");\n $(a).attr(\"url\", url);\n });\n }\n });\n });\n };\n\n componentWillUnmount = () => {\n this.setState({ isMounted: false });\n //removes escHandler bind\n $(document).off(\"keydown\");\n };\n\n componentWillReceiveProps = nextProps => {\n this.onLoad();\n let checkForInitialLoadComplete = {\n checkForInitialLoadComplete: function() {\n let addNewEntity = {\n //Initializing Function for adding an entry to be used later.\n addNewEntity: function() {\n let currentTabArray = this.state.tabs;\n if (nextProps.entitytype !== \"source\") {\n if (\n nextProps.entityid === undefined ||\n isNaN(nextProps.entityid)\n ) {\n $.ajax({\n type: \"GET\",\n url: \"scot/api/v2/\" + nextProps.entitytype + \"/byname\",\n data: { name: nextProps.entityvalue },\n success: function(result) {\n let entityid = result.id;\n if (this.state.isMounted) {\n this.setState({ entityid: entityid });\n $.ajax({\n type: \"GET\",\n url:\n \"scot/api/v2/\" +\n nextProps.entitytype +\n \"/\" +\n entityid,\n success: function(result) {\n let newTab = {\n data: result,\n entityid: entityid,\n entitytype: nextProps.entitytype,\n valueClicked: nextProps.entityvalue\n };\n currentTabArray.push(newTab);\n if (this.state.isMounted) {\n this.setState({\n tabs: currentTabArray,\n currentKey: nextProps.entityid\n });\n this.props.createCallback(\n nextProps.entityid,\n this.updated\n );\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity detail information\",\n data\n );\n }.bind(this)\n });\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity id detail information\",\n data\n );\n }.bind(this)\n });\n } else {\n $.ajax({\n type: \"GET\",\n url:\n \"scot/api/v2/\" +\n nextProps.entitytype +\n \"/\" +\n nextProps.entityid,\n success: function(result) {\n let newTab = {\n data: result,\n entityid: nextProps.entityid,\n entitytype: nextProps.entitytype,\n valueClicked: nextProps.entityvalue\n };\n currentTabArray.push(newTab);\n if (this.state.isMounted) {\n this.setState({\n tabs: currentTabArray,\n currentKey: nextProps.entityid\n });\n this.props.createCallback(\n nextProps.entityid,\n this.updated\n );\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get entity detail information\",\n data\n );\n }.bind(this)\n });\n }\n } else {\n let newTab = {\n data: nextProps.data,\n entityid: nextProps.entityid,\n entitytype: nextProps.entitytype,\n valueClicked: nextProps.entitytype\n };\n currentTabArray.push(newTab);\n // if (this.state.isMounted) {\n let entityidsarray = [];\n entityidsarray.push(nextProps.entityid);\n this.setState({\n tabs: currentTabArray,\n currentKey: parseInt(nextProps.entityid, 10),\n initialLoad: true,\n processedIds: entityidsarray\n });\n this.props.createCallback(nextProps.entityid, this.updated);\n this.props.watcher();\n }\n }.bind(this)\n };\n if (this.state.initialLoad === false) {\n setTimeout(\n checkForInitialLoadComplete.checkForInitialLoadComplete,\n 50\n );\n } else {\n if (nextProps !== undefined) {\n //TODO Fix next conditional for undefined that prevents multiple calls for the same ID at load time on a nested entity\n if (\n nextProps.entitytype != null &&\n nextProps.entityid !== undefined\n ) {\n let nextPropsEntityIdInt = parseInt(nextProps.entityid, 10);\n for (let i = 0; i < this.state.tabs.length; i++) {\n if (\n nextPropsEntityIdInt === this.state.tabs[i].entityid ||\n (this.state.tabs[i].entitytype === \"guide\" &&\n nextProps.entitytype === \"guide\")\n ) {\n if (this.state.isMounted) {\n this.setState({ currentKey: nextPropsEntityIdInt });\n }\n return;\n } else {\n let array = this.state.processedIds;\n let addEntity = true;\n for (let i = 0; i < array.length; i++) {\n if (array[i] === nextPropsEntityIdInt) {\n // Check if entity is already being processed so we don't show it twice\n addEntity = false;\n }\n }\n if (addEntity) {\n addNewEntity.addNewEntity();\n array.push(nextPropsEntityIdInt);\n this.setState({ processedIds: array });\n }\n }\n }\n }\n }\n }\n }.bind(this)\n };\n checkForInitialLoadComplete.checkForInitialLoadComplete();\n this.containerHeightAdjust();\n };\n\n updated = () => {\n let currentTabArray = this.state.tabs;\n // eslint-disable-line\n let valueClicked = this.props.entityvalue;\n for (let j = 0; j < currentTabArray.length; j++) {\n //TODO: Ask Nick\n // if ( activemqid == currentTabArray[j].entityid ) {\n let currentTabArrayIndex = j;\n $.ajax({\n type: \"GET\",\n url:\n \"scot/api/v2/\" +\n this.props.entitytype +\n \"/\" +\n currentTabArray[j].entityid,\n success: function(result) {\n //this.setState({entityData:result})\n let newTab = {\n data: result,\n entityid: result.id,\n entitytype: this.props.entitytype,\n valueClicked: result.value\n };\n currentTabArray[currentTabArrayIndex] = newTab;\n if (this.state.isMounted) {\n let entityidsarray = [];\n entityidsarray.push(result.id);\n this.setState({\n tabs: currentTabArray,\n currentKey: result.id,\n initialLoad: true,\n processedIds: entityidsarray\n });\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"failed to get updated entity detail information\",\n data\n );\n }.bind(this)\n });\n }\n };\n\n checkFlairHover = ifr => {\n if (ifr.contentDocument != null) {\n $(ifr)\n .contents()\n .find(\"a\")\n .each(\n function(index, a) {\n if ($(a).css(\"color\") === \"rgb(255, 0, 0)\") {\n $(a).data(\"state\", \"down\");\n } else if ($(a).data(\"state\") === \"down\") {\n $(a).data(\"state\", \"up\");\n let url = $(a).attr(\"url\");\n this.props.linkWarningToggle(url);\n }\n }.bind(this)\n );\n }\n };\n\n initDrag = e => {\n //remove the entityPopUpMaxSizeDefault class so it can be resized.\n if ($(\"#dragme\").hasClass(\"entityPopUpMaxSizeDefault\")) {\n let height = $(\"#dragme\").height() + \"px\";\n $(\"#dragme\").css(\"height\", height);\n $(\"#dragme\").removeClass(\"entityPopUpMaxSizeDefault\");\n }\n let elem = document.getElementById(\"dragme\");\n startX = e.clientX;\n startY = e.clientY;\n startWidth = parseInt(\n document.defaultView.getComputedStyle(elem).width,\n 10\n );\n startHeight = parseInt(\n document.defaultView.getComputedStyle(elem).height,\n 10\n );\n document.documentElement.addEventListener(\"mousemove\", this.doDrag, false);\n document.documentElement.addEventListener(\"mouseup\", this.stopDrag, false);\n this.blockiFrameMouseEvent();\n };\n\n doDrag = e => {\n let elem = document.getElementById(\"dragme\");\n console.log(`elem.style.width before: ${elem.style.width}`);\n console.log(`e.clientX before: ${e.clientX}`);\n console.log(`startX before: ${startX}`);\n console.log(`startwidth before: ${startWidth}`);\n if (startWidth + e.clientX - startX > 586) {\n elem.style.width = startWidth + e.clientX - startX + \"px\";\n }\n if (startHeight + e.clientY - startY > 386) {\n elem.style.height = startHeight + e.clientY - startY + \"px\";\n }\n };\n\n stopDrag = e => {\n document.documentElement.removeEventListener(\n \"mousemove\",\n this.doDrag,\n false\n );\n document.documentElement.removeEventListener(\n \"mouseup\",\n this.stopDrag,\n false\n );\n this.allowiFrameMouseEvent();\n };\n\n moveDivInit = e => {\n document.documentElement.addEventListener(\n \"mouseup\",\n this.moveDivStop,\n false\n );\n this.blockiFrameMouseEvent();\n };\n\n moveDivStop = e => {\n document.documentElement.removeEventListener(\n \"mouseup\",\n this.moveDivStop,\n false\n );\n this.allowiFrameMouseEvent();\n };\n\n blockiFrameMouseEvent = () => {\n $(\"iframe\").each(function(index, ifr) {\n $(ifr).addClass(\"pointerEventsOff\");\n });\n };\n\n allowiFrameMouseEvent = () => {\n $(\"iframe\").each(function(index, ifr) {\n $(ifr).removeClass(\"pointerEventsOff\");\n });\n };\n\n handleSelectTab = key => {\n this.setState({ currentKey: key });\n };\n\n positionRightBoundsCheck = e => {\n if (!e) {\n return (\n $(document).width() -\n this.state.defaultEntityOffset.left -\n this.state.entityWidthint\n );\n } else {\n return (\n $(document).width() -\n (this.state.defaultEntityOffset.left + e) -\n this.state.entityWidthint\n );\n }\n };\n\n containerHeightAdjust = () => {\n //only run this if we're in /#/entity and not as a popup\n if (this.props.fullScreen === true) {\n let scrollHeight;\n if ($(\"#list-view-container\")[0]) {\n scrollHeight =\n $(window).height() -\n $(\"#list-view-container\").height() -\n $(\"#header\").height() -\n 70;\n scrollHeight = scrollHeight + \"px\";\n } else {\n scrollHeight = $(window).height() - $(\"#header\").height() - 70;\n scrollHeight = scrollHeight + \"px\";\n }\n //$('#detail-container').css('height',scrollHeight);\n if (this.state.isMounted) {\n this.setState({ height: scrollHeight });\n }\n }\n };\n\n render = () => {\n let defaultOffsetY;\n let defaultOffsetX;\n let tabsArr = [];\n let DragmeClass =\n \"box react-draggable entityPopUp entityPopUpMaxSizeDefault\";\n if (this.props.fullScreen === true || $(\"react-draggable-dragged\")) {\n //Don't readd entityPopUpMaxSizeDefault if full screen or if the box has been dragged\n DragmeClass = \"box react-draggable entityPopUp\";\n }\n if (this.props.fullScreen === true) {\n DragmeClass = DragmeClass + \" height100percent\";\n }\n for (let i = 0; i < this.state.tabs.length; i++) {\n let z = i + 1;\n let title = \"tab\";\n if (this.state.tabs[i].entitytype === \"guide\") {\n title = \"guide\";\n } else if (this.state.tabs[i].entitytype === \"source\") {\n title = \"source\";\n } else {\n if (this.state.tabs[i].valueClicked !== undefined) {\n title = this.state.tabs[i].valueClicked.slice(0, 15);\n } else {\n title = \"\";\n }\n }\n tabsArr.push(\n \n \n \n );\n }\n if (this.state.defaultEntityOffset && this.state.entityobj) {\n let positionRightBoundsValue = this.positionRightBoundsCheck();\n if (this.positionRightBoundsCheck($(this.state.entityobj).width()) < 0) {\n defaultOffsetX =\n this.state.defaultEntityOffset.left - this.state.entityWidthint;\n } else {\n defaultOffsetX =\n this.state.defaultEntityOffset.left + $(this.state.entityobj).width();\n }\n } else {\n defaultOffsetY = 50;\n defaultOffsetX = 0;\n }\n if (this.props.fullScreen === true) {\n //entity detail is full screen mode\n return (\n \n \n \n {tabsArr}\n \n
\n \n );\n } else {\n return (\n \n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n {tabsArr}\n \n \n \n \n \n \n
\n );\n }\n };\n}\n\nclass TabContents extends React.Component {\n render = () => {\n if (this.props.entitytype === \"entity\") {\n return (\n
\n
\n

\n {this.props.data != null ? (\n \n ) : (\n
\n Loading...\n
\n )}\n

\n
\n \n {this.props.data != null ? (\n \n ) : (\n
Loading...
\n )}\n
\n \n );\n } else if (this.props.entitytype === \"guide\") {\n let guideurl = \"/guide/\" + this.props.entityid;\n return (\n
\n
\n \n

\n {this.props.data != null ? (\n \n \n \n \n
\n \n
\n
\n ) : (\n
\n Loading...\n
\n )}\n

\n \n
\n \n {this.props.data != null ? (\n \n ) : (\n
Loading...
\n )}\n
\n \n );\n } else if (this.props.entitytype === \"source\") {\n return (\n
\n
\n \n {this.props.entitytype != null ? (\n \n ) : (\n
Loading...
\n )}\n
\n \n );\n } else if (this.props.entitytype === \"entry\") {\n return (\n
\n
\n \n {this.props.entitytype != null ? (\n
\n \n \n
\n ) : (\n
Loading...
\n )}\n
\n
\n );\n }\n };\n}\n\nclass EntityValue extends React.Component {\n render = () => {\n if (this.props.data !== undefined) {\n //Entity Detail Popup showing the entity type\n let entityurl = \"/entity/\" + this.props.data.id;\n\n return (\n
\n
\n \n Entity {this.props.data.id}\n \n  \n \n  \n \n  \n {this.props.data.data ? (\n this.props.data.data.scanner ? (\n this.props.data.data.scanner.active == \"true\" ? (\n \n ) : null\n ) : null\n ) : null}\n
\n
\n {this.props.data.type}:\n  \n {this.props.value}\n
\n
\n );\n } else {\n //Guide Detail Popup showing the name of the guide that is being applied to\n return
{this.props.value}
;\n }\n };\n}\n\nclass EntityBody extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n loading: \"Loading Entries\",\n entryToolbar: false,\n appearances: 0,\n showFullEntityButton: false,\n isMounted: false\n };\n }\n\n updateAppearances = appearancesNumber => {\n if (appearancesNumber !== null) {\n if (appearancesNumber !== 0) {\n let newAppearancesNumber = this.state.appearances + appearancesNumber;\n if (this.state.isMounted) {\n this.setState({ appearances: newAppearancesNumber });\n }\n }\n }\n };\n\n entryToggle = () => {\n if (this.state.entryToolbar === false) {\n this.setState({ entryToolbar: true });\n } else {\n this.setState({ entryToolbar: false });\n }\n };\n\n showFullEntityButton = () => {\n //don't show the button if in full screen entity view.\n if (this.props.type !== \"entity\") {\n this.setState({ showFullEntityButton: true });\n }\n };\n\n linkOnClickIntercept = (e) => {\n\n this.props.linkWarningToggle(e.target.id, e.target.dataset.nopop);\n };\n\n componentDidMount() {\n this.setState({ isMounted: true });\n }\n\n componentWillUnmount() {\n this.setState({ isMounted: false });\n }\n\n render = () => {\n let entityEnrichmentDataArr = [];\n let entityEnrichmentLinkArr = [];\n let entityEnrichmentGeoArr = [];\n let enrichmentEventKey = 4;\n if (this.props.data !== undefined) {\n let entityData = this.props.data[\"data\"];\n for (let prop in entityData) {\n if (entityData[prop] !== undefined) {\n if (prop === \"geoip\") {\n entityEnrichmentGeoArr.push(\n \n \n \n );\n enrichmentEventKey++;\n } else if (entityData[prop].type === \"data\") {\n entityEnrichmentDataArr.push(\n \n \n \n );\n enrichmentEventKey++;\n } else if (entityData[prop].type === \"link\") {\n //added this because we dont need two buttons -2019 bryce\n if (entityData[prop].data.title !== \"Lookup in Likaboss\") {\n const nopop = ( entityData[prop].data.nopopup ) ? true : false;\n console.log(entityData[prop].data);\n entityEnrichmentLinkArr.push(\n \n {entityData[prop].data.title}\n \n );\n enrichmentEventKey++;\n }\n }\n }\n }\n }\n //Lazy Loading SelectedEntry as it is not actually loaded when placed at the top of the page due to the calling order.\n\n //PopOut available\n //let href = '/#/entity/' + this.props.entityid + '/' + this.props.type + '/' + this.props.id;\n let href = \"/entity/\" + this.props.entityid;\n return (\n \n \n
{entityEnrichmentLinkArr}
\n
\n \n Appears: {this.state.appearances} times\n \n {this.state.showFullEntityButton === true ? (\n \n \n List truncated due to large amount of references. Click to\n view the whole entity\n \n \n ) : null}\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n {this.state.entryToolbar ? (\n \n ) : null}\n \n
\n \n {entityEnrichmentGeoArr}\n {entityEnrichmentDataArr}\n
\n );\n };\n}\n\nclass GeoView extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n copyToEntryToolbar: false,\n copyToEntityToolbar: false\n };\n }\n\n copyToEntry = () => {\n if (this.state.copyToEntryToolbar === false) {\n this.setState({ copyToEntryToolbar: true });\n } else {\n this.setState({ copyToEntryToolbar: false });\n }\n };\n\n copyToEntity = () => {\n if (this.state.copyToEntityToolbar === false) {\n this.setState({ copyToEntityToolbar: true });\n } else {\n this.setState({ copyToEntityToolbar: false });\n }\n };\n\n render() {\n let trArr = [];\n let copyArr = [];\n copyArr.push(\"\");\n for (let prop in this.props.data) {\n let value = this.props.data[prop];\n trArr.push(\n \n \n \n \n );\n copyArr.push(\n '\"\n );\n }\n copyArr.push(\"
\n {prop}\n \n {this.props.data[prop]}\n
' +\n prop +\n '' +\n value +\n \"
\");\n let copy = copyArr.join(\"\");\n return (\n
\n \n {this.props.type !== \"alertgroup\" ? (\n \n ) : null}\n {this.state.copyToEntryToolbar ? (\n \n ) : null}\n {this.state.copyToEntityToolbar ? (\n \n ) : null}\n
\n \n {trArr}\n \n
\n
\n );\n }\n}\n\nclass EntityEnrichmentButtons extends React.Component {\n render() {\n let dataSource = this.props.dataSource;\n return (\n
\n
\n \n
\n
\n );\n }\n}\n\nclass EntityReferences extends React.Component {\n constructor(props) {\n super(props);\n let maxRecords = 100;\n //if type == entity then the url is looking for a full screen entity view with all records.\n if (this.props.type === \"entity\") {\n maxRecords = undefined;\n }\n this.state = {\n entityReferencesData: [],\n maxRecords: maxRecords,\n loadingType: {\n alert: true,\n event: true,\n intel: true,\n incident: true,\n signature: true,\n guide: true\n },\n loading: true,\n isMounted: false,\n order: \"asc\",\n orderBy: \"id\"\n };\n }\n\n componentDidMount = () => {\n this.setState({ isMounted: true });\n const types = [\"incident\", \"event\", \"intel\", \"guide\", \"signature\", \"alert\"];\n types.forEach(\n function(type) {\n let open = [];\n let closed = [];\n let promoted = [];\n let therest = [];\n const request = get_data(\n `scot/api/v2/entity/${this.props.entityid}/${type}`\n );\n request.then(\n function(result) {\n const result_array = result.data.records;\n this.props.updateAppearances(result_array.length);\n //sort into temp arrays\n result_array.forEach(\n function(item) {\n item[\"type\"] = type;\n if (item.status === \"open\") {\n open.push(item);\n } else if (item.status === \"closed\") {\n closed.push(item);\n } else if (item.status === \"promoted\") {\n promoted.push(item);\n } else {\n therest.push(item);\n }\n }.bind(this)\n );\n\n //sort temp arrays by date\n open.sort(this.compareUpdatedDate);\n closed.sort(this.compareUpdatedDate);\n promoted.sort(this.compareUpdatedDate);\n therest.sort(this.compareUpdatedDate);\n\n //set loading types false\n let loading_type = this.state.loadingType;\n loading_type[type] = false;\n this.setState({\n entityReferencesData: [\n ...this.state.entityReferencesData,\n ...promoted,\n ...open,\n ...closed,\n ...therest\n ],\n loadingType: loading_type\n });\n }.bind(this)\n );\n }.bind(this)\n );\n\n if (this.state.entityReferencesData.length > 0) {\n this.props.showFullEntityButton();\n }\n };\n\n componentDidUpdate = () => {};\n\n componentWillUnmount = () => {\n this.setState({ isMounted: false });\n };\n\n compareUpdatedDate = (a, b) => {\n //reverse sort with most recent updated at top\n if (a.updated > b.updated) {\n return -1;\n } else {\n return 1;\n }\n };\n\n render = () => {\n let loading = this.state.loading;\n if (\n !this.state.loadingSignature &&\n !this.state.loadingEvents &&\n !this.state.loadingAlerts &&\n !this.state.loadingIncidents &&\n !this.state.loadingIncidents\n ) {\n loading = false;\n }\n let id = \"sortableentitytable\" + this.props.entityid;\n let maxRows = 5;\n if (this.state.entityReferencesData.length > 0) {\n console.log(\"got data\");\n console.log(this.state.entityReferencesData);\n maxRows = this.state.entityReferencesData.length;\n }\n\n return (\n
\n {loading ? (\n \n Loading: {this.state.loadingAlerts ? Alerts : null}\n {this.state.loadingEvents ? Events : null}\n {this.state.loadingIncidents ? Incidents : null}\n {this.state.loadingIntel ? Intel : null}\n {this.state.loadingSignature ? Signature : null}\n \n ) : null}\n \n \n \n
\n );\n };\n}\n\nclass GuideBody extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n entryToolbar: false\n };\n }\n\n entryToggle = () => {\n if (this.state.entryToolbar === false) {\n this.setState({ entryToolbar: true });\n } else {\n this.setState({ entryToolbar: false });\n }\n };\n\n render() {\n return (\n \n \n
\n \n
\n
\n {this.state.entryToolbar ? (\n \n ) : null}\n \n
\n
\n );\n }\n}\n\nclass SourceBody extends React.Component {\n render() {\n return (\n
\n

Source

\n \n \n \n }\n frameBorder={\"0\"}\n id={\"iframe_\" + this.props.entityid}\n sandbox={\"allow-same-origin\"}\n height=\"500px\"\n >\n
\n \n \n \n \n }\n style={{ width: \"100%\" }}\n frameBorder={\"0\"}\n id={\"iframe_\" + this.props.entityid}\n sandbox={\"allow-same-origin\"}\n styleSheets={[\"/css/sandbox.css\"]}\n height=\"500px\"\n >\n >\n \n \n \n \n
\n );\n }\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nimport Dropdown from \"react-bootstrap/lib/Dropdown\";\nlet MenuItem = require(\"react-bootstrap/lib/MenuItem\");\nlet DropdownToggle = require(\"react-bootstrap/lib/DropdownToggle\");\nlet DropdownMenu = require(\"react-bootstrap/lib/DropdownMenu\");\nlet OverlayTrigger = require(\"react-bootstrap/lib/OverlayTrigger\");\nlet Tooltip = require(\"react-bootstrap/lib/Tooltip\");\n\nexport default class TrafficLightProtocol extends React.Component {\n selectColor = e => {\n let data = { tlp: e };\n this.serverRequest = $.ajax({\n type: \"put\",\n url: \"/scot/api/v2/\" + this.props.type + \"/\" + this.props.id + \"/\",\n data: JSON.stringify(data),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"set tlp\");\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to set TLP\", data);\n }\n });\n //this.setState({ color: e });\n };\n\n render = () => {\n return (\n \n {this.props.tlp}}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n Traffic Light Protocol (TLP) Color\n \n Unset\n \n \n Red\n \n \n Amber\n \n \n Green\n \n \n White\n \n \n \n What is TLP?\n \n \n \n \n \n );\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nimport ButtonGroup from \"react-bootstrap/lib/ButtonGroup.js\";\nimport Button from \"react-bootstrap/lib/Button.js\";\nimport Promote from \"../components/promote.js\";\nimport Marker from \"../components/marker.js\";\nimport TrafficLightProtocol from \"../components/traffic_light_protocol.js\";\nimport { CSVLink } from \"react-csv\";\nimport { put_data } from \"../utils/XHR\";\n\nexport default class SelectedHeaderOptions extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n globalFlairState: true,\n promoteRemaining: null,\n dataToDownload: []\n };\n }\n\n toggleFlair = () => {\n let newGlobalFlairState = !this.state.globalFlairState;\n this.props.toggleFlair();\n $(\"iframe\").each(\n function(index, ifr) {\n if (ifr.contentDocument != null) {\n let ifrContents = $(ifr).contents();\n let off = ifrContents.find(\".entity-off\");\n let on = ifrContents.find(\".entity\");\n if (this.state.globalFlairState === false) {\n ifrContents.find(\".extras\").show();\n ifrContents.find(\".flair-off\").hide();\n off.each(function(index, entity) {\n $(entity).addClass(\"entity\");\n $(entity).removeClass(\"entity-off\");\n });\n } else {\n ifrContents.find(\".extras\").hide();\n ifrContents.find(\".flair-off\").show();\n on.each(function(index, entity) {\n $(entity).addClass(\"entity-off\");\n $(entity).removeClass(\"entity\");\n });\n }\n }\n }.bind(this)\n );\n this.setState({ globalFlairState: newGlobalFlairState });\n };\n\n alertOpenOrCloseSelected = flag => {\n let iterarray = [];\n if (this.props.alertsSelected.length > 0) {\n iterarray = this.props.alertsSelected;\n } else if (this.props.entryData.length > 0) {\n iterarray = this.props.entryData;\n }\n let array = iterarray.map(function(alert) {\n let object = { id: alert.id, status: flag };\n if (flag === \"closed\") {\n object[\"closed\"] = Math.round(new Date().getTime() / 1000);\n }\n return object;\n });\n\n let data = { alerts: array };\n\n this.props.ToggleProcessingMessage(true);\n let endpoint = `/scot/api/v2/${this.props.type}/${this.props.id}`;\n let response = put_data(endpoint, data);\n response\n .then(\n function() {\n console.log(\"success\");\n this.props.ToggleProcessingMessage(false);\n }.bind(this)\n )\n .catch(\n function(data) {\n this.props.errorToggle(`failed to ${flag} selected alerts`, data);\n this.props.ToggleProcessingMessage(false);\n }.bind(this)\n );\n };\n\n alertPromoteSelected = () => {\n let data = JSON.stringify({ promote: \"new\" });\n let array = this.props.alertsSelected.map(alert => alert.id);\n\n this.props.ToggleProcessingMessage(true);\n\n //Start by promoting the first one in the array\n let endpoint = `/scot/api/v2/alert/${array[0]}`;\n let response = put_data(endpoint, data);\n response.then(\n function(response) {\n let promoteTo = {\n promote: response.data.pid\n };\n if (array.length === 1) {\n this.props.ToggleProcessingMessage(false);\n }\n array.forEach(\n function(alert_id, index) {\n if (index === 0) {\n console.log(\"promoting rest of alerts\");\n } else {\n let endpoint = `/scot/api/v2/alert/${alert_id}`;\n let response2 = put_data(endpoint, promoteTo);\n response2\n .then(\n function() {\n if (index + 1 === array.length) {\n this.props.ToggleProcessingMessage(false);\n }\n }.bind(this)\n )\n .catch(\n function(data) {\n this.props.errorToggle(\n \"failed to promoted selected alerts\",\n data\n );\n }.bind(this)\n );\n }\n }.bind(this)\n );\n }.bind(this)\n );\n };\n\n alertSelectExisting = () => {\n let text = prompt(\"Please Enter Event ID to promote into\");\n if (text !== \"\" && text !== null) {\n this.props.alertsSelected.forEach(\n function(alert) {\n let data = { promote: parseInt(text, 10) };\n let endpoint = `/scot/api/v2/alert/${alert.id}`;\n let response = put_data(endpoint, data);\n response\n .then(function() {\n console.log(`Successfully promoted to event ${text}`);\n })\n .catch(\n function() {\n prompt(\"Please use numbers only\");\n this.selectExisting();\n }.bind(this)\n );\n }.bind(this)\n );\n window.open(\"#/event/\" + text);\n }\n };\n\n alertExportCSV = () => {\n const currentRecords = this.props.alertsSelected;\n var data_to_download = [];\n currentRecords.forEach(\n function(row) {\n Object.keys(row).forEach(function(key) {\n //here lets strip html tags\n if (typeof row[key] === \"string\") {\n let regex = /(<([^>]+)>)/gi;\n let body = row[key];\n row[key] = body.replace(regex, \"\");\n }\n });\n data_to_download.push(row);\n }.bind(this)\n );\n\n this.setState({ dataToDownload: data_to_download }, () => {\n // click the CSVLink component to trigger the CSV download\n this.csvLink.link.click();\n });\n };\n\n PrintPrepare = () => {\n $(\"iframe\")\n .contents()\n .each(function(x, y) {\n $(y)\n .find(\"blockquote\")\n .each(function(index, block) {\n $(block).css({ \"max-height\": \"5000px\" });\n });\n $(y)\n .find(\"pre\")\n .each(function(index, pre) {\n $(pre).css({ \"max-height\": \"5000px\", \"word-wrap\": \"break-word\" });\n });\n });\n setTimeout(\n function() {\n this.forceUpdate();\n }.bind(this),\n 500\n );\n setTimeout(function() {\n $(\"#print-button\").click();\n }, 1000);\n };\n\n Print = () => {\n window.print();\n };\n\n componentDidMount = () => {\n //open, close SELECTED alerts\n if (this.props.type === \"alertgroup\" || this.props.type === \"alert\") {\n $(\"#main-detail-container\").keydown(\n function(event) {\n if ($(\"input\").is(\":focus\")) {\n return;\n }\n if (\n event.keyCode === 79 &&\n (event.ctrlKey !== true && event.metaKey !== true)\n ) {\n this.alertOpenOrCloseSelected(\"open\");\n }\n if (\n event.keyCode === 67 &&\n (event.ctrlKey !== true && event.metaKey !== true)\n ) {\n this.alertOpenOrCloseSelected(\"closed\");\n }\n }.bind(this)\n );\n }\n $(\"#main-detail-container\").keydown(\n function(event) {\n if ($(\"input\").is(\":focus\")) {\n return;\n }\n if (\n event.keyCode === 84 &&\n (event.ctrlKey !== true && event.metaKey !== true)\n ) {\n this.toggleFlair();\n }\n }.bind(this)\n );\n };\n\n componentWillUnmount = () => {\n $(\"#main-detail-container\").unbind(\"keydown\");\n };\n\n guideToggle = () => {\n let entityoffset = { top: 0, left: 0 }; //set to 0 so it appears in a default location.\n this.props.flairToolbarToggle(\n this.props.guideID,\n null,\n \"guide\",\n entityoffset,\n null\n );\n };\n\n sourceToggle = () => {\n let entityoffset = { top: 0, left: 0 }; //set to 0 so it appears in a default location.\n this.props.flairToolbarToggle(\n this.props.id,\n null,\n \"source\",\n entityoffset,\n null\n );\n };\n\n createGuide = () => {\n let data = JSON.stringify({\n subject: \"ENTER A GUIDE NAME\",\n data: {\n applies_to: [this.props.subjectName]\n }\n });\n $.ajax({\n type: \"POST\",\n url: \"/scot/api/v2/guide\",\n data: data,\n contentType: \"application/json; charset=UTF-8\",\n success: function(response) {\n window.open(\"/#/guide/\" + response.id);\n },\n error: function(data) {\n this.props.errorToggle(\"failed to create a new guide\", data);\n }.bind(this)\n });\n };\n reparseFlair = () => {\n $.ajax({\n type: \"put\",\n url: \"/scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify({ parsed: 0 }),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"reparsing started\");\n },\n error: function(data) {\n this.props.errorToggle(\"failed to reparse flair\", data);\n }.bind(this)\n });\n };\n\n createLinkSignature = () => {\n $.ajax({\n type: \"POST\",\n url: \"/scot/api/v2/signature\",\n data: JSON.stringify({\n target: { id: this.props.id, type: this.props.type },\n name: \"Name your Signature\",\n status: \"disabled\"\n }),\n contentType: \"application/json; charset=UTF-8\",\n success: function(response) {\n const url = \"/#/signature/\" + response.id;\n window.open(url, \"_blank\");\n },\n error: function(data) {\n this.props.errorToggle(\"failed to create a signature\", data);\n }.bind(this)\n });\n };\n\n manualUpdate = () => {\n this.props.updated(null, null);\n };\n\n render = () => {\n let subjectType = this.props.subjectType;\n let type = this.props.type;\n let id = this.props.id;\n let status = this.props.status;\n\n let string = \"\";\n\n if (this.props.headerData.subject) {\n string = this.props.headerData.subject;\n } else if (this.props.headerData.value) {\n string = this.props.headerData.value;\n } else if (this.props.headerData.name) {\n string = this.props.headerData.name;\n } else if (this.props.headerData.body) {\n string = this.props.headerData.body;\n }\n\n if (type !== \"alertgroup\") {\n let newType;\n let showPromote = true;\n if (status !== \"promoted\") {\n if (type === \"alert\") {\n newType = \"Event\";\n } else if (type === \"event\") {\n newType = \"Incident\";\n } else if (\n type === \"incident\" ||\n type === \"guide\" ||\n type === \"intel\" ||\n type === \"signature\" ||\n type === \"entity\"\n ) {\n showPromote = false;\n }\n } else {\n showPromote = false;\n }\n return (\n
\n {type !== \"entity\" ? (\n \n Add Entry\n \n ) : null}\n {type !== \"entity\" ? (\n \n Upload File\n \n ) : null}\n \n {type === \"alertgroup\" || type === \"event\" || type === \"intel\" ? (\n \n \"\" Viewed By History\n \n ) : null}\n \n \"\" {subjectType} History\n \n {type !== \"entity\" ? (\n \n Permissions\n \n ) : null}\n \n \n __ View Entities\n \n {type === \"guide\" ? (\n \n View Related\n Alerts\n \n ) : null}\n \n {showPromote ? (\n \n ) : null}\n {type !== \"signature\" ? (\n \n ) : null}\n {type === \"signature\" ? (\n \n View Custom Options\n \n ) : null}\n \n \n \n Export{\" \"}\n {subjectType}{\" \"}\n \n this.props.deleteToggle(type)}\n bsSize=\"xsmall\"\n >\n Delete{\" \"}\n {subjectType}\n \n \n \n \n \n \n \n \n
\n );\n } else {\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n {this.props.guideID !== null ? (\n \n ) : (\n \n )}\n \n {this.props.headerData == null ? null : (\n \n )}\n \n __ View Entities\n \n {type === \"alertgroup\" || type === \"event\" || type === \"intel\" ? (\n \n \"\" Viewed By History\n \n ) : null}\n \n \"\" {subjectType} History\n \n \n \n \n\n \n this.props.deleteToggle(type)}\n bsSize=\"xsmall\"\n >\n Delete{\" \"}\n {subjectType}\n \n \n {this.props.alertsSelected.length > 0 ? (\n \n this.alertOpenOrCloseSelected(\"open\")}\n bsSize=\"xsmall\"\n bsStyle=\"danger\"\n >\n \"\" Open Selected\n \n this.alertOpenOrCloseSelected(\"closed\")}\n bsSize=\"xsmall\"\n bsStyle=\"success\"\n >\n Close\n Selected\n \n \n \"\" Promote Selected\n \n \n \"\" Add Selected to{\" \"}\n Existing Event\n \n (this.csvLink = r)}\n target=\"_blank\"\n />\n \n \"\" Export to CSV\n \n \n \n Print\n \n \n this.props.deleteToggle(\"alert\")}\n bsSize=\"xsmall\"\n bsStyle=\"danger\"\n >\n Delete Selected\n \n \n ) : null}\n
\n );\n }\n };\n}\n","import React, { PureComponent } from \"react\";\nimport Modal from \"react-modal\";\nimport { Button } from \"react-bootstrap\";\nimport PropTypes from \"prop-types\";\nimport $ from \"jquery\";\nimport { withSnackbar } from \"notistack\";\nimport { delete_data } from \"../utils/XHR\";\n\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n },\n overlay: {\n zIndex: \"1101\"\n }\n};\n\nconst ACTION_BUTTONS = {\n READY: {\n style: \"danger\"\n },\n LOADING: {\n text: \"Processing...\",\n style: \"default\",\n disabled: true\n },\n SUCCESS: {\n text: \"Success!\",\n style: \"success\"\n },\n ERROR: {\n text: \"Error!\",\n style: \"warning\"\n }\n};\n\nclass DeleteThing extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n key: props.id\n };\n }\n\n deleteItems = () => {\n const { deleteType } = this.props;\n let iterator = [];\n if (deleteType !== \"alert\") {\n iterator = [parseInt(this.props.id, 10)];\n } else {\n iterator = this.props.alertsSelected.map(alert => alert.id);\n }\n iterator.forEach(\n function(id, index) {\n const { enqueueSnackbar } = this.props;\n let url = `/scot/api/v2/${deleteType}/${id}`;\n\n const response = delete_data(url);\n this.props.removeCallback(parseInt(this.props.id, 10));\n response\n .then(\n function() {\n if (index === iterator.length - 1 && deleteType === \"alert\") {\n this.props.updated();\n }\n if (deleteType !== \"alert\") {\n this.props.history.push(\"/\" + deleteType);\n enqueueSnackbar(`Successfully deleted ${this.props.id}.`, {\n variant: \"success\"\n });\n } else if (deleteType === \"alert\") {\n enqueueSnackbar(`Successfully deleted ${id}.`, {\n variant: \"success\"\n });\n }\n }.bind(this)\n )\n .catch(function(error) {\n enqueueSnackbar(\"Failed deleting exception.\", {\n variant: \"error\"\n });\n });\n }.bind(this)\n );\n this.props.deleteToggle(deleteType);\n };\n\n render() {\n const { deleteType } = this.props;\n let deleteText = \"\";\n if (deleteType !== \"alert\") {\n deleteText = ` ${deleteType}: ${this.props.id}`;\n } else if (deleteType === \"alert\") {\n let deleteTempArray = this.props.alertsSelected.map(function(alert) {\n return {alert.id};\n });\n deleteText = (\n \n {deleteType}(s) : {deleteTempArray}\n \n );\n }\n return (\n \n
\n \n\n

\n Are you sure you want to delete {deleteText}?\n

\n
\n
\n \n \n
\n \n );\n }\n}\n\nexport class DeleteEntry extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n key: props.id\n };\n\n this.toggle = this.toggle.bind(this);\n }\n\n toggle() {\n $.ajax({\n type: \"delete\",\n url: \"scot/api/v2/entry/\" + this.props.entryid,\n success: function(data) {\n console.log(\"success: \" + data);\n let key = this.state.key;\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to delete entry\", data);\n }.bind(this)\n });\n this.props.deleteToggle();\n }\n\n render() {\n return (\n \n
\n \n

\n Are you sure you want to delete Entry: {this.props.entryid}?\n

\n
\n
\n \n \n
\n \n );\n }\n}\n\n// The type signature for things to be deleted\nconst thingType = PropTypes.shape({\n type: PropTypes.string.isRequired,\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired\n});\n\nexport default class DeleteModal extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n deleteButton: ACTION_BUTTONS.READY\n };\n\n this.deleteAll = this.deleteAll.bind(this);\n }\n\n static propTypes = {\n things: PropTypes.oneOfType([thingType, PropTypes.arrayOf(thingType)])\n .isRequired,\n errorToggle: PropTypes.func.isRequired,\n callback: PropTypes.func.isRequired\n };\n\n deleteAll() {\n this.setState({\n deleteButton: ACTION_BUTTONS.LOADING\n });\n\n let success = true;\n\n let { things } = this.props;\n if (!Array.isArray(things)) {\n things = [things];\n }\n\n $.when(...things.map(thing => this.deleteAjax(thing)))\n .then(\n // Success\n () => {\n this.setState({\n deleteButton: ACTION_BUTTONS.SUCCESS\n });\n },\n // Failure\n error => {\n console.error(error);\n this.setState({\n deleteButton: ACTION_BUTTONS.ERROR\n });\n this.props.errorToggle(\"error deleting\", error);\n success = false;\n }\n )\n .always(() => {\n setTimeout(() => {\n this.setState({\n deleteButton: ACTION_BUTTONS.READY\n });\n\n this.props.callback(success);\n }, 2000);\n });\n }\n\n deleteAjax(thing) {\n return $.ajax({\n type: \"delete\",\n url: \"/scot/api/v2/\" + thing.type + \"/\" + thing.id,\n contentType: \"application/json; charset=UTF-8\"\n });\n }\n\n render() {\n let { things } = this.props;\n let confirmText = \"\";\n\n if (Array.isArray(things)) {\n confirmText = things\n .map(thing => `${thing.type}: ${thing.id}`)\n .join(\", \");\n } else {\n confirmText = `${things.type}: ${things.id}`;\n }\n\n const { deleteButton } = this.state;\n\n return (\n \n
\n \n

\n Are you sure you want to delete {confirmText}?\n

\n
\n
\n \n \n {deleteButton.text ? deleteButton.text : \"Delete\"}\n \n
\n \n );\n }\n}\n\nconst DeleteThingComponent = withSnackbar(DeleteThing);\nexport { DeleteThingComponent };\n","import $ from \"jquery\";\nimport * as SessionStorage from \"../utils/session_storage\";\nimport React from \"react\";\nimport Modal from \"react-modal\";\nimport Button from \"react-bootstrap/lib/Badge\";\nimport DropdownButton from \"react-bootstrap/lib/DropdownButton\";\nimport MenuItem from \"react-bootstrap/lib/MenuItem\";\n\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n\nexport default class Owner extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n currentOwner: this.props.data,\n whoami: undefined,\n ownerToolbar: false\n };\n }\n\n componentDidMount = () => {\n let whoami = SessionStorage.getSessionStorage(\"whoami\");\n if (whoami) {\n this.setState({ whoami: whoami });\n }\n };\n\n componentWillReceiveProps = () => {\n this.setState({ currentOwner: this.props.data });\n };\n\n toggle = () => {\n if (this.state.whoami !== undefined) {\n let json = { owner: this.state.whoami };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {},\n error: function(data) {\n this.props.errorToggle(\"Failed to change owner\", data);\n }.bind(this)\n });\n } else {\n this.props.errorToggle(\"Failed to detect current user\");\n }\n this.ownerToggle();\n };\n\n ownerToggle = () => {\n if (this.state.ownerToolbar === false) {\n this.setState({ ownerToolbar: true });\n } else {\n this.setState({ ownerToolbar: false });\n }\n };\n\n render = () => {\n return (\n
\n \n \n Take Ownership\n \n \n {this.state.ownerToolbar ? (\n \n
\n \n

Take Ownership

\n
\n
\n Are you sure you want to take ownership of this event?\n
\n
\n \n \n
\n \n ) : null}\n
\n );\n };\n}\n","import React from \"react\";\nlet Modal = require(\"react-modal\");\nlet Button = require(\"react-bootstrap/lib/Button\");\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n\nexport default class Entities extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n entitiesBody: true\n };\n }\n\n render = () => {\n return (\n
\n \n
\n \n

List of Entities

\n
\n \n {this.state.entitiesBody ? (\n \n ) : null}\n
\n
\n \n
\n \n
\n );\n };\n}\n\nclass EntitiesData extends React.Component {\n render = () => {\n let rows = [];\n let data = this.props.data;\n let originalobj = {};\n originalobj[\"entities\"] = {};\n let obj = originalobj.entities;\n for (let prop in data) {\n let subobj = {};\n let type = data[prop].type;\n let id = data[prop].id;\n let value = prop;\n subobj[id] = value;\n if (obj.hasOwnProperty(type)) {\n obj[type].push(subobj);\n } else {\n let arr = [];\n arr.push(subobj);\n obj[type] = arr;\n }\n }\n for (let prop in obj) {\n let type = prop;\n let value = obj[prop];\n rows.push(\n \n );\n }\n return
{rows}
;\n };\n}\n\nclass EntitiesDataHeaderIterator extends React.Component {\n render = () => {\n let rows = [];\n let type = this.props.type;\n let value = this.props.value;\n for (let i = 0; i < value.length; i++) {\n let eachValue = value[i];\n let entityId = null;\n let entityValue = null;\n for (let prop in eachValue) {\n entityId = prop;\n entityValue = eachValue[prop];\n }\n rows.push(\n \n );\n }\n return (\n
\n

{type}

\n \n {rows}\n
\n \n );\n };\n}\n\nclass EntitiesDataValueIterator extends React.Component {\n toggle = () => {\n this.props.flairToolbarToggle(\n this.props.entityId,\n this.props.entityValue,\n \"entity\"\n );\n };\n\n render = () => {\n let entityValue = this.props.entityValue;\n return (\n \n {entityValue}\n
\n
\n );\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nimport ReactTime from \"react-time\";\nimport Modal from \"react-modal\";\nimport Button from \"react-bootstrap/lib/Button\";\n\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n\nexport default class ChangeHistory extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n historyBody: false,\n data: \"\"\n };\n }\n\n componentDidMount = () => {\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/\" + this.props.type + \"/\" + this.props.id + \"/history\",\n success: function(result) {\n this.setState({ historyBody: true, data: result.records });\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to get change history\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n return (\n
\n \n
\n \n

{this.props.subjectType} Change History

\n
\n \n {this.state.historyBody ? (\n \n ) : null}\n
\n
\n \n
\n \n \n );\n };\n}\n\nclass ChangeHistoryData extends React.Component {\n render = () => {\n let rows = [];\n let data = this.props.data;\n for (let prop in data) {\n rows.push();\n }\n return
{rows}
;\n };\n}\n\nclass ChangeHistoryDataIterator extends React.Component {\n render = () => {\n let data = this.props.data;\n return (\n
\n ID: {data.id} -{\" \"}\n -{\" \"}\n {data.who} - {data.what}\n
\n );\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nimport ReactTime from 'react-time'\nimport Modal from 'react-modal'\nimport Button from 'react-bootstrap/lib/Button'\nlet type;\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n\nexport default class ViewedByHistory extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n historyBody: false,\n data: \"\"\n };\n }\n componentDidMount() {\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n success: function (result) {\n this.setState({ historyBody: true, data: result });\n }.bind(this),\n error: function (data) {\n this.props.errorToggle(\"failed to get user change history\", data);\n }.bind(this)\n });\n };\n\n render() {\n return (\n
\n \n
\n \n

{this.props.subjectType} Viewed By

\n
\n \n {this.state.historyBody ? (\n \n ) : null}\n
\n
\n \n
\n \n \n );\n };\n}\n\nclass ViewedByHistoryData extends React.Component {\n render() {\n let rows = [];\n let data = this.props.data;\n for (let prop in data.view_history) {\n rows.push(\n \n );\n }\n return (\n
{rows}
\n );\n };\n}\n\nclass ViewedByHistoryDataIterator extends React.Component {\n render() {\n let data = this.props.data;\n let prop = this.props.prop;\n return (\n
\n {prop} at{\" \"}\n {\" \"}\n from IP: {data.where}\n
\n );\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\nimport Button from \"react-bootstrap/lib/Button\";\nconst ReactTags = require('react-tag-input').WithContext;\n\nexport default class SelectedPermission extends React.Component {\n constructor(props) {\n super(props);\n this.state = { readPermissionEntry: false, modifyPermissionEntry: false };\n }\n\n toggleNewReadPermission = () => {\n if (this.state.readPermissionEntry === false) {\n this.setState({ readPermissionEntry: true });\n } else if (this.state.readPermissionEntry === true) {\n this.setState({ readPermissionEntry: false });\n }\n };\n\n toggleNewModifyPermission = () => {\n if (this.state.modifyPermissionEntry === false) {\n this.setState({ modifyPermissionEntry: true });\n } else if (this.state.modifyPermissionEntry === true) {\n this.setState({ modifyPermissionEntry: false });\n }\n };\n\n permissionsfunc = permissionData => {\n console.log(permissionData.groups);\n let writepermissionsarr = [];\n let readpermissionsarr = [];\n let readwritepermissionsarr = [];\n for (let prop in permissionData.groups) {\n let fullprop = permissionData.groups[prop];\n if (prop === \"read\") {\n permissionData.groups[prop].forEach(function (fullprop) {\n readpermissionsarr.push(fullprop);\n });\n } else if (prop === \"modify\") {\n permissionData.groups[prop].forEach(function (fullprop) {\n writepermissionsarr.push(fullprop);\n });\n }\n }\n readwritepermissionsarr.push(readpermissionsarr);\n readwritepermissionsarr.push(writepermissionsarr);\n return readwritepermissionsarr;\n };\n\n render = () => {\n let modifyRows = [];\n let readRows = [];\n let permissionData = this.props.permissionData;\n let data = this.permissionsfunc(permissionData); //pos 0 is read and pos 1 is write\n let id = this.props.id;\n let type = this.props.type;\n if (data[0] !== undefined) {\n for (let i = 0; i < data[0].length; i++) {\n let read_modify = \"read\";\n readRows.push(\n \n );\n }\n }\n if (data[1] !== undefined) {\n for (let i = 0; i < data[1].length; i++) {\n let read_modify = \"modify\";\n modifyRows.push(\n \n );\n }\n }\n if (type === \"entry\") {\n return (\n
\n \n Read Groups: {readRows}\n {this.state.readPermissionEntry ? (\n \n \n \n ) : null}\n {this.state.readPermissionEntry ? (\n \n \n \n ) : (\n \n \n \n )}\n Modify Groups: \n {modifyRows}\n {this.state.modifyPermissionEntry ? (\n \n \n \n ) : null}\n {this.state.modifyPermissionEntry ? (\n \n \n \n ) : (\n \n \n \n )}\n \n
\n );\n } else {\n return (\n \n \n

Permissions:

\n \n Read Groups: {readRows}\n {this.state.readPermissionEntry ? (\n \n ) : null}\n {this.state.readPermissionEntry ? (\n \n \n \n ) : (\n \n \n \n )}\n Modify Groups: \n {modifyRows}\n {this.state.modifyPermissionEntry ? (\n \n ) : null}\n {this.state.modifyPermissionEntry ? (\n \n \n \n ) : (\n \n \n \n )}\n \n \n );\n }\n };\n}\n\nclass PermissionIterator extends React.Component {\n permissionDelete = () => {\n let newPermission = {};\n let tempArr = [];\n let data = this.props.data;\n let dataRead = this.props.dataRead;\n let dataModify = this.props.dataModify;\n if (this.props.read_modify === \"read\") {\n for (let i = 0; i < dataRead.length; i++) {\n if (dataRead[i] !== data) {\n tempArr.push(dataRead[i]);\n }\n }\n newPermission.read = tempArr;\n newPermission.modify = dataModify;\n } else if (this.props.read_modify === \"modify\") {\n for (let j = 0; j < dataModify.length; j++) {\n if (dataModify[j] !== data) {\n tempArr.push(dataModify[j]);\n }\n }\n newPermission.read = dataRead;\n newPermission.modify = tempArr;\n }\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify({ groups: newPermission }),\n contentType: \"application/json; charset=UTF-8\",\n success: function () {\n console.log(\"success\");\n },\n error: function (data) {\n this.props.errorToggle(\"error Failed to delete group\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n let data = this.props.data;\n let type = this.props.type;\n if (type === \"entry\") {\n return (\n \n {data}\n \n \n );\n } else {\n return (\n \n {data}\n \n \n );\n }\n };\n}\n\nclass NewPermission extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n suggestions: this.props.options,\n key: this.props.updateid,\n };\n\n }\n handleAddition = tag => {\n let newPermission = {};\n let dataRead = this.props.dataRead;\n let dataModify = this.props.dataModify;\n let toggle = this.props.permissionsToggle;\n if (this.props.readUpdate === 1) {\n dataRead.push(tag['text']);\n } else if (this.props.modifyUpdate === 1) {\n dataModify.push(tag['text']);\n }\n if (this.props.toggleNewModifyPermission !== undefined) {\n toggle = this.props.toggleNewModifyPermission;\n } else if (this.props.toggleNewReadPermission !== undefined) {\n toggle = this.props.toggleNewReadPermission;\n }\n newPermission.read = dataRead;\n newPermission.modify = dataModify;\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify({ groups: newPermission }),\n contentType: \"application/json; charset=UTF-8\",\n success: function () {\n console.log(\"success: permission added\");\n toggle();\n },\n error: function (data) {\n toggle();\n this.props.errorToggle(\"error Failed to add group\", data);\n }.bind(this)\n });\n };\n\n handleInputChange = input => {\n //blank until there's a lookup for group permissions\n /*let arr = [];\n this.serverRequest = $.get('/scot/api/v2/ac/source/' + input, function (result) {\n let result = result.records;\n console.log(result);\n for (let prop in result) {\n arr.push(result[prop].value)\n }\n this.setState({suggestions:arr})\n }.bind(this));*/\n };\n\n handleDelete = () => {\n //blank since buttons are handled outside of this\n };\n\n handleDrag = () => {\n //blank since buttons are handled outside of this\n };\n\n render() {\n let suggestions = this.state.suggestions;\n return (\n \n \n \n );\n };\n}\n","import React from 'react'\nimport Typography from '@material-ui/core/Typography';\nimport { withSnackbar } from 'notistack';\nimport { withStyles } from '@material-ui/core/styles';\nimport axios from 'axios'\nimport Button from '@material-ui/core/Button';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\n\nimport { Editor } from '@tinymce/tinymce-react';\n\nconst styles = theme => ({\n card: {\n minWidth: 700,\n marginBottom: 20\n },\n});\n\nclass Conflict extends React.Component {\n\n constructor(props) {\n super(props);\n this.state = {\n\n editedtext: \"\"\n }\n }\n\n componentDidMount() {\n this.setState({ editedtext: this.props.localconflict })\n }\n\n handlePUT = () => {\n const { enqueueSnackbar, id } = this.props;\n let data = {\n body: this.state.editedtext,\n target_id: this.props.targetid,\n parent: this.props.parent,\n target_type: this.props.type,\n parsed: 0\n }\n let url = `/scot/api/v2/entry/${id}`;\n axios.put(url, data)\n .then(function () {\n enqueueSnackbar(`Successfully updated entry`, { variant: 'success' });\n this.props.handleClose();\n this.props.addedEntry();\n }.bind(this))\n .catch(function (error) {\n console.log(error);\n enqueueSnackbar(`Failed updated entry.`, { variant: 'error' });\n this.props.handleClose();\n });\n }\n handleEditorChange = (e) => {\n this.setState({ editedtext: e })\n console.log(`State is now: ${this.state.editedtext}`)\n }\n\n render() {\n const { classes } = this.props;\n return (\n
\n \n \n Uh-oh! It looks like there was a conflict between your {this.props.type} and the one cached saved on server.\n
\n
\n
\n Changes on server: \n \n
\n
\n
\n Your changes: \n ]*)>/g, \"<$1span$2>\");\n }\n args.content = replaceA(args.content) + \" \";\n },\n relative_urls: false,\n remove_script_host: false,\n link_assume_external_targets: true,\n toolbar1:\n \"full screen spellchecker | undo redo | bold italic | alignleft aligncenter alignright | bullist numlist | forecolor backcolor fontsizeselect fontselect formatselect | blockquote code link image insertdatetime | customBlockquote\",\n theme: \"modern\",\n content_css: \"/css/entryeditor.css\",\n height: 250,\n verify_html: false,\n setup: function (editor) {\n function blockquote() {\n return \"


\";\n }\n\n function insertBlockquote() {\n let html = blockquote();\n editor.insertContent(html);\n }\n\n editor.addButton(\"customBlockquote\", {\n text: \"500px max-height blockquote\",\n //image: 'http://p.yusukekamiyamane.com/icons/search/fugue/icons/calendar-blue.png',\n tooltip: \"Insert a 500px max-height div (blockquote)\",\n onclick: insertBlockquote\n });\n }\n }}\n />\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n );\n }\n}\n\nexport default withSnackbar(withStyles(styles)(Conflict));","import React from \"react\";\nimport $ from \"jquery\";\nimport * as SessionStorage from \"../utils/session_storage\";\nimport { Editor } from \"@tinymce/tinymce-react\";\nimport Conflict from \"./conflict\";\nimport Dialog from \"@material-ui/core/Dialog\";\n\nlet Button = require(\"react-bootstrap/lib/Button.js\");\nlet Prompt = require(\"react-router-dom\").Prompt;\nlet Link = require(\"react-router-dom\").Link;\n\nexport default class AddEntryModal extends React.Component {\n constructor(props) {\n super(props);\n let key = new Date();\n key = key.getTime();\n let tinyID = \"tiny_\" + key;\n let content;\n let asyncContentLoaded;\n switch (this.props.entryAction) {\n case \"Add\":\n content = \"\";\n asyncContentLoaded = true;\n break;\n case \"Reply\":\n content = \"\";\n asyncContentLoaded = true;\n break;\n case \"Copy To Entry\":\n content = this.props.content;\n asyncContentLoaded = true;\n break;\n case \"Edit\":\n content = \"\";\n asyncContentLoaded = false;\n break;\n case \"Export\":\n content = this.props.content;\n asyncContentLoaded = true;\n break;\n default:\n content = \"\";\n asyncContentLoaded = true;\n break;\n }\n\n this.state = {\n tinyID: tinyID,\n key: key,\n content: content,\n asyncContentLoaded: asyncContentLoaded,\n leaveCatch: true,\n whoami: undefined,\n recentlyUpdated: 0,\n showConflict: false,\n localcontent: \"\"\n };\n }\n\n componentDidMount = () => {\n let whoami = SessionStorage.getSessionStorage(\"whoami\");\n if (whoami) {\n this.setState({ whoami: whoami });\n }\n\n if (this.props.entryAction === \"Edit\") {\n $.ajax({\n type: \"GET\",\n url: \"/scot/api/v2/entry/\" + this.props.id,\n success: function(response) {\n this.setState({\n content: response.body,\n asyncContentLoaded: true,\n recentlyUpdated: response.updated\n });\n this.forceUpdate();\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\n \"Error getting original data from source. Copy/Paste original\",\n data\n );\n this.setState({\n content:\n \"Error getting original data from source. Copy/Paste original\",\n asyncContentLoaded: true\n });\n this.forceUpdate();\n }.bind(this)\n });\n }\n if ($(\"#not_saved_entry_\" + this.state.key).position()) {\n $(\".entry-wrapper\").scrollTop(\n $(\".entry-wrapper\").scrollTop() +\n $(\"#not_saved_entry_\" + this.state.key).position().top\n );\n }\n };\n\n // shouldComponentUpdate = () => {\n // return false; //prevent updating this component because it causes the page container to scroll upwards and lose focus due to a bug in paste_preprocess. If this is removed it will cause abnormal scrolling.\n // };\n\n onCancel = () => {\n this.setState({ leaveCatch: false });\n this.props.addedentry();\n this.setState({ change: false });\n };\n\n submit = () => {\n if (\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .text() === \"\" &&\n $(\"#\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .find(\"img\").length === 0\n ) {\n alert(\"Please Add Some Text\");\n } else {\n if (this.props.entryAction === \"Reply\") {\n var data = {};\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .each(function(x, y) {\n $(y)\n .find(\"img\")\n .each(function(key, value) {\n if ($(value)[0].src.startsWith(\"blob\")) {\n //Checking to see if it's a locally copied file\n let canvas = document.createElement(\"canvas\");\n let set = new Image();\n set = $(value);\n canvas.width = set[0].width;\n canvas.height = set[0].height;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(set[0], 0, 0);\n let dataURL = canvas.toDataURL(\"image/png\");\n $(value).attr(\"src\", dataURL);\n }\n });\n });\n data = JSON.stringify({\n parent: Number(this.props.id),\n body: $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .html(),\n target_id: Number(this.props.targetid),\n target_type: this.props.type,\n tlp: \"unset\"\n });\n $.ajax({\n type: \"post\",\n url: \"/scot/api/v2/entry\",\n data: data,\n contentType: \"application/json; charset=UTF-8\",\n dataType: \"json\",\n success: function(response) {\n this.setState({ leaveCatch: false });\n this.props.addedentry();\n }.bind(this),\n error: function(response) {\n this.props.errorToggle(\"Failed to add entry.\", response);\n }.bind(this)\n });\n } else if (this.props.entryAction === \"Edit\") {\n $.ajax({\n type: \"GET\",\n url: \"/scot/api/v2/entry/\" + this.props.id,\n success: function(response) {\n if (this.state.recentlyUpdated !== response.updated) {\n this.forEdit(false);\n this.setState({\n showConflict: true,\n remoteconflict: response.body\n });\n } else {\n this.forEdit(true);\n }\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"failed to get data for edit\", data);\n }.bind(this)\n });\n } else if (this.props.type === \"alert\") {\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .each(function(x, y) {\n $(y)\n .find(\"img\")\n .each(function(key, value) {\n if ($(value)[0].src.startsWith(\"blob\")) {\n //Checking if it's a locally copied file\n let canvas = document.createElement(\"canvas\");\n let set = new Image();\n set = $(value);\n canvas.width = set[0].width;\n canvas.height = set[0].height;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(set[0], 0, 0);\n let dataURL = canvas.toDataURL(\"image/png\");\n $(value).attr(\"src\", dataURL);\n }\n });\n });\n data = JSON.stringify({\n body: $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .html(),\n target_id: Number(this.props.targetid),\n target_type: \"alert\",\n tlp: \"unset\",\n parent: 0\n });\n $.ajax({\n type: \"post\",\n url: \"/scot/api/v2/entry\",\n data: data,\n contentType: \"application/json; charset=UTF-8\",\n dataType: \"json\",\n success: function(response) {\n this.setState({ leaveCatch: false });\n this.props.addedentry();\n this.props.toggleVisibility();\n }.bind(this),\n error: function(response) {\n this.props.errorToggle(\"Failed to add entry.\", response);\n }.bind(this)\n });\n } else {\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .each(function(x, y) {\n $(y)\n .find(\"img\")\n .each(function(key, value) {\n if ($(value)[0].src.startsWith(\"blob\")) {\n //Checking if its a locally copied file\n let canvas = document.createElement(\"canvas\");\n let set = new Image();\n set = $(value);\n canvas.width = set[0].width;\n canvas.height = set[0].height;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(set[0], 0, 0);\n let dataURL = canvas.toDataURL(\"image/png\");\n $(value).attr(\"src\", dataURL);\n }\n });\n });\n data = {\n parent: 0,\n body: $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .html(),\n target_id: Number(this.props.targetid),\n target_type: this.props.type,\n tlp: \"unset\"\n };\n $.ajax({\n type: \"post\",\n url: \"/scot/api/v2/entry\",\n data: JSON.stringify(data),\n contentType: \"application/json; charset=UTF-8\",\n dataType: \"json\",\n success: function(response) {\n this.setState({ leaveCatch: false });\n this.props.addedentry();\n }.bind(this),\n error: function(response) {\n this.props.errorToggle(\"Failed to add entry.\", response);\n }.bind(this)\n });\n }\n }\n };\n\n exportContent = () => {\n if (this.props.recipients.length > 0) {\n var data = {};\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .each(function(x, y) {\n $(y)\n .find(\"img\")\n .each(function(key, value) {\n if ($(value)[0].src.startsWith(\"blob\")) {\n //Checking to see if it's a locally copied file\n let canvas = document.createElement(\"canvas\");\n let set = new Image();\n set = $(value);\n canvas.width = set[0].width;\n canvas.height = set[0].height;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(set[0], 0, 0);\n let dataURL = canvas.toDataURL(\"image/png\");\n $(value).attr(\"src\", dataURL);\n }\n });\n });\n data = JSON.stringify({\n body: $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .html(),\n to: this.props.recipients,\n thing: this.props.type\n });\n $.ajax({\n type: \"post\",\n url: \"/scot/api/v2/sendexport\",\n data: data,\n contentType: \"application/json; charset=UTF-8\",\n dataType: \"json\",\n success: function() {\n this.setState({ leaveCatch: false });\n this.props.exportResponse(\"success\");\n }.bind(this),\n error: function(response) {\n this.props.errorToggle(\n \"Failed to export \" + this.props.type,\n response\n );\n this.props.exportResponse(\"error\");\n }.bind(this)\n });\n } else {\n this.props.errorToggle(\"Please enter a valid email address\");\n }\n };\n\n handleClose = () => {\n this.setState({ showConflict: false });\n };\n\n forEdit = set => {\n if (set) {\n $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .each(function(x, y) {\n $(y)\n .find(\"img\")\n .each(function(key, value) {\n if ($(value)[0].src.startsWith(\"blob\")) {\n //Checking if its a lcoally copied file\n let canvas = document.createElement(\"canvas\");\n let set = new Image();\n set = $(value);\n canvas.width = set[0].width;\n canvas.height = set[0].height;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(set[0], 0, 0);\n let dataURL = canvas.toDataURL(\"image/png\");\n $(value).attr(\"src\", dataURL);\n }\n });\n });\n let data = {\n parent: Number(this.props.parent),\n body: $(\"#tiny_\" + this.state.key + \"_ifr\")\n .contents()\n .find(\"#tinymce\")\n .html(),\n target_id: Number(this.props.targetid),\n target_type: this.props.type,\n parsed: 0\n };\n $.ajax({\n type: \"put\",\n url: \"/scot/api/v2/entry/\" + this.props.id,\n data: JSON.stringify(data),\n contentType: \"application/json; charset=UTF-8\",\n dataType: \"json\",\n success: function(response) {\n this.setState({ leaveCatch: false });\n this.props.addedentry();\n }.bind(this),\n error: function(response) {\n this.props.errorToggle(\"Failed to edit entry.\", response);\n }.bind(this)\n });\n }\n };\n\n handleEditorChange = e => {\n this.setState({ localcontent: e });\n };\n\n render = () => {\n let not_saved_entry_id = \"not_saved_entry_\" + this.state.key;\n return (\n
\n {this.state.showConflict ? (\n \n \n \n ) : null}\n \n
\n
\n [\n \n Not_Saved_0\n \n ]by {this.state.whoami}\n \n {this.props.entryAction === \"Export\" ? (\n \n Export\n \n ) : (\n \n Submit\n \n )}\n \n \n
\n
\n {this.state.asyncContentLoaded ? (\n ]*)>/g, \"<$1span$2>\");\n }\n args.content = replaceA(args.content) + \" \";\n },\n paste_postprocess: (plugin, args) => {\n args.node.querySelectorAll(\"table\").forEach(tableNode => {\n tableNode.setAttribute(\"border\", \"1\");\n tableNode.setAttribute(\"cellpadding\", \"1\");\n tableNode.setAttribute(\"cellspacing\", \"0\");\n });\n },\n relative_urls: false,\n remove_script_host: false,\n link_assume_external_targets: true,\n toolbar1:\n \"full screen | undo redo | bold italic | alignleft aligncenter alignright | bullist numlist | forecolor backcolor fontsizeselect fontselect formatselect | blockquote code link image insertdatetime | customBlockquote | codesample\",\n content_css: \"/css/entryeditor.css\",\n height: 250,\n verify_html: false,\n setup: function(editor) {\n function blockquote() {\n return \"


\";\n }\n\n function insertBlockquote() {\n let html = blockquote();\n editor.insertContent(html);\n }\n editor.ui.registry.addMenuButton(\"customBlockquote\", {\n text: \"500px max-height blockquote\",\n //image: 'http://p.yusukekamiyamane.com/icons/search/fugue/icons/calendar-blue.png',\n tooltip: \"Insert a 500px max-height div (blockquote)\",\n fetch: insertBlockquote\n // onclick: insertBlockquote\n });\n }\n }}\n />\n ) : (\n
Loading Editor...
\n )}\n
\n \n \n );\n };\n}\n","import React from \"react\";\nimport * as SessionStorage from \"../utils/session_storage\";\nimport $ from \"jquery\";\nimport Dropzone from \"react-dropzone\";\nlet Button = require(\"react-bootstrap/lib/Button.js\");\nlet Link = require(\"react-router-dom\").Link;\nlet finalfiles = [];\n\nexport default class FileUpload extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n files: [],\n edit: false,\n stagecolor: \"#000\",\n enable: true,\n addentry: true,\n saved: true,\n enablesave: true,\n whoami: undefined\n };\n }\n\n componentDidMount() {\n let whoami = SessionStorage.getSessionStorage(\"whoami\");\n if (whoami) {\n this.setState({ whoami: whoami });\n }\n\n $(\".entry-wrapper\").scrollTop(\n $(\".entry-wrapper\").scrollTop() +\n $(\"#not_saved_entry_\" + this.props.id).position().top\n );\n }\n\n render() {\n let not_saved_entry_id = \"not_saved_entry_\" + this.props.id;\n return (\n
\n \n
\n
\n [\n \n Not_Saved_0\n \n ]by {this.state.whoami}\n \n \n \n \n
\n
\n \n {({ getRootProps, getInputProps }) => (\n
\n \n \n

Drag 'n' drop some files here, or click to select files

\n
\n \n )}\n \n {this.state.files ? (\n
\n {\" \"}\n {this.state.files.map(\n function(file) {\n return (\n \n
  • \n

    {file.name}

    \n \n x\n \n
  • \n \n );\n }.bind(this)\n )}\n
    \n ) : null}\n \n \n );\n }\n\n onCancel = () => {\n finalfiles = [];\n this.props.fileUploadToggle();\n };\n\n Close = i => {\n for (let x = 0; x < finalfiles.length; x++) {\n if (i.target.id === finalfiles[x].name) {\n finalfiles.splice(x, 1);\n }\n }\n this.setState({ files: finalfiles });\n };\n\n onDrop = files => {\n for (let i = 0; i < files.length; i++) {\n finalfiles.push(files[i]);\n }\n console.log(files);\n this.setState({ files: finalfiles });\n };\n\n submit = () => {\n if (finalfiles.length > 0) {\n for (let i = 0; i < finalfiles.length; i++) {\n let data = new FormData();\n data.append(\"upload\", finalfiles[i]);\n data.append(\"target_type\", this.props.type);\n data.append(\"target_id\", Number(this.props.targetid));\n if (this.props.entryid != null) {\n data.append(\"entry_id\", this.props.entryid);\n }\n let xhr = new XMLHttpRequest();\n xhr.addEventListener(\"progress\", this.uploadProgress);\n xhr.addEventListener(\"load\", this.uploadComplete);\n xhr.addEventListener(\"error\", this.uploadFailed);\n xhr.addEventListener(\"abord\", this.uploadCancelled);\n xhr.open(\"POST\", \"/scot/api/v2/file\");\n console.log(data);\n xhr.send(data);\n }\n } else {\n alert(\"Select a file to upload before submitting.\");\n }\n };\n\n uploadComplete = () => {\n this.onCancel();\n };\n\n uploadFailed = () => {\n this.props.errorToggle(\"An error occured. Upload failed.\");\n };\n}\n","import React from \"react\";\nimport $ from \"jquery\";\n\nexport default class Summary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n key: this.props.id\n };\n }\n\n toggle = () => {\n let newClass;\n if (this.props.summary === 1) {\n newClass = \"entry\";\n } else if (this.props.summary === 0) {\n newClass = \"summary\";\n }\n let json = { class: newClass };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/entry/\" + this.props.entryid,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n console.log(\"success: \" + data);\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to make summary\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n let summaryDisplay = \"Summary Loading...\";\n let onClick;\n if (this.props.summary === 0) {\n summaryDisplay = \"Make Summary\";\n onClick = this.toggle;\n } else if (this.props.summary === 1) {\n summaryDisplay = \"Remove Summary\";\n onClick = this.toggle;\n }\n return (\n \n {summaryDisplay}\n \n );\n };\n}\n","import React from \"react\";\nimport * as SessionStorage from \"../utils/session_storage\";\nimport $ from \"jquery\";\n\nexport default class Task extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n whoami: undefined\n };\n }\n\n componentDidMount = () => {\n let whoami = SessionStorage.getSessionStorage(\"whoami\");\n this.setState({ whoami: whoami });\n };\n\n makeTask = () => {\n let json = { make_task: 1 };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/entry/\" + this.props.entryid,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n console.log(\"success: \" + data);\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to close task\", data);\n }.bind(this)\n });\n };\n\n closeTask = () => {\n let json = { close_task: 1 };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/entry/\" + this.props.entryid,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n console.log(\"success: \" + data);\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to close task\", data);\n }.bind(this)\n });\n };\n\n takeTask = () => {\n let json = { take_task: 1 };\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/entry/\" + this.props.entryid,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n console.log(\"success: \" + data);\n },\n error: function(data) {\n this.props.errorToggle(\"Failed to make Task owner\", data);\n }.bind(this)\n });\n };\n\n render = () => {\n let taskDisplay = \"Task Loading...\";\n let onClick;\n if (this.props.taskData.class === \"task\") {\n if (\n this.props.taskData.metadata.task.status === undefined ||\n this.props.taskData.metadata.task.status === null ||\n this.props.taskData.class !== \"task\"\n ) {\n taskDisplay = \"Make Task\";\n onClick = this.makeTask;\n } else if (\n this.state.whoami !== this.props.taskData.metadata.task.who &&\n this.props.taskData.metadata.task.status === \"open\"\n ) {\n taskDisplay = \"Assign task to me\";\n onClick = this.takeTask;\n } else if (\n this.state.whoami === this.props.taskData.metadata.task.who &&\n this.props.taskData.metadata.task.status === \"open\"\n ) {\n taskDisplay = \"Close Task\";\n onClick = this.closeTask;\n } else if (\n this.props.taskData.metadata.task.status === \"closed\" ||\n this.props.taskData.metadata.task.status === \"completed\"\n ) {\n taskDisplay = \"Reopen Task\";\n onClick = this.makeTask;\n } else if (\n this.state.whoami === this.props.taskData.metadata.task.who &&\n this.props.taskData.metadata.task.status === \"assigned\"\n ) {\n taskDisplay = \"Close Task\";\n onClick = this.closeTask;\n } else if (\n this.state.whoami !== this.props.taskData.metadata.task.who &&\n this.props.taskData.metadata.task.status === \"assigned\"\n ) {\n taskDisplay = \"Assign task to me\";\n onClick = this.takeTask;\n }\n } else {\n taskDisplay = \"Make Task\";\n onClick = this.makeTask;\n }\n return (\n \n {taskDisplay}\n \n );\n };\n}\n","import React from \"react\";\nimport Modal from \"react-modal\";\nimport Button from \"react-bootstrap/lib/Button\";\n\nconst customStyles = {\n content: {\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n marginRight: \"-50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n\nexport default class LinkWarning extends React.Component {\n proceed = () => {\n window.open(this.props.link, '_blank' ).opener = null;\n this.props.linkWarningToggle();\n };\n\n apiOnly = () => {\n this.props.linkWarningToggle();\n fetch(this.props.link);\n alert(\"Request Submitted. Refresh entity display to see results\");\n};\n\n componentWillMount = () => {\n if ( this.props.nopop === \"true\" ) { \n this.apiOnly();\n return; \n }\n let myDomain = window.location.href;\n let reg = new RegExp(\n /((https?|ftp):\\/\\/[a-zA-Z0-9\\-_\\.]+\\.)?([a-zA-Z0-9\\-_\\.]+\\.([a-zA-Z]{1,63}))/,\n \"i\"\n );\n let linkRegResult = this.props.link.match(reg);\n let myDomainRegResult = myDomain.match(reg);\n if (linkRegResult != undefined && myDomainRegResult != undefined) {\n let linkDomain = linkRegResult[3];\n let myDomain = myDomainRegResult[3];\n if (linkDomain === myDomain) {\n this.proceed();\n }\n } else if (linkRegResult == undefined) {\n this.proceed();\n }\n /*\n if ($.isUrlInternal(this.props.link)) {\n this.proceed();\n }*/\n };\n render = () => {\n return (\n
    \n \n
    \n \n

    Browse to site?

    \n
    \n
    \n The link you clicked may take you to a site outside SCOT. If this is\n a link an attacker controls you may be tipping your hand.\n
    \n {this.props.link}\n
    \n
    \n \n \n
    \n \n
    \n );\n };\n}\n","import React from 'react';\nimport brace from 'brace';\nimport AceEditor from 'react-ace';\nimport Button from 'react-bootstrap/lib/Button.js';\nimport DropdownButton from 'react-bootstrap/lib/DropdownButton.js';\nimport OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger.js';\nimport ButtonGroup from 'react-bootstrap/lib/ButtonGroup.js';\nimport MenuItem from 'react-bootstrap/lib/MenuItem.js';\nimport Popover from 'react-bootstrap/lib/Popover.js';\nimport $ from 'jquery'\nimport 'brace/mode/bro';\nimport 'brace/mode/javascript';\nimport 'brace/mode/java';\nimport 'brace/mode/python';\nimport 'brace/mode/xml';\nimport 'brace/mode/ruby';\nimport 'brace/mode/sass';\nimport 'brace/mode/markdown';\nimport 'brace/mode/mysql';\nimport 'brace/mode/json';\nimport 'brace/mode/html';\nimport 'brace/mode/c_cpp';\nimport 'brace/mode/csharp';\nimport 'brace/mode/perl';\nimport 'brace/mode/powershell';\nimport 'brace/mode/yaml';\nimport 'brace/theme/github';\nimport 'brace/theme/monokai';\nimport 'brace/theme/kuroir';\nimport 'brace/theme/solarized_dark';\nimport 'brace/theme/solarized_light';\nimport 'brace/theme/terminal';\nimport 'brace/theme/textmate';\nimport 'brace/theme/tomorrow';\nimport 'brace/theme/twilight';\nimport 'brace/theme/xcode';\nimport 'brace/keybinding/vim';\nimport 'brace/keybinding/emacs';\nimport * as Cookies from \"../utils/cookies\"\n\n\nexport default class SignatureTable extends React.Component {\n constructor(props) {\n super(props);\n let key = new Date();\n key = key.getTime();\n let value = '';\n let currentKeyboardHandler = 'none';\n let currentLanguageMode = 'java';\n let currentEditorTheme = 'github';\n let viewVersionid = this.props.headerData.prod_sigbody_id;\n let viewSigBodyid;\n if (Cookies.checkCookie('signatureKeyboardHandler') != undefined) {\n currentKeyboardHandler = Cookies.checkCookie('signatureKeyboardHandler');\n }\n if (Cookies.checkCookie('signatureLanguageMode') != undefined) {\n currentLanguageMode = Cookies.checkCookie('signatureLanguageMode');\n }\n if (Cookies.checkCookie('signatureEditorTheme') != undefined) {\n currentEditorTheme = Cookies.checkCookie('signatureEditorTheme');\n }\n if (Object.keys(this.props.headerData.version).length !== 0) {\n if (this.props.headerData.version[this.props.headerData.prod_sigbody_id] != undefined || this.props.headerData.version[this.props.headerData.prod_sigbody_id] == 0) {\n value = this.props.headerData.version[this.props.headerData.prod_sigbody_id].body;\n viewSigBodyid = this.props.headerData.version[this.props.headerData.prod_sigbody_id].id;\n } else {\n for (let key in this.props.headerData.version) {\n if (key < viewVersionid) {\n continue;\n } else {\n viewVersionid = key;\n value = this.props.headerData.version[key].body;\n viewSigBodyid = this.props.headerData.version[key].id;\n }\n }\n }\n }\n this.state = {\n readOnly: true,\n value: value,\n signatureData: this.props.headerData,\n loaded: true,\n viewSigBodyid: viewSigBodyid,\n viewVersionid: viewVersionid,\n lastViewVersionid: null,\n key: key,\n cursorEnabledDisabled: \"cursorDisabled\",\n keyboardHandlers: [\"none\", \"vim\", \"emacs\"],\n currentKeyboardHandler: currentKeyboardHandler,\n languageModes: [\n \"bro\",\n \"csharp\",\n \"c_cpp\",\n \"html\",\n \"javascript\",\n \"java\",\n \"json\",\n \"markdown\",\n \"mysql\",\n \"perl\",\n \"powershell\",\n \"python\",\n \"ruby\",\n \"sass\",\n \"xml\",\n \"yaml\"\n ],\n currentLanguageMode: currentLanguageMode,\n editorThemes: [\n \"github\",\n \"monokai\",\n \"kuroir\",\n \"solarized_dark\",\n \"solarized_light\",\n \"terminal\",\n \"textmate\",\n \"tomorrow\",\n \"twilight\",\n \"xcode\"\n ],\n currentEditorTheme: currentEditorTheme,\n ajaxType: null\n };\n\n }\n onChange = value => {\n this.setState({ value: value });\n }\n\n submitSigBody = e => {\n let url = 'scot/api/v2/sigbody/';\n let versionid = this.state.viewVersionid; //version revision if creating a new sigbody\n if (this.state.ajaxType == 'put') {\n versionid = this.state.viewSigBodyid; //version id (not revision id) if editing an existing sigbody \n url = 'scot/api/v2/sigbody/' + versionid;\n }\n $.ajax({\n type: this.state.ajaxType,\n url: url,\n data: JSON.stringify({ signature_id: parseInt(this.props.id), body: this.state.value }),\n contentType: 'application/json; charset=UTF-8',\n success: function (data) {\n console.log('successfully changed signature data');\n let viewVersionid;\n if (data.revision == undefined) { viewVersionid = this.state.viewVersionid; } else { viewVersionid = data.revision; }\n this.setState({ readOnly: true, cursorEnabledDisabled: 'cursorDisabled', ajaxType: null, viewVersionid: viewVersionid, viewSigBodyid: data.id });\n }.bind(this),\n error: function (data) {\n this.props.errorToggle('Failed to create/update sigbody', data);\n }.bind(this)\n });\n }\n\n componentWillReceiveProps = nextProps => {\n this.setState({ signatureData: nextProps.headerData });\n }\n\n editSigBody = e => {\n this.setState({ readOnly: false, lastViewVersionid: this.state.viewVersionid, cursorEnabledDisabled: 'cursorEnabled', ajaxType: 'put' });\n }\n\n createNewSigBody = () => {\n this.setState({ readOnly: false, viewVersionid: null, lastViewVersionid: this.state.viewVersionid, value: '', cursorEnabledDisabled: 'cursorEnabled', ajaxType: 'post' });\n }\n\n createNewSigBodyFromSig = () => {\n this.setState({ readOnly: false, lastViewVersionid: this.state.viewVersionid, cursorEnabledDisabled: 'cursorEnabled', ajaxType: 'post', viewVersionid: null });\n }\n\n Cancel = () => {\n let value = '';\n if (Object.keys(this.state.signatureData.version).length !== 0) {\n if (this.state.signatureData.version[this.state.signatureData.prod_sigbody_id] != undefined) {\n value = this.state.signatureData.version[this.state.lastViewVersionid].body;\n }\n }\n this.setState({ readOnly: true, value: value, viewVersionid: this.state.lastViewVersionid, cursorEnabledDisabled: 'cursorDisabled', ajaxType: null });\n }\n\n viewSigBody = e => {\n if (this.state.readOnly === true) {\n //only allow button click if you can't edit the signature\n this.setState({\n value: this.state.signatureData.version[e.target.id].body,\n viewVersionid: e.target.id,\n viewSigBodyid: e.target.viewSigBodyid\n });\n }\n };\n\n keyboardHandlerUpdate = e => {\n Cookies.setCookie(\"signatureKeyboardHandler\", e.target.text, 1000);\n this.setState({ currentKeyboardHandler: e.target.text });\n };\n\n languageModeUpdate = e => {\n Cookies.setCookie(\"signatureLanguageMode\", e.target.text, 1000);\n this.setState({ currentLanguageMode: e.target.text });\n };\n\n editorThemeUpdate = e => {\n Cookies.setCookie(\"signatureEditorTheme\", e.target.text, 1000);\n this.setState({ currentEditorTheme: e.target.text });\n };\n\n\n render() {\n let versionsArray = [];\n let keyboardHandlersArray = [];\n let languageModesArray = [];\n let editorThemesArray = [];\n let not_saved_signature_entry_id = 'not_saved_signature_entry_' + this.state.key;\n let currentKeyboardHandlerApplied = this.state.currentKeyboardHandler;\n let viewVersionid = [];\n let highestVersionid = 0;\n if (Object.keys(this.state.signatureData).length !== 0) {\n if (Object.keys(this.state.signatureData.version).length !== 0) {\n for (let key in this.state.signatureData.version) {\n let versionidrevision = this.state.signatureData.version[key].revision;\n let versionidrevisionprodqual = this.state.signatureData.version[key].revision;\n let versionidSigBodyid = this.state.signatureData.version[key].id;\n if (this.state.signatureData.prod_sigbody_id == versionidrevision) { versionidrevisionprodqual = versionidrevision + ' - Production'; } else if (this.state.signatureData.qual_sigbody_id == versionidrevision) { versionidrevisionprodqual = versionidrevision + ' - Quality'; } //add production and quality text to identify current status on the menu\n let disabled;\n if (this.state.readOnly == true) { disabled = false; } else { disabled = true; }\n versionsArray.push({versionidrevisionprodqual});\n if (versionidrevision > highestVersionid) { highestVersionid = versionidrevision; }\n }\n }\n }\n\n if (this.state.keyboardHandlers != undefined) {\n for (let i = 0; i < this.state.keyboardHandlers.length; i++) {\n keyboardHandlersArray.push({this.state.keyboardHandlers[i]});\n }\n }\n\n if (this.state.currentKeyboardHandler == 'none') {\n currentKeyboardHandlerApplied = null;\n }\n\n if (this.state.languageModes != undefined) {\n for (let i = 0; i < this.state.languageModes.length; i++) {\n languageModesArray.push({this.state.languageModes[i]});\n }\n }\n\n if (this.state.editorThemes != undefined) {\n for (let i = 0; i < this.state.editorThemes.length; i++) {\n editorThemesArray.push({this.state.editorThemes[i]});\n }\n }\n if (this.state.signatureData.prod_sigbody_id == this.state.viewVersionid) {\n viewVersionid.push({this.state.viewVersionid} - Production);\n } else if (this.state.signatureData.qual_sigbody_id == this.state.viewVersionid) {\n viewVersionid.push({this.state.viewVersionid} - Quality);\n } else {\n viewVersionid.push({this.state.viewVersionid});\n }\n return (\n
    \n {this.state.loaded ?\n
    \n \n
    \n
    \n
    \n
    \n Signature Body: {viewVersionid}\n \n Editor Theme:\n \n {editorThemesArray}\n \n Language Handler:\n \n {languageModesArray}\n \n\n Keyboard Handler:\n \n {keyboardHandlersArray}\n \n\n Signature Body Version:\n \n {versionsArray}\n \n {this.state.readOnly ?\n \n \n {this.state.viewVersionid != 0 ?\n \n \n :\n null\n }\n \n :\n \n \n \n \n }\n \n
    \n
    \n \n
    \n
    \n
    \n :\n
    \n Loading Signature Data...\n
    \n }\n
    \n );\n }\n}\n\nclass SignatureMetaData extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n optionsValue: JSON.stringify(this.props.signatureData.options)\n };\n }\n\n\n submitMetaData = event => {\n let k = event.target.id;\n let v = event.target.value;\n if (k == 'options' || k == 'target') {\n try { v = JSON.parse(v); }\n catch (err) { this.props.errorToggle('Failed to convert string to object. Try adding quotation marks around the key and values'); return; }\n let optionsType = typeof (v);\n if (optionsType !== 'object') { this.props.errorToggle('options need to be an object but were detected as: ' + optionsType); return; }\n } //Convery v to JSON for options as its type is JSON\n let json = {};\n json[k] = v;\n $.ajax({\n type: 'put',\n url: 'scot/api/v2/signature/' + this.props.id,\n data: JSON.stringify(json),\n contentType: 'application/json; charset=UTF-8',\n success: function (data) {\n console.log('successfully changed signature data');\n }.bind(this),\n error: function (data) {\n this.props.errorToggle('Failed to update signature metadata', data);\n }.bind(this)\n });\n }\n\n onOptionsChange = optionsValue => {\n this.setState({ optionsValue: optionsValue });\n };\n\n render() {\n\n return (\n
    \n {this.props.showSignatureOptions ?\n
    \n
    \n
    \n
    \n Signature Options\n \n
    \n
    \n \n
    \n
    \n :\n null\n }\n
    \n );\n }\n};\n\nclass SignatureGroup extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n signatureGroupValue: \"\"\n };\n }\n\n handleAddition = signature_group => {\n let newSignatureGroupArr = [];\n let data = this.props.data;\n for (let i = 0; i < data.length; i++) {\n if (data[i] != undefined) {\n if (typeof data[i] == \"string\") {\n newSignatureGroupArr.push(data[i]);\n } else {\n newSignatureGroupArr.push(data[i].value);\n }\n }\n }\n newSignatureGroupArr.push(signature_group.target.value);\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/signature/\" + this.props.id,\n data: JSON.stringify({ signature_group: newSignatureGroupArr }),\n contentType: \"application/json; charset=UTF-8\",\n success: function (data) {\n console.log(\"success: signature_group added\");\n this.setState({ signatureGroupValue: \"\" });\n }.bind(this),\n error: function (data) {\n this.props.errorToggle(\"Failed to add signature_group\", data);\n }.bind(this)\n });\n };\n\n InputChange = event => {\n this.setState({ signatureGroupValue: event.target.value });\n };\n\n handleDelete = event => {\n let data = this.props.data;\n let clickedThing = event.target.id;\n let newSignatureGroupArr = [];\n for (let i = 0; i < data.length; i++) {\n if (data[i] != undefined) {\n if (typeof (data[i]) == 'string') {\n if (data[i] != clickedThing) {\n newSignatureGroupArr.push(data[i]);\n }\n } else {\n if (data[i].value != clickedThing) {\n newSignatureGroupArr.push(data[i].value);\n }\n }\n }\n }\n $.ajax({\n type: 'put',\n url: 'scot/api/v2/signature/' + this.props.id,\n data: JSON.stringify({ 'signature_group': newSignatureGroupArr }),\n contentType: 'application/json; charset=UTF-8',\n success: function (data) {\n console.log('deleted signature_group success: ' + data);\n }.bind(this),\n error: function (data) {\n this.props.errorToggle('Failed to delete signature_group', data);\n }.bind(this)\n });\n }\n\n\n render() {\n let data = this.props.data;\n let signatureGroupArr = [];\n let value;\n for (let i = 0; i < data.length; i++) {\n if (typeof (data[i]) == 'string') {\n value = data[i];\n } else if (typeof (data[i]) == 'object') {\n if (data[i] != undefined) {\n value = data[i].value;\n }\n }\n signatureGroupArr.push({value} );\n }\n return (\n
    \n \n Signature Group:\n \n \n \n {this.state.signatureGroupValue != '' ? : }\n \n {signatureGroupArr}\n
    \n );\n }\n};\n","import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport AutoComplete from \"react-autocomplete\";\nimport $ from \"jquery\";\n\nclass AutoCompleteInput extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n suggestions: [],\n value: \"\"\n };\n\n this.HandleAdd = this.HandleAdd.bind(this);\n this.HandleInputChange = this.HandleInputChange.bind(this);\n }\n\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n value: PropTypes.array.isRequired\n };\n\n componentWillMount() {\n if (this.props.value) {\n this.setState({ value: this.props.value });\n }\n }\n\n HandleAdd(value) {\n this.setState({ value: value });\n this.props.OnChange(value);\n }\n\n HandleInputChange(input) {\n this.props.OnChange(input.target.value);\n\n this.setState({ value: input.target.value });\n\n if (input.target && input.target.value.length >= 1) {\n let arr = [];\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/ac/\" + this.props.type + \"/\" + input.target.value,\n success: function(result) {\n result = result.records;\n for (let i = 0; i < result.length; i++) {\n if (typeof result[i] === \"string\") {\n let obj = {};\n obj.label = result[i];\n arr.push(obj);\n }\n }\n\n this.setState({ suggestions: arr });\n }.bind(this),\n error: function() {\n console.log(\"failed to get autocomplete data\");\n }\n });\n }\n }\n\n render() {\n return (\n
    \n item.label}\n items={this.state.suggestions}\n renderItem={(item, isHighlighted) => (\n
    \n {item.label}\n
    \n )}\n value={this.state.value}\n onChange={this.HandleInputChange}\n onSelect={this.HandleAdd}\n menuStyle={{\n borderRadius: \"3px\",\n boxShadow: \"0 2px 12px rgba(0, 0, 0, 0.1)\",\n background: \"rgba(255, 255, 255, 0.9)\",\n padding: \"2px 0\",\n fontSize: \"90%\",\n overflow: \"auto\",\n maxHeight: \"200px\", // TODO: don't cheat, let it flow to the bottom\n top: \"unset\",\n left: \"unset\",\n position: \"absolute\"\n }}\n inputProps={{ style: { width: \"100%\" } }}\n wrapperProps={{ style: { width: \"300px\" } }}\n />\n
    \n );\n }\n}\n\nexport default AutoCompleteInput;\n","import React, { Component } from \"react\";\nimport { Modal, Button } from \"react-bootstrap\";\nimport $ from \"jquery\";\n//import TagInput from '../components/TagInput';\nimport AutoCompleteInput from \"../components/autocomplete_input.js\";\n\nclass EntityCreateModal extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n value: \"\",\n match: \"\",\n userdef: true,\n status: \"tracked\",\n multiword: \"yes\",\n confirmation: false,\n countLoading: false\n };\n }\n\n componentWillMount() {\n if (this.props.match) {\n this.setState({ match: this.props.match });\n }\n\n this.mounted = true;\n }\n\n componentDidMount() {\n // $(document).keypress(\n // function (event) {\n // if ($(\"input\").is(\":focus\")) {\n // return;\n // }\n\n // if (\n // event.keyCode === 13 &&\n // this.state.match.length >= 1 &&\n // this.state.value >= 1\n // ) {\n // if (this.state.confirmation === false) {\n // this.Confirmation();\n // } else {\n // this.Submit();\n // }\n // }\n // return;\n // }.bind(this)\n // ).bind(this);\n this.HasSpacesCheck(this.props.match);\n }\n\n componentWillUnmount() {\n $(document).unbind(\"keypress\");\n this.mounted = false;\n }\n\n HasSpacesCheck = (match) => {\n if (/\\s/g.test(match) === true) {\n this.setState({ multiword: \"yes\" });\n } else {\n this.setState({ multiword: \"no\" });\n }\n }\n\n GetCount = () => {\n this.setState({ countLoading: true });\n let match = encodeURIComponent(this.state.match);\n $.ajax({\n type: \"get\",\n url: \"/scot/api/v2/hitsearch?match=\" + match,\n success: function (data) {\n this.setState({ count: data.count, countLoading: false });\n }.bind(this),\n error: function (data) {\n this.setState({ count: \"unable to get count\", countLoading: false });\n }.bind(this)\n });\n }\n\n Confirmation = () => {\n if (this.state.confirmation === false) {\n this.GetCount();\n this.setState({ confirmation: true });\n } else {\n this.setState({ confirmation: false, value: \"\" });\n }\n }\n\n Submit = () => {\n let json = {\n value: this.state.value,\n match: this.state.match,\n status: \"active\",\n options: { multiword: this.state.multiword }\n };\n $.ajax({\n type: \"POST\",\n url: \"/scot/api/v2/entitytype\",\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function (data) {\n console.log(\"success: \" + data);\n this.props.ToggleCreateEntity();\n }.bind(this),\n error: function (data) {\n if (data.responseJSON.error_msg) {\n this.props.errorToggle(\n \"failed to create user defined entity: error_message: \" +\n data.responseJSON.error_msg,\n data\n );\n } else {\n this.props.errorToggle(\"failed to create user defined entity\", data);\n }\n }.bind(this)\n });\n }\n\n OnChangeMatch = (e) => {\n this.setState({ match: e.target.value });\n this.HasSpacesCheck(e.target.value);\n }\n\n OnChangeValue = (e) => {\n this.setState({ value: e });\n }\n\n render() {\n return (\n \n \n \n {!this.state.confirmation ? (\n Create a user defined entity\n ) : (\n Confirm and submit user defined entity\n )}\n \n \n \n {!this.state.confirmation ? (\n \n \n \n New Entity Name:\n \n \n \n \n \n \n \n Entity Type:\n \n \n \n \n \n \n ) : (\n \n
    \n Entity Name: {this.state.match}\n
    \n
    \n Entity Type: {this.state.value}\n
    \n
    \n Multiword: {this.state.multiword}\n
    \n
    \n )}\n
    \n \n {!this.state.confirmation ? (\n \n {this.state.value.length >= 1 && this.state.match.length >= 1 ? (\n \n Continue\n \n ) : null}\n \n \n ) : (\n \n \n {this.state.countLoading ? (\n Count: is loading...\n ) : (\n Count: {this.state.count}\n )}\n \n \n \n \n \n \n )}\n \n \n );\n }\n}\n\nexport default EntityCreateModal;\n","import React from \"react\";\nimport ReactDateTime from \"react-datetime\";\nimport { Button, Tooltip, OverlayTrigger, FormControl } from \"react-bootstrap\";\nimport $ from \"jquery\";\n\n//Add data into this metadata field by entering in the form layout in scot.cfg.pl.\n\nexport default class CustomMetaDataTable extends React.Component {\n onChange = event => {\n let k = event.target.id;\n let v = event.target.value;\n let data_string = \"data.\" + k;\n let data = {};\n data[data_string] = v;\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify(data),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"successfully changed custom table data\");\n this.forceUpdate();\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to updated custom table data\", data);\n }.bind(this)\n });\n };\n\n shouldComponentUpdate(nextProps, nextState) {\n //Only update the metadata if the headerData is different\n if (this.props.headerData === nextProps.headerData) {\n return false;\n } else {\n return true;\n }\n }\n\n render() {\n let multiSelectArr = [];\n let dropdownArr = [];\n let datesArr = [];\n let inputArr = [];\n let textAreaArr = [];\n let inputMultiArr = [];\n let booleanArr = [];\n let formType = this.props.form[this.props.headerData[\"data_fmt_ver\"]];\n if (formType) {\n for (let i = 0; i < formType.length; i++) {\n let value = formType[i][\"value\"];\n let url = formType[i][\"value_type\"][\"url\"];\n if (url) {\n url = url.replace(\"%s\", this.props.id);\n }\n if (\n formType[i][\"value_type\"][\"key\"]\n .split(\".\")\n .reduce((o, i) => o[i], this.props.headerData.data)\n ) {\n value = formType[i][\"value_type\"][\"key\"]\n .split(\".\")\n .reduce((o, i) => o[i], this.props.headerData.data);\n }\n\n switch (formType[i][\"type\"]) {\n case \"dropdown\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n dropdownArr.push(\n \n );\n } else {\n dropdownArr.push(\n \n );\n }\n break;\n\n case \"input\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n inputArr.push(\n \n );\n } else {\n inputArr.push(\n \n );\n }\n break;\n\n case \"calendar\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n let calendarValue = value * 1000;\n datesArr.push(\n \n );\n } else {\n datesArr.push(\n \n );\n }\n break;\n\n case \"textarea\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n textAreaArr.push(\n \n );\n } else {\n textAreaArr.push(\n \n );\n }\n break;\n\n case \"input_multi\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n inputMultiArr.push(\n \n );\n } else {\n inputMultiArr.push(\n \n );\n }\n break;\n\n case \"boolean\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n booleanArr.push(\n \n );\n } else {\n booleanArr.push(\n \n );\n }\n break;\n\n case \"multi_select\":\n if (formType[i][\"value_type\"][\"type\"] == \"static\") {\n multiSelectArr.push(\n \n );\n } else {\n multiSelectArr.push(\n \n );\n }\n break;\n }\n }\n }\n\n return (\n
    \n {formType ? (\n
    \n
    \n {dropdownArr}\n {datesArr}\n {inputArr}\n {textAreaArr}\n {inputMultiArr}\n {booleanArr}\n {multiSelectArr}\n
    \n
    \n ) : null}\n
    \n );\n }\n}\n\nclass DropdownComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n selected: null,\n options: []\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n let arr = [];\n let selected = \"\";\n\n for (let j = 0; j < this.props.dropdownValues.length; j++) {\n if (this.props.value == this.props.dropdownValues[j][\"value\"]) {\n selected = this.props.value;\n }\n\n arr.push();\n }\n\n this.setState({ selected: selected, options: arr });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let arr = [];\n let selected = \"\";\n let referenceKey = this.props.referenceKey;\n if (\n referenceKey == \"qual_sigbody_id\" ||\n referenceKey == \"prod_sigbody_id\"\n ) {\n arr.push();\n for (let key in result[\"version\"]) {\n if (\n result[\"version\"][key][\"revision\"] == result.data[referenceKey]\n ) {\n selected = result.data[referenceKey];\n }\n arr.push();\n }\n } else {\n for (let j = 0; j < result[this.props.referenceKey].length; j++) {\n if (result[this.props.referenceKey][j].selected == 1) {\n selected = result[this.props.referenceKey][j].value;\n }\n\n arr.push(\n \n );\n }\n }\n\n this.setState({ selected: selected, options: arr });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ selected: nextProps.value });\n }\n }\n\n onChange = event => {\n this.props.onChange(event);\n this.setState({ selected: event.target.value });\n };\n\n render() {\n return (\n
    \n {this.props.label}\n \n \n {this.state.options}\n \n \n \n \n \n \n }\n >\n \n \n \n
    \n );\n }\n}\n\nclass InputComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n value: \"\"\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: this.props.value });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let value = \"\";\n value = result[this.props.referenceKey];\n this.setState({ value: value });\n }.bind(this)\n });\n };\n\n inputOnChange = event => {\n this.setState({ value: event.target.value });\n };\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: nextProps.value });\n }\n }\n\n render() {\n return (\n
    \n {this.props.label}\n \n \n \n \n \n \n \n }\n >\n \n \n \n
    \n );\n }\n}\n\nclass Calendar extends React.Component {\n constructor(props) {\n super(props);\n let loading = false;\n if (this.props.dynamic) {\n loading = true;\n }\n this.state = {\n showCalendar: false,\n loading: loading,\n value: \"\"\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: this.props.value });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let value = result[this.props.referenceKey] * 1000;\n this.setState({ value: value, loading: false });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: nextProps.value });\n }\n }\n\n onChange = event => {\n let data_string = \"data.\" + this.props.typeLower;\n let v = event._d.getTime() / 1000;\n let json = {};\n json[data_string] = v;\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.type + \"/\" + this.props.id,\n data: JSON.stringify(json),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"successfully changed custom table data\");\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to updated custom table data\", data);\n }.bind(this)\n });\n };\n\n showCalendar = () => {\n if (this.state.showCalendar == false) {\n this.setState({ showCalendar: true });\n } else {\n this.setState({ showCalendar: false });\n }\n };\n\n render() {\n return (\n \n \n {this.props.typeTitle}\n \n {!this.state.loading ? (\n \n ) : (\n Loading...\n )}\n \n \n \n \n }\n >\n
    \n \n \n \n );\n }\n}\n\nclass TextAreaComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n value: \"\"\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: this.props.value });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let value = result[this.props.referenceKey];\n this.setState({ value: value });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: nextProps.value });\n }\n }\n\n inputOnChange = event => {\n this.setState({ value: event.target.value });\n };\n\n render() {\n return (\n
    \n \n {this.props.label}\n {this.props.help}}\n >\n \n \n \n \n \n \n
    \n );\n }\n}\n\nclass InputMultiComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n inputValue: \"\",\n value: []\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: this.props.value });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let value = result[this.props.referenceKey];\n this.setState({ value: value });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: nextProps.value });\n }\n }\n\n handleAddition = group => {\n if (this.state.value !== undefined) {\n let groupArr = [];\n let data = this.state.value;\n for (let i = 0; i < data.length; i++) {\n if (data[i] != undefined) {\n if (typeof data[i] == \"string\") {\n groupArr.push(data[i]);\n } else {\n groupArr.push(data[i].value);\n }\n }\n }\n groupArr.push(group.target.value);\n\n let newData = {};\n let data_string = \"data.\" + this.props.id;\n newData[data_string] = groupArr;\n\n // newData[this.props.id] = groupArr;\n\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.mainType + \"/\" + this.props.mainId,\n data: JSON.stringify(newData),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"success: group added\");\n this.setState({ inputValue: \"\", value: newData[this.props.id] });\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to add group\", data);\n }.bind(this)\n });\n }\n };\n\n InputChange = event => {\n this.setState({ inputValue: event.target.value });\n };\n\n handleDelete = event => {\n let data = this.state.value;\n let clickedThing = event.target.id;\n let groupArr = [];\n for (let i = 0; i < data.length; i++) {\n if (data[i] != undefined) {\n if (typeof data[i] == \"string\") {\n if (data[i] != clickedThing) {\n groupArr.push(data[i]);\n }\n } else {\n if (data[i].value != clickedThing) {\n groupArr.push(data[i].value);\n }\n }\n }\n }\n\n let newData = {\n data: {\n [this.props.id]: groupArr\n }\n };\n\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.mainType + \"/\" + this.props.mainId,\n data: JSON.stringify(newData),\n contentType: \"application/json; charset=UTF-8\",\n success: function(data) {\n this.setState({ value: newData[this.props.id] });\n console.log(\"deleted group success: \" + data);\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to delete group\", data);\n }.bind(this)\n });\n };\n\n render() {\n let data = this.state.value;\n let groupArr = [];\n let value;\n if (data !== undefined) {\n for (let i = 0; i < data.length; i++) {\n if (typeof data[i] == \"string\") {\n value = data[i];\n } else if (typeof data[i] == \"object\") {\n if (data[i] != undefined) {\n value = data[i].value;\n }\n }\n groupArr.push(\n \n {value}{\" \"}\n \n \n );\n }\n }\n\n return (\n
    \n {this.props.label}\n \n \n {this.state.inputValue != \"\" ? (\n \n Submit\n \n ) : (\n \n )}\n \n {groupArr}\n \n {this.props.help}}\n >\n \n \n \n
    \n );\n }\n}\n\nclass BooleanComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n value: false\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: this.props.value });\n }\n }\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let value = result[this.props.referenceKey];\n this.setState({ value: value });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps = nextProps => {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.setState({ value: nextProps.value });\n }\n };\n\n onChange = e => {\n let value;\n if (e.target.value == \"true\") {\n value = 1;\n } else {\n value = 0;\n }\n\n let obj = {};\n obj[\"target\"] = {};\n obj[\"target\"][\"id\"] = this.props.id;\n obj[\"target\"][\"value\"] = value;\n\n this.props.onChange(obj);\n };\n\n render() {\n return (\n
    \n {this.props.label}\n \n \n \n \n {this.props.help}}\n >\n \n \n \n
    \n );\n }\n}\n\nclass MultiSelectComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n options: []\n };\n }\n\n componentWillMount() {\n if (this.props.dynamic) {\n this.getDynamic();\n } else {\n this.makeForm();\n }\n }\n\n makeForm = nextProps => {\n let props = this.props;\n if (nextProps) {\n props = nextProps;\n }\n\n let arr = [];\n for (let j = 0; j < props.dropdownValues.length; j++) {\n if (props.value.includes(props.dropdownValues[j][\"value\"])) {\n arr.push();\n } else {\n arr.push();\n }\n }\n\n this.setState({ options: arr });\n };\n\n getDynamic = () => {\n $.ajax({\n type: \"get\",\n url: this.props.fetchURL,\n success: function(result) {\n let arr = [];\n for (let j = 0; j < result[this.props.referenceKey].length; j++) {\n if (result[this.props.referenceKey][j].selected == 1) {\n arr.push(\n \n );\n } else {\n arr.push(\n \n );\n }\n }\n\n this.setState({ options: arr });\n }.bind(this)\n });\n };\n\n componentWillReceiveProps = nextProps => {\n if (nextProps.dynamic) {\n this.getDynamic();\n } else {\n this.makeForm(nextProps);\n }\n };\n\n onChange = event => {\n let multiSelectArr = [];\n for (let i = 0; i < event.target.options.length; i++) {\n if (event.target.options[i] != undefined) {\n if (event.target.options[i].selected == true) {\n multiSelectArr.push(event.target.options[i].value);\n } else {\n continue;\n }\n }\n }\n\n let newData = {};\n let data_string = \"data.\" + this.props.id;\n newData[data_string] = multiSelectArr;\n\n $.ajax({\n type: \"put\",\n url: \"scot/api/v2/\" + this.props.mainType + \"/\" + this.props.mainId,\n data: JSON.stringify(newData),\n contentType: \"application/json; charset=UTF-8\",\n success: function() {\n console.log(\"success: multi select added\");\n }.bind(this),\n error: function(data) {\n this.props.errorToggle(\"Failed to add multi select\", data);\n }.bind(this)\n });\n this.setState({ selected: event.target.value });\n };\n\n render() {\n return (\n
    \n {this.props.label}\n \n \n {this.state.options}\n \n \n \n {this.props.help}}\n >\n \n \n \n
    \n );\n }\n}\n","import React, { useEffect, useState } from \"react\";\nimport AddEntry from \"../components/add_entry.js\";\nimport SelectedEntry from \"./selected_entry\";\nimport Button from \"@material-ui/core/Button\";\n\nfunction AddEntryToAlert({ ...props }) {\n const [visible, setVisibility] = useState(true);\n\n function toggleVisibility() {\n setVisibility(!visible);\n props.updated();\n }\n\n return (\n
    \n {!visible ? (\n
    \n
    \n\n \n Add Entry\n \n
    \n
    \n ) : null}\n {visible ? (\n \n ) : null}\n {props.entryData.length > 0 ? (\n \n ) : null}\n
    \n );\n}\nexport default AddEntryToAlert;\n","import React from \"react\";\nimport $ from \"jquery\";\nimport EntityDetail from \"../modal/entity_detail\";\nimport ReactTime from \"react-time\";\nimport SplitButton from \"react-bootstrap/lib/SplitButton.js\";\nimport MenuItem from \"react-bootstrap/lib/MenuItem.js\";\nimport Button from \"react-bootstrap/lib/Button.js\";\nimport AddEntry from \"../components/add_entry.js\";\nimport FileUpload from \"../components/file_upload.js\";\nimport { DeleteEntry } from \"../modal/delete\";\nimport Summary from \"../components/summary\";\nimport Task from \"../components/task\";\nimport SelectedPermission from \"../components/permission.js\";\nimport Frame from \"react-frame-component\";\nimport LinkWarning from \"../modal/link_warning\";\nimport { Link } from \"react-router-dom\";\nimport SignatureTable from \"../components/signature_table\";\nimport TrafficLightProtocol from \"../components/traffic_light_protocol\";\nimport Marker from \"../components/marker\";\nimport EntityCreateModal from \"../modal/entity_create\";\nimport CustomMetaDataTable from \"../components/custom_metadata_table\";\nimport ReactTable from \"react-table\";\nimport { get_data, put_data, post_data } from \"../utils/XHR\";\nimport AlertSubComponent from \"./alert_subcomponent\";\nimport {\n buildTypeColumns,\n customCellRenderers,\n getColumnWidth,\n} from \"../list/tableConfig\";\nimport Button2 from \"@material-ui/core/Button\";\n\nexport default class SelectedEntry extends React.Component {\n constructor(props) {\n super(props);\n let entityDetailKey = Math.floor(Math.random() * 1000);\n this.state = {\n showEntryData: this.props.showEntryData,\n showEntityData: this.props.showEntityData,\n entryData: this.props.entryData,\n entityData:\n this.props.entityData === undefined ? null : this.props.entityData,\n entityid: null,\n entitytype: null,\n entityoffset: null,\n entityobj: null,\n key: this.props.id,\n flairToolbar: false,\n notificationType: null,\n notificationMessage: \"\",\n height: null,\n entityDetailKey: entityDetailKey,\n isMounted: false,\n };\n }\n\n componentDidMount() {\n const { type, id, addFlair } = this.props;\n this.getEntryData();\n if (this.state.entityData !== null) {\n addFlair(this.state.entityData, null, type, null, id);\n }\n this.props.createCallback(this.props.id, this.updatedCB);\n this.containerHeightAdjust();\n\n window.addEventListener(\"resize\", this.containerHeightAdjust);\n let table = document.querySelector(\".ReactTable\");\n table.onresize = function () {\n this.containerHeightAdjust();\n }.bind(this);\n }\n\n componentWillReceiveProps() {\n this.containerHeightAdjust();\n }\n\n componentDidUpdate() {\n if (this.state.runWatcher == true) {\n this.Watcher();\n }\n }\n\n componentWillUnmount() {\n this.setState({ isMounted: false });\n }\n\n getEntryData = () => {\n const { type, id } = this.props;\n this.setState({ isMounted: true });\n if (type === \"alert\" || type === \"entity\" || this.props.isPopUp === 1) {\n let entry_url = `scot/api/v2/${type}/${id}/entry`;\n let entry_response = get_data(entry_url, null);\n entry_response\n .then(\n function (response) {\n if (this.state.isMounted) {\n this.setState({\n showEntryData: true,\n entryData: response.data.records,\n });\n response.data.records.forEach(\n function (element, i) {\n this.props.createCallback(\n response.data.records[i].id,\n this.updatedCB\n );\n }.bind(this)\n );\n this.Watcher();\n }\n }.bind(this)\n )\n .catch(\n function (error) {\n if (this.state.isMounted) {\n this.setState({ showEntryData: true });\n this.props.errorToggle(\"Failed to load entry data.\", error);\n }\n }.bind(this)\n );\n }\n };\n\n getEntityData = () => {\n const { addFlair, type, id } = this.props;\n if (\n type === \"alert\" ||\n type === \"entity\" ||\n type === \"incident\" ||\n type === \"alertgroup\" ||\n this.props.isPopUp === 1\n ) {\n const entity_url = `scot/api/v2/${type}/${id}/entity`;\n let entity_response = get_data(entity_url, null);\n entity_response\n .then(\n function (response) {\n let entityResult = response.data.records;\n if (this.state.isMounted) {\n this.setState({ showEntityData: true, entityData: entityResult });\n let waitForEntry = {\n waitEntry: function () {\n if (this.state.showEntryData === false) {\n setTimeout(waitForEntry.waitEntry, 50);\n } else {\n setTimeout(\n function () {\n addFlair(entityResult, null, type, null, id);\n }.bind(this)\n );\n }\n }.bind(this),\n };\n waitForEntry.waitEntry();\n }\n }.bind(this)\n )\n .catch(\n function (data) {\n if (this.state.isMounted) {\n this.setState({ showEntityData: true });\n this.props.errorToggle(\"Failed to load entity data.\", data);\n }\n }.bind(this)\n );\n }\n };\n\n updatedCB = () => {\n this.getEntityData();\n this.getEntryData();\n };\n\n flairToolbarToggle = (id, value, type, entityoffset, entityobj) => {\n if (this.state.isMounted) {\n this.setState({\n flairToolbar: true,\n entityid: id,\n entityvalue: value,\n entitytype: type,\n entityoffset: entityoffset,\n entityobj: entityobj,\n });\n }\n };\n\n flairToolbarOff = () => {\n if (this.state.isMounted) {\n let newEntityDetailKey = this.state.entityDetailKey + 1;\n this.setState({\n flairToolbar: false,\n entityDetailKey: newEntityDetailKey,\n });\n }\n };\n\n linkWarningToggle = (href,nopop=false) => {\n if (this.state.isMounted) {\n if (this.state.linkWarningToolbar === false) {\n this.setState({ linkWarningToolbar: true, link: href, nopop: nopop });\n } else {\n this.setState({ linkWarningToolbar: false, nopop: nopop });\n }\n }\n };\n\n Watcher = () => {\n let containerid = this.props.type + \"-detail-container\";\n if (this.props.type != \"alertgroup\") {\n let selector = `iframe`;\n let iframes = document.querySelectorAll(selector);\n iframes.forEach(\n function (ifr, index) {\n ifr.contentWindow.requestAnimationFrame(\n function () {\n if (ifr.contentDocument != null) {\n let arr = [];\n arr.push(this.checkFlairHover);\n ifr.addEventListener(\"mouseenter\", function (v, type) {\n let intervalID = setInterval(this[0], 50, ifr); // this.flairToolbarToggle, type, this.props.linkWarningToggle, this.props.id);\n console.log(\"Now watching iframe \" + intervalID);\n });\n\n ifr.addEventListener(\"mouseleave\", function () {\n let intervalID = $(ifr).data(\"intervalID\");\n window.clearInterval(intervalID);\n console.log(\"No longer watching iframe \" + intervalID);\n });\n }\n }.bind(this)\n );\n }.bind(this)\n );\n } else {\n $(containerid)\n .find(\"a, .entity\")\n .not(\".not_selectable\")\n .each(\n function (index, tr) {\n $(tr).off(\"mousedown\");\n $(tr).on(\n \"mousedown\",\n function (index) {\n let thing = index.target;\n if ($(thing)[0].className == \"extras\") {\n thing = $(thing)[0].parentNode;\n } //if an extra is clicked reference the parent element\n if ($(thing).attr(\"url\")) {\n //link clicked\n let url = $(thing).attr(\"url\");\n this.linkWarningToggle(url);\n } else {\n //entity clicked\n let entityid = $(thing).attr(\"data-entity-id\");\n let entityvalue = $(thing).attr(\"data-entity-value\");\n let entityoffset = $(thing).offset();\n let entityobj = $(thing);\n this.flairToolbarToggle(\n entityid,\n entityvalue,\n \"entity\",\n entityoffset,\n entityobj\n );\n }\n }.bind(this)\n );\n }.bind(this)\n );\n }\n };\n\n checkFlairHover = (ifr) => {\n function returnifr() {\n return ifr;\n }\n if (this.props.type != \"alertgroup\") {\n if (ifr.contentDocument != null) {\n $(ifr)\n .contents()\n .find(\".entity\")\n .each(\n function (index, entity) {\n if ($(entity).css(\"background-color\") == \"rgb(255, 0, 0)\") {\n $(entity).data(\"state\", \"down\");\n } else if ($(entity).data(\"state\") == \"down\") {\n $(entity).data(\"state\", \"up\");\n let entityid = $(entity).attr(\"data-entity-id\");\n let entityvalue = $(entity).attr(\"data-entity-value\");\n let entityobj = $(entity);\n let ifr = returnifr();\n let entityoffset = {\n top: $(entity).offset().top + $(ifr).offset().top,\n left: $(entity).offset().left + $(ifr).offset().left,\n };\n this.flairToolbarToggle(\n entityid,\n entityvalue,\n \"entity\",\n entityoffset,\n entityobj\n );\n }\n }.bind(this)\n );\n }\n if (ifr.contentDocument != null) {\n $(ifr)\n .contents()\n .find(\"a\")\n .each(\n function (index, a) {\n if ($(a).css(\"color\") == \"rgb(255, 0, 0)\") {\n $(a).data(\"state\", \"down\");\n } else if ($(a).data(\"state\") == \"down\") {\n $(a).data(\"state\", \"up\");\n let url = $(a).attr(\"url\");\n this.linkWarningToggle(url);\n }\n }.bind(this)\n );\n }\n }\n };\n\n containerHeightAdjust = () => {\n //Using setTimeout so full screen toggle animation has time to finish before resizing detail section\n setTimeout(\n function () {\n let scrollHeight;\n let ListViewTableHeight = document.getElementsByClassName(\n \"ReactTable\"\n )[0].clientHeight;\n if (ListViewTableHeight !== undefined) {\n if (ListViewTableHeight !== 0) {\n scrollHeight =\n window.innerHeight -\n ListViewTableHeight -\n $(\"#header\").height() -\n 90;\n scrollHeight = scrollHeight + \"px\";\n } else {\n scrollHeight = $(window).height() - $(\"#header\").height() - 78;\n scrollHeight = scrollHeight + \"px\";\n }\n //$('#detail-container').css('height',scrollHeight);\n if (this.state.isMounted) {\n this.setState({ height: scrollHeight });\n }\n }\n }.bind(this),\n 500\n );\n };\n\n render = () => {\n let divid = \"detail-container\";\n let height = this.state.height;\n let data = this.props.entryData;\n let type = this.props.type;\n let id = this.props.id;\n let showEntryData = this.props.showEntryData;\n let divClass = \"row-fluid entry-wrapper entry-wrapper-main\";\n if (type === \"alert\") {\n //divClass = 'row-fluid entry-wrapper entry-wrapper-main-300'\n divClass = \"row-fluid entry-wrapper entry-wrapper-main-nh\";\n data = this.state.entryData;\n showEntryData = this.state.showEntryData;\n } else if (type === \"alertgroup\") {\n divClass = \"row-fluid alert-wrapper entry-wrapper-main\";\n } else if (type === \"entity\" || this.props.isPopUp === 1) {\n divClass = \"row-fluid entry-wrapper-entity\";\n data = this.state.entryData;\n showEntryData = this.state.showEntryData;\n }\n //lazy loading flair - this needs to be done here because it is not initialized when this function is called by itself (alerts and entities)\n if (type === \"alert\" || this.props.isPopUp === 1) {\n divid = this.props.type + \"-detail-container\";\n height = null;\n }\n return (\n
    \n {type !== \"entity\" && type !== \"alert\" ? (\n \n ) : null}\n {/*{(type == 'incident' && this.props.headerData != null) ? : null}*/}\n {type === \"signature\" && this.props.headerData !== null ? (\n \n ) : null}\n {showEntryData ? (\n \n ) : (\n Loading...\n )}\n {this.props.entryToolbar ? (\n
    \n \n
    \n ) : null}\n {this.props.fileUploadToolbar ? (\n
    \n \n
    \n ) : null}\n {this.state.flairToolbar ? (\n \n ) : null}\n {this.state.linkWarningToolbar ? (\n \n ) : null}\n
    \n );\n };\n}\n\nclass EntryIterator extends React.Component {\n render = () => {\n let rows = [];\n let data = this.props.data;\n let type = this.props.type;\n let items = this.props.items;\n let linkToSearch = [];\n let id = this.props.id;\n let entityData = this.props.entityData;\n let search = null;\n if (this.props.items !== undefined) {\n if (\n this.props.items[0].data_with_flair !== undefined &&\n !this.props.flairOff\n ) {\n search = items[0].data_with_flair.search;\n } else {\n search = items[0].data.search;\n }\n for (let y = 0; y < this.props.headerData.ahrefs.length; y++) {\n linkToSearch.push(\n \n {this.props.headerData.ahrefs[y].subject}\n \n );\n linkToSearch.push(
    );\n }\n }\n\n if (data === undefined || data[0] === undefined) {\n if (type !== \"alertgroup\") {\n return (\n
    \n
    \n No entries found. Click the green Add Entry button if you would\n like to create one\n
    \n
    \n );\n } else {\n return (\n
    \n
    \n No alerts found or they are unable to be rendered. Please check\n the source and correct the formatting of the alert if necessary\n
    \n
    \n );\n }\n } else {\n if (type !== \"alertgroup\") {\n let key = 0;\n data.forEach(\n function (data) {\n rows.push(\n \n );\n key = key + 1;\n }.bind(this)\n );\n return
    {rows}
    ;\n } else {\n return (\n
    \n \n
    \n );\n }\n }\n };\n}\n\nclass NewAlertTable extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n columns: [],\n data: [],\n entityData: [],\n type: \"\",\n addFlair: null,\n promotionId: null,\n selected: [],\n flairOff: false,\n expanded: {},\n };\n }\n\n componentDidMount() {\n if (this.props.items.length > 0) {\n const data = this.createData();\n const columns = buildTypeColumns(\"alert\", data, this.props.items, true);\n this.setState({ data, columns });\n }\n if (this.props.type) {\n this.setState({\n type: this.props.type,\n entityData: this.props.entityData,\n });\n }\n if (this.props.addFlair) {\n this.setState({ addFlair: this.props.addFlair });\n }\n\n //handle alertselection from SelectedHeader\n if (this.props.alertsSelected) {\n this.setState({ selected: this.props.alertsSelected });\n }\n\n $(\"#main-detail-container\").keydown(\n function (event) {\n //prevent from working when in input\n if ($(\"input\").is(\":focus\")) {\n return;\n }\n //check for ctrl + a with keyCode\n if (\n event.keyCode === 65 &&\n (event.ctrlKey === true || event.metaKey === true)\n ) {\n this.handleSelectAll();\n event.preventDefault();\n }\n }.bind(this)\n );\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (prevProps.entityData !== this.props.entityData) {\n this.setState({\n entityData: this.props.entityData,\n columns: buildTypeColumns(\n \"alert\",\n this.state.data,\n this.props.items,\n true,\n this.props.entityData\n ),\n });\n }\n if (prevState.flairOff !== this.state.flairOff) {\n let data = this.createData();\n this.setState({ data });\n }\n if (prevProps.items !== this.props.items) {\n let data = this.createData();\n this.setState({ data });\n }\n\n if (\n this.props.alertsSelected !== prevState.selected &&\n this.props.alertsSelected !== undefined\n ) {\n this.setState({ selected: this.props.alertsSelected });\n }\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.flairOff !== prevState.flairOff) {\n return { flairOff: nextProps.flairOff };\n }\n if (nextProps.alertsSelected !== prevState.selected) {\n return { selected: nextProps.alertsSelected };\n } else return null;\n }\n\n createData = () => {\n const dataarray = [];\n this.props.items.forEach(\n function (element) {\n let dataitem = {};\n if (\n !this.state.flairOff &&\n Object.entries(element.data_with_flair).length !== 0\n ) {\n dataitem = element.data_with_flair;\n //we have to do this in order to not conflict SCOT status column with Splunk http status columns\n dataitem[\"status \"] = element.data_with_flair.status;\n } else {\n dataitem = element.data;\n //we have to do this in order to not conflict SCOT status column with Splunk http status columns\n dataitem[\"status \"] = element.data.status;\n }\n dataitem[\"id\"] = element.id;\n dataitem[\"status\"] = element.status;\n dataitem[\"entry_count\"] = element.entry_count;\n dataarray.push(dataitem);\n }.bind(this)\n );\n return dataarray;\n };\n\n render() {\n const { columns, data } = this.state;\n const { addFlair, type, headerData, entityData, updated } = this.props;\n\n return (\n
    \n (this.reactTable = r)}\n key={2}\n data={data}\n columns={columns}\n filterable={true}\n expanded={this.state.expanded}\n onExpandedChange={(expanded, index, event) => {\n this.setState({ expanded });\n addFlair(entityData, null, \"entry\", null, null);\n }}\n defaultFilterMethod={(filter, row) => {\n if (row[filter.id].includes(filter.value)) {\n return row;\n }\n }}\n SubComponent={({ row }) => {\n return (\n \n );\n }}\n onFilteredChange={(filter, column) => {\n addFlair(entityData, null, type, null, null);\n }}\n onSortedChange={(newSorted, column, shiftKey) => {\n addFlair(entityData, null, type, null, null);\n }}\n showPagination={false}\n pageSize={data.length}\n getTdProps={(state, rowInfo) => {\n return {\n style: {\n maxWidth: \"fit-content\",\n },\n };\n }}\n getTrProps={(state, rowInfo) => {\n if (\n rowInfo &&\n rowInfo.row &&\n this.props.alertsSelected !== undefined\n ) {\n return {\n onClick: (e) => {\n if (e.ctrlKey || (e.metaKey && e.keyCode === 83)) {\n this.props.handleSelectAll(state.sortedData);\n }\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n this.props.handleMultiSelection(rowInfo.original);\n } else if (e.shiftKey) {\n document.getSelection().removeAllRanges();\n this.props.handleShiftSelect(\n this.state.selected[0].id,\n rowInfo.original.id,\n state.sortedData\n );\n } else {\n this.props.handleSelection(rowInfo.original);\n }\n },\n style: {\n background: this.state.selected.some(\n (item) => rowInfo.original.id === item.id\n )\n ? \"#a7c6a5\"\n : \"\",\n borderBottom: \"1px solid black\",\n maxHeight: 200,\n overflowY: \"auto\",\n },\n };\n } else {\n return { style: { maxHeight: 200, overflowY: \"auto\" } };\n }\n }}\n />\n \n
    \n );\n }\n}\n\n//div underneath alert table\nclass AlertTableSearchDiv extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n let search = null;\n const { items } = this.props;\n if (items[0].data_with_flair !== undefined && !this.props.flairOff) {\n search = items[0].data_with_flair.search;\n } else {\n search = items[0].data.search;\n }\n\n let linkToSearch = this.props.headerData.ahrefs.map((item, index) => (\n \n ));\n\n return (\n
    \n {search !== undefined ? (\n \n {linkToSearch}\n
    \n
    \n ) : null}\n
    \n );\n }\n}\n\nclass EntryParent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n editEntryToolbar: false,\n replyEntryToolbar: false,\n deleteToolbar: false,\n permissionsToolbar: false,\n fileUploadToolbar: false,\n showEntityCreateModal: false,\n highlightedText: null,\n items: {},\n };\n }\n\n // componentWillUnmount() {\n // this.props.removeCallback(this.props.items.id);\n // }\n\n componentDidMount = () => {\n this.props.createCallback(this.props.items.id, this.refreshButton);\n };\n\n //TODO modify manual entry refresh to be done on automatically based on STOMP single entry update. This works for now.\n refreshButton = () => {\n if ($(\"#refresh-detail\")) {\n $(\"#refresh-detail\").click();\n }\n };\n\n editEntryToggle = () => {\n if (this.state.editEntryToolbar === false) {\n this.setState({ editEntryToolbar: true });\n } else {\n this.setState({ editEntryToolbar: false });\n }\n };\n\n replyEntryToggle = () => {\n if (this.state.replyEntryToolbar === false) {\n this.setState({ replyEntryToolbar: true });\n } else {\n this.setState({ replyEntryToolbar: false });\n }\n };\n\n deleteToggle = () => {\n if (this.state.deleteToolbar === false) {\n this.setState({ deleteToolbar: true });\n } else {\n this.setState({ deleteToolbar: false });\n }\n };\n\n permissionsToggle = () => {\n if (this.state.permissionsToolbar === false) {\n this.setState({ permissionsToolbar: true });\n } else {\n this.setState({ permissionsToolbar: false });\n }\n };\n\n reparseFlair = () => {\n let reparse_flair_endpoint = `/scot/api/v2/entry/${this.props.items.id}`;\n let put_response = put_data(reparse_flair_endpoint);\n put_response\n .then(function (data) {\n console.log(\"reparsing started\");\n })\n .catch(\n function (data) {\n this.props.errorToggle(\"failed to start reparsing of data\", data);\n }.bind(this)\n );\n };\n\n fileUploadToggle = () => {\n if (this.state.fileUploadToolbar === false) {\n this.setState({ fileUploadToolbar: true });\n } else {\n this.setState({ fileUploadToolbar: false });\n }\n };\n\n getEntryEntityData = (id) => {\n const entity_url = `scot/api/v2/entry/${id}/entity`;\n let entity_response = get_data(entity_url, null);\n entity_response\n .then(\n function (response) {\n let entityResult = response.data.records;\n this.props.setEntryEntities(entityResult);\n }.bind(this)\n )\n .catch(\n function (data) {\n console.log(`Couldnt get entry entity data: ${data}`);\n }.bind(this)\n );\n };\n\n render = () => {\n let itemarr = [];\n let subitemarr = [];\n let items = this.props.items;\n let type = this.props.type;\n let id = this.props.id;\n let isPopUp = this.props.isPopUp;\n let itemsClass = this.props.items.class;\n let summary = 0; //define Summary as false unless itemsClass is \"summary\"\n let editEntryToolbar = this.state.editEntryToolbar;\n let editEntryToggle = this.editEntryToggle;\n let errorToggle = this.props.errorToggle;\n let outerClassName = \"row-fluid entry-outer\";\n let innerClassName = \"row-fluid entry-header\";\n let taskOwner = \"\";\n if (itemsClass === \"summary\") {\n outerClassName += \" summary_entry\";\n summary = 1;\n }\n if (itemsClass === \"task\") {\n if (\n items.metadata.task.status === \"open\" ||\n items.metadata.task.status === \"assigned\"\n ) {\n taskOwner = \"-- Task Owner \" + items.metadata.task.who + \" \";\n outerClassName += \" todo_open_outer\";\n innerClassName += \" todo_open\";\n } else if (\n (items.metadata.task.status === \"closed\" ||\n items.metadata.task.status === \"completed\") &&\n items.metadata.task.who != null\n ) {\n taskOwner = \"-- Task Owner \" + items.metadata.task.who + \" \";\n outerClassName += \" todo_completed_outer\";\n innerClassName += \" todo_completed\";\n } else if (\n items.metadata.task.status === \"closed\" ||\n items.metadata.task.status === \"completed\"\n ) {\n outerClassName += \" todo_undefined_outer\";\n innerClassName += \" todo_undefined\";\n }\n }\n if (itemsClass === \"alert\") {\n outerClassName += \" event_entry_container_alert\";\n }\n itemarr.push(\n \n );\n for (let prop in items) {\n let childfunc = (prop) => {\n if (prop === \"children\") {\n let childobj = items[prop];\n items[prop].forEach(\n function (childobj) {\n subitemarr.push(\n new Array(\n (\n \n )\n )\n );\n }.bind(this)\n );\n }\n };\n childfunc(prop);\n }\n itemarr.push(subitemarr);\n\n let entryActions = [];\n if (this.props.items) {\n if (this.props.items.actions) {\n for (let i = 0; i < this.props.items.actions.length; i++) {\n if (\n this.props.items.actions[i].send_to_name &&\n this.props.items.actions[i].send_to_url\n ) {\n entryActions.push(\n \n );\n }\n }\n }\n }\n\n let header1 = \"[\" + items.id + \"] \";\n let header2 = \" by \" + items.owner + \" \" + taskOwner + \"(updated on \";\n let header3 = \")\";\n let createdTime = items.created;\n let updatedTime = items.updated;\n let entryHeaderInnerId =\n \"entry-header-inner-\" + this.props.id + \" entry-header-inner\";\n let tlpBorder;\n let tlpColorCSS;\n if (items.tlp !== \"unset\") {\n if (items.tlp !== \"amber\") {\n tlpColorCSS = items.tlp;\n } else {\n tlpColorCSS = \"orange\";\n }\n tlpBorder = \"3px solid \" + tlpColorCSS;\n }\n return (\n
    \n {this.state.showEntityCreateModal ? (\n \n ) : null}\n \n \n
    \n
    \n [\n \n {items.id}\n \n ]{\" \"}\n {\" \"}\n by {items.owner} {taskOwner}\n (updated on{\" \"}\n \n )\n {this.state.highlightedText !== \"\" &&\n this.state.highlightedText != null ? (\n \n Create Entity\n \n ) : null}\n {this.props.items.body_flair !== \"\" &&\n this.props.items.parsed === 0 ? (\n \n {\" \"}\n Entry awaiting flair engine. Content may be inaccurate.\n \n ) : null}\n \n {this.state.permissionsToolbar ? (\n \n ) : null}\n {items.tlp !== \"unset\" && items.tlp !== undefined ? (\n \n TLP:{\" \"}\n {items.tlp} \n \n ) : null}\n \n {type !== \"entity\" ? (\n \n Upload File\n \n ) : null}\n {entryActions}\n \n \n \n \n \n \n \n \n Permissions\n \n Reparse Flair\n \n {\n this.getEntryEntityData(items.id);\n }}\n >\n Get entities for Entry\n \n\n \n \n Delete\n \n \n \n \n
    \n
    \n {itemarr}\n {this.state.replyEntryToolbar ? (\n \n ) : null}\n {this.state.fileUploadToolbar ? (\n \n ) : null}\n
    \n {this.state.deleteToolbar ? (\n \n ) : null}\n \n );\n };\n\n componentWillReceiveProps = () => {\n this.checkHighlight();\n };\n\n checkHighlight = () => {\n let content;\n let iframe = document.getElementById(\"iframe_\" + this.props.items.id);\n if (iframe) {\n if (iframe.contentWindow.getSelection() !== null) {\n content = iframe.contentWindow.getSelection().toString();\n if (this.state.highlightedText !== content) {\n console.log(iframe + \" has highlighted text: \" + content);\n this.setState({ highlightedText: content });\n } else {\n return;\n }\n } else {\n return;\n }\n }\n };\n\n ToggleCreateEntity = () => {\n this.setState({ showEntityCreateModal: !this.state.showEntityCreateModal });\n };\n}\n\nclass EntryAction extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n [this.props.id]: false,\n disabled: false,\n };\n }\n\n submit = () => {\n let url = this.props.datahref;\n let id = this.props.id;\n\n let post_response = post_data(url, null);\n post_response\n .then(\n function (data) {\n this.setState({ [id]: true, disabled: false });\n }.bind(this)\n )\n .catch(\n function (data) {\n this.props.errorToggle(\"failed to submit the entry action\", data);\n this.setState({ disabled: false });\n }.bind(this)\n );\n };\n\n render = () => {\n return (\n \n \n {this.props.id}{\" \"}\n {this.state[this.props.id] ? (\n success\n ) : null}\n \n \n );\n };\n}\n\nclass EntryData extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n height: \"1px\",\n };\n }\n\n componentWillReceiveProps() {\n this.setHeight();\n }\n\n componentDidMount() {\n this.setHeight();\n }\n setHeight = () => {\n setTimeout(\n function () {\n if (document.getElementById(\"iframe_\" + this.props.id) != undefined) {\n document\n .getElementById(\"iframe_\" + this.props.id)\n .contentWindow.requestAnimationFrame(\n function () {\n let newheight;\n newheight = document.getElementById(\"iframe_\" + this.props.id)\n .contentWindow.document.body.scrollHeight;\n newheight = newheight + 35 + \"px\";\n if (this.state.height != newheight) {\n this.setState({ height: newheight });\n }\n }.bind(this)\n );\n }\n }.bind(this),\n 250\n );\n };\n\n render() {\n let rawMarkup = this.props.subitem.body_flair;\n if (this.props.subitem.body_flair == \"\") {\n rawMarkup = this.props.subitem.body;\n }\n let id = this.props.id;\n let entry_body_id = \"entry-body-\" + this.props.id;\n let entry_body_inner_id = \"entry-body-inner-\" + this.props.id;\n return (\n \n \n {this.props.editEntryToolbar ? (\n \n ) : (\n ,\n ,\n