Commit Graph

801 Commits

Author SHA1 Message Date
Eric Lippmann 9d6906bd64 Save user dashboards to Icinga Web 2's configuration directory
fixes #8056
2015-02-02 15:06:29 +01:00
Eric Lippmann 5a1ebf9c89 lib: Implement Tab::getUrl() 2015-02-02 14:16:26 +01:00
Johannes Meyer bf470125c3 Merge branch 'master' into feature/create-missing-directories-when-creating-inis-8219
Conflicts:
	modules/monitoring/library/Monitoring/MonitoringWizard.php
2015-01-30 16:21:42 +01:00
Eric Lippmann df29dd0e7c Implement Form::hasPermission() and Form::getPermission() 2015-01-30 09:35:01 +01:00
Eric Lippmann 2faf5f0ca1 Throw SecurityException in ActionController::assertPermission() 2015-01-30 09:34:19 +01:00
Johannes Meyer 63305fdf9a Add Icinga\Application\Config::saveIni()
Simplifies saving INI files. Icinga\File\Ini\IniWriter does already require an
instance of Icinga\Application\Config so it's obvious to give "Config" the
task to initialize the writer.. We do also have a central place to handle
creating missing ancestor directories now.

refs #8219
2015-01-30 09:32:08 +01:00
Marius Hein dd483d98df LessCompiler: Remove useless argument
refs #6417
2015-01-29 14:04:47 +01:00
Marius Hein c1df1f822e ifont: Reorganize files and drop use less attributes
fixes #6417
2015-01-29 11:25:37 +01:00
Marius Hein 4abb30e55b Merge branch 'master' into bugfix/ie8-fixes-6417 2015-01-28 17:08:56 +01:00
Marius Hein 9d05190517 ifont: Fix empty font glyphs for IE8
The embedded font is included inline in the stylesheets. IE falls back and
tries to load one of the other font sources which was not exported by the web
server. This fix moves the fontello directory to public and add add a
prefix path to the embedded stylesheet.

refs #6417
2015-01-28 17:06:55 +01:00
Johannes Meyer 6fde4eec30 Show all tabs except "Add to Dashboard" when issuing a command
refs #8279
2015-01-28 12:50:29 +01:00
Eric Lippmann cd8822ceff lib: Add View::hasPermission() 2015-01-23 09:36:45 +01:00
Eric Lippmann 6da3cb8403 lib: Reorder auth related functions in the ActionController 2015-01-23 09:36:05 +01:00
Eric Lippmann ef0a7c0e77 Revert "Security: Temporary grant all permissions"
This reverts commit 9b7e75a616.

Patching function hasPermission is not enough. A fix will follow.
2015-01-22 17:11:53 +01:00
Eric Lippmann 0f13c0428c Controller: Introduce method assertHttpMethod()
We have actions where only certain HTTP methods, e.g. POST are allowed but they are not restricted yet.
Controller::assertHttpMethod() takes a number of allowed HTTP methods and responds with HTTP 405 in case
the current request's method is not one of the given methods.
2015-01-22 15:47:16 +01:00
Eric Lippmann 9b7e75a616 Security: Temporary grant all permissions
We'll introduce permissions and restrictions in the next hours. Because our web setup
does not configure permissions yet, all permissions are granted for all users from now on.
2015-01-22 15:20:38 +01:00
Johannes Meyer 94d727dbb8 Fix error in Icinga\Web\Form in case the label decorator is missing
Zend_Form::getDecorator() returns false instead of null in case the
decorator is not found.
2015-01-22 09:21:50 +01:00
Johannes Meyer 10eacf9682 Allow jumping to already visited pages
This was already possible using just the base implementation of Wizard
but since WebWizard has optional pages it did not work with pages that
had such an optional page as previous page.

refs #8191
2015-01-21 15:39:06 +01:00
Johannes Meyer 64a8006973 Add Wizard::isComplete()
Wizard::isFinished() is not applicable in case a wizard is a child of another
wizard. Wizard::isComplete() fulfills the need to check whether a user went
through a wizard entirely.

refs #8191
2015-01-21 13:56:53 +01:00
Johannes Meyer 1f6a81aefb Add Wizard::skipPage()
Required to not to duplicate code in custom wizards and to avoid errors
when detecting the direction.

refs #8191
2015-01-21 13:07:08 +01:00
Johannes Meyer 2288e2a687 Add support for nested wizards
The amount of vertical dimensions is not limited as well as the location a
nested wizard can occur in the main wizard's order. In case a custom
implementation is used as nested wizard, all core functionalities are
still being utilized.

refs #8191
2015-01-20 15:54:14 +01:00
Eric Lippmann a1a36301fe View: Add string helpers 2015-01-19 14:20:57 +01:00
Eric Lippmann 50bbf77d0c Fix module domain detection in Form::getTranslationDomain()
The usage of preg_replace had two errors:
1) The regular expression was wrong
2) $matches[0] always contains the full matched string, not the first parenthesized subpattern

