Commit Graph

1953 Commits

Author SHA1 Message Date
Thomas Gelf 2416007b24 ActionController: fix indentation 2017-01-13 19:59:11 +01:00
Thomas Gelf 9e771f2d5a Fix phpcs complaints 2017-01-13 19:47:54 +01:00
Thomas Gelf f6fca75eae Acl: code cleanup, more comments 2017-01-13 18:59:04 +01:00
Thomas Gelf 1b71df732e CubeLinks: cleanup, comments 2017-01-13 18:58:46 +01:00
Thomas Gelf 792e58abae DirectorDatafield: just newlines 2017-01-13 16:39:35 +01:00
Thomas Gelf f874a79bb4 IcingaObjectFieldLoader: no mandatory field on cmd
fixes #12644
2017-01-13 16:05:34 +01:00
Thomas Gelf 9b6eda4e97 IcingaObjectFieldLoader: cleanup, improve handling 2017-01-13 15:24:50 +01:00
Thomas Gelf 40ff51e487 IcingaTemplateResolver: separate concerns...
...and make helper accessible
2017-01-13 15:20:04 +01:00
Thomas Gelf 4a75804d86 various: change icinga.org to icinga.com
fixes #14001
2017-01-13 13:33:58 +01:00
Thomas Gelf 7a3a845570 Forms: try to give dev UI more hints on fluent...
...code
2017-01-13 13:15:01 +01:00
Thomas Gelf 9fc3957f11 QuickForm: fix broken submit button 2017-01-02 10:49:14 +01:00
Thomas Gelf 87f88bf0c7 DirectorObjectForm: allow to hook custom code...
...after fields have been added
2017-01-02 10:17:49 +01:00
Thomas Gelf 0a9ed6ff39 HostApplyMatches: allow usage for single hosts
refs #13849
2017-01-02 10:15:55 +01:00
Thomas Gelf c9929f7b17 QuickForm: postpone default submit button creation
This gives more possibilities to override them at a late stage
2017-01-02 10:14:30 +01:00
Thomas Gelf a395923aed QuickTable: provide more hooks for special tables 2016-12-30 21:10:29 +01:00
Thomas Gelf 441f94bb37 PropertyModifierRegexpSplit: adjust name 2016-12-30 12:22:39 +01:00
Markus Frosch 4c576f9edc PropertyModifierRegexSplit: Add regexp based split modifier
fixes #13841
2016-12-30 12:11:50 +01:00
Thomas Gelf fae2a57ed5 Import: fix some type hints and comments 2016-12-30 10:20:24 +01:00
Thomas Gelf a9874879dd TemplateResolver: add new methods for stricter...
...path resolution. Also ships related tests

refs #13839
2016-12-30 10:15:25 +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 6800d2cbd2 PropertyModifierJsonDecode: show substring on fail 2016-12-22 12:30:22 +01:00
Thomas Gelf 2ef36899e9 PropertyModifierJsonDecode: fail on error...
...and give some details

fixes #13733
2016-12-22 12:21:49 +01:00
Thomas Gelf 990e3fc04b DirectorObjectFrom: set every property we get
fixes #13659
fixes #13673
2016-12-19 14:32:52 +01:00
Thomas Gelf d4736f4a41 IcingaObject: better way to get resolved props? 2016-12-16 13:21:48 +01:00
Thomas Gelf 241404d9ba HostApplyMatches: do not skip defaults
May avoid errors when working with properties defined only on some of your
hosts
2016-12-16 13:19:02 +01:00
Thomas Gelf 8687ecaeeb Db: cosmetics 2016-12-16 12:23:47 +01:00
Thomas Gelf ec0cbac657 ObjectQuery, FilterRenderer: two new classes...
...required when working with the cache

refs #13068
2016-12-16 12:19:57 +01:00
Thomas Gelf 251eb4f9a5 ObjectController: add explicit NotFoundError...
...handling for REST API requests

fixes #13641
2016-12-16 12:07:01 +01:00
Thomas Gelf 2918ef555e schema: fix lost/diverged foreign keys
fixes #13591
2016-12-15 15:51:48 +01:00
Thomas Gelf 3d8ccf2448 DirectorObjectForm: skip empty related sets...
...provides as objects

fixes #13605
2016-12-15 11:44:52 +01:00
Thomas Gelf 65181ca67e ExtensibleSet: be strict on values...
...and provide a meaningful Exception in case something fails

refs #13605
2016-12-15 11:43:56 +01:00
Marc DeTrano 66ece6010d NewObjectsController: pass dummy object to...
...provideFilterEditorForTable()

fixes #13597
2016-12-14 23:59:57 +01:00
Thomas Gelf 15b031272e IcingaObjectFieldLoader: pass db to resolved...
...flat object

refs #13583
2016-12-14 22:44:56 +01:00
Thomas Gelf e85c13ae13 DirectorObjectForm: some more steps to simplify...
...this old monster

