forked from shaba/openuds
Starting to work on reporting
This commit is contained in:
parent
9656aab27d
commit
27224fa8a1
@ -32,12 +32,12 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.conf.urls import patterns, include
|
from django.conf.urls import patterns, include
|
||||||
|
|
||||||
__updated__ = '2015-02-28'
|
__updated__ = '2015-03-10'
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
'uds.admin.views',
|
'uds.admin.views',
|
||||||
(r'^$', 'index'),
|
(r'^$', 'index'),
|
||||||
(r'^tmpl/(?P<template>[a-zA-Z0-9_-]*)$', 'tmpl'),
|
(r'^tmpl/(?P<template>[a-zA-Z0-9_-]*)$', 'tmpl'),
|
||||||
(r'^sample$', 'sample'),
|
(r'^sample$', 'sample'),
|
||||||
(r'^reports/', include('uds.admin.views.reports.urls')),
|
(r'^reporting/', include('uds.admin.views.reporting.urls')),
|
||||||
)
|
)
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.conf.urls import patterns
|
from django.conf.urls import patterns
|
||||||
|
|
||||||
__updated__ = '2015-02-28'
|
__updated__ = '2015-03-10'
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
'uds.admin.views.reports',
|
'uds.admin.views.reporting',
|
||||||
(r'^usage/', 'usage'),
|
(r'', 'usage'),
|
||||||
)
|
)
|
@ -81,15 +81,15 @@ def make(obj, counterType, **kwargs):
|
|||||||
dataset = ((counters.getCounterTitle(counterType).encode('iso-8859-1', errors='ignore'), dataset1),)
|
dataset = ((counters.getCounterTitle(counterType).encode('iso-8859-1', errors='ignore'), dataset1),)
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
'axis': {
|
'axis': {
|
||||||
'x': {
|
'x': {
|
||||||
'ticks': [dict(v=i, label=datetime.datetime.fromtimestamp(i).strftime(xLabelFormat)) for i in firstLast],
|
'ticks': [dict(v=i, label=datetime.datetime.fromtimestamp(i).strftime(xLabelFormat)) for i in firstLast],
|
||||||
'range': (firstLast[0], firstLast[1])
|
'range': (firstLast[0], firstLast[1])
|
||||||
},
|
},
|
||||||
'y': {
|
'y': {
|
||||||
'tickCount': 4,
|
'tickCount': 4,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'legend': {'hide': True},
|
'legend': {'hide': True},
|
||||||
'background': {
|
'background': {
|
||||||
'chartColor': '#ffeeff',
|
'chartColor': '#ffeeff',
|
||||||
|
@ -48,7 +48,7 @@ class Client(object):
|
|||||||
Again, due to the fact that ovirtsdk don't allow (at this moment, but it's on the "TODO" list) concurrent access to
|
Again, due to the fact that ovirtsdk don't allow (at this moment, but it's on the "TODO" list) concurrent access to
|
||||||
more than one server, we keep only one opened connection.
|
more than one server, we keep only one opened connection.
|
||||||
|
|
||||||
Must be acceses "locked", we can alter cached_api and cached_api_key
|
Must be accesed "locked", so we can safely alter cached_api and cached_api_key
|
||||||
'''
|
'''
|
||||||
global cached_api, cached_api_key
|
global cached_api, cached_api_key
|
||||||
aKey = self.__getKey('o-host')
|
aKey = self.__getKey('o-host')
|
||||||
|
Loading…
Reference in New Issue
Block a user