Commit Graph

3215 Commits

Author SHA1 Message Date
Thomas Gelf b04f6b7e98 IcingaNotification: improve error message
One more improved exception

refs #2142
2022-11-03 00:23:50 +01:00
Thomas Gelf 63d76abf81 IcingaObject: improve error message
Complain about missing object_type, if assign-related properties cannot be
set because of that reason

refs #2142
2022-11-03 00:20:30 +01:00
Thomas Gelf 693b8fe317 Sync: fix purge for objects with uppercase chars
fixes #2627
2022-11-02 21:12:40 +01:00
Thomas Gelf e42912d3e8 BranchedObject: set id first
This has an impact on related objects, like timeperiod ranges

fixes #2525
2022-10-26 11:04:58 +02:00
Thomas Gelf ad5dfc8496 BasketSnapshot: simplify error handling
We have no IcingaObject here, they're all stdClass instances
2022-10-25 11:10:05 +02:00
Thomas Gelf 470137b5c2 Exporter: don't export UUIDs for non-Icinga objects
fixes #2644
2022-10-25 10:59:16 +02:00
Thomas Gelf 9892039b0e BasketSnapshot: show object-related details...
...in case an error occurs at encoding time

fixes #2646
2022-10-25 10:46:50 +02:00
Thomas Gelf bfda96f569 DbConnection: deprecate/replace quoteBinary()
Proxies to newer code as a fix, related calls should be substituded
in the long run

fixes #2630
2022-10-18 16:53:06 +02:00
Thomas Gelf deb5b97ea0 DbObjectStore: treat UUID result for PostgreSQL
fixes #2636
2022-10-13 10:58:32 +02:00
Thomas Gelf 91ca8065e3 Sync: fix purge and invalid sync history
fixes #2632
fixes #2627
2022-10-07 12:23:47 +02:00
Thomas Gelf 82269775f4 DbObject: improve "hasBeenModified" logic 2022-10-07 11:20:32 +02:00
Thomas Gelf 2196426ff5 IcingaObject: fix default value for preserve 2022-10-07 10:25:23 +02:00
Thomas Gelf afc7efe4d5 Sync: do not set null if overridden
refs #2623
2022-10-07 10:18:39 +02:00
Thomas Gelf 9a2c0162d2 Sync: respect null properties on merge
fixes #2623
2022-10-07 10:16:37 +02:00
Thomas Gelf 82fbd5359e DbObjectStore: sort by array index, not uuid 2022-10-07 10:12:00 +02:00
Thomas Gelf 773a135220 DbObject: grant access to default properties 2022-10-07 10:12:00 +02:00
Thomas Gelf 6f0c7aa2a3 IcingaObject: allow to replace with plain object 2022-10-07 10:12:00 +02:00
Thomas Gelf f447457c40 Sync: load object w/o branch support the old way
fixes #2618
2022-10-06 13:08:48 +02:00
Thomas Gelf 3c2815d2e9 CoreApi: fix version comparison logic
fixes #2629
2022-10-05 11:14:37 +02:00
raviks789 26e76c611e Reset Limit count and offset for `$table` in HostController::servicesAction
The limit in ObjectsTable::prepareQuery() limits the number of services shown in HostController::servicesAction.
But this limit is required for pagination in ServicesController. Hence, reset the limit when this query is used
in HostController::servicesAction().
2022-10-04 15:33:29 +02:00
Thomas Gelf 560e0e6520 CustomVariables: do not render deleted ones
fixes #2622
2022-09-30 13:47:05 +02:00
Thomas Gelf 867138abe3 AppliedServiceInfo: fetch UUID object
fixes #2615
2022-09-30 12:15:33 +02:00
Thomas Gelf b6ed832a03 AppliedServiceSetServiceInfo: provide the UUID
fixes #2619
2022-09-30 11:44:18 +02:00
Ravi Kumar Kempapura Srinivasa 2d5d0db77c DirectorJob: fix restoring from snapshot
fixes #2528
2022-09-30 11:40:02 +02:00
Thomas Gelf 54c838666c Job, Import, Sync: fix restore w/o ID 2022-09-30 11:32:16 +02:00
Thomas Gelf 60bdef6752 Sync: create objects with original key...
...and not with the lower-cased comparison key