fixes #13583
2016-12-14 21:07:07 +01:00
Thomas Gelf a30f34a026 DirectorObjectForm: be careful when continuing...
...after an exception
2016-12-14 20:59:26 +01:00
Thomas Gelf cbb3c7aa88 DirectorObjectForm: remove unused parameter for...
...object() helper method
2016-12-14 20:48:59 +01:00
Thomas Gelf 145e1fc6a9 DirectorObjectForm: add has_agent to early props 2016-12-14 20:27:52 +01:00
Thomas Gelf 7e7e2601d3 ObjectFields: prefix filters, respect inheritance
refs #13253
2016-12-14 17:33:13 +01:00
Thomas Gelf 949d6c9b54 IcingaCommandField: one more implementation 2016-12-14 16:36:33 +01:00
Thomas Gelf 5847913987 Fields: add a possibility to show fields based...
...on filter rules
2016-12-14 16:36:33 +01:00
Thomas Gelf ec0ea2ee6d NotificationsController: use new base class...
...with less tabs, less and simpler code

fixes #13565
fixes #13157
2016-12-14 15:04:38 +01:00
Thomas Gelf 068735021b ActionController: fix REST API issue 2016-12-14 15:04:00 +01:00
Thomas Gelf 8841906aad Dashboard: provide apply summaries where available 2016-12-14 15:01:43 +01:00
Thomas Gelf abab92bdf2 Notifications: add some new dashlets
refs #13565
2016-12-14 15:01:07 +01:00
Thomas Gelf f614d75edc Dashlet: provide new summary text helpers 2016-12-14 14:53:29 +01:00
Thomas Gelf 34be3801ce Dashboard: make it easier to override behavior 2016-12-14 12:34:59 +01:00
Thomas Gelf 24bb170889 Dashlet: allow to hide regardless of permissions 2016-12-14 12:34:02 +01:00
Thomas Gelf a6962dc326 Dashboard: show description if any 2016-12-14 12:33:19 +01:00
Thomas Gelf 4c1ab4dae6 php: just some comments and cleanup 2016-12-13 18:25:14 +01:00
Thomas Gelf 04f9b360da DirectorDataField: preserve settings in fromDbRow
refs #13259
2016-12-13 17:14:58 +01:00
Thomas Gelf 2cfa78af14 FieldLoader: do not fail missing fields
One might have toggled template or command, sent values for missing fields
might therefore be perfectly legal and should be silently ignored

refs #13241
2016-12-13 16:57:32 +01:00
Thomas Gelf e60fdb31b8 DirectorObjectForm: move check_command to main
fixes #13551
2016-12-13 16:57:05 +01:00
Thomas Gelf e207bb2bc9 DirectorObjectForm: resolve ids 2016-12-13 16:34:31 +01:00
Thomas Gelf bb25de6126 FieldLoader: fix field handling issues
fixes #13241
fixes #13259
2016-12-13 16:34:31 +01:00
Thomas Gelf c1e80afff4 Boolean: fix multiedit-related issues
fixes #13131
2016-12-13 16:04:09 +01:00
Thomas Gelf 7c6a10013f AssignFilter: add 'contains' operator
fixes #13133
2016-12-13 14:49:36 +01:00
Thomas Gelf 58a64cee78 SyncRule: initialize hasServiceSet 2016-12-13 13:51:41 +01:00
Thomas Gelf d2adc1b4ec IcingaObjectFieldLoader: attach fields to form...
...before adding them to a display group. Many thanks to Marc DeTrano for
troubleshooting this tricky issue.

fixes #13279
2016-12-13 12:46:45 +01:00
Thomas Gelf f1a61e2557 ServiceGroup: allow to assign them to services...
...via assignment rules

fixes #13415
2016-12-13 09:51:52 +01:00
Thomas Gelf 1acf332f6b DirectorDataField: whether a field is required...
...is a setting
2016-12-07 09:43:16 +01:00
Thomas Gelf 2ea573e338 IcingaVar: use new CustomVar helpers 2016-12-07 08:29:20 +01:00
Thomas Gelf 57a450f878 Monitoring: add host state helper 2016-12-06 08:55:55 +01: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 0bb1df2f77 CubeLinks: implement Cube v1.0.0 action hook
fixes #13379
2016-12-01 15:08:04 +01:00
Christoph Niemann ddc4b9321b agent helper: add new linux agent script
fixes #12910
2016-11-30 09:45:34 +01:00
Thomas Gelf 7dd2ac6b83 IcingaService: enum service vars, not host vars
fixes #13359
2016-11-30 09:33:29 +01:00
Thomas Gelf 2ce84baa70 BaseTestCases: make 'em abstract to not be empty 2016-11-30 09:23:36 +01:00
Thomas Gelf 1e9e15278a Merge branch 'bugfix/service-set-contraints-13309' 2016-11-30 08:16:47 +01:00
Markus Frosch 4a838ca277 IcingaHostGroup(Legacy): Load zones prefetched
refs #13049
2016-11-30 08:12:27 +01:00
Markus Frosch c2734fd4d4 IcingaHostGroup(Legacy): Render assigned groups to all zones
So we still can support hosts with direct groups.