The correct version of preg_replace would've been:

if (preg_match('/^Icinga\\\\Module\\\\([A-Za-z]+)\\\\/', get_called_class(), $matches) === 1) {
    return strtolower($matches[1]);
}

But since there's no benefit of using a regular expression here except less speed, I replaced it
with using explode.

refs #7551
2014-12-30 10:08:33 +01:00
Matthias Jentsch a1950aabba Fix some obsolete or wrong docstrings 2014-12-29 16:27:28 +01:00
Matthias Jentsch 4cf8da4bb9 Do not focus logout menu item after a recurring login
Implement new MenuItemRenderer made for pages that are not part
of the regular site navigation and should trigger a complete site reload
instead of handling it via XHR.
2014-12-29 16:20:05 +01:00
Boden Garman 5e40ce2088 Only check the session save path is writable if the session handler is 'files'
fixes #8053

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
2014-12-29 09:37:47 +01:00
Eric Lippmann 7f5ba135ee Revert "Relax session storage check to the `files' save handler"
This reverts commit f7d11ce11f.

Sorry mate but a guy on GitHub was faster ;)

refs #8053
2014-12-29 09:37:07 +01:00
Matthias Jentsch 41c101d99f Use neutral default color in perfdata piecharts
If nothing is known about the state of the monitoring object, the piecharts should neither indicate OK nor Critical.
2014-12-23 16:12:25 +01:00
Matthias Jentsch cda5a6a903 Streamline chart implementation
Define sparkline layout through CSS class and remove label/tooltip formatting.

fixes #7077
2014-12-23 15:26:45 +01:00
Matthias Jentsch 64a2acd12e Do not display labels for single data sets in perfdata piecharts
Display generic chart titles for the whole piechart that only contain title and percentage and don't style perfdata piecharts using HTML properties.

refs #7077
refs #6200
refs #7304
2014-12-23 15:14:17 +01:00
Johannes Meyer f7d11ce11f Relax session storage check to the `files' save handler
fixes #8053
2014-12-22 11:02:48 +01:00
Johannes Meyer 6d263ae316 Do NOT fetch the translation domain from the request in Form::translate(..)
It might be the case that a module is using a library form...

refs #7551
2014-12-19 13:07:51 +01:00
Johannes Meyer cf43b81400 Use the class namespace instead of the request in Form::translate(Plural)
refs #7551
2014-12-19 12:08:54 +01:00
Johannes Meyer e5d2d4cec2 Add module-aware Form::translate and Form::translatePlural
refs #7551
2014-12-19 11:29:24 +01:00
Eric Lippmann 4dfac28393 lib: Fix PHPDoc of Form::setOnSuccess() 2014-12-18 17:21:06 +01:00
Johannes Meyer 7710fd7b0e Hide unsupported export formats
refs #8112
2014-12-18 16:20:41 +01:00
Johannes Meyer 3fde78f2b3 Enable the dompdf float support and fix our list's layout 2014-12-15 13:56:19 +01:00
Johannes Meyer bca28a5ae2 Display inline pie-charts also in views exported to PDF
fixes #6463
2014-12-15 13:55:20 +01:00
Thomas Gelf cddb68bffb ActionController: shift global parameters globally 2014-12-03 10:40:48 +01:00
Eric Lippmann d41602a67c Rearrange imports in Menu.php 2014-11-25 16:11:01 +01:00
Eric Lippmann eed10159fd Menu: Don't render sub menus when a dot appears in the label
I guess this was intended to be a feature. Turns out to be a bug though :)

fixes #7772
2014-11-21 17:39:18 +01:00
Eric Lippmann d84318d8b8 Fix Menu's PHPDoc
Don't use @var and don't use @return self for fluent interfaces.
2014-11-21 17:13:39 +01:00
Eric Lippmann 99ad72a0da Remove the Help decorator 2014-11-20 13:50:40 +01:00
Marius Hein bdc0321f62 Dashboard: Fix wrong URL
refs #7751
2014-11-20 13:41:12 +01:00
Eric Lippmann bb664a87ea Fix ugly positioning of help icons
If an element has a description, the description is now added to the element's label as title.
The CSS class has-feedback ensurers that the help icon is rendererd. If everything is working fine,
I'll the remove the super duper Help decorator.
2014-11-20 13:25:58 +01:00
Marius Hein e600dc8adb Dashboard: Rename component to dashlet
refs #7751
2014-11-20 12:08:50 +01:00
Thomas Gelf fa44197947 Dashboard: fix complex urls 2014-11-19 16:45:15 +01:00
Eric Lippmann 2830b13082 Merge branch 'master' into feature/security-gui-5647 2014-11-19 16:31:26 +01:00
Marius Hein 32af89e0a7 Merge remote-tracking branch 'origin/master' into bugfix/broken-badges-7736 2014-11-19 15:28:27 +01:00
Eric Lippmann a2818bd937 Merge branch 'master' into feature/security-gui-5647 2014-11-19 14:13:26 +01:00