Index: /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/real_service.controller.js
===================================================================
--- /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/real_service.controller.js	(revision 2357)
+++ /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/real_service.controller.js	(working copy)
@@ -183,51 +183,51 @@
                                 agentHost = agentHost + '|' + device.ip;
                             }
                         })
-                        if (agentHost !== '') agentHost += '/';
-                        let query = 'select last(rsCntOfReq), last(rsConnPerSec), last(rsInBytePerSec)*8, last(rsOutBytePerSec)*8 from realStats where time > now()-20s group by realServerId, agent_host, Addr, Port, Protocol, Status;'
-                        if (isDeviceAdmin) {
-                            query = 'select last(rsCntOfReq), last(rsConnPerSec), last(rsInBytePerSec)*8, last(rsOutBytePerSec)*8 from realStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by realServerId, agent_host, Addr, Port, Protocol, Status;'
-                        }
-                        if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
-                            dashboardService.influxdb_proxy({"q": query}).then(function (res) {
-                                serviceViewModel.loading = false;
-                                if (res && res.status === 200) {
-                                    if (res.data.results.length > 0) {
-                                        _.each(res.data.results[0].series, function (series) {
-                                            var device_ip = series.tags.agent_host;
-                                            if (deviceMap[device_ip]) {
-                                                realServiceList.push({
-                                                    "name": series.tags.realServerId,
-                                                    "origin_type": "SLB_rs",
-                                                    "type": protocol2type[series.tags.Protocol],
-                                                    "addr": series.tags.Addr,
-                                                    "port": series.tags.Port,
-                                                    "health_status": series.tags.Status,
-                                                    "device": {
-                                                        "name": deviceMap[device_ip].name,
-                                                        "type": deviceMap[device_ip].type,
-                                                        "id": deviceMap[device_ip].id,
-                                                        "ip": device_ip,
-                                                        "device_group": deviceMap[device_ip].device_group,
-                                                    },
-                                                    "graph_data": {
-                                                        "request": series.values[0][1],
-                                                        "conn": series.values[0][2],
-                                                        "received": storageService.ValueFormat1024(series.values[0][3]) + 'bps',
-                                                        "sent": storageService.ValueFormat1024(series.values[0][4]) + 'bps',
-                                                    }
-                                                })
-                                            }
-                                        })
-                                    }
-                                    serviceViewModel.serviceList = realServiceList;
-                                }
-                            });
-                        } else {
+                    })
+                    if (agentHost !== '') agentHost += '/';
+                    let query = 'select last(rsCntOfReq), last(rsConnPerSec), last(rsInBytePerSec)*8, last(rsOutBytePerSec)*8 from realStats where time > now()-20s group by realServerId, agent_host, Addr, Port, Protocol, Status;'
+                    if (isDeviceAdmin) {
+                        query = 'select last(rsCntOfReq), last(rsConnPerSec), last(rsInBytePerSec)*8, last(rsOutBytePerSec)*8 from realStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by realServerId, agent_host, Addr, Port, Protocol, Status;'
+                    }
+                    if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
+                        dashboardService.influxdb_proxy({"q": query}).then(function (res) {
                             serviceViewModel.loading = false;
-                        }
-                    });
-                })
+                            if (res && res.status === 200) {
+                                if (res.data.results.length > 0) {
+                                    _.each(res.data.results[0].series, function (series) {
+                                        var device_ip = series.tags.agent_host;
+                                        if (deviceMap[device_ip]) {
+                                            realServiceList.push({
+                                                "name": series.tags.realServerId,
+                                                "origin_type": "SLB_rs",
+                                                "type": protocol2type[series.tags.Protocol],
+                                                "addr": series.tags.Addr,
+                                                "port": series.tags.Port,
+                                                "health_status": series.tags.Status,
+                                                "device": {
+                                                    "name": deviceMap[device_ip].name,
+                                                    "type": deviceMap[device_ip].type,
+                                                    "id": deviceMap[device_ip].id,
+                                                    "ip": device_ip,
+                                                    "device_group": deviceMap[device_ip].device_group,
+                                                },
+                                                "graph_data": {
+                                                    "request": series.values[0][1],
+                                                    "conn": series.values[0][2],
+                                                    "received": storageService.ValueFormat1024(series.values[0][3]) + 'bps',
+                                                    "sent": storageService.ValueFormat1024(series.values[0][4]) + 'bps',
+                                                }
+                                            })
+                                        }
+                                    })
+                                }
+                                serviceViewModel.serviceList = realServiceList;
+                            }
+                        });
+                    } else {
+                        serviceViewModel.loading = false;
+                    }
+                });
             }
             serviceViewModel.refresh();
         }