refs #13049
2016-11-30 08:12:27 +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 3a8cad2486 IcingaServiceSet: Check if object_name is unique for templates
refs #13309
2016-11-28 15:32:41 +01:00
Markus Frosch ab169e4b78 DbObject: Add and use DuplicateKeyException 2016-11-28 15:32:41 +01:00
Markus Frosch d7ddb3e63c Add IcingaObjectTestCase for testing IcingaObjects 2016-11-28 15:32:41 +01:00
Thomas Gelf 72bb29694d multi-edit: show deployment link 2016-11-25 20:51:02 +01:00
Thomas Gelf 42f98e9bbf CubeLinks: fit modified Cube API 2016-11-25 20:50:31 +01:00
Thomas Gelf db61528748 CustomVariable: fix issues with PHP bug #43200
fixes #13271
2016-11-21 22:44:31 +01:00
Thomas Gelf b39e7efce7 ObjectForm: allow to preset imports 2016-11-16 16:02:28 +01:00
Thomas Gelf 5407c4fe7c ObjectsController: template table for templates...
...but load the other one first to trick the autoloader
2016-11-16 13:36:07 +01:00
Thomas Gelf 698d523c88 js: put focus on first form element 2016-11-16 13:20:31 +01:00
Thomas Gelf d5131f7fac Arguments: always render += instead of =
This allows to extend existing arguments

fixes #12941
2016-11-15 17:57:02 +01:00
Markus Frosch 4e5dfb097e IcingaService(Legacy): Fix duplicated rendering of apply
refs #13049
2016-11-15 10:52:03 +01:00
Markus Frosch b40cfd5f05 IcingaHostGroup(Legacy): Fix member rendering with correct attribute
refs #13049
2016-11-14 15:36:55 +01:00
Markus Frosch 5ee911ef7c IcingaObject(Legacy): Fix event_handler rendering
refs #13049
2016-11-14 15:32:14 +01:00
Markus Frosch d4c3be0bf5 IcingaHostGroup|IcingaService(Set): Fix legacy config file extension
refs #13049
2016-11-14 15:28:52 +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 a6928a8bc1 CustomVariable: render expressions in Arrays...
...and introduce a new abstract method
2016-11-14 10:17:52 +01:00
Thomas Gelf d32f22d493 Config: do not count twice for benchmark 2016-11-14 10:17:52 +01:00
Markus Frosch ae70de9755 IcingaServiceSetTable: Fix counter to show distinct counted values
refs #12891
2016-11-11 15:18:21 +01:00
Markus Frosch 116016bbfc HostApplyMatches: Raise memory_limit for bigger caches
refs #13049
2016-11-11 11:49:37 +01:00
Markus Frosch a8a9278806 IcingaHostGroup(legacy): Render assign to a hostgroup_member list
Supporting active-passive and masterless, by writing multiple versions of the object.

refs #13049
2016-11-11 11:49:37 +01:00
Markus Frosch 31520a7d21 IcingaService: Don't even try to render service_set related services
refs #12891
2016-11-11 11:49:37 +01:00
Markus Frosch 1a51e55563 Merge branch 'feature/better-import-table' 2016-11-11 11:30:56 +01:00
Markus Frosch 8b5689545c Sync(Rule): Allow to sync services of a ServiceSet
This extends the destination key pattern for Sync.

refs #12891
2016-11-11 11:06:01 +01:00
Markus Frosch ddd59ab274 IcingaServiceSet: A simple key identifies a ServiceSet (template)
refs #12891
2016-11-11 11:06:01 +01:00
Markus Frosch b08f3df882 IcingaServiceSet*: Improve Table and view
Add filter and pagination, and some nice display features.

refs #12891
2016-11-11 10:44:22 +01:00
Markus Frosch 39538a3f33 SyncRule: Support hasCombinedKey for serviceSet
refs #12891
2016-11-11 10:44:22 +01:00
Markus Frosch b051b2da17 ObjectsController: Unify feature detection and setAction
Groups, Assign and Sets will be checked on the base Object for a group.

refs #12891
2016-11-11 10:44:22 +01:00
Thomas Gelf eb1f1a2c33 doc/testing: fix syntax 2016-11-10 20:03:29 +01:00
Markus Frosch b4cb6f8ccb ImportRun: Add access to ImportSource 2016-11-09 14:20:35 +01:00
Thomas Gelf 64f00940b1 config/file: unify look and feel, link back
fixes #13087
2016-11-08 22:16:56 +01:00
Thomas Gelf 8ca17f4e7b StartupLogRenderer: remove heavvy logic from view 2016-11-08 16:48:45 +01:00
Thomas Gelf 5bae792901 IcingaTemplateResolver: ignore multicolumn key...
...objects on refresh (for now)