fixes #2608
2022-09-22 17:37:26 +02:00
Thomas Gelf f2eb06ae39 BranchStore: wipe branched tables, not real ones 2022-09-21 11:51:05 +02:00
Thomas Gelf 0cb6e40681 IcingaService: improve error message 2022-09-21 11:50:26 +02:00
Thomas Gelf ebb08aceae ObjectSetTable: fix for PgSQL when not in branch 2022-09-21 11:00:07 +02:00
Johannes Meyer 3055552728 IcingaObjectQuery: Use `$connection->renderFilter` instead of `whereToSql`
`whereToSql` did support timestamp handling in comparison, though this
class couldn't have made use of it since it had to use a query which
overrides the `isTimestamp` function.
2022-09-21 09:04:29 +02:00
Daniel Patrick 04c4bd2559 IcingaCommand: Remove obsolete CLR check 2022-09-21 08:52:51 +02:00
Thomas Gelf 05de5b171b BranchMerger: log change author
fixes #2606
2022-09-21 08:50:45 +02:00
Thomas Gelf 79f8ca26ef Branch: allow access to description
fixes #2604
2022-09-21 07:51:25 +02:00
Thomas Gelf c91ff3303c ExtensibleSet: short array syntax, readability 2022-09-20 20:28:05 +02:00
Thomas Gelf 47488d138e ObjectSetTable: fix a PostgreSQL issue 2022-09-20 15:27:16 +02:00
Thomas Gelf b19dd5f62d IcingaServiceSet: use query builder to retrieve...
...services, this is required for branches
2022-09-20 12:55:55 +02:00
Thomas Gelf 59d62d0ff9 ObjectSetTable: branch support 2022-09-20 12:53:00 +02:00
Thomas Gelf a684929cf5 ObjectController: allow Service Sets in Branches 2022-09-20 12:48:26 +02:00
Thomas Gelf 6f173b8392 ObjectsController: pass branch to table 2022-09-20 12:22:05 +02:00
Thomas Gelf 131d4e27ba TableWithBranchSupport: provide setter 2022-09-20 12:20:44 +02:00
Thomas Gelf 4d2f285c01 IcingaServiceSetServiceTable: branch classes 2022-09-20 12:19:31 +02:00
Thomas Gelf 4d8e3f6db7 ServiceSetQueryBuilder: new query builder 2022-09-20 12:19:21 +02:00
Thomas Gelf 39f53b6cee ObjectController: branch hint on create 2022-09-20 12:06:52 +02:00
Thomas Gelf 2a5909917b BranchSupport, Inspection: allow Sets 2022-09-20 12:05:43 +02:00
Thomas Gelf 1fbb4d93b6 BranchedObjectHint: allow no object (create) 2022-09-20 12:03:46 +02:00
Thomas Gelf b35b6b84cc TableWithBranchSupport: do not branchify relations 2022-09-20 12:03:00 +02:00
Thomas Gelf ae0992f196 UuidLookup: host_id VS host in branch 2022-09-20 11:54:10 +02:00
Thomas Gelf 8b1513830c IcingaServiceSet: do not delete Services w/o id 2022-09-20 07:20:29 +02:00
Thomas Gelf 166b862114 PropertyModifierFromLatin1: use iconv 2022-09-19 10:09:52 +02:00
Thomas Gelf e3e92cdb3a AppliedServiceSetLoader: change method visibility
...for fetchAppliedServiceSets()
2022-09-19 07:41:44 +02:00
Thomas Gelf 410913e512 UuidLookup: fix host/set related fallback 2022-09-15 11:45:32 +02:00
Thomas Gelf 8bfbe2a80f IcingaServiceSet: friendlier error message 2022-09-15 11:44:43 +02:00
Thomas Gelf 9434cf5089 IcingaServiceSet: type hint for IDE 2022-09-15 11:44:24 +02:00
Thomas Gelf 0cf8c76617 IcingaObject: more details in the error message 2022-09-13 10:20:24 +02:00
Thomas Gelf 1df495b41e UuidLookup: fix lookup for cloned branches 2022-09-09 14:30:51 +02:00
Thomas Gelf dd85c2ee35 Sync: compare keys in a case-insensitive way
fixes #2598
2022-08-31 16:36:31 +02:00
Thomas Gelf 28c149efed IcingaServiceSetServiceTable: refactor link logic 2022-08-31 14:45:28 +02:00
Thomas Gelf d433631174 TableWithBranchSupport: new trait 2022-08-31 14:45:28 +02:00
Thomas Gelf 98cfcafdcd BranchSupport: introduce new constants 2022-08-31 14:45:28 +02:00
Thomas Gelf ae45844bac Sync: fix typo, remove useless cast 2022-08-31 14:45:28 +02:00
Thomas Gelf 956708475e BranchSupport: new helper class 2022-08-31 14:45:28 +02:00
Thomas Gelf b2afca2496 Sync: support branches 2022-08-31 14:45:28 +02:00
Thomas Gelf 1c30412abd DirectorActivityLog, others: constants, cleanup 2022-08-20 20:41:07 +02:00
Thomas Gelf 047b14ccbf Sync: preserve Host api_key in override mode
fixes #2590
2022-08-19 10:57:05 +02:00
Thomas Gelf 0cf113e0a6 ObjectCommand: simplify object creation 2022-08-03 12:20:40 +02:00
Thomas Gelf 4666497c55 ObjectCommand: refactor property preparation 2022-08-03 10:50:01 +02:00
Thomas Gelf fae9783ff9 HostServiceLoader: less logic in Exporter 2022-08-03 10:23:39 +02:00
Thomas Gelf 9015993b05 Exporter: catch improbable error condition 2022-08-03 09:10:00 +02:00
Thomas Gelf 079e6e6514 ImportExportDeniedProperties: extract logic 2022-08-03 09:01:09 +02:00
Thomas Gelf 74ea9adbf2 Exporter: better variable name 2022-08-03 08:54:15 +02:00
Thomas Gelf 5409558d3b ObjectCommand: show created object name...
...even if given via JSON only

