Commit Graph

13029 Commits

Author SHA1 Message Date
Jannis Moßhammer 39fff006de Merge branch 'feature/module-enable-4092' of ssh://git.icinga.org/icinga2-web into feature/module-enable-4092 2013-06-26 16:52:25 +02:00
Marius Hein 72bb02d390 Module administration
Rebase fix ldap auth for testing issue.

refs #4092
2013-06-26 16:48:07 +02:00
Jannis Moßhammer d1f4e9831a Fix empty module folder causing errors, fix var naming
Fix a wrongly named class causing ClassNotFound issues,
also added additional checks for empty module folder and
added en moduleFolder directive to configure module location

refs #4092
2013-06-26 16:41:07 +02:00
Jannis Moßhammer 5e5b301d0d 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-26 16:41:07 +02:00
Jannis Moßhammer 33b4a2ced0 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-26 16:41:07 +02:00
Jannis Moßhammer fc83dfb4ef Add javascript autoloading
the js/modules/%modulename%/%file% is now mapped to the module
path (if existing). To prevent name clashing, the modules folder
has been renamed to components.
2013-06-26 16:40:33 +02:00
Jannis Moßhammer c1e460de17 Remove moved files
the 'behaviour' namespace in javascript has been renamed to
module

refs #4092
2013-06-26 16:40:08 +02:00
Jannis Moßhammer 81bbee7e24 Add clearstatcache and tests for ModuleManager
Added the clearstatcache call before enabling or disabling modules,
as this prevents a 'File exists' error that occurs sometimes on
symlink creation (even when the folder is empty). Also added tests
for teh moduleManager

refs #4092
2013-06-26 16:39:55 +02:00
Jannis Moßhammer 8b84de934a Move ModuleController from incubator
The Notification dependency is removed and uses exceptions now,
otherwise it's mostly the same like in the incubator

refs #4092
2013-06-26 16:39:55 +02:00
Jannis Moßhammer beaac3a68d Add rule for 'body' container and QLink property 'target'
QLinks can now define the target for their link. Additionally, the
targte 'body' is now always the <body> tag. This allows the
modulemanager to reload the whole page (with the navigation bar).

refs #4092
2013-06-26 16:37:39 +02:00
Jannis Moßhammer e9ade7a339 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-26 16:37:12 +02:00
Jannis Moßhammer c25ea37fd8 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-26 16:37:12 +02:00
Jannis Moßhammer d94d89e1cf Add javascript autoloading
the js/modules/%modulename%/%file% is now mapped to the module
path (if existing). To prevent name clashing, the modules folder
has been renamed to components.
2013-06-26 16:37:12 +02:00
Jannis Moßhammer 3a5a4bf273 Remove moved files
the 'behaviour' namespace in javascript has been renamed to
module

refs #4092
2013-06-26 16:36:47 +02:00
Jannis Moßhammer 3490469727 Add clearstatcache and tests for ModuleManager
Added the clearstatcache call before enabling or disabling modules,
as this prevents a 'File exists' error that occurs sometimes on
symlink creation (even when the folder is empty). Also added tests
for teh moduleManager

refs #4092
2013-06-26 16:36:36 +02:00
Jannis Moßhammer 4f2fb49555 Move ModuleController from incubator
The Notification dependency is removed and uses exceptions now,
otherwise it's mostly the same like in the incubator

refs #4092
2013-06-26 16:36:36 +02:00
Jannis Moßhammer 34f68856ee Add rule for 'body' container and QLink property 'target'
QLinks can now define the target for their link. Additionally, the
targte 'body' is now always the <body> tag. This allows the
modulemanager to reload the whole page (with the navigation bar).

refs #4092
2013-06-26 16:36:36 +02:00
Jannis Moßhammer 5c167563fa Add SystemPermissionException
This exception should be fired when the OS restricts the web user
from executing certain actions. Also the template for errors has
been modified so it displays the action and the target that
was prevented.

refs #4092
2013-06-26 16:36:14 +02:00
Jannis Moßhammer f33f1e77f9 Rebase with master
refs #4092
2013-06-26 16:08:44 +02:00
Jannis Moßhammer 677593cf8c Fix empty module folder causing errors, fix var naming
Fix a wrongly named class causing ClassNotFound issues,
also added additional checks for empty module folder and
added en moduleFolder directive to configure module location

refs #4092
2013-06-26 16:05:01 +02:00
Marius Hein 901a49b44a Merge branch 'bugfix/auth-fix-4340'
fixes #4340
2013-06-25 12:26:59 +02:00
Marius Hein a1327a384c Fix Authentication workflow
Fix ldap backends to use Credentials to work with. Fix
some tests to use include right files.

refs #4340
2013-06-25 12:24:52 +02:00
Jannis Moßhammer 8192c19424 Fix Authentication workflow
- The authentication controller now uses the Authentication/Manager class,
also there were some issues in the Session creation, this has been removed
from the Bootstrap now, as the Controller must decide how to open a session
(read-only or read/write).
- The tests reflect a few chagnes, as the move from the CSRF token generation
to the Formbuilder.
- Notificaiton now doesn't use Zend Session

refs #4340
2013-06-25 11:54:42 +02:00
Marius Hein 1ec6a43c9f Merge branch 'feature/history-api-4303'
fixes #4303
2013-06-25 11:46:12 +02:00
Marius Hein 27c5f459b1 History API
Remove dangling symlink and add symlink to .gitignore

