]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agomgr/dashboard_v2: Service class base code
Ricardo Dias [Wed, 21 Feb 2018 16:05:40 +0000 (16:05 +0000)]
mgr/dashboard_v2: Service class base code

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Data transform in k/v table
Stephan Müller [Fri, 16 Feb 2018 16:26:44 +0000 (17:26 +0100)]
mgr/dashboard_v2: Data transform in k/v table

The key value table can transform the input data into key value objects
now, you don't have to care about that anymore.

Also the first column of the data used in cd-table will be sorted if
not set manual through the "sorts" array.

Signed-off-by: Stephan Müller <smueller@suse.com>
7 years agomgr/dashboard_v2: Also protect `/api`
Sebastian Wagner [Wed, 21 Feb 2018 14:46:40 +0000 (15:46 +0100)]
mgr/dashboard_v2: Also protect `/api`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Fixed capitalization on login page
Lenz Grimmer [Wed, 21 Feb 2018 10:52:07 +0000 (11:52 +0100)]
mgr/dashboard_v2: Fixed capitalization on login page

Changed "ceph" to "Ceph" in the welcome message.

Signed-off-by: Lenz Grimmer <lgrimmer@suse.com>
7 years agomgr/dashboard_v2: Improve empty row style
Ricardo Marques [Wed, 21 Feb 2018 10:46:28 +0000 (10:46 +0000)]
mgr/dashboard_v2: Improve empty row style

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Reorder menu entries
Ricardo Marques [Wed, 21 Feb 2018 10:14:49 +0000 (10:14 +0000)]
mgr/dashboard_v2: Reorder menu entries

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Add footer and header to hosts table
Ricardo Marques [Tue, 20 Feb 2018 16:56:56 +0000 (16:56 +0000)]
mgr/dashboard_v2: Add footer and header to hosts table

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Auto refresh hosts
Ricardo Marques [Tue, 20 Feb 2018 10:37:52 +0000 (10:37 +0000)]
mgr/dashboard_v2: Auto refresh hosts

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Prevent double click on table refresh
Ricardo Marques [Tue, 20 Feb 2018 16:46:23 +0000 (16:46 +0000)]
mgr/dashboard_v2: Prevent double click on table refresh

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Migrate cluster configuration
Patrick Nawracay [Mon, 19 Feb 2018 11:50:11 +0000 (12:50 +0100)]
mgr/dashboard_v2: Migrate cluster configuration

This commit adds the ability to retrieve and filter the cluster
configuration of Ceph through the RESTful API.

Parameters `level` and `service` can be added to filter the list.

Example:

    http://<host>:<port>/api/cluster_conf?level=basic&service=mds

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Add iSCSI page
Ricardo Marques [Fri, 16 Feb 2018 11:48:20 +0000 (11:48 +0000)]
mgr/dashboard_v2: Add iSCSI page

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Use monospace font on logs
Ricardo Marques [Mon, 19 Feb 2018 14:48:07 +0000 (14:48 +0000)]
mgr/dashboard_v2: Use monospace font on logs

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: add filesystem page
Tiago Melo [Thu, 15 Feb 2018 18:40:01 +0000 (18:40 +0000)]
mgr/dashboard_v2: add filesystem page

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Datatable related code improvements
Volker Theile [Thu, 15 Feb 2018 10:16:11 +0000 (11:16 +0100)]
mgr/dashboard_v2: Datatable related code improvements

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Add port to `ControllerTestCase.__init__`
Sebastian Wagner [Tue, 13 Feb 2018 16:26:27 +0000 (17:26 +0100)]
mgr/dashboard_v2: Add port to `ControllerTestCase.__init__`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Added tcmu iSCSI controller.
Sebastian Wagner [Tue, 13 Feb 2018 16:22:26 +0000 (17:22 +0100)]
mgr/dashboard_v2: Added tcmu iSCSI controller.

* Based on `mgr/dashboard/rbd_iscsi.py`.
* Fixed Python3 compatibility issues.
* Added test.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Add bin dir to PATH
Sebastian Wagner [Tue, 13 Feb 2018 16:24:04 +0000 (17:24 +0100)]
mgr/dashboard_v2: Add  bin dir to PATH

