create a horizon plugin
Move vitragedashboard to vitrage-dashboard/dashboard vitragealarms to vitrage-dashboard/alarms vitragetemplates to vitrage-dashboard/templates etc. Enable to use this as horizon plugin without the need of copying over API files, simply place files from enabled directory in horizons openstack_dashboard/local/enabled folder. Change-Id: I38ea4e32abbad75e5432b8c1dfe64511162a7248
1
.gitignore
vendored
@ -6,7 +6,6 @@
|
|||||||
# Packages
|
# Packages
|
||||||
*.egg
|
*.egg
|
||||||
*.egg-info
|
*.egg-info
|
||||||
dist
|
|
||||||
build
|
build
|
||||||
.eggs
|
.eggs
|
||||||
eggs
|
eggs
|
||||||
|
@ -55,8 +55,6 @@ With Horizon
|
|||||||
|
|
||||||
cp -a vitragedashboard/enabled/* ../horizon/openstack_dashboard/enabled/
|
cp -a vitragedashboard/enabled/* ../horizon/openstack_dashboard/enabled/
|
||||||
|
|
||||||
cp -a vitrageclient/api/* ../horizon/openstack_dashboard/api/
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cd python-vitrageclient
|
cd python-vitrageclient
|
||||||
|
@ -5,9 +5,7 @@ VITRAGE_DASHBOARD_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
|
|||||||
|
|
||||||
function install_vitrage_dashboard {
|
function install_vitrage_dashboard {
|
||||||
sudo pip install --upgrade ${VITRAGE_DASHBOARD_DIR}
|
sudo pip install --upgrade ${VITRAGE_DASHBOARD_DIR}
|
||||||
cp -a ${VITRAGE_DASHBOARD_DIR}/vitragedashboard/static ${DEST}/horizon/
|
cp -a ${VITRAGE_DASHBOARD_DIR}/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
|
||||||
cp -a ${VITRAGE_DASHBOARD_DIR}/vitragedashboard/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
|
|
||||||
cp -a ${VITRAGE_DASHBOARD_DIR}/vitrageclient/api/* ${DEST}/horizon/openstack_dashboard/api/
|
|
||||||
python ${DEST}/horizon/manage.py compress --force
|
python ${DEST}/horizon/manage.py compress --force
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,4 +44,4 @@ if is_service_enabled vitrage-dashboard; then
|
|||||||
# no-op
|
# no-op
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -18,9 +18,9 @@ PANEL_DASHBOARD = 'project'
|
|||||||
PANEL_GROUP = 'vitrage_panel_group'
|
PANEL_GROUP = 'vitrage_panel_group'
|
||||||
|
|
||||||
# Python panel class of the PANEL to be added.
|
# Python panel class of the PANEL to be added.
|
||||||
ADD_PANEL = 'vitragedashboard.panel.TopologyVitrage'
|
ADD_PANEL = 'vitrage_dashboard.dashboard.panel.TopologyVitrage'
|
||||||
|
|
||||||
ADD_INSTALLED_APPS = ['vitragedashboard']
|
ADD_INSTALLED_APPS = ['vitrage_dashboard', 'vitrage_dashboard.dashboard', ]
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
||||||
|
|
@ -18,9 +18,9 @@ PANEL_DASHBOARD = 'project'
|
|||||||
PANEL_GROUP = 'vitrage_panel_group'
|
PANEL_GROUP = 'vitrage_panel_group'
|
||||||
|
|
||||||
# Python panel class of the PANEL to be added.
|
# Python panel class of the PANEL to be added.
|
||||||
ADD_PANEL = 'vitragealarms.panel.AlarmsVitrage'
|
ADD_PANEL = 'vitrage_dashboard.alarms.panel.AlarmsVitrage'
|
||||||
|
|
||||||
ADD_INSTALLED_APPS = ['vitragealarms']
|
ADD_INSTALLED_APPS = ['vitrage_dashboard.alarms']
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
||||||
|
|
@ -18,9 +18,9 @@ PANEL_DASHBOARD = 'project'
|
|||||||
PANEL_GROUP = 'vitrage_panel_group'
|
PANEL_GROUP = 'vitrage_panel_group'
|
||||||
|
|
||||||
# Python panel class of the PANEL to be added.
|
# Python panel class of the PANEL to be added.
|
||||||
ADD_PANEL = 'vitrageentities.panel.EntitiesVitrage'
|
ADD_PANEL = 'vitrage_dashboard.entities.panel.EntitiesVitrage'
|
||||||
|
|
||||||
ADD_INSTALLED_APPS = ['vitrageentities']
|
ADD_INSTALLED_APPS = ['vitrage_dashboard.entities']
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
||||||
|
|
@ -18,9 +18,9 @@ PANEL_DASHBOARD = 'project'
|
|||||||
PANEL_GROUP = 'vitrage_panel_group'
|
PANEL_GROUP = 'vitrage_panel_group'
|
||||||
|
|
||||||
# Python panel class of the PANEL to be added.
|
# Python panel class of the PANEL to be added.
|
||||||
ADD_PANEL = 'vitragetemplates.panel.TemplatesVitrage'
|
ADD_PANEL = 'vitrage_dashboard.templates.panel.TemplatesVitrage'
|
||||||
|
|
||||||
ADD_INSTALLED_APPS = ['vitragetemplates']
|
ADD_INSTALLED_APPS = ['vitrage_dashboard.templates']
|
||||||
|
|
||||||
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']
|
||||||
|
|
13
setup.cfg
@ -21,10 +21,7 @@ classifier =
|
|||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
vitrageentities
|
vitrage-dashboard
|
||||||
vitragealarms
|
|
||||||
vitragetemplates
|
|
||||||
vitragedashboard
|
|
||||||
|
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
@ -36,15 +33,15 @@ all_files = 1
|
|||||||
upload-dir = doc/build/html
|
upload-dir = doc/build/html
|
||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = vitragedashboard/locale
|
directory = vitrage_dashboard/locale
|
||||||
domain = vitrage-dashboard
|
domain = vitrage-dashboard
|
||||||
|
|
||||||
[update_catalog]
|
[update_catalog]
|
||||||
domain = vitrage-dashboard
|
domain = vitrage-dashboard
|
||||||
output_dir = vitragedashboard/locale
|
output_dir = vitrage_dashboard/dashboard/locale
|
||||||
input_file = vitragedashboard/locale/vitrage-dashboard.pot
|
input_file = vitrage_dashboard/dashboard/locale/vitrage-dashboard.pot
|
||||||
|
|
||||||
[extract_messages]
|
[extract_messages]
|
||||||
keywords = _ gettext ngettext l_ lazy_gettext
|
keywords = _ gettext ngettext l_ lazy_gettext
|
||||||
mapping_file = babel.cfg
|
mapping_file = babel.cfg
|
||||||
output_file = vitragedashboard/locale/vitrage-dashboard.pot
|
output_file = vitrage_dashboard/dashboard/locale/vitrage-dashboard.pot
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
from django.conf import urls
|
from django.conf import urls
|
||||||
|
|
||||||
from vitragealarms import views
|
from vitrage_dashboard.alarms import views
|
||||||
|
|
||||||
urlpatterns = urls.patterns(
|
urlpatterns = urls.patterns(
|
||||||
'',
|
'',
|
0
vitrage_dashboard/api/__init__.py
Normal file
@ -15,11 +15,13 @@
|
|||||||
|
|
||||||
from django.views import generic
|
from django.views import generic
|
||||||
|
|
||||||
from openstack_dashboard import api
|
|
||||||
from openstack_dashboard.api.rest import utils as rest_utils
|
from openstack_dashboard.api.rest import utils as rest_utils
|
||||||
|
|
||||||
from openstack_dashboard.api.rest import urls
|
from openstack_dashboard.api.rest import urls
|
||||||
|
|
||||||
|
from vitrage_dashboard.api import vitrage
|
||||||
|
|
||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
class Topolgy(generic.View):
|
class Topolgy(generic.View):
|
||||||
@ -56,9 +58,9 @@ class Topolgy(generic.View):
|
|||||||
'{"==": {"type": "nova.host"}},' \
|
'{"==": {"type": "nova.host"}},' \
|
||||||
'{"==": {"type": "nova.zone"}}]}]}'
|
'{"==": {"type": "nova.zone"}}]}]}'
|
||||||
|
|
||||||
return api.vitrage.topology(request=request,
|
return vitrage.topology(request=request,
|
||||||
query=query,
|
query=query,
|
||||||
graph_type=graph_type)
|
graph_type=graph_type)
|
||||||
|
|
||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
@ -78,7 +80,7 @@ class Alarms(generic.View):
|
|||||||
The result is a alarms object.
|
The result is a alarms object.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return api.vitrage.alarms(request, vitrage_id)
|
return vitrage.alarms(request, vitrage_id)
|
||||||
|
|
||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
@ -96,7 +98,7 @@ class Rca(generic.View):
|
|||||||
The result is an rca graph.
|
The result is an rca graph.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return api.vitrage.rca(request, alarm_id)
|
return vitrage.rca(request, alarm_id)
|
||||||
|
|
||||||
|
|
||||||
@urls.register
|
@urls.register
|
||||||
@ -116,4 +118,4 @@ class Templates(generic.View):
|
|||||||
The result is a template object.
|
The result is a template object.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return api.vitrage.templates(request, template_id)
|
return vitrage.templates(request, template_id)
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |