SpyGuard/app/backend/dist/js/chunk-3c0d118e.e3f2944c.js.map
2022-11-06 15:51:33 +01:00

1 line
15 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/assets/network.png","webpack:///./src/views/network-manage.vue","webpack:///src/views/network-manage.vue","webpack:///./src/views/network-manage.vue?96f0","webpack:///./src/views/network-manage.vue?8f74"],"names":["module","exports","render","_vm","this","_c","_self","staticClass","attrs","class","toaster","show","_v","_s","message","require","directives","name","rawName","value","iface_in","expression","on","$event","$$selectedVal","Array","prototype","filter","call","target","options","o","selected","map","val","_value","multiple","change_interface","_l","config","ifaces_in","iface","key","domProps","toUpperCase","iface_out","ifaces_out","_m","network","ssids","ssid","delete_ssid","composing","add_ssid","staticRenderFns","data","type","props","methods","timeout","then","catch","load_config","axios","headers","console","update_ssids","setTimeout","created","component"],"mappings":"qGAAAA,EAAOC,QAAU,IAA0B,4B,2CCA3C,IAAIC,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,kBAAkBC,MAAM,CAAC,GAAK,YAAY,CAACH,EAAG,MAAM,CAACI,MAAM,CAAE,wBAA0BN,EAAIO,QAAQC,KAAM,wBAA0BR,EAAIO,QAAQC,OAAQ,CAACR,EAAIS,GAAGT,EAAIU,GAAGV,EAAIO,QAAQI,YAAYT,EAAG,MAAM,CAACE,YAAY,0BAA0B,CAACF,EAAG,KAAK,CAACE,YAAY,WAAW,CAACJ,EAAIS,GAAG,2BAA2BP,EAAG,KAAK,CAACE,YAAY,cAAc,CAACJ,EAAIS,GAAG,8BAA8BP,EAAG,MAAM,CAACG,MAAM,CAAC,IAAMO,EAAQ,QAAwB,GAAK,uBAAuBV,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,OAAO,CAACE,YAAY,mBAAmB,CAACJ,EAAIS,G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,KAAK,CAACA,EAAG,KAAK,CAACF,EAAIS,GAAG,kBAAkBP,EAAG,KAAK,CAACF,EAAIS,GAAG,kB,iCCqD/H,GACfK,uBACAsC,OACA,OACAhB,UACAW,QACA9B,YACAV,SAAAC,QAAAG,WAAA0C,aAGAC,SACAC,SACA,sBACA,0BAAAC,cACAC,SACA,eACA,yBAGAC,0BAEAC,uBACAC,4BACAJ,YACAK,SAAA,sBACA,SACA,SACA,mBACA,qCACA,uCACAC,8BAGAJ,0BAEAV,wBACA,2CACA,sCACA,qBAEAE,oBACA,0CACA,aACA,qBAEAa,wBACAH,+EACAJ,YACAK,SAAA,sBACA,SACA,gBACA,cAAArD,QAAAG,gCAAA0C,gBACAW,sBAAA,cAAAxD,UAAA,mBAGAkD,0BAEAxB,+BACA0B,8CACAJ,YACAK,SAAA,sBACA,SACA,cAAArD,QAAAG,gCAAA0C,gBACAW,sBAAA,cAAAxD,UAAA,gBACA,4CAEAkD,2BAGAO,mBACA,yBACA,uBC9HwV,I,YCOpVC,EAAY,eACd,EACAnE,EACAoD,GACA,EACA,KACA,KACA,MAIa,aAAAe,E","file":"js/chunk-3c0d118e.e3f2944c.js","sourcesContent":["module.exports = __webpack_public_path__ + \"img/network.33d31f9d.png\";","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"backend-content\",attrs:{\"id\":\"content\"}},[_c('div',{class:{ 'alert-toaster-visible' : _vm.toaster.show, 'alert-toaster-hidden' : !_vm.toaster.show }},[_vm._v(_vm._s(_vm.toaster.message))]),_c('div',{staticClass:\"column col-8 col-xs-12\"},[_c('h3',{staticClass:\"s-title\"},[_vm._v(\"Network configuration\")]),_c('h5',{staticClass:\"s-subtitle\"},[_vm._v(\"Interfaces configuration\")]),_c('img',{attrs:{\"src\":require(\"@/assets/network.png\"),\"id\":\"network-thumbnail\"}}),_c('div',{staticClass:\"container interfaces-container\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column col-6\"},[_c('span',{staticClass:\"interface-label\"},[_vm._v(\"Wireless AP interface\")]),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.iface_in),expression:\"iface_in\"}],staticClass:\"form-select width-full\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.iface_in=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},function($event){return _vm.change_interface('in', _vm.iface_in)}]}},_vm._l((_vm.config.ifaces_in),function(iface){return _c('option',{key:iface,domProps:{\"value\":iface}},[_vm._v(\" \"+_vm._s(iface.toUpperCase())+\" \")])}),0)]),_c('div',{staticClass:\"column col-6\"},[_c('span',{staticClass:\"interface-label\"},[_vm._v(\"Internet link interface\")]),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.iface_out),expression:\"iface_out\"}],staticClass:\"form-select width-full\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.iface_out=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},function($event){return _vm.change_interface('out', _vm.iface_out)}]}},_vm._l((_vm.config.ifaces_out),function(iface){return _c('option',{key:iface,domProps:{\"value\":iface}},[_vm._v(\" \"+_vm._s(iface.toUpperCase())+\" \")])}),0)])])]),_c('h5',{staticClass:\"s-subtitle\"},[_vm._v(\"Edit SSIDs names\")]),_c('div',{staticClass:\"form-group\"},[_c('table',{staticClass:\"table table-striped table-hover\"},[_vm._m(0),_c('tbody',[_vm._l((_vm.config.network.ssids),function(ssid){return _c('tr',{key:ssid},[_c('td',[_vm._v(_vm._s(ssid))]),_c('td',[_c('button',{staticClass:\"btn btn-sm\",on:{\"click\":function($event){return _vm.delete_ssid(ssid)}}},[_vm._v(\"Delete\")])])])}),_c('tr',[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.ssid),expression:\"ssid\"}],staticClass:\"form-input\",attrs:{\"type\":\"text\",\"placeholder\":\"SSID name\"},domProps:{\"value\":(_vm.ssid)},on:{\"input\":function($event){if($event.target.composing)return;_vm.ssid=$event.target.value}}})]),_c('td',[_c('button',{staticClass:\"btn btn-sm\",on:{\"click\":function($event){return _vm.add_ssid()}}},[_vm._v(\"Add\")])])])],2)])])])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('thead',[_c('tr',[_c('th',[_vm._v(\"Network name\")]),_c('th',[_vm._v(\"Action\")])])])\n}]\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"backend-content\" id=\"content\">\r\n <div v-bind:class=\"{ 'alert-toaster-visible' : toaster.show, 'alert-toaster-hidden' : !toaster.show }\">{{toaster.message}}</div>\r\n <div class=\"column col-8 col-xs-12\">\r\n <h3 class=\"s-title\">Network configuration</h3>\r\n <h5 class=\"s-subtitle\">Interfaces configuration</h5>\r\n <img src=\"@/assets/network.png\" id=\"network-thumbnail\" />\r\n <div class=\"container interfaces-container\">\r\n <div class=\"columns\">\r\n <div class=\"column col-6\">\r\n <span class=\"interface-label\">Wireless AP interface</span>\r\n <select class=\"form-select width-full\" v-model=\"iface_in\" @change=\"change_interface('in', iface_in)\">\r\n <option v-for=\"iface in config.ifaces_in\" :value=\"iface\" :key=\"iface\">\r\n {{ iface.toUpperCase() }}\r\n </option>\r\n </select>\r\n </div>\r\n <div class=\"column col-6\">\r\n <span class=\"interface-label\">Internet link interface</span>\r\n <select class=\"form-select width-full\" v-model=\"iface_out\" @change=\"change_interface('out', iface_out)\">\r\n <option v-for=\"iface in config.ifaces_out\" :value=\"iface\" :key=\"iface\">\r\n {{ iface.toUpperCase() }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n <h5 class=\"s-subtitle\">Edit SSIDs names</h5>\r\n <div class=\"form-group\">\r\n <table class=\"table table-striped table-hover\">\r\n <thead>\r\n <tr>\r\n <th>Network name</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr v-for=\"ssid in config.network.ssids\" :key=\"ssid\">\r\n <td>{{ ssid }}</td>\r\n <td><button class=\"btn btn-sm\" v-on:click=\"delete_ssid(ssid)\">Delete</button></td>\r\n </tr>\r\n <tr>\r\n <td><input class=\"form-input\" v-model=\"ssid\" type=\"text\" placeholder=\"SSID name\"></td>\r\n <td><button class=\"btn btn-sm\" @click=\"add_ssid()\">Add</button></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport axios from 'axios'\r\n\r\nexport default {\r\n name: 'manageinterface',\r\n data() {\r\n return {\r\n config: {},\r\n ssid: \"\",\r\n iface_in: \"\",\r\n toaster: { show: false, message : \"\", type : null }\r\n }\r\n },\r\n props: {},\r\n methods: {\r\n async get_jwt() {\r\n await axios.get(`/api/get-token`, { timeout: 10000 })\r\n .then(response => {\r\n if (response.data.token) {\r\n this.jwt = response.data.token\r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n load_config: function() {\r\n axios.get(`/api/config/list`, {\r\n timeout: 10000,\r\n headers: { 'X-Token': this.jwt }\r\n }).then(response => {\r\n if (response.data) {\r\n this.config = response.data\r\n this.iface_in = this.config.network.in \r\n this.iface_out = this.config.network.out\r\n console.log(this.iface_in);\r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n delete_ssid: function(ssid) {\r\n var i = this.config.network.ssids.indexOf(ssid);\r\n this.config.network.ssids.splice(i, 1);\r\n this.update_ssids();\r\n },\r\n add_ssid: function() {\r\n this.config.network.ssids.push(this.ssid);\r\n this.ssid = \"\";\r\n this.update_ssids();\r\n },\r\n update_ssids: function() {\r\n axios.get(`/api/config/edit/network/ssids/${this.config.network.ssids.join(\"|\")}`, {\r\n timeout: 10000,\r\n headers: { 'X-Token': this.jwt }\r\n }).then(response => {\r\n if (response.data.status) {\r\n this.toaster = { show : true, message : \"Configuration updated\", type : \"success\" }\r\n setTimeout(function () { this.toaster = { show : false } }.bind(this), 1000)\r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n change_interface: function(type, iface) {\r\n axios.get(`/api/config/edit/network/${type}/${iface}`, {\r\n timeout: 10000,\r\n headers: { 'X-Token': this.jwt }\r\n }).then(response => {\r\n this.toaster = { show : true, message : \"Configuration updated\", type : \"success\" }\r\n setTimeout(function () { this.toaster = { show : false } }.bind(this), 1000)\r\n if (response.data.status) this.config.network[type] = iface\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n },\r\n created: function() {\r\n this.get_jwt().then(() => {\r\n this.load_config();\r\n });\r\n }\r\n}\r\n</script>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./network-manage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./network-manage.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./network-manage.vue?vue&type=template&id=c4a78946&\"\nimport script from \"./network-manage.vue?vue&type=script&lang=js&\"\nexport * from \"./network-manage.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}