Commit Graph

153 Commits

Author SHA1 Message Date
Sukhwinder Dhillon f0f2835708 Module: Don't pass null as param to `class_exists()` 2022-07-05 15:42:15 +02:00
Sukhwinder Dhillon 55d23a531f Module: Remove deprecated method `registerHook()` 2022-06-14 14:24:30 +02:00
Johannes Meyer d78bb02b41 Module: Parse requirements in metadata correctly 2022-02-04 16:17:54 +01:00
Johannes Meyer ffaf6e5f04 Remove module asset support 2022-02-04 15:57:15 +01:00
Sukhwinder Dhillon 2c01f38dec Add icingadb as OR dependecy
Add only if the given module supports icingadb and has monitoring as a requirement
2021-11-10 09:33:48 +01:00
Johannes Meyer 889c0a749c Module: Report `ipl` and `reactbundle` as library requirements
This way modules with the legacy requirement definition
can still be enabled without the modules in place.
2021-06-28 10:55:45 +02:00
Johannes Meyer 4e3811cc84 Module: Allow `/` and `-` in module/library dependency names 2021-06-01 09:14:28 +02:00
Johannes Meyer 2e5abbc832 Use ipl-i18n's `Translation` trait where applicable 2021-05-28 14:03:36 +02:00
Johannes Meyer 8137f1546f Module: Register locales using ipl-i18n 2021-05-28 14:03:36 +02:00
Johannes Meyer a33317aeab Module: Don't emit warnings for module assets
resolves #4286
2020-12-01 09:44:56 +01:00
Johannes Meyer be99703a67 Module: Deprecate asset support 2020-11-18 13:21:34 +01:00
Johannes Meyer baaf663db3 Module: Introduce new metadata field `Requires`
This is the successor of `Depends` and allows to
define dependencies for libraries and modules:

`Requires: <lib-name>[ (<ver>)][, <lib-name>[ (<ver>)]] ...`

or