fixes #13081
2016-11-08 16:27:44 +01:00
Thomas Gelf 1a311bc9a9 IcingaServiceSet: ignore empty sets when rendering
fixes #13079
2016-11-08 16:23:16 +01:00
Thomas Gelf 8ce4cf49c0 inspect: show tabs, allow for all hosts
fixes #13073
2016-11-08 16:13:01 +01:00
Thomas Gelf 63bf607a1d IcingaObjectFieldLoader: allow exotic var names
fixes #12094
fixes #12962
2016-11-08 02:00:38 +01:00
Thomas Gelf 588926a9f9 config/activities: allow to filter them
fixes #12239
2016-11-07 22:04:51 +01:00
Markus Frosch e116e36051 IcingaService(legacy): Test for not null
refs #13049
2016-11-07 14:12:30 +01:00
Markus Frosch 314b0675ee HostApplyMatches: Prefetch Hostgroups for resolving
refs #13049
2016-11-07 14:12:06 +01:00
Thomas Gelf 068d38fddc IcingaService(v1): render single service apply...
...fully resolved to all matching hosts respecting their rendering zone
2016-11-07 13:34:20 +01:00
Thomas Gelf 7e749da982 IcingaServiceSet: implement target zone for...
...resolved v1 apply rules
2016-11-07 12:42:27 +01:00
Thomas Gelf 2c1f745c4e IcingaService: render service_description for v1 2016-11-07 11:38:02 +01:00
Thomas Gelf 482f48ee1e IcingaServiceSet: cleanup, shift responsability...
...for service_set_id property cleanup

refs #13049
2016-11-04 20:31:01 +01:00
Thomas Gelf ba7d350a8c HostApplyMatches: resolve services and -sets...
...for Icinga v1.x

refs #13049
2016-11-04 19:56:56 +01:00
Thomas Gelf 87fe623d11 DbObject: help IDE, render newline after a...
...disabled v1 object
2016-11-04 19:52:21 +01:00
Thomas Gelf 5168f5e887 CustomVariables: beatify v1.x unsupported vars 2016-11-04 19:51:02 +01:00
Markus Frosch f6a5c8cbc5 LegacyDeploymentApi: Expire old stages that haven't got activated
For about an hour.

refs #13049
2016-11-04 16:56:52 +01:00
Markus Frosch a3d69c4f4c LegacyDeploymentApi: Call activation tool to deploy a new stage
refs #13049
2016-11-04 16:40:22 +01:00
Markus Frosch 660f41f94d LegacyDeploymentApi: Call activation tool to deploy a new stage
refs #13049
2016-11-04 16:38:08 +01:00
Markus Frosch 37f3d1a3e8 SettingsForm(Legacy): Add activation script setting
refs #13049
2016-11-04 16:36:54 +01:00
Markus Frosch 7fc0da6e21 LegacyDeploymentApi: Add deployment Api for Icinga 1.x
refs #13049
2016-11-04 16:12:33 +01:00
Markus Frosch 1786d08321 CoreApi: Use DeploymentApiInterface
refs #13049
2016-11-04 14:13:07 +01:00
Markus Frosch 79541be050 SettingsForm(Legacy): Add configuration for a deployment path
refs #13049
2016-11-04 14:10:50 +01:00
Markus Frosch 003a100b9c IcingaConfig(Legacy): Add deployment mode for Icinga 1 config
refs #13049
2016-11-04 10:28:11 +01:00
Thomas Gelf 76ff4ebfd2 Sets: enable them 2016-11-04 09:37:12 +01:00
Thomas Gelf f27f7de842 ApiUser/Command: correct links and fix perms
fixes #13041
2016-11-03 20:07:32 +01:00
Thomas Gelf a656ca4067 IcingaService: correctly prefix host properties
fixes #13040
2016-11-03 20:02:51 +01:00
Thomas Gelf ef9ef52124 IcingaService: provide assignment properties
fixes #12731
fixes #13038
fixes #12073
2016-11-03 16:35:27 +01:00
Thomas Gelf b2c834e7a4 permissions: provide new ones and enforce them
fixes #13039
2016-11-03 16:06:35 +01:00
Thomas Gelf f286b5ad08 Revert "ServiceSet: re-enable them"
This reverts commit c073278ee3.
2016-11-03 15:04:42 +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 df299fe314 CustomVariables(Legacy): Ignore ARGn vars in toLegacyConfigString
refs #12919
2016-11-03 13:41:44 +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 7ba3c425a5 IcingaLegacyConfigHelper: Don't escape quotes in strings
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 e368b32ec6 ActionController: Add load helper for IcingaConfig 2016-11-03 13:41:44 +01:00
Markus Frosch 3f53285566 IcingaObjectMultiRelations(Legacy): add toLegacyConfigString
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch a804874a54 IcingaConfigRenderer(Legacy): Update classes for interface change
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 1592894fd7 CustomVariable*(Legacy): Add toLegacyConfigString
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch ffab574355 IcingaConfigRenderer: Add toLegacyConfigString to support legacy config
refs #12919
2016-11-03 13:41:44 +01:00
Markus Frosch 7916e0c0c6 CustomVariable: Fix getType to output a useable value 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 ffa5da86c9 IcingaCommand(Legacy): Fix type and render command_line
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 4a82bd5b90 IcingaConfig: count apply rules and show them 2016-11-03 13:35:44 +01:00
Thomas Gelf c073278ee3 ServiceSet: re-enable them 2016-11-03 12:54:15 +01:00
Thomas Gelf a540fd08aa cli/objects: provide new commands
fixes #12965
2016-11-03 12:32:51 +01:00
Thomas Gelf 8a57ca9437 ObjectsCommand: initial import 2016-11-03 12:25:48 +01:00
Thomas Gelf d006449564 inspect: enforce permissions
fixes #11763
fixes #11764
2016-11-03 11:49:04 +01:00
Markus Frosch 9305f55e92 BaseTestCase: Support more resource settings via ENV 2016-11-03 10:19:44 +01:00
Markus Frosch 10ee7901c8 Add composer support for testing 2016-11-03 10:19:25 +01:00
Thomas Gelf b996a684be tests: refactor bootstrapping, initial Gitlab-CI..
...support. Currently expects three test-runners offering Debian Jessie,
Ubuntu 16.04 LTS (Xenial) and CentOS 7. Removed all dependencies on the
Icinga Web 2 test module, installing phpunit should suffice to run tests
in a normal environment.

