Commit Graph

87 Commits

Author SHA1 Message Date
Anthony F. McInerney
5388a20c09
Add Service Templates (#12107)
* service templates - move to blade - jellyfrog fixes - revert get to find and fix discovery lookup

* service templates - move to blade - wip

* service templates - move to blade - wip

* service templates - move to blade - deprecate delete_service_template

* service templates - move to blade - deprecate delete_service_template

* service templates - move to blade - deprecate remove_service_template

* service templates - move to blade - deprecate remove_service_template

* service templates - move to blade - fix permisson lookup

* service templates - move to blade - fix remove route

* service templates - move to blade - fix remove route

* service templates - move to blade - fix permisson lookup

* service templates - move to blade - fix permisson lookup

* service templates - move to blade - fix permisson lookup

* service templates - move to blade - fix permisson lookup

* service templates - move to blade - fixs

* service templates - move to blade - fixes

* service templates - move to blade - fixes

* service templates - move to blade - fixes

* service templates - move to blade - nullable input?

* service templates - move to blade - nullable input?

* service templates - move to blade - nullable input?

* service templates - move to blade - add selected for device group id and type

* service templates - move to blade - add selected for device group id and type

* service templates - move to blade - add selected for device group id and type

* service templates - move to blade - fix discovery response

* service templates - move to blade - fix device group index display

* service templates - move to blade - add delete to discover_service_template

* service templates - move to blade - add discover all button - function foobar

* service templates - move to blade - add discover all button - function foobar

* service templates - move to blade - add discover all button - function foobar

* service templates - move to blade - fixes

* service templates - move to blade - fixes

* service templates - move to blade - fixes

* service templates - move to blade - button fixes

* service templates - move to blade - button fixes

* service templates - move to blade - button fixes

* service templates - move to blade - attempt route fix

* service templates - move to blade - attempt route fix

* service templates - move to blade - attempt route fix

* service templates - move to blade - attempt route fix

* service templates - move to blade - fix discovery function

* service templates - move to blade - fix discovery function

* service templates - move to blade - fix return values - thanks SourceDoctor

* service templates - move to blade - attempt route fix

* service templates - move to blade - button variable fix

* service templates - move to blade - button variable fix

* service templates - move to blade - button variable fix

* service templates - move to blade - function fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - move to blade - permissions fix

* service templates - add initial api - and model permissions fix

* service templates - add initial api - discovery too

* service templates - add initial api - discovery too

* service templates - merge fix

* service templates - api fixes

* service templates - api fixes

* service templates - remove bad fixe

* service templates - discover null? :)

* service templates - Policy requires Facade?

* service templates - Policy requires Facade?

* service templates - REVERT Policy requires Facade?

* service templates - REVERT Policy requires Facade?

* Revert "service templates - REVERT Policy requires Facade?"

This reverts commit 7752b3e4e5.

* service templates - clean up discover api call

* service templates - clean up discover api call

* service templates - clean up discover api call

* service templates - clean up discover api call

* service templates - clean up discover api call

* service templates - attempt route fix

* Revert "service templates - attempt route fix"

This reverts commit b48970351e.

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template

* service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template

* Revert "service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template"

This reverts commit ef93315db5.

* Revert "service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template"

This reverts commit 73af819a60.

* Revert "service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template"

This reverts commit dd019c3105.

* Revert "service templates - jellyfrog fixes - dbchanged - DeviceGroup relates to Service Template"

This reverts commit 94aaaf7976.

* service templates - jellyfrog fixes - DeviceGroup relates to Service Template

* service templates - fix permissions

* service templates - db service_templates_perms

* service templates - fix permissions

* service templates - fix permissions

* service templates - fix permissions

* service templates - fix permissions

* service templates - fix permissions

