diff --git a/README.md b/README.md index 235f7607..b111bc14 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ Monasca UI is implemented as a horizon plugin that adds panels to horizon. It is by monasca-vagrant. For a UI development setup: * git clone https://github.com/openstack/horizon.git # clone horizon * git clone https://github.com/stackforge/monasca-ui.git # clone monasca-ui +* git clone https://github.com/hpcloud-mon/grafana.git * cd horizon * cp ../monasca-ui/enabled/* openstack_dashbaord/local/enabled # Copy enabled files * ln -s ../monasca-ui/monitoring monitoring +* ln -s ../../../grafana/src monitoring/static/grafana * tools/with_venv.sh pip install -r ../monasca-ui/requirements.txt # License diff --git a/cosmos/overcloud/__init__.py b/cosmos/overcloud/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/enabled/_40_cosmos.py b/enabled/_40_cosmos.py deleted file mode 100644 index c4879a8d..00000000 --- a/enabled/_40_cosmos.py +++ /dev/null @@ -1,10 +0,0 @@ -# The name of the dashboard to be added to HORIZON['dashboards']. Required. -DASHBOARD = 'overcloud' - -# A list of applications to be added to INSTALLED_APPS. -ADD_INSTALLED_APPS = [ - 'openstack_dashboard.dashboards.overcloud', -] - -# If set to True, this dashboard will not be added to the settings. -DISABLED = False diff --git a/enabled/_40_router.py.example b/enabled/_40_router.py.example deleted file mode 100644 index 36a888dd..00000000 --- a/enabled/_40_router.py.example +++ /dev/null @@ -1,5 +0,0 @@ -# The name of the dashboard to be added to HORIZON['dashboards']. Required. -DASHBOARD = 'router' - -# If set to True, this dashboard will not be added to the settings. -DISABLED = False diff --git a/enabled/_45_monitoring_panel_group.py b/enabled/_45_monitoring_panel_group.py deleted file mode 100644 index 3b8a80e9..00000000 --- a/enabled/_45_monitoring_panel_group.py +++ /dev/null @@ -1,6 +0,0 @@ -# The name of the panel group to be added to HORIZON_CONFIG. Required. -PANEL_GROUP = 'monitoring' -# The display name of the PANEL_GROUP. Required. -PANEL_GROUP_NAME = 'Monitoring' -# The name of the dashboard the PANEL_GROUP associated with. Required. -PANEL_GROUP_DASHBOARD = 'overcloud' diff --git a/enabled/_50_admin_add_monitoring_panel.py b/enabled/_50_admin_add_monitoring_panel.py index 75e53aad..df5aac65 100644 --- a/enabled/_50_admin_add_monitoring_panel.py +++ b/enabled/_50_admin_add_monitoring_panel.py @@ -1,18 +1,7 @@ -# The name of the panel to be added to HORIZON_CONFIG. Required. -PANEL = 'monitoring' -# The name of the dashboard the PANEL associated with. Required. -PANEL_DASHBOARD = 'overcloud' -# The name of the panel group the PANEL is associated with. -PANEL_GROUP = 'monitoring' - -DEFAULT_PANEL = 'alarms' - -# Python panel class of the PANEL to be added. -ADD_PANEL = \ - 'monitoring.alarms.panel.Monitoring' +DASHBOARD = "monitoring" # A list of applications to be added to INSTALLED_APPS. -ADD_INSTALLED_APPS = ['monitoring', 'grafana'] +ADD_INSTALLED_APPS = ['monitoring'] # A list of angular modules to be added as dependencies to horizon app. ADD_ANGULAR_MODULES = ['monitoringApp'] diff --git a/enabled/_60_admin_add_notification_panel.py b/enabled/_60_admin_add_notification_panel.py deleted file mode 100644 index 0426abf8..00000000 --- a/enabled/_60_admin_add_notification_panel.py +++ /dev/null @@ -1,17 +0,0 @@ -# The name of the panel to be added to HORIZON_CONFIG. Required. -PANEL = 'notifications' -# The name of the dashboard the PANEL associated with. Required. -PANEL_DASHBOARD = 'overcloud' -# The name of the panel group the PANEL is associated with. -PANEL_GROUP = 'monitoring' - -# Python panel class of the PANEL to be added. -ADD_PANEL = \ - 'monitoring.notifications.panel.Notifications' - -# A list of applications to be added to INSTALLED_APPS. -#ADD_INSTALLED_APPS = ['monitoring'] - -# A list of angular modules to be added as dependencies to horizon app. -#ADD_ANGULAR_MODULE = ['monitoringApp'] - diff --git a/monitoring/alarms/constants.py b/monitoring/alarms/constants.py index d7030b8e..b974b297 100644 --- a/monitoring/alarms/constants.py +++ b/monitoring/alarms/constants.py @@ -15,8 +15,8 @@ # under the License. -URL_PREFIX = 'horizon:overcloud:alarms:' -TEMPLATE_PREFIX = 'overcloud/alarms/' +URL_PREFIX = 'horizon:monitoring:alarms:' +TEMPLATE_PREFIX = 'monitoring/alarms/' CRITICAL_ICON = '/static/monitoring/img/critical-icon.png' WARNING_ICON = '/static/monitoring/img/warning-icon.png' diff --git a/monitoring/alarms/panel.py b/monitoring/alarms/panel.py index a7c42bc5..154856bd 100644 --- a/monitoring/alarms/panel.py +++ b/monitoring/alarms/panel.py @@ -18,7 +18,12 @@ from django.utils.translation import ugettext_lazy as _ # noqa import horizon +from monitoring import dashboard -class Monitoring(horizon.Panel): + +class Alarms(horizon.Panel): name = _("Alarms") slug = 'alarms' + + +dashboard.Monitoring.register(Alarms) diff --git a/monitoring/alarms/templates/alarms/create.html b/monitoring/alarms/templates/alarms/create.html index 4a5daf46..e43e063d 100644 --- a/monitoring/alarms/templates/alarms/create.html +++ b/monitoring/alarms/templates/alarms/create.html @@ -7,5 +7,5 @@ {% endblock page_header %} {% block main %} - {% include 'overcloud/alarms/_create.html' %} + {% include 'monitoring/alarms/_create.html' %} {% endblock %} diff --git a/monitoring/alarms/templates/alarms/detail.html b/monitoring/alarms/templates/alarms/detail.html index 0c244c30..cba076d8 100644 --- a/monitoring/alarms/templates/alarms/detail.html +++ b/monitoring/alarms/templates/alarms/detail.html @@ -7,5 +7,5 @@ {% endblock page_header %} {% block main %} - {% include 'overcloud/alarms/_detail.html' %} + {% include 'monitoring/alarms/_detail.html' %} {% endblock %} diff --git a/monitoring/alarms/templates/alarms/edit.html b/monitoring/alarms/templates/alarms/edit.html index a675905f..f8fb6e69 100644 --- a/monitoring/alarms/templates/alarms/edit.html +++ b/monitoring/alarms/templates/alarms/edit.html @@ -7,5 +7,5 @@ {% endblock page_header %} {% block main %} - {% include 'overcloud/alarms/_edit.html' %} + {% include 'monitoring/alarms/_edit.html' %} {% endblock %} diff --git a/monitoring/alarms/templates/alarms/index.html b/monitoring/alarms/templates/alarms/index.html index b93d744d..48e41c5a 100644 --- a/monitoring/alarms/templates/alarms/index.html +++ b/monitoring/alarms/templates/alarms/index.html @@ -8,8 +8,8 @@ {% load url from future %} {% block main %}
- {% include 'overcloud/alarms/monitor.html' %} + {% include 'monitoring/alarms/monitor.html' %} {% endblock %} \ No newline at end of file diff --git a/monitoring/alarms/templates/alarms/monitor.html b/monitoring/alarms/templates/alarms/monitor.html index 8b36475d..9c520a20 100644 --- a/monitoring/alarms/templates/alarms/monitor.html +++ b/monitoring/alarms/templates/alarms/monitor.html @@ -56,7 +56,7 @@ {$ group.name $}