Johannes Meyer
f2ad2838f4
ArrayDatasource: Apply a query's limit and offset when creating the result
2015-05-06 09:39:43 +02:00
Johannes Meyer
d63381c002
ArrayDatasource: Add missing and fix existing documentation
2015-05-06 09:12:48 +02:00
Johannes Meyer
b1cbc1422b
ArrayDatasource: Add support for associative arrays
...
Keys are now preserved in case a non-numeric one is found. By using
setKeyColumn() it is now also possible to map such a key to a specific
column of a row generated by createResult().
2015-05-06 08:40:02 +02:00
Johannes Meyer
5cc7f26728
ConfigObject: Extend ArrayDatasource
...
This makes it possible to use a ini file as repository!!!1
One thing is missing: Section names are currently ignored and should be
mapped to a virtual column.
refs #8826
2015-05-05 15:21:34 +02:00
Johannes Meyer
bd136d39f4
SimpleQuery: Make compare() alias aware
...
refs #8826
refs #7693
2015-05-05 07:31:50 +02:00
Johannes Meyer
d71df6a9b8
Revert "SimpleQuery: Make compare() alias aware"
...
This reverts commit 6612e4c1ae
.
2015-05-05 07:30:42 +02:00
Johannes Meyer
6612e4c1ae
SimpleQuery: Make compare() alias aware
...
refs #8826
refs #7693
2015-05-04 11:34:39 +02:00
Johannes Meyer
ecd059dec5
DbConnection: select() returns a DbQuery, not a Query
2015-05-04 11:13:38 +02:00
Johannes Meyer
e7789ed640
SimpleQuery: Rename unused property `table' to `target'
...
`target' is already in use, but was not declared. `table' was declared but not
used anywhere. So `table' is now `target'.
2015-05-04 11:12:43 +02:00
Johannes Meyer
ca5ef2da2b
Merge Queryable into QueryInterface
...
A *Query*Interface describes an object as being queryable, now.
refs #8826
2015-05-04 11:07:50 +02:00
Johannes Meyer
97caeb27f7
UserBackend: Add missing and fix existing method documentation
...
refs #8826
2015-04-21 13:59:35 +02:00
Eric Lippmann
45d1230b28
Merge branch 'master' into bugfix/significant-whitespaces-8777
2015-04-08 10:19:53 +02:00
Eric Lippmann
6e6aabedf2
Don't trim filter expressions
...
Leading and trailing whitespaces may be significant for comparison.
refs #8777
2015-04-08 09:31:11 +02:00
Alexander Klimov
967a2e82dc
Use (only) "@return $this" in fluent interfaces' documentation
2015-04-07 14:24:11 +02:00
Eric Lippmann
949438d753
lib: Add SimpleQuery::splitOrder() ...
...
... for supporting specifying the sort direction next to the column, e.g.
'service_display_name ASC'
refs #8716
2015-03-13 17:09:32 +01:00
Eric Lippmann
8563d5ed3f
PHPDoc: Use @var instead of @type
...
Becasue of too many kittens PSR-5 backed off of deprecating @var.
So that's the way we go too.
2015-03-12 16:08:47 +01:00
Eric Lippmann
760819f239
lib: Remove TreeNode::getIterator()
...
Its the tree who has the iterator.
refs #6630
2015-02-10 17:01:32 +01:00
Eric Lippmann
b18405e99f
lib: Add SimpleTree
...
Simple tree implementation for TreeNodes.
refs #6630
2015-02-10 17:00:47 +01:00
Eric Lippmann
fd38e5b2e1
lib: Use @inheritdoc in the TreeNodeIterator
...
refs #6630
2015-02-10 16:59:43 +01:00
Eric Lippmann
3a4c6e45b8
Fix Fatal error: Interface 'Identifiable' not found
...
refs #6630
2015-02-06 17:32:51 +01:00
Eric Lippmann
0d63e14baf
lib: Rename Node to TreeNode
...
refs #6630
2015-02-06 17:27:14 +01:00
Eric Lippmann
828cb8d23a
lib: Add iterator over a tree node's children
...
refs #6630
2015-02-06 17:23:07 +01:00
Eric Lippmann
f331c03f63
lib/tree: Save child nodes into an array instead of using SplDoublyLinkedList
...
refs #6630
2015-02-06 17:20:23 +01:00
Eric Lippmann
c8da05d0a7
lib: Remove NodeInterface
...
I'll create an iterator for nodes and drop that every node is a SplDoublyLinkedList.
refs #6630
2015-02-06 17:17:41 +01:00
Eric Lippmann
6bae2e0a53
Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL
2015-02-04 10:52:27 +01:00
Eric Lippmann
5b4fab0750
Add license header
...
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann
5fa2e3cfdc
Revert "Add license header"
...
This reverts commit 338d067aba
.
2015-02-03 16:16:26 +01:00
Eric Lippmann
338d067aba
Add license header
...
fixes #7788
2015-02-03 15:51:04 +01:00
Eric Lippmann
52c40bdc5b
lib/SimpleQuery: Increase default limit to 25
...
Please follow the referenced issues.
fixes #8337
refs #8339
2015-02-02 14:16:27 +01:00
Eric Lippmann
c53b1d27e9
lib: Deprecate Data\Filterable because of ...
...
addFilter and applyFilter do the same in all usages.
addFilter could be replaced w/ getFilter()->add().
We must no require classes implementing this interface to implement redundant methods over and over again.
The interface must be moved to the namespace Icinga\Data\Filter.
It lacks documentation.
2015-01-27 14:33:46 +01:00
Johannes Meyer
38957e340b
Fix that DbQuery::renderFilter produces invalid filters
...
fixes #7749
2014-11-20 11:58:22 +01:00
Johannes Meyer
7621f6642d
Adjust usages of Icinga\Application\Config
...
refs #7147
2014-11-18 13:11:52 +01:00
Johannes Meyer
0c84bf614d
Split config functionality into two classes
...
There is now Icinga\Application\Config as our ini configuration handler and
Icinga\Data\ConfigObject as our general configuration container.
refs #7147
2014-11-18 13:02:56 +01:00
Thomas Gelf
40c4562fe4
Data\SimpleQuery: don't fail on missing columns...
...
...for now
2014-11-16 18:24:16 +01:00
Thomas Gelf
b2a55f0998
Db\DbQuery: do not expose applyFilterSql
2014-11-16 17:09:51 +01:00
Thomas Gelf
5ea2f33efb
Db\DbQuery: add NOT LIKE support
2014-11-16 17:08:50 +01:00
Thomas Gelf
90f1ab06b4
Db\DbQuery: add "deep" clone support
...
Still far from being complete, Zend_Db_Select makes life really hard for
us. More to come...
2014-11-16 17:06:26 +01:00
Thomas Gelf
e89d4642e3
Merge remote-tracking branch 'origin/master' into feature/livestatus-playground-4787
2014-11-16 10:12:34 +01:00
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
Thomas Gelf
a904ff51aa
monitoring/eventhistory: improve query performance
...
This takes care of timestamp columns, modifies queries in a way not
depending on db functions, filters are passed through to subqueries
for better performance.
2014-06-20 19:14:34 +02:00
Thomas Gelf
ecbdb07bea
FilterQueryString: fix handling encoded <> signs
...
Those signs are URL-encoded and therefore not "seen" before decoding
the "key" part when the sit in front of the = sign. Same goes for
standalone ones. Fixed.
2014-06-20 13:06:07 +02:00
Thomas Gelf
f2605b89ff
FilterQueryString: fix parsing expression lists
...
The parser sometimes failed when reaching a=b&b=(c|d|e) - fixed.
2014-06-20 13:04:53 +02:00
Thomas Gelf
1ea15e1f66
FilterQueryString: fix sub-expression parsing
...
In a string like !(b=c)&a=d the parser used to fail once it reached
the &, fixed now.
2014-06-20 13:02:02 +02:00
Thomas Gelf
a3a2e97f18
FilterQueryString: just cleaning up a little bit
2014-06-20 13:01:10 +02:00
Thomas Gelf
644dd5e33e
Widget\FilterEditor: improve the filter editor
...
This adds quite a bunch of changes. Part of the filter-modifying
complexity has been moved to the filter, the editor widget itself
now makes use of new filter capabilities such as changing operator
or expression type.
2014-06-20 12:03:22 +02:00
Thomas Gelf
1bfc4058f2
Data\Filter: automagically handle hierarchy
...
This adds a few more functions assisting filters in replacing
themselves or subnodes. Introducing Filter::chain().
2014-06-20 12:00:29 +02:00
Thomas Gelf
18e49f6b9a
Data\Filter: add setters for all properties
...
To keep our filter editor simple we want our filters to handle also
operations replacing themselves.
2014-06-20 11:57:31 +02:00
Thomas Gelf
97f88bf636
Data\Filter: clean up a few things
...
* throw useful exceptions
* our "id" should always be treated as a string
2014-06-20 11:55:27 +02:00
Thomas Gelf
7cd696b31b
Data/queries: adjust to fit new filters
...
Slight changes to get our queries working with new filter implementation.
2014-06-17 12:34:02 +00:00
Thomas Gelf
d1b2d47fed
Data\Filter: rework fitting new URLs
...
A bunch of things happened here. We distinct FilterChains (or, and,
not) from FilterExpressions (less, greater, equal...). We make use of
our new URL-Parser. We can directly address anonymous filter components
for editing filters. Too much things to explain them in detail, a filter
documentation will follow.
2014-06-17 12:28:28 +00:00
Thomas Gelf
7b77083c89
Data\Db\DbConnection: relax timeout, persistance
...
Raised connection timeout, helps when talking to DB servers behind
weak links. Please note that I'm not sure whether this really is a
better default.
While it doesn't matter with local sockets, connection overhead will
have an impact with remote database servers. We have to reconnect with
every single request. Persistent connections seem to be no longer as
errorprone as they used to be, but I'd still refuse to switch them on
by default.
What we need is a config setting for connection persistancy and wizards
strongly suggesting to use this when working with remote db servers.
2014-06-17 09:53:59 +00:00