Commit Graph

2299 Commits

Author SHA1 Message Date
Johannes Meyer 66fd7dfd93 ConfigController: Rename applicationAction to generalAction 2015-06-01 16:35:27 +02:00
Johannes Meyer 49bb09d9d3 Add dedicated menu entries to manage users, groups and roles
refs #8826
2015-06-01 16:31:48 +02:00
Matthias Jentsch 1901f0af98 Improve .ini file formatting
End every file with a newline, and only display 1 empty line between each section, to improve readabillity.

fixes #8706
2015-06-01 16:12:02 +02:00
Johannes Meyer c7ce1498bf Introduce menu entry "Configuration" 2015-06-01 16:10:23 +02:00
Johannes Meyer e936c76ca9 DbUserGroupBackend: Really clear memberships and parent relations...
...when removing a group.

refs #8826
2015-06-01 15:34:38 +02:00
Johannes Meyer 1385295e4e DbUserGroupBackend: Properly handle sequences of group names
refs #8826
2015-06-01 15:33:35 +02:00
Johannes Meyer 62fff94808 DbUserGroupBackend: Do not try to fetch a group id for null
refs #8826
2015-06-01 15:16:03 +02:00
Johannes Meyer beb5bd7370 Repository: Clone a filter implicitly in self::requireFilter($clone = true)
refs #8826
2015-06-01 15:03:08 +02:00
Johannes Meyer 601b720a03 LdapUserBackend: Fetch and interpret the correct attributes (OpenLDAP)
refs #8826
2015-06-01 14:05:44 +02:00
Johannes Meyer d1a5321d02 LdapUserBackend: Fetch and interpret the correct attributes (ActiveDirectory)
refs #8826
2015-06-01 12:23:16 +02:00
Johannes Meyer 7127d5eb39 Ldap\Connection: Connect automatically in case capabilities are not set yet 2015-06-01 12:20:36 +02:00
Johannes Meyer d097f7fe8f Add menu entry for the user group backend configuration
That's definitely just a placeholder...

refs #8826
2015-05-29 16:36:05 +02:00
Johannes Meyer c8e8a39f5a DbRepository: Relax check in providesValueConversion()
Would otherwise conflict when tables are joined in.

refs #8826
2015-05-29 11:58:21 +02:00
Johannes Meyer cc779024fe Repository: providesValueConversion() should not be required being called
refs #8826
2015-05-29 11:57:38 +02:00
Johannes Meyer b82d7d7cc0 DbRepository: split() is deprecated, use explode() instead
Why php, why? :'(

refs #8826
2015-05-29 11:37:42 +02:00
Johannes Meyer 3959dc27d7 Repository: Do not return filter columns when requiring all query columns
I really wonder why I did not notice this until now...

refs #8826
2015-05-29 11:36:08 +02:00
Johannes Meyer a88037f45d DbUserGroupBackend: Fetch and persist a group's id when it's name is given
refs #8826
2015-05-29 11:33:35 +02:00
Johannes Meyer bb285db05b Differentiate the source or destination of a column when converting values
refs #8826
2015-05-29 11:32:15 +02:00
Johannes Meyer 60ce78c958 DbUserGroupBackend: Adjust how to load the name of a group's parent
refs #8826
2015-05-29 08:57:49 +02:00
Johannes Meyer c94e6a3292 Db/IniUserGroupBackend: Drop column parent_name, it's not a name anymore
refs #8826
2015-05-29 08:56:58 +02:00
Johannes Meyer 5e0ae6410b DbRepository: Consider a filter column without query context as a statement column
Feels wrong..somehow, but it works.

refs #8826
2015-05-29 08:02:12 +02:00
Johannes Meyer 32b99be8ab DbUserGroupBackend: Adjust to fit the new database schema
refs #8826
2015-05-28 15:22:15 +02:00
Johannes Meyer fd931e4232 RepositoryQuery: getQuery() might be called during prepareQueryColumns() 2015-05-28 14:26:48 +02:00
Johannes Meyer 08f8fe6f49 DbRepository: Add support for joining tables based on query/filter columns
refs #8826
2015-05-28 13:53:49 +02:00
Johannes Meyer 119b2fdddb DbQuery: Allow to join additional tables
This should just be the beginning of such additions, there is still a group(),
distinct(), etc missing..
2015-05-28 13:52:00 +02:00
Johannes Meyer 58d78f59f3 DbQuery: Initialize self::$select as early as possible
I'd like to use Zend's implementation instead of re-inventing the wheel just
because someone decided to only work with a copy of it in the frameworks
query but do exactly the opposite in the monitoring module's IDO query...
2015-05-28 13:49:36 +02:00
Johannes Meyer 5326ce6bca DbRepository: Add support for table specific aliases
This was previously only possible for the base table and in case one wanted
to use table aliases in the query column definition for non-base tables as
well, it did not work well due to not being explicitly supported. Now, to use
such table aliases one must initialize DbRepository::tableAliases.

