Commit Graph

83850 Commits

Author SHA1 Message Date
Ricardo Dias
06066f0dda
mgr/dashboard_v2: Updated README with instruction on how to mock ceph modules
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:05 +00:00
Ricardo Marques
468e384f0e
mgr/dashboard_v2: Add breadcrumb on Hosts page
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:05 +00:00
Ricardo Marques
437e3c6561
mgr/dashboard_v2: Move hosts option to cluster menu
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:05 +00:00
Ricardo Dias
c803df1335
mgr/dashboard_v2: mocking of rados and rbd modules
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:05 +00:00
Ricardo Dias
41205565c6
mgr/dashboard_v2: Updated README with notification queue instructions
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:04 +00:00
Ricardo Dias
b7c2ffaf24
mgr/dashboard_v2: Notification queue
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:04 +00:00
Sebastian Wagner
7eca79059e
mgr/dashboard_v2: Fix linting errors
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:07:04 +00:00
Volker Theile
5243334071
mgr/dashboard_v2: Mark text with the i18n attribute
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:04 +00:00
Volker Theile
8ea25896db
mgr/dashboard_v2: Use Awesome Bootstrap Checkbox.
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:04 +00:00
Sebastian Wagner
bd38d90fd9
mgr/dashboard_v2: Refactored logging
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:07:04 +00:00
Ricardo Marques
cbf9bfcd31
mgr/dashboard_v2: Don't use localized config for auth
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:04 +00:00
Volker Theile
814938beb1
mgr/dashboard_v2: Session expire at browser close
Add support for session expire at browser close.

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:04 +00:00
Patrick Nawracay
f4624947d6
mgr/dashboard_v2: Fix content type (body) of error page
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-03-05 13:07:03 +00:00
Patrick Nawracay
c866b73377
mgr/dashboard_v2: Fix content type of JSON responses
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
2018-03-05 13:07:03 +00:00
Sebastian Wagner
8ba6e24b3a
mgr/dashboard_v2: Added status route to cluster
* `RESTController`: added `@detail_route`
* Fixed `RequestHelper.assertJsonBody`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:07:03 +00:00
Ricardo Marques
9a8a742890
mgr/dashboard_v2: Rename "host" module to "cluster"
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:03 +00:00
Ricardo Marques
e47eaf3fc4
mgr/dashboard_v2: Fix typo on method isLoginActive
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:03 +00:00
Ricardo Marques
274cf8e359
mgr/dashboard_v2: Add hosts page
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:03 +00:00
Ricardo Dias
77e5bf4f5f
mgr/dashboard_v2: Fix bug in AuthRequired decorator
This PR fixes the fllowing bug:
When a subclass of `RESTController` was decorated with the `AuthRequired`
decorator, then all controllers that were also subclasses of
`RESTController` were automatically required authentication when accessing
them.

Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:03 +00:00
Volker Theile
f416efcf8c
mgr/dashboard_v2: Refactor controller base class
Make it a little bit more OO. This way the mgr and logger properties are well
designed and documented which should help contributors to understand the code.

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:03 +00:00
Sebastian Wagner
d0b166cfe8
mgr/dashboard_v2: Added API controller listing endpoint.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:07:02 +00:00
Ricardo Dias
cfa9130d79
mgr/dashboard_v2: Updated README with more developer notes
* Adds instructions on how to access the manager module instance from
  within the controller.
* Adds instructions on how to write unit tests to test a controller

Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:02 +00:00
Ricardo Dias
fa9e93be3c
mgr/dashboard_v2: Refactoring of the access to mgr module instance
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:02 +00:00
Tiago Melo
1d2b792930
mgr/dashboard_v2: simplify router and fix navigation
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-03-05 13:07:02 +00:00
Ricardo Dias
275a315354
mgr/dashboard_v2: removed auth handler form test_auth.py setup
The auth setup is already being set in module.py

Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:02 +00:00
Volker Theile
454e5f3d9c
mgr/dashboard_v2: Disable CherryPi autoreload feature.
It does not work, either with the below code to fix the error

