Commit graph

462 commits

Author SHA1 Message Date
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
Johannes Meyer
c5d3127303 Storage: Properly escape and unescape names with operators
fixes #205
2019-02-28 10:58:06 +01:00
Johannes Meyer
cad29d4d32 NodeTile: Add current path to the add action url
fixes #212
2019-02-28 09:12:38 +01:00
Johannes Meyer
fe991d7f58 BpNode: Make sure to sort children alphabetically by default 2019-02-28 08:53:54 +01:00
Johannes Meyer
2a82b326fe TreeRenderer: Use the correct action urls for imported nodes
refs #209
2019-02-28 08:19:37 +01:00
Johannes Meyer
a941052efa NodeTile: Don't show action links for imported nodes
refs #209
2019-02-28 07:48:42 +01:00
Johannes Meyer
885064b577 Provide links to jump to an imported node's source configuration
refs #209
2019-02-28 07:48:35 +01:00
Johannes Meyer
670a29e5f7 Breadcrumb: Show a node's state 2019-02-26 13:15:14 +01:00
Johannes Meyer
3431540700 NodeTile: Don't use a node's identifier if it's the same config anyway 2019-02-25 14:23:41 +01:00
Johannes Meyer
eaf5b85538 Change how imported nodes are recognized
Since configurations are cached this cannot be done by using
a flag. Instead the rendering and path aggregation are now able
to distinguish nodes themselves.
2019-02-25 13:58:18 +01:00
Johannes Meyer
40538c51ce LegacyStorage: Add cache to avoid parsing configurations multiple times 2019-02-25 12:42:52 +01:00
Johannes Meyer
6f3ffe48e2 BpConfig: Only list each involved configuration once 2019-02-25 08:19:39 +01:00
Johannes Meyer
6ae4cf745c RenderedProcessActionBar: Don't allow to unlock imported nodes 2019-02-22 14:41:53 +01:00
Johannes Meyer
cacc24f501 NodeAddChildrenAction: Really import nodes if instructed to do so 2019-02-22 14:30:06 +01:00
Johannes Meyer
0d262bf0d0 Renderer: Don't fail while generating ids for unbound nodes 2019-02-22 14:11:03 +01:00
Johannes Meyer
75a3d1fd5e LegacyConfigParser: Restore ability to defer referenced process initialization 2019-02-22 12:26:24 +01:00
Johannes Meyer
40c406ac9e TreeRenderer: Render the info_url action where all other action urls are 2019-02-22 12:26:24 +01:00
Johannes Meyer
1529ec4602 NodeTile: Hash ids the same way as in the tree view 2019-02-22 12:26:24 +01:00
Johannes Meyer
e36e918d32 RenderedProcessActionBar: Use term "Node" instead of "Process"
A process is also a node but a node not necessarily a process.
2019-02-22 12:26:24 +01:00