Commit Graph

3522 Commits

Author SHA1 Message Date
Matthias Jentsch ef2f332869 Do not refresh a container when form input was changed or a form element is focused
Listen for changes in form elements and abort all reloads that contain a form with
at least one changed form element. Do not refresh containers that contain a focused form
element, except of elements with autofocus, to preserve form elements with a dropdown.
Only focus autofocus elements when there is currently no other selection.

refs #7146
refs #5537
fixes #7162
2014-09-19 15:48:44 +02:00
Eric Lippmann 2dd81d12ba monitoring: Add `DataView::count()' 2014-09-19 15:42:13 +02:00
Eric Lippmann 264d818133 Do not save config references in the `ActionController'
This is redundant because our `Config' class already caches loaded configs.
2014-09-19 14:44:21 +02:00
Eric Lippmann 119e23e79e Make `InlinePie's setters fluent 2014-09-19 14:43:25 +02:00
Eric Lippmann 27650be481 monitoring/commands: Add missing `ListController' change from the last commit
refs #6593
2014-09-19 14:41:51 +02:00
Eric Lippmann 274f2e7410 monitoring/commands: Fix remove commands in the list comments and list downtimes views
refs #6593
2014-09-19 14:34:42 +02:00
Eric Lippmann 90dbcdbbfb The stupid `DbQuery::isTimestamp()' hack must return false
This a fix for modules using our query / filter combination since `return $this;' renders all columns as timestamps.
2014-09-19 14:29:29 +02:00
Eric Lippmann 4b7096bbbf monitoring: Support host and service filters for downtimes
refs #7278
2014-09-19 14:28:23 +02:00
Eric Lippmann bea110d0c7 Fix `Form::isSubmitted()' for dynamic submit labels 2014-09-19 14:27:04 +02:00
Eric Lippmann 72a9a53201 monitoring/commands: Use translate plurar in the object command forms
refs #6593
2014-09-19 14:25:49 +02:00
Eric Lippmann 5b5f553d0d form: Fix dynamic submit label retrieval 2014-09-19 13:39:38 +02:00
Eric Lippmann c13823d406 bootstrap: Fix error reporting level not including E_STRICT 2014-09-19 13:19:24 +02:00
Eric Lippmann c51b05296e Merge branch 'master' into bugfix/commands-6593 2014-09-19 13:18:47 +02:00
Eric Lippmann 3c9859a0f1 Call `Form::getSubmitLabal()' in `Form::addSubmitButton()'
This allows us to dynamically define submit labels in form subclasses.
2014-09-19 13:00:15 +02:00
Eric Lippmann 5ba96c32f9 `Form::setDefaults()' fix strict standards violation
Declaration of Icinga\Web\Form::setDefaults() should be compatible with that of Zend_Form::setDefaults().
2014-09-19 12:59:01 +02:00
Eric Lippmann 7eb51f6367 form/csrf: Set the csrf element decorators in the element not in the form 2014-09-19 12:57:53 +02:00
Eric Lippmann f1d3b72f05 autologin: Fix externally-authenticated users still being authenticated after external authentication is disabled
The if condition for revoking authentication if the username changed relied on having the `$_SERVER' variable set which was used for authentication.
Authentication is now revoked if the username changed or external authentication is no longer in effect.

refs #6462
2014-09-18 15:20:46 +02:00
Eric Lippmann 854e284d42 autologin: Don't use `count()' for is empty checks
Using `count()' in favor of `empty()' for empty checks on arrays is bad habit.
While there's literally no performance gain in the "fixed" scenario, there's one on large arrays
and thus should be avoided everywhere.

