355 Commits

Author SHA1 Message Date
Thomas Gelf
9e0e3f12e3 FilterChain: addFilter should return itself 2014-11-16 02:49:33 +01:00
Thomas Gelf
44c96f0410 FilterOr: override operator change for NOT
Replacing an OR filter with a NOT operator should return a NOT OR
when the OR contains more than one entry
2014-11-15 22:37:12 +01:00
Thomas Gelf
1f74c462d4 FilterChain: add and use count() function 2014-11-15 22:34:18 +01:00
Thomas Gelf
925348d171 Data\Filter: add or/andFilter implementations
Those shortcuts make it easy to correctly add or/and conditions
regardless of the original filter type
2014-11-14 23:06:20 +01:00
Thomas Gelf
6aefc4b491 Data\Filter: fix $self VS $this 2014-11-14 22:53:46 +01:00
Thomas Gelf
178ddaade7 Data\Filter: add missing abstract function type 2014-11-14 22:44:04 +01:00
Thomas Gelf
53bca911fb Data\Filter: enforce isEmpty() implementation 2014-11-14 22:43:30 +01:00
Thomas Gelf
ce7aea5df7 Data\Filter: add isChain() and isExpression()
This makes node type distiction easier
2014-11-14 22:41:30 +01:00
Eric Lippmann
94f8597271 Add existing GROUPBYs to count queries 2014-11-13 16:42:11 +01:00
Eric Lippmann
0e34001568 Use automatically a subquery when counting with groups 2014-11-13 16:42:11 +01:00
Johannes Meyer
77f5bc3932 Use GROUPBY instead of DISTINCT and subqueries when counting 2014-11-13 16:42:11 +01:00
Thomas Gelf
f0ca81d7af Data\Filter: SORT_NATURAL only for PHP >= 5.4 2014-11-12 11:47:42 +01:00
Thomas Gelf
0d4d4930a9 Db\DbConnection: benchmark single row fetches 2014-11-11 21:07:02 +01:00
Thomas Gelf
6d705721e3 Filters: try to give meaningful results for...
...missing columns

refs #4787
2014-11-11 19:26:37 +01:00
Thomas Gelf
8987b69d55 Filter: allow to list all filtered columns
This is important for backends that need to know which additional columns
to fetch.