refs #8826
2015-05-28 13:44:51 +02:00
Johannes Meyer 647dd9d425 RepositoryQuery: Pass through the query when requiring a table or column
This allows now to adjust the query in custom repository implementations.

refs #8826
2015-05-28 13:25:26 +02:00
Eric Lippmann 31400ea16a monitoring: Fix that searching for specific columns is no longer possible if default search columns are set 2015-05-28 13:17:00 +02:00
Alexander A. Klimov cba36ec017 Ignore the preferences' loadability during authentication
fixes #8956
2015-05-27 15:13:53 +02:00
Johannes Meyer 23b7ab0764 DbRepository: Remove COLLATE from a query column in case of a pgsql connection
refs #8826
2015-05-27 11:47:18 +02:00
Johannes Meyer 8713f59e66 AuthBackendController: Only show tabs the user is permitted to view
refs #8826
2015-05-27 10:38:35 +02:00
Alexander A. Klimov b842a39650 Implement ::getLinuxDistro()
refs #8705
2015-05-26 18:23:26 +02:00
Johannes Meyer 237b50f953 RepositoryQuery: Ensure that we'll adjust a copy of a filter 2015-05-26 14:32:47 +02:00
Johannes Meyer 20f0b46574 Introduce class AuthBackendController
refs #8826
2015-05-26 10:11:40 +02:00
Johannes Meyer ec556edc65 Merge branch 'master' into feature/user-and-group-management-8826 2015-05-26 09:28:35 +02:00
Johannes Meyer 54354b17bf DbConnection: Replicate the fix for #9211 2015-05-26 09:26:55 +02:00
rbelinsky b0f7773260 lib: Fix sprintf format strings used in Format::seconds()
fixes #9291

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
2015-05-22 16:06:11 +02:00
Johannes Meyer 4f0b4e55ef ErrorLabeller: Use an element's name if no label is set 2015-05-22 14:01:26 +02:00
Eric Lippmann 83a6e85b5d lib: Don't render empty filters to SQL
Else we are presented with syntax errors.

fixes #9211
2015-05-22 13:53:57 +02:00
Eric Lippmann 53ca68903a Merge branch 'bugfix/time-formatting-6778'
fixes #6778
2015-05-22 11:34:43 +02:00
Eric Lippmann 3fced8472b lib: Remove unused function from our format util
refs #6778
2015-05-22 10:27:50 +02:00
Johannes Meyer 265725447d Merge branch 'master' into feature/user-and-group-management-8826 2015-05-22 10:06:31 +02:00
Eric Lippmann de9be044b3 lib: Provide formatDuration() in our views
refs #6778
2015-05-22 10:04:00 +02:00
Eric Lippmann edd386e14b lib: Add DateFormatter::formatDuration()
refs #6778
2015-05-22 09:49:06 +02:00
Eric Lippmann dd298edb81 lib: Only invert relative partial times if necessary
refs #6778
2015-05-22 09:33:51 +02:00
Eric Lippmann 2bdb725370 Merge branch 'bugfix/monitoring-controllers-response-codes-6281'
fixes #6281
2015-05-22 09:27:51 +02:00
Eric Lippmann d2bb74a2f9 lib: Move HttpNotFoundException beneath the Http Exception namespace
refs #6281
2015-05-22 09:25:49 +02:00
Eric Lippmann 71a2324cb9 lib: Let Controller::assertHttpMethod() throw a HttpMethodNotAllowedException
refs #6281
2015-05-22 09:12:42 +02:00
Eric Lippmann fde60f4a00 lib: Add HttpMethodNotAllowedException
At the moment we throw a Zend_Controller_Action_Exception when the HTTP method is not allowed.
I'll replace this w/ the exception introduced.

refs #6281
2015-05-21 17:19:07 +02:00
Eric Lippmann fcd7aaef87 lib: Add HttpException as base class for HTTP exceptions
refs #6281
2015-05-21 17:18:29 +02:00
Eric Lippmann dd1025119d Throw HttpNotFoundException on Controller::httpNotFound()
refs #6281
2015-05-21 16:54:00 +02:00
Eric Lippmann c4ed49cb1a lib: Add HttpNotFoundException
The HttpNotFoundException should be used for sending a HTTP 404 response w/ a custom message.