This is a first attempt to make things easier, more to come.
2016-11-03 02:50:39 +01:00
Thomas Gelf 6c23a02252 Test: add test suite prototype and command
refs #12905
2016-11-02 19:30:11 +01:00
Thomas Gelf 468a2719a7 DirectorActivityLog: optionally log to file/syslog
fixes #12976
2016-11-02 18:40:43 +01:00
Thomas Gelf e410beb935 CoreApi: skip incomplete stages
fixes #13028
2016-11-02 11:06:15 +01:00
Thomas Gelf ee0def7d2b Lots of files: make IDE users happy 2016-11-01 18:28:36 +01:00
Markus Frosch 1a02543321 Sync: Use PrefetchCache 2016-10-31 17:21:21 +01:00
Markus Frosch 2b227a356b IcingaObjectGroups: Respect PrefetchCache 2016-10-31 17:21:21 +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 22802114ac IcingaService: do not disable services twice
fixes #13017
2016-10-31 12:36:45 +00:00
Markus Frosch b04e5f401f Sync: Allow importing / syncing templates
Purging a used template will obviously fail.

refs #11778
2016-10-31 10:55:21 +01:00
Thomas Gelf cbf1a30a26 Kickstart: import notification commands
fixes #12028
2016-10-30 12:35:12 +00:00
Thomas Gelf f41d453448 DeployConfigForm: provide link-like form for...
...deployments

fixes #11854
2016-10-30 10:52:14 +00:00
Thomas Gelf 78903553e9 IcingaService: disable services belonging to a...
...single disabled host

