LibreNMS/html/js/app.js

1 line
38 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+EXy":function(t,e,n){var a=n("EKCJ");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},"+fAT":function(t,e,n){var a={"./components/Accordion.vue":"07Va","./components/AccordionItem.vue":"qodb","./components/BaseSetting.vue":"nsVt","./components/ExampleComponent.vue":"AEaB","./components/LibrenmsSetting.vue":"9n66","./components/LibrenmsSettings.vue":"OB2S","./components/SettingArray.vue":"ul9H","./components/SettingBoolean.vue":"ld4D","./components/SettingDashboardSelect.vue":"ehi2","./components/SettingEmail.vue":"YujN","./components/SettingInteger.vue":"tCMV","./components/SettingLdapGroups.vue":"Zrdh","./components/SettingNull.vue":"NgQ3","./components/SettingPassword.vue":"ShZc","./components/SettingSelect.vue":"M77q","./components/SettingSnmp3auth.vue":"/MA7","./components/SettingText.vue":"q8tH","./components/Tab.vue":"cQaf","./components/Tabs.vue":"Pm5W","./components/TransitionCollapseHeight.vue":"ITC5"};function s(t){var e=i(t);return n(e)}function i(t){if(!n.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}s.keys=function(){return Object.keys(a)},s.resolve=i,t.exports=s,s.id="+fAT"},"/MA7":function(t,e,n){"use strict";n.r(e);var a={name:"SettingSnmp3auth",mixins:[n("nsVt").default],data:function(){return{localList:this.value}},methods:{addItem:function(){this.localList.push({authlevel:"noAuthNoPriv",authalgo:"MD5",authname:"",authpass:"",cryptoalgo:"AES",cryptopass:""}),this.$emit("input",this.localList)},removeItem:function(t){this.localList.splice(t,1),this.$emit("input",this.localList)},updateItem:function(t,e,n){this.localList[t][e]=n,this.$emit("input",this.localList)},dragged:function(){this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}},s=(n("fJHU"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,a){return n("div",[n("div",{staticClass:"panel panel-default"},[n("div",{staticClass:"panel-heading"},[n("h3",{staticClass:"panel-title"},[t._v(t._s(a+1)+". "),t.disabled?t._e():n("span",{staticClass:"pull-right text-danger",on:{click:function(e){return t.removeItem(a)}}},[n("i",{staticClass:"fa fa-minus-circle"})])])]),t._v(" "),n("div",{staticClass:"panel-body"},[n("form",{on:{onsubmit:function(t){t.preventDefault()}}},[n("div",{staticClass:"form-group"},[n("div",{staticClass:"col-sm-12"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.authlevel,expression:"item.authlevel"}],staticClass:"form-control",attrs:{id:"authlevel",disabled:t.disabled},on:{change:[function(n){var a=Array.prototype.filter.call(n.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authlevel",n.target.multiple?a:a[0])},function(e){return t.updateItem(a,e.target.id,e.target.value)}]}},[n("option",{attrs:{value:"noAuthNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.noAuthNoPriv"))}}),t._v(" "),n("option",{attrs:{value:"authNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authNoPriv"))}}),t._v(" "),n("option",{attrs:{value:"authPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authPriv"))}})])])]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:"auth"===e.authlevel.toString().substring(0,4),expression:"item.authlevel.toString().substring(0, 4) === 'auth'"}],attrs:{name:"algo",disabled:t.disabled}},[n("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.auth"))}}),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authalgo"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authalgo"))}}),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.authalgo,expression:"item.authalgo"}],staticClass:"form-control",attrs:{id:"authalgo",name:"authalgo"},on:{change:[function(n){var a=Array.prototype.filter.call(n.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authalgo",n.target.multiple?a:a[0])},function(e){return t.updateItem(a,e.target.id,e.target.value)}]}},[n("option",{attrs:{value:"MD5"}},[t._v("MD5")]),t._v(" "),n("option",{attrs:{value:"SHA"}},[t._v("SHA")])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authname"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authname"))}}),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("input",{staticClass:"form-control",attrs:{type:"text",id:"authname"},domProps:{value:e.authname},on:{input:function(e){return t.updateItem(a,e.target.id,e.target.value)}}})])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authpass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("input",{staticClass:"form-control",attrs:{type:"text",id:"authpass"},domProps:{value:e.authpass},on:{input:function(e){return t.updateItem(a,e.target.id,e.target.value)}}})])])]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:"authPriv"===e.authlevel,expression:"item.authlevel === 'authPriv'"}],attrs:{name:"crypt",disabled:t.disabled}},[n("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.crypto"))}}),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptoalgo"}},[t._v("Cryptoalgo")]),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.cryptoalgo,expression:"item.cryptoalgo"}],staticClass:"form-control",attrs:{id:"cryptoalgo"},on:{change:[function(n){var a=Array.prototype.filter.call(n.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"cryptoalgo",n.target.multiple?a:a[0])},function(e){return t.updateItem(a,e.target.id,e.target.value)}]}},[n("option",{attrs:{value:"AES"}},[t._v("AES")]),t._v(" "),n("option",{attrs:{value:"DES"}},[t._v("DES")])])])]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptopass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),n("div",{staticClass:"col-sm-9"},[n("input",{staticClass:"form-control",attrs:{type:"text",id:"cryptopass"},domProps:{value:e.cryptopass},on:{input:function(e){return t.updateItem(a,e.target.id,e.target.value)}}})])])])])])])])})),0),t._v(" "),t.disabled?t._e():n("div",{staticClass:"row snmp3-add-button"},[n("div",{staticClass:"col-sm-12"},[n("button",{staticClass:"btn btn-primary",on:{click:function(e){return t.addItem()}}},[n("i",{staticClass:"fa fa-plus-circle"}),t._v(" "+t._s(t.$t("New")))])])])],1)}),[],!1,null,"2e6100d1",null);e.default=i.exports},0:function(t,e,n){n("bUC5"),t.exports=n("pyCd")},"07Va":function(t,e,n){"use strict";n.r(e);var a={name:"Accordion",props:{multiple:{type:Boolean,default:!1}},methods:{setActive:function(t){this.$children.forEach((function(e){e.slug()===t&&(e.isActive=!0)}))},activeChanged:function(t){this.multiple||this.$children.forEach((function(e){e.slug()!==t&&(e.isActive=!1)}))}},mounted:function(){this.$on("expanded",this.activeChanged)}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"panel-group",attrs:{role:"tablist"}},[this._t("default")],2)}),[],!1,null,"7626d1af",null);e.default=i.exports},"0m/0":function(t,e,n){"use strict";var a=n("ct6m");n.n(a).a},"0n5T":function(t,e,n){"use strict";var a=n("ROy3");n.n(a).a},"1ygf":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.input-group[data-v-1e553845] {\n margin-bottom: 3px;\n}\n.input-group-addon[data-v-1e553845]:not(.disabled) {\n cursor: move;\n}\n",""])},"9UL7":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.enter-active[data-v-00169edd],\n.leave-active[data-v-00169edd] {\n overflow: hidden;\n transition: height 0.2s linear;\n}\n",""])},"9Wh1":function(t,e,n){window._=n("LvDl");try{window.Popper=n("8L3F").default}catch(t){}window.axios=n("vDqi"),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var a=document.head.querySelector('meta[name="csrf-token"]');a?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=a.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token"),n("nErG")},"9n66":function(t,e,n){"use strict";n.r(e);var a={name:"LibrenmsSetting",props:{setting:{type:Object,required:!0}},data:function(){return{value:this.setting.value,feedback:""}},methods:{persistValue:function(t){var e=this;axios.put(route("settings.update",this.setting.name),{value:t}).then((function(t){e.value=t.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),e.feedback="has-success",setTimeout((function(){return e.feedback=""}),3e3)})).catch((function(t){e.feedback="has-error",toastr.error(t.response.data.message);["text","email","password"].includes(e.setting.type)||(e.value=t.response.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),setTimeout((function(){return e.feedback=""}),3e3))}))},debouncePersistValue:_.debounce((function(t){this.persistValue(t)}),500),changeValue:function(t){["select","boolean"].includes(this.setting.type)?this.persistValue(t):this.debouncePersistValue(t),this.value=t},getDescription:function(){var t="settings.settings."+this.setting.name+".description";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)?this.$t(t):this.setting.name},getHelp:function(){var t=this.$t("settings.settings."+this.setting.name+".help");return this.setting.overridden&&(t+="</p><p>"+this.$t("settings.readonly")),t},hasHelp:function(){var t="settings.settings."+this.setting.name+".help";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)},resetToDefault:function(){var t=this;axios.delete(route("settings.destroy",this.setting.name)).then((function(e){t.value=e.data.value,t.feedback="has-success",setTimeout((function(){return t.feedback=""}),3e3)})).catch((function(e){t.feedback="has-error",setTimeout((function(){return t.feedback=""}),3e3),toastr.error(e.response.data.message)}))},resetToInitial:function(){this.changeValue(this.setting.value)},showResetToDefault:function(){return!this.setting.overridden&&!_.isEqual(this.value,this.setting.default)},showUndo:function(){return!_.isEqual(this.setting.value,this.value)},getComponent:function(){var t="Setting"+this.setting.type.toString().replace(/(-[a-z]|^[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}));return void 0!==Vue.options.components[t]?t:"SettingNull"}}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["form-group","has-feedback",t.setting.class,t.feedback]},[n("label",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.setting.name},expression:"{ content: setting.name }"}],staticClass:"col-sm-5 control-label",attrs:{for:t.setting.name}},[t._v("\n "+t._s(t.getDescription())+"\n "),null!==t.setting.units?n("span",[t._v("("+t._s(t.setting.units)+")")]):t._e()]),t._v(" "),n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:!!t.setting.disabled&&t.$t("settings.readonly")},expression:"{ content: setting.disabled ? $t('settings.readonly') : false }"}],staticClass:"col-sm-5"},[n(t.getComponent(),{tag:"component",attrs:{value:t.value,name:t.setting.name,pattern:t.setting.pattern,disabled:t.setting.overridden,required:t.setting.required,options:t.setting.options},on:{input:function(e){return t.changeValue(e)},change:function(e){return t.changeValue(e)}}}),t._v(" "),n("span",{staticClass:"form-control-feedback"})],1),t._v(" "),n("div",{staticClass:"col-sm-2"},[n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Reset to default")},expression:"{ content: $t('Reset to default') }"}],staticClass:"btn btn-default",style:{opacity:t.showResetToDefault()?1:0},attrs:{type:"button"},on:{click:t.resetToDefault}},[n("i",{staticClass:"fa fa-refresh"})]),t._v(" "),n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Undo")},expression:"{ content: $t('Undo') }"}],staticClass:"btn btn-primary",style:{opacity:t.showUndo()?1:0},attrs:{type:"button"},on:{click:t.resetToInitial}},[n("i",{staticClass:"fa fa-undo"})]),t._v(" "),t.hasHelp()?n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.getHelp(),trigger:"hover click"},expression:"{content: getHelp(), trigger: 'hover click'}"}],staticClass:"fa fa-fw fa-lg fa-question-circle"}):t._e()])])}),[],!1,null,"7279cbbc",null);e.default=i.exports},AEaB:function(t,e,n){"use strict";n.r(e);var a={mounted:function(){console.log("Component mounted.")}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"container"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[this._v("Example Component")]),this._v(" "),e("div",{staticClass:"card-body"},[this._v("\n I'm an example component.\n ")])])])])])}],!1,null,null,null);e.default=i.exports},B4qk:function(t,e,n){"use strict";var a=n("ZQ8p");n.n(a).a},Dwb7:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n#settings-search[data-v-0db2ec2e] {\n border-radius: 4px\n}\n#settings-search[data-v-0db2ec2e]::-webkit-search-cancel-button {\n -webkit-appearance: searchfield-cancel-button;\n}\nul.settings-list[data-v-0db2ec2e] {\n list-style-type: none;\n}\n",""])},EKCJ:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.authlevel[data-v-2e6100d1] {\n font-size: 18px;\n text-align: left;\n}\n.fa-minus-circle[data-v-2e6100d1] {\n cursor: pointer;\n}\n.snmp3-add-button[data-v-2e6100d1] {\n margin-top: 5px;\n}\n",""])},FpnD:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.accordion-item-trigger-icon[data-v-af5cb116] {\n transition: transform 0.2s ease;\n}\n.accordion-item-trigger.collapsed .accordion-item-trigger-icon[data-v-af5cb116] {\n transform: rotate(-90deg);\n}\n",""])},GJqu:function(t,e,n){var a=n("kUp1");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},ITC5:function(t,e,n){"use strict";n.r(e);var a={name:"TransitionCollapseHeight",methods:{beforeEnter:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height="0px"),t.style.display=null}))},enter:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height=t.scrollHeight+"px"}))}))},afterEnter:function(t){t.style.height=null},beforeLeave:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height=t.offsetHeight+"px")}))},leave:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height="0px"}))}))},afterLeave:function(t){t.style.height=null}}},s=(n("pYH+"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{"enter-active-class":"enter-active","leave-active-class":"leave-active"},on:{"before-enter":this.beforeEnter,enter:this.enter,"after-enter":this.afterEnter,"before-leave":this.beforeLeave,leave:this.leave,"after-leave":this.afterLeave}},[this._t("default")],2)}),[],!1,null,"00169edd",null);e.default=i.exports},JXYM:function(t,e,n){var a=n("9UL7");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},M77q:function(t,e,n){"use strict";n.r(e);var a={name:"SettingSelect",mixins:[n("nsVt").default],methods:{getText:function(t,e){var n="settings.settings.".concat(t,".options.").concat(e);return this.$te(n)?this.$t(n):e}}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("select",{staticClass:"form-control",attrs:{name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}},t._l(t.options,(function(e,a){return n("option",{domProps:{value:a,selected:t.value===a,textContent:t._s(t.getText(t.name,e))}})})),0)}),[],!1,null,"108ca35b",null);e.default=i.exports},MSLc:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.input-group[data-v-946d0f4c] {\n padding-bottom: 3px;\n}\n",""])},NgQ3:function(t,e,n){"use strict";n.r(e);var a={name:"SettingNull",props:["name"]},s=(n("tK7y"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("div",[this._v("Invalid type for: "+this._s(this.name))])}),[],!1,null,"e69e1a5e",null);e.default=i.exports},OB2S:function(t,e,n){"use strict";n.r(e);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var n=[],a=!0,s=!1,i=void 0;try{for(var o,r=t[Symbol.iterator]();!(a=(o=r.next()).done)&&(n.push(o.value),!e||n.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var s={name:"LibrenmsSettings",props:{prefix:String,initialTab:{type:String,default:"alerting"},initialSection:String,tabs:{type:Array}},data:function(){return{tab:this.initialTab,section:this.initialSection,search_phrase:"",settings:{}}},methods:{tabChanged:function(t){this.tab!==t&&(this.tab=t,this.section=null,this.updateUrl())},sectionExpanded:function(t){this.section=t,this.updateUrl()},sectionCollapsed:function(t){this.section===t&&(this.section=null,this.updateUrl())},updateUrl:function(){var t=this.tab;this.section&&(t+="/"+this.section),window.history.pushState(t,"",this.prefix+"/"+t)},handleBack:function(t){var e=a(t.state.split("/"),2);this.tab=e[0],this.section=e[1]},updateSetting:function(t,e){this.$set(this.settings[t],"value",e)},settingShown:function(t){var e=this,n=this.settings[t];return null===n.when||(n.when.hasOwnProperty("and")?n.when.and.reduce((function(t,n){return e.checkLogic(n)&&t}),!0):n.when.hasOwnProperty("or")?n.when.or.reduce((function(t,n){return e.checkLogic(n)||t}),!1):this.checkLogic(n.when))},translatedCompare:function(t,e,n){return this.$t(t+e).localeCompare(this.$t(t+n))},checkLogic:function(t){switch(t.operator){case"equals":return this.settings[t.setting].value===t.value;case"in":return t.value.includes(this.settings[t.setting].value);default:return!0}}},mounted:function(){var t=this;window.onpopstate=this.handleBack,axios.get(route("settings.list")).then((function(e){return t.settings=e.data}))},computed:{groups:function(){var t=this;if(_.isEmpty(this.settings)){var e={};return this.tabs.sort((function(e,n){return t.translatedCompare("settings.groups.",e,n)})).forEach((function(t){e[t]=[]})),e}for(var n={},a=0,s=Object.keys(this.settings);a<s.length;a++){var i=s[a],o=this.settings[i];o.name.includes(this.search_phrase)&&(o.group&&(o.group in n||(n[o.group]={}),o.section&&(o.section in n[o.group]||(n[o.group][o.section]=[]),n[o.group][o.section].push(o))))}var r={};return Object.keys(n).sort((function(e,n){return t.translatedCompare("settings.groups.",e,n)})).forEach((function(e){r[e]={},Object.keys(n[e]).sort((function(n,a){return t.translatedCompare("settings.sections."+e+".",n,a)})).forEach((function(t){r[e][t]=_.sortBy(n[e][t],"order").map((function(t){return t.name}))}))})),r}}},i=(n("B4qk"),n("KHd+")),o=Object(i.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tabs",{attrs:{selected:this.tab},on:{"tab-selected":t.tabChanged},scopedSlots:t._u([{key:"header",fn:function(){return[n("form",{staticClass:"form-inline",on:{submit:function(t){t.preventDefault()}}},[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model.trim",value:t.search_phrase,expression:"search_phrase",modifiers:{trim:!0}}],staticClass:"form-control",attrs:{id:"settings-search",type:"search",placeholder:t.$t("Filter Settings")},domProps:{value:t.search_phrase},on:{input:function(e){e.target.composing||(t.search_phrase=e.target.value.trim())},blur:function(e){return t.$forceUpdate()}}})])])]},proxy:!0}])},[t._v(" "),n("tab",{attrs:{name:"global",selected:"global"===t.tab,text:t.$t("settings.groups.global")}},[n("ul",{staticClass:"settings-list"},t._l(t.settings,(function(e){return n("li",[n("strong",[t._v(t._s(e.name))]),t._v(" "),n("code",[t._v(t._s(e.value))])])})),0)]),t._v(" "),t._l(t.groups,(function(e,a){return n("tab",{key:a,attrs:{name:a,selected:a===t.tab,text:t.$t("settings.groups."+a)}},[n("accordion",{on:{expanded:t.sectionExpanded,collapsed:t.sectionCollapsed}},t._l(t.groups[a],(function(e,s){return n("accordion-item",{key:s,attrs:{name:s,text:t.$t("settings.sections."+a+"."+s),active:s===t.section}},[n("form",{staticClass:"form-horizontal",on:{submit:function(t){t.preventDefault()}}},t._l(e,(function(e){return n("librenms-setting",{directives:[{name:"show",rawName:"v-show",value:t.settingShown(e),expression:"settingShown(setting)"}],key:e,attrs:{setting:t.settings[e]},on:{"setting-updated":function(e){return t.updateSetting(e.name,e.value)}}})})),1)])})),1)],1)}))],2)}),[],!1,null,"0db2ec2e",null);e.default=o.exports},Pm5W:function(t,e,n){"use strict";n.r(e);var a={name:"Tabs",props:{selected:String},data:function(){return{tabs:[],activeTab:null}},created:function(){this.tabs=this.$children},mounted:function(){this.activeTab=this.selected},watch:{selected:function(t){this.activeTab=t},activeTab:function(t){this.tabs.forEach((function(e){return e.isActive=e.name===t})),this.$emit("tab-selected",t)}}},s=(n("0n5T"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"panel with-nav-tabs panel-default"},[n("div",{staticClass:"panel-heading"},[n("ul",{staticClass:"nav nav-tabs",attrs:{role:"tablist"}},[t._l(t.tabs,(function(e){return n("li",{key:e.name,class:{active:e.isActive},attrs:{role:"presentation"}},[n("a",{attrs:{role:"tab","aria-controls":e.name},on:{click:function(n){t.activeTab=e.name}}},[e.icon?n("i",{class:["fa","fa-fw",e.icon]}):t._e(),t._v("\n "+t._s(e.text||e.name)+" \n ")])])})),t._v(" "),n("li",{staticClass:"pull-right"},[t._t("header")],2)],2)]),t._v(" "),n("div",{staticClass:"panel-body"},[t._t("default")],2)])])}),[],!1,null,"6072cc1c",null);e.default=i.exports},QDxF:function(t,e,n){"use strict";var a=n("RwZP");n.n(a).a},ROy3:function(t,e,n){var a=n("nChq");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},Rt1K:function(t,e,n){var a=n("bNWy");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},RwZP:function(t,e,n){var a=n("1ygf");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},ShZc:function(t,e,n){"use strict";n.r(e);var a={name:"SettingPassword",mixins:[n("nsVt").default]},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"password",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"b4576b66",null);e.default=i.exports},YujN:function(t,e,n){"use strict";n.r(e);var a={name:"SettingEmail",mixins:[n("nsVt").default]},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"email",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"6a570371",null);e.default=i.exports},ZQ8p:function(t,e,n){var a=n("Dwb7");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},Zrdh:function(t,e,n){"use strict";n.r(e);var a={name:"SettingLdapGroups",mixins:[n("nsVt").default],data:function(){return{localList:this.value,newItem:"",newItemLevel:1}},methods:{addItem:function(){this.$set(this.localList,this.newItem,{level:this.newItemLevel}),this.newItem="",this.newItemLevel=1},removeItem:function(t){this.$delete(this.localList,t)},updateItem:function(t,e){var n=this;this.localList=Object.keys(this.localList).reduce((function(a,s){return a[s===t?e:s]=n.localList[s],a}),{})},updateLevel:function(t,e){this.$set(this.localList,t,{level:e})}},watch:{localList:function(){this.$emit("input",this.localList)}}},s=(n("svCc"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}],staticClass:"form-inline"},[t._l(t.localList,(function(e,a){return n("div",{staticClass:"input-group"},[n("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:a},on:{blur:function(e){return t.updateItem(a,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(a,e.target.value)}}}),t._v(" "),n("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),n("select",{staticClass:"form-control",on:{change:function(e){return t.updateLevel(a,e.target.value)}}},[n("option",{attrs:{value:"1"},domProps:{selected:1===e.level}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),n("option",{attrs:{value:"5"},domProps:{selected:5===e.level}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),n("option",{attrs:{value:"10"},domProps:{selected:10===e.level}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[t.disabled?t._e():n("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(a)}}},[n("i",{staticClass:"fa fa-minus-circle"})])])])})),t._v(" "),t.disabled?t._e():n("div",[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),n("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.newItemLevel,expression:"newItemLevel"}],staticClass:"form-control",on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.newItemLevel=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),n("option",{attrs:{value:"5"}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),n("option",{attrs:{value:"10"}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[n("i",{staticClass:"fa fa-plus-circle"})])])])])],2)}),[],!1,null,"946d0f4c",null);e.default=i.exports},bNWy:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.form-control[data-v-685cdc22] {\n padding-right: 12px;\n}\n",""])},bUC5:function(t,e,n){"use strict";n.r(e);var a=n("XuX8"),s=n.n(a),i=n("qSUR");s.a.use(i.a);var o=new i.a({locale:document.querySelector("html").getAttribute("lang"),fallbackLocale:"en",silentFallbackWarn:!0,silentTranslationWarn:!0,messages:window.vuei18nLocales}),r=n("8gbZ"),l=n.n(r),c=n("433b"),u=n("Snq/"),d=n.n(u);n("9Wh1"),window.Vue=n("XuX8");var p=n("+fAT");p.keys().map((function(t){return Vue.component(t.split("/").pop().split(".")[0],p(t).default)})),Vue.use(l.a),Vue.use(c.a),Vue.component("v-select",d.a),Vue.mixin({methods:{route:route}}),Vue.filter("ucfirst",(function(t){return t?(t=t.toString()).charAt(0).toUpperCase()+t.slice(1):""}));new Vue({el:"#app",i18n:o})},cQaf:function(t,e,n){"use strict";n.r(e);var a={name:"Tab",props:{name:{required:!0},text:String,selected:{type:Boolean,default:!1},icon:String},data:function(){return{isActive:this.selected}}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("div",{directives:[{name:"show",rawName:"v-show",value:this.isActive,expression:"isActive"}],staticClass:"tab-pane",attrs:{role:"tabpanel",id:this.name}},[this._t("default")],2)}),[],!1,null,"387f82f4",null);e.default=i.exports},ct6m:function(t,e,n){var a=n("FpnD");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},ehi2:function(t,e,n){"use strict";n.r(e);var a={name:"SettingDashboardSelect",mixins:[n("nsVt").default],data:function(){return{ajaxData:{results:[]},default:{id:0,text:this.$t("No Default Dashboard")}}},mounted:function(){var t=this;axios.get(route("ajax.select.dashboard")).then((function(e){return t.ajaxData=e.data}))},computed:{localOptions:function(){return[this.default].concat(this.ajaxData.results)},selected:function(){var t=this;return 0===this.value?this.default:this.ajaxData.results.find((function(e){return e.id===t.value}))}}},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("v-select",{attrs:{options:t.localOptions,label:"text",clearable:!1,value:t.selected,required:t.required,disabled:t.disabled},on:{input:function(e){return t.$emit("input",e.id)}}})}),[],!1,null,"bfcfc78a",null);e.default=i.exports},fJHU:function(t,e,n){"use strict";var a=n("+EXy");n.n(a).a},k925:function(t,e,n){var a=n("MSLc");"string"==typeof a&&(a=[[t.i,a,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(a,s);a.locals&&(t.exports=a.locals)},kUp1:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\ndiv[data-v-e69e1a5e] {\n color: red;\n}\n",""])},ld4D:function(t,e,n){"use strict";n.r(e);var a={name:"SettingBoolean",mixins:[n("nsVt").default]},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("toggle-button",{attrs:{name:t.name,value:t.value,sync:!0,required:t.required,disabled:t.disabled},on:{change:function(e){return t.$emit("change",e.value)}}})}),[],!1,null,"1887659c",null);e.default=i.exports},nChq:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.panel.with-nav-tabs .panel-heading[data-v-6072cc1c]{\n padding: 5px 5px 0 5px;\n}\n.panel.with-nav-tabs .nav-tabs[data-v-6072cc1c]{\n border-bottom: none;\n}\n.panel.with-nav-tabs .nav-justified[data-v-6072cc1c]{\n margin-bottom: -1px;\n}\n.with-nav-tabs.panel-default .nav-tabs > li > a[data-v-6072cc1c],\n.with-nav-tabs.panel-default .nav-tabs > li > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > li > a[data-v-6072cc1c]:focus {\n color: #777;\n}\n.with-nav-tabs.panel-default .nav-tabs > .open > a[data-v-6072cc1c],\n.with-nav-tabs.panel-default .nav-tabs > .open > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > .open > a[data-v-6072cc1c]:focus,\n.with-nav-tabs.panel-default .nav-tabs > li > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > li > a[data-v-6072cc1c]:focus {\n color: #777;\n background-color: #ddd;\n border-color: transparent;\n}\n.with-nav-tabs.panel-default .nav-tabs > li.active > a[data-v-6072cc1c],\n.with-nav-tabs.panel-default .nav-tabs > li.active > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > li.active > a[data-v-6072cc1c]:focus {\n color: #555;\n background-color: #fff;\n border-color: #ddd;\n border-bottom-color: transparent;\n}\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu[data-v-6072cc1c] {\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a[data-v-6072cc1c] {\n color: #777;\n}\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a[data-v-6072cc1c]:focus {\n background-color: #ddd;\n}\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a[data-v-6072cc1c],\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a[data-v-6072cc1c]:hover,\n.with-nav-tabs.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a[data-v-6072cc1c]:focus {\n color: #fff;\n background-color: #555;\n}\n",""])},nsVt:function(t,e,n){"use strict";n.r(e);var a={name:"BaseSetting",props:{name:{type:String,required:!0},value:{required:!0},disabled:Boolean,required:Boolean,pattern:String,options:{}}},s=n("KHd+"),i=Object(s.a)(a,void 0,void 0,!1,null,null,null);e.default=i.exports},p9UU:function(t,e,n){"use strict";var a=n("Rt1K");n.n(a).a},"pYH+":function(t,e,n){"use strict";var a=n("JXYM");n.n(a).a},pyCd:function(t,e){},q8tH:function(t,e,n){"use strict";n.r(e);var a={name:"SettingText",mixins:[n("nsVt").default]},s=n("KHd+"),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"28baf02e",null);e.default=i.exports},qodb:function(t,e,n){"use strict";n.r(e);var a={name:"AccordionItem",props:{name:{type:String,required:!0},text:String,active:Boolean,icon:String},data:function(){return{isActive:this.active}},mounted:function(){window.location.hash===this.hash()&&(this.isActive=!0)},watch:{active:function(t){this.isActive=t},isActive:function(t){this.$parent.$emit(t?"expanded":"collapsed",this.slug())}},methods:{slug:function(){return this.name.toString().toLowerCase().replace(/\s+/g,"-")},hash:function(){return"#"+this.slug()}}},s=(n("0m/0"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"panel panel-default"},[n("div",{staticClass:"panel-heading",attrs:{role:"tab",id:t.slug()}},[n("h4",{staticClass:"panel-title"},[n("a",{staticClass:"accordion-item-trigger",class:{collapsed:!t.isActive},attrs:{role:"button","data-parent":"#accordion","data-href":t.hash()},on:{click:function(e){t.isActive=!t.isActive}}},[n("i",{staticClass:"fa fa-chevron-down accordion-item-trigger-icon"}),t._v(" "),t.icon?n("i",{class:["fa","fa-fw",t.icon]}):t._e(),t._v("\n "+t._s(t.text||t.name)+"\n ")])])]),t._v(" "),n("transition-collapse-height",[t.isActive?n("div",{class:["panel-collapse","collapse",{in:t.isActive}],attrs:{id:t.slug()+"-content",role:"tabpanel"}},[n("div",{staticClass:"panel-body"},[t._t("default")],2)]):t._e()])],1)}),[],!1,null,"af5cb116",null);e.default=i.exports},svCc:function(t,e,n){"use strict";var a=n("k925");n.n(a).a},tCMV:function(t,e,n){"use strict";n.r(e);var a={name:"SettingInteger",mixins:[n("nsVt").default],methods:{parseNumber:function(t){var e=parseFloat(t);return isNaN(e)?t:e}}},s=(n("p9UU"),n("KHd+")),i=Object(s.a)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"number",name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){t.$emit("input",t.parseNumber(e.target.value))}}})}),[],!1,null,"685cdc22",null);e.default=i.exports},tK7y:function(t,e,n){"use strict";var a=n("GJqu");n.n(a).a},ul9H:function(t,e,n){"use strict";n.r(e);var a=n("nsVt"),s=n("MQ60"),i=n.n(s),o={name:"SettingArray",mixins:[a.default],components:{draggable:i.a},data:function(){return{localList:this.value,newItem:""}},methods:{addItem:function(){this.localList.push(this.newItem),this.$emit("input",this.localList),this.newItem=""},removeItem:function(t){this.localList.splice(t,1),this.$emit("input",this.localList)},updateItem:function(t,e){this.localList[t]=e,this.$emit("input",this.localList)},dragged:function(){this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}},r=(n("QDxF"),n("KHd+")),l=Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}]},[n("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,a){return n("div",{staticClass:"input-group"},[n("span",{class:["input-group-addon",t.disabled?"disabled":""]},[t._v(t._s(a+1)+".")]),t._v(" "),n("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:e},on:{blur:function(e){return t.updateItem(a,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(a,e.target.value)}}}),t._v(" "),n("span",{staticClass:"input-group-btn"},[t.disabled?t._e():n("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(a)}}},[n("i",{staticClass:"fa fa-minus-circle"})])])])})),0),t._v(" "),t.disabled?t._e():n("div",[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem(e)},input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),n("span",{staticClass:"input-group-btn"},[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[n("i",{staticClass:"fa fa-plus-circle"})])])])])],1)}),[],!1,null,"1e553845",null);e.default=l.exports}},[[0,1,2]]]);