There's also Zend_Controller_Action_Exception but this exception will always show 'Page not found' because we
want to hide messages generated by Zend, like 'Action "foobar" does not exist and was not trapped in __call()'.

refs #6281
2015-05-21 16:43:58 +02:00
Johannes Meyer fac2ebce80 RepositoryQuery: Fix handling of queries returning no results in fetchColumn()
refs #8826
2015-05-21 15:02:56 +02:00
Johannes Meyer 4833ff109c RepositoryQuery: Validate the table passed when calling from()
refs #8826
2015-05-21 15:01:13 +02:00
Eric Lippmann 54577d04bd Merge branch 'master' into bugfix/time-formatting-6778
Conflicts:
	modules/monitoring/application/views/scripts/list/comments.phtml
	modules/monitoring/application/views/scripts/list/hostgroups.phtml
	modules/monitoring/application/views/scripts/process/info.phtml
	modules/monitoring/application/views/scripts/show/components/downtime.phtml
	modules/monitoring/application/views/scripts/show/components/notifications.phtml
	modules/monitoring/public/css/module.less
2015-05-21 14:57:01 +02:00
Marius Hein 0002c0be26 Provide default config name for Module::getConfig() 2015-05-21 14:40:52 +02:00
Eric Lippmann c47465a732 lib/filter: Fix check against unset search columns
refs #8241
2015-05-21 14:04:04 +02:00
Johannes Meyer 10b158a182 LdapUserBackend: Fix sorting when sorting by user_name
refs #8826
2015-05-21 13:53:27 +02:00
Johannes Meyer 4d79731646 DbUserBackend: Fix sorting when sorting by user_name
refs #8826
2015-05-21 13:53:18 +02:00
Johannes Meyer ba31be9695 RepositoryQuery: Disim.. Fix sort order handling
refs #8826
2015-05-21 13:52:43 +02:00
Johannes Meyer 9278d708d7 IniUserGroupBackend: Do not sort by parent when sorting by group_name
refs #8826
2015-05-21 13:51:24 +02:00
Johannes Meyer 6369643145 DbUserGroupBackend: Do not sort by parent when sorting by group_name
refs #8826
2015-05-21 13:51:15 +02:00
Eric Lippmann 970d4d7a4a Fix that time-until doesn't show negative partial time in the dashboard
refs #6778
2015-05-21 10:19:07 +02:00
Eric Lippmann b9a6e1042d Merge branch 'master' into bugfix/Take-display_name-into-account-when-searching-for-host-and-service-names-8241
Conflicts:
	modules/monitoring/application/controllers/ListController.php
2015-05-20 17:02:49 +02:00
Johannes Meyer 0dda19dc7a DbRepository: Remove the table prefix when resolving statement columns
refs #8826
2015-05-20 11:50:09 +02:00
Johannes Meyer 71fa736144 Merge branch 'master' into feature/user-and-group-management-8826 2015-05-20 10:46:55 +02:00
Eric Lippmann 902c00e836 lib: Introduce Controller::httpNotFound()
Many actions require loading specific objects from database or any other storage.
If the object isn't found, Controller::httpNotFound($message) should be used
for immediately returning w/ HTTP 404.
2015-05-20 10:30:01 +02:00
Eric Lippmann 338fad5da9 cli: Add Params::shiftRequired() 2015-05-20 10:30:00 +02:00
Eric Lippmann ccaebd1d73 cli: Rename Params::req() to ::getRequired() 2015-05-20 10:30:00 +02:00
Eric Lippmann 3d1c3609c0 lib: Add UrlParams::shiftRequired() 2015-05-20 10:30:00 +02:00
Eric Lippmann 3a2238f737 Rename UrlParams::req() to ::getRequired()
req() seems mysterious :)
2015-05-20 10:30:00 +02:00
Johannes Meyer 093857641a DbConnection: Cast a queries count to integer forcefully 2015-05-20 09:30:23 +02:00
Johannes Meyer a3d5cfc28a RepositoryQuery: Properly handle queries returning no results
refs #8826
2015-05-20 09:11:46 +02:00
Alexander A. Klimov cc050ed696 Display an error notification rather than throwing an exception
refs #8241
2015-05-19 17:36:24 +02:00
Alexander A. Klimov 3243f9a65a Don't handle the case $this->searchColumns === null for actions in which ::setSearchColumns() is called
refs #8241
2015-05-19 17:36:23 +02:00
Eric Lippmann 2715e8ed2b Revert "Set default locale for the intl extension upon locale detection"
This reverts commit 06830e035e.

