summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-05-20 18:30:06 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-05-20 13:31:57 -0500
commitd58d650a4816021fb73309d4c41c22040d55cd67 (patch)
treea0458986002a99f0b014a44c9c666a894835dc24 /src
parent99c961173fe3f2254c759fbe11f0361ba9f5a374 (diff)
downloadbcfg2-d58d650a4816021fb73309d4c41c22040d55cd67.tar.gz
bcfg2-d58d650a4816021fb73309d4c41c22040d55cd67.tar.bz2
bcfg2-d58d650a4816021fb73309d4c41c22040d55cd67.zip
reports: Fixes for Tickets #833 and #885
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5861 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Reports/reports/templates/config_items/index.html8
-rw-r--r--src/lib/Server/Reports/reports/views.py6
-rw-r--r--src/lib/Server/Reports/urls.py1
3 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/Server/Reports/reports/templates/config_items/index.html b/src/lib/Server/Reports/reports/templates/config_items/index.html
index 313e28633..04083344c 100644
--- a/src/lib/Server/Reports/reports/templates/config_items/index.html
+++ b/src/lib/Server/Reports/reports/templates/config_items/index.html
@@ -63,20 +63,20 @@
<input type="button"
name="go"
value="Go"
- onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_modified eyedee=item.entry.id%}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;" />
+ onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_modified eyedee=item.id%}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;" />
| <input type="button"
name="now"
value="Now"
- onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_modified eyedee=item.entry.id%}';"/>
+ onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_modified eyedee=item.id %}';"/>
{% else %}
<input type="button"
name="go"
value="Go"
- onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_bad eyedee=item.entry.id %}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;"/>
+ onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_bad eyedee=item.id %}'+document.forms['timestamp-select'].date1.value+'@'+document.forms['timestamp-select'].time.value;"/>
| <input type="button"
name="now"
value="Now"
- onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_bad eyedee=item.entry.id %}';"/>
+ onClick="location.href='{% url Bcfg2.Server.Reports.reports.views.config_item_bad eyedee=item.id %}';"/>
{% endifequal %}
</span></form>
<br/><br/><br/></div>
diff --git a/src/lib/Server/Reports/reports/views.py b/src/lib/Server/Reports/reports/views.py
index b9fa371ef..cb8dbe650 100644
--- a/src/lib/Server/Reports/reports/views.py
+++ b/src/lib/Server/Reports/reports/views.py
@@ -40,8 +40,8 @@ def config_item_modified(request, eyedee =None, timestamp = 'now', type=TYPE_MOD
cursor.execute("select client_id from reports_interaction, reports_entries_interactions, reports_client "+
"WHERE reports_entries_interactions.interaction_id IN %s "+
"AND reports_entries_interactions.interaction_id = reports_interaction.id "+
- "AND reports_entries_interactions.modified_id = %s " +
- "AND reports_entries_interactions.type = %s ", [interactionlist, eyedee, type])
+ "AND reports_entries_interactions.entry_id = %s " +
+ "AND reports_entries_interactions.type = %s ", [interactionlist, item.entry_id, type])
associated_client_list = Client.objects.active(timestamp).filter(id__in=[x[0] for x in cursor.fetchall()])
else:
associated_client_list = []
@@ -131,7 +131,7 @@ def client_detailed_list(request, **kwargs):
if entry_max:
for client in client_list:
try:
- e = interaction.objects.filter(client=client).filter(timestamp__lt=entry_max).order_by('-timestamp')[0]
+ e = Interaction.objects.filter(client=client).filter(timestamp__lt=entry_max).order_by('-timestamp')[0]
if 'server' in context and e.server != context['server']:
continue
if 'state' in context and e.state != context['state']:
diff --git a/src/lib/Server/Reports/urls.py b/src/lib/Server/Reports/urls.py
index 63c119d14..e1326b5ea 100644
--- a/src/lib/Server/Reports/urls.py
+++ b/src/lib/Server/Reports/urls.py
@@ -24,6 +24,7 @@ urlpatterns = patterns('',
(r'^%sclients-detailed/server/(?P<server>[\w\-\.]+)/(?P<state>[A-Za-z]+)/$' % web_prefix,'Bcfg2.Server.Reports.reports.views.client_detailed_list'),
(r'^%sclients-detailed/$' % web_prefix,'Bcfg2.Server.Reports.reports.views.client_detailed_list'),
(r'^%sclients/(?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))/$' % web_prefix,'Bcfg2.Server.Reports.reports.views.client_index'),
+ (r'^%sclients/(?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))$' % web_prefix,'Bcfg2.Server.Reports.reports.views.client_index'),
(r'^%sclients/(?P<hostname>\S+)/(?P<pk>\d+)/$' % web_prefix, 'Bcfg2.Server.Reports.reports.views.client_detail'),
(r'^%sclients/(?P<hostname>\S+)/manage/$' % web_prefix, 'Bcfg2.Server.Reports.reports.views.client_manage'),
(r'^%sclients/(?P<hostname>\S+)/$' % web_prefix, 'Bcfg2.Server.Reports.reports.views.client_detail'),