fixes #2576
2022-08-02 11:59:21 +02:00
Thomas Gelf 05362a093d IcingaObjectHandler: create object before storing
refs #2576
2022-08-02 11:55:26 +02:00
Thomas Gelf 5686629e27 Exporter: export services, not tables 2022-07-28 15:14:03 +02:00
Thomas Gelf 37954e0aa6 BranchActivityTable: show object name 2022-07-22 14:32:39 +02:00
Thomas Gelf fca804e74e ObjectCommand: --all-services
fixes #2571
2022-07-21 07:49:12 +02:00
Thomas Gelf 431d0cfe75 ObjectCommand: add --resolve-services 2022-07-20 16:42:26 +02:00
Thomas Gelf f1df0b6c7a RequestHandler: optionally return stack traces
fixes #2570
2022-07-20 12:03:32 +02:00
Thomas Gelf b444ec0101 IcingaObjectHandler: allowOverrides for REST API
fixes #2569
2022-07-20 11:58:17 +02:00
Thomas Gelf 13c09855fa ObjectController: refactor initalization 2022-07-20 09:59:42 +02:00
Thomas Gelf 34d5e445b2 doc/REST-API: document new parameters 2022-07-20 09:45:26 +02:00
Thomas Gelf 0d68ee0fda PropertyMangler: new static helper 2022-07-20 09:04:38 +02:00
Thomas Gelf 1f3b039395 OverrideHelper: centralize applying overrides 2022-07-20 08:52:10 +02:00
Thomas Gelf 6d0b9310c3 Object/ServiceCommand: some more refactoring 2022-07-20 08:48:09 +02:00
Thomas Gelf fc5d3de568 PropertyModifierReplaceNull: code style fix 2022-07-20 08:38:45 +02:00
Thomas Gelf 706a9b1fc1 ObjectCommand: document --with-services
refs #2565
2022-07-20 08:29:42 +02:00
Thomas Gelf ab4b5807be RestApi: introduce RestApiParams, use Exporter
fixes #2568
2022-07-20 08:21:34 +02:00
Thomas Gelf cb355f9b90 Exporter: support property filters
refs #2568
2022-07-20 08:13:25 +02:00
Thomas Gelf 164d1f5874 Command: fail() should show a readable message
fixes #2567
2022-07-20 06:44:41 +02:00
Thomas Gelf 0a25e256d1 ObjectCommand: formattingtt 2022-07-20 06:38:13 +02:00
Thomas Gelf 9775922975 ObjectCommand: support JSON via STDIN
fixes #1570
2022-07-20 06:37:06 +02:00
Thomas Gelf 2821b0721d IcingaObjectsHandler: send error message, not trace 2022-07-19 12:26:51 +02:00
Thomas Gelf cb58573558 SimpleNote: do not fail on invalid content 2022-07-18 12:14:20 +02:00
Thomas Gelf c586b2c194 ObjectCommand, Exporter: hosts with services
fixes #2565
2022-07-18 11:35:46 +02:00
Thomas Gelf 05d7e137c2 IcingaArguments: clarify reason for missing DSL...
...in External Commands imported via Icinga 2 API

