SpyGuard/app/backend/dist/js/chunk-2d20faf8.c983e105.js

2 lines
5.2 KiB
JavaScript
Raw Permalink Normal View History

2022-11-06 15:51:33 +01:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d20faf8"],{b54c:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"backend-content",attrs:{id:"content"}},[e("div",{staticClass:"column col-8 col-xs-12"},[e("h3",{staticClass:"s-title"},[t._v("Manage watchers instances")]),e("ul",{staticClass:"tab tab-block"},[e("li",{staticClass:"tab-item"},[e("a",{class:{active:t.tabs.addwatcher},attrs:{href:"#"},on:{click:function(e){return t.switch_tab("addwatcher")}}},[t._v("Add watcher")])]),e("li",{staticClass:"tab-item"},[e("a",{class:{active:t.tabs.instances},attrs:{href:"#"},on:{click:function(e){return t.switch_tab("instances")}}},[t._v("Existing watchers")])])]),t.tabs.addwatcher?e("div",[e("div",{staticClass:"misp-form"},[e("label",{staticClass:"misp-label"},[t._v("Watcher name")]),e("span"),e("input",{directives:[{name:"model",rawName:"v-model",value:t.watcher.name,expression:"watcher.name"}],ref:"watcher_name",staticClass:"form-input",attrs:{type:"text",placeholder:"My incredible watcher",required:""},domProps:{value:t.watcher.name},on:{input:function(e){e.target.composing||t.$set(t.watcher,"name",e.target.value)}}}),e("label",{staticClass:"misp-label"},[t._v("Watcher URL")]),e("span"),e("input",{directives:[{name:"model",rawName:"v-model",value:t.watcher.url,expression:"watcher.url"}],ref:"watcher_url",staticClass:"form-input",attrs:{type:"text",placeholder:"https://url.of.my.watcher.com/watcher.json",required:""},domProps:{value:t.watcher.url},on:{input:function(e){e.target.composing||t.$set(t.watcher,"url",e.target.value)}}}),e("label",{staticClass:"misp-label"},[t._v("Watcher Type")]),e("span"),e("select",{directives:[{name:"model",rawName:"v-model",value:t.watcher.type,expression:"watcher.type"}],staticClass:"form-select width-full",attrs:{placeholder:"test"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.watcher,"type",e.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"iocs"}},[t._v("IOCs")]),e("option",{attrs:{value:"whitelist"}},[t._v("Whitelist")])])]),e("button",{staticClass:"btn-primary btn col-12",on:{click:function(e){return t.add_instance()}}},[t._v("Add watcher")]),t.added?e("div",{staticClass:"form-group"},[e("div",{staticClass:"toast toast-success"},[t._v(" ✓ Watcher added successfully. Redirecting to watchers in 2 seconds. ")])]):t._e(),t.error?e("div",{staticClass:"form-group"},[e("div",{staticClass:"toast toast-error"},[t._v(" ✗ Watcher not added. "+t._s(t.error)+" ")])]):t._e()]):t._e(),t.tabs.instances?e("div",{staticClass:"form-group"},[t.instances.length?e("div",[e("table",{staticClass:"table table-striped table-hover"},[t._m(0),e("tbody",t._l(t.instances,(function(a){return e("tr",{key:a.id},[e("td",[t._v(t._s(a.type.toUpperCase()))]),e("td",[t._v(t._s(a.name))]),e("td",[a.status?e("span",{staticClass:"instance-online"},[t._v("✓ ONLINE")]):e("span",{staticClass:"instance-offline"},[t._v("⚠ OFFLINE")])]),e("td",[e("button",{staticClass:"btn btn-sm",on:{click:function(e){return t.delete_instance(a)}}},[t._v("Delete")])])])})),0)])]):e("div",[e("div",{staticClass:"empty"},[t.loading?e("div",[t._m(1),e("p",{staticClass:"empty-subtitle"},[t._v("Testing and loading the watchers.")])]):e("div",[e("p",{staticClass:"empty-title h5"},[t._v("No watcher found.")]),e("p",{staticClass:"empty-subtitle"},[t._v("Do not hesitate to add a watcher.")])])])])]):t._e()])])},i=[function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Type")]),e("th",[t._v("Name")]),e("th",[t._v("Status")]),e("th",[t._v("Action")])])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"empty-title h5"},[e("span",{staticClass:"loading loading-lg"})])}],n=a("bc3a"),c=a.n(n),r={name:"managewatchers",data(){return{error:!1,loading:!1,added:!1,watcher:{name:"",url:"",type:"iocs"},instances:[],tabs:{addwatcher:!0,instances:!1},jwt:""}},props:{},methods:{add_instance:function(){this.added=!1,this.err
//# sourceMappingURL=chunk-2d20faf8.c983e105.js.map