Commit Graph

31 Commits

Author SHA1 Message Date
Johannes Meyer 2e5abbc832 Use ipl-i18n's `Translation` trait where applicable 2021-05-28 14:03:36 +02:00
Alexander A. Klimov d7e3547c6e CLI: write errors to stderr 2020-11-30 15:35:20 +01:00
Eric Lippmann 98b8631db3 Optimize imports 2019-07-12 14:23:41 +02:00
Eric Lippmann 6fa5af4de1 CLI: Automatically load enabled modules if not disabled 2019-07-12 14:23:41 +02:00
Johannes Meyer 5d9aa0895f
Merge pull request #3570 from MVKozlov/patch-1
Return non-zero on display usage
2019-05-22 12:21:46 +02:00
Max Kozlov 27d12163c4 Icingacli should return UNKNOWN code, showUsage() also should return non-zero 2019-05-21 09:48:38 +03:00
Johannes Meyer 498f37d4ff
Command: Function getMainConfig should not deliver module config
Co-Authored-By: mxhash <mxhash@users.noreply.github.com>
2019-04-26 14:37:06 +02:00
Marius Hein ae469311be Fix uninitialized array and module in Cli\Command 2018-09-24 13:48:22 +02:00
Alexander A. Klimov b79c140c43 Correct CLI help text for modules
refs #2801
2017-05-30 17:55:52 +02: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
Johannes Meyer 9240d1b4e0 cli: Polish log handling
* Reintroduced Command::$isDebugging, now without typo
* Removed @deprecated from Command::$isVerbose
* Changed default log level to WARNING
* Adjusted --verbose and --debug to activate log level INFO and DEBUG, respectively
2016-01-21 11:29:28 +01:00
Johannes Meyer 37dc601505 Command: Remove property "isDebugging"
It's not used anywhere and wrong initalized anyway.
2016-01-19 15:08:20 +01:00
Johannes Meyer be239b9a22 Cli: Configure logging properly but also offer customisations 2016-01-19 15:07:17 +01:00
Alexander A. Klimov 327cf37326 Command: make $config and $configs protected 2015-11-03 16:11:20 +01:00
Alexander A. Klimov e170d5b79a Command::fail(): construct IcingaException printf-like
The first argument of IcingaException::__construct() must be a printf-like format string, but Command::fail() must accept any message string.
2015-11-03 10:45:39 +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 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 70c564bb0e Cli: Remove useless sprintf format in Command::fail() 2014-12-30 14:41:00 +01:00
Eric Lippmann 8eb37d9d76 Cli/Command: Add @type PHPDoc to params 2014-12-30 14:33:36 +01:00
Alexander Klimov 45638b218c Throw IcingaException rather than Exception
fixes #7014
2014-08-27 16:03:15 +02:00
Thomas Gelf a38d71f17c Cli\Command: provide Config()
This makes it feel more like action controllers

fixes #6954
2014-08-19 10:27:26 +02:00
Johannes Meyer 3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Alexander Klimov b410ebeed6 Remove unnecessary spaces at end of line 2014-03-06 13:08:11 +01:00
Johannes Meyer 68357e9ca2 Fix coding style 2014-02-21 14:07:32 +01:00
Thomas Gelf 6096b23a76 CLI fix for --watch, hide autocomplete documentation 2014-02-14 13:19:56 +00:00
Johannes Meyer bd34669357 Refactor i18n implementation
One can now use $this->translate(msg) in a view or controller without the
need to pass the module domain (web&cli). Forms still need to be built
with _t(msg) and _mt(dom, msg).

refs #5533
2014-01-29 16:25:08 +01:00
Thomas Gelf 5661e41c73 Trace option for CLI commands
Added --trace to show full stack trace if an exception is thrown

fixes #5555
2014-01-22 12:08:20 +00:00
Thomas Gelf a25cd80ec0 CLI interface: initial import 2013-10-22 12:26:45 +00:00