diff options
author | Joey Hagedorn <hagedorn@mcs.anl.gov> | 2006-11-22 21:55:29 +0000 |
---|---|---|
committer | Joey Hagedorn <hagedorn@mcs.anl.gov> | 2006-11-22 21:55:29 +0000 |
commit | 872363f0c5f4b10de9f376b9340b3f7c7d1d9664 (patch) | |
tree | 503a0ce01052ff8eecbe28c6bb7ac991d5c51b28 | |
parent | 67011d71eb012239fd56bb626d19d34f0c060269 (diff) | |
download | bcfg2-872363f0c5f4b10de9f376b9340b3f7c7d1d9664.tar.gz bcfg2-872363f0c5f4b10de9f376b9340b3f7c7d1d9664.tar.bz2 bcfg2-872363f0c5f4b10de9f376b9340b3f7c7d1d9664.zip |
Moved the new reporting system in to Server module.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2525 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | setup.py | 2 | ||||
-rwxr-xr-x | src/lib/Server/Reports/importscript.py | 6 | ||||
-rw-r--r-- | src/lib/Server/Reports/nisauth.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Reports/reports/templatetags/django_templating_sigh.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Reports/reports/views.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Reports/settings.py | 8 | ||||
-rw-r--r-- | src/lib/Server/Reports/urls.py | 34 | ||||
-rw-r--r-- | src/lib/Server/__init__.py | 2 |
8 files changed, 29 insertions, 29 deletions
@@ -9,7 +9,7 @@ setup(name="Bcfg2.Server", author="Narayan Desai", author_email="desai@mcs.anl.gov", packages=["Bcfg2", 'Bcfg2.Server', "Bcfg2.Server.Plugins", "Bcfg2.Server.Hostbase", - "Bcfg2.Client", "Bcfg2.Client.Tools"], + "Bcfg2.Server.Reports","Bcfg2.Client", "Bcfg2.Client.Tools"], package_dir = {'Bcfg2':'src/lib'}, scripts = glob('src/sbin/*'), data_files = [('share/bcfg2/schemas', diff --git a/src/lib/Server/Reports/importscript.py b/src/lib/Server/Reports/importscript.py index 252fce886..39e4ea77b 100755 --- a/src/lib/Server/Reports/importscript.py +++ b/src/lib/Server/Reports/importscript.py @@ -7,9 +7,9 @@ try: import settings except ImportError: try: - import brpt.settings + import Bcfg2.Server.Reports.settings except ImportError: - sys.stderr.write("Failed to locate settings.py. Is brpt python module installed?") + sys.stderr.write("Failed to locate settings.py. Is Bcfg2.Server.Reports python module installed?") sys.exit(1) project_directory = os.path.dirname(settings.__file__) @@ -20,7 +20,7 @@ sys.path.pop() # Set DJANGO_SETTINGS_MODULE appropriately. os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % project_name -from brpt.reports.models import Client, Interaction, Bad, Modified, Extra, Performance, Reason +from Bcfg2.Server.Reports.reports.models import Client, Interaction, Bad, Modified, Extra, Performance, Reason from lxml.etree import XML, XMLSyntaxError from sys import argv from getopt import getopt, GetoptError diff --git a/src/lib/Server/Reports/nisauth.py b/src/lib/Server/Reports/nisauth.py index e9a954cd8..b8858e36c 100644 --- a/src/lib/Server/Reports/nisauth.py +++ b/src/lib/Server/Reports/nisauth.py @@ -1,6 +1,6 @@ import os import crypt, nis -import brpt.settings import AUTHORIZED_GROUP +import Bcfg2.Server.Reports.settings import AUTHORIZED_GROUP """Checks with NIS to see if the current user is in the support group""" diff --git a/src/lib/Server/Reports/reports/templatetags/django_templating_sigh.py b/src/lib/Server/Reports/reports/templatetags/django_templating_sigh.py index 85f4d61a2..9ccad0496 100644 --- a/src/lib/Server/Reports/reports/templatetags/django_templating_sigh.py +++ b/src/lib/Server/Reports/reports/templatetags/django_templating_sigh.py @@ -1,5 +1,5 @@ from django import template -#from brpt.reports.models import Client, Interaction, Bad, Modified, Extra +#from Bcfg2.Server.Reports.reports.models import Client, Interaction, Bad, Modified, Extra register = template.Library() diff --git a/src/lib/Server/Reports/reports/views.py b/src/lib/Server/Reports/reports/views.py index 44c858a82..7f62aab94 100644 --- a/src/lib/Server/Reports/reports/views.py +++ b/src/lib/Server/Reports/reports/views.py @@ -3,7 +3,7 @@ from django.template import Context, loader from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response, get_object_or_404 -from brpt.reports.models import Client, Interaction, Bad, Modified, Extra, Performance, Reason +from Bcfg2.Server.Reports.reports.models import Client, Interaction, Bad, Modified, Extra, Performance, Reason from datetime import datetime, timedelta from time import strptime from django.db import connection diff --git a/src/lib/Server/Reports/settings.py b/src/lib/Server/Reports/settings.py index 6f490d688..abe57856b 100644 --- a/src/lib/Server/Reports/settings.py +++ b/src/lib/Server/Reports/settings.py @@ -1,4 +1,4 @@ -# Django settings for brpt project. +# Django settings for bcfg reports project. from ConfigParser import ConfigParser, NoSectionError, NoOptionError c = ConfigParser() c.read(['/etc/bcfg2.conf'])#This needs to be configurable one day somehow @@ -61,12 +61,12 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.doc.XViewMiddleware', ) -ROOT_URLCONF = 'brpt.urls' +ROOT_URLCONF = 'Bcfg2.Server.Reports.urls' # Authentication Settings # Use NIS authentication backend defined in backends.py AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', - 'brpt.backends.NISBackend') + 'Bcfg2.Server.Reports.backends.NISBackend') # The NIS group authorized to login to BCFG2's reportinvg system AUTHORIZED_GROUP = '' #create login url area: @@ -88,5 +88,5 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - 'brpt.reports' + 'Bcfg2.Server.Reports' ) diff --git a/src/lib/Server/Reports/urls.py b/src/lib/Server/Reports/urls.py index d6f9ecb3a..0b0593fb9 100644 --- a/src/lib/Server/Reports/urls.py +++ b/src/lib/Server/Reports/urls.py @@ -2,25 +2,25 @@ from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: - # (r'^brpt/', include('brpt.apps.foo.urls.foo')), - (r'^/*$','brpt.reports.views.index'), - (r'^clients/(?P<hostname>\S+)/(?P<pk>\d+)/$', 'brpt.reports.views.client_detail'), - (r'^clients/(?P<hostname>\S+)/$', 'brpt.reports.views.client_detail'), - (r'^clients/(?P<hostname>\S+)$', 'brpt.reports.views.client_detail'), + # (r'^Bcfg2.Server.Reports/', include('Bcfg2.Server.Reports.apps.foo.urls.foo')), + (r'^/*$','Bcfg2.Server.Reports.reports.views.index'), + (r'^clients/(?P<hostname>\S+)/(?P<pk>\d+)/$', 'Bcfg2.Server.Reports.reports.views.client_detail'), + (r'^clients/(?P<hostname>\S+)/$', 'Bcfg2.Server.Reports.reports.views.client_detail'), + (r'^clients/(?P<hostname>\S+)$', 'Bcfg2.Server.Reports.reports.views.client_detail'), #hack because hostnames have periods and we still want to append slash - (r'^clients/$','brpt.reports.views.client_index'), - (r'^displays/sys-view/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','brpt.reports.views.display_sys_view'), - (r'^displays/sys-view/$','brpt.reports.views.display_sys_view'), - (r'^displays/summary/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','brpt.reports.views.display_summary'), - (r'^displays/summary/$','brpt.reports.views.display_summary'), - (r'^displays/timing/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','brpt.reports.views.display_timing'), - (r'^displays/timing/$','brpt.reports.views.display_timing'), - (r'^displays/$','brpt.reports.views.display_index'), + (r'^clients/$','Bcfg2.Server.Reports.reports.views.client_index'), + (r'^displays/sys-view/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','Bcfg2.Server.Reports.reports.views.display_sys_view'), + (r'^displays/sys-view/$','Bcfg2.Server.Reports.reports.views.display_sys_view'), + (r'^displays/summary/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','Bcfg2.Server.Reports.reports.views.display_summary'), + (r'^displays/summary/$','Bcfg2.Server.Reports.reports.views.display_summary'), + (r'^displays/timing/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','Bcfg2.Server.Reports.reports.views.display_timing'), + (r'^displays/timing/$','Bcfg2.Server.Reports.reports.views.display_timing'), + (r'^displays/$','Bcfg2.Server.Reports.reports.views.display_index'), - (r'^elements/modified/(?P<eyedee>\d+)/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','brpt.reports.views.config_item_modified'), - (r'^elements/modified/(?P<eyedee>\d+)/$','brpt.reports.views.config_item_modified'), - (r'^elements/bad/(?P<eyedee>\d+)/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','brpt.reports.views.config_item_bad'), - (r'^elements/bad/(?P<eyedee>\d+)/$','brpt.reports.views.config_item_bad'), + (r'^elements/modified/(?P<eyedee>\d+)/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','Bcfg2.Server.Reports.reports.views.config_item_modified'), + (r'^elements/modified/(?P<eyedee>\d+)/$','Bcfg2.Server.Reports.reports.views.config_item_modified'), + (r'^elements/bad/(?P<eyedee>\d+)/(?P<timestamp>(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])@([01][0-9]|2[0-3]):([0-5][0-9]|60):([0-5][0-9]|60))/$','Bcfg2.Server.Reports.reports.views.config_item_bad'), + (r'^elements/bad/(?P<eyedee>\d+)/$','Bcfg2.Server.Reports.reports.views.config_item_bad'), ) # Uncomment this for admin: diff --git a/src/lib/Server/__init__.py b/src/lib/Server/__init__.py index bc89db87e..36d6596d4 100644 --- a/src/lib/Server/__init__.py +++ b/src/lib/Server/__init__.py @@ -2,5 +2,5 @@ '''This is the set of modules for Bcfg2.Server''' __revision__ = '$Revision$' -__all__ = ["Component", "Core", "Plugin", "Plugins", "Statistics"] +__all__ = ["Component", "Core", "Plugin", "Plugins", "Statistics", "Hostbase", "Reports"] |