raviks789
6ebaedccf4
Add moduleInit() method to HostController and ServiceController to check if icingadb is used.
...
Use moduleInit() to check whether icingadb to be used.
Also use ipl\Stdlib\Filter with $query->filter() instead $query->getSelectBase()->where() in case of icingadb.
2022-02-18 10:06:59 +01:00
raviks789
6552ae2004
Use trait Icinga\Module\Icingadb\Common\Database as icingadb backend object
2022-02-18 10:06:59 +01:00
raviks789
549ad92122
Do not set Backend in Metadata to null in case icingadb module doesnot exist in BpConfig
...
In case icingadb module is not present Backend in Metadata is set to null which is incorrect.
Also use static fetchDb() from IcingaDbObject class in case icingadb backend is being used.
2022-02-18 10:06:59 +01:00
raviks789
ed52d51131
Remove param 'icingadb' and set param 'backend' as '_icingadb' when icingadb is used
2022-02-18 10:06:59 +01:00
raviks789
df3f363f1b
Add static fetchDb() method to library/Businessprocess/IcingaDbObject.php
...
Use this static method to get backend in IcingaDbState.
2022-02-18 10:06:02 +01:00
raviks789
8f68ffe2a8
Drop library/Businessprocess/Common/IcingadbDatabase.php in favor of Icinga\Module\Icingadb\Common\Database
2022-02-10 12:50:28 +01:00
raviks789
1afa7668eb
Move enumServiceStateList and enumHostStateList to trait EnumList.
...
The above methods in AddNodeForm and EditNodeForm is moved to the trait EnumList.
2022-02-03 16:56:46 +01:00
raviks789
407d4f98db
Remove enumHostForServiceList, enumHostList, enumServiceList from EditNodeForm.
...
These methods are present in the trait EnumList and EditNodeForm is already using that trait.
2022-02-03 16:56:46 +01:00
raviks789
3904791438
Cleanup the code
...
Remove unnecessary comments and unused namespaces.
2022-02-03 16:56:46 +01:00
raviks789
7b41906881
Select default backend when icingadb is deactivated and the same when monitoring backend is deactivated
2022-02-03 16:56:46 +01:00
raviks789
69e879a745
Make changes to support the case when icingadb is set as the preferred backend.
2022-02-03 16:55:47 +01:00
raviks789
685f44d118
Change class name IcingaDbBackend to IcingaDbObject
2022-02-03 16:55:02 +01:00
raviks789
9b0c4cca34
Remove IcingadbBackend class extension from IcingaDbState and clean IcingaDbState class.
...
Do not assemble the query as there is no need to do that. Also, no need to have associative arrays for host and service state columns.
2022-02-03 16:55:02 +01:00
raviks789
df72ff65be
Move enumHostListByFilter and enumServiceListByFilter to EnumList trait.
...
Move enumHostListByFilter and enumServiceListByFilter to EnumList trait from AddNodeForm and change fetchServices and fetchHosts
method to work with filters in IcingaDbBackEnd class.
Also, applyMonitoringRestriction is changed to applyIcingaDbRestrictions in IcingaDbBackend.
2022-02-03 16:55:02 +01:00
Sukhwinder Dhillon
a6dad05445
BpConfigBaseForm: Only add backends of enabled modules
2022-02-03 16:55:02 +01:00
Sukhwinder Dhillon
55b0ddf8f6
BpConfig: Use icingadb backend
...
Use icingadb backend if configured in preferences or
monitoring module is disabled
2022-02-03 16:55:02 +01:00
Sukhwinder Dhillon
08175ae652
Provide hook for icingadbSupport
2022-02-03 16:55:02 +01:00
Sukhwinder Dhillon
afff0bea34
BpConfigBaseForm: Fix backend change
...
Do not use the previously saved backend if the value has been
changed to `Use the configured default backend` (null)
2022-02-03 16:55:02 +01:00
Ravi Kumar Kempapura Srinivasa
5d905426b6
Use IcingaDbState for nodes from IcingaDb MySQL backend in ProcessCommand
...
Since we have included monitored nodes from IcingaDB MySQL backend, the states for these nodes will be now calculated using IcingaDbState::apply.
2022-02-03 16:55:02 +01:00
Ravi Kumar Kempapura Srinivasa
f9be5f81d6
Change state calculation in IcingaDbState
...
Since we are fetching the values directly using assembleSelect instead of using ORM, 'last_state_change', 'in_downtime' and 'ack' have different values compared to monitored nodes other than IcingaDb MySQL backend. This is addresses in this commit.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
d1526a36cb
Address the comments on IcingaDbState and the Controllers
...
Address the comments from Eric in the pull request on IcingaDbState, Web/Controller, HostController and ServiceController.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
ce3bbde289
Apply public static getRestriction and applyMonitoringRestriction changes
...
Apply the public static getRestriction and applyMonitoringRestriction changes in the places were the corresponding methods are used.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
d494cf3cee
Each PHP statement must be on a line by itself
...
Previously there was an error during php codesniffer test at line 53 of IcingaDbState. Changes are made to correct this error.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
c0f422d750
Resolve PHP CodeSniffer issue
...
Remove the extra semi-colon in line 53 in IcingaDbState
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
843a556f6e
Remove the unwanted comments in IcingaDbState
...
Clean IcingaDbState class by removing the unwanted comments.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
efcea15ab6
Clean the scripts and resolve the comments
...
Clean the scripts to pass the phpcodesniffer tests and resolve the comments provided by Eric.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
1a0ddfb08b
Add IcingaDB MySQL backend in businessprocess
...
IcingaDB MySQL backend is added to the businessprocess module to obtain information regarding monitored nodes.
ref #276
2022-02-03 16:54:01 +01:00
Johannes Meyer
3fe1c9d1a7
Merge pull request #316 from Icinga/php-81-support
...
PHP 8.1 Support
2022-01-24 14:30:11 +01:00
Johannes Meyer
a04059b6c1
ProcessCommand: Require a node name explicitly
2022-01-24 12:35:41 +01:00
Johannes Meyer
bc9113872e
Require PHP 7.2+
2022-01-14 10:59:52 +01:00
Johannes Meyer
0c3cf6b7bd
Avoid passing non-string args to ctype_*() functions
2022-01-14 10:46:08 +01:00
Johannes Meyer
f96abb4627
Drop locales
2021-12-17 13:56:14 +01:00
Johannes Meyer
075af6bbfe
Merge pull request #309 from Icinga/adjust-less-variable-usage
...
Adjust less variable usage
2021-12-17 13:12:15 +01:00
Florian Strohmaier
1c131e8789
CSS: Balance visual icon weight
2021-12-17 13:10:19 +01:00
Johannes Meyer
940abdada6
Use the plug icon to indicate objects in downtime
2021-12-17 13:10:19 +01:00
Johannes Meyer
140ef72371
css: Improve variable usage and make it compatible with Web < 2.10
2021-12-17 13:10:19 +01:00
Johannes Meyer
fcadf2d6b4
Use Web 2's form style
2021-12-17 13:10:19 +01:00
Johannes Meyer
4d7df037d3
Drop Component\StateBall and use ipl\Web\Widget\StateBall instead
2021-12-17 13:10:19 +01:00
Florian Strohmaier
86732a91f8
CSS: Remove styles for php-diff
2021-12-17 13:10:19 +01:00
Florian Strohmaier
88e04d94c1
module.less: Add fixed var for box-shadow
2021-12-17 13:10:19 +01:00
Johannes Meyer
84c8ab9cd8
css: Adjust variable usages for compatiblity with v2.10
2021-12-17 13:10:19 +01:00
Johannes Meyer
455db3514e
css: Remove obsolete .tiles > .addnew rule
2021-12-17 13:10:19 +01:00
Johannes Meyer
f59d2b7d0b
Merge pull request #315 from Icinga/drop-php-diff-lib
...
Drop php diff lib
2021-12-17 13:08:27 +01:00
Johannes Meyer
f86009d575
doc: Update requirements
2021-12-15 16:07:39 +01:00
Johannes Meyer
9958885a90
Drop vendor lib php-diff
2021-12-15 16:07:39 +01:00
Johannes Meyer
2e89039170
Drop lint tests for PHP 5.6 and 7.0
2021-12-15 16:07:39 +01:00
Johannes Meyer
dde924e2b4
ConfigDiff: Utilize new php-diff library
2021-12-15 16:07:39 +01:00
Johannes Meyer
ad2ea6f8c5
NodeTile: Add plural support to the Children label
...
closes Icinga/L10n#18
2021-12-13 15:28:50 +01:00
ValeDaRold
3154e3313f
Add new Host from Filter and Service from Filter in AddNodeForm.php ( #300 )
...
refs #295
2021-08-06 11:43:09 +02:00
Johannes Meyer
65849bd3bf
Raise version to v2.3.1
...
(cherry picked from commit 52f6e1887c )
2021-07-26 10:55:56 +02:00