Thomas Gelf
a092c5d79e
IcingaObjectImports: fix check for modifications
...
refs #1062
2017-08-21 21:36:21 +02:00
Thomas Gelf
6ba0e8e924
IcingaObject: give unstored import names
2017-08-21 20:33:00 +02:00
Thomas Gelf
b364165110
IcingaObject: fix plain export with chosen...
...
...properties, use new template resolving repository everywhere
2017-08-16 08:11:08 +02:00
Thomas Gelf
496be4fbc8
Sync: respect 'replace' policy on vars...
...
...with rule policy being set to 'merge'
fixes #864
2017-08-03 10:51:13 +02:00
Thomas Gelf
59d6291fcf
PrefetchCache, IcingaObject: speed up import list
...
...greatly improves REST API performance
2017-08-01 12:48:29 +02:00
Thomas Gelf
126dd29ecc
IcingaObject: work around a resolver issue
2017-07-14 13:21:42 +02:00
Thomas Gelf
a9a2295c8a
IcingaObject, Host/Service: add supportsChoices()
2017-07-14 13:21:42 +02:00
Thomas Gelf
18c0ce3c4f
IcingaObject: allow to prefetch related object...
...
...types
2017-07-14 13:21:42 +02:00
Thomas Gelf
5ae7997f9d
Sync: tune membership resolver
...
Also fixes error on host creation
refs #832
2017-07-14 13:21:42 +02:00
Thomas Gelf
45c93b3445
HostGroupMembershipResolver: first implementation
...
refs #832
2017-07-14 13:21:42 +02:00
Thomas Gelf
cb9fff90ef
IcingaObject: add new static helper, expose...
...
...existing one
refs #842
2017-03-13 22:03:02 +01:00
Thomas Gelf
b7a10d296c
phpcs: mostly new PSR-2 SpacingAfter/Before checks
2017-01-13 20:54:52 +01:00
Thomas Gelf
9e771f2d5a
Fix phpcs complaints
2017-01-13 19:47:54 +01:00
Thomas Gelf
efe6fd35ab
IcingaObject: remove code loading fields...
...
...we now have a dedicated class for this
2016-12-28 12:44:51 +01:00
Thomas Gelf
d4736f4a41
IcingaObject: better way to get resolved props?
2016-12-16 13:21:48 +01:00
Markus Frosch
aaeca533fc
IcingaConfig/IcingaObject(Legacy): Render dummy notification settings
...
So we avoid warnings about nothing configured.
refs #13049
2016-11-30 08:12:27 +01:00
Markus Frosch
5ee911ef7c
IcingaObject(Legacy): Fix event_handler rendering
...
refs #13049
2016-11-14 15:32:14 +01:00
Thomas Gelf
913d934762
IcingaObject: introduce getSingleResolvedProperty()
...
Motivation: getResolvedProperty() has the effect that objects will fully
resolve all inherited properties, vars and fields. This is overkill in
situations where only a few resolves properties are needed and has quite
an influence on overall rendering performance.
Over time we might completely fade out that part of our resolving logic
as it predates current cache implementations. Meanwhile, we keep two
methods for two (internal) purposes.
2016-11-14 13:25:26 +01:00
Thomas Gelf
2c1f745c4e
IcingaService: render service_description for v1
2016-11-07 11:38:02 +01:00
Thomas Gelf
87fe623d11
DbObject: help IDE, render newline after a...
...
...disabled v1 object
2016-11-04 19:52:21 +01:00
Markus Frosch
003a100b9c
IcingaConfig(Legacy): Add deployment mode for Icinga 1 config
...
refs #13049
2016-11-04 10:28:11 +01:00
Markus Frosch
199a46abcb
IcingaObject(Legacy): Render check_command when inherited, but ARGn is set
...
refs #12919
2016-11-03 14:16:07 +01:00
Markus Frosch
1d7cfa343e
IcingaHost(Legacy): Render alias with renderLegacyCustomExtensions
...
refs #12919
2016-11-03 13:46:16 +01:00
Markus Frosch
6b9d23cdd5
IcingaObject(legacy): Render check_command with ARGn from customvars
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
b9e4162635
IcingaObject(legacy): Fix alignLegacyProperties for long attributes
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
1502dd9c90
IcingaObject(Legacy): Render display_name as alias
...
With the execption of Host and Service.
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
f2ff967b07
IcingaTimeperiodRanges(Legacy): Implement toLegacyConfigString
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
ab7d0fb085
IcingaObject(Legacy): Render legacy customvars
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
1e70cface0
IcingaObject(Legacy): Render directly added groups
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
a8179507dc
IcingaObject(Legacy): Make getLegacyObjectType public
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
1cedc64c5a
IcingaObject(Legacy): Properly comment a disabled object
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
a2151fd9d1
IcingaObject(Legacy): Add getLegacyObjectType function
...
So the type rendered to the object header can get overwritten.
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
802b923df6
IcingaConfig: Add v1-masterless config format
...
Do not render a passive checkable to the master zone then.
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
31a321e13e
IcingaObject(legacy): Add flag to render only supported objects
...
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch
2e2f4739c7
IcingaObject(legacy): Only render passive objects for checkables
...
Also simplify renderToLegacyConfig.
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
Markus Frosch
672a45b26e
IcingaObject: loadAllByType should respect PrefetchCache
2016-10-31 17:21:21 +01:00
Markus Frosch
86d2f317ee
IcingaObject: Do not invalidate templateResolver on every setImports()
...
Do not clear templateResolver, but refresh current object with its "new" parents.
refs #11803
2016-10-31 17:21:21 +01:00
Thomas Gelf
e59e2d0c2c
Merge remote-tracking branch 'origin/master'
2016-10-27 16:35:19 +00:00
Markus Frosch
f9f61be7aa
IcingaObject: Allow replaceWith on non-apply Objects
...
This broke with assign_filter changes, we should not throw an error when
the filter is actually null.
replaceWith() re-sets all vars.
refs #12033
2016-10-27 15:46:52 +02:00
Thomas Gelf
d59604bd93
ServiceSet: rework sets, allow for vars and...
...
...all other service properties when adding services to a set
2016-10-25 23:12:23 +00:00
Thomas Gelf
696e63b4ec
Servicesset: add controller, form and table
2016-10-25 23:12:23 +00:00
Thomas Gelf
fa2c360f4c
IcingaObject: fix arguments rendering for external
...
...objects
2016-10-25 02:28:19 +00:00
Thomas Gelf
39be7b2cb0
IcingaObjectLegacyAssignments: rendering for old...
...
...assignments still to be found in our activity log
2016-10-25 00:00:16 +00:00
Thomas Gelf
0d86c24cd8
Huge change, getting rid of legacy assignment...
...
...code. All objects should work with the new code base right now
2016-10-24 03:41:37 +00:00
Thomas Gelf
aeafec37d7
FormDataFilter: simplify HTML, Code and style
2016-10-23 04:23:38 +00:00
Thomas Gelf
6ed24f93da
IcingaObject: render assign_filter property
2016-10-22 07:02:09 +00:00
Thomas Gelf
b7eaab715b
Make explicit calls to renderStringWithVariables
2016-10-22 05:48:09 +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
fc2890d865
IcingaObject: new helper method for single...
...
...resolved custom vars
2016-10-20 01:37:23 +00:00
Thomas Gelf
98acba9fb4
IcingaTemplateResolver: more tweaking
...
refs #12922
2016-10-14 09:40:01 +00:00
Thomas Gelf
0d930efb46
IcingaObject: add new resolving helper methods
...
This for example allows to get a single inherited var and their origin
2016-10-13 21:25:03 +00:00
Thomas Gelf
c1afda4392
IcingaObject: do not fail when rendering objects...
...
...without imports support
fixes #12618
2016-10-13 11:11:35 +00:00
Thomas Gelf
e99568fffc
DirectorObjectForm: add unique error message...
...
...without adding an error in case we detect a loop. Also improve
resolve cache invalidation and clean up old imports-related code
refs #11803
2016-10-12 15:23:54 +00:00
Thomas Gelf
05f991c585
IcingaObject: no loop detection on unstored...
...
...objects
refs #11803
2016-10-12 14:26:44 +00:00
Thomas Gelf
7993724dcb
IcingaTemplateResolver: detect and throw nesting..
...
...errors
fixes #11803
2016-10-12 14:16:19 +00:00
Thomas Gelf
34ed3da3b8
IcingaObject: remove duplicated short name logic
2016-10-12 09:09:28 +00:00
Thomas Gelf
c044de89de
SyncPropertyForm: allow to sync m:n relations
2016-10-12 08:59:42 +00:00
Thomas Gelf
9e1cea0119
IcingaObject: fix v1 rendering for some properties
...
Mostly relations, no timeout, still ugly
2016-10-12 08:31:22 +00:00
Thomas Gelf
b7018627a0
IcingaServiceSet: introduce a new object type
2016-10-12 07:19:02 +00:00
Thomas Gelf
e96db8b296
IcingaObject: move duplicate logic to common func
2016-10-09 13:15:05 +00:00
Thomas Gelf
cf063180d2
IcingaObject: start to dry out relation-related...
...
...code. Still weird and hard to understand because of lazy-loading,
can only get better. All this is required to be able to render objects
having obsolete dependencies in our activity log
2016-10-09 12:48:13 +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
c0a8c49d4f
show/activitylog: fallback rendering for hosts...
...
...with obsolete parents, that have been removed in the meantime
2016-10-06 16:29:50 +00:00
Thomas Gelf
749f035971
Db/IcingaObject: formatting & style
2016-10-05 18:05:59 +00:00
Thomas Gelf
d1b7083145
IcingaObject: add helper methods for relations
2016-10-05 17:58:48 +00:00
Thomas Gelf
42212661f2
IcingaObject: document 'supports' vars and methods
2016-09-15 18:53:09 +00:00
Thomas Gelf
217fb38517
IcingaObject: implement supportsAssignRules
2016-09-09 09:06:31 +00:00
Thomas Gelf
029907f01f
TimePeriodRange: ranges should be more generic...
...
...as they will not only be used in timeperiods
2016-08-31 16:23:23 +00:00
Thomas Gelf
56a7cb285d
host/services: show inherited services...
...
...and magically applied ones
2016-08-23 14:18:54 +00:00
Thomas Gelf
e639790d52
IcingaObject: improve type detection
...
fixes #12319
2016-08-09 14:17:57 +00:00
Corentin Ardeois
5bdd219533
Allow override of blacklisted properties
...
It is now a separate class attribute which can be overridden.
2016-08-04 15:07:26 +00:00
Thomas Gelf
4c978db3d0
IcingaConfig: allow to toggle legacy renderer
...
refs #12264
2016-08-01 06:59:31 +00:00
Thomas Gelf
ce1c6f3099
Objects: simplify default rendering zone handling
...
For existing installations this should only affect Timeperiods, as
they will now prefer the global zone. Also some custom zone settings
might now take effect while they have formerly been ignored.
fixes #12252
2016-07-28 15:44:42 +00:00
Thomas Gelf
2bf5bdddb5
IcingaObject, imports: more legacy config support
2016-07-28 06:57:27 +00:00
Thomas Gelf
15acbb5290
IcingaObject::replaceWith: implement preserve...
...
...and add related tests, as this is a tricky one
2016-07-14 17:06:48 +02:00
Thomas Gelf
a761bb108b
IcingaService: render dedicated host before imports
...
This fixes issues with object and apply types showing different
behaviour in Icinga 2 when inheriting the very same template.
2016-06-17 11:55:48 +02:00
Thomas Gelf
dc3a2ca999
IcingaObject: split object property rendering
...
Improves readability
2016-06-17 11:44:38 +02:00
Thomas Gelf
5c0ea2c3b0
IcingaObject: be strict on relations
2016-06-16 22:16:55 +02:00
Thomas Gelf
57656f8dd9
IcingaObject: externalize imported object loading
2016-06-16 21:40:22 +02:00
Thomas Gelf
b83bfed186
IcingaObject: fix comments for disabled object...
...
...and switch to multiline comments, they look better in our diffs
fixes #11937
2016-06-13 17:20:44 +02:00
Thomas Gelf
0b92ca922f
IcingaObject: render disabled objects as comments
...
fixes #11922
2016-06-11 00:30:28 +02:00
Thomas Gelf
cb825b5b94
IcingaObject: fix resolveProperty in combination...
...
...with lazy-set properties
2016-05-26 01:35:12 +02:00
Thomas Gelf
b3a1d54870
IcingaObject: fix c&p error, variable name
2016-05-20 09:23:48 +02:00
Thomas Gelf
018713a13f
IcingaObject: smaller methods for import resolvers
2016-05-20 08:36:07 +02:00
Thomas Gelf
64fbdcfeee
IcingaObjectImports: fix null handling
2016-05-20 08:12:46 +02:00
Thomas Gelf
576d62da26
IcingaObject: use resolved zone for apply/tpl
2016-05-10 20:23:45 +02:00
Thomas Gelf
1158409eeb
IcingaObject: fix rendering target and tests
2016-05-02 10:23:32 +02:00
Thomas Gelf
8c02b1e6c5
IcingaObject: fix multi-relation rendering order
2016-04-22 11:12:29 +02:00
Thomas Gelf
f8ef034358
IcingaObject: add render target helpers
2016-04-19 21:29:03 +02:00
Thomas Gelf
e040e84e5b
IcingaObject: add isDisabled helper method
2016-04-18 13:17:47 +02:00
Thomas Gelf
46e230c5ad
IcingaObject: fix occasional error when showing...
...
...resolved properties for applied objects
2016-04-11 11:06:54 +02:00
Thomas Gelf
36c4e51aa0
IcingaObject: fix argument retrieval
2016-04-03 21:27:49 +02:00
Thomas Gelf
9cf3569884
IcingaObject: unresolved properties
2016-03-24 13:37:32 +01:00
Thomas Gelf
a8ec07237d
IcingaObject: provide former assignments for...
...
...the activity log
2016-03-24 11:40:32 +01:00
Thomas Gelf
f8d6af7b3f
IcingaObject: make assignments public
2016-03-24 06:49:19 +01:00
Thomas Gelf
33ff0c77e8
IcingaObjectAssignments: complete re-write
2016-03-24 06:46:13 +01:00
Thomas Gelf
a49f163ca2
IcingaObject: fix argument setter
2016-03-21 10:35:11 +01:00
Thomas Gelf
d7142b307a
IcingaObject: clean up legacy methods
2016-03-20 14:51:18 +01:00
Thomas Gelf
3e016311d6
DirectorActivityLog: improve removal logging
2016-03-20 12:02:45 +01:00