Add `<repo>/build/bin` to `PATH` when running unit tests.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Create links to perf counters
Volker Theile [Thu, 15 Feb 2018 16:14:56 +0000 (17:14 +0100)]
mgr/dashboard_v2: Create links to perf counters

- Display links to the services in the Hosts data table
- Add missing MDS performance counter backend

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: add 404 page
Tiago Melo [Fri, 9 Feb 2018 19:49:55 +0000 (19:49 +0000)]
mgr/dashboard_v2: add 404 page

Add a 404 page that will be triggered every time the user tries to
access a route that does not exists or the servers responds with 404.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Renamed `block_pool` controller to `rbd`
Sebastian Wagner [Thu, 15 Feb 2018 14:51:53 +0000 (15:51 +0100)]
mgr/dashboard_v2: Renamed `block_pool` controller to `rbd`

* Simplified the API
* Fixed and improved the rbd controller tests.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: add monitors page
Tiago Melo [Wed, 14 Feb 2018 16:05:56 +0000 (16:05 +0000)]
mgr/dashboard_v2: add monitors page

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add router link table template
Tiago Melo [Wed, 14 Feb 2018 16:28:32 +0000 (16:28 +0000)]
mgr/dashboard_v2: add router link table template

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add sparkline component
Tiago Melo [Wed, 14 Feb 2018 15:53:58 +0000 (15:53 +0000)]
mgr/dashboard_v2: add sparkline component

This also adds a template in the table component.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: move datatable module
Tiago Melo [Wed, 14 Feb 2018 15:49:39 +0000 (15:49 +0000)]
mgr/dashboard_v2: move datatable module

By moving the datatable module outside of the  components module we
can avoid a circular dependency between the datatable and sparkline
component.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add performance counter page
Tiago Melo [Wed, 14 Feb 2018 15:13:35 +0000 (15:13 +0000)]
mgr/dashboard_v2: add performance counter page

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Migrate standby module
Patrick Nawracay [Wed, 14 Feb 2018 09:14:35 +0000 (10:14 +0100)]
mgr/dashboard_v2: Migrate standby module

This commit will add a StandbyModule class to enable redirects from any
inactive MGR instance to the active MGR instance.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Updated README.rst, added HACKING.rst
Lenz Grimmer [Thu, 15 Feb 2018 11:28:41 +0000 (12:28 +0100)]
mgr/dashboard_v2: Updated README.rst, added HACKING.rst

Moved developer-related documentation from `README.rst` to a
new file `HACKING.rst`.

Converted `frontend/README.md` to ReST and merged it into `HACKING.rst`.

Added updates to the README provided by @rjfd in PR#83
(updated the whole unit tests content to match the latest changes
on unit test execution, updated the development notes about
controller development)

Signed-off-by: Lenz Grimmer <lgrimmer@suse.com>
7 years agomgr/dashboard_v2: adapt pool detail with cache view component
Tiago Melo [Fri, 9 Feb 2018 19:15:01 +0000 (19:15 +0000)]
mgr/dashboard_v2: adapt pool detail with cache view component

This modifies how pool detail show the cache information to the user
and implements a continuous update of the images information.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add view cache component
Tiago Melo [Fri, 9 Feb 2018 19:10:50 +0000 (19:10 +0000)]
mgr/dashboard_v2: add view cache component

This component should be used in components that access endpoints
that implement ViewCache.
It will inform the user if the data is stale or if there were some
problems fetching it.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: fix visibility of frontend class properties
Ricardo Dias [Wed, 14 Feb 2018 18:09:15 +0000 (18:09 +0000)]
mgr/dashboard_v2: fix visibility of frontend class properties

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: add node as a local dependency
Tiago Melo [Tue, 13 Feb 2018 16:40:52 +0000 (16:40 +0000)]
mgr/dashboard_v2: add node as a local dependency

