Eric Lippmann
3d104474d9
Tests: Fix UserTest as getTimeZone now returns a DateTimeZone object
...
refs #4440
2013-08-12 16:43:09 +02:00
Eric Lippmann
ba00fd39df
Framework: Get DateTimePicker's value as timestamp and add input validation
...
refs #4440
2013-08-12 16:43:09 +02:00
Eric Lippmann
a82d750d6a
Framework: Use the DateTime Unix timestamp format in the DateFormat helper
...
refs #4440
2013-08-12 16:43:09 +02:00
Eric Lippmann
3122a75e73
Framework/User: getTimeZone now returns a DateTimeZone object instead of a string
...
refs #4440
2013-08-12 16:43:09 +02:00
Eric Lippmann
5c98acd36c
Framework: Add doctrings to DateFormat view helper
...
refs #4424
2013-08-12 16:43:09 +02:00
Eric Lippmann
da7f619804
Framework: Implement DateFormat view helper
...
Support date, time and datetime formatting based on format strings
set either by the user or via config.ini. The view helper
FormDateTime uses the new helper already
refs #4440
refs #4424
2013-08-12 16:43:09 +02:00
Eric Lippmann
7c732ef682
Monitoring/Tests: Fix DateTimePicker element usage
...
refs #4440
2013-08-12 16:43:08 +02:00
Eric Lippmann
1a2ea656fd
Monitoring/Forms: Don't use DateTime as PhpDateTime
...
refs #4440
2013-08-12 16:43:08 +02:00
Eric Lippmann
1f10cb3124
Framework: Rename DateTime form element to DateTimePicker
...
refs #4440
2013-08-12 16:43:08 +02:00
Johannes Meyer
94ea09b552
Remove Date and Time form elements
...
Drops the Date and Time form element as they are redundant.
refs #4440
2013-08-12 16:43:08 +02:00
Eric Lippmann
c0e3712e1b
Framework/Elements: Implement DateTime form element
...
refs #4440
2013-08-12 16:42:51 +02:00
Eric Lippmann
8af901e9ed
Framework/User: Implement getTimezone to retrieve the user's Timezone
...
refs #4440
2013-08-12 16:42:50 +02:00
Eric Lippmann
9170523afa
Application/Bootstrap: Throw Exception if timezone isn't valid
...
refs #4440
2013-08-12 16:42:50 +02:00
Jannis Moßhammer
55f93389ba
Merge branch 'bugfix/wrong-namespaces-4543'
...
fixes #4543
2013-08-12 16:12:03 +02:00
Eric Lippmann
93ae6d6811
Framework: mv Icinga\Config\Config to Icinga\Application\Config
...
refs #4543
2013-08-12 15:02:25 +02:00
Marius Hein
19b98c84a2
Merge branch 'feature/dashboard-view-4192'
...
resolves #4192
2013-08-09 10:37:31 +02:00
Jannis Moßhammer
07717e9119
Fix codestyle
...
- return self insteead of return $this
- missing licence header in Dimension.php
refs #4192
2013-08-09 10:32:57 +02:00
Jannis Moßhammer
886da7d0cb
Fix codestyle, change wrong 'dashboard' parameter to pane causing pane switching to fail
...
- Fixed concatenation
- Added license header where missing
- Fixed the index controller fetching the wrong parameter ('dashboard' instead of 'pane')
refs #4192
2013-08-08 17:42:34 +02:00
Jannis Moßhammer
237f7f1e60
Fix service compact view, remove dashboard.ini trash
...
refs #4192
2013-08-08 16:33:42 +02:00
Jannis Moßhammer
6e68826da6
Fix PSR compliance of code
...
refs #4192
2013-08-07 18:10:39 +02:00
Jannis Moßhammer
2a2966fc56
Fix Config.php relocation, fix header.phtml crashing due to old tab rendering
...
refs #4192
2013-08-07 17:51:52 +02:00
Jannis Moßhammer
488310df37
Fix style and docstrings, exception when removing the last tab
...
refs #4192
2013-08-07 17:45:09 +02:00
Jannis Moßhammer
9ba3c90931
Rename dashboard folder to work on non case-insensitive fs
...
refs #4192
2013-08-07 17:44:40 +02:00
Jannis Moßhammer
19764485bc
Add untracked files
...
refs #4192
2013-08-07 17:44:40 +02:00
Jannis Moßhammer
ec17efe328
Add test for Dimension
...
refs #4192
2013-08-07 17:44:40 +02:00
Jannis Moßhammer
2b25757e20
Add documentation, add errorhandling and sizing
...
The optional width/height parameter can be set in the ini to change the dashboard components
size, documentation has been added and in the error case a message with the configuration is shown
refs #4192
2013-08-07 17:44:30 +02:00
Jannis Moßhammer
f8bb478f0e
Update dashboard implementation
...
fix javascript naming (icinga-url to icingaurl), fix add form, add remove
button, code style changes
refs #4192
2013-08-07 17:43:37 +02:00
Jannis Moßhammer
b3e0d5e8ce
Remove AbstractWidget and make Widget an interface
...
As Widget's already denote an abstract concept, the name
'AbstractWidget' is redundant. Also this class didn't do anything except
fetching a view via a singleton (which is now injected into the render method)
and bypassing the PHP class properties by creating a 'properties' array which is
filled with magic getters and setters (which now are simply php class properties)
Further changes:
- toString is removed, as this incorporated a lot of
application logic which would cause unrecoverable
errors when throwing exceptions
- renderToHtml is now just render and the view dependency must be
passed, as a widget shouldn't be responsible for getting
view instance (this means that <?= $this->tabs ?> is now
<?= $this->tabs->render($this); ?> in the templates
- Controllers don't have $this->widget anymore as Widgets are
directly instanciated with their class, allowing better code completion
and avoiding hidden dependencies, also Widget::create is now removed
in favor of direct instanciation.
refs #4192
2013-08-07 17:41:43 +02:00
Jannis Moßhammer
4149328216
Merge branch 'feature/ini-writer-for-config-4352'
...
resolves #4352
2013-08-07 16:31:19 +02:00
Matthias Jentsch
57257d1af3
Fix coding standard violations
...
resolves #4352
2013-08-07 16:19:15 +02:00
Matthias Jentsch
76d7753860
Split up functions in PreservingIniWriter for better readabillity and add better comment handling
...
Split up the function diffPropertyUpdates into two single functions. Change the
IniEditor to "glue" comments to section declarations.
resolves #4352
2013-08-07 15:58:51 +02:00
Matthias Jentsch
c1338898a6
Fix errors in function comments and move IniEditor into single class file
...
refs #4352
2013-08-07 15:58:51 +02:00
Matthias Jentsch
56e47fd084
Add an ini writer for configuration files
...
Add an ini writer that respects the file structure and the comments that may be
already present in the config file. Move Application/Config.php into
Config/Config.php.
refs #4352
2013-08-07 15:58:42 +02:00
Matthias Jentsch
edebbf93ab
Add an IniWriter that preserves the comments in already existing files
...
Add a function to create diffs between two object, add a
FileEditor to edit files line-by-line and add the class PropertyDiff to
describe a single property change.
refs #4352
2013-08-07 15:56:42 +02:00
Eric Lippmann
290c8c5225
CC: Add newline to end of file where missing
...
Following command was used:
$ find application/ library/Icinga/ modules/ -name *.php | xargs sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba;$a\'
2013-08-07 10:27:50 +02:00
Jannis Moßhammer
ab1673f198
Merge branch 'feature/dynamic-forms-4439'
...
resolves #4439
2013-08-06 15:22:30 +02:00
Jannis Moßhammer
ff62a82895
Fix dynamic form validation behaviour, fix documentaion, fix correct isValid() call
...
- When a dynamic form is modified, no validation is performed, but
the form is being populated with $this->populate.
- changed parent::isValid to $this->isValid, otherwise no custom validation
logic could be implemented
- Updated documentation
- Fix CSRF protection by removing the time
refs #4439
2013-08-06 15:08:54 +02:00
Johannes Meyer
66592ecabf
Enable dynamic form elements
...
Expire time of the AcknowledgeForm and hours as well as
minutes of the ScheduleDowntimeForm are now dynamic.
refs #4439
2013-08-06 15:06:20 +02:00
Johannes Meyer
f5162189dd
Implement dynamic form elements
...
Rename "isPostAndValid" to "isSubmittedAndValid" and refactor it.
Add possibility for specific form elements to auto-submit their form.
refs #4439
2013-08-06 15:03:25 +02:00
Johannes Meyer
1b9885f274
Merge branch 'bugfix/fix-hostlist-test-4516'
...
fixes #4516
2013-08-06 14:06:49 +02:00
Marius Hein
584198f00c
Fix hostlist test
...
refs #4516
2013-08-06 14:06:25 +02:00
Johannes Meyer
7ba6d4a74f
Merge branch 'bugfix/forward-fix-4382'
...
fixes #4382
2013-08-06 13:40:19 +02:00
Marius Hein
15999eb880
Change _forward to redirect() to keep url history updates
...
refs #4382
2013-08-06 13:39:10 +02:00
Johannes Meyer
4befc9be94
Merge branch 'feature/preferences-backend-4069'
...
resolves #4069
2013-08-06 12:04:16 +02:00
Marius Hein
27ae3ceb35
Merge branch 'feature/dynamic-forms-4439'
...
fixes #4439
2013-08-06 11:46:15 +02:00
Johannes Meyer
d78a5338df
Rename ConfirmationForm and ConfirmationWithIdentifierForm
...
Rename ConfirmationForm to CommandForm and
ConfirmationWithIdentifierForm to CommandWithIdentifierForm.
refs #4439
2013-08-06 11:14:56 +02:00
Johannes Meyer
3ad4a4281d
Add missing form tests and update documentation
...
refs #4439
2013-08-06 11:11:29 +02:00
Johannes Meyer
5533b632ed
Fix code style and make form name non mandatory
...
refs #4439
2013-08-06 11:11:29 +02:00
Johannes Meyer
f26af0eb12
Update command form tests
...
Update command form tests so that they reflect the new dynamic
functionality and the correct purpose of "isSubmittedAndValid".
refs #4439
2013-08-06 11:11:28 +02:00
Johannes Meyer
8efbe6f613
Move submit and cancel handling
...
Move submit and cancel handling from ConfirmationForm to Form.
refs #4439
2013-08-06 11:11:28 +02:00