Move from overcloud dashboard to monitoring
Change-Id: If726d3f10836de1361c7d7bdc842cad680483a71 Fixes-Bug: #1349887
This commit is contained in:
parent
b959feffe7
commit
24c56bebaa
@ -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:
|
by monasca-vagrant. For a UI development setup:
|
||||||
* git clone https://github.com/openstack/horizon.git # clone horizon
|
* 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/stackforge/monasca-ui.git # clone monasca-ui
|
||||||
|
* git clone https://github.com/hpcloud-mon/grafana.git
|
||||||
* cd horizon
|
* cd horizon
|
||||||
* cp ../monasca-ui/enabled/* openstack_dashbaord/local/enabled # Copy enabled files
|
* cp ../monasca-ui/enabled/* openstack_dashbaord/local/enabled # Copy enabled files
|
||||||
* ln -s ../monasca-ui/monitoring monitoring
|
* ln -s ../monasca-ui/monitoring monitoring
|
||||||
|
* ln -s ../../../grafana/src monitoring/static/grafana
|
||||||
* tools/with_venv.sh pip install -r ../monasca-ui/requirements.txt
|
* tools/with_venv.sh pip install -r ../monasca-ui/requirements.txt
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -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'
|
|
@ -1,18 +1,7 @@
|
|||||||
# The name of the panel to be added to HORIZON_CONFIG. Required.
|
DASHBOARD = "monitoring"
|
||||||
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'
|
|
||||||
|
|
||||||
# A list of applications to be added to INSTALLED_APPS.
|
# 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.
|
# A list of angular modules to be added as dependencies to horizon app.
|
||||||
ADD_ANGULAR_MODULES = ['monitoringApp']
|
ADD_ANGULAR_MODULES = ['monitoringApp']
|
||||||
|
@ -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']
|
|
||||||
|
|
@ -15,8 +15,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
URL_PREFIX = 'horizon:overcloud:alarms:'
|
URL_PREFIX = 'horizon:monitoring:alarms:'
|
||||||
TEMPLATE_PREFIX = 'overcloud/alarms/'
|
TEMPLATE_PREFIX = 'monitoring/alarms/'
|
||||||
|
|
||||||
CRITICAL_ICON = '/static/monitoring/img/critical-icon.png'
|
CRITICAL_ICON = '/static/monitoring/img/critical-icon.png'
|
||||||
WARNING_ICON = '/static/monitoring/img/warning-icon.png'
|
WARNING_ICON = '/static/monitoring/img/warning-icon.png'
|
||||||
|
@ -18,7 +18,12 @@ from django.utils.translation import ugettext_lazy as _ # noqa
|
|||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
from monitoring import dashboard
|
||||||
|
|
||||||
class Monitoring(horizon.Panel):
|
|
||||||
|
class Alarms(horizon.Panel):
|
||||||
name = _("Alarms")
|
name = _("Alarms")
|
||||||
slug = 'alarms'
|
slug = 'alarms'
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Monitoring.register(Alarms)
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/alarms/_create.html' %}
|
{% include 'monitoring/alarms/_create.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/alarms/_detail.html' %}
|
{% include 'monitoring/alarms/_detail.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/alarms/_edit.html' %}
|
{% include 'monitoring/alarms/_edit.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
{% load url from future %}
|
{% load url from future %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div style="padding: 3px;">
|
<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>
|
<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>
|
</div>
|
||||||
{% include 'overcloud/alarms/monitor.html' %}
|
{% include 'monitoring/alarms/monitor.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -56,7 +56,7 @@
|
|||||||
{$ group.name $}
|
{$ group.name $}
|
||||||
</div>
|
</div>
|
||||||
<div ng-repeat="service in group.services" style="display:inline-block; margin-bottom:4px;">
|
<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 class="base-chicklet {$ service.class $}">
|
||||||
<div>
|
<div>
|
||||||
<div class="status-icon-holder" >
|
<div class="status-icon-holder" >
|
||||||
|
@ -19,10 +19,11 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
|
||||||
class OverCloud(horizon.Dashboard):
|
class Monitoring(horizon.Dashboard):
|
||||||
name = _("OverCloud")
|
name = _("Monitoring")
|
||||||
slug = "overcloud"
|
slug = "monitoring"
|
||||||
panels = ()
|
panels = ('alarms', 'notifications')
|
||||||
|
default_panel = 'alarms'
|
||||||
|
|
||||||
|
|
||||||
horizon.register(OverCloud)
|
horizon.register(Monitoring)
|
@ -38,5 +38,5 @@ PHONE_VALIDATOR = validators.RegexValidator(
|
|||||||
EMAIL_VALIDATOR = validators.EmailValidator(
|
EMAIL_VALIDATOR = validators.EmailValidator(
|
||||||
message=_("Address must contain a valid email address."))
|
message=_("Address must contain a valid email address."))
|
||||||
|
|
||||||
URL_PREFIX = 'horizon:overcloud:notifications:'
|
URL_PREFIX = 'horizon:monitoring:notifications:'
|
||||||
TEMPLATE_PREFIX = 'overcloud/notifications/'
|
TEMPLATE_PREFIX = 'monitoring/notifications/'
|
||||||
|
@ -17,8 +17,12 @@
|
|||||||
from django.utils.translation import ugettext_lazy as _ # noqa
|
from django.utils.translation import ugettext_lazy as _ # noqa
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
from monitoring import dashboard
|
||||||
|
|
||||||
|
|
||||||
class Notifications(horizon.Panel):
|
class Notifications(horizon.Panel):
|
||||||
name = _("Notifications")
|
name = _("Notifications")
|
||||||
slug = 'notifications'
|
slug = 'notifications'
|
||||||
|
|
||||||
|
|
||||||
|
dashboard.Monitoring.register(Notifications)
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/notifications/_create.html' %}
|
{% include 'monitoring/notifications/_create.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/notifications/_detail.html' %}
|
{% include 'monitoring/notifications/_detail.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include 'overcloud/notifications/_edit.html' %}
|
{% include 'monitoring/notifications/_edit.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
angular.module('monitoring.controllers', [])
|
angular.module('monitoring.controllers', [])
|
||||||
.controller('monitoringController', function ($scope, $http, $timeout) {
|
.controller('monitoringController', function ($scope, $http, $timeout) {
|
||||||
$scope.fetchStatus = function() {
|
$scope.fetchStatus = function() {
|
||||||
$http({method: 'GET', url: '/overcloud/status'}).
|
$http({method: 'GET', url: '/monitoring/status'}).
|
||||||
success(function(data, status, headers, config) {
|
success(function(data, status, headers, config) {
|
||||||
// this callback will be called asynchronously
|
// this callback will be called asynchronously
|
||||||
// when the response is available
|
// when the response is available
|
||||||
|
Loading…
Reference in New Issue
Block a user