We don't use the intl extension at the moment.

refs #6778
2015-05-19 16:21:57 +02:00
Johannes Meyer fb07f0b94c Merge branch 'master' into feature/user-and-group-management-8826
Conflicts:
	library/Icinga/Authentication/Backend/LdapUserBackend.php
	library/Icinga/Protocol/Ldap/Query.php
2015-05-19 14:14:03 +02:00
Johannes Meyer bd7c7f9636 Introduce widget Paginator
This does not support custom scrolling styles as of now. Custom view
scripts are supported though. In case Paginator::getPages() does not
suffice, feel free to improve this.
2015-05-19 13:57:21 +02:00
Johannes Meyer 73e8c51fd1 Ldap\Query: Remove method paginate() 2015-05-19 13:57:20 +02:00
Eric Lippmann 14b24ff57d Use international standard date and time notation ...
... instead of depending on the locale.
We hardcode date and time formats all over the place anyway.

refs #6778
2015-05-19 13:26:46 +02:00
Eric Lippmann 9edc4a129b Fix date-and-time tooltips not showing the time
refs #6778
2015-05-19 13:25:57 +02:00
Alexander A. Klimov 4f4d7ccba2 Correct PHPDoc of ::setSearchColumns() 2015-05-19 12:55:40 +02:00
Eric Lippmann f968984feb Drop the DateTimeRenderer
refs #6778
2015-05-19 12:46:08 +02:00
Eric Lippmann f028c74a5e Improve parameter names for the date formatting functions
refs #6778
2015-05-19 11:25:54 +02:00
Eric Lippmann 603dcbde92 Drop the DateTimeFactory
refs #6778
2015-05-19 11:25:32 +02:00
Eric Lippmann 1d6ef5ec3a Don't setup the DateTimeFactory in our tests
DateTimeFactory will be removed soon.

refs #6778
2015-05-19 11:25:06 +02:00
Eric Lippmann ba258524a8 Don't setup the DateTimeFactory when bootstrapping Icinga Web 2
DateTimeFactory will be removed soon.

refs #6778
2015-05-19 11:23:50 +02:00
Eric Lippmann ab7c529094 Show the expected input format if a date-and-time input is not valid
refs #6778
2015-05-19 11:22:23 +02:00
Eric Lippmann 5cf8e2504e lib/grid: Use PHP's DateTime instead of our DateTimeFactory
I'm about to drop the DateTimeFactory because date_default_timezone_set() in combination w/ PHP's DateTime is sufficient.

refs #6778
2015-05-19 11:14:41 +02:00
Alexander A. Klimov 1ce9900c86 Add PHPDoc to ::setSearchColumns() 2015-05-19 11:12:36 +02:00
Eric Lippmann e87067db3b lib/chart: Use PHP's DateTime instead of our DateTimeFactory
I'm about to drop the DateTimeFactory because date_default_timezone_set() in combination w/ PHP's DateTime is sufficient.

refs #6778
2015-05-19 11:10:35 +02:00
Eric Lippmann d53c3d7075 Add view helper functions for formatting, date, date and time, and time
refs #6778
2015-05-19 10:10:23 +02:00
Eric Lippmann a66cb907ae Remove dateTimeRenderer view helper
The helper is no longer used anywhere.

refs #6778
2015-05-19 10:06:19 +02:00
Eric Lippmann 1301b77547 Use DateFormatter::formatDate() for formatting the date and time tooltip in the format view helper
refs #6678
2015-05-19 10:04:17 +02:00
Eric Lippmann 2eb93d0309 Remove time formatting functions from the format util
The DateFormatter class now has these functions.

refs #6778
2015-05-19 09:56:48 +02:00
Eric Lippmann 9477fdcea4 Use DateFormatter's format functions in the format view helper
refs #6778
2015-05-19 09:56:20 +02:00
Eric Lippmann bf8c4f1e9d Replace DateFormatter format constants w/ format functions
refs #6778
2015-05-19 09:55:21 +02:00
Johannes Meyer f305a334d5 DbConnection: Drop param $columnIndex in fetchColumn(), it's unused 2015-05-19 09:48:20 +02:00
Johannes Meyer cf989a0f7f SimpleQuery: Implement interface Iterator to benchmark result iteration 2015-05-19 09:41:55 +02:00