Move from overcloud dashboard to monitoring

Change-Id: If726d3f10836de1361c7d7bdc842cad680483a71
Fixes-Bug: #1349887
This commit is contained in:
Rob Raymond 2014-07-28 16:01:16 -06:00
parent b959feffe7
commit 24c56bebaa
23 changed files with 34 additions and 72 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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']

View File

@ -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']

View File

@ -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'

View File

@ -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)

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/alarms/_create.html' %}
{% include 'monitoring/alarms/_create.html' %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/alarms/_detail.html' %}
{% include 'monitoring/alarms/_detail.html' %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/alarms/_edit.html' %}
{% include 'monitoring/alarms/_edit.html' %}
{% endblock %}

View File

@ -8,8 +8,8 @@
{% load url from future %}
{% block main %}
<div style="padding: 3px;">
<a href="{% url 'horizon:overcloud:alarms:alarm' 'all'%}" class="btn btn-small btn-run showspinner">{% trans 'All Alarms' %}</a>
<a href="{% url 'horizon:monitoring:alarms:alarm' 'all'%}" class="btn btn-small btn-run showspinner">{% trans 'All Alarms' %}</a>
<a target="dashboard" href="/static/grafana/index.html#/dashboard/file/helion.json?token={{ token }}" class="btn btn-small btn-run showspinner">{% trans 'Dashboard' %}</a>
</div>
{% include 'overcloud/alarms/monitor.html' %}
{% include 'monitoring/alarms/monitor.html' %}
{% endblock %}

View File

@ -56,7 +56,7 @@
{$ group.name $}
</div>
<div ng-repeat="service in group.services" style="display:inline-block; margin-bottom:4px;">
<a href="/overcloud/alarm/{$ service.name $}">
<a href="/monitoring/alarm/{$ service.name $}">
<div class="base-chicklet {$ service.class $}">
<div>
<div class="status-icon-holder" >

View File

@ -19,10 +19,11 @@ from django.utils.translation import ugettext_lazy as _
import horizon
class OverCloud(horizon.Dashboard):
name = _("OverCloud")
slug = "overcloud"
panels = ()
class Monitoring(horizon.Dashboard):
name = _("Monitoring")
slug = "monitoring"
panels = ('alarms', 'notifications')
default_panel = 'alarms'
horizon.register(OverCloud)
horizon.register(Monitoring)

View File

@ -38,5 +38,5 @@ PHONE_VALIDATOR = validators.RegexValidator(
EMAIL_VALIDATOR = validators.EmailValidator(
message=_("Address must contain a valid email address."))
URL_PREFIX = 'horizon:overcloud:notifications:'
TEMPLATE_PREFIX = 'overcloud/notifications/'
URL_PREFIX = 'horizon:monitoring:notifications:'
TEMPLATE_PREFIX = 'monitoring/notifications/'

View File

@ -17,8 +17,12 @@
from django.utils.translation import ugettext_lazy as _ # noqa
import horizon
from monitoring import dashboard
class Notifications(horizon.Panel):
name = _("Notifications")
slug = 'notifications'
dashboard.Monitoring.register(Notifications)

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/notifications/_create.html' %}
{% include 'monitoring/notifications/_create.html' %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/notifications/_detail.html' %}
{% include 'monitoring/notifications/_detail.html' %}
{% endblock %}

View File

@ -7,5 +7,5 @@
{% endblock page_header %}
{% block main %}
{% include 'overcloud/notifications/_edit.html' %}
{% include 'monitoring/notifications/_edit.html' %}
{% endblock %}

View File

@ -2,7 +2,7 @@
angular.module('monitoring.controllers', [])
.controller('monitoringController', function ($scope, $http, $timeout) {
$scope.fetchStatus = function() {
$http({method: 'GET', url: '/overcloud/status'}).
$http({method: 'GET', url: '/monitoring/status'}).
success(function(data, status, headers, config) {
// this callback will be called asynchronously
// when the response is available

View File

@ -21,7 +21,6 @@ classifier =
[files]
packages =
monitoring
cosmos
enabled
[pbr]