Commit Graph

29 Commits

Author SHA1 Message Date
Marius Hein 81cdb70b31 CS: Add license header to js test files 2013-10-04 15:32:39 +02:00
Jannis Moßhammer 376dc8cd0f Document form and container behaviour and simplify
Now the whole page gets refreshed on container changes, if
we encounter issues with that we can improve it afterwards
or roll back some cahnges already made in previous commits

refs #4611
2013-09-23 13:56:59 +02:00
Jannis Moßhammer 6d26240d6d Add Main detail state to url, renderhelper, container tests
-   The ActionController is now able to render a seperate detail view
-   All list scripts select the currently active row from the detail view with
    the 'active' class
-   Autosubmit is now again attached to the onchange attribute (to prevent issues
    when js can't load correctly)
-   Logout is now recognized and causes a page refresh (will be made more generic)
-   Add history mock for testing url changes
-   Update all grids to implement the app/mainDetailGrid component

refs #4611
2013-09-23 13:56:57 +02:00
Jannis Moßhammer e6b3a54e90 Add/modify JavaScript components for main/detail and their tests
This commit introduces the following changes (although they are not
implemented in the templates, this follows):
- links in the top and navigation bar are loaded in the background
- generic main/detail container component handling click/load delegation
- mainDetailGrid implementation handling selection and render targets
- Generic history implementation handling URI change detection and reloading

refs #4611
2013-09-23 13:55:49 +02:00
Jannis Moßhammer 57e66c247a Add sort widget, change js path from module to app, small style fixes
refs #4601
2013-09-04 15:22:00 +02:00
Jannis Moßhammer a8b3716662 Fix checkswag not testing jshint correctly
The path was wrong, now it is correct.

refs #4617
2013-09-02 10:59:05 +02:00
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