fixes #12049
2016-10-29 22:06:52 +00:00
Thomas Gelf a4ef711ef0 SyncProperty: simplify code and form
fixes #12700
2016-10-29 21:25:42 +00:00
Thomas Gelf d2f359e3e3 UserGroup: do not provide assign_filter property
fixes #13007
2016-10-28 23:29:33 +00:00
Thomas Gelf 5fc9aabd3e ImportSource: fix syntax error 2016-10-27 19:47:02 +00:00
Thomas Gelf 78b01091eb DirectorObjectForm: deal with subform values 2016-10-27 19:39:40 +00:00
Thomas Gelf 5921f4773f DbObject: one more protection when looking up...
...prefetched objects by name
2016-10-27 19:34:11 +00:00
Thomas Gelf c10ad0e3a2 ImportSource: allow to transfer nested keys 2016-10-27 19:01:49 +00:00
Thomas Gelf 27634fe722 QuickBaseForm: allow for multiple module-related...
...prefix paths
2016-10-27 18:17:21 +00:00
Thomas Gelf 66e5158ccc Dashboard: replace it with a modular one
fixes #12997
2016-10-27 17:58:31 +00:00
Thomas Gelf 2b094067a5 QuickBaseForm: add missing use statement 2016-10-27 17:33:35 +00:00
Thomas Gelf e59e2d0c2c Merge remote-tracking branch 'origin/master' 2016-10-27 16:35:19 +00:00
Thomas Gelf c91084f0db ObjectsController: hide sets for now...
...didn't want to push that early :p
2016-10-27 16:33:47 +00:00
Thomas Gelf bab23c8f9b Form: split constructor to make tests easier 2016-10-27 16:31:04 +00:00
Markus Frosch a6ad95848b PlainObjectRenderer: Render assoc arrays as Hashes
Previous handling completely ignored any keys.
2016-10-27 15:54:13 +02:00
Markus Frosch 5199dc7826 Sync: Tell the user which object caused an Exception 2016-10-27 15:47:02 +02: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 f09560a89e IcingaServiceSet: simplify code 2016-10-25 23:12:23 +00:00
Thomas Gelf 7f34e4bdf3 IcingaServiceSet: improve work with imports 2016-10-25 23:12:23 +00:00
Thomas Gelf 1724a78da5 DirectorObjectForm: do not set null values 2016-10-25 23:12:23 +00:00
Thomas Gelf 354d12946a IcingaServiceSet: render custom vars 2016-10-25 23:12:23 +00:00
Thomas Gelf c41009992e IcingaObjectFieldLoader: allow to combine objects 2016-10-25 23:12:23 +00:00
Thomas Gelf f87e80989d DirectorObjectForm: persist the field loader 2016-10-25 23:12:23 +00:00
Thomas Gelf 0db659cc4e IcingaObjectFieldLoader: check for fields support 2016-10-25 23:12:23 +00:00
Thomas Gelf 00f21f838b DirectorObjectForm: simplify inhertance code 2016-10-25 23:12:23 +00:00
Thomas Gelf 6bb74966d5 CustomVariables: add _set table to delete/countAll 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 6a45d9507d IcingaServiceSet: remove legacy resolving methods
They have been used once we had no imports
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 ad7c5bc997 IcingaHost: fix tests 2016-10-25 00:30:12 +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 6e83a4fd5b IcingaObjectGroup: provide groups for assign rules 2016-10-24 21:55:02 +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 24478ede12 DataFilter: json_en/decode when passing to form 2016-10-23 03:14:52 +00:00
Thomas Gelf 88a741a8d0 IcingaService: introduce assign_filter property 2016-10-22 07:02:09 +00:00
Thomas Gelf 8f2b9fea07 DataFilter: automagic fix for not(multiple) 2016-10-22 07:02:09 +00:00
Thomas Gelf 6ed24f93da IcingaObject: render assign_filter property 2016-10-22 07:02:09 +00:00
Thomas Gelf 0a6514928a AssignRenderer: add renderEquals method...
...with (hopefully temporarily) hardcoded groups support
2016-10-22 07:02:09 +00:00
Thomas Gelf a819e7c92c DataFilter: attribs are no longer needed 2016-10-22 07:02:09 +00:00
Thomas Gelf 8ade496fdc DataFilter: refactor the whole class(es) 2016-10-22 07:02:09 +00:00
Thomas Gelf 037c588d26 FormDataFilter: change icon for expression 2016-10-22 07:02:09 +00:00
Thomas Gelf 9349ba0f2a FormDataFilter: new implementation for assignments
First prototype
2016-10-22 07:02:09 +00:00
Thomas Gelf 9ba6116091 IcingaService: support and test speciall object...
...name variants with apply for
2016-10-22 06:54:53 +00:00
Thomas Gelf 1f660b514a IcingaServiceForm: allow empty name for apply rule 2016-10-22 06:09:10 +00:00
Thomas Gelf 7c31b37f27 IcingaServiceForm: remove duplicate code
Elements in this list are optional and may be used in various forms,
so keeping this in the base class is preferrable here
2016-10-22 06:09:00 +00:00
Thomas Gelf 5b4e7509f4 Just a couple of phpcs complaints fixed 2016-10-22 06:08:52 +00:00
Thomas Gelf 0791b900f3 QuickBaseForm: allow translation tools find 'None' 2016-10-22 06:08:44 +00:00
Corentin Ardeois 3e30d34098 Use `config` variable in apply for rules
* use `config` instead of `value` in apply for rules
* update documentation

refs #11976
2016-10-22 06:07:57 +00:00
Corentin Ardeois e7bd4343b5 Add support for Apply for rules in services
Apply for rules are defined through `apply_for` property
Only Array custom variables will be eligible in apply_for dropdown.

API Example:
```bash
 ./director-curl POST director/service?name=my_service '{"apply_for": "for (checked_tcp_port in host.vars.checked_tcp_ports)" }'
 ```

 Will render as:
 ```
  apply Service "my_service" for (checked_tcp_port in host.vars.checked_tcp_ports) {
      ...
  }
  ```
Feature: https://dev.icinga.org/issues/11976

Depends-On: https://github.com/Icinga/icingaweb2-module-director/pull/20
refs #11976
2016-10-22 06:00:54 +00:00
Thomas Gelf b7eaab715b Make explicit calls to renderStringWithVariables 2016-10-22 05:48:09 +00:00
Corentin Ardeois 37c91050c7 Expressions syntax is now $var$
Instead of $$var$$.
We make sure $$var$$ is left untouched.

