Commit graph

313 commits

Author SHA1 Message Date
Sukhwinder Dhillon
92e982bf3d Remove unused class Form and FormStateOverrides 2023-08-24 13:04:29 +02:00
Sukhwinder Dhillon
9e67b56bca RenderedProcessActionBar: Remove unused constructor param $auth 2023-08-24 13:04:29 +02:00
Johannes Meyer
890df4be7c Re-introduce class EditNodeForm
Rewritten from scratch. Now with ipl-form compatibility.
2023-08-09 16:13:01 +02:00
Johannes Meyer
1b837c72a3 Drop class EditNodeForm 2023-08-09 16:13:01 +02:00
Johannes Meyer
4aac658089 process/show: Utilize the new AddNodeForm 2023-08-09 16:13:01 +02:00
Johannes Meyer
da4edda2b3 Re-introduce class AddNodeForm
Rewritten from scratch. Now with ipl-form compatibility.
2023-08-09 16:13:01 +02:00
Johannes Meyer
b84405180c Add new endpoint for node suggestions 2023-08-09 16:13:01 +02:00
Johannes Meyer
cb83f800b9 Drop class AddNodeForm 2023-08-09 16:13:01 +02:00
Sukhwinder Dhillon
25f37d6575 Use unescaped node name for missing children 2023-08-09 15:56:34 +02:00
Sukhwinder Dhillon
f93873623f Call it faulty config intead of invalid config 2023-08-09 15:56:34 +02:00
Sukhwinder Dhillon
4d7ea853c1 (Cleanup/Move)NodeForm extend BpConfigBaseForm 2023-08-09 10:40:12 +02:00
Sukhwinder Dhillon
af4b98faeb Use fontawesome icons with ipl\Web\Widget\Icon class everywhere 2023-08-08 12:24:29 +02:00
Sukhwinder Dhillon
1360e1e4a0 Avoid inline css 2023-08-08 11:39:24 +02:00
Johannes Meyer
3fe17336dc Escape semicolons in node names
fixes #312
2023-08-08 08:46:48 +02:00
Johannes Meyer
2acf611812 process/show: Allow to adjust the order of nodes
Nodes can be ordered as usually by display name, but now also
in descending order. They can now also be ordered by state.

This also applies to manually ordered processes. Though, changes
to the manual order can only happen if the default order is
active. If that's not the case, a note is shown and a way to reset
the sort order.
2023-08-03 15:19:28 +02:00
Johannes Meyer
52c150c56b Use the new Sort trait where applicable
Moves the entire order processing to the renderers as that's
where it's mostly relevant. The only cases where nodes are
still ordered outside the rendering is where changes are
applied based on user input, which happened based on what's
been previously rendered.
2023-08-03 15:19:28 +02:00
Johannes Meyer
8b2bac4e85 MoveNodeForm: Instruct JS to refresh the target container
instead of letting JS refresh it on its own
2023-08-03 15:06:08 +02:00
Johannes Meyer
1ac87cb4ea Let all config forms extend BpConfigBaseForm
They're all too similar.
2023-08-03 15:06:08 +02:00
Sukhwinder Dhillon
174abea6bd Add custom message for form's regex validation 2023-08-03 11:02:34 +02:00
Johannes Meyer
13330d3a44 Don't cast url to string if it's internally transformed again
Also, the cast encodes the url as well, for use within HTML.
This is not required if used in conjunction with ipl-html.
2023-08-03 10:59:23 +02:00
Sukhwinder Dhillon
071f006b7d AddNodeForm: Don't throw error while adding existing invalid config file 2023-08-03 10:57:14 +02:00
Sukhwinder Dhillon
834005f7b4 Don't break impact-action page if bp has invalid config
- Add message for invalid config
2023-08-03 10:57:14 +02:00
Sukhwinder Dhillon
5fcd8246b8 Add cli command Cleanup 2023-08-01 15:30:46 +02:00
Sukhwinder Dhillon
b053a78a13 ProcessController: Add Show link for missing linked nodes 2023-08-01 15:30:43 +02:00
Sukhwinder Dhillon
21c1949b07 Introduce CleanupNodeForm action
This helps to clean orphaned (missing) nodes
2023-08-01 15:11:53 +02:00
Sukhwinder Dhillon
2f730cc526 Display node name if alias is missing
This fixes the issue that the name of a missing monitoring node is
not displayed in forms and in Tree/Tile view.
2023-07-24 14:31:17 +02:00
Sukhwinder Dhillon
cbb6b018da
Show node id in edit mode (#382)
ref #308
2023-07-20 13:31:46 +02:00
Sukhwinder Dhillon
be2473864b Introduce new XOR (^) operator 2023-07-13 10:19:08 +02:00
raviks789
da2ed1aef4 Prevent deletion of referenced BP config 2022-09-14 09:58:04 +02:00
raviks789
4ca8c72a05 Show service and host nodes for filtered roles
The service and host nodes must be shown, but clicking on these nodes should show
"Access Denied" page.
2022-09-14 09:52:23 +02:00
Dirk Goetz
0a9409fecc Permissions: add form elements and documentation
Refs #98
Refs #124
2022-03-16 14:10:07 +01:00
Johannes Meyer
711677f903
Merge pull request #277 from Icinga/feature/icingaDb-MySQL-backend-#276
Support Icinga DB
2022-02-18 12:11:56 +01:00
raviks789
e2fa339f99 'Display Name' and 'Description' can be left empty. 2022-02-18 11:46:33 +01:00
raviks789
a7b86f956c Do not show Backend select item when monitoring module is disabled 2022-02-18 11:46:33 +01:00
raviks789
6c2e1cfa0a Remove $backendName property from AddNodeForm and EditNodeForm 2022-02-18 11:46:33 +01:00
raviks789
d4bd45233b Remove unnecessary checks to check if backend name is '_icingadb'.
Instead use (! $bp->hasBackendName()) check with 'And' condition.
2022-02-18 11:46:22 +01:00
Valentina Da Rold
b78983f539 Add Degraded operator implementation
Refs #298
2022-02-18 11:41:06 +01:00
raviks789
daf0384e66 Use $isIcingadbPreferred to check if the businessproces preders icingadb as default backend. 2022-02-18 10:06:59 +01:00
raviks789
605834e7c4 trait cannot be a type for property
Replace the type of properties with type Icinga\Module\Icingadb\Common\Database with type ipl\Sql\Connection.
2022-02-18 10:06:59 +01:00
raviks789
a5165ef476 Do not set Backend in Metadata to null in case icingadb module doesnot exist. 2022-02-18 10:06:59 +01:00
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
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
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
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