Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/healthcheck/__init__.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/healthcheck/__init__.py	(revision 38645)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/healthcheck/__init__.py	(working copy)
@@ -1277,7 +1277,7 @@
     http_urllist = AssoField2(verbose_name='URL List', tgt='loadbalancing.slb.healthcheck.URLList.url_list',
                       mul='*', pos='left', optional=True, editable=True)
     rs_template = AssoField2(tgt='loadbalancing.slb.rs.RealService.hc_http_template', hidden=True,
-                      mul='1', pos='right', default=[{}], optional=True)
+                      mul='1', pos='right', default=[{}], optional=True, monitorable=True)
     group_template = AssoField2(tgt='loadbalancing.slb.group.Group.hc_http_template', hidden=True,
                       mul='1', pos='right', default=[{}], optional=True)
 
@@ -1328,7 +1328,7 @@
     rst_threshold = Uint32Field(verbose_name='RESET Count Threshold', scope='0..100000', default=10, optional=True, editable=True)
     zero_win_threshold = Uint8Field(verbose_name='Zero Window Ratio Threshold', scope='1..100', unit_name=__('%'), default=40, optional=True, editable=True)
     rs_template = AssoField2(tgt='loadbalancing.slb.rs.RealService.hc_tcp_template', hidden=True,
-                      mul='1', pos='right', default=[{}], optional=True)
+                      mul='1', pos='right', default=[{}], optional=True, monitorable=True)
     group_template = AssoField2(tgt='loadbalancing.slb.group.Group.hc_tcp_template', hidden=True,
                       mul='1', pos='right', default=[{}], optional=True)
     
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/rs/__init__.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/rs/__init__.py	(revision 38645)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/rs/__init__.py	(working copy)
@@ -587,31 +587,8 @@
             result = self.cli.cmd('show statistics slb real all\n',
                                   parser)
             data = QuerySet(self._model)
-            apv = get_app('apv')
-            for each in result:
-                if each:
-                    tmp = each[0]
-                    if 'port' in tmp:
-                        mod = apv.loadbalancing.slb.rs.L4L7RealService
-                    #elif 'current_connection_count' in tmp:
-                    #    mod = apv.loadbalancing.slb.rs.IPRealService
-                    else:
-                        continue
-                    for e in each:
-                        if 'active_status' in e and e['active_status'] == 'INACTIVE':
-                            e['active_status'] = False
-                        else:
-                            e['active_status'] = True
-                        if 'updown_status' in e and e['updown_status'] == 'DOWN':
-                            e['updown_status'] = False
-                        else:
-                            e['updown_status'] = True
-                        del e['ip']
-                        if 'connection_count' not in e:
-                            e['connection_count'] = 0
-                        mod._meta.mark_delay_query(e)
-                    tmp_data = QuerySet(mod, each)
-                    data.merge(tmp_data)
+            l47rst = L4L7RealService.get_manager(self._session).all()
+            data.merge(l47rst)
             iprs = IPRealService.get_manager(self._session).all()
             data.merge(iprs)
             tuxedo = TUXEDORealService.get_manager(self._session).all()
@@ -1772,7 +1749,9 @@
                                               'Total Packets Out:\s+(?P<total_packets_out>[0-9]+).*?' +
                                               'Average Bandwidth In:\s+(?P<average_bandwidth_in>[0-9|\.]+).*?' +
                                               'Average Bandwidth Out:\s+(?P<average_bandwidth_out>[0-9|\.]+).*?' +
-                                              'Average Response time:\s+(?P<average_response_time>[0-9|\.]+)', MATCHALL, reflags=re.S)
+                                              'Average Response time:\s+(?P<average_response_time>[0-9|\.]+).*?' +
+                                              'Average Packets In Rate:\s+(?P<average_packets_in>[0-9|\.]+).*?' +
+                                              'Average Packets Out Rate:\s+(?P<average_packets_out>[0-9|\.]+)', MATCHALL, reflags=re.S)
             result = self.cli.cmd('show statistics slb real all\n',
                                   parser)
             for each in result:
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/vs/__init__.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/vs/__init__.py	(revision 38645)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/loadbalancing/slb/vs/__init__.py	(working copy)
@@ -1508,7 +1508,7 @@
                             each_instance['active_status'] = False
                         else:
                             each_instance['active_status'] = True
-                        if 'connection_count' not in each_instance or not each_instance['connection_count']:
+                        if ('connection_count' not in each_instance or not each_instance['connection_count']) and each_instance['protocol'] != "l2ip":
                             each_instance['connection_count'] = 0
                         mod._meta.mark_delay_query(each_instance)
                         tmp_data = QuerySet(mod, [each_instance])
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/ajax.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/ajax.py	(revision 38645)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/ajax.py	(working copy)
@@ -722,6 +722,9 @@
             ret['ticks'].append(i[0])
             j = 0
             while j < length:
+                if not i[1][j]:
+                    # if null, set to 0
+                    i[1][j] = 0
                 if f.fields.type_name == 'float':
                     ret["data"][j].append(float(i[1][j]))
                 else:
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/manager.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/manager.py	(revision 38645)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/model/manager.py	(working copy)
@@ -903,9 +903,12 @@
                         asso_idx = 0
                     remote_model = field.target_end[asso_idx].model
                     remote_manager = remote_model.get_manager(self._session)
-                    remote_ins = remote_manager.get(each_pk)
+                    try:
+                        remote_ins = remote_manager.get(each_pk)
+                    except KeyError:
+                        continue
                     remote_hc = remote_manager.get_quality_status(instance=remote_ins)
-                    if field.tgt_field[asso_idx].monitorable:                        
+                    if field.tgt_field[asso_idx].monitorable:
                         tmp['children'].append(
                                 {
                                     'data': {