```
2018-01-26 13:21:15.779 7fa454add700 -1 log_channel(cluster) log [ERR] : Unhandled exception from module 'dashboard_v2' while running on mgr.x: execv() arg 2 must not be empty
2018-01-26 13:21:15.779 7fa454add700 -1 dashboard_v2.serve: File "/ceph/src/pybind/mgr/dashboard_v2/module.py", line 112, in serve
```

```
def _get_true_argv():
    return sys.argv[:]
cherrypy.engine._get_true_argv = _get_true_argv
```

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:02 +00:00
Volker Theile
289050f3ee
mgr/dashboard_v2: several code style enhancements
* Replace double quotes with single quotes
* Modify log messages
* Fix typo, rename autenticate to authenticate

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:07:02 +00:00
Ricardo Dias
c1a683ed75
mgr/dashboard_v2: fix pycodestyle to exclude the frontend files
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
d57b092f28
mgr/dashboard_v2: add support for frontend CI coverage and unit testing
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
34c189ee8d
mgr/dashboard_v2: .gitignore update
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
371f2634c7
mgr/dashboard_v2: Added unit test for module.py
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
6fd59d1bd2
mgr/dashboard_v2: Moved set-login-cred command logic to Auth class
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
5ec7d35157
mgr/dashboard_v2: Unit tests refactoring
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Marques
acd7b6f5a7
mgr/dashboard_v2: Rename angular components prefix
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Marques
54b00a99e9
mgr/dashboard_v2: Add frontend login/logout
Signed-off-by: Ricardo Marques <rimarques@suse.com>
2018-03-05 13:07:01 +00:00
Ricardo Dias
4fd405e8d7
mgr/dashboard_v2: Combine coverage and tests results from py27 and py3
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:00 +00:00
Ricardo Dias
694a3052af
mgr/dashboard_v2: Fix pylint executor and warnings/errors
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:00 +00:00
Ricardo Dias
17ac1cd6f1
mgr/dashboard_v2: Refactoring of unit tests
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:00 +00:00
Sebastian Wagner
85344da61c
mgr/dashboard_v2: Added RESTController test case
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:07:00 +00:00
Tiago Melo
1f21d68f1b
mgr/dashboard_v2: add initial frontend code
This contains the angular boilerplate, some initial structure and the navigation component.
Signed-off-by: Tiago Melo <tmelo@suse.com>
2018-03-05 13:07:00 +00:00
Ricardo Dias
b37a3b60b5
mgr/dashboard_v2: Renamed/moved RESTResource to RESTController
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:00 +00:00
Ricardo Dias
1021615bd5
mgr/dashboard_v2: Added developer notes to README
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:07:00 +00:00
Ricardo Dias
ec57819386
mgr/dashboard_v2: Very simple ping example
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:06:59 +00:00
Ricardo Dias
1333d3d63e
mgr/dashboard_v2: auth module refactoring
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:06:59 +00:00
Ricardo Dias
d418853a87
mgr/dashboard_v2: pass json body keys as args to REST resource methods
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-03-05 13:06:59 +00:00
Volker Theile
7d42d042ec
mgr/dashboard_v2: Ignore the __pycache__ directory.
Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:06:59 +00:00
Sebastian Wagner
005105023a
mgr/dashboard_v2: use float values when checking session expire time
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:06:59 +00:00
Sebastian Wagner
82faee01bc
mgr/dashboard_v2: Added test_restresource.py
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2018-03-05 13:06:59 +00:00
Volker Theile
654c35e3b0
mgr/dashboard_v2: Log script_name on unauthorized access
This commit also replaces double quotes with single quotes.

Signed-off-by: Volker Theile <vtheile@suse.com>
2018-03-05 13:06:59 +00:00
Lenz Grimmer
01eeb84996
mgr/dashboard_v2: Updated README
Signed-off-by: Lenz Grimmer <lgrimmer@suse.com>
2018-03-05 13:06:59 +00:00