@@ -430,4 +430,4 @@
 
             modalViewModel.refresh();
         }
-    ])
\ No newline at end of file
+    ])
Index: /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/virtual_service.controller.js
===================================================================
--- /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/virtual_service.controller.js	(revision 2357)
+++ /branches/amp_3_6_0/extensions/monitoring/webui/resource/slb/virtual_service.controller.js	(working copy)
@@ -185,50 +185,50 @@
                                 agentHost = agentHost + '|' + device.ip;
                             }
                         });
-                        if (agentHost !== '') agentHost += '/';
-                        let query = 'select max(totalHits)-min(totalHits), last(ConnCnt), last(InBytePerSec)*8, last(OutBytePerSec)*8 from virtualStats where time > now()-20s group by ServerId, agent_host, Addr, Port, Protocol, HealthStatus;'
-                        if (isDeviceAdmin) {
-                            query = 'select max(totalHits)-min(totalHits), last(ConnCnt), last(InBytePerSec)*8, last(OutBytePerSec)*8 from virtualStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by ServerId, agent_host, Addr, Port, Protocol, HealthStatus;'
-                        }
-                        if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
-                            dashboardService.influxdb_proxy({"q": query}).then(function (res) {
-                                serviceViewModel.loading = false;
-                                if (res && res.status === 200) {
-                                    if (res.data.results.length > 0) {
-                                        _.each(res.data.results[0].series, function (series) {
-                                            var device_ip = series.tags.agent_host;
-                                            if (deviceMap[device_ip]) {
-                                                virtualServiceList.push({
-                                                    "name": series.tags.ServerId,
-                                                    "origin_type": "SLB_vs",
-                                                    "type": protocol2type[series.tags.Protocol],
-                                                    "addr": series.tags.Addr,
-                                                    "port": series.tags.Port,
-                                                    "health_status": series.tags.HealthStatus,
-                                                    "device": {
-                                                        "name": deviceMap[device_ip].name,
-                                                        "type": deviceMap[device_ip].type,
-                                                        "id": deviceMap[device_ip].id,
-                                                        "ip": device_ip,
-                                                        "device_group": deviceMap[device_ip].device_group,
-                                                    },
-                                                    "graph_data": {
-                                                        "hits": series.values[0][1],
-                                                        "conn": series.values[0][2],
-                                                        "received": storageService.ValueFormat1024(series.values[0][3]) + 'bps',
-                                                        "sent": storageService.ValueFormat1024(series.values[0][4]) + 'bps',
-                                                    }
-                                                })
-                                            }
-                                        })
-                                    }
-                                    serviceViewModel.serviceList = virtualServiceList;
-                                }
-                            });
-                        } else {
+                    });
+                    if (agentHost !== '') agentHost += '/';
+                    let query = 'select max(totalHits)-min(totalHits), last(ConnCnt), last(InBytePerSec)*8, last(OutBytePerSec)*8 from virtualStats where time > now()-20s group by ServerId, agent_host, Addr, Port, Protocol, HealthStatus;'
+                    if (isDeviceAdmin) {
+                        query = 'select max(totalHits)-min(totalHits), last(ConnCnt), last(InBytePerSec)*8, last(OutBytePerSec)*8 from virtualStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by ServerId, agent_host, Addr, Port, Protocol, HealthStatus;'
+                    }
+                    if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
+                        dashboardService.influxdb_proxy({"q": query}).then(function (res) {
                             serviceViewModel.loading = false;
-                        }
-                    })
+                            if (res && res.status === 200) {
+                                if (res.data.results.length > 0) {
+                                    _.each(res.data.results[0].series, function (series) {
+                                        var device_ip = series.tags.agent_host;
+                                        if (deviceMap[device_ip]) {
+                                            virtualServiceList.push({
+                                                "name": series.tags.ServerId,
+                                                "origin_type": "SLB_vs",
+                                                "type": protocol2type[series.tags.Protocol],
+                                                "addr": series.tags.Addr,
+                                                "port": series.tags.Port,
+                                                "health_status": series.tags.HealthStatus,
+                                                "device": {
+                                                    "name": deviceMap[device_ip].name,
+                                                    "type": deviceMap[device_ip].type,
+                                                    "id": deviceMap[device_ip].id,
+                                                    "ip": device_ip,
+                                                    "device_group": deviceMap[device_ip].device_group,
+                                                },
+                                                "graph_data": {
+                                                    "hits": series.values[0][1],
+                                                    "conn": series.values[0][2],
+                                                    "received": storageService.ValueFormat1024(series.values[0][3]) + 'bps',
+                                                    "sent": storageService.ValueFormat1024(series.values[0][4]) + 'bps',
+                                                }
+                                            })
+                                        }
+                                    })
+                                }
+                                serviceViewModel.serviceList = virtualServiceList;
+                            }
+                        });
+                    } else {
+                        serviceViewModel.loading = false;
+                    }
                 })
             }
             serviceViewModel.refresh();
