{"version":3,"sources":["webpack:///./src/views/Agents.vue?c026","webpack:///./src/services/user.service.js","webpack:///./node_modules/core-js/modules/es6.function.name.js","webpack:///./src/views/Agents.vue?4aac","webpack:///src/views/Agents.vue","webpack:///./src/views/Agents.vue?9ea8","webpack:///./src/views/Agents.vue?c1f9"],"names":["UserService","axios","get","API_AGENTS_URL","headers","authHeader","new_password","use_2fa","post","API_USER_UPDATE_URL","password","id","delete","agent","put","API_NEW_AGENT_URL","API_SUBNETS_URL","dP","f","FProto","Function","prototype","nameRE","NAME","configurable","this","match","e","render","_vm","_h","$createElement","_c","_self","staticClass","agents","staticStyle","attrs","_v","_e","length","_s","message","error","_m","_l","key","name","created_at","seen_at","indexOf","address","user_agent","replace","rules","on","$event","handleAgentDelete","staticRenderFns","data","computed","currentUser","$store","state","auth","user","mounted","status","loggedIn","$router","push","methods","confirm","component"],"mappings":"kHAAA,W,6GCIMA,E,8GAEF,OAAOC,IAAMC,IAAIC,OAAgB,CAAEC,QAASC,qB,6BAGvCC,EAAcC,GACnB,OAAON,IAAMO,KAAKC,OAAqB,CACrCC,SAAUJ,EACVC,QAASA,GACR,CAAEH,QAASC,qB,+BAGPM,GACP,OAAOV,IAAMC,IAAIC,OAAiB,IAAMQ,EAAI,CAAEP,QAASC,qB,kCAG7CM,GACV,OAAOV,IAAMW,OAAOT,OAAiB,IAAMQ,EAAI,CAAEP,QAASC,qB,kCAGhDQ,GACV,OAAOZ,IAAMa,IAAIC,OAAmBF,EAAO,CAAET,QAASC,qB,kCAG5CQ,GACV,OAAOZ,IAAMa,IAAIX,OAAiB,IAAMU,EAAMF,GAAIE,EAAO,CAAET,QAASC,qB,6CAIpE,OAAOJ,IAAMC,IAAIc,OAAkB,cAAe,CAAEZ,QAASC,uB,KAIlD,WAAIL,G,uBCrCnB,IAAIiB,EAAK,EAAQ,QAAgBC,EAC7BC,EAASC,SAASC,UAClBC,EAAS,wBACTC,EAAO,OAGXA,KAAQJ,GAAU,EAAQ,SAAqBF,EAAGE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ACY,GAAZ,uBACc,EAAd,mBACc,UAId,YACU,EAAV,MACA,oDACA,WACA,mBCxIgV,I,wBCQ5U0B,EAAY,eACd,EACA7C,EACA8B,GACA,EACA,KACA,WACA,MAIa,aAAAe,E","file":"js/chunk-802008de.024b232d.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Agents.vue?vue&type=style&index=0&id=1968caee&scoped=true&lang=css&\"","import axios from 'axios';\nimport authHeader from './auth-header';\nimport {API_AGENTS_URL, API_USER_UPDATE_URL, API_NEW_AGENT_URL, API_SUBNETS_URL} from \"@/services/api\";\n\nclass UserService {\n getUserAgents() {\n return axios.get(API_AGENTS_URL, { headers: authHeader() });\n }\n\n update(new_password, use_2fa) {\n return axios.post(API_USER_UPDATE_URL, {\n password: new_password,\n use_2fa: use_2fa\n }, { headers: authHeader() });\n }\n\n getAgent(id) {\n return axios.get(API_AGENTS_URL + '/' + id, { headers: authHeader() });\n }\n\n deleteAgent(id) {\n return axios.delete(API_AGENTS_URL + '/' + id, { headers: authHeader() });\n }\n\n createAgent(agent) {\n return axios.put(API_NEW_AGENT_URL, agent, { headers: authHeader() });\n }\n\n updateAgent(agent) {\n return axios.put(API_AGENTS_URL + '/' + agent.id, agent, { headers: authHeader() });\n }\n\n getCloudFlareSubnets() {\n return axios.get(API_SUBNETS_URL + '/cloudflare', { headers: authHeader() });\n }\n}\n\nexport default new UserService();\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"agents-container container-fluid table-responsive\"},[(_vm.agents.length)?_c('a',{staticClass:\"btn btn-sm btn-success\",staticStyle:{\"margin-bottom\":\"10px\"},attrs:{\"href\":'/#/agents/new'}},[_vm._v(\" new agent \")]):_vm._e(),_c('br'),(!_vm.agents.length)?_c('div',{staticClass:\"jumbotron\"},[_vm._v(\" No agents yet, \"),_c('a',{attrs:{\"href\":\"/#/agents/new\"}},[_vm._v(\"create the first one\")]),_vm._v(\"! \")]):_vm._e(),(_vm.message)?_c('div',{staticClass:\"alert alert-success\",attrs:{\"role\":\"alert\"}},[_vm._v(_vm._s(_vm.message))]):_vm._e(),(_vm.error)?_c('div',{staticClass:\"alert alert-danger\",attrs:{\"role\":\"alert\"}},[_vm._v(_vm._s(_vm.error))]):_vm._e(),(_vm.agents.length)?_c('table',{staticClass:\"table table-sm table-striped table-hover\"},[_vm._m(0),_c('tbody',_vm._l((_vm.agents),function(agent){return _c('tr',{key:agent.name},[_c('td',{staticClass:\"fit\"},[_c('small',[_c('timeago',{attrs:{\"datetime\":agent.created_at,\"auto-update\":60}})],1)]),_c('td',{staticClass:\"fit\"},[_c('small',[(agent.seen_at.indexOf('0001-01-01T00') == -1)?_c('timeago',{attrs:{\"datetime\":agent.seen_at,\"auto-update\":60}}):_vm._e(),(agent.seen_at.indexOf('0001-01-01T00') != -1)?_c('span',[_vm._v(\"never\")]):_vm._e()],1)]),_c('td',[_c('a',{attrs:{\"href\":'/#/agent/' + agent.id}},[_vm._v(\" \"+_vm._s(agent.name)+\" \")])]),_c('td',{staticClass:\"fit\"},[(agent.address)?_c('small',[_vm._v(_vm._s(agent.address))]):_vm._e(),(!agent.address)?_c('small',{staticClass:\"text-muted\"},[_vm._v(\"not seen yet\")]):_vm._e()]),_c('td',{staticClass:\"fit\"},[(agent.user_agent)?_c('small',[_vm._v(_vm._s(agent.user_agent.replace('ShieldWall Agent ', '')))]):_vm._e(),(!agent.user_agent)?_c('small',{staticClass:\"text-muted\"},[_vm._v(\"not seen yet\")]):_vm._e()]),_c('td',{staticClass:\"fit\"},[(agent.rules.length)?_c('span',{staticClass:\"badge badge-info\"},[_vm._v(_vm._s(agent.rules.length))]):_vm._e(),(!agent.rules.length)?_c('small',{staticClass:\"text-muted\"},[_vm._v(\"none\")]):_vm._e()]),_c('td',{staticClass:\"fit\"},[_c('a',{staticClass:\"btn btn-sm btn-danger\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){return _vm.handleAgentDelete(agent)}}},[_vm._v(\" x \")])])])}),0)]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('thead',{staticClass:\"thead-dark\"},[_c('tr',[_c('th',{attrs:{\"scope\":\"col\"}},[_vm._v(\"Created\")]),_c('th',{staticClass:\"fit\",attrs:{\"scope\":\"col\"}},[_vm._v(\"Last Seen\")]),_c('th',{attrs:{\"scope\":\"col\"}},[_vm._v(\"Name\")]),_c('th',{attrs:{\"scope\":\"col\"}},[_vm._v(\"Address\")]),_c('th',{attrs:{\"scope\":\"col\"}},[_vm._v(\"Version\")]),_c('th',{attrs:{\"scope\":\"col\"}},[_vm._v(\"Rules\")]),_c('th',{attrs:{\"scope\":\"col\"}})])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Agents.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Agents.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Agents.vue?vue&type=template&id=1968caee&scoped=true&\"\nimport script from \"./Agents.vue?vue&type=script&lang=js&\"\nexport * from \"./Agents.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Agents.vue?vue&type=style&index=0&id=1968caee&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1968caee\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}