refs #4303
2013-06-25 11:45:03 +02:00
Jannis Moßhammer f93344330e Rename require reference to requirejs
Require is a reserverd word for phantomjs

refs #4315
refs #4303
2013-06-25 11:18:27 +02:00
Jannis Moßhammer 04f7149cfe Allow container-based url in history api
When a url is now loaded for an non-main container, the url for the
container is appended to the GET part of the URL

refs #4303
2013-06-25 11:18:27 +02:00
Jannis Moßhammer a8019222f5 Add History Api test
Add CasperJS Tests for History API (~80%). Also provides a few
resources like the generic.html site that can be used for more
setups

refs #4303
refs #4315
2013-06-25 11:18:27 +02:00
Jannis Moßhammer 4ed11dba4c Add 'public' symlink creation to runtests
Runtest now creates a symlink to the public folder when it doesn't
exist, allowing the built-in server to access the js files
without too much hassle

refs #4303
refs #4315
2013-06-25 11:18:26 +02:00
Jannis Moßhammer 0694973c88 Add history api and modify js for tests
All JS Files now call 'requirejs' instead of 'require', also
the holder.js reference is removed and the history api added.
Tests are following in the next commit

refs #4303
refs #4315
2013-06-25 11:18:26 +02:00
Jannis Moßhammer b46dd9bae4 Remove behaviour files
These files are not required anymore as they are
now renamed to 'modules' and may affect testting

refs #3753
refs #4303
2013-06-25 11:18:26 +02:00
Marius Hein 88b1779a4b Merge branch 'bugfix/casper-env-4315'
fixes #4315
2013-06-25 10:24:32 +02:00
Jannis Moßhammer e075db3800 Add temporary http server for casperjs tests
Added a static folder and spawn a small HTTP server on runtests.
This is not really the best solution, as it uses pythons
simpleHTTPServer, but it works for now

refs #4315
2013-06-25 10:22:52 +02:00
Jannis Moßhammer c239117c55 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-25 09:53:21 +02:00
Jannis Moßhammer 01611d8a8b 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-25 09:53:21 +02:00
Jannis Moßhammer 6881c8d074 Add javascript autoloading
the js/modules/%modulename%/%file% is now mapped to the module
path (if existing). To prevent name clashing, the modules folder
has been renamed to components.
2013-06-25 09:53:21 +02:00
Jannis Moßhammer 04511121b1 Remove moved files
the 'behaviour' namespace in javascript has been renamed to
module

refs #4092
2013-06-25 09:53:21 +02:00
Jannis Moßhammer de34c2729f Add clearstatcache and tests for ModuleManager
Added the clearstatcache call before enabling or disabling modules,
as this prevents a 'File exists' error that occurs sometimes on
symlink creation (even when the folder is empty). Also added tests
for teh moduleManager

refs #4092
2013-06-25 09:53:21 +02:00
Jannis Moßhammer 04a23f0096 Move ModuleController from incubator
The Notification dependency is removed and uses exceptions now,
otherwise it's mostly the same like in the incubator

refs #4092
2013-06-25 09:53:21 +02:00
Jannis Moßhammer 81e27689bb Add rule for 'body' container and QLink property 'target'
QLinks can now define the target for their link. Additionally, the
targte 'body' is now always the <body> tag. This allows the
modulemanager to reload the whole page (with the navigation bar).

refs #4092
2013-06-25 09:53:21 +02:00
Jannis Moßhammer 0f8648dcb1 Add SystemPermissionException
This exception should be fired when the OS restricts the web user
from executing certain actions. Also the template for errors has
been modified so it displays the action and the target that
was prevented.

refs #4092
2013-06-25 09:53:21 +02:00
Marius Hein 8d1038e622 Refactor and test \Icinga\Web\Form
Fix inspection issues, added some other code for testing to
have more coverage, fix test for QLink view helper.

refs #4302
refs #4341
2013-06-25 09:43:55 +02:00
Jannis Moßhammer 5cddbd1162 Add Form\Builder
The builder class allows to create forms and bind them to
models. The tests are currently failing because of the zend
pluginloader, this must be evaluated

refs #4302
2013-06-24 18:48:32 +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 e759911b09 Add javascript autoloading
the js/modules/%modulename%/%file% is now mapped to the module
path (if existing). To prevent name clashing, the modules folder
has been renamed to components.
2013-06-21 11:36:12 +02:00
Jannis Moßhammer c40c1dabc7 Remove moved files
the 'behaviour' namespace in javascript has been renamed to
module

refs #4092
2013-06-21 09:54:56 +02:00
Jannis Moßhammer c72fa101ed Add clearstatcache and tests for ModuleManager
Added the clearstatcache call before enabling or disabling modules,
as this prevents a 'File exists' error that occurs sometimes on
symlink creation (even when the folder is empty). Also added tests
for teh moduleManager

refs #4092
2013-06-21 09:54:56 +02:00
Jannis Moßhammer fd489484e1 Move ModuleController from incubator
The Notification dependency is removed and uses exceptions now,
otherwise it's mostly the same like in the incubator

refs #4092
2013-06-21 09:54:55 +02:00
Jannis Moßhammer 076b8a9af9 Add rule for 'body' container and QLink property 'target'
QLinks can now define the target for their link. Additionally, the
targte 'body' is now always the <body> tag. This allows the
modulemanager to reload the whole page (with the navigation bar).

refs #4092
2013-06-21 09:54:55 +02:00