Fix snmp.timeout setting via Web UI (#13937)
Add Float type for global settings
This commit is contained in:
parent
7764faebb5
commit
806e10ace1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"/js/app.js": "/js/app.js?id=9a782f01e0fef69d02a2",
|
||||
"/js/app.js": "/js/app.js?id=5ddec7f7302f146a8dcc",
|
||||
"/js/manifest.js": "/js/manifest.js?id=2951ae529be231f05a93",
|
||||
"/css/vendor.css": "/css/vendor.css?id=2568831af31dbfc3128a",
|
||||
"/css/app.css": "/css/app.css?id=113371a4c292b55f1e9e",
|
||||
"/css/app.css": "/css/app.css?id=bd093a6a2e2682bb59ef",
|
||||
"/js/vendor.js": "/js/vendor.js?id=c5fd3d75a63757080dbb",
|
||||
"/js/lang/de.js": "/js/lang/de.js?id=e2912d41c392d8bc4e2c",
|
||||
"/js/lang/en.js": "/js/lang/en.js?id=7aed3226fceb16d522cd",
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<!--
|
||||
- FloatSetting.vue
|
||||
-
|
||||
- Description-
|
||||
-
|
||||
- This program is free software: you can redistribute it and/or modify
|
||||
- it under the terms of the GNU General Public License as published by
|
||||
- the Free Software Foundation, either version 3 of the License, or
|
||||
- (at your option) any later version.
|
||||
-
|
||||
- This program is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
- GNU General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-
|
||||
- @package LibreNMS
|
||||
- @link https://www.librenms.org
|
||||
- @copyright 2019 Tony Murray
|
||||
- @author Tony Murray <murraytony@gmail.com>
|
||||
-->
|
||||
|
||||
<template>
|
||||
<input type="number" class="form-control"
|
||||
:name="name"
|
||||
:value="value"
|
||||
@input="$emit('input', parseNumber($event.target.value))"
|
||||
:required="required"
|
||||
:disabled="disabled"
|
||||
>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseSetting from "./BaseSetting";
|
||||
|
||||
export default {
|
||||
name: "SettingFloat",
|
||||
mixins: [BaseSetting],
|
||||
methods: {
|
||||
parseNumber(number) {
|
||||
let value = parseFloat(number);
|
||||
return isNaN(value) ? number : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.form-control {
|
||||
padding-right: 12px;
|
||||
}
|
||||
</style>
|
|
@ -1596,6 +1596,7 @@ return [
|
|||
'boolean' => ':value is not a valid boolean',
|
||||
'color' => ':value is not a valid hex color code',
|
||||
'email' => ':value is not a valid email',
|
||||
'float' => ':value is not an float',
|
||||
'integer' => ':value is not an integer',
|
||||
'password' => 'The password is incorrect',
|
||||
'select' => ':value is not an allowed value',
|
||||
|
|
Loading…
Reference in New Issue