Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/report.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/report.py	(revision 39360)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/report.py	(working copy)
@@ -1093,7 +1093,7 @@
     link_list = sorted(link_list)
 
     total_dic, time_list = get_llb_total_sql(from_time, to_time, link_list)
-    if "bandwidth_usage" in llb_total_list:
+    if "bandwidth_usage" in llb_total_list and total_dic and time_list:
         graph_item = []
         zip_list = [time_list]
         for each in link_list:
@@ -1105,13 +1105,16 @@
         table_data = zip(*zip_list)
         story = Draw_Line_Chart(unicode(_("Bandwidth Usage")), env, styles, story, time_list, graph_item, table_data)
 
-    if "link_throughput" in llb_total_list:
+    if "link_throughput" in llb_total_list and total_dic and time_list:
         graph_item = []
         zip_list = [time_list]
         max_list = []
         for each in link_list:
             max_list.append(max(total_dic[each]['through_list']))
-        yaxis_name = yaxis_unit(max(max_list))
+        if not max_list:
+            yaxis_name = ""
+        else:
+            yaxis_name = yaxis_unit(max(max_list))
         for each in link_list:
             graph_item.append({
                 "item_name" : each,
@@ -1121,7 +1124,7 @@
         table_data = zip(*zip_list)
         story = Draw_Line_Chart(unicode(_("Total Link Throughput(bps)")), env, styles, story, time_list, graph_item, table_data, yaxis_name)
 
-    if "curr_conn" in llb_total_list:
+    if "curr_conn" in llb_total_list and total_dic and time_list:
         graph_item = []
         zip_list = [time_list]
         for each in link_list:
@@ -1133,7 +1136,7 @@
         table_data = zip(*zip_list)
         story = Draw_Line_Chart(unicode(_("Concurrent Connections")), env, styles, story, time_list, graph_item, table_data)
 
-    if "total_hits" in llb_total_list:
+    if "total_hits" in llb_total_list and total_dic and time_list:
         graph_item = []
         zip_list = [time_list]
         for each in link_list:
