# Path: console/models.py
# class IOReadContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'io.read', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'IO Read'
# 
# class IOWriteContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'io.write', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'IO Write'
# 
# class NetworkRXContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'net.rx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network RX'
# 
# class NetworkTXContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'net.tx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network TX'
# 
# class CPUContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'cpu', params).json()
# 
#     @property
#     def unit_of_measure(self):
#         return 'ticks'
# 
#     @property
#     def verbose_name(self):
#         return 'CPU Ticks'
# 
# class MemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Memory'
# 
# class QuotaContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'quota', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Used Disk Space'
# 
# class NetworkRXDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'net.rx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network RX'
# 
# class NetworkTXDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'net.tx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network TX'
# 
# class HitsDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'hits', params).json()
# 
#     @property
#     def unit_of_measure(self):
#         return 'hits'
# 
#     @property
#     def verbose_name(self):
#         return 'Hits'
# 
# class RSSMemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem.rss', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'RSS Memory'
# 
# class CacheMemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem.cache', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Cache Memory'


    from django.conf.urls import patterns, url
    from django.conf.urls.defaults import patterns, url
from .models import IOReadContainerMetric, IOWriteContainerMetric,\
    NetworkRXContainerMetric, NetworkTXContainerMetric, CPUContainerMetric,\
    MemoryContainerMetric, QuotaContainerMetric, NetworkRXDomainMetric,\
    NetworkTXDomainMetric, HitsDomainMetric, RSSMemoryContainerMetric,\
    CacheMemoryContainerMetric
from __future__ import unicode_literals, absolute_import

try:
except ImportError:



urlpatterns = patterns(
    'console.views',
    url(r'^$', 'home', name='console_home'),
    url(r'^me/$', 'me_page', name='console_me'),
    url(r'^logout/$', 'logout', name='console_logout'),
    url(r'^containers/(?P<id>\d+)$', 'containers', name='console_containers'),
    url(r'^domains/(?P<id>\d+)$', 'domain', name='console_domain'),
    url(r'^domains/$', 'domains', name='console_domains'),
    url(r'^tags/(?P<tag>.+)$', 'tag', name='console_tag'),
    url(r'^tags/$', 'tags', name='console_tags'),

# Path: console/models.py
# class IOReadContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'io.read', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'IO Read'
# 
# class IOWriteContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'io.write', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'IO Write'
# 
# class NetworkRXContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'net.rx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network RX'
# 
# class NetworkTXContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'net.tx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network TX'
# 
# class CPUContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'cpu', params).json()
# 
#     @property
#     def unit_of_measure(self):
#         return 'ticks'
# 
#     @property
#     def verbose_name(self):
#         return 'CPU Ticks'
# 
# class MemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Memory'
# 
# class QuotaContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'quota', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Used Disk Space'
# 
# class NetworkRXDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'net.rx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network RX'
# 
# class NetworkTXDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'net.tx', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Network TX'
# 
# class HitsDomainMetric(DomainMetric):
#     def api_metrics(self, client, params):
#         return client.domain_metric(self.domain, 'hits', params).json()
# 
#     @property
#     def unit_of_measure(self):
#         return 'hits'
# 
#     @property
#     def verbose_name(self):
#         return 'Hits'
# 
# class RSSMemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem.rss', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'RSS Memory'
# 
# class CacheMemoryContainerMetric(ContainerMetric):
#     def api_metrics(self, client, params):
#         return client.container_metric(self.container, 'mem.cache', params).json()
# 
#     @property
#     def verbose_name(self):
#         return 'Cache Memory'


# Path: console/urls.py
    from django.conf.urls import patterns, url
    from django.conf.urls.defaults import patterns, url
from .models import IOReadContainerMetric, IOWriteContainerMetric,\
    NetworkRXContainerMetric, NetworkTXContainerMetric, CPUContainerMetric,\
    MemoryContainerMetric, QuotaContainerMetric, NetworkRXDomainMetric,\
    NetworkTXDomainMetric, HitsDomainMetric, RSSMemoryContainerMetric,\
    CacheMemoryContainerMetric

from __future__ import unicode_literals, absolute_import

try:
except ImportError:



urlpatterns = patterns(
    'console.views',
    url(r'^$', 'home', name='console_home'),
    url(r'^me/$', 'me_page', name='console_me'),
    url(r'^logout/$', 'logout', name='console_logout'),
    url(r'^containers/(?P<id>\d+)$', 'containers', name='console_containers'),
    url(r'^domains/(?P<id>\d+)$', 'domain', name='console_domain'),
    url(r'^domains/$', 'domains', name='console_domains'),
    url(r'^tags/(?P<tag>.+)$', 'tag', name='console_tag'),
    url(r'^tags/$', 'tags', name='console_tags'),

    url(r'^alarms/$', 'alarms', name='console_alarms'),