Blame view
api/public/js/chunk-2d0d70a2.72d2b88c.js
25.2 KB
0d8c0f816 initial commit |
1 2 3 4 5 6 7 8 9 10 11 |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d70a2"],{"74b1":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("b-card-group",{attrs:{deck:""}},[a("mltd-card"),a("od-card")],1),a("b-card-group",{staticClass:"mt-3",attrs:{deck:""}},[a("ceptd-card")],1)],1)},n=[],s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"primary","text-variant":"white"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h4",[e._v("MLTD")])]),a("b-col",{staticClass:"text-right"},[a("b-dropdown",{attrs:{size:"sm",variant:"primary","no-caret":"",right:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[a("fa",{attrs:{icon:"cogs"}})]},proxy:!0}])},[a("b-dropdown-item",{on:{click:e.start}},[e._v(" Start new instance ")])],1)],1)],1)]},proxy:!0}])},[e.items.length>0?a("b-table",{attrs:{fields:e.fields,items:e.items,"thead-class":"text-white","tbody-class":"text-white"},scopedSlots:e._u([{key:"cell(created_at)",fn:function(t){return[a("running-for",{staticClass:"red",attrs:{date:new Date(t.item.created_at)},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.minutes)+" Minutes and "+e._s(t.seconds)+" Seconds ")]}}],null,!0)})]}},{key:"cell(actions)",fn:function(t){return[a("b-button",{attrs:{variant:"danger",size:"sm",title:"Stop"},on:{click:function(a){return a.stopPropagation(),e.stop(t.item.process_id)}}},[a("fa",{attrs:{icon:"stop"}})],1)]}}],null,!1,4095574679)}):e._e(),a("b-row",{attrs:{"align-h":"end"}},[a("b-form-group",{attrs:{"label-cols":"3","label-cols-lg":"3","label-size":"sm",label:"Top Events","label-for":"input-sm"}},[a("b-input-group",{attrs:{size:"sm"}},[a("b-form-input",{attrs:{type:"number"},model:{value:e.top,callback:function(t){e.top=t},expression:"top"}}),a("b-input-group-append",[a("b-button",{attrs:{variant:"info"},on:{click:e.train}},[e._v(" Get ")])],1)],1)],1)],1),e.topResults.length>0?a("b-row",[a("b-form-tags",{staticClass:"mb-2",attrs:{disabled:"",placeholder:""},model:{value:e.topResults,callback:function(t){e.topResults=t},expression:"topResults"}}),a("h6",[e._v("Timeframe: "+e._s(e.topTimeframe))])],1):e._e()],1)},o=[],i=(a("96cf"),a("1da1")),c=a("bc3a"),l=a.n(c),u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",[e._t("default",[e._v(e._s(e.days)+" days "+e._s(e.hours)+" hours "+e._s(e.minutes)+" minutes "+e._s(e.seconds)+" seconds")],{days:e.days,hours:e.hours,minutes:e.minutes,seconds:e.seconds})],2)},d=[],p={name:"RunningFor",props:{date:{required:!0}},data:function(){return{interval:null,days:0,hours:0,minutes:0,seconds:0,intervals:{second:1e3,minute:6e4,hour:36e5,day:864e5}}},mounted:function(){var e=this;this.interval=setInterval((function(){e.updateDiffs()}),1e3),this.updateDiffs()},destroyed:function(){clearInterval(this.interval)},methods:{updateDiffs:function(){var e=Math.abs(Date.now()-this.date.getTime());this.days=Math.floor(e/this.intervals.day),e-=this.days*this.intervals.day,this.hours=Math.floor(e/this.intervals.hour),e-=this.hours*this.intervals.hour,this.minutes=Math.floor(e/this.intervals.minute),e-=this.minutes*this.intervals.minute,this.seconds=Math.floor(e/this.intervals.second)}}},f=p,h=a("2877"),m=Object(h["a"])(f,u,d,!1,null,"32d5ab49",null),v=m.exports,b={name:"MltdCard",components:{RunningFor:v},data:function(){return{top:10,topResults:[],topTimeframe:"",fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/start");case 3:e.status(),e.$toasted.success("MTLD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running MLTD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/mltd/stop/"+e);case 3:t.status(),t.$toasted.success("MTLD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},train:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/mltd/1/"+e.top);case 3:a=t.sent,r=a.data,e.topResults=r.important_events,e.topTimeframe=r.timeframe,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()}}},g=b,y=Object(h["a"])(g,s,o,!1,null,"16d34248",null),w=y.exports,x=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"success","text-variant":"white"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h5",[e._v("OD")])]),a("b-col",{staticClass:"text-right"},[a("b-dropdown",{attrs:{size:"sm",variant:"success","no-caret":"",right:""},scopedSlots:e._u([{key:"button-content",fn:function(){return[a("fa",{attrs:{icon:"cogs"}})]},proxy:!0}])},[a("b-dropdown-item",{on:{click:e.start}},[e._v(" Start new instance ")])],1)],1)],1)]},proxy:!0}])},[e.items.length>0?a("b-table",{attrs:{fields:e.fields,items:e.items,"thead-class":"text-white","tbody-class":"text-white"},scopedSlots:e._u([{key:"cell(created_at)",fn:function(t){return[a("running-for",{staticClass:"red",attrs:{date:new Date(t.item.created_at)},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.minutes)+" Minutes and "+e._s(t.seconds)+" Seconds ")]}}],null,!0)})]}},{key:"cell(actions)",fn:function(t){return[a("b-button",{attrs:{variant:"secondary",size:"sm",title:"Analyze"},on:{click:function(a){return a.stopPropagation(),e.showPcapModal(t.item.process_id)}}},[a("fa",{attrs:{icon:"search"}})],1),a("b-button",{staticClass:"ml-2",attrs:{variant:"danger",size:"sm",title:"Stop"},on:{click:function(a){return a.stopPropagation(),e.stop(t.item.process_id)}}},[a("fa",{attrs:{icon:"stop"}})],1)]}}],null,!1,44482582)}):e._e(),a("b-modal",{ref:"pcap-modal",attrs:{title:"Upload PCAP","ok-title":"Upload","ok-variant":"primary","cancel-variant":"muted",size:"lg"},on:{ok:e.upload}},[a("b-form",{attrs:{autocomplete:"off"}},[a("b-form-file",{attrs:{state:Boolean(e.file),accept:".pcap",placeholder:"Choose a file or drop it here...","drop-placeholder":"Drop file here..."},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}})],1)],1)],1)},k=[],_={name:"OdCard",components:{RunningFor:v},data:function(){return{file:null,fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],analyzePid:"",items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/start");case 3:e.status(),e.$toasted.success("OD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running OD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},showPcapModal:function(e){this.analyzePid=e,this.$refs["pcap-modal"].show()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/od/stop/"+e);case 3:t.status(),t.$toasted.success("OD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()},upload:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=new FormData,a.append("file",e.file),t.next=4,l.a.post("/v1/od/analyze/"+e.analyzePid,a,{headers:{"Content-Type":"multipart/form-data"}}).then((function(){e.file=null,e.analyzePid="",e.$toasted.success("PCAP uploaded successfully!")})).catch((function(){e.$toasted.error("There was an error while uploading the PCAP file!")}));case 4:case"end":return t.stop()}}),t)})))()}}},j=_,C=Object(h["a"])(j,x,k,!1,null,"7cd71a66",null),S=C.exports,R=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-card",{attrs:{"bg-variant":"light"},scopedSlots:e._u([{key:"header",fn:function(){return[a("b-row",[a("b-col",{staticClass:"text-left"},[a("h5",[e._v("CEPTD")])]),a("b-col",{staticClass:"text-right"},[a("b-card-text",[e._v("Status: Running")])],1)],1)]},proxy:!0}])},[a("capec-list")],1)},O=[],P=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("data-table",{ref:"datatable",attrs:{"search-route":"capec"},on:{"context-changed":e.onContextChanged}},[a("b-table",{ref:"table",attrs:{stacked:"md",fields:e.fields,items:e.dataLoadProvider,busy:e.isBusy,"empty-text":"No records found"},on:{"update:busy":function(t){e.isBusy=t}},scopedSlots:e._u([{key:"cell(_source.timestamp)",fn:function(t){return[e._v(" "+e._s(e.formatDate(t.item._source.timestamp))+" ")]}},{key:"cell(actions)",fn:function(e){return[a("b-button",{staticClass:"mr-2",attrs:{variant:"info",title:"Paths"},on:{click:function(t){return t.stopPropagation(),e.toggleDetails(t)}}},[a("fa",{attrs:{icon:e.detailsShowing?"arrow-up":"arrow-down"}})],1)]}},{key:"row-details",fn:function(t){return[t.item._source.tree?a("div",[a("json-view",{attrs:{"root-key":t.item._source.cve,data:t.item._source.tree}})],1):e._e()]}}])})],1)],1)},D=[];a("d3b7"),a("25f0");var $=function(){return $=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var n in t=arguments[a],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},$.apply(this,arguments)};var T=a("2b0e");function A(e){return A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}var z=T["default"].extend({name:"json-view-item",data:function(){return{open:this.data.depth<this.maxDepth}},props:{data:{required:!0,type:Object},maxDepth:{type:Number,required:!1,default:1},canSelect:{type:Boolean,required:!1,default:!1}},methods:{toggleOpen:function(){this.open=!this.open},clickEvent:function(e){this.$emit("selected",{key:e.key,value:e.value,path:e.path})},bubbleSelected:function(e){this.$emit("selected",e)},getKey:function(e){return isNaN(e.key)?'"'+e.key+'":':e.key+":"},getValueStyle:function(e){var t=A(e);switch(t){case"string":return{color:"var(--vjc-string-color)"};case"number":return{color:"var(--vjc-number-color)"};case"boolean":return{color:"var(--vjc-boolean-color)"};case"object":return{color:"var(--vjc-null-color)"};case"undefined":return{color:"var(--vjc-null-color)"};default:return{color:"var(--vjc-valueKey-color)"}}}},computed:{classes:function(){return{"chevron-arrow":!0,opened:this.open}},valueClasses:function(){return{"value-key":!0,"can-select":this.canSelect}},lengthString:function(){return"array"===this.data.type?1===this.data.length?this.data.length+" element":this.data.length+" elements":1===this.data.length?this.data.length+" property":this.data.length+" properties"},dataValue:function(){return"undefined"===typeof this.data.value?"undefined":JSON.stringify(this.data.value)}}}),E=z,M=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"json-view-item"},["object"===e.data.type||"array"===e.data.type?a("div",[a("button",{staticClass:"data-key",attrs:{"aria-expanded":e.open?"true":"false"},on:{click:function(t){return t.stopPropagation(),e.toggleOpen(t)}}},[a("div",{class:e.classes}),e._v(" "+e._s(e.data.key)+": "),a("span",{staticClass:"properties"},[e._v(e._s(e.lengthString))])]),e._v(" "),e._l(e.data.children,(function(t){return a("json-view-item",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],key:e.getKey(t),attrs:{data:t,maxDepth:e.maxDepth,canSelect:e.canSelect},on:{selected:e.bubbleSelected}})}))],2):e._e(),e._v(" "),"value"===e.data.type?a("div",{class:e.valueClasses,attrs:{role:e.canSelect?"button":void 0,tabindex:e.canSelect?"0":void 0},on:{click:function(t){return e.clickEvent(e.data)},keyup:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.clickEvent(e.data)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:e.clickEvent(e.data)}]}},[a("span",{staticClass:"value-key"},[e._v(e._s(e.data.key)+":")]),e._v(" "),a("span",{style:e.getValueStyle(e.data.value)},[e._v(" "+e._s(e.dataValue)+" ")])]):e._e()])},N=[],B=function(e){e&&e("data-v-c45632d2_0",{source:".json-view-item[data-v-c45632d2]:not(.root-item){margin-left:15px}.value-key[data-v-c45632d2]{color:var(--vjc-valueKey-color);font-weight:600;margin-left:10px;border-radius:2px;white-space:nowrap;padding:5px 5px 5px 10px}.value-key.can-select[data-v-c45632d2]{cursor:pointer}.value-key.can-select[data-v-c45632d2]:hover{background-color:rgba(0,0,0,.08)}.value-key.can-select[data-v-c45632d2]:focus{outline:2px solid var(--vjc-hover-color)}.data-key[data-v-c45632d2]{font-size:100%;font-family:inherit;border:0;padding:0;background-color:transparent;width:100%;color:var(--vjc-key-color);display:flex;align-items:center;border-radius:2px;font-weight:600;cursor:pointer;white-space:nowrap;padding:5px}.data-key[data-v-c45632d2]:hover{background-color:var(--vjc-hover-color)}.data-key[data-v-c45632d2]:focus{outline:2px solid var(--vjc-hover-color)}.data-key[data-v-c45632d2]::-moz-focus-inner{border:0}.data-key .properties[data-v-c45632d2]{font-weight:300;opacity:.9;margin-left:4px;user-select:none}.chevron-arrow[data-v-c45632d2]{flex-shrink:0;border-right:4px solid var(--vjc-arrow-color);border-bottom:4px solid var(--vjc-arrow-color);width:var(--vjc-arrow-size);height:var(--vjc-arrow-size);margin-right:20px;margin-left:5px;transform:rotate(-45deg)}.chevron-arrow.opened[data-v-c45632d2]{margin-top:-3px;transform:rotate(45deg)}",map:void 0,media:void 0})},L="data-v-c45632d2",q=void 0,F=!1;function I(e,t,a,r,n,s,o,i){var c,l=("function"===typeof a?a.options:a)||{};if(l.__file="JSONViewItem.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,n&&(l.functional=!0)),l._scopeId=r,t&&(c=function(e){t.call(this,o(e))}),void 0!==c)if(l.functional){var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return l}function K(){var e=document.head||document.getElementsByTagName("head")[0],t=K.styles||(K.styles={}),a="undefined"!==typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,n){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var s=a?n.media||"default":r,o=t[s]||(t[s]={ids:[],parts:[],element:void 0});if(!o.ids.includes(r)){var i=n.source,c=o.ids.length;if(o.ids.push(r),n.map&&(i+=" /*# sourceURL="+n.map.sources[0]+" */",i+=" /*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n.map))))+" */"),a&&(o.element=o.element||document.querySelector("style[data-group="+s+"]")),!o.element){var l=o.element=document.createElement("style");l.type="text/css",n.media&&l.setAttribute("media",n.media),a&&(l.setAttribute("data-group",s),l.setAttribute("data-next-index","0")),e.appendChild(l)}if(a&&(c=parseInt(o.element.getAttribute("data-next-index")),o.element.setAttribute("data-next-index",c+1)),o.element.styleSheet)o.parts.push(i),o.element.styleSheet.cssText=o.parts.filter(Boolean).join(" ");else{var u=document.createTextNode(i),d=o.element.childNodes;d[c]&&o.element.removeChild(d[c]),d.length?o.element.insertBefore(u,d[c]):o.element.appendChild(u)}}}}}var U=I({render:M,staticRenderFns:N},B,E,L,F,q,K,void 0),J=(window.matchMedia("(prefers-color-scheme: dark)").matches,T["default"].extend({name:"json-view",props:{data:{required:!0},rootKey:{type:String,required:!1,default:"root"},maxDepth:{type:Number,required:!1,default:1},colorScheme:{type:String,required:!1,default:"light"}},components:{"json-view-item":U},methods:{build:function(e,t,a,r,n){if(this.isObject(t)){for(var s=[],o=0,i=Object.entries(t);o<i.length;o++){var c=i[o],l=c[0],u=c[1];s.push(this.build(l,u,a+1,n?""+r+e+".":""+r,!0))}return{key:e,type:"object",depth:a,path:r,length:s.length,children:s}}if(this.isArray(t)){s=[];for(var d=0;d<t.length;d++)s.push(this.build(d.toString(),t[d],a+1,n?""+r+e+"["+d+"].":""+r,!1));return{key:e,type:"array",depth:a,path:r,length:s.length,children:s}}return{key:e,type:"value",path:n?r+e:r.slice(0,-1),depth:a,value:t}},isObject:function(e){return"object"===A(e)&&null!==e&&!this.isArray(e)},isArray:function(e){return Array.isArray(e)},itemSelected:function(e){this.$emit("selected",e)}},computed:{parsed:function(){return"object"===A(this.data)?this.build(this.rootKey,$({},this.data),0,"",!0):{key:this.rootKey,type:"value",path:"",depth:0,value:this.data}},hasSelectedListener:function(){return Boolean(this.$listeners&&this.$listeners.selected)}}})),V=J,G=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("json-view-item",{class:[{"root-item":!0,dark:"dark"===e.colorScheme}],attrs:{data:e.parsed,maxDepth:e.maxDepth,canSelect:e.hasSelectedListener},on:{selected:e.itemSelected}})},Q=[],H=function(e){e&&e("data-v-1c053202_0",{source:".root-item[data-v-1c053202]{--vjc-key-color:#0977e6;--vjc-valueKey-color:#073642;--vjc-string-color:#268bd2;--vjc-number-color:#2aa198;--vjc-boolean-color:#cb4b16;--vjc-null-color:#6c71c4;--vjc-arrow-size:6px;--vjc-arrow-color:#444;--vjc-hover-color:rgba(0, 0, 0, 0.2);margin-left:0;width:100%;height:auto}.root-item.dark[data-v-1c053202]{--vjc-key-color:#80d8ff;--vjc-valueKey-color:#fdf6e3;--vjc-hover-color:rgba(255, 255, 255, 0.2);--vjc-arrow-color:#fdf6e3}",map:void 0,media:void 0})},W="data-v-1c053202",X=void 0,Y=!1;function Z(e,t,a,r,n,s,o,i){var c,l=("function"===typeof a?a.options:a)||{};if(l.__file="JSONView.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,n&&(l.functional=!0)),l._scopeId=r,t&&(c=function(e){t.call(this,o(e))}),void 0!==c)if(l.functional){var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return l}function ee(){var e=document.head||document.getElementsByTagName("head")[0],t=ee.styles||(ee.styles={}),a="undefined"!==typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,n){if(!document.querySelector('style[data-vue-ssr-id~="'+r+'"]')){var s=a?n.media||"default":r,o=t[s]||(t[s]={ids:[],parts:[],element:void 0});if(!o.ids.includes(r)){var i=n.source,c=o.ids.length;if(o.ids.push(r),n.map&&(i+=" /*# sourceURL="+n.map.sources[0]+" */",i+=" /*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n.map))))+" */"),a&&(o.element=o.element||document.querySelector("style[data-group="+s+"]")),!o.element){var l=o.element=document.createElement("style");l.type="text/css",n.media&&l.setAttribute("media",n.media),a&&(l.setAttribute("data-group",s),l.setAttribute("data-next-index","0")),e.appendChild(l)}if(a&&(c=parseInt(o.element.getAttribute("data-next-index")),o.element.setAttribute("data-next-index",c+1)),o.element.styleSheet)o.parts.push(i),o.element.styleSheet.cssText=o.parts.filter(Boolean).join(" ");else{var u=document.createTextNode(i),d=o.element.childNodes;d[c]&&o.element.removeChild(d[c]),d.length?o.element.insertBefore(u,d[c]):o.element.appendChild(u)}}}}}var te=Z({render:G,staticRenderFns:Q},H,V,W,Y,X,ee,void 0),ae=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"table-container"},[a("b-row",[e.lengthChange?a("b-col",{staticClass:"mb-3",attrs:{md:"4"}},[a("b-form",{attrs:{inline:""}},[a("label",{staticClass:"mr-2"},[e._v("Show")]),a("b-form-select",{staticClass:"mr-2",attrs:{options:e.pageOptions},on:{input:e.onContextChanged},model:{value:e.perPage,callback:function(t){e.perPage=t},expression:"perPage"}}),a("label",[e._v("entries per page")])],1)],1):e._e()],1),e._t("default"),a("b-row",[a("b-col",{staticClass:"mx-auto",attrs:{md:"4"}},[e.paging&&e.totalRows>e.perPage?a("b-pagination",{staticClass:"justify-content-center",attrs:{"total-rows":e.totalRows,"per-page":e.perPage},on:{input:e.onContextChanged},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],2)},re=[],ne=(a("b64b"),{name:"Datatable",props:{lengthChange:{type:Boolean,default:!0},paging:{type:Boolean,default:!0},infos:{type:Boolean,default:!0},searchRoute:{type:String,default:null}},data:function(){return{currentPage:1,perPage:10,totalRows:0,pageOptions:[5,10,15,25,50],searchQuery:null,selected:[],action:null}},mounted:function(){this.actions&&(this.action=Object.keys(this.actions)[0])},methods:{onContextChanged:function(){this.$emit("context-changed")},loadData:function(e,t){var a=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var n,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,l.a.get(a.searchRoute,{params:{page:a.currentPage,perPage:a.perPage,column:e,direction:t?"desc":"asc"}});case 3:return n=r.sent,s=n.data,a.totalRows=s.total,r.abrupt("return",s.data);case 9:return r.prev=9,r.t0=r["catch"](0),console.error(r.t0),r.abrupt("return",[]);case 13:case"end":return r.stop()}}),r,null,[[0,9]])})))()}}}),se=ne,oe=Object(h["a"])(se,ae,re,!1,null,null,null),ie=oe.exports,ce={name:"CapecList",components:{DataTable:ie,"json-view":te},data:function(){return{isBusy:!1,fields:[{key:"_source.timestamp",label:"Timestamp"},{key:"_source.signature_id",label:"Signature ID"},{key:"_source.signature",label:"Signature"},{key:"_source.category",label:"Category"},{key:"_source.cve",label:"CVE"},{key:"actions",label:"Actions"}]}},methods:{dataLoadProvider:function(e){return this.$refs.datatable.loadData(e.sortBy,e.sortDesc)},onContextChanged:function(){return this.$refs.table.refresh()},formatDate:function(e){var t=new Date(e).toString();return t.substring(0,t.length-40)}}},le=ce,ue=Object(h["a"])(le,P,D,!1,null,"61b282af",null),de=ue.exports,pe={name:"CeptdCard",components:{CapecList:de},data:function(){return{file:null,fields:[{key:"process_id",label:"Process"},{key:"created_at",label:"Running for"},{key:"actions",label:"Actions"}],analyzePid:"",items:[]}},created:function(){this.status()},methods:{start:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/start");case 3:e.status(),e.$toasted.success("OD instance started!"),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),e.$toasted.error("There was an error!");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},status:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l.a.get("/v1/od/status");case 3:a=t.sent,r=a.data,e.items=r,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$toasted.error("There was an error while fetching running OD instances!");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},showPcapModal:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.analyzePid=e,t.$refs["pcap-modal"].show();case 2:case"end":return a.stop()}}),a)})))()},stop:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,l.a.get("/v1/od/stop/"+e);case 3:t.status(),t.$toasted.success("OD instance stopped!"),a.next=10;break;case 7:a.prev=7,a.t0=a["catch"](0),t.$toasted.error("There was an error!");case 10:case"end":return a.stop()}}),a,null,[[0,7]])})))()}}},fe=pe,he=Object(h["a"])(fe,R,O,!1,null,"b161a638",null),me=he.exports,ve={name:"Dashboard",components:{OdCard:S,MltdCard:w,CeptdCard:me}},be=ve,ge=Object(h["a"])(be,r,n,!1,null,"47d79d9c",null);t["default"]=ge.exports}}]); |
c0c5f5114 Added keycloak fr... |
12 |
//# sourceMappingURL=chunk-2d0d70a2.72d2b88c.js.map |