fixes #2557
2022-07-18 10:08:51 +02:00
Thomas Gelf fe3d5c7076 ObjectsController: fix 8.1 glitch for JSON format 2022-07-15 22:05:56 +02:00
Thomas Gelf f24f8eb287 IcingaObject: more details in comment 2022-07-12 11:28:54 +02:00
Thomas Gelf 050553164d ServiceCommand: allow magic overrides
fixes #2560
2022-07-12 11:27:42 +02:00
Thomas Gelf 922b19397c IcingaObject: resolve related properties when...
...telling an object to be "unmodified"

fixes #2559
2022-07-12 10:02:58 +02:00
Thomas Gelf d13919681a IcingaEndpoint: give meaningful error...
...when trying to get an ApiUser where there is no such
2022-07-12 10:00:58 +02:00
Thomas Gelf b4c05738ae ServiceFinder: optional Auth
Hint: not required on CLI
2022-07-11 10:06:48 +02:00
Thomas Gelf 4a4e540700 ServiceInfo: ship UUID 2022-07-11 10:05:22 +02:00
Thomas Gelf 6d5c48125e Command: remove custom JSON logic 2022-07-11 10:03:23 +02:00
Thomas Gelf 0796635132 DbHelpers, Connection: improve escapeBinary logic
hex-style for MySQL too, support array values
2022-07-01 08:39:12 +02:00
Thomas Gelf 14317a9c20 css, QuickForm: style director-form only 2022-07-01 08:38:33 +02:00
Thomas Gelf 56f81b91bb Exporter: centralize export logic
fixes #2549
2022-06-24 12:52:35 +02:00
Thomas Gelf ef80b6b8bc DictionaryToRow: new property modifier
fixes #2555
2022-06-24 12:26:01 +02:00
Thomas Gelf 9a0279b111 UuidLookup: do not enforce service objects
fixes #2487
fixes #2554
2022-06-24 10:37:09 +02:00
Ibrahim Khalifa 4b229c122c Handle cases when gipfl/linux-health returns false instead of memory usage. 2022-06-24 08:55:09 +02:00
Thomas Gelf 75b73604a8 SyncRule: remove unused property 2022-06-20 09:59:01 +02:00
Thomas Gelf 31c06d8156 ObjectCommand: use real/file-based renderer
fixes #2550
fixes #2204
2022-06-20 09:57:07 +02:00
raviks789 9e8142b79a Avoid passing `null` to `strlen` in SyncJob::addSettingsFormFields() 2022-06-08 16:15:42 +02:00
Patrick Dolinic 4692b28dbd PropertyModifier: Replace Null with String 2022-04-20 14:46:37 +02:00
raviks789 67eb4c1e90 Prevent inserting blank entries for extensible data list. 2022-04-20 08:26:46 +02:00
Thomas Gelf 0539819d4c ConditionalDeployment, ConfigCommand: wording
fixes #2523
2022-04-13 14:07:24 +02:00
Thomas Gelf 11f621df30 IcingaServiceSet: do not eport the UUID for now
fixes #2488
2022-04-05 08:48:42 +02:00
raviks789 e134f80093 Cleanup IcingaDbCubeLinks with getObjectsFilter provided by IcingaDbCube. 2022-03-28 15:39:49 +02:00
moreamazingnick 83cc12944d
DirectorActivityLog: fix empty activity log exception
fixes #2505: empty activity log causes exception
fixes #2506
2022-03-28 14:52:46 +02:00
Thomas Gelf 9afa3313ab cli: implement deployment grace period and...
...refactor/restructure related code to achieve the same behavior on CLI and
via automated job