refs #11976
2016-10-22 00:15: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
Corentin Ardeois bcef87f4c9 Add support for expressions
Any rendered string can contain variables encapsulated with "$$" characters.

Example:
Display Name declared with `Port $$host.vars.tcp_port$$ check` will
be processed as `"Port " + host.vars.tcp_port + " check"`

API:
```bash
 ./director-curl POST director/service?name=my_service '{"display_name": "Port $$host.vars.tcp_port$$ check" }'
 ```

 Rendered config:
 ```
  apply Service "my_service" {
      import "my_template"

      display_name = "Port " + host.vars.tcp_port + " check"
  }
 ```

refs #11976
2016-10-22 00:15:09 +00:00
Thomas Gelf a9b3b2f47a IcingaObjectImports: fix compatibility issue
fixes #12951
2016-10-20 19:17:52 +00:00
Thomas Gelf b62b602f7d DirectorObjectForm: move imports below name 2016-10-20 02:22:34 +00:00
Thomas Gelf fc2890d865 IcingaObject: new helper method for single...
...resolved custom vars
2016-10-20 01:37:23 +00:00
Thomas Gelf 76936c7efb IcingaTemplateResolver: fix resolver for unstored...
...objects

refs #12938
2016-10-20 01:32:52 +00:00
Thomas Gelf d5234f723d HostController: no loop check for 'fake' services
Inherited services do not exist in the db. As many services would
carry their template's name, the fallback to a name-based loop check
would trigger an erraneous error. So we trigger no preliminary loop
check for those now.

fixes #12938
2016-10-20 01:09:34 +00:00
Thomas Gelf 8c2d5ec7f9 Data: flip field/list order, as fields are...
...more important
2016-10-17 17:24:27 +00:00
Thomas Gelf edbda2c592 IcingaObjectFieldLoader: silently ignore setValues
...when called for an object without custom var support
2016-10-17 16:57:25 +00:00
Thomas Gelf 46a5b3cb2f CubeLinks: hook into the cube module 2016-10-14 21:14:04 +00:00
Thomas Gelf b40f4a7ab7 QuickTable: fix 'return value in write contex'...
...for older PHP versions
2016-10-14 19:35:52 +00:00
Thomas Gelf 23ef9a707c MultiEdit: make it independent of an object type 2016-10-14 18:32:34 +00:00
Thomas Gelf 6a54e00402 MultiEdit: code cleanup, add custom var support
fixes #12465
fixes #12906
fixes #11614
2016-10-14 17:17:07 +00:00
Thomas Gelf 69237b8ae9 MultiEditForm: first shot, provides imports
refs #12465
2016-10-14 13:46:06 +00:00
Thomas Gelf 732ebae339 ActionController: provide a singleTab helper 2016-10-14 13:46:06 +00:00
Thomas Gelf 41c4448685 QuickTable: provide multiselect feature
refs #11614
2016-10-14 13:46:06 +00:00
Thomas Gelf 6f46e6b496 YesNo: new boolean-like form fields
fixes #12927
2016-10-14 13:39:43 +00:00
Thomas Gelf 98708e6496 Forms: better error handling
fixes #12926
2016-10-14 13:35:30 +00:00
Thomas Gelf 2df7144240 TemplateResolver: no more false alarms...
...when multiple paths lead to the same template

refs #11803
2016-10-14 11:26:41 +00:00
Thomas Gelf 558ea82203 IcingaRelatedObject: fix syntax, add comment...
...stating that this is unfinished
2016-10-14 10:40:29 +00:00
Thomas Gelf cfbf40147c IcingaObjectImports: simplify code 2016-10-14 10:33:46 +00:00
Thomas Gelf 041fd52174 FieldLoader, TemplateResolver: more cleanup
A few fixes related to modified imports for unstored objects

refs #12922
2016-10-14 09:59:08 +00:00
Thomas Gelf 98acba9fb4 IcingaTemplateResolver: more tweaking
refs #12922
2016-10-14 09:40:01 +00:00
Thomas Gelf 61f3ffff7e TemplateResolver: deal with unstored modified...
...imports property

fixes #12922
2016-10-14 09:12:05 +00:00
Thomas Gelf e04acbc55f IcingaObjectFieldLoader: do not fail on emtpy...
...parents
2016-10-14 08:33:58 +00:00
Thomas Gelf 913c2687b6 IcingaObjectFieldLoader: first implementation
Should already replace all former functionality

