diff --git a/LibreNMS/Util/DynamicConfigItem.php b/LibreNMS/Util/DynamicConfigItem.php index 9cd560525e..b6bf468422 100644 --- a/LibreNMS/Util/DynamicConfigItem.php +++ b/LibreNMS/Util/DynamicConfigItem.php @@ -86,6 +86,10 @@ class DynamicConfigItem implements \ArrayAccess return (bool)preg_match('/^#?[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/', $value); } elseif (in_array($this->type, ['text', 'password'])) { return !is_array($value); + } elseif ($this->type === 'executable') { + return is_file($value) && is_executable($value); + } elseif ($this->type === 'directory') { + return is_dir($value); } return false; diff --git a/html/js/app.js b/html/js/app.js index efcd06e3e1..3e993e1615 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -1 +1 @@ -(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/PollerSettings.vue":"h5Vs","./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/SettingMultiple.vue":"ir5f","./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",""])},"5ycP":function(t,e,n){var a=n("7rtz");"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)},"7rtz":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.tab-content {\n width: 100%;\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},prefix:{type:String,default:"settings"},id:{required:!1}},data:function(){return{value:this.setting.value,feedback:""}},methods:{persistValue:function(t){var e=this;axios.put(route(this.prefix+".update",this.getRouteParams()),{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","multiple"].includes(this.setting.type)?this.persistValue(t):this.debouncePersistValue(t),this.value=t},getUnits:function(){var t=this.prefix+".units."+this.setting.units;return this.$te(t)?this.$t(t):this.setting.units},getDescription:function(){var t=this.prefix+".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(this.prefix+".settings."+this.setting.name+".help");return this.setting.overridden&&(t+="

"+this.$t(this.prefix+".readonly")),t},hasHelp:function(){var t=this.prefix+".settings."+this.setting.name+".help";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)},resetToDefault:function(){var t=this;axios.delete(route(this.prefix+".destroy",this.getRouteParams())).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)},getRouteParams:function(){var t=[this.setting.name];return this.id&&t.unshift(this.id),t},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 "),t.setting.units?n("span",[t._v("("+t._s(t.getUnits())+")")]):t._e()]),t._v(" "),n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:!!t.setting.disabled&&t.$t(this.prefix+".readonly")},expression:"{ content: setting.disabled ? $t(this.prefix + '.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,"55ffb6ad",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",""])},Mxgh:function(t,e,n){var a=n("nz2v");"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)},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 r,o=t[Symbol.iterator]();!(a=(r=o.next()).done)&&(n.push(r.value),!e||n.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==o.return||o.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 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},nz2v:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.setting-container[data-v-64edb5ca] {\n margin-bottom: 10px;\n}\n",""])},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),r={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}}},o=(n("QDxF"),n("KHd+")),l=Object(o.a)(r,(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]]]); \ No newline at end of file +(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/PollerSettings.vue":"h5Vs","./components/SettingArray.vue":"ul9H","./components/SettingBoolean.vue":"ld4D","./components/SettingDashboardSelect.vue":"ehi2","./components/SettingDirectory.vue":"Kkoz","./components/SettingEmail.vue":"YujN","./components/SettingExecutable.vue":"aNf0","./components/SettingInteger.vue":"tCMV","./components/SettingLdapGroups.vue":"Zrdh","./components/SettingMultiple.vue":"ir5f","./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",""])},"5ycP":function(t,e,n){var a=n("7rtz");"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)},"7rtz":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.tab-content {\n width: 100%;\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},prefix:{type:String,default:"settings"},id:{required:!1}},data:function(){return{value:this.setting.value,feedback:""}},methods:{persistValue:function(t){var e=this;axios.put(route(this.prefix+".update",this.getRouteParams()),{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","multiple"].includes(this.setting.type)?this.persistValue(t):this.debouncePersistValue(t),this.value=t},getUnits:function(){var t=this.prefix+".units."+this.setting.units;return this.$te(t)?this.$t(t):this.setting.units},getDescription:function(){var t=this.prefix+".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(this.prefix+".settings."+this.setting.name+".help");return this.setting.overridden&&(t+="

"+this.$t(this.prefix+".readonly")),t},hasHelp:function(){var t=this.prefix+".settings."+this.setting.name+".help";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)},resetToDefault:function(){var t=this;axios.delete(route(this.prefix+".destroy",this.getRouteParams())).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)},getRouteParams:function(){var t=[this.setting.name];return this.id&&t.unshift(this.id),t},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 "),t.setting.units?n("span",[t._v("("+t._s(t.getUnits())+")")]):t._e()]),t._v(" "),n("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:!!t.setting.disabled&&t.$t(this.prefix+".readonly")},expression:"{ content: setting.disabled ? $t(this.prefix + '.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,"55ffb6ad",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)},Kkoz:function(t,e,n){"use strict";n.r(e);var a={name:"SettingDirectory",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,"62a123fd",null);e.default=i.exports},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",""])},Mxgh:function(t,e,n){var a=n("nz2v");"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)},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 r,o=t[Symbol.iterator]();!(a=(r=o.next()).done)&&(n.push(r.value),!e||n.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==o.return||o.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 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},nz2v:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.setting-container[data-v-64edb5ca] {\n margin-bottom: 10px;\n}\n",""])},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),r={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}}},o=(n("QDxF"),n("KHd+")),l=Object(o.a)(r,(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]]]); \ No newline at end of file diff --git a/html/mix-manifest.json b/html/mix-manifest.json index 60110b4e6e..4ac5f02ec4 100644 --- a/html/mix-manifest.json +++ b/html/mix-manifest.json @@ -1,14 +1,14 @@ { - "/js/app.js": "/js/app.js?id=4d14830ae8a6dfe54711", + "/js/app.js": "/js/app.js?id=eafcc78bac952df12bbc", "/css/app.css": "/css/app.css?id=ffec4165a9c98d892a32", "/js/manifest.js": "/js/manifest.js?id=3c768977c2574a34506e", "/js/vendor.js": "/js/vendor.js?id=c0e0ebbfd027a8baefb4", - "/js/lang/de.js": "/js/lang/de.js?id=73ed23dde31af205f171", - "/js/lang/en.js": "/js/lang/en.js?id=e2297f39a1eabc180200", - "/js/lang/fr.js": "/js/lang/fr.js?id=91daac2f7383c820457b", - "/js/lang/it.js": "/js/lang/it.js?id=c202a58a7f5bca08801b", - "/js/lang/ru.js": "/js/lang/ru.js?id=aaab82593592e9368a08", - "/js/lang/uk.js": "/js/lang/uk.js?id=9b0b074259847e7aaff3", - "/js/lang/zh-CN.js": "/js/lang/zh-CN.js?id=f6d951b7d6b1f25810fc", - "/js/lang/zh-TW.js": "/js/lang/zh-TW.js?id=21cdd68dc06a428e7260" + "/js/lang/de.js": "/js/lang/de.js?id=b1a653a8eba34fe0c83d", + "/js/lang/en.js": "/js/lang/en.js?id=6a05a6687ebc32c73b5b", + "/js/lang/fr.js": "/js/lang/fr.js?id=f9aba2c115d3716739b5", + "/js/lang/it.js": "/js/lang/it.js?id=514765c5399ffaa111b9", + "/js/lang/ru.js": "/js/lang/ru.js?id=f376f9bbe31e66bae4fc", + "/js/lang/uk.js": "/js/lang/uk.js?id=483225c7042242ce65a7", + "/js/lang/zh-CN.js": "/js/lang/zh-CN.js?id=68da151165752f2e7983", + "/js/lang/zh-TW.js": "/js/lang/zh-TW.js?id=cd54708a7b044555884f" } diff --git a/misc/config_definitions.json b/misc/config_definitions.json index 041e81aed7..44df9020bc 100644 --- a/misc/config_definitions.json +++ b/misc/config_definitions.json @@ -1272,7 +1272,7 @@ }, "dot": { "default": "/usr/bin/dot", - "type": "text" + "type": "executable" }, "email_auto_tls": { "default": true, @@ -1317,7 +1317,7 @@ "group": "alerting", "section": "email", "order": 5, - "type": "text", + "type": "executable", "when": { "setting": "email_backend", "operator": "equals", @@ -1542,12 +1542,12 @@ "group": "external", "section": "binaries", "order": 0, - "type": "text" + "type": "executable" }, "fping6": { "default": "fping6", "group": "external", - "section": "binaries", + "section": "executable", "order": 1, "type": "text" }, @@ -3326,7 +3326,7 @@ } }, "html_dir": { - "type": "text" + "type": "directory" }, "http_proxy": { "group": "system", @@ -3484,7 +3484,7 @@ "order": 8 }, "install_dir": { - "type": "text" + "type": "directory" }, "int_core": { "default": true, @@ -3532,7 +3532,7 @@ "group": "external", "section": "binaries", "order": 3, - "type": "text" + "type": "executable" }, "irc_alert": { "default": false, @@ -3644,7 +3644,7 @@ "type": "color" }, "log_dir": { - "type": "text" + "type": "directory" }, "log_file": { "type": "text" @@ -3669,7 +3669,7 @@ "type": "text" }, "mib_dir": { - "type": "text" + "type": "directory" }, "mono_font": { "default": "DejaVuSansMono", @@ -3680,7 +3680,7 @@ "group": "external", "section": "binaries", "order": 4, - "type": "text" + "type": "executable" }, "mydomain": { "type": "text", @@ -3695,7 +3695,7 @@ }, "nagios_plugins": { "default": "/usr/lib/nagios/plugins", - "type": "text" + "type": "directory" }, "network_map_items": { "default": [ @@ -3760,7 +3760,7 @@ "group": "external", "section": "binaries", "order": 8, - "type": "text" + "type": "executable" }, "nfsen_enable": { "default": false, @@ -3886,7 +3886,7 @@ "group": "external", "section": "binaries", "order": 5, - "type": "text" + "type": "executable" }, "notifications.LibreNMS": { "default": "http://www.librenms.org/notifications.rss", @@ -4079,10 +4079,10 @@ "group": "external", "section": "binaries", "order": 6, - "type": "text" + "type": "executable" }, "plugin_dir": { - "type": "text" + "type": "directory" }, "poller_modules.unix-agent": { "order": 420, @@ -4540,7 +4540,7 @@ "group": "poller", "section": "rrdtool", "order": 6, - "type": "text" + "type": "directory" }, "rrd_purge": { "group": "system", @@ -4587,7 +4587,7 @@ "group": "external", "section": "binaries", "order": -1, - "type": "text" + "type": "executable" }, "rrdtool_tune": { "default": false, @@ -4771,7 +4771,7 @@ "group": "external", "section": "binaries", "order": 7, - "type": "text" + "type": "executable" }, "shorthost_target_length": { "group": "webui", @@ -4970,28 +4970,28 @@ "group": "external", "section": "binaries", "order": 8, - "type": "text" + "type": "executable" }, "snmpget": { "default": "/usr/bin/snmpget", "group": "external", "section": "binaries", "order": 9, - "type": "text" + "type": "executable" }, "snmpgetnext": { "default": "snmpgetnext", "group": "external", "section": "binaries", "order": 10, - "type": "text" + "type": "executable" }, "snmptranslate": { "default": "/usr/bin/snmptranslate", "group": "external", "section": "binaries", "order": 11, - "type": "text" + "type": "executable" }, "snmptraps.eventlog": { "default": "unhandled", @@ -5006,7 +5006,7 @@ "group": "external", "section": "binaries", "order": 12, - "type": "text" + "type": "executable" }, "sso.create_users": { "default": true, @@ -5052,7 +5052,7 @@ "type": "integer" }, "temp_dir": { - "type": "text" + "type": "directory" }, "title_image": { "group": "webui", @@ -5073,14 +5073,14 @@ "group": "external", "section": "binaries", "order": 13, - "type": "text" + "type": "executable" }, "traceroute6": { "default": "traceroute6", "group": "external", "section": "binaries", "order": 14, - "type": "text" + "type": "executable" }, "transit_descr": { "default": ["transit"], @@ -5158,7 +5158,7 @@ "group": "external", "section": "binaries", "order": 15, - "type": "text" + "type": "executable" }, "warn.ifdown": { "default": true, @@ -5258,7 +5258,7 @@ "group": "external", "section": "binaries", "order": 16, - "type": "text" + "type": "executable" }, "xirrus_disable_stations": { "default": false, @@ -5276,7 +5276,7 @@ "group": "external", "section": "smokeping", "order": 1, - "type": "text" + "type": "directory" }, "smokeping.url": { "group": "external", diff --git a/misc/config_schema.json b/misc/config_schema.json index ba973a969f..cdecc5f997 100644 --- a/misc/config_schema.json +++ b/misc/config_schema.json @@ -87,7 +87,9 @@ "dashboard-select", "snmp3auth", "ldap-groups", - "ad-groups" + "ad-groups", + "executable", + "directory" ] } }, diff --git a/resources/js/components/SettingDirectory.vue b/resources/js/components/SettingDirectory.vue new file mode 100644 index 0000000000..4e92c883ef --- /dev/null +++ b/resources/js/components/SettingDirectory.vue @@ -0,0 +1,47 @@ + + + + + + + diff --git a/resources/js/components/SettingExecutable.vue b/resources/js/components/SettingExecutable.vue new file mode 100644 index 0000000000..dfc8e36893 --- /dev/null +++ b/resources/js/components/SettingExecutable.vue @@ -0,0 +1,47 @@ + + + + + + + diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index bcf73c4608..d7c0db3d19 100644 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -1366,5 +1366,7 @@ return [ 'select' => ':value is not an allowed value', 'text' => ':value is not allowed', 'array' => 'Invalid format', + 'executable' => ':value is not a valid executable', + 'directory' => ':value is not a valid directory', ] ];