Commit graph

480 commits

Author SHA1 Message Date
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
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
940abdada6 Use the plug icon to indicate objects in downtime 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
Johannes Meyer
9958885a90 Drop vendor lib php-diff 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
Dirk Goetz
608842aeaa Add some AuditHooks
refs #289
2021-03-31 16:37:11 +02:00
Kotove
3cd3427e74
Add downtime flag into export results (#286) 2020-10-23 09:22:55 +02:00
Johannes Meyer
49ebbc4cdb Apply state overrides on demand instead of directly
Internally non-process children are only instantiated once.
This means when applying state overrides directly they're
used everywhere and do not differ between the containing
process. State overrides are now applied explicitly and
on demand, decoupling them from children.
2020-07-01 08:54:34 +02:00
Johannes Meyer
a8149a1983 ui: Use rule widget to show real state transformation instead
Showing the override rules only in tree view but not in tile
view is one problem. Another one however are rules for all
states which then are difficult to decipher while not providing
much benefit.

The flash to indicate the real state also is not intuitive enough.

That's why this change combines both widgets in a single one. This
makes it more clear what the actual state is, what happened to it,
and does not cobble the view with too much state balls.
2020-06-26 14:11:40 +02:00
Johannes Meyer
0c7fca926f config: Use an extra line to store state overrides
Storing overrides as part of a node's name leads to way too complicated
code. A separate field is not only better for compatibility but also
more straightforward to process.
2020-06-26 14:08:05 +02:00
Christian Menapace
98b6b2c6d0 Add Service Override 2020-06-26 11:32:09 +02:00
Johannes Meyer
8f868d79c9 NoDuplicateChildrenValidator: Don't detect a no-change as duplicate 2020-06-26 11:20:14 +02:00
Johannes Meyer
67a7687606 NodeAction: Force parsing objects as associative arrays during unserialization 2020-06-26 11:18:28 +02:00
Eric Lippmann
346ace79d0
Merge pull request #282 from Icinga/fix/handled-node-rendering
Fix rendering of state-balls for critical-handled nodes
2020-05-27 08:25:47 +02:00
Ravi Kumar Kempapura Srinivasa
49bc0dd363 Use the correct state-balls for critical/down-handled nodes in TreeRenderer::render()
Use the state-balls that are added for critical/down-handled nodes in TreeRenderer::render(), in case the nodes are critical/down and handled.
2020-05-27 08:23:41 +02:00
Ravi Kumar Kempapura Srinivasa
b3686906a5 Use the correct state-balls for critical/down-handled nodes in NodeTile::render()
Use the state-balls that are added for critical/down-handled nodes in NodeTile::render(), in case the nodes are critical/down and handled.
2020-05-27 08:23:16 +02:00
Ravi Kumar Kempapura Srinivasa
b39d953fee Fix tile rendering for Bp nodes with unconfirmed deleted monitored nodes
Earlier in NodeRemoveAction the states were recalculated for the BpNodes. Hence, the state for parent nodes with unconfirmed deleted monitored nodes (host/service) is set to Unknown. This results in incorrect tile rendering for the parent nodes. Therefore, any call to methods which recalculate the states are removed.

fix #279
2020-05-19 16:42:09 +02:00
Ravi Kumar Kempapura Srinivasa
1bc6bf6236 Use gray tiles and state-balls for the entire branch of empty BpNode
The node state is recursively calculated in case the node contains only BpNodes as its children and are empty. The gray tiles and state-balls are used for the entire branch if the children are empty.
2020-05-11 11:45:33 +02:00
Ravi Kumar Kempapura Srinivasa
6cc5eb8e74 Check recursively for Empty BpNodes
In BpNode::recalculateState() the BpNode needs to be recursively checked if its children is empty using BpNode::isEmpty() instead of BpNode::hasChildren().
2020-05-11 11:45:27 +02:00
Ravi Kumar Kempapura Srinivasa
e19612bd4a Extend abstract isEmpty() method to check for empty nodes in child nodes
We need to check recurively whether the BP Nodes contatin only child BpNodes which are empty and set the entire tree to state NODE_EMPTY state in this case.
2020-05-11 11:45:17 +02:00
Ravi Kumar Kempapura Srinivasa
51c7fdf6c9 Fix 'Trying to access a missing business process node <$name>'
If the imported node is empty or was deleted at a later time, then in NodeTile::render() $link should not be rendered. Also, NodeTile::addDetailsAction() should not add a `href` to this tile.
2020-05-11 11:45:05 +02:00
Ravi Kumar Kempapura Srinivasa
d8567896f2 Fix 'missing node' errors for empty child nodes
Before the child empty nodes where set to missing nodes by BpNode::isMissing().

This has been corrected in this fix by checking if whether a child node is an empty node or not.
2020-05-11 11:44:55 +02:00
Ravi Kumar Kempapura Srinivasa
7de814a4af Set state to NODE_EMPTY in case of empty nodes
In case of empty nodes, the state is set to NODE_EMPTY now.
2020-05-11 11:44:41 +02:00
Ravi Kumar Kempapura Srinivasa
e533ff95f5 Introduce NODE_EMPTY state for empty nodes
An empty node state called `NODE_EMPTY` has been introduced with a value of 128 in class `Node`, and this state has been mapped to value *0* in structure `$stateToSortStateMap`.
2020-05-11 11:44:30 +02:00
Ravi Kumar Kempapura Srinivasa
32abce2529 Don't show state-badges for empty nodes
Before, the empty nodes were to be considered as missing nodes. Correspondingly, the counter for missing in BpNode::getStateSummary() was increased if an empty node is encountered.

Now, the empty nodes are not assumed as missing nodes and the counter for missing is not increased for this case.
2020-05-11 11:44:14 +02:00
Johannes Meyer
d2d64365b6 php-diff: Don't use curly braces for string offset access 2020-02-27 10:41:54 +01:00
Eric Lippmann
a06fba34b3 Remove abstract function Node::__construct() 2020-02-27 10:08:16 +01:00
Ravi Kumar Kempapura Srinivasa
f5166f4348 Fix 'vsprintf(): Too few arguments' unexisting imported node exception
If the imported node does not exist, no arguments is  passed to BpConfig::addError() by ImportedNode::createFailedNode(). Added 'if' condition in BpConfig::addError() in case no arguments are passed to vsprintf.

refs #234
2020-02-26 15:09:17 +01:00
mdkamijo
3ffbce0709
Make it possible to delete imported nodes (#248)
It is possible to import process nodes from other processes. But there
are no way, via the GUI, to remove the imported process nodes from the
current process/process node.
This commit makes it possible to remove imported process nodes, no matter
where which process they comes from.
2020-02-26 14:53:34 +01:00
Eric Lippmann
5395b42bab Fix URL param overrides upon rendering
Before, we used setParams() instead of with() to populate the parameters
which is especially problematic with imported nodes where the config
paramter got overriden for every subsequent node.

fixes #228
2020-02-26 14:18:40 +01:00
Eric Lippmann
125bf37ba8 Fix superfluous base target overrides
* Fix drill down of the tile/tree action icon links
* Set base target only on parent containers

This also fixes the dashboard integration where we only override the
base target of the div.tiles containers.

fixes #243
2020-02-26 14:17:39 +01:00
Johannes Meyer
4e6e1f0819 Node: Add __unbound__ parent node in getPaths() if there are no parents
fixes #245
2020-02-26 13:47:24 +01:00
Johannes Meyer
144bcdf852 Remove space after reference operators 2020-02-26 09:19:31 +01:00
Eric Lippmann
a2854e8cf4 Use display_name as alias for host and service nodes 2020-02-05 15:01:22 +01:00
Dominik Seidel
8ef1dfcbdc CLI: Add options --downtime-is-ok and --ack-is-ok 2020-02-05 15:01:22 +01:00
Dominik Seidel
1414e76d94 CLI: Add options --blame and --root-cause 2020-02-05 15:01:22 +01:00
Johannes Meyer
7d199a94ea RenderedProcessActionBar: Re-introduce Config link for subprocess nodes
Having to navigate a level up to edit the currently showing process is tedious,
to say the least.

refs #78
2019-02-28 15:15:11 +01:00
Johannes Meyer
b932fa8415 TreeRenderer: Open info urls in a new tab
refs #187
2019-02-28 11:19:13 +01:00