fixes #2499
2022-03-22 10:46:36 +01:00
raviks789 71f3654c0b Fix sync rule restore from snapshot on name change
On name change new Sync rule would be created, hence we do not have to preserve the Sync rule Ids in SyncRule::import() method.
2022-03-17 14:55:35 +01:00
Thomas Gelf ccd6f4266a DbObject: exists() must check for UUID column
fixes #2475
2022-02-24 16:38:48 +01:00
Thomas Gelf 0806749055 de_DE: refresh translation 2022-02-17 16:36:49 +01:00
Thomas Gelf 0f1ef78815 IcingaArguments: remove superfluous semicolon 2022-02-17 15:37:44 +01:00
Thomas Gelf 984e931954 BasketSnapshot: support datafield categories
fixes #2256
2022-02-16 23:14:38 +01:00
Thomas Gelf 1cfc0c427c ActivityLogInfo: show remarks
refs #2471
2022-02-15 21:13:24 +01:00
Thomas Gelf aeef51ffa6 IcingaArguments: allow to restore set_if_format
fixes #2291
2022-02-09 21:59:53 +01:00
Thomas Gelf ecf7bce482 ActivityLogTable: use more space, hover texts 2022-02-09 15:43:09 +01:00
raviks789 4f38557374 Prevent deletion of data lists that are in use.
Deletion of data lists which are used in icinga objects (through custom variables) or in sync rules is prevented.
2022-02-09 15:17:47 +01:00
Thomas Gelf 95730fb0aa BranchActivity: require connection when creating...
...new objects
2022-02-09 14:46:42 +01:00
Thomas Gelf 767329443b BranchMerger: make comment optional 2022-02-08 08:59:23 +01:00
Thomas Gelf bb567946d2 BranchMerger: no remark with empty comment 2022-02-08 08:58:34 +01:00
Thomas Gelf 8bcc20e004 ActivityLogTable: support remarks
fixes #2471
2022-02-08 08:58:34 +01:00
Thomas Gelf 9611381956 BranchMerger: trigger activity log entry when...
...deleting an object
2022-02-08 08:58:34 +01:00
Lucas Bickel 3590f725eb fix: use bell icon for notifications 2022-02-06 19:34:03 +01:00
Thomas Gelf 43dddc58aa ObjectsController: allow uuid for MultiSelect
fixes #2466
2022-02-06 19:13:47 +01:00
Thomas Gelf 9a2d165583 BranchedObjectHint: 404 when deleted 2022-02-06 19:09:30 +01:00
Thomas Gelf 30f0d85158 UuidLookup: allow multi-key objects
Hint: we do not (yet) support templates in branches, but we need to deal
with related lookups
2022-02-06 13:19:17 +01:00
Thomas Gelf a05300dc24 DbObject: trigger 404 where we get no UUID 2022-02-06 13:18:58 +01:00
Thomas Gelf d615ce932c DirectorObjectForm: do not return void 2022-02-06 11:48:03 +01:00
Thomas Gelf 6db30263d0 DirectorObjectForm: allow host (w/o id) in main 2022-02-06 11:47:41 +01:00
Thomas Gelf 2845be7542 DirectorObjectForm: remove unused method 2022-02-06 11:47:23 +01:00
Thomas Gelf 818ee7a01a DirectorObjectForm: don't set vals twice on create 2022-02-06 11:46:22 +01:00
Thomas Gelf b7aa578dee IcingaHost: filter internal properties from enum 2022-02-06 11:41:20 +01:00
Thomas Gelf eddaf7c9a4 IcingaObject: some cleanup 2022-02-06 11:39:03 +01:00
Thomas Gelf 891b6112aa IcingaObject: ignore uuid when resolving properties 2022-02-06 11:37:01 +01:00
Thomas Gelf 324cc9ed5b IcingaObject: do not unset unresolved related...
...properties, as long as they do not give us an object with an ID.
This is the case when adding new services to hosts which exist in a
branch only, and will no longer be a problem once our internal caches
work with UUIDs
2022-02-06 11:35:00 +01:00
raviks789 b04fe28932 Delete newly added Services in Service Set when restoring it from snapshot
The Services which were added into the Service Set after the snapshot was created
must be deleted when the Service Set is being restored from the snapshot.
2022-01-24 15:26:48 +01:00
Johannes Meyer 420dfcbdbf Avoid passing non-string args to `ctype_*()` functions 2022-01-14 11:31:55 +01:00
Thomas Gelf 2712275c45 DeploymentStatus: fix method signature, use getter 2022-01-10 18:44:45 +01:00
Thomas Gelf 31a66b6619 DeploymentStatus: little fix, formatting 2022-01-10 18:20:08 +01:00
Thomas Gelf 251cd309be DeploymentStatus: fix CLI command for PostgreSQL
fixes #2260
2022-01-10 18:18:09 +01:00