This will allow us to use the angular cli on systems that don't have node
v6.9.0 or higher installed.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Highlight clickable datatable rows.
Volker Theile [Wed, 14 Feb 2018 14:39:40 +0000 (15:39 +0100)]
mgr/dashboard_v2: Highlight clickable datatable rows.

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Add RGW page.
Volker Theile [Mon, 5 Feb 2018 13:56:46 +0000 (14:56 +0100)]
mgr/dashboard_v2: Add RGW page.

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Update documentation
Patrick Nawracay [Sat, 10 Feb 2018 21:53:40 +0000 (22:53 +0100)]
mgr/dashboard_v2: Update documentation

* Nested Controllers
* How to use RESTController

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Easy table cell transformation
Stephan Müller [Mon, 12 Feb 2018 17:16:42 +0000 (18:16 +0100)]
mgr/dashboard_v2: Easy table cell transformation

The table column definition is extended by "cellTransformation"
property, which is filled through the use of "CellTemplate" enum.
If you have set that, a specific template reference will be used for
the ngx column property "cellTemplate". All references are stored
at the bottom of the data table template.

Signed-off-by: Stephan Müller <smueller@suse.com>
7 years agomgr/dashboard_v2: fix frontend bug in table.component.hml
Ricardo Dias [Tue, 13 Feb 2018 12:06:21 +0000 (12:06 +0000)]
mgr/dashboard_v2: fix frontend bug in table.component.hml

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Use datatable on Cluster/Hosts page.
Volker Theile [Thu, 8 Feb 2018 11:41:24 +0000 (12:41 +0100)]
mgr/dashboard_v2: Use datatable on Cluster/Hosts page.

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Fix linting errors
Patrick Nawracay [Fri, 9 Feb 2018 11:15:36 +0000 (12:15 +0100)]
mgr/dashboard_v2: Fix linting errors

Supposed to be squashed with 5236e6168d763c8b40742c33ffb0ebe8e55ce6e8.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Add support for nested controllers
Patrick Nawracay [Wed, 7 Feb 2018 14:56:51 +0000 (15:56 +0100)]
mgr/dashboard_v2: Add support for nested controllers

The `ApiController` decorator is used to define a API endpoints.  This
change will enable to use `/` in paths, so that nested controllers can
be used.

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Add cdPasswordButton directive
Volker Theile [Tue, 6 Feb 2018 11:02:50 +0000 (12:02 +0100)]
mgr/dashboard_v2: Add cdPasswordButton directive

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Let the pagination input field look nicer
Volker Theile [Wed, 7 Feb 2018 16:53:44 +0000 (17:53 +0100)]
mgr/dashboard_v2: Let the pagination input field look nicer

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: table component style improvements
Ricardo Marques [Tue, 6 Feb 2018 22:58:12 +0000 (22:58 +0000)]
mgr/dashboard_v2: table component style improvements

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Add block pools page
Ricardo Marques [Wed, 31 Jan 2018 13:57:36 +0000 (13:57 +0000)]
mgr/dashboard_v2: Add block pools page

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: add health page and its dependencies
Tiago Melo [Thu, 1 Feb 2018 11:17:43 +0000 (11:17 +0000)]
mgr/dashboard_v2: add health page and its dependencies

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: adaptation of dashboard RemoteViewCache as a decorator
Ricardo Dias [Tue, 6 Feb 2018 12:47:40 +0000 (12:47 +0000)]
mgr/dashboard_v2: adaptation of dashboard RemoteViewCache as a decorator

We implemented a decorator called `ViewCache` that implements a similar
functionality as the dashboard `RemoteViewCache` class.
We even copied part of the code and adapted to the current
infrastructure.

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: clean rados connection on shutdown
Ricardo Dias [Tue, 6 Feb 2018 12:42:44 +0000 (12:42 +0000)]
mgr/dashboard_v2: clean rados connection on shutdown

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Fix copy-webpack-plugin version
Ricardo Dias [Thu, 8 Feb 2018 14:06:36 +0000 (14:06 +0000)]
mgr/dashboard_v2: Fix copy-webpack-plugin version

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: removed mock classes, unit tests now run against real cluster
Ricardo Dias [Thu, 8 Feb 2018 08:24:01 +0000 (08:24 +0000)]
mgr/dashboard_v2: removed mock classes, unit tests now run against real cluster