```
Requires:
  Libraries: <name>[ (<ver>)][, <name>[ (<ver>)]] ...
  Modules: <name>[ (<ver>)][, <name>[ (<ver>)]] ...
```
2020-11-18 13:21:33 +01:00
Johannes Meyer 19e4eb6e1e Module: Add missing getter for property `jsdir` 2020-11-18 13:21:33 +01:00
Eric Lippmann 49eb245580 CLI: Also register assets
Because assets are not registered in the CLI context,
CLI actions cannot access the full style sheet.
This is necessary for Icinga Reporting though in order to send PDF reports.
2020-06-04 07:31:02 +02:00
Eric Lippmann e11feb81f5 Don't fail with an exception if module.info is flawed 2020-03-12 14:26:15 +01:00
Johannes Meyer 5352e72d1f
Merge pull request #3946 from Icinga/fix/wrong-dashlet-order-3931
Fix wrong dashlet order
2019-09-26 14:34:13 +02:00
Johannes Meyer d699191629
Let modules provide css/js assets to be used by other modules (#3961) 2019-09-25 09:53:53 +02:00
Johannes Meyer d4dc282ac8 DashboardContainer: Allow to define a priority for dashlets
refs #3931
2019-09-09 14:43:28 +02:00
Johannes Meyer 4fdfb190ad Navigation/DashboardPane: Properly register dashlets as children
refs #3542
2019-07-18 08:33:35 +02:00
Loei Petrus Marogi 617f1b35b3 Add possibility to let hooks always run
refs #3772
2019-07-11 13:36:33 +02:00
Bas Couwenberg 075eb17005 Use continue <N> in case statements to fix ErrorException with PHP 7.3.
```
Fatal error: Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
```
2018-11-23 18:34:56 +01:00
lippserd c1497cf1c5
Merge pull request #3143 from Icinga/bugfix/inactive-module-config-tabs-2977
Hide inactive modules' config tabs
2018-01-16 09:18:49 +01:00
Alexander A. Klimov a5e75554ad Don't require module.less
refs #3149
2017-12-15 11:58:54 +01:00
Alexander A. Klimov 6cdad7c5c1 Hide inactive modules' config tabs
refs #2977
2017-11-24 13:40:03 +01:00
Johannes Meyer 181e2ef05c Swag: Fix swag (aka a whole bunch of code style issues..) 2017-01-27 14:48:59 +01:00
Eric Lippmann 326574ba54 Fix deprecation notes for Module::registerHook() 2017-01-17 12:30:14 +01:00
Eric Lippmann 1cdef234a1 Revert "Module: Drop deprecated method registerHook and arg $key of method provideHook"
This reverts commit f1a1f41192.

It makes absolutely sense to remove depcreated code, but this removal introduces too many problems while not being really necessary.
Some of our modules and modules written by others still rely on the deprecated code. A upgrade of Icinga Web 2 would break many running systems out there.
Before removing this code we should upgrade our modules and notify the authors of other modules about the deprecation.
Further, we should maintain something like a deprecation info file because nobody reads @deprecated tags.
All of the above will not protect us from systems where modules aren't up to date. We also have to implement a mechanism where it is still possible to disable faulty modules.
2016-11-16 16:17:42 +01:00
Johannes Meyer f1a1f41192 Module: Drop deprecated method registerHook and arg $key of method provideHook 2016-11-11 16:15:59 +01:00
Alexander A. Klimov 1cd2cfbdc9 Revert "Make hooks respect module permissions"
This reverts commit 4d2e6d2d87.
2016-11-11 11:14:23 +01:00
Alexander A. Klimov 4d2e6d2d87 Make hooks respect module permissions
refs #12396
2016-10-20 18:28:19 +02:00
Johannes Meyer 7ed3acbbd8 Module: Check a menu item's permission and don't overwrite its label
This allows now totally different values for an item's name and label
and fixes the bug that permissions declared in the configuration.php
were not evaluated for menu items.

fixes #11431
2016-09-26 11:01:26 +02:00
Eric Lippmann 54b43efb33 Fix exception if module.info contains newlines that are not part of the module's description
fixes #11831
2016-06-06 16:21:10 +02:00
Thomas Gelf b63d2ad291 Module: fix multi-instance hook registrations
This fixes the problem that registering the same Hook multiple times
with the provideHook shortcut and no class name kept only one
implementation
2016-02-17 10:30:25 +01:00
Alexander A. Klimov 474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann 8835552e80 Deprecate Module::registerHook() in favor of Module::provideHook()
refs #9685
2015-12-21 10:30:40 +01:00
Thomas Gelf 4b9607ad35 Module: we want to load from ProvidedHook
refs #10613
2015-11-13 17:37:02 +01:00
Thomas Gelf 380f11d9c2 Module: add new provideHook method 2015-11-13 17:37:02 +01:00
Thomas Gelf b7189382fb Module: add getNamespace() method 2015-11-13 17:37:02 +01:00
Thomas Gelf b66e4dfdf2 Module: use Application\Hook instead of Web\Hook 2015-11-13 17:37:02 +01:00
Thomas Gelf 54db2c9afa Module::registerHook: use class as default key
refs #9685
2015-11-13 17:37:02 +01:00
Thomas Gelf d0ce9f86d8 Module: less stat calls, less work to do 2015-11-13 11:53:14 +01:00
Thomas Gelf f9a0e7dec6 Module: provide getApplicationDir() 2015-11-13 11:52:13 +01:00
Johannes Meyer b4bcfa4e08 NavigationController: Register navigation item types differently
refs #10246
2015-09-29 17:12:57 +02:00
Johannes Meyer 8c17364780 Late translate a module's menu section labels
refs #5600
2015-09-16 14:36:35 +02:00
Johannes Meyer 8b7a1ce28f Late translate a module's dashboard-pane/dashlet labels
refs #5600
2015-09-16 14:29:33 +02:00
Johannes Meyer 0ca6e04a5a Module: Allow to pass a label for a custom navigation item type
refs #5600
2015-09-16 13:51:35 +02:00
Johannes Meyer ccae7c4d0d Module: Allow to define a dashboard pane's properties
Since dashboards are now alphabetically sorted as well, we need some way
to affect this as the old behaviour was to sort them as they were registered

refs #5600
2015-09-15 13:54:53 +02:00
Johannes Meyer 1be6dc0553 Module.php: Allow modules to provide configurable navigation items
refs #5600
2015-09-07 11:06:11 +02:00
Johannes Meyer 95a61e89a9 Module: Fix how dashlets are loaded
refs #5600
2015-09-04 15:51:33 +02:00
Johannes Meyer 70a48643c1 Add class DashboardContainer
refs #5600
2015-09-04 15:25:19 +02:00