Commit Graph

2665 Commits

Author SHA1 Message Date
Thomas Gelf 01f2666ff2 IcingaDependency: drop parent_service_var 2019-07-09 10:36:57 +02:00
Thomas Gelf bb9105e370 IcingaDependency: allow for arrays 2019-07-09 10:36:57 +02:00
Thomas Gelf 05d5152e6f IcingaDependency: cleanup, shorten custom logic 2019-07-09 10:36:57 +02:00
Thomas Gelf adace00df4 Dependency: prepare var rendering, cleanup 2019-07-09 10:36:57 +02:00
Thomas Gelf 8f4a93dd08 IcingaDependency: properties for changed schema 2019-07-09 10:36:57 +02:00
Thomas Gelf 4413a44d65 IcingaServiceForm: allow to set check_command...
...for Service Apply rules, given that admin permissions have been granted.
This also fixes the problem that inherited command names haven't been shown.

fixes #1899
2019-07-08 16:27:44 +02:00
Thomas Gelf 4597ce2836 Text: new form element type, catch type issues
fixes #1200
2019-07-08 15:01:53 +02:00
Markus Frosch e101416b5d ExtensibleSet: Migrate also integers to an array 2019-07-04 13:26:44 +02:00
Bernhard Friedreich 8f871f4afa Fixed phpcs warning else if to elseif 2019-07-04 12:54:48 +02:00
Bernhard Friedreich 03519c25e8 Add action bar with download as json option for service apply rules and templates
related to issue #1811
2019-07-04 12:54:48 +02:00
Gino 64d0d8b618 Fix ambiguous host_id field 2019-07-04 12:16:01 +02:00
Eric Lippmann d9b75c4a86 pgsql: Fix unexpected removal of current deployment
The director automatically removes uncollected deployments if they're
older than the running one. Deployments are uncollected if Icinga 2 did
not write a status file or startup log (yet). This happens when you
manage to ship a deployment while Icinga 2 is already preparing to
restart with a deployed configuration. It also removes deployments
which were forgotten by Icinga 2 because of bugs in previous versions.

If there are uncollected deployments, the check whether they are older
than the running one is based on string comparison of the deployments'
start time. While this works for MySQL and MariaDB where the output of
timestamps is always ISO, it may fail for PostgreSQL because there the
output format is configurable. If the output format is set to report
the day first, the string comparison "fails" and removes every first
deployment of a month:

Deployment timestamp: 01-JUN-19 00:03:37 -07:00
Running timestamp: 31-MAY-19 23:54:53 -07:00

The string comparison now reports the deployment as older than the
running one and removes it.

The fix is as easy as to use timestamps for the comparison.
2019-07-01 15:04:19 +02:00
Thomas Gelf f9ee098f06 ArrayCustomVariablesFilter: accept lists with...
..."Array" target data type

fixes #1241
2019-06-11 11:39:54 +02:00
Thomas Gelf 77bc311c42 DataTypeDatalist: allow strict list item to be...
...NULL at the beginning - or with wrong values. Otherwise the first one
would be chosen
2019-05-29 08:53:49 +02:00
Thomas Gelf 0d405cba98 SyncruleCommand: show number of expected changes
Sample output when there are changes:

    icingaweb2@web:~$ icingacli director syncrule check --id 36
    There are pending changes for this Sync Rule. You should  trigger a new Sync Run.
    Expected modifications: 2x create, 0x modify, 0x delete
    icingaweb2@web:~$ echo $?
    1

...when there are no changes:

    icingaweb2@web:~$ icingacli director syncrule check --id 34
    This Sync Rule is in sync
    icingaweb2@web:~$ echo $?
    0

...and when something failes:

    icingaweb2@web:~$ icingacli director syncrule check --id 32
    This Sync Rule failed: No data has been imported for "Benutzergruppen aus Nagios" yet
    icingaweb2@web:~$ echo $?
    2