refs #12904
2016-10-13 21:25:03 +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
Markus Frosch f527e31b14 Merge branch 'bugfix/endpoint-remove-import-12920'
fixes #12920
2016-10-13 16:54:34 +02:00
Markus Frosch cc61831258 DirectorObjectForm: Allow form to select if imports are required
refs #12920
2016-10-13 16:37:49 +02:00
Thomas Gelf cf4dccc817 Notification: add fields support
fixes #12642
2016-10-13 14:34:25 +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 0e45429196 ObjectForm: do not allow to choose type...
...when one is already given
2016-10-13 11:55:53 +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 0a26b94e7c IcingaObjectMultiRelations: fix service relations
...for sets
2016-10-12 09:11:05 +00:00
Thomas Gelf 34ed3da3b8 IcingaObject: remove duplicated short name logic 2016-10-12 09:09:28 +00:00
Thomas Gelf cb533f5668 IcingaConfig: deploy service sets 2016-10-12 09:04:08 +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 e096ec9ec5 IcingaServiceSets: allow to set imports 2016-10-12 08:30:10 +00:00
Thomas Gelf f2f04c44e8 ServiceSet: add CLI command, fix key 2016-10-12 07:31:00 +00:00
Thomas Gelf b7018627a0 IcingaServiceSet: introduce a new object type 2016-10-12 07:19:02 +00:00
Thomas Gelf 8faa572098 PropertyModifierDnsRecords: re-order form fields 2016-10-11 16:02:50 +00:00
Thomas Gelf 785746fb26 GroupMembershipCache: fix messed up properties
fixes #12887
2016-10-11 15:26:31 +00:00
Thomas Gelf c4da25ef25 IcingaCommandArgument: render set_if without format
Icinga DSL support was introduced in 348cb1aa6 and works fine, but breaks
rendering of legacy arguments with set_if_format = NULL. This should default
to 'string', as we should IMO not force NOT NULL in the DB in this case.

refs #12153
fixes #12886
2016-10-11 09:45:11 +00:00
Thomas Gelf 380fb0afe9 GroupMembershipCache: add missing property
fixes #12884
2016-10-10 19:15:34 +00:00
Markus Frosch df36071c9c IcingaService: single objects should respect...
...their host's zone where not overriden by a service template

fixes #11988
2016-10-10 10:57:24 +00:00
Thomas Gelf 82c5b10eef Db: do not let the db adapter handle binary...
...data as this causes problems with Postgres and quoteBinary
2016-10-09 13:47:37 +00:00
Thomas Gelf 38eaf4036b IcingaHost: agent-related hint for legacy config 2016-10-09 13:27:38 +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 1bc4a397a8 CustomVariableCache: optionally use digest()...
...for PostgreSQL in case pgcrypto is installed. Also add related hint to the
installation documentation
2016-10-09 12:43:04 +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 42aef0105d DbObject: exists() should respect prefetch...
...also for negative lookups

refs #12876
2016-10-08 19:34:59 +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 081ea72497 KickstartHelper: handle renamed zones...
...when triggered multiple times
2016-10-06 16:20:25 +00:00
Thomas Gelf 2c071e215d CustomVariableNumber: tolerant float comparison 2016-10-06 16:19:08 +00:00
Thomas Gelf 749f035971 Db/IcingaObject: formatting & style 2016-10-05 18:05:59 +00:00
Thomas Gelf 70b8a9ea02 DirectorObjectForm: improve Exception error message 2016-10-05 18:03:07 +00:00
Thomas Gelf d1b7083145 IcingaObject: add helper methods for relations 2016-10-05 17:58:48 +00:00
Thomas Gelf e9a570e96d Sync: fix sync & purge for datalistEntry objects 2016-10-05 17:45:25 +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 db0662b554 PropertyModifierDnsRecords: new property modifier 2016-10-03 15:28:41 +00:00
Marc DeTrano 348cb1aa63 IcingaCommandArgument: allow expressions in set_if
fixes #12153
2016-09-23 15:18:58 +00:00
Thomas Gelf d8f02c8974 DataTypeDirectorObject: do not force 'require' 2016-09-23 14:07:33 +00:00
Thomas Gelf 542f1faf76 DataType: new DirectorObject data type
Allows one to choose from a list of objects, filling string or array
vars

fixes #11998
2016-09-23 13:30:47 +00:00
Thomas Gelf 3383b97e69 IcingaRelatedObject: new helper class 2016-09-16 21:56:35 +00:00
Thomas Gelf 42212661f2 IcingaObject: document 'supports' vars and methods 2016-09-15 18:53:09 +00:00
Thomas Gelf a17fc32b41 PropertyModifierToInt: new property modifier 2016-09-14 19:35:51 +00:00
Thomas Gelf 407a387dab DirectorDatalistEntry: add shouldBeRemoved...
...fixes sync for DatalistEntries

fixes #12715
2016-09-12 21:41:15 +00:00
Thomas Gelf 04cae6f8f8 DirectorObjectForm: fix forgotten variable 2016-09-09 21:38:49 +00:00
Thomas Gelf f52cd5ea77 DirectorDatafield: simplify usage 2016-09-09 21:32:26 +00:00
Thomas Gelf 217fb38517 IcingaObject: implement supportsAssignRules 2016-09-09 09:06:31 +00:00