54 Commits

Author SHA1 Message Date
raviks789
188fa7aa35
Temporary patch to distinguish instantiable and non instantaible dictionary
Check if the dictionary custom variable is instantiable or not before rendering it
to Icinga Config
2025-08-14 16:51:22 +02:00
raviks789
393a1c9247
CustomVariables: Use operator '+=' instead of '=' if the variable is a dictionary 2025-07-10 14:06:10 +02:00
raviks789
6d666de23c
Render the host dictionary items as variable in apply-for-rule 2025-07-10 14:06:09 +02:00
Eric Lippmann
00985429c5 Fix PSR-12 violations 2024-10-22 14:31:14 +02:00
Thomas Gelf
616d329be3 IcingaNotification: implement users_var
fixes #462
2022-12-01 12:03:45 +01:00
Thomas Gelf
560e0e6520 CustomVariables: do not render deleted ones
fixes #2622
2022-09-30 13:47:05 +02:00
Thomas Gelf
6786cc768f Director: some fixes for PHP v8.1
refs #2435
2021-11-24 11:56:18 +01:00
Thomas Gelf
57c4dda117 Objects/*, CVs, others: unify setBeingLoadedFromDb 2021-10-05 23:33:30 +02:00
Thomas Gelf
a033e411c6 Sync: preserve _override_servicevars
fixes #1307
2018-05-04 22:14:07 +02:00
Thomas Gelf
22eb5911f0 CustomVariables: readability, IDE hints 2018-02-25 17:58:11 +01:00
Thomas Gelf
53242894a8 CustomVariables: extend overrides to allow...
...overrides from multiple templates to be merged

fixes #813
2017-09-12 12:19:05 +02:00
Thomas Gelf
15e87a15bb CustomVariables: fix and test numeric key rendering
fixes #996
2017-07-14 13:21:42 +02:00
Thomas Gelf
180fc2ccfa Datafield: on rename ask whether to also rename vars
fixes #818
2017-07-14 13:21:42 +02:00
Thomas Gelf
962e545a79 CustomVariable: add new helper methods
toJson, checksum, render - will be used later on
2016-12-06 08:35:27 +01:00
Thomas Gelf
5168f5e887 CustomVariables: beatify v1.x unsupported vars 2016-11-04 19:51:02 +01:00
Markus Frosch
df299fe314 CustomVariables(Legacy): Ignore ARGn vars in toLegacyConfigString
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
1592894fd7 CustomVariable*(Legacy): Add toLegacyConfigString
refs #12919
2016-11-03 13:41:44 +01:00
Thomas Gelf
ee0def7d2b Lots of files: make IDE users happy 2016-11-01 18:28:36 +01:00
Thomas Gelf
6bb74966d5 CustomVariables: add _set table to delete/countAll 2016-10-25 23:12:23 +00:00
Corentin Ardeois
ddcfb09f58 Handle expressions only for apply objects
Expressions will be handled only if the object is an ApplyRule.
Only properties and custom variables are replaced.

refs #11976
2016-10-22 00:15:09 +00:00
Thomas Gelf
71b3459540 DirectorDatafieldForm: allow to wipe all related...
...custom variables when removing a field

fixes #12916
2016-10-13 14:02:51 +00:00
Thomas Gelf
6f12663756 PrefetchCache: lot's of improvements
This commit enables the prefetch cache per default when rendering configs
and adds the following features:

* prefetch all kinds of Icinga object inheritance (imports)
* prefetch group memberships
* prefetch custom variables
* render vars with the same checksum only once

Roughly measured performance boost with a large real-life config, renders three
times faster as it did before. Might be even more for those suffering from high
latencies when accessing their DB remotely and/or on a slow storage.

fixes #12876
2016-10-09 12:41:06 +00:00
Thomas Gelf
c859055221 CustomVariables: unset var if set to plain null
...but still allow for Null variables
2016-10-05 17:20:25 +00:00
Thomas Gelf
defb8c50c2 CustomVariables: improve readability 2016-09-08 13:55:13 +00:00
Thomas Gelf
4e083d7d40 CustomVariables: use array notation for keys...
...with special characters
2016-07-22 18:09:02 +02:00
Thomas Gelf
f288ddaf95 CustomVariables: allow to instantiate from cache 2016-06-30 10:42:52 +02:00
Thomas Gelf
757de240ed CustomVariables: sort variables when rendering
Order was formerly database-dependent
2016-05-25 15:29:39 +02:00
Thomas Gelf
ef50386cd7 CustomVariables: fix modification handling
Used to fail when stored and modified multiple consecutive times.
2016-03-08 21:28:54 +01:00
Thomas Gelf
4bc5afb2f8 library/Director: fix PSR2 complaints 2016-02-26 11:58:37 +01:00
Thomas Gelf
2bac3c682f CustomVariables: do not count deleted vars 2016-02-25 19:40:06 +01:00
Thomas Gelf
99608310c5 CustomVariables: set modified from outside 2016-02-23 10:14:42 +01:00
Thomas Gelf
c090665594 CustomVariables: improved "set modified" handling 2016-02-22 11:04:01 +01:00
Thomas Gelf
febd44a318 CustomVariables: clone values on set...
...just to be on the safe side
2016-02-22 10:59:30 +01:00
Thomas Gelf
4803e11b49 CustomVariables: fix internal isset magic 2015-12-10 12:20:23 +01:00
Thomas Gelf
1936ad8997 CustomVariables: improve modification handling 2015-08-28 23:42:40 +02:00
Thomas Gelf
f81f6167d5 CustomVariable: store format on modification 2015-08-28 18:17:21 +02:00
Thomas Gelf
0c3e316bb9 CustomVariables: cast foreign id to int 2015-08-28 18:16:36 +02:00
Thomas Gelf
43fc6fc42b CustomVariables: clone vars, may not suffice 2015-07-31 14:46:20 +02:00
Thomas Gelf
f4e992f6da CustomVariables: allow access to unmodified vars 2015-07-31 14:40:55 +02:00
Thomas Gelf
3a96f9ebe4 CustomVariables: handle deleted vars 2015-07-31 14:35:49 +02:00
Thomas Gelf
747ea70a33 CustomVariables: use ->id, not ->getId 2015-07-24 10:57:05 +02:00
Thomas Gelf
ac5bfd32f3 CustomVariables: fix method calls 2015-06-24 09:43:48 +02:00
Thomas Gelf
a2790652ec CustomVariables: do not replace vars on modification 2015-06-24 09:42:50 +02:00
Alexander Fuhr
616892984d Groups: Add generic Groups support
resolves #9427
2015-06-16 17:58:47 +02:00
Thomas Gelf
49abd08ec3 CustomVariables: implement iterator and countable 2015-06-15 17:16:09 +02:00
Thomas Gelf
91dde44441 CustomVariables: add load from db support 2015-06-15 16:35:18 +02:00
Thomas Gelf
f354d3c034 IcingaConfig: improve prefix/intendation handling 2015-06-11 23:02:43 +02:00
Thomas Gelf
6475e0495a IcingaConfigHelper: move to IcingaConfig namespace 2015-06-11 22:44:17 +02:00
Thomas Gelf
00162bccf8 CustomVariable: lots of rendering improvements 2015-06-11 21:33:47 +02:00
Thomas Gelf
b2f66b3995 CustomVariables: implement and use basic rendering 2015-06-11 19:46:36 +02:00