We changed tox.ini to run a vstart.sh cluster and run the unit tests
against that cluster. All unit tests code was adapted to make requests
to the real dashboard_v2 backend using the `requests` python library

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: add more debug message to tools.py
Ricardo Dias [Thu, 8 Feb 2018 08:23:03 +0000 (08:23 +0000)]
mgr/dashboard_v2: add more debug message to tools.py

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Added coverage tracking to module code
Ricardo Dias [Thu, 8 Feb 2018 08:21:31 +0000 (08:21 +0000)]
mgr/dashboard_v2: Added coverage tracking to module code

This will allow to collect code coverage information when the module
is running within the ceph-mgr daemon.

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Migrate RGW daemon REST resource
Patrick Nawracay [Mon, 5 Feb 2018 10:15:06 +0000 (11:15 +0100)]
mgr/dashboard_v2: Migrate RGW daemon REST resource

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: force whitespace in imports list
Tiago Melo [Tue, 6 Feb 2018 16:35:15 +0000 (16:35 +0000)]
mgr/dashboard_v2: force whitespace in imports list

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add style guide to the frontend README
Tiago Melo [Mon, 5 Feb 2018 18:26:33 +0000 (18:26 +0000)]
mgr/dashboard_v2: add style guide to the frontend README

Add a README section for style guide where it mentions how to organize
the typescript imports.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: decrease max-line-length to 100
Tiago Melo [Tue, 6 Feb 2018 16:24:19 +0000 (16:24 +0000)]
mgr/dashboard_v2: decrease max-line-length to 100

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add tslint no-consecutive-blank-lines rule
Tiago Melo [Sun, 4 Feb 2018 10:26:47 +0000 (11:26 +0100)]
mgr/dashboard_v2: add tslint no-consecutive-blank-lines rule

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add some eslint rules to tslint
Tiago Melo [Sun, 4 Feb 2018 10:53:12 +0000 (11:53 +0100)]
mgr/dashboard_v2: add some eslint rules to tslint

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add tslint import linting rule
Tiago Melo [Sun, 4 Feb 2018 10:45:59 +0000 (11:45 +0100)]
mgr/dashboard_v2: add tslint import linting rule

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: add missing codealizer recommended rules
Tiago Melo [Sat, 3 Feb 2018 18:01:23 +0000 (19:01 +0100)]
mgr/dashboard_v2: add missing codealizer recommended rules

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Add table component
Stephan Müller [Thu, 1 Feb 2018 15:00:52 +0000 (16:00 +0100)]
mgr/dashboard_v2: Add table component

The current implementation isn't finished yet, but it's a start.

The ngx-datatable is used as the core of the table component. You can
use the table to show data in a table. You can search, paginate, sort,
refresh the table contents. Multi selection is possible, the details
of the selected items will be given to the specified detail component.

What will be fixed soon?
* Enable the usage of buttons in the table header
* Enable details inline not beneath the table
* Pagination to use a input field to switch pages
* The columns to show can be checked and predefined
* The selection made by the user will be saved in the local storage