@@ -691,4 +691,4 @@
 
             };
         }
-    ])
\ No newline at end of file
+    ])
Index: /branches/amp_3_6_0/extensions/monitoring/webui/resource/sslvpn/sslvpn.controller.js
===================================================================
--- /branches/amp_3_6_0/extensions/monitoring/webui/resource/sslvpn/sslvpn.controller.js	(revision 2357)
+++ /branches/amp_3_6_0/extensions/monitoring/webui/resource/sslvpn/sslvpn.controller.js	(working copy)
@@ -151,47 +151,48 @@
                                 agentHost = agentHost + '|' + host.ip;
                             }
                         })
-                        if (agentHost !== '') agentHost += '/';
-                        let query = 'select last(ActiveSessions) from virtualSiteStats where time > now()-20s group by Id, agent_host, IP;'
-                        if (isDeviceAdmin) {
-                            query = 'select last(ActiveSessions) from virtualSiteStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by Id, agent_host, IP;'
-                        }
-                        if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
-                            dashboardService.influxdb_proxy({"q": query}).then(function (res) {
-                                serviceViewModel.loading = false;
-                                if (res && res.status === 200) {
-                                    if (res.data.results.length > 0) {
-                                        _.each(res.data.results[0].series, function (series) {
-                                            let device_ip = series.tags.agent_host;
-                                            if (deviceMap[device_ip]) {
-                                                virtualSiteList.push({
-                                                    "name": series.tags.Id,
-                                                    "origin_type": "SSLVPN",
-                                                    "ip": series.tags.IP,
-                                                    "device": {
-                                                        "name": deviceMap[device_ip].name,
-                                                        "type": deviceMap[device_ip].type,
-                                                        "id": deviceMap[device_ip].id,
-                                                        "ip": device_ip,
-                                                        "device_group": deviceMap[device_ip].device_group,
-                                                    },
-                                                    "graph_data": {
-                                                        "sessions": series.values[0][1],
-                                                    }
-                                                })
-                                            }
-                                        })
-                                    }
-                                    serviceViewModel.serviceList = virtualSiteList;
-                                }
-                            });
-                        } else {
+                    });
+                    if (agentHost !== '') agentHost += '/';
+                    let query = 'select last(ActiveSessions) from virtualSiteStats where time > now()-20s group by Id, agent_host, IP;'
+                    if (isDeviceAdmin) {
+                        query = 'select last(ActiveSessions) from virtualSiteStats where agent_host  =~ ' + agentHost + ' and time > now()-20s group by Id, agent_host, IP;'
+                    }
+                    if ((isDeviceAdmin && agentHost !== '') || !isDeviceAdmin) {
+                        dashboardService.influxdb_proxy({"q": query}).then(function (res) {
                             serviceViewModel.loading = false;
-                        }
-                    })
-                });
+                            if (res && res.status === 200) {
+                                if (res.data.results.length > 0) {
+                                    _.each(res.data.results[0].series, function (series) {
+                                        let device_ip = series.tags.agent_host;
+                                        if (deviceMap[device_ip]) {
+                                            virtualSiteList.push({
+                                                "name": series.tags.Id,
+                                                "origin_type": "SSLVPN",
+                                                "ip": series.tags.IP,
+                                                "device": {
+                                                    "name": deviceMap[device_ip].name,
+                                                    "type": deviceMap[device_ip].type,
+                                                    "id": deviceMap[device_ip].id,
+                                                    "ip": device_ip,
+                                                    "device_group": deviceMap[device_ip].device_group,
+                                                },
+                                                "graph_data": {
+                                                    "sessions": series.values[0][1],
+                                                }
+                                            })
+                                        }
+                                    })
+                                }
+                                serviceViewModel.serviceList = virtualSiteList;
+                            }
+                        });
+                    } else {
+                        serviceViewModel.loading = false;
+                    }
+                })
             }
 
             serviceViewModel.refresh();
         }
     ])
+