* service templates - fix edit.blade missing parameters - still 403 :(

* service templates - jellyfrog -fix route and construct

* service templates - jellyfrog -fix route and construct

* service templates - jellyfrog -fix route and construct

* Revert "service templates - jellyfrog -fix route and construct"

This reverts commit ec1eea7a99.

* service templates - jellyfrog -fix routes

* service templates - jellyfrog -fix services lookup

* service templates - edit blade fixes

* service templates - edit blade fixes - service or services or template or serviceTemplate or service_template good luck

* service templates - edit blade fixes

* service templates - index blade fixes

* service templates - discover return fix

* service templates - remove return fix

* service templates - fix discovery api returns

* service templates - fix discovery api returns

* service templates - fix discovery api returns

* service templates - fix discovery - test

* service templates - fix discovery

* service templates - fix checkbox integer

* service templates - fix checkbox integer

* service templates - fix checkbox integer

* service templates - fix checkbox integer

* service templates - fix checkbox integer

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover all

* service templates - fix discover

* service templates - fix discover

* service templates - fix discover

* service templates - fix discover

* service templates - fix discover

* service templates - move discover/apply to blade - last of the old functions - wip

* service templates - move discover/apply to blade - last of the old functions - wip

* service templates - move discover/apply to blade - last of the old functions - wip

* service templates - change all relevant to template for sanity

* service templates - inspection fixes

* service templates - inspection fixes

* service templates - inspection fixes

* service templates - murrant fixes - use createOrUpdate - add obervers - fix function call

* service templates - murrant fixes - add ServiceController store - not used

* service templates - murrant fixes - add Observers file)

* service templates - murrant fixes - correct ServiceController

* service templates - murrant fixes - fix observers load

* service templates - observer fix

* service templates - schedule discovery function call fix, cheeky, is this allowed?

* service templates - attempt route fix.

* service templates - attempt route fix 2

* service templates - blade route applyall missing url - ie the route lol

* service templates - blade route applyall missing url - ie the route lol

* service templates - fix routes - bingo!

* service templates - fix routes - bingo!

* service templates - fix blade missing quote

* service templates - jellyfrog fix - remove pluck

* service templates - missing template id on service update

* service templates - jellyfrog fix - add get

* service templates - fix service db defaults / null

* service templates - fix service update

* service templates - fix service update

* service templates - fix service update

* service templates - fix service devicegroup change - obsoletes service_template_change in servicesdb

* service templates - fix service devicegroup change - obsoletes service_template_change in servicesdb

* Add service templates - phpcs fixes - and attemp whereNotIn scope

* Add service templates - styleci

* Add service templates - styleci

* Add service templates - fix notindevicegroup scope

* Add service templates - removed service service_template_changed - not required for delete or update

* Add service templates - removed service service_template_changed - not required for delete or update

* Add service templates - murrant fixes - add protected casts - fix checkbox

* Add service templates - fix checkbox - attempt2

* Add service templates - fix checkbox - attempt3

* Add service templates - fix checkbox - attempt3

* Add service templates - fix checkbox - attempt4

* Add service templates - fix delete row selection

* Revert "Add service templates - fix delete row selection"

This reverts commit 4d9e4990f2.

* Add service templates - fix delete row selection

* Add service templates - fix automatic discovery

* Add service templates - fix automatic discovery

* Add service templates - checkbox - add hidden input

* Add service templates - checkbox - add old value back?

* Add service templates - checkbox - fix disabled

* Add service templates - checkbox - fix disabled

* Add service templates - service fixes - styleci

* Add service templates - make devicegroup required

* Add service templates - let Disable text wrap

* Add service templates - dont allow device group to be deleted when service templates exist

* Add service templates - dont allow device group to be deleted when service templates exist

* Add service templates - enable multiple device groups - wip

* Add service templates - enable multiple device groups - wip

* Add service templates - enable multiple device groups - wip

* Add service templates - enable multiple device groups - dbschema - wip

* Add service templates - enable multiple device groups - db migration - wip

* Add service templates - enable multiple device groups - db migration - wip

