# Path: monitoring/config/local_settings.py
# MONITORING_SERVICES_GROUPS = [
#     {'name': _('OpenStack Services'), 'groupBy': 'service'},
#     {'name': _('Servers'), 'groupBy': 'hostname'}
# ]
# MONITORING_SERVICES = getattr(
#     settings,
#     'MONITORING_SERVICES_GROUPS',
#     MONITORING_SERVICES_GROUPS
# )
# MONITORING_SERVICE_VERSION = getattr(
#     settings, 'MONITORING_SERVICE_VERSION', '2_0'
# )
# MONITORING_SERVICE_TYPE = getattr(
#     settings, 'MONITORING_SERVICE_TYPE', 'monitoring'
# )
# MONITORING_ENDPOINT_TYPE = getattr(
#     # NOTE(trebskit) # will default to OPENSTACK_ENDPOINT_TYPE
#     settings, 'MONITORING_ENDPOINT_TYPE', None
# )
# GRAFANA_LINKS = []
# DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS)
# GRAFANA_URL = getattr(settings, 'GRAFANA_URL', None)
# SHOW_GRAFANA_HOME = getattr(settings, 'SHOW_GRAFANA_HOME', True)
# ENABLE_LOG_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_LOG_MANAGEMENT_BUTTON', True)
# ENABLE_EVENT_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_EVENT_MANAGEMENT_BUTTON', False)
# KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE',
#                              'monitoring:kibana_access')
# KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE',
#                               'monitoring')
# KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.6:5601/')
# OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
# OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
# POLICY_FILES = getattr(settings, 'POLICY_FILES', {})
# 
# Path: monitoring/overview/views.py
# LOG = logging.getLogger(__name__)
# STATUS_FA_ICON_MAP = {'btn-success': "fa-check",
#                       'btn-danger': "fa-exclamation-triangle",
#                       'btn-warning': "fa-exclamation",
#                       'btn-default': "fa-question-circle"}
# def get_icon(status):
# def get_dashboard_links(request):
# def get_monitoring_services(request):
# def show_by_dimension(data, dim_name):
# def get_status(alarms):
# def generate_status(request):
#     def get_context_data(self, **kwargs):
#     def _convert_dimensions(self, req_kwargs):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def __init__(self, method, url, **kwargs):
#     def get_method(self):
# def proxy_stream_generator(response):
#     def read(self, method, url, data, headers):
#     def dispatch(self, request, url):
#     def get_relative_url(self, url):
#     def get_absolute_url(self, url):
#     def _can_access_kibana(self):
# class IndexView(TemplateView):
# class MonascaProxyView(TemplateView):
# class StatusView(TemplateView):
# class _HttpMethodRequest(urllib.request.Request):
# class KibanaProxyView(generic.View):


from django.conf.urls import url
from monitoring.config import local_settings as settings
from monitoring.overview import views
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



urlpatterns = [
    url(r'^$', views.IndexView.as_view(), name='index'),
    url(r'^status', views.StatusView.as_view(), name='status'),

# Path: monitoring/config/local_settings.py
# MONITORING_SERVICES_GROUPS = [
#     {'name': _('OpenStack Services'), 'groupBy': 'service'},
#     {'name': _('Servers'), 'groupBy': 'hostname'}
# ]
# MONITORING_SERVICES = getattr(
#     settings,
#     'MONITORING_SERVICES_GROUPS',
#     MONITORING_SERVICES_GROUPS
# )
# MONITORING_SERVICE_VERSION = getattr(
#     settings, 'MONITORING_SERVICE_VERSION', '2_0'
# )
# MONITORING_SERVICE_TYPE = getattr(
#     settings, 'MONITORING_SERVICE_TYPE', 'monitoring'
# )
# MONITORING_ENDPOINT_TYPE = getattr(
#     # NOTE(trebskit) # will default to OPENSTACK_ENDPOINT_TYPE
#     settings, 'MONITORING_ENDPOINT_TYPE', None
# )
# GRAFANA_LINKS = []
# DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS)
# GRAFANA_URL = getattr(settings, 'GRAFANA_URL', None)
# SHOW_GRAFANA_HOME = getattr(settings, 'SHOW_GRAFANA_HOME', True)
# ENABLE_LOG_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_LOG_MANAGEMENT_BUTTON', True)
# ENABLE_EVENT_MANAGEMENT_BUTTON = getattr(settings, 'ENABLE_EVENT_MANAGEMENT_BUTTON', False)
# KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE',
#                              'monitoring:kibana_access')
# KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE',
#                               'monitoring')
# KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.6:5601/')
# OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
# OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
# POLICY_FILES = getattr(settings, 'POLICY_FILES', {})
# 
# Path: monitoring/overview/views.py
# LOG = logging.getLogger(__name__)
# STATUS_FA_ICON_MAP = {'btn-success': "fa-check",
#                       'btn-danger': "fa-exclamation-triangle",
#                       'btn-warning': "fa-exclamation",
#                       'btn-default': "fa-question-circle"}
# def get_icon(status):
# def get_dashboard_links(request):
# def get_monitoring_services(request):
# def show_by_dimension(data, dim_name):
# def get_status(alarms):
# def generate_status(request):
#     def get_context_data(self, **kwargs):
#     def _convert_dimensions(self, req_kwargs):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
#     def __init__(self, method, url, **kwargs):
#     def get_method(self):
# def proxy_stream_generator(response):
#     def read(self, method, url, data, headers):
#     def dispatch(self, request, url):
#     def get_relative_url(self, url):
#     def get_absolute_url(self, url):
#     def _can_access_kibana(self):
# class IndexView(TemplateView):
# class MonascaProxyView(TemplateView):
# class StatusView(TemplateView):
# class _HttpMethodRequest(urllib.request.Request):
# class KibanaProxyView(generic.View):


# Path: monitoring/overview/urls.py
from django.conf.urls import url
from monitoring.config import local_settings as settings
from monitoring.overview import views

# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



urlpatterns = [
    url(r'^$', views.IndexView.as_view(), name='index'),
    url(r'^status', views.StatusView.as_view(), name='status'),

    url(r'^proxy\/(?P<restpath>.*)$', views.MonascaProxyView.as_view()),