{{ $i18n.t('Disabling') }}
\n{{ $i18n.t('Enabling') }}
\n{{ $i18n.t('Restarting') }}
\n{{ $i18n.t('Starting') }}
\n{{ $i18n.t('Stopping') }}
\n{{ $i18n.t('Restarting') }}
\n{{ $i18n.t('Starting') }}
\n{{ $i18n.t('Stopping') }}
\n{{ $i18n.t('Updating') }}
\n{{ text }}
\n{{ $t('Last Modified') }}: {{ file.lastModifiedDate }}
\n{{ $t('Size') }}: {{ bytes.toHuman(file.size, 2, true) }}B
\n{{ fileDecorated.size }}
\n{{ fileDecorated.lastModifiedDate }}
\n{{ text }}
\n{{ firstError.error.message }}
\nRef: {{ firstError.error.name }} (#{{ firstError.error.code}})
\n{{ title }}
\npacketfence.log
for more information about the specific constraint(s). Use the MySQL CLI to resolve these constraints manually before trying again.')\n store.dispatch('notification/danger', { icon: 'lock', url: decodeURIComponent(config.url), message })\n } else if (error.response.data) {\n switch (error.response.status) {\n case 401:\n icon = 'ban'\n break\n case 404:\n icon = 'unlink'\n break\n case 503:\n store.commit('session/API_ERROR')\n break\n }\n if (!error.response.data.quiet) {\n // eslint-disable-next-line\n console.group('API error')\n // eslint-disable-next-line\n console.warn(error.response.data)\n if (error.response.data.errors) {\n error.response.data.errors.forEach(error => {\n let message = `${error['field']}: ${error['message']}`\n // eslint-disable-next-line\n console.warn(message)\n store.dispatch('notification/danger', { icon, url: decodeURIComponent(config.url), message })\n })\n }\n // eslint-disable-next-line\n console.groupEnd()\n }\n if (['patch', 'post', 'put', 'delete'].includes(config.method) && error.response.data.errors) {\n let apiErrors = {}\n error.response.data.errors.forEach((err) => {\n apiErrors[err['field']] = err['message']\n })\n if (Object.keys(apiErrors).length > 0) {\n store.commit('session/API_ERRORS', apiErrors)\n }\n }\n if (typeof error.response.data === 'string') {\n store.dispatch('notification/danger', { icon, url: decodeURIComponent(config.url), message: error.message })\n } else if (error.response.data.message && !error.response.data.quiet) {\n store.dispatch('notification/danger', { icon, url: decodeURIComponent(config.url), message: error.response.data.message })\n }\n }\n } else if (error.request) {\n const { transformResponse: [firstTransform] = [] } = error.config\n let quiet = false\n if (firstTransform) {\n quiet = firstTransform().quiet\n }\n if (!quiet) {\n store.commit('session/API_ERROR')\n store.dispatch('notification/danger', { url: decodeURIComponent(config.url), message: 'API server seems down' })\n }\n }\n return Promise.reject(error)\n})\n\n/**\n * Axios instance to access documentation guides\n */\nexport const documentationCall = axios.create({\n baseURL: '/static/doc/'\n})\n\n/**\n * File Upload response filter,\n * input a JSON response object\n * returns a filtered JSON object, includes only keys matching /(.*)_path$/\n */\nexport const fileUploadPaths = response => {\n const filtered = {}\n Object.entries(response).forEach(([k, v]) => {\n if (/([a-zA-Z0-9_])_path$/i.test(k) && v) { // path is defined\n filtered[k] = v // forward path\n filtered[`${k}_upload`] = undefined // delete upload\n }\n })\n return filtered\n}\n\nexport default apiCall\n","export const prefixes = [\n { abbr: '', suffix: '', multiplier: Math.pow(1024, 0) },\n { abbr: 'k', suffix: 'kilo', multiplier: Math.pow(1024, 1) },\n { abbr: 'M', suffix: 'mega', multiplier: Math.pow(1024, 2) },\n { abbr: 'G', suffix: 'giga', multiplier: Math.pow(1024, 3) },\n { abbr: 'T', suffix: 'tera', multiplier: Math.pow(1024, 4) },\n { abbr: 'P', suffix: 'peta', multiplier: Math.pow(1024, 5) },\n { abbr: 'X', suffix: 'exa', multiplier: Math.pow(1024, 6) },\n { abbr: 'Z', suffix: 'zetta', multiplier: Math.pow(1024, 7) },\n { abbr: 'Y', suffix: 'yotta', multiplier: Math.pow(1024, 8) }\n]\n\nconst bytes = {\n prefixes,\n toHuman: (bytes, precision = 2, abbreviate = false) => {\n if (+bytes !== 0) {\n for (let i = 0; i < prefixes.length; i++) {\n let quotient = +bytes / prefixes[i].multiplier\n if (precision === 0 && Math.abs(quotient) > Math.pow(1024, 1) && Math.abs(quotient) < Math.pow(1024, 2)) {\n return quotient + ' ' + ((abbreviate) ? prefixes[i].abbr : prefixes[i].suffix)\n }\n else if (Math.abs(quotient) >= 1 && Math.abs(quotient) < 1024) {\n let q = Number.parseFloat(quotient).toFixed(precision).replace(/\\.0+$/, '')\n return q + ' ' + ((abbreviate) ? prefixes[i].abbr : prefixes[i].suffix)\n }\n }\n }\n return ((+bytes).toString() + ' ')\n }\n}\n\nexport default bytes\n","import _ from 'lodash'\n\nconst convert = {\n statusToVariant(params) {\n let variant = params.variant || ''\n switch (params.status) {\n case 'success':\n variant = 'success'\n break\n case 'skipped':\n variant = 'warning'\n break\n case 'failed':\n variant = 'danger'\n break\n }\n return variant\n }\n}\n\nexport default convert\n\nexport function valueToSelectValue(value) {\n return {'text': value, 'value': value}\n}\n\nexport function intsToStrings(obj) {\n return _.transform(obj, (result, value, key) => {\n if (_.isPlainObject(value)) {\n result[key] = intsToStrings(value);\n } else {\n result[key] = _.isInteger(value) ? value.toString() : value;\n }\n });\n}\n","import i18n from '@/utils/locale'\nimport { parse, format, distanceInWordsToNow } from 'date-fns'\n\nconst filters = {\n longDateTime (value) {\n if (!value || value === '0000-00-00 00:00:00') {\n return i18n.t('Never')\n } else {\n let localeObject, localeFormat\n if (i18n.locale === 'fr') {\n localeObject = require('date-fns/locale/fr')\n localeFormat = 'dddd, D MMMM, YYYY, HH:mm:ss'\n } else {\n localeObject = require('date-fns/locale/en')\n localeFormat = 'dddd, MMMM D, YYYY, hh:mm:ss a'\n }\n return format(parse(value), localeFormat, { locale: localeObject })\n }\n },\n shortDateTime (value) {\n if (!value || value === '0000-00-00 00:00:00') {\n return i18n.t('Never')\n } else {\n let localeObject, localeFormat\n if (i18n.locale === 'fr') {\n localeObject = require('date-fns/locale/fr')\n localeFormat = 'DD/MM/YY HH:mm'\n } else {\n localeObject = require('date-fns/locale/en')\n localeFormat = 'MM/DD/YY hh:mm a'\n }\n return format(parse(value), localeFormat, { locale: localeObject })\n }\n },\n relativeDate (value) {\n if (!value) {\n return ''\n } else if (value === '0000-00-00 00:00:00') {\n return i18n.t('Never')\n } else {\n let localeObject\n if (i18n.locale === 'fr') {\n localeObject = require('date-fns/locale/fr')\n } else {\n localeObject = require('date-fns/locale/en')\n }\n return distanceInWordsToNow(parse(value), { locale: localeObject })\n }\n }\n}\n\nexport default filters\n","/**\n * MessageFormat Class - Custom formatting used with 'vue-i18n'\n *\n * https://messageformat.github.io/messageformat/MessageFormat\n *\n**/\nimport MessageFormat from 'messageformat'\n\nexport default class CustomFormatter {\n constructor (options = {}) {\n // set locale\n this._locale = options.locale || 'en-US'\n // instanstantiate formatter\n this._formatter = new MessageFormat(this._locale)\n // initialize object cache\n this._caches = Object.create(null)\n }\n\n interpolate (message, values) {\n // reference cache\n let fn = this._caches[message]\n if (!fn) {\n // no cache, compile once\n fn = this._formatter.compile(message, this._locale)\n // cache\n this._caches[message] = fn\n }\n return [fn(values)]\n }\n}\n","import Vue from 'vue'\nimport VueI18n from 'vue-i18n'\nimport Formatter from './formatter'\n\nVue.use(VueI18n)\n\nconst locale = 'en-US' // default locale\nexport const formatter = new Formatter({ locale })\n\nconst i18n = new VueI18n({\n locale,\n formatter,\n messages: { 'en-US': {} },\n silentTranslationWarn: true, // suppress console warn on missing translations\n missing: (locale, key, vm, values) => {\n // uncomment the next line to debug missing translations\n // console.error(`[Translation] missing: locale=${locale}, key=${key}, values=${JSON.stringify(values)}`)\n if (values === [] || !values[0] || !key.includes('{') || !key.includes('}')) return key\n // handle formatting manually\n try {\n return formatter.interpolate(key, values[0])[0]\n } catch (err) {\n // eslint-disable-next-line\n console.error(err)\n }\n return key\n }\n})\n\nexport default i18n\n\n// available languages\n// first item is default\n// labels are in English\n// static definition is less resource-intensive than consuming /api/v1/translations\nexport const languages = [\n {\n locale: 'en',\n label: 'English' // i18n defer\n },\n {\n locale: 'fr',\n label: 'French' // i18n defer\n },\n]\n","export const ipv4ToInt = (ip) => ip.split('.').reduce((int, oct) => (int << 8) + parseInt(oct, 10), 0) >>> 0\n\nexport const intToIpv4 = (int) => [(int >>> 24) & 0xFF, (int >>> 16) & 0xFF, (int >>> 8) & 0xFF, int & 0xFF].join('.')\n\nexport const cidrToIpv4 = (cidr) => cidr.split('/', 1)[0] || cidr\n\nexport const cidrToRange = (cidr) => {\n let [ ip, bits = 32 ] = cidr.split('/')\n let host_bits = 32 - +bits\n let i = ipv4ToInt(ip)\n let start = (i >> host_bits) << host_bits\n let end = start | ((1 << host_bits) - 1)\n return [intToIpv4(start), intToIpv4(end)]\n}\n\nexport const connectionTypeToAttributes = (connectionType) => {\n const cType = String(connectionType)\n let attributes = {\n isWired: false,\n isWireless: false,\n isSNMP: false,\n isEAP: false,\n is8021X: false,\n isMacAuth: false\n }\n if (/inline/i.test(cType)) {\n return attributes\n }\n if (/^wireless-802\\.11/i.test(cType)) {\n attributes.isWireless = true\n } else {\n attributes.isWired = true\n }\n if (/^snmp/i.test(cType)) {\n attributes.isSNMP = true\n return attributes\n }\n if (cType.toLowerCase() === 'wired_mac_auth' || cType.toLowerCase() === 'ethernet-noeap') {\n attributes.isMacAuth = true\n }\n if (/eap$/i.test(cType) && /noeap$/i.test(cType)) {\n attributes.isEAP = true\n attributes.is8021X = true\n } else {\n attributes.isMacAuth = true\n }\n return attributes\n}\n\nexport const ipv4NetmaskToSubnet = (ip, netmask) => {\n const _ip = ip.split('.').map(i => parseInt(i))\n const _netmask = netmask.split('.').map(n => parseInt(n))\n let subnet = []\n _ip.forEach((_, idx) => {\n subnet.push(_ip[idx] & _netmask[idx])\n })\n return subnet.join('.')\n}\n\nexport const ipv4Sort = (a, b) => {\n if (!!a && !b) { return 1 } else if (!a && !!b) { return -1 } else if (!a && !b) { return 0 }\n const intA = ipv4ToInt(a)\n const intB = ipv4ToInt(b)\n return (intA === intB) ? 0 : ((intA > intB) ? 1 : -1)\n}\n\nexport const ipv4InSubnet = (ip, subnet) => {\n if (!ip || !subnet)\n return false\n const _ip = ip.split('.').map(i => parseInt(i))\n const _subnet = subnet.replace(/(\\.0)+$/, '').split('.').map(s => parseInt(s))\n return _ip.reduce((result, d, index) => {\n return result && (index >= _subnet.length || d === _subnet[index])\n }, true)\n}\n\nexport default {\n ipv4ToInt,\n intToIpv4,\n cidrToIpv4,\n cidrToRange,\n connectionTypeToAttributes,\n ipv4NetmaskToSubnet,\n ipv4Sort,\n ipv4InSubnet\n}\n","const password = {\n generate (conf = { pwlength: 8, upper: true, lower: true, digits: true, special: false, brackets: false, high: false, ambiguous: false }) {\n const charRanges = {\n upper: 'ABCDEFGHJKLMNPQRSTUVWXYZ',\n lower: 'abcdefghijkmnpqrstuvwxyz',\n digits: '123456789',\n special: '!@#$%^&*_+-=,./?;:`\"~\\'\\\\',\n brackets: '(){}[]<>',\n high: '¡¢£¤¥¦§©ª«¬®¯°±²³´µ¶¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ',\n ambiguous: 'O0oIl'\n }\n const ranges = Object.keys(charRanges).filter(range => conf[range]).map(range => charRanges[range])\n if (!ranges.length) return\n const charset = ranges.join('')\n let randomPassword = ''\n for (var i = 0, n = charset.length; i < conf.pwlength; ++i) {\n randomPassword += charset.charAt(Math.random() * n)\n }\n return randomPassword\n }\n}\n\nexport default password\n","export const reAlphaNumeric = value => /^[a-zA-Z0-9]*$/.test(value)\n\nexport const reAlphaNumericHyphenUnderscoreDot = value => /^[a-zA-Z0-9-_.]*$/.test(value)\n\nexport const reCommonName = value => /^([A-Z]+|[A-Z]+[0-9A-Z_:]*[0-9A-Z]+)$/i.test(value)\n\nexport const reEmail = value => /(^$|^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$)/.test(value)\n\nexport const reDomain = value => /^((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9*]+\\.)+[a-zA-Z]{2,}))$/.test(value)\n\nexport const reIpv4 = value => /^(([0-9]{1,3}.){3,3}[0-9]{1,3})$/i.test(value)\n\nexport const reIpv6 = value => /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/i.test(value)\n\nexport const reFilename = value => /^[^\\\\/?%*:|\"<>]+$/.test(value)\n\nexport const reMac = value => /^([0-9a-fA-F]{2}[-:]?){5,}([0-9a-fA-F]){2}$/.test(value)\n\nexport const reNumeric = value => /^-?[0-9]*$/.test(value)\n\n// eslint-disable-next-line no-useless-escape\nexport const reStaticRoute = value => /^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\/?(\\d+)?\\s+?(via\\s+(?:[0-9]{1,3}\\.){3}[0-9]{1,3}\\s+?)?dev\\s+[a-z,0-9\\.]+$/i.test(value)\n\n \nexport const reAscii = value => /^([\\x20-\\x7E]+)$/.test(value)","export const cleanMac = mac => {\n if (mac) {\n mac = mac.toLowerCase().replace(/([^0-9a-f])/gi, '')\n if (mac.length === 12) {\n return `${mac[0]}${mac[1]}:${mac[2]}${mac[3]}:${mac[4]}${mac[5]}:${mac[6]}${mac[7]}:${mac[8]}${mac[9]}:${mac[10]}${mac[11]}`\n }\n }\n return mac\n}\n\nexport const toKebabCase = (string, delim = '-') => string &&\n string\n .match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)\n .map(c => c.toLowerCase())\n .join(delim)\n\n\nexport const toBinary = string => {\n const codeUnits = Uint16Array.from(\n { length: string.length },\n (element, index) => string.charCodeAt(index)\n )\n const charCodes = new Uint8Array(codeUnits.buffer)\n let result = ''\n charCodes.forEach((char) => {\n result += String.fromCharCode(char)\n })\n return result\n}\n\n// https://stackoverflow.com/a/53433503\nconst fromCharCode = String.fromCharCode\nexport const utf8ToBase64 = ((btoa, replacer) => {\n return (inputString, BOMit) => btoa((BOMit ? \"\\xEF\\xBB\\xBF\" : \"\") + inputString.replace(/[\\x80-\\uD7ff\\uDC00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?/g, replacer))\n})(btoa, (nonAsciiChars) => {\n // make the UTF string into a binary UTF-8 encoded string\n var point = nonAsciiChars.charCodeAt(0)\n if (point >= 0xD800 && point <= 0xDBFF) {\n var nextcode = nonAsciiChars.charCodeAt(1)\n if (nextcode !== nextcode) // NaN because string is 1 code point long\n return fromCharCode(0xef/*11101111*/, 0xbf/*10111111*/, 0xbd/*10111101*/)\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n if (nextcode >= 0xDC00 && nextcode <= 0xDFFF) {\n point = (point - 0xD800) * 0x400 + nextcode - 0xDC00 + 0x10000\n if (point > 0xffff)\n return fromCharCode(\n (0x1e/*0b11110*/<<3) | (point>>>18),\n (0x2/*0b10*/<<6) | ((point>>>12)&0x3f/*0b00111111*/),\n (0x2/*0b10*/<<6) | ((point>>>6)&0x3f/*0b00111111*/),\n (0x2/*0b10*/<<6) | (point&0x3f/*0b00111111*/)\n )\n }\n else\n return fromCharCode(0xef, 0xbf, 0xbd)\n }\n if (point <= 0x007f)\n return nonAsciiChars\n else if (point <= 0x07ff)\n return fromCharCode((0x6<<5)|(point>>>6), (0x2<<6)|(point&0x3f))\n else\n return fromCharCode(\n (0xe/*0b1110*/<<4) | (point>>>12),\n (0x2/*0b10*/<<6) | ((point>>>6)&0x3f/*0b00111111*/),\n (0x2/*0b10*/<<6) | (point&0x3f/*0b00111111*/)\n )\n})","import * as yup from 'yup'\nimport { parse, format, isValid, compareAsc } from 'date-fns'\nimport mime from 'mime-types'\nimport i18n from './locale'\nimport {\n reAlphaNumeric,\n reAlphaNumericHyphenUnderscoreDot,\n reCommonName,\n reEmail,\n reDomain,\n reIpv4,\n reIpv6,\n reFilename,\n reMac,\n reNumeric,\n reStaticRoute,\n} from './regex'\n\nyup.setLocale({ // default validators\n mixed: {\n required: args => args.message || i18n.t('{path} required.', args)\n },\n string: {\n email: args => args.message || i18n.t('Invalid Email.'),\n min: args => args.message || i18n.t('Minimum {min} characters.', args),\n max: args => args.message || i18n.t('Maximum {max} characters.', args),\n required: args => args.message || i18n.t('Value required.')\n }\n})\n\n/**\n * yup.array\n**/\nyup.addMethod(yup.array, 'if', function (cmpFn, message) {\n return this.test({\n name: 'required',\n message: message || i18n.t('Invalid value.'),\n test: value => cmpFn(value)\n })\n})\n\nyup.addMethod(yup.array, 'required', function (message) {\n return this.test({\n name: 'required',\n message: message || i18n.t('${path} required.'),\n test: value => (value && value.length > 0)\n })\n})\n\nyup.addMethod(yup.array, 'unique', function (message, hashFn) {\n hashFn = hashFn || JSON.stringify\n return this.test({\n name: 'unique',\n message: message || i18n.t('Duplicate item, must be unique.'),\n test: value => {\n if (!value || value.length === 0)\n return true\n let cmp = []\n for (let m = 0; m < value.length; m++) {\n let hash = hashFn(value[m])\n if (cmp.includes(hash))\n return false\n if (hash)\n cmp.push(hash)\n }\n return true\n }\n })\n})\n\nyup.addMethod(yup.array, 'ifThenRequires', function (message, ifIterFn, requiresIterFn) {\n return this.test({\n name: 'ifThenRequires',\n message: message || i18n.t('Missing value.'),\n test: value => {\n if (!value || value.length === 0)\n return true\n if (value.filter(row => ifIterFn(row)).length > 0)\n return (value.filter(row => requiresIterFn(row)).length > 0)\n return true\n }\n })\n})\n\nyup.addMethod(yup.array, 'ifThenRestricts', function (message, ifIterFn, restrictsIterFn) {\n return this.test({\n name: 'ifThenRestricts',\n message: message || i18n.t('Missing value.'),\n test: value => {\n if (!value || value.length === 0)\n return true\n if (value.filter(row => ifIterFn(row)).length > 0)\n return (value.filter(row => restrictsIterFn(row)).length === 0)\n return true\n }\n })\n})\n\n/**\n * yup.string\n**/\nyup.addMethod(yup.string, 'in', function (ref, message) {\n return this.test({\n name: 'in',\n message: message || i18n.t('Invalid value'),\n test: value => ref.includes(value)\n })\n})\n\nyup.addMethod(yup.string, 'not', function (cmp, message) {\n return this.test({\n name: 'not',\n message: message || i18n.t('Invalid value'),\n test: value => {\n return Promise.resolve((cmp.constructor === Function) ? cmp(value) : cmp)\n }\n })\n})\n\nyup.addMethod(yup.string, 'maxAsInt', function (ref, message) {\n return this.test({\n name: 'maxAsInt',\n message: message || i18n.t('Maximum {maxValue}.', { maxValue: ref }),\n test: value => ['', null, undefined].includes(value) || +value <= +ref\n })\n})\n\nyup.addMethod(yup.string, 'minAsInt', function (ref, message) {\n return this.test({\n name: 'minAsInt',\n message: message || i18n.t('Minimum {minValue}.', { minValue: ref }),\n test: value => ['', null, undefined].includes(value) || +value >= +ref\n })\n})\n\nyup.addMethod(yup.string, 'isAlphaNumeric', function (message) {\n return this.test({\n name: 'isAlphaNumeric',\n message: message || i18n.t('Invalid character, only letters (A-Z) or numbers (0-9).'),\n test: value => ['', null, undefined].includes(value) || reAlphaNumeric(value)\n })\n})\n\nyup.addMethod(yup.string, 'isAlphaNumericHyphenUnderscoreDot', function (message) {\n return this.test({\n name: 'isAlphaNumericHyphenUnderscoreDot',\n message: message || i18n.t('Invalid character, only letters (A-Z), numbers (0-9), hyphen (-), underscore (_), or dot (.).'),\n test: value => ['', null, undefined].includes(value) || reAlphaNumericHyphenUnderscoreDot(value)\n })\n})\n\nyup.addMethod(yup.string, 'isCIDR', function (message) {\n return this.test({\n name: 'isCIDR',\n message: message || i18n.t('Invalid CIDR.'),\n test: value => {\n if (['', null, undefined].includes(value))\n return true\n const [ ipv4, network, ...extra ] = value.split('/')\n return (\n extra.length === 0 &&\n +network >= 0 && +network <= 32 &&\n reIpv4(ipv4)\n )\n }\n })\n})\n\nexport const isCommonName = value => (['', null, undefined].includes(value) || reCommonName(value))\n\nyup.addMethod(yup.string, 'isCommonName', function (message) {\n return this.test({\n name: 'isCommonName',\n message: message || i18n.t('Invalid character, only letters (A-Z), numbers (0-9), underscores (_), or colons (:).'),\n test: isCommonName\n })\n})\n\nyup.addMethod(yup.string, 'isCommonNameOrFQDN', function (message) {\n return this.test({\n name: 'isCommonNameOrFQDN',\n message: message || i18n.t('Invalid common name.'),\n test: (value) => (isCommonName(value) || isFQDN(value))\n })\n})\n\nyup.addMethod(yup.string, 'isCommonNameOrFQDNOrMAC', function (message) {\n return this.test({\n name: 'isCommonNameOrFQDNOrMAC',\n message: message || i18n.t('Invalid common name.'),\n test: (value) => (isCommonName(value) || isFQDN(value) || `${value}`.toLowerCase().replace(/[^0-9a-f]/g, '').length === 12)\n })\n})\n\nyup.addMethod(yup.string, 'isDateCompare', function (comparison, date = new Date(), dateFormat = 'YYYY-MM-DD HH:mm:ss', message) {\n return this.test({\n name: 'isDateCompare',\n message: i18n.t('Invalid date.'),\n test: function (value) {\n if (['', null, undefined].includes(value) || ['', null, undefined].includes(date))\n return true\n // handle zero dates (substitute with max)\n if ([0, '0'].includes(value))\n value = new Date(8640000000000000)\n if ([0, '0'].includes(date))\n date = new Date(8640000000000000)\n // round date/value using date-fns format\n const _date = format((date instanceof Date && isValid(date) ? date : parse(date)), dateFormat)\n const _value = format((value instanceof Date && isValid(value) ? value : parse(value)), dateFormat)\n const cmp = compareAsc(parse(_value), parse(_date))\n switch (true) {\n case ['>', 'gt'].includes(comparison) && !(cmp > 0):\n case ['>=', 'gte'].includes(comparison) && !(cmp >= 0):\n case ['<', 'lt'].includes(comparison) && !(cmp < 0):\n case ['<=', 'lte'].includes(comparison) && !(cmp <= 0):\n case ['===', 'eq'].includes(comparison) && !(cmp === 0):\n case ['!==', 'ne'].includes(comparison) && !(cmp !== 0):\n return this.createError({ message: message || i18n.t('Invalid date, must be {comparison} {date}.', { comparison, date: _date }) })\n // break\n default:\n return true\n }\n }\n })\n})\n\nyup.addMethod(yup.string, 'isDateFormat', function (message, dateFormat = 'YYYY-MM-DD HH:mm:ss') {\n return this.test({\n name: 'isDateFormat',\n message: message || i18n.t('Invalid date, use format \"{dateFormat}\".', { dateFormat }),\n test: value => {\n return (\n ['', null, undefined].includes(value)\n || dateFormat.replace(/[a-z]/gi, '0') === value.replace(/[0-9]/g, '0') // '0000-00-00 00:00:00' === '0000-00-00 00:00:00'\n )\n }\n })\n})\n\nyup.addMethod(yup.string, 'isDateFormatOrZero', function (message, dateFormat = 'YYYY-MM-DD HH:mm:ss') {\n return this.test({\n name: 'isDateFormatOrZero',\n message: message || i18n.t('Invalid date, use format \"{dateFormat}\".', { dateFormat }),\n test: value => {\n return (\n ['', null, undefined].includes(value)\n || [0, '0'].includes(value)\n || dateFormat.replace(/[a-z]/gi, '0') === value.replace(/[0-9]/g, '0') // '0000-00-00 00:00:00' === '0000-00-00 00:00:00'\n )\n }\n })\n})\n\nyup.addMethod(yup.string, 'isDomain', function (message) {\n return this.test({\n name: 'isDomain',\n message: message || i18n.t('Invalid domain name.'),\n test: value => {\n return (\n ['', null, undefined].includes(value)\n || reDomain(value)\n )\n }\n })\n})\n\nyup.addMethod(yup.string, 'isEmailCsv', function (message) {\n return this.test({\n name: 'isEmailCsv',\n message: message || i18n.t('Invalid comma-separated list of email addresses.'),\n test: value => {\n if (['', null, undefined].includes(value))\n return true\n const emails = value.split(',')\n for (let e = 0; e < emails.length; e++) {\n if (!['', null, undefined].includes(emails[e].trim()) && !reEmail(emails[e].trim()))\n return false\n }\n return true\n }\n })\n})\n\nyup.addMethod(yup.string, 'isFilename', function (message) {\n return this.test({\n name: 'isFilename',\n message: message || i18n.t('Invalid character, only letters (A-Z), numbers (0-9), underscores (_), or colons (:).'),\n test: value => ['', null, undefined].includes(value) || reFilename(value)\n })\n})\n\nyup.addMethod(yup.string, 'isFilenameWithExtension', function (extensions, message) {\n return this.test({\n name: 'isFilenameWithExtension',\n message: message || i18n.t('Invalid extension. Must be one of: {extensions}.', { extensions: extensions.join(', ') }),\n test: value => {\n const re = RegExp('^[0-9a-z\\xC0-\\xff_]+[0-9a-z\\xC0-\\xff_\\\\-\\\\.]*\\\\.(' + extensions.join('|') + ')$', 'gi')\n return !value || re.test(value)\n }\n })\n})\n\nyup.addMethod(yup.string, 'isFilenameWithContentType', function (contentTypes, message) {\n return this.test({\n name: 'isFilenameWithContentType',\n message: message || i18n.t('Invalid content-type. Must be one of: {contentTypes}.', { contentTypes: contentTypes.join(', ') }),\n test: value => {\n const contentType = mime.lookup(value)\n if (!contentType)\n return false\n const [ contentTypeMs, contentTypeLs ] = contentType.split('/')\n return contentTypes.reduce((valid, allowed) => {\n if (allowed === '*/*')\n return true\n const [ allowedMs, allowedLs ] = allowed.split('/')\n if (contentTypeMs === allowedMs && (allowedLs === '*' || contentTypeLs === allowedLs))\n return true\n return valid\n }, false)\n }\n })\n})\n\nexport const isFQDN = value => {\n if (['', null, undefined].includes(value))\n return true\n const parts = value.split('.')\n const tld = parts.pop()\n if (!parts.length || !/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false\n }\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i]\n if (part.indexOf('__') >= 0) {\n return false\n }\n if (!/^[a-z\\u00a1-\\uffff0-9-_]+$/i.test(part)) {\n return false\n }\n if (/[\\uff01-\\uff5e]/.test(part)) {\n // disallow full-width chars\n return false\n }\n if (part[0] === '-' || part[part.length - 1] === '-') {\n return false\n }\n }\n return true\n}\n\nyup.addMethod(yup.string, 'isFQDN', function (message) {\n return this.test({\n name: 'isFQDN',\n message: message || i18n.t('Invalid FQDN.'),\n test: isFQDN\n })\n})\n\nyup.addMethod(yup.string, 'isIpv4', function (message) {\n return this.test({\n name: 'isIpv4',\n message: message || i18n.t('Invalid IPv4 Address.'),\n test: value => ['', null, undefined].includes(value) || reIpv4(value)\n })\n})\n\nyup.addMethod(yup.string, 'isIpv4Csv', function (message) {\n return this.test({\n name: 'isIpv4Csv',\n message: message || i18n.t('Invalid comma-separated list of IPv4 addresses.'),\n test: value => {\n if (['', null, undefined].includes(value))\n return true\n const addresses = value.split(',')\n for (let e = 0; e < addresses.length; e++) {\n if (!['', null, undefined].includes(addresses[e].trim()) && !reIpv4(addresses[e].trim()))\n return false\n }\n return true\n }\n })\n\n})\n\nyup.addMethod(yup.string, 'isIpv6', function (message) {\n return this.test({\n name: 'isIpv6',\n message: message || i18n.t('Invalid IPv6 Address.'),\n test: value => ['', null, undefined].includes(value) || reIpv6(value)\n })\n})\n\nyup.addMethod(yup.string, 'isMAC', function (message) {\n return this.test({\n name: 'isMAC',\n message: message || i18n.t('Invalid MAC.'),\n test: value => ['', null, undefined].includes(value) || reMac(value)\n })\n})\n\nyup.addMethod(yup.string, 'isPort', function (message) {\n return this.test({\n name: 'isPort',\n message: message || i18n.t('Invalid port.'),\n test: value => ['', null, undefined].includes(value) || (+value === parseFloat(value) && +value >= 1 && +value <= 65535)\n })\n})\n\nyup.addMethod(yup.string, 'isPrice', function (message) {\n return this.test({\n name: 'isPrice',\n message: message || i18n.t('Invalid price.'),\n test: value => ['', null, undefined].includes(value) || (parseFloat(value) >= 0 && ((value || '').split('.')[1] || []).length <= 2)\n })\n})\n\nyup.addMethod(yup.string, 'isStaticRoute', function (message) {\n return this.test({\n name: 'isStaticRoute',\n message: message || i18n.t('Invalid static route.'),\n test: value => ['', null, undefined].includes(value) || reStaticRoute(value)\n })\n})\n\nyup.addMethod(yup.string, 'isVLAN', function (message) {\n return this.test({\n name: 'isVlan',\n message: message || i18n.t('Invalid VLAN.'),\n test: value => ['', null, undefined].includes(value) || (+value === parseFloat(value) && +value >= 1 && +value <= 4096)\n })\n})\n\nimport {\n MysqlString,\n MysqlNumber,\n MysqlDatetime,\n MysqlEnum,\n MysqlEmail,\n MysqlMac\n} from '@/globals/mysql'\n\nyup.addMethod(yup.string, 'mysql', function(columnSchema) {\n return this.test({\n name: 'mysql',\n message: i18n.t('Unknown error.'),\n test: function (value) {\n if (['', null, undefined].includes(value))\n return true\n const { type, maxLength, min, max,\n format = 'YYYY-MM-DD HH:mm:ss',\n ['enum']: _enum = [] // reserved word\n } = columnSchema\n\n if ([MysqlString, MysqlDatetime, MysqlEmail].includes(type) && value.length && value.length > maxLength)\n return this.createError({ message: i18n.t('Maximum {maxLength} characters.', columnSchema) })\n\n switch (true) {\n case (type === MysqlDatetime):\n if (!([0, '0'].includes(value)) && format.replace(/[a-z]/gi, '0') !== value.replace(/[0-9]/g, '0'))\n return this.createError({ message: i18n.t('Invalid datetime, use format \"{format}\".', { format }) })\n break\n\n case (type === MysqlNumber):\n if (!reNumeric(value))\n return this.createError({ message: i18n.t('Must be numeric.') })\n if (+value < +min)\n return this.createError({ message: i18n.t('Minimum value of {min}.', columnSchema) })\n if (+value > +max)\n return this.createError({ message: i18n.t('Maximum value of {max}.', columnSchema) })\n break\n\n case (type === MysqlEnum):\n if (_enum.length && !_enum.includes(value))\n return this.createError({ message: i18n.t('Invalid value.') })\n break\n\n case (type === MysqlEmail):\n if (!reEmail(value))\n return this.createError({ message: i18n.t('Invalid email.') })\n break\n\n case (type === MysqlMac):\n if (`${value}`.toLowerCase().replace(/[^0-9a-f]/g, '').length !== 12)\n return this.createError({ message: i18n.t('Invalid MAC.') })\n break\n }\n return true\n }\n })\n})\n\nexport default yup\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('admin_api_audit_logs', { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('admin_api_audit_logs/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.getQuiet(`admin_api_audit_log/${id}`).then(response => {\n return response.data.item\n })\n }\n}","/**\n* \"$_admin_api_audit_logs\" store module\n*/\nimport Vue from 'vue'\nimport api from './_api'\n\nconst STORAGE_SEARCH_LIMIT_KEY = 'admin_api_audit_logs-search-limit'\nconst STORAGE_VISIBLE_COLUMNS_KEY = 'admin_api_audit_logs-visible-columns'\n\n// Default values\nconst state = () => {\n return {\n results: [], // search results\n cache: {}, // admin_api_audit log details\n message: '',\n itemStatus: '',\n searchStatus: '',\n searchFields: [],\n searchQuery: null,\n searchSortBy: 'mac',\n searchSortDesc: false,\n searchMaxPageNumber: 1,\n searchPageSize: localStorage.getItem(STORAGE_SEARCH_LIMIT_KEY) || 10,\n visibleColumns: JSON.parse(localStorage.getItem(STORAGE_VISIBLE_COLUMNS_KEY)) || false\n }\n}\n\nconst getters = {\n isLoading: state => state.itemStatus === 'loading',\n isLoadingResults: state => state.searchStatus === 'loading'\n}\n\nconst actions = {\n setSearchFields: ({ commit }, fields) => {\n commit('SEARCH_FIELDS_UPDATED', fields)\n },\n setSearchQuery: ({ commit }, query) => {\n commit('SEARCH_QUERY_UPDATED', query)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchPageSize: ({ commit }, limit) => {\n localStorage.setItem(STORAGE_SEARCH_LIMIT_KEY, limit)\n commit('SEARCH_LIMIT_UPDATED', limit)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchSorting: ({ commit }, params) => {\n commit('SEARCH_SORT_BY_UPDATED', params.sortBy)\n commit('SEARCH_SORT_DESC_UPDATED', params.sortDesc)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setVisibleColumns: ({ commit }, columns) => {\n localStorage.setItem(STORAGE_VISIBLE_COLUMNS_KEY, JSON.stringify(columns))\n commit('VISIBLE_COLUMNS_UPDATED', columns)\n },\n search: ({ state, commit }, page) => {\n let sort = [state.searchSortDesc ? `${state.searchSortBy} DESC` : state.searchSortBy]\n let body = {\n cursor: state.searchPageSize * (page - 1),\n limit: state.searchPageSize,\n fields: state.searchFields,\n sort\n }\n let apiPromise = state.searchQuery ? api.search(Object.assign(body, { query: state.searchQuery })) : api.list(body)\n if (state.searchStatus !== 'loading') {\n return new Promise((resolve, reject) => {\n commit('SEARCH_REQUEST')\n apiPromise.then(response => {\n commit('SEARCH_SUCCESS', response)\n resolve(response)\n }).catch(err => {\n commit('SEARCH_ERROR', err.response)\n reject(err)\n })\n })\n }\n },\n getItem: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(data => {\n commit('ITEM_REPLACED', data)\n return state.cache[id]\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n SEARCH_FIELDS_UPDATED: (state, fields) => {\n state.searchFields = fields\n },\n SEARCH_QUERY_UPDATED: (state, query) => {\n state.searchQuery = query\n },\n SEARCH_SORT_BY_UPDATED: (state, field) => {\n state.searchSortBy = field\n },\n SEARCH_SORT_DESC_UPDATED: (state, desc) => {\n state.searchSortDesc = desc\n },\n SEARCH_MAX_PAGE_NUMBER_UPDATED: (state, page) => {\n state.searchMaxPageNumber = page\n },\n SEARCH_LIMIT_UPDATED: (state, limit) => {\n state.searchPageSize = limit\n },\n SEARCH_REQUEST: (state) => {\n state.searchStatus = 'loading'\n },\n SEARCH_SUCCESS: (state, response) => {\n state.searchStatus = 'success'\n if (response) {\n state.results = response.items\n let nextPage = Math.floor(response.nextCursor / state.searchPageSize) + 1\n if (nextPage > state.searchMaxPageNumber) {\n state.searchMaxPageNumber = nextPage\n }\n }\n },\n SEARCH_ERROR: (state, response) => {\n state.searchStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n VISIBLE_COLUMNS_UPDATED: (state, columns) => {\n state.visibleColumns = columns\n },\n ITEM_REQUEST: (state) => {\n state.itemStatus = 'loading'\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = 'success'\n Vue.set(state.cache, data.id, data)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\nimport store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'admin_api_audit_logs' }),\n goToItem: params => $router\n .push({ name: 'admin_api_audit_log', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_admin_api_audit_logs) {\n store.registerModule('$_admin_api_audit_logs', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'admin_api_audit_logs/search',\n name: 'admin_api_audit_logs',\n component: TheSearch,\n meta: {\n can: 'read admin_api_audit_log',\n isFailRoute: true\n },\n beforeEnter\n },\n {\n path: 'admin_api_audit_log/:id',\n name: 'admin_api_audit_log',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_admin_api_audit_logs/getItem', to.params.id).then(() => {\n next()\n }).catch(() => { // `mac` does not exist\n store.dispatch('notification/danger', { message: i18n.t('Admin Audit Log {id}
does not exist.', to.params) })\n next({ name: 'admin_api_audit_logs' })\n })\n },\n meta: {\n can: 'read admin_api_audit_log'\n }\n }\n]","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('dhcp_option82s', { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('dhcp_option82s/search', body).then(response => {\n return response.data\n })\n },\n item: mac => {\n return apiCall.get(['dhcp_option82', mac]).then(response => {\n return response.data.item\n })\n }\n}","/**\n* \"$_dhcpoption82_logs\" store module\n*/\nimport Vue from 'vue'\nimport api from './_api'\n\nconst STORAGE_SEARCH_LIMIT_KEY = 'dhcpoption82logs-search-limit'\nconst STORAGE_VISIBLE_COLUMNS_KEY = 'dhcpoption82logs-visible-columns'\n\n// Default values\nconst state = () => {\n return {\n results: [], // search results\n cache: {}, // dhcp option82 log details\n message: '',\n itemStatus: '',\n searchStatus: '',\n searchFields: [],\n searchQuery: null,\n searchSortBy: 'mac',\n searchSortDesc: false,\n searchMaxPageNumber: 1,\n searchPageSize: localStorage.getItem(STORAGE_SEARCH_LIMIT_KEY) || 10,\n visibleColumns: JSON.parse(localStorage.getItem(STORAGE_VISIBLE_COLUMNS_KEY)) || false\n }\n}\n\nconst getters = {\n isLoading: state => state.itemStatus === 'loading',\n isLoadingResults: state => state.searchStatus === 'loading'\n}\n\nconst actions = {\n setSearchFields: ({ commit }, fields) => {\n commit('SEARCH_FIELDS_UPDATED', fields)\n },\n setSearchQuery: ({ commit }, query) => {\n commit('SEARCH_QUERY_UPDATED', query)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchPageSize: ({ commit }, limit) => {\n localStorage.setItem(STORAGE_SEARCH_LIMIT_KEY, limit)\n commit('SEARCH_LIMIT_UPDATED', limit)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchSorting: ({ commit }, params) => {\n commit('SEARCH_SORT_BY_UPDATED', params.sortBy)\n commit('SEARCH_SORT_DESC_UPDATED', params.sortDesc)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setVisibleColumns: ({ commit }, columns) => {\n localStorage.setItem(STORAGE_VISIBLE_COLUMNS_KEY, JSON.stringify(columns))\n commit('VISIBLE_COLUMNS_UPDATED', columns)\n },\n search: ({ state, commit }, page) => {\n let sort = [state.searchSortDesc ? `${state.searchSortBy} DESC` : state.searchSortBy]\n let body = {\n cursor: state.searchPageSize * (page - 1),\n limit: state.searchPageSize,\n fields: state.searchFields,\n sort\n }\n let apiPromise = state.searchQuery ? api.search(Object.assign(body, { query: state.searchQuery })) : api.list(body)\n if (state.searchStatus !== 'loading') {\n return new Promise((resolve, reject) => {\n commit('SEARCH_REQUEST')\n apiPromise.then(response => {\n commit('SEARCH_SUCCESS', response)\n resolve(response)\n }).catch(err => {\n commit('SEARCH_ERROR', err.response)\n reject(err)\n })\n })\n }\n },\n getItem: ({ state, commit }, mac) => {\n if (state.cache[mac]) {\n return Promise.resolve(state.cache[mac])\n }\n commit('ITEM_REQUEST')\n return api.item(mac).then(data => {\n commit('ITEM_REPLACED', data)\n return state.cache[mac]\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n return err\n })\n }\n}\n\nconst mutations = {\n SEARCH_FIELDS_UPDATED: (state, fields) => {\n state.searchFields = fields\n },\n SEARCH_QUERY_UPDATED: (state, query) => {\n state.searchQuery = query\n },\n SEARCH_SORT_BY_UPDATED: (state, field) => {\n state.searchSortBy = field\n },\n SEARCH_SORT_DESC_UPDATED: (state, desc) => {\n state.searchSortDesc = desc\n },\n SEARCH_MAX_PAGE_NUMBER_UPDATED: (state, page) => {\n state.searchMaxPageNumber = page\n },\n SEARCH_LIMIT_UPDATED: (state, limit) => {\n state.searchPageSize = limit\n },\n SEARCH_REQUEST: (state) => {\n state.searchStatus = 'loading'\n },\n SEARCH_SUCCESS: (state, response) => {\n state.searchStatus = 'success'\n if (response) {\n state.results = response.items\n let nextPage = Math.floor(response.nextCursor / state.searchPageSize) + 1\n if (nextPage > state.searchMaxPageNumber) {\n state.searchMaxPageNumber = nextPage\n }\n }\n },\n SEARCH_ERROR: (state, response) => {\n state.searchStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n VISIBLE_COLUMNS_UPDATED: (state, columns) => {\n state.visibleColumns = columns\n },\n ITEM_REQUEST: (state) => {\n state.itemStatus = 'loading'\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = 'success'\n Vue.set(state.cache, data.mac, data)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'dhcpoption82s' }),\n goToItem: params => $router\n .push({ name: 'dhcpoption82', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_dhcpoption82_logs) {\n store.registerModule('$_dhcpoption82_logs', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'dhcpoption82s/search',\n name: 'dhcpoption82s',\n component: TheSearch,\n meta: {\n can: 'read dhcp_option_82',\n isFailRoute: true\n },\n beforeEnter\n },\n {\n path: 'dhcpoption82/:mac',\n name: 'dhcpoption82',\n component: TheView,\n props: (route) => ({ mac: route.params.mac }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_dhcpoption82_logs/getItem', to.params.mac).then(() => {\n next()\n })\n },\n meta: {\n can: 'read dhcp_option_82'\n }\n }\n]","import Vue from 'vue'\nimport store from '@/store'\nimport apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('dns_audit_logs', { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('dns_audit_logs/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(`dns_audit_log/${id}`).then(response => {\n return response.data.item\n })\n },\n setPassthroughs: passthroughs => {\n return apiCall.patch('config/base/fencing', { passthroughs: passthroughs.join(',') }).then(response => {\n // Clear cached values\n Vue.set(store.state.config, 'baseFencing', false)\n if (store.state.$_bases) {\n Vue.set(store.state.$_bases.cache, 'fencing', false)\n }\n return response\n })\n }\n}","/**\n* \"$_dns_logs\" store module\n*/\nimport Vue from 'vue'\nimport api from './_api'\n\nconst STORAGE_SEARCH_LIMIT_KEY = 'dnslogs-search-limit'\nconst STORAGE_VISIBLE_COLUMNS_KEY = 'dnslogs-visible-columns'\n\n// Default values\nconst state = () => {\n return {\n results: [], // search results\n cache: {}, // dns log details\n message: '',\n itemStatus: '',\n searchStatus: '',\n searchFields: [],\n searchQuery: null,\n searchSortBy: 'mac',\n searchSortDesc: false,\n searchMaxPageNumber: 1,\n searchPageSize: localStorage.getItem(STORAGE_SEARCH_LIMIT_KEY) || 10,\n visibleColumns: JSON.parse(localStorage.getItem(STORAGE_VISIBLE_COLUMNS_KEY)) || false\n }\n}\n\nconst getters = {\n isLoading: state => state.itemStatus === 'loading',\n isLoadingResults: state => state.searchStatus === 'loading'\n}\n\nconst actions = {\n setSearchFields: ({ commit }, fields) => {\n commit('SEARCH_FIELDS_UPDATED', fields)\n },\n setSearchQuery: ({ commit }, query) => {\n commit('SEARCH_QUERY_UPDATED', query)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchPageSize: ({ commit }, limit) => {\n localStorage.setItem(STORAGE_SEARCH_LIMIT_KEY, limit)\n commit('SEARCH_LIMIT_UPDATED', limit)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchSorting: ({ commit }, params) => {\n commit('SEARCH_SORT_BY_UPDATED', params.sortBy)\n commit('SEARCH_SORT_DESC_UPDATED', params.sortDesc)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setVisibleColumns: ({ commit }, columns) => {\n localStorage.setItem(STORAGE_VISIBLE_COLUMNS_KEY, JSON.stringify(columns))\n commit('VISIBLE_COLUMNS_UPDATED', columns)\n },\n search: ({ state, commit }, page) => {\n let sort = [state.searchSortDesc ? `${state.searchSortBy} DESC` : state.searchSortBy]\n let body = {\n cursor: state.searchPageSize * (page - 1),\n limit: state.searchPageSize,\n fields: state.searchFields,\n sort\n }\n let apiPromise = state.searchQuery ? api.search(Object.assign(body, { query: state.searchQuery })) : api.list(body)\n if (state.searchStatus !== 'loading') {\n return new Promise((resolve, reject) => {\n commit('SEARCH_REQUEST')\n apiPromise.then(response => {\n commit('SEARCH_SUCCESS', response)\n resolve(response)\n }).catch(err => {\n commit('SEARCH_ERROR', err.response)\n reject(err)\n })\n })\n }\n },\n getItem: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(data => {\n commit('ITEM_REPLACED', data)\n return state.cache[id]\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n return err\n })\n }\n}\n\nconst mutations = {\n SEARCH_FIELDS_UPDATED: (state, fields) => {\n state.searchFields = fields\n },\n SEARCH_QUERY_UPDATED: (state, query) => {\n state.searchQuery = query\n },\n SEARCH_SORT_BY_UPDATED: (state, field) => {\n state.searchSortBy = field\n },\n SEARCH_SORT_DESC_UPDATED: (state, desc) => {\n state.searchSortDesc = desc\n },\n SEARCH_MAX_PAGE_NUMBER_UPDATED: (state, page) => {\n state.searchMaxPageNumber = page\n },\n SEARCH_LIMIT_UPDATED: (state, limit) => {\n state.searchPageSize = limit\n },\n SEARCH_REQUEST: (state) => {\n state.searchStatus = 'loading'\n },\n SEARCH_SUCCESS: (state, response) => {\n state.searchStatus = 'success'\n if (response) {\n state.results = response.items\n let nextPage = Math.floor(response.nextCursor / state.searchPageSize) + 1\n if (nextPage > state.searchMaxPageNumber) {\n state.searchMaxPageNumber = nextPage\n }\n }\n },\n SEARCH_ERROR: (state, response) => {\n state.searchStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n VISIBLE_COLUMNS_UPDATED: (state, columns) => {\n state.visibleColumns = columns\n },\n ITEM_REQUEST: (state) => {\n state.itemStatus = 'loading'\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = 'success'\n Vue.set(state.cache, data.id, data)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'dnslogs' }),\n goToItem: params => $router\n .push({ name: 'dnslog', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_dns_logs) {\n store.registerModule('$_dns_logs', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'dnslogs/search',\n name: 'dnslogs',\n component: TheSearch,\n meta: {\n can: 'read dns_log',\n isFailRoute: true\n },\n beforeEnter\n },\n {\n path: 'dnslog/:id',\n name: 'dnslog',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_dns_logs/getItem', to.params.id).then(() => {\n next()\n })\n },\n meta: {\n can: 'read dns_log'\n }\n }\n]","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('radius_audit_logs', { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('radius_audit_logs/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['radius_audit_log', id]).then(response => {\n return response.data.item\n })\n }\n}","/**\n* \"$_radius_logs\" store module\n*/\nimport Vue from 'vue'\nimport api from './_api'\n\nconst STORAGE_SEARCH_LIMIT_KEY = 'radiuslogs-search-limit'\nconst STORAGE_VISIBLE_COLUMNS_KEY = 'radiuslogs-visible-columns'\n\n// Default values\nconst state = () => {\n return {\n results: [], // search results\n cache: {}, // radius log details\n message: '',\n itemStatus: '',\n searchStatus: '',\n searchFields: [],\n searchQuery: null,\n searchSortBy: 'mac',\n searchSortDesc: false,\n searchMaxPageNumber: 1,\n searchPageSize: localStorage.getItem(STORAGE_SEARCH_LIMIT_KEY) || 10,\n visibleColumns: JSON.parse(localStorage.getItem(STORAGE_VISIBLE_COLUMNS_KEY)) || false\n }\n}\n\nconst getters = {\n isLoading: state => state.itemStatus === 'loading',\n isLoadingResults: state => state.searchStatus === 'loading'\n}\n\nconst actions = {\n setSearchFields: ({ commit }, fields) => {\n commit('SEARCH_FIELDS_UPDATED', fields)\n },\n setSearchQuery: ({ commit }, query) => {\n commit('SEARCH_QUERY_UPDATED', query)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchPageSize: ({ commit }, limit) => {\n localStorage.setItem(STORAGE_SEARCH_LIMIT_KEY, limit)\n commit('SEARCH_LIMIT_UPDATED', limit)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setSearchSorting: ({ commit }, params) => {\n commit('SEARCH_SORT_BY_UPDATED', params.sortBy)\n commit('SEARCH_SORT_DESC_UPDATED', params.sortDesc)\n commit('SEARCH_MAX_PAGE_NUMBER_UPDATED', 1) // reset page count\n },\n setVisibleColumns: ({ commit }, columns) => {\n localStorage.setItem(STORAGE_VISIBLE_COLUMNS_KEY, JSON.stringify(columns))\n commit('VISIBLE_COLUMNS_UPDATED', columns)\n },\n search: ({ state, commit }, page) => {\n let sort = [state.searchSortDesc ? `${state.searchSortBy} DESC` : state.searchSortBy]\n let body = {\n cursor: state.searchPageSize * (page - 1),\n limit: state.searchPageSize,\n fields: state.searchFields,\n sort\n }\n let apiPromise = state.searchQuery ? api.search(Object.assign(body, { query: state.searchQuery })) : api.list(body)\n if (state.searchStatus !== 'loading') {\n return new Promise((resolve, reject) => {\n commit('SEARCH_REQUEST')\n apiPromise.then(response => {\n commit('SEARCH_SUCCESS', response)\n resolve(response)\n }).catch(err => {\n commit('SEARCH_ERROR', err.response)\n reject(err)\n })\n })\n }\n },\n getItem: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(data => {\n commit('ITEM_REPLACED', data)\n return state.cache[id]\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n return err\n })\n }\n}\n\nconst mutations = {\n SEARCH_FIELDS_UPDATED: (state, fields) => {\n state.searchFields = fields\n },\n SEARCH_QUERY_UPDATED: (state, query) => {\n state.searchQuery = query\n },\n SEARCH_SORT_BY_UPDATED: (state, field) => {\n state.searchSortBy = field\n },\n SEARCH_SORT_DESC_UPDATED: (state, desc) => {\n state.searchSortDesc = desc\n },\n SEARCH_MAX_PAGE_NUMBER_UPDATED: (state, page) => {\n state.searchMaxPageNumber = page\n },\n SEARCH_LIMIT_UPDATED: (state, limit) => {\n state.searchPageSize = limit\n },\n SEARCH_REQUEST: (state) => {\n state.searchStatus = 'loading'\n },\n SEARCH_SUCCESS: (state, response) => {\n state.searchStatus = 'success'\n if (response) {\n state.results = response.items\n let nextPage = Math.floor(response.nextCursor / state.searchPageSize) + 1\n if (nextPage > state.searchMaxPageNumber) {\n state.searchMaxPageNumber = nextPage\n }\n }\n },\n SEARCH_ERROR: (state, response) => {\n state.searchStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n VISIBLE_COLUMNS_UPDATED: (state, columns) => {\n state.visibleColumns = columns\n },\n ITEM_REQUEST: (state) => {\n state.itemStatus = 'loading'\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = 'success'\n Vue.set(state.cache, data.id, data)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiuslogs' }),\n goToItem: params => $router\n .push({ name: 'radiuslog', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Auditing\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_logs) {\n store.registerModule('$_radius_logs', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'radiuslogs/search',\n name: 'radiuslogs',\n component: TheSearch,\n meta: {\n can: 'read radius_log',\n isFailRoute: true\n },\n beforeEnter\n },\n {\n path: 'radiuslog/:id',\n name: 'radiuslog',\n component: TheView,\n props: (route) => ({ storeName: '$_radius_logs', id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_logs/getItem', to.params.id).finally(() => {\n next()\n })\n },\n meta: {\n can: 'read radius_log'\n }\n }\n]","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/admin_roles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/admin_roles').then(response => {\n delete response.data.meta.allowed_actions.item.allowed // omit meta allowed_actions, fixes #5834\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'admin_role', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'admin_role', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/admin_roles', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'admin_role', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'admin_role', id])\n },\n search: data => {\n return apiCall.post('config/admin_roles/search', data).then(response => {\n return response.data\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'admin_roles' }),\n goToItem: params => $router\n .push({ name: 'admin_role', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneAdminRole', params }),\n goToNew: () => $router.push({ name: 'newAdminRole' })\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_admin_roles)\n store.registerModule('$_admin_roles', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'admin_roles',\n name: 'admin_roles',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'admin_roles/new',\n name: 'newAdminRole',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'admin_role/:id',\n name: 'admin_role',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_admin_roles/getAdminRole', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'admin_role/:id/clone',\n name: 'cloneAdminRole',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_admin_roles/getAdminRole', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n\n","/**\n* \"$_admin_roles\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport store, { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_admin_roles/isLoading']),\n getList: () => $store.dispatch('$_admin_roles/all'),\n getListOptions: () => $store.dispatch('$_admin_roles/options'),\n createItem: params => $store.dispatch('$_admin_roles/createAdminRole', params),\n getItem: params => $store.dispatch('$_admin_roles/getAdminRole', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_admin_roles/options', params.id),\n updateItem: params => $store.dispatch('$_admin_roles/updateAdminRole', params),\n deleteItem: params => $store.dispatch('$_admin_roles/deleteAdminRole', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(','),\n limit: 1000\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getAdminRole: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createAdminRole: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n store.dispatch('config/resetAdminRoles')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateAdminRole: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n store.dispatch('config/resetAdminRoles')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteAdminRole: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n store.dispatch('config/resetAdminRoles')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n bases: params => {\n return apiCall.get('config/bases', { params }).then(response => {\n return response.data\n })\n },\n base: id => {\n return apiCall.get(['config', 'base', id]).then(response => {\n return response.data.item\n })\n },\n baseOptions: id => {\n return apiCall.options(['config', 'base', id]).then(response => {\n return response.data\n })\n },\n updateBase: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'base', data.id], data).then(response => {\n return response.data\n })\n },\n secureDatabase: data => {\n return apiCall.postQuiet('config/base/database/secure_installation', data)\n },\n createDatabase: data => {\n return apiCall.postQuiet('config/base/database/create', data).then(response => {\n return response.data\n })\n },\n assignDatabase: data => {\n return apiCall.postQuiet('config/base/database/assign', data)\n },\n testDatabase: data => {\n return apiCall.postQuiet('config/base/database/test', data)\n },\n testSmtp: data => {\n const post = data.quiet ? 'postQuiet' : 'post'\n return apiCall[post](['config', 'bases', 'test_smtp'], data).then(response => {\n return response.data\n })\n }\n}\n","/**\n* \"$_bases\" store module\n*/\nimport Vue from 'vue'\nimport api from './_api'\nimport store, { types } from '@/store'\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING,\n general: state => state.cache.general\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.bases(params).then(response => {\n return response.items\n })\n },\n getBase: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base(id).then(item => {\n if (id === 'general') {\n // build `fqdn` from `hostname` and `domain`\n item.fqdn = ((item.hostname) ? item.hostname + '.' : '') + item.domain\n }\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getActiveActive: ({ state, commit }) => {\n if (state.cache['active_active']) {\n return Promise.resolve(state.cache['active_active']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('active_active').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsActiveActive: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('active_active').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateActiveActive: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'active_active'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getAdminLogin: ({ state, commit }) => {\n if (state.cache['advanced']) {\n return Promise.resolve(state.cache['admin_login']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('admin_login').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsAdminLogin: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('admin_login').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateAdminLogin: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'admin_login'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getAdvanced: ({ state, commit }) => {\n if (state.cache['advanced']) {\n return Promise.resolve(state.cache['advanced']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('advanced').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsAdvanced: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('advanced').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateAdvanced: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'advanced'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n store.dispatch('session/updateConfiguratorState', data.configurator, { root: true })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getAlerting: ({ state, commit }) => {\n if (state.cache['alerting']) {\n return Promise.resolve(state.cache['alerting']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('alerting').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsAlerting: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('alerting').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateAlerting: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'alerting'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getCaptivePortal: ({ state, commit }) => {\n if (state.cache['captive_portal']) {\n return Promise.resolve(state.cache['captive_portal']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('captive_portal').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsCaptivePortal: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('captive_portal').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateCaptivePortal: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'captive_portal'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getDatabase: ({ state, commit }) => {\n if (state.cache['database']) {\n return Promise.resolve(state.cache['database']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('database').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsDatabase: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('database').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDatabase: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'database'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getDatabaseAdvanced: ({ state, commit }) => {\n if (state.cache['database_advanced']) {\n return Promise.resolve(state.cache['database_advanced']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('database_advanced').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsDatabaseAdvanced: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('database_advanced').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDatabaseAdvanced: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'database_advanced'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getDatabaseProxySQL: ({ state, commit }) => {\n if (state.cache['database_proxysql']) {\n return Promise.resolve(state.cache['database_proxysql']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('database_proxysql').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsDatabaseProxySQL: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('database_proxysql').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDatabaseProxySQL: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'database_proxysql'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getDatabaseEncryption: ({ state, commit }) => {\n if (state.cache['database_encryption']) {\n return Promise.resolve(state.cache['database_encryption']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('database_encryption').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsDatabaseEncryption: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('database_encryption').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDatabaseEncryption: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'database_encryption'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getFencing: ({ state, commit }) => {\n if (state.cache['fencing']) {\n return Promise.resolve(state.cache['fencing']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('fencing').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsFencing: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('fencing').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateFencing: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'fencing'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getFingerbankDeviceChange: ({ state, commit }) => {\n if (state.cache['fingerbank_device_change']) {\n return Promise.resolve(state.cache['fingerbank_device_change']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('fingerbank_device_change').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsFingerbankDeviceChange: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('fingerbank_device_change').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateFingerbankDeviceChange: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'fingerbank_device_change'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getGeneral: ({ state, commit }) => {\n if (state.cache['general']) {\n return Promise.resolve(state.cache['general']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('general').then(item => {\n // build `fqdn` from `hostname` and `domain`\n item.fqdn = ((item.hostname) ? item.hostname + '.' : '') + item.domain\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsGeneral: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('general').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateGeneral: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'general'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return store.dispatch('system/getSummary', true)\n .then(() => response)\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getGuestsAdminRegistration: ({ state, commit }) => {\n if (state.cache['guests_admin_registration']) {\n return Promise.resolve(state.cache['guests_admin_registration']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('guests_admin_registration').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsGuestsAdminRegistration: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('guests_admin_registration').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateGuestsAdminRegistration: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'guests_admin_registration'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n store.commit('config/BASE_GUESTS_ADMIN_REGISTRATION_DELETED') // purge config cache\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getInline: ({ state, commit }) => {\n if (state.cache['inline']) {\n return Promise.resolve(state.cache['inline']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('inline').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsInline: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('inline').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateInline: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'inline'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getMonit: ({ state, commit }) => {\n if (state.cache['monit']) {\n return Promise.resolve(state.cache['monit']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('monit').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsMonit: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('monit').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateMonit: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'monit'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getMseTab: ({ state, commit }) => {\n if (state.cache['mse_tab']) {\n return Promise.resolve(state.cache['mse_tab']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('mse_tab').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsMseTab: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('mse_tab').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateMseTab: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'mse_tab'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getNetwork: ({ state, commit }) => {\n if (state.cache['network']) {\n return Promise.resolve(state.cache['network']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('network').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsNetwork: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('network').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateNetwork: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'network'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getNodeImport: ({ state, commit }) => {\n if (state.cache['node_import']) {\n return Promise.resolve(state.cache['node_import']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('node_import').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsNodeImport: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('node_import').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateNodeImport: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'node_import'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getParking: ({ state, commit }) => {\n if (state.cache['parking']) {\n return Promise.resolve(state.cache['parking']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('parking').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsParking: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('parking').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateParking: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'parking'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getPFDHCP: ({ state, commit }) => {\n if (state.cache['pfdhcp']) {\n return Promise.resolve(state.cache['pf_dhcp']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('pf_dhcp').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsPFDHCP: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('pf_dhcp').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updatePFDHCP: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'pfdhcp'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getPorts: ({ state, commit }) => {\n if (state.cache['ports']) {\n return Promise.resolve(state.cache['ports']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('ports').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsPorts: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('ports').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updatePorts: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'ports'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getProvisioning: ({ state, commit }) => {\n if (state.cache['provisioning']) {\n return Promise.resolve(state.cache['provisioning']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('provisioning').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsProvisioning: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('provisioning').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateProvisioning: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'provisioning'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getRadiusConfiguration: ({ state, commit }) => {\n if (state.cache['radius_configuration']) {\n return Promise.resolve(state.cache['radius_configuration']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('radius_configuration').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsRadiusConfiguration: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('radius_configuration').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusConfiguration: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'radius_configuration'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getDnsConfiguration: ({ state, commit }) => {\n if (state.cache['dns_configuration']) {\n return Promise.resolve(state.cache['dns_configuration']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('dns_configuration').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsDnsConfiguration: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('dns_configuration').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDnsConfiguration: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'dns_configuration'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getServices: ({ state, commit }) => {\n if (state.cache['services']) {\n return Promise.resolve(state.cache['services']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('services').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsServices: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('services').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateServices: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'services'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getSNMPTraps: ({ state, commit }) => {\n if (state.cache['snmp_traps']) {\n return Promise.resolve(state.cache['snmp_traps']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('snmp_traps').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsSNMPTraps: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('snmp_traps').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateSNMPTraps: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'snmp_traps'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getWebServices: ({ state, commit }) => {\n if (state.cache['webservices']) {\n return Promise.resolve(state.cache['webservices']).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.base('webservices').then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsWebServices: ({ commit }) => {\n commit('ITEM_REQUEST')\n return api.baseOptions('webservices').then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateWebServices: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n data.id = 'webservices'\n return api.updateBase(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n secureDatabase: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.secureDatabase(data).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createDatabase: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.createDatabase({ ...data,\n async: true // use pfqueue polling\n }).then(({ task_id }) => {\n return store.dispatch('pfqueue/pollTaskStatus', { task_id }).then(response => {\n commit('ITEM_SUCCESS')\n return response\n })\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n assignDatabase: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.assignDatabase(data).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n testDatabase: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.testDatabase(data).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n testSmtp: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.testSmtp(data).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/billing_tiers', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/billing_tiers').then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'billing_tier', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'billing_tier', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/billing_tiers', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'billing_tier', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'billing_tier', id])\n },\n search: data => {\n return apiCall.post('config/billing_tiers/search', data).then(response => {\n return response.data\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'billing_tiers' }),\n goToItem: params => $router\n .push({ name: 'billing_tier', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneBillingTier', params }),\n goToNew: () => $router.push({ name: 'newBillingTier' }),\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_billing_tiers)\n store.registerModule('$_billing_tiers', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'billing_tiers',\n name: 'billing_tiers',\n component: TheSearch\n },\n {\n path: 'billing_tiers/new',\n name: 'newBillingTier',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'billing_tier/:id',\n name: 'billing_tier',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_billing_tiers/getBillingTier', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'billing_tier/:id/clone',\n name: 'cloneBillingTier',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_billing_tiers/getBillingTier', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_billing_tiers\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_billing_tiers/isLoading']),\n getList: () => $store.dispatch('$_billing_tiers/all'),\n getListOptions: () => $store.dispatch('$_billing_tiers/options'),\n createItem: params => $store.dispatch('$_billing_tiers/createBillingTier', params),\n getItem: params => $store.dispatch('$_billing_tiers/getBillingTier', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_billing_tiers/options', params.id),\n updateItem: params => $store.dispatch('$_billing_tiers/updateBillingTier', params),\n deleteItem: params => $store.dispatch('$_billing_tiers/deleteBillingTier', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'description'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getBillingTier: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createBillingTier: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateBillingTier: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteBillingTier: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/clouds', { params }).then(response => {\n return response.data\n })\n },\n listOptions: cloudType => {\n return apiCall.options(['config', 'clouds'], { params: { type: cloudType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/clouds/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/clouds', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'cloud', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'cloud', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'cloud', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'cloud', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'clouds' }),\n goToItem: params => $router\n .push({ name: 'cloud', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneCloud', params: { ...params, cloudType: params.type } }),\n goToNew: params => $router.push({ name: 'newCloud', params }),\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_clouds) {\n store.registerModule('$_clouds', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'clouds',\n name: 'clouds',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'clouds/new/:cloudType',\n name: 'newCloud',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, cloudType: route.params.cloudType }),\n beforeEnter\n },\n {\n path: 'cloud/:id',\n name: 'cloud',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_clouds/getCloud', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'cloud/:id/clone/:cloudType',\n name: 'cloneCloud',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, cloudType: route.params.cloudType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_clouds/getCloud', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_clouds\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_clouds/isLoading']),\n getList: () => $store.dispatch('$_clouds/all'),\n getListOptions: params => $store.dispatch('$_clouds/optionsByCloudType', params.cloudType),\n createItem: params => $store.dispatch('$_clouds/createCloud', params),\n getItem: params => $store.dispatch('$_clouds/getCloud', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_clouds/optionsById', params.id),\n updateItem: params => $store.dispatch('$_clouds/updateCloud', params),\n deleteItem: params => $store.dispatch('$_clouds/deleteCloud', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByCloudType: ({ commit }, cloudType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(cloudType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getCloud: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createCloud: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateCloud: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteCloud: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const types = {\n Intune: i18n.t('Intune')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const analytics = {\n track: ['cloudType']\n}\n\n\n\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['config', 'connection_profiles'], { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/connection_profiles').then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'connection_profile', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'connection_profile', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/connection_profiles', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'connection_profile', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'connection_profile', id])\n },\n sort: data => {\n return apiCall.patch('config/connection_profiles/sort_items', data).then(response => {\n return response\n })\n },\n search: data => {\n return apiCall.post('config/connection_profiles/search', data).then(response => {\n return response.data\n })\n },\n\n files: params => {\n return apiCall.get(['config', 'connection_profile', params.id, 'files'], { params }).then(response => {\n return response.data\n })\n },\n file: params => {\n return apiCall.getQuiet(['config', 'connection_profile', params.id, 'files', ...params.filename.split('/').filter(p => p)], { ...params, nocache: true }).then(response => {\n return response.data\n })\n },\n createFile: params => {\n const method = params.quiet ? 'putQuiet' : 'put'\n return apiCall[method](['config', 'connection_profile', params.id, 'files', ...params.filename.split('/')], params.content).then(response => {\n return response.data\n })\n },\n updateFile: params => {\n const method = params.quiet ? 'patchQuiet' : 'patch'\n return apiCall[method](['config', 'connection_profile', params.id, 'files', ...params.filename.split('/')], params.content).then(response => {\n return response.data\n })\n },\n deleteFile: params => {\n const method = params.quiet ? 'deleteQuiet' : 'delete'\n return apiCall[method](['config', 'connection_profile', params.id, 'files', ...params.filename.split('/')])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'connection_profiles' }),\n goToItem: params => $router\n .push({ name: 'connection_profile', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneConnectionProfile', params }),\n goToNew: () => $router.push({ name: 'newConnectionProfile' }),\n goToPreview: params => window.open(`/portal_preview/captive-portal?PORTAL=${params.id}`, '_blank')\n }\n}\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_connection_profiles)\n store.registerModule('$_connection_profiles', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'connection_profiles',\n name: 'connection_profiles',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'connection_profiles/new',\n name: 'newConnectionProfile',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'connection_profile/:id',\n name: 'connection_profile',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_connection_profiles/getConnectionProfile', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'connection_profile/:id/clone',\n name: 'cloneConnectionProfile',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_connection_profiles/getConnectionProfile', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_connection_profiles\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_connection_profiles/isLoading']),\n getList: () => $store.dispatch('$_connection_profiles/all'),\n getListOptions: () => $store.dispatch('$_connection_profiles/options'),\n createItem: params => $store.dispatch('$_connection_profiles/createConnectionProfile', params),\n sortItems: params => $store.dispatch('$_connection_profiles/sortConnectionProfiles', params.items),\n getItem: params => $store.dispatch('$_connection_profiles/getConnectionProfile', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_connection_profiles/options', params.id),\n updateItem: params => $store.dispatch('$_connection_profiles/updateConnectionProfile', params),\n deleteItem: params => $store.dispatch('$_connection_profiles/deleteConnectionProfile', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: '',\n files: {\n message: '',\n status: '',\n cache: {}\n }\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING,\n isWaitingFiles: state => [types.LOADING, types.DELETING].includes(state.files.status),\n isLoadingFiles: state => state.files.status === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getConnectionProfile: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return state.cache[id]\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createConnectionProfile: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateConnectionProfile: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteConnectionProfile: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n sortConnectionProfiles: ({ commit }, data) => {\n const params = {\n items: data\n }\n commit('ITEM_REQUEST', types.LOADING)\n return api.sort(params).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n enableConnectionProfile: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const _data = { id: data.id, status: 'enabled' }\n return api.update(_data).then(response => {\n commit('ITEM_ENABLED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n disableConnectionProfile: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const _data = { id: data.id, status: 'disabled' }\n return api.update(_data).then(response => {\n commit('ITEM_DISABLED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n files: ({ commit }, data) => {\n const sort = 'sort' in data ? data.sort.join(',') : 'type,name'\n const params = {\n id: data.id,\n sort,\n fields: ['name', 'size', 'entries', 'type', 'not_deletable', 'not_revertible'].join(',')\n }\n commit('FILE_REQUEST')\n return api.files(params).then(response => {\n const _walk = (item, path) => {\n Object.assign(item, { path })\n if ('entries' in item) {\n item.entries.forEach(entry => _walk(entry, path ? [path, item.name].join('/') : item.name))\n }\n }\n response.entries.forEach(item => _walk(item, ''))\n commit('FILE_REPLACED', { id: data.id, files: response })\n return response\n })\n },\n getFile: ({ state, commit, dispatch }, params) => {\n commit('FILE_REQUEST')\n return api.file(params).then(content => {\n // Retrieve metadata ..\n let filePromise\n if (state.files.cache[params.id]) {\n // .. from cache\n filePromise = Promise.resolve(state.files.cache[params.id])\n } else {\n // .. from server\n filePromise = dispatch('files', { id: params.id })\n }\n return filePromise.then(() => {\n let paths = params.filename.split('/')\n let meta = state.files.cache[params.id]\n for (let path of paths) {\n if (path) {\n if (meta && 'entries' in meta) {\n meta = meta.entries.find(item => item.name === path)\n }\n }\n }\n commit('FILE_SUCCESS')\n return { meta, content }\n })\n }).catch((err) => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n },\n createFile: ({ commit }, data) => {\n commit('FILE_REQUEST')\n return api.createFile(data).then(response => {\n commit('FILE_SUCCESS', data)\n return response\n }).catch(err => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n },\n updateFile: ({ commit }, data) => {\n commit('FILE_REQUEST')\n return api.updateFile(data).then(response => {\n commit('FILE_SUCCESS', data)\n return response\n }).catch(err => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n },\n deleteFile: ({ commit, dispatch }, params) => {\n commit('FILE_REQUEST', types.DELETING)\n return api.deleteFile(params).then(() => {\n commit('FILE_DESTROYED')\n return dispatch('files', { id: params.id })\n }).catch(err => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n },\n renameFile: ({ commit, dispatch }, params) => {\n const { to, from, ...options } = params\n commit('FILE_REQUEST')\n return api.file(from).then(response => {\n const { message: content = '' } = response\n return api.createFile({ ...to, ...options, content }).then(() => {\n return api.deleteFile({ ...from, ...options }).then(() => {\n return dispatch('files', { id: from.id })\n }).catch(err => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n }).catch(err => {\n commit('FILE_ERROR', err.response)\n throw err\n })\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_ENABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DISABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n },\n FILE_REQUEST: (state, type) => {\n state.files.status = type || types.LOADING\n state.files.message = ''\n },\n FILE_SUCCESS: (state) => {\n state.files.status = types.SUCCESS\n },\n FILE_REPLACED: (state, data) => {\n state.files.status = types.SUCCESS\n Vue.set(state.files.cache, data.id, data.files)\n },\n FILE_DESTROYED: (state) => {\n state.files.status = types.SUCCESS\n },\n FILE_ERROR: (state, response) => {\n state.files.status = types.ERROR\n if (response && response.data) {\n state.files.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/connectors', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/connectors').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/connectors/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/connectors', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'connector', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'connector', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'connector', data.id], data).then(response => {\n return response.data\n })\n },\n sort: data => {\n return apiCall.patch('config/connectors/sort_items', data).then(response => {\n return response\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'connector', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'connectors' }),\n goToItem: params => $router\n .push({ name: 'connector', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneConnector', params }),\n goToNew: params => $router.push({ name: 'newConnector', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_connectors)\n store.registerModule('$_connectors', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'connectors',\n name: 'connectors',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'connectors/new',\n name: 'newConnector',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'connector/:id',\n name: 'connector',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_connectors/getConnector', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'connector/:id/clone',\n name: 'cloneConnector',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_connectors/getConnector', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_connectors\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_connectors/isLoading']),\n getList: () => $store.dispatch('$_connectors/all'),\n getListOptions: () => $store.dispatch('$_connectors/options'),\n sortItems: params => $store.dispatch('$_connectors/sortConnectors', params.items),\n createItem: params => $store.dispatch('$_connectors/createConnector', params),\n getItem: params => $store.dispatch('$_connectors/getConnector', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_connectors/options', params.id),\n updateItem: params => $store.dispatch('$_connectors/updateConnector', params),\n deleteItem: params => $store.dispatch('$_connectors/deleteConnector', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'description'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getConnector: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createConnector: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateConnector: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n sortConnectors: ({ commit }, data) => {\n const params = {\n items: data\n }\n commit('ITEM_REQUEST', types.LOADING)\n return api.sort(params).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteConnector: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/domains', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/domains').then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'domain', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'domain', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/domains', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'domain', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'domain', id])\n },\n test: id => {\n return apiCall.getQuiet(['config', 'domain', id, 'test_join']).then(response => {\n return response.data\n }).catch(err => {\n throw err\n })\n },\n join: data => {\n return apiCall.post(['config', 'domain', data.id, 'join'], data).then(response => {\n return response.data\n })\n },\n rejoin: data => {\n return apiCall.post(['config', 'domain', data.id, 'rejoin'], data).then(response => {\n return response.data\n })\n },\n unjoin: data => {\n return apiCall.post(['config', 'domain', data.id, 'unjoin'], data).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/domains/search', data).then(response => {\n return response.data\n })\n }\n}\n","import store from '@/store'\nimport DomainsStoreModule from './_store'\nimport RealmsStoreModule from '../realms/_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: params => {\n const { actionKey, id } = params\n if (actionKey)\n $router.push({ name: 'domains', params: { autoJoinDomain: id } })\n else\n $router.push({ name: 'domains' })\n },\n goToItem: params => $router\n .push({ name: 'domain', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneDomain', params }),\n goToNew: () => $router.push({ name: 'newDomain' })\n }\n}\n\nexport const TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../_components/TheTabsDomains')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_domains)\n store.registerModule('$_domains', DomainsStoreModule)\n if (!store.state.$_realms)\n store.registerModule('$_realms', RealmsStoreModule)\n next()\n}\n\nconst can = () => !store.getters['system/isSaas']\n\nexport default [\n {\n path: 'domains',\n name: 'domains',\n component: TheTabs,\n meta: {\n can\n },\n props: (route) => ({ tab: 'domains', autoJoinDomain: route.params.autoJoinDomain }),\n beforeEnter\n },\n {\n path: 'domains/new',\n name: 'newDomain',\n component: TheView,\n meta: {\n can\n },\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'domain/:id',\n name: 'domain',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_domains/getDomain', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'domain/:id/clone',\n name: 'cloneDomain',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_domains/getDomain', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_domains\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport store from '@/store' // required for 'pfqueue'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_domains/isLoading']),\n getList: () => $store.dispatch('$_domains/all'),\n getListOptions: () => $store.dispatch('$_domains/options'),\n createItem: params => $store.dispatch('$_domains/createDomain', params),\n getItem: params => $store.dispatch('$_domains/getDomain', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}copy`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_domains/options', params.id),\n updateItem: params => $store.dispatch('$_domains/updateDomain', params),\n deleteItem: params => $store.dispatch('$_domains/deleteDomain', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n joins: {}, // domain join details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING,\n joins: state => state.joins\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'workgroup', 'ntlm_cache'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getDomain: ({ state, commit }, id) => {\n if (state.cache[id])\n return Promise.resolve(state.cache[id])\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return state.cache[id]\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createDomain: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateDomain: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteDomain: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n testDomain: ({ state, commit }, id) => {\n commit('TEST_REQUEST', id)\n return api.test(id).then(response => {\n const { task_id } = response\n return store.dispatch('pfqueue/pollTaskStatus', { task_id }).then(response => {\n commit('TEST_SUCCESS', { id: id, response })\n return state.joins[id]\n })\n }).catch(error => {\n commit('TEST_ERROR', { id: id, response: error })\n return state.joins[id]\n })\n },\n joinDomain: ({ state, commit }, data) => {\n commit('JOIN_REQUEST', data.id)\n return api.join(data).then(response => {\n const { task_id } = response\n return store.dispatch('pfqueue/pollTaskStatus', { task_id }).then(response => {\n commit('JOIN_SUCCESS', { id: data.id, response })\n return state.joins[data.id]\n })\n }).catch(error => {\n commit('JOIN_ERROR', { id: data.id, response: error })\n return state.joins[data.id]\n })\n },\n rejoinDomain: ({ state, commit }, data) => {\n commit('JOIN_REQUEST', data.id)\n return api.rejoin(data).then(response => {\n const { task_id } = response\n return store.dispatch('pfqueue/pollTaskStatus', { task_id }).then(response => {\n commit('JOIN_SUCCESS', { id: data.id, response })\n return state.joins[data.id]\n })\n }).catch(error => {\n commit('JOIN_ERROR', { id: data.id, response: error })\n return state.joins[data.id]\n })\n },\n unjoinDomain: ({ state, commit }, data) => {\n commit('UNJOIN_REQUEST', data.id)\n return api.unjoin(data).then(response => {\n const { task_id } = response\n return store.dispatch('pfqueue/pollTaskStatus', { task_id }).then(response => {\n commit('UNJOIN_SUCCESS', { id: data.id, response })\n return state.joins[data.id]\n })\n }).catch(error => {\n commit('UNJOIN_ERROR', { id: data.id, response: error })\n return state.joins[data.id]\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n if (data.id in state.joins) {\n Vue.delete(state.joins, data.id) // clear cache\n store.dispatch('$_domains/testDomain', data.id) // refresh cache\n }\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n Vue.delete(state.joins, id)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n },\n TEST_REQUEST: (state, id) => {\n if (!(id in state.joins)) {\n Vue.set(state.joins, id, {})\n }\n Vue.set(state.joins[id], 'status', null)\n Vue.set(state.joins[id], 'message', null)\n },\n TEST_SUCCESS: (state, data) => {\n Vue.set(state.joins[data.id], 'status', true)\n Vue.set(state.joins[data.id], 'message', data.response.message)\n },\n TEST_ERROR: (state, data) => {\n Vue.set(state.joins[data.id], 'status', false)\n const { error: { response: { data: { message = null } = {} } = {} } = {} } = data\n Vue.set(state.joins[data.id], 'message', message || data.response.message)\n },\n JOIN_REQUEST: (state, id) => {\n if (!(id in state.joins)) {\n Vue.set(state.joins, id, {})\n }\n Vue.set(state.joins[id], 'status', null)\n Vue.set(state.joins[id], 'message', null)\n },\n JOIN_SUCCESS: (state, data) => {\n // clear all join items except this one\n Vue.set(state, 'joins', { [data.id]: { ...state.joins[data.id], status: true, message: data.response.message } })\n },\n JOIN_ERROR: (state, data) => {\n Vue.set(state.joins[data.id], 'status', false)\n Vue.set(state.joins[data.id], 'message', data.response.message)\n },\n UNJOIN_REQUEST: (state, id) => {\n if (!(id in state.joins)) {\n Vue.set(state.joins, id, {})\n }\n Vue.set(state.joins[id], 'status', null)\n Vue.set(state.joins[id], 'message', null)\n },\n UNJOIN_SUCCESS: (state, data) => {\n // clear all join items except this one\n Vue.set(state, 'joins', { [data.id]: { ...state.joins[data.id], status: false, message: data.response.message } })\n },\n UNJOIN_ERROR: (state, data) => {\n Vue.set(state.joins[data.id], 'status', true)\n Vue.set(state.joins[data.id], 'message', data.response.message)\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/event_loggers', { params }).then(response => {\n return response.data\n })\n },\n listOptions: eventLoggerType => {\n return apiCall.options(['config', 'event_loggers'], { params: { type: eventLoggerType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/event_loggers/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/event_loggers', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'event_logger', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'event_logger', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'event_logger', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'event_logger', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'eventLoggers' }),\n goToItem: params => $router\n .push({ name: 'eventLogger', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneEventLogger', params: { ...params, eventLoggerType: params.type } }),\n goToNew: params => $router.push({ name: 'newEventLogger', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_event_loggers)\n store.registerModule('$_event_loggers', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'event_loggers',\n name: 'eventLoggers',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'event_loggers/new/:eventLoggerType',\n name: 'newEventLogger',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, eventLoggerType: route.params.eventLoggerType }),\n beforeEnter\n },\n {\n path: 'event_logger/:id',\n name: 'eventLogger',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_event_loggers/getEventLogger', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'event_logger/:id/clone/:eventLoggerType',\n name: 'cloneEventLogger',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, eventLoggerType: route.params.eventLoggerType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_event_loggers/getEventLogger', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_event_loggers\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_event_loggers/isLoading']),\n getList: () => $store.dispatch('$_event_loggers/all'),\n getListOptions: params => $store.dispatch('$_event_loggers/optionsByEventLoggerType', params.eventLoggerType),\n createItem: params => $store.dispatch('$_event_loggers/createEventLogger', params),\n getItem: params => $store.dispatch('$_event_loggers/getEventLogger', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_event_loggers/optionsById', params.id),\n updateItem: params => $store.dispatch('$_event_loggers/updateEventLogger', params),\n deleteItem: params => $store.dispatch('$_event_loggers/deleteEventLogger', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DRYRUN, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'path', 'status', 'type'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByEventLoggerType: ({ commit }, eventLoggerType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(eventLoggerType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getEventLogger: ({ state, commit }, id) => {\n if (state.cache[id])\n return state.cache[id]\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return state.cache[id]\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createEventLogger: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateEventLogger: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteEventLogger: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const types = {\n syslog: i18n.t('Syslog')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const analytics = {\n track: ['eventLoggerType']\n}","import apiCall from '@/utils/api'\n\nconst api = {\n collections: params => {\n return apiCall.get('config/filter_engines', { params }).then(response => {\n return response.data\n })\n }\n}\n\nexport default api\n\nexport const apiFactory = _collection => {\n const { collection, resource } = _collection\n return {\n ...api,\n list: params => {\n return apiCall.get(['config', 'filter_engines', collection], { params }).then(response => {\n return response.data\n }).catch(err => {\n throw err\n })\n },\n listOptions: () => {\n return apiCall.options(['config', 'filter_engines', collection]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post(['config', 'filter_engines', collection], data).then(response => {\n return response.data\n })\n },\n sort: params => {\n const patch = params.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'filter_engines', collection, 'sort_items'], params).then(response => {\n return response.data\n })\n },\n search: params => {\n return apiCall.post(['config', 'filter_engines', collection, 'search'], params).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'filter_engines', resource, id]).then(response => {\n return response.data.item\n }).catch(err => {\n throw err\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'filter_engines', resource, id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'filter_engines', resource, data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'filter_engines', resource, id])\n }\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: params => $router.push({ name: 'filterEnginesCollection', params }),\n goToItem: params => $router\n .push({ name: 'filter_engine', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFilterEngine', params }),\n goToNew: params => $router.push({ name: 'newFilterEngine', params })\n }\n}\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheTabs')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_filter_engines) {\n store.registerModule('$_filter_engines', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'filter_engines',\n name: 'filter_engines',\n component: TheTabs,\n beforeEnter\n },\n {\n path: 'filter_engines/:collection',\n name: 'filterEnginesCollection',\n component: TheTabs,\n props: (route) => ({ collection: route.params.collection }),\n beforeEnter\n },\n {\n path: 'filter_engines/:collection/new',\n name: 'newFilterEngine',\n component: TheView,\n props: (route) => ({ collection: route.params.collection, isNew: true }),\n beforeEnter\n },\n {\n path: 'filter_engines/:collection/:id',\n name: 'filter_engine',\n component: TheView,\n props: (route) => ({ collection: route.params.collection, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_filter_engines/getFilterEngine', { collection: to.params.collection, id: to.params.id })\n .finally(() => next())\n }\n },\n {\n path: 'filter_engines/:collection/:id/clone',\n name: 'cloneFilterEngine',\n component: TheView,\n props: (route) => ({ collection: route.params.collection, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_filter_engines/getFilterEngine', { collection: to.params.collection, id: to.params.id })\n .finally(() => next())\n }\n }\n]\n","/**\n* \"$_filter_engines\" store module\n*/\nimport Vue from 'vue'\nimport store, { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api, { apiFactory } from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_filter_engines/isLoading']),\n getList: () => $store.dispatch('$_filter_engines/all'),\n getListOptions: _params => {\n const { id, ...params } = _params // strip `id`\n return $store.dispatch('$_filter_engines/options', params)\n },\n createItem: params => {\n const { collection, ...data } = params\n return $store.dispatch('$_filter_engines/createFilterEngine', { collection, data })\n },\n sortItems: params => $store.dispatch('$_filter_engines/sortItems', params),\n getItem: params => $store.dispatch('$_filter_engines/getFilterEngine', params).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_filter_engines/options', params),\n updateItem: params => {\n const { collection, id, ...data } = params\n return $store.dispatch('$_filter_engines/updateFilterEngine', { collection, id, data })\n },\n deleteItem: params => $store.dispatch('$_filter_engines/deleteFilterEngine', params),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: false, // item details\n message: '',\n itemStatus: '',\n collectionsStatus: ''\n }\n}\n\nconst getters = {\n isLoadingCollections: state => state.collectionsStatus === types.LOADING,\n isLoadingCollection: state => collection => !(collection in state.cache) || !('items' in state.cache[collection]),\n\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.collectionsStatus === types.LOADING || state.itemStatus === types.LOADING,\n\n collectionToName: state => collection => {\n const { cache: { [collection]: { name } = {} } = {} } = state\n return name\n }\n}\n\nconst actions = {\n getCollections: ({ state, commit }) => {\n if (state.cache) {\n return Promise.resolve(state.cache).then(collection => Object.values(collection))\n }\n commit('COLLECTIONS_REQUEST')\n return api.collections().then(response => {\n commit('COLLECTIONS_REPLACED', response.items)\n return Object.values(state.cache)\n }).catch(err => {\n commit('COLLECTIONS_ERROR', err.response)\n throw err\n })\n },\n getCollection: ({ state, commit, dispatch }, collection) => {\n if (state.cache[collection] && 'items' in state.cache[collection]) {\n return Promise.resolve(state.cache[collection])\n }\n return dispatch('getCollections').then(() => {\n commit('COLLECTION_REQUEST')\n return apiFactory({ collection }).list().then(response => {\n const { items } = response\n commit('COLLECTION_REPLACED', { collection, items })\n return state.cache[collection]\n }).catch(err => {\n commit('COLLECTION_ERROR', err.response)\n throw err\n })\n })\n },\n sortItems: ({ commit, dispatch }, { collection, items }) => {\n return dispatch('getCollection', collection).then(() => {\n const params = {\n items,\n quiet: true\n }\n commit('COLLECTION_REQUEST', types.LOADING)\n return apiFactory({ collection }).sort(params).then(response => {\n commit('COLLECTION_RESORTED', { collection, params })\n return response\n }).catch(err => {\n commit('COLLECTION_ERROR', err.response)\n throw err\n })\n })\n },\n getFilterEngine: ({ state, commit, dispatch }, { collection, id }) => {\n if (state.cache[collection] && state.cache[collection].items && state.cache[collection].items.filter(item => item.id === id).length > 0) {\n return Promise.resolve(state.cache[collection].items.find(item => item.id === id))\n }\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n return apiFactory({ resource }).item(id).then(item => {\n commit('ITEM_REPLACED', { collection, id, item })\n return state.cache[collection].items.find(item => item.id === id)\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n },\n options: ({ state, commit, dispatch }, { collection, id }) => {\n return dispatch('getCollection', collection).then(() => {\n if (id) {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n return apiFactory({ resource }).itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n commit('ITEM_REQUEST')\n return apiFactory({ collection }).listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n })\n },\n createFilterEngine: ({ commit, dispatch }, { collection, data }) => {\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n return apiFactory({ collection }).create(data).then(response => {\n const { id } = data\n commit('ITEM_CREATED', { collection, id, item: data })\n store.commit('config/FILTER_ENGINES_DELETED') // purge config cache\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n },\n updateFilterEngine: ({ state, commit, dispatch }, { collection, id, data }) => {\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n return apiFactory({ resource }).update({ id, ...data }).then(() => {\n commit('ITEM_REPLACED', { collection, id, item: data })\n store.commit('config/FILTER_ENGINES_DELETED') // purge config cache\n return state.cache[collection].items.find(item => item.id === id)\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n },\n deleteFilterEngine: ({ state, commit, dispatch }, { collection, id }) => {\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n return apiFactory({ resource }).delete(id).then(response => {\n commit('ITEM_DESTROYED', { collection, id })\n store.commit('config/FILTER_ENGINES_DELETED') // purge config cache\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n },\n enableFilterEngine: ({ state, commit, dispatch }, { collection, id }) => {\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n const data = { id, status: 'enabled', quiet: true }\n return apiFactory({ resource }).update(data).then(response => {\n commit('ITEM_ENABLED', { collection, id })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n },\n disableFilterEngine: ({ state, commit, dispatch }, { collection, id }) => {\n return dispatch('getCollection', collection).then(() => {\n commit('ITEM_REQUEST')\n const { [collection]: { resource } = {} } = state.cache\n const data = { id, status: 'disabled', quiet: true }\n return apiFactory({ resource }).update(data).then(response => {\n commit('ITEM_DISABLED', { collection, id })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n })\n }\n}\n\nconst mutations = {\n COLLECTIONS_REQUEST: (state, type) => {\n state.collectionsStatus = type || types.LOADING\n state.message = ''\n },\n COLLECTIONS_REPLACED: (state, items) => {\n state.collectionsStatus = types.SUCCESS\n Vue.set(state, 'cache', items.reduce((items, item) => {\n const { collection } = item\n items[collection] = item\n return items\n }, {}))\n },\n COLLECTIONS_ERROR: (state, response) => {\n state.collectionsStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n\n COLLECTION_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n COLLECTION_REPLACED: (state, { collection, items }) => {\n state.itemStatus = types.SUCCESS\n if (!(collection in state.cache)) {\n Vue.set(state.cache, collection, {})\n }\n Vue.set(state.cache[collection], 'items', items)\n },\n COLLECTION_RESORTED: (state, { collection, params }) => {\n state.itemStatus = types.SUCCESS\n const { items: order } = params\n let items = Object.values(state.cache[collection].items).sort((a, b) => {\n return order.findIndex(i => i === a.id) - order.findIndex(i => i === b.id)\n })\n Vue.set(state.cache[collection], 'items', items)\n },\n COLLECTION_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_CREATED: (state, { collection, item }) => {\n state.itemStatus = types.SUCCESS\n if (!(collection in state.cache)) {\n Vue.set(state.cache, collection, {})\n }\n if (!('items' in state.cache[collection])) {\n Vue.set(state.cache[collection], 'items', [])\n }\n Vue.set(state.cache[collection], 'items', [\n ...state.cache[collection].items,\n {\n ...item,\n ...{ not_deletable: false, not_sortable: false }\n }\n ])\n },\n ITEM_REPLACED: (state, { collection, id, item }) => {\n state.itemStatus = types.SUCCESS\n if (!(collection in state.cache)) {\n Vue.set(state.cache, collection, {})\n }\n if (!('items' in state.cache[collection])) {\n Vue.set(state.cache[collection], 'items', [])\n }\n Vue.set(state.cache[collection], 'items', [\n ...state.cache[collection].items.filter(_item => _item.id !== id),\n { id, ...item }\n ])\n },\n ITEM_DESTROYED: (state, { collection, id }) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache[collection], 'items', state.cache[collection].items.filter(item => {\n return (item.id !== id)\n }))\n },\n ITEM_ENABLED: (state, { collection, id }) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache[collection], 'items', state.cache[collection].items.map(item => {\n return (item.id === id)\n ? { ...item, ...{ status: 'enabled' } }\n : item\n }))\n },\n ITEM_DISABLED: (state, { collection, id }) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache[collection], 'items', state.cache[collection].items.map(item => {\n return (item.id === id)\n ? { ...item, ...{ status: 'disabled' } }\n : item\n }))\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n state.message = ''\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","const TheTabs = () => import(/* webpackChunkName: \"Fingerbank\" */ '../../_components/TheTabsFingerbank')\n\nexport {\n TheTabs\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n fingerbankAccountInfo: () => {\n return apiCall.getQuiet(['fingerbank', 'account_info']).then(response => {\n return response.data\n })\n },\n fingerbankCanUseNbaEndpoints: () => {\n return apiCall.getQuiet(['fingerbank', 'can_use_nba_endpoints']).then(response => {\n return response.data\n })\n },\n fingerbankUpdateDatabase: () => {\n return apiCall.post(['fingerbank', 'update_upstream_db'], {}).then(response => {\n return response.data\n })\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n fingerbankGeneralSettings: params => {\n return apiCall.get(['config', 'fingerbank_settings'], { params }).then(response => {\n return response.data.items\n })\n },\n fingerbankGeneralSettingsOptions: () => {\n return apiCall.options('config/fingerbank_settings').then(response => {\n return response.data\n })\n },\n fingerbankUpdateGeneralSetting: (id, params) => {\n const patch = params.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'fingerbank_setting', id], params).then(response => {\n return response.data\n })\n }\n}\n","import Vue from 'vue'\nimport { types } from '@/store'\nimport api from './_api'\n\n// Default values\nexport const state = () => {\n return {\n generalSettings: {\n cache: false,\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isGeneralSettingsWaiting: state => [types.LOADING, types.DELETING].includes(state.generalSettings.status),\n isGeneralSettingsLoading: state => state.generalSettings.status === types.LOADING\n}\n\nexport const actions = {\n getGeneralSettings: ({ state, commit }) => {\n if (state.generalSettings.cache) {\n return Promise.resolve(state.generalSettings.cache)\n }\n commit('GENERAL_SETTINGS_REQUEST')\n const params = {\n sort: 'id'\n }\n return api.fingerbankGeneralSettings(params).then(response => {\n // response is split multipart, refactor required\n let refactored = {}\n response.forEach((section) => {\n refactored[section.id] = Object.keys(section)\n .filter(key => !(['id'].includes(key)))\n .reduce((obj, key) => {\n obj[key] = section[key]\n return obj\n }, {})\n })\n commit('GENERAL_SETTINGS_REPLACED', refactored)\n return refactored\n }).catch(err => {\n commit('GENERAL_SETTINGS_ERROR', err.response)\n throw err\n })\n },\n // TODO - Test (Issue #4139)\n optionsGeneralSettings: ({ commit }) => {\n commit('GENERAL_SETTINGS_REQUEST')\n return api.fingerbankGeneralSettingsOptions().then(response => {\n commit('GENERAL_SETTINGS_SUCCESS')\n return response\n }).catch(err => {\n commit('GENERAL_SETTINGS_ERROR', err.response)\n throw err\n })\n },\n setGeneralSettings: ({ commit, dispatch }, data) => {\n commit('GENERAL_SETTINGS_REQUEST')\n let promises = []\n Object.keys(data).forEach(id => {\n let refactored = { ...data[id], ...{ id } }\n promises.push(api.fingerbankUpdateGeneralSetting(id, refactored))\n })\n return Promise.all(promises).then(response => {\n commit('GENERAL_SETTINGS_REPLACED', data)\n return response\n }).catch(err => {\n commit('GENERAL_SETTINGS_ERROR', err.response)\n throw err\n }).finally(() => {\n commit('ACCOUNT_INFO_RESET')\n dispatch('getAccountInfo')\n })\n }\n}\n\nexport const mutations = {\n GENERAL_SETTINGS_REQUEST: (state, type) => {\n state.generalSettings.status = type || types.LOADING\n state.generalSettings.message = ''\n },\n GENERAL_SETTINGS_REPLACED: (state, data) => {\n state.generalSettings.status = types.SUCCESS\n if (!state.generalSettings.cache)\n Vue.set(state.generalSettings, 'cache', {})\n for (let id of Object.keys(data)) {\n Vue.set(state.generalSettings.cache, id, data[id])\n }\n },\n GENERAL_SETTINGS_ERROR: (state, response) => {\n state.generalSettings.status = types.ERROR\n if (response && response.data) {\n state.generalSettings.message = response.data.message\n }\n },\n GENERAL_SETTINGS_SUCCESS: (state) => {\n state.generalSettings.status = types.SUCCESS\n }\n}\n","/**\n* \"$_fingerbank\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport api from './_api'\n\nimport {\n state as stateGeneralSettings,\n getters as gettersGeneralSettings,\n actions as actionsGeneralSettings,\n mutations as mutationsGeneralSettings\n} from './generalSettings/_store'\n\nimport {\n state as stateCombinations,\n getters as gettersCombinations,\n actions as actionsCombinations,\n mutations as mutationsCombinations\n} from './combinations/_store'\n\nimport {\n state as stateDevices,\n getters as gettersDevices,\n actions as actionsDevices,\n mutations as mutationsDevices\n} from './devices/_store'\n\nimport {\n state as stateDhcpFingerprints,\n getters as gettersDhcpFingerprints,\n actions as actionsDhcpFingerprints,\n mutations as mutationsDhcpFingerprints\n} from './dhcpFingerprints/_store'\n\nimport {\n state as stateDhcpVendors,\n getters as gettersDhcpVendors,\n actions as actionsDhcpVendors,\n mutations as mutationsDhcpVendors\n} from './dhcpVendors/_store'\n\nimport {\n state as stateDhcpv6Fingerprints,\n getters as gettersDhcpv6Fingerprints,\n actions as actionsDhcpv6Fingerprints,\n mutations as mutationsDhcpv6Fingerprints\n} from './dhcpv6Fingerprints/_store'\n\nimport {\n state as stateDhcpv6Enterprises,\n getters as gettersDhcpv6Enterprises,\n actions as actionsDhcpv6Enterprises,\n mutations as mutationsDhcpv6Enterprises\n} from './dhcpv6Enterprises/_store'\n\nimport {\n state as stateMacVendors,\n getters as gettersMacVendors,\n actions as actionsMacVendors,\n mutations as mutationsMacVendors\n} from './macVendors/_store'\n\nimport {\n state as stateUserAgents,\n getters as gettersUserAgents,\n actions as actionsUserAgents,\n mutations as mutationsUserAgents\n} from './userAgents/_store'\n\n// Default values\nconst state = () => {\n return {\n ...stateGeneralSettings(),\n ...stateCombinations(),\n ...stateDevices(),\n ...stateDhcpFingerprints(),\n ...stateDhcpVendors(),\n ...stateDhcpv6Fingerprints(),\n ...stateDhcpv6Enterprises(),\n ...stateMacVendors(),\n ...stateUserAgents(),\n\n accountInfo: {\n cache: false,\n message: '',\n status: ''\n },\n canUseNbaEndpoints: {\n cache: false,\n message: '',\n status: ''\n },\n updateDatabase: {\n message: '',\n status: ''\n }\n }\n}\n\nconst getters = {\n ...gettersGeneralSettings,\n ...gettersCombinations,\n ...gettersDevices,\n ...gettersDhcpFingerprints,\n ...gettersDhcpVendors,\n ...gettersDhcpv6Fingerprints,\n ...gettersDhcpv6Enterprises,\n ...gettersMacVendors,\n ...gettersUserAgents,\n\n accountInfo: state => state.accountInfo.cache,\n isAccountInfoWaiting: state => [types.LOADING, types.DELETING].includes(state.accountInfo.status),\n isAccountInfoLoading: state => state.accountInfo.status === types.LOADING,\n\n isCanUseNbaEndpointsWaiting: state => [types.LOADING, types.DELETING].includes(state.canUseNbaEndpoints.status),\n isCanUseNbaEndpointsLoading: state => state.canUseNbaEndpoints.status === types.LOADING,\n\n isUpdateDatabaseLoading: state => state.updateDatabase.status === types.LOADING\n}\n\nconst actions = {\n ...actionsGeneralSettings,\n ...actionsCombinations,\n ...actionsDevices,\n ...actionsDhcpFingerprints,\n ...actionsDhcpVendors,\n ...actionsDhcpv6Fingerprints,\n ...actionsDhcpv6Enterprises,\n ...actionsMacVendors,\n ...actionsUserAgents,\n\n getAccountInfo: ({ state, commit }) => {\n if (state.accountInfo.cache) {\n return Promise.resolve(state.accountInfo.cache)\n }\n commit('ACCOUNT_INFO_REQUEST')\n return api.fingerbankAccountInfo().then(info => {\n commit('ACCOUNT_INFO_REPLACED', info)\n return info\n }).catch(err => {\n commit('ACCOUNT_INFO_ERROR', err.response)\n throw err\n })\n },\n getCanUseNbaEndpoints: ({ state, commit }) => {\n if (state.canUseNbaEndpoints.cache) {\n return Promise.resolve(state.canUseNbaEndpoints.cache)\n }\n commit('CAN_USE_NBA_ENDPOINTS_REQUEST')\n return api.fingerbankCanUseNbaEndpoints().then(info => {\n commit('CAN_USE_NBA_ENDPOINTS_REPLACED', info)\n return info\n }).catch(err => {\n commit('CAN_USE_NBA_ENDPOINTS_ERROR', err.response)\n throw err\n })\n },\n updateDatabase: ({ commit }, data) => {\n commit('UPDATE_DATABASE_REQUEST')\n return api.fingerbankUpdateDatabase().then(response => {\n commit('UPDATE_DATABASE_SUCCESS', data)\n return response\n }).catch(err => {\n commit('UPDATE_DATABASE_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ...mutationsGeneralSettings,\n ...mutationsCombinations,\n ...mutationsDevices,\n ...mutationsDhcpFingerprints,\n ...mutationsDhcpVendors,\n ...mutationsDhcpv6Fingerprints,\n ...mutationsDhcpv6Enterprises,\n ...mutationsMacVendors,\n ...mutationsUserAgents,\n\n ACCOUNT_INFO_REQUEST: (state, type) => {\n state.accountInfo.status = type || types.LOADING\n state.accountInfo.message = ''\n },\n ACCOUNT_INFO_REPLACED: (state, data) => {\n state.accountInfo.status = types.SUCCESS\n Vue.set(state.accountInfo, 'cache', data)\n },\n ACCOUNT_INFO_RESET: (state) => {\n Vue.set(state.accountInfo, 'cache', false)\n },\n ACCOUNT_INFO_ERROR: (state, response) => {\n state.accountInfo.status = types.ERROR\n if (response && response.data) {\n state.accountInfo.message = response.data.message\n }\n },\n CAN_USE_NBA_ENDPOINTS_REQUEST: (state, type) => {\n state.canUseNbaEndpoints.status = type || types.LOADING\n state.canUseNbaEndpoints.message = ''\n },\n CAN_USE_NBA_ENDPOINTS_REPLACED: (state, data) => {\n state.canUseNbaEndpoints.status = types.SUCCESS\n Vue.set(state.canUseNbaEndpoints, 'cache', data)\n },\n CAN_USE_NBA_ENDPOINTS_ERROR: (state, response) => {\n state.canUseNbaEndpoints.status = types.ERROR\n if (response && response.data) {\n state.canUseNbaEndpoints.message = response.data.message\n }\n },\n UPDATE_DATABASE_REQUEST: (state, type) => {\n state.updateDatabase.status = type || types.LOADING\n state.updateDatabase.message = ''\n },\n UPDATE_DATABASE_ERROR: (state, response) => {\n state.updateDatabase.status = types.ERROR\n if (response && response.data) {\n state.updateDatabase.message = response.data.message\n }\n },\n UPDATE_DATABASE_SUCCESS: (state) => {\n state.updateDatabase.status = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'local', 'combinations'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('fingerbank/local/combinations/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'local', 'combination', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/combinations', data).then(response => {\n return response.data\n })\n },\n update: data => {\n Object.keys(data).forEach(key => {\n if (/^not_/.test(key)) { // remove fields starting with 'not_'\n delete data[key]\n }\n })\n return apiCall.patch(['fingerbank', 'local', 'combination', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'combination', id])\n }\n}\n\n","import store from '@/store'\nimport { TheTabs } from '../_components/'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankCombinations' }),\n goToItem: params => $router\n .push({ name: 'fingerbankCombination', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankCombination', params }),\n goToNew: () => $router.push({ name: 'newFingerbankCombination' })\n }\n}\n\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/combinations',\n name: 'fingerbankCombinations',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankCombinations' })\n },\n {\n path: 'fingerbank/local/combinations/new',\n name: 'newFingerbankCombination',\n component: TheView,\n props: () => ({ isNew: true })\n },\n {\n path: 'fingerbank/local/combination/:id',\n name: 'fingerbankCombination',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getCombination', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/local/combination/:id/clone',\n name: 'cloneFingerbankCombination',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getCombination', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isCombinationsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createCombination', params),\n getItem: params => $store.dispatch('$_fingerbank/getCombination', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateCombination', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteCombination', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n combinations: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isCombinationsWaiting: state => [types.LOADING, types.DELETING].includes(state.combinations.status),\n isCombinationsLoading: state => state.combinations.status === types.LOADING,\n}\n\nexport const actions = {\n combinations: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getCombination: ({ state, commit }, id) => {\n if (state.combinations.cache[id]) {\n return Promise.resolve(state.combinations.cache[id])\n }\n commit('COMBINATION_REQUEST')\n return api.item(id).then(item => {\n commit('COMBINATION_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('COMBINATION_ERROR', err.response)\n throw err\n })\n },\n createCombination: ({ commit }, data) => {\n commit('COMBINATION_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('COMBINATION_REPLACED', data)\n return response\n }).catch(err => {\n commit('COMBINATION_ERROR', err.response)\n throw err\n })\n },\n updateCombination: ({ commit }, data) => {\n commit('COMBINATION_REQUEST')\n return api.update(data).then(response => {\n commit('COMBINATION_REPLACED', data)\n return response\n }).catch(err => {\n commit('COMBINATION_ERROR', err.response)\n throw err\n })\n },\n deleteCombination: ({ commit }, data) => {\n commit('COMBINATION_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('COMBINATION_DESTROYED', data)\n return response\n }).catch(err => {\n commit('COMBINATION_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n COMBINATION_REQUEST: (state, type) => {\n state.combinations.status = type || types.LOADING\n state.combinations.message = ''\n },\n COMBINATION_REPLACED: (state, data) => {\n state.combinations.status = types.SUCCESS\n Vue.set(state.combinations.cache, data.id, data)\n },\n COMBINATION_DESTROYED: (state, id) => {\n state.combinations.status = types.SUCCESS\n Vue.set(state.combinations.cache, id, null)\n },\n COMBINATION_ERROR: (state, response) => {\n state.combinations.status = types.ERROR\n if (response && response.data) {\n state.combinations.message = response.data.message\n }\n },\n COMBINATION_SUCCESS: (state) => {\n state.combinations.status = types.SUCCESS\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'devices'], { params }).then(response => {\n return response.data\n })\n },\n classes: () => {\n return apiCall.get('fingerbank/all_device_classes').then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/devices/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/devices/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'device', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/devices', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'device', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'device', id])\n }\n}\n","import store from '@/store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankDevices' }),\n goToItem: params => $router\n .push({ name: 'fingerbankDevice', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankDevice', params }),\n goToNew: params => $router.push({ name: 'newFingerbankDevice', params })\n }\n}\n\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/devices',\n name: 'fingerbankDevices',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankDevices', scope: 'all', parentId: undefined })\n },\n {\n path: 'fingerbank/:scope/devices',\n name: 'fingerbankDevicesByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDevices', scope: route.params.scope, parentId: undefined })\n },\n {\n path: 'fingerbank/devices/:parentId',\n name: 'fingerbankDevicesByParentId',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDevices', scope: 'all', parentId: route.params.parentId })\n },\n {\n path: 'fingerbank/:scope/devices/new',\n name: 'newFingerbankDevice',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/device/:id',\n name: 'fingerbankDevice',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDevice', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/device/:id/clone',\n name: 'cloneFingerbankDevice',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDevice', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isDevicesLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createDevice', params),\n getItem: params => $store.dispatch('$_fingerbank/getDevice', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateDevice', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteDevice', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n devices: {\n cache: {},\n classes: [],\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isDevicesWaiting: state => [types.LOADING, types.DELETING].includes(state.devices.status),\n isDevicesLoading: state => state.devices.status === types.LOADING,\n assocClassesById: state => state.classes.reduce((assoc, { id, name }) => {\n return { ...assoc, [id]: name }\n }, {}),\n assocClassesByName: state => state.classes.reduce((assoc, { id, name }) => {\n return { ...assoc, [name]: id }\n }, {}),\n\n}\n\nexport const actions = {\n devices: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'name'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getClasses: ({ state, commit }) => {\n commit('DEVICE_REQUEST')\n return api.classes().then(response => {\n commit('DEVICE_CLASSES', response.items)\n return state.classes\n }).catch(err => {\n commit('DEVICE_ERROR', err.response)\n throw err\n })\n },\n getDevice: ({ state, commit }, id) => {\n if (state.devices.cache[id]) {\n return Promise.resolve(state.devices.cache[id])\n }\n commit('DEVICE_REQUEST')\n return api.item(id).then(item => {\n commit('DEVICE_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('DEVICE_ERROR', err.response)\n throw err\n })\n },\n createDevice: ({ commit }, data) => {\n commit('DEVICE_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('DEVICE_REPLACED', data)\n return response\n }).catch(err => {\n commit('DEVICE_ERROR', err.response)\n throw err\n })\n },\n updateDevice: ({ commit }, data) => {\n commit('DEVICE_REQUEST')\n return api.update(data).then(response => {\n commit('DEVICE_REPLACED', data)\n return response\n }).catch(err => {\n commit('DEVICE_ERROR', err.response)\n throw err\n })\n },\n deleteDevice: ({ commit }, id) => {\n commit('DEVICE_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('DEVICE_DESTROYED', id)\n return response\n }).catch(err => {\n commit('DEVICE_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n DEVICE_REQUEST: (state, type) => {\n state.devices.status = type || types.LOADING\n state.devices.message = ''\n },\n DEVICE_REPLACED: (state, data) => {\n state.devices.status = types.SUCCESS\n Vue.set(state.devices.cache, data.id, data)\n },\n DEVICE_DESTROYED: (state, id) => {\n state.devices.status = types.SUCCESS\n Vue.set(state.devices.cache, id, null)\n },\n DEVICE_ERROR: (state, response) => {\n state.devices.status = types.ERROR\n if (response && response.data) {\n state.devices.message = response.data.message\n }\n },\n DEVICE_CLASSES: (state, classes) => {\n state.devices.status = types.SUCCESS\n state.classes = classes\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'dhcp_fingerprints'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/dhcp_fingerprints/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/dhcp_fingerprints/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'dhcp_fingerprint', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/dhcp_fingerprints', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'dhcp_fingerprint', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'dhcp_fingerprint', id])\n }\n}\n","import store from '@/store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankDhcpFingerprints' }),\n goToItem: params => $router\n .push({ name: 'fingerbankDhcpFingerprint', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankDhcpFingerprint', params }),\n goToNew: params => $router.push({ name: 'newFingerbankDhcpFingerprint', params })\n }\n}\n\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/dhcp_fingerprints',\n name: 'fingerbankDhcpFingerprints',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankDhcpFingerprints', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/dhcp_fingerprints',\n name: 'fingerbankDhcpFingerprintsByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDhcpFingerprints', scope: route.params.scope })\n },\n {\n path: 'fingerbank/:scope/dhcp_fingerprints/new',\n name: 'newFingerbankDhcpFingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/dhcp_fingerprint/:id',\n name: 'fingerbankDhcpFingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpFingerprint', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/dhcp_fingerprint/:id/clone',\n name: 'cloneFingerbankDhcpFingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpFingerprint', to.params.id).then(() => {\n next()\n })\n }\n },\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isDhcpFingerprintsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createDhcpFingerprint', params),\n getItem: params => $store.dispatch('$_fingerbank/getDhcpFingerprint', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateDhcpFingerprint', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteDhcpFingerprint', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n dhcpFingerprints: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isDhcpFingerprintsWaiting: state => [types.LOADING, types.DELETING].includes(state.dhcpFingerprints.status),\n isDhcpFingerprintsLoading: state => state.dhcpFingerprints.status === types.LOADING\n}\n\nexport const actions = {\n dhcpFingerprints: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getDhcpFingerprint: ({ state, commit }, id) => {\n if (state.dhcpFingerprints.cache[id]) {\n return Promise.resolve(state.dhcpFingerprints.cache[id])\n }\n commit('DHCP_FINGERPRINT_REQUEST')\n return api.item(id).then(item => {\n commit('DHCP_FINGERPRINT_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('DHCP_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n createDhcpFingerprint: ({ commit }, data) => {\n commit('DHCP_FINGERPRINT_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('DHCP_FINGERPRINT_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCP_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n updateDhcpFingerprint: ({ commit }, data) => {\n commit('DHCP_FINGERPRINT_REQUEST')\n return api.update(data).then(response => {\n commit('DHCP_FINGERPRINT_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCP_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n deleteDhcpFingerprint: ({ commit }, id) => {\n commit('DHCP_FINGERPRINT_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('DHCP_FINGERPRINT_DESTROYED', id)\n return response\n }).catch(err => {\n commit('DHCP_FINGERPRINT_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n DHCP_FINGERPRINT_REQUEST: (state, type) => {\n state.dhcpFingerprints.status = type || types.LOADING\n state.dhcpFingerprints.message = ''\n },\n DHCP_FINGERPRINT_REPLACED: (state, data) => {\n state.dhcpFingerprints.status = types.SUCCESS\n Vue.set(state.dhcpFingerprints.cache, data.id, data)\n },\n DHCP_FINGERPRINT_DESTROYED: (state, id) => {\n state.dhcpFingerprints.status = types.SUCCESS\n Vue.set(state.dhcpFingerprints.cache, id, null)\n },\n DHCP_FINGERPRINT_ERROR: (state, response) => {\n state.dhcpFingerprints.status = types.ERROR\n if (response && response.data) {\n state.dhcpFingerprints.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'dhcp_vendors'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/dhcp_vendors/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/dhcp_vendors/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'dhcp_vendor', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/dhcp_vendors', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'dhcp_vendor', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'dhcp_vendor', id])\n }\n}\n","import store from '@/store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankDhcpVendors' }),\n goToItem: params => $router\n .push({ name: 'fingerbankDhcpVendor', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankDhcpVendor', params }),\n goToNew: params => $router.push({ name: 'newFingerbankDhcpVendor', params })\n }\n}\n\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/dhcp_vendors',\n name: 'fingerbankDhcpVendors',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankDhcpVendors', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/dhcp_vendors',\n name: 'fingerbankDhcpVendorsByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDhcpVendors', scope: route.params.scope })\n },\n {\n path: 'fingerbank/:scope/dhcp_vendors/new',\n name: 'newFingerbankDhcpVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/dhcp_vendor/:id',\n name: 'fingerbankDhcpVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpVendor', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/dhcp_vendor/:id/clone',\n name: 'cloneFingerbankDhcpVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpVendor', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isDhcpVendorsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createDhcpVendor', params),\n getItem: params => $store.dispatch('$_fingerbank/getDhcpVendor', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateDhcpVendor', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteDhcpVendor', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n dhcpVendors: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isDhcpVendorsWaiting: state => [types.LOADING, types.DELETING].includes(state.dhcpVendors.status),\n isDhcpVendorsLoading: state => state.dhcpVendors.status === types.LOADING\n}\n\nexport const actions = {\n dhcpVendors: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getDhcpVendor: ({ state, commit }, id) => {\n if (state.dhcpVendors.cache[id]) {\n return Promise.resolve(state.dhcpVendors.cache[id])\n }\n commit('DHCP_VENDOR_REQUEST')\n return api.item(id).then(item => {\n commit('DHCP_VENDOR_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('DHCP_VENDOR_ERROR', err.response)\n throw err\n })\n },\n createDhcpVendor: ({ commit }, data) => {\n commit('DHCP_VENDOR_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('DHCP_VENDOR_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCP_VENDOR_ERROR', err.response)\n throw err\n })\n },\n updateDhcpVendor: ({ commit }, data) => {\n commit('DHCP_VENDOR_REQUEST')\n return api.update(data).then(response => {\n commit('DHCP_VENDOR_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCP_VENDOR_ERROR', err.response)\n throw err\n })\n },\n deleteDhcpVendor: ({ commit }, id) => {\n commit('DHCP_VENDOR_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('DHCP_VENDOR_DESTROYED', id)\n return response\n }).catch(err => {\n commit('DHCP_VENDOR_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n DHCP_VENDOR_REQUEST: (state, type) => {\n state.dhcpFingerprints.status = type || types.LOADING\n state.dhcpVendors.message = ''\n },\n DHCP_VENDOR_REPLACED: (state, data) => {\n state.dhcpFingerprints.status = types.SUCCESS\n Vue.set(state.dhcpVendors.cache, data.id, data)\n },\n DHCP_VENDOR_DESTROYED: (state, id) => {\n state.dhcpFingerprints.status = types.SUCCESS\n Vue.set(state.dhcpVendors.cache, id, null)\n },\n DHCP_VENDOR_ERROR: (state, response) => {\n state.dhcpFingerprints.status = types.ERROR\n if (response && response.data) {\n state.dhcpVendors.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'dhcp6_enterprises'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/dhcp6_enterprises/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/dhcp6_enterprises/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'dhcp6_enterprise', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/dhcp6_enterprises', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'dhcp6_enterprise', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'dhcp6_enterprise', id])\n }\n}\n","import store from '@/store'\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankDhcpv6Enterprises' }),\n goToItem: params => $router\n .push({ name: 'fingerbankDhcpv6Enterprise', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankDhcpv6Enterprise', params }),\n goToNew: params => $router.push({ name: 'newFingerbankDhcpv6Enterprise', params })\n }\n}\n\nexport default [\n {\n path: 'fingerbank/dhcpv6_enterprises',\n name: 'fingerbankDhcpv6Enterprises',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankDhcpv6Enterprises', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_enterprises',\n name: 'fingerbankDhcpv6EnterprisesByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDhcpv6Enterprises', scope: route.params.scope })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_enterprises/new',\n name: 'newFingerbankDhcpv6Enterprise',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_enterprise/:id',\n name: 'fingerbankDhcpv6Enterprise',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpv6Enterprise', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/dhcpv6_enterprise/:id/clone',\n name: 'cloneFingerbankDhcpv6Enterprise',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpv6Enterprise', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isDhcpv6EnterprisesLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createDhcpv6Enterprise', params),\n getItem: params => $store.dispatch('$_fingerbank/getDhcpv6Enterprise', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateDhcpv6Enterprise', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteDhcpv6Enterprise', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n dhcpv6Enterprises: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isDhcpv6EnterprisesWaiting: state => [types.LOADING, types.DELETING].includes(state.dhcpv6Enterprises.status),\n isDhcpv6EnterprisesLoading: state => state.dhcpv6Enterprises.status === types.LOADING\n}\n\nexport const actions = {\n dhcpv6Enterprises: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getDhcpv6Enterprise: ({ state, commit }, id) => {\n if (state.dhcpv6Enterprises.cache[id]) {\n return Promise.resolve(state.dhcpv6Enterprises.cache[id])\n }\n commit('DHCPV6_ENTERPRISE_REQUEST')\n return api.item(id).then(item => {\n commit('DHCPV6_ENTERPRISE_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('DHCPV6_ENTERPRISE_ERROR', err.response)\n throw err\n })\n },\n createDhcpv6Enterprise: ({ commit }, data) => {\n commit('DHCPV6_ENTERPRISE_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('DHCPV6_ENTERPRISE_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCPV6_ENTERPRISE_ERROR', err.response)\n throw err\n })\n },\n updateDhcpv6Enterprise: ({ commit }, data) => {\n commit('DHCPV6_ENTERPRISE_REQUEST')\n return api.update(data).then(response => {\n commit('DHCPV6_ENTERPRISE_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCPV6_ENTERPRISE_ERROR', err.response)\n throw err\n })\n },\n deleteDhcpv6Enterprise: ({ commit }, id) => {\n commit('DHCPV6_ENTERPRISE_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('DHCPV6_ENTERPRISE_DESTROYED', id)\n return response\n }).catch(err => {\n commit('DHCPV6_ENTERPRISE_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n DHCPV6_ENTERPRISE_REQUEST: (state, type) => {\n state.dhcpv6Enterprises.status = type || types.LOADING\n state.dhcpv6Enterprises.message = ''\n },\n DHCPV6_ENTERPRISE_REPLACED: (state, data) => {\n state.dhcpv6Enterprises.status = types.SUCCESS\n Vue.set(state.dhcpv6Enterprises.cache, data.id, data)\n },\n DHCPV6_ENTERPRISE_DESTROYED: (state, id) => {\n state.dhcpv6Enterprises.status = types.SUCCESS\n Vue.set(state.dhcpv6Enterprises.cache, id, null)\n },\n DHCPV6_ENTERPRISE_ERROR: (state, response) => {\n state.dhcpv6Enterprises.status = types.ERROR\n if (response && response.data) {\n state.dhcpv6Enterprises.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'dhcp6_fingerprints'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/dhcp6_fingerprints/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/dhcp6_fingerprints/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'dhcp6_fingerprint', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/dhcp6_fingerprints', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'dhcp6_fingerprint', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'dhcp6_fingerprint', id])\n }\n}\n","import store from '@/store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankDhcpv6Fingerprints' }),\n goToItem: params => $router\n .push({ name: 'fingerbankDhcpv6Fingerprint', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankDhcpv6Fingerprint', params }),\n goToNew: params => $router.push({ name: 'newFingerbankDhcpv6Fingerprint', params })\n }\n}\n\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/dhcpv6_fingerprints',\n name: 'fingerbankDhcpv6Fingerprints',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankDhcpv6Fingerprints', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_fingerprints',\n name: 'fingerbankDhcpv6FingerprintsByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankDhcpv6Fingerprints', scope: route.params.scope })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_fingerprints/new',\n name: 'newFingerbankDhcpv6Fingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/dhcpv6_fingerprint/:id',\n name: 'fingerbankDhcpv6Fingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpv6Fingerprint', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/dhcpv6_fingerprint/:id/clone',\n name: 'cloneFingerbankDhcpv6Fingerprint',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getDhcpv6Fingerprint', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isDhcpv6FingerprintsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createDhcpv6Fingerprint', params),\n getItem: params => $store.dispatch('$_fingerbank/getDhcpv6Fingerprint', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateDhcpv6Fingerprint', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteDhcpv6Fingerprint', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n dhcpv6Fingerprints: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isDhcpv6FingerprintsWaiting: state => [types.LOADING, types.DELETING].includes(state.dhcpv6Fingerprints.status),\n isDhcpv6FingerprintsLoading: state => state.dhcpv6Fingerprints.status === types.LOADING\n}\n\nexport const actions = {\n dhcpv6Fingerprints: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getDhcpv6Fingerprint: ({ state, commit }, id) => {\n if (state.dhcpv6Fingerprints.cache[id]) {\n return Promise.resolve(state.dhcpv6Fingerprints.cache[id])\n }\n commit('DHCPV6_FINGERPRINT_REQUEST')\n return api.item(id).then(item => {\n commit('DHCPV6_FINGERPRINT_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('DHCPV6_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n createDhcpv6Fingerprint: ({ commit }, data) => {\n commit('DHCPV6_FINGERPRINT_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('DHCPV6_FINGERPRINT_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCPV6_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n updateDhcpv6Fingerprint: ({ commit }, data) => {\n commit('DHCPV6_FINGERPRINT_REQUEST')\n return api.update(data).then(response => {\n commit('DHCPV6_FINGERPRINT_REPLACED', data)\n return response\n }).catch(err => {\n commit('DHCPV6_FINGERPRINT_ERROR', err.response)\n throw err\n })\n },\n deleteDhcpv6Fingerprint: ({ commit }, id) => {\n commit('DHCPV6_FINGERPRINT_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('DHCPV6_FINGERPRINT_DESTROYED', id)\n return response\n }).catch(err => {\n commit('DHCPV6_FINGERPRINT_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n DHCPV6_FINGERPRINT_REQUEST: (state, type) => {\n state.dhcpv6Fingerprints.status = type || types.LOADING\n state.dhcpv6Fingerprints.message = ''\n },\n DHCPV6_FINGERPRINT_REPLACED: (state, data) => {\n state.dhcpv6Fingerprints.status = types.SUCCESS\n Vue.set(state.dhcpv6Fingerprints.cache, data.id, data)\n },\n DHCPV6_FINGERPRINT_DESTROYED: (state, id) => {\n state.dhcpv6Fingerprints.status = types.SUCCESS\n Vue.set(state.dhcpv6Fingerprints.cache, id, null)\n },\n DHCPV6_FINGERPRINT_ERROR: (state, response) => {\n state.dhcpv6Fingerprints.status = types.ERROR\n if (response && response.data) {\n state.dhcpv6Fingerprints.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'all', 'mac_vendors'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/mac_vendors/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/mac_vendors/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'all', 'mac_vendor', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/mac_vendors', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'mac_vendor', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'mac_vendor', id])\n }\n}\n","import store from '@/store'\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankMacVendors' }),\n goToItem: params => $router\n .push({ name: 'fingerbankMacVendor', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankMacVendor', params }),\n goToNew: params => $router.push({ name: 'newFingerbankMacVendor', params })\n }\n}\n\nexport default [\n {\n path: 'fingerbank/mac_vendors',\n name: 'fingerbankMacVendors',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankMacVendors', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/mac_vendors',\n name: 'fingerbankMacVendorsByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankMacVendors', scope: route.params.scope })\n },\n {\n path: 'fingerbank/:scope/mac_vendors/new',\n name: 'newFingerbankMacVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, isNew: true })\n },\n {\n path: 'fingerbank/:scope/mac_vendor/:id',\n name: 'fingerbankMacVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getMacVendor', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/:scope/mac_vendor/:id/clone',\n name: 'cloneFingerbankMacVendor',\n component: TheView,\n props: (route) => ({ scope: route.params.scope, id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getMacVendor', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isMacVendorsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createMacVendor', params),\n getItem: params => $store.dispatch('$_fingerbank/getMacVendor', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateMacVendor', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteMacVendor', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n macVendors: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isMacVendorsWaiting: state => [types.LOADING, types.DELETING].includes(state.macVendors.status),\n isMacVendorsLoading: state => state.macVendors.status === types.LOADING\n}\n\nexport const actions = {\n macVendors: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getMacVendor: ({ state, commit }, id) => {\n if (state.macVendors.cache[id]) {\n return Promise.resolve(state.macVendors.cache[id])\n }\n commit('MAC_VENDOR_REQUEST')\n return api.item(id).then(item => {\n commit('MAC_VENDOR_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('MAC_VENDOR_ERROR', err.response)\n throw err\n })\n },\n createMacVendor: ({ commit }, data) => {\n commit('MAC_VENDOR_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('MAC_VENDOR_REPLACED', data)\n return response\n }).catch(err => {\n commit('MAC_VENDOR_ERROR', err.response)\n throw err\n })\n },\n updateMacVendor: ({ commit }, data) => {\n commit('MAC_VENDOR_REQUEST')\n return api.update(data).then(response => {\n commit('MAC_VENDOR_REPLACED', data)\n return response\n }).catch(err => {\n commit('MAC_VENDOR_ERROR', err.response)\n throw err\n })\n },\n deleteMacVendor: ({ commit }, id) => {\n commit('MAC_VENDOR_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('MAC_VENDOR_DESTROYED', id)\n return response\n }).catch(err => {\n commit('MAC_VENDOR_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n MAC_VENDOR_REQUEST: (state, type) => {\n state.macVendors.status = type || types.LOADING\n state.macVendors.message = ''\n },\n MAC_VENDOR_REPLACED: (state, data) => {\n state.macVendors.status = types.SUCCESS\n Vue.set(state.macVendors.cache, data.id, data)\n },\n MAC_VENDOR_DESTROYED: (state, id) => {\n state.macVendors.status = types.SUCCESS\n Vue.set(state.macVendors.cache, id, null)\n },\n MAC_VENDOR_ERROR: (state, response) => {\n state.macVendors.status = types.ERROR\n if (response && response.data) {\n state.macVendors.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['fingerbank', 'local', 'user_agents'], { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n const { scope, ...rest } = body\n if (scope)\n return apiCall.post(`fingerbank/${scope}/user_agents/search`, rest).then(response => {\n return response.data\n })\n else\n return apiCall.post('fingerbank/all/user_agents/search', body).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['fingerbank', 'local', 'user_agent', id]).then(response => {\n return response.data.item\n })\n },\n create: data => {\n return apiCall.post('fingerbank/local/user_agents', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['fingerbank', 'local', 'user_agent', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['fingerbank', 'local', 'user_agent', id])\n }\n}\n","import store from '@/store'\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'fingerbankUserAgents' }),\n goToItem: params => $router\n .push({ name: 'fingerbankUserAgent', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFingerbankUserAgent', params }),\n goToNew: params => $router.push({ name: 'newFingerbankUserAgent', params })\n }\n}\n\nimport { TheTabs } from '../_components/'\nconst TheView = () => import(/* webpackChunkName: \"Fingerbank\" */ './_components/TheView')\n\nexport default [\n {\n path: 'fingerbank/user_agents',\n name: 'fingerbankUserAgents',\n component: TheTabs,\n props: () => ({ tab: 'fingerbankUserAgents', scope: 'all' })\n },\n {\n path: 'fingerbank/:scope/user_agents',\n name: 'fingerbankUserAgentsByScope',\n component: TheTabs,\n props: (route) => ({ tab: 'fingerbankUserAgents', scope: route.params.scope })\n },\n {\n path: 'fingerbank/local/user_agents/new',\n name: 'newFingerbankUserAgent',\n component: TheView,\n props: () => ({ isNew: true })\n },\n {\n path: 'fingerbank/local/user_agent/:id',\n name: 'fingerbankUserAgent',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getUserAgent', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'fingerbank/local/user_agent/:id/clone',\n name: 'cloneFingerbankUserAgent',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_fingerbank/getUserAgent', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_fingerbank/isUserAgentsLoading']),\n createItem: params => $store.dispatch('$_fingerbank/createUserAgent', params),\n getItem: params => $store.dispatch('$_fingerbank/getUserAgent', params.id),\n updateItem: params => $store.dispatch('$_fingerbank/updateUserAgent', params),\n deleteItem: params => $store.dispatch('$_fingerbank/deleteUserAgent', params.id),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n userAgents: {\n cache: {},\n message: '',\n status: ''\n }\n }\n}\n\nexport const getters = {\n isUserAgentsWaiting: state => [types.LOADING, types.DELETING].includes(state.userAgents.status),\n isUserAgentsLoading: state => state.userAgents.status === types.LOADING\n}\n\nexport const actions = {\n userAgents: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getUserAgent: ({ state, commit }, id) => {\n if (state.userAgents.cache[id]) {\n return Promise.resolve(state.userAgents.cache[id])\n }\n commit('USER_AGENT_REQUEST')\n return api.item(id).then(item => {\n commit('USER_AGENT_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch(err => {\n commit('USER_AGENT_ERROR', err.response)\n throw err\n })\n },\n createUserAgent: ({ commit }, data) => {\n commit('USER_AGENT_REQUEST')\n return api.create(data).then(response => {\n data.id = response.id\n commit('USER_AGENT_REPLACED', data)\n return response\n }).catch(err => {\n commit('USER_AGENT_ERROR', err.response)\n throw err\n })\n },\n updateUserAgent: ({ commit }, data) => {\n commit('USER_AGENT_REQUEST')\n return api.update(data).then(response => {\n commit('USER_AGENT_REPLACED', data)\n return response\n }).catch(err => {\n commit('USER_AGENT_ERROR', err.response)\n throw err\n })\n },\n deleteUserAgent: ({ commit }, id) => {\n commit('USER_AGENT_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('USER_AGENT_DESTROYED', id)\n return response\n }).catch(err => {\n commit('USER_AGENT_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n USER_AGENT_REQUEST: (state, type) => {\n state.userAgents.status = type || types.LOADING\n state.userAgents.message = ''\n },\n USER_AGENT_REPLACED: (state, data) => {\n state.userAgents.status = types.SUCCESS\n Vue.set(state.userAgents.cache, data.id, data)\n },\n USER_AGENT_DESTROYED: (state, id) => {\n state.userAgents.status = types.SUCCESS\n Vue.set(state.userAgents.cache, id, null)\n },\n USER_AGENT_ERROR: (state, response) => {\n state.userAgents.status = types.ERROR\n if (response && response.data) {\n state.userAgents.message = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/firewalls', { params }).then(response => {\n return response.data\n })\n },\n listOptions: firewallType => {\n return apiCall.options(['config', 'firewalls'], { params: { type: firewallType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/firewalls/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/firewalls', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'firewall', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'firewall', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'firewall', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'firewall', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'firewalls' }),\n goToItem: params => $router\n .push({ name: 'firewall', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFirewall', params: { ...params, firewallType: params.type } }),\n goToNew: params => $router.push({ name: 'newFirewall', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_firewalls) {\n store.registerModule('$_firewalls', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'firewalls',\n name: 'firewalls',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'firewalls/new/:firewallType',\n name: 'newFirewall',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, firewallType: route.params.firewallType }),\n beforeEnter\n },\n {\n path: 'firewall/:id',\n name: 'firewall',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_firewalls/getFirewall', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'firewall/:id/clone/:firewallType',\n name: 'cloneFirewall',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, firewallType: route.params.firewallType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_firewalls/getFirewall', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_firewalls\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_firewalls/isLoading']),\n getList: () => $store.dispatch('$_firewalls/all'),\n getListOptions: params => $store.dispatch('$_firewalls/optionsByFirewallType', params.firewallType),\n createItem: params => $store.dispatch('$_firewalls/createFirewall', params),\n getItem: params => $store.dispatch('$_firewalls/getFirewall', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_firewalls/optionsById', params.id),\n updateItem: params => $store.dispatch('$_firewalls/updateFirewall', params),\n deleteItem: params => $store.dispatch('$_firewalls/deleteFirewall', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'port'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByFirewallType: ({ commit }, firewallType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(firewallType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getFirewall: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createFirewall: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateFirewall: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteFirewall: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const types = {\n BarracudaNG: i18n.t('BarracudaNG'),\n Checkpoint: i18n.t('Checkpoint'),\n ContentKeeper: i18n.t('ContentKeeper'),\n CiscoIsePic: i18n.t('Cisco ISE-PIC'),\n FamilyZone: i18n.t('FamilyZone'),\n FortiGate: i18n.t('FortiGate'),\n Iboss: i18n.t('Iboss'),\n JSONRPC: i18n.t('JSONRPC'),\n JuniperSRX: i18n.t('JuniperSRX'),\n LightSpeedRocket: i18n.t('LightSpeedRocket'),\n PaloAlto: i18n.t('PaloAlto'),\n SmoothWall: i18n.t('SmoothWall'),\n WatchGuard: i18n.t('WatchGuard')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const analytics = {\n track: ['firewallType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/floating_devices', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/floating_devices').then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'floating_device', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'floating_device', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/floating_devices', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'floating_device', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'floating_device', id])\n },\n search: data => {\n return apiCall.post('config/floating_devices/search', data).then(response => {\n return response.data\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'floating_devices' }),\n goToItem: params => $router\n .push({ name: 'floating_device', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneFloatingDevice', params }),\n goToNew: () => $router.push({ name: 'newFloatingDevice' }),\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_floatingdevices)\n store.registerModule('$_floatingdevices', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'floating_devices',\n name: 'floating_devices',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'floating_devices/new',\n name: 'newFloatingDevice',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'floating_device/:id',\n name: 'floating_device',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_floatingdevices/getFloatingDevice', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'floating_device/:id/clone',\n name: 'cloneFloatingDevice',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_floatingdevices/getFloatingDevice', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_floatingdevices\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_floatingdevices/isLoading']),\n getList: () => $store.dispatch('$_floatingdevices/all'),\n getListOptions: () => $store.dispatch('$_floatingdevices/options'),\n createItem: params => $store.dispatch('$_floatingdevices/createFloatingDevice', params),\n getItem: params => $store.dispatch('$_floatingdevices/getFloatingDevice', params.id).then(item => {\n return (params.isClone)\n ? { ...item, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_floatingdevices/options', params.id),\n updateItem: params => $store.dispatch('$_floatingdevices/updateFloatingDevice', params),\n deleteItem: params => $store.dispatch('$_floatingdevices/deleteFloatingDevice', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n getFloatingDevice: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n createFloatingDevice: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateFloatingDevice: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteFloatingDevice: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/maintenance_tasks', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/maintenance_tasks').then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/maintenance_tasks', data).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/maintenance_tasks/search', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'maintenance_task', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'maintenance_task', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'maintenance_task', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'maintenance_task', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../_components/TheTabsMain')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'maintenance_tasks' }),\n goToItem: params => $router\n .push({ name: 'maintenance_task', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_maintenance_tasks)\n store.registerModule('$_maintenance_tasks', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'maintenance_tasks',\n name: 'maintenance_tasks',\n component: TheTabs,\n props: () => ({ tab: 'maintenance_tasks' }),\n beforeEnter\n },\n {\n path: 'maintenance_task/:id',\n name: 'maintenance_task',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_maintenance_tasks/getMaintenanceTask', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_maintenance_tasks\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_maintenance_tasks/isLoading']),\n getList: () => $store.dispatch('$_maintenance_tasks/all'),\n getListOptions: () => $store.dispatch('$_maintenance_tasks/options'),\n createItem: params => $store.dispatch('$_maintenance_tasks/createMaintenanceTask', params),\n getItem: params => $store.dispatch('$_maintenance_tasks/getMaintenanceTask', params.id),\n getItemOptions: params => $store.dispatch('$_maintenance_tasks/options', params.id),\n updateItem: params => $store.dispatch('$_maintenance_tasks/updateMaintenanceTask', params),\n deleteItem: params => $store.dispatch('$_maintenance_tasks/deleteMaintenanceTask', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n getMaintenanceTask: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n createMaintenanceTask: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateMaintenanceTask: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteMaintenanceTask: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n enableMaintenanceTask: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const _data = { id: data.id, status: 'enabled', quiet: true }\n return api.update(_data).then(response => {\n commit('ITEM_ENABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n disableMaintenanceTask: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const _data = { id: data.id, status: 'disabled', quiet: true }\n return api.update(_data).then(response => {\n commit('ITEM_DISABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_ENABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DISABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","export const analytics = {\n track: ['id']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/mfas', { params }).then(response => {\n return response.data\n })\n },\n listOptions: mfaType => {\n return apiCall.options(['config', 'mfas'], { params: { type: mfaType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/mfas/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/mfas', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'mfa', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'mfa', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'mfa', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'mfa', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'mfas' }),\n goToItem: params => $router\n .push({ name: 'mfa', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneMfa', params: { ...params, mfaType: params.type } }),\n goToNew: params => $router.push({ name: 'newMfa', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_mfas) {\n store.registerModule('$_mfas', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'mfas',\n name: 'mfas',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'mfas/new/:mfaType',\n name: 'newMfa',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, mfaType: route.params.mfaType }),\n beforeEnter\n },\n {\n path: 'mfa/:id',\n name: 'mfa',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_mfas/getMfa', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'mfa/:id/clone/:mfaType',\n name: 'cloneMfa',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, mfaType: route.params.mfaType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_mfas/getMfa', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_mfas\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_mfas/isLoading']),\n getList: () => $store.dispatch('$_mfas/all'),\n getListOptions: params => $store.dispatch('$_mfas/optionsByMfaType', params.mfaType),\n createItem: params => $store.dispatch('$_mfas/createMfa', params),\n getItem: params => $store.dispatch('$_mfas/getMfa', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_mfas/optionsById', params.id),\n updateItem: params => $store.dispatch('$_mfas/updateMfa', params),\n deleteItem: params => $store.dispatch('$_mfas/deleteMfa', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByMfaType: ({ commit }, mfaType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(mfaType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getMfa: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createMfa: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateMfa: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteMfa: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const types = {\n Akamai: i18n.t('Akamai'),\n TOTP: i18n.t('TOTP')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const analytics = {\n track: ['mfaType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/network_behavior_policies', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/network_behavior_policies').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/network_behavior_policies/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/network_behavior_policies', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'network_behavior_policy', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'network_behavior_policy', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'network_behavior_policy', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'network_behavior_policy', id])\n }\n}\n","import store from '@/store'\nimport FingerbankStoreModule from '../fingerbank/_store'\nimport NetworkBehaviorPolicyStoreModule from './_store'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'network_behavior_policies' }),\n goToItem: params => $router\n .push({ name: 'network_behavior_policy', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneNetworkBehaviorPolicy', params }),\n goToNew: params => $router.push({ name: 'newNetworkBehaviorPolicy', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_fingerbank)\n store.registerModule('$_fingerbank', FingerbankStoreModule)\n if (!store.state.$_network_behavior_policies)\n store.registerModule('$_network_behavior_policies', NetworkBehaviorPolicyStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'fingerbank/network_behavior_policies',\n name: 'network_behavior_policies',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'network_behavior_policies/new',\n name: 'newNetworkBehaviorPolicy',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'network_behavior_policy/:id',\n name: 'network_behavior_policy',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_network_behavior_policies/getNetworkBehaviorPolicy', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'network_behavior_policy/:id/clone',\n name: 'cloneNetworkBehaviorPolicy',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_network_behavior_policies/getNetworkBehaviorPolicy', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_network_behavior_policies\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_network_behavior_policies/isLoading']),\n getList: () => $store.dispatch('$_network_behavior_policies/all'),\n getListOptions: () => $store.dispatch('$_network_behavior_policies/options'),\n createItem: params => $store.dispatch('$_network_behavior_policies/createNetworkBehaviorPolicy', params),\n getItem: params => $store.dispatch('$_network_behavior_policies/getNetworkBehaviorPolicy', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_network_behavior_policies/options', params.id),\n updateItem: params => $store.dispatch('$_network_behavior_policies/updateNetworkBehaviorPolicy', params),\n deleteItem: params => $store.dispatch('$_network_behavior_policies/deleteNetworkBehaviorPolicy', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: '',\n policiesPromise: null\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: ({ state, commit }) => {\n const params = {\n sort: 'id',\n fields: ['id', 'description'].join(',')\n }\n if (!state.policiesPromise) {\n commit('ITEM_REQUEST')\n state.policiesPromise = api.list(params).then(response => {\n commit('ITEM_SUCCESS')\n return response.items\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n return state.policiesPromise\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getNetworkBehaviorPolicy: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createNetworkBehaviorPolicy: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateNetworkBehaviorPolicy: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n enableNetworkBehaviorPolicy: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const { id, quiet = false } = data\n const _data = { id, status: 'enabled', quiet }\n return api.update(_data).then(response => {\n commit('ITEM_ENABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n disableNetworkBehaviorPolicy: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const { id, quiet = false } = data\n const _data = { id, status: 'disabled', quiet }\n return api.update(_data).then(response => {\n commit('ITEM_DISABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteNetworkBehaviorPolicy: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_ENABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DISABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsNetworks')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: params => {\n const { prefixRouteName } = params\n return $router.push({ name: `${prefixRouteName}interfaces` })\n },\n goToItem: params => {\n let { prefixRouteName, id, vlan } = params\n if (id.indexOf('.') === -1 && vlan) // if `id` omits `vlan` and `vlan` is defined\n id += `.${vlan}` // append `vlan` to `id`\n return $router.push({ name: `${prefixRouteName}interface`, params: { id } })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e })\n },\n goToClone: params => {\n const { prefixRouteName } = params\n return $router.push({ name: `${prefixRouteName}cloneInterface`, params })\n }\n }\n}\n\nconst can = () => !store.getters['system/isSaas']\n\nexport default [\n {\n path: 'interfaces',\n name: 'interfaces',\n component: TheTabs,\n meta: {\n can\n },\n props: () => ({ tab: 'interfaces' })\n },\n {\n path: 'interface/:id',\n name: 'interface',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_interfaces/getInterface', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'interface/:id/clone',\n name: 'cloneInterface',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_interfaces/getInterface', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'interface/:id/new',\n name: 'newInterface',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id, isNew: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_interfaces/getInterface', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import apiCall from '@/utils/api'\n\nexport default {\n interfaces: params => {\n return apiCall.get('config/interfaces', { params }).then(response => {\n return response.data\n })\n },\n interface: id => {\n return apiCall.get(['config', 'interface', id]).then(response => {\n return response.data.item\n })\n },\n createInterface: data => {\n let sanitizedData = {}\n Object.keys(data).forEach(key => {\n if (typeof data[key] !== 'boolean') {\n sanitizedData[key] = data[key]\n }\n })\n return apiCall.post('config/interfaces', sanitizedData).then(response => {\n return response.data\n })\n },\n updateInterface: data => {\n return apiCall.patch(['config', 'interface', data.id], data).then(response => {\n return response.data\n })\n },\n downInterface: id => {\n return apiCall.postQuiet(['config', 'interface', id, 'down']).then(response => {\n return response.data\n })\n },\n upInterface: id => {\n return apiCall.postQuiet(['config', 'interface', id, 'up']).then(response => {\n return response.data\n })\n },\n deleteInterface: id => {\n return apiCall.delete(['config', 'interface', id])\n }\n}\n","/**\n* \"$_interfaces\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\nimport { columns as columnsInterface } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_interfaces/isLoading']),\n getList: () => $store.dispatch('$_interfaces/all'),\n createItem: params => $store.dispatch('$_interfaces/createInterface', params),\n getItem: params => $store.dispatch('$_interfaces/getInterface', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: item.master, not_deletable: false }\n : item\n }),\n updateItem: params => $store.dispatch('$_interfaces/updateInterface', params),\n deleteItem: params => $store.dispatch('$_interfaces/deleteInterface', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {},\n message: '',\n status: '',\n interfaces: []\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.status),\n isLoading: state => state.status === types.LOADING,\n cacheFlattened: state => Object.values(state.cache),\n interfaces: state => state.interfaces\n}\n\nconst actions = {\n all: ({ commit, getters }) => {\n const params = {\n sort: 'id',\n fields: columnsInterface.map(r => r.key).join(','),\n limit: 1000\n }\n commit('INTERFACE_REQUEST')\n return api.interfaces(params).then(response => {\n commit('INTERFACE_SUCCESS')\n commit('INTERFACES_REPLACED', response.items)\n response.items.forEach(item => {\n const { id } = item\n commit('INTERFACE_REPLACED', { ...item, id })\n })\n return getters.cacheFlattened\n }).catch((err) => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n getInterface: ({ state, commit }, id) => {\n commit('INTERFACE_REQUEST')\n return api.interface(id).then(item => {\n commit('INTERFACE_REPLACED', { ...item, id })\n return state.cache[id]\n }).catch((err) => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n createInterface: ({ commit }, data) => {\n commit('INTERFACE_REQUEST')\n return api.createInterface(data).then(response => {\n commit('INTERFACE_REPLACED', data)\n return response\n }).catch(err => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n updateInterface: ({ commit }, data) => {\n commit('INTERFACE_REQUEST')\n return api.updateInterface(data).then(response => {\n commit('INTERFACE_REPLACED', data)\n return response\n }).catch(err => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n downInterface: ({ commit, dispatch }, id) => {\n commit('INTERFACE_REQUEST')\n return api.downInterface(id).then(response => {\n commit('INTERFACE_DOWN', id)\n dispatch('all')\n return response\n }).catch((err) => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n upInterface: ({ commit, dispatch }, id) => {\n commit('INTERFACE_REQUEST')\n return api.upInterface(id).then(response => {\n commit('INTERFACE_UP', id)\n dispatch('all')\n return response\n }).catch((err) => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n },\n deleteInterface: ({ commit }, id) => {\n commit('INTERFACE_REQUEST')\n return api.deleteInterface(id).then(response => {\n commit('INTERFACE_DESTROYED', id)\n return response\n }).catch((err) => {\n commit('INTERFACE_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n INTERFACES_REPLACED: (state, interfaces) => {\n state.interfaces = interfaces\n },\n INTERFACE_REQUEST: (state, type) => {\n state.status = type || types.LOADING\n state.message = ''\n },\n INTERFACE_REPLACED: (state, data) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n const i = state.interfaces.findIndex(i => {\n return i.id == data.id\n })\n if (i >= 0) {\n Vue.set(state.interfaces[i], 'type', data.type)\n }\n },\n INTERFACE_DESTROYED: (state, id) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n INTERFACE_ERROR: (state, response) => {\n state.status = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n INTERFACE_SUCCESS: (state) => {\n state.status = types.SUCCESS\n },\n INTERFACE_DOWN: (state, id) => {\n state.status = types.SUCCESS\n if (!(id in state.cache))\n Vue.set(state.cache, id, {})\n Vue.set(state.cache[id], 'is_running', false)\n },\n INTERFACE_UP: (state, id) => {\n state.status = types.SUCCESS\n if (!(id in state.cache))\n Vue.set(state.cache, id, {})\n Vue.set(state.cache[id], 'is_running', true)\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\nimport network from '@/utils/network'\n\nexport const types = {\n none: i18n.t('None'),\n 'dhcp-listener': i18n.t('DHCP Listener'),\n 'dns-enforcement': i18n.t('DNS Enforcement'),\n inlinel2: i18n.t('Inline Layer 2'),\n management: i18n.t('Management'),\n portal: i18n.t('Portal'),\n 'vlan-isolation': i18n.t('Isolation'),\n 'vlan-registration': i18n.t('Registration'),\n other: i18n.t('Other')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const typeFormatter = value => {\n if (value === null || value === '')\n return null\n if (value in types)\n return types[value]\n return i18n.t('Unknown')\n}\n\nexport const daemons = {\n dhcp: 'dhcp',\n dns: 'dns',\n portal: 'portal',\n radius: 'radius',\n 'dhcp-listener': 'dhcp-listener'\n}\n\nexport const daemonOptions = Object.keys(daemons)\n .sort((a, b) => daemons[a].localeCompare(daemons[b]))\n .map(key => ({ value: key, text: daemons[key] }))\n\nexport const sortColumns = { // maintain hierarchical ordering (master => vlans)\n id: (itemA, itemB, sortDesc) => {\n const sortMod = (sortDesc) ? -1 : 1\n if (!itemA)\n return -1 * sortMod\n if (!itemB)\n return 1 * sortMod\n switch (true) {\n case (!!itemA.vlan && !itemB.vlan && itemA.master === itemB.id): // B is master of A\n return 1 * sortMod\n case (!itemA.vlan && !!itemB.vlan && itemA.id === itemB.master): // A is master of B\n return -1 * sortMod\n case (itemA.name === itemB.name):\n return parseInt(itemA.vlan) - parseInt(itemB.vlan)\n default:\n return itemA.id.localeCompare(itemB.id)\n }\n },\n ipaddress: (itemA, itemB, sortDesc, context = {}) => {\n const {\n interfaces\n } = context\n const id2ip = {} // map (name => ipaddress) of non-vlan interfaces\n interfaces.forEach(item => {\n if (!item.vlan && item.ipaddress) {\n id2ip[item.name] = item.ipaddress\n }\n })\n const sortMod = (sortDesc) ? -1 : 1\n switch (true) {\n case (!itemA.vlan && !itemB.vlan): // both are master\n return network.ipv4Sort(itemA.ipaddress, itemB.ipaddress)\n case (!!itemA.vlan && !!itemB.vlan): // both are VLAN\n if (itemA.master === itemB.master) { // both vlans, same master\n return network.ipv4Sort(itemA.ipaddress, itemB.ipaddress)\n } else { // both vlans, different master\n return network.ipv4Sort(id2ip[itemA.name], id2ip[itemB.name])\n }\n case (!!itemA.vlan && !itemB.vlan): // only A is VLAN\n if (itemA.master === itemB.id) { // B is master of A\n return 1 * sortMod\n } else {\n return network.ipv4Sort(id2ip[itemA.name], itemB.ipaddress)\n }\n case (!itemA.vlan && !!itemB.vlan): // only B is VLAN\n if (itemA.id === itemB.master) { // A is master of B\n return -1 * sortMod\n } else {\n return network.ipv4Sort(itemA.ipaddress, id2ip[itemB.name])\n }\n }\n },\n netmask: (itemA, itemB, sortDesc, context = {}) => {\n const {\n interfaces\n } = context\n const id2netmask = {} // map (name => netmask) of non-vlan interfaces\n interfaces.forEach(item => {\n if (!item.vlan && item.netmask) {\n id2netmask[item.name] = item.netmask\n }\n })\n const sortMod = (sortDesc) ? -1 : 1\n switch (true) {\n case (!itemA.vlan && !itemB.vlan): // both are master\n return network.ipv4Sort(itemA.netmask, itemB.netmask)\n case (!!itemA.vlan && !!itemB.vlan): // both are VLAN\n if (itemA.master === itemB.master) { // both vlans, same master\n return network.ipv4Sort(itemA.netmask, itemB.netmask)\n } else { // both vlans, different master\n return network.ipv4Sort(id2netmask[itemA.name], id2netmask[itemB.name])\n }\n case (!!itemA.vlan && !itemB.vlan): // only A is VLAN\n if (itemA.master === itemB.id) { // B is master of A\n return 1 * sortMod\n } else {\n return network.ipv4Sort(id2netmask[itemA.name], itemB.netmask)\n }\n case (!itemA.vlan && !!itemB.vlan): // only B is VLAN\n if (itemA.id === itemB.master) { // A is master of B\n return -1 * sortMod\n } else {\n return network.ipv4Sort(itemA.netmask, id2netmask[itemB.name])\n }\n }\n },\n network: (itemA, itemB, sortDesc, context = {}) => {\n const {\n interfaces\n } = context\n const id2network = {} // map (name => network) of non-vlan interfaces\n interfaces.forEach(item => {\n if (!item.vlan && item.network) {\n id2network[item.name] = item.network\n }\n })\n const sortMod = (sortDesc) ? -1 : 1\n switch (true) {\n case (!itemA.vlan && !itemB.vlan): // both are master\n return network.ipv4Sort(itemA.network, itemB.network)\n case (!!itemA.vlan && !!itemB.vlan): // both are VLAN\n if (itemA.master === itemB.master) { // both vlans, same master\n return network.ipv4Sort(itemA.network, itemB.network)\n } else { // both vlans, different master\n return network.ipv4Sort(id2network[itemA.name], id2network[itemB.name])\n }\n case (!!itemA.vlan && !itemB.vlan): // only A is VLAN\n if (itemA.master === itemB.id) { // B is master of A\n return 1 * sortMod\n } else {\n return network.ipv4Sort(id2network[itemA.name], itemB.network)\n }\n case (!itemA.vlan && !!itemB.vlan): // only B is VLAN\n if (itemA.id === itemB.master) { // A is master of B\n return -1 * sortMod\n } else {\n return network.ipv4Sort(itemA.network, id2network[itemB.name])\n }\n }\n }\n}\n\nexport const columns = [\n {\n key: 'is_running',\n label: 'Status', // i18n defer\n visible: true\n },\n {\n key: 'id',\n label: 'Logical Name', // i18n defer\n required: true,\n sortable: true,\n visible: true,\n sort: sortColumns.id\n },\n {\n key: 'ipaddress',\n label: 'IPv4 Address', // i18n defer\n sortable: true,\n visible: true,\n sort: sortColumns.ipaddress\n },\n {\n key: 'netmask',\n label: 'Netmask', // i18n defer\n sortable: true,\n visible: true,\n sort: sortColumns.netmask\n },\n {\n key: 'ipv6_address',\n label: 'IPv6 Address', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'ipv6_prefix',\n label: 'IPv6 Prefix', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'network',\n label: 'Default Network', // i18n defer\n sortable: true,\n visible: true,\n sort: sortColumns.network\n },\n {\n key: 'type',\n label: 'Type', // i18n defer\n visible: true,\n formatter: typeFormatter\n },\n {\n key: 'additional_listening_daemons',\n label: 'Daemons', // i18n defer\n visible: true,\n formatter: value => {\n if (value && value.constructor === Array && value.length > 0) {\n return value\n }\n return null // otherwise '[]' is displayed in cell\n }\n },\n {\n key: 'high_availability',\n label: 'High Availability', // i18n defer\n visible: true\n },\n {\n key: 'buttons',\n label: '',\n locked: true\n }\n]\n","import store from '@/store'\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'interfaces' }),\n goToItem: params => $router\n .push({ name: 'layer2_network', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n }\n}\n\nconst can = () => !store.getters['system/isSaas']\n\nexport default [\n {\n path: 'interfaces/layer2_network/:id',\n name: 'layer2_network',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_layer2_networks/getLayer2Network', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import apiCall from '@/utils/api'\n\nexport default {\n layer2Networks: params => {\n return apiCall.get('config/l2_networks', { params }).then(response => {\n return response.data\n })\n },\n layer2NetworksOptions: () => {\n return apiCall.options('config/l2_networks').then(response => {\n return response.data\n })\n },\n layer2Network: id => {\n return apiCall.get(['config', 'l2_network', id]).then(response => {\n return response.data.item\n })\n },\n layer2NetworkOptions: id => {\n return apiCall.options(['config', 'l2_network', id]).then(response => {\n return response.data\n })\n },\n updateLayer2Network: data => {\n return apiCall.patch(['config', 'l2_network', data.id], data).then(response => {\n return response.data\n })\n }\n}\n","/**\n* \"$_layer2_networks\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\nimport { columns as columnsLayer2Network } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_layer2_networks/isLoading']),\n getList: () => $store.dispatch('$_layer2_networks/all'),\n getListOptions: () => $store.dispatch('$_layer2_networks/options'),\n getItem: params => $store.dispatch('$_layer2_networks/getLayer2Network', params.id),\n getItemOptions: params => $store.dispatch('$_layer2_networks/options', params.id),\n updateItem: params => $store.dispatch('$_layer2_networks/updateLayer2Network', params),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {},\n message: '',\n status: '',\n layer2Networks: []\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.status),\n isLoading: state => state.status === types.LOADING,\n layer2Networks: state => state.layer2Networks\n}\n\nconst actions = {\n all: ({ commit }) => {\n const params = {\n sort: 'id',\n fields: columnsLayer2Network.map(r => r.key).join(','),\n limit: 1000\n }\n commit('LAYER2_NETWORK_REQUEST')\n return api.layer2Networks(params).then(response => {\n commit('LAYER2_NETWORK_SUCCESS')\n commit('LAYER2_NETWORKS_REPLACED', response.items)\n return response.items\n }).catch((err) => {\n commit('LAYER2_NETWORK_ERROR', err.response)\n throw err\n })\n },\n options: ({ commit }, id) => {\n commit('LAYER2_NETWORK_REQUEST')\n if (id) {\n return api.layer2NetworkOptions(id).then(response => {\n commit('LAYER2_NETWORK_SUCCESS')\n return response\n }).catch((err) => {\n commit('LAYER2_NETWORK_ERROR', err.response)\n throw err\n })\n } else {\n return api.layer2NetworksOptions().then(response => {\n commit('LAYER2_NETWORK_SUCCESS')\n return response\n }).catch((err) => {\n commit('LAYER2_NETWORK_ERROR', err.response)\n throw err\n })\n }\n },\n getLayer2Network: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('LAYER2_NETWORK_REQUEST')\n return api.layer2Network(id).then(item => {\n commit('LAYER2_NETWORK_REPLACED', { ...item, id })\n return state.cache[id]\n }).catch((err) => {\n commit('LAYER2_NETWORK_ERROR', err.response)\n throw err\n })\n },\n updateLayer2Network: ({ commit }, data) => {\n commit('LAYER2_NETWORK_REQUEST')\n return api.updateLayer2Network(data).then(response => {\n commit('LAYER2_NETWORK_REPLACED', data)\n return response\n }).catch(err => {\n commit('LAYER2_NETWORK_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n LAYER2_NETWORKS_REPLACED: (state, layer2Networks) => {\n state.layer2Networks = layer2Networks\n },\n LAYER2_NETWORK_REQUEST: (state, type) => {\n state.status = type || types.LOADING\n state.message = ''\n },\n LAYER2_NETWORK_REPLACED: (state, data) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n LAYER2_NETWORK_DESTROYED: (state, id) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n LAYER2_NETWORK_ERROR: (state, response) => {\n state.status = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n LAYER2_NETWORK_SUCCESS: (state) => {\n state.status = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\nimport { pfFieldType as fieldType } from '@/globals/pfField'\n\n// default options available to searchable chosen when query is empty\nexport const commonDevices = {\n 1: 'Windows OS',\n 2: 'Mac OS X or macOS',\n 5: 'Linux OS',\n 33450: 'iOS',\n 33453: 'Android OS',\n 33471: 'BlackBerry OS',\n 33507: 'Windows Phone OS',\n}\n\nexport const deviceAttributes = {\n dhcp_fingerprint: {\n value: 'dhcp_fingerprint',\n text: i18n.t('DHCP fingerprint'),\n types: [fieldType.INTEGER],\n defaultWeight: 10\n },\n dhcp_vendor: {\n value: 'dhcp_vendor',\n text: i18n.t('DHCP vendor'),\n types: [fieldType.INTEGER],\n defaultWeight: 10\n },\n hostname: {\n value: 'hostname',\n text: i18n.t('Hostname'),\n types: [fieldType.INTEGER],\n defaultWeight: 3\n },\n oui: {\n value: 'oui',\n text: i18n.t('OUI (MAC Vendor)'),\n types: [fieldType.INTEGER],\n defaultWeight: 3\n },\n destination_hosts: {\n value: 'destination_hosts',\n text: i18n.t('Destination hosts'),\n types: [fieldType.INTEGER],\n defaultWeight: 5\n },\n mdns_services: {\n value: 'mdns_services',\n text: i18n.t('mDNS services'),\n types: [fieldType.INTEGER],\n defaultWeight: 5\n },\n tcp_syn_signatures: {\n value: 'tcp_syn_signatures',\n text: i18n.t('TCP SYN signatures'),\n types: [fieldType.INTEGER],\n defaultWeight: 10\n },\n tcp_syn_ack_signatures: {\n value: 'tcp_syn_ack_signatures',\n text: i18n.t('TCP SYN ACK signatures'),\n types: [fieldType.INTEGER],\n defaultWeight: 10\n },\n upnp_server_strings: {\n value: 'upnp_server_strings',\n text: i18n.t('UPnP server strings'),\n types: [fieldType.INTEGER],\n defaultWeight: 5\n },\n upnp_user_agents: {\n value: 'upnp_user_agents',\n text: i18n.t('UPnP user-agent'),\n types: [fieldType.INTEGER],\n defaultWeight: 5\n },\n user_agents: {\n value: 'user_agents',\n text: i18n.t('HTTP user-agent'),\n types: [fieldType.INTEGER],\n defaultWeight: 5\n }\n}\n\nexport const columns = [\n {\n key: 'id',\n label: 'Network', // i18n defer\n sortable: true,\n visible: true,\n required: true\n },\n {\n key: 'description',\n label: 'Description', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'algorithm',\n label: 'Algorithm', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'pool_backend',\n label: 'Backend', // i18n defer\n sortable: true,\n visible: true,\n },\n {\n key: 'dhcp_start',\n label: 'Starting IP Address', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'dhcp_end',\n label: 'Ending IP Address', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'dhcp_default_lease_time',\n label: 'Default Lease Time', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'dhcp_max_lease_time',\n label: 'Max Lease Time', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'portal_fqdn',\n label: 'Portal FQDN', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'netflow_accounting_enabled',\n label: 'Netflow Accounting Enabled', // i18n defer\n sortable: true,\n visible: true\n }\n]\n","import apiCall from '@/utils/api'\n\nexport default {\n routedNetworks: params => {\n return apiCall.get('config/routed_networks', { params }).then(response => {\n return response.data\n })\n },\n routedNetworksOptions: () => {\n return apiCall.options('config/routed_networks').then(response => {\n return response.data\n })\n },\n routedNetwork: id => {\n return apiCall.get(['config', 'routed_network', id]).then(response => {\n return response.data.item\n })\n },\n routedNetworkOptions: id => {\n return apiCall.options(['config', 'routed_network', id]).then(response => {\n return response.data\n })\n },\n createRoutedNetwork: data => {\n return apiCall.post('config/routed_networks', data).then(response => {\n return response.data\n })\n },\n updateRoutedNetwork: data => {\n return apiCall.patch(['config', 'routed_network', data.id], data).then(response => {\n return response.data\n })\n },\n deleteRoutedNetwork: id => {\n return apiCall.delete(['config', 'routed_network', id])\n }\n}\n","import store from '@/store'\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'interfaces' }),\n goToItem: params => $router\n .push({ name: 'routed_network', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRoutedNetwork', params }),\n }\n}\n\nconst can = () => !store.getters['system/isSaas']\n\nexport default [\n {\n path: 'interfaces/routed_networks/new',\n name: 'newRoutedNetwork',\n component: TheView,\n meta: {\n can\n },\n props: () => ({ isNew: true })\n },\n {\n path: 'interfaces/routed_network/:id',\n name: 'routed_network',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_routed_networks/getRoutedNetwork', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'interfaces/routed_network/:id/clone',\n name: 'cloneRoutedNetwork',\n component: TheView,\n meta: {\n can\n },\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n store.dispatch('$_routed_networks/getRoutedNetwork', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_routed_networks\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\nimport { columns as columnsRoutedNetwork } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_routed_networks/isLoading']),\n getList: () => $store.dispatch('$_routed_networks/all'),\n getListOptions: () => $store.dispatch('$_routed_networks/options'),\n createItem: params => $store.dispatch('$_routed_networks/createRoutedNetwork', params),\n getItem: params => $store.dispatch('$_routed_networks/getRoutedNetwork', params.id),\n getItemOptions: params => $store.dispatch('$_routed_networks/options', params.id),\n updateItem: params => $store.dispatch('$_routed_networks/updateRoutedNetwork', params),\n deleteItem: params => $store.dispatch('$_routed_networks/deleteRoutedNetwork', params.id)\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {},\n message: '',\n status: '',\n routedNetworks: []\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.status),\n isLoading: state => state.status === types.LOADING,\n routedNetworks: state => state.routedNetworks\n}\n\nconst actions = {\n all: ({ commit }) => {\n const params = {\n sort: 'id',\n fields: columnsRoutedNetwork.map(r => r.key).join(','),\n limit: 1000\n }\n commit('ROUTED_NETWORK_REQUEST')\n return api.routedNetworks(params).then(response => {\n commit('ROUTED_NETWORK_SUCCESS')\n commit('ROUTED_NETWORKS_REPLACED', response.items)\n return response.items\n }).catch((err) => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n },\n options: ({ commit }, id) => {\n commit('ROUTED_NETWORK_REQUEST')\n if (id) {\n return api.routedNetworkOptions(id).then(response => {\n commit('ROUTED_NETWORK_SUCCESS')\n return response\n }).catch((err) => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n } else {\n return api.routedNetworksOptions().then(response => {\n commit('ROUTED_NETWORK_SUCCESS')\n return response\n }).catch((err) => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n }\n },\n getRoutedNetwork: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ROUTED_NETWORK_REQUEST')\n return api.routedNetwork(id).then(item => {\n commit('ROUTED_NETWORK_REPLACED', { ...item, id })\n return state.cache[id]\n }).catch((err) => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n },\n createRoutedNetwork: ({ commit }, data) => {\n commit('ROUTED_NETWORK_REQUEST')\n return api.createRoutedNetwork(data).then(response => {\n commit('ROUTED_NETWORK_REPLACED', data)\n return response\n }).catch(err => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n },\n updateRoutedNetwork: ({ commit }, data) => {\n commit('ROUTED_NETWORK_REQUEST')\n return api.updateRoutedNetwork(data).then(response => {\n commit('ROUTED_NETWORK_REPLACED', data)\n return response\n }).catch(err => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n },\n deleteRoutedNetwork: ({ commit }, id) => {\n commit('ROUTED_NETWORK_REQUEST')\n return api.deleteRoutedNetwork(id).then(response => {\n commit('ROUTED_NETWORK_DESTROYED', id)\n return response\n }).catch((err) => {\n commit('ROUTED_NETWORK_ERROR', err.response)\n throw err\n })\n }\n\n}\n\nconst mutations = {\n ROUTED_NETWORKS_REPLACED: (state, routedNetworks) => {\n state.routedNetworks = routedNetworks\n },\n ROUTED_NETWORK_REQUEST: (state, type) => {\n state.status = type || types.LOADING\n state.message = ''\n },\n ROUTED_NETWORK_REPLACED: (state, data) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n const i = state.routedNetworks.findIndex(i => {\n return i.id == data.id\n })\n if (i >= 0) {\n Vue.set(state.routedNetworks, i, data)\n }\n },\n ROUTED_NETWORK_DESTROYED: (state, id) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ROUTED_NETWORK_ERROR: (state, response) => {\n state.status = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ROUTED_NETWORK_SUCCESS: (state) => {\n state.status = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const routedNetworkList = [\n { value: 'dns-enforcement', text: i18n.t('DNS Enforcement') },\n { value: 'inlinel3', text: i18n.t('Inline Layer 3') },\n { value: 'vlan-isolation', text: i18n.t('Isolation') },\n { value: 'vlan-registration', text: i18n.t('Registration') },\n { value: 'other', text: i18n.t('Other Networks') }\n]\n\nexport const routedNetworkListFormatter = (value) => {\n if (value === null || value === '') return null\n return routedNetworkList.find(type => type.value === value).text\n}\n\nexport const columns = [\n {\n key: 'id',\n label: 'Network', // i18n defer\n sortable: true,\n visible: true,\n required: true\n },\n {\n key: 'netmask',\n label: 'Netmask', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'description',\n label: 'Description', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'type',\n label: 'Type', // i18n defer\n sortable: true,\n visible: true,\n formatter: routedNetworkListFormatter\n },\n {\n key: 'next_hop',\n label: 'Next Hop', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'gateway',\n label: 'Gateway', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'dns',\n label: 'DNS', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'dhcpd',\n label: 'DHCP', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'pool_backend',\n label: 'Backend', // i18n defer\n sortable: false,\n visible: true,\n },\n {\n key: 'netflow_accounting_enabled',\n label: 'Netflow Accounting Enabled', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'buttons',\n label: '',\n locked: true\n }\n]\n","/**\n* \"$_pkis\" store module\n*/\nimport { types } from '@/store'\n\nimport {\n state as stateCas,\n getters as gettersCas,\n actions as actionsCas,\n mutations as mutationsCas\n} from './cas/_store'\n\nimport {\n state as stateProfiles,\n getters as gettersProfiles,\n actions as actionsProfiles,\n mutations as mutationsProfiles\n} from './profiles/_store'\n\nimport {\n state as stateCerts,\n getters as gettersCerts,\n actions as actionsCerts,\n mutations as mutationsCerts\n} from './certs/_store'\n\nimport {\n state as stateRevokedCerts,\n getters as gettersRevokedCerts,\n actions as actionsRevokedCerts,\n mutations as mutationsRevokedCerts\n} from './revokedCerts/_store'\n\n// Default values\nconst state = () => {\n return {\n ...stateCas(),\n ...stateProfiles(),\n ...stateCerts(),\n ...stateRevokedCerts()\n }\n}\n\nconst getters = {\n ...gettersCas,\n ...gettersProfiles,\n ...gettersCerts,\n ...gettersRevokedCerts,\n\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.caStatus) || [types.LOADING, types.DELETING].includes(state.profileStatus) || [types.LOADING, types.DELETING].includes(state.certStatus) || [types.LOADING, types.DELETING].includes(state.revokedCertStatus),\n isLoading: state => state.caStatus === types.LOADING || state.profileStatus === types.LOADING || state.certStatus === types.LOADING || state.revokedCertStatus === types.LOADING\n}\n\nconst actions = {\n ...actionsCas,\n ...actionsProfiles,\n ...actionsCerts,\n ...actionsRevokedCerts\n}\n\nconst mutations = {\n ...mutationsCas,\n ...mutationsProfiles,\n ...mutationsCerts,\n ...mutationsRevokedCerts\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\nimport { recomposeGorm } from '../config'\n\nexport default {\n list: params => {\n return apiCall.getQuiet('pki/cas', { params }).then(response => {\n const { data: { items, ...rest } = {} } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n search: params => {\n return apiCall.postQuiet('pki/cas/search', params).then(response => {\n const { data: { items, ...rest } } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n create: data => {\n const { id, ...rest } = data // strip `id` from isClone\n return apiCall.post('pki/cas', rest).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n }\n })\n },\n item: id => {\n return apiCall.get(['pki', 'ca', id]).then(response => {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n })\n },\n resign: data => {\n const { id, ...rest } = data\n return apiCall.post(['pki', 'ca', 'resign', id], rest).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n }\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from '../_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsPkis')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nconst beforeEnter = (to, from, next = () => { }) => {\n if (!store.state.$_pkis)\n store.registerModule('$_pkis', StoreModule)\n store.dispatch('cluster/getServiceCluster', 'pfpki')\n .then(next)\n}\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'pkiCas' }),\n goToItem: params => $router\n .push({ name: 'pkiCa', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'clonePkiCa', params }),\n goToNew: params => $router.push({ name: 'newPkiCa', params })\n }\n}\n\nexport default [\n {\n path: 'pki/cas',\n name: 'pkiCas',\n component: TheTabs,\n props: () => ({ tab: 'pkiCas' }),\n beforeEnter\n },\n {\n path: 'pki/cas/new',\n name: 'newPkiCa',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'pki/ca/:id',\n name: 'pkiCa',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString() }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getCa', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'pki/ca/:id/clone',\n name: 'clonePkiCa',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString(), isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getCa', to.params.id).then(() => {\n next()\n })\n }\n }\n]","export const decomposeCa = (item) => {\n const { id, key_usage = null, extended_key_usage = null } = item\n return {\n ...item,\n id: `${id}`,\n key_usage: (!key_usage) ? [] : key_usage.split('|'),\n extended_key_usage: (!extended_key_usage) ? [] : extended_key_usage.split('|')\n }\n}\n\nexport const recomposeCa = (item) => {\n const { id, key_usage = [], extended_key_usage = [] } = item\n return {\n ...item,\n id: +id,\n key_usage: key_usage.join('|'),\n extended_key_usage: extended_key_usage.join('|')\n }\n}\n","import { computed } from '@vue/composition-api'\nimport store, { types } from '@/store'\nimport api from './_api'\nimport {\n decomposeCa,\n recomposeCa\n} from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_pkis/isCaLoading']),\n getList: () => $store.dispatch('$_pkis/allCas'),\n createItem: params => $store.dispatch('$_pkis/createCa', recomposeCa(params)),\n getItem: params => $store.dispatch('$_pkis/getCa', params.id)\n .then(item => decomposeCa(item)),\n updateItem: params => $store.dispatch('$_pkis/resignCa', recomposeCa(params)),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n caListCache: false, // ca list details\n caItemCache: {}, // ca item details\n caMessage: '',\n caStatus: ''\n }\n}\n\nexport const getters = {\n isCaWaiting: state => [types.LOADING, types.DELETING].includes(state.caStatus),\n isCaLoading: state => state.caStatus === types.LOADING,\n cas: state => state.caListCache\n}\n\nexport const actions = {\n allCas: ({ state, commit }) => {\n if (state.caListCache) {\n return Promise.resolve(state.caListCache)\n }\n commit('CA_REQUEST')\n return api.list().then(response => {\n commit('CA_LIST_REPLACED', response.items)\n return state.caListCache\n }).catch((err) => {\n commit('CA_ERROR', err.response)\n throw err\n })\n },\n getCa: ({ state, commit }, id) => {\n if (state.caItemCache[id]) {\n return Promise.resolve(state.caItemCache[id])\n }\n commit('CA_REQUEST')\n return api.item(id).then(item => {\n commit('CA_ITEM_REPLACED', item)\n return state.caItemCache[id]\n }).catch((err) => {\n commit('CA_ERROR', err.response)\n throw err\n })\n },\n createCa: ({ commit, dispatch }, data) => {\n commit('CA_REQUEST')\n return api.create(data).then(item => {\n // reset list\n commit('CA_LIST_RESET')\n dispatch('allCas')\n // update item\n commit('CA_ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('CA_ERROR', err.response)\n throw err\n })\n },\n resignCa: ({ commit, dispatch }, data) => {\n commit('CA_REQUEST')\n return api.resign(data).then(item => {\n // reset list\n commit('CA_LIST_RESET')\n dispatch('allCas')\n // update item\n commit('CA_ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('CA_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n CA_REQUEST: (state, type) => {\n state.caStatus = type || types.LOADING\n state.caMessage = ''\n },\n CA_LIST_RESET: (state) => {\n state.caListCache = false\n },\n CA_LIST_REPLACED: (state, items) => {\n state.caStatus = types.SUCCESS\n state.caListCache = items\n },\n CA_ITEM_REPLACED: (state, data) => {\n state.caStatus = types.SUCCESS\n state.caItemCache[data.id] = data\n store.dispatch('config/resetPkiCas')\n },\n CA_ERROR: (state, response) => {\n state.caStatus = types.ERROR\n if (response && response.data) {\n state.caMessage = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\nimport { recomposeGorm } from '../config'\n\nexport default {\n list: params => {\n return apiCall.getQuiet('pki/certs', { params }).then(response => {\n const { data: { items, ...rest } = {} } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n search: params => {\n return apiCall.postQuiet('pki/certs/search', params).then(response => {\n const { data: { items, ...rest } } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n create: data => {\n const { id, ...rest } = data // strip `id` from isClone\n return apiCall.post('pki/certs', rest).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n }\n })\n },\n download: data => {\n const { id, password } = data\n return apiCall.getArrayBuffer(['pki', 'cert', id, 'download', password]).then(response => {\n const { data, data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n return data\n }\n })\n },\n item: id => {\n return apiCall.get(['pki', 'cert', id]).then(response => {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n })\n },\n email: id => {\n return apiCall.get(['pki', 'cert', id, 'email']).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { password } = {} } = response\n return { password }\n }\n })\n },\n revoke: data => {\n return apiCall.delete(['pki', 'cert', data.id, data.reason]).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n return true\n }\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from '../_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsPkis')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nconst beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_pkis)\n store.registerModule('$_pkis', StoreModule)\n next()\n}\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'pkiCerts' }),\n goToItem: params => $router\n .push({ name: 'pkiCert', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'clonePkiCert', params }),\n goToNew: params => $router.push({ name: 'newPkiCert', params })\n }\n}\n\nexport default [\n {\n path: 'pki/certs',\n name: 'pkiCerts',\n component: TheTabs,\n props: () => ({ tab: 'pkiCerts' }),\n beforeEnter\n },\n {\n path: 'pki/profile/:profile_id/certs/new',\n name: 'newPkiCert',\n component: TheView,\n props: (route) => ({ profile_id: String(route.params.profile_id).toString(), isNew: true }),\n beforeEnter\n },\n {\n path: 'pki/cert/:id',\n name: 'pkiCert',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString() }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getCert', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'pki/cert/:id/clone',\n name: 'clonePkiCert',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString(), isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getCert', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import { computed } from '@vue/composition-api'\nimport store, { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_pkis/isCertLoading']),\n getList: () => $store.dispatch('$_pkis/allCerts'),\n createItem: params => $store.dispatch('$_pkis/createCert', params),\n getItem: params => $store.dispatch('$_pkis/getCert', params.id)\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n certListCache: false, // cert list details\n certItemCache: {}, // cert item details\n certMessage: '',\n certStatus: ''\n }\n}\n\nexport const getters = {\n isCertWaiting: state => [types.LOADING, types.DELETING].includes(state.certStatus),\n isCertLoading: state => state.certStatus === types.LOADING,\n certs: state => state.certListCache\n}\n\nexport const actions = {\n allCerts: ({ state, commit }) => {\n if (state.certListCache) {\n return Promise.resolve(state.certListCache)\n }\n commit('CERT_REQUEST')\n return api.list().then(response => {\n commit('CERT_LIST_REPLACED', response.items)\n return state.certListCache\n }).catch((err) => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n },\n getCert: ({ state, commit }, id) => {\n if (state.certItemCache[id]) {\n return Promise.resolve(state.certItemCache[id])\n }\n commit('CERT_REQUEST')\n return api.item(id).then(item => {\n commit('CERT_ITEM_REPLACED', item)\n return state.certItemCache[id]\n }).catch((err) => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n },\n downloadCert: ({ commit }, data) => {\n commit('CERT_REQUEST')\n return api.download(data).then(binary => {\n commit('CERT_SUCCESS')\n return binary\n }).catch(err => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n },\n createCert: ({ commit, dispatch }, data) => {\n commit('CERT_REQUEST')\n return api.create(data).then(item => {\n // reset list\n commit('CERT_LIST_RESET')\n dispatch('allCerts')\n // update item\n commit('CERT_ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n },\n emailCert: ({ commit }, id) => {\n commit('CERT_REQUEST')\n return api.email(id).then(response => {\n commit('CERT_SUCCESS')\n return response\n }).catch(err => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n },\n revokeCert: ({ commit, dispatch }, data) => {\n commit('CERT_REQUEST')\n return api.revoke(data).then(response => {\n // reset list(s)\n commit('CERT_LIST_RESET')\n dispatch('allCerts')\n commit('REVOKED_CERT_LIST_RESET')\n dispatch('allRevokedCerts')\n // update item\n commit('CERT_ITEM_REVOKED', data.id)\n return response\n }).catch(err => {\n commit('CERT_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n CERT_REQUEST: (state, type) => {\n state.certStatus = type || types.LOADING\n state.certMessage = ''\n },\n CERT_SUCCESS: (state) => {\n state.certStatus = types.SUCCESS\n state.certMessage = ''\n },\n CERT_LIST_RESET: (state) => {\n state.certListCache = false\n },\n CERT_LIST_REPLACED: (state, items) => {\n state.certStatus = types.SUCCESS\n state.certListCache = items\n },\n CERT_ITEM_REPLACED: (state, data) => {\n state.certStatus = types.SUCCESS\n state.certItemCache[data.id] = data\n store.dispatch('config/resetPkiCerts')\n },\n CERT_ITEM_EMAILED: (state) => {\n state.certStatus = types.SUCCESS\n },\n CERT_ITEM_REVOKED: (state) => {\n state.certStatus = types.SUCCESS\n store.dispatch('config/resetPkiCerts')\n },\n CERT_ERROR: (state, response) => {\n state.certStatus = types.ERROR\n if (response && response.data) {\n state.certMessage = response.data.message\n }\n }\n}\n","export const digests = [\n { value: '0', text: 'UnknownSignatureAlgorithm' },\n { value: '1', text: 'MD2WithRSA' },\n { value: '2', text: 'MD5WithRSA' },\n { value: '3', text: 'SHA1WithRSA' },\n { value: '4', text: 'SHA256WithRSA' },\n { value: '5', text: 'SHA384WithRSA' },\n { value: '6', text: 'SHA512WithRSA' },\n { value: '7', text: 'DSAWithSHA1' },\n { value: '8', text: 'DSAWithSHA256' },\n { value: '9', text: 'ECDSAWithSHA1' },\n { value: '10', text: 'ECDSAWithSHA256' },\n { value: '11', text: 'ECDSAWithSHA384' },\n { value: '12', text: 'ECDSAWithSHA512' },\n { value: '13', text: 'SHA256WithRSAPSS' },\n { value: '14', text: 'SHA384WithRSAPSS' },\n { value: '15', text: 'SHA512WithRSAPSS' },\n { value: '16', text: 'PureEd25519' }\n]\n\nexport const keyTypes = [\n { value: '0', text: 'KEY_ECDSA', sizes: [ '256', '384', '521' ] },\n { value: '1', text: 'KEY_RSA', sizes: [ '2048', '4096' ] },\n { value: '2', text: 'KEY_DSA', sizes: [ '1024', '2048', '3071' ] }\n]\n\nexport const keySizes = [...(new Set(\n keyTypes.reduce((sizes, type) => ([ ...sizes, ...type.sizes.map(size => +size) ]), [])\n ))]\n .sort((a, b) => (a > b))\n .map(size => ({ value: `${size}`, text: `${size}` }))\n\nexport const keyUsages = [\n { value: '1', text: 'DigitalSignature' },\n { value: '2', text: 'ContentCommitment' },\n { value: '4', text: 'KeyEncipherment' },\n { value: '8', text: 'DataEncipherment' },\n { value: '16', text: 'KeyAgreement' },\n { value: '32', text: 'CertSign' },\n { value: '64', text: 'CRLSign' },\n { value: '128', text: 'EncipherOnly' },\n { value: '256', text: 'DecipherOnly' }\n]\n\nexport const extendedKeyUsages = [\n { value: '0', text: 'Any' },\n { value: '1', text: 'ServerAuth' },\n { value: '2', text: 'ClientAuth' },\n { value: '3', text: 'CodeSigning' },\n { value: '4', text: 'EmailProtection' },\n { value: '5', text: 'IPSECEndSystem' },\n { value: '6', text: 'IPSECTunnel' },\n { value: '7', text: 'IPSECUser' },\n { value: '8', text: 'TimeStamping' },\n { value: '9', text: 'OCSPSigning' },\n { value: '10', text: 'MicrosoftServerGatedCrypto' },\n { value: '11', text: 'NetscapeServerGatedCrypto' },\n { value: '12', text: 'MicrosoftCommercialCodeSigning' },\n { value: '13', text: 'MicrosoftKernelCodeSigning' }\n]\n\nexport const revokeReasons = [\n { value: '0', text: 'Unspecified' },\n { value: '1', text: 'KeyCompromise' },\n { value: '2', text: 'CACompromise' },\n { value: '3', text: 'AffiliationChanged' },\n { value: '4', text: 'Superseded' },\n { value: '5', text: 'CessationOfOperation' },\n { value: '6', text: 'CertificateHold' },\n { value: '8', text: 'RemoveFromCRL' },\n { value: '9', text: 'PrivilegeWithdrawn' },\n { value: '10', text: 'AACompromise' }\n]\n\nexport const recomposeGorm = item => {\n // strip golang gorm decoration, ID => id\n const { ID, CreatedAt, DeletedAt, UpdatedAt, DB, Ctx, ...rest } = item\n return { id: `${ID}`, ...rest }\n}","import apiCall from '@/utils/api'\nimport { recomposeGorm } from '../config'\n\nexport default {\n list: params => {\n return apiCall.getQuiet('pki/profiles', { params }).then(response => {\n const { data: { items, ...rest } = {} } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n search: params => {\n return apiCall.postQuiet('pki/profiles/search', params).then(response => {\n const { data: { items, ...rest } } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n create: data => {\n const { id, ...rest } = data // strip `id` from isClone\n return apiCall.post('pki/profiles', rest).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n }\n })\n },\n item: id => {\n return apiCall.get(['pki', 'profile', id]).then(response => {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n })\n },\n update: data => {\n const { id, ...rest } = data\n return apiCall.patch(['pki', 'profile', id], rest).then(response => {\n const { data: { error } = {} } = response\n if (error) {\n throw error\n } else {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n }\n })\n },\n delete: id => {\n return apiCall.delete(['pki', 'profile', id])\n },\n signCsr: data => {\n const { id, csr } = data\n return apiCall.post(['pki', 'profile', id, 'sign_csr'], { csr }).then(response => {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from '../_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsPkis')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\nconst TheCsr = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheCsr')\n\nconst beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_pkis)\n store.registerModule('$_pkis', StoreModule)\n next()\n}\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'pkiProfiles' }),\n goToItem: params => $router\n .push({ name: 'pkiProfile', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'clonePkiProfile', params }),\n goToNew: params => $router.push({ name: 'newPkiProfile', params })\n }\n}\n\nexport default [\n {\n path: 'pki/profiles',\n name: 'pkiProfiles',\n component: TheTabs,\n props: () => ({ tab: 'pkiProfiles' }),\n beforeEnter\n },\n {\n path: 'pki/ca/:ca_id/profiles/new',\n name: 'newPkiProfile',\n component: TheView,\n props: (route) => ({ ca_id: String(route.params.ca_id).toString(), isNew: true }),\n beforeEnter\n },\n {\n path: 'pki/profile/:id',\n name: 'pkiProfile',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString() }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getProfile', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'pki/profile/:id/clone',\n name: 'clonePkiProfile',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString(), isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getProfile', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'pki/profile/:id/csr',\n name: 'csrPkiProfile',\n component: TheCsr,\n props: (route) => ({ id: String(route.params.id).toString() }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getProfile', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","export const decomposeProfile = (item) => {\n const { id, key_usage = null, extended_key_usage = null } = item\n const { DB, ...stripped } = item // remove excess `DB` column\n return {\n ...stripped,\n id: `${id}`,\n key_usage: (!key_usage) ? [] : key_usage.split('|'),\n extended_key_usage: (!extended_key_usage) ? [] : extended_key_usage.split('|')\n }\n}\n\nexport const recomposeProfile = (item) => {\n const { id, key_usage = [], extended_key_usage = [] } = item\n return {\n ...item,\n id: +id,\n key_usage: key_usage.join('|'),\n extended_key_usage: extended_key_usage.join('|')\n }\n}\n","import { computed } from '@vue/composition-api'\nimport store, { types } from '@/store'\nimport api from './_api'\nimport {\n decomposeProfile,\n recomposeProfile\n} from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_pkis/isProfileLoading']),\n getList: () => $store.dispatch('$_pkis/allProfiles'),\n createItem: params => $store.dispatch('$_pkis/createProfile', recomposeProfile(params)),\n getItem: params => $store.dispatch('$_pkis/getProfile', params.id)\n .then(item => decomposeProfile(item)),\n updateItem: params => $store.dispatch('$_pkis/updateProfile', recomposeProfile(params)),\n signCsr: params => $store.dispatch('$_pkis/signCsr', params),\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n profileListCache: false, // profile list details\n profileItemCache: {}, // profile item details\n profileMessage: '',\n profileStatus: '',\n }\n}\n\nexport const getters = {\n isProfileWaiting: state => [types.LOADING, types.DELETING].includes(state.profileStatus),\n isProfileLoading: state => state.profileStatus === types.LOADING,\n profiles: state => state.profileListCache\n}\n\nexport const actions = {\n allProfiles: ({ state, commit }) => {\n if (state.profileListCache) {\n return Promise.resolve(state.profileListCache)\n }\n commit('PROFILE_REQUEST')\n return api.list().then(response => {\n commit('PROFILE_LIST_REPLACED', response.items)\n return state.profileListCache\n }).catch((err) => {\n commit('PROFILE_ERROR', err.response)\n throw err\n })\n },\n getProfile: ({ state, commit }, id) => {\n if (state.profileItemCache[id]) {\n return Promise.resolve(state.profileItemCache[id])\n }\n commit('PROFILE_REQUEST')\n return api.item(id).then(item => {\n commit('PROFILE_ITEM_REPLACED', item)\n return state.profileItemCache[id]\n }).catch((err) => {\n commit('PROFILE_ERROR', err.response)\n throw err\n })\n },\n createProfile: ({ commit, dispatch }, data) => {\n commit('PROFILE_REQUEST')\n return api.create(data).then(item => {\n // reset list\n commit('PROFILE_LIST_RESET')\n dispatch('allProfiles')\n // update item\n commit('PROFILE_ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('PROFILE_ERROR', err.response)\n throw err\n })\n },\n updateProfile: ({ commit, dispatch }, data) => {\n commit('PROFILE_REQUEST')\n return api.update(data).then(item => {\n // reset list\n commit('PROFILE_LIST_RESET')\n dispatch('allProfiles')\n // update item\n commit('PROFILE_ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('PROFILE_ERROR', err.response)\n throw err\n })\n },\n signCsr: ({ commit, dispatch }, data) => {\n commit('PROFILE_REQUEST')\n return api.signCsr(data).then(item => {\n // reset list\n commit('PROFILE_LIST_RESET')\n dispatch('allProfiles')\n // update item\n commit('PROFILE_CSR_SIGNED', item)\n return item\n }).catch(err => {\n commit('PROFILE_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n PROFILE_REQUEST: (state, type) => {\n state.profileStatus = type || types.LOADING\n state.profileMessage = ''\n },\n PROFILE_LIST_RESET: (state) => {\n state.profileListCache = false\n },\n PROFILE_LIST_REPLACED: (state, items) => {\n state.profileStatus = types.SUCCESS\n state.profileListCache = items\n },\n PROFILE_ITEM_REPLACED: (state, data) => {\n state.profileStatus = types.SUCCESS\n state.profileItemCache[data.id] = data\n store.dispatch('config/resetPkiProfiles')\n },\n PROFILE_ERROR: (state, response) => {\n state.profileStatus = types.ERROR\n if (response && response.data) {\n state.profileMessage = response.data.message\n }\n },\n PROFILE_CSR_SIGNED: (state) => {\n state.profileStatus = types.SUCCESS\n }\n}\n","import apiCall from '@/utils/api'\nimport { recomposeGorm } from '../config'\n\nexport default {\n list: params => {\n return apiCall.getQuiet('pki/revokedcerts', { params }).then(response => {\n const { data: { items, ...rest } = {} } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n search: params => {\n return apiCall.postQuiet('pki/revokedcerts/search', params).then(response => {\n const { data: { items, ...rest } } = response\n return { items: (items || []).map(item => recomposeGorm(item)), ...rest }\n })\n },\n item: id => {\n return apiCall.get(['pki', 'revokedcert', id]).then(response => {\n const { data: { items: { 0: item = {} } = {} } = {} } = response\n return recomposeGorm(item)\n })\n }\n}\n","import store from '@/store'\nimport StoreModule from '../_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsPkis')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nconst beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_pkis)\n store.registerModule('$_pkis', StoreModule)\n next()\n}\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'pkiRevokedCerts' }),\n goToItem: params => $router\n .push({ name: 'pkiRevokedCert', params })\n }\n}\n\nexport default [\n {\n path: 'pki/revokedcerts',\n name: 'pkiRevokedCerts',\n component: TheTabs,\n props: () => ({ tab: 'pkiRevokedCerts' }),\n beforeEnter\n },\n {\n path: 'pki/revokedcert/:id',\n name: 'pkiRevokedCert',\n component: TheView,\n props: (route) => ({ id: String(route.params.id).toString() }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pkis/getRevokedCert', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","import { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_pkis/isRevokedCertLoading']),\n getList: () => $store.dispatch('$_pkis/allRevokedCerts'),\n getItem: params => $store.dispatch('$_pkis/getRevokedCert', params.id)\n }\n}\n\n// Default values\nexport const state = () => {\n return {\n revokedCertListCache: false, // revoked cert list details\n revokedCertItemCache: {}, // revoked cert item details\n revokedCertMessage: '',\n revokedCertStatus: ''\n }\n}\n\nexport const getters = {\n isRevokedCertWaiting: state => [types.LOADING, types.DELETING].includes(state.revokedCertStatus),\n isRevokedCertLoading: state => state.revokedCertStatus === types.LOADING,\n revokedCerts: state => state.revokedCertListCache\n}\n\nexport const actions = {\n allRevokedCerts: ({ state, commit }) => {\n if (state.revokedCertListCache) {\n return Promise.resolve(state.revokedCertListCache)\n }\n commit('REVOKED_CERT_REQUEST')\n return api.list().then(response => {\n commit('REVOKED_CERT_LIST_REPLACED', response.items)\n return state.revokedCertListCache\n }).catch((err) => {\n commit('REVOKED_CERT_ERROR', err.response)\n throw err\n })\n },\n getRevokedCert: ({ state, commit }, id) => {\n if (state.revokedCertItemCache[id]) {\n return Promise.resolve(state.revokedCertItemCache[id])\n }\n commit('REVOKED_CERT_REQUEST')\n return api.item(id).then(item => {\n commit('REVOKED_CERT_ITEM_REPLACED', item)\n return state.revokedCertItemCache[id]\n }).catch((err) => {\n commit('REVOKED_CERT_ERROR', err.response)\n throw err\n })\n }\n}\n\nexport const mutations = {\n REVOKED_CERT_REQUEST: (state, type) => {\n state.revokedCertStatus = type || types.LOADING\n state.revokedCertMessage = ''\n },\n REVOKED_CERT_LIST_RESET: (state) => {\n state.revokedCertListCache = false\n },\n REVOKED_CERT_LIST_REPLACED: (state, items) => {\n state.revokedCertStatus = types.SUCCESS\n state.revokedCertListCache = items\n },\n REVOKED_CERT_ITEM_REPLACED: (state, data) => {\n state.revokedCertStatus = types.SUCCESS\n state.revokedCertItemCache[data.id] = data\n },\n REVOKED_CERT_ERROR: (state, response) => {\n state.revokedCertStatus = types.ERROR\n if (response && response.data) {\n state.revokedCertMessage = response.data.message\n }\n }\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/pki_providers', { params }).then(response => {\n return response.data\n })\n },\n listOptions: providerType => {\n return apiCall.options(['config', 'pki_providers'], { params: { type: providerType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/pki_providers/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/pki_providers', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'pki_provider', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'pki_provider', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'pki_provider', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'pki_provider', id])\n }\n}\n","import store from '@/store'\nimport PkiProvidersStoreModule from './_store'\nimport PkisStoreModule from '../pki/_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'pki_providers' }),\n goToItem: params => $router\n .push({ name: 'pki_provider', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'clonePkiProvider', params: { ...params, providerType: params.type } }),\n goToNew: params => $router.push({ name: 'newPkiProvider', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_pki_providers)\n store.registerModule('$_pki_providers', PkiProvidersStoreModule)\n if (!store.state.$_pkis)\n store.registerModule('$_pkis', PkisStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'pki_providers',\n name: 'pki_providers',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'pki_providers/new/:providerType',\n name: 'newPkiProvider',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, providerType: route.params.providerType }),\n beforeEnter\n },\n {\n path: 'pki_provider/:id',\n name: 'pki_provider',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pki_providers/getPkiProvider', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'pki_provider/:id/clone/:providerType',\n name: 'clonePkiProvider',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, providerType: route.params.providerType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_pki_providers/getPkiProvider', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_sources\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport { fileUploadPaths } from '@/utils/api'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_pki_providers/isLoading']),\n getList: () => $store.dispatch('$_pki_providers/all'),\n getListOptions: params => $store.dispatch('$_pki_providers/optionsByProviderType', params.providerType),\n createItem: params => $store.dispatch('$_pki_providers/createPkiProvider', params),\n getItem: params => $store.dispatch('$_pki_providers/getPkiProvider', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_pki_providers/optionsById', params.id),\n updateItem: params => $store.dispatch('$_pki_providers/updatePkiProvider', params),\n deleteItem: params => $store.dispatch('$_pki_providers/deletePkiProvider', params.id)\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'description', 'class'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByProviderType: ({ commit }, providerType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(providerType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getPkiProvidersByType: (_, type) => {\n const params = {\n sort: 'id',\n fields: ['id', 'description', 'class'].join(','),\n type: type\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n getPkiProvider: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createPkiProvider: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', { ...data, ...fileUploadPaths(response) })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updatePkiProvider: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', { ...data, ...fileUploadPaths(response) })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deletePkiProvider: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const pkiProvidersTypes = {\n packetfence_local: i18n.t('Packetfence Local'),\n packetfence_pki: i18n.t('Packetfence PKI'),\n scep: i18n.t('SCEP PKI')\n}\n\nexport const pkiProvidersTypeOptions = Object.keys(pkiProvidersTypes)\n .sort((a, b) => pkiProvidersTypes[a].localeCompare(pkiProvidersTypes[b]))\n .map(key => ({ value: key, text: pkiProvidersTypes[key] }))\n\nexport const analytics = {\n track: ['providerType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/portal_modules', { params }).then(response => {\n return response.data\n })\n },\n listOptions: sourceType => {\n return apiCall.options(['config', 'portal_modules'], { params: { type: sourceType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/portal_modules/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/portal_modules', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'portal_module', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'portal_module', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'portal_module', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'portal_module', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheList = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheList')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'portal_modules' }),\n goToItem: params => $router\n .push({ name: 'portal_module', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'clonePortalModule', params: { ...params, moduleType: params.type } }),\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_portalmodules)\n store.registerModule('$_portalmodules', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'portal_modules',\n name: 'portal_modules',\n component: TheList,\n beforeEnter\n },\n {\n path: 'portal_modules/new/:moduleType',\n name: 'newPortalModule',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, moduleType: route.params.moduleType }),\n beforeEnter\n },\n {\n path: 'portal_module/:id',\n name: 'portal_module',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_portalmodules/getPortalModule', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'portal_module/:id/clone/:moduleType',\n name: 'clonePortalModule',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, moduleType: route.params.moduleType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_portalmodules/getPortalModule', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_portalmodules\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_portalmodules/isLoading']),\n getList: () => $store.dispatch('$_portalmodules/all'),\n getListOptions: params => $store.dispatch('$_portalmodules/optionsByModuleType', params.moduleType),\n createItem: params => $store.dispatch('$_portalmodules/createPortalModule', params),\n getItem: params => $store.dispatch('$_portalmodules/getPortalModule', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_portalmodules/optionsById', params.id),\n updateItem: params => $store.dispatch('$_portalmodules/updatePortalModule', params),\n deleteItem: params => $store.dispatch('$_portalmodules/deletePortalModule', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: '',\n coordinates: {}\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'description', 'class'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByModuleType: ({ commit }, moduleType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(moduleType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getPortalModule: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createPortalModule: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updatePortalModule: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deletePortalModule: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/**\n * See modules under html/pfappserver/lib/pfappserver/Form/Config/PortalModule/\n */\nimport i18n from '@/utils/locale'\nimport { pfSearchConditionType as conditionType } from '@/globals/pfSearch'\n\nconst colors = [\n // Colors for types under `Multiple`\n // https://www.colorbox.io/#steps=4#hue_start=223#hue_end=211#hue_curve=linear#sat_start=30#sat_end=30#sat_curve=linear#sat_rate=134#lum_start=48#lum_end=100#lum_curve=linear#lock_hex=\n ['#49577a', '#647ba7', '#7ea1d3', '#98caff'],\n // Colors for types under `Authentication`\n // https://www.colorbox.io/#steps=21#hue_start=359#hue_end=257#hue_curve=linear#sat_start=15#sat_end=85#sat_curve=linear#sat_rate=200#lum_start=100#lum_end=72#lum_curve=linear#lock_hex=\n ['#ffb3b4', '#fbb0b8', '#f8aebb', '#f4abbf', '#f1a9c2', '#eda6c5', '#eaa4c8', '#e69bc9', '#e271c0', '#df30b9', '#db00be', '#d800cd', '#cc00d4', '#b700d1', '#a300cd', '#8f00c9', '#7b00c6', '#6900c2', '#5600bf', '#4500bb', '#3400b8'],\n // Colors for types under `Other`\n // https://www.colorbox.io/#steps=16#hue_start=183#hue_end=70#hue_curve=linear#sat_start=83#sat_end=62#sat_curve=linear#sat_rate=134#lum_start=48#lum_end=100#lum_curve=linear#lock_hex=\n ['#00747a', '#008379', '#008c70', '#009564', '#009e56', '#00a746', '#00af34', '#04b822', '#07c110', '#1bca0b', '#38d310', '#57dc15', '#76e41a', '#97ed1f', '#b9f625', '#dcff2b']\n]\n\nexport const columns = [\n {\n key: 'id',\n label: 'Name', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'description',\n label: 'Description', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'type',\n label: 'Type', // i18n defer\n sortable: true,\n visible: true\n },\n {\n key: 'modules',\n label: 'Modules', // i18n defer\n sortable: true,\n visible: true\n }\n]\n\nexport const fields = [\n {\n value: 'id',\n text: 'Name',\n types: [conditionType.SUBSTRING]\n },\n {\n value: 'description',\n text: 'Description',\n types: [conditionType.SUBSTRING]\n },\n {\n value: 'type',\n text: 'Type',\n types: [conditionType.SUBSTRING]\n }\n]\n\nexport const moduleTypes = () => {\n let moduleTypes = [\n {\n name: i18n.t('Multiple'),\n types: [\n { type: 'Choice', name: i18n.t('Choice') },\n { type: 'Chained', name: i18n.t('Chained') }\n ]\n },\n {\n name: i18n.t('Authentication'),\n types: [\n { type: 'Authentication::Billing', name: i18n.t('Billing') },\n { type: 'Authentication::Blackhole', name: i18n.t('Blackhole') },\n { type: 'Authentication::Choice', name: i18n.t('Choice') },\n { type: 'Authentication::Email', name: i18n.t('Email') },\n { type: 'Authentication::Login', name: i18n.t('Login') },\n { type: 'Authentication::Null', name: i18n.t('Null') },\n { type: 'Authentication::Password', name: i18n.t('Password') },\n { type: 'Authentication::OAuth::Facebook', name: 'Facebook' },\n { type: 'Authentication::OAuth::Github', name: 'Github' },\n { type: 'Authentication::OAuth::Google', name: 'Google' },\n { type: 'Authentication::OAuth::LinkedIn', name: 'LinkedIn' },\n { type: 'Authentication::OAuth::OpenID', name: 'OpenID' },\n { type: 'Authentication::OAuth::WindowsLive', name: 'WindowsLive' },\n { type: 'Authentication::SAML', name: 'SAML' },\n { type: 'Authentication::SMS', name: i18n.t('SMS') },\n { type: 'Authentication::Sponsor', name: i18n.t('Sponsor') }\n ]\n },\n {\n name: i18n.t('Other'),\n types: [\n { type: 'FixedRole', name: i18n.t('Fixed Role') },\n { type: 'Message', name: i18n.t('Message') },\n { type: 'MFA', name: i18n.t('MFA') },\n { type: 'Provisioning', name: i18n.t('Provisioning') },\n { type: 'SelectRole', name: i18n.t('Select Role') },\n { type: 'SSL_Inspection', name: i18n.t('SSL Inspection') },\n { type: 'Survey', name: i18n.t('Survey') },\n { type: 'URL', name: i18n.t('URL') }\n ]\n }\n ]\n // Assign colors\n moduleTypes.forEach((group, i) => {\n group.types.forEach((item, j) => {\n item.color = colors[i][j]\n })\n })\n return moduleTypes\n}\n\nexport const moduleTypeName = (moduleType) => {\n let name = moduleType\n moduleTypes().find(group => {\n const module = group.types.find(groupType => groupType.type === moduleType)\n if (module) {\n name = module.name\n return group\n }\n })\n return name\n}\n\nexport const analytics = {\n track: ['moduleType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['config', 'provisionings'], { params }).then(response => {\n return response.data\n })\n },\n listOptions: provisioningType => {\n return apiCall.options(['config', 'provisionings'], { params: { type: provisioningType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/pki_providers/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/provisionings', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'provisioning', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'provisioning', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'provisioning', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'provisioning', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'provisionings' }),\n goToItem: params => $router\n .push({ name: 'provisioning', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneProvisioning', params: { ...params, provisioningType: params.type } }),\n goToNew: params => $router.push({ name: 'newProvisioning', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_provisionings) {\n store.registerModule('$_provisionings', StoreModule)\n }\n next()\n}\n\nexport default [\n {\n path: 'provisionings',\n name: 'provisionings',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'provisionings/new/:provisioningType',\n name: 'newProvisioning',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, provisioningType: route.params.provisioningType }),\n beforeEnter\n },\n {\n path: 'provisioning/:id',\n name: 'provisioning',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_provisionings/getProvisioning', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'provisioning/:id/clone/:provisioningType',\n name: 'cloneProvisioning',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, provisioningType: route.params.provisioningType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_provisionings/getProvisioning', to.params.id).then(() => {\n next()\n })\n }\n },\n]\n","/**\n* \"$_provisionings\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport { fileUploadPaths } from '@/utils/api'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_provisionings/isLoading']),\n getList: () => $store.dispatch('$_provisionings/all'),\n getListOptions: params => $store.dispatch('$_provisionings/optionsByProvisioningType', params.provisioningType),\n createItem: params => $store.dispatch('$_provisionings/createProvisioning', params),\n getItem: params => $store.dispatch('$_provisionings/getProvisioning', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_provisionings/optionsById', params.id),\n updateItem: params => $store.dispatch('$_provisionings/updateProvisioning', params),\n deleteItem: params => $store.dispatch('$_provisionings/deleteProvisioning', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'description', 'class'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByProvisioningType: ({ commit }, provisioningType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(provisioningType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getProvisioning: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createProvisioning: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', { ...data, ...fileUploadPaths(response) })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateProvisioning: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', { ...data, ...fileUploadPaths(response) })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteProvisioning: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const provisioningTypes = {\n accept: i18n.t('Accept'),\n airwatch: i18n.t('Airwatch'),\n android: i18n.t('Android'),\n deny: i18n.t('Deny'),\n dpsk: i18n.t('DPSK'),\n jamf: i18n.t('Jamf'),\n kandji: i18n.t('Kandji'),\n mobileconfig: i18n.t('Apple Devices'),\n mobileiron: i18n.t('Mobileiron'),\n sentinelone: i18n.t('SentinelOne'),\n windows: i18n.t('Windows'),\n intune: i18n.t('Microsoft Intune'),\n google_workspace_chromebook: i18n.t('Google Workspace Chromebook')\n}\n\nexport const provisioningTypeOptions = Object.keys(provisioningTypes)\n .sort((a, b) => provisioningTypes[a].localeCompare(provisioningTypes[b]))\n .map(key => ({ value: key, text: provisioningTypes[key] }))\n\nexport const analytics = {\n track: ['provisioningType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/radiusd/eap_profiles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/radiusd/eap_profiles').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/radiusd/eap_profiles/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/radiusd/eap_profiles', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'radiusd', 'eap_profile', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'radiusd', 'eap_profile', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'radiusd', 'eap_profile', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'radiusd', 'eap_profile', id])\n }\n}\n","import store from '@/store'\nimport RadiusEapStoreModule from './_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsRadius')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiusEaps' }),\n goToItem: params => $router\n .push({ name: 'radiusEap', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRadiusEap', params }),\n goToNew: () => $router.push({ name: 'newRadiusEap' })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_eap)\n store.registerModule('$_radius_eap', RadiusEapStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'radius/eap',\n name: 'radiusEaps',\n component: TheTabs,\n props: () => ({ tab: 'radiusEaps' }),\n beforeEnter\n },\n {\n path: 'radius/eap_new',\n name: 'newRadiusEap',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'radius/eap/:id',\n name: 'radiusEap',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_eap/getRadiusEap', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'radius/eap/:id/clone',\n name: 'cloneRadiusEap',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_eap/getRadiusEap', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_radius_eap\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_radius_eap/isLoading']),\n getList: () => $store.dispatch('$_radius_eap/all'),\n getListOptions: () => $store.dispatch('$_radius_eap/options'),\n createItem: params => $store.dispatch('$_radius_eap/createRadiusEap', params),\n getItem: params => $store.dispatch('$_radius_eap/getRadiusEap', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_radius_eap/options', params.id),\n updateItem: params => $store.dispatch('$_radius_eap/updateRadiusEap', params),\n deleteItem: params => $store.dispatch('$_radius_eap/deleteRadiusEap', params.id),\n }\n}\n\n// Default values\nconst state = {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRadiusEap: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRadiusEap: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusEap: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRadiusEap: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/radiusd/fast_profiles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/radiusd/fast_profiles').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/radiusd/fast_profiles/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/radiusd/fast_profiles', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'radiusd', 'fast_profile', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'radiusd', 'fast_profile', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'radiusd', 'fast_profile', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'radiusd', 'fast_profile', id])\n }\n}\n","import store from '@/store'\nimport RadiusFastStoreModule from './_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsRadius')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiusFasts' }),\n goToItem: params => $router\n .push({ name: 'radiusFast', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRadiusFast', params }),\n goToNew: params => $router.push({ name: 'newRadiusFast', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_fast)\n store.registerModule('$_radius_fast', RadiusFastStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'radius/fast',\n name: 'radiusFasts',\n component: TheTabs,\n props: () => ({ tab: 'radiusFasts' }),\n beforeEnter\n },\n {\n path: 'radius/fast_new',\n name: 'newRadiusFast',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'radius/fast/:id',\n name: 'radiusFast',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_fast/getRadiusFast', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'radius/fast/:id/clone',\n name: 'cloneRadiusFast',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_fast/getRadiusFast', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_radius_fast\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_radius_fast/isLoading']),\n getList: () => $store.dispatch('$_radius_fast/all'),\n getListOptions: () => $store.dispatch('$_radius_fast/options'),\n createItem: params => $store.dispatch('$_radius_fast/createRadiusFast', params),\n getItem: params => $store.dispatch('$_radius_fast/getRadiusFast', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_radius_fast/options', params.id),\n updateItem: params => $store.dispatch('$_radius_fast/updateRadiusFast', params),\n deleteItem: params => $store.dispatch('$_radius_fast/deleteRadiusFast', params.id),\n }\n}\n\n// Default values\nconst state = {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRadiusFast: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRadiusFast: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusFast: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRadiusFast: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/radiusd/ocsp_profiles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/radiusd/ocsp_profiles').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/radiusd/ocsp_profiles/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/radiusd/ocsp_profiles', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'radiusd', 'ocsp_profile', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'radiusd', 'ocsp_profile', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'radiusd', 'ocsp_profile', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'radiusd', 'ocsp_profile', id])\n }\n}\n","import store from '@/store'\nimport RadiusOcspStoreModule from './_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsRadius')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiusOcsps' }),\n goToItem: params => $router\n .push({ name: 'radiusOcsp', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRadiusOcsp', params }),\n goToNew: params => $router.push({ name: 'newRadiusOcsp', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_ocsp)\n store.registerModule('$_radius_ocsp', RadiusOcspStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'radius/ocsp',\n name: 'radiusOcsps',\n component: TheTabs,\n props: () => ({ tab: 'radiusOcsps' }),\n beforeEnter\n },\n {\n path: 'radius/ocsp_new',\n name: 'newRadiusOcsp',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'radius/ocsp/:id',\n name: 'radiusOcsp',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_ocsp/getRadiusOcsp', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'radius/ocsp/:id/clone',\n name: 'cloneRadiusOcsp',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_ocsp/getRadiusOcsp', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_radius_ocsp\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_radius_ocsp/isLoading']),\n getList: () => $store.dispatch('$_radius_ocsp/all'),\n getListOptions: () => $store.dispatch('$_radius_ocsp/options'),\n createItem: params => $store.dispatch('$_radius_ocsp/createRadiusOcsp', params),\n getItem: params => $store.dispatch('$_radius_ocsp/getRadiusOcsp', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_radius_ocsp/options', params.id),\n updateItem: params => $store.dispatch('$_radius_ocsp/updateRadiusOcsp', params),\n deleteItem: params => $store.dispatch('$_radius_ocsp/deleteRadiusOcsp', params.id),\n }\n}\n\n// Default values\nconst state = {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRadiusOcsp: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRadiusOcsp: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusOcsp: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRadiusOcsp: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/ssl_certificates', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/ssl_certificates').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/ssl_certificates/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/ssl_certificates', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'ssl_certificate', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'ssl_certificate', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'ssl_certificate', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'ssl_certificate', id])\n }\n}\n","import store from '@/store'\nimport RadiusSslStoreModule from './_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsRadius')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiusSsls' }),\n goToItem: params => $router\n .push({ name: 'radiusSsl', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRadiusSsl', params }),\n goToNew: params => $router.push({ name: 'newRadiusSsl', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_ssl)\n store.registerModule('$_radius_ssl', RadiusSslStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'radius/ssl',\n name: 'radiusSsls',\n component: TheTabs,\n props: () => ({ tab: 'radiusSsls' }),\n beforeEnter\n },\n {\n path: 'radius/ssl_new',\n name: 'newRadiusSsl',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'radius/ssl/:id',\n name: 'radiusSsl',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_ssl/getRadiusSsl', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'radius/ssl/:id/clone',\n name: 'cloneRadiusSsl',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_ssl/getRadiusSsl', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_radius_ssl\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_radius_ssl/isLoading']),\n getList: () => $store.dispatch('$_radius_ssl/all'),\n getListOptions: () => $store.dispatch('$_radius_ssl/options'),\n createItem: params => $store.dispatch('$_radius_ssl/createRadiusSsl', params),\n getItem: params => $store.dispatch('$_radius_ssl/getRadiusSsl', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_radius_ssl/options', params.id),\n updateItem: params => $store.dispatch('$_radius_ssl/updateRadiusSsl', params),\n deleteItem: params => $store.dispatch('$_radius_ssl/deleteRadiusSsl', params.id),\n }\n}\n\n// Default values\nconst state = {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRadiusSsl: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRadiusSsl: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusSsl: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRadiusSsl: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/radiusd/tls_profiles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/radiusd/tls_profiles').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/radiusd/tls_profiles/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/radiusd/tls_profiles', data).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'radiusd', 'tls_profile', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'radiusd', 'tls_profile', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'radiusd', 'tls_profile', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'radiusd', 'tls_profile', id])\n }\n}\n","import store from '@/store'\nimport RadiusTlsStoreModule from './_store'\n\nconst TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../../_components/TheTabsRadius')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'radiusTlss' }),\n goToItem: params => $router\n .push({ name: 'radiusTls', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRadiusTls', params }),\n goToNew: params => $router.push({ name: 'newRadiusTls', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_radius_tls)\n store.registerModule('$_radius_tls', RadiusTlsStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'radius/tls',\n name: 'radiusTlss',\n component: TheTabs,\n props: () => ({ tab: 'radiusTlss' }),\n beforeEnter\n },\n {\n path: 'radius/tls_new',\n name: 'newRadiusTls',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'radius/tls/:id',\n name: 'radiusTls',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_tls/getRadiusTls', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'radius/tls/:id/clone',\n name: 'cloneRadiusTls',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_radius_tls/getRadiusTls', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_radius_tls\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_radius_tls/isLoading']),\n getList: () => $store.dispatch('$_radius_tls/all'),\n getListOptions: () => $store.dispatch('$_radius_tls/options'),\n createItem: params => $store.dispatch('$_radius_tls/createRadiusTls', params),\n getItem: params => $store.dispatch('$_radius_tls/getRadiusTls', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_radius_tls/options', params.id),\n updateItem: params => $store.dispatch('$_radius_tls/updateRadiusTls', params),\n deleteItem: params => $store.dispatch('$_radius_tls/deleteRadiusTls', params.id),\n }\n}\n\n// Default values\nconst state = {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(',')\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRadiusTls: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRadiusTls: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRadiusTls: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRadiusTls: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/realms', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/realms').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/realms/search', data).then(response => {\n return response.data\n })\n },\n sortItems: items => {\n return apiCall.patch('config/realms/sort_items', items).then(response => {\n return response\n })\n },\n create: item => {\n return apiCall.post('config/realms', item).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'realm', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'realm', id]).then(response => {\n return response.data\n })\n },\n update: item => {\n return apiCall.patch(['config', 'realm', item.id], item).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'realm', id])\n }\n}\n","import store from '@/store'\nimport DomainsStoreModule from '../domains/_store'\nimport RealmsStoreModule from './_store'\n\nexport const TheTabs = () => import(/* webpackChunkName: \"Configuration\" */ '../_components/TheTabsDomains')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: params => $router.push({ name: 'realms', params }),\n goToItem: params => $router\n .push({ name: 'realm', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRealm', params }),\n goToNew: params => $router.push({ name: 'newRealm', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_domains)\n store.registerModule('$_domains', DomainsStoreModule)\n if (!store.state.$_realms)\n store.registerModule('$_realms', RealmsStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'realms',\n name: 'realms',\n component: TheTabs,\n props: () => ({ tab: 'realms' }),\n beforeEnter\n },\n {\n path: 'realms/new',\n name: 'newRealm',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'realm/:id',\n name: 'realm',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_realms/getRealm', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'realm/:id/clone',\n name: 'cloneRealm',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_realms/getRealm', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_realms\" store module\n*/\nimport Vue from 'vue'\nimport store, { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_realms/isLoading']),\n getList: params => $store.dispatch('$_realms/all', params),\n getListOptions: () => $store.dispatch('$_realms/options'),\n createItem: params => $store.dispatch('$_realms/createRealm', params),\n sortItems: params => $store.dispatch('$_realms/sortRealms', params.items),\n getItem: params => $store.dispatch('$_realms/getRealm', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_realms/options', params.id),\n updateItem: params => $store.dispatch('$_realms/updateRealm', params),\n deleteItem: params => $store.dispatch('$_realms/deleteRealm', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(','),\n limit: 1000\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n sortRealms: ({ commit }, items) => {\n commit('ITEM_REQUEST')\n return api.sortItems({ items }).then(response => {\n commit('ITEMS_RESORTED', items)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRealm: ({ state, commit }, id) => {\n if (state.cache && state.cache[id]) {\n return state.cache[id]\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return item\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRealm: ({ commit }, item) => {\n commit('ITEM_REQUEST')\n return api.create(item).then(response => {\n commit('ITEM_REPLACED', item)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRealm: ({ commit }, item) => {\n commit('ITEM_REQUEST')\n return api.update(item).then(response => {\n commit('ITEM_REPLACED', item)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRealm: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, item) => {\n const { id } = item\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, item)\n store.dispatch('config/resetRealms')\n },\n ITEMS_RESORTED: (state, items) => {\n state.itemStatus = types.SUCCESS\n let sorted = Object.values(state.cache).sort((a, b) => {\n return items.findIndex(i => i === a.id) - items.findIndex(i => i === b.id)\n })\n Vue.set(state, 'cache', sorted)\n store.dispatch('config/resetRealms')\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.delete(state.cache, id)\n store.dispatch('config/resetRealms')\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n },\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/roles', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/roles').then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['config', 'role', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'role', id]).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/roles', data).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'role', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'role', id])\n },\n reassign: data => {\n return apiCall.patch(['config', 'role', data.from, 'reassign'], { id: data.to })\n },\n search: data => {\n return apiCall.post('config/roles/search', data).then(response => {\n return response.data\n })\n }\n}\n","import store from '@/store'\nimport RolesStoreModule from './_store'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'roles' }),\n goToItem: params => $router\n .push({ name: 'role', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneRole', params }),\n goToNew: () => $router.push({ name: 'newRole' })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_roles)\n store.registerModule('$_roles', RolesStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'roles',\n name: 'roles',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'roles/new',\n name: 'newRole',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'role/:id',\n name: 'role',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_roles/getRole', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'role/:id/clone',\n name: 'cloneRole',\n component: TheView,\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_roles/getRole', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n\n","/**\n* \"$_roles\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_roles/isLoading']),\n getList: () => $store.dispatch('$_roles/all'),\n getListOptions: () => $store.dispatch('$_roles/options'),\n createItem: params => $store.dispatch('$_roles/createRole', params),\n getItem: params => $store.dispatch('$_roles/getRole', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_roles/options', params.id),\n updateItem: params => $store.dispatch('$_roles/updateRole', params),\n deleteItem: params => $store.dispatch('$_roles/deleteRole', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING, types.REASSIGNING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id'].join(','),\n limit: 1000\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getRole: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createRole: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n commit('config/ROLES_UPDATED', false, { root: true })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateRole: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n commit('config/ROLES_UPDATED', false, { root: true })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteRole: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n commit('config/ROLES_UPDATED', false, { root: true })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n reassignRole: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.REASSIGNING)\n return api.reassign(data).then(response => {\n commit('ITEM_DESTROYED', data.from)\n commit('config/ROLES_UPDATED', false, { root: true })\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nimport i18n from '@/utils/locale'\nimport yup from '@/utils/yup'\n\nyup.addMethod(yup.string, 'roleNameOrCategoryIdentifierExists', function (message) {\n return this.test({\n name: 'roleCategoryIdentifierExists',\n message: message || i18n.t('Role does not exist.'),\n test: (value) => {\n if (!value) return true\n return store.dispatch('config/getRoles').then(response => {\n return (/^\\d+$/.test(value)) // is numeric?\n ? response.filter(role => role.category_id === value).length > 0\n : response.filter(role => role.name.toLowerCase() === value.toLowerCase()).length > 0\n }).catch(() => {\n return true\n })\n }\n })\n})\n\nyup.addMethod(yup.string, 'roleNameNotExistsExcept', function (exceptName = '', message) {\n return this.test({\n name: 'roleNameNotExistsExcept',\n message: message || i18n.t('Name exists.'),\n test: (value) => {\n if (!value || value.toLowerCase() === exceptName.toLowerCase()) return true\n return store.dispatch('config/getRoles').then(response => {\n return response.filter(role => role.name.toLowerCase() === value.toLowerCase()).length === 0\n }).catch(() => {\n return true\n })\n }\n })\n})\n\nyup.addMethod(yup.string, 'parentIsNotIdentifier', function (id = '', message) {\n return this.test({\n name: 'parentIsNotIdentifier',\n message: message || i18n.t('Invalid parent, must not be self.'),\n test: (value) => (!value || value.toLowerCase() !== id.toLowerCase())\n })\n})\n\nexport default (props) => {\n const {\n id,\n isNew,\n isClone\n } = props\n\n return yup.object().shape({\n id: yup.string()\n .nullable()\n .required(i18n.t('Name required.'))\n .roleNameNotExistsExcept((!isNew && !isClone) ? id : undefined, i18n.t('Name exists.')),\n notes: yup.string().nullable(),\n max_nodes_per_pid: yup.string().nullable(),\n parent: yup.string().nullable()\n .parentIsNotIdentifier(id)\n })\n}\n\nexport { yup }\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get(['config', 'scans'], { params }).then(response => {\n return response.data\n })\n },\n listOptions: scanType => {\n return apiCall.options(['config', 'scans'], { params: { type: scanType } }).then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/scans/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/scans', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'scan', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'scan', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n return apiCall.patch(['config', 'scan', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'scan', id])\n }\n}\n","import store from '@/store'\nimport StoreModule from './_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'scanEngines' }),\n goToItem: params => $router\n .push({ name: 'scanEngine', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneScanEngine', params: { ...params, scanType: params.type } }),\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_scans)\n store.registerModule('$_scans', StoreModule)\n next()\n}\n\nexport default [\n {\n path: 'scan_engines',\n name: 'scanEngines',\n component: TheSearch,\n props: () => ({ tab: 'scan_engines' }),\n beforeEnter\n },\n {\n path: 'scan_engines/new/:scanType',\n name: 'newScanEngine',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ isNew: true, scanType: route.params.scanType }),\n beforeEnter\n },\n {\n path: 'scan_engine/:id',\n name: 'scanEngine',\n component: TheView,\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_scans/getScanEngine', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'scan_engine/:id/clone/:scanType',\n name: 'cloneScanEngine',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, scanType: route.params.scanType, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_scans/getScanEngine', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_scans\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport { types } from '@/store'\nimport i18n from '@/utils/locale'\nimport api from './_api'\nimport { analytics } from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_scans/isLoading']),\n getList: () => $store.dispatch('$_scans/all'),\n getListOptions: params => $store.dispatch('$_scans/optionsByScanType', params.scanType),\n createItem: params => $store.dispatch('$_scans/createScanEngine', params),\n getItem: params => $store.dispatch('$_scans/getScanEngine', params.id).then(item => {\n return (params.isClone)\n ? { ...item, id: `${item.id}-${i18n.t('copy')}`, not_deletable: false }\n : item\n }),\n getItemOptions: params => $store.dispatch('$_scans/optionsById', params.id),\n updateItem: params => $store.dispatch('$_scans/updateScanEngine', params),\n deleteItem: params => $store.dispatch('$_scans/deleteScanEngine', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n optionsById: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n optionsByScanType: ({ commit }, scanType) => {\n commit('ITEM_REQUEST')\n return api.listOptions(scanType).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n getScanEngine: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createScanEngine: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateScanEngine: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteScanEngine: ({ commit }, id) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(id).then(response => {\n commit('ITEM_DESTROYED', id)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, JSON.parse(JSON.stringify(data)))\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import i18n from '@/utils/locale'\n\nexport const types = {\n nessus: i18n.t('Nessus'),\n nessus6: i18n.t('Nessus 6'),\n openvas: i18n.t('OpenVAS'),\n rapid7: i18n.t('Rapid7')\n}\n\nexport const typeOptions = Object.keys(types)\n .sort((a, b) => types[a].localeCompare(types[b]))\n .map(key => ({ value: key, text: types[key] }))\n\nexport const analytics = {\n track: ['scanType']\n}\n","import apiCall from '@/utils/api'\n\nexport default {\n list: params => {\n return apiCall.get('config/security_events', { params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('config/security_events').then(response => {\n return response.data\n })\n },\n search: data => {\n return apiCall.post('config/security_events/search', data).then(response => {\n return response.data\n })\n },\n create: data => {\n return apiCall.post('config/security_events', data).then(response => {\n return response.data\n })\n },\n\n item: id => {\n return apiCall.get(['config', 'security_event', id]).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['config', 'security_event', id]).then(response => {\n return response.data\n })\n },\n update: data => {\n const patch = data.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['config', 'security_event', data.id], data).then(response => {\n return response.data\n })\n },\n delete: id => {\n return apiCall.delete(['config', 'security_event', id])\n }\n}\n","import store from '@/store'\nimport SecurityEventsStoreModule from './_store'\nimport ConnectionProfilesStoreModule from '../connectionProfiles/_store'\nimport NetworkBehaviorPoliciesStoreModule from '../networkBehaviorPolicy/_store'\nimport { analytics } from './config'\n\nconst TheSearch = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheSearch')\nconst TheView = () => import(/* webpackChunkName: \"Configuration\" */ './_components/TheView')\n\nexport const useRouter = $router => {\n return {\n goToCollection: () => $router.push({ name: 'security_events' }),\n goToItem: params => $router\n .push({ name: 'security_event', params })\n .catch(e => { if (e.name !== \"NavigationDuplicated\") throw e }),\n goToClone: params => $router.push({ name: 'cloneSecurityEvent', params }),\n goToNew: params => $router.push({ name: 'newSecurityEvent', params })\n }\n}\n\nexport const beforeEnter = (to, from, next = () => {}) => {\n if (!store.state.$_security_events)\n store.registerModule('$_security_events', SecurityEventsStoreModule)\n if (!store.state.$_connection_profiles)\n store.registerModule('$_connection_profiles', ConnectionProfilesStoreModule)\n if (!store.state.$_network_behavior_policies)\n store.registerModule('$_network_behavior_policies', NetworkBehaviorPoliciesStoreModule)\n next()\n}\n\nexport default [\n {\n path: 'security_events',\n name: 'security_events',\n component: TheSearch,\n beforeEnter\n },\n {\n path: 'security_events/new',\n name: 'newSecurityEvent',\n component: TheView,\n props: () => ({ isNew: true }),\n beforeEnter\n },\n {\n path: 'security_event/:id',\n name: 'security_event',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_security_events/getSecurityEvent', to.params.id).then(() => {\n next()\n })\n }\n },\n {\n path: 'security_event/:id/clone',\n name: 'cloneSecurityEvent',\n component: TheView,\n meta: {\n ...analytics\n },\n props: (route) => ({ id: route.params.id, isClone: true }),\n beforeEnter: (to, from, next) => {\n beforeEnter()\n store.dispatch('$_security_events/getSecurityEvent', to.params.id).then(() => {\n next()\n })\n }\n }\n]\n","/**\n* \"$_security_events\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport api from './_api'\nimport {\n analytics,\n decomposeTriggers,\n recomposeTriggers\n} from './config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_security_events/isLoading']),\n getList: () => $store.dispatch('$_security_events/all'),\n getListOptions: () => $store.dispatch('$_security_events/options'),\n createItem: params => $store.dispatch('$_security_events/createSecurityEvent', params),\n getItem: params => $store.dispatch('$_security_events/getSecurityEvent', params.id).then(item => {\n if (params.isNew || params.isClone) {\n delete item.id // pop id to promote meta defaults, fixes #6722\n }\n return item\n }),\n getItemOptions: params => $store.dispatch('$_security_events/options', params.id),\n updateItem: params => $store.dispatch('$_security_events/updateSecurityEvent', params),\n deleteItem: params => $store.dispatch('$_security_events/deleteSecurityEvent', params.id),\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // items details\n message: '',\n itemStatus: ''\n }\n}\n\nconst getters = {\n isWaiting: state => [types.LOADING, types.DELETING].includes(state.itemStatus),\n isLoading: state => state.itemStatus === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: 'id',\n fields: ['id', 'desc', 'priority'].join(','),\n limit: 100\n }\n return api.list(params).then(response => {\n return response.items\n .filter(item => item.desc)\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getSecurityEvent: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id]).then(cache => JSON.parse(JSON.stringify(cache)))\n }\n commit('ITEM_REQUEST')\n return api.item(id).then(item => {\n commit('ITEM_REPLACED', item)\n return JSON.parse(JSON.stringify(item))\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n createSecurityEvent: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n if ('triggers' in data) { // recompose security event triggers\n data = JSON.parse(JSON.stringify(data)) // dereference\n data.triggers = recomposeTriggers(data.triggers)\n }\n return api.create(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n updateSecurityEvent: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n if ('triggers' in data) { // recompose security event triggers\n data = JSON.parse(JSON.stringify(data)) // dereference\n data.triggers = recomposeTriggers(data.triggers)\n }\n return api.update(data).then(response => {\n commit('ITEM_REPLACED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n enableSecurityEvent: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const { id, quiet = false } = data\n const _data = { id, enabled: 'Y', quiet }\n return api.update(_data).then(response => {\n commit('ITEM_ENABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n disableSecurityEvent: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n const { id, quiet = false } = data\n const _data = { id, enabled: 'N', quiet }\n return api.update(_data).then(response => {\n commit('ITEM_DISABLED', _data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n },\n deleteSecurityEvent: ({ commit }, data) => {\n commit('ITEM_REQUEST', types.DELETING)\n return api.delete(data).then(response => {\n commit('ITEM_DESTROYED', data)\n return response\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state, type) => {\n state.itemStatus = type || types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n let dataCopy = JSON.parse(JSON.stringify(data))\n if ('triggers' in dataCopy) { // decompose security event triggers\n dataCopy.triggers = decomposeTriggers(dataCopy.triggers)\n }\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, data.id, dataCopy)\n },\n ITEM_ENABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n if (data.id in state.cache) {\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n }\n },\n ITEM_DISABLED: (state, data) => {\n state.itemStatus = types.SUCCESS\n if (data.id in state.cache) {\n Vue.set(state.cache, data.id, { ...state.cache[data.id], ...data })\n }\n },\n ITEM_DESTROYED: (state, id) => {\n state.itemStatus = types.SUCCESS\n Vue.set(state.cache, id, null)\n },\n ITEM_ERROR: (state, response) => {\n state.itemStatus = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n ITEM_SUCCESS: (state) => {\n state.itemStatus = types.SUCCESS\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import { pfFieldType as fieldType } from '@/globals/pfField'\nimport bytes from '@/utils/bytes'\nimport i18n from '@/utils/locale'\n\nexport const triggerCategories = {\n ENDPOINT: 'endpoint',\n PROFILING: 'profiling',\n USAGE: 'usage',\n EVENT: 'event'\n}\n\nexport const triggerCategoryTitles = {\n [triggerCategories.ENDPOINT]: i18n.t('Endpoint'),\n [triggerCategories.PROFILING]: i18n.t('Device Profiling'),\n [triggerCategories.USAGE]: i18n.t('Usage'),\n [triggerCategories.EVENT]: i18n.t('Event')\n}\n\nexport const triggerFields = {\n accounting: {\n text: i18n.t('Accounting'),\n category: triggerCategories.USAGE\n },\n custom: {\n text: i18n.t('Custom'),\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n detect: {\n text: i18n.t('Detect'),\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n device: {\n text: i18n.t('Device'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n device_is_not: {\n text: i18n.t('Device is not'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n dhcp_fingerprint: {\n text: i18n.t('DHCP Fingerprint'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n dhcp_vendor: {\n text: i18n.t('DHCP Vendor'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n dhcp6_fingerprint: {\n text: i18n.t('DHCPv6 Fingerprint'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n dhcp6_enterprise: {\n text: i18n.t('DHCPv6 Enterprise'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n internal: {\n text: i18n.t('Internal'),\n category: triggerCategories.EVENT,\n types: [fieldType.OPTIONS]\n },\n mac: {\n text: i18n.t('MAC Address'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.SUBSTRING]\n },\n mac_vendor: {\n text: i18n.t('MAC Vendor'),\n category: triggerCategories.PROFILING,\n types: [fieldType.OPTIONS]\n },\n nessus: {\n text: 'Nessus',\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n nessus6: {\n text: 'Nessus v6',\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n nexpose_event_contains: {\n text: i18n.t('Nexpose event contains ..'),\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n nexpose_event_starts_with: {\n text: i18n.t('Nexpose event starts with ..'),\n category: triggerCategories.EVENT,\n types: [fieldType.OPTIONS]\n },\n openvas: {\n text: 'OpenVAS',\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n provisioner: {\n text: i18n.t('Provisioner'),\n category: triggerCategories.EVENT,\n types: [fieldType.OPTIONS]\n },\n role: {\n text: i18n.t('Role'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.OPTIONS]\n },\n vlan: {\n text: i18n.t('VLAN'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.SUBSTRING]\n },\n network: {\n text: i18n.t('Network'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.SUBSTRING]\n },\n suricata_event: {\n text: i18n.t('Suricata Event'),\n category: triggerCategories.EVENT,\n types: [fieldType.OPTIONS]\n },\n suricata_md5: {\n text: 'Suricata MD5',\n category: triggerCategories.EVENT,\n types: [fieldType.SUBSTRING]\n },\n switch: {\n text: i18n.t('Switch'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.OPTIONS]\n },\n switch_group: {\n text: i18n.t('Switch Group'),\n category: triggerCategories.ENDPOINT,\n types: [fieldType.OPTIONS]\n }\n}\n\nexport const triggerDirections = {\n TOT: i18n.t('Total'),\n IN: i18n.t('Inbound'),\n OUT: i18n.t('Outbound')\n}\nexport const triggerDirectionOptions = Object.keys(triggerDirections).map(key => ({ value: key, text: triggerDirections[key] }))\n\nexport const triggerIntervals = {\n D: i18n.t('Day'),\n W: i18n.t('Week'),\n M: i18n.t('Month'),\n Y: i18n.t('Year')\n}\nexport const triggerIntervalOptions = Object.keys(triggerIntervals).map(key => ({ value: key, text: triggerIntervals[key] }))\n\nexport const triggerTypes = {\n bandwidth: i18n.t('Bandwidth Limit'),\n BandwidthExpired: i18n.t('Bandwidth balance has expired'),\n TimeExpired: i18n.t('Time balance has expired')\n}\nexport const triggerTypeOptions = Object.keys(triggerTypes).map(key => ({ value: key, text: triggerTypes[key] }))\n\nexport const decomposeTriggers = (triggers) => {\n return (triggers || []).map(trigger => {\n let decomposed = { endpoint: { conditions: [] }, profiling: { conditions: [] }, usage: {}, event: {} }\n for (let type in trigger) {\n const { [type]: value } = trigger\n if (value && value.length) {\n if (type in triggerFields) {\n let { [type]: { category } = {} } = triggerFields\n if ('conditions' in decomposed[category])\n decomposed[category].conditions.push({ type, value }) // 'endpoint' or 'profiling'\n else\n decomposed[category] = { typeValue: { type, value } } // 'usage' or 'event'\n if (category === triggerCategories.USAGE) {\n if (value === 'BandwidthExpired' || value === 'TimeExpired')\n decomposed[category].type = value\n else {\n // Try to decompose data usage\n const { groups = null } = value.match(/(?{mac}
does not exist.', to.params) })\n next({ name: 'nodeSearch' })\n })\n },\n meta: {\n can: 'read nodes'\n }\n }\n ]\n}\n\nexport default route\n","/**\n* \"$_nodes\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport api from '../_api'\nimport store from '@/store'\nimport i18n from '@/utils/locale'\nimport {\n normalizeMac,\n recomposeNode\n} from '../_config/'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_nodes/isLoading']),\n sortedSecurityEvents: computed(() => $store.getters['config/sortedSecurityEvents']),\n reloadItem: params => $store.dispatch('$_nodes/refreshNode', params.id),\n deleteItem: params => $store.dispatch('$_nodes/deleteNode', params.id),\n getItem: params => $store.dispatch('$_nodes/getNode', normalizeMac(params.id)),\n createItem: params => $store.dispatch('$_nodes/createNode', recomposeNode(params)),\n updateItem: params => $store.dispatch('$_nodes/updateNode', recomposeNode(params)),\n reevaluateAccess: params => $store.dispatch('$_nodes/reevaluateAccessNode', params.id),\n refreshFingerbank: params => $store.dispatch('$_nodes/refreshFingerbankNode', params.id),\n restartSwitchport: params => $store.dispatch('$_nodes/restartSwitchportNode', params.id),\n applySecurityEvent: params => $store.dispatch('$_nodes/applySecurityEventNode', params)\n }\n}\n\n// Default values\nconst state = () => {\n return {\n nodes: {}, // nodes details\n nodeExists: {}, // node exists true|false\n nodePerDeviceClass: [],\n message: '',\n nodeStatus: ''\n }\n}\n\nconst getters = {\n isLoading: state => state.nodeStatus === 'loading',\n perDeviceClass: state => state.nodePerDeviceClass.reduce((assoc, item) => {\n return { ...assoc, [item.device_class]: item.count }\n }, {}),\n perDeviceClassLowerCase: state => state.nodePerDeviceClass.reduce((assoc, item) => {\n return { ...assoc, [item.device_class.toLowerCase()]: item.count }\n }, {}),\n}\n\nconst actions = {\n exists: ({ state, commit }, mac) => {\n if (mac in state.nodeExists) {\n if (state.nodeExists[mac]) {\n return Promise.resolve(true)\n }\n return Promise.reject(new Error('Unknown MAC'))\n }\n let body = {\n fields: ['mac'],\n limit: 1,\n query: {\n op: 'and',\n values: [{\n field: 'mac', op: 'equals', value: mac\n }]\n }\n }\n return new Promise((resolve, reject) => {\n api.search(body).then(response => {\n if (response.items.length > 0) {\n commit('NODE_EXISTS', mac)\n resolve(true)\n } else {\n commit('NODE_NOT_EXISTS', mac)\n reject(new Error('Unknown MAC'))\n }\n }).catch(err => {\n reject(err)\n })\n })\n },\n getNode: ({ state, commit }, mac) => {\n /* Fix #5334, always fetch a fresh copy\n if (state.nodes[mac]) {\n return Promise.resolve(state.nodes[mac])\n }\n */\n let node = {}\n commit('NODE_REQUEST')\n return api.node({ quiet: true, mac }).then(data => {\n Object.assign(node, data)\n if (node.status === null) {\n node.status = 'unreg'\n }\n commit('NODE_REPLACED', node)\n\n // search extra columns (eg: 'online')\n const search = {\n fields: ['online'],\n query: { op: 'and', values: [{ field: 'mac', op: 'equals', value: mac }] },\n limit: 1,\n cursor: '0'\n }\n api.search(search).then(response => {\n const { items: { 0: item } } = response\n Object.keys(item).map(prop => {\n commit('NODE_UPDATED', { mac, prop, data: item[prop] })\n })\n })\n\n // Fetch ip4log history\n let ip4 = {}\n api.ip4logOpen(mac).then(data => {\n Object.assign(ip4, data)\n ip4.active = data.end_time === '0000-00-00 00:00:00'\n }).catch(() => {\n Object.assign(ip4, { active: false })\n }).finally(() => {\n api.ip4logHistory(mac).then(datas => {\n if (datas && datas.length > 0) {\n Object.assign(ip4, { history: datas })\n if (!ip4.active && !ip4.end_time) {\n ip4.end_time = datas[0].end_time\n }\n }\n }).catch(() => {\n // noop\n }).finally(() => {\n commit('NODE_UPDATED', { mac, prop: 'ip4', data: ip4 })\n })\n })\n\n // Fetch ip6log history\n let ip6 = {}\n api.ip6logOpen(mac).then(data => {\n Object.assign(ip6, data)\n ip6.active = data.end_time === '0000-00-00 00:00:00'\n }).catch(() => {\n Object.assign(ip6, { active: false })\n }).finally(() => {\n api.ip6logHistory(mac).then(datas => {\n if (datas && datas.length > 0) {\n Object.assign(ip6, { history: datas })\n if (!ip6.active && !ip6.end_time) {\n ip6.end_time = datas[0].end_time\n }\n }\n }).catch(() => {\n // noop\n }).finally(() => {\n commit('NODE_UPDATED', { mac, prop: 'ip6', data: ip6 })\n })\n })\n\n // Fetch locationlogs\n api.locationlogs(mac).then(datas => {\n commit('NODE_UPDATED', { mac, prop: 'locations', data: datas })\n }).catch(() => {\n // noop\n })\n\n // Fetch security_events\n api.security_events(mac).then(datas => {\n commit('NODE_UPDATED', { mac, prop: 'security_events', data: datas })\n }).catch(() => {\n // noop\n })\n\n // Fetch fingerbank\n let fingerbank = {}\n api.fingerbankInfo(mac).then(data => {\n Object.assign(fingerbank, data)\n }).catch(() => {\n // noop\n }).finally(() => {\n commit('NODE_UPDATED', { mac, prop: 'fingerbank', data: fingerbank })\n })\n\n // Fetch dhcpoption82\n api.dhcpoption82(mac).then(items => {\n commit('NODE_UPDATED', { mac, prop: 'dhcpoption82', data: items })\n }).catch(() => {\n // noop\n })\n\n // Fetch Rapid7\n api.rapid7Info(mac).then(items => {\n commit('NODE_UPDATED', { mac, prop: 'rapid7', data: items })\n }).catch(() => {\n // noop\n })\n\n return state.nodes[mac]\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n refreshNode: ({ state, commit, dispatch }, mac) => {\n if (state.nodes[mac]) {\n commit('NODE_DESTROYED', mac)\n }\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n dispatch('getNode', mac).then(() => {\n commit('NODE_SUCCESS')\n resolve(state.nodes[mac])\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n createNode: ({ commit }, data) => {\n commit('NODE_REQUEST')\n const { unreg_date, unreg_time } = data\n if (unreg_date && unreg_time) {\n data.unregdate = `${unreg_date} ${unreg_time}`\n }\n return new Promise((resolve, reject) => {\n api.createNode(data).then(response => {\n commit('NODE_REPLACED', data)\n commit('NODE_EXISTS', data.mac)\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n updateNode: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.updateNode(data).then(response => {\n commit('NODE_REPLACED', data)\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n deleteNode: ({ commit }, mac) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.deleteNode(mac).then(response => {\n commit('NODE_DESTROYED', mac)\n commit('NODE_NOT_EXISTS', mac)\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n applySecurityEventNode: ({ commit, dispatch }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.applySecurityEventNode(data).then(response => {\n commit('NODE_DESTROYED', data.mac)\n dispatch('getNode', data.mac)\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n clearSecurityEventNode: ({ commit, dispatch }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.clearSecurityEventNode(data).then(response => {\n commit('NODE_DESTROYED', data.mac)\n dispatch('getNode', data.mac)\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n reject(err)\n })\n })\n },\n reevaluateAccessNode: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.reevaluateAccessNode(data).then(response => {\n if (response.status === 200) {\n commit('NODE_SUCCESS')\n store.dispatch('notification/info', { message: i18n.t('Node access reevaluation initialized') })\n } else {\n commit('NODE_ERROR')\n store.dispatch('notification/danger', { message: i18n.t('Node access reevaluation failed') })\n }\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n store.dispatch('notification/danger', { message: i18n.t('Node access reevaluation failed') })\n reject(err)\n })\n })\n },\n refreshFingerbankNode: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.refreshFingerbankNode(data).then(response => {\n if (response.status === 200) {\n commit('NODE_SUCCESS')\n store.dispatch('notification/info', { message: i18n.t('Node device profiling initialized') })\n } else {\n commit('NODE_ERROR')\n store.dispatch('notification/danger', { message: i18n.t('Node device profiling failed') })\n }\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n store.dispatch('notification/danger', { message: i18n.t('Node device profiling failed') })\n reject(err)\n })\n })\n },\n restartSwitchportNode: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return new Promise((resolve, reject) => {\n api.restartSwitchportNode(data).then(response => {\n if (response.status === 200) {\n commit('NODE_SUCCESS')\n store.dispatch('notification/info', { message: i18n.t('Node switchport restarted') })\n } else {\n commit('NODE_ERROR')\n store.dispatch('notification/danger', { message: i18n.t('Node switchport restart failed') })\n }\n resolve(response)\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n store.dispatch('notification/danger', { message: i18n.t('Node switchport restart failed') })\n reject(err)\n })\n })\n },\n bulkRegisterNodes: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkRegisterNodes(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkDeregisterNodes: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkDeregisterNodes(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkApplySecurityEvent: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkApplySecurityEvent(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkCloseSecurityEvents: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkCloseSecurityEvents(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkApplyBypassAcls: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkApplyBypassAcls(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkApplyBypassRole: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkApplyBypassRole(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkApplyBypassVlan: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkApplyBypassVlan(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkApplyRole: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkApplyRole(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkReevaluateAccess: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkReevaluateAccess(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkRefreshFingerbank: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkRefreshFingerbank(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkRestartSwitchport: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkRestartSwitchport(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n bulkImport: ({ commit }, data) => {\n commit('NODE_REQUEST')\n return api.bulkImport(data).then(response => {\n commit('NODE_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n },\n getPerDeviceClass: ({ commit }) => {\n commit('NODE_REQUEST')\n return api.perDeviceClass().then(response => {\n commit('NODE_PER_DEVICE_CLASS', response.items)\n return response\n }).catch(err => {\n commit('NODE_ERROR', err.response)\n })\n }\n}\n\nconst mutations = {\n NODE_REQUEST: (state) => {\n state.nodeStatus = 'loading'\n state.message = ''\n },\n NODE_REPLACED: (state, data) => {\n state.nodeStatus = 'success'\n if (!('fingerbank' in data)) data.fingerbank = {}\n if ('unregdate' in data && data.unregdate === '0000-00-00 00:00:00') data.unregdate = ''\n Vue.set(state.nodes, data.mac, data)\n // TODO: update items if found in it\n },\n NODE_UPDATED: (state, params) => {\n state.nodeStatus = 'success'\n if (params.mac in state.nodes) {\n Vue.set(state.nodes[params.mac], params.prop, params.data)\n }\n },\n NODE_BULK_SUCCESS: (state, response) => {\n state.nodeStatus = 'success'\n response.forEach(item => {\n if (item.status === 'success' && item.mac in state.nodes) {\n Vue.set(state.nodes, item.mac, null)\n }\n })\n },\n NODE_DESTROYED: (state, mac) => {\n state.nodeStatus = 'success'\n Vue.set(state.nodes, mac, null)\n },\n NODE_SUCCESS: (state) => {\n state.nodeStatus = 'success'\n },\n NODE_ERROR: (state, response) => {\n state.nodeStatus = 'error'\n if (response && response.data) {\n state.message = response.data.message\n }\n },\n NODE_EXISTS: (state, mac) => {\n Vue.set(state.nodeExists, mac, true)\n },\n NODE_NOT_EXISTS: (state, mac) => {\n Vue.set(state.nodeExists, mac, false)\n },\n NODE_PER_DEVICE_CLASS: (state, deviceClasses) => {\n state.nodePerDeviceClass = deviceClasses\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import apiCall from '@/utils/api'\nconst baseURL = '/api/v1.1'\n\nexport default {\n list: params => {\n if (params.sort)\n params.sort = params.sort.join(',')\n else\n params.sort = 'id'\n if (params.fields && params.fields.constructor === Array)\n params.fields = params.fields.join(',')\n return apiCall.get('reports', { baseURL, params }).then(response => {\n return response.data\n })\n },\n listOptions: () => {\n return apiCall.options('reports', { baseURL }).then(response => {\n return response.data\n })\n },\n item: id => {\n return apiCall.get(['report', id], { baseURL }).then(response => {\n return response.data.item\n })\n },\n itemOptions: id => {\n return apiCall.options(['report', id], { baseURL }).then(response => {\n return response.data\n })\n },\n search: body => {\n if (body.id) {\n return apiCall.post(['report', body.id, 'search'], body, { baseURL }).then(response => {\n return response.data\n })\n }\n else {\n return new Promise(r => r({ items: [] }))\n }\n }\n}\n","/**\n* \"$_reports\" store module\n*/\nimport Vue from 'vue'\nimport { types } from '@/store'\nimport { computed } from '@vue/composition-api'\nimport api from '../_api'\nimport { analytics } from '../config'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_reports/isLoading']),\n getList: () => $store.dispatch('$_reports/all'),\n getListOptions: () => $store.dispatch('$_reports/options'),\n getItem: params => $store.dispatch('$_reports/getReport', params.id),\n getItemOptions: params => $store.dispatch('$_reports/options', params.id)\n }\n}\n\n// Default values\nconst state = () => {\n return {\n analytics,\n cache: {}, // reports details\n status: '',\n message: ''\n }\n}\n\nconst getters = {\n isLoading: state => state.status === types.LOADING\n}\n\nconst actions = {\n all: () => {\n const params = {\n sort: ['id'],\n fields: ['id', 'description', 'long_description', 'type']\n }\n return api.list(params).then(response => {\n return response.items\n })\n },\n options: ({ commit }, id) => {\n commit('ITEM_REQUEST')\n if (id) {\n return api.itemOptions(id).then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n } else {\n return api.listOptions().then(response => {\n commit('ITEM_SUCCESS')\n return response\n }).catch((err) => {\n commit('ITEM_ERROR', err.response)\n throw err\n })\n }\n },\n getReport: ({ state, commit }, id) => {\n if (state.cache[id]) {\n return Promise.resolve(state.cache[id])\n }\n commit('ITEM_REQUEST')\n return new Promise((resolve, reject) => {\n api.item(id).then(response => {\n commit('ITEM_REPLACED', response)\n resolve(response)\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n reject(err)\n })\n })\n },\n searchReport: ({ commit }, data) => {\n commit('ITEM_REQUEST')\n return new Promise((resolve, reject) => {\n api.search(data).then(response => {\n commit('ITEM_SUCCESS')\n resolve(response)\n }).catch(err => {\n commit('ITEM_ERROR', err.response)\n reject(err)\n })\n })\n }\n}\n\nconst mutations = {\n ITEM_REQUEST: (state) => {\n state.status = types.LOADING\n state.message = ''\n },\n ITEM_REPLACED: (state, data) => {\n state.status = types.SUCCESS\n Vue.set(state.cache, data.id, data)\n },\n ITEM_SUCCESS: (state) => {\n state.status = types.SUCCESS\n },\n ITEM_ERROR: (state, response) => {\n state.status = types.ERROR\n if (response && response.data) {\n state.message = response.data.message\n }\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","// delimiter that separates id's into structured sidebar categories\nexport const delimiter = '::'\n\nexport const colorsFull = ['#ffff00', '#1ce6ff', '#ff34ff', '#ff4a46', '#008941', '#006fa6', '#a30059', '#ffdbe5', '#7a4900', '#0000a6', '#63ffac', '#b79762', '#004d43', '#8fb0ff', '#997d87', '#5a0007', '#809693', '#feffe6', '#1b4400', '#4fc601', '#3b5dff', '#4a3b53', '#ff2f80', '#61615a', '#ba0900', '#6b7900', '#00c2a0', '#ffaa92', '#ff90c9', '#b903aa', '#d16100', '#ddefff', '#000035', '#7b4f4b', '#a1c299', '#300018', '#0aa6d8', '#013349', '#00846f', '#372101', '#ffb500', '#c2ffed', '#a079bf', '#cc0744', '#c0b9b2', '#c2ff99', '#001e09', '#00489c', '#6f0062', '#0cbd66', '#eec3ff', '#456d75', '#b77b68', '#7a87a1', '#788d66', '#885578', '#fad09f', '#ff8a9a', '#d157a0', '#bec459', '#456648', '#0086ed', '#886f4c', '#34362d', '#b4a8bd', '#00a6aa', '#452c2c', '#636375', '#a3c8c9', '#ff913f', '#938a81', '#575329', '#00fecf', '#b05b6f', '#8cd0ff', '#3b9700', '#04f757', '#c8a1a1', '#1e6e00', '#7900d7', '#a77500', '#6367a9', '#a05837', '#6b002c', '#772600', '#d790ff', '#9b9700', '#549e79', '#fff69f', '#201625', '#72418f', '#bc23ff', '#99adc0', '#3a2465', '#922329', '#5b4534', '#fde8dc', '#404e55', '#0089a3', '#cb7e98', '#a4e804', '#324e72', '#6a3a4c', '#83ab58', '#001c1e', '#d1f7ce', '#004b28', '#c8d0f6', '#a3a489', '#806c66', '#222800', '#bf5650', '#e83000', '#66796d', '#da007c', '#ff1a59', '#8adbb4', '#1e0200', '#5b4e51', '#c895c5', '#320033', '#ff6832', '#66e1d3', '#cfcdac', '#d0ac94', '#7ed379', '#012c58', '#7a7bff', '#d68e01', '#353339', '#78afa1', '#feb2c6', '#75797c', '#837393', '#943a4d', '#b5f4ff', '#d2dcd5', '#9556bd', '#6a714a', '#001325', '#02525f', '#0aa3f7', '#e98176', '#dbd5dd', '#5ebcd1', '#3d4f44', '#7e6405', '#02684e', '#962b75', '#8d8546', '#9695c5', '#e773ce', '#d86a78', '#3e89be', '#ca834e', '#518a87', '#5b113c', '#55813b', '#e704c4', '#00005f', '#a97399', '#4b8160', '#59738a', '#ff5da7', '#f7c9bf', '#643127', '#513a01', '#6b94aa', '#51a058', '#a45b02', '#1d1702', '#e20027', '#e7ab63', '#4c6001', '#9c6966', '#64547b', '#97979e', '#006a66', '#391406', '#f4d749', '#0045d2', '#006c31', '#ddb6d0', '#7c6571', '#9fb2a4', '#00d891', '#15a08a', '#bc65e9', '#fffffe', '#c6dc99', '#203b3c', '#671190', '#6b3a64', '#f5e1ff', '#ffa0f2', '#ccaa35', '#374527', '#8bb400', '#797868', '#c6005a', '#3b000a', '#c86240', '#29607c', '#402334', '#7d5a44', '#ccb87c', '#b88183', '#aa5199', '#b5d6c3', '#a38469', '#9f94f0', '#a74571', '#b894a6', '#71bb8c', '#00b433', '#789ec9', '#6d80ba', '#953f00', '#5eff03', '#e4fffc', '#1be177', '#bcb1e5', '#76912f', '#003109', '#0060cd', '#d20096', '#895563', '#29201d', '#5b3213', '#a76f42', '#89412e', '#1a3a2a', '#494b5a', '#a88c85', '#f4abaa', '#a3f3ab', '#00c6c8', '#ea8b66', '#958a9f', '#bdc9d2', '#9fa064', '#be4700', '#658188', '#83a485', '#453c23', '#47675d', '#3a3f00', '#061203', '#dffb71', '#868e7e', '#98d058', '#6c8f7d', '#d7bfc2', '#3c3e6e', '#d83d66', '#000000']\n\nexport const colorsNull = ['#eeeeee']\n\nexport const analytics = {\n track: ['id']\n}\n\n","import store from '@/store'\nimport {\n reIpv4,\n reIpv6,\n} from '@/utils/regex'\nimport {\n COLOR_PROTO_DEFAULT,\n COLOR_PROTO_TCP,\n COLOR_PROTO_UDP,\n COLOR_PROTO_UNKNOWN\n} from '../config'\n\nexport const decorateDevice = d => {\n return `${d[0]}${d[1]}:${d[2]}${d[3]}:${d[4]}${d[5]}:${d[6]}${d[7]}:${d[8]}${d[9]}:${d[10]}${d[11]}`\n}\n\nexport const useDevices = communication => {\n return Object.entries(communication).reduce((devices, [device, value]) => {\n if (!(device in devices)) {\n devices[device] = { hosts: {}, protocols: {} }\n }\n const { all_hosts_cache = {} } = value\n const hosts_cache = Object.entries(all_hosts_cache)\n for (let i = 0; i < hosts_cache.length; i++) {\n const [host, device_cache] = hosts_cache[i]\n const protocols = Object.entries(device_cache)\n for (let p = 0; p < protocols.length; p++) {\n const [_protocol, count] = protocols[p]\n const protocol = decorateProtocol(_protocol)\n devices[device].hosts[host] = (devices[device].hosts[host] || 0) + count\n devices[device].protocols[protocol] = (devices[device].protocols[protocol] || 0) + count\n }\n }\n return devices\n }, {})\n}\n\nexport const splitHost = host => {\n // host may have port appended, discard\n const [_host, port] = host.toLowerCase().split(':')\n // include packetfence domain in local hosts\n let internalHost = false\n if (store.state.$_bases.cache.general.domain) {\n const packetfenceDomain = store.state.$_bases.cache.general.domain.toLowerCase()\n internalHost = packetfenceDomain === _host || RegExp(`.${packetfenceDomain}$`, 'i').test(_host)\n }\n const isIpv4 = reIpv4(_host)\n const isIpv6 = reIpv6(_host)\n // don't split IPv4 or IPv6\n if (isIpv4 || isIpv6) {\n return { internalHost: true, tld: _host, port, isIpv4, isIpv6 }\n }\n const [tld, domain, ...subdomains] = _host.split('.').reverse()\n return { internalHost, tld, port, domain, subdomain: subdomains.reverse().join('.') }\n}\n\nexport const sortHosts = (a, b) => {\n // internal hosts first\n if (a.internalHost !== b.internalHost) {\n return b.internalHost - a.internalHost\n }\n const hostsA = (a.internalHost && (a.isIpv4 || a.isIpv6))\n ? a.host.split('.')\n : a.host.split('.').reverse()\n const hostsB = (b.internalHost && (b.isIpv4 || b.isIpv6))\n ? b.host.split('.')\n : b.host.split('.').reverse()\n for (let h = 0; h <= Math.min(hostsA.length, hostsB.length); h++) {\n if (hostsA.length <= h) {\n return -1\n }\n if (hostsB.length <= h) {\n return 1\n }\n if (hostsA[h] !== hostsB[h]) {\n return `${hostsA[h]}`.localeCompare(`${hostsB[h]}`)\n }\n }\n}\n\nexport const decorateHost = host => {\n const { tld, domain, subdomain, port } = splitHost(host)\n let decorated = ''\n if (port) {\n decorated = `:${port}`\n }\n if (tld) {\n decorated = `${tld}${decorated}`\n }\n if (domain) {\n decorated = `${domain}.${decorated}`\n }\n if (subdomain) {\n decorated = `${subdomain}.${decorated}`\n }\n return decorated\n}\n\nexport const useHosts = communication => {\n return Object.entries(communication).reduce((hosts, [device, value]) => {\n const { all_hosts_cache = {} } = value\n const hosts_cache = Object.entries(all_hosts_cache)\n for (let i = 0; i < hosts_cache.length; i++) {\n let [host, device_cache] = hosts_cache[i]\n host = host.toLowerCase()\n if (host) {\n if (!(host in hosts)) {\n hosts[host] = { devices: {}, protocols: {} }\n }\n hosts[host]['devices'][device] = Object.values(device_cache).reduce((sum, value) => {\n return sum + value\n }, 0)\n const protocols = Object.entries(device_cache)\n for (let p = 0; p < protocols.length; p++) {\n const [_protocol, count] = protocols[p]\n const protocol = decorateProtocol(_protocol)\n hosts[host].protocols[protocol] = (hosts[host].protocols[protocol] || 0) + count\n }\n }\n }\n return hosts\n }, {})\n}\n\nexport const splitProtocol = protocol => {\n // early version does not include proto in 'proto:port'\n const [port, proto = 'UNKNOWN'] = protocol.split(':').reverse()\n return { proto, port }\n}\n\nexport const decorateProtocol = protocol => {\n const { proto, port } = splitProtocol(protocol)\n return `${proto.toUpperCase()}:${port}`\n}\n\nexport const useProtocols = communication => {\n return Object.entries(communication).reduce((protocols, [device, value]) => {\n const { all_hosts_cache = {} } = value\n const hosts_cache = Object.entries(all_hosts_cache)\n for (let i = 0; i < hosts_cache.length; i++) {\n const [host, device_cache] = hosts_cache[i]\n const _protocols = Object.entries(device_cache)\n for (let p = 0; p < _protocols.length; p++) {\n const [_protocol, count] = _protocols[p]\n const protocol = decorateProtocol(_protocol)\n if (!(protocol in protocols)) {\n protocols[protocol] = { devices: { [device]: count }, hosts: { [host]: count } }\n }\n else {\n protocols[protocol].devices[device] = (protocols[protocol].devices[device] || 0) + count\n protocols[protocol].hosts[host] = (protocols[protocol].hosts[host] || 0) + count\n }\n }\n }\n return protocols\n }, {})\n}\n\nexport const rgbaProto = (proto, port, opacity = 1) => {\n switch (proto) {\n case 'TCP': // #28a745\n return `rgb(${COLOR_PROTO_TCP}, ${opacity})`\n // break\n case 'UDP': // #007bff\n return `rgb(${COLOR_PROTO_UDP}, ${opacity})`\n // break\n case 'UNKNOWN': // #dc3545\n return `rgb(${COLOR_PROTO_UNKNOWN}, ${opacity})`\n // break\n default:\n return `rgb(${COLOR_PROTO_DEFAULT}, ${opacity})`\n }\n}\n","export const COLOR_BLACK = '0, 0, 0'\nexport const COLOR_WHITE = '255, 255, 255'\nexport const COLOR_RED = '220, 53, 69'\nexport const COLOR_GREEN = '40, 167, 69'\nexport const COLOR_BLUE = '0, 123, 255'\n\nexport const COLOR_MARKER = COLOR_GREEN\nexport const COLOR_MARKER_LINE = COLOR_WHITE\nexport const COLOR_PROTO_DEFAULT = COLOR_BLACK\nexport const COLOR_PROTO_TCP = COLOR_GREEN\nexport const COLOR_PROTO_UDP = COLOR_BLUE\nexport const COLOR_PROTO_UNKNOWN = COLOR_RED\n","import apiCall from '@/utils/api'\n\nexport default {\n search: data => {\n return apiCall.post('security_events/search', data).then(response => {\n return response.data\n })\n },\n totalOpen: () => {\n return apiCall.get('security_events/total_open').then(response => {\n return response.data\n })\n },\n totalClosed: () => {\n return apiCall.get('security_events/total_closed').then(response => {\n return response.data\n })\n },\n totalPending: () => {\n return apiCall.get('security_events/total_pending').then(response => {\n return response.data\n })\n },\n perDeviceClassOpen: () => {\n return apiCall.get('security_events/per_device_class_open').then(response => {\n return response.data\n })\n },\n perDeviceClassClosed: () => {\n return apiCall.get('security_events/per_device_class_closed').then(response => {\n return response.data\n })\n },\n perDeviceClassPending: () => {\n return apiCall.get('security_events/per_device_class_pending').then(response => {\n return response.data\n })\n },\n perSecurityEventOpen: () => {\n return apiCall.get('security_events/per_security_event_id_open').then(response => {\n return response.data\n })\n },\n perSecurityEventClosed: () => {\n return apiCall.get('security_events/per_security_event_id_closed').then(response => {\n return response.data\n })\n },\n perSecurityEventPending: () => {\n return apiCall.get('security_events/per_security_event_id_pending').then(response => {\n return response.data\n })\n },\n}\n\n\n\n","import apiCall from '@/utils/api'\n\nexport default {\n all: params => {\n if (params.sort) {\n params.sort = params.sort.join(',')\n } else {\n params.sort = 'pid'\n }\n if (params.fields) {\n params.fields = params.fields.join(',')\n }\n return apiCall.get('users', { params }).then(response => {\n return response.data\n })\n },\n search: body => {\n return apiCall.post('users/search', body).then(response => {\n return response.data\n })\n },\n user: body => {\n const get = body.quiet ? 'getQuiet' : 'get'\n return apiCall[get](['user', body.pid]).then(response => {\n return response.data.item\n })\n },\n nodes: pid => {\n return apiCall.get(['user', pid, 'nodes'], { params: { limit: 1000 } }).then(response => {\n return response.data.items\n })\n },\n securityEvents: pid => {\n return apiCall.get(['user', pid, 'security_events']).then(response => {\n return response.data.items\n })\n },\n createUser: body => {\n const post = body.quiet ? 'postQuiet' : 'post'\n return apiCall[post]('users', body).then(response => {\n return response.data\n })\n },\n updateUser: body => {\n const patch = body.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['user', body.pid], body).then(response => {\n return response.data\n })\n },\n deleteUser: pid => {\n return apiCall.delete(['user', pid])\n },\n createPassword: body => {\n const post = body.quiet ? 'postQuiet' : 'post'\n return apiCall[post](['user', body.pid, 'password'], body).then(response => {\n return response.data\n })\n },\n updatePassword: body => {\n const patch = body.quiet ? 'patchQuiet' : 'patch'\n return apiCall[patch](['user', body.pid, 'password'], body).then(response => {\n return response.data\n })\n },\n previewEmail: body => {\n return apiCall.postQuiet('email/preview', body).then(response => {\n return response.data\n })\n },\n sendEmail: body => {\n return apiCall.postQuiet('email/send', body).then(response => {\n return response.data\n })\n },\n unassignUserNodes: pid => {\n return apiCall.post(['user', pid, 'unassign_nodes'])\n },\n bulkRegisterNodes: body => {\n return apiCall.post(['users', 'bulk_register'], body).then(response => {\n return response.data.items\n })\n },\n bulkDeregisterNodes: body => {\n return apiCall.post(['users', 'bulk_deregister'], body).then(response => {\n return response.data.items\n })\n },\n bulkApplySecurityEvent: body => {\n return apiCall.post(['users', 'bulk_apply_security_event'], body).then(response => {\n return response.data.items\n })\n },\n bulkCloseSecurityEvents: body => {\n return apiCall.post(['users', 'bulk_close_security_events'], body).then(response => {\n return response.data.items\n })\n },\n bulkApplyRole: body => {\n return apiCall.post(['users', 'bulk_apply_role'], body).then(response => {\n return response.data.items\n })\n },\n bulkApplyBypassRole: body => {\n return apiCall.post(['users', 'bulk_apply_bypass_role'], body).then(response => {\n return response.data.items\n })\n },\n bulkReevaluateAccess: body => {\n return apiCall.post(['users', 'bulk_reevaluate_access'], body).then(response => {\n return response.data.items\n })\n },\n bulkRefreshFingerbank: body => {\n return apiCall.post(['users', 'bulk_fingerbank_refresh'], body).then(response => {\n return response.data.items\n })\n },\n bulkDelete: body => {\n return apiCall.post(['users', 'bulk_delete'], body).then(response => {\n return response.data.items\n })\n },\n bulkImport: body => {\n return apiCall.post(['users', 'bulk_import'], body).then(response => {\n return response.data.items\n })\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-row',{attrs:{\"align-v\":\"start\"}},[_c('section-sidebar',{model:{value:(_vm.sections),callback:function ($$v) {_vm.sections=$$v},expression:\"sections\"}}),_c('b-col',{staticClass:\"py-3\",attrs:{\"cols\":\"12\",\"md\":\"9\",\"xl\":\"10\"}},[_c('transition',{attrs:{\"name\":\"slide-bottom\"}},[_c('router-view')],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n {pid}
does not exist.', to.params) })\n next({ name: 'userSearch' })\n })\n }\n }\n ]\n}\n\nexport default route\n","/**\n* \"$_users\" store module\n*/\nimport Vue from 'vue'\nimport { computed } from '@vue/composition-api'\nimport api from '../_api'\nimport { pfActions } from '@/globals/pfActions'\n\nexport const useStore = $store => {\n return {\n isLoading: computed(() => $store.getters['$_users/isLoading']),\n reloadItem: params => $store.dispatch('$_users/refreshUser', params.id),\n deleteItem: params => $store.dispatch('$_users/deleteUser', params.id),\n getItem: params => $store.dispatch('$_users/getUser', params.id),\n createItem: params => $store.dispatch('$_users/createUser', params),\n updateItem: params => $store.dispatch('$_users/updateUser', params)\n }\n}\n\nconst inflateActions = (data) => {\n data.actions = []\n if (data.access_duration) {\n data.actions.push({ type: pfActions.set_access_duration.value, value: data.access_duration })\n }\n if (data.access_level) {\n data.actions.push({ type: pfActions.set_access_level.value, value: data.access_level.split(',') })\n }\n if (data.can_sponsor && parseInt(data.can_sponsor)) {\n data.actions.push({ type: pfActions.mark_as_sponsor.value, value: data.can_sponsor })\n }\n if (data.category) {\n data.actions.push({ type: pfActions.set_role.value, value: data.category })\n }\n if (data.unregdate && data.unregdate !== '0000-00-00 00:00:00') {\n data.actions.push({ type: pfActions.set_unreg_date.value, value: data.unregdate })\n }\n}\n\nconst deflateActions = (data) => {\n if ('actions' in data) {\n const actions = data.actions\n\n data.access_duration = null\n data.access_level = null\n data.can_sponsor = null\n data.category = null\n data.unregdate = null\n\n actions.forEach(action => {\n switch (action.type) {\n case pfActions.set_access_duration.value:\n data.access_duration = action.value\n break\n case pfActions.set_access_level.value:\n data.access_level = action.value.join(',')\n break\n case pfActions.mark_as_sponsor.value:\n data.sponsor = 1\n break\n case pfActions.set_role.value:\n data.category = action.value\n break\n case pfActions.set_unreg_date.value:\n data.unregdate = action.value\n break\n default:\n // noop\n }\n })\n }\n}\n\n// Default values\nconst state = () => {\n return {\n users: {}, // users details\n usersStatus: '',\n usersMessage: '',\n usersNodes: {}, // user nodes\n usersNodesStatus: '',\n usersNodesMessage: '',\n usersSecurityEvents: {}, // user security_events\n usersSecurityEventsStatus: '',\n usersSecurityEventsMessage: '',\n userExists: {}, // node exists true|false\n createdUsers: []\n }\n}\n\nconst getters = {\n isLoading: state => [state.usersStatus, state.usersNodesStatus, state.usersSecurityEventsStatus].includes('loading'),\n isLoadingNodes: state => state.usersNodesStatus === 'loading',\n isLoadingSecurityEvents: state => state.usersSecurityEventsStatus === 'loading'\n}\n\nconst actions = {\n exists: ({ state, commit }, pid) => {\n if (pid in state.userExists) {\n if (state.userExists[pid]) {\n return Promise.resolve(true)\n }\n return Promise.reject(new Error('Unknown PID'))\n }\n let body = {\n fields: ['pid'],\n limit: 1,\n query: {\n op: 'and',\n values: [{\n field: 'pid', op: 'equals', value: pid\n }]\n }\n }\n return new Promise((resolve, reject) => {\n api.search(body).then(response => {\n if (response.items.length > 0) {\n commit('USER_EXISTS', pid)\n resolve(true)\n } else {\n commit('USER_NOT_EXISTS', pid)\n reject(new Error('Unknown PID'))\n }\n }).catch(err => {\n reject(err)\n })\n })\n },\n refreshUser: ({ state, commit, dispatch }, pid) => {\n if (state.users[pid]) {\n Vue.set(state.users, pid, false)\n }\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n dispatch('getUser', pid).then(() => {\n commit('USER_SUCCESS')\n resolve(state.users[pid])\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n getUser: ({ state, commit }, arg) => {\n const body = (typeof arg === 'object') ? arg : { pid: arg }\n const { pid } = body\n if (state.users[pid]) {\n return Promise.resolve(state.users[pid])\n }\n commit('USER_REQUEST')\n return api.user({ quiet: true, ...body }).then(data => {\n inflateActions(data)\n commit('USER_REPLACED', data)\n return state.users[pid]\n }).catch(err => {\n commit('USER_ERROR', err.response)\n throw err\n })\n },\n getUserNodes: ({ state, commit }, pid) => {\n if (state.usersNodes[pid]) {\n return Promise.resolve(state.usersNodes[pid])\n }\n commit('USER_NODES_REQUEST')\n return api.nodes(pid).then(data => {\n commit('USER_NODES_UPDATED', { pid, data })\n return state.usersNodes[pid]\n }).catch(err => {\n commit('USER_ERROR', err.response)\n return err\n })\n },\n getUserSecurityEvents: ({ state, commit }, pid) => {\n if (state.usersSecurityEvents[pid]) {\n return Promise.resolve(state.usersSecurityEvents[pid])\n }\n commit('USER_SECURITY_EVENTS_REQUEST')\n return api.securityEvents(pid).then(data => {\n commit('USER_SECURITY_EVENTS_UPDATED', { pid, data })\n return state.usersSecurityEvents[pid]\n }).catch(err => {\n commit('USER_ERROR', err.response)\n return err\n })\n },\n createUser: ({ commit }, data) => {\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n api.createUser(data).then(response => {\n commit('USER_REPLACED', data)\n commit('USER_EXISTS', data.pid)\n resolve(response)\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n updateUser: ({ commit, dispatch }, data) => {\n deflateActions(data)\n commit('USER_REQUEST')\n return api.updateUser(data).then(response => {\n if (data.expiration) { // has password\n dispatch('updatePassword', Object.assign({ quiet: true }, data))\n .then(() => {\n commit('USER_REPLACED', data)\n dispatch('refreshUser', data.pid)\n return response\n })\n }\n else { // no password\n commit('USER_REPLACED', data)\n dispatch('refreshUser', data.pid)\n return response\n }\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n createPassword: ({ commit }, data) => {\n deflateActions(data)\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n api.createPassword(data).then(response => {\n commit('USER_SUCCESS')\n resolve(response)\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n updatePassword: ({ commit }, data) => {\n deflateActions(data)\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n api.updatePassword(data).then(response => {\n commit('USER_SUCCESS')\n resolve(response)\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n previewEmail: ({ commit }, user) => {\n const data = {\n args: {\n pid: user.pid,\n password: user.password\n },\n template: 'guest_local_account_creation'\n }\n commit('USER_REQUEST')\n return api.previewEmail(data).then(response => {\n commit('USER_SUCCESS')\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n sendEmail: ({ commit }, data) => {\n const body = {\n template: 'guest_local_account_creation',\n args: {\n pid: data.pid,\n password: data.password\n },\n to: data.email,\n subject: data.subject\n }\n commit('USER_REQUEST')\n return api.sendEmail(body).then(response => {\n commit('USER_SUCCESS')\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n unassignUserNodes: ({ commit }, pid) => {\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n api.unassignUserNodes(pid).then(response => {\n commit('USER_UPDATED', { pid: pid, prop: 'nodes', data: [] })\n resolve(response)\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n deleteUser: ({ commit }, pid) => {\n commit('USER_REQUEST')\n return new Promise((resolve, reject) => {\n api.deleteUser(pid).then(response => {\n commit('USER_DESTROYED', pid)\n commit('USER_NOT_EXISTS', pid)\n resolve(response)\n }).catch(err => {\n commit('USER_ERROR', err.response)\n reject(err)\n })\n })\n },\n bulkRegisterNodes: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkRegisterNodes(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkDeregisterNodes: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkDeregisterNodes(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkApplySecurityEvent: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkApplySecurityEvent(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkCloseSecurityEvents: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkCloseSecurityEvents(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkApplyRole: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkApplyRole(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkApplyBypassRole: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkApplyBypassRole(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkReevaluateAccess: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkReevaluateAccess(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkRefreshFingerbank: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkRefreshFingerbank(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkDelete: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkDelete(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n },\n bulkImport: ({ commit }, data) => {\n commit('USER_REQUEST')\n return api.bulkImport(data).then(response => {\n commit('USER_BULK_SUCCESS', response)\n return response\n }).catch(err => {\n commit('USER_ERROR', err.response)\n })\n }\n}\n\nconst mutations = {\n USER_REQUEST: (state) => {\n state.usersStatus = 'loading'\n },\n USER_REPLACED: (state, data) => {\n Vue.set(state.users, data.pid, data)\n // TODO: update items if found in it\n state.usersStatus = 'success'\n },\n USER_UPDATED: (state, params) => {\n state.usersStatus = 'success'\n if (params.pid in state.users) {\n Vue.set(state.users[params.pid], params.prop, params.data)\n }\n },\n USER_NODES_REQUEST: (state) => {\n state.usersNodesStatus = 'loading'\n },\n USER_NODES_UPDATED: (state, params) => {\n state.usersNodesStatus = 'success'\n Vue.set(state.usersNodes, params.pid, params.data)\n },\n USER_NODES_ERROR: (state, response) => {\n state.usersNodesStatus = 'error'\n if (response && response.data) {\n state.usersNodesMessage = response.data.usersMessage\n }\n },\n USER_SECURITY_EVENTS_REQUEST: (state) => {\n state.usersSecurityEventsStatus = 'loading'\n},\n USER_SECURITY_EVENTS_UPDATED: (state, params) => {\n state.usersSecurityEventsStatus = 'success'\n Vue.set(state.usersSecurityEvents, params.pid, params.data)\n },\n USER_SECURITY_EVENTS_ERROR: (state, response) => {\n state.usersSecurityEventsStatus = 'error'\n if (response && response.data) {\n state.usersSecurityEventsMessage = response.data.usersMessage\n }\n },\n USER_BULK_SUCCESS: (state, response) => {\n state.usersStatus = 'success'\n response.forEach(item => {\n if (item.pid in state.users) {\n Vue.set(state.users, item.pid, null)\n }\n })\n },\n USER_DESTROYED: (state, pid) => {\n state.usersStatus = 'success'\n Vue.set(state.users, pid, null)\n },\n USER_SUCCESS: (state) => {\n state.usersStatus = 'success'\n },\n USER_ERROR: (state, response) => {\n state.usersStatus = 'error'\n if (response && response.data) {\n state.usersMessage = response.data.usersMessage\n }\n },\n USER_EXISTS: (state, pid) => {\n Vue.set(state.userExists, pid, true)\n },\n USER_NOT_EXISTS: (state, pid) => {\n Vue.set(state.userExists, pid, false)\n },\n CREATED_USERS_REPLACED: (state, users) => {\n state.createdUsers = users\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","import store from '@/store'\nimport i18n from '@/utils/locale'\nimport yup from '@/utils/yup'\nimport { MysqlDatabase } from '@/globals/mysql'\nimport { pfActionsSchema as schemaActions } from '@/globals/pfActions'\n\n// combine person and password tables\nconst mysqlDatabase = { ...MysqlDatabase.password, ...MysqlDatabase.person }\n\n// build schema from mysql table\nconst mysqlDatabaseSchema = Object.keys(mysqlDatabase).reduce((schema, key) => {\n return { ...schema,\n [key]: yup.string().nullable()\n .mysql(mysqlDatabase[key])\n }\n}, {})\n\nconst schemaPid = yup.string().nullable().required(i18n.t('Username required.'))\n\nyup.addMethod(yup.string, 'pidNotExistsExcept', function (except, message) {\n return this.test({\n name: 'pidNotExistsExcept',\n message: message || i18n.t('Username exists.'),\n test: (value) => !value\n || (except && except === value)\n || store.dispatch('$_users/exists', value)\n .then(() => false) // pid exists\n .catch(() => true) // pid not exists\n })\n})\n\nyup.addMethod(yup.string, 'pidExists', function (message) {\n return this.test({\n name: 'pidExists',\n message: message || i18n.t('PID exists.'),\n test: (value) => !value\n || store.dispatch('$_users/exists', value)\n .then(() => true) // pid exists\n .catch(() => false) // pid not exists\n })\n})\n\nyup.addMethod(yup.string, 'pidNotExists', function (message) {\n return this.test({\n name: 'pidNotExists',\n message: message || i18n.t('PID does not exist.'),\n test: (value) => !value\n || store.dispatch('$_users/exists', value)\n .then(() => false) // pid exists\n .catch(() => true) // pid not exists\n })\n})\n\nexport const single = (props, form) => {\n const {\n pid\n } = props\n\n const {\n pid_overwrite,\n has_password\n } = form || {}\n\n const expirationSchema = (has_password) // w/ `password`\n ? yup.string().nullable().required(i18n.t('Date required.'))\n : yup.string().nullable()\n\n return yup.object().shape(mysqlDatabaseSchema).concat(\n yup.object().shape({\n pid: yup.string()\n .when('pid_overwrite', () => ((pid_overwrite)\n ? schemaPid\n : schemaPid.pidNotExistsExcept(pid, i18n.t('Username exists.'))\n )),\n password: (pid)\n ? yup.string().nullable()\n : yup.string().nullable().required(i18n.t('Password required.'))\n .min(6, i18n.t('Password must be at least 6 characters.')),\n email: yup.string().nullable().required(i18n.t('Email required.')),\n actions: schemaActions,\n anniversary: yup.string().nullable().isDateFormat(),\n birthday: yup.string().nullable().isDateFormat(),\n valid_from: yup.string().nullable(),\n expiration: expirationSchema\n })\n )\n}\n\nexport const multiple = (props, form) => {\n const {\n quantity\n } = form || {}\n\n const maxLength = mysqlDatabase.pid.maxLength - Math.floor(Math.log10(quantity || 1) + 1)\n\n return yup.object().shape(mysqlDatabaseSchema).concat(\n yup.object().shape({\n prefix: yup.string().nullable().required(i18n.t('Username prefix required.'))\n .max(maxLength, i18n.t('Maximum {maxLength} characters.', { maxLength })),\n quantity: yup.string().nullable().required(i18n.t('Quantity required.'))\n .minAsInt(1, i18n.t('Minimum 1.')),\n actions: schemaActions,\n valid_from: yup.string().nullable(),\n expiration: yup.string().nullable().required(i18n.t('Date required.'))\n })\n )\n}\n\nexport const csv = () => {\n return yup.object().shape({\n actions: schemaActions,\n valid_from: yup.string().nullable(),\n expiration: yup.string().nullable().required(i18n.t('Date required.'))\n })\n}\n\nexport { yup }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"js/\" + ({\"1\":\"Fingerbank\",\"118\":\"Configurator\",\"145\":\"Libs\",\"196\":\"Editor\",\"262\":\"Nodes\",\"322\":\"Reports\",\"530\":\"Users\",\"614\":\"Status\",\"698\":\"Preferences\",\"719\":\"Configuration\",\"742\":\"Auditing\",\"831\":\"Import\"}[chunkId] || chunkId) + \".\" + {\"1\":\"2aafcd1b\",\"38\":\"9ae6cd59\",\"118\":\"d1b03dda\",\"145\":\"8e1428d7\",\"186\":\"2be45107\",\"196\":\"4f85eb50\",\"262\":\"973a38a0\",\"277\":\"d1c8ad32\",\"322\":\"726dc007\",\"530\":\"8ba26241\",\"595\":\"667e907c\",\"614\":\"0ea235f2\",\"698\":\"f41922ef\",\"719\":\"6ca265be\",\"721\":\"df135e70\",\"742\":\"ceff2afe\",\"831\":\"1b893d62\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"css/\" + {\"118\":\"Configurator\",\"262\":\"Nodes\",\"322\":\"Reports\",\"530\":\"Users\",\"614\":\"Status\",\"719\":\"Configuration\",\"742\":\"Auditing\"}[chunkId] + \".\" + {\"118\":\"d21b32a5\",\"262\":\"8137177f\",\"322\":\"72a269e0\",\"530\":\"fcb134f7\",\"614\":\"f12a2fbe\",\"719\":\"6908903f\",\"742\":\"64956fea\"}[chunkId] + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var inProgress = {};\nvar dataWebpackPrefix = \"packetfence-admin:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/admin/\";","var createStylesheet = (chunkId, fullhref, resolve, reject) => {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tvar onLinkComplete = (event) => {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + realHref + \")\");\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tlinkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\tdocument.head.appendChild(linkTag);\n\treturn linkTag;\n};\nvar findStylesheet = (href, fullhref) => {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = (chunkId) => {\n\treturn new Promise((resolve, reject) => {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t143: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"118\":1,\"262\":1,\"322\":1,\"530\":1,\"614\":1,\"719\":1,\"742\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, (e) => {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkpacketfence_admin\"] = globalThis[\"webpackChunkpacketfence_admin\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], () => (__webpack_require__(34919)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["render","_vm","this","_h","$createElement","_c","_self","on","$event","preventDefault","onLogin","apply","arguments","modal","tag","attrs","scopedSlots","_u","key","headerSlotName","fn","staticClass","directives","name","rawName","value","expression","$t","currentLanguage","label","_l","language","locale","$i18n","setLanguage","_v","_s","proxy","footerSlotName","onLogout","onExtendSession","isLoading","validForm","ssoLoginUrl","ssoLoginButtonText","_e","model","callback","$$v","showModal","message","level","text","sessionTime","username","password","staticRenderFns","components","BaseButtonSave","focus","props","type","EXPIRATION_DELAY","setup","context","emit","root","$router","$store","onMounted","watch","doLogin","updateSessionTime","clearTimeout","updateSessionTimeVerified","sessionTimer","seconds","lang","languages","ssoEnabled","component","modifiers","ref","filter","section","can","path","$sanitizedClass","class","icon","JSON","stringify","accordion","isActive","item","subitem","_t","_b","$attrs","indent","caption","i","standardSearches","length","search","routeFromItemSearch","showSavedSearches","savedBasicSearches","stopPropagation","deleteBasicSavedSearch","savedAdvancedSearches","deleteAdvancedSavedSearch","TextHighlight","default","saveSearchNamespace","values","query","conditionAdvanced","id","conditionBasic","visible","then","SectionSidebarItem","refs","items","map","currentRoute","expandedSections","$el","nextTick","immediate","useEvent","altKey","shiftKey","keyCode","focusFilter","e","refFilter","filteredMode","filteredSections","findActiveSections","contentCols","contentColsMd","contentColsLg","contentColsXl","state","columnLabel","labelClass","labelCols","labelColsMd","labelColsLg","labelColsXl","domProps","invalidFeedback","validFeedback","isFocus","$slots","append","disabled","inheritAttrs","contentColsSm","labelColsSm","inputState","inputInvalidFeedback","inputValidFeedback","namespace","inputMax","isLocked","hints","size","inputTabIndex","inputValue","inputColor","inputIcon","inputLabel","labelLeft","labelRight","onInput","onFocus","onBlur","BaseFormGroup","BaseInputRange","max","validator","tabIndex","color","tooltip","inputText","inputTooltip","onDecrement","style","staticStyle","hintStyle","index","min","step","defaultValue","onIncrement","useInputRangeProps","Boolean","String","Number","Array","useInputRange","inputRef","toRefs","getPercent","_min","_max","percent","computed","rootStyle","hintStyles","hint","constructor","left","width","labelStyle","valueStyle","doFocus","doBlur","blur","target","placeholder","readonly","inputPlaceholder","inputReadonly","inputType","height","d","paths","_","slotName","useArrayProps","Object","useArray","slots","slotsList","keys","reverse","stopInterrupt","interrupt","variant","startInterrupt","confirm","onClick","timeoutDelay","timeout","onBeforeUnmount","data","onDownload","columns","filename","useDownload","t","documentName","url","hash","rotate","actionKey","ctrlKey","metaKey","clearInterval","interval","onInterval","debouncer","handler","num","time","_g","minWidth","buttonWidth","$listeners","buttonComponentRef","onSearch","showSaveSearchModal","saved","onLoad","onDelete","showExportJsonModal","showImportJsonModal","copyJsonTextarea","jsonValue","focusImportJsonTextarea","importJsonTextarea","importJsonError","importJsonString","focusSaveSearchInput","onSave","keyUpSaveSearchInput","saveSearchId","useSearch","page","limit","sortBy","sortDesc","deep","document","canSave","isDisabled","service","servers","server","status","isDisabling","isEnabling","isRestarting","isStarting","isStopping","alive","pid","isAllowed","isCluster","enable","cluster","hasDisabled","doEnableAll","disable","hasEnabled","doDisableAll","restart","hasAlive","doRestartAll","start","hasDead","doStartAll","stop","doStopAll","acl","includes","enabled","doEnable","doDisable","doRestart","isProtected","doStart","doStop","managed","lazy","services","BaseService","event","buttonRef","replica","total_replicas","updated_replicas","updates_replicas","BaseServiceSaas","available","replicas","BaseServiceSystem","entries","doUpdateAll","doUpdate","BaseSystemdUpdate","title","accept","doUpload","doSkipError","showError","firstError","error","code","FileStore","blob","encoding","module","offsets","chunkSize","newLine","file","lastModified","lastModifiedDate","result","end","getters","isError","types","ERROR","LOADING","actions","setEncoding","commit","setChunkSize","setNewLine","readAsText","readLine","dispatch","lineIndex","Promise","resolve","reject","decoded","TextDecoder","decode","catch","err","undefined","readSlice","reader","FileReader","onerror","abort","onload","Uint8Array","Math","slice","readAsArrayBuffer","readAsDataURL","dataString","base64","split","buildOffset","scan","async","match","lineNumber","offset","c","mutations","READER_PROGRESS","lengthComputable","loaded","total","round","READER_LOAD","SUCCESS","READER_LOADEND","READER_ERROR","SET_PERCENT","SET_READ_AS_TEXT","onprogress","onloadend","SET_ENCODING","SET_CHUNK_SIZE","SET_NEW_LINE","charCodeAt","SET_ERROR","RESET_OFFSETS","SET_OFFSET","namespaced","cumulative","multiple","encode","storeName","close","doClose","contentType","$files","files","contentTypes","console","doReset","formRef","iconProps","spin","scale","doExport","bytes","toHuman","modalParserOptions","show","previewColumnCount","perPage","deletePageColumn","addPageColumn","pageMax","setPage","active","hover","striped","colIndex","linesCount","parseConfig","rowIndex","reservedMappingInvalidFeedback","importMapping","deleteImportMapping","$set","importMappingOptions","o","required","option","importMappingState","getPreview","importMappingInvalidFeedback","staticMap","deleteStaticMapping","staticMappingOptions","focusStaticMapping","staticMappingComponentIs","staticMappingComponentValidator","staticMappingComponentProps","f","addStaticMapping","staticMappingSelect","isMappingValid","importStart","isImporting","importProgress","dryRun","modalImportOptions","hide","enc","importConfig","importSkipOne","importSkipAll","importCancel","modalImportProgress","lastError","insertNew","insertCount","updateExisting","updateCount","skipCount","errorCount","lastLine","line","field","args","inputApiFeedback","prepend","isEmpty","inputOptions","trackBy","inputGroupValues","inputGroupLabel","searchable","clearOnSelect","hideSelected","allowEmpty","resetAfter","closeOnSelect","customLabel","taggable","tagPlaceholder","tagPosition","optionsLimit","groupSelect","internalSearch","preserveSearch","preselectFirst","selectLabel","selectGroupLabel","selectedLabel","deselectLabel","deselectGroupLabel","showLabels","limitText","openDirection","showPointer","onRemove","onTag","singleLabel","ref_option","multipleLabels","onSelectAll","onSelectNone","bind","Multiselect","input","groupLabel","groupValues","options","caseSensitiveSearch","apiFeedback","group","_options","isReadonly","canSelectAll","canSelectNone","showEmpty","BaseFormGroupChosenProps","metaProps","useInputMeta","optionsPromise","useOptionsPromise","useInputValue","inputValueWrapper","_value","unref","optionsIndex","findIndex","useOptionsValue","onInputWrapper","useEventFnWrapper","trackedValue","newValue","extends","BaseFormGroupChosen","onChange","BaseFormGroupToggleProps","i18n","BaseFormGroupToggle","BaseFormGroupChosenOne","BaseFormGroupInput","BaseFormGroupToggleFalseTrue","fields","defaultStaticMapping","isSlotError","importPromise","delimiter","newline","quoteChar","escapeChar","header","trimHeaders","dynamicTyping","preview","worker","comments","complete","download","skipEmptyLines","chunk","fastMode","beforeFirstChunk","withCredentials","transform","stopOnFirstError","yup","fill","set","_importMappingSchema","is","staticMapping","concat","promise","done","exit","lines","Papa","errors","meta","_loadPreview","readLines","loadPage","formatter","ignoreInsertIfNotExists","ignoreUpdateIfExists","isNew","_importStart","resetPage","rootRef","reservedMapping","getStaticMappingOptions","useFormProvideProps","form","schema","useFormProvide","provide","isValid","saveButtonLabel","onClone","onReset","onClose","useFormButtonBarProps","isClone","isCloneable","isDeletable","isSaveable","HTMLFormElement","labelActionKey","labelCreate","labelSave","confirmSave","useFormButtonBar","listeners","canClone","canClose","canDelete","BaseButtonConfirm","inputLength","childComponent","itemDelete","itemAdd","buttonLabel","defaultItem","add","copy","remove","truncate","draggableCopy","draggableAdd","draggableTruncate","draggableRemove","isStriped","draggableListeners","draggableKeys","isSortable","refInFor","draggableProps","draggable","draggableRef","countries","AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","CV","KH","CM","CA","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","UM","US","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","BaseFormGroupChosenOneProps","countryCode","_values","valueCopy","filteredValues","BaseFormGroupChosenMultipleProps","lookup","useInput","useMultipleValueLookupOptions","reduce","labels","BaseFormGroupChosenMultiple","useSingleValueLookupOptions","timezones","continent","timezone","fileDecorated","uploadAccept","onFiles","$props","BaseButtonUpload","get","track","setFormNamespace","trigger","uploadValue","isUpload","isShown","onHidden","onShown","datepickerRef","onToggle","popoverTarget","inputValueDate","onDate","inputValueTime","onTime","dateFormat","timeFormat","popover","$_toolpop","$children","prefixesInRange","prefix","units","p","onChangePrefix","prefixes","multiplier","sort","scaledValue","BaseFormGroupInputProps","doPin","doShow","doHide","reveal","pinned","expirePin","expirePinTimeout","uuid","isShowGenerator","doShowGenerator","doHideGenerator","count","pwlength","doGenerate","upper","lower","digits","special","brackets","high","ambiguous","canTest","doTest","isTesting","test","testLabel","testState","testInvalidFeedback","testValidFeedback","inputRows","maxRows","rows","autoFit","BaseFormGroupTextarea","numInvalid","useFormTabProps","useFormTab","_invalidNodes","useQuerySelectorAll","_visibleInvalidNodes","prototype","call","el","closest","display","className","BaseInputChosenProps","toLowerCase","BaseInputChosen","textFn","BaseInputGroup","defer","deferredValue","BaseInputGroupTextarea","BaseInputProps","BaseInput","BaseInputToggleProps","BaseInputToggle","onSearchAdvanced","onSearchReset","conditionAdvancedWrapped","onLoadAdvanced","advancedMode","titleBasic","onSearchBasic","hideCursor","limits","setLimit","totalRows","customClass","arg","BaseButtonSaveSearch","onMode","oIndex","onMove","onDragStart","onDragEnd","iIndex","isDrag","onAddInnerRule","onDeleteRule","$emit","onAddOuterRule","hasParents","hasSiblings","fieldOptions","operatorOptions","valueComponentIs","valueComponentProps","isLastChild","onAddRule","BaseSearchInputAdvancedRule","op","isNatural","BaseInputToggleAdvancedMode","BaseSearchInputBasic","BaseSearchInputAdvanced","BaseSearchInputLimit","BaseSearchInputPage","setUp","defaultCondition","doSearchCondition","doSearchString","saveSearchLoaded","q","finally","onCommit","column","byKeys","flag","_column","BaseButtonService","BaseButtonServiceSaas","BaseButtonServiceSystem","BaseButtonSystemdUpdate","system_services","systemd","k8s_services","isSaas","k8sServicesSorted","servicesSorted","systemServicesSorted","_obj","selectable","busy","fIndex","isFoot","dragging","dragMove","dragChanged","dragItems","rowsSelected","onRowClicked","not_sortable","tdClass","unformatted","rowSelected","_items","draggedContext","futureIndex","selectRow","unselectRow","selectAllRows","clearSelected","rootClass","uploadFiles","clearFirstError","showErrorModal","setTimeout","closeFile","storeNameFromFile","renderHOCWithScopedSlots","params","h","obj","Function","scopedSlotArray","scopedSlot","useArrayDraggableProps","onAdd","newComponent","onCopy","fromIndex","toIndex","fromComponent","toComponent","oldComponent","onTruncate","useArrayDraggable","uuidv4","lengthAfter","lengthBefore","_newValue","parse","_keys","newKey","move","k","push","splice","newIndex","oldIndex","useTableColumnsItems","formatters","locked","body","row","charAt","csvContentArray","forEach","csvRow","col","toString","replace","join","useMutationObserver","config","_debouncer","createDebouncer","observer","MutationObserver","removeObserver","disconnect","_el","observe","attributes","childList","subtree","selector","querySelectorAll","Blob","window","navigator","msSaveOrOpenBlob","msSaveBlob","elem","createElement","href","URL","createObjectURL","appendChild","click","removeChild","removeEvent","removeEventListener","addEventListener","useEventActionKey","isSameNode","contains","useFormGroupProps","useInputProps","localPlaceholder","inject","localReadonly","doSelect","select","onBlurTimeout","useInputMultiselectProps","BOOL_KEY_LOOKUP","BOOL_QUERY_LOOKUP","_label","rest","useOptionsSearch","caseSensitive","_query","reduced","filtered","currentValueOptions","currentValueLoading","lastCurrentPromise","newLookup","oldValue","oldLookup","thisCurrentPromise","field_name","fieldName","search_path","value_name","valueName","base_url","baseURL","apiCall","request","method","apiBaseURL","Set","cursor","response","_field","searchResultLoading","searchResultOptions","searchDebouncer","lastSearchQuery","lastSearchPromise","_doSearch","trim","thisSearchPromise","mergedOptions","unique","pair","labelA","labelB","localeCompare","tracked","useInputValidatorProps","useInputValidator","recursive","localState","localInvalidFeedback","localValidFeedback","localApiFeedback","localValidator","part","lastPromise","setState","thisPromise","$lastTouch","Date","getTime","validateDebouncer","validate","validationPromise","validateAt","abortEarly","ValidationError","inner","_schema","reach","metaInvalidFeedback","describe","uniqueInner","store","session","apiErrors","apiError","namespaceToYupPath","getFormNamespace","ns","xs","x","v","nsf","nsr","parseInt","useInputValueProps","onUpdate","namespaceArr","customRef","useInputValueToggleProps","useInputValueToggle","valueProps","rxValue","rxOnInput","txValue","txOnInput","mappedValue","mappedPromise","defaultLabel","mappedLabel","defaultColor","mappedColor","defaultIcon","mappedIcon","defaultTooltip","mappedTooltip","getMetaNamespace","properties","useInputMetaProps","namespaceMeta","consumeMeta","_namespaceMeta","allowed","metaAllowed","allowed_lookup","metaAllowedLookup","metaPlaceholder","metaType","fifoOptions","localProps","reactive","prop","useNamespaceMeta","_meta","useNamespaceMetaAllowed","useNamespaceMetaAllowedLookup","useNamespaceMetaAllowedLookupFn","useNamespaceMetaImplied","implied","useFormMetaSchema","getSchemaFromMeta","itemType","min_length","max_length","min_value","max_value","pattern","object","property","array","of","string","nullable","regex","re","RegExp","matches","minAsInt","maxAsInt","useDefaultsFromMeta","defaults","preference","isLoaded","isInterrupted","currentValue","preferences","cache","attributeName","inserted","update","binding","vm","child","setAttribute","getAttribute","removeAttribute","classList","parentNode","unbind","parentNodes","from","getElementsByClassName","MysqlLimits","tinyint","utinyint","smallint","usmallint","mediumint","umediumint","int","uint","bigint","pow","ubigint","MysqlColumn","MysqlString","MysqlNumber","MysqlDatetime","MysqlEnum","MysqlEmail","MysqlMac","MysqlDatabase","node","mac","maxLength","category_id","assign","regdate","format","unregdate","lastskip","time_balance","bandwidth_balance","user_agent","computername","notes","last_arp","last_dhcp","dhcp_fingerprint","dhcp6_fingerprint","dhcp_vendor","dhcp6_enterprise","device_type","device_class","device_version","device_score","device_manufacturer","bypass_vlan","bypass_acls","voip","enum","autoreg","sessionid","machine_account","bypass_role_id","last_seen","valid_from","expiration","access_duration","access_level","category","sponsor","login_remaining","person","firstname","lastname","email","telephone","company","address","anniversary","birthday","gender","nickname","cell_phone","work_phone","building_number","apartment_number","room_number","custom_field_1","custom_field_2","custom_field_3","custom_field_4","custom_field_5","custom_field_6","custom_field_7","custom_field_8","custom_field_9","portal","source","psk","validatorFromColumnSchemas","columnSchemas","columnSchema","mysql","setUnregDateTextFn","reDate","y","m","date","now","compareAsc","year","getYear","normalized","setYear","unreg_date","pfActions","bandwidth_balance_from_source","fieldType","NONE","default_actions","destination_url","mark_as_sponsor","HIDDEN","staticValue","no_action","on_failure","ROOT_PORTAL_MODULE","on_success","role_from_source","set_access_duration","DURATION","set_access_duration_by_acl_user","DURATION_BY_ACL_USER","set_access_durations","DURATIONS","set_access_level","ADMINROLE","set_access_level_by_acl_user","ADMINROLE_BY_ACL_USER","set_bandwidth_balance","PREFIXMULTIPLIER","set_role","ROLE","set_role_by_name","ROLE_BY_NAME","set_role_by_acl_user","ROLE_BY_ACL_USER","set_role_on_not_found","set_role_from_source","SELECTONE","set_time_balance","TIME_BALANCE","trigger_radius_mfa","trigger_portal_mfa","set_unreg_date","DATE","set_unreg_date_by_acl_user","time_balance_from_source","unregdate_from_source","unregdate_from_sponsor_source","pfActionsTransliterations","transliterations","pfActionSchema","when","pfActionsSchema","ensure","ifThenRestricts","ifThenRequires","pfComponentType","DATETIME","INTEGER","SELECTMANY","SUBSTRING","TOGGLE","TIME","pfFieldType","CONNECTION","CONNECTION_TYPE","CONNECTION_SUB_TYPE","GENDER","NODE_STATUS","LDAPATTRIBUTE","LDAPFILTER","RADIUSATTRIBUTE","YESNO","OPTIONS","REALM","ROLE_BY_ACL_NODE","SOURCE","SSID","SWITCHE","SWITCH_GROUP","TIME_PERIOD","pfFieldTypeComponent","operatorMap","is_not","starts","equals","not_equals","ends","matches_regexp","is_member_of","pfFieldTypeOperators","pfFieldTypeValues","Error","useField","BaseInputChosenMultiple","BaseInputChosenOne","BaseInputGroupDate","BaseInputGroupDateTime","BaseInputGroupMultiplier","BaseInputNumber","locales","en","require","fr","pfFormatters","noAdminRolePermission","datetimeIgnoreZero","categoryId","$can","roles","role","categoryIdFromIntOrString","bypassRoleId","yesNoFromString","genderFromString","fileSize","shortDateTime","filters","pfLocales","localeStrings","SERVICES_DISABLED_SUCCESS","SERVICES_DISABLED_ERROR","SERVICES_PROTECTED_DISABLED_ERROR","SERVICES_ENABLED_SUCCESS","SERVICES_ENABLED_ERROR","SERVICES_PROTECTED_ENABLED_ERROR","SERVICES_RESTARTED_SUCCESS","SERVICES_RESTARTED_ERROR","SERVICES_PROTECTED_RESTARTED_ERROR","SERVICES_STARTED_SUCCESS","SERVICES_STARTED_ERROR","SERVICES_STOPPED_SUCCESS","SERVICES_STOPPED_ERROR","SYSTEMD_UPDATED_SUCCESS","SYSTEMD_UPDATED_ERROR","SERVICES_K8S_RESTARTED_SUCCESS","SERVICES_K8S_RESTARTED_ERROR","pfSearchConditionType","BOOL","LIST","LISTEXTEND","PREFIXMULTIPLE","ONLINE","NAS_PORT_TYPE","SWITCH_IP","CONNECTION_PROFILE","DOMAIN","SECURITY_EVENT","pfSearchConditionValue","TEXT","SELECT","NUMBER","pfConditionOperators","pfSearchConditionValues","securityEvent","desc","pfSearchOperatorsForTypes","operators","pfSearchValuesForOperator","operator","found","tree","fingerbank","extras","pfTemplatePlugin","install","Vue","$strong","element","innerText","warnings","canRoute","$route","startsWith","apiOK","chartsOK","isDebug","showDocumentationViewer","toggleDocumentationViewer","isAuthenticated","isConfiguratorActive","warning","to","toLabel","documentationViewerClass","version","gitCommitId","hostname","percentage","$debouncer","fullscreen","toggleFullscreen","closeViewer","openExternal","loadDocument","isInitializing","documentationPath","initDocument","image","alt","showImageModal","src","mixin","beforeRouteLeave","isInitializingTimeout","documentFrame","css","head","links","link","images","_image","VueScrollTo","cancelable","refDocument","refDocumentList","openViewer","markAsRead","notification","clipboard","unread","success","skipped","failed","timestamp","clear","notEmpty","IconCounter","notifications","dismiss","newNotifications","AppApiProgress","AppDocumentation","AppLogin","AppNotifications","AppNotificationToasts","routes","navigatorLanguage","settings","Icon","register","icons","ignoredElements","devtools","process","performance","use","VueTimeago","BootstrapVue","CompositionApi","PiniaVuePlugin","pinia","createPinia","App","router","$mount","loginSuccessful","previousRoute","setPreviousRoute","beforeRouteEnter","next","route","alias","TheView","beforeEnter","resetVuexStore","sections","SectionSidebar","chartsCall","axios","location","port","interceptors","charts","ip","chart","alarms","STORAGE_CHARTS_KEY","allCharts","allChartsStatus","localStorage","getItem","alarmsStatus","uniqueCharts","j","hostsForChart","find","all","api","getChart","addChart","definition","library","cols","setItem","ALL_CHARTS_REQUEST","ALL_CHARTS_UPDATED","first","ALL_CHARTS_ERROR","CHARTS_UPDATED","warn","ALARMS_REQUEST","ALARMS_UPDATED","ALARMS_ERROR","isFailRoute","$_fingerbank","registerModule","FingerbankStoreModule","$_nodes","NodesStoreModule","$_status","StoreModule","selectedDevices","usePreference","selectedHosts","selectedProtocols","tabular","device","all_hosts_cache","decorateDevice","hosts_cache","host","device_cache","protocols","_protocol","protocol","decorateProtocol","selected","splitHost","splitProtocol","byDevice","devices","hosts","nodes","fingerbankCommunications","getDebounced","toggleDevice","deselectDevices","indexOf","selectDevices","invertDevices","toggleHost","selectedHost","deselectHosts","selectHosts","invertHosts","toggleProtocol","selectedProtocol","deselectProtocols","selectProtocols","invertProtocols","REQUEST","RESPONSE","DEVICE_DESELECT","DEVICE_SELECT","HOST_DESELECT","HOST_SELECT","PROTOCOL_DESELECT","PROTOCOL_SELECT","$_bases","BasesStoreModule","$_fingerbank_communication","FingerbankCommunicationStoreModule","totalOpen","totalClosed","totalPending","perDeviceClassOpen","perDeviceClassClosed","perDeviceClassPending","perSecurityEventOpen","perSecurityEventClosed","perSecurityEventPending","assoc","security_event_id","stat","securityEventsApi","nodesApi","TOTAL_OPEN","TOTAL_CLOSED","TOTAL_PENDING","PER_DEVICE_CLASS_OPEN","deviceClasses","PER_DEVICE_CLASS_CLOSED","PER_DEVICE_CLASS_PENDING","PER_SECURITY_EVENT_OPEN","securityEvents","PER_SECURITY_EVENT_CLOSED","PER_SECURITY_EVENT_PENDING","$_security_events","SecurityEventsStoreModule","$_network_threats","NetworkThreatsStoreModule","securityEventIds","StatusStore","children","DashboardRoutes","AssetsRoutes","QueueRoutes","NetworkCommunicationRoutes","NetworkThreatsRoutes","ServicesRoutes","ServicesSaasRoutes","redirect","cPath","verb","action","StatusView","$some","transitionDelay","reports","depth","date_field","has_date_range","searches","collapsable","pointer","encodeURIComponent","TheIndex","$_reports","analytics","create","post","delete","getQuiet","touch","postQuiet","running","paused","filter_is_regexp","background","order","output","events","scopes","log_level","syslog_name","debouncerMs","touchMs","isRunning","isPaused","isFiltered","scope","eventsFiltered","fk","log_without_prefix","a","setSession","setOptions","stopSession","session_id","getSession","pauseSession","unpauseSession","touchSession","toggleFilter","setSize","clearEvents","addMeta","b","r","delMeta","SET_SESSION","SET_OPTIONS","LOG_SESSION_QUEUE","LOG_SESSION_REQUEST","LOG_SESSION_RESPONSE","LOG_SESSION_STOPPING","LOG_SESSION_STOPPED","LOG_SESSION_PAUSE","setInterval","LOG_SESSION_UNPAUSE","LOG_SESSION_SUCCESS","LOG_SESSION_ERROR","LOG_FILTER_ENABLE","LOG_FILTER_DISABLE","UPDATE_FILTERS","UPDATE_SIZE","CLEAR_EVENTS","CLEAR_COUNTS","sessions","exec","optionsSession","createSession","destroySession","LOG_SESSION_START","nameFromFiles","SessionStore","LOG_SESSION_STOP","unregisterModule","TheForm","$_live_logs","AdminApiLogsRoutes","DhcpOption82LogsRoutes","DnsLogsRoutes","RadiusLogsRoutes","LiveLogsRoutes","TheTabs","tab","GeneralSettingsRoutes","DeviceChangeDetectionRoutes","CombinationsRoutes","DevicesRoutes","DhcpFingerprintsRoutes","Dhcpv6EnterprisesRoutes","Dhcpv6FingerprintsRoutes","DhcpVendorsRoutes","MacVendorsRoutes","UserAgentsRoutes","routesWithStore","$_pkis","CasRoutes","CertsRoutes","ProfilesRoutes","RevokedCertsRoutes","InterfacesRoutes","Layer2NetworksRoutes","RoutedNetworksRoutes","$_roles","RolesStoreModule","$_interfaces","InterfacesStoreModule","$_layer2_networks","Layer2NetworksStoreModule","$_routed_networks","RoutedNetworksStoreModule","$_certificates","GeneralRoutes","EapRoutes","FastRoutes","OcspRoutes","SslRoutes","TlsRoutes","PoliciesAccessControlSection","ComplianceSection","IntegrationSection","AdvancedAccessConfigurationSection","NetworkConfigurationSection","SystemConfigurationSection","ConfigurationView","RolesRoutes","DomainsRoutes","RealmsRoutes","SourcesRoutes","SwitchesRoutes","SwitchGroupsRoutes","ConnectionProfilesRoutes","FingerbankRoutes","NetworkBehaviorPoliciesRoutes","ScanEnginesRoutes","SecurityEventsRoutes","CloudsRoutes","FirewallsRoutes","WebServicesRoutes","SwitchTemplatesRoutes","SyslogParsersRoutes","SyslogForwardersRoutes","WrixRoutes","PkiRoutes","MfasRoutes","FilterEnginesRoutes","CaptivePortalRoutes","BillingTiersRoutes","PkiProvidersRoutes","ProvisionersRoutes","PortalModulesRoutes","AccessDurationsRoutes","SelfServicesRoutes","EventLoggersRoutes","NetworksRoutes","FloatingDevicesRoutes","SnmpTrapsRoutes","AlertingRoutes","AdvancedRoutes","MaintenanceTasksRoutes","MonitRoutes","DatabaseRoutes","ActiveActiveRoutes","RadiusRoutes","DnsRoutes","AdminLoginRoutes","AdminRolesRoutes","SslCertificatesRoutes","ConnectorsRoutes","PreferencesView","$_users","UsersStoreModule","mounted","ResetView","resetStore","Router","DefaultRoute","LoginRoute","StatusRoute","ReportsRoute","AuditingRoute","NodesRoute","UsersRoute","ConfigurationRoute","ConfiguratorRoute","PreferencesRoute","ResetRoute","beforeEach","transitionRoute","matched","currentPath","fullPath","substring","token","expire","previousPath","afterEach","routeData","scrollTo","system","summary","observable","useQuery","initialState","initialized","unsubscribe","init","send_anonymous_stats","quiet","summaryNoPii","mixpanel","api_host","app_host","cdn","api_payload_format","cross_subdomain_cookie","persistence","persistence_name","cookie_name","store_google","save_referrer","verbose","img","track_pageview","track_links_timeout","cookie_expiration","upgrade","disable_persistence","disable_cookie","secure_cookie","property_blacklist","ignore_dnt","debug","subscribeAction","storeAction","storeState","payload","isCollection","isGetter","isIgnore","isOptions","isTracked","_type","_prefix","trackNoPii","os","trackEvent","eventName","eventData","trackRoute","INIT","ROUTE","clean","fromName","fromParams","fromMatched","fromTrack","fromPath","fromUrl","param","toName","toParams","toMatched","toTrack","toPath","toUrl","SUMMARY","SUBSCRIBED","UNSUBSCRIBE","$RESET","unit2str","unit","isPlural","plural","unit2seconds","duration","serialize","base","extendedInterval","extendedUnit","str","deserialize","__","abs","baseStr","encodeURL","isArray","segment","getAdminRoles","getBaseActiveActive","getBaseAdvanced","getBaseAlerting","getBaseCaptivePortal","getBaseDatabase","getBaseDatabaseAdvanced","getBaseDatabaseEncryption","getBaseFencing","getBaseFingerbankDeviceChange","getBaseGeneral","getBaseGuestsAdminRegistration","getBaseInline","getBaseMseTab","getBaseNetwork","getBaseNodeImport","getBaseParking","getBasePFDHCP","getBasePorts","getBaseProvisioning","getBaseRadiusConfiguration","getBaseDnsConfiguration","getBaseServices","getBaseSNMPTraps","getBaseWebServices","getBillingTiers","getClouds","getConnectionProfiles","getConnectors","getDomains","getEventLoggers","getFilterEngines","collection","getFirewalls","getFloatingDevices","getInterfaces","getLayer2Networks","getNetworkBehaviorPolicies","getMaintenanceTasks","getMfas","getPkiCas","getPkiProfiles","getPkiCerts","getPkiProviders","getPortalModules","getProvisionings","getRadiusEaps","getRadiusFasts","getRadiusOcsps","getRadiusSsls","getRadiusTlss","getRealms","getRemoteConnectionProfiles","getRoles","getRoutedNetworks","getScans","getSecurityEvents","getSelfServices","getSources","getSsids","getSwitches","raw","getSwitchGroups","getSwitchGroupMembers","getSwitchTemplates","getSyslogForwarders","getSyslogParsers","getWrixLocations","flattenCondition","parseCondition","adminRoles","adminRolesStatus","baseActiveActive","baseActiveActiveStatus","baseAdvanced","baseAdvancedStatus","baseAlerting","baseAlertingStatus","baseCaptivePortal","baseCaptivePortalStatus","baseDatabase","baseDatabaseAdvanced","baseDatabaseAdvancedStatus","baseDatabaseEncryption","baseDatabaseEncryptionStatus","baseDatabaseStatus","baseFencing","baseFencingStatus","baseFingerbankDeviceChange","baseFingerbankDeviceChangeStatus","baseGeneral","baseGeneralStatus","baseGuestsAdminRegistration","baseGuestsAdminRegistrationStatus","baseInline","baseInlineStatus","baseMseTab","baseMseTabStatus","baseNetwork","baseNetworkStatus","baseNodeImport","baseNodeImportStatus","basePFDHCP","basePFDHCPStatus","baseParking","baseParkingStatus","basePorts","basePortsStatus","baseProvisioning","baseProvisioningStatus","baseRadiusConfiguration","baseRadiusConfigurationStatus","baseDnsConfiguration","baseDnsConfigurationStatus","baseSNMPTraps","baseSNMPTrapsStatus","baseServices","baseServicesStatus","baseWebServices","baseWebServicesStatus","billingTiers","billingTiersStatus","clouds","cloudsStatus","connectionProfiles","connectionProfilesStatus","connectors","connectorsStatus","domains","domainsStatus","eventLoggers","eventLoggersStatus","filterEngines","filterEnginesStatus","firewalls","firewallsStatus","floatingDevices","floatingDevicesStatus","interfaces","interfacesStatus","layer2Networks","layer2NetworksStatus","maintenanceTasks","maintenanceTasksStatus","mfas","mfasStatus","networkBehaviorPolicies","networkBehaviorPoliciesStatus","pkiCas","pkiCasStatus","pkiProfiles","pkiProfilesStatus","pkiCerts","pkiCertsStatus","pkiProviders","pkiProvidersStatus","portalModules","portalModulesStatus","provisionings","provisioningsStatus","radiusEaps","radiusEapsStatus","radiusFasts","radiusFastsStatus","radiusOcsps","radiusOcspsStatus","radiusSsls","radiusSslsStatus","radiusTlss","radiusTlssStatus","realms","realmsStatus","rolesStatus","routedNetworks","routedNetworksStatus","scans","scansStatus","securityEventsStatus","selfServices","selfServicesStatus","sources","sourcesStatus","ssids","ssidsStatus","switchGroups","switchGroupsStatus","switchTemplates","switchTemplatesStatus","switches","switchesStatus","syslogForwarders","syslogForwardersStatus","syslogParsers","syslogParsersStatus","wrixLocations","wrixLocationsStatus","helpers","sortSecurityEvents","sortedIds","aDesc","bDesc","sortedSecurityEvents","isLoadingAdminRoles","isLoadingBaseActiveActive","isLoadingBaseAdvanced","isLoadingBaseAlerting","isLoadingBaseCaptivePortal","isLoadingBaseDatabase","isLoadingBaseDatabaseAdvanced","isLoadingBaseDatabaseEncryption","isLoadingBaseFencing","isLoadingBaseFingerbankDeviceChange","isLoadingBaseGeneral","isLoadingBaseGuestsAdminRegistration","isLoadingBaseInline","isLoadingBaseMseTab","isLoadingBaseNetwork","isLoadingBaseNodeImport","isLoadingBaseParking","isLoadingBasePFDHCP","isLoadingBasePorts","isLoadingBaseProvisioning","isLoadingBaseRadiusConfiguration","isLoadingBaseServices","isLoadingBaseSNMPTraps","isLoadingBaseWebServices","isLoadingBillingTiers","isLoadingClouds","isLoadingConnectionProfiles","isLoadingConnectors","isLoadingSelfServices","isLoadingDomains","isLoadingEventLoggers","isLoadingFilterEngines","isLoadingFirewalls","isLoadingFloatingDevices","isLoadingInterfaces","isLoadingLayer2Networks","isLoadingMaintenanceTasks","isLoadingMfas","isLoadingNetworkBehaviorPolicies","isLoadingPkiCas","isLoadingPkiProfiles","isLoadingPkiCerts","isLoadingPkiProviders","isLoadingPortalModules","isLoadingProvisionings","isLoadingRadiusEaps","isLoadingRadiusFasts","isLoadingRadiusOcsps","isLoadingRadiusSsls","isLoadingRadiusTlss","isLoadingRealms","isLoadingRoles","isLoadingRoutedNetworks","isLoadingScans","isLoadingSecurityEvents","isLoadingSources","isLoadingSsids","isLoadingSwitches","isLoadingSwitchGroups","isLoadingSwitchTemplates","isLoadingSyslogForwarders","isLoadingSyslogParsers","isLoadingWrixLocations","accessDurationsList","access_duration_choices","accessDuration","adminRolesList","domainsList","connectionProfilesList","description","portalModulesList","realmsList","list","rolesList","rootPortalModulesList","sourcesList","ssidsList","ssid","switchGroupsList","switchesList","securityEventsList","resetAdminRoles","isLoadingBaseDnsConfiguration","resetPkiCas","resetPkiProfiles","resetPkiCerts","resetRealms","promises","switchGroup","members","stringifyCondition","json","condition","condition_string","ADMIN_ROLES_REQUEST","ADMIN_ROLES_UPDATED","BASE_ACTIVE_ACTIVE_REQUEST","BASE_ACTIVE_ACTIVE_UPDATED","BASE_ADVANCED_REQUEST","BASE_ADVANCED_UPDATED","BASE_ALERTING_REQUEST","BASE_ALERTING_UPDATED","BASE_CAPTIVE_PORTAL_REQUEST","BASE_CAPTIVE_PORTAL_UPDATED","BASE_DATABASE_REQUEST","BASE_DATABASE_UPDATED","BASE_DATABASE_ADVANCED_REQUEST","BASE_DATABASE_ADVANCED_UPDATED","BASE_DATABASE_ENCRYPTION_REQUEST","BASE_DATABASE_ENCRYPTION_UPDATED","BASE_FENCING_REQUEST","BASE_FENCING_UPDATED","BASE_FINGERBANK_DEVICE_CHANGE_REQUEST","BASE_FINGERBANK_DEVICE_CHANGE_UPDATED","BASE_GENERAL_REQUEST","BASE_GENERAL_UPDATED","BASE_GUESTS_ADMIN_REGISTRATION_REQUEST","BASE_GUESTS_ADMIN_REGISTRATION_UPDATED","BASE_GUESTS_ADMIN_REGISTRATION_DELETED","BASE_INLINE_REQUEST","BASE_INLINE_UPDATED","BASE_MSE_TAB_REQUEST","BASE_MSE_TAB_UPDATED","BASE_NETWORK_REQUEST","BASE_NETWORK_UPDATED","BASE_NODE_IMPORT_REQUEST","BASE_NODE_IMPORT_UPDATED","BASE_PARKING_REQUEST","BASE_PARKING_UPDATED","BASE_PFDHCP_REQUEST","BASE_PFDHCP_UPDATED","BASE_PORTS_REQUEST","BASE_PORTS_UPDATED","BASE_PROVISIONING_REQUEST","BASE_PROVISIONING_UPDATED","BASE_RADIUS_CONFIGURATION_REQUEST","BASE_RADIUS_CONFIGURATION_UPDATED","BASE_DNS_CONFIGURATION_REQUEST","BASE_DNS_CONFIGURATION_UPDATED","BASE_SERVICES_REQUEST","BASE_SERVICES_UPDATED","BASE_SNMP_TRAPS_REQUEST","BASE_SNMP_TRAPS_UPDATED","BASE_WEBSERVICES_REQUEST","BASE_WEBSERVICES_UPDATED","BILLING_TIERS_REQUEST","BILLING_TIERS_UPDATED","CLOUDS_REQUEST","CLOUDS_UPDATED","CONNECTION_PROFILES_REQUEST","CONNECTION_PROFILES_UPDATED","CONNECTORS_REQUEST","CONNECTORS_UPDATED","DOMAINS_REQUEST","DOMAINS_UPDATED","EVENT_LOGGERS_REQUEST","EVENT_LOGGERS_UPDATED","FILTER_ENGINES_REQUEST","FILTER_ENGINES_UPDATED","FILTER_ENGINES_DELETED","FIREWALLS_REQUEST","FIREWALLS_UPDATED","FLOATING_DEVICES_REQUEST","FLOATING_DEVICES_UPDATED","INTERFACES_REQUEST","INTERFACES_UPDATED","LAYER2_NETWORKS_REQUEST","LAYER2_NETWORKS_UPDATED","MAINTENANCE_TASKS_REQUEST","MAINTENANCE_TASKS_UPDATED","MFAS_REQUEST","MFAS_UPDATED","NETWORK_BEHAVIOR_POLICIES_REQUEST","NETWORK_BEHAVIOR_POLICIES_UPDATED","PKI_CAS_REQUEST","PKI_CAS_UPDATED","PKI_CAS_RESET","PKI_PROFILES_REQUEST","PKI_PROFILES_UPDATED","PKI_PROFILES_RESET","PKI_CERTS_REQUEST","PKI_CERTS_UPDATED","PKI_CERTS_RESET","PKI_PROVIDERS_REQUEST","PKI_PROVIDERS_UPDATED","PORTAL_MODULES_REQUEST","PORTAL_MODULES_UPDATED","PROVISIONINGS_REQUEST","PROVISIONINGS_UPDATED","RADIUS_EAPS_REQUEST","RADIUS_EAPS_UPDATED","eaps","RADIUS_FASTS_REQUEST","RADIUS_FASTS_UPDATED","RADIUS_OCSPS_REQUEST","RADIUS_OCSPS_UPDATED","RADIUS_SSLS_REQUEST","RADIUS_SSLS_UPDATED","RADIUS_TLSS_REQUEST","RADIUS_TLSS_UPDATED","REALMS_REQUEST","REALMS_UPDATED","REALMS_RESET","ROLES_REQUEST","ROLES_UPDATED","ROUTED_NETWORKS_REQUEST","ROUTED_NETWORKS_UPDATED","SCANS_REQUEST","SCANS_UPDATED","SECURITY_EVENTS_REQUEST","SECURITY_EVENTS_UPDATED","SELF_SERVICES_REQUEST","SELF_SERVICES_UPDATED","SOURCES_REQUEST","SOURCES_UPDATED","SSIDS_REQUEST","SSIDS_UPDATED","SWITCHES_REQUEST","SWITCHES_UPDATED","SWITCH_GROUPS_REQUEST","SWITCH_GROUPS_UPDATED","SWITCH_GROUPS_ERROR","SWITCH_TEMPLATES_REQUEST","SWITCH_TEMPLATES_UPDATED","SWITCH_TEMPLATES_ERROR","SYSLOG_FORWARDERS_REQUEST","SYSLOG_FORWARDERS_UPDATED","SYSLOG_PARSERS_REQUEST","SYSLOG_PARSERS_UPDATED","WRIX_LOCATIONS_REQUEST","WRIX_LOCATIONS_UPDATED","getDocuments","documentationCall","getDocument","showViewer","requestStatus","getIndex","toggleViewer","setPath","setHash","substr","showImage","parsed","pathname","INDEX_REQUEST","INDEX_SUCCESS","INDEX_ERROR","DOCUMENT_REQUEST","DOCUMENT_SUCCESS","DOCUMENT_ERROR","VIEWER_OPEN","VIEWER_CLOSE","FULLSCREEN_ON","FULLSCREEN_OFF","SET_PATH","SET_HASH","ts","delay","grace","getServices","aside","getService","restartService","pollServices","K8S_REQUEST","K8S_SERVICES_SUCCESS","merged","K8S_SERVICES_ERROR","K8S_SERVICE_SUCCESS","K8S_SERVICE_ERROR","K8S_POLL_START","K8S_POLL_STOP","K8S_RESTARTING","K8S_RESTARTED","newState","doLookup","lookupStatus","getFields","vendor","allowed_values","getSearchPath","postSearchPath","searchPath","LOOKUP_REQUEST","LOOKUP_SUCCESS","LOOKUP_ERROR","hideDelay","info","new","danger","status_success","status_skipped","status_failed","NOTIFICATION","NOTIFICATION_UNMARK_NEW","NOTIFICATION_UNMARK_UNREAD","NOTIFICATION_DISMISS","onParPercentile","heartbeatInterval","benchmarks","minCacheTime","getPercentage","eta","getEta","log","exp","isNaN","maxEta","getBenchmark","urlParts","urlPart","_num","_time","pop","startRequest","stopRequest","dropRequest","START_HEARTBEAT","STOP_HEARTBEAT","ADD_CACHE","req","PRUNE_CACHE","START_BENCHMARK","urlIndex","STOP_BENCHMARK","DROP_BENCHMARK","headers","retries","POLL_RETRY_NUM","POLL_RETRY_INTERVAL","pollTaskStatus","task_id","getStats","stats","tasks","PFQUEUE_REQUEST","PFQUEUE_SUCCESS","PFQUEUE_ERROR","getPreference","allPreferences","removePreference","deleteQuiet","setPreference","_data","created_at","updated_at","putQuiet","requestType","currentId","INITIALIZING","READING","WRITING","DELETING","isReading","isWriting","isReadingId","isWritingId","setDebounced","PREFERENCE_READ","PREFERENCE_WRITE","PREFERENCE_DELETE","PREFERENCE_INITIALIZE","PREFERENCE_DECLARE","PREFERENCE_REQUEST","PREFERENCE_UPDATED","PREFERENCE_DELETED","PREFERENCE_ERROR","_state","getAttributes","RADIUS_ATTRIBUTES_REQUEST","RADIUS_ATTRIBUTES_SUCCESS","RADIUS_ATTRIBUTES_ERROR","STORAGE_TOKEN_KEY","login","user","common","setToken","getTokenInfo","getSsoInfo","getLanguage","getAllowedNodeRoles","getAllowedUserAccessDurations","getAllowedUserAccessLevels","getAllowedUserActions","getAllowedUserRoles","getAllowedUserUnregDate","getAdvanced","loginStatus","loginPromise","loginResolver","configuratorEnabled","configuratorActive","expires_at","expired","isLoadingAllowedNodeRoles","isLoadingAllowedUserAccessDurations","isLoadingAllowedUserAccessLevels","isLoadingAllowedUserActions","isLoadingAllowedUserRoles","isLoadingAllowedUserUnregDate","allowedNodeRoles","allowedNodeRolesStatus","allowedUserAccessDurations","allowedUserAccessDurationsStatus","allowedUserAccessLevels","allowedUserAccessLevelsStatus","allowedUserActions","allowedUserActionsStatus","allowedUserRoles","allowedUserRolesStatus","allowedUserUnregDate","allowedUserUnregDateStatus","ssoInfo","getSessionTime","isLoadingAllowedNodeRolesStatus","isLoadingAllowedUserAccessDurationsStatus","isLoadingAllowedUserActionsStatus","isLoadingAllowedUserRolesStatus","isLoadingAllowedUserUnregDateStatus","allowedNodeRolesList","allowedUserAccessDurationsList","_accessDuration","allowedUserAccessLevelsList","_accessLevel","accessLevel","allowedUserRolesList","aclContext","is_enabled","login_url","login_text","load","setupAcl","removeItem","reset","resolveLogin","hasAccess","logout","admin_roles","admin_actions","ignoreCache","messages","lexicon","setLocaleMessage","setI18nLanguage","getConfiguratorState","advanced","configurator","updateConfiguratorState","LOGIN_REQUEST","LOGIN_SUCCESS","LOGIN_ERROR","CONFIGURATOR_ENABLED","CONFIGURATOR_DISABLED","CONFIGURATOR_ACTIVE","CONFIGURATOR_INACTIVE","TOKEN_UPDATED","TOKEN_DELETED","USERNAME_UPDATED","USERNAME_DELETED","EXPIRED","EXPIRES_AT_UPDATED","expiresAt","EXPIRES_AT_DELETED","ROLES_DELETED","API_OK","API_ERROR","API_ERRORS","CHARTS_OK","CHARTS_ERROR","ADMIN_ROLES_DELETED","ALLOWED_NODE_ROLES_REQUEST","ALLOWED_NODE_ROLES_UPDATED","ALLOWED_NODE_ROLES_DELETED","ALLOWED_USER_ACCESS_DURATIONS_REQUEST","ALLOWED_USER_ACCESS_DURATIONS_UPDATED","ALLOWED_USER_ACCESS_DURATIONS_DELETED","ALLOWED_USER_ACCESS_LEVELS_REQUEST","ALLOWED_USER_ACCESS_LEVELS_UPDATED","ALLOWED_USER_ACCESS_LEVELS_DELETED","ALLOWED_USER_ACTIONS_REQUEST","ALLOWED_USER_ACTIONS_UPDATED","ALLOWED_USER_ACTIONS_DELETED","ALLOWED_USER_ROLES_REQUEST","ALLOWED_USER_ROLES_UPDATED","ALLOWED_USER_ROLES_DELETED","ALLOWED_USER_UNREG_DATE_REQUEST","ALLOWED_USER_UNREG_DATE_UPDATED","ALLOWED_USER_UNREG_DATE_DELETED","LANGUAGES_UPDATED","SSO_INFO_UPDATED","querySelector","getSummary","getDnsServers","getGateway","getHostname","setDnsServers","put","dns_servers","setGateway","gateway","setHostname","isInline","is_inline_configured","readonlyMode","readonly_mode","git_commit_id","saas","SYSTEM_REQUEST","SYSTEM_SUCCESS","SYSTEM_ITEM_SUCCESS","SYSTEM_ERROR","Vuex","DISABLING","DRYRUN","ENABLING","REASSIGNING","RESTARTING","STARTING","STOPPING","modules","documentation","k8s","pfqueue","radius","strict","_modules","_children","management_ip","systemService","restartSystem","startSystem","stopSystem","updateSystemd","UPDATING","protectedServices","clusterIPs","servicesByServer","sorted","listed","systemServicesByServer","systemdByServer","isUpdating","getConfig","withServices","getServiceCluster","disableService","disableServiceCluster","idx","enableService","enableServiceCluster","restartServiceCluster","startService","startServiceCluster","stopService","stopServiceCluster","getSystemService","getSystemServiceCluster","restartSystemService","restartSystemServiceCluster","startSystemService","startSystemServiceCluster","stopSystemService","stopSystemServiceCluster","updateSystemdCluster","CONFIG_REQUEST","CONFIG_IS_CLUSTER","CONFIG_SUCCESS","CONFIG_ERROR","SERVICES_REQUEST","SERVICES_SUCCESS","_services","SERVICES_ERROR","SERVICE_REQUEST","SERVICE_SUCCESS","SERVICE_DISABLING","SERVICE_DISABLED","SERVICE_ENABLING","SERVICE_ENABLED","SERVICE_RESTARTING","SERVICE_RESTARTED","SERVICE_STARTING","SERVICE_STARTED","SERVICE_STOPPING","SERVICE_STOPPED","SERVICE_ERROR","consructor","SYSTEM_SERVICE_REQUEST","SYSTEM_SERVICE_SUCCESS","SYSTEM_SERVICE_RESTARTING","SYSTEM_SERVICE_RESTARTED","SYSTEM_SERVICE_STARTING","SYSTEM_SERVICE_STARTED","SYSTEM_SERVICE_STOPPING","SYSTEM_SERVICE_STOPPED","SYSTEM_SERVICE_ERROR","SYSTEMD_REQUEST","SYSTEMD_SUCCESS","SYSTEMD_ERROR","ADMIN_ROLES_ACTIONS","Acl","$every","currentAction","endsWith","rule","failRoute","failRoutes","failIndex","VueAcl","caseMode","VUE_APP_API_BASEURL","_encodeURL","methodsWithoutData","nocache","methodsWithData","transformResponse","jsonData","getArrayBuffer","responseType","optionsQuiet","patchQuiet","apiServer","decodeURIComponent","groupEnd","firstTransform","fileUploadPaths","abbr","suffix","precision","abbreviate","quotient","parseFloat","toFixed","valueToSelectValue","intsToStrings","longDateTime","localeObject","localeFormat","relativeDate","distanceInWordsToNow","CustomFormatter","_locale","_formatter","MessageFormat","_caches","interpolate","compile","VueI18n","Formatter","silentTranslationWarn","missing","ipv4ToInt","oct","intToIpv4","cidrToIpv4","cidr","cidrToRange","bits","host_bits","connectionTypeToAttributes","connectionType","cType","isWired","isWireless","isSNMP","isEAP","is8021X","isMacAuth","ipv4NetmaskToSubnet","netmask","_ip","_netmask","n","subnet","ipv4Sort","intA","intB","ipv4InSubnet","_subnet","s","generate","conf","charRanges","ranges","range","charset","randomPassword","random","reAlphaNumeric","reAlphaNumericHyphenUnderscoreDot","reCommonName","reEmail","reDomain","reIpv4","reIpv6","reFilename","reMac","reNumeric","reStaticRoute","reAscii","toKebabCase","delim","fromCharCode","utf8ToBase64","btoa","replacer","inputString","BOMit","nonAsciiChars","point","nextcode","mixed","cmpFn","hashFn","cmp","ifIterFn","requiresIterFn","restrictsIterFn","maxValue","minValue","ipv4","network","extra","isCommonName","isFQDN","comparison","_date","createError","emails","extensions","mime","contentTypeMs","contentTypeLs","valid","allowedMs","allowedLs","parts","tld","addresses","_enum","STORAGE_SEARCH_LIMIT_KEY","STORAGE_VISIBLE_COLUMNS_KEY","results","itemStatus","searchStatus","searchFields","searchQuery","searchSortBy","searchSortDesc","searchMaxPageNumber","searchPageSize","visibleColumns","isLoadingResults","setSearchFields","setSearchQuery","setSearchPageSize","setSearchSorting","setVisibleColumns","apiPromise","SEARCH_FIELDS_UPDATED","SEARCH_QUERY_UPDATED","SEARCH_SORT_BY_UPDATED","SEARCH_SORT_DESC_UPDATED","SEARCH_MAX_PAGE_NUMBER_UPDATED","SEARCH_LIMIT_UPDATED","SEARCH_REQUEST","SEARCH_SUCCESS","nextPage","floor","nextCursor","SEARCH_ERROR","VISIBLE_COLUMNS_UPDATED","ITEM_REQUEST","ITEM_REPLACED","ITEM_ERROR","useRouter","goToCollection","goToItem","TheSearch","$_admin_api_audit_logs","$_dhcpoption82_logs","setPassthroughs","passthroughs","patch","$_dns_logs","$_radius_logs","listOptions","allowed_actions","itemOptions","goToClone","goToNew","$_admin_roles","useStore","getList","getListOptions","createItem","not_deletable","getItemOptions","updateItem","deleteItem","isWaiting","getAdminRole","createAdminRole","updateAdminRole","deleteAdminRole","ITEM_DESTROYED","ITEM_SUCCESS","bases","baseOptions","updateBase","secureDatabase","createDatabase","assignDatabase","testDatabase","testSmtp","general","getBase","fqdn","domain","getActiveActive","optionsActiveActive","updateActiveActive","getAdminLogin","optionsAdminLogin","updateAdminLogin","optionsAdvanced","updateAdvanced","getAlerting","optionsAlerting","updateAlerting","getCaptivePortal","optionsCaptivePortal","updateCaptivePortal","getDatabase","optionsDatabase","updateDatabase","getDatabaseAdvanced","optionsDatabaseAdvanced","updateDatabaseAdvanced","getDatabaseProxySQL","optionsDatabaseProxySQL","updateDatabaseProxySQL","getDatabaseEncryption","optionsDatabaseEncryption","updateDatabaseEncryption","getFencing","optionsFencing","updateFencing","getFingerbankDeviceChange","optionsFingerbankDeviceChange","updateFingerbankDeviceChange","getGeneral","optionsGeneral","updateGeneral","getGuestsAdminRegistration","optionsGuestsAdminRegistration","updateGuestsAdminRegistration","getInline","optionsInline","updateInline","getMonit","optionsMonit","updateMonit","getMseTab","optionsMseTab","updateMseTab","getNetwork","optionsNetwork","updateNetwork","getNodeImport","optionsNodeImport","updateNodeImport","getParking","optionsParking","updateParking","getPFDHCP","optionsPFDHCP","updatePFDHCP","getPorts","optionsPorts","updatePorts","getProvisioning","optionsProvisioning","updateProvisioning","getRadiusConfiguration","optionsRadiusConfiguration","updateRadiusConfiguration","getDnsConfiguration","optionsDnsConfiguration","updateDnsConfiguration","optionsServices","updateServices","getSNMPTraps","optionsSNMPTraps","updateSNMPTraps","getWebServices","optionsWebServices","updateWebServices","$_billing_tiers","getBillingTier","createBillingTier","updateBillingTier","deleteBillingTier","cloudType","$_clouds","optionsById","optionsByCloudType","getCloud","createCloud","updateCloud","deleteCloud","Intune","typeOptions","createFile","content","updateFile","deleteFile","goToPreview","open","$_connection_profiles","sortItems","isWaitingFiles","isLoadingFiles","getConnectionProfile","createConnectionProfile","updateConnectionProfile","deleteConnectionProfile","sortConnectionProfiles","enableConnectionProfile","disableConnectionProfile","_walk","entry","getFile","filePromise","renameFile","ITEM_ENABLED","ITEM_DISABLED","FILE_REQUEST","FILE_SUCCESS","FILE_REPLACED","FILE_DESTROYED","FILE_ERROR","$_connectors","getConnector","createConnector","updateConnector","sortConnectors","deleteConnector","rejoin","unjoin","autoJoinDomain","$_domains","DomainsStoreModule","$_realms","RealmsStoreModule","joins","getDomain","createDomain","updateDomain","deleteDomain","testDomain","joinDomain","rejoinDomain","unjoinDomain","TEST_REQUEST","TEST_SUCCESS","TEST_ERROR","JOIN_REQUEST","JOIN_SUCCESS","JOIN_ERROR","UNJOIN_REQUEST","UNJOIN_SUCCESS","UNJOIN_ERROR","eventLoggerType","$_event_loggers","optionsByEventLoggerType","getEventLogger","createEventLogger","updateEventLogger","deleteEventLogger","syslog","collections","apiFactory","_collection","resource","$_filter_engines","_params","collectionsStatus","isLoadingCollections","isLoadingCollection","collectionToName","getCollections","getCollection","getFilterEngine","createFilterEngine","updateFilterEngine","deleteFilterEngine","enableFilterEngine","disableFilterEngine","COLLECTIONS_REQUEST","COLLECTIONS_REPLACED","COLLECTIONS_ERROR","COLLECTION_REQUEST","COLLECTION_REPLACED","COLLECTION_RESORTED","COLLECTION_ERROR","ITEM_CREATED","_item","fingerbankAccountInfo","fingerbankCanUseNbaEndpoints","fingerbankUpdateDatabase","fingerbankGeneralSettings","fingerbankGeneralSettingsOptions","fingerbankUpdateGeneralSetting","generalSettings","isGeneralSettingsWaiting","isGeneralSettingsLoading","getGeneralSettings","refactored","optionsGeneralSettings","setGeneralSettings","GENERAL_SETTINGS_REQUEST","GENERAL_SETTINGS_REPLACED","GENERAL_SETTINGS_ERROR","GENERAL_SETTINGS_SUCCESS","stateGeneralSettings","stateCombinations","stateDevices","stateDhcpFingerprints","stateDhcpVendors","stateDhcpv6Fingerprints","stateDhcpv6Enterprises","stateMacVendors","stateUserAgents","accountInfo","canUseNbaEndpoints","gettersGeneralSettings","gettersCombinations","gettersDevices","gettersDhcpFingerprints","gettersDhcpVendors","gettersDhcpv6Fingerprints","gettersDhcpv6Enterprises","gettersMacVendors","gettersUserAgents","isAccountInfoWaiting","isAccountInfoLoading","isCanUseNbaEndpointsWaiting","isCanUseNbaEndpointsLoading","isUpdateDatabaseLoading","actionsGeneralSettings","actionsCombinations","actionsDevices","actionsDhcpFingerprints","actionsDhcpVendors","actionsDhcpv6Fingerprints","actionsDhcpv6Enterprises","actionsMacVendors","actionsUserAgents","getAccountInfo","getCanUseNbaEndpoints","mutationsGeneralSettings","mutationsCombinations","mutationsDevices","mutationsDhcpFingerprints","mutationsDhcpVendors","mutationsDhcpv6Fingerprints","mutationsDhcpv6Enterprises","mutationsMacVendors","mutationsUserAgents","ACCOUNT_INFO_REQUEST","ACCOUNT_INFO_REPLACED","ACCOUNT_INFO_RESET","ACCOUNT_INFO_ERROR","CAN_USE_NBA_ENDPOINTS_REQUEST","CAN_USE_NBA_ENDPOINTS_REPLACED","CAN_USE_NBA_ENDPOINTS_ERROR","UPDATE_DATABASE_REQUEST","UPDATE_DATABASE_ERROR","UPDATE_DATABASE_SUCCESS","combinations","isCombinationsWaiting","isCombinationsLoading","getCombination","createCombination","updateCombination","deleteCombination","COMBINATION_REQUEST","COMBINATION_REPLACED","COMBINATION_DESTROYED","COMBINATION_ERROR","COMBINATION_SUCCESS","classes","parentId","isDevicesWaiting","isDevicesLoading","assocClassesById","assocClassesByName","getClasses","getDevice","createDevice","updateDevice","deleteDevice","DEVICE_REQUEST","DEVICE_REPLACED","DEVICE_DESTROYED","DEVICE_ERROR","DEVICE_CLASSES","dhcpFingerprints","isDhcpFingerprintsWaiting","isDhcpFingerprintsLoading","getDhcpFingerprint","createDhcpFingerprint","updateDhcpFingerprint","deleteDhcpFingerprint","DHCP_FINGERPRINT_REQUEST","DHCP_FINGERPRINT_REPLACED","DHCP_FINGERPRINT_DESTROYED","DHCP_FINGERPRINT_ERROR","dhcpVendors","isDhcpVendorsWaiting","isDhcpVendorsLoading","getDhcpVendor","createDhcpVendor","updateDhcpVendor","deleteDhcpVendor","DHCP_VENDOR_REQUEST","DHCP_VENDOR_REPLACED","DHCP_VENDOR_DESTROYED","DHCP_VENDOR_ERROR","dhcpv6Enterprises","isDhcpv6EnterprisesWaiting","isDhcpv6EnterprisesLoading","getDhcpv6Enterprise","createDhcpv6Enterprise","updateDhcpv6Enterprise","deleteDhcpv6Enterprise","DHCPV6_ENTERPRISE_REQUEST","DHCPV6_ENTERPRISE_REPLACED","DHCPV6_ENTERPRISE_DESTROYED","DHCPV6_ENTERPRISE_ERROR","dhcpv6Fingerprints","isDhcpv6FingerprintsWaiting","isDhcpv6FingerprintsLoading","getDhcpv6Fingerprint","createDhcpv6Fingerprint","updateDhcpv6Fingerprint","deleteDhcpv6Fingerprint","DHCPV6_FINGERPRINT_REQUEST","DHCPV6_FINGERPRINT_REPLACED","DHCPV6_FINGERPRINT_DESTROYED","DHCPV6_FINGERPRINT_ERROR","macVendors","isMacVendorsWaiting","isMacVendorsLoading","getMacVendor","createMacVendor","updateMacVendor","deleteMacVendor","MAC_VENDOR_REQUEST","MAC_VENDOR_REPLACED","MAC_VENDOR_DESTROYED","MAC_VENDOR_ERROR","userAgents","isUserAgentsWaiting","isUserAgentsLoading","getUserAgent","createUserAgent","updateUserAgent","deleteUserAgent","USER_AGENT_REQUEST","USER_AGENT_REPLACED","USER_AGENT_DESTROYED","USER_AGENT_ERROR","firewallType","$_firewalls","optionsByFirewallType","getFirewall","createFirewall","updateFirewall","deleteFirewall","BarracudaNG","Checkpoint","ContentKeeper","CiscoIsePic","FamilyZone","FortiGate","Iboss","JSONRPC","JuniperSRX","LightSpeedRocket","PaloAlto","SmoothWall","WatchGuard","$_floatingdevices","getFloatingDevice","createFloatingDevice","updateFloatingDevice","deleteFloatingDevice","$_maintenance_tasks","getMaintenanceTask","createMaintenanceTask","updateMaintenanceTask","deleteMaintenanceTask","enableMaintenanceTask","disableMaintenanceTask","mfaType","$_mfas","optionsByMfaType","getMfa","createMfa","updateMfa","deleteMfa","Akamai","TOTP","$_network_behavior_policies","NetworkBehaviorPolicyStoreModule","policiesPromise","getNetworkBehaviorPolicy","createNetworkBehaviorPolicy","updateNetworkBehaviorPolicy","enableNetworkBehaviorPolicy","disableNetworkBehaviorPolicy","deleteNetworkBehaviorPolicy","prefixRouteName","vlan","interface","createInterface","sanitizedData","updateInterface","downInterface","upInterface","deleteInterface","master","cacheFlattened","columnsInterface","getInterface","INTERFACES_REPLACED","INTERFACE_REQUEST","INTERFACE_REPLACED","INTERFACE_DESTROYED","INTERFACE_ERROR","INTERFACE_SUCCESS","INTERFACE_DOWN","INTERFACE_UP","none","inlinel2","management","other","typeFormatter","daemons","dhcp","dns","daemonOptions","sortColumns","itemA","itemB","sortMod","ipaddress","id2ip","id2netmask","id2network","sortable","layer2NetworksOptions","layer2Network","layer2NetworkOptions","updateLayer2Network","columnsLayer2Network","getLayer2Network","LAYER2_NETWORKS_REPLACED","LAYER2_NETWORK_REQUEST","LAYER2_NETWORK_REPLACED","LAYER2_NETWORK_DESTROYED","LAYER2_NETWORK_ERROR","LAYER2_NETWORK_SUCCESS","routedNetworksOptions","routedNetwork","routedNetworkOptions","createRoutedNetwork","updateRoutedNetwork","deleteRoutedNetwork","columnsRoutedNetwork","getRoutedNetwork","ROUTED_NETWORKS_REPLACED","ROUTED_NETWORK_REQUEST","ROUTED_NETWORK_REPLACED","ROUTED_NETWORK_DESTROYED","ROUTED_NETWORK_ERROR","ROUTED_NETWORK_SUCCESS","routedNetworkList","routedNetworkListFormatter","stateCas","stateProfiles","stateCerts","stateRevokedCerts","gettersCas","gettersProfiles","gettersCerts","gettersRevokedCerts","caStatus","profileStatus","certStatus","revokedCertStatus","actionsCas","actionsProfiles","actionsCerts","actionsRevokedCerts","mutationsCas","mutationsProfiles","mutationsCerts","mutationsRevokedCerts","recomposeGorm","resign","decomposeCa","key_usage","extended_key_usage","recomposeCa","caListCache","caItemCache","caMessage","isCaWaiting","isCaLoading","cas","allCas","getCa","createCa","resignCa","CA_REQUEST","CA_LIST_RESET","CA_LIST_REPLACED","CA_ITEM_REPLACED","CA_ERROR","revoke","reason","profile_id","certListCache","certItemCache","certMessage","isCertWaiting","isCertLoading","certs","allCerts","getCert","downloadCert","binary","createCert","emailCert","revokeCert","CERT_REQUEST","CERT_SUCCESS","CERT_LIST_RESET","CERT_LIST_REPLACED","CERT_ITEM_REPLACED","CERT_ITEM_EMAILED","CERT_ITEM_REVOKED","CERT_ERROR","digests","keyTypes","sizes","keySizes","keyUsages","extendedKeyUsages","revokeReasons","CreatedAt","DeletedAt","UpdatedAt","DB","Ctx","signCsr","csr","TheCsr","ca_id","decomposeProfile","stripped","recomposeProfile","profileListCache","profileItemCache","profileMessage","isProfileWaiting","isProfileLoading","profiles","allProfiles","getProfile","createProfile","updateProfile","PROFILE_REQUEST","PROFILE_LIST_RESET","PROFILE_LIST_REPLACED","PROFILE_ITEM_REPLACED","PROFILE_ERROR","PROFILE_CSR_SIGNED","revokedCertListCache","revokedCertItemCache","revokedCertMessage","isRevokedCertWaiting","isRevokedCertLoading","revokedCerts","allRevokedCerts","getRevokedCert","REVOKED_CERT_REQUEST","REVOKED_CERT_LIST_RESET","REVOKED_CERT_LIST_REPLACED","REVOKED_CERT_ITEM_REPLACED","REVOKED_CERT_ERROR","providerType","$_pki_providers","PkiProvidersStoreModule","PkisStoreModule","optionsByProviderType","getPkiProvidersByType","getPkiProvider","createPkiProvider","updatePkiProvider","deletePkiProvider","pkiProvidersTypes","packetfence_local","packetfence_pki","scep","pkiProvidersTypeOptions","sourceType","TheList","moduleType","$_portalmodules","coordinates","optionsByModuleType","getPortalModule","createPortalModule","updatePortalModule","deletePortalModule","colors","moduleTypes","conditionType","moduleTypeName","groupType","provisioningType","$_provisionings","optionsByProvisioningType","createProvisioning","deleteProvisioning","provisioningTypes","airwatch","android","deny","dpsk","jamf","kandji","mobileconfig","mobileiron","sentinelone","windows","intune","google_workspace_chromebook","provisioningTypeOptions","$_radius_eap","RadiusEapStoreModule","getRadiusEap","createRadiusEap","updateRadiusEap","deleteRadiusEap","$_radius_fast","RadiusFastStoreModule","getRadiusFast","createRadiusFast","updateRadiusFast","deleteRadiusFast","$_radius_ocsp","RadiusOcspStoreModule","getRadiusOcsp","createRadiusOcsp","updateRadiusOcsp","deleteRadiusOcsp","$_radius_ssl","RadiusSslStoreModule","getRadiusSsl","createRadiusSsl","updateRadiusSsl","deleteRadiusSsl","$_radius_tls","RadiusTlsStoreModule","getRadiusTls","createRadiusTls","updateRadiusTls","deleteRadiusTls","sortRealms","getRealm","createRealm","updateRealm","deleteRealm","ITEMS_RESORTED","reassign","getRole","createRole","updateRole","deleteRole","reassignRole","addMethod","exceptName","shape","roleNameNotExistsExcept","max_nodes_per_pid","parent","parentIsNotIdentifier","scanType","$_scans","optionsByScanType","getScanEngine","createScanEngine","updateScanEngine","deleteScanEngine","nessus","nessus6","openvas","rapid7","ConnectionProfilesStoreModule","NetworkBehaviorPoliciesStoreModule","getSecurityEvent","createSecurityEvent","triggers","recomposeTriggers","updateSecurityEvent","enableSecurityEvent","disableSecurityEvent","deleteSecurityEvent","dataCopy","decomposeTriggers","triggerCategories","ENDPOINT","PROFILING","USAGE","EVENT","triggerFields","accounting","custom","detect","device_is_not","internal","mac_vendor","nexpose_event_contains","nexpose_event_starts_with","provisioner","suricata_event","suricata_md5","switch","switch_group","triggerDirections","TOT","OUT","triggerDirectionOptions","triggerIntervals","D","W","M","Y","triggerIntervalOptions","triggerTypes","bandwidth","BandwidthExpired","TimeExpired","triggerTypeOptions","decomposed","endpoint","conditions","profiling","usage","typeValue","groups","direction","fingerbank_network_behavior_policy","recomposed","nestedValue","toUpperCase","fingerbankNetworkBehaviorPolicyTypes","$_self_services","getSelfService","createSelfService","updateSelfService","deleteSelfService","saml","ldapFormsSupported","parseLdapStringToArray","ldapString","ldapArrayRegex","parseLdapResponseToAttributeArray","ldapResponse","ldapAttribute","ldapEntries","parsedEntries","extractAttributeFromFilter","attribute","getAllAttributes","base_dn","searchAttribute","allAttributeSearchQuery","sendLdapSearchRequest","isAttributeDn","exampleEntry","searchDn","allEntries","attributeSet","dn","regexQuery","search_query","size_limit","$_sources","recomposeSource","decomposeSource","saml_metadata","filterOutLdapOptions","removeLdapAttributeValidation","optionsBySourceType","getAuthenticationSourcesByType","getAuthenticationSource","getAuthenticationSourceSAMLMetaData","xml","createAuthenticationSource","administration_rules","administrationRules","administrationRule","rIndex","aIndex","updateAuthenticationSource","deleteAuthenticationSource","sortAuthenticationSources","testAuthenticationSource","ldapConditionAttributePath","ldapAttributes","allowCustopAttributePath","SAML_METADATA_REPLACED","internalTypes","Authorization","AzureAD","EAPTLS","EDIR","Htpasswd","GoogleWorkspaceLDAP","HTTP","Kerberos","LDAP","Potd","RADIUS","SAML","externalTypes","Clickatell","Email","Facebook","Github","Google","Kickbox","LinkedIn","Null","OpenID","SMS","SponsorEmail","Twilio","WindowsLive","exclusiveTypes","AdminProxy","Blackhole","Eduroam","billingTypes","Paypal","Stripe","administrationRuleActionsFromSourceType","authenticationRuleActionsFromSourceType","allowed_domains","banned_domains","certificate","certificateInfo","createCertificate","check_chain","createLetsEncryptCertificate","generateCertificateSigningRequest","testLetsEncrypt","_certificate","_info","common_name","intermediate_cas","lets_encrypt","creationPromise","testStatus","getCertificate","getCertificateInfo","hasInfo","ca","private_key","TEST_STATUS","certificates","strings","issuer","not_after","not_before","serial","subject","subject_alt_name","sortSslKeys","bulkImportAsync","skip_inheritance","itemMembers","TheCsvImport","$_switches","SwitchesStoreModule","$_switch_groups","SwitchGroupsStoreModule","getSwitchGroup","createSwitchGroup","updateSwitchGroup","deleteSwitchGroup","ITEM_BULK_SUCCESS","ITEM_UPDATED","$_switch_templates","getSwitchTemplate","createSwitchTemplate","updateSwitchTemplate","deleteSwitchTemplate","itemQuiet","invalidateCache","optionsBySwitchGroup","getSwitch","baseRoles","createSwitch","updateSwitch","deleteSwitch","invalidateSwitchCache","inlineTriggers","always","importFields","syslogForwarderType","$_syslog_forwarders","optionsBySyslogForwarderType","getSyslogForwarder","createSyslogForwarder","updateSyslogForwarder","deleteSyslogForwarder","syslogParserType","dryRunItem","$_syslog_parsers","optionsBySyslogParserType","getSyslogParser","createSyslogParser","updateSyslogParser","enableSyslogParser","disableSyslogParser","deleteSyslogParser","dryRunSyslogParser","fortianalyser","nexpose","security_onion","snort","suricata","regexRuleActions","add_person","siblings","api_parameters","close_security_event","deregister_node_ip","dynamic_register_node","modify_node","modify_person","reevaluate_access","register_node","register_node_ip","release_all_security_events","role_detail","trigger_scan","trigger_security_event","unreg_node_for_pid","update_ip4log","update_ip6log","update_role_configuration","$_wrix_locations","getWrixLocation","createWrixLocation","updateWrixLocation","deleteWrixLocation","TheStep","NetworkRoutes","PacketfenceRoutes","StatusRoutes","fingerbankInfo","rapid7Info","ip4logOpen","ip4logHistory","ip6logOpen","ip6logHistory","locationlogs","security_events","dhcpoption82","createNode","updateNode","deleteNode","applySecurityEventNode","clearSecurityEventNode","reevaluateAccessNode","refreshFingerbankNode","restartSwitchportNode","bulkRegisterNodes","bulkDeregisterNodes","bulkApplySecurityEvent","bulkCloseSecurityEvents","bulkApplyBypassAcls","bulkApplyBypassRole","bulkApplyBypassVlan","bulkApplyRole","bulkReevaluateAccess","bulkRefreshFingerbank","bulkRestartSwitchport","bulkImport","perDeviceClass","createForm","isMAC","yupRoles","roleNameOrCategoryIdentifierExists","yupUsers","pidExists","ipLogFields","locationLogFields","securityEventFields","dhcpOption82Fields","normalizeMac","recomposeNode","loading","switchGroupsMembers","TheViewCreate","TheViewUpdate","reloadItem","reevaluateAccess","refreshFingerbank","restartSwitchport","applySecurityEvent","nodeExists","nodePerDeviceClass","nodeStatus","perDeviceClassLowerCase","exists","getNode","ip4","end_time","datas","history","ip6","refreshNode","unreg_time","getPerDeviceClass","NODE_REQUEST","NODE_REPLACED","NODE_UPDATED","NODE_BULK_SUCCESS","NODE_DESTROYED","NODE_SUCCESS","NODE_ERROR","NODE_EXISTS","NODE_NOT_EXISTS","NODE_PER_DEVICE_CLASS","getReport","searchReport","colorsFull","colorsNull","_host","internalHost","packetfenceDomain","isIpv4","isIpv6","subdomains","subdomain","sortHosts","hostsA","hostsB","decorateHost","decorated","useHosts","communication","sum","proto","useProtocols","_protocols","rgbaProto","opacity","COLOR_PROTO_TCP","COLOR_PROTO_UDP","COLOR_PROTO_UNKNOWN","COLOR_PROTO_DEFAULT","COLOR_BLACK","COLOR_WHITE","COLOR_RED","COLOR_GREEN","COLOR_BLUE","COLOR_MARKER","COLOR_MARKER_LINE","createUser","updateUser","deleteUser","createPassword","updatePassword","previewEmail","sendEmail","unassignUserNodes","bulkDelete","ThePreview","inflateActions","can_sponsor","deflateActions","users","usersStatus","usersMessage","usersNodes","usersNodesStatus","usersNodesMessage","usersSecurityEvents","usersSecurityEventsStatus","usersSecurityEventsMessage","userExists","createdUsers","isLoadingNodes","refreshUser","getUser","getUserNodes","getUserSecurityEvents","template","USER_REQUEST","USER_REPLACED","USER_UPDATED","USER_NODES_REQUEST","USER_NODES_UPDATED","USER_NODES_ERROR","USER_SECURITY_EVENTS_REQUEST","USER_SECURITY_EVENTS_UPDATED","USER_SECURITY_EVENTS_ERROR","USER_BULK_SUCCESS","USER_DESTROYED","USER_SUCCESS","USER_ERROR","USER_EXISTS","USER_NOT_EXISTS","CREATED_USERS_REPLACED","mysqlDatabase","mysqlDatabaseSchema","schemaPid","except","single","pid_overwrite","has_password","expirationSchema","pidNotExistsExcept","schemaActions","isDateFormat","quantity","log10","csv","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","__webpack_modules__","amdD","deferred","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","every","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","mode","def","current","getOwnPropertyNames","defineProperty","enumerable","chunkId","u","miniCssF","g","globalThis","hasOwnProperty","inProgress","dataWebpackPrefix","l","script","needAttach","scripts","getElementsByTagName","nc","onScriptComplete","prev","doneFns","Symbol","toStringTag","nmd","createStylesheet","fullhref","linkTag","rel","onLinkComplete","errorType","realHref","findStylesheet","existingLinkTags","dataHref","existingStyleTags","loadStylesheet","installedCssChunks","miniCss","cssChunks","installedChunks","installedChunkData","loadingEnded","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}