Commit graph

67 commits

Author SHA1 Message Date
Johannes Meyer
e906b1d632 ObjectSuggestions: Allow to use a fixed set of columns 2025-10-27 11:11:23 +01:00
Johannes Meyer
5e982dad40
Merge commit from fork
* Auth: Add method `assertColumnRestrictions`

* ObjectSuggestions: Do not suggest protected variables

`assertColumnRestrictions` does not allow to use them
anymore, hence we should not suggest them in searches
as well to not to let the user run into an error by
accepting a suggestion. Though, when fetching values
as well, we still have to obfuscate, otherwise protected
vars won't show up in details anymore.

* Introduce Icinga\Module\Icingadb\Common\Model

Must be used as base for all models, to ensure
column restrictions are asserted on filters.

* Utilize `Icinga\Module\Icingadb\Common\Model` where applicable
2025-10-16 08:42:51 +02:00
Ravi Kumar Kempapura Srinivasa
d0ffba3d91
ObjectSuggestions: Prioritze Column suggestions and best suggestions (#1215)
Show custom variable suggestions only if the column suggestions have not
consumed all the slots (50).

fixes #1206
2025-06-13 13:23:48 +02:00
Ravi Kumar Kempapura Srinivasa
cdfa388d16
ObjectSuggestion: Dynamically adjust columns and custom var suggestion limits (#1173)
Currently, the limit is globally set to 50, hence the short custom
variable names which overlaps with most of the column names will not be
suggested and instead only column names will be suggested. To prevent
this the default limit is split in half and adjusted dynamically based
on available suggestions.

resolves #1094
2025-05-12 14:11:23 +02:00
Johannes Meyer
04b8e220fd usergroup: Rename to contactgroup 2025-04-10 15:04:41 +02:00
Johannes Meyer
19135bcceb user: Rename to contact 2025-04-10 15:04:41 +02:00
Sukhwinder Dhillon
793aa2414c ObjectSuggestions: Don't apply base filter to $customVars query
The basefilter may contain relations, that are not know to `CustomvarFlat`, which can leads to errors.
    For example: RedundancygroupController:completeActions's base filter is not known to `CustomvarFlat`.
2025-01-22 10:26:39 +01:00
Sukhwinder Dhillon
481dac43f9 ObjectSuggestions: Add methods to restrict $customVarSources 2025-01-20 10:50:18 +01:00
Johannes Meyer
a4a30c1a01 ObjectSuggestions: Support more base filters than restrictions 2024-07-19 14:24:14 +02:00
Johannes Meyer
ecb512620c Only qualify base columns during quick searches
All other columns are already qualified relative to the
base model. This is usually sufficient because qualification
is only required if applied to a query, which isn't happening
at this stage.

fixes #979
2024-03-14 15:35:18 +01:00
Yonas Habteab
b17c30632d Fix failed to resolve reversed host/service -> comment relations 2023-09-05 18:06:02 +02:00
Sukhwinder Dhillon
7af6bb7e2c ObjectSuggestion: Fix incorrect variable type hint 2023-09-05 14:26:43 +02:00
Sukhwinder Dhillon
61f689177b (Grid/View)ModeSwitcher: Fix Variable '$active, $inactive' are probably undefined 2023-09-05 14:26:43 +02:00
Yonas Habteab
96470ea243 Fix customvar search suggestions 2023-07-05 14:05:53 +02:00
Johannes Meyer
d9d3c074fb ObjectSuggestions: Don't split custom var paths more than once 2023-07-05 13:51:05 +02:00
raviks789
b1654ee0e0 Use BaseTableRowItem for HostgroupGridCell and ServicegroupGridCell 2023-06-20 13:39:53 +02:00
raviks789
9a409f0f87 Add GridViewModeSwitcher to toggle between list and grid view
Host and service groups need to toggle between grid and list view.
Hence, a new view mode switcher for this case has been created.
2023-06-20 13:39:53 +02:00
Johannes Meyer
f28fd6a155 ObjectSuggestions: Suggest notificationcommand columns 2023-05-31 16:08:50 +02:00
Johannes Meyer
87cda9c1a6 ObjectSuggestions: Properly qualify search columns
Also uses the more flexible way of retrieving column definitions now.
2022-08-22 16:19:11 +02:00
Johannes Meyer
8f462c6a28 ObjectSuggestions: Only suggest cols of selected hasOne relations
The `isHasOne` check was made as the ipl-orm couldn't have known
about specific relations. The relation collection is now part of
this module so it can decide based on the name whether to collect
one or not.

fixes #534
2022-07-13 16:09:24 +02:00
Johannes Meyer
ce42a4b34a ObjectSuggestions: Also hide id columns 2022-07-13 16:09:24 +02:00
Johannes Meyer
87b66b11f0 ObjectSuggestions: Implement method shouldShowRelationFor() 2022-07-13 16:09:24 +02:00
Johannes Meyer
9159ff3c6c ObjectSuggestions: Remove suffixes from user and usergroup columns 2022-07-11 17:31:01 +02:00
raviks789
7368f87c04 ObjectSuggestions: Fix that group columns are not suggested
Also a fixes that some columns are shown repeatedly.

fixes #571
refs #556
2022-06-29 16:55:34 +02:00
Johannes Meyer
07e2341aea ViewModeSwitcher: Allow to change the mode programmatically 2022-06-09 16:26:27 +02:00
Johannes Meyer
822553e364 ViewModeSwitcher: Add basic support for mode tabular 2022-06-09 16:26:27 +02:00
Johannes Meyer
462af082d7 Introduce Icinga\Module\Icingadb\Model\Vars 2022-06-09 15:16:34 +02:00
Johannes Meyer
ffa295c1f3 ObjectSuggestions: Collect filter relations on our own now
Was previously part of ipl-orm, but it's too specific to have
it in such a generalized location.
2022-06-09 13:26:05 +02:00
Johannes Meyer
5bb3b242df ObjectSuggestions: Adjust usages of getMetaData 2022-06-09 13:26:05 +02:00
Eric Lippmann
6c1850d732 Q&D fix for suggestions which bypass ORM behaviors 2022-05-24 16:04:23 +02:00
Eric Lippmann
9abde2171f Fix "base model" extraction from getUnions() array
Account changes made in commit 4b09a490, which moved "base models" to
the end of the getUnions() array.
2022-05-24 16:04:23 +02:00
Johannes Meyer
5b026f8f26 Adjust usages of ipl\Stdlib\Filter::equal() and ::unequal() 2022-05-24 12:02:51 +02:00
Johannes Meyer
6b3b4db905 ObjectSuggestions: Sort suggested values 2022-04-08 13:57:39 +02:00
Eric Lippmann
9abc3b4d8f Stop using Resolver without a Query 2022-04-07 16:05:29 +02:00
Sukhwinder Dhillon
b40cf1cd39 Fix view mode switcher shows different mode than what is used 2022-02-28 10:28:32 +01:00
Yonas Habteab
aefd0e1f7d Add PHP 7 argument & return type declarations to all member methods 2021-11-03 16:06:59 +01:00
Johannes Meyer
f6d23393b6 ObjectSuggestions: Support column labels in addition to paths 2021-10-28 15:25:14 +02:00
Johannes Meyer
c1ac9d0eda Catch ipl\Orm's new exceptions 2021-10-28 15:24:45 +02:00
Johannes Meyer
c0a27938a5 ObjectSuggestions: Limit value suggestion query 2021-10-04 12:56:09 +02:00
Johannes Meyer
b969807262 ObjectSuggestions: Also suggest user and usergroup columns everywhere 2021-10-04 12:53:13 +02:00
Johannes Meyer
99968db161 ReRoute: Implement ipl\Orm\Contract\RewriteBehavior 2021-10-04 12:53:13 +02:00
Johannes Meyer
20361c219b ProblemToggle: Add method isChecked() 2021-09-01 12:12:20 +02:00
Johannes Meyer
5a8813b98b Move ViewModeSwitcher to Icinga\Module\Icingadb\Web\Control 2021-08-20 17:23:29 +02:00
Sukhwinder Dhillon
9810452527 Add licence header 2021-08-20 12:15:45 +02:00
Johannes Meyer
b83feec0bf ObjectSuggestion: Qualify cv primary key more efficiently 2021-08-16 12:22:23 +02:00
raviks789
bc118516ec
Add Service Grid (#204) 2021-08-05 11:23:01 +02:00
Johannes Meyer
3bf8944316
Use strict ipl-html interfaces (#217)
* Command forms: Use strict interfaces to construct ipl\Html objects

* BaseTableRowItem: Use strict interfaces to create ipl\Html objects

* ObjectInspectionDetail: Use strict interfaces..

..to create ipl\Html objects

* Setup/*Step: Use strict interfaces to create ipl\Html objects

* ObjectSuggestions: Use strict interfaces to create ipl\Html objects

* Widget: Use strict interfaces to create ipl\Html objects

* Widget\Detail: Use strict interfaces to create ipl\Html objects

* Widget\ItemList: Use strict interfaces to create ipl\Html objects

* ServiceLink: Don't return an array
2021-06-22 10:29:25 +02:00
Johannes Meyer
0504de4257 ObjectSuggestions: Properly control filter optimization 2021-05-03 14:49:30 +02:00
Johannes Meyer
38720697eb Cleanup usages of filter property noOptimization 2021-05-03 14:49:30 +02:00
Johannes Meyer
18f009c55f Utilize ipl\Orm\Query::filter() where appropriate 2021-03-19 15:42:15 +01:00