fixes #1849
2019-05-27 17:46:43 +02:00
Thomas Gelf cc15cae34a Basket: allow to add external commands and...
...command templates
2019-05-27 17:27:18 +02:00
Thomas Gelf 5839945101 Basket: fix nesting error when modifying baskets 2019-05-27 13:40:27 +02:00
Thomas Gelf 6bf1c30c2f Sync: use string keys for object_name 2019-05-22 17:06:24 +02:00
Markus Frosch 4b68d68554 ActivityLogInfo: Fix loading newProperties for deleted objects
refs #1816
2019-05-21 12:32:46 +02:00
Thomas Gelf 3e80115692 DataTypeDatalist: fix typo 2019-05-20 11:06:08 +02:00
Thomas Gelf a80bdd833e ExtensibleSet: fix exception parameters 2019-05-20 11:04:56 +02:00
Thomas Gelf a14ab4d8a1 ExtensibleSet: do not override validators 2019-05-06 21:25:44 +02:00
Thomas Gelf db8895ae10 DataTypeDatalist: allow to customize behavior
Available options:
* strict: select box
* suggest_strict: auto-completion, allow only list values
* suggest_optional: Allow for values not on the list
* suggest_extend: Extend the list with new values

fixes #1846
2019-05-06 21:25:44 +02:00
Bernhard Friedreich 7177d489ec Fix wrong links for hosts/apply rules based on <something> (#1864) 2019-05-06 21:24:09 +02:00
Thomas Gelf d68c0a0c03 ApplyRulesTable: fix non-service tables...
...as they have no apply_for column

fixes #1866
2019-05-06 21:22:12 +02:00
Bernhard Friedreich 08266a4b92 Sort list of applied services by object_name (#1862) 2019-05-06 19:43:26 +02:00
Thomas Gelf 644853f7a0
Merge pull request #1860 from Icinga/feature/apply-exists
Implement AssignFilterHelper to improve apply/assign matching
2019-05-06 17:07:36 +02:00
Markus Frosch 767296ce6a Display apply_for in apply listings 2019-05-06 14:38:17 +02:00
Markus Frosch 83245f2dd4 IcingaHostAppliedServicesTable: Fix assign rendering 2019-05-06 14:33:07 +02:00
Markus Frosch 4037e22709 Implement AssignFilterHelper to improve apply/assign matching
* is set / is not set - fixes #1483 fixes #1387
* case-insensitive matching when using wildcards '*'
  like match() in Icinga 2
2019-05-06 14:19:29 +02:00
Markus Frosch 92f2f9f44d IcingaConfig: Deprecate magic_apply_for as config feature
fixes #1850
2019-04-30 12:41:53 +02:00
Markus Frosch 7153d8059b
Ensure MySQL data supports timezones (#1840)
Ensure MySQL data supports timezones
2019-04-24 15:18:52 +02:00
Markus Frosch 72d9d47a1b Migrations: Disable max_execution_time on apply 2019-04-24 15:04:08 +02:00
Thomas Gelf 099c53a008
Merge pull request #1843 from gianlucapiccolo/deploy-hook
Add deployment hooks
2019-04-24 13:38:43 +02:00
Gianluca Piccolo 4a4808eea5 Add deployment hooks 2019-04-24 12:17:31 +02:00
Thomas Gelf 6bcb4a461e CoreApi: fix method call 2019-04-24 11:21:16 +02:00
Thomas Gelf da909907fd IcingaMultiEditForm: use IcingaObjectFormHook 2019-04-24 11:20:40 +02:00
Thomas Gelf cdb500134d IcingaObjectFormHook: new generic hook 2019-04-23 18:16:35 +02:00
Thomas Gelf db6deb2a72 QuickForm: allow to call callbacks on success 2019-04-18 17:29:46 +02:00
Markus Frosch a30a28a7a1 Sync: Purge TemplateRepository cache before sync 2019-04-17 10:47:43 +02:00
Markus Frosch 6d3702a893 PrefetchCache: Purge any object cache on forget or initialize 2019-04-17 10:47:16 +02:00
Markus Frosch ef41022a73 IcingaArguments: Mark arguments for removal when setting empty
Without the fix arguments will remain untouched in DB, but appear to be removed in activity log.

fixes #1829
2019-04-15 16:35:40 +02:00
Thomas Gelf 904ec7c435 ScheduledDowntimes: Hosts with Services, optional
schema, form, rendering

fixes #1831
2019-04-12 12:12:32 +02:00
Thomas Gelf 70618169f1 ObjectsTabs: fix tabs for Choices 2019-04-12 11:58:09 +02:00
Thomas Gelf 91fc186077 ScheduledDowntimes: remove templates for now 2019-04-11 11:17:58 +02:00
Thomas Gelf 8106a6ab6e ScheduledDowntime, Form, activity: tweak links 2019-04-11 08:58:19 +02:00
Thomas Gelf 9a21ace300 IcingaObject: scheduled downtime awareness
This is not optimal, but that's how it works right now
2019-04-11 02:53:31 +02:00
Thomas Gelf 54b62c7179 ApplRulesTable: allowto link with names 2019-04-11 02:53:31 +02:00
Thomas Gelf 5a36735400 ObjectsController: allow to override ApplyRulesTbl 2019-04-11 02:53:31 +02:00
Thomas Gelf 3ac99d6be3 IcingaScheduledDowntime: fix rendering 2019-04-11 02:53:10 +02:00
Thomas Gelf 0178bb4718 IcingaScheduledDowntimeRangeTable: introduce, use 2019-04-11 02:53:10 +02:00
Thomas Gelf cb3d13ba3b IcingaObjectFilterHelper: clean up exceptions 2019-04-11 02:53:10 +02:00
Thomas Gelf 90c5a007da IcingaConfig: deploy scheduled downtimes 2019-04-11 02:53:10 +02:00
Thomas Gelf b8f0237708 IcingaScheduledDowntimeRanges: fix property name 2019-04-11 02:53:10 +02:00
Thomas Gelf 9d17984750 QuickForm: get rid of ProgrammingError 2019-04-11 02:34:14 +02:00
Thomas Gelf 12c74df38c DirectorObjectForm: do not require imports...
...for scheduled downtimes
2019-04-11 02:34:14 +02:00
Thomas Gelf b1bf17569b IcingaScheduledDowntime: changdefault zone 2019-04-11 02:34:14 +02:00
Thomas Gelf e7fc4d3009 IcingaScheduledDowntime: render object header 2019-04-11 02:34:14 +02:00
Thomas Gelf 6f790dd118 IcingaScheduledDowntimeForm: assignment elements 2019-04-11 02:34:14 +02:00
Thomas Gelf c72b51c538 ScheduledDowntimes: a bunch of url-related changes 2019-04-11 02:34:14 +02:00
Thomas Gelf 0c2cb9e484 ScheduledDowntimes: controllers, first form 2019-04-11 02:34:14 +02:00
Thomas Gelf 34cb7524bc Dashboard: add scheduled downtimes 2019-04-11 02:34:14 +02:00
Thomas Gelf 219958d93f IcingaScheduledDowntime: cleanup, modernize 2019-04-11 02:34:14 +02:00
Thomas Gelf 2615446572 ScheduledDowntime: initial implementation
refs #347
2019-04-11 02:34:14 +02:00
Markus Frosch fb421d3756
Merge pull request #1816 from Icinga/feature/activity-log
Improve ActivityLog for services and servicesets
2019-04-10 13:52:38 +02:00
Markus Frosch 6d4475d89a ActivityLogInfo: Display extra info when objects are related
* Service to Host or ServiceSet
* Set to Host
2019-04-10 13:24:09 +02:00
Markus Frosch 1e5f6b4f76 IcingaServiceSet: Refactor config rendering for sets
* A header is now always rendered and includes assign and description
* Diff is now visible for sets
2019-04-10 13:24:04 +02:00
Markus Frosch db00f1bfc4 ObjectController: Use objects table name to search history
This was mainly a problem for IcingaServiceSet and others that may have
a capital letter where the table name is split by `_`
2019-04-10 10:39:05 +02:00
Markus Frosch cd9d93de3e ActivityLog: Show proper diffs for service of sets
fixes #1287
2019-04-10 10:35:34 +02:00
Markus Frosch c5a79c6e88 ImportSourceHookTable: Apply modifiers when fetching data
This will make sure applying modifiers before initializing the
ArrayDatasource.

Before this change counting and pagination was broken with Black and
Whitelist.
2019-04-09 21:31:40 +02:00
Thomas Gelf ad9b624e92 ImportSourceRestApi: allow to override url 2019-04-05 08:14:58 +02:00
Thomas Gelf ed352ed8cc ImportSourceRestApi: respect SSL + Proxy settings 2019-04-04 15:18:59 +02:00
Thomas Gelf ba3ce7cd17 ImportSourceRestApi: new generic Import Source
fixes #1818
2019-04-04 13:22:39 +02:00
Thomas Gelf 8c04de0a14 ImportsourceHookTable: show malformed data...
...plus some namespacing/cleanup
2019-04-04 13:22:39 +02:00
Markus Frosch 7b9e9f3a2f ActivityLog: Link back to the correct frontend for service and serviceset
fixes #1377
2019-03-28 18:21:38 +01:00
Markus Frosch 6c00d1735d IcingaArguments: Import Icinga DSL in arguments when available from baskets
Icinga 2 will still not dump this, but in Director Baskets it is included.
2019-03-28 11:59:32 +01:00
Markus Frosch 1713dee1c1 IcingaServiceSet: Delete host sets when deleting a set
This allows service sets to be deleted, including their children sets that
are assigned to hosts.

The UI forbids deleting those sets, but we can use it like this for CLI
and purging during sync.
2019-03-26 12:39:06 +01:00
Markus Frosch 2be27ddf3d IcingaObjectInspection: Show flat commands run by the core 2019-03-26 12:15:30 +01:00
Markus Frosch a6e32d763f ObjectPreview: Avoid linking a flat command attribute inside a command 2019-03-26 12:02:55 +01:00
Markus Frosch 6a79436af3 IcingaCommand: Allow command to be rendered as string
Icinga 2 allows this from the beginning.
2019-03-26 12:02:35 +01:00
Thomas Gelf 2aea3ad966 ImportSource: use sprintf() for InvalidArgumentEx
fixes #1810
2019-03-25 08:33:41 +01:00
Markus Frosch f60cb9a515 ConfigHelper: Ensure empty strings are written out quoted
In renderStringWithVariables()
2019-03-21 13:18:22 +01:00
Markus Frosch b3bd671d90 ObjectController: Fix phpcs lint 2019-03-19 15:43:20 +01:00
Markus Frosch de8654fc74 ObjectController: Fix back link for clone action with services 2019-03-19 15:29:08 +01:00
Markus Frosch 43e11879f7 ShowConfigFile: Fix object type being changed in output
fixes #1799
2019-03-08 14:44:44 +01:00
Markus Frosch b8e00e9b8c legacy: Ignore hosts that are disabled or blacklisted properly 2019-03-06 14:58:56 +01:00
Thomas Gelf 429be2dd76 IcingaServiceSet: fix rendering of Sets attached..
...to single Hosts

fixes #1789
2019-02-26 15:03:41 +01:00
Thomas Gelf 89d4af564e IcingaCommandArgument: align toPlainObject method 2019-02-15 01:36:33 +01:00
Thomas Gelf 8046510b1f ServiceapplyrulesController and related changes
fixes #1755
2019-02-15 01:29:43 +01:00
Thomas Gelf 85ed54f932 IcingaServiceSet: skip Service on single host...
...when blacklisted

fixes #1616
2019-02-15 00:48:05 +01:00
Thomas Gelf 7da91d747f IcingaService: blacklisting on Host Templates...
...is now supported

fixes #1707
2019-02-15 00:08:23 +01:00
Thomas Gelf 62c020171a IcingaCommand: import/export with fields
fixes #1747
2019-02-14 22:55:24 +01:00
Thomas Gelf 738e4eeaf1 IcingaTimePeriod: support Basket (ExportInterface)
fixes #1735
2019-02-14 22:42:21 +01:00
Thomas Gelf e961f0eb2a BasketUpload: ignore Datafields, they get special
...treatment
2019-02-14 21:57:10 +01:00
Thomas Gelf 640da36c62 IcingaDependency: allow for basket snapshots
fixes #1739
2019-02-14 21:54:11 +01:00
Thomas Gelf bd16756913 TemplateTree: new loop detection
fixes #1631
2019-02-13 21:43:37 +01:00
Thomas Gelf d35ec0fee6 Tables, Redirector: add highlight for RO users
...and refactor some parts of the code

fixes #1785
2019-02-13 11:41:26 +01:00
Thomas Gelf 44e9ec2867 ProvidedHook/Monitoring: check permissions
fixes #1784
2019-02-13 10:22:40 +01:00
Thomas Gelf af2e86d8b8 host/findservice: new route to readonly view 2019-02-10 11:15:05 +01:00
Thomas Gelf 90b31fc6ca BasketSnapshot: fix upload issue
fixes #1782
2019-02-12 11:28:28 +01:00