Signed-off-by: Stephan Müller <smueller@suse.com>
Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: Updated README with instruction on how to mock ceph modules
Ricardo Dias [Mon, 5 Feb 2018 12:14:30 +0000 (12:14 +0000)]
mgr/dashboard_v2: Updated README with instruction on how to mock ceph modules

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Add breadcrumb on Hosts page
Ricardo Marques [Fri, 2 Feb 2018 13:20:35 +0000 (13:20 +0000)]
mgr/dashboard_v2: Add breadcrumb on Hosts page

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Move hosts option to cluster menu
Ricardo Marques [Fri, 2 Feb 2018 13:03:27 +0000 (13:03 +0000)]
mgr/dashboard_v2: Move hosts option to cluster menu

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: mocking of rados and rbd modules
Ricardo Dias [Fri, 2 Feb 2018 15:33:44 +0000 (15:33 +0000)]
mgr/dashboard_v2: mocking of rados and rbd modules

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Updated README with notification queue instructions
Ricardo Dias [Thu, 1 Feb 2018 10:46:23 +0000 (10:46 +0000)]
mgr/dashboard_v2: Updated README with notification queue instructions

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Notification queue
Ricardo Dias [Wed, 31 Jan 2018 15:07:00 +0000 (15:07 +0000)]
mgr/dashboard_v2: Notification queue

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Fix linting errors
Sebastian Wagner [Thu, 1 Feb 2018 15:17:01 +0000 (16:17 +0100)]
mgr/dashboard_v2: Fix linting errors

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Mark text with the i18n attribute
Volker Theile [Thu, 1 Feb 2018 10:10:00 +0000 (11:10 +0100)]
mgr/dashboard_v2: Mark text with the i18n attribute

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Use Awesome Bootstrap Checkbox.
Volker Theile [Wed, 31 Jan 2018 15:46:34 +0000 (16:46 +0100)]
mgr/dashboard_v2: Use Awesome Bootstrap Checkbox.

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Refactored logging
Sebastian Wagner [Wed, 31 Jan 2018 11:59:13 +0000 (12:59 +0100)]
mgr/dashboard_v2: Refactored logging

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Don't use localized config for auth
Ricardo Marques [Tue, 30 Jan 2018 23:30:23 +0000 (23:30 +0000)]
mgr/dashboard_v2: Don't use localized config for auth

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Session expire at browser close
Volker Theile [Sat, 27 Jan 2018 10:55:29 +0000 (11:55 +0100)]
mgr/dashboard_v2: Session expire at browser close

Add support for session expire at browser close.

Signed-off-by: Volker Theile <vtheile@suse.com>
7 years agomgr/dashboard_v2: Fix content type (body) of error page
Patrick Nawracay [Fri, 26 Jan 2018 13:41:55 +0000 (14:41 +0100)]
mgr/dashboard_v2: Fix content type (body) of error page

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Fix content type of JSON responses
Patrick Nawracay [Thu, 25 Jan 2018 18:47:43 +0000 (19:47 +0100)]
mgr/dashboard_v2: Fix content type of JSON responses

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
7 years agomgr/dashboard_v2: Added status route to cluster
Sebastian Wagner [Tue, 30 Jan 2018 12:22:25 +0000 (13:22 +0100)]
mgr/dashboard_v2: Added status route to cluster