refs #6462
2014-09-18 15:18:01 +02:00
Eric Lippmann 794910256a Use `User::can()' in `hasPermission()' of the authentication manager 2014-09-18 14:57:24 +02:00
Eric Lippmann af58732545 Introduce `User::can()' for checking whether a user has a given permission
The authentication manager already has the `hasPermission()' method but it lacks wildcard support
and uses stupid looping. Implementing this method on the user further saves a call to `User::getPermissions()'.
2014-09-18 14:37:18 +02:00
Eric Lippmann d10afa1f9b Remove the command pipe tests 2014-09-17 12:59:45 +02:00
Eric Lippmann f640874865 monitoring: Fix DateTimePicker test 2014-09-17 12:40:41 +02:00
Eric Lippmann 8afdc3db1a monitoring: Replace show partials calls to getHost() and getService() with getName() 2014-09-17 09:48:30 +02:00
Eric Lippmann 5cdcf36243 monitoring: Add HostController's show action view script 2014-09-17 09:46:42 +02:00
Eric Lippmann 71ffd0ed74 monitoring/commands: Add schedule host check command form
refs #6593
2014-09-16 18:48:36 +02:00
Eric Lippmann 4d8b6dddf1 monitoring/commands: Add schedule host downtime command form
refs #6593
2014-09-16 18:48:07 +02:00
Eric Lippmann a2a645892d monitoring: Add `HostController' 2014-09-16 18:46:58 +02:00
Eric Lippmann 0084fed2c3 monitoring/`ServiceController': Extend `MonitoredObjectController' 2014-09-16 18:46:27 +02:00
Eric Lippmann 05776651b4 modules/commands: Fix `IcingaCommandFileCommandRenderer's `getHost()' and `getService()' calls
refs #6593
2014-09-16 18:45:31 +02:00
Eric Lippmann cc2d06e582 monitoring/`Service': Add `getStateText()', let `getHost()' return the host object
refs #6593
2014-09-16 18:44:44 +02:00
Eric Lippmann d091e2150c Fix `ActionController::prepareInit()' php doc 2014-09-16 18:43:14 +02:00
Eric Lippmann 88b3b5d690 monitoring/`Host': Add `fetchServices', `fetchStats' and `getStateText' 2014-09-16 18:39:13 +02:00
Eric Lippmann c04768ee8f monitoring/`MonitoredObject': Use `host_name' and `service_description' for filtering 2014-09-16 18:38:03 +02:00
Eric Lippmann 44c4ec751d Deprecate monitoring module related methods in the `Util' view helper 2014-09-16 18:33:28 +02:00
Eric Lippmann 0a81aeefa2 monitoring: Deprecate `MonitoringState' view helper 2014-09-16 18:21:41 +02:00
Eric Lippmann 92d855e035 monitoring/lib: Add `MonitoredObjectController'
The `MonitoredObjectController' should be the base class for the host and service controller.
2014-09-16 17:29:29 +02:00
Eric Lippmann 0e6e37199a monitoring/commands: Add 'command-form' partial
refs #6593
2014-09-16 17:28:00 +02:00
Alexander Fuhr 18aad562dd Merge branch 'feature/translation-plurals-6982'
resolves #6982
2014-09-16 16:31:14 +02:00
Alexander Fuhr b8d2429845 Update module/translation documentation
refs #6982
2014-09-16 16:26:09 +02:00
Alexander Fuhr 0be8b97e88 Extend TranslatorTest with new tests
refs #6982
2014-09-16 16:14:07 +02:00
Alexander Fuhr b38ef9c0bd Implement plural and context based translation functionality
refs #6982
2014-09-16 15:19:23 +02:00
Eric Lippmann c21d7d1fdd lib: Remove form element `Note'
Zend already provides this.
2014-09-16 09:54:23 +02:00
Eric Lippmann 5c647719e4 lib/ModuleActionController: Fix stupid code 2014-09-16 09:29:03 +02:00
Eric Lippmann f8edb4f220 lib: Add method `ActionController::prepareInit()'
As it should not be required for controllers to call the parent's init() method, base controllers should use
prepareInit() in order to prepare the controller initialization.
2014-09-16 09:28:10 +02:00
Alexander Fuhr e2b5e05f21 Implement plural translation (testing) 2014-09-15 14:11:42 +02:00
Eric Lippmann 8bf66425d1 Merge branch 'master' into bugfix/commands-6593 2014-09-15 09:27:56 +02:00
Eric Lippmann 9e0d6657b7 Merge branch 'bugfix/rebuild-form-builder-5525' into bugfix/commands-6593
Conflicts:
	application/forms/Preference/GeneralForm.php
2014-09-15 09:27:07 +02:00
Alexander Fuhr f48094f01a Merge branch 'master' into feature/translation-plurals-6982 2014-09-15 08:34:19 +02:00
Eric Lippmann a18287d183 monitoring/commands: Rename `PropagateHostDowntime' to `PropagateHostDowntimeCommand'
refs #6593
2014-09-13 20:34:51 +02:00
Eric Lippmann 6bfab25009 monitoring/commands: Remove the `CommandForm' view helper
All command forms will be renderered using their real classes.

refs #6593
2014-09-13 20:33:45 +02:00