* Add service templates - enable multiple device groups - wip

* Add service templates - enable multiple device groups - wip

* Add service templates - enable service template Groups - relationships to device AND device groups

* Add service templates - styleci fixes

* Add service templates - styleci fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - fixes

* Add service templates - db - primarykey issues

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fix migrations

* Add service templates - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - blade view - fixes

* Add service templates - misc update for travis build trigger

* Add service templates - restrict view to only show device/groups that have templates applied

* Add service templates - fix devicegroup update

* remove permissions table stuff

* Fix schema rollback

* fix style

* Update ServiceTemplateController.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-02-02 00:40:11 -06:00
SourceDoctor
17f5a3f232
Copy Dashboard to other User (#11989)
* Copy Dashboard to other User

* travis fix

* only allow Dashboard Copy to Admins

* rewrite query

* move Controller to Eloquent

* optimize row copy

* travis ...

* move copy field to edit section

* code changes

* code changes

* limit copy feature to admins

* .
2021-01-29 08:28:47 -06:00
Tony Murray
f2f169ae78
Modernize mempools (#12282)
* mempools to modern module
quick hacky hrstorage port

* port ucd-snmp-mib to Mempools

* Populate DB for ucd
Prep for yaml

* initial yaml attempt

* more complex conversions
fixes to YamlDiscovery, make leading $ optional and allow mib::oid format

* walk full tables and skip values
normalize percentages above 100

* handle precent only ones (specify total as 100)

* Move default polling out of YamlMempoolsDiscovery

* fixes

* Update test data hrstorage should be correct.

* perc_warn for hrstorage

* Host Resources, record buffer, cached, and shared

* Host Resources is always better, don't do both HR and UCD

* fix unix, include warning levels

* variable size

* consolidate skip_values

* define mempools schema

* number instead of integer

* more schema refactor

* one more skip_values reference

* throw error for invalid oid translation
aos6

* a*  and Cisco

* updated test data

* update almost all hrstorage data files

* b*

* c* with test data
use standard cache for hrStorage

* use cache for storage module too

* hand bsnmp properly

* bdcom

* exclude total oid from yaml so it is not polled
May add a way to ignore this behavior and poll it, but I don't know if that is needed.

* automatically handle percent only values

* ciscowlc

* only poll used or free if we have used, free, and total.

* fix skipping

* the dlinkoning
fix find value when value "name" is numeric

* support numeric oids

* dnos/ftos attempt

* I guess we can't filter on total > 0

* edgecos

* e*

* f WIP

* f*

* gwd (aka g*)

* h* + procurve

* i*

* j*

* m*

* support 0% used memory (however unlikely)

* n*

* CISCO-PROCESS-MIB memory, share cache with processors module

* ignore mempools with invalid total

* p*

* quanta

* r*
fix raisecom mibs terribly broken

* s-z

* style fixes

* Move VRP back to PHP and make it actually work

* fix zynos

* update schema

* Update Cisco processor data for description bug fixes

* fix comware processors

* comware mempools with memory size
default precision to 1

* sophos-xg updated data

* hrstorage use ram size for buffers, cache, and shared

* Show memory available instead of free in device overview

* UCD, use same rrd format, store available instead of free in the db.

* Calculate availability for HOST-RESOURCES-MIB

* Convert UCD to standard polling

* rename old rrd files

* initial graph work

* graph WIP

* Graph looking decent

* Graph looking decent for hr

* remove old ucd_graph code

* handle availability mempool
more graph cleanup

* color adjustments

* remove accidental free calculation

* Update test data and fix corner cases

* fis pfsense

* update schema

* add default value for mempool_class

* fix whitespace

* update schema

* update schema correctly

* one more time

* fortigate_1500d-sensors missing oids

* Update docs.

* fix indent

* add implements MempoolsDiscovery explicitly to OS

* remove ucd_memory graph references
remove unused device_memory graph

* remove unused functions

* set devices with mempools to rediscover to prevent/minimize gaps

* use a subquery

* add overview graph

* port health mempools table

* Update device mempool

* only show overview if multiple

* Don't override user set warn percentages in discovery

* fix missed usage

* fix style

* Safety check to not rename rrd files incorrectly if migration has not been run.

* Fix overview percent bar and represent available and used on the bar

* missed an item to convert to mempool_class

* percent on the wrong side
2020-11-23 15:35:35 -06:00
Jellyfrog
cfd9dce620
Convert Virtual Machine pages to Laravel (#12287)
* Convert Virtual Machine pages to Laravel

* wip

* wip

* wip

* wip

* wip

* wip

* delete

* wip

* wip

* move powerStateLabel
2020-11-11 01:15:20 +01:00
Jellyfrog
50c8033099
Laravel 8.x Shift (#12235)
* Shift HTTP kernel and middleware

* Shift service providers

* Shift console routes

* Shift to class based factories

* Namespace seeders

* Shift PSR-4 autoloading

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them. This allows you to review the commit
diff for once for customizations when you are done Shifting.

Moving forward, consider using ENV variables or create a separate
config file to allow the core config files to remain as default
as possible.

* Shift Laravel dependencies

* Shift return type of base TestCase methods

From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html

* Shift cleanup

* console routes

* composer update

* factories

* phpunit

* bootstrap pagination

* model factory

* wip

* Apply fixes from StyleCI (#12236)

* wip

* Apply fixes from StyleCI (#12238)

* wip

* wip

* wip

* wip

* Apply fixes from StyleCI (#12240)

* wip

* Apply fixes from StyleCI (#12242)

* composer update

* Bump to PHP 7.3 minimum

Co-authored-by: Laravel Shift <shift@laravelshift.com>
2020-11-03 10:18:31 -06:00
Tony Murray
6d2a8867dc
Fix lnms update command (#12182)
hmm, other schema noise must be from manual modification as this is generated from a freshly migrated db.
2020-10-03 18:27:59 +02:00
SourceDoctor
9ade71d20c
API Calls to list Device Outages, calculated Availability (#12103)
* API Calls to list Device Outages, calculated Availability

* switch to eloquent

* style correction
2020-09-24 00:21:08 +02:00
Jellyfrog
77c531527c
Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
SourceDoctor
a4d1f5e1c8
Show Device Outages as Log List (#12011) 2020-08-18 20:02:56 +02:00
Jellyfrog
2fc037ab23
Convert device notes to blade (#11952) 2020-07-22 09:18:56 -05:00
Jellyfrog
f526ba326b
Laravel 7.x Shift (#11676)
* Shift bindings

PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.

* Shift core files

* Shift to Throwable

* Shift Laravel dependencies
Add laravel/ui dependency
Use our fork of string-blade-compiler

* Shift config files

Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them so you can review the commit diff for
changes. Moving forward, you should use ENV variables or create a
separate config file to allow the core config files to remain
automatically upgradeable.

Restore config header comment

* Remove duplicate named routes

* add basic trust host middleware

* Trusted proxies should be default null

* Fix missed rename

* wip

* Rename routes

* Update trustedproxy.php

* Update Kernel.php

* revert trustedproxy.php

It only accepted '*' and not ['*']

* Fix tests

fake request was causing the error

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-07-09 08:22:50 -05:00
Tony Murray
e5bb6d80bc
Fix settings access (#11915)
normal users could access
2020-07-08 18:04:48 -05:00
Tony Murray
691a73caa6 consistency run through 2020-06-27 07:47:08 -05:00
Tony Murray
e267ec1cab step status refactor 2020-06-27 07:47:08 -05:00
Tony Murray
229a501d4f refactor 2020-06-27 07:47:08 -05:00
Tony Murray
610475356f ajax step status check standardized 2020-06-27 07:47:08 -05:00
Tony Murray
c750107906 Refactor to a simpler style 2020-06-27 07:47:08 -05:00
Tony Murray
f86f4ba307 style reorgs 2020-06-27 07:47:07 -05:00
Tony Murray
d943df40db user create + db migrate 2020-06-27 07:47:07 -05:00
Tony Murray
dbbd0e9867 db wip 2020-06-27 07:47:07 -05:00
Tony Murray
72efd7bbd9 structure and better middleware 2020-06-27 07:47:07 -05:00
Tony Murray
ad2da9fcdb Install to Laravel WIP 2020-06-27 07:47:07 -05:00
Tony Murray
cd9c349297
Allow device url by hostname (#11831)
* Allow device url by hostname
/device/hostname
/device/hostname/ports

* slightly different code style
without else ;)
2020-06-17 22:13:06 +02:00
Tony Murray
67e637e4ca
Maintenance Windows: recurring now works overnight (#11389)
* Alert Rules use Carbon
Use carbon for time queries, need to be careful of timezone quirks.  Timestamps won't have that issue

* Convert existing schedules to UTC

* we only need start end... we already have start/end

* Make AlertSchedule::isActive work

* Table display working (and using Eloquent)

* Schedule creation updated

* WIP

* use Eloquent mutators/accessors

* recurring_day mutator/accessor

* WIP UI

* Fix SQL to handle outside times

* fix up some ui issues

* Convert alert-schedule to new style
Improved sorting customization

* fix whitespace

* support sqlite

* Fix schedule creation missing id

* Fix Device::isUnderMaintenance() add location relation
2020-06-14 16:35:50 -05:00
Tony Murray
4b4f321680
Fix external auth auto-login (#11813)
* Fix external auth auto-login
rename auth middlewares so LegacyExternalAuth is registered on the Auth::routes() login route.

* External auth before authenticate
2020-06-12 16:06:50 -05:00
Tony Murray
13ade9ab6c
Merge branch 'master' into alerts-carbon 2020-06-12 07:48:51 -05:00
Tony Murray
300645388f
Dispatcher Service settings (#11760)
* Poller settings WIP

* Poller settings WIP2

* working on SettingMultiple

* setting multiple working

* settings sent with all required info

* fix translation

* Fix keys

* fix groups setting

* Apply settings to service
fixes and validations for setting

* don't error when no poller_cluster entry exists

* hid tab when no poller cluster entries

* Authorization

* make prod

* daily maintenance toggle should be advanced

* Update schema def
2020-06-08 08:27:03 -05:00
Tony Murray
5c6c8844e8
Auth middleware refinement (#11767)
* auth middleware group

* dummy page for legacy php scripts instead of recursively calling init.php

* Test and fix routing scenarios

* fix api auth

* disable unused auth routes
2020-06-05 11:50:58 -05:00
hachpai
4bb064c7ad
Enabling general search for ports, devices, and more (#11571)
* Search engine for device, through API

* reviewed port search through API

* fixed die

* Update api_functions.inc.php

* Update api_functions.inc.php

* Update api_functions.inc.php

* Update api_functions.inc.php

* Update api.php

* Update api.php

* Update Ports.md

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-24 17:16:07 -05:00
Jellyfrog
ec57d3b669
Run artisan optimize after composer install (#11465)
* Remove unused routes

Prevents route:cache from working also

* Run artisan optimize after composer install

Helps cleaning up issues with upgrades, and also makes laravel a bit
faster

* Update composer.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-14 21:10:03 -05:00
Tony Murray
055abcf443
Device page dropdown hero button, Performance -> Latency (#11328)
* Throw some shit together, rough outline.

* Reorganize tabs, use tab controllers

* Implement performance (into the latency tab)

* Update resources/views/device/header.blade.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Add more tabs

* All controllers created

* Implement routes

* Implement smokeping

* routing and auth

* fix smokeping check

* Implement device dropdown menu

* Update deviceUrl to new style

* Use Gates

* Fix style

* use more appropriate gates

* add show-config gate
remove Laravel helper

* Only show vlan tab if VLANs exist for the device :D

* Fix rancid file check will return false

* revert over-zealous file name changes

* don't need to request the location parameter, just cast to string to avoid bugs when not found

* Move latency tab (ping/performance) to the position of performance instead of ping.

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-04-29 07:25:13 -05:00
Tony Murray
fc0c357b23
Toggle dashboard editor without refresh (#11455)
also removes needless route
2020-04-24 22:29:44 -05:00
Tony Murray
d4ce98a5d9 Convert alert-schedule to new style
Improved sorting customization
2020-04-11 18:03:19 -05:00
SourceDoctor
f7c85fedfa
Toggle visibilty of Dashboard Editor (#11321)
* Toggle visibilty of Dashboard Editor

* code climate

* reposition Menu point

* add Dashboard Menu

* unclickability ob Dashboard menu

* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* update to Frontend rewrite

* globalize hide_dashboard_editor variable

* .

* .

* remove legacy code

* update link path to laravel routing

* Travis ...

* Travis ...
2020-04-10 14:34:44 +02:00
Jellyfrog
daf451cef7
Convert overview page to laravel (#10757)
* Convert overview page to laravel

* Convert more pages

* More fixes
2020-03-31 23:03:02 -05:00
Tony Murray
43a8616efd
Some Poller page cleanups (#11287)
* Some Poller page cleanups
Some queries loaded all devices into memory and the counted them, we should have sql count them if we only need a count.
Models should be singular
Use named routes for url generation
Try to keep presentation and data collection separated in blade and controller.

* Update PollerController.php

* Fix style

* Fix new PollerGroup references
2020-03-22 19:29:31 +01:00
SourceDoctor
9092988f7b
Fallback to default Poller Group on delete (#11278)
* Fallback to default Poller Group on delete

* rewrite to eloquent

* replace column remove with page reload (refresh everything)

* change access verification check method

* .

* Update PollerGroups.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-20 10:16:49 +01:00
SourceDoctor
4e349efd11
Rewrite Poller Management to Blade/Eloquent (#11277)
* Rewrite Poller Management to Blade/Eloquent

* remove further no more needed file

* Code Climate

* Code Climate

* hardcode tabs

* change URL style

* change prefix from poller-groups to poller

* .

* parameter fix

* Refactor to use more direct routing.
remove switch statement.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-13 20:58:37 +01:00
gabrielRojasNew
6d22a885af
Created add, edit, remove location and edit, remove services to the API (#11080)
* Created add, edit, remove location and edit, remove services to the v0 API and added their corresponding routes

* Changed repeating code by adding a function that checks for missing parameters

* Reduced the lines of add_service_for_host, modified a little more the missing fields function

* Changed True and False to true and false, erased an unused var called $missing

* Solved merged confict

Deleted duplicate functions generated when solving merge conflicts

* fixed more conficts

Deleting duplicate entries produced by trying to solve a merge conflict

* fixing more duplicate functions

This merge conflict created more duplicates

* Update api_functions.inc.php

* Update api_functions.inc.php
2020-02-26 11:12:36 +01:00
gabrielRojasNew
b47decdb00
Added add and remove parents for device from the V0 API (#11100)
* Added add and remove parents for device from the V0 API

* Fixed some minors errors (white spaces and lack of them, an unnecesary else)

* Added missing }

* Reducing cognitive complexity

* Further reduced cognitive complexity and added a check if parent device existed (it blew up when it did not)

* Refactored the code and fixed bugs (that i created) when deviceIds or parentIds where nonexistent

* Fixed } not on a new line issue

* Empty space removed

* Deleted lines added by mistake to composer.json

* removed a comma  that broke composer.json

* added the missing element in composer.json

* Added optional ids to del_parents_fom_host

Updated del_parents_from_host() so it can accept parent(s) id(s) to delete, if none given it deletes all it's parents.

* Fixing code issues on del_parents_from_host

Refactored and solved small issues with del_parents_from_host

* Refactored code del_parents_from_host

Refactored del_parents_from_host() in order to comply with the projects standard

* Added one space

Added missing whitespace

* refactoring for better readability
2020-02-13 22:28:43 +01:00
louis-oui
6931df8990 Alertlog stats dashboard widget (#10967)
* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Cleanup

* Cleanup

* Cleanup

* date selection

* date selection

* fix js rule details

* cleanup js

* dummy commit to reload CI/CD

* dummy commit to reload CI/CD
2020-01-23 08:16:30 -06:00
louis-oui
4395b002ab Add 'alert history' widget for dashboard (#10901)
* add alert history dashboard

* add sql-schema

* only alert

* add settings

* add settings

* fix display alert details

* fix db-schema

* add filtering by severity

* fix code climate

* Update common.php
2020-01-23 05:27:57 -06:00
SourceDoctor
b8f2b094d7 Graphing Device Dependency (#10916)
* graphing Device Dependency

* remove uneeded code

* fix link to go to device Overview

* rebuild dependency map to blade/laravel

* remove uneeded file

* code climate fixes

* remove not used code

* remove blank line

* device access filter optimization

* remove blank line

* force new travis check ...

* fix deviceLink configuration

* .

* rewrite code

* moving to Maps Namespace

* retrigger tests

* some code changes

* further renaming

* retrigger tests

* some code improvements

* .

* move vis.min.js in javascript section

* Device Dependency for Device Groups

* .

* codeclimate fixes

* show child/parents of Device - even if not in Device Group

* Device Highlighting

* add missing function

* replace hardcoded get params with ->get in Controller

* redesign Controller

* code climate fixes

* fix binary operator to 'or'

* remove 'or'

* code climate fixes

* further Code changes

* move loadMissing behind merge
2020-01-07 14:23:36 +01:00
Albert Siersema
ae7eee438f Adds API to fetch all inventory items for a given device (#10885)
Adds API to fetch all inventory items for a given device
2019-12-17 13:49:13 +01:00
SourceDoctor
4232bf2f36 API Call for triggering Device discovery (#10861) 2019-12-08 22:17:27 +01:00
theochita
96ed161c81 Add ability to fetch oxidized device config via the librenms API (#10913)
* Add get_oxidized_config api route

* Add "get_oxidized_config" function.

* add get_oxidized_config docs and fix typo in the search_oxidized docs.
2019-12-08 20:04:53 +01:00
PipoCanaja
bf181b9dc2
Added support for routing table collection in discovery (#10182)
* Clean broken VRF lite code
* Change DB table for route discovery
* Add VRF simple support
* add port_id to db and discovery
* static-fy the translation arrays
* sort and search cleaning
* Sorting refactor and validation
* formatItem shortened
* Handle ifIndex==0 meaning no next hop defined (MPLS)
* Sync all create/updates
* purge in daily
* remove old route table
* get rid of inetCidrRouteNextHop_device_id
* fix wonky column orders
* add route snmprec
* fix sorting by interface
* Move to new config
* rename to route the new table
* Properly display ipv6 compressed addresses
* Translation before merge ./lnms translation:generate
* Update manifest
2019-11-17 16:30:43 +01:00
Tony Murray
12773d125b
API: list_arp search by MAC (#10803)
* API: Allow search ARP by MAC

* reformat mac

* Update docs
2019-11-13 02:21:07 +00:00
Brian Sidebotham
67169bf7b9 Create device groups via API (#10791)
* Add POST ability to devicegroups API endpoint

* Simplify function and make use of Lavarel validation for API request
2019-11-08 13:11:56 +00:00
Tony Murray
717ecd4125 Fixed API arp cidr search (#10780) 2019-11-05 21:16:29 +00:00