* `RESTController`: added `@detail_route`
* Fixed `RequestHelper.assertJsonBody`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Rename "host" module to "cluster"
Ricardo Marques [Tue, 30 Jan 2018 23:12:53 +0000 (23:12 +0000)]
mgr/dashboard_v2: Rename "host" module to "cluster"

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Fix typo on method isLoginActive
Ricardo Marques [Tue, 30 Jan 2018 17:09:15 +0000 (17:09 +0000)]
mgr/dashboard_v2: Fix typo on method isLoginActive

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Add hosts page
Ricardo Marques [Sat, 27 Jan 2018 00:05:54 +0000 (00:05 +0000)]
mgr/dashboard_v2: Add hosts page

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Fix bug in AuthRequired decorator
Ricardo Dias [Tue, 30 Jan 2018 16:30:57 +0000 (16:30 +0000)]
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>
7 years agomgr/dashboard_v2: Refactor controller base class
Volker Theile [Tue, 30 Jan 2018 10:58:46 +0000 (11:58 +0100)]
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>
7 years agomgr/dashboard_v2: Added API controller listing endpoint.
Sebastian Wagner [Tue, 30 Jan 2018 09:29:41 +0000 (10:29 +0100)]
mgr/dashboard_v2: Added API controller listing endpoint.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: Updated README with more developer notes
Ricardo Dias [Mon, 29 Jan 2018 09:59:34 +0000 (09:59 +0000)]
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>
7 years agomgr/dashboard_v2: Refactoring of the access to mgr module instance
Ricardo Dias [Mon, 29 Jan 2018 09:38:03 +0000 (09:38 +0000)]
mgr/dashboard_v2: Refactoring of the access to mgr module instance

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: simplify router and fix navigation
Tiago Melo [Mon, 29 Jan 2018 12:08:00 +0000 (12:08 +0000)]
mgr/dashboard_v2: simplify router and fix navigation

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agomgr/dashboard_v2: removed auth handler form test_auth.py setup
Ricardo Dias [Mon, 29 Jan 2018 09:22:57 +0000 (09:22 +0000)]
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>
7 years agomgr/dashboard_v2: Disable CherryPi autoreload feature.
Volker Theile [Fri, 26 Jan 2018 13:44:57 +0000 (14:44 +0100)]
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>
7 years agomgr/dashboard_v2: several code style enhancements
Volker Theile [Fri, 26 Jan 2018 15:01:31 +0000 (16:01 +0100)]
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>
7 years agomgr/dashboard_v2: fix pycodestyle to exclude the frontend files
Ricardo Dias [Fri, 26 Jan 2018 16:22:23 +0000 (16:22 +0000)]
mgr/dashboard_v2: fix pycodestyle to exclude the frontend files

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: add support for frontend CI coverage and unit testing
Ricardo Dias [Fri, 26 Jan 2018 14:50:46 +0000 (14:50 +0000)]
mgr/dashboard_v2: add support for frontend CI coverage and unit testing

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: .gitignore update
Ricardo Dias [Fri, 26 Jan 2018 12:14:31 +0000 (12:14 +0000)]
mgr/dashboard_v2: .gitignore update

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Added unit test for module.py
Ricardo Dias [Fri, 26 Jan 2018 12:13:49 +0000 (12:13 +0000)]
mgr/dashboard_v2: Added unit test for module.py

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Moved set-login-cred command logic to Auth class
Ricardo Dias [Fri, 26 Jan 2018 12:12:16 +0000 (12:12 +0000)]
mgr/dashboard_v2: Moved set-login-cred command logic to Auth class

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Unit tests refactoring
Ricardo Dias [Fri, 26 Jan 2018 12:11:21 +0000 (12:11 +0000)]
mgr/dashboard_v2: Unit tests refactoring

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Rename angular components prefix
Ricardo Marques [Fri, 26 Jan 2018 12:20:44 +0000 (12:20 +0000)]
mgr/dashboard_v2: Rename angular components prefix

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Add frontend login/logout
Ricardo Marques [Thu, 25 Jan 2018 16:10:29 +0000 (16:10 +0000)]
mgr/dashboard_v2: Add frontend login/logout

Signed-off-by: Ricardo Marques <rimarques@suse.com>
7 years agomgr/dashboard_v2: Combine coverage and tests results from py27 and py3
Ricardo Dias [Fri, 26 Jan 2018 08:50:50 +0000 (08:50 +0000)]
mgr/dashboard_v2: Combine coverage and tests results from py27 and py3

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Fix pylint executor and warnings/errors
Ricardo Dias [Thu, 25 Jan 2018 17:14:42 +0000 (17:14 +0000)]
mgr/dashboard_v2: Fix pylint executor and warnings/errors

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Refactoring of unit tests
Ricardo Dias [Thu, 25 Jan 2018 16:48:03 +0000 (16:48 +0000)]
mgr/dashboard_v2: Refactoring of unit tests

Signed-off-by: Ricardo Dias <rdias@suse.com>
7 years agomgr/dashboard_v2: Added RESTController test case
Sebastian Wagner [Thu, 25 Jan 2018 19:35:24 +0000 (20:35 +0100)]
mgr/dashboard_v2: Added RESTController test case

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
7 years agomgr/dashboard_v2: add initial frontend code
Tiago Melo [Mon, 22 Jan 2018 14:51:58 +0000 (14:51 +0000)]
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>
7 years agomgr/dashboard_v2: Renamed/moved RESTResource to RESTController
Ricardo Dias [Thu, 25 Jan 2018 14:28:04 +0000 (14:28 +0000)]
mgr/dashboard_v2: Renamed/moved RESTResource to RESTController

Signed-off-by: Ricardo Dias <rdias@suse.com>