Commit Graph

34 Commits

Author SHA1 Message Date
Jellyfrog
071ca9bc2a
Apply fixes from StyleCI (#15698)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-01-04 22:39:12 -06:00
Tony Murray
a5198d7d57
Remove some lightly used or unused dbFacile functions (#15418)
* Remove some lightly used or unused dbFacile functions
['NULL'] legacy behavior seems unsupported, replace with actual nulls

* Fix refactor mishap

* another

* update baseline

* these were very wrong... what happened?
2023-10-12 09:15:03 -05:00
Tony Murray
685d11d4f1
Misc fixes 42 (#15413)
* Misc Fixes

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-07 21:39:16 -05:00
Tony Murray
3fe3db747c
Refactor billing (#14979)
* Refactor common billing code into a namespace
Prevents issues of usages where the code hasn't been loaded.

* remove redundant Billing in method names

* remove accidental duplication

* more use statements

* Style fixes
2023-04-21 19:52:47 -05:00
Tony Murray
34163703fb
Percentage calculation helper (#14235)
* Percentage calculation helper
Helper function to prevent divide by zero mistakes
Replace all percent calculations

* style
2022-08-24 21:01:54 +02:00
Bennet Gallein
574eb1f0f0
Billing: add peak in and out (#13006)
* feat(api): added max in/out per bill_history period

* chore(Docs): updated docs to include in/out max values

* chore(formatting): style-ci

* chore(db): update db-schema

* fix(db): reverted wrong changes in schema

* fix: wrong table name in migration

* feat(billing-history-frontend): added max in/out values to frontend bill-history

* chore: renamed to peak instead of min/max
2021-07-26 10:37:52 -05:00
Tony Murray
1c379dcd05
Remove legacy function calls (#12651)
* massive inlines

* fix style and wtf

* remove rrdtool.inc.php include

* fix CommonFunctions namespace issues

* looking for missing class space, fix undefined class issues

* style fixes
2021-03-29 00:25:30 +02:00
Jellyfrog
0d56bbd946
Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog
77c531527c
Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
Llarian
9c837bee87 Added aggregate config option to Billing 95th percentile calculations (#10202)
* Added configuration options to aggregate input and output bits before making 95th percentile billing calculations

* Changed aggregate to per-bill instead of global.  Added config options for making aggregate the default selected option.  Refactored out mres() calls in touched files.  Changed to Config::get where appropriate.

* Fixed documentation typo

* Fixed scope of aggregate default config option to be under billing
2019-05-27 21:44:02 -05:00
Søren Rosiak
414efb3539 refactor: Various Code Cleanup (#5777)
* refactor: Various Code Cleanup

* moar
2017-02-05 22:37:08 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Tony Murray
d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
Neil Lathwood
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
Tony Murray
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
02792176fa Updated most files to use dbFacile 2014-03-12 22:21:33 +00:00
Tyler Christiansen
63d428c0e1 Revert "update copyright notice" after discussion with Paul
This reverts commit 774233327e.
2013-10-28 12:01:36 -07:00
Tyler Christiansen
774233327e update copyright notice 2013-10-28 01:46:59 -07:00
Adam Amstrong
dbf212f652 phpDocumentator headers. retire static-config. IF YOU ARE READING THIS, REMOVE IT FROM THE BOTTOM YOUR CONFIG.PHP. YES. YOU.
git-svn-id: http://www.observium.org/svn/observer/trunk@3150 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 10:01:42 +00:00
Tom Laermans
6b210ea056 change directory to observium root, now also for other commandline tools
git-svn-id: http://www.observium.org/svn/observer/trunk@2990 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-08 10:44:41 +00:00
Tom Laermans
e68cc3246e syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2974 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-06 15:19:43 +00:00
Adam Amstrong
8833551cba fixes to billing-calculate.
git-svn-id: http://www.observium.org/svn/observer/trunk@2775 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-12 16:10:49 +00:00
Adam Amstrong
349290a037 fix billing-calculate strings
git-svn-id: http://www.observium.org/svn/observer/trunk@2773 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-12 12:16:57 +00:00
Adam Amstrong
70af11e466 fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@2768 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-07 18:33:27 +00:00
Adam Amstrong
e6988c8b98 add -r option to wipe bill_history table before we recalculate (hurray!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2765 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-07 14:18:46 +00:00
Adam Amstrong
38f95ce512 fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@2762 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-06 23:02:31 +00:00
Adam Amstrong
70f51cef04 fix previous commit :)
git-svn-id: http://www.observium.org/svn/observer/trunk@2759 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-06 22:26:47 +00:00
Adam Amstrong
a1e96f708f billing rewrite (disabling svn after)
git-svn-id: http://www.observium.org/svn/observer/trunk@2758 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-06 22:17:37 +00:00
Adam Amstrong
f1f226905f fix comment
git-svn-id: http://www.observium.org/svn/observer/trunk@2717 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-05 15:01:58 +00:00
Adam Amstrong
f14ad50c3c db updates
git-svn-id: http://www.observium.org/svn/observer/trunk@2716 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-05 15:00:09 +00:00
Adam Amstrong
f7eb392298 billing improvements from codekiller.
git-svn-id: http://www.observium.org/svn/observer/trunk@2715 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-05 14:55:08 +00:00
Adam Amstrong
7a7c0dac83 make executable
git-svn-id: http://www.observium.org/svn/observer/trunk@2709 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-02 18:32:23 +00:00
Adam Amstrong
a607d17919 use cached data for bills page. need to put billing-calculate in crontab
git-svn-id: http://www.observium.org/svn/observer/trunk@2707 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-02 18:26:57 +00:00