Commit Graph

23 Commits

Author SHA1 Message Date
Matthias Jentsch 7353797147 Add server-side logging when not existing components are required and fix code style issues
refs #4456
2013-08-21 09:40:32 +02:00
Matthias Jentsch 5e663846a5 Remove old module loader
Remove old (now-unusable) module loader and components and corresponding unit
tests. Give the component loader and the component registry more meaningful names.

refs #4456
2013-08-21 09:40:32 +02:00
Matthias Jentsch 52c66893ab Add new component loader to load frontend-components
Add a component loader that finds components by searching for elements with the
"data-icinga-component" attribute and loads the corresponding JavaScript file
from the backend to render the component.

refs #4456
2013-08-21 09:40:31 +02:00
Johannes Meyer 5e48999478 Add --vagrant switch to the javascript style-checker
Added -V|--vagrant switch to the javascript style-checker
to run the checks in the Vagrant VM

refs #4264
2013-07-01 12:08:01 +02:00
Johannes Meyer d7ebe7fa08 Add --vagrant switch to the javascript test-runner
Added -V|--vagrant switch to the javascript test-runner
to run the tests in the Vagrant VM

refs #4264
2013-07-01 12:08:01 +02:00
Jannis Moßhammer 03d8627436 Remove console.debug move to console.log
This caused the mocha_results.xml to contain
the application outpu

refs #4349
2013-06-27 11:19:04 +02:00
Jannis Moßhammer 35c43446d8 Add support for lazy module loading
When the X-Icinga-Module-Enable header is send, the
modulemanager automatically tries to load javascript files for
that module. This is realized by adding the 'registerHeaderListener'
method to the async manager, which allows to listen to specific headers
and firing callbacks if a response with the specified header is retrieved.

Also the tests have changed a bit, requireNow should be used when using
the requiremock, so a require always loads files new.

refs #4092
refs #3753
2013-06-21 15:33:06 +02:00
Jannis Moßhammer 36c8e0df4a Fix test for new module route
The js base route is now js/modules/%modulename%/%file%. This
commit reflects these changes in the testcases

refs #4092
refs #3735
2013-06-21 11:41:58 +02:00
Jannis Moßhammer 0d0db281f7 Test and icinga.js module setup procedure
Behaviours are now modules and icinga.js automatically
requests module/list (which should be served by the application
and is non static) and retrieves a list of modules to request and
enable.

refs #3753
2013-06-17 11:22:53 +02:00
Jannis Moßhammer 63f7b8016e Add tests for javascript module implementation
This commit adds tests for the module loader and registry of
icinga2-web. It mainly registers event handlers and calls
custom enable/disable functions

refs #3753
2013-06-17 11:22:53 +02:00
Jannis Moßhammer 21e4ec1727 Fix wrong variable name in requiremock's getDefine
The getDefine method check's for existence of the 'arg' variable,
which was renamed to 'name', causing the typeof arg === "undefined"
to always return true

refs #4308
2013-06-14 09:50:06 +02:00
Jannis Moßhammer d2cd52218a Add mockup for requirejs
Tests can now call require('requiremock') to bootstrap an alternative
requirejs implementation and use the resulting object for defining
dependencies and mocks

refs #4308
2013-06-13 17:29:38 +02:00
Johannes Meyer 7e14a2077d Add include and exclude handling to the js style-checker.
--include and --exclude now accept unix shell-style patterns.

refs #4244
2013-06-11 18:25:21 +02:00
Johannes Meyer 7c779bc525 Improve path handling of the js style-checker. 2013-06-11 18:25:21 +02:00
Johannes Meyer 5e70dfb87e Rewrite javascript style-checker.
--include and --exclude are not working yet.

refs #4244
2013-06-11 18:25:21 +02:00
Johannes Meyer 10c1b1a548 Rewrite javascript test-runner.
refs #4244
2013-06-11 18:25:21 +02:00
Marius Hein 29f032502c Integrate regression tests
Add js regression structure and configured mocha
2013-06-04 17:20:18 +02:00
Johannes Meyer 4b225eccee Fix: Style-checkers report their output to wrong location 2013-06-03 16:07:52 +02:00
Marius Hein 71f2c408df Integrate PHPCS
Fix absolute directory issue.

refs #4070
refs #4098
refs #4099
2013-06-03 15:29:54 +02:00
Marius Hein 0592bff4ef Build server
Add absolute directory for helper scripts

refs #4067
refs #4213
refs #4099
refs #4098
refs #4214
2013-06-03 15:13:42 +02:00
Johannes Meyer ee63f3fbd8 Make Git ignore build/* and create it as needed.
refs #4068
refs #4070
refs #4098
refs #4099
2013-06-03 10:36:27 +02:00
Johannes Meyer 5118432b82 Add support for jshint reports.
Integrated style-checker for javascript source code.

refs #4098
2013-05-31 13:52:12 +02:00
Johannes Meyer 3544af245f Add support for javascript unittests.
Integrated test-runner for Mocha which covers
test-execution and code-coverage measurement.

refs #4099, refs #4087
2013-05-31 13:51:07 +02:00