refs #4787
2014-11-11 19:09:59 +01:00
Johannes Meyer
7b99b74ae1 Prefer Icinga\Application\Config instead of Zend_Config
refs #7147
2014-11-07 13:53:03 +01:00
Eric Lippmann
2b67683e00 DbConnection::__construct(): Set prefix if configured 2014-10-20 13:43:03 +02:00
Eric Lippmann
79ade944de Resources: Support type 'ini' yet only in the resources.ini
Configuring the resource type 'ini' via the web interface is not yet possible.
2014-10-20 13:40:35 +02:00
Alexander Fuhr
4c23d98575 Merge branch 'master' into bugfix/monitoring-list-dup-entries-7057 2014-10-08 12:45:14 +02:00
Alexander Fuhr
afc97b1cac Fix the duplicate entries in monitoring list shows
refs #7057
refs #7344
fixes #7057
2014-10-08 12:30:08 +02:00
Eric Lippmann
1b23fd7fbe monitoring: Don't support status.dat as backend
Icinga Web 2 will not support status.dat for now and maybe forever.
2014-10-07 13:22:07 +02:00
Eric Lippmann
865ef76cb8 filter: Fix whitespace sanitizing 2014-10-06 13:19:25 +02:00
Alexander Fuhr
97d2a920db Implement GROUP BY clause functionality 2014-10-06 11:34:04 +02:00
Eric Lippmann
64d41ac5a3 filter: Make `DbQuery::applyFilterSql()' public
I want to use that function in a module :)
2014-10-01 12:51:28 +02:00
Eric Lippmann
ebde422824 filter: Fix whitepsace sanitation when expression is an array 2014-10-01 04:00:43 +02:00
Eric Lippmann
46078f50db filter: Fix that leading and trailing whitespaces for columns and expressions let filters fail
Before, filtering for "host = localhost" issued "got invalid column host".
2014-10-01 03:13:27 +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
Alexander Klimov
36a3c36c1b Rename Icinga\Protocol\File\Reader to ...\File\FileReader 2014-09-04 16:37:24 +02:00
Thomas Gelf
3d352ba446 Filter: add FilterNotEqual and FilterMatch
fixes #6557
2014-09-02 19:51:56 +02:00
Marius Hein
30f391035c Postgres/DbQuery: Add orderfields to select
refs #6896
2014-09-01 10:00:04 +02:00
Marius Hein
9d0037a53a ResourceFactory: Add function create(<name>)
The ConfigAwareFactory is an interface forcing "backend-type" classes to call
ResourceFactory::createResource() passing a config they got in the constructor.

That's kind of overdesigned, if the ResourceFactory wants to be something like
a service locator it's responsabilities should include object instantiation.

refs #5514
2014-08-28 12:14:54 +02:00
Marius Hein
9b83074cc9 Class doc for ResourceFactory
refs #5514
2014-08-28 12:14:54 +02:00
Marius Hein
22e17e9901 ResourceFactory: Move available function to platform
refs #5514
2014-08-28 12:14:54 +02:00
Alexander Klimov
e6612fefe7 FilterParseException: extend IcingaException
refs #6931
2014-08-27 16:26:43 +02:00
Alexander Klimov
afd0c20c42 FilterException: extend IcingaException
refs #6931
2014-08-27 16:23:44 +02:00
Alexander Klimov
45638b218c Throw IcingaException rather than Exception
fixes #7014
2014-08-27 16:03:15 +02:00
Alexander Klimov
febb2d1ae2 ProgrammingError: extend IcingaException
refs #6931
2014-08-26 11:15:19 +02:00
Alexander Klimov
9c5878cbbe ConfigurationError: extend IcingaException
refs #6931
2014-08-22 11:46:11 +02:00
Eric Lippmann
edc89d6ad6 lib: Remove `NodeRenderer'
`NodeRenderer' is superseded by `TocRenderer'.
2014-07-28 19:12:35 +02:00
Eric Lippmann
e26d360561 lib/Node: Remove method `findNodeBy()'
The new `DocTree' class provides `getNode()'.
2014-07-28 19:07:13 +02:00
Eric Lippmann
bbcdcb4609 lib: Add `Identifiable' interface for objects that are identifiable by an ID of any type 2014-07-28 19:05:37 +02:00
Eric Lippmann
e005333806 Merge branch 'master' into feature/display-documentation-4820 2014-07-22 12:25:58 +02:00
Thomas Gelf
2a204897b4 DbQuery: improve method description
Not English mine this was, copy paste did I ;)
2014-07-18 16:48:52 +02:00
Thomas Gelf
209894d857 DbQuery: add dummy isTimestamp function
Not the best solution, but helps for now.

fixes #6675
2014-07-18 16:35:29 +02:00
Johannes Meyer
3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Eric Lippmann
db5c6631d9 Merge branch 'master' into feature/display-documentation-4820
Conflicts:
	modules/doc/library/Doc/Controller.php
2014-07-01 12:42:55 +02:00
Thomas Gelf
7ebdb2d378 FilterQueryString: add hidden debug feature
Might help to track down potential problems in the future, should
not be enabled by default
2014-06-25 10:47:03 +02:00
Thomas Gelf
9359f527db FilterQueryString: fix issues with not
NOT is a "chain" with just one subfilter and therefore behaves a little
bit different. Should work fine now.

fixes #6554
2014-06-25 10:39:48 +02:00
Thomas Gelf
b3cdeee35d monitoring/timeline: should benefit from new filter
Different changes have been applied:

* Allow integer unix timestamps as parameters for timestamp columns
* Remove alias-rewriting from Url class
* Remove all traces of raw_timestamp
* Use new filters
2014-06-21 03:09:40 +02:00
Thomas Gelf
78193137f0 config/modules: show metadata, improve usability
Well... I didn't want to commit this before creating single-button
forms for enabling/disabling modules. However part of this accidentally
made it through, so let's finish it.

Still some work to do, but it already looks far better like this.

refs #4095
2014-06-21 02:27:27 +02:00