Commit Graph

106 Commits

Author SHA1 Message Date
Tony Murray
1d7347dd62 Validate config schema, add types to all (#10723)
* Vaildate config_definitions.json schema

* finish adding types and other cleanups
2019-10-20 23:08:40 +00:00
Tony Murray
f9b704cb29 Add distributed polling config settings (#10711)
Show error on cli when type or validation is not set
2019-10-17 18:32:27 +00:00
Tony Murray
31dad0aaa7 Add lnms commands to get and set config settings (#10534)
* add lnms commands to get and set config settings
lnms config:get and lnms config:set
Note: you cannot override settings in config.php

* Update to check setting exists and value validation rules.
2019-10-17 17:22:43 +00:00
Tony Murray
01e07e24b6 Restore base_url base tag (#10705) 2019-10-17 11:38:53 +00:00
Tony Murray
699aa8a042 Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00
PipoCanaja
3c9a0f9c6b French translation update (#10640) 2019-09-30 10:44:22 +00:00
SourceDoctor
b606a42ba9 List ungrouped devices on group management page (#10527)
* list ungrouped devices on group management page

* some code changes

* some code changes

* change query to eager loading

* use url macro

* Update resources/views/device-group/index.blade.php

Co-Authored-By: Neil Lathwood <gh+n@laf.io>

* Title Case

* style fixes

* inline @if

* remove container

* revert force push
2019-09-21 05:25:02 +00:00
Markus Witt
81e57c8380 Fix missing to-parameter in dashboard graph widget link (#10600) 2019-09-12 23:08:43 +02:00
SourceDoctor
120e513f1c adding german language support (#10584)
* adding german language support

* speech fixes
2019-09-09 14:57:39 +02:00
Jason Cheng
d2ae04f88e Add Graylog severity translation 2019-09-09 10:20:16 +02:00
Jason Cheng
dc950ec1ed Modifying the Syslog widget can be translate 2019-09-09 10:15:19 +02:00
Jason Cheng
490ee52d58 Update zh-TW.json 2019-09-09 10:15:19 +02:00
Bounzz
c3326bedf9 Improved french translation (#10586)
* French translation
* Update fr.json
2019-09-06 19:41:09 +02:00
Jason Cheng
b8b961b78c Update zh-TW.json (#10579) 2019-09-06 04:41:27 +00:00
Jellyfrog
e4314922c1 Move Authlog to Laravel (#10559)
* Move Authlog to Laravel

* Update authlog.blade.php
2019-09-05 02:12:48 +00:00
Bounzz
ac359bb377 Updated French translation fr.json (#10578)
* Update fr.json

* Update fr.json

* Fix typo for preference.php FR

* Update fr.json
2019-09-05 02:19:39 +02:00
Tony Murray
852647198b use -s option for older versions of git (#10561)
fix small visual issue too
2019-08-27 16:48:21 -05:00
rsys-dev
3cb971e33f Added Graylog to device overview and log level filter mechanism (#10509)
* Added Recent Graylog Entries to Device Overview (WIP)

* Improved "Recent Graylog" entries on device overview (WIP)
Added $config['graylog']['device-page']['rowCount'] to set maximum rows shown in "Recent Graylog" on device overview (Default: 10)
Added $config['graylog']['device-page']['maxLevel'] to set the maximum message level shown in "Recent Graylog" on device overview (Default: 7, validates value to be >= 0 and <= 7)

* Fixed code styling issue

* Added Log Level filter to Graylog widget
Added Log Level filter to Graylog pages (device pages and graylog overview)

* Added documentation for new configuration options

* Removed unneccesary (and already commented) using
Renamed "maxLevel" to "loglevel" as suggested by a colleague

* Added doc for $config['graylog']['loglevel']

* Removed includes/html/print-graylog.inc.php and inlined it in includes/html/pages/device/overview/graylog.inc.php
Removed comma in json object in resources/views/widgets/graylog.blade.php
Replaced translation strings in resources/views/widgets/settings/graylog.blade.php with existing translation strings

* log level -> minimum log level

* Use Config::get() default functionality

* Oops
2019-08-27 12:44:27 -05:00
Jason Cheng
7783776738 Update zh-TW.json for about page (#10558)
* Update zh-TW.json for about page
* Update zh-TW.json for about page
2019-08-26 16:42:27 +02:00
Jellyfrog
47e4641e04 Convert About page to Laravel (#10551)
* Convert About page to laravel

* clean up callback stuff

* More translatable strings
2019-08-24 16:52:10 -05:00
Tony Murray
2441096015 Fix html injection in user fields (#10535)
validate realname and descr to alpha/numeric/spaces only
This flaw is actually in bootgrid, the html isn't interpreted until bootgrid loads.
2019-08-21 20:36:22 -05:00
Jellyfrog
9d7edd879f Fixed menu links that used to redirect to # (#10540) 2019-08-20 21:38:04 +01:00
Tony Murray
d64c884b4c Fix Syslog widget (#10516)
missing comma
2019-08-12 10:13:25 -05:00
Jellyfrog
fc281ccc4b Add device group filter to widgets (#9692) 2019-08-07 19:59:14 -05:00
Tony Murray
42fd5afb23 Laravel 5.8 and updated dependencies (#10489)
* Laravel 5.8
and dependencies

* Fix cache time

* upstream base file changes

* Accidentally ran composer with PHP 7.3

* fix test error

* one more

* one more

* one more

* fix dotenv loading
2019-08-05 15:54:58 -05:00
Dragan Savic
326a4f4441 Add an option to hide Location column in Alerts widget (#10482)
* Update AlertsController.php

* Update alerts.blade.php

* Update alerts.blade.php
2019-08-03 23:25:08 -05:00
rsys-dev
6394c35ce6 Graylog entry matching device if source is not hostname or primary ip (#10458)
* Added findByHostnameOrIp($hostnameOrIp) for devices.
    Returns Device or null
Fixed Graylog device links, "device" parameter in URL was IP or Hostname instead of device id before
Added Severity number to name conversion. Can be activated by setting $config['graylog']['severity-names'] = "true" in config
Added Facility number to name conversion. Can be activated by setting $config['graylog']['facility-names'] = "true" in config

* Added $config['graylog']['match-any-address']. To enable matching Graylog entries by any interface address set to "true"
Added code to match Graylog entries by any interface address instead of only hostname or primary address

* Fixed missing quotation marks in <script> block in includes/html/common/graylog.inc.php:46, causing graylog page only load header with empty table. Introduced in https://github.com/librenms/librenms/pull/10447

* Modified code to reduce complexity as mentioned by codeclimate

* Changed findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant

* Added Language File "syslog.php" for Syslog Severity and Facility
Merged functions "levelName($level)" and "facilityName($facility)" to "syslogPrioParser($type, $value)" where $type should be "facility" or "severity" and $value the numeric or text facility or severity. Returns "NUMBER (NAME)" if possible, otherwhise returns $value

* Shortened findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant

* Add shortcut ipv4 and ipv6 device relationships
Better code for adding source addresses
Only translate level and facility if they are numeric
Allow level and facility to be sortable
No need for device link if we know it won't work.  Before the code was punting to save sql queries.

* Cache devices
Took queries from 69 to 6 in my quick test.

* Added Documentation for $config['graylog']['match-any-address']

* Fixed missing quotation marks in app/ApiClients/GraylogApi.php:125
2019-07-26 15:13:35 -05:00
Tony Murray
a40d898ad8 Fix 2fa enable (#10462)
* tmp

* Fix 2fa qr code
Load the correct qrcode js library

* Delete comware_hpe5700.json

* Delete comware_hpe5700.snmprec
2019-07-25 12:20:25 -05:00
djamp42
fd42ea6e83 Add more detail to webgui alerts (#10388)
* alert sysname

* use existing config option

* add location to alert table

* made location a link

* fix formating

* Update alerts.inc.php
2019-07-18 23:24:24 -05:00
Tony Murray
3ead462549 Enable CSRF protection (#10447)
* Enable CSRF protection

* fix style issues
2019-07-17 07:20:26 -05:00
Jason Cheng
bad050520e Make Disabled/Shutdown to be translatable (#10398)
* Make Disabled/Shutdown to be translatable

* Update zh-TW.json

* Remove excess white space

* Updated additional language files for Shutdown command
2019-07-04 10:40:20 +02:00
Jason Cheng
5dce5cabd6 Update zh-TW.json (#10391) 2019-06-29 20:25:02 -05:00
djamp42
197947d4a1 Add custom title to alert widget (#10373) 2019-06-27 00:32:16 -05:00
Martijn Schmidt
9d68f27296 Use sensor labels for overview/inventory pages, refactor some html-page related code (#10287)
* Refactor: use get_state_label() for the overview

* Move state translation to get_state_label()

Several html pages used similar database calls and sometimes very
different methodology to determine the state label and state text
before calling get_state_label(), so moved that part of the task
into the function itself instead of replicating the same code
multiple times on different pages.

* Move label creation to get_sensor_label_color()

Also removed a duplicate sensor class to unit function.

* Refactor some if/else statements for simplicity.

* Enable state translations for the inventory page.

* Remove blank line found at end of control structure

* Enable unit translation, fix typos.

* Change to dbFetchRow(), return string directly.

* Update functions.inc.php

* Stop displaying the raw value on state labels.

* Apply 1c7c3ca change for default case too.
2019-06-27 00:30:10 -05:00
Jason Cheng
ebd004edc7 Create sensors.php and wireless.php for zh-TW (#10368)
* Create sensors.php for Traditional Chinese.

* Create wireless.php

* Update wireless.php
2019-06-27 00:25:58 -05:00
Jason Cheng
94f85c9222 Update zh-TW (#10361)
* Update zh-TW.json

* Add the missing "Login" translation
2019-06-27 00:25:06 -05:00
Lucas Dousse
6239db7435 French language support (#10277)
* First part of french traduction

* bugfix: false inattention

* merge with @murrant json and WIP

* Work in progress on a time-loss period

* Work in progress on a time-loss period

* Change with comment @Bounzz
2019-06-20 20:18:15 -05:00
Jason Cheng
1d2adecd79 Traditional Chinese language support (#10178)
* Traditional Chinese language support

* Rename zh-tw to zh-tw.json

* Rename zh-tw.json to zh-TW.json

* Update zh-TW.json

* Create preferences.php

* Update zh-TW.json

* Create auth.php

* Create commands.php

* Create pagination.php

* Create passwords.php

* Create validation.php

* Update auth.php

* Update passwords.php

* Update zh-TW.json
2019-06-20 20:17:55 -05:00
rkislov
a0bcf190bf Russian language update (#10319)
* Russian language update

* Russian language update
2019-06-20 16:06:14 -05:00
p4k8
210529cff3 Ukrainian language support (#10328)
* first pass of uk translation

* Update commands.php

* Update commands.php

* Update wireless.php
2019-06-20 16:05:12 -05:00
Tony Murray
1a60c44eb0 Device groups rewrite (#10346)
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support

* cleanup, make relationship save, and validate it

* builder WIP

* rules builder and rules saving/loading

* Parse query builder to Laravel Fluent query

* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.

* remove unused old code
Update API and other places to use Eloquent

* debug output in poller restored

* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling

* hide pattern for static group

* Implement authorization
Use in the menu too

* update schema

* fix rollback

* Don't abort on invalid queries

* fixes to query builder

* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)

* Add macro support for QueryBuilderFluentParser

* add test for macro that accepts value

* More space in forms
Retain rules when converted to static
no duplicate names allowed

* Better error feedback
Update related devices on save

* Add button icon

* format

* update docs

* fix tests

* Fix some QueryBuilderFluentParser issues with OR
updated/more test data

* Show device groups runtime
fix querybuilder.json format

* Store table joins in the rules to minimize polling time
Update group joins in daily.sh (and when they are saved)

* Update daily.php

* Add units to time
2019-06-19 16:01:53 -05:00
Tony Murray
c2b09b8f80 Revert "Rewritten device groups (including static) (#10295)" (#10340)
This reverts commit cfc51d51f5.
2019-06-16 21:52:57 -05:00
Tony Murray
cfc51d51f5 Rewritten device groups (including static) (#10295)
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support

* cleanup, make relationship save, and validate it

* builder WIP

* rules builder and rules saving/loading

* Parse query builder to Laravel Fluent query

* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.

* remove unused old code
Update API and other places to use Eloquent

* debug output in poller restored

* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling

* hide pattern for static group

* Implement authorization
Use in the menu too

* update schema

* fix rollback

* Don't abort on invalid queries

* fixes to query builder

* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)

* Add macro support for QueryBuilderFluentParser

* add test for macro that accepts value

* More space in forms
Retain rules when converted to static
no duplicate names allowed

* Better error feedback
Update related devices on save

* Add button icon

* format

* update docs

* fix tests
2019-06-16 08:27:22 -05:00
Tony Murray
1ae77dfb70 Fix language select for new languages (#10323) 2019-06-07 21:07:49 -05:00
Tony Murray
6ba05cdbbb Enable menu translation (#10298)
And better translation support for sensors, not complete
2019-06-04 20:03:50 -05:00
ckforum
cafe057001 Add overlib link css class for changing background color - Update Url.php (#10300)
* Update Url.php

Ad css class to onmouserover event and overlib, easyer to change color of background ex.: for a dark theme vs bg color hardcoded

* Update styles.css

* Update Url.php

* Update librenmsv1.blade.php
2019-06-03 19:40:56 -05:00
Tony Murray
1c1b07fee5 Restore vminfo menu (#10303) 2019-06-03 19:15:13 -05:00
Tony Murray
41623f2894 User Management: use url helpers (#10288)
Small fix for success string
2019-05-31 20:04:01 -05:00
Tony Murray
eea0d4d359 Only allow mysql auth type to add users (#10283) 2019-05-31 00:57:36 -05:00
Tony Murray
ea45fd9d42 Store language select name in translation files (#10272)
* Move language selection string to translation files
Falls back to locale name

* Reload page for locale changes
2019-05-29 13:36:07 -05:00