Index: /branches/amp_4_0/src/webui/webui/conf/build_config.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/conf/build_config.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/conf/build_config.py	(working copy)
@@ -3,8 +3,8 @@
 import string
 
 if len(sys.argv) < 4:
-        print "usage: " + sys.argv[0] + " <template file> + <output file> + param1=value1 ... "
-        print "example: " + sys.argv[0] + " /ca/xmlrpc/conf/httpd.conf /etc/xmlrpc_httpd.conf port=9999"
+        print("usage: " + sys.argv[0] + " <template file> + <output file> + param1=value1 ... ")
+        print("example: " + sys.argv[0] + " /ca/xmlrpc/conf/httpd.conf /etc/xmlrpc_httpd.conf port=9999")
         sys.exit(-1)
 
 #open tempate and output file
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/job.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/job.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/job.py	(working copy)
@@ -1,7 +1,6 @@
 from collections import Iterable, Mapping
 from uuid import uuid4
 
-import six
 
 from apscheduler.triggers.base import BaseTrigger
 from apscheduler.util import (
@@ -141,7 +140,7 @@
 
         if 'id' in changes:
             value = changes.pop('id')
-            if not isinstance(value, six.string_types):
+            if not isinstance(value, str):
                 raise TypeError("id must be a nonempty string")
             if hasattr(self, 'id'):
                 raise ValueError('The job ID may not be changed')
@@ -152,7 +151,7 @@
             args = changes.pop('args') if 'args' in changes else self.args
             kwargs = changes.pop('kwargs') if 'kwargs' in changes else self.kwargs
 
-            if isinstance(func, six.string_types):
+            if isinstance(func, str):
                 func_ref = func
                 func = ref_to_obj(func)
             elif callable(func):
@@ -167,9 +166,9 @@
             if not hasattr(self, 'name') and changes.get('name', None) is None:
                 changes['name'] = get_callable_name(func)
 
-            if isinstance(args, six.string_types) or not isinstance(args, Iterable):
+            if isinstance(args, str) or not isinstance(args, Iterable):
                 raise TypeError('args must be a non-string iterable')
-            if isinstance(kwargs, six.string_types) or not isinstance(kwargs, Mapping):
+            if isinstance(kwargs, str) or not isinstance(kwargs, Mapping):
                 raise TypeError('kwargs must be a dict-like object')
 
             check_callable_args(func, args, kwargs)
@@ -181,13 +180,13 @@
 
         if 'name' in changes:
             value = changes.pop('name')
-            if not value or not isinstance(value, six.string_types):
+            if not value or not isinstance(value, str):
                 raise TypeError("name must be a nonempty string")
             approved['name'] = value
 
         if 'misfire_grace_time' in changes:
             value = changes.pop('misfire_grace_time')
-            if value is not None and (not isinstance(value, six.integer_types) or value <= 0):
+            if value is not None and (not isinstance(value, int) or value <= 0):
                 raise TypeError('misfire_grace_time must be either None or a positive integer')
             approved['misfire_grace_time'] = value
 
@@ -197,7 +196,7 @@
 
         if 'max_instances' in changes:
             value = changes.pop('max_instances')
-            if not isinstance(value, six.integer_types) or value <= 0:
+            if not isinstance(value, int) or value <= 0:
                 raise TypeError('max_instances must be a positive integer')
             approved['max_instances'] = value
 
@@ -211,7 +210,7 @@
 
         if 'executor' in changes:
             value = changes.pop('executor')
-            if not isinstance(value, six.string_types):
+            if not isinstance(value, str):
                 raise TypeError('executor must be a string')
             approved['executor'] = value
 
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/util.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/util.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/apscheduler/util.py	(working copy)
@@ -74,7 +74,7 @@
     :rtype: tzinfo
 
     """
-    if isinstance(obj, six.string_types):
+    if isinstance(obj, str):
         return timezone(obj)
     if isinstance(obj, tzinfo):
         if not hasattr(obj, 'localize') or not hasattr(obj, 'normalize'):
@@ -119,7 +119,7 @@
         datetime_ = input
     elif isinstance(input, date):
         datetime_ = datetime.combine(input, time())
-    elif isinstance(input, six.string_types):
+    elif isinstance(input, str):
         m = _DATE_REGEX.match(input)
         if not m:
             raise ValueError('Invalid date string')
@@ -134,7 +134,7 @@
     if tz is None:
         raise ValueError(
             'The "tz" argument must be specified if %s has no timezone information' % arg_name)
-    if isinstance(tz, six.string_types):
+    if isinstance(tz, str):
         tz = timezone(tz)
 
     try:
@@ -258,7 +258,7 @@
     :type ref: str
 
     """
-    if not isinstance(ref, six.string_types):
+    if not isinstance(ref, str):
         raise TypeError('References must be strings')
     if ':' not in ref:
         raise ValueError('Invalid reference')
@@ -288,14 +288,8 @@
     return ref_to_obj(ref)
 
 
-if six.PY2:
-    def repr_escape(string):
-        if isinstance(string, six.text_type):
-            return string.encode('ascii', 'backslashreplace')
+def repr_escape(string):
         return string
-else:
-    def repr_escape(string):
-        return string
 
 
 def check_callable_args(func, args, kwargs):
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/client/fcgi_app.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/client/fcgi_app.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/client/fcgi_app.py	(working copy)
@@ -136,13 +136,13 @@
     if nameLength < 128:
         s = chr(nameLength)
     else:
-        s = struct.pack('!L', nameLength | 0x80000000L)
+        s = struct.pack('!L', nameLength | 0x80000000)
 
     valueLength = len(value)
     if valueLength < 128:
         s += chr(valueLength)
     else:
-        s += struct.pack('!L', valueLength | 0x80000000L)
+        s += struct.pack('!L', valueLength | 0x80000000)
 
     return s + name + value
 
@@ -170,7 +170,7 @@
         while length:
             try:
                 data = sock.recv(length)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([sock], [], [])
                     continue
@@ -227,7 +227,7 @@
         while length:
             try:
                 sent = sock.send(data)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([], [sock], [])
                     continue
@@ -394,7 +394,7 @@
             return sock
 
         # To be done when I have more time...
-        raise NotImplementedError, 'Launching and managing FastCGI programs not yet implemented'
+        raise NotImplementedError('Launching and managing FastCGI programs not yet implemented')
     
     def _fcgiGetValues(self, sock, vars):
         # Construct FCGI_GET_VALUES record
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp.py	(working copy)
@@ -149,7 +149,7 @@
 
         try:
             sock = self._setupSocket()
-        except socket.error, e:
+        except socket.error as e:
             self.logger.error('Failed to bind socket (%s), exiting', e[1])
             return False
 
@@ -175,7 +175,7 @@
         names.sort()
         for name in names:
             yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
-                name, cgi.escape(`environ[name]`))
+                name, cgi.escape(repr(environ[name])))
 
         form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ,
                                 keep_blank_values=1)
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_base.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_base.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_base.py	(working copy)
@@ -170,8 +170,8 @@
             return '', pos
         s = data[pos:pos+length]
         return s, pos+length+1 # Don't forget NUL
-    except Exception, e:
-        raise ProtocolError, 'decodeString: '+str(e)
+    except Exception as e:
+        raise ProtocolError('decodeString: ' + str(e))
 
 def decodeRequestHeader(data, pos=0):
     """Decode a request header/value pair."""
@@ -181,14 +181,14 @@
             i = ord(data[pos+1])
             name = requestHeaderTable[i]
             if name is None:
-                raise ValueError, 'bad request header code'
+                raise ValueError('bad request header code')
             pos += 2
         else:
             name, pos = decodeString(data, pos)
         value, pos = decodeString(data, pos)
         return name, value, pos
-    except Exception, e:
-        raise ProtocolError, 'decodeRequestHeader: '+str(e)
+    except Exception as e:
+        raise ProtocolError('decodeRequestHeader: ' + str(e))
 
 def decodeAttribute(data, pos=0):
     """Decode a request attribute."""
@@ -210,11 +210,11 @@
         else:
             name = attributeTable[i]
             if name is None:
-                raise ValueError, 'bad attribute code'
+                raise ValueError('bad attribute code')
         value, pos = decodeString(data, pos)
         return name, value, pos
-    except Exception, e:
-        raise ProtocolError, 'decodeAttribute: '+str(e)
+    except Exception as e:
+        raise ProtocolError('decodeAttribute: ' + str(e))
 
 def encodeString(s):
     """Encode a string."""
@@ -249,7 +249,7 @@
         while length:
             try:
                 data = sock.recv(length)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([sock], [], [])
                     continue
@@ -276,7 +276,7 @@
             raise EOFError
 
         if header[:2] != SERVER_PREFIX:
-            raise ProtocolError, 'invalid header'
+            raise ProtocolError('invalid header')
 
         self.length = struct.unpack('>H', header[2:4])[0]
         if self.length:
@@ -296,7 +296,7 @@
         while length:
             try:
                 sent = sock.send(data)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([], [sock], [])
                     continue
@@ -446,12 +446,12 @@
         never send us an EOF (empty string argument).
         """
         if not data:
-            raise ProtocolError, 'short data'
+            raise ProtocolError('short data')
         self._bufList.append(data)
         length = len(data)
         self._avail += length
         if self._avail > self._length:
-            raise ProtocolError, 'too much data'
+            raise ProtocolError('too much data')
 
 class Request(object):
     """
@@ -616,7 +616,7 @@
         while True:
             try:
                 self.processInput()
-            except ProtocolError, e:
+            except ProtocolError as e:
                 self.logger.error("Protocol error '%s'", str(e))
                 break
             except (EOFError, KeyboardInterrupt):
@@ -642,7 +642,7 @@
             return
 
         if not pkt.length:
-            raise ProtocolError, 'unexpected empty packet'
+            raise ProtocolError('unexpected empty packet')
 
         pkttype = pkt.data[0]
         if pkttype == PKTTYPE_FWD_REQ:
@@ -654,7 +654,7 @@
         elif pkttype == PKTTYPE_CPING:
             self._cping(pkt)
         else:
-            raise ProtocolError, 'unknown packet type'
+            raise ProtocolError('unknown packet type')
 
     def _forwardRequest(self, pkt):
         """
@@ -666,7 +666,7 @@
         i = ord(pkt.data[1])
         method = methodTable[i]
         if method is None:
-            raise ValueError, 'bad method field'
+            raise ValueError('bad method field')
         req.setMethod(method)
         value, pos = decodeString(pkt.data, 2)
         req.setProtocol(value)
@@ -873,7 +873,7 @@
                 try:
                     if headers_sent:
                         # Re-raise if too late
-                        raise exc_info[0], exc_info[1], exc_info[2]
+                        raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
                 finally:
                     exc_info = None # avoid dangling circular ref
             else:
@@ -906,7 +906,7 @@
                 finally:
                     if hasattr(result, 'close'):
                         result.close()
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] != errno.EPIPE:
                     raise # Don't let EPIPE propagate beyond server
         finally:
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_fork.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_fork.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/ajp_fork.py	(working copy)
@@ -147,7 +147,7 @@
 
         try:
             sock = self._setupSocket()
-        except socket.error, e:
+        except socket.error as e:
             self.logger.error('Failed to bind socket (%s), exiting', e[1])
             return False
 
@@ -173,7 +173,7 @@
         names.sort()
         for name in names:
             yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
-                name, cgi.escape(`environ[name]`))
+                name, cgi.escape(repr(environ[name])))
 
         form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ,
                                 keep_blank_values=1)
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/fcgi_base.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/fcgi_base.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/fcgi_base.py	(working copy)
@@ -31,7 +31,7 @@
 import os
 import signal
 import struct
-import cStringIO as StringIO
+import io as StringIO
 import select
 import socket
 import errno
@@ -414,13 +414,13 @@
     if nameLength < 128:
         s = chr(nameLength)
     else:
-        s = struct.pack('!L', nameLength | 0x80000000L)
+        s = struct.pack('!L', nameLength | 0x80000000)
 
     valueLength = len(value)
     if valueLength < 128:
         s += chr(valueLength)
     else:
-        s += struct.pack('!L', valueLength | 0x80000000L)
+        s += struct.pack('!L', valueLength | 0x80000000)
 
     return s + name + value
     
@@ -448,7 +448,7 @@
         while length:
             try:
                 data = sock.recv(length)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([sock], [], [])
                     continue
@@ -505,7 +505,7 @@
         while length:
             try:
                 sent = sock.send(data)
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     select.select([], [sock], [])
                     continue
@@ -570,11 +570,11 @@
         try:
             self._flush()
             self._end(appStatus, protocolStatus)
-        except socket.error, e:
+        except socket.error as e:
             if e[0] != errno.EPIPE:
                 raise
 
-    def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
+    def _end(self, appStatus=0, protocolStatus=FCGI_REQUEST_COMPLETE):
         self._conn.end_request(self, appStatus, protocolStatus)
         
     def _flush(self):
@@ -597,7 +597,7 @@
         self.stderr = sys.stderr
         self.data = StringIO.StringIO()
         
-    def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
+    def _end(self, appStatus=0, protocolStatus=FCGI_REQUEST_COMPLETE):
         sys.exit(appStatus)
 
     def _flush(self):
@@ -646,7 +646,7 @@
                 self.process_input()
             except (EOFError, KeyboardInterrupt):
                 break
-            except (select.error, socket.error), e:
+            except (select.error, socket.error) as e:
                 if e[0] == errno.EBADF: # Socket was closed by Request.
                     break
                 raise
@@ -696,7 +696,7 @@
         """
         rec.write(self._sock)
 
-    def end_request(self, req, appStatus=0L,
+    def end_request(self, req, appStatus=0,
                     protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
         """
         End a Request.
@@ -745,7 +745,7 @@
 
         if not self._multiplexed and self._requests:
             # Can't multiplex requests.
-            self.end_request(req, 0L, FCGI_CANT_MPX_CONN, remove=False)
+            self.end_request(req, 0, FCGI_CANT_MPX_CONN, remove=False)
         else:
             self._requests[inrec.requestId] = req
 
@@ -836,7 +836,7 @@
         finally:
             self._lock.release()
 
-    def end_request(self, req, appStatus=0L,
+    def end_request(self, req, appStatus=0,
                     protocolStatus=FCGI_REQUEST_COMPLETE, remove=True):
         self._lock.acquire()
         try:
@@ -979,7 +979,7 @@
                                  socket.SOCK_STREAM)
             try:
                 sock.getpeername()
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.ENOTSOCK:
                     # Not a socket, assume CGI context.
                     isFCGI = False
@@ -1092,7 +1092,7 @@
                 try:
                     if headers_sent:
                         # Re-raise if too late
-                        raise exc_info[0], exc_info[1], exc_info[2]
+                        raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
                 finally:
                     exc_info = None # avoid dangling circular ref
             else:
@@ -1125,7 +1125,7 @@
                 finally:
                     if hasattr(result, 'close'):
                         result.close()
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] != errno.EPIPE:
                     raise # Don't let EPIPE propagate beyond server
         finally:
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/preforkserver.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/preforkserver.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/preforkserver.py	(working copy)
@@ -52,7 +52,7 @@
         import eunuchs.socketpair
     except ImportError:
         # TODO: Other alternatives? Perhaps using os.pipe()?
-        raise ImportError, 'Requires eunuchs module for Python < 2.4'
+        raise ImportError('Requires eunuchs module for Python < 2.4')
 
     def socketpair():
         s1, s2 = eunuchs.socketpair.socketpair()
@@ -135,7 +135,7 @@
 
             try:
                 r, w, e = select.select(r, [], [], timeout)
-            except select.error, e:
+            except select.error as e:
                 if e[0] != errno.EINTR:
                     raise
 
@@ -144,7 +144,7 @@
                 # Receive status byte.
                 try:
                     state = child.recv(1)
-                except socket.error, e:
+                except socket.error as e:
                     if e[0] in (errno.EAGAIN, errno.EINTR):
                         # Guess it really didn't need attention?
                         continue
@@ -213,7 +213,7 @@
                 # Child is unavailable. SIGINT it.
                 try:
                     os.kill(pid, signal.SIGINT)
-                except OSError, e:
+                except OSError as e:
                     if e[0] != errno.ESRCH:
                         raise
 
@@ -229,7 +229,7 @@
         while len(self._children):
             try:
                 pid, status = os.wait()
-            except OSError, e:
+            except OSError as e:
                 if e[0] in (errno.ECHILD, errno.EINTR):
                     break
             if self._children.has_key(pid):
@@ -241,7 +241,7 @@
         for pid in self._children.keys():
             try:
                 os.kill(pid, signal.SIGKILL)
-            except OSError, e:
+            except OSError as e:
                 if e[0] != errno.ESRCH:
                     raise
 
@@ -250,7 +250,7 @@
         while True:
             try:
                 pid, status = os.waitpid(-1, os.WNOHANG)
-            except OSError, e:
+            except OSError as e:
                 if e[0] == errno.ECHILD:
                     break
                 raise
@@ -274,7 +274,7 @@
         setCloseOnExec(child)
         try:
             pid = os.fork()
-        except OSError, e:
+        except OSError as e:
             if e[0] in (errno.EAGAIN, errno.ENOMEM):
                 return False # Can't fork anymore.
             raise
@@ -315,7 +315,7 @@
             try:
                 parent.send(msg)
                 return True
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EPIPE:
                     return False # Parent is gone
                 if e[0] == errno.EAGAIN:
@@ -354,7 +354,7 @@
             # Otherwise, there's activity on the main socket...
             try:
                 clientSock, addr = sock.accept()
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] == errno.EAGAIN:
                     # Or maybe not.
                     continue
@@ -420,12 +420,12 @@
             self._sock = sock
             self._addr = addr
         def run(self):
-            print "Client connection opened from %s:%d" % self._addr
+            print("Client connection opened from %s:%d" % self._addr)
             self._sock.send('Hello World!\n')
             self._sock.setblocking(1)
             self._sock.recv(1)
             self._sock.close()
-            print "Client connection closed from %s:%d" % self._addr
+            print("Client connection closed from %s:%d" % self._addr)
     sock = socket.socket()
     sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     sock.bind(('', 8080))
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi.py	(working copy)
@@ -144,7 +144,7 @@
 
         try:
             sock = self._setupSocket()
-        except socket.error, e:
+        except socket.error as e:
             self.logger.error('Failed to bind socket (%s), exiting', e[1])
             return False
 
@@ -170,7 +170,7 @@
         names.sort()
         for name in names:
             yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
-                name, cgi.escape(`environ[name]`))
+                name, cgi.escape(str(environ[name])))
 
         form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ,
                                 keep_blank_values=1)
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_base.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_base.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_base.py	(working copy)
@@ -32,7 +32,7 @@
 import socket
 import select
 import errno
-import cStringIO as StringIO
+import io as StringIO
 import signal
 import datetime
 import os
@@ -41,7 +41,6 @@
 # Threads are required. If you want a non-threaded (forking) version, look at
 # SWAP <http://www.idyll.org/~t/www-tools/wsgi/>.
 import thread
-import threading
 
 __all__ = ['BaseSCGIServer']
 
@@ -76,7 +75,7 @@
     while length:
         try:
             data = sock.recv(length)
-        except socket.error, e:
+        except socket.error as e:
             if e[0] == errno.EAGAIN:
                 select.select([sock], [], [])
                 continue
@@ -99,7 +98,7 @@
     while True:
         try:
             c = sock.recv(1)
-        except socket.error, e:
+        except socket.error as e:
             if e[0] == errno.EAGAIN:
                 select.select([sock], [], [])
                 continue
@@ -117,7 +116,7 @@
         if size < 0:
             raise ValueError
     except ValueError:
-        raise ProtocolError, 'invalid netstring length'
+        raise ProtocolError('invalid netstring length')
 
     # Now read the string.
     s, length = recvall(sock, size)
@@ -132,7 +131,7 @@
         raise EOFError
 
     if trailer != ',':
-        raise ProtocolError, 'invalid netstring trailer'
+        raise ProtocolError('invalid netstring trailer')
 
     return s
 
@@ -219,7 +218,7 @@
             self.processInput()
         except (EOFError, KeyboardInterrupt):
             pass
-        except ProtocolError, e:
+        except ProtocolError as e:
             self.logger.error("Protocol error '%s'", str(e))
         except:
             self.logger.exception('Exception caught in Connection')
@@ -236,20 +235,20 @@
         headers = readNetstring(self._sock)
         headers = headers.split('\x00')[:-1]
         if len(headers) % 2 != 0:
-            raise ProtocolError, 'invalid headers'
+            raise ProtocolError('invalid headers')
         environ = {}
         for i in range(len(headers) / 2):
             environ[headers[2*i]] = headers[2*i+1]
 
         clen = environ.get('CONTENT_LENGTH')
         if clen is None:
-            raise ProtocolError, 'missing CONTENT_LENGTH'
+            raise ProtocolError('missing CONTENT_LENGTH')
         try:
             clen = int(clen)
             if clen < 0:
                 raise ValueError
         except ValueError:
-            raise ProtocolError, 'invalid CONTENT_LENGTH'
+            raise ProtocolError('invalid CONTENT_LENGTH')
 
         self._sock.setblocking(1)
         if clen:
@@ -430,7 +429,7 @@
                 try:
                     if headers_sent:
                         # Re-raise if too late
-                        raise exc_info[0], exc_info[1], exc_info[2]
+                        raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
                 finally:
                     exc_info = None # avoid dangling circular ref
             else:
@@ -463,7 +462,7 @@
                 finally:
                     if hasattr(result, 'close'):
                         result.close()
-            except socket.error, e:
+            except socket.error as e:
                 if e[0] != errno.EPIPE:
                     raise # Don't let EPIPE propagate beyond server
         finally:
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_fork.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_fork.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/scgi_fork.py	(working copy)
@@ -142,7 +142,7 @@
 
         try:
             sock = self._setupSocket()
-        except socket.error, e:
+        except socket.error as e:
             self.logger.error('Failed to bind socket (%s), exiting', e[1])
             return False
 
@@ -168,7 +168,7 @@
         names.sort()
         for name in names:
             yield '<tr><td>%s</td><td>%s</td></tr>\n' % (
-                name, cgi.escape(`environ[name]`))
+                name, cgi.escape(str(environ[name])))
 
         form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ,
                                 keep_blank_values=1)
Index: /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/singleserver.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/singleserver.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/exfiles/python/lib/flup/server/singleserver.py	(working copy)
@@ -70,7 +70,7 @@
         while self._keepGoing:
             try:
                 r, w, e = select.select([sock], [], [], timeout)
-            except select.error, e:
+            except select.error as e:
                 if e[0] == errno.EINTR:
                     continue
                 raise
@@ -78,7 +78,7 @@
             if r:
                 try:
                     clientSock, addr = sock.accept()
-                except socket.error, e:
+                except socket.error as e:
                     if e[0] in (errno.EINTR, errno.EAGAIN):
                         continue
                     raise
@@ -153,12 +153,12 @@
             self._sock = sock
             self._addr = addr
         def run(self):
-            print "Client connection opened from %s:%d" % self._addr
+            print("Client connection opened from %s:%d" % self._addr)
             self._sock.send('Hello World!\n')
             self._sock.setblocking(1)
             self._sock.recv(1)
             self._sock.close()
-            print "Client connection closed from %s:%d" % self._addr
+            print("Client connection closed from %s:%d" % self._addr)
     sock = socket.socket()
     sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     sock.bind(('', 8080))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/LogServerMon.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/LogServerMon.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/LogServerMon.py	(working copy)
@@ -10,11 +10,11 @@
 from ctypes import *
 
 def usage():
-	print "usage: [-h host ] [ -p port ] [ -T protocol ] [ -H help ]"
-	print "\t-h\tSet the host name to listen , default '127.0.0.1'"
-	print "\t-p\tSet the port of listen, default 514"
-	print "\t-T\tSet the protocol for socket, 'TCP' or 'UDP'. default 'UDP'"
-	print "\t-H\tShow help info"	
+	print("usage: [-h host ] [ -p port ] [ -T protocol ] [ -H help ]")
+	print("\t-h\tSet the host name to listen , default '127.0.0.1'")
+	print("\t-p\tSet the port of listen, default 514")
+	print("\t-T\tSet the protocol for socket, 'TCP' or 'UDP'. default 'UDP'")
+	print("\t-H\tShow help info")
 
 class LogServer():
     def __init__(self, host, port, protocol):
@@ -76,7 +76,7 @@
             if pid > 0:
                 # exit first parent
                 sys.exit(0) 
-        except OSError, e: 
+        except OSError as e:
             print >>sys.stderr, "fork #1 failed: %d (%s)" % (e.errno, e.strerror) 
             sys.exit(1)
         # decouple from parent environment
@@ -90,7 +90,7 @@
                 # exit from second parent, print eventual PID before
                 #print "Daemon PID %d" % pid 
                 sys.exit(0) 
-        except OSError, e: 
+        except OSError as e:
             print >>sys.stderr, "fork #2 failed: %d (%s)" % (e.errno, e.strerror) 
             sys.exit(1)
     
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/clean_elastic.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/clean_elastic.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/clean_elastic.py	(working copy)
@@ -6,23 +6,23 @@
 import os
 import time
 import json
-import urllib2
+import urllib.request
 
 elasticsearch_url = 'localhost:9200'
 
 
 def delete_indices(url_delete_date):  # 删除30天前的索引
     url_delete = 'http://' + elasticsearch_url + '/%s?pretty' % (url_delete_date)
-    request_delete = urllib2.Request(url_delete)
+    request_delete = urllib.request.Request(url_delete)
     request_delete.get_method = lambda: 'DELETE'  # 设置HTTP请求方式
-    response_delete = urllib2.urlopen(request_delete).read()
+    response_delete = urllib.request.urlopen(request_delete).read()
     return response_delete
 
 
 def delete_indices_by_disk_usage(percent, index):
     url_get = 'http://' + elasticsearch_url + '/_cat/allocation?format=json'
-    request_get = urllib2.Request(url_get)
-    response_get = urllib2.urlopen(request_get).read()
+    request_get = urllib.request.Request(url_get)
+    response_get = urllib.request.urlopen(request_get).read()
     allocations = json.loads(response_get)
 
     pct = 0
\ No newline at end of file
@@ -68,8 +68,8 @@
                     os.remove(f)
 
         url_get = 'http://' + elasticsearch_url + '/_cat/indices?format=json'
-        request_get = urllib2.Request(url_get)
-        response_get = urllib2.urlopen(request_get).read()
+        request_get = urllib.request.Request(url_get)
+        response_get = urllib.request.urlopen(request_get).read()
         indices = json.loads(response_get)
 
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/index.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/index.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/index.html	(working copy)
@@ -1,25 +1,27 @@
-<div class="row">
-    <div class="col-md-12">
+<div>
+    <div>
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/admin/userMgmt') }">
-                <a ui-sref="index.admin.userMgmt"><span class="tab-header">{{ 'System Administrator' | T }}</span></a>
+                <a ui-sref="index.admin.userMgmt">{{ 'System Administrator' | T }}</a>
             </li>
             <li role="presentation" ng-if="role_info.user_type !== 'Device Admin'"
                 ng-class="{ active: url_contain('/admin/roleMgmt') }">
-                <a ui-sref="index.admin.roleMgmt"><span class="tab-header">{{ 'User Role' | T }}</span></a>
+                <a ui-sref="index.admin.roleMgmt">{{ 'User Role' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/admin/operLog') }">
-                <a ui-sref="index.admin.operLog"><span class="tab-header">{{ 'Operation Log' | T }}</span></a>
+                <a ui-sref="index.admin.operLog">{{ 'Operation Log' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/admin/systemAction') }">
-                <a ui-sref="index.admin.systemAction"><span class="tab-header">{{ 'System Shutdown/Reboot' | T }}</span></a>
+                <a ui-sref="index.admin.systemAction">{{ 'System Shutdown/Reboot' | T }}</a>
             </li>
         </ul>
     </div>
-    <div class="content-wrapper">
+    <br>
+    <div class="">
         <div class="" ng-show="url_contain('/admin/userMgmt')" ui-view="userMgmt"></div>
         <div class="" ng-show="url_contain('/admin/roleMgmt')" ui-view="roleMgmt"></div>
         <div class="" ng-show="url_contain('/admin/operLog')" ui-view="operLog"></div>
         <div class="" ng-show="url_contain('/admin/systemAction')" ui-view="systemAction"></div>
     </div>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/operLog/operLog.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/operLog/operLog.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/operLog/operLog.html	(working copy)
@@ -1,88 +1,82 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="widget-header">
-            <span class="tab-header-1">{{'Operation Log' | T}}</span>
-        </div>
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="operLog.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
-                <button ng-if="user_auth_data.system.admin.delete_operation_log" class="btn btn-link"
-                        title="{{ 'Clear' | T }}" ng-click="operLog.clear_operation_log()"><i class="array-delete an-tab-icon"></i>
-                </button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="widget-header">
+                <span>{{'Operation Log' | T}}</span>
             </div>
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="operLog.refresh()"><i class="fa fa-refresh"></i></button>
+                    <button ng-if="user_auth_data.system.admin.delete_operation_log" class="btn btn-link" title="{{ 'Clear' | T }}" ng-click="operLog.clear_operation_log()"><i class="array-delete"></i></button>
+                </div>
+            </div>
+            <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!operLog.logs"><img src="app/images/loading.gif"></div>
+            <div class="" st-table="operLog.logs" st-pipe="operLog.myServer" ng-if="operLog.logs">
+                <table class="table table-striped table-hover">
+                    <thead>
+                        <tr>
+                            <th class="i-num">No.</th>
+                            <th class="i-time" st-sort="time">{{ 'Time' | T }}</th>
+                            <th class="i-level">{{ 'Level' | T }}</th>
+                            <th class="i-username" st-sort="username">{{ 'User Name' | T }}</th>
+                            <th class="i-clientip" st-sort="client_ip">{{ 'IP' | T }}</th>
+                            <th class="i-module">{{ 'Module' | T }}</th>
+                            <th class="i-operation">{{ 'Operation' | T }}</th>
+                            <th></th>
+                        </tr>
+                        <tr>
+                            <th></th>
+                            <th></th>
+                            <th>
+                                <select class="input-sm form-control" st-input-event="change" st-search="level">
+                                    <option value="">{{'All'|T}}</option>
+                                    <option value="debug">Debug</option>
+                                    <option value="info">Info</option>
+                                    <option value="notice">Notice</option>
+                                    <option value="warning">Warning</option>
+                                    <option value="error">Error</option>
+                                    <option value="critical">Critical</option>
+                                </select>
+                            </th>
+                            <th><input st-search="username" placeholder="{{'Search by Username'|T}}" class="input-sm form-control" type="search"></th>
+                            <th><input st-search="client_ip" placeholder="{{'Search by IP'|T}}" class="input-sm form-control" type="search"></th>
+                            <th>
+                                <select class="input-sm form-control" st-input-event="change" st-search="module">
+                                    <option value="">{{'All'|T}}</option>
+                                    <option value="system">system</option>
+                                    <option value="device">device</option>
+                                    <option value="API">API</option>
+                                </select>
+                            </th>
+                            <th></th>
+                            <th></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="row in operLog.logs">
+                            <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ row.time }}</td>
+                            <td>{{ row.level }}</td>
+                            <td>{{ row.username }}</td>
+                            <td>{{ row.client_ip }}</td>
+                            <td>{{ row.module }}</td>
+                            <td>{{ row.operation}}</td>
+                            <td>
+                                <a ng-if="user_auth_data.system.admin.delete_operation_log" class="icon-box" title="{{ 'Delete' | T }}" ng-click="operLog.delete_operation_log(row)"><i class="array-delete"></i></a>
+                            </td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="9" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10" st-page-change="onPageChange(newPage)"st-template="app/modules/common/templates/page.html"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!operLog.logs"><img
-            src="app/images/loading.gif"></div>
-        <div class="" st-table="operLog.logs" st-pipe="operLog.myServer" ng-if="operLog.logs">
-            <table class="table table-striped table-hover">
-                <thead>
-                <tr>
-                    <th class="i-num">No.</th>
-                    <th class="i-time" st-sort="time">{{ 'Time' | T }}</th>
-                    <th class="i-level">{{ 'Level' | T }}</th>
-                    <th class="i-username" st-sort="username">{{ 'User Name' | T }}</th>
-                    <th class="i-clientip" st-sort="client_ip">{{ 'IP' | T }}</th>
-                    <th class="i-module">{{ 'Module' | T }}</th>
-                    <th class="i-operation">{{ 'Operation' | T }}</th>
-                    <th></th>
-                </tr>
-                <tr>
-                    <th></th>
-                    <th></th>
-                    <th>
-                        <select class="input-sm form-control" st-input-event="change" st-search="level">
-                            <option value="">{{'All' | T}}</option>
-                            <option value="debug">Debug</option>
-                            <option value="info">Info</option>
-                            <option value="notice">Notice</option>
-                            <option value="warning">Warning</option>
-                            <option value="error">Error</option>
-                            <option value="critical">Critical</option>
-                        </select>
-                    </th>
-                    <th><input st-search="username" placeholder="{{'Search by Username'|T}}"
-                               class="input-sm form-control" type="search"></th>
-                    <th><input st-search="client_ip" placeholder="{{'Search by IP'|T}}" class="input-sm form-control"
-                               type="search"></th>
-                    <th>
-                        <select class="input-sm form-control" st-input-event="change" st-search="module">
-                            <option value="">{{'All' | T}}</option>
-                            <option value="system">system</option>
-                            <option value="device">device</option>
-                            <option value="API">API</option>
-                        </select>
-                    </th>
-                    <th></th>
-                    <th></th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="row in operLog.logs">
-                    <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td>{{ row.time }}</td>
-                    <td>{{ row.level }}</td>
-                    <td>{{ row.username }}</td>
-                    <td>{{ row.client_ip }}</td>
-                    <td>{{ row.module }}</td>
-                    <td>{{ row.operation}}</td>
-                    <td>
-                        <a ng-if="user_auth_data.system.admin.delete_operation_log" class="icon-box"
-                           title="{{ 'Delete' | T }}" ng-click="operLog.delete_operation_log(row)"><i
-                            class="array-delete an-row-icon"></i></a>
-                    </td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="9" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10"
-                             st-page-change="onPageChange(newPage)"
-                             st-template="app/modules/common/templates/page.html"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
-</div>
+    
+ </div>
+    
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-add.html	(working copy)
@@ -2,7 +2,7 @@
     <div class="modal-header">
         <button type="button" class="close" ng-click="roleAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
         </button>
-        <h6 class="modal-title">{{ 'Add User Role' | T}}</h6>
+        <h5 class="modal-title">{{ 'Add User Role' | T}}</h5>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-device-group-manage.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-device-group-manage.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-device-group-manage.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="roleDeviceGroupManage.close()">&times;</button>
-    <h6 class="modal-title">{{'Bind Devices'|T}}</h6>
+    <h4 class="modal-title">{{'Bind Devices'|T}}</h4>
 </div>
 
 <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/modal/role-edit.html	(working copy)
@@ -2,7 +2,7 @@
     <div class="modal-header">
         <button type="button" class="close" ng-click="roleEdit.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
         </button>
-        <h6 class="modal-title">{{ 'Edit User Role' | T}}</h6>
+        <h5 class="modal-title">{{ 'Edit User Role' | T}}</h5>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/roleMgmt.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/roleMgmt.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/roleMgmt/roleMgmt.html	(working copy)
@@ -1,56 +1,57 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="roleMgmt.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
-                <button ng-if="role_info.user_type === 'Super Admin'" class="btn btn-link" title="{{ 'Add' | T }}"
-                        ng-click="roleMgmt.addRole()"><i
-                    class="fa fa-plus-circle an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="roleMgmt.refresh()"><i
+                        class="fa fa-refresh"></i></button>
+                    <button ng-if="role_info.user_type === 'Super Admin'" class="btn btn-link" title="{{ 'Add' | T }}"
+                            ng-click="roleMgmt.addRole()"><i
+                        class="fa fa-plus-circle"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="roleMgmt.roleList"
+                       class="table table-hover table-striped">
+                    <thead>
+                    <tr>
+                        <th class="d-num">No.</th>
+                        <th class="d-name">{{ 'Role Name' | T }}</th>
+                        <th class="d-action">{{ 'Action' | T }}</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr ng-repeat="role in displayedCollection">
+                        <td>{{ $index + 1 }}</td>
+                        <td class="d-num" title="{{'Current User'|T}}">
+                            <span class="name" ng-click="roleMgmt.getDetail(role)">{{ role.role_name }}</span>
+                        </td>
+                        <td>
+                            <button class="btn-link" title="{{ 'Edit' | T }}" ng-click="roleMgmt.editRole(role)"
+                                    ng-if="role_info.user_type === 'Super Admin'"><i class="array-edit"
+                                                                                     style="font-size: 1.25em;"></i>
+                            </button>
+                            <a ui-sref="index.admin.roleMgmt.deviceGroupMap({name:role.role_name})" class="btn-link"
+                               title="{{ 'Device Management' | T }}"
+                               ng-click="roleMgmt.manageDeviceGroup(role)">
+                                <i class="array-backup" style="font-size: 1.25em;"></i></a>
+                            <button class="btn-link" title="{{ 'Delete' | T }}"
+                                    ng-if="role_info.user_type === 'Super Admin'"
+                                    ng-click="roleMgmt.deleteRole(role)">
+                                <i class="array-delete" style="font-size: 1.25em;"></i></button>
+                        </td>
+                    </tr>
+                    </tbody>
+                    <tfoot>
+                    <tr>
+                        <td colspan="5" class="text-center">
+                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
+                                 st-page-change="onPageChange(newPage)"></div>
+                        </td>
+                    </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="roleMgmt.roleList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'Role Name' | T }}</th>
-                    <th class="d-action">{{ 'Action' | T }}</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="role in displayedCollection">
-                    <td>{{ $index + 1 }}</td>
-                    <td class="d-num" title="{{'Current User'|T}}">
-                        <span class="name" ng-click="roleMgmt.getDetail(role)">{{ role.role_name }}</span>
-                    </td>
-                    <td>
-                        <button class="btn-link" title="{{ 'Edit' | T }}" ng-click="roleMgmt.editRole(role)"
-                                ng-if="role_info.user_type === 'Super Admin'"><i class="array-edit an-row-icon"
-                                                                                 style="font-size: 1.25em;"></i>
-                        </button>
-                        <a ui-sref="index.admin.roleMgmt.deviceGroupMap({name:role.role_name})" class="btn-link"
-                           title="{{ 'Device Management' | T }}"
-                           ng-click="roleMgmt.manageDeviceGroup(role)">
-                            <i class="array-backup an-row-icon" style="font-size: 1.25em;"></i></a>
-                        <button class="btn-link" title="{{ 'Delete' | T }}"
-                                ng-if="role_info.user_type === 'Super Admin'"
-                                ng-click="roleMgmt.deleteRole(role)">
-                            <i class="array-delete an-row-icon" style="font-size: 1.25em;"></i></button>
-                    </td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/systemAction/systemAction.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/systemAction/systemAction.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/systemAction/systemAction.html	(working copy)
@@ -1,51 +1,59 @@
-<div class="col-md-12">
+<div class="row">
     <div class="col-md-12">
-        <div class="widget">
-            <div class="widget-header">
-                <span class="tab-header-1">{{ 'System Shutdown' | T }}</span>
-            </div>
-            <div>
-                <form class="form-horizontal" name="systemShutdownForm" unsaved-warning-form
-                      verify-scope="tipStyle: 1">
-                    <div class="form-group">
-                        <label class="col-md-3 control-label">{{'Option' | T}} </label>
-                        <div class="col-md-5">
-                            <select ng-model="systemAction.data.option" name="type" class="form-control">
-                                <option value="halt" title="Halt system but not turn off power.">
-                                    {{ 'HALT' | T}}
-                                </option>
-                                <option value="poweroff" title="Halt system and turn off power.">
-                                    {{ 'PowerOff' | T}}
-                                </option>
-                            </select>
-                        </div>
+        <div class="col-md-12">
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'System Shutdown' | T }}</span>
                     </div>
-                    <div class="form-group">
-                        <div class="col-md-12 align-center">
-                            <button ng-verify="control:'systemShutdownForm'" type="submit" class="btn btn-danger"
-                                    ng-click="systemAction.performSystemShutdown()">{{'Shutdown' | T}}
-                            </button>
-                        </div>
+                    <div>
+                        <form class="form-horizontal" name="systemShutdownForm" unsaved-warning-form
+                              verify-scope="tipStyle: 1">
+                            <div class="form-group">
+                                <label class="col-md-3 control-label">{{'Option' | T}}</label>
+                                <div class="col-md-5">
+                                    <select ng-model="systemAction.data.option" name="type" class="form-control">
+                                        <option value="halt" title="Halt system but not turn off power.">
+                                            {{ 'HALT' | T}}
+                                        </option>
+                                        <option value="poweroff" title="Halt system and turn off power.">
+                                            {{ 'Poweroff' | T}}
+                                        </option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="form-group">
+                                <div class="col-md-offset-3 col-md-9">
+                                    <button ng-verify="control:'systemShutdownForm'" type="submit" class="btn btn-danger"
+                                            ng-click="systemAction.performSystemShutdown()">{{'Shutdown' | T}}
+                                    </button>
+                                </div>
+                            </div>
+                        </form>
                     </div>
-                </form>
+                </div>
             </div>
         </div>
     </div>
-</div>
-<div class="col-md-12">
     <div class="col-md-12">
-        <div class="widget">
-            <div class="widget-header">
-                <span class="tab-header-1">{{ 'System Reboot' | T }}</span>
-            </div>
-            <div>
-                <div class="form-group">
-                    <div class="col-md-12 align-center">
-                        <button class="btn btn-danger" ng-click="systemAction.performSystemReboot()">{{'Reboot Now' | T}}
-                        </button>
+        <div class="col-md-12">
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'System Reboot' | T }}</span>
                     </div>
+                    <div>
+                        <div class="form-group">
+                            <div class="col-md-offset-3 col-md-9">
+                                <button class="btn btn-danger" ng-click="systemAction.performSystemReboot()">{{'Reboot
+                                    Now' | T}}
+                                </button>
+                            </div>
+                        </div>
+                    </div>
                 </div>
             </div>
         </div>
     </div>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.add.html	(working copy)
@@ -1,8 +1,9 @@
 <div class="">
     <div class="modal-header">
+        <!-- <div class="title"><i class="array-add"></i>{{ 'Add System Administrator' | T}}</div> -->
         <button type="button" class="close" ng-click="userAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
         </button>
-        <h6 class="modal-title">{{ 'Add System Administrator' | T}}</h6>
+        <h4 class="modal-title">{{ 'Add System Administrator' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.auth.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.auth.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.auth.html	(working copy)
@@ -2,7 +2,7 @@
     <div class="modal-header">
         <button type="button" class="close" ng-click="userAuth.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
         </button>
-        <h6><i class="fa fa-list-ul"></i>{{ 'User Authorization' | T}}</h6>
+        <h4><i class="fa fa-list-ul"></i>{{ 'User Authorization' | T}}</h4>
     </div>
     <div class="modal-body">
         <div ng-if="!userAuth.current_user_root" class="alert alert-info ng-binding" role="alert">{{'User Authorization
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/modal/user.edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div class="modal-body" style="padding: 0">
     <div class="modal-header">
         <button type="button" class="close" ng-click="userEdit.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-edit"></i>{{ 'System Administrator' | T}}</h6>
+        <h4><i class="array-edit"></i>{{ 'System Administrator' | T}}</h4>
     </div>
     <div class="modal-body">
         <form name="add" class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/userMgmt.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/userMgmt.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/administrator/userMgmt/userMgmt.html	(working copy)
@@ -1,90 +1,91 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="userMgmt.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
-                <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Add' | T }}"
-                        ng-click="userMgmt.addUser()"><i class="fa fa-plus-circle an-tab-icon"></i></button>
-                <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Export' | T }}"
-                        ng-click="userMgmt.export()"><i class="fa fa-sign-out an-tab-icon"></i></button>
-                <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Import' | T }}"><i
-                    class="fa fa-sign-in an-tab-icon"></i></button>
-                <input title="{{ 'Import' | T }}" type="file" id="uploadfield" class="file form-control"
-                       nv-file-select uploader="userMgmt.fileUploader">
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="userMgmt.refresh()"><i
+                        class="fa fa-refresh"></i></button>
+                    <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Add' | T }}"
+                            ng-click="userMgmt.addUser()"><i class="fa fa-plus-circle"></i></button>
+                    <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Export' | T }}"
+                            ng-click="userMgmt.export()"><i class="fa fa-sign-out"></i></button>
+                    <button ng-if="userMgmt.root" class="btn btn-link" title="{{ 'Import' | T }}"><i
+                        class="fa fa-sign-in"></i></button>
+                    <input title="{{ 'Import' | T }}" type="file" id="uploadfield" class="file form-control"
+                           nv-file-select uploader="userMgmt.fileUploader">
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="userMgmt.userList"
+                       class="table table-hover table-striped">
+                    <thead>
+                    <tr>
+                        <th class="d-num">No.</th>
+                        <th class="d-name">{{ 'Username' | T }}</th>
+                        <th class="d-type">{{ 'Type' | T }}</th>
+                        <th class="d-type">{{ 'Role Name' | T }}</th>
+                        <th class="d-name">{{ 'Email' | T }}</th>
+                        <th class="d-action">{{ 'Action' | T }}</th>
+                    </tr>
+                    <tr>
+                        <th></th>
+                        <th>
+                            <input st-search="username" placeholder="{{'Search by Username'|T}}"
+                                   class="input-sm form-control" type="text"/>
+                        </th>
+                        <th></th>
+                        <th><input st-search="email" placeholder="{{'Search by Email'|T}}" class="input-sm form-control"
+                                   type="text"/></th>
+                        <th></th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr ng-repeat="user in displayedCollection">
+                        <td style="font-weight:bold;font-style:oblique;color:red;" title="{{'Current User'|T}}"
+                            ng-if="userMgmt.current_user == user.username" class="d-num">{{ $index + 1 }}
+                        </td>
+                        <td ng-if="userMgmt.current_user != user.username" class="d-num">{{ ((currentPageIndex - 1) *
+                            pageSize) + $index + 1 }}
+                        </td>
+                        <td style="font-weight:bold;font-style:oblique;color:red;" title="{{'Current User'|T}}"
+                            ng-if="userMgmt.current_user == user.username">{{ user.username }}
+                        </td>
+                        <td ng-if="userMgmt.current_user != user.username">{{ user.username }}</td>
+                        <td ng-if="user.user_type && user.role_id != '0'"><span>{{ user.user_type }}</span></td>
+                        <td ng-if="user.role_id == '0' && user.root"><span>Super Admin</span></td>
+                        <td ng-if="user.role_id == '0' && !user.root"><span>Common Admin</span></td>
+                        <td><span ng-if="user.role_name">{{ user.role_name }}</span></td>
+                        <td>{{ user.email }}</td>
+                        <td ng-if="userMgmt.show_action_button(user)">
+                            <button class="btn-link" title="{{ 'Edit' | T }}" ng-click="userMgmt.editUserInfo(user)"><i
+                                class="array-edit"></i></button>
+                            <button ui-sref="index.admin.roleMgmt.deviceGroupMap({name:user.role_name})"
+                                    class="btn-link"
+                                    title="{{ 'Device Management' | T }}"
+                                    ng-disabled="user.user_type !== 'Device Admin'"
+                                    ng-click="userMgmt.manageDeviceGroup(user)">
+                                <i class="array-backup" style="font-size: 1.25em;"></i>
+                            </button>
+                            <button class="btn-link" title="{{ 'User Authorization' | T }}"
+                                    ng-click="userMgmt.editUserAuth(user)"><i class="fa fa-list-ul"></i></button>
+                            <button ng-disabled="userMgmt.current_user == user.username" class="btn-link"
+                                    title="{{ 'Delete' | T }}" ng-click="userMgmt.deleteUser(user)"><i
+                                class="array-delete"></i></button>
+                        </td>
+                        <td ng-if="!userMgmt.show_action_button(user)"></td>
+                    </tr>
+                    </tbody>
+                    <tfoot>
+                    <tr>
+                        <td colspan="5" class="text-center">
+                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
+                                 st-page-change="onPageChange(newPage)"></div>
+                        </td>
+                    </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="userMgmt.userList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'Username' | T }}</th>
-                    <th class="d-type">{{ 'Type' | T }}</th>
-                    <th class="d-type">{{ 'Role Name' | T }}</th>
-                    <th class="d-name">{{ 'Email' | T }}</th>
-                    <th class="d-action">{{ 'Action' | T }}</th>
-                </tr>
-                <tr>
-                    <th></th>
-                    <th>
-                        <input st-search="username" placeholder="{{'Search by Username'|T}}"
-                               class="input-sm form-control" type="text"/>
-                    </th>
-                    <th></th>
-                    <th><input st-search="email" placeholder="{{'Search by Email'|T}}" class="input-sm form-control"
-                               type="text"/></th>
-                    <th></th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="user in displayedCollection">
-                    <td style="font-weight:bold;font-style:oblique;color:red;" title="{{'Current User'|T}}"
-                        ng-if="userMgmt.current_user == user.username" class="d-num">{{ $index + 1 }}
-                    </td>
-                    <td ng-if="userMgmt.current_user != user.username" class="d-num">{{ ((currentPageIndex - 1) *
-                        pageSize) + $index + 1 }}
-                    </td>
-                    <td style="font-weight:bold;font-style:oblique;color:red;" title="{{'Current User'|T}}"
-                        ng-if="userMgmt.current_user == user.username">{{ user.username }}
-                    </td>
-                    <td ng-if="userMgmt.current_user != user.username">{{ user.username }}</td>
-                    <td ng-if="user.user_type && user.role_id != '0'"><span>{{ user.user_type }}</span></td>
-                    <td ng-if="user.role_id == '0' && user.root"><span>Super Admin</span></td>
-                    <td ng-if="user.role_id == '0' && !user.root"><span>Common Admin</span></td>
-                    <td><span ng-if="user.role_name">{{ user.role_name }}</span></td>
-                    <td>{{ user.email }}</td>
-                    <td ng-if="userMgmt.show_action_button(user)">
-                        <button class="btn-link" title="{{ 'Edit' | T }}" ng-click="userMgmt.editUserInfo(user)"><i
-                            class="array-edit an-row-icon"></i></button>
-                        <button ui-sref="index.admin.roleMgmt.deviceGroupMap({name:user.role_name})"
-                                class="btn-link"
-                                title="{{ 'Device Management' | T }}"
-                                ng-disabled="user.user_type !== 'Device Admin'"
-                                ng-click="userMgmt.manageDeviceGroup(user)">
-                            <i class="array-backup an-row-icon" style="font-size: 1.25em;"></i>
-                        </button>
-                        <button class="btn-link" title="{{ 'User Authorization' | T }}"
-                                ng-click="userMgmt.editUserAuth(user)"><i class="fa fa-list-ul an-row-icon"></i>
-                        </button>
-                        <button ng-disabled="userMgmt.current_user == user.username" class="btn-link"
-                                title="{{ 'Delete' | T }}" ng-click="userMgmt.deleteUser(user)"><i
-                            class="array-delete an-row-icon"></i></button>
-                    </td>
-                    <td ng-if="!userMgmt.show_action_button(user)"></td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
 
@@ -97,3 +98,4 @@
         opacity: 0;
     }
 </style>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/common_alert_dialog.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/common_alert_dialog.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/common_alert_dialog.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="commonAlert.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Message' | T}}</h6>
+    <h4 class="modal-title">{{'Message' | T}}</h4>
 </div>
 <div class="modal-body">
     <div class="row" style="font-size: 15px; white-space: pre-wrap;text-align: center;">{{commonAlert.message}}</div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/confirm.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/confirm.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/confirm.html	(working copy)
@@ -1,8 +1,8 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="confirm.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Confirm Selected VF(s)'|T}}</h6>
+    <h4 class="modal-title">{{'Confirm Selected VF(s)'|T}}</h4>
 </div>
 <div class="modal-body">
     <button type="button" class="btn btn-primary" ng-click="confirm.confirm()">{{'Shared'|T}}</button>
     <button type="button" class="btn btn-primary" style="float: right;" ng-click="confirm.unconfirm()">{{'Dedicated'|T}}</button>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/delete_confirm.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/delete_confirm.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/delete_confirm.html	(working copy)
@@ -1,18 +1,18 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="confirm.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Delete Confirm' | T}}</h6>
+    <h4 class="modal-title">{{'Delete Confirm'|T}}</h4>
 </div>
 <div class="modal-body confirm-info">
     {{confirm.info}}
 </div>
 <div class="modal-footer">
-    <button type="button" class="btn btn-default" ng-click="confirm.modalClose()">{{'Cancel' | T}}</button>
-    <button type="button" class="btn btn-primary" ng-click="confirm.confirm()">{{'Confirm' | T}}</button>
+    <button type="button" class="btn btn-default" ng-click="confirm.modalClose()">{{'Cancel'|T}}</button>
+    <button type="button" class="btn btn-primary" ng-click="confirm.confirm()">{{'Confirm'|T}}</button>
 </div>
 
-<style>
+<style> 
     .confirm-info {
         color: #F00;
         font-size: 15px;
-    }
-</style>
+    };
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/engineering.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/engineering.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/engineering.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-    <h6 class="modal-title">{{ 'Engineering Mode' | T}}</h6>
+    <h4 class="modal-title">{{ 'Engineering Mode' | T}}</h4>
 </div>
 <div class="modal-body">
     <div class="row">
\ No newline at end of file
@@ -89,12 +89,12 @@
                         window.QuoteKeys = true;
                         function $id(id){ return document.getElementById(id); }
                         var IsArray = function(obj) {
-                            return  obj &&
-                                    typeof obj === 'object' &&
+                            return  obj && 
+                                    typeof obj === 'object' && 
                                     typeof obj.length === 'number' &&
                                     !(obj.propertyIsEnumerable('length'));
                         }
-
+        
                         var Process = function(data){
                             window.TAB = MultiplyString(2, window.SINGLE_TAB);
                             window.IsCollapsible = true;
\ No newline at end of file
@@ -111,17 +111,17 @@
                             }
                             $('.debug_info .fa-download').click(function(){
                                 var data_to_download = $('.Canvas .CodeContainer').text().replace(/\n/g, "\r\n");
-                                var blob = new Blob([data_to_download], {type: "text/plain"});
-                                var fileName = 'debug_info.txt';
+                                var blob = new Blob([data_to_download], {type: "text/plain"});  
+                                var fileName = 'debug_info.txt';  
                                 var a = document.createElement("a");
                                 a.id = 'debug_info';
-                                document.body.appendChild(a);
+                                document.body.appendChild(a);  
                                 if (navigator.appVersion.toString().indexOf('.NET') > 0) { // for IE browser
                                     window.navigator.msSaveBlob(blob, fileName);
                                 } else { // for other browsers
-                                    a.download = fileName;
-                                    a.href = URL.createObjectURL(blob);
-                                    a.click();
+                                    a.download = fileName;  
+                                    a.href = URL.createObjectURL(blob);  
+                                    a.click(); 
                                 }
                                 document.body.removeChild(document.getElementById('debug_info'));
                             });
\ No newline at end of file
@@ -130,7 +130,7 @@
                         window._regexpObj = new RegExp();
                         var ProcessObject = function(obj, indent, addComma, isArray, isPropertyContent){
                             var html = "";
-                            var comma = (addComma) ? "<span class='Comma'>,</span> " : "";
+                            var comma = (addComma) ? "<span class='Comma'>,</span> " : ""; 
                             var type = typeof obj;
                             var clpsHtml ="";
                             if (IsArray(obj)){
\ No newline at end of file
@@ -148,10 +148,10 @@
                             } else if (type == 'object') {
                                 if (obj == null){
                                     html += FormatLiteral("null", "", comma, indent, isArray, "Null");
-                                }else if (obj.constructor == window._dateObj.constructor) {
-                                    html += FormatLiteral("new Date(" + obj.getTime() + ") /*" + obj.toLocaleString()+"*/", "", comma, indent, isArray, "Date");
+                                }else if (obj.constructor == window._dateObj.constructor) { 
+                                    html += FormatLiteral("new Date(" + obj.getTime() + ") /*" + obj.toLocaleString()+"*/", "", comma, indent, isArray, "Date"); 
                                 }else if (obj.constructor == window._regexpObj.constructor) {
-                                    html += FormatLiteral("new RegExp(" + obj + ")", "", comma, indent, isArray, "RegExp");
+                                    html += FormatLiteral("new RegExp(" + obj + ")", "", comma, indent, isArray, "RegExp"); 
                                 }else{
                                     var numProps = 0;
                                     for(var prop in obj) numProps++;
\ No newline at end of file
@@ -175,7 +175,7 @@
                                 html += FormatLiteral(obj, "", comma, indent, isArray, "Boolean");
                             } else if (type == 'function') {
                                 if (obj.constructor == window._regexpObj.constructor) {
-                                    html += FormatLiteral("new RegExp(" + obj + ")", "", comma, indent, isArray, "RegExp");
+                                    html += FormatLiteral("new RegExp(" + obj + ")", "", comma, indent, isArray, "RegExp"); 
                                 } else {
                                     obj = FormatFunction(indent, obj);
                                     html += FormatLiteral(obj, "", comma, indent, isArray, "Function");
\ No newline at end of file
@@ -194,7 +194,7 @@
                             if(isArray) str = GetRow(indent, str);
                             return str;
                         }
-
+        
                         var FormatFunction = function(indent, obj){
                             var tabs = "";
                             for(var i = 0; i < indent; i++) tabs += window.TAB;
\ No newline at end of file
@@ -205,26 +205,26 @@
                             }
                             return str;
                         }
-
+        
                         var GetRow = function(indent, data, isPropertyContent){
                             var tabs = "";
                             for(var i = 0; i < indent && !isPropertyContent; i++) tabs += window.TAB;
                             if(data != null && data.length > 0 && data.charAt(data.length-1) != "\n")
                             data = data+"\n";
-                            return tabs+data;
-
+                            return tabs+data;                       
+            
                         }
-
-
+        
+        
                         var CollapseAllClicked = function(){
                             TraverseChildren($id("Canvas"), function(element){
                                 if(element.className == 'collapsible'){
                                     MakeContentVisible(element, false);
-
+                
                                 }
                             }, 0);
                         }
-
+        
                         var ExpandAllClicked = function(){
                             TraverseChildren($id("Canvas"), function(element){
                                 if(element.className == 'collapsible'){
\ No newline at end of file
@@ -232,7 +232,7 @@
                                 }
                             }, 0);
                         }
-
+        
                         var MakeContentVisible = function(element, visible){
                             var img = element.previousSibling.firstChild;
                             if(!!img.tagName && img.tagName.toLowerCase() == "img"){
\ No newline at end of file
@@ -240,14 +240,14 @@
                                 element.previousSibling.firstChild.src = visible ? window.ImgExpanded : window.ImgCollapsed;
                             }
                         }
-
+            
                         var TraverseChildren = function(element, func, depth){
                             for(var i = 0; i < element.childNodes.length; i++){
                                 TraverseChildren(element.childNodes[i], func, depth + 1);
                             }
                             func(element, depth);
                         }
-
+        
                         var ExpImgClicked = function(img){
                             var container = img.parentNode.nextSibling;
                             if(!container) return;
\ No newline at end of file
@@ -260,19 +260,19 @@
                             container.style.display = disp;
                             img.src = src;
                         }
-
+        
                         var CollapseLevel = function(level){
                             TraverseChildren($id("Canvas"), function(element, depth){
                                 if(element.className == 'collapsible'){
                                     if(depth >= level){
                                         MakeContentVisible(element, false);
                                     } else {
-                                        MakeContentVisible(element, true);
+                                        MakeContentVisible(element, true);  
                                     }
                                 }
                             }, 0);
                         }
-
+        
                         var MultiplyString = function(num, str){
                             var sb =[];
                             for(var i = 0; i < num; i++){
\ No newline at end of file
@@ -280,14 +280,14 @@
                             }
                             return sb.join("");
                         }
-
+        
                         var LinkToJson = function(){
                             var val = $id("RawJson").value;
                             val = escape(val.split('/n').join(' ').split('/r').join(' '));
                             $id("InvisibleLinkUrl").value = val;
                             $id("InvisibleLink").submit();
                         }
-                    </script>
+                    </script>           
               </div>
         </div>
         <div class="" ng-if="index == 4">
\ No newline at end of file
@@ -344,4 +344,4 @@
         margin-top: 30px;
         width: 1000px;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/licenseExpire.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/licenseExpire.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/licenseExpire.html	(working copy)
@@ -1,5 +1,5 @@
 <div class="modal-header">
-    <h6 class="modal-title">{{'Please Import License Key'|T}}</h6>
+    <h4 class="modal-title">{{'Please Import License Key'|T}}</h4>
 </div>
 
 <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/pipe_action_modal.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/pipe_action_modal.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/pipe_action_modal.html	(working copy)
@@ -1,11 +1,11 @@
 <div class="modal-header" style="padding: 10px; color: #fff; background-color: #3e3d42;">
     <button type="button" class="close" ng-click="pipeAction.end_long_polling()">&times;</button>
-    <h6 class="modal-title">{{pipeAction.title|T}}</h6>
+    <h4 class="modal-title">{{pipeAction.title|T}}</h4>
 </div>
-<div class="modal-body" style="overflow: auto; height: 250px; padding: 20px; word-wrap: break-word;">
+<div class="modal-body" style="overflow: auto; height: 250px; padding: 20; word-wrap: break-word;">
     <p ng-bind-html="pipeAction.result | trust"></p>
 </div>
 <div class="modal-footer">
     <div style="margin-bottom: 15px;text-align: center" ng-hide="pipeAction.finished"><img src="app/images/loading.gif"></div>
     <button style="margin-bottom: 15px;text-align: center" type="button" class="btn btn-primary" ng-click="pipeAction.modalClose()" ng-show="pipeAction.finished">{{'Close'|T}}</button>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="progress.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Loading...'|T}}</h6>
+    <h4 class="modal-title">{{'Loading...'|T}}</h4>
 </div>
 <div class="modal-body oem-progress">
     <div class="progress">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress_with_value.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress_with_value.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/common/templates/progress_with_value.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="progress.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Loading...'|T}}</h6>
+    <h4 class="modal-title">{{'Loading...'|T}}</h4>
 </div>
 <div class="modal-body">
     <uib-progressbar max="max" type="info" value="value"><b>{{value}}%</b></uib-progressbar>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.batch.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.batch.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.batch.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="configBatch.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-batch"></i>{{ 'Batch Processing' | T}}</h6>
+        <h4><i class="array-batch"></i>{{ 'Batch Processing' | T}}</h4>
     </div>
     <div class="modal-body" style="overflow-y: visible">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.check.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.check.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/modal/configTemp.check.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="configCheck.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-check"></i>{{ 'Compliance Check' | T}}</h6>
+        <h4><i class="array-check"></i>{{ 'Compliance Check' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_acl/modal/aclTemp.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_acl/modal/aclTemp.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_acl/modal/aclTemp.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="aclAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Add ACL Template' | T}}</h6>
+        <h4 class="modal-title">{{ 'Add ACL Template' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_custom/modal/customTemp.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_custom/modal/customTemp.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_custom/modal/customTemp.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="customTempAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Add New Custom Template' | T}}</h6>
+        <h4 class="modal-title">{{ 'Add New Custom Template' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_role/modal/role-add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_role/modal/role-add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_role/modal/role-add.html	(working copy)
@@ -1,7 +1,8 @@
 <div>
     <div class="modal-header">
+        <!-- <div class="title">{{ 'Add Role Template' | T}}</div> -->
         <button type="button" class="close" ng-click="roleConfigAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Add Role Template' | T}}</h6>
+        <h4 class="modal-title">{{ 'Add Role Template' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_vpn/modal/vpnTemp.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_vpn/modal/vpnTemp.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/config_template/tab_vpn/modal/vpnTemp.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="vpnAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Add VPN Template' | T}}</h6>
+        <h4 class="modal-title">{{ 'Add VPN Template' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/config.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/config.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/config.html	(working copy)
@@ -2,18 +2,19 @@
     <div class="col-md-12">
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/configuration/device') }">
-                <a ui-sref="index.configuration.device"><span class="tab-header">{{ 'Device Configuration Files' | T
-                    }}</span></a>
+                <a ui-sref="index.configuration.device">{{ 'Device Configuration Files' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/configuration/system') }">
-                <a ui-sref="index.configuration.system"><span class="tab-header">{{ 'Cloned Files' | T }}</span></a>
+                <a ui-sref="index.configuration.system">{{ 'Cloned Files' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/configuration/customize') }">
-                <a ui-sref="index.configuration.customize"><span class="tab-header">{{ 'Customized Files' | T }}</span></a>
+                <a ui-sref="index.configuration.customize">{{ 'Customized Files' | T }}</a>
             </li>
         </ul>
     </div>
-    <div class="content-wrapper">
+</div>
+<div class="row">
+     <div class="col-md-12">
         <div class="" ng-show="url_contain('/configuration/device')" ui-view="device"></div>
         <div class="" ng-show="url_contain('/configuration/system')" ui-view="system"></div>
         <div class="" ng-show="url_contain('/configuration/customize')" ui-view="customize"></div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/apvconfig.edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/apvconfig.edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/apvconfig.edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="editAPVConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Edit Configuration' | T}}---{{editAPVConfig.file_name}}</h6>
+        <h4>{{ 'Edit Configuration' | T}}---{{editAPVConfig.file_name}}</h4>
 
     </div>
     <div class="modal-body" style="margin-left: 0px; padding-top: 0px; max-height: 600px;">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="addConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Add Config' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Add Config' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configAddForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.controller.js	(working copy)
@@ -1,5 +1,5 @@
 angular.module('cm.config')
-.controller('configBackupCtrl', [
+.controller('backupCtrl', [
     '$scope',
     '$rootScope',
     '$state',
@@ -58,4 +58,3 @@
 
     }
 ])
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backup.html	(working copy)
@@ -1,8 +1,7 @@
 <div>
     <div class="modal-header">
-        <button type="button" class="close" ng-click="configBackup.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
-        </button>
-        <h6><i class="array-backup"></i>{{ 'Backup Configuration' | T}}</h6>
+        <button type="button" class="close" ng-click="backup.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4><i class="array-backup"></i>{{ 'Backup Configuration' | T}}</h4>
 
     </div>
     <div class="modal-body">
@@ -10,16 +9,14 @@
             <div class="form-group">
                 <label for="comment" class="col-md-3 control-label">{{ 'Comment' | T }}</label>
                 <div class="col-md-8">
-                    <input type="text" class="form-control" id="comment" ng-model="configBackup.comment" maxlength="32">
+                    <input type="text" class="form-control" ng-model="backup.comment" maxlength="32">
                 </div>
             </div>
 
             <div class="form-group">
                 <div class="col-md-offset-3 col-md-9">
-                    <button class="btn btn-primary" ng-click="configBackup.submit()" id="backupSubmit">
-                        {{ 'Backup' | T}}
-                    </button>
-                    <button class="btn btn-default" ng-click="configBackup.close()">{{ 'Cancel' | T}}</button>
+                    <button class="btn btn-primary" ng-click="backup.submit()" id="backupSubmit">{{ 'Backup' | T}}</button>
+                    <button class="btn btn-default" ng-click="backup.close()">{{ 'Cancel' | T}}</button>
                 </div>
             </div>
         </form>
@@ -27,3 +24,10 @@
 
 </div>
 
+<style>
+    .modal-dialog {
+        margin-top: 30px;
+        width: 600px;
+    }
+
+</style>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backupAll.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backupAll.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.backupAll.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="backup.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-backup"></i>{{ 'Select Devices For Batch Backup' | T}}</h6>
+        <h4><i class="array-backup"></i>{{ 'Select Devices For Batch Backup' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configbackupForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check-mutil.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check-mutil.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check-mutil.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="checkMutil.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="fa fa-check-square-o" aria-hidden="true"></i>{{ 'Select Device' | T}}</h6>
+        <h4><i class="fa fa-check-square-o" aria-hidden="true"></i>{{ 'Select Device' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.check.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="check.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-check"></i>{{ 'Configuration Comparison' | T}}</h6>
+        <h4><i class="array-check"></i>{{ 'Configuration Comparison' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configCheckForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.clone.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.clone.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.clone.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="clone.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class=""><i class="array-copy"></i>{{ 'Clone Configuration' | T}}</h6>
+        <h4 class=""><i class="array-copy"></i>{{ 'Clone Configuration' | T}}</h4>
 
     </div>
     <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.complianceCheck.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.complianceCheck.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.complianceCheck.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="complianceCheck.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-check"></i>{{ 'Configuration Comparison' | T}}</h6>
+        <h4><i class="array-check"></i>{{ 'Configuration Comparison' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="complianceCheckForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="addConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Create Customzied Config File' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Create Customzied Config File' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="customConfigAddForm" verify-scope="tipStyle: 1">
@@ -96,11 +96,11 @@
         margin-top: 30px;
         width: 940px;
     }
-    .file-box{
+    .file-box{ 
         position: relative;
-    }
-    .file{
-        position: absolute;
+    } 
+    .file{ 
+        position: absolute; 
         top: 0;
         opacity: 0;
     }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.type.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.type.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.add.type.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="addConfigType.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Select Customized Configuration Type' | T}}</h6>
+        <h4>{{ 'Select Customized Configuration Type' | T}}</h4>
     </div>
     <div class="form-wrapper">
         <form class="form-horizontal" name="customizedBackupTypeForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.template.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.template.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.template.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="templateConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Create Customzied Template Config File' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Create Customzied Template Config File' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="customConfigAddForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.upload.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.upload.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.custom.upload.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="uploadConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Create Customzied Config File' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Create Customzied Config File' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="customConfigUploadForm" verify-scope="tipStyle: 1">
@@ -93,11 +93,11 @@
 </div>
 
 <style>
-    .file-box{
+    .file-box{ 
         position: relative;
-    }
-    .file{
-        position: absolute;
+    } 
+    .file{ 
+        position: absolute; 
         top: 0;
         opacity: 0;
     }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.detail.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.detail.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.detail.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="detail.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Configuration' | T}}</h6>
+        <h4>{{ 'Configuration' | T}}</h4>
 
     </div>
     <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit-config.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit-config.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit-config.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="editConfig.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Select VSite' | T}}</h6>
+        <h4>{{ 'Select VSite' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configEditForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="edit.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Edit Configuration' | T}}---{{edit.vsname}}</h6>
+        <h4>{{ 'Edit Configuration' | T}}---{{edit.vsname}}</h4>
 
     </div>
     <div class="modal-body" style="margin-left: 0px; padding-top: 0px;">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.controller.js	(working copy)
@@ -23,15 +23,21 @@
             var device_type = $rootScope.__initKey__.device_type;
             var deviceList = [];
             _.each($rootScope.__deviceList__, function(device) {
-                if (device.type === device_type) {
+                if (device.type == device_type) {
                     deviceList.push(device);
                 }
             })
             initViewModal.deviceList = deviceList;
+            if (initViewModal.deviceList.length > 0) {
+                initViewModal.deviceList.unshift({"name": "ALL"})
+            }
 
             deviceGroupService.getDeviceGroup().then(function (res) {
                 if (res && res.status === 200) {
                     initViewModal.deviceGroupList = $filter("FG")(res.data);
+                    if (initViewModal.deviceGroupList.length > 0) {
+                        initViewModal.deviceGroupList.unshift({"name": "ALL"})
+                    }
                 } else {
                     initViewModal.deviceGroupList = [];
                 }
@@ -40,11 +46,33 @@
 
             initViewModal.is_vpn_customize = false;
             var device_type_info = localStorageService.getWebStorage("device_type_info");
-            if (device_type_info.VPN_TYPE_LIST.indexOf(device_type.toLowerCase()) !== -1) {
-                if (initViewModal.file_type === 'customize') {
+            if (device_type_info.VPN_TYPE_LIST.indexOf(device_type.toLowerCase()) != -1) {
+                if (initViewModal.file_type == 'customize') {
                     initViewModal.is_vpn_customize = true;
                 }
             }
+            // if (initViewModal.is_vpn_customize) {
+            //     initViewModal.vsiteList = [];
+            //     _.each(initViewModal.deviceList, function(device){
+            //         initViewModal.vsiteList.push({
+            //             "value":device.name+'"global',
+            //             "display":"Global ("+device.name+")"
+            //         });
+            //         configService.getDeviceCofigVsites(device.name).then(function (res) {
+            //             if (res && res.status === 200) {
+            //                 if (res.data[0]) {
+            //                     _.each(res.data[1], function(vs) {
+            //                         initViewModal.vsiteList.push({
+            //                             "value":device.name+'"'+vs.name,
+            //                             "display":vs.name+" ("+device.name+")"
+            //                         });
+            //                     });
+            //                     initViewModal.vpn_data_ready = true;
+            //                 }
+            //             }
+            //         });
+            //     });
+            // }
 
             // init option
             initViewModal.option = 'immediate';
@@ -62,7 +90,7 @@
             initViewModal.click_device = function () {
                 initViewModal.showDeviceTab = true;
             };
-
+    
             initViewModal.click_device_group = function () {
                 initViewModal.showDeviceTab = false;
             };
@@ -117,4 +145,3 @@
 
         }
     ])
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.init.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="init.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-init"></i>{{ 'Apply Configuration' | T}}</h6>
+        <h4><i class="array-init"></i>{{ 'Apply Configuration' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configInitForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.onekeycheck.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.onekeycheck.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.onekeycheck.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="onKeyCheck.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Configuration Comparison All' | T}}</h6>
+        <h4 class="modal-title">{{ 'Configuration Comparison All' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.recover.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.recover.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.recover.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="recover.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-recover"></i>{{ 'Recover Configuration' | T}}</h6>
+        <h4><i class="array-recover"></i>{{ 'Recover Configuration' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configRecoverForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.scheduleBackupAll.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.scheduleBackupAll.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.scheduleBackupAll.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="scheduleBackup.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="fa fa-history"></i>{{ 'Schedule Backup Configuration' | T}}</h6>
+        <h4><i class="fa fa-history"></i>{{ 'Schedule Backup Configuration' | T}}</h4>
 
     </div>
     <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="addTemplate.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Add Template Keys' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Add Template Keys' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configAddForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="editTemplate.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Edit Template Keys' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Edit Template Keys' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configAddForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.keyval.edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.keyval.edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.template.keyval.edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="editTemplateKeyValue.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6>{{ 'Edit Device Template Key Default Value' | T}}</h6>
+        <h4>{{ 'Edit Device Template Key Default Value' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="configAddForm" verify-scope="tipStyle: 1">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.versionCompare.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.versionCompare.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config.versionCompare.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="versionCompare.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="fa fa-exchange"></i>{{ 'Backup Version Compare' | T}}</h6>
+        <h4><i class="fa fa-exchange"></i>{{ 'Backup Version Compare' | T}}</h4>
 
     </div>
     <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="task.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Config Task List' | T}}</h6>
+        <h4 class="modal-title">{{ 'Config Task List' | T}}</h4>
     </div>
     <div class="modal-body">
         <div id="ssl-check" class="widget">
\ No newline at end of file
@@ -66,4 +66,4 @@
     .modal-dialog {
         width: 800px;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_diff.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_diff.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_diff.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="diff.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Diff Information' | T}}</h6>
+        <h4 class="modal-title">{{ 'Diff Information' | T}}</h4>
     </div>
     <div class="modal-body">
         <div class="widget">
\ No newline at end of file
@@ -41,7 +41,7 @@
                         </div>
                     </div>
                 </div>
-
+                
             </div>
         </div>
     </div>
\ No newline at end of file
@@ -61,4 +61,4 @@
 th {
     width: 160px;
 }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_output.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_output.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/modal/config_task_output.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="output.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Apply Result' | T}}</h6>
+        <h4 class="modal-title">{{ 'Apply Result' | T}}</h4>
     </div>
     <div class="modal-body">
         <div class="widget">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize.html	(working copy)
@@ -1,66 +1,53 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="customize.add()"><i
-                    class="fa fa-plus-circle an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="customize.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="customize.add()"><i class="fa fa-plus-circle"></i></button>
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="customize.refresh()"><i class="fa fa-refresh"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!customize.configList"><img src="app/images/loading.gif"></div>
+                <table st-table="displayedCollection" st-safe-src="customize.configList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-name">{{ 'File Name' | T }}</th>
+                            <th class="d-type">{{ 'File Type' | T }}</th>
+                            <th class="d-type">{{ 'Device Type' | T }}</th>
+                            <th class="d-ctime">{{ 'Create Time' | T }}</th>
+                            <th class="d-mtime">{{ 'Modify Time' | T }}</th>
+                            <th class="d-comment">{{ 'Comment' | T }}</th>
+                            <th class="d-action">{{ 'Action' | T }}</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="configItem in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td><a class="name" ng-click="customize.edit(configItem)">{{ configItem.name }}</a></td>
+                            <td>{{ configItem.file_type }}</td>
+                            <td>{{ configItem.device_type }}</td>
+                            <td>{{ configItem.create_time }}</td>
+                            <td>{{ configItem.modify_time }}</td>
+                            <td>{{ configItem.comment }}</td>
+                            <td>
+                                <a class="icon-box" title="{{ 'Configuration Comparison' | T }}" ng-if="configItem.file_type!='template'" ng-click="customize.compCheck(configItem)"><i class="array-check"></i></a>
+                                <a class="icon-box" title="{{ 'Apply Configuration' | T }}" ng-click="customize.apply(configItem)"><i class="array-init"></i></a>
+                                <a class="icon-box" title="{{ 'Tasks' | T }}" ng-click="customize.task(configItem)"><i class="fa fa-thumb-tack" uib-tooltip="{{ 'Click button to show task for this configuration.' | T}}" tooltip-is-open="configItem.tooltipIsOpen"></i></a>
+                                <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="customize.delete(configItem)"><i class="array-delete"></i></a>
+                            </td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="7" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!customize.configList"><img
-                src="app/images/loading.gif"></div>
-            <table st-table="displayedCollection" st-safe-src="customize.configList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'File Name' | T }}</th>
-                    <th class="d-type">{{ 'File Type' | T }}</th>
-                    <th class="d-type">{{ 'Device Type' | T }}</th>
-                    <th class="d-ctime">{{ 'Create Time' | T }}</th>
-                    <th class="d-mtime">{{ 'Modify Time' | T }}</th>
-                    <th class="d-comment">{{ 'Comment' | T }}</th>
-                    <th class="d-action">{{ 'Action' | T }}</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="configItem in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td><a class="name" ng-click="customize.edit(configItem)">{{ configItem.name }}</a></td>
-                    <td>{{ configItem.file_type }}</td>
-                    <td>{{ configItem.device_type }}</td>
-                    <td>{{ configItem.create_time }}</td>
-                    <td>{{ configItem.modify_time }}</td>
-                    <td>{{ configItem.comment }}</td>
-                    <td>
-                        <a class="icon-box" title="{{ 'Configuration Comparison' | T }}"
-                           ng-if="configItem.file_type!='template'" ng-click="customize.compCheck(configItem)"><i
-                            class="array-check an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Apply Configuration' | T }}"
-                           ng-click="customize.apply(configItem)"><i class="array-init an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Tasks' | T }}" ng-click="customize.task(configItem)"><i
-                            class="fa fa-thumb-tack an-row-icon"
-                            uib-tooltip="{{ 'Click button to show task for this configuration.' | T}}"
-                            tooltip-is-open="configItem.tooltipIsOpen"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="customize.delete(configItem)"><i
-                            class="array-delete an-row-icon"></i></a>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="8" class="text-center">No matching records found.</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize_basic.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize_basic.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/customize_basic.html	(working copy)
@@ -1,17 +1,18 @@
-<div class="col-md-12">
+<div class="row">
+  <div class="col-md-12">
     <section>
         <ul class="nav nav-pills">
             <li ng-class="{ active:url_contain('/configuration/customize/default')}">
-                <a ui-sref="index.configuration.customize.default">{{'Custom Configuration' | T}}</a>
+               <a ui-sref="index.configuration.customize.default">{{'Custom Configuration'|T}}</a>
             </li>
             <li ng-class="{ active:url_contain('/configuration/customize/template')}">
-                <a ui-sref="index.configuration.customize.template">{{'Custom Template Parameters' | T}}</a>
+               <a ui-sref="index.configuration.customize.template">{{'Custom Template Parameters'|T}}</a>
             </li>
         </ul>
     </section>
+  </div>
 </div>
-
 <div class="panel-default">
     <div class="" ng-show="url_contain('/configuration/customize/default')" ui-view="default"></div>
     <div class="" ng-show="url_contain('/configuration/customize/template')" ui-view="template"></div>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.controller.js	(working copy)
@@ -299,7 +299,7 @@
             }
 
             configDeviceViewModal.cloneDeviceConfig = function (config) {
-
+                
                 var data = {
                     name: config.name,
                     type: 'device',
@@ -340,8 +340,8 @@
                 //backup xxx.tar file on device to cm
                 var modalInstance = $uibModal.open({
                     templateUrl: 'app/modules/configuration/modal/config.backup.html',
-                    controller: 'configBackupCtrl',
-                    controllerAs: 'configBackup',
+                    controller: 'backupCtrl',
+                    controllerAs: 'backup',
                     resolve: {
                     }
                 });
@@ -370,4 +370,3 @@
 
         }
     ])
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/device.html	(working copy)
@@ -1,64 +1,53 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="device.refreshTable()"><i
-                    class="array-refresh an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Backup' | T }}" ng-click="device.backupAll()"><i
-                    class="array-backup an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Configuration Comparison All' | T }}"
-                        ng-click="device.oneKeyCheck()"><i class="array-check an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Schedule Backup' | T }}" ng-click="device.schduleBackup()"><i
-                    class="fa fa-history an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Version Compare' | T }}" ng-click="device.versionCompare()"><i
-                    class="fa fa-exchange an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <!-- <div class="widget-header">{{'Device Configuration Files'|T}}</div> -->
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="device.refreshTable()"><i class="array-refresh"></i></button>
+                    <button class="btn btn-link" title="{{ 'Backup' | T }}" ng-click="device.backupAll()"><i class="array-backup"></i></button>
+                    <button class="btn btn-link" title="{{ 'Configuration Comparison All' | T }}" ng-click="device.oneKeyCheck()"><i class="array-check"></i></button>
+                    <button class="btn btn-link" title="{{ 'Schedule Backup' | T }}" ng-click="device.schduleBackup()"><i class="fa fa-history"></i></button>
+                    <button class="btn btn-link" title="{{ 'Version Compare' | T }}" ng-click="device.versionCompare()"><i class="fa fa-exchange"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="device.deviceConfigList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-name">{{ 'Device Name' | T }}</th>
+                            <th class="d-type">{{ 'Device Type' | T }}</th>
+                            <th class="d-ctime">{{ 'Last Backup Time' | T }}</th>
+                            <th class="d-action">{{ 'Action' | T }}</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="configItem in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td><a class="name" ng-click="device.getConfig(configItem)">{{ configItem.name }}</a></td>
+                            <td>{{ configItem.device_type }}</td>
+                            <td>{{ configItem.last_backup_time }}</td>
+                            <td>
+                                <a class="icon-box" title="{{ 'View History Backup Files' | T }}" ui-sref="index.configuration.device.detail({name:configItem.name})" ng-click="device.info(configItem)"><i class="array-detail"></i></a>
+                                <a class="icon-box" title="{{ 'Compare Configuration with Last Backup File' | T }}" ng-click="device.singleCheck(configItem)"><i class="array-check"></i></a>
+                                <a class="icon-box" title="{{ 'Clone Configuration' | T }}" ng-click="device.cloneDeviceConfig(configItem)"><i class="array-copy"></i></a>
+                                <!--a class="icon-box" title="{{ 'Refresh' | T }}" ng-click="device.refresh(configItem)"><i class="array-refresh"></i></a-->
+                                <a class="icon-box" title="{{ 'Click button to show task for this configuration.' | T}}" ng-click="device.task(configItem)"><i class="fa fa-thumb-tack"></i></a>
+                                <a class="icon-box" title="{{ 'Backup Configuration' | T }}" ng-click="device.backup(configItem)"><i class="array-backup"></i></a>
+                                <!--<a class="icon-box" title="{{ 'Delete Configuration' | T }}" ng-click="device.delete(configItem)"><i class="array-delete"></i></a>-->
+                            </td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="5" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="device.deviceConfigList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'Device Name' | T }}</th>
-                    <th class="d-type">{{ 'Device Type' | T }}</th>
-                    <th class="d-ctime">{{ 'Last Backup Time' | T }}</th>
-                    <th class="d-action">{{ 'Action' | T }}</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="configItem in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td><a class="name" ng-click="device.getConfig(configItem)">{{ configItem.name }}</a></td>
-                    <td>{{ configItem.device_type }}</td>
-                    <td>{{ configItem.last_backup_time }}</td>
-                    <td>
-                        <a class="icon-box" title="{{ 'View History Backup Files' | T }}"
-                           ui-sref="index.configuration.device.detail({name:configItem.name})"
-                           ng-click="device.info(configItem)"><i class="array-detail an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Compare Configuration with Last Backup File' | T }}"
-                           ng-click="device.singleCheck(configItem)"><i class="array-check an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Clone Configuration' | T }}"
-                           ng-click="device.cloneDeviceConfig(configItem)"><i class="array-copy an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Click button to show task for this configuration.' | T}}"
-                           ng-click="device.task(configItem)"><i class="fa fa-thumb-tack an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Backup Configuration' | T }}"
-                           ng-click="device.backup(configItem)"><i class="array-backup an-row-icon"></i></a>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="5" class="text-center">No matching records found.</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/system.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/system.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/system.html	(working copy)
@@ -1,64 +1,55 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="system.refresh()"><i
-                    class="array-refresh an-tab-icon"></i></button>
+<div class="row">
+    <!--div class="table-toolbar">
+        <a class="icon-box" title="{{ '' | T }}" ng-click="system.add()"><i class="array-add"></i></a>
+    </div -->
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="system.refresh()"><i class="array-refresh"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="system.configList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-name">{{ 'File Name' | T }}</th>
+                            <th class="d-type">{{ 'File Type' | T }}</th>
+                            <th class="d-type">{{ 'Device Type' | T }}</th>
+                            <th class="d-ctime">{{ 'Create Time' | T }}</th>
+                            <th class="d-mtime">{{ 'Clone Source' | T }}</th>
+                            <th class="d-comment">{{ 'Comment' | T }}</th>
+                            <th class="d-action">{{ 'Action' | T }}</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="configItem in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td ng-click="system.editConfig(configItem)"><a class="name">{{ configItem.name }}</a></td>
+                            <td>{{ configItem.file_type }}</td>
+                            <td>{{ configItem.device_type }}</td>
+                            <td>{{ configItem.create_time }}</td>
+                            <td>{{ configItem.modify_time }}</td>
+                            <td>{{ configItem.comment }}</td>
+                            <td>
+                                <a class="icon-box" title="{{ 'Clone' | T }}" ng-click="system.clone(configItem)"><i class="array-copy"></i></a>
+                                <a class="icon-box" title="{{ 'Configuration Comparison' | T }}" ng-click="system.compCheck(configItem)"><i class="array-check"></i></a>
+                                <a class="icon-box" title="{{ 'Apply Configuration' | T }}" ng-if="configItem.file_type == 'system' || configItem.file_type == 'vs'" ng-click="system.init(configItem)"><i class="array-init"></i></a>
+                                <a class="icon-box" title="{{ 'Tasks' | T }}" ng-click="system.task(configItem)"><i class="fa fa-thumb-tack" uib-tooltip="{{ 'Click button to show task for this configuration.' | T}}" tooltip-is-open="configItem.tooltipIsOpen"></i></a>
+                                <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="system.delete(configItem)"><i class="array-delete"></i></a>
+                            </td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="7" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="system.configList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'File Name' | T }}</th>
-                    <th class="d-type">{{ 'File Type' | T }}</th>
-                    <th class="d-type">{{ 'Device Type' | T }}</th>
-                    <th class="d-ctime">{{ 'Create Time' | T }}</th>
-                    <th class="d-mtime">{{ 'Clone Source' | T }}</th>
-                    <th class="d-comment">{{ 'Comment' | T }}</th>
-                    <th class="d-action">{{ 'Action' | T }}</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="configItem in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td ng-click="system.editConfig(configItem)"><a class="name">{{ configItem.name }}</a></td>
-                    <td>{{ configItem.file_type }}</td>
-                    <td>{{ configItem.device_type }}</td>
-                    <td>{{ configItem.create_time }}</td>
-                    <td>{{ configItem.modify_time }}</td>
-                    <td>{{ configItem.comment }}</td>
-                    <td>
-                        <a class="icon-box" title="{{ 'Clone' | T }}" ng-click="system.clone(configItem)"><i
-                            class="array-copy an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Configuration Comparison' | T }}"
-                           ng-click="system.compCheck(configItem)"><i class="array-check an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Apply Configuration' | T }}"
-                           ng-if="configItem.file_type == 'system' || configItem.file_type == 'vs'"
-                           ng-click="system.init(configItem)"><i class="array-init an-row-icon"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Tasks' | T }}" ng-click="system.task(configItem)"><i
-                            class="fa fa-thumb-tack an-row-icon"
-                            uib-tooltip="{{ 'Click button to show task for this configuration.' | T}}"
-                            tooltip-is-open="configItem.tooltipIsOpen"></i></a>&nbsp;&nbsp;
-                        <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="system.delete(configItem)"><i
-                            class="array-delete an-row-icon"></i></a>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="8" class="text-center">No matching records found.</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/template.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/template.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/configuration/tabs/template.html	(working copy)
@@ -1,59 +1,51 @@
-<rd-widget>
-    <div class="col-md-12">
-        <div class="widget">
-            <rd-widget-header icon="fa fa-server" title="{{'Template Key Word'|T}}" class="tab-header-1">
-            </rd-widget-header>
-            <div class="table-toolbar">
-                <div class="btn-group">
-                    <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="template.add()"><i
-                        class="fa fa-plus-circle an-tab-icon"></i></button>
-                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="template.refresh()"><i
-                        class="fa fa-refresh an-tab-icon"></i></button>
+<div class="row">
+    <rd-widget>
+        <div class="col-md-12">
+            <div class="widget">
+                <rd-widget-header icon="fa fa-server" title="{{'Template Key Word'|T}}">
+                </rd-widget-header>
+                <div class="table-toolbar">
+                    <div class="btn-group">
+                        <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="template.add()"><i class="fa fa-plus-circle"></i></button>
+                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="template.refresh()"><i class="fa fa-refresh"></i></button>
+                    </div>
                 </div>
+                <div class="table-wrapper">
+                    <table st-table="displayedCollection" st-safe-src="template.templateList" class="table table-hover table-striped">
+                        <thead>
+                            <tr>
+                                <th class="d-num">No.</th>
+                                <th class="d-name">{{ 'Template Key Word' | T }}</th>
+                                <th class="d-name">{{ 'Description' | T }}</th>
+                                <th class="d-name">{{ 'Default Value' | T }}</th>
+                                <th class="d-action">{{ 'Action' | T }}</th>
+                            </tr>
+                        </thead>
+                        <tbody>
+                            <tr ng-repeat="item in displayedCollection">
+                                <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                                <td>{{ item.key }}</td>
+                                <td>{{ item.description }}</td>
+                                <td>{{ item.default_value }}</td>
+                                <td>
+                                    <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="template.edit(item)"><i class="array-edit"></i></a>
+                                    <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="template.delete(item)"><i class="array-delete"></i></a>
+                                </td>
+                            </tr>
+                        </tbody>
+                        <tfoot>
+                            <tr>
+                                <td colspan="7" class="text-center">
+                                    <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                                </td>
+                            </tr>
+                        </tfoot>
+                    </table>
+                </div>
             </div>
-            <div class="table-wra   pper">
-                <table st-table="displayedCollection" st-safe-src="template.templateList"
-                       class="table table-hover table-striped">
-                    <thead>
-                    <tr>
-                        <th class="d-num">No.</th>
-                        <th class=" d-name">{{ 'Template Key Word' | T }}</th>
-                        <th class="d-name">{{ 'Description' | T }}</th>
-                        <th class="d-name">{{ 'Default Value' | T }}</th>
-                        <th class="d-action">{{ 'Action' | T }}</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr ng-repeat="item in displayedCollection">
-                        <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                        <td>{{ item.key }}</td>
-                        <td>{{ item.description }}</td>
-                        <td>{{ item.default_value }}</td>
-                        <td>
-                            <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="template.edit(item)"><i
-                                class="array-edit an-row-icon"></i></a>&nbsp;&nbsp;
-                            <a class="icon-box" title="{{ 'Delete' | T }}" ng-click="template.delete(item)"><i
-                                class="array-delete an-row-icon"></i></a>
-                        </td>
-                    </tr>
-                    <tr ng-if="displayedCollection.length === 0">
-                        <td colspan="5" class="text-center">No matching records found.</td>
-                    </tr>
-                    </tbody>
-                    <tfoot>
-                    <tr>
-                        <td colspan="7" class="text-center">
-                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                                 st-page-change="onPageChange(newPage)"></div>
-                        </td>
-                    </tr>
-                    </tfoot>
-                </table>
-            </div>
         </div>
-    </div>
-</rd-widget>
-
+    </rd-widget>
+</div>
 <div class="row" ng-if="template.templateList.length > 0">
     <rd-widget>
         <div class="col-md-12">
@@ -62,31 +54,37 @@
                 </rd-widget-header>
                 <div class="table-toolbar">
                     <div class="btn-group">
-                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="template.refresh2()"><i
-                            class="fa fa-refresh an-tab-icon"></i></button>
+                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="template.refresh2()"><i class="fa fa-refresh"></i></button>
                     </div>
                 </div>
                 <div class="table-wrapper">
                     <table class="table table-hover table-striped">
                         <thead>
-                        <tr>
-                            <th class="d-num">No.</th>
-                            <th ng-repeat="item in template.templateKeyList">{{ item }}</th>
-                        </tr>
+                            <tr>
+                                <th class="d-num">No.</th>
+                                <th ng-repeat="item in template.templateKeyList">{{ item }}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-repeat="item in template.templateValueList">
-                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                            <td ng-repeat="each in item">{{ each }}</td>
-                            <td>
-                                <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="template.editKeyValue(item)"><i
-                                    class="array-edit an-row-icon"></i></a>
-                            </td>
-                        </tr>
+                            <tr ng-repeat="item in template.templateValueList">
+                                <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                                <td ng-repeat="each in item">{{ each }}</td>
+                                <td>
+                                    <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="template.editKeyValue(item)"><i class="array-edit"></i></a>
+                                </td>
+                            </tr>
                         </tbody>
+                       <!--  <tfoot>
+                            <tr>
+                                <td colspan="7" class="text-center">
+                                    <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                                </td>
+                            </tr>
+                        </tfoot> -->
                     </table>
                 </div>
             </div>
         </div>
     </rd-widget>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/dashboard.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/dashboard.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/dashboard.html	(working copy)
@@ -1,19 +1,16 @@
 <div class="row">
     <div class="col-md-12">
         <ul class="nav nav-tabs">
+            <li role="presentation" ng-if="plugin_contain('cm.monitoring')" ng-class="{ active: url_contain('/dashboard/overview') }">
+                <a ui-sref="index.dashboard.overview">{{'Overview'|T}}</a>
+            </li>
             <li role="presentation" ng-class="{ active: url_contain('/dashboard/system_statistics') }">
-                <a ui-sref="index.dashboard.system_statistics"><span
-                    class="tab-header">{{'System Overview' | T}}</span></a>
+                <a ui-sref="index.dashboard.system_statistics">{{'System Statistics'|T}}</a>
             </li>
-            <li role="presentation" ng-if="plugin_contain('cm.monitoring')"
-                ng-class="{ active: url_contain('/dashboard/overview') }">
-                <a ui-sref="index.dashboard.overview"><span class="tab-header">{{'Device & Service Insights' | T}}</span></a>
-            </li>
         </ul>
     </div>
 </div>
 <div class="content-wrapper">
-    <div class="" ng-show="url_contain('/dashboard/system_statistics')" ui-view="system_statistics"></div>
     <div class="" ng-show="url_contain('/dashboard/overview')" ui-view="overview"></div>
+    <div class="" ng-show="url_contain('/dashboard/system_statistics')" ui-view="system_statistics"></div>
 </div>
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/overview/overview.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/overview/overview.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/overview/overview.html	(working copy)
@@ -1,9 +1,76 @@
 <div class="row" ng-if="monitorOverview.enableMonitor">
+    <div class="col-md-9">
+        <div class="widget box-shadow" style="padding: 5px 0">
+            <div class="boxshadow-body">
+                <div class="col-md-4">
+                    <div class="col-md-5">
+                        <div class="info-icon">
+                            <i class="fa fa-bell"></i>
+                        </div>
+                    </div>
+                    <div class="col-md-7">
+                        <div style="float: left;">
+                            <span class="demonstration">{{'Total Alerts in 7 Days'|T}}</span>
+                            <span class="title-nub" ui-sref="index.monitoring.alerting.log({timeRange: '7d'})" style="cursor: pointer;">{{monitorOverview.alertingLogNum}}</span>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-md-4">
+                    <div class="col-md-5">
+                        <div class="info-icon">
+                            <i class="fa fa-volume-control-phone"></i>
+                        </div>
+                    </div>
+                    <div class="col-md-7">
+                        <div>
+                            <span class="demonstration">{{'Is Alerting'|T}}</span>
+                            <span class="title-nub" ui-sref="index.monitoring.alerting.rule.threshold({state: 'alerting'})" style="cursor: pointer;">{{monitorOverview.alertingNum}}</span>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-md-4">
+                    <div class="col-md-5">
+                        <div class="info-icon">
+                            <span class="fa-stack">
+                                <i class="fa fa-database fa-stack-1x"></i>
+                                <i class="fa fa-ban fa-stack-2x text-danger"></i>
+                            </span>
+                        </div>
+                    </div>
+                    <div class="col-md-7">
+                        <div>
+                            <span class="demonstration">{{'Insufficient Data'|T}}</span>
+                            <span class="title-nub" ui-sref="index.monitoring.alerting.rule.threshold({state: 'no_data'})" style="cursor: pointer;">{{monitorOverview.noDataNum}}</span>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="col-md-3">
+        <div class="widget box-shadow" style="padding: 5px 0">
+            <div class="boxshadow-body" style="">
+                <div class="col-md-4" style="padding-left: 0">
+                    <div class="info-icon">
+                        <i class="fa fa-flag"></i>
+                    </div>
+                </div>
+                <div class="col-md-8" style="padding-right: 0">
+                    <div style="float: left;">
+                        <span class="demonstration">{{'Total events in 7 Days'|T}}</span>
+                        <span class="title-nub" ui-sref="index.monitoring.event.query({timeRange: '7d'})" style="cursor: pointer;">{{monitorOverview.eventNum}}</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="row" ng-if="monitorOverview.enableMonitor" style="margin-bottom:15px">
     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 ng-scope">
         <ul class="nav nav-tabs">
-            <li ng-repeat="tab in monitorOverview.tabList" ng-class="{ active: tab.name == monitorOverview.tab }"
-                ng-click="monitorOverview.changeTab(tab.name)">
-                <a><span class="tab-header">{{ tab.verbose_name | T }}</span></a>
+            <li ng-repeat="tab in monitorOverview.tabList" ng-class="{ active: tab.name == monitorOverview.tab }" ng-click="monitorOverview.changeTab(tab.name)">
+                <a>{{ tab.verbose_name | T }}</a>
             </li>
         </ul>
     </div>
@@ -11,48 +78,36 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'CPU Usage' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'CPU Usage'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Device Name' | T}}</th>
-                            <th class="text-right">{{'Usage' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Device Name' | T}}</th>
+                                <th class="text-right">{{'Usage' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.deviceLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.deviceLists.cpuUsageList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td>
-                                <div class="col-pb">
-                                    <div class="list-0">
-                                        <div class="progress" title="{{item.cpu_usage}}%">
-                                            <div class="progress-bar progress-bar-info" role="progressbar"
-                                                 ng-style="monitorOverview.getPercent(item.cpu_usage)"
-                                                 aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
-                                                <span>{{item.cpu_usage}}%</span>
+                            <tr ng-show="monitorOverview.deviceLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.deviceLists.cpuUsageList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})"><a class="name">{{ item.name }}</a></td>
+                                <td>
+                                    <div class="col-pb">
+                                        <div class="list-0">
+                                            <div class="progress" title="{{item.cpu_usage}}%">
+                                                <div class="progress-bar progress-bar-info" role="progressbar" ng-style="monitorOverview.getPercent(item.cpu_usage)" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
+                                                    <span>{{item.cpu_usage}}%</span>
+                                                </div>
                                             </div>
                                         </div>
                                     </div>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr ng-if="monitorOverview.deviceLists.cpuUsageList.length == 0  && !monitorOverview.deviceLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                                </td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -61,49 +116,37 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Network Memory Usage' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                    </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Network Memory Usage'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="">
                     <div class="table-responsive">
                         <table class="table table-striped table-hover">
                             <thead>
-                            <tr>
-                                <th class="num">No.</th>
-                                <th class="name">{{'Device Name' | T}}</th>
-                                <th class="text-right">{{'Usage' | T}}</th>
-                            </tr>
+                                <tr>
+                                    <th class="num">No.</th>
+                                    <th class="name">{{'Device Name' | T}}</th>
+                                    <th class="text-right">{{'Usage' | T}}</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-show="monitorOverview.deviceLoading">
-                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                            </tr>
-                            <tr ng-repeat="item in monitorOverview.deviceLists.netMemUsageList">
-                                <td class="num">{{$index + 1}}</td>
-                                <td style="cursor: pointer;"
-                                    ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})">
-                                    <a class="name">{{ item.name}}</a></td>
-                                <td>
-                                    <div class="col-pb">
-                                        <div class="list-0">
-                                            <div class="progress" title="{{item.net_mem_usage}}%">
-                                                <div class="progress-bar progress-bar-info" role="progressbar"
-                                                     ng-style="monitorOverview.getPercent(item.net_mem_usage)"
-                                                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
-                                                    <span>{{item.net_mem_usage}}%</span>
+                                <tr ng-show="monitorOverview.deviceLoading">
+                                    <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                                </tr>
+                                <tr ng-repeat="item in monitorOverview.deviceLists.netMemUsageList">
+                                    <td class="num">{{$index + 1}}</td>
+                                    <td style="cursor: pointer;" ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})"><a class="name">{{ item.name}}</a></td>
+                                    <td>
+                                        <div class="col-pb">
+                                            <div class="list-0">
+                                                <div class="progress" title="{{item.net_mem_usage}}%">
+                                                    <div class="progress-bar progress-bar-info" role="progressbar" ng-style="monitorOverview.getPercent(item.net_mem_usage)" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
+                                                        <span>{{item.net_mem_usage}}%</span>
+                                                    </div>
                                                 </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </td>
-                            </tr>
-                            <tr ng-if="monitorOverview.deviceLists.netMemUsageList.length == 0 && !monitorOverview.deviceLoading">
-                                <td style="height: 48px;" colspan="5" class="text-center">
-                                    {{ 'No matching records found.' | T }}
-                                </td>
-                            </tr>
+                                    </td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>
@@ -113,39 +156,29 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                    </span>
+                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="">
                     <div class="table-responsive">
                         <table class="table table-striped table-hover">
                             <thead>
-                            <tr>
-                                <th class="num">No.</th>
-                                <th class="name">{{'Device Name' | T}}</th>
-                                <th>{{'Sent' | T}}</th>
-                                <th>{{'Received' | T}}</th>
-                            </tr>
+                                <tr>
+                                    <th class="num">No.</th>
+                                    <th class="name">{{'Device Name' | T}}</th>
+                                    <th>{{'Sent' | T}}</th>
+                                    <th>{{'Received' | T}}</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-show="monitorOverview.deviceLoading">
-                                <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                            </tr>
-                            <tr ng-repeat="item in monitorOverview.deviceLists.throughputList">
-                                <td class="num">{{$index + 1}}</td>
-                                <td style="cursor: pointer;"
-                                    ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})">
-                                    <a class="name">{{ item.name}}</a></td>
-                                <td><span class="label label-default">{{item.sent}}</span></td>
-                                <td><span class="label label-default">{{item.received}}</span></td>
-                            </tr>
-                            <tr ng-if="monitorOverview.deviceLists.throughputList.length == 0 && !monitorOverview.deviceLoading">
-                                <td style="height: 48px;" colspan="5" class="text-center">
-                                    {{ 'No matching records found.' | T }}
-                                </td>
-                            </tr>
+                                <tr ng-show="monitorOverview.deviceLoading">
+                                    <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                                </tr>
+                                <tr ng-repeat="item in monitorOverview.deviceLists.throughputList">
+                                    <td class="num">{{$index + 1}}</td>
+                                    <td style="cursor: pointer;" ui-sref="index.monitoring.resource.device.detail({name: item.name, type: item.type, id: item.id})"><a class="name">{{ item.name}}</a></td>
+                                    <td><span class="label label-default">{{item.sent}}</span></td>
+                                    <td><span class="label label-default">{{item.received}}</span></td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>
@@ -157,36 +190,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Hits Number' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                    </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Hits Number'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th class="text-right">{{'Hits' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th class="text-right">{{'Hits' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.vsLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.vsLists.hitsList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.hits}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.vsLists.hitsList.length == 0 && !monitorOverview.vsLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.vsLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.vsLists.hitsList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.hits}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -195,36 +218,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Open Connections' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Open Connections'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th class="text-right">{{'Connections' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th class="text-right">{{'Connections' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.vsLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.vsLists.connectionsList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.connections}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.vsLists.connectionsList.length == 0 && !monitorOverview.vsLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.vsLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.vsLists.connectionsList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.connections}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -233,39 +246,29 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="">
                     <div class="table-responsive">
                         <table class="table table-striped table-hover">
                             <thead>
-                            <tr>
-                                <th class="num">No.</th>
-                                <th class="name">{{'Service Name' | T}}</th>
-                                <th>{{'Sent' | T}}</th>
-                                <th>{{'Received' | T}}</th>
-                            </tr>
+                                <tr>
+                                    <th class="num">No.</th>
+                                    <th class="name">{{'Service Name' | T}}</th>
+                                    <th>{{'Sent' | T}}</th>
+                                    <th>{{'Received' | T}}</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-show="monitorOverview.vsLoading">
-                                <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                            </tr>
-                            <tr ng-repeat="item in monitorOverview.vsLists.SLBThroughputList">
-                                <td class="num">{{$index + 1}}</td>
-                                <td style="cursor: pointer;"
-                                    ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})">
-                                    <a class="name">{{ item.name }}</a></td>
-                                <td><span class="label label-default">{{item.sent}}</span></td>
-                                <td><span class="label label-default">{{item.received}}</span></td>
-                            </tr>
-                            <tr ng-if="monitorOverview.vsLists.SLBThroughputList.length == 0 && !monitorOverview.vsLoading">
-                                <td style="height: 48px;" colspan="5" class="text-center">
-                                    {{ 'No matching records found.' | T }}
-                                </td>
-                            </tr>
+                                <tr ng-show="monitorOverview.vsLoading">
+                                    <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                                </tr>
+                                <tr ng-repeat="item in monitorOverview.vsLists.SLBThroughputList">
+                                    <td class="num">{{$index + 1}}</td>
+                                    <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.virtual_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_vs'})"><a class="name">{{ item.name }}</a></td>
+                                    <td><span class="label label-default">{{item.sent}}</span></td>
+                                    <td><span class="label label-default">{{item.received}}</span></td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>
@@ -277,36 +280,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Outstanding Requests' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Outstanding Requests'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th class="text-right">{{'Requests' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th class="text-right">{{'Requests' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.rsLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.rsLists.rsCntOfReqList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.requests}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.rsLists.rsCntOfReqList.length == 0 && !monitorOverview.rsLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.rsLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.rsLists.rsCntOfReqList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.requests}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -315,36 +308,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Connections Per Second' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Connections Per Second'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th class="text-right">{{'Connections' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th class="text-right">{{'Connections' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.rsLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.rsLists.rsConnPerSecList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.connections}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.rsLists.rsConnPerSecList.length == 0 && !monitorOverview.rsLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.rsLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.rsLists.rsConnPerSecList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.connections}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -353,39 +336,29 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                    </span>
+                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Network Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="">
                     <div class="table-responsive">
                         <table class="table table-striped table-hover">
                             <thead>
-                            <tr>
-                                <th class="num">No.</th>
-                                <th class="name">{{'Service Name' | T}}</th>
-                                <th>{{'Sent' | T}}</th>
-                                <th>{{'Received' | T}}</th>
-                            </tr>
+                                <tr>
+                                    <th class="num">No.</th>
+                                    <th class="name">{{'Service Name' | T}}</th>
+                                    <th>{{'Sent' | T}}</th>
+                                    <th>{{'Received' | T}}</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-show="monitorOverview.rsLoading">
-                                <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                            </tr>
-                            <tr ng-repeat="item in monitorOverview.rsLists.throughputList">
-                                <td class="num">{{$index + 1}}</td>
-                                <td style="cursor: pointer;"
-                                    ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})">
-                                    <a class="name">{{ item.name }}</a></td>
-                                <td><span class="label label-default">{{item.sent}}</span></td>
-                                <td><span class="label label-default">{{item.received}}</span></td>
-                            </tr>
-                            <tr ng-if="monitorOverview.rsLists.throughputList.length == 0 && !monitorOverview.rsLoading">
-                                <td style="height: 48px;" colspan="5" class="text-center">
-                                    {{ 'No matching records found.' | T }}
-                                </td>
-                            </tr>
+                                <tr ng-show="monitorOverview.rsLoading">
+                                    <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                                </tr>
+                                <tr ng-repeat="item in monitorOverview.rsLists.throughputList">
+                                    <td class="num">{{$index + 1}}</td>
+                                    <td style="cursor: pointer;" ui-sref="index.monitoring.resource.slb.real_service.detail({name: item.name, device_ip: item.device_ip, origin_type: 'SLB_rs'})"><a class="name">{{ item.name }}</a></td>
+                                    <td><span class="label label-default">{{item.sent}}</span></td>
+                                    <td><span class="label label-default">{{item.received}}</span></td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>
@@ -397,36 +370,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Sessions Number' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Sessions Number'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th class="text-right">{{'Sessions' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th class="text-right">{{'Sessions' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.sslvpnLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.sslvpnLists.sessionList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.active_sessions}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.sslvpnLists.sessionList.length == 0 && !monitorOverview.sslvpnLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.sslvpnLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.sslvpnLists.sessionList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.active_sessions}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -435,38 +398,28 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Client Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Client Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th>{{'Sent' | T}}</th>
-                            <th>{{'Received' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th>{{'Sent' | T}}</th>
+                                <th>{{'Received' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.sslvpnLoading">
-                            <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.sslvpnLists.clientThroughputList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.sent}}</span></td>
-                            <td><span class="label label-default">{{item.received}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.sslvpnLists.clientThroughputList.length == 0 && !monitorOverview.sslvpnLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.sslvpnLoading">
+                                <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.sslvpnLists.clientThroughputList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.sent}}</span></td>
+                                <td><span class="label label-default">{{item.received}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -475,38 +428,28 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Server Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                    </span>
+                    <i class="fa fa-signal fa-fw"></i>&nbsp;{{'Server Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Service Name' | T}}</th>
-                            <th>{{'Sent' | T}}</th>
-                            <th>{{'Received' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Service Name' | T}}</th>
+                                <th>{{'Sent' | T}}</th>
+                                <th>{{'Received' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.sslvpnLoading">
-                            <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.sslvpnLists.ServerThroughputList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;"
-                                ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})">
-                                <a class="name">{{ item.name }}</a></td>
-                            <td><span class="label label-default">{{item.sent}}</span></td>
-                            <td><span class="label label-default">{{item.received}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.sslvpnLists.ServerThroughputList.length == 0 && !monitorOverview.sslvpnLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.sslvpnLoading">
+                                <td colspan="4" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.sslvpnLists.ServerThroughputList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.sslvpn.detail({name: item.name, device_ip: item.device_ip})"><a class="name">{{ item.name }}</a></td>
+                                <td><span class="label label-default">{{item.sent}}</span></td>
+                                <td><span class="label label-default">{{item.received}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -517,35 +460,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Hits Number' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Hits Number'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Link Name' | T}}</th>
-                            <th class="text-right">{{'Hits' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Link Name' | T}}</th>
+                                <th class="text-right">{{'Hits' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.llbLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.llbLists.hitsList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a
-                                class="name">{{ item[2] }}</a></td>
-                            <td><span class="label label-default">{{item[1]}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.llbLists.hitsList.length == 0 && !monitorOverview.llbLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.llbLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.llbLists.hitsList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a class="name">{{ item[2] }}</a></td>
+                                <td><span class="label label-default">{{item[1]}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -554,35 +488,26 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Open Connections' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Open Connections'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th class="num">No.</th>
-                            <th class="name">{{'Link Name' | T}}</th>
-                            <th class="text-right">{{'Connections' | T}}</th>
-                        </tr>
+                            <tr>
+                                <th class="num">No.</th>
+                                <th class="name">{{'Link Name' | T}}</th>
+                                <th class="text-right">{{'Connections' | T}}</th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.llbLoading">
-                            <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in monitorOverview.llbLists.connectionsList">
-                            <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a
-                                class="name">{{ item[2] }}</a></td>
-                            <td><span class="label label-default">{{item[1]}}</span></td>
-                        </tr>
-                        <tr ng-if="monitorOverview.llbLists.connectionsList.length == 0 && !monitorOverview.llbLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.llbLoading">
+                                <td colspan="3" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in monitorOverview.llbLists.connectionsList">
+                                <td class="num">{{$index + 1}}</td>
+                                <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a class="name">{{ item[2] }}</a></td>
+                                <td><span class="label label-default">{{item[1]}}</span></td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -591,10 +516,7 @@
         <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">
-                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Network Throughput' | T}} <span
-                        class="pull-right">{{'Top 5' | T}}</span>
-                        </span>
+                    <i class="fa fa-signal fa-fw" aria-hidden="true"></i>&nbsp;{{'Network Throughput'|T}} <span class="pull-right">{{'Top 5' | T}}</span>
                 </div>
                 <div class="table-responsive">
                     <table class="table table-striped table-hover">
@@ -612,16 +534,10 @@
                         </tr>
                         <tr ng-repeat="item in monitorOverview.llbLists.throughputList">
                             <td class="num">{{$index + 1}}</td>
-                            <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a
-                                class="name">{{ item[4] }}</a></td>
+                            <td style="cursor: pointer;" ui-sref="index.monitoring.resource.llb"><a class="name">{{ item[4] }}</a></td>
                             <td><span class="label label-default">{{item[3]}}</span></td>
                             <td><span class="label label-default">{{item[2]}}</span></td>
                         </tr>
-                        <tr ng-if="monitorOverview.llbLists.throughputList.length == 0 && !monitorOverview.llbLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
                         </tbody>
                     </table>
                 </div>
@@ -631,51 +547,51 @@
 </div>
 
 <div class="row" ng-if="monitorOverview.enableAudit">
-    <div class="col-md-12">
-        <div class="widget">
-            <div class="widget-header">
-                <span class="tab-header-1">{{'Auditing Log Data' | T}}</span>
-                <select class="pull-right audit-log-drop-down" ng-model="monitorOverview.auditRange"
-                        ng-change="monitorOverview.getAuditingData()">
-                    <option value="15m">{{ 'Last 15 minutes' | T}}</option>
-                    <option value="1h">{{'Last 1 hour' | T}}</option>
-                    <option value='24h'>{{'Last 24 hours' | T}}</option>
-                    <option value='7d'>{{'Last 7 days' | T}}</option>
-                    <option value='30d'>{{'Last 30 days' | T}}</option>
-                </select>
+    <div class="col-md-12 widget">
+        <div class="widget-header">
+            <span>{{'Auditing Log Data'|T}}</span>
+            <select class="pull-right" ng-model="monitorOverview.auditRange" ng-change="monitorOverview.getAuditingData()">
+                <option value="15m">{{ 'Last 15 minutes' |T}}</option>
+                <option value="1h">{{'Last 1 hour'|T}}</option>
+                <option value='24h'>{{'Last 24 hours'|T}}</option>
+                <option value='7d'>{{'Last 7 days'|T}}</option>
+                <option value='30d'>{{'Last 30 days'|T}}</option>
+            </select>
+        </div>
+        <div class="col-md-8">
+            <div class="graph-container">
+                <div class="" style="height:260px" discover-monitoring="monitorOverview.auditWidget"></div>
             </div>
         </div>
-        <div class="col-md-12">
+        <div class="col-md-4">
             <div class="table-container" st-table="displayedCollection" st-safe-src="monitorOverview.auditList">
-                <div class="table-responsive table-content" style="height:300px">
+                <div class="table-responsive table-content" style="height:260px">
                     <table class="table table-striped table-hover">
                         <thead>
-                        <tr>
-                            <th>{{ 'Time' | T }}</th>
-                            <th>{{ 'Device Type' | T }}</th>
-                            <th>{{ 'Device IP' | T }}</th>
-                            <th>{{ 'LogID' | T }}</th>
-                            <th>{{ 'Severity' | T }}</th>
-                            <th></th>
-                        </tr>
+                            <tr>
+                                <th>{{ 'Time' | T }}</th>
+                                <th>{{ 'Device IP' | T }}</th>
+                                <th>{{ 'LogID' | T }}</th>
+                                <th>{{ 'Severity' | T }}</th>
+                                <th></th>
+                            </tr>
                         </thead>
                         <tbody>
-                        <tr ng-show="monitorOverview.auditLoading">
-                            <td colspan="5" class="text-center"><img src="app/images/loading-h2.gif"></td>
-                        </tr>
-                        <tr ng-repeat="item in displayedCollection">
-                            <td>{{ item.time }}</td>
-                            <td>{{ item.tag.device_type }}</td>
-                            <td>{{ item.tag.remote_ip }}</td>
-                            <td>{{ item.tag.logid }}</td>
-                            <td>{{ item.tag.severity }}</td>
-                            <td><i class="fa fa-info-circle" title="{{item.source}}"></i></td>
-                        </tr>
-                        <tr ng-if="displayedCollection.length == 0 && !monitorOverview.auditLoading">
-                            <td style="height: 48px;" colspan="5" class="text-center">
-                                {{ 'No matching records found.' | T }}
-                            </td>
-                        </tr>
+                            <tr ng-show="monitorOverview.auditLoading">
+                                <td colspan="5" class="text-center"><img src="app/images/loading-h2.gif"></td>
+                            </tr>
+                            <tr ng-repeat="item in displayedCollection">
+                                <td>{{ item.time }}</td>
+                                <td>{{ item.tag.remote_ip }}</td>
+                                <td>{{ item.tag.logid }}</td>
+                                <td>{{ item.tag.severity }}</td>
+                                <td>
+                                    <i class="fa fa-info-circle" title="{{item.source}}"></i>
+                                </td>
+                            </tr>
+                            <tr ng-if="displayedCollection.length == 0">
+                                <td style="height: 48px;" colspan="5" class="text-center">{{ 'No related auditing log' | T }}</td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
@@ -688,8 +604,8 @@
 <style>
     .demonstration {
         display: block;
-        color: #222f31;
-        font-size: 14px;
+        color: #56a0ca;
+        font-size: 13px;
         line-height: 25px;
     }
 
@@ -712,8 +628,7 @@
         line-height: 60px;
         font-size: 26px;
     }
-
-    .audit-log-drop-down {
-        margin-top: 8px;
-    }
 </style>
+
+
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.controller.js	(working copy)
@@ -16,9 +16,7 @@
         '$stateParams',
         '$uibModal',
         'roleMgmtService',
-        'alertService',
-        'timeService',
-        function ($scope, $q, $rootScope, $location, $filter, $state, $interval, dashboardService, deviceService, localStorageService, taskService, storageService, $stateParams, $uibModal, roleMgmtService, alertService, timeService) {
+        function ($scope, $q, $rootScope, $location, $filter, $state, $interval, dashboardService, deviceService, localStorageService, taskService, storageService, $stateParams, $uibModal, roleMgmtService) {
             $rootScope.title = "Dashboard";
             $scope.allow_config = $rootScope.allow_config;
             $scope.role_info = localStorageService.getWebStorage('role_info');
@@ -29,9 +27,6 @@
             dashboard.serviceNum = 'N/A';
             dashboard.taskNum = 'N/A';
 
-            dashboard.alertingNum = 0;
-            dashboard.eventNum = 0;
-
             dashboard.go = function (url) {
                 $state.go(url);
             };
@@ -302,45 +297,20 @@
 
             var device_type_info = localStorageService.getWebStorage("device_type_info");
             var getNubData = function () {
-                let alertingNum = 0;
-                alertService.getAlertList("?page_size=-1&type=threshold").then(function (resp) {
-                    if (resp && resp.status === 200) {
-                        if (resp.data.code === 0) {
-                            var rulesList = resp.data.data.data;
-                            _.each(rulesList, function (rule) {
-                                if (rule.state === "alerting") {
-                                    alertingNum++;
-                                }
-                            })
-                            dashboard.alertingNum = alertingNum;
-                        }
-                    }
-                })
-
-                let eventNum = 0;
-                let now = new Date();
-                let start = new Date();
-                start.setTime(now.getTime() - timeService.parseDuration('7d'));
-                let payload = {
-                    "action": "get_quantity_from_event_deduction",
-                    "query": {
-                        "start_time": start * 1e6,
-                        "end_time": now * 1e6,
-                    }
-                }
-                dashboardService.composer_query(payload).then(function (res) {
-                    eventNum = 0;
-                    if (res && res.status === 200) {
-                        if (res.data.results) {
-                            if (res.data.results[0].series) {
-                                _.each(res.data.results[0].series, function (series) {
-                                    eventNum = series.values[0][1];
-                                })
-                            }
-                        }
-                        dashboard.eventNum = eventNum;
-                    }
-                });
+                // if (alertService) {
+                //     dashboard.alertStatus = true
+                //     alertService.getAlertList("?page_size=-1").then(function (resp) {
+                //         var alertNum = 0;
+                //         if (resp && resp.status === 200 && resp.data) {
+                //             _.each(resp.data.data.data, function (alert) {
+                //                 if ((alert.state != 'ok') && (alert.state != 'paused')) {
+                //                     alertNum++
+                //                 }
+                //             })
+                //         }
+                //         dashboard.alertNum = alertNum;
+                //     });
+                // }
 
                 if (dashboard.get_loading()) {
                     dashboard.serviceList = [];
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/dashboard/system_statistics/system_statistics.html	(working copy)
@@ -2,106 +2,60 @@
     <div class="col-md-12">
         <div class="widget box-shadow" style="padding: 5px 0">
             <div class="boxshadow-body">
-                <div class="col-md-1"></div>
-                <div class="col-md-2">
-                    <div class="col-md-4">
-                        <div class="icons-row">
-                            <?xml version="1.0" encoding="utf-8"?>
-                            <svg class="svg-link-icon" ng-click="systemStatistics.go('index.device')" id="Layer_1"
-                                 x="0px" y="0px" viewBox="0 0 117.93 122.88"
-                                 style="enable-background:new 0 0 117.93 122.88" xml:space="preserve"><style type="text/css">.st0 {
-                                fill-rule: evenodd;
-                                clip-rule: evenodd;
-                            }</style>
-                                <g><path class="st0" d="M8.1,0h101.74c2.88,0,5.23,2.36,5.23,5.23v28.41c0,2.88-2.36,5.23-5.23,5.23l-15.27,0v5.35h15.27 c2.88,0,5.23,2.36,5.23,5.23v28.41c0,2.88-2.36,5.23-5.23,5.23H94.57v15.18h7.85v7.83h15.51v9h-15.51v7.76l-24.69,0v-7.76l-35.9,0 v7.76l-24.69,0v-7.76l-17.14,0v-9h17.14v-7.83h7.84V83.11H8.1c-2.88,0-5.23-2.36-5.23-5.23V49.46c0-2.88,2.35-5.23,5.23-5.23h16.88 v-5.35H8.1c-2.88,0-5.23-2.36-5.23-5.23l0-28.41C2.86,2.35,5.22,0,8.1,0L8.1,0z M15.85,55.93h5.98V71.4h-5.98V55.93L15.85,55.93z M97.99,14.7c2.62,0,4.74,2.12,4.74,4.74c0,2.62-2.12,4.74-4.74,4.74c-2.62,0-4.74-2.12-4.74-4.74 C93.25,16.82,95.37,14.7,97.99,14.7L97.99,14.7z M79.94,14.7c2.62,0,4.74,2.12,4.74,4.74c0,2.62-2.12,4.74-4.74,4.74 c-2.62,0-4.74-2.12-4.74-4.74C75.2,16.82,77.33,14.7,79.94,14.7L79.94,14.7z M48.89,11.7h5.98v15.47h-5.98V11.7L48.89,11.7z M32.37,11.7h5.98v15.47h-5.98V11.7L32.37,11.7z M15.85,11.7h5.98v15.47h-5.98V11.7L15.85,11.7z M97.99,58.93 c2.62,0,4.74,2.12,4.74,4.74c0,2.62-2.12,4.74-4.74,4.74c-2.62,0-4.74-2.12-4.74-4.74C93.25,61.05,95.37,58.93,97.99,58.93 L97.99,58.93z M79.94,58.93c2.62,0,4.74,2.12,4.74,4.74c0,2.62-2.12,4.74-4.74,4.74c-2.62,0-4.74-2.12-4.74-4.74 C75.2,61.05,77.33,58.93,79.94,58.93L79.94,58.93z M48.89,55.93h5.98V71.4h-5.98V55.93L48.89,55.93z M32.37,55.93h5.98V71.4h-5.98 V55.93L32.37,55.93z M90.07,104.98c3.1,0,5.61,2.51,5.61,5.61c0,3.1-2.51,5.61-5.61,5.61c-3.1,0-5.61-2.51-5.61-5.61 S86.98,104.98,90.07,104.98L90.07,104.98z M29.48,104.98c3.1,0,5.61,2.51,5.61,5.61c0,3.1-2.51,5.61-5.61,5.61 c-3.1,0-5.61-2.51-5.61-5.61S26.39,104.98,29.48,104.98L29.48,104.98z M41.83,106.12h35.9v-7.83l7.84,0V83.11H33.98v15.18h7.85 L41.83,106.12L41.83,106.12L41.83,106.12z M33.98,44.23h51.59v-5.35H33.98V44.23L33.98,44.23z"/></g></svg>
+                <div class="col-md-4">
+                    <div class="col-md-6">
+                        <div class="info-icon">
+                            <i class="fa fa-arraydevice"></i>
                         </div>
                     </div>
-                    <div class="col-md-8">
+                    <div class="col-md-6">
                         <div style="float: left;">
-                            <span class="demonstration">{{'Devices' | T}}</span>
-                            <span class="title-nub" ng-click="systemStatistics.go('index.device')"
-                                  style="cursor: pointer;">{{systemStatistics.deviceNum}}</span>
+                            <span class="demonstration">{{'Devices'|T}}</span>
+                            <span class="title-nub" ng-click="systemStatistics.go('index.device')" style="cursor: pointer;">{{systemStatistics.deviceNum}}</span>
                         </div>
                     </div>
                 </div>
-                <div class="col-md-2">
-                    <div class="col-md-4">
-                        <div class="icons-row">
-                            <?xml version="1.0" encoding="utf-8"?>
-                            <svg class="svg-link-icon" ng-click="systemStatistics.go('index.slb_topology')" id="Layer_2"
-                                 x="0px" y="0px" viewBox="0 0 122.88 97.62"
-                                 style="enable-background:new 0 0 122.88 97.62" xml:space="preserve"><g><path d="M90.51,64.82c-0.39-0.27-0.83-0.39-1.28-0.3c-0.45,0.09-0.83,0.33-1.1,0.71l-1.52,2.14c-0.54-0.24-1.1-0.42-1.7-0.57 c-0.6-0.15-1.16-0.27-1.76-0.36l-0.48-2.8c-0.09-0.48-0.33-0.83-0.68-1.1c-0.39-0.27-0.8-0.36-1.28-0.27l-3.51,0.63 c-0.45,0.09-0.8,0.3-1.1,0.69c-0.27,0.39-0.39,0.8-0.3,1.28l0.45,2.56c-0.57,0.24-1.1,0.51-1.61,0.83 c-0.51,0.3-1.01,0.66-1.46,1.01l-2.38-1.64c-0.39-0.27-0.8-0.39-1.25-0.3c-0.45,0.09-0.83,0.33-1.1,0.72l-2.03,2.89 c-0.27,0.39-0.39,0.83-0.3,1.28c0.09,0.48,0.33,0.83,0.72,1.1l2.14,1.52c-0.24,0.54-0.42,1.1-0.57,1.7 c-0.15,0.6-0.27,1.16-0.36,1.76l-2.8,0.48c-0.48,0.09-0.83,0.33-1.1,0.68c-0.27,0.39-0.36,0.8-0.27,1.28l0.63,3.51 c0.09,0.45,0.3,0.8,0.68,1.1c0.39,0.27,0.8,0.39,1.28,0.3l2.56-0.45c0.24,0.57,0.51,1.1,0.83,1.61c0.3,0.51,0.66,1.01,1.01,1.49 l-1.64,2.35c-0.27,0.39-0.39,0.8-0.3,1.25c0.09,0.45,0.33,0.83,0.71,1.1l2.92,2.05c0.39,0.27,0.83,0.36,1.28,0.27 c0.45-0.09,0.83-0.3,1.13-0.68l1.52-2.17c0.54,0.24,1.1,0.42,1.7,0.57c0.6,0.15,1.16,0.27,1.76,0.36l0.48,2.8 c0.09,0.48,0.33,0.83,0.68,1.1c0.39,0.27,0.8,0.36,1.28,0.27l3.51-0.63c0.45-0.09,0.8-0.3,1.1-0.68c0.27-0.39,0.39-0.8,0.3-1.28 l-0.45-2.56c0.57-0.24,1.1-0.51,1.61-0.83c0.51-0.3,1.01-0.65,1.49-1.01l2.35,1.64c0.39,0.27,0.8,0.39,1.28,0.3 c0.48-0.09,0.83-0.33,1.1-0.71l2.05-2.92c0.27-0.39,0.36-0.83,0.27-1.28c-0.09-0.45-0.3-0.83-0.69-1.13l-2.17-1.49 c0.24-0.54,0.42-1.1,0.57-1.7c0.15-0.6,0.27-1.16,0.36-1.76l2.8-0.48c0.48-0.09,0.83-0.33,1.1-0.69c0.27-0.39,0.36-0.8,0.27-1.28 l-0.63-3.51c-0.09-0.45-0.3-0.8-0.68-1.1c-0.39-0.27-0.8-0.39-1.28-0.3l-2.56,0.45c-0.24-0.54-0.51-1.07-0.83-1.61 c-0.3-0.54-0.66-1.01-1.01-1.46l1.64-2.38c0.27-0.39,0.39-0.8,0.3-1.25c-0.09-0.45-0.33-0.83-0.71-1.1l-2.89-2.03L90.51,64.82 L90.51,64.82z M116.92,55.13l-6.52,0.06c-0.95,0.01-1.72-0.76-1.73-1.71c-0.01-0.95,0.76-1.72,1.7-1.73l10.73-0.11h0.01l0.04,0 h0.01l0.04,0l0.01,0l0.04,0l0.01,0l0.04,0l0.01,0l0.04,0l0.01,0l0.04,0.01l0.01,0l0.04,0.01l0.01,0l0.04,0.01l0.01,0l0.03,0.01 l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0 l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0 l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0 l0.03,0.02l0.01,0.01l0.02,0.02l0.01,0.01l0.02,0.02l0,0l0.02,0.02l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01 l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01 l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0.01,0.03l0,0.01l0,0.01 l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.04l0,0.01l0.01,0.04l0,0.01 l0.01,0.04l0,0.01l0.01,0.04l0,0.04l0,0.01l0,0.04l0,0.01l0,0.04v0.01l0,0.04v0.01l0.05,11.09c0,0.95-0.76,1.72-1.71,1.73 c-0.95,0-1.72-0.76-1.72-1.71l-0.03-6.96l-6.3,6.3c-0.67,0.67-1.77,0.67-2.44,0s-0.67-1.77,0-2.44L116.92,55.13L116.92,55.13z M57.64,3.48l-6.52,0.06c-0.95,0.01-1.72-0.76-1.73-1.7c-0.01-0.95,0.76-1.72,1.71-1.73L61.83,0h0.01l0.04,0h0.01l0.04,0l0.01,0 l0.04,0l0.01,0l0.04,0l0.01,0l0.04,0l0.01,0l0.04,0.01l0.01,0l0.04,0.01l0.01,0l0.04,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01 l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0l0.03,0.01l0.01,0 l0.03,0.01l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0 l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0l0.03,0.02l0.01,0.01 l0.02,0.02l0.01,0.01l0.02,0.02l0,0.01l0.02,0.02l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01 l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01l0.02,0.03l0,0.01 l0.02,0.03l0,0.01L63.4,1l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0.01,0.03l0,0.01l0,0.01l0.01,0.03l0,0.01l0.01,0.03 l0,0.01l0.01,0.03l0,0.01l0.01,0.03l0,0.01l0.01,0.04l0,0.01l0.01,0.04l0,0.01l0.01,0.04l0,0.01l0.01,0.04l0,0.01l0,0.04l0,0.04 l0,0.01l0,0.04l0,0.01l0,0.04v0.01l0,0.04v0.01l0.05,11.09c0,0.95-0.76,1.72-1.71,1.72c-0.95,0-1.72-0.76-1.72-1.71l-0.03-6.96 l-6.3,6.3c-0.67,0.67-1.77,0.67-2.44,0c-0.67-0.67-0.67-1.77,0-2.44L57.64,3.48L57.64,3.48z M97.49,17.76l-12.13,0.12 c-1.42,0.01-2.58-1.13-2.59-2.55c-0.01-1.42,1.13-2.58,2.55-2.59l18.43-0.18h0.01l0.06,0l0.01,0l0.06,0l0.01,0l0.06,0l0.01,0 l0.06,0l0.01,0l0.05,0.01l0.01,0l0.05,0.01l0.01,0l0.05,0.01l0.01,0l0.05,0.01l0.01,0l0.05,0.01l0.01,0l0.05,0.01l0.01,0l0.05,0.01 l0.01,0l0.05,0.01l0.01,0l0.05,0.02l0.01,0l0.05,0.02l0.01,0l0.05,0.02l0.01,0l0.05,0.02l0.01,0l0.05,0.02l0.01,0l0.05,0.02l0.01,0 l0.05,0.02l0.01,0l0.05,0.02l0.01,0.01l0.05,0.02l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01 l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01l0.04,0.03l0.01,0.01 l0.04,0.03l0.01,0.01l0.04,0.04l0.01,0.01l0.04,0.04l0.01,0.01l0.04,0.04l0.01,0.01l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01 l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01l0.03,0.04l0.01,0.01 l0.03,0.04l0,0.01l0.03,0.05l0,0.01l0.03,0.05l0.02,0.05l0,0.01l0.02,0.05l0,0.01l0.02,0.05l0,0.01l0.02,0.05l0,0.01l0.02,0.05 l0,0.01l0.02,0.05l0,0.01l0.02,0.05l0,0.01l0.02,0.05l0,0.01l0.01,0.05l0,0.01l0.01,0.05l0,0.01l0.01,0.05l0,0.01l0.01,0.06 l0.01,0.05l0,0.01l0.01,0.05l0,0.01l0.01,0.05l0,0.01l0.01,0.06l0,0.01l0,0.06l0,0.01l0,0.07l0,0.06v0.01l0.08,18.69 c0.01,1.42-1.14,2.57-2.56,2.58c-1.42,0.01-2.57-1.14-2.58-2.56l-0.05-12.51L83.41,39.14c-1.01,1.01-2.64,1.01-3.65,0 c-1.01-1.01-1.01-2.64,0-3.65L97.49,17.76L97.49,17.76z M80.29,73.1c0.92-0.15,1.85-0.15,2.77,0.06c0.89,0.21,1.7,0.57,2.44,1.07 c0.71,0.51,1.34,1.16,1.85,1.94c0.51,0.77,0.83,1.64,0.98,2.56c0.15,0.92,0.15,1.85-0.06,2.77c-0.21,0.89-0.57,1.7-1.07,2.44 c-0.51,0.71-1.16,1.34-1.94,1.85c-0.77,0.51-1.64,0.83-2.56,0.98c-0.92,0.15-1.85,0.15-2.77-0.06c-0.89-0.21-1.7-0.57-2.44-1.07 c-0.71-0.51-1.34-1.16-1.85-1.94c-0.51-0.77-0.83-1.64-0.98-2.56c-0.15-0.92-0.15-1.85,0.06-2.77c0.21-0.89,0.57-1.7,1.07-2.44 c0.51-0.71,1.16-1.34,1.94-1.85C78.51,73.58,79.37,73.25,80.29,73.1L80.29,73.1z M53.25,31.35c-0.15-0.15-0.27-0.24-0.42-0.3 c-0.12-0.06-0.27-0.09-0.45-0.09c-0.18,0-0.33,0.03-0.45,0.09c-0.12,0.06-0.27,0.15-0.39,0.27l-0.03,0.03l-3.37,3.37 c-0.66,0.66-1.7,0.74-2.44,0.21c-0.39-0.24-0.77-0.48-1.22-0.71c-0.48-0.24-0.92-0.48-1.34-0.69c-0.45-0.21-0.92-0.42-1.4-0.6 c-0.42-0.15-0.89-0.33-1.46-0.51c-0.8-0.27-1.31-1.01-1.31-1.82v-5.15c0-0.18-0.03-0.36-0.09-0.48c-0.06-0.12-0.15-0.27-0.27-0.36 c-0.12-0.12-0.24-0.21-0.36-0.27c-0.12-0.06-0.3-0.09-0.48-0.09H31.3c-0.18,0-0.33,0.03-0.45,0.06c-0.12,0.06-0.27,0.15-0.42,0.3 c-0.12,0.12-0.21,0.24-0.24,0.36c-0.06,0.12-0.09,0.3-0.09,0.48v4.74c0,0.95-0.69,1.73-1.58,1.91c-0.51,0.12-0.98,0.24-1.4,0.36 c-0.48,0.15-0.92,0.3-1.4,0.48c-0.45,0.18-0.92,0.36-1.37,0.6c-0.48,0.21-0.89,0.45-1.31,0.66c-0.77,0.42-1.67,0.27-2.26-0.33 l-3.72-3.69c-0.03-0.03-0.03-0.03-0.03-0.06c-0.12-0.12-0.24-0.21-0.36-0.27c-0.12-0.06-0.24-0.06-0.42-0.06 c-0.18,0-0.33,0.03-0.45,0.09c-0.15,0.06-0.27,0.15-0.42,0.3l-4.53,4.56c-0.15,0.15-0.24,0.27-0.3,0.42 c-0.06,0.12-0.09,0.27-0.09,0.45c0,0.18,0.03,0.33,0.09,0.45c0.06,0.12,0.15,0.27,0.27,0.39v0.03l3.37,3.37 c0.65,0.65,0.74,1.7,0.21,2.44c-0.24,0.39-0.48,0.77-0.71,1.22c-0.24,0.48-0.48,0.92-0.69,1.34c-0.21,0.45-0.42,0.92-0.6,1.4 c-0.15,0.42-0.33,0.89-0.51,1.46c-0.27,0.8-1.01,1.31-1.82,1.31H4.94c-0.18,0-0.36,0.03-0.48,0.09c-0.12,0.06-0.24,0.15-0.36,0.24 c-0.12,0.12-0.21,0.24-0.24,0.36c-0.06,0.12-0.09,0.3-0.09,0.48v6.49c0,0.18,0.03,0.33,0.06,0.45c0.06,0.12,0.15,0.27,0.3,0.42 c0.12,0.12,0.24,0.21,0.36,0.24c0.12,0.06,0.3,0.09,0.48,0.09h4.74c0.95,0,1.73,0.68,1.91,1.58c0.12,0.51,0.24,0.98,0.36,1.37 c0.15,0.48,0.3,0.95,0.48,1.43c0.18,0.45,0.36,0.92,0.6,1.4c0.24,0.51,0.45,0.95,0.66,1.37c0.39,0.77,0.24,1.67-0.36,2.23 l-3.69,3.66L9.62,70.9c-0.12,0.12-0.21,0.24-0.27,0.36c-0.06,0.12-0.06,0.24-0.06,0.42c0,0.18,0.03,0.33,0.09,0.45 c0.06,0.15,0.15,0.3,0.3,0.42l4.5,4.56c0.12,0.12,0.27,0.21,0.42,0.27c0.15,0.06,0.3,0.09,0.48,0.09c0.18,0,0.36-0.03,0.51-0.09 c0.12-0.06,0.27-0.15,0.39-0.24l3.34-3.4c0.66-0.69,1.7-0.74,2.44-0.24c0.39,0.24,0.77,0.48,1.22,0.71 c0.48,0.24,0.92,0.48,1.34,0.68c0.45,0.21,0.92,0.42,1.4,0.6c0.42,0.15,0.89,0.33,1.46,0.51c0.8,0.27,1.31,1.01,1.31,1.82v5.15 c0,0.18,0.03,0.36,0.09,0.48c0.06,0.12,0.15,0.27,0.24,0.36c0.24,0.24,0.51,0.33,0.86,0.33h6.49c0.18,0,0.33-0.03,0.45-0.06 c0.12-0.06,0.27-0.15,0.42-0.3c0.12-0.12,0.21-0.24,0.24-0.36c0.06-0.12,0.09-0.3,0.09-0.48v-4.74c0-0.95,0.69-1.73,1.58-1.91 c0.51-0.12,0.98-0.24,1.4-0.36c0.48-0.15,0.92-0.3,1.4-0.48c0.45-0.18,0.92-0.36,1.4-0.6c0.51-0.24,0.95-0.45,1.37-0.66 c0.77-0.39,1.67-0.24,2.23,0.36l3.66,3.69l0.03,0.03c0.12,0.12,0.24,0.21,0.36,0.27c0.12,0.06,0.27,0.06,0.45,0.06 s0.33-0.03,0.45-0.09c0.12-0.06,0.24-0.15,0.36-0.27c0.03-0.03,0.06-0.06,0.09-0.06l4.53-4.47c0.12-0.12,0.21-0.27,0.27-0.42 c0.06-0.15,0.09-0.3,0.09-0.48c0-0.18-0.03-0.36-0.09-0.51c-0.06-0.12-0.15-0.27-0.24-0.39l-3.4-3.34 c-0.69-0.65-0.74-1.7-0.24-2.44c0.24-0.39,0.48-0.77,0.71-1.22c0.24-0.48,0.48-0.92,0.69-1.34c0.21-0.45,0.42-0.92,0.6-1.4 c0.15-0.42,0.33-0.89,0.51-1.46c0.27-0.8,1.01-1.31,1.82-1.31h5.15c0.18,0,0.36-0.03,0.48-0.09c0.12-0.06,0.27-0.15,0.36-0.24 c0.24-0.24,0.33-0.51,0.33-0.86v-6.49c0-0.18-0.03-0.33-0.06-0.45c-0.06-0.12-0.15-0.27-0.3-0.42c-0.12-0.12-0.24-0.21-0.36-0.24 c-0.12-0.06-0.3-0.09-0.48-0.09h-4.74c-0.95,0-1.76-0.71-1.91-1.61c-0.12-0.42-0.24-0.86-0.36-1.31c-0.15-0.45-0.3-0.92-0.51-1.43 c0-0.03-0.03-0.06-0.03-0.09c-0.18-0.48-0.36-0.89-0.54-1.31c-0.21-0.45-0.42-0.89-0.66-1.31c-0.42-0.77-0.27-1.67,0.33-2.26 l3.69-3.72c0-0.03,0.03-0.03,0.06-0.03c0.12-0.12,0.21-0.24,0.27-0.36c0.06-0.12,0.06-0.24,0.06-0.42c0-0.18-0.03-0.33-0.09-0.45 c-0.06-0.15-0.15-0.27-0.3-0.42l-4.56-4.53L53.25,31.35L53.25,31.35z M54.32,27.5c0.63,0.27,1.16,0.63,1.64,1.1l4.56,4.53h0.03 c0.48,0.48,0.83,1.01,1.1,1.61c0.27,0.63,0.39,1.25,0.39,1.94c0,0.68-0.15,1.34-0.39,1.94c-0.27,0.6-0.63,1.13-1.13,1.58 l-2.68,2.71c0.03,0.09,0.09,0.18,0.12,0.27c0.24,0.51,0.45,1.04,0.65,1.55c0,0.03,0.03,0.06,0.03,0.09 c0.21,0.51,0.39,1.07,0.57,1.67l0.06,0.21h3.28c0.68,0,1.34,0.12,1.94,0.39c0.6,0.24,1.13,0.63,1.61,1.1l0.03,0.03 c0.48,0.48,0.83,1.01,1.07,1.61c0.24,0.6,0.39,1.25,0.39,1.91v6.49c0,1.4-0.48,2.59-1.46,3.57c-0.48,0.48-1.04,0.86-1.64,1.1 c-0.6,0.24-1.25,0.36-1.94,0.36h-3.81c-0.03,0.09-0.09,0.21-0.12,0.3c-0.21,0.54-0.45,1.07-0.68,1.61 c-0.27,0.57-0.51,1.1-0.77,1.58l-0.09,0.18l2.32,2.29l0.09,0.09c0.48,0.48,0.8,1.04,1.04,1.64c0.24,0.6,0.36,1.22,0.36,1.91 c0,0.66-0.12,1.28-0.36,1.88c-0.24,0.6-0.57,1.13-1.04,1.64l-0.06,0.06l-4.56,4.53c-0.48,0.51-1.01,0.86-1.61,1.13 c-0.6,0.27-1.25,0.39-1.97,0.39c-0.68,0-1.34-0.15-1.97-0.39c-0.63-0.27-1.16-0.66-1.61-1.13l-2.65-2.68 c-0.09,0.06-0.18,0.09-0.3,0.12c-0.51,0.21-1.04,0.45-1.61,0.66c-0.54,0.21-1.1,0.39-1.67,0.57c-0.09,0.03-0.15,0.06-0.24,0.06 v3.25c0,0.68-0.12,1.34-0.39,1.94c-0.24,0.6-0.63,1.13-1.1,1.61l-0.03,0.03c-0.48,0.48-1.01,0.83-1.61,1.07 c-0.6,0.24-1.25,0.39-1.91,0.39h-6.49c-1.4,0-2.59-0.48-3.57-1.46c-0.48-0.48-0.86-1.04-1.1-1.64c-0.24-0.6-0.36-1.25-0.36-1.94 v-3.81c-0.09-0.03-0.21-0.09-0.3-0.12c-0.54-0.21-1.07-0.45-1.61-0.69c-0.57-0.27-1.1-0.51-1.58-0.77l-0.18-0.09l-2.29,2.32 l-0.09,0.09c-0.48,0.48-1.04,0.8-1.64,1.04c-0.6,0.24-1.22,0.36-1.91,0.36c-0.66,0-1.28-0.12-1.88-0.36 c-0.6-0.24-1.13-0.57-1.64-1.04l-0.06-0.06l-4.56-4.62c-0.48-0.48-0.83-1.01-1.1-1.61c-0.27-0.63-0.39-1.25-0.39-1.94 c0-0.69,0.15-1.34,0.39-1.94c0.27-0.6,0.66-1.13,1.13-1.61l2.68-2.65c-0.06-0.09-0.09-0.18-0.12-0.3 c-0.21-0.51-0.45-1.04-0.66-1.61c-0.21-0.57-0.42-1.1-0.57-1.67l-0.06-0.24H5.03c-0.69,0-1.34-0.12-1.94-0.39 c-0.6-0.24-1.13-0.63-1.61-1.1l-0.03-0.03c-0.48-0.48-0.83-1.01-1.07-1.61C0.15,57.88,0,57.23,0,56.57l0-6.49 c0-0.68,0.12-1.31,0.36-1.94c0.24-0.6,0.63-1.13,1.1-1.64c0.48-0.48,1.04-0.86,1.64-1.1c0.6-0.24,1.25-0.36,1.94-0.36h3.81 c0.03-0.09,0.09-0.21,0.12-0.3c0.21-0.54,0.45-1.07,0.68-1.61c0.27-0.57,0.51-1.1,0.77-1.58l0.09-0.18l-2.29-2.32 c-0.48-0.48-0.86-1.01-1.1-1.64c-0.27-0.63-0.39-1.28-0.39-1.94c0-0.68,0.12-1.31,0.39-1.94c0.27-0.63,0.63-1.16,1.1-1.64 l4.53-4.56v-0.03c0.48-0.48,1.01-0.83,1.61-1.1c0.63-0.27,1.25-0.39,1.94-0.39c0.69,0,1.34,0.15,1.94,0.39 c0.6,0.27,1.13,0.63,1.58,1.13l2.71,2.68c0.09-0.03,0.18-0.09,0.24-0.12c0.51-0.24,1.04-0.45,1.61-0.68 c0.54-0.21,1.1-0.39,1.67-0.57c0.09-0.03,0.15-0.06,0.24-0.06v-3.25c0-0.69,0.12-1.34,0.39-1.94c0.24-0.6,0.63-1.13,1.1-1.61 l0.03-0.03c0.48-0.48,1.01-0.83,1.61-1.07c0.6-0.24,1.25-0.39,1.91-0.39h6.49c0.68,0,1.31,0.12,1.94,0.36 c0.63,0.24,1.16,0.63,1.64,1.1c0.48,0.48,0.86,1.04,1.1,1.64c0.24,0.6,0.36,1.25,0.36,1.94v3.81c0.09,0.03,0.21,0.09,0.3,0.12 c0.54,0.21,1.07,0.45,1.61,0.69c0.57,0.27,1.1,0.51,1.58,0.77l0.18,0.09l2.32-2.29c0.48-0.48,1.01-0.86,1.64-1.1 c0.63-0.27,1.28-0.39,1.94-0.39c0.69,0,1.31,0.12,1.94,0.39V27.5L54.32,27.5z M33.74,39.57c0.98,0,1.97,0.09,2.92,0.3 c0.92,0.18,1.85,0.48,2.77,0.86c0.86,0.39,1.7,0.83,2.47,1.34c0.77,0.51,1.49,1.1,2.14,1.76c0.66,0.66,1.25,1.37,1.76,2.17 c0.54,0.77,0.98,1.61,1.34,2.47c0.03,0.06,0.03,0.12,0.06,0.15c0.36,0.86,0.63,1.76,0.8,2.62c0.18,0.95,0.3,1.94,0.3,2.92 c0,0.98-0.09,1.97-0.3,2.92c-0.18,0.92-0.48,1.85-0.86,2.77c-0.39,0.86-0.83,1.7-1.34,2.47c-0.54,0.77-1.1,1.49-1.76,2.17 c-0.66,0.66-1.37,1.25-2.17,1.76c-0.77,0.54-1.61,0.98-2.47,1.34c-0.06,0.03-0.12,0.03-0.15,0.06c-0.86,0.36-1.76,0.63-2.62,0.8 c-0.95,0.18-1.94,0.3-2.92,0.3c-0.98,0-1.97-0.09-2.92-0.3c-0.92-0.18-1.85-0.48-2.77-0.86c-0.86-0.39-1.7-0.83-2.47-1.34 c-0.77-0.51-1.49-1.1-2.14-1.76c-0.66-0.66-1.25-1.37-1.76-2.17c-0.54-0.77-0.98-1.61-1.34-2.47c-0.03-0.06-0.03-0.12-0.06-0.15 c-0.36-0.86-0.63-1.76-0.8-2.62c-0.18-0.95-0.3-1.94-0.3-2.92c0-0.98,0.09-1.97,0.3-2.92c0.18-0.92,0.48-1.85,0.86-2.77 c0.39-0.86,0.83-1.7,1.34-2.47c0.51-0.77,1.1-1.49,1.76-2.17c0.65-0.65,1.37-1.25,2.14-1.76c0.77-0.54,1.61-0.98,2.47-1.34 c0.06-0.03,0.12-0.03,0.15-0.06c0.86-0.36,1.76-0.63,2.62-0.8c0.95-0.18,1.94-0.3,2.92-0.3H33.74L33.74,39.57z M35.92,43.62 c-0.68-0.15-1.43-0.21-2.17-0.21c-0.74,0-1.46,0.06-2.17,0.21c-0.68,0.15-1.31,0.33-1.91,0.57c-0.03,0.03-0.06,0.03-0.12,0.06 c-0.68,0.3-1.31,0.63-1.88,1.01c-0.57,0.39-1.1,0.8-1.58,1.28c-0.48,0.48-0.92,1.01-1.28,1.58c-0.39,0.57-0.71,1.19-1.01,1.88 c-0.27,0.63-0.48,1.31-0.63,2.03c-0.15,0.68-0.21,1.43-0.21,2.17c0,0.74,0.06,1.46,0.21,2.17c0.15,0.68,0.33,1.31,0.57,1.91 c0.03,0.03,0.03,0.06,0.06,0.12c0.3,0.69,0.63,1.31,1.01,1.88c0.39,0.57,0.8,1.1,1.28,1.58c0.48,0.48,1.01,0.92,1.58,1.28 c0.57,0.39,1.19,0.71,1.88,1.01c0.63,0.27,1.31,0.48,2.03,0.63c0.68,0.15,1.43,0.21,2.17,0.21c0.74,0,1.46-0.06,2.17-0.21 c0.69-0.15,1.31-0.33,1.91-0.57c0.03-0.03,0.06-0.03,0.12-0.06c0.68-0.3,1.31-0.63,1.88-1.01c0.57-0.39,1.1-0.8,1.58-1.28 c0.48-0.48,0.92-1.01,1.28-1.58c0.39-0.57,0.71-1.19,1.01-1.88c0.27-0.63,0.48-1.31,0.63-2.03c0.15-0.69,0.21-1.43,0.21-2.17 c0-0.74-0.06-1.46-0.21-2.17c-0.15-0.68-0.33-1.31-0.57-1.91c-0.03-0.03-0.03-0.06-0.06-0.12c-0.3-0.69-0.63-1.31-1.01-1.88 c-0.39-0.57-0.8-1.1-1.28-1.58c-0.48-0.48-1.01-0.92-1.58-1.28c-0.57-0.39-1.19-0.71-1.88-1.01 C37.32,43.97,36.63,43.77,35.92,43.62L35.92,43.62z"/></g></svg>
+                <div class="col-md-4">
+                    <div class="col-md-6">
+                        <div class="info-icon">
+                            <i class="fa fa-arrayservice"></i>
                         </div>
                     </div>
-                    <div class="col-md-8">
+                    <div class="col-md-6">
                         <div>
-                            <span class="demonstration">{{'Services' | T}}</span>
-                            <span class="title-nub" ng-click="systemStatistics.go('index.slb_topology')"
-                                  style="cursor: pointer;">{{systemStatistics.serviceNum}}</span>
+                            <span class="demonstration">{{'Services'|T}}</span>
+                            <span class="title-nub" ng-click="systemStatistics.go('index.slb_topology')" style="cursor: pointer;">{{systemStatistics.serviceNum}}</span>
                         </div>
                     </div>
                 </div>
-                <div class="col-md-2">
-                    <div class="col-md-4">
-                        <div class="icons-row">
-                            <?xml version="1.0" encoding="utf-8"?>
-                            <svg id="Layer_3" class="svg-link-icon" ng-click="systemStatistics.go('index.task')" x="0px"
-                                 y="0px" viewBox="0 0 106.86 122.88"
-                                 style="enable-background:new 0 0 106.86 122.88" xml:space="preserve"><style type="text/css">.st0 {
-                                fill-rule: evenodd;
-                                clip-rule: evenodd;
-                            }</style>
-                                <g><path class="st0" d="M39.62,64.58c-1.46,0-2.64-1.41-2.64-3.14c0-1.74,1.18-3.14,2.64-3.14h34.89c1.46,0,2.64,1.41,2.64,3.14 c0,1.74-1.18,3.14-2.64,3.14H39.62L39.62,64.58z M46.77,116.58c1.74,0,3.15,1.41,3.15,3.15c0,1.74-1.41,3.15-3.15,3.15H7.33 c-2.02,0-3.85-0.82-5.18-2.15C0.82,119.4,0,117.57,0,115.55V7.33c0-2.02,0.82-3.85,2.15-5.18C3.48,0.82,5.31,0,7.33,0h90.02 c2.02,0,3.85,0.83,5.18,2.15c1.33,1.33,2.15,3.16,2.15,5.18v50.14c0,1.74-1.41,3.15-3.15,3.15c-1.74,0-3.15-1.41-3.15-3.15V7.33 c0-0.28-0.12-0.54-0.31-0.72c-0.19-0.19-0.44-0.31-0.72-0.31H7.33c-0.28,0-0.54,0.12-0.73,0.3C6.42,6.8,6.3,7.05,6.3,7.33v108.21 c0,0.28,0.12,0.54,0.3,0.72c0.19,0.19,0.45,0.31,0.73,0.31H46.77L46.77,116.58z M98.7,74.34c-0.51-0.49-1.1-0.72-1.78-0.71 c-0.68,0.01-1.26,0.27-1.74,0.78l-3.91,4.07l10.97,10.59l3.95-4.11c0.47-0.48,0.67-1.1,0.66-1.78c-0.01-0.67-0.25-1.28-0.73-1.74 L98.7,74.34L98.7,74.34z M78.21,114.01c-1.45,0.46-2.89,0.94-4.33,1.41c-1.45,0.48-2.89,0.97-4.33,1.45 c-3.41,1.12-5.32,1.74-5.72,1.85c-0.39,0.12-0.16-1.48,0.7-4.81l2.71-10.45l0,0l20.55-21.38l10.96,10.55L78.21,114.01L78.21,114.01 z M39.62,86.95c-1.46,0-2.65-1.43-2.65-3.19c0-1.76,1.19-3.19,2.65-3.19h17.19c1.46,0,2.65,1.43,2.65,3.19 c0,1.76-1.19,3.19-2.65,3.19H39.62L39.62,86.95z M39.62,42.26c-1.46,0-2.64-1.41-2.64-3.14c0-1.74,1.18-3.14,2.64-3.14h34.89 c1.46,0,2.64,1.41,2.64,3.14c0,1.74-1.18,3.14-2.64,3.14H39.62L39.62,42.26z M24.48,79.46c2.06,0,3.72,1.67,3.72,3.72 c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72C20.76,81.13,22.43,79.46,24.48,79.46L24.48,79.46z M24.48,57.44 c2.06,0,3.72,1.67,3.72,3.72c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72C20.76,59.11,22.43,57.44,24.48,57.44 L24.48,57.44z M24.48,35.42c2.06,0,3.72,1.67,3.72,3.72c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72 C20.76,37.08,22.43,35.42,24.48,35.42L24.48,35.42z"/></g></svg>
+                <div class="col-md-4">
+                    <div class="col-md-6">
+                        <div class="info-icon">
+                            <i class="fa fa-task"></i>
                         </div>
                     </div>
-                    <div class="col-md-8">
+                    <div class="col-md-6">
                         <div>
-                            <span class="demonstration">{{'Tasks' | T}}</span>
-                            <span class="title-nub" ng-click="systemStatistics.go('index.task')"
-                                  style="cursor: pointer;">{{systemStatistics.taskNum}}</span>
+                            <span class="demonstration">{{'Tasks'|T}}</span>
+                            <span class="title-nub" ng-click="systemStatistics.go('index.task')" style="cursor: pointer;">{{systemStatistics.taskNum}}</span>
                         </div>
                     </div>
                 </div>
-                <div class="col-md-2">
-                    <div class="col-md-4">
-                        <div class="icons-row">
-                            <?xml version="1.0" encoding="utf-8"?>
-                            <svg id="Layer_4" ui-sref="index.monitoring.event.query({timeRange: '7d'})" class="svg-link-icon" x="0px" y="0px"
-                                 viewBox="0 0 117.033 122.88" enable-background="new 0 0 117.033 122.88"
-                                 xml:space="preserve"><g><path d="M75.828,108.589c-0.381,2.005-1.053,3.845-2.021,5.521c-1,1.729-2.309,3.279-3.926,4.648 c-1.617,1.367-3.381,2.397-5.283,3.086c-1.906,0.689-3.934,1.035-6.076,1.035c-2.143,0-4.17-0.346-6.077-1.035 c-1.903-0.688-3.665-1.719-5.282-3.086c-1.618-1.369-2.927-2.92-3.927-4.648c-0.998-1.728-1.682-3.63-2.054-5.706 c-0.181-1.015,0.495-1.987,1.51-2.169c0.032-0.005,0.329-0.034,0.329-0.036h31.001c1.037,0,1.877,0.84,1.877,1.875 C75.898,108.253,75.875,108.425,75.828,108.589L75.828,108.589z M68.398,6.868c1.521,0.397,2.998,0.879,4.43,1.444 c2.109,0.832,4.135,1.836,6.076,3.007c0.076,0.047,0.15,0.097,0.223,0.148c1.861,1.144,3.592,2.401,5.189,3.772 c1.67,1.434,3.227,3.019,4.67,4.754l0.012,0.013L89,20.006c1.41,1.708,2.672,3.531,3.787,5.462 c1.119,1.941,2.076,3.962,2.867,6.056l0.004-0.001c0.818,2.154,1.43,4.362,1.834,6.622c0.406,2.271,0.607,4.599,0.607,6.984 c0,4.714,0,7.257,0.002,7.566c0.01,2.417,0.023,4.779,0.041,7.085v0.024l0,0c0.008,2.083,0.145,4.179,0.404,6.279 c0.256,2.077,0.631,4.083,1.115,6.014l0.004-0.001c0.486,1.904,1.143,3.735,1.967,5.493c0.846,1.81,1.875,3.58,3.086,5.311 l0.006-0.004c1.195,1.697,2.691,3.373,4.488,5.027c1.855,1.709,4.01,3.383,6.461,5.023c1.406,0.942,1.783,2.846,0.84,4.253 c-0.59,0.881-1.559,1.358-2.547,1.359v0.01H86.244H58.522H30.798H3.076C1.377,98.568,0,97.191,0,95.493 c0-1.117,0.595-2.094,1.485-2.633c2.491-1.686,4.63-3.354,6.416-5.008c1.777-1.646,3.265-3.33,4.462-5.055 c0.036-0.051,0.072-0.1,0.11-0.148c1.157-1.694,2.147-3.42,2.967-5.173c0.834-1.783,1.503-3.622,2.004-5.517 c0.01-0.04,0.021-0.079,0.033-0.118c0.475-1.84,0.837-3.779,1.088-5.812c0.252-2.047,0.378-4.161,0.378-6.337V45.129 c0-2.34,0.21-4.671,0.629-6.987c0.419-2.313,1.036-4.534,1.849-6.655c0.809-2.121,1.779-4.154,2.905-6.096 c1.119-1.929,2.397-3.763,3.828-5.496l0.017-0.02l-0.004-0.004c1.428-1.707,2.995-3.292,4.701-4.749 c1.683-1.437,3.5-2.743,5.45-3.914c1.975-1.179,4.015-2.169,6.128-2.971c1.469-0.558,2.979-1.026,4.529-1.405 c0.529-1.851,1.437-3.349,2.722-4.496C53.471,0.752,55.81-0.025,58.712,0c2.875,0.025,5.194,0.821,6.952,2.391 C66.953,3.542,67.865,5.034,68.398,6.868L68.398,6.868z M70.594,14.03c-1.701-0.67-3.436-1.198-5.203-1.577 c-1.361-0.176-2.482-1.253-2.656-2.677c-0.166-1.341-0.551-2.281-1.154-2.819c-0.605-0.541-1.578-0.817-2.917-0.829 c-1.33-0.012-2.291,0.246-2.882,0.774c-0.6,0.536-0.98,1.485-1.14,2.85l-0.003,0c-0.148,1.303-1.127,2.414-2.484,2.667 c-1.915,0.363-3.762,0.883-5.547,1.561c-1.782,0.676-3.495,1.507-5.143,2.49c-1.641,0.985-3.177,2.091-4.609,3.313 c-1.43,1.221-2.757,2.566-3.98,4.028l-0.004-0.003c-1.194,1.449-2.274,3.003-3.234,4.659c-0.945,1.629-1.771,3.366-2.473,5.207 c-0.702,1.83-1.222,3.682-1.56,5.55c-0.34,1.874-0.509,3.844-0.509,5.906v14.564c0,2.412-0.143,4.774-0.427,7.083 c-0.274,2.224-0.693,4.428-1.256,6.605c-0.01,0.047-0.021,0.095-0.033,0.142c-0.587,2.219-1.384,4.402-2.389,6.549 c-0.97,2.073-2.125,4.089-3.461,6.046c-0.038,0.064-0.078,0.127-0.121,0.189c-1.408,2.026-3.192,4.039-5.352,6.039l-0.078,0.071 h18.819h27.724h27.722h18.787c-2.111-1.946-3.887-3.942-5.328-5.989l0.004-0.004l-0.004-0.008 c-1.416-2.024-2.625-4.102-3.621-6.231c-1.018-2.172-1.809-4.364-2.375-6.575l0.002-0.001l-0.002-0.011 c-0.555-2.202-0.979-4.461-1.264-6.771c-0.271-2.209-0.416-4.54-0.428-6.992v-0.007c-0.018-2.278-0.031-4.656-0.041-7.133 c-0.018-4.584-0.025-7.086-0.025-7.566c0-2.024-0.17-3.992-0.512-5.902c-0.34-1.903-0.848-3.743-1.521-5.517l0.004-0.001 l-0.004-0.011c-0.691-1.829-1.504-3.557-2.439-5.178c-0.934-1.617-2.004-3.159-3.211-4.622l0.002-0.001 c-1.197-1.438-2.51-2.77-3.939-3.997c-1.385-1.188-2.848-2.256-4.393-3.207c-0.068-0.035-0.137-0.072-0.203-0.113 C74.066,15.577,72.354,14.724,70.594,14.03L70.594,14.03z"/></g></svg>
-                            <g>
-                                <path class="st0"
-                                      d="M39.62,64.58c-1.46,0-2.64-1.41-2.64-3.14c0-1.74,1.18-3.14,2.64-3.14h34.89c1.46,0,2.64,1.41,2.64,3.14 c0,1.74-1.18,3.14-2.64,3.14H39.62L39.62,64.58z M46.77,116.58c1.74,0,3.15,1.41,3.15,3.15c0,1.74-1.41,3.15-3.15,3.15H7.33 c-2.02,0-3.85-0.82-5.18-2.15C0.82,119.4,0,117.57,0,115.55V7.33c0-2.02,0.82-3.85,2.15-5.18C3.48,0.82,5.31,0,7.33,0h90.02 c2.02,0,3.85,0.83,5.18,2.15c1.33,1.33,2.15,3.16,2.15,5.18v50.14c0,1.74-1.41,3.15-3.15,3.15c-1.74,0-3.15-1.41-3.15-3.15V7.33 c0-0.28-0.12-0.54-0.31-0.72c-0.19-0.19-0.44-0.31-0.72-0.31H7.33c-0.28,0-0.54,0.12-0.73,0.3C6.42,6.8,6.3,7.05,6.3,7.33v108.21 c0,0.28,0.12,0.54,0.3,0.72c0.19,0.19,0.45,0.31,0.73,0.31H46.77L46.77,116.58z M98.7,74.34c-0.51-0.49-1.1-0.72-1.78-0.71 c-0.68,0.01-1.26,0.27-1.74,0.78l-3.91,4.07l10.97,10.59l3.95-4.11c0.47-0.48,0.67-1.1,0.66-1.78c-0.01-0.67-0.25-1.28-0.73-1.74 L98.7,74.34L98.7,74.34z M78.21,114.01c-1.45,0.46-2.89,0.94-4.33,1.41c-1.45,0.48-2.89,0.97-4.33,1.45 c-3.41,1.12-5.32,1.74-5.72,1.85c-0.39,0.12-0.16-1.48,0.7-4.81l2.71-10.45l0,0l20.55-21.38l10.96,10.55L78.21,114.01L78.21,114.01 z M39.62,86.95c-1.46,0-2.65-1.43-2.65-3.19c0-1.76,1.19-3.19,2.65-3.19h17.19c1.46,0,2.65,1.43,2.65,3.19 c0,1.76-1.19,3.19-2.65,3.19H39.62L39.62,86.95z M39.62,42.26c-1.46,0-2.64-1.41-2.64-3.14c0-1.74,1.18-3.14,2.64-3.14h34.89 c1.46,0,2.64,1.41,2.64,3.14c0,1.74-1.18,3.14-2.64,3.14H39.62L39.62,42.26z M24.48,79.46c2.06,0,3.72,1.67,3.72,3.72 c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72C20.76,81.13,22.43,79.46,24.48,79.46L24.48,79.46z M24.48,57.44 c2.06,0,3.72,1.67,3.72,3.72c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72C20.76,59.11,22.43,57.44,24.48,57.44 L24.48,57.44z M24.48,35.42c2.06,0,3.72,1.67,3.72,3.72c0,2.06-1.67,3.72-3.72,3.72c-2.06,0-3.72-1.67-3.72-3.72 C20.76,37.08,22.43,35.42,24.48,35.42L24.48,35.42z"/>
-                            </g>
-                            </svg>
+                <!-- <div class="col-md-3" ng-if="systemStatistics.alertStatus">
+                    <div class="col-md-6">
+                        <div class="info-icon">
+                            <i class="fa fa-arraybell"></i>
                         </div>
                     </div>
-                    <div class="col-md-8">
-                        <div>
-                            <span class="demonstration">{{'Events (last 7 days)' | T}}</span>
-                            <span class="title-nub" ui-sref="index.monitoring.event.query({timeRange: '7d'})"
-                                  style="cursor: pointer;">{{systemStatistics.eventNum}}</span>
+                    <div>
+                        <div class="col-md-6">
+                            <div>
+                                <span class="demonstration" ng-click="systemStatistics.go('index.monitoring.alerting')" style="cursor: pointer;">{{'Alerts'|T}}</span>
+                                <span class="title-nub">{{systemStatistics.alertNum}}</span>
+                            </div>
                         </div>
                     </div>
-                </div>
-                <div class="col-md-2">
-                    <div class="col-md-4">
-                        <div class="icons-row">
-                            <svg id="Layer_5" ui-sref="index.monitoring.alerting.log({timeRange: '7d'})" class="svg-link-icon" data-name="Layer 1" viewBox="0 0 122.88 118.68">
-                                <path
-                                    d="M73.23,104.88a17,17,0,0,1-2,5.34,17.28,17.28,0,0,1-3.79,4.48,16.76,16.76,0,0,1-5.11,3,17.25,17.25,0,0,1-5.86,1,17.47,17.47,0,0,1-5.87-1,16.47,16.47,0,0,1-5.09-3,17.06,17.06,0,0,1-3.79-4.48,16.78,16.78,0,0,1-2-5.52,1.8,1.8,0,0,1,1.46-2.09l.32,0H71.5a1.8,1.8,0,0,1,1.81,1.81,2.64,2.64,0,0,1-.08.49ZM104.36,15A30.08,30.08,0,1,1,62.72,42.78a30.55,30.55,0,0,1,18.72-28,29.79,29.79,0,0,1,11.37-2.05A31.24,31.24,0,0,1,104.31,15l0,0ZM87.68,42.24a5.54,5.54,0,0,1,.71-.65l.37-.26V29.89a3.18,3.18,0,0,1,5.44-2.25,3.17,3.17,0,0,1,.94,2.25V41.33a6,6,0,0,1,.92.75,5.91,5.91,0,0,1,.74.9h7.8a3.18,3.18,0,0,1,2.25.93l.06.06a3.2,3.2,0,0,1,.87,2.2,3.19,3.19,0,0,1-3.18,3.18H96.79A5.77,5.77,0,0,1,91.94,52a5.81,5.81,0,0,1-4.26-9.73Zm21.89-15.76a23.89,23.89,0,0,0-21.09-6.73A23.35,23.35,0,0,0,75.9,26.21a23,23,0,0,0-4.6,6.59,23.7,23.7,0,0,0,38.27,26.73,23.56,23.56,0,0,0,6.94-16.76,23.83,23.83,0,0,0-.6-5.32,23.54,23.54,0,0,0-1.77-5v0a17.19,17.19,0,0,0-2-3.09,34.8,34.8,0,0,0-2.57-2.81ZM66.05,6.64A36.29,36.29,0,0,1,70.33,8c.89.35,1.76.74,2.62,1.15a38.09,38.09,0,0,0-5.5,4.09A31.45,31.45,0,0,0,63.15,12a3,3,0,0,1-2.56-2.58,4.23,4.23,0,0,0-1.12-2.73,4.3,4.3,0,0,0-2.81-.8,4.14,4.14,0,0,0-2.79.75,4.33,4.33,0,0,0-1.09,2.76h0A3,3,0,0,1,50.37,12,32.09,32.09,0,0,0,45,13.5a31.19,31.19,0,0,0-5,2.41,32.19,32.19,0,0,0-4.45,3.2A32.84,32.84,0,0,0,31.76,23h0a34,34,0,0,0-3.12,4.5,36.21,36.21,0,0,0-2.38,5,30,30,0,0,0-1.51,5.36,31.67,31.67,0,0,0-.49,5.7V57.65a57,57,0,0,1-.4,6.84,49.83,49.83,0,0,1-1.22,6.38l0,.14a38.69,38.69,0,0,1-2.3,6.32A41.65,41.65,0,0,1,17,83.17l-.12.18a36.12,36.12,0,0,1-5.16,5.83l-.08.07h89.83a36.76,36.76,0,0,1-5.15-5.78h0c-.39-.56-.76-1.11-1.11-1.68a38.47,38.47,0,0,0,6.58-.9,31.2,31.2,0,0,0,3.72,4,50.63,50.63,0,0,0,6.24,4.85,3,3,0,0,1-1.66,5.43H3a3,3,0,0,1-1.53-5.52,52.83,52.83,0,0,0,6.19-4.84A30,30,0,0,0,11.94,80a.76.76,0,0,1,.11-.14,36,36,0,0,0,2.86-5,30.06,30.06,0,0,0,1.93-5.33l0-.11a43.26,43.26,0,0,0,1.05-5.61,50.68,50.68,0,0,0,.37-6.12V43.57a37.49,37.49,0,0,1,.61-6.75,36.4,36.4,0,0,1,1.78-6.42,39.69,39.69,0,0,1,2.81-5.88,37.12,37.12,0,0,1,3.7-5.31l0,0h0a38.5,38.5,0,0,1,4.53-4.59A40.25,40.25,0,0,1,37,10.82,39.25,39.25,0,0,1,42.92,8,38.32,38.32,0,0,1,47.3,6.59a9,9,0,0,1,2.64-4.34A9.66,9.66,0,0,1,56.71,0a9.76,9.76,0,0,1,6.71,2.32,9,9,0,0,1,2.63,4.32Z"/>
-                            </svg>
-                        </div>
-                    </div>
-                    <div class="col-md-8">
-                        <div>
-                            <span class="demonstration">{{'Alerts (last 7 days)' | T}}</span>
-                            <span class="title-nub" ui-sref="index.monitoring.alerting.log({timeRange: '7d'})"
-                                  style="cursor: pointer;">{{systemStatistics.alertingNum}}</span>
-                        </div>
-                    </div>
-                </div>
-                <div class="col-md-1"></div>
+                </div> -->
             </div>
         </div>
     </div>
\ No newline at end of file
@@ -111,10 +65,9 @@
     <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 ng-scope">
         <div class="graph box-shadow">
             <div class="graph-title">
-                <span class="tab-header-1">{{systemStatistics.LoadWidget.verbose_name}}</span>
+                <span>{{systemStatistics.LoadWidget.verbose_name}}</span>
             </div>
-            <div class="graph-container" composer-widget widget="systemStatistics.LoadWidget"
-                 style="height: 200px"></div>
+            <div class="graph-container" composer-widget widget="systemStatistics.LoadWidget" style="height: 200px"></div>
             <div class="graph-container">
                 <div class="col-md-6 graph ng-scope">
                     <div class="graph-container" liquid-graph="systemStatistics.CpuUsageWidget"></div>
\ No newline at end of file
@@ -128,23 +81,22 @@
     <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 ng-scope">
         <div class="graph box-shadow">
             <div class="graph-title">
-                <span class="tab-header-1">{{systemStatistics.TrafficWidget.verbose_name}}</span>
+                <span>{{systemStatistics.TrafficWidget.verbose_name}}</span>
             </div>
-            <div class="graph-container" composer-widget widget="systemStatistics.TrafficWidget"
-                 style="height: 200px"></div>
+            <div class="graph-container" composer-widget widget="systemStatistics.TrafficWidget" style="height: 200px"></div>
             <div class="graph-container" style="padding-top: 35px;">
                 <div class="col-md-6" style="padding-left: 25px;">
                     <div>
                         <span class="title-nub">{{systemStatistics.Outbound.value}}</span>
                         <span class="demonstration2">{{systemStatistics.Outbound.unit}}bps</span>
-                        <span class="demonstration">{{'Outbound' | T}}</span>
+                        <span class="demonstration">{{'Outbound'|T}}</span>
                     </div>
                 </div>
                 <div class="col-md-6" style="padding-left: 25px;">
                     <div>
                         <span class="title-nub">{{systemStatistics.Inbound.value}}</span>
                         <span class="demonstration2">{{systemStatistics.Outbound.unit}}bps</span>
-                        <span class="demonstration">{{'Inbound' | T}}</span>
+                        <span class="demonstration">{{'Inbound'|T}}</span>
                     </div>
                 </div>
             </div>
\ No newline at end of file
@@ -153,7 +105,7 @@
     <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 ng-scope">
         <div class="graph box-shadow">
             <div class="graph-title">
-                <span class="tab-header-1">{{systemStatistics.TaskWidget.title}}</span>
+                <span>{{systemStatistics.TaskWidget.title}}</span>
             </div>
             <div class="graph-container" statistic-simple-pie="systemStatistics.TaskWidget" style="height: 360px"></div>
         </div>
\ No newline at end of file
@@ -164,27 +116,27 @@
     <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 ng-scope">
         <div class="graph box-shadow">
             <div class="graph-title">
-                <span class="tab-header-1">{{systemStatistics.diskStatusWidget.title}}</span>
+                <span>{{systemStatistics.diskStatusWidget.title}}</span>
             </div>
             <div class="graph-container" disk-usage="systemStatistics.diskStatusWidget" style="height: 200px"></div>
             <div class="graph-container" style="padding-bottom: 15px;">
-                <div class="col-md-6 graph ng-scope" style="margin-left: 6px;">
+                <div class="col-md-6 graph ng-scope">
                     <div class="col-md-12">
                         <div>
                             <span class="title-nub">{{systemStatistics.readRate.value}}</span>
                             <span class="demonstration2">{{systemStatistics.readRate.unit}}B/s</span>
-                            <span class="demonstration">{{'Read Rate' | T}}</span>
+                            <span class="demonstration">{{'Read Rate'|T}}</span>
                         </div>
                     </div>
                     <div class="col-md-12">
                         <div>
                             <span class="title-nub">{{systemStatistics.writeRate.value}}</span>
                             <span class="demonstration2">{{systemStatistics.writeRate.unit}}B/s</span>
-                            <span class="demonstration">{{'Write Rate' | T}}</span>
+                            <span class="demonstration">{{'Write Rate'|T}}</span>
                         </div>
                     </div>
                 </div>
-                <div class="col-md-6 graph ng-scope" style="margin-left: -6px;">
+                <div class="col-md-6 graph ng-scope">
                     <div class="graph-container" liquid-graph="systemStatistics.DiskActivityWidget"></div>
                 </div>
             </div>
\ No newline at end of file
@@ -193,20 +145,25 @@
     <div class="col-lg-8 col-md-8 col-sm-6 col-xs-12">
         <div class="graph box-shadow">
             <div class="graph-title">
-                <span class="tab-header-1">{{ 'Devices' | T}}</span>
+                <span>{{ 'Devices' | T}}</span>
             </div>
-            <div class="graph-container" device-monitoring="systemStatistics.DeviceWidget"
-                 style="height: 360px; padding-bottom: 15px;"></div>
+            <div class="graph-container" device-monitoring="systemStatistics.DeviceWidget" style="height: 360px; padding-bottom: 15px;"> </div>
         </div>
     </div>
+    <!-- <div class="col-lg-8 col-md-8 col-sm-6 col-xs-12 graph" ng-repeat="widget in systemStatistics.diskUsageWidget">
+        <div class="graph-title">
+            <span>{{ widget.title | T}}</span>
+        </div>
+        <div class="graph-container" monitoring-usage="widget" style="height: 360px"></div>
+    </div> -->
 </div>
 
 
 <style>
     .demonstration {
         display: block;
-        color: #222f31;
-        font-size: 14px;
+        color: #56a0ca;
+        font-size: 13px;
         line-height: 25px;
     }
 
\ No newline at end of file
@@ -236,14 +193,4 @@
         width: 66px;
         font-size: 26px;
     }
-
-    .icons-row {
-        height: 20px;
-        width: 40px;
-        padding-top: 10px;
-    }
-
-    .svg-link-icon {
-        cursor: pointer;
-    }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.controller.js	(working copy)
@@ -17,8 +17,6 @@
                 getInfo();
             }
 
-            configViewModal.configurationDetail = null;
-
             function getInfo() {
                 var deviceKey = window.localStorage.__deviceKey__;
                 deviceKey = JSON.parse(deviceKey);
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/config.html	(working copy)
@@ -1,4 +1,4 @@
-<div class="row" ng-if="config.configurationDetail !== null">
+<div class="row">
     <div class="btn-group" style="margin-left: 15px;">
         <button class="btn btn-link" title="{{ 'Download configurations' | T }}"
                 ng-click="config.downloadDeviceConfig()"><i class="fa fa-download"></i></button>
@@ -9,3 +9,4 @@
         <pre>{{config.configurationDetail}}</pre>
     </div>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/device-detail.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/device-detail.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/device-detail.html	(working copy)
@@ -1,24 +1,24 @@
-<div class="row">
-    <div class="col-md-12">
-        <div ncy-breadcrumb></div>
+<div>
+    <div class="row">
+        <div class="col-md-12">
+            <div ncy-breadcrumb></div>
+        </div>
     </div>
-    <div class="col-md-12">
-        <div class="tab-wrapper">
-            <ul class="nav nav-tabs">
-                <li role="presentation"
-                    ng-class="{ active: url_contain('/device/detail/{{ current_name }}/overview') }">
-                    <a ui-sref="index.device.detail.overview"><span class="tab-header">{{ 'Basic Information' | T
-                        }}</span></a>
-                </li>
-                <li role="presentation" ng-class="{ active: url_contain('/device/detail/{{ current_name }}/config') }">
-                    <a ui-sref="index.device.detail.config"><span class="tab-header">{{ 'Configuration' | T
-                        }}</span></a>
-                </li>
-                <li role="presentation" ng-class="{ active: url_contain('/device/detail/{{ current_name }}/setting') }">
-                    <a ui-sref="index.device.detail.setting"><span
-                        class="tab-header">{{ 'Advanced Settings' | T}}</span></a>
-                </li>
-            </ul>
+    <div class="row">
+        <div class="col-md-12">
+            <div class="tab-wrapper">
+                <ul class="nav nav-tabs">
+                    <li role="presentation" ng-class="{ active: url_contain('/device/detail/{{ current_name }}/overview') }">
+                        <a ui-sref="index.device.detail.overview">{{ 'Basic Information' | T }}</a>
+                    </li>
+                    <li role="presentation" ng-class="{ active: url_contain('/device/detail/{{ current_name }}/config') }">
+                        <a ui-sref="index.device.detail.config">{{ 'Configuration' | T }}</a>
+                    </li>
+                    <li role="presentation" ng-class="{ active: url_contain('/device/detail/{{ current_name }}/setting') }">
+                        <a ui-sref="index.device.detail.setting">{{ 'Advanced Settings' | T}}</a>
+                    </li>
+                </ul>
+            </div>
         </div>
     </div>
     <div class="content-wrapper">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/overview.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/overview.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/detail/overview.html	(working copy)
@@ -1,107 +1,122 @@
-<div ng-if="!overview.detail" style="margin-bottom: 5px;margin-top:5px;text-align: center"><img
-    src="app/images/loading.gif"></div>
+<!-- <div class="row">
+    <div class="col-md-12">
+        <composer-timeselector widgets="widgets"></composer-timeselector>
+    </div>
+</div>
+<div class="row">
+    <div class="col-lg-6 col-md-6 col-xs-12 graph" ng-repeat="widget in widgets">
+        <div class="graph-title">
+            <i class="fa fa-{{ widget.icon }}"></i>
+            <span>{{widget.verbose_name|T}}</span>
+        </div>
+        <div class="graph-container device-overview" composer-widget widget="widget"></div>
+    </div>
+</div> -->
+<div ng-if="!overview.detail" style="margin-bottom: 5px;margin-top:5px;text-align: center"><img src="app/images/loading.gif"></div>
 <div class="row" ng-if="overview.detail">
     <div class="btn-group" style="margin-left: 15px;">
-        <button class="btn btn-link" title="{{'Refresh from deivce'|T}}" ng-click="overview.refresh()"><i
-            class="fa fa-refresh"></i></button>
-        <button class="btn btn-link" title="{{ 'Web UI' | T }}" ng-click="overview.webui(deviceItem)"><i
-            class="array-webui"></i></button>
-        <button class="btn btn-link" title="{{ 'Web console' | T }}" ng-click="overview.terminal(deviceItem)"><i
-            class="array-terminal"></i></button>
+        <button class="btn btn-link" title="{{'Refresh from deivce'|T}}" ng-click="overview.refresh()"><i class="fa fa-refresh"></i></button>
+        <button class="btn btn-link" title="{{ 'Web UI' | T }}" ng-click="overview.webui(deviceItem)"><i class="array-webui"></i></button>
+        <button class="btn btn-link" title="{{ 'Web console' | T }}" ng-click="overview.terminal(deviceItem)"><i class="array-terminal"></i></button>
     </div>
 </div>
-<div class="col-md-12" ng-if="overview.detail && overview.detail.connection">
-    <div class="widget">
-        <div class="widget-header tab-header-1">{{ 'Device Switch' | T}}</div>
-        <form class="form-horizontal">
-            <div class="form-group">
-                <label class="col-md-3 control-label">{{'Enable Monitor' | T}}</label>
-                <div class="col-md-9">
-                    <div class="switch">
-                        <input type="checkbox" bs-switch class="switch" ng-model="overview.snmp_enable"
-                               switch-active="true" ng-change="overview.enableSNMP()" resettable>
+<div class="row" ng-if="overview.detail && overview.detail.connection">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="widget-header">{{ 'Device Switch' | T}}</div>
+            <form class="form-horizontal">
+                <div class="form-group">
+                    <label class="col-md-3 control-label">{{'Enable Monitor'|T}}</label>
+                    <div class="col-md-9">
+                        <div class="switch">
+                            <input type="checkbox" bs-switch class="switch" ng-model="overview.snmp_enable" switch-active="true" ng-change="overview.enableSNMP()" resettable>
+                        </div>
                     </div>
                 </div>
-            </div>
-        </form>
+            </form>
+        </div>
     </div>
 </div>
-<div class="col-md-12" ng-if="overview.detail">
-    <div class="widget">
-        <div class="widget-header tab-header-1">{{ 'License Information' | T}}</div>
-        <div class="table-wrapper">
-            <table class="table table-hover table-striped" style="width: 100%">
-                <tbody>
-                <tr>
-                    <td>{{ 'License Key' | T}}</td>
-                    <th>{{ overview.detail.license_key }}</th>
-                </tr>
-                <tr>
-                    <td>{{ 'Expiration Date' | T}}</td>
-                    <th>{{ overview.detail.license_date }}</th>
-                </tr>
-                <tr ng-if="overview.detail.license_limit.length > 0">
-                    <td>{{ 'Licensed Limits' | T}}</td>
-                    <th>{{ overview.detail.license_limit }}</th>
-                </tr>
-                <tr>
-                    <td>{{ 'Licensed Features' | T}}</td>
-                    <th>{{ overview.detail.license_feature }}</th>
-                </tr>
-                </tbody>
-            </table>
+<div class="row" ng-if="overview.detail">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="widget-header">{{ 'License Information' | T}}</div>
+            <div class="table-wrapper">
+                <table class="table table-hover table-striped">
+                    <tbody>
+                        <tr>
+                            <td>{{ 'License Key' | T}}</td>
+                            <th>{{ overview.detail.license_key }}</th>
+                        </tr>
+                        <tr>
+                            <td>{{ 'Expiration Date' | T}}</td>
+                            <th>{{ overview.detail.license_date }}</th>
+                        </tr>
+                        <tr ng-if="overview.detail.license_limit.length > 0">
+                            <td>{{ 'Licensed Limits' | T}}</td>
+                            <th>{{ overview.detail.license_limit }}</th>
+                        </tr>
+                        <tr>
+                            <td>{{ 'Licensed Features' | T}}</td>
+                            <th>{{ overview.detail.license_feature }}</th>
+                        </tr>
+                    </tbody>
+                </table>
 
+            </div>
         </div>
     </div>
 </div>
-<div class="col-md-12" ng-if="overview.detail">
-    <div class="widget">
-        <div class="widget-header tab-header-1">{{ 'System Info' | T}}</div>
-        <div class="table-wrapper">
-            <table class="table table-hover table-striped" style="width:100%">
-                <tbody>
-                <tr>
-                    <th>{{ 'Host name' | T}}</th>
-                    <td>{{ overview.detail.host_name }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'Model Type' | T}}</th>
-                    <td>{{ overview.detail.model }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'Serial Number' | T}}</th>
-                    <td>{{ overview.detail.serial_number }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'Build Version' | T}}</th>
-                    <td>{{ overview.detail.build_version }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'System CPU' | T}}</th>
-                    <td>{{ overview.detail.system_cpu }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'System RAM' | T}}</th>
-                    <td>{{ overview.detail.system_ram }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'System Boot Time' | T}}</th>
-                    <td>{{ overview.detail.system_boot_time }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'System Up Time' | T}}</th>
-                    <td>{{ overview.detail.system_up_time }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'Platform Build Date' | T}}</th>
-                    <td>{{ overview.detail.platform_bld_date }}</td>
-                </tr>
-                <tr>
-                    <th>{{ 'SSL Hardware' | T}}</th>
-                    <td>{{ overview.detail.ssl_hw }}</td>
-                </tr>
-                </tbody>
-            </table>
+<div class="row" ng-if="overview.detail">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="widget-header">{{ 'System Info' | T}}</div>
+            <div class="table-wrapper">
+                <table class="table table-hover table-striped">
+                    <tbody>
+                        <tr>
+                            <th>{{ 'Host name' | T}}</th>
+                            <td>{{ overview.detail.host_name }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'Model Type' | T}}</th>
+                            <td>{{ overview.detail.model }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'Serial Number' | T}}</th>
+                            <td>{{ overview.detail.serial_number }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'Build Version' | T}}</th>
+                            <td>{{ overview.detail.build_version }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'System CPU' | T}}</th>
+                            <td>{{ overview.detail.system_cpu }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'System RAM' | T}}</th>
+                            <td>{{ overview.detail.system_ram }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'System Boot Time' | T}}</th>
+                            <td>{{ overview.detail.system_boot_time }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'System Up Time' | T}}</th>
+                            <td>{{ overview.detail.system_up_time }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'Platform Build Date' | T}}</th>
+                            <td>{{ overview.detail.platform_bld_date }}</td>
+                        </tr>
+                        <tr>
+                            <th>{{ 'SSL Hardware' | T}}</th>
+                            <td>{{ overview.detail.ssl_hw }}</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
         </div>
     </div>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/device.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/device.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/device.html	(working copy)
@@ -2,121 +2,91 @@
     <div class="col-md-12">
         <div class="widget">
             <div class="widget-header">
-                <span class="tab-header-1">{{ 'Managed Device' | T }}</span>
+                <span>{{ 'Managed Device' | T }}</span>
             </div>
             <div class="table-toolbar">
                 <div>
                     <div class="btn-group">
-                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="device.refresh()"><i
-                            class="fa fa-refresh an-tab-icon"></i></button>
-                        <button ng-if="user_auth_data.device.device.add" class="btn btn-link"
-                                title="{{ 'Create a device' | T }}" ng-click="device.addDevice()"><i
-                            class="fa fa-plus-circle an-tab-icon"></i></button>
-                        <button class="btn btn-link" title="{{ 'Check Device Build Info' | T }}"
-                                ng-click="device.check()" ng-if="device.deviceList.length > 0"><i
-                            class="fa fa-repeat an-tab-icon"></i></button>
+                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="device.refresh()"><i class="fa fa-refresh"></i></button>
+                        <button ng-if="user_auth_data.device.device.add" class="btn btn-link" title="{{ 'Create a device' | T }}" ng-click="device.addDevice()"><i class="fa fa-plus-circle"></i></button>
+                        <button class="btn btn-link" title="{{ 'Check Device Build Info' | T }}" ng-click="device.check()" ng-if="device.deviceList.length > 0"><i class="fa fa-repeat"></i></button>
                     </div>
                 </div>
             </div>
             <div class="">
-                <table st-table="displayedCollection" st-safe-src="device.deviceList"
-                       class="table table-hover table-striped">
+                <table st-table="displayedCollection" st-safe-src="device.deviceList" class="table table-hover table-striped">
                     <thead>
-                    <tr>
-                        <th class="d-num">No.</th>
-                        <th class="d-name">{{ 'Name' | T }}</th>
-                        <th class="d-name">{{ 'Device Group' | T }}</th>
-                        <th class="d-type">{{ 'Type' | T }}</th>
-                        <th class="d-model">{{ 'Model' | T }}</th>
-                        <th class="d-ip">{{ 'IP' | T }}</th>
-                        <th class="d-type">{{ 'Protocol' | T }}</th>
-                        <!-- <th class="d-port">{{ 'RESTful API Port' | T }}</th> -->
-                        <!-- <th class="d-port">{{ 'WebUI Port' | T }}</th> -->
-                        <th class="d-cont">{{ 'Connected' | T }}</th>
-                        <th class="d-action">{{ 'Action' | T }}</th>
-                    </tr>
-                    <tr ng-if="device.deviceList">
-                        <th></th>
-                        <th><input st-search="name" placeholder="{{'Search by Name'|T}}" class="input-sm form-control"
-                                   type="text"/></th>
-                        <th><input st-search="device_group" placeholder="{{'Search by Group'|T}}"
-                                   class="input-sm form-control" type="text"/></th>
-                        <th>
-                            <select class="input-sm form-control" st-input-event="change" st-search="type">
-                                <option value="">{{'All' | T}}</option>
-                                <option ng-repeat="row in device.deviceList | unique:'type'" value="{{row.type}}">
-                                    {{row.type}}
-                                </option>
-                            </select>
-                        </th>
-                        <th><input st-search="model" placeholder="{{'Search by Model'|T}}" class="input-sm form-control"
-                                   type="text"/></th>
-                        <th><input st-search="ip" placeholder="{{'Search by IP'|T}}" class="input-sm form-control"
-                                   type="text"/></th>
-                        <!-- <th><input st-search="restapi_port" placeholder="{{'Search by Port'|T}}" class="input-sm form-control" type="text" /></th> -->
-                        <th>
-                            <select class="input-sm form-control" st-input-event="change" st-search="protocol">
-                                <option value="">{{'All' | T}}</option>
-                                <option value="restapi">{{'REST API' | T}}</option>
-                                <option value="xmlrpc">{{'XML RPC' | T}}</option>
-                            </select>
-                        </th>
-                        <!-- <th><input st-search="webui_port" placeholder="{{'Search by Port'|T}}" class="input-sm form-control" type="text" /></th> -->
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                    </tr>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-name">{{ 'Name' | T }}</th>
+                            <th class="d-name">{{ 'Device Group' | T }}</th>
+                            <th class="d-type">{{ 'Type' | T }}</th>
+                            <th class="d-model">{{ 'Model' | T }}</th>
+                            <th class="d-ip">{{ 'IP' | T }}</th>
+                            <th class="d-type">{{ 'Protocol' | T }}</th>
+                            <!-- <th class="d-port">{{ 'RESTful API Port' | T }}</th> -->
+                            <!-- <th class="d-port">{{ 'WebUI Port' | T }}</th> -->
+                            <th class="d-cont">{{ 'Connected' | T }}</th>
+                            <th class="d-action">{{ 'Action' | T }}</th>
+                        </tr>
+                        <tr ng-if="device.deviceList">
+                            <th></th>
+                            <th><input st-search="name" placeholder="{{'Search by Name'|T}}" class="input-sm form-control" type="text" /></th>
+                            <th><input st-search="device_group" placeholder="{{'Search by Group'|T}}" class="input-sm form-control" type="text" /></th>
+                            <th>
+                                <select class="input-sm form-control" st-input-event="change" st-search="type">
+                                    <option value="">{{'All'|T}}</option>
+                                    <option ng-repeat="row in device.deviceList | unique:'type'" value="{{row.type}}">{{row.type}}</option>
+                                </select>
+                            </th>
+                            <th><input st-search="model" placeholder="{{'Search by Model'|T}}" class="input-sm form-control" type="text" /></th>
+                            <th><input st-search="ip" placeholder="{{'Search by IP'|T}}" class="input-sm form-control" type="text" /></th>
+                            <!-- <th><input st-search="restapi_port" placeholder="{{'Search by Port'|T}}" class="input-sm form-control" type="text" /></th> -->
+                            <th>
+                                <select class="input-sm form-control" st-input-event="change" st-search="protocol">
+                                    <option value="">{{'All'|T}}</option>
+                                    <option value="restapi">{{'REST API'|T}}</option>
+                                    <option value="xmlrpc">{{'XML RPC'|T}}</option>
+                                </select>
+                            </th>
+                            <!-- <th><input st-search="webui_port" placeholder="{{'Search by Port'|T}}" class="input-sm form-control" type="text" /></th> -->
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                        </tr>
                     </thead>
                     <tbody>
-                    <tr ng-repeat="deviceItem in displayedCollection">
-                        <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                        <td><a ui-sref="index.device.detail({name:deviceItem.name})" class="name"
-                               ng-click="device.getDetail(deviceItem)">{{ deviceItem.name }}</a></td>
-                        <td>{{ deviceItem.device_group }}</td>
-                        <td>{{ deviceItem.type }}</td>
-                        <td>{{ deviceItem.model}}</td>
-                        <td>{{ deviceItem.ip}}</td>
-                        <td>{{ deviceItem.protocol_verbose}}</td>
-                        <!-- <td>{{ deviceItem.restapi_port }}</td> -->
-                        <!-- <td>{{ deviceItem.webui_port }}</td> -->
-                        <td>
-                            <div class="btn-group">
-                                <button style="color:#5cb85c" ng-if="deviceItem.connection === true"
-                                        class="btn btn-link" title="{{'Connected.'|T}}"><i
-                                    class="fa fa-check-circle an-row-icon-status"></i></button>
-                                <button style="color:#e02f44" ng-if="deviceItem.connection === false"
-                                        class="btn btn-link"
-                                        title="{{'Unconnected, please check the RESTful API service of device!'|T}}"><i
-                                    class="fa fa-times-circle an-row-icon-status"></i></button>
-                            </div>
-                        </td>
-                        <td>
-                            <a class="icon-box" title="{{ 'License Information' | T }}"
-                               ng-click="device.licenseInfo(deviceItem)" style="margin-right: 2px;"><i
-                                class="array-licenese an-row-icon"></i></a>&nbsp;
-                            <a ng-if="deviceItem.connection === true" class="icon-box" title="{{ 'Web UI' | T }}"
-                               ng-href="{{deviceItem.webui}}" style="margin-right: 2px;" rel="noreferrer"
-                               target="_blank"><i class="array-webui an-row-icon"></i></a>&nbsp;
-                            <a ng-if="deviceItem.connection === true" class="icon-box" title="{{ 'Web console' | T }}"
-                               ng-click="device.terminal(deviceItem)" style="margin-right: 2px;"><i
-                                class="array-terminal an-row-icon"></i></a>&nbsp;
-                            <a ng-if="user_auth_data.device.device.save && deviceItem.connection === true"
-                               class="icon-box" title="{{ 'Save Configurations' | T }}"
-                               ng-click="device.saveConfigurations(deviceItem)"
-                               style="margin-right: 2px; font-size: 13px;"><i class="fa fa-floppy-o an-row-icon"></i></a>&nbsp;
-                            <a ng-if="user_auth_data.device.device.delete" class="icon-box" title="{{ 'Delete' | T }}"
-                               ng-click="device.deleteDevice(deviceItem)" style="margin-right: 2px;"><i
-                                class="array-delete an-row-icon"></i></a>
-                        </td>
-                    </tr>
+                        <tr ng-repeat="deviceItem in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td><a ui-sref="index.device.detail({name:deviceItem.name})" class="name" ng-click="device.getDetail(deviceItem)">{{ deviceItem.name }}</a></td>
+                            <td>{{ deviceItem.device_group }}</td>
+                            <td>{{ deviceItem.type }}</td>
+                            <td>{{ deviceItem.model}}</td>
+                            <td>{{ deviceItem.ip}}</td>
+                            <td>{{ deviceItem.protocol_verbose}}</td>
+                            <!-- <td>{{ deviceItem.restapi_port }}</td> -->
+                            <!-- <td>{{ deviceItem.webui_port }}</td> -->
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="deviceItem.connection === true" class="btn btn-link" title="{{'Connected.'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="deviceItem.connection === false" class="btn btn-link" title="{{'Unconnected, please check the RESTful API service of device!'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <a class="icon-box" title="{{ 'License Information' | T }}" ng-click="device.licenseInfo(deviceItem)" style="margin-right: 2px;"><i class="array-licenese"></i></a>
+                                <a ng-if="deviceItem.connection === true" class="icon-box" title="{{ 'Web UI' | T }}" ng-href="{{deviceItem.webui}}" style="margin-right: 2px;" rel="noreferrer" target="_blank"><i class="array-webui"></i></a>
+                                <a ng-if="deviceItem.connection === true" class="icon-box" title="{{ 'Web console' | T }}" ng-click="device.terminal(deviceItem)" style="margin-right: 2px;"><i class="array-terminal"></i></a>
+                                <a ng-if="user_auth_data.device.device.save && deviceItem.connection === true" class="icon-box" title="{{ 'Save Configurations' | T }}" ng-click="device.saveConfigurations(deviceItem)" style="margin-right: 2px; font-size: 13px;"><i class="fa fa-floppy-o"></i></a>
+                                <a ng-if="user_auth_data.device.device.delete" class="icon-box" title="{{ 'Delete' | T }}" ng-click="device.deleteDevice(deviceItem)" style="margin-right: 2px;"><i class="array-delete"></i></a>
+                            </td>
+                        </tr>
                     </tbody>
                     <tfoot>
-                    <tr>
-                        <td colspan="{{device.gridColSpan}}" class="text-center">
-                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                                 st-page-change="onPageChange(newPage)"></div>
-                        </td>
-                    </tr>
+                        <tr>
+                            <td colspan="{{device.gridColSpan}}" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
                     </tfoot>
                 </table>
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.controller.js	(working copy)
@@ -49,14 +49,6 @@
 
             addViewModal.deviceTypeList = device_type_info.DEVICE_STD_LIST;
 
-            addViewModal.typeChanged = function () {
-                if (addViewModal.type === "AG" || addViewModal.type === "vxAG") {
-                    addViewModal.protocol = "xmlrpc";
-                } else {
-                    addViewModal.protocol = "restapi";
-                }
-            }
-
             addViewModal.close = function () {
                 $uibModalInstance.dismiss('cancel');
             };
@@ -257,4 +249,3 @@
 
         }
     ])
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.add.html	(working copy)
@@ -1,8 +1,8 @@
 <div>
     <div class="modal-header">
-        <button type="button" class="close" ng-click="deviceAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span>
-        </button>
-        <h6 class="modal-title">{{ 'Add New Device' | T}}</h6>
+        <!-- <div class="title">{{ 'Add New Device' | T}}</div> -->
+        <button type="button" class="close" ng-click="deviceAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title">{{ 'Add New Device' | T}}</h4>
 
     </div>
     <div class="modal-body">
\ No newline at end of file
@@ -10,14 +10,13 @@
             <div class="form-group">
                 <label for="name" class="col-md-3 control-label"><sup>*</sup>{{ 'Device Name' | T }}</label>
                 <div class="col-md-8">
-                    <input ng-verify="required:true, max:32, min:1, skip_chainese_verify:true" type="text"
-                           class="form-control" ng-model="deviceAdd.name">
+                    <input ng-verify="required:true, max:32, min:1, skip_chainese_verify:true" type="text" class="form-control" ng-model="deviceAdd.name">
                 </div>
             </div>
             <div class="form-group">
                 <label for="type" class="col-md-3 control-label"><sup>*</sup>{{ 'Device Type' | T }}</label>
                 <div class="col-md-8">
-                    <select ng-verify="required:true" name="type" class="form-control" ng-model="deviceAdd.type" ng-change="deviceAdd.typeChanged()">
+                    <select ng-verify="required:true" name="type" class="form-control" ng-model="deviceAdd.type">
                         <option value="">{{'--- Please Select ---' | T}}</option>
                         <option ng-repeat="row in deviceAdd.deviceTypeList" value="{{row}}">{{row}}</option>
                     </select>
\ No newline at end of file
@@ -40,10 +39,11 @@
                     <input ng-verify="required:true" type="ip" class="form-control ip-input" ng-model="deviceAdd.ip">
                 </div>
             </div>
+
             <div class="form-group">
                 <label class="col-md-3 control-label"><sup>*</sup>{{ 'Protocol' | T }}</label>
                 <div class="col-md-8">
-                    <label class="radio-inline" ng-if="deviceAdd.type !== 'AG' && deviceAdd.type !== 'vxAG'">
+                    <label class="radio-inline">
                         <input type="radio" name="choiceProtocol" ng-model="deviceAdd.protocol" value="restapi">REST API
                     </label>
                     <label class="radio-inline">
\ No newline at end of file
@@ -54,21 +54,17 @@
 
             <div ng-if="deviceAdd.protocol == 'restapi'">
                 <div class="form-group">
-                    <label for="restapi_port"
-                           class="col-md-3 control-label"><sup>*</sup>{{ 'RESTful API Port' | T}}</label>
+                    <label for="restapi_port" class="col-md-3 control-label"><sup>*</sup>{{ 'RESTful API Port' | T}}</label>
                     <div class="col-md-8">
-                        <input ng-verify="required:true, max_length:65535, min_length:0" type="number"
-                               class="form-control" ng-model="deviceAdd.port">
+                        <input ng-verify="required:true, max_length:65535, min_length:0" type="number" class="form-control" ng-model="deviceAdd.port">
                     </div>
                 </div>
                 <div class="form-group">
-                    <label for="restapi_account"
-                           class="col-md-3 control-label"><sup>*</sup>{{ 'Restful Account' | T}}</label>
+                    <label for="restapi_account" class="col-md-3 control-label"><sup>*</sup>{{ 'Restful Account' | T}}</label>
                     <div class="col-md-8">
                         <div class="account-wrap">
                             <i class="array-user"></i>
-                            <input ng-verify="required:true" type="text" class="form-control"
-                                   ng-model="deviceAdd.username" placeholder="{{ 'Username' | T}}">
+                            <input ng-verify="required:true" type="text" class="form-control" ng-model="deviceAdd.username" placeholder="{{ 'Username' | T}}">
                         </div>
                     </div>
                 </div>
\ No newline at end of file
@@ -77,8 +73,7 @@
                     <div class="col-md-offset-3 col-md-8">
                         <div class="account-wrap">
                             <i class="array-password"></i>
-                            <input ng-verify="required:true" type="password" class="form-control"
-                                   ng-model="deviceAdd.password" placeholder="{{ 'Password' | T}}">
+                            <input ng-verify="required:true" type="password" class="form-control" ng-model="deviceAdd.password" placeholder="{{ 'Password' | T}}">
                         </div>
                     </div>
                 </div>
\ No newline at end of file
@@ -87,8 +82,7 @@
                 <div class="form-group">
                     <label for="restapi_port" class="col-md-3 control-label"><sup>*</sup>{{ 'XML RPC Port' | T}}</label>
                     <div class="col-md-8">
-                        <input ng-verify="required:true, max_length:65535, min_length:0" type="number"
-                               class="form-control" ng-model="deviceAdd.port">
+                        <input ng-verify="required:true, max_length:65535, min_length:0" type="number" class="form-control" ng-model="deviceAdd.port">
                     </div>
                 </div>
                 <div class="form-group">
\ No newline at end of file
@@ -96,8 +90,7 @@
                     <div class="col-md-8">
                         <div class="account-wrap">
                             <i class="array-user"></i>
-                            <input type="text" class="form-control" ng-model="deviceAdd.username"
-                                   placeholder="{{ 'Username' | T}}">
+                            <input type="text" class="form-control" ng-model="deviceAdd.username" placeholder="{{ 'Username' | T}}">
                         </div>
                     </div>
                 </div>
\ No newline at end of file
@@ -106,8 +99,7 @@
                     <div class="col-md-offset-3 col-md-8">
                         <div class="account-wrap">
                             <i class="array-password"></i>
-                            <input type="password" class="form-control" ng-model="deviceAdd.password"
-                                   placeholder="{{ 'Password' | T}}">
+                            <input type="password" class="form-control" ng-model="deviceAdd.password" placeholder="{{ 'Password' | T}}">
                         </div>
                     </div>
                 </div>
\ No newline at end of file
@@ -116,15 +108,13 @@
             <div class="form-group">
                 <label for="gateway_domain" class="col-md-3 control-label">{{ 'Gateway Domain' | T}}</label>
                 <div class="col-md-8">
-                    <input ng-verify="required:false" type="text" class="form-control" ng-model="deviceAdd.domain"
-                           maxlength="128">
+                    <input ng-verify="required:false" type="text" class="form-control" ng-model="deviceAdd.domain" maxlength="128">
                 </div>
             </div>
             <div class="form-group">
                 <label for="location" class="col-md-3 control-label">{{ 'Location' | T}}</label>
                 <div class="col-md-8">
-                    <input ng-verify="required:false" type="text" class="form-control" ng-model="deviceAdd.location"
-                           maxlength="128">
+                    <input ng-verify="required:false" type="text" class="form-control" ng-model="deviceAdd.location" maxlength="128">
                 </div>
             </div>
             <div class="form-group" ng-if="false">
\ No newline at end of file
@@ -141,8 +131,7 @@
 
             <div class="form-group" ng-if="false">
                 <div class="col-md-offset-3 col-md-8">
-                    <input ng-verify="required:false" type="text" class="form-control ip-input"
-                           ng-model="deviceAdd.firewallIP">
+                    <input ng-verify="required:false" type="text" class="form-control ip-input" ng-model="deviceAdd.firewallIP">
                 </div>
             </div>
 
\ No newline at end of file
@@ -159,8 +148,7 @@
             </div>
             <div class="form-group" ng-if="false">
                 <div class="col-md-offset-3 col-md-8">
-                    <input ng-verify="required:false" type="text" class="form-control ip-input"
-                           ng-model="deviceAdd.intranetIP">
+                    <input ng-verify="required:false" type="text" class="form-control ip-input" ng-model="deviceAdd.intranetIP">
                 </div>
             </div>
 
\ No newline at end of file
@@ -169,8 +157,7 @@
                 <div class="col-md-8">
                     <div class="account-wrap">
                         <i class="array-user"></i>
-                        <input ng-verify="required:true" type="text" class="form-control"
-                               ng-model="deviceAdd.console_username" placeholder="{{ 'Username' | T}}">
+                        <input ng-verify="required:true" type="text" class="form-control" ng-model="deviceAdd.console_username" placeholder="{{ 'Username' | T}}">
                     </div>
                 </div>
             </div>
\ No newline at end of file
@@ -178,8 +165,7 @@
                 <div class="col-md-offset-3 col-md-8">
                     <div class="account-wrap">
                         <i class="array-password"></i>
-                        <input ng-verify="required:true" type="password" class="form-control"
-                               ng-model="deviceAdd.console_password" placeholder="{{ 'Password' | T}}">
+                        <input ng-verify="required:true" type="password" class="form-control" ng-model="deviceAdd.console_password" placeholder="{{ 'Password' | T}}">
                     </div>
                 </div>
             </div>
\ No newline at end of file
@@ -188,12 +174,10 @@
                 <label class="col-md-3 control-label"><sup>*</sup>{{ 'Device Group' | T }}</label>
                 <div class="col-md-8">
                     <label class="radio-inline">
-                        <input type="radio" name="choiceDeviceGroup" ng-model="deviceAdd.deviceGroupFrom"
-                               value="created">{{ 'Created' | T }}
+                        <input type="radio" name="choiceDeviceGroup" ng-model="deviceAdd.deviceGroupFrom" value="created">{{ 'Created' | T }}
                     </label>
                     <label class="radio-inline">
-                        <input type="radio" name="choiceDeviceGroup" ng-model="deviceAdd.deviceGroupFrom"
-                               value="new">{{ 'New' | T}}
+                        <input type="radio" name="choiceDeviceGroup" ng-model="deviceAdd.deviceGroupFrom" value="new">{{ 'New' | T}}
                     </label>
                 </div>
             </div>
\ No newline at end of file
@@ -218,23 +202,20 @@
             <div class="form-group">
                 <label for="webui_port" class="col-md-3 control-label">{{ 'WebUI Port' | T}}</label>
                 <div class="col-md-8">
-                    <input ng-verify="required:true, min_length:1, max_length:65535" type="number" class="form-control"
-                           ng-model="deviceAdd.webui_port">
+                    <input ng-verify="required:true, min_length:1, max_length:65535" type="number" class="form-control" ng-model="deviceAdd.webui_port">
                 </div>
             </div>
             <div class="form-group">
                 <label for="enable_password" class="col-md-3 control-label">{{ 'Enable Password' | T}}</label>
                 <div class="col-md-8">
-                    <input ng-verify="required:false" type="password" class="form-control"
-                           ng-model="deviceAdd.enable_password">
+                    <input ng-verify="required:false" type="password" class="form-control" ng-model="deviceAdd.enable_password">
                 </div>
             </div>
             <div class="form-group">
                 <label for="enable" class="col-md-3 control-label">{{ 'Enable Log' | T}}</label>
                 <div class="col-md-8">
                     <label>
-                        <input type="checkbox" bs-switch class="switch" ng-model="deviceAdd.log_enable"
-                               switch-active="true" resettable>
+                        <input type="checkbox" bs-switch class="switch" ng-model="deviceAdd.log_enable" switch-active="true" resettable>
                     </label>
                 </div>
             </div>
\ No newline at end of file
@@ -242,8 +223,7 @@
                 <label for="backup_enable" class="col-md-3 control-label">{{ 'Backup Configuration' | T}}</label>
                 <div class="col-md-8">
                     <label>
-                        <input type="checkbox" bs-switch class="switch" ng-model="deviceAdd.backup_enable"
-                               switch-active="true" resettable>
+                        <input type="checkbox" bs-switch class="switch" ng-model="deviceAdd.backup_enable" switch-active="true" resettable>
                     </label>
                 </div>
             </div>
\ No newline at end of file
@@ -254,9 +234,7 @@
 
             <div class="form-group">
                 <div class="col-md-offset-3 col-md-8">
-                    <button ng-verify="control:'addDeviceForm'" class="btn btn-primary" ng-click="deviceAdd.submit()"
-                            id="addSubmit">{{ 'Create' | T}}
-                    </button>
+                    <button ng-verify="control:'addDeviceForm'" class="btn btn-primary" ng-click="deviceAdd.submit()" id="addSubmit">{{ 'Create' | T}}</button>
                     <button class="btn btn-default" ng-click="deviceAdd.close()">{{ 'Cancel' | T}}</button>
                 </div>
             </div>
\ No newline at end of file
@@ -271,5 +249,4 @@
         margin-top: 30px;
         width: 940px;
     }
-</style>
-
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.build_check.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.build_check.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.build_check.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="devicecheck.modalClose()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6 class="modal-title">{{ 'Check Device Build Info' | T}}</h6>
+        <h4 class="modal-title">{{ 'Check Device Build Info' | T}}</h4>
     </div>
     <div class="modal-body">
         <div id="ssl-check" class="widget">
\ No newline at end of file
@@ -47,4 +47,4 @@
     .modal-dialog {
         width: 800px;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.license.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.license.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device/modal/device.license.html	(working copy)
@@ -1,7 +1,7 @@
 <div>
     <div class="modal-header">
         <button type="button" class="close" ng-click="license.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-licenese"></i>{{ 'License Status' | T}} - {{ license.deviceName }}</h6>
+        <h4><i class="array-licenese"></i>{{ 'License Status' | T}} - {{ license.deviceName }}</h4>
     </div>
     <div class="modal-body" ng-if="!license.updateSta">
         <div class="widget">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group.html	(working copy)
@@ -1,17 +1,16 @@
-<div class="row">
-    <div class="col-md-12">
-        <div class="widget">
-            <div class="widget-header">
-                <span class="tab-header-1">{{ 'Device Group' | T }}</span>
-            </div>
+<div class="container-fluid">
+    <div class="row">
+        <rd-widget>
+            <rd-widget-header title="{{'Device Group'|T}}">
+            </rd-widget-header>
             <div class="table-toolbar">
                 <div class="">
                     <div class="btn-group">
                         <button title="{{'Refresh'|T}}" class="btn btn-link hive_enable_active"
-                                ng-click="table.refresh()"><i class="fa fa-refresh an-tab-icon"></i></button>
+                                ng-click="table.refresh()"><i class="fa fa-refresh"></i></button>
                         <button ng-if="role_info.user_type != 'Device Admin'" title="{{'Add a Device Group'|T}}"
                                 class="btn btn-link" ng-click="table.showGroupAddModal()"><i
-                            class="fa fa-plus-circle an-tab-icon"></i></button>
+                            class="fa fa-plus-circle"></i></button>
                     </div>
                 </div>
                 <div class="btn-group pull-right"></div>
@@ -22,11 +21,9 @@
                         <thead>
                         <tr>
                             <th>No.</th>
-                            <th st-sort="name" style="cursor: pointer;">{{'Name' | T}}</th>
-                            <th st-sort="device" style="cursor: pointer; min-width: 120px;">
-                                {{'Managed Devices' | T}}
-                            </th>
-                            <th>{{'Action' | T}}</th>
+                            <th st-sort="name" style="cursor: pointer;">{{'Name'|T}}</th>
+                            <th st-sort="device" style="cursor: pointer; min-width: 120px;">{{'Managed Devices'|T}}</th>
+                            <th>{{'Action'|T}}</th>
                         </tr>
                         </thead>
                         <tbody>
@@ -40,9 +37,8 @@
                                 <!--                                   title="{{'Manage Devices'|T}}" ng-click="table.manage(row)"><i-->
                                 <!--                                    class="array-edit"></i></a>-->
                                 <!--                                &nbsp;&nbsp;-->
-                                <a ng-if="role_info.user_type != 'Device Admin'" class="icon-box"
-                                   style="cursor:pointer"
-                                   title="{{'Delete'|T}}" ng-click="table.delete(row)"><i class="array-delete an-row-icon"></i></a>
+                                <a ng-if="role_info.user_type != 'Device Admin'" class="icon-box" style="cursor:pointer"
+                                   title="{{'Delete'|T}}" ng-click="table.delete(row)"><i class="array-delete"></i></a>
                             </td>
                         </tr>
                         </tbody>
@@ -56,7 +52,6 @@
                          st-page-change="onPageChange(newPage)"></div>
                 </div>
             </div>
-            </rd-widget>
-        </div>
+        </rd-widget>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_add.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="deviceGroupAdd.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Add a Device Group'|T}}</h6>
+    <h4 class="modal-title">{{'Add a Device Group'|T}}</h4>
 </div>
 
 <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_manage.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_manage.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/device_group/device_group_manage.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="deviceGroupManage.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Bind Devices'|T}}</h6>
+    <h4 class="modal-title">{{'Bind Devices'|T}}</h4>
 </div>
 
 <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/index.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/index.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/index.html	(working copy)
@@ -1,15 +1,16 @@
-<div class="row">
-    <div class="col-md-12">
+<div>
+    <div>
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/extension/list') }">
-                <a ui-sref="index.extension.list"><span class="tab-header">{{ 'Extensions' | T }}</span></a>
+                <a ui-sref="index.extension.list">{{ 'Extensions' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/extension/log') }">
-                <a ui-sref="index.extension.log"><span class="tab-header">{{ 'Logs' | T }}</span></a>
+                <a ui-sref="index.extension.log">{{ 'Logs' | T }}</a>
             </li>
         </ul>
     </div>
-    <div class="content-wrapper">
+    <br>
+    <div class="">
         <div class="" ng-show="url_contain('/extension/list')" ui-view="list"></div>
         <div class="" ng-show="url_contain('/extension/log')" ui-view="log"></div>
     </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/list/list.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/list/list.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/list/list.html	(working copy)
@@ -1,198 +1,52 @@
-<div class="col-md-12 col-lg-12 col-sm-12">
-    <div class="widget">
-        <div class="widget-header">
-            <span ng-if="!extensionList.batch_mode" class="tab-header-1">{{'Installed Extensions' | T}}</span>
-            <span ng-if="extensionList.batch_mode"
-                  class="tab-header-1">{{'Installed Extensions (edit mode)' | T}}</span>
-        </div>
-        <div class="table-toolbar"
-             ng-if="!extensionList.batch_mode && extensionList.display == 'metro' || extensionList.batch_mode">
-            <div class="btn-group">
-                <button ng-if="!extensionList.batch_mode && extensionList.display == 'metro'" class="btn btn-link"
-                        title="{{'Batch mode'|T}}" ng-click="extensionList.enter_batch_mode()"><i
-                    class="fa fa-wrench an-row-icon"></i></button>
-                <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.uninstall"
-                        ng-disabled="extensionList.selected_extension_name_list.length == 0 || extensionList.selected_extension_name_list.length > 1"
-                        class="btn btn-link" title="{{'Uninstall'|T}}" ng-click="extensionList.uninstall()"><i
-                    class="fa fa-trash an-row-icon"></i></button>
-                <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.enable"
-                        ng-disabled="extensionList.selected_extension_name_list.length == 0" class="btn btn-link"
-                        title="{{'Enable'|T}}" ng-click="extensionList.enable()"><i class="fa fa-play an-row-icon"></i>
-                </button>
-                <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.disable"
-                        ng-disabled="extensionList.selected_extension_name_list.length == 0" class="btn btn-link"
-                        title="{{'Disable'|T}}" ng-click="extensionList.disable()"><i
-                    class="fa fa-stop an-row-icon"></i></button>
-                <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.update"
-                        ng-disabled="extensionList.selected_extension_name_list.length == 0 || extensionList.selected_extension_name_list.length > 1"
-                        class="btn btn-link" title="{{'Update'|T}}" ng-click="extensionList.update()"><i
-                    class="fa fa-arrow-up an-row-icon"></i></button>
-                <button ng-if="extensionList.batch_mode" class="btn btn-link" title="{{'Exit edit mode'|T}}"
-                        ng-click="extensionList.exit_batch_mode()"><i class="fa fa-reply an-row-icon"></i></button>
-            </div>
-        </div>
-        <div class="panel panel-default" style="border: none;" ng-if="extensionList.display == 'metro'">
-            <div class="panel-body">
-                <div class="tile-header">
-                    <div class="tile-off">
-                        <span>{{'Disabled' | T}}: </span>
-                    </div>
-                    <div class="tile-on">
-                        <span>{{'Enabled' | T}}: </span>
-                    </div>
-                    <div ng-if="extensions_list" style="margin-top: 10px;">
-                        <select ng-model="extensionList.sort_rule_key"
-                                ng-change="extensionList.sort(extensionList.sort_rule_key)">
-                            <option ng-repeat="each in extensionList.sort_rule_keys" value="{{each}}">{{each | T}}
-                            </option>
-                        </select>
-                    </div>
-                </div>
-                <br>
-                <div class="tile-area no-padding">
-                    <div class="tile-container">
-                        <div style="margin-bottom: 15px;text-align: center" ng-hide="extensions_list"><img
-                            src="app/images/loading.gif"></div>
-                        <div ng-model="extensions_list" ng-if="extensionList.batch_mode"
-                             ng-repeat="each_extension in extensions_list" class="va-cube tile-small"
-                             ng-click="extensionList.select_extension(each_extension.name)"
-                             ng-class="{'element-selected':each_extension.selected}"
-                             ng-style="extensionList.get_extension_style(each_extension)">
-                                <span>
-                                    <i ng-if="each_extension.updates" class="fa fa-arrow-up an-row-icon"></i>
-                                </span>
-                            <div class="capacity-content">
-                                <span>{{each_extension.name}}</span>
-                            </div>
-                        </div>
-                        <div ng-model="extensions_list" ng-if="!extensionList.batch_mode"
-                             ng-repeat="each_extension in extensions_list" class="va-cube tile-small"
-                             data-role="popover" data-popover-mode="hover" data-popover-position="right"
-                             data-popover-text="{{each_extension.popover_text}}" data-popover-background="bg-cyan"
-                             data-popover-color="fg-white" ng-style="extensionList.get_extension_style(each_extension)">
-                                <span>
-                                    <i ng-if="each_extension.updates" class="fa fa-arrow-up an-row-icon"></i>
-                                </span>
-                            <div class="capacity-content">
-                                <span>{{each_extension.name}}</span>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <rd-widget ng-if="extensionList.display == 'list'">
-            <div class="table-toolbar">
-                <div class="btn-group">
-                    <button class="btn btn-link" title="{{ 'Refresh' | T }}"
-                            ng-click="extensionList.refreshInstallList()"><i class="fa fa-refresh an-tab-icon"></i>
-                    </button>
-                </div>
-            </div>
-            <div class="table-container" st-table="displayedCollection" st-safe-src="extensions_list">
-                <div class="table-responsive table-content">
-                    <table class="table table-striped table-hover">
-                        <thead>
-                        <tr>
-                            <th>{{'No.' | T}}</th>
-                            <th st-sort="name" style="cursor: pointer;">{{'Name' | T}}</th>
-                            <th>{{'Description' | T}}</th>
-                            <th st-sort="version" style="cursor: pointer;">{{'Version' | T}}</th>
-                            <th>{{'Size' | T}}</th>
-                            <th st-sort="install_date" style="cursor: pointer;">{{'Last Update Time' | T}}</th>
-                            <th st-sort="status" style="cursor: pointer;">{{'Status' | T}}</th>
-                            <th st-sort="updates" style="cursor: pointer;">{{'Available Updates' | T}}</th>
-                            <th>{{'Action' | T}}</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr ng-repeat="row in displayedCollection">
-                            <td>{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                            <td>{{row.name}}</td>
-                            <td>{{row.description}}</td>
-                            <td>{{row.version}}<i ng-if="row.ver_diff" class="fa fa-exclamation-circle"
-                                                  style="color: #e02f44; margin-left: 3px;" aria-hidden="true"
-                                                  tooltip-placement="top"
-                                                  uib-tooltip="{{'The current extension package major version number is inconsistent with the system major version number. Please update this extension.' | T}}"></i>
-                            </td>
-                            <td>{{row.size}}</td>
-                            <td>{{row.install_date | date: 'yyyy-MM-dd HH:mm:ss' : '+0800'}}</td>
-                            <td>{{row.status | T}}</td>
-                            <!-- <td>{{row.install_date}}</td> -->
-                            <td ng-if="row.updates">{{row.updates}}</td>
-                            <td ng-if="!row.updates">N/A</td>
-                            <td>
-                                <div class="btn-group">
-                                    <button ng-if="user_auth_data.system.extension.update" ng-disabled="!row.updates"
-                                            class="btn btn-link" title="{{'Update'|T}}"
-                                            ng-click="extensionList.update(row)"><i
-                                        class="fa fa-arrow-up an-row-icon"></i></button>
-                                    <button ng-if="user_auth_data.system.extension.enable"
-                                            ng-disabled="row.status == 'enabled'" class="btn btn-link"
-                                            title="{{'Enable'|T}}" ng-click="extensionList.enable(row)"
-                                            style="margin-left: 6px;"><i class="fa fa-play an-row-icon"></i></button>
-                                    <button ng-if="user_auth_data.system.extension.disable"
-                                            ng-disabled="row.status == 'disabled'" class="btn btn-link"
-                                            title="{{'Disable'|T}}" ng-click="extensionList.disable(row)"
-                                            style="margin-left: 6px;"><i class="fa fa-stop an-row-icon"></i></button>
-                                    <button ng-if="user_auth_data.system.extension.uninstall" class="btn btn-link"
-                                            title="{{'Uninstall'|T}}" ng-click="extensionList.uninstall(row)"
-                                            style="margin-left: 6px;"><i class="fa fa-trash an-row-icon"></i></button>
-                                </div>
-                            </td>
-                        </tr>
-                        </tbody>
-                    </table>
-                </div>
-                <div style="margin-bottom: 15px;text-align: center" ng-hide="extensions_list"><img
-                    src="app/images/loading.gif"></div>
-                <div class="table-pagination">
-                    <div st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"
-                         st-pagination="" st-template="app/modules/common/templates/custom_pagination.html"></div>
-                </div>
-            </div>
-        </rd-widget>
-    </div>
-    <br ng-if="extensionList.display == 'metro'">
-    <div class="recommend">
+<div class="row">
+    <div class="col-md-12 col-lg-12 col-sm-12">
+        <!-- <button ng-disabled="extensionList.batch_mode" class="btn btn-link" title="{{'Change view'|T}}" ng-click="extensionList.change_display()"><i class="fa fa-binoculars"></i></button> -->
         <div class="widget">
             <div class="widget-header">
-                <span class="tab-header-1">{{'Available Extensions' | T}}</span>
+                <span ng-if="!extensionList.batch_mode">{{'Installed Extensions'|T}}</span>
+                <span ng-if="extensionList.batch_mode">{{'Installed Extensions (edit mode)'|T}}</span>
             </div>
-            <div class="table-toolbar"
-                 ng-if="!extensionList.batch_mode2 && extensionList.display == 'metro' || extensionList.batch_mode2">
+            <div class="table-toolbar" ng-if="!extensionList.batch_mode && extensionList.display == 'metro' || extensionList.batch_mode">
                 <div class="btn-group">
-                    <button ng-if="!extensionList.batch_mode2 && extensionList.display == 'metro'" class="btn btn-link"
-                            title="{{'Batch mode'|T}}" ng-click="extensionList.enter_batch_mode2()"><i
-                        class="fa fa-wrench an-row-icon"></i></button>
-                    <button ng-if="extensionList.batch_mode2 && user_auth_data.system.extension.install"
-                            ng-disabled="extensionList.selected_extension_name_list2.length == 0 || extensionList.selected_extension_name_list2.length > 1"
-                            class="btn btn-link" title="{{'Install'|T}}" ng-click="extensionList.install()">
-                        {{'Install' | T}}
-                    </button>
-                    <button ng-if="extensionList.batch_mode2" class="btn btn-link" title="{{'Exit edit mode'|T}}"
-                            ng-click="extensionList.exit_batch_mode2()"><i class="fa fa-reply an-row-icon"></i></button>
+                    <button ng-if="!extensionList.batch_mode && extensionList.display == 'metro'" class="btn btn-link" title="{{'Batch mode'|T}}" ng-click="extensionList.enter_batch_mode()"><i class="fa fa-wrench"></i></button>
+                    <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.uninstall" ng-disabled="extensionList.selected_extension_name_list.length == 0 || extensionList.selected_extension_name_list.length > 1" class="btn btn-link" title="{{'Uninstall'|T}}" ng-click="extensionList.uninstall()"><i class="fa fa-trash"></i></button>
+                    <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.enable" ng-disabled="extensionList.selected_extension_name_list.length == 0" class="btn btn-link" title="{{'Enable'|T}}" ng-click="extensionList.enable()"><i class="fa fa-play"></i></button>
+                    <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.disable" ng-disabled="extensionList.selected_extension_name_list.length == 0" class="btn btn-link" title="{{'Disable'|T}}" ng-click="extensionList.disable()"><i class="fa fa-stop"></i></button>
+                    <button ng-if="extensionList.batch_mode && user_auth_data.system.extension.update" ng-disabled="extensionList.selected_extension_name_list.length == 0 || extensionList.selected_extension_name_list.length > 1" class="btn btn-link" title="{{'Update'|T}}"  ng-click="extensionList.update()"><i class="fa fa-arrow-up"></i></button>
+                    <button ng-if="extensionList.batch_mode" class="btn btn-link" title="{{'Exit edit mode'|T}}" ng-click="extensionList.exit_batch_mode()"><i class="fa fa-reply"></i></button>
                 </div>
             </div>
             <div class="panel panel-default" style="border: none;" ng-if="extensionList.display == 'metro'">
                 <div class="panel-body">
+                    <div class="tile-header">
+                        <div class="tile-off">
+                            <span>{{'Disabled'|T}}: </span>
+                        </div>
+                        <div class="tile-on">
+                            <span>{{'Enabled'|T}}: </span>
+                        </div>
+                        <div ng-if="extensions_list" style="margin-top: 10px;">
+                            <select ng-model="extensionList.sort_rule_key" ng-change="extensionList.sort(extensionList.sort_rule_key)">
+                                <option ng-repeat="each in extensionList.sort_rule_keys" value="{{each}}">{{each|T}}</option>
+                            </select>
+                        </div>
+                    </div>
+                    <br>
                     <div class="tile-area no-padding">
                         <div class="tile-container">
-                            <div ng-model="extensions_list" ng-if="extensionList.batch_mode2"
-                                 ng-repeat="each_extension in availableExtensionsList" class="va-cube tile-small"
-                                 ng-click="extensionList.select_extension2(each_extension.name)"
-                                 ng-class="{'element-selected':each_extension.selected}"
-                                 ng-style="extensionList.get_extension_style(each_extension)">
+                            <div style="margin-bottom: 15px;text-align: center" ng-hide="extensions_list"><img src="app/images/loading.gif"></div>
+                            <div ng-model="extensions_list" ng-if="extensionList.batch_mode" ng-repeat="each_extension in extensions_list" class="va-cube tile-small" ng-click="extensionList.select_extension(each_extension.name)" ng-class="{'element-selected':each_extension.selected}" ng-style="extensionList.get_extension_style(each_extension)">
+                                <span>
+                                    <i ng-if="each_extension.updates" class="fa fa-arrow-up"></i>
+                                </span>
                                 <div class="capacity-content">
                                     <span>{{each_extension.name}}</span>
                                 </div>
                             </div>
-                            <div ng-model="availableExtensionsList" ng-if="!extensionList.batch_mode2"
-                                 ng-repeat="each_extension in availableExtensionsList" class="va-cube tile-small"
-                                 data-role="popover" data-popover-mode="hover" data-popover-position="right"
-                                 data-popover-text="{{each_extension.popover_text}}" data-popover-background="bg-cyan"
-                                 data-popover-color="fg-white"
-                                 ng-style="extensionList.get_extension_style(each_extension)">
+                            <div ng-model="extensions_list" ng-if="!extensionList.batch_mode" ng-repeat="each_extension in extensions_list" class="va-cube tile-small" data-role="popover" data-popover-mode="hover" data-popover-position="right" data-popover-text="{{each_extension.popover_text}}" data-popover-background="bg-cyan" data-popover-color="fg-white" ng-style="extensionList.get_extension_style(each_extension)">
+                                <span>
+                                    <i ng-if="each_extension.updates" class="fa fa-arrow-up"></i>
+                                </span>
                                 <div class="capacity-content">
                                     <span>{{each_extension.name}}</span>
                                 </div>
\ No newline at end of file
@@ -202,124 +56,191 @@
                 </div>
             </div>
             <rd-widget ng-if="extensionList.display == 'list'">
-                <div ng-if="!extensionList.repo_reachable">
-                    <form class="form-horizontal">
-                        {{ extensionList.available_repo_error | T}}
-                    </form>
-                </div>
-                <div ng-if="extensionList.availableloading" style="margin-bottom: 15px;text-align: center"><img
-                    src="app/images/loading.gif"></div>
-                <div class="table-toolbar" ng-if="extensionList.repo_reachable">
+                <div class="table-toolbar">
                     <div class="btn-group">
-                        <button class="btn btn-link" title="{{ 'Refresh' | T }}"
-                                ng-click="extensionList.refreshAvailableList()"><i
-                            class="fa fa-refresh an-tab-icon"></i></button>
+                        <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="extensionList.refreshInstallList()"><i class="fa fa-refresh"></i></button>
                     </div>
                 </div>
-                <div ng-if="extensionList.repo_reachable" class="table-container" st-table="displayedCollection"
-                     st-safe-src="availableExtensionsList">
+                <div class="table-container" st-table="displayedCollection" st-safe-src="extensions_list">
                     <div class="table-responsive table-content">
                         <table class="table table-striped table-hover">
                             <thead>
-                            <tr>
-                                <th>{{'No.' | T}}</th>
-                                <th st-sort="name" style="cursor: pointer;">{{'Name' | T}}</th>
-                                <th>{{'Arch' | T}}</th>
-                                <th st-sort="version" style="cursor: pointer;">{{'Version' | T}}</th>
-                                <th>{{'Release' | T}}</th>
-                                <th>{{'Size' | T}}</th>
-                                <th>{{'Repo' | T}}</th>
-                                <th>{{'Summary' | T}}</th>
-                                <!-- <th>{{'URL'|T}}</th> -->
-                                <!-- <th>{{'License'|T}}</th> -->
-                                <th>{{'Description' | T}}</th>
-                            </tr>
+                                <tr>
+                                    <th>{{'No.'|T}}</th>
+                                    <th st-sort="name" style="cursor: pointer;">{{'Name'|T}}</th>
+                                    <th>{{'Description'|T}}</th>
+                                    <th st-sort="version" style="cursor: pointer;">{{'Version'|T}}</th>
+                                    <th>{{'Size'|T}}</th>
+                                    <th st-sort="install_date" style="cursor: pointer;">{{'Last Update Time'|T}}</th>
+                                    <th st-sort="status" style="cursor: pointer;">{{'Status'|T}}</th>
+                                    <th st-sort="updates" style="cursor: pointer;">{{'Available Updates'|T}}</th>
+                                    <th>{{'Action'|T}}</th>
+                                </tr>
                             </thead>
                             <tbody>
-                            <tr ng-repeat="row in displayedCollection">
-                                <td>{{$index + 1}}</td>
-                                <td>{{row.name}}</td>
-                                <td>{{row.arch}}</td>
-                                <td>{{row.version}}</td>
-                                <td>{{row.release}}</td>
-                                <td>{{row.size}}</td>
-                                <td>{{row.repo}}</td>
-                                <td>{{row.summary}}</td>
-                                <!-- <td>{{row.url}}</td> -->
-                                <!-- <td>{{row.license}}</td> -->
-                                <td>{{row.description}}</td>
-                                <td>
-                                    <div class="btn-group">
-                                        <button ng-if="user_auth_data.system.extension.install" title="{{'Install'|T}}"
-                                                class="btn btn-link" ng-click="extensionList.install(row)">
-                                            {{'Install' | T}}
-                                        </button>
-                                    </div>
-                                </td>
-                            </tr>
+                                <tr ng-repeat="row in displayedCollection">
+                                    <td>{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                                    <td>{{row.name}}</td>
+                                    <td>{{row.description}}</td>
+                                    <td>{{row.version}}<i ng-if="row.ver_diff" class="fa fa-exclamation-circle" style="color: #e02f44; margin-left: 3px;" aria-hidden="true" tooltip-placement="top" uib-tooltip="{{'The current extension package major version number is inconsistent with the system major version number. Please update this extension.' | T}}"></i></td>
+                                    <td>{{row.size}}</td>
+                                    <td>{{row.install_date| date : 'yyyy-MM-dd HH:mm:ss' : '+0800'}}</td>
+                                    <td>{{row.status|T}}</td>
+                                    <!-- <td>{{row.install_date}}</td> -->
+                                    <td ng-if="row.updates">{{row.updates}}</td>
+                                    <td ng-if="!row.updates">N/A</td>
+                                    <td>
+                                        <div class="btn-group">
+                                            <button ng-if="user_auth_data.system.extension.update" ng-disabled="!row.updates" class="btn btn-link" title="{{'Update'|T}}" ng-click="extensionList.update(row)"><i class="fa fa-arrow-up"></i></button>
+                                            <button ng-if="user_auth_data.system.extension.enable" ng-disabled="row.status == 'enabled'" class="btn btn-link" title="{{'Enable'|T}}" ng-click="extensionList.enable(row)" style="margin-left: 6px;"><i class="fa fa-play"></i></button>
+                                            <button ng-if="user_auth_data.system.extension.disable" ng-disabled="row.status == 'disabled'" class="btn btn-link" title="{{'Disable'|T}}" ng-click="extensionList.disable(row)" style="margin-left: 6px;"><i class="fa fa-stop"></i></button>
+                                            <button ng-if="user_auth_data.system.extension.uninstall" class="btn btn-link" title="{{'Uninstall'|T}}" ng-click="extensionList.uninstall(row)" style="margin-left: 6px;"><i class="fa fa-trash"></i></button>
+                                        </div>
+                                    </td>
+                                </tr>
                             </tbody>
                         </table>
                     </div>
-                    <div style="margin-bottom: 15px;text-align: center" ng-hide="availableExtensionsList"><img
-                        src="app/images/loading.gif"></div>
+                    <div style="margin-bottom: 15px;text-align: center" ng-hide="extensions_list"><img src="app/images/loading.gif"></div>
                     <div class="table-pagination">
-                        <div st-items-by-page="20" st-pagination=""
-                             st-template="app/modules/common/templates/custom_pagination.html"></div>
+                        <div st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)" st-pagination="" st-template="app/modules/common/templates/custom_pagination.html"></div>
                     </div>
                 </div>
             </rd-widget>
         </div>
-    </div>
-    <div class="widget" ng-if="user_auth_data.system.extension.update">
-        <div class="widget-header">
-            <span class="tab-header-1">{{'Update Extensions Manually' | T}}</span>
-        </div>
-        <rd-widget-body class="no-padding">
-            <div>
-                <form class="form-horizontal" name="updateManuallyForm" unsaved-warning-form verify-scope="tipStyle: 1">
-                    <div class="form-group">
-                        <label class="col-md-3 control-label">{{'Type' | T}}</label>
-                        <div class="col-md-5">
-                            <select name="type" class="form-control" ng-model="extensionList.type">
-                                <option value="url">{{ 'URL' | T}}</option>
-                                <option value="local">{{ 'Local' | T}}</option>
-                            </select>
-                        </div>
+        <br ng-if="extensionList.display == 'metro'">
+        <div class="recommend">
+            <div class="widget">
+                <div class="widget-header">
+                    <span>{{'Available Extensions'|T}}</span>
+                </div>
+                <div class="table-toolbar" ng-if="!extensionList.batch_mode2 && extensionList.display == 'metro' || extensionList.batch_mode2">
+                    <div class="btn-group">
+                        <button ng-if="!extensionList.batch_mode2 && extensionList.display == 'metro'" class="btn btn-link" title="{{'Batch mode'|T}}" ng-click="extensionList.enter_batch_mode2()"><i class="fa fa-wrench"></i></button>
+                        <button ng-if="extensionList.batch_mode2 && user_auth_data.system.extension.install" ng-disabled="extensionList.selected_extension_name_list2.length == 0 || extensionList.selected_extension_name_list2.length > 1" class="btn btn-link" title="{{'Install'|T}}"  ng-click="extensionList.install()">{{'Install'|T}}</button>
+                        <button ng-if="extensionList.batch_mode2" class="btn btn-link" title="{{'Exit edit mode'|T}}" ng-click="extensionList.exit_batch_mode2()"><i class="fa fa-reply"></i></button>
                     </div>
-                    <div class="form-group" ng-if="extensionList.type=='url'">
-                        <label class="col-md-3 control-label">{{'URL' | T}}</label>
-                        <div class="col-md-5">
-                            <input ng-verify type="text" class="form-control" placeholder=""
-                                   ng-model="extensionList.url">
+                </div>
+                <div class="panel panel-default" style="border: none;" ng-if="extensionList.display == 'metro'">
+                    <div class="panel-body">
+                        <div class="tile-area no-padding">
+                            <div class="tile-container">
+                                <div ng-model="extensions_list" ng-if="extensionList.batch_mode2" ng-repeat="each_extension in availableExtensionsList" class="va-cube tile-small" ng-click="extensionList.select_extension2(each_extension.name)" ng-class="{'element-selected':each_extension.selected}" ng-style="extensionList.get_extension_style(each_extension)">
+                                    <div class="capacity-content">
+                                        <span>{{each_extension.name}}</span>
+                                    </div>
+                                </div>
+                                <div ng-model="availableExtensionsList" ng-if="!extensionList.batch_mode2" ng-repeat="each_extension in availableExtensionsList" class="va-cube tile-small" data-role="popover" data-popover-mode="hover" data-popover-position="right" data-popover-text="{{each_extension.popover_text}}" data-popover-background="bg-cyan" data-popover-color="fg-white" ng-style="extensionList.get_extension_style(each_extension)">
+                                    <div class="capacity-content">
+                                        <span>{{each_extension.name}}</span>
+                                    </div>
+                                </div>
+                            </div>
                         </div>
                     </div>
-                    <div class="form-group" ng-if="extensionList.type=='local'">
-                        <label class="col-md-3 control-label">{{'Local' | T}}</label>
-                        <div class="col-md-5">
-                            <div class="local">
-                                <input type="text" id="textfield" class="form-control">
-                                <button class="btn btn-primary" style="position: absolute; top: 0; right: 15px;">
-                                    {{'Browse' | T}}
-                                </button>
-                                <input type="file" id="uploadfield" class="file form-control" nv-file-select
-                                       uploader="extensionList.file_uploader"
-                                       onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
-                            </div>
+                </div>
+                <rd-widget ng-if="extensionList.display == 'list'">
+                    <div ng-if="!extensionList.repo_reachable">
+                        <form class="form-horizontal">
+                            {{ extensionList.available_repo_error | T}}
+                        </form>
+                    </div>
+                    <div ng-if="extensionList.availableloading" style="margin-bottom: 15px;text-align: center"><img src="app/images/loading.gif"></div>
+                    <div class="table-toolbar" ng-if="extensionList.repo_reachable">
+                        <div class="btn-group">
+                            <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="extensionList.refreshAvailableList()"><i class="fa fa-refresh"></i></button>
                         </div>
                     </div>
-                    <div class="form-group" ng-show="updateManuallyForm.$dirty">
-                        <div class="col-md-offset-3 col-md-9">
-                            <button ng-verify="control:'updateManuallyForm'" type="submit" class="btn btn-primary"
-                                    ng-click="extensionList.updateExtensionManually(updateManuallyForm)">{{'Update' | T}}
-                            </button>
-                            <button type="reset" class="btn btn-default btn-cancel"
-                                    ng-click="updateManuallyForm.$dirty=false;extensionList.cancel()">{{'Cancel' | T}}
-                            </button>
+                    <div ng-if="extensionList.repo_reachable" class="table-container" st-table="displayedCollection" st-safe-src="availableExtensionsList">
+                        <div class="table-responsive table-content">
+                            <table class="table table-striped table-hover">
+                                <thead>
+                                    <tr>
+                                        <th>{{'No.'|T}}</th>
+                                        <th st-sort="name" style="cursor: pointer;">{{'Name'|T}}</th>
+                                        <th>{{'Arch'|T}}</th>
+                                        <th st-sort="version" style="cursor: pointer;">{{'Version'|T}}</th>
+                                        <th>{{'Release'|T}}</th>
+                                        <th>{{'Size'|T}}</th>
+                                        <th>{{'Repo'|T}}</th>
+                                        <th>{{'Summary'|T}}</th>
+                                        <!-- <th>{{'URL'|T}}</th> -->
+                                        <!-- <th>{{'License'|T}}</th> -->
+                                        <th>{{'Description'|T}}</th>
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    <tr ng-repeat="row in displayedCollection">
+                                        <td>{{$index + 1}}</td>
+                                        <td>{{row.name}}</td>
+                                        <td>{{row.arch}}</td>
+                                        <td>{{row.version}}</td>
+                                        <td>{{row.release}}</td>
+                                        <td>{{row.size}}</td>
+                                        <td>{{row.repo}}</td>
+                                        <td>{{row.summary}}</td>
+                                        <!-- <td>{{row.url}}</td> -->
+                                        <!-- <td>{{row.license}}</td> -->
+                                        <td>{{row.description}}</td>
+                                        <td>
+                                            <div class="btn-group">
+                                                <button ng-if="user_auth_data.system.extension.install" title="{{'Install'|T}}" class="btn btn-link" ng-click="extensionList.install(row)">{{'Install'|T}}</button>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
                         </div>
+                        <div style="margin-bottom: 15px;text-align: center" ng-hide="availableExtensionsList"><img src="app/images/loading.gif"></div>
+                        <div class="table-pagination">
+                            <div st-items-by-page="20" st-pagination="" st-template="app/modules/common/templates/custom_pagination.html"></div>
+                        </div>
                     </div>
-                </form>
+                </rd-widget>
             </div>
-        </rd-widget-body>
+        </div>
+        <div class="widget" ng-if="user_auth_data.system.extension.update">
+            <div class="widget-header">
+                <span>{{'Update Extensions Manually'|T}}</span>
+            </div>
+            <rd-widget-body class="no-padding">
+                <div>
+                    <form class="form-horizontal" name="updateManuallyForm" unsaved-warning-form verify-scope="tipStyle: 1">
+                        <div class="form-group">
+                            <label class="col-md-3 control-label">{{'Type'|T}}</label>
+                            <div class="col-md-5">
+                                <select name="type" class="form-control" ng-model="extensionList.type">
+                                    <option value="url">{{ 'URL' | T}}</option>
+                                    <option value="local">{{ 'Local' | T}}</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group" ng-if="extensionList.type=='url'">
+                            <label class="col-md-3 control-label">{{'URL'|T}}</label>
+                            <div class="col-md-5">
+                                <input ng-verify type="text" class="form-control" placeholder="" ng-model="extensionList.url">
+                            </div>
+                        </div>
+                        <div class="form-group" ng-if="extensionList.type=='local'">
+                            <label class="col-md-3 control-label">{{'Local'|T}}</label>
+                            <div class="col-md-5">
+                                <div class="local">
+                                    <input type="text" id="textfield" class="form-control">
+                                    <button class="btn btn-primary" style="position: absolute; top: 0; right: 15px;">{{'Browse'|T}}</button>
+                                    <input type="file" id="uploadfield" class="file form-control" nv-file-select uploader="extensionList.file_uploader" onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
+                                </div>
+                            </div>
+                        </div>
+                        <div class="form-group" ng-show="updateManuallyForm.$dirty">
+                            <div class="col-md-offset-3 col-md-9">
+                                <button ng-verify="control:'updateManuallyForm'" type="submit" class="btn btn-primary" ng-click="extensionList.updateExtensionManually(updateManuallyForm)">{{'Update'|T}}</button>
+                                <button type="reset" class="btn btn-default btn-cancel" ng-click="updateManuallyForm.$dirty=false;extensionList.cancel()">{{'Cancel'|T}}</button>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </rd-widget-body>
+        </div>
     </div>
 </div>
 
\ No newline at end of file
@@ -328,11 +249,9 @@
     .panel-body {
         padding: 10px;
     }
-
     .btn {
         padding: 6px 15px;
     }
-
     .subscribe {
         margin-bottom: 10px;
     }
\ No newline at end of file
@@ -355,22 +274,19 @@
         border: 1px dashed #d8d9da;
     }
 
-    .custom-table.table > tbody > tr:nth-of-type(odd) {
+    .custom-table.table>tbody>tr:nth-of-type(odd) {
         background-color: transparent;
     }
-
     .recommend.tile-small {
         height: 60px;
         width: 60px;
         background-color: #e45602;
     }
-
     .va-cube {
         border-radius: 5px;
         text-align: center;
         padding: 5px;
     }
-
     .capacity-content {
         position: relative;
         top: 50%;
\ No newline at end of file
@@ -385,8 +301,8 @@
 
     .tile-on span::after {
         content: "sss";
-        background: rgb(126, 192, 238);
-        color: rgb(126, 192, 238);
+        background: rgb(126,192,238);
+        color: rgb(126,192,238);
         border-radius: 5px;
     }
 
\ No newline at end of file
@@ -397,15 +313,14 @@
 
     .tile-off span::after {
         content: "sss";
-        background-color: rgb(170, 170, 170);
-        color: rgb(170, 170, 170);
+        background-color: rgb(170,170,170);
+        color: rgb(170,170,170);
         border-radius: 5px;
     }
 
     .input-group-addon {
         cursor: pointer;
     }
-
     .preview-content {
         padding: 10px;
         line-height: 25px;
\ No newline at end of file
@@ -419,29 +334,24 @@
     .popover.popover-shadow {
         max-width: 800px;
     }
-
-    .file-box {
+    .file-box{ 
         position: relative;
-    }
-
-    .file {
-        position: absolute;
+    } 
+    .file{ 
+        position: absolute; 
         top: 0;
         opacity: 0;
     }
-
     .file-box button {
         position: absolute;
         top: 0;
         right: 0;
         border-radius: 0;
     }
-
     .form-horizontal .nav-pills {
         width: 375px;
     }
-
     .form-horizontal .file-box {
         width: 370px;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/log/log.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/log/log.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/extension_mgmt/log/log.html	(working copy)
@@ -1,45 +1,46 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="widget-header">
-            <span class="tab-header-1">{{'Extension Log' | T}}</span>
-        </div>
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="extensionLog.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="widget-header">
+                <span>{{'Extension Log' | T}}</span>
             </div>
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="extensionLog.refresh()"><i class="fa fa-refresh"></i></button>
+                </div>
+            </div>
+            <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!extensionLog.logs"><img src="app/images/loading.gif"></div>
+            <div class="" st-table="displayedCollection" st-safe-src="extensionLog.logs">
+                <table class="table table-striped table-hover">
+                    <thead>
+                        <tr>
+                            <th class="i-num">No.</th>
+                            <th class="i-appname" st-sort="app_name">{{ 'Extension Name' | T }}</th>
+                            <th class="i-version" st-sort="build_version">{{ 'Action' | T }}</th>
+                            <th class="i-md5">{{ 'Time' | T }}</th>
+                            <th class="i-download-link">{{ 'Result' | T }}</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="row in displayedCollection">
+                            <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ row.name }}</td>
+                            <td>{{ row.action }}</td>
+                            <td>{{ row.time }}</td>
+                            <td>{{ row.result}}</td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="8" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!extensionLog.logs"><img
-            src="app/images/loading.gif"></div>
-        <div class="" st-table="displayedCollection" st-safe-src="extensionLog.logs">
-            <table class="table table-striped table-hover">
-                <thead>
-                <tr>
-                    <th class="i-num">No.</th>
-                    <th class="i-appname" st-sort="app_name">{{ 'Extension Name' | T }}</th>
-                    <th class="i-version" st-sort="build_version">{{ 'Action' | T }}</th>
-                    <th class="i-md5">{{ 'Time' | T }}</th>
-                    <th class="i-download-link">{{ 'Result' | T }}</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="row in displayedCollection">
-                    <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td>{{ row.name }}</td>
-                    <td>{{ row.action }}</td>
-                    <td>{{ row.time }}</td>
-                    <td>{{ row.result}}</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="8" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
-</div>
+    
+ </div>
+    
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/base_settings.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/base_settings.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/base_settings.html	(working copy)
@@ -1,100 +1,79 @@
-<div class="col-md-12">
-    <form class="form-horizontal" ng-if="base.haSettings" name="settingsForm" verify-scope="tipStyle: 1"
-          unsaved-warning-form>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Status' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.enable"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+<div class="row">
+    <div class="col-md-12">
+        <form class="form-horizontal" ng-if="base.haSettings" name="settingsForm" verify-scope="tipStyle: 1" unsaved-warning-form>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Status' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.enable" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label for="gateway_domain" class="col-md-3 control-label">{{ 'ARP Interval' | T}}</label>
-            <div class="col-md-3">
-                <input ng-verify="required:true" type="text" class="form-control" ng-model="base.haSettings.arp"
-                       resettable disabled>
+            <div class="form-group">
+                <label for="gateway_domain" class="col-md-3 control-label">{{ 'ARP Interval' | T}}</label>
+                <div class="col-md-3">
+                    <input ng-verify="required:true" type="text" class="form-control" ng-model="base.haSettings.arp" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'Bootup Synconfig' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.sync_bootup"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'Bootup Synconfig' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.sync_bootup" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'Runtime Synconfig' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.sync_runtime"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'Runtime Synconfig' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.sync_runtime" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Logging' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.log_enable"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Logging' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.log_enable" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label for="gateway_domain" class="col-md-3 control-label">{{ 'HA Log Level' | T}}</label>
-            <div class="col-md-3">
-                <input ng-verify="required:true" type="text" class="form-control" ng-model="base.haSettings.log_level"
-                       resettable disabled>
+            <div class="form-group">
+                <label for="gateway_domain" class="col-md-3 control-label">{{ 'HA Log Level' | T}}</label>
+                <div class="col-md-3">
+                    <input ng-verify="required:true" type="text" class="form-control" ng-model="base.haSettings.log_level" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Floating MAC' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.floatmac_enable"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Floating MAC' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.floatmac_enable" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA FFO Link' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.link_ffo"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA FFO Link' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.link_ffo" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Network Link' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.link_network"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Network Link' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.link_network" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Consistency Check' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.ha_consistency"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Consistency Check' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.ha_consistency" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group">
-            <label class="col-md-3 control-label">{{ 'HA Peer Check' | T}}</label>
-            <div class="col-md-6">
-                <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.ha_checkpeer"
-                       switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false"
-                       resettable disabled>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{{ 'HA Peer Check' | T}}</label>
+                <div class="col-md-6">
+                    <input type="checkbox" bs-switch class="switch" ng-model="base.haSettings.ha_checkpeer" switch-on-text="{{'Enable'|T}}" switch-off-text="{{'Disable'|T}}" switch-active="false" resettable disabled>
+                </div>
             </div>
-        </div>
-        <div class="form-group" ng-if="settingsForm.$dirty">
-            <div class="col-md-offset-3 col-md-6">
-                <button ng-verify="control:'settingsForm'" class="btn btn-primary"
-                        ng-click="base.changeSetting(settingsForm)">{{ 'Save Changes' | T}}
-                </button>
-                <button class="btn btn-default" ng-click="settingsForm.$dirty=false;base.cancle()">{{ 'Cancel' | T}}
-                </button>
+            <div class="form-group" ng-if="settingsForm.$dirty">
+                <div class="col-md-offset-3 col-md-6">
+                    <button ng-verify="control:'settingsForm'" class="btn btn-primary" ng-click="base.changeSetting(settingsForm)">{{ 'Save Changes' | T}}</button>
+                    <button class="btn btn-default" ng-click="settingsForm.$dirty=false;base.cancle()">{{ 'Cancel' | T}}</button>
+                </div>
             </div>
-        </div>
-    </form>
+
+        </form>
+
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/device_ha_detail.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/device_ha_detail.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/device_ha_detail.html	(working copy)
@@ -1,32 +1,29 @@
-<div class="row">
-    <div class="col-md-12">
-        <div ncy-breadcrumb></div>
+<div>
+    <div class="row">
+        <div class="col-md-12">
+            <div ncy-breadcrumb></div>
+        </div>
     </div>
-    <div class="col-md-12">
-        <div class="tab-wrapper">
-            <ul class="nav nav-tabs">
-                <li role="presentation"
-                    ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/base_settings') }">
-                    <a ui-sref="index.ha.device_ha.detail.base_settings"><span class="tab-header">{{ 'Base Settings' | T
-                        }}</span></a>
-                </li>
-                <li role="presentation"
-                    ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/ha_unit') }">
-                    <a ui-sref="index.ha.device_ha.detail.ha_unit"><span class="tab-header">{{ 'HA Unit' | T
-                        }}</span></a>
-                </li>
-                <li role="presentation"
-                    ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/ha_group') }">
-                    <a ui-sref="index.ha.device_ha.detail.ha_group"><span class="tab-header">{{ 'HA Group' | T}}</span></a>
-                </li>
-            </ul>
+    <div class="row">
+        <div class="col-md-12">
+            <div class="tab-wrapper">
+                <ul class="nav nav-tabs">
+                    <li role="presentation" ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/base_settings') }">
+                        <a ui-sref="index.ha.device_ha.detail.base_settings">{{ 'Base Settings' | T }}</a>
+                    </li>
+                    <li role="presentation" ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/ha_unit') }">
+                        <a ui-sref="index.ha.device_ha.detail.ha_unit">{{ 'HA Unit' | T }}</a>
+                    </li>
+                    <li role="presentation" ng-class="{ active: url_contain('/ha/device_ha/detail/{{ current_name }}/ha_group') }">
+                        <a ui-sref="index.ha.device_ha.detail.ha_group">{{ 'HA Group' | T}}</a>
+                    </li>
+                </ul>
+            </div>
         </div>
     </div>
     <div class="content-wrapper">
-        <div class="" ng-show="url_contain('/ha/device_ha/detail/{{ current_name }}/base_settings')"
-             ui-view="base_settings"></div>
+        <div class="" ng-show="url_contain('/ha/device_ha/detail/{{ current_name }}/base_settings')" ui-view="base_settings"></div>
         <div class="" ng-show="url_contain('/ha/device_ha/detail/{{ current_name }}/ha_unit')" ui-view="ha_unit"></div>
-        <div class="" ng-show="url_contain('/ha/device_ha/detail/{{ current_name }}/ha_group')"
-             ui-view="ha_group"></div>
+        <div class="" ng-show="url_contain('/ha/device_ha/detail/{{ current_name }}/ha_group')" ui-view="ha_group"></div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_group.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_group.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_group.html	(working copy)
@@ -1,65 +1,58 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="group.refresh()"><i
-                    class="array-refresh an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Switch' | T }}" ng-click="group.switch()"><i
-                    class="fa fa fa-wrench an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="group.refresh()"><i class="array-refresh"></i></button>
+                    <button class="btn btn-link" title="{{ 'Switch' | T }}" ng-click="group.switch()"><i class="fa fa fa-wrench"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="group.deviceHaGroupList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-id">{{ 'Group ID' | T }}</th>
+                            <th class="d-group">{{ 'HA Group' | T }}</th>
+                            <th class="d-mode">{{ 'Preemption Mode' | T }}</th>
+                            <!-- <th class="d-port">{{ 'Port' | T }}</th>
+                            <th class="d-ips">{{ 'Floating IPs' | T }}</th>
+                            <th class="d-ranges">{{ 'Floating IP Ranges' | T }}</th>
+                            <th class="d-priorities">{{ 'Group Priorities' | T }}</th> -->
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="item in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ item.id }}</td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.enable" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.enable" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.preempt" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.preempt" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <!-- <td>{{ item.port.length > 0 ? item.port : null }}</td>
+                            <td>{{ item.fip.length > 0 ? item.fip : null }}</td>
+                            <td>{{ item.fiprange.length > 0 ? item.fiprange : null }}</td>
+                            <td>{{ item.priority.length > 0 ? item.priority : null }}</td> -->
+                        </tr>
+                        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!group.deviceHaGroupList"><img src="app/images/loading.gif"></div>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="5" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="group.deviceHaGroupList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-id">{{ 'Group ID' | T }}</th>
-                    <th class="d-group">{{ 'HA Group' | T }}</th>
-                    <th class="d-mode">{{ 'Preemption Mode' | T }}</th>
-                    <!-- <th class="d-port">{{ 'Port' | T }}</th>
-                    <th class="d-ips">{{ 'Floating IPs' | T }}</th>
-                    <th class="d-ranges">{{ 'Floating IP Ranges' | T }}</th>
-                    <th class="d-priorities">{{ 'Group Priorities' | T }}</th> -->
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="item in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td>{{ item.id }}</td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.enable" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.enable" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.preempt" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.preempt" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <!-- <td>{{ item.port.length > 0 ? item.port : null }}</td>
-                    <td>{{ item.fip.length > 0 ? item.fip : null }}</td>
-                    <td>{{ item.fiprange.length > 0 ? item.fiprange : null }}</td>
-                    <td>{{ item.priority.length > 0 ? item.priority : null }}</td> -->
-                </tr>
-                <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!group.deviceHaGroupList">
-                    <img src="app/images/loading.gif"></div>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_unit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_unit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/detail/ha_unit.html	(working copy)
@@ -1,45 +1,43 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="unit.refresh()"><i
-                    class="array-refresh an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="unit.refresh()"><i class="array-refresh"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="unit.deviceHaUnitList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="d-name">{{ 'Unit Name' | T }}</th>
+                            <th class="d-ip">{{ 'Primary Link IP' | T }}</th>
+                            <th class="d-port">{{ 'Primary Link Port' | T }}</th>
+                            <!-- <th class="d-links">{{ 'Secondary Links' | T }}</th>
+                            <th class="d-conditions">{{ 'HA Health Check Conditions' | T }}</th> -->
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="item in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ item.name }}</td>
+                            <td>{{ item.ip }}</td>
+                            <td>{{ item.port }}</td>
+                            <!-- <td>{{ item.links.length > 0 ? item.links : null }}</td>
+                            <td>{{ item.ha_hc_gw.length > 0 ? item.ha_hc_gw : null }}</td> -->
+                        </tr>
+                        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!unit.deviceHaUnitList"><img src="app/images/loading.gif"></div>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="5" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="unit.deviceHaUnitList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="d-name">{{ 'Unit Name' | T }}</th>
-                    <th class="d-ip">{{ 'Primary Link IP' | T }}</th>
-                    <th class="d-port">{{ 'Primary Link Port' | T }}</th>
-                    <!-- <th class="d-links">{{ 'Secondary Links' | T }}</th>
-                    <th class="d-conditions">{{ 'HA Health Check Conditions' | T }}</th> -->
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="item in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td>{{ item.name }}</td>
-                    <td>{{ item.ip }}</td>
-                    <td>{{ item.port }}</td>
-                    <!-- <td>{{ item.links.length > 0 ? item.links : null }}</td>
-                    <td>{{ item.ha_hc_gw.length > 0 ? item.ha_hc_gw : null }}</td> -->
-                </tr>
-                <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!unit.deviceHaUnitList">
-                    <img src="app/images/loading.gif"></div>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/device_ha.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/device_ha.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/device_ha/device_ha.html	(working copy)
@@ -1,111 +1,95 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="ha.refresh()"><i
-                    class="array-refresh an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="ha.refresh()"><i class="array-refresh"></i></button>
+                </div>
             </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="ha.deviceHaList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th>No.</th>
+                            <th>{{ 'Device Name' | T }}</th>
+                            <th>{{ 'HA Status' | T }}</th>
+                            <th>{{ 'ARP Interval' | T }}</th>
+                            <th>{{ 'Runtime Synconfig' | T }}</th>
+                            <th>{{ 'HA Logging' | T }}</th>
+                            <th>{{ 'HA Log Level' | T }}</th>
+                            <th>{{ 'HA Floating MAC' | T }}</th>
+                            <th>{{ 'HA FFO Link' | T }}</th>
+                            <!-- <th>{{ 'HA Network Link' | T }}</th>
+                            <th>{{ 'HA Consistency Check' | T }}</th>
+                            <th>{{ 'HA Peer Check' | T }}</th> -->
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="item in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td><a ui-sref="index.ha.device_ha.detail({name:item.device_name, settings:item})">{{ item.device_name }}</a></td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.enable" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.enable" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>{{ item.arp }}</td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.sync_runtime" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.sync_runtime" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.log_enable" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.log_enable" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>{{ item.log_level }}</td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.floatmac_enable" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.floatmac_enable" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.link_ffo" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.link_ffo" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                          <!--   <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.link_network" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.link_network" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.ha_consistency" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.ha_consistency" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td>
+                            <td>
+                                <div class="btn-group">
+                                    <button style="color:#5cb85c" ng-if="item.ha_checkpeer" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
+                                    <button style="color:#e02f44" ng-if="!item.ha_checkpeer" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
+                                </div>
+                            </td> -->
+                        </tr>
+                        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!ha.deviceHaList"><img src="app/images/loading.gif"></div>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="5" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="ha.deviceHaList" class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th>No.</th>
-                    <th>{{ 'Device Name' | T }}</th>
-                    <th>{{ 'HA Status' | T }}</th>
-                    <th>{{ 'ARP Interval' | T }}</th>
-                    <th>{{ 'Runtime Synconfig' | T }}</th>
-                    <th>{{ 'HA Logging' | T }}</th>
-                    <th>{{ 'HA Log Level' | T }}</th>
-                    <th>{{ 'HA Floating MAC' | T }}</th>
-                    <th>{{ 'HA FFO Link' | T }}</th>
-                    <!-- <th>{{ 'HA Network Link' | T }}</th>
-                    <th>{{ 'HA Consistency Check' | T }}</th>
-                    <th>{{ 'HA Peer Check' | T }}</th> -->
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="item in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td><a
-                        ui-sref="index.ha.device_ha.detail({name:item.device_name, settings:item})">{{ item.device_name
-                        }}</a></td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.enable" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.enable" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <td>{{ item.arp }}</td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.sync_runtime" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.sync_runtime" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.log_enable" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.log_enable" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <td>{{ item.log_level }}</td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.floatmac_enable" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.floatmac_enable" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <td>
-                        <div class="btn-group">
-                            <button style="color:#5cb85c" ng-if="item.link_ffo" class="btn btn-link"
-                                    title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                            <button style="color:#e02f44" ng-if="!item.link_ffo" class="btn btn-link"
-                                    title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                        </div>
-                    </td>
-                    <!--   <td>
-                          <div class="btn-group">
-                              <button style="color:#5cb85c" ng-if="item.link_network" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                              <button style="color:#e02f44" ng-if="!item.link_network" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                          </div>
-                      </td>
-                      <td>
-                          <div class="btn-group">
-                              <button style="color:#5cb85c" ng-if="item.ha_consistency" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                              <button style="color:#e02f44" ng-if="!item.ha_consistency" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                          </div>
-                      </td>
-                      <td>
-                          <div class="btn-group">
-                              <button style="color:#5cb85c" ng-if="item.ha_checkpeer" class="btn btn-link" title="{{'Enable'|T}}"><i class="fa fa-check-circle"></i></button>
-                              <button style="color:#e02f44" ng-if="!item.ha_checkpeer" class="btn btn-link" title="{{'Disable'|T}}"><i class="fa fa-times-circle"></i></button>
-                          </div>
-                      </td> -->
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="9" class="text-center">No matching records found.</td>
-                </tr>
-                <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!ha.deviceHaList"><img
-                    src="app/images/loading.gif"></div>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="5" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                             st-page-change="onPageChange(newPage)"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/ha.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/ha.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ha/ha.html	(working copy)
@@ -2,13 +2,13 @@
     <div class="col-md-12">
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/ha/device_ha') }">
-                <a ui-sref="index.ha.device_ha"><span class="tab-header"> {{ 'HA Management' | T }}</span></a>
+                <a ui-sref="index.ha.device_ha">{{ 'Device HA' | T }}</a>
             </li>
         </ul>
     </div>
 </div>
 <div class="row">
-    <div class="col-md-12">
+     <div class="col-md-12">
         <div class="" ng-show="url_contain('/ha/device_ha')" ui-view="device_ha"></div>
     </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/image.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/image.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/image.html	(working copy)
@@ -2,83 +2,76 @@
     <div class="col-md-12">
         <div class="widget">
             <div class="widget-header">
-                <span class="tab-header-1">{{'Upgrade Center' | T}}</span>
+                <span>{{'Device Build' | T}}</span>
             </div>
 
             <div class="table-toolbar">
                 <div class="btn-group">
-                    <button ng-if="user_auth_data.image.add" class="btn btn-link" title="{{ 'Add New Image' | T }}"
-                            ng-click="image.addImage()"><i class="fa fa-plus-circle an-tab-icon"></i></button>
-                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="image.refresh()"><i
-                        class="fa fa-refresh an-tab-icon"></i></button>
+                    <button ng-if="user_auth_data.image.add" class="btn btn-link" title="{{ 'Add New Image' | T }}" ng-click="image.addImage()"><i class="fa fa-plus-circle"></i></button>
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="image.refresh()"><i class="fa fa-refresh"></i></button>
                 </div>
+                <!-- <a class="icon-box" title="{{ 'Add New Image' | T }}" ng-click="image.addImage()"><i class="array-add"></i></a>
+                <a class="icon-box" title="{{ 'Refresh' | T }}" ng-click="image.refresh()"><i class="array-refresh"></i></a> -->
             </div>
             <div class="" st-table="displayedCollection" st-safe-src="image.imgData">
                 <table class="table table-striped table-hover">
                     <thead>
-                    <tr>
-                        <th class="i-num">No.</th>
-                        <th class="i-appname" st-sort="app_name">{{ 'Build Name' | T }}</th>
-                        <th class="i-version" st-sort="build_version">{{ 'Version' | T }}</th>
-                        <th class="i-md5">{{ 'MD5' | T }}</th>
-                        <th class="i-filesize">{{ 'File Size' | T }}</th>
-                        <th class="i-download-link">{{ 'Download Link' | T }}</th>
-                        <!-- <th class="i-location">{{ 'Location' | T }}</th> -->
-                        <th class="i-action">{{ 'Action' | T }}</th>
-                    </tr>
-                    <tr>
-                        <th></th>
-                        <th>
-                            <input st-search="app_name" placeholder="{{'Search by Name'|T}}"
-                                   class="input-sm form-control" type="search"/>
-                        </th>
-                        <th>
-                            <select class="input-sm form-control" st-input-event="change" st-search="build_version">
-                                <option value="">{{'All' | T}}</option>
-                                <option ng-repeat="row in image.imgData | unique:'build_version'"
-                                        value="{{row.build_version}}">{{row.build_version}}
-                                </option>
-                            </select>
-                        </th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                    </tr>
+                        <tr>
+                            <th class="i-num">No.</th>
+                            <th class="i-appname" st-sort="app_name">{{ 'Build Name' | T }}</th>
+                            <th class="i-version" st-sort="build_version">{{ 'Version' | T }}</th>
+                            <th class="i-md5">{{ 'MD5' | T }}</th>
+                            <th class="i-filesize">{{ 'File Size' | T }}</th>
+                            <th class="i-download-link">{{ 'Download Link' | T }}</th>
+                            <!-- <th class="i-location">{{ 'Location' | T }}</th> -->
+                            <th class="i-action">{{ 'Action' | T }}</th>
+                        </tr>
+                        <tr>
+                            <th></th>
+                            <th>
+                                <input st-search="app_name" placeholder="{{'Search by Name'|T}}" class="input-sm form-control" type="search" />
+                            </th>
+                            <th>
+                                <select class="input-sm form-control" st-input-event="change" st-search="build_version">
+        						<option value="">{{'All'|T}}</option>
+        						<option ng-repeat="row in image.imgData | unique:'build_version'" value="{{row.build_version}}">{{row.build_version}}</option>
+        					</select>
+                            </th>
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                        </tr>
                     </thead>
                     <tbody>
-                    <tr ng-repeat="row in displayedCollection">
-                        <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                        <td>{{ row.app_name }}</td>
-                        <td>{{ row.build_version }}</td>
-                        <td><a class="name" ng-click="image.edit(row)">{{ row.md5_value }}</a></td>
-                        <td>{{ row.file_size }}</td>
-                        <td>{{ row.download_link }}</td>
-                        <!-- <td>{{ row.location}}</td> -->
-                        <td>
-                            <div class="btn-group">
-                                <a ng-if="user_auth_data.image.add" class="icon-box" title="{{ 'Upload Build' | T }}"
-                                   ng-click="image.uploadImage(row)"><i class="array-upload an-row-icon"></i></a>
-                                <a ng-if="user_auth_data.image.system_update" class="icon-box"
-                                   title="{{ 'System Update' | T }}" ng-click="image.systemUpdate(row)"><i
-                                    class="array-refresh an-row-icon"></i></a>
-                                <a ng-if="user_auth_data.image.delete" class="icon-box" title="{{ 'Delete' | T }}"
-                                   ng-click="image.deleteImage(row)"><i class="array-delete an-row-icon"></i></a>
-                            </div>
-                        </td>
-                    </tr>
+                        <tr ng-repeat="row in displayedCollection">
+                            <td class="i-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ row.app_name }}</td>
+                            <td>{{ row.build_version }}</td>
+                            <td><a class="name" ng-click="image.edit(row)">{{ row.md5_value }}</a></td>
+                            <td>{{ row.file_size }}</td>
+                            <td>{{ row.download_link }}</td>
+                            <!-- <td>{{ row.location}}</td> -->
+                            <td>
+                                <div class="btn-group">
+                                    <a ng-if="user_auth_data.image.add" class="icon-box" title="{{ 'Upload Build' | T }}" ng-click="image.uploadImage(row)"><i class="array-upload"></i></a>
+                                    <a ng-if="user_auth_data.image.system_update" class="icon-box" title="{{ 'System Update' | T }}" ng-click="image.systemUpdate(row)"><i class="array-refresh"></i></a>
+                                    <a ng-if="user_auth_data.image.delete" class="icon-box" title="{{ 'Delete' | T }}" ng-click="image.deleteImage(row)"><i class="array-delete"></i></a>
+                                </div>
+                            </td>
+                        </tr>
                     </tbody>
                     <tfoot>
-                    <tr>
-                        <td colspan="8" class="text-center">
-                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                                 st-page-change="onPageChange(newPage)"></div>
-                        </td>
-                    </tr>
+                        <tr>
+                            <td colspan="8" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)"></div>
+                            </td>
+                        </tr>
                     </tfoot>
                 </table>
             </div>
         </div>
     </div>
+
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-add.html	(working copy)
@@ -2,7 +2,7 @@
 	<div class="modal-header">
 		<!-- <div class="title">{{ 'Add New Image' | T}}</div> -->
 		<button type="button" class="close" ng-click="imageAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-		<h6 class="modal-title">{{ 'Add New Build' | T}}</h6>
+		<h4 class="modal-title">{{ 'Add New Build' | T}}</h4>
 	</div>
 	<div class="modal-body">
 		<form class="form-horizontal" verify-scope="tipStyle: 1" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-edit.html	(working copy)
@@ -1,7 +1,7 @@
 <div class="">
     <div class="modal-header">
         <button type="button" class="close" ng-click="imageEdit.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-edit"></i>{{'Edit MD5' | T }}</h6>
+        <h4><i class="array-edit"></i>{{'Edit MD5' | T }}</h4>
     </div>
     <div class="modal-body">
         <form name="edit" verify-scope="tipStyle:1" class="form-horizontal">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-upload.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-upload.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/image-upload.html	(working copy)
@@ -1,7 +1,7 @@
 <div class="">
 	<div class="modal-header">
 		<button type="button" class="close" ng-click="imageUpload.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-		<h6><i class="array-upload"></i>{{ 'Upload Build' | T}}</h6>
+		<h4><i class="array-upload"></i>{{ 'Upload Build' | T}}</h4>
 	</div>
 
 	<div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/system-update.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/system-update.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/image/modal/system-update.html	(working copy)
@@ -1,7 +1,7 @@
 <div class="">
 	<div class="modal-header">
         <button type="button" class="close" ng-click="sysUpdate.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-		<h6><i class="array-refresh"></i>{{ 'System Update' | T}}</h6>
+		<h4><i class="array-refresh"></i>{{ 'System Update' | T}}</h4>
 
 	</div>
 	<div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/login/login.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/login/login.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/login/login.html	(working copy)
@@ -1,57 +1,55 @@
 <div class="container array">
-    <div id="signin">
+     <div id="signin">
         <div class="row" style="height: 100%">
-            <div class="col-md-5 col-xs-5 login-left">
+            <div class="col-md-4 col-xs-4 login-left">
                 <div class="login-logo">
-                    <img src="./app/images/login/logo.png" alt="Array Networks" height="50px" width="150px">
+                    <img src="./app/images/array_logo2.png" alt="Array Logo">
                 </div>
                 <div class="login-text1">
-                    <span>{{'Array Management Platform' | T}}</span>
+                    <span>AMP</span>
                 </div>
+                <div class="login-text2">
+                    <span>{{'Array Management Platform'|T}}</span>
+                </div>
             </div>
-            <div class="col-md-7 col-xs-7 login-right">
+            <div class="col-md-8 col-xs-8 login-right">
                 <div class="text-center" style="color: #333;">
-                    <span>{{'WELCOME' | T}}</span>
+                    <!-- <span>AMP Platform</span> -->
+                    <span>{{'WELCOME'|T}}</span>
                 </div>
                 <div class="form-wrapper">
                     <form class="form-body" name="loginForm" novalidate method="post">
                         <div ng-if="!enable_passwd" class="form-group form-group-lg">
                             <i class="fa fa-arrayuser"></i>
-                            <input type="text" name="username" class="form-control" placeholder="{{'Username'|T}}"
-                                   required autofocus ng-model="login.loginData.username">
+                            <input type="text" name="username" class="form-control" placeholder="{{'Username'|T}}" required autofocus ng-model="login.loginData.username">
                             <div class="form-group form-group-lg has-error" ng-show="login.username_required">
-                                <p class="help-block">{{'Username is required.' | T}}</p>
+                                <p class="help-block">{{'Username is required.'|T}}</p>
                             </div>
                         </div>
                         <div ng-if="!enable_passwd" class="form-group form-group-lg">
                             <i class="fa fa-arraylock"></i>
-                            <input type="password" name="password" class="form-control" placeholder="{{'Password'|T}}"
-                                   ng-model="login.loginData.password" required>
+                            <input type="password" name="password" class="form-control" placeholder="{{'Password'|T}}" ng-model="login.loginData.password" required>
                             <div class="form-group form-group-lg has-error" ng-show="login.password_required">
-                                <p class="help-block">{{'Password is required.' | T}}</p>
+                                <p class="help-block">{{'Password is required.'|T}}</p>
                             </div>
                         </div>
                         <div ng-if="enable_passwd" class="form-group form-group-lg">
                             <i class="fa fa-arraylock"></i>
-                            <input type="password" name="enable_passwd" class="form-control"
-                                   placeholder="{{'Enable Password'|T}}" ng-model="login.loginData.enable_password"
-                                   required>
+                            <input type="password" name="enable_passwd" class="form-control" placeholder="{{'Enable Password'|T}}" ng-model="login.loginData.enable_password" required>
                             <div class="form-group form-group-lg has-error" ng-show="login.enable_password_required">
-                                <p class="help-block">{{'Enable password is required.' | T}}</p>
+                                <p class="help-block">{{'Enable password is required.'|T}}</p>
                             </div>
                         </div>
                         <input type="hidden" name="csrfmiddlewaretoken" value="KBTw4MBPOABt4FGY9Wt3LL4uJgHldgEt">
-                        <button type="submit" class="btn btn-primary btn-lg btn-block hive_enable_active"
-                                ng-click="login.submit(login.loginData)" style="margin-top: 25px;">{{'Sign in' | T}}
-                        </button>
+                        <button type="submit" class="btn btn-primary btn-lg btn-block hive_enable_active" ng-click="login.submit(login.loginData)" style="margin-top: 25px;">{{'Sign in'|T}}</button>
                         <div class="form-group form-group-lg has-error" ng-show="login.error">
-                            <p class="help-block">{{'Invalid Username or Password.' | T}}</p>
+                            <p class="help-block">{{'Invalid Username or Password.'|T}}</p>
                         </div>
                         <div class="form-group form-group-lg has-error" ng-show="login.enable_passwd_error">
-                            <p class="help-block">{{'Invalid Enable Password.' | T}}</p>
+                            <p class="help-block">{{'Invalid Enable Password.'|T}}</p>
                         </div>
                         <div class="form-group form-group-lg has-error" ng-show="login.license_expire_error">
-                            <p class="help-block">{{'License Has Been Expired.' | T}}</p>
+                            <p class="help-block">{{'License Has Been Expired.'|T}}</p>
                         </div>
                     </form>
                 </div>
@@ -71,37 +69,32 @@
         <form class="form-body" name="loginForm" novalidate method="post">
             <div ng-if="!enable_passwd" class="from-group">
                 <i class="fa array-user"></i>
-                <input type="text" name="username" class="form-control" placeholder="{{'Username'|T}}" required
-                       autofocus ng-model="login.loginData.username">
+                <input type="text" name="username" class="form-control" placeholder="{{'Username'|T}}" required autofocus ng-model="login.loginData.username">
                 <div class="form-group has-error" ng-show="login.username_required">
-                    <p class="help-block">{{'Username is required.' | T}}</p>
+                    <p class="help-block">{{'Username is required.'|T}}</p>
                 </div>
             </div>
             <div ng-if="!enable_passwd" class="form-group">
                 <i class="fa array-password"></i>
-                <input type="password" name="password" class="form-control" placeholder="{{'Password'|T}}"
-                       ng-model="login.loginData.password" required>
+                <input type="password" name="password" class="form-control" placeholder="{{'Password'|T}}" ng-model="login.loginData.password" required>
                 <div class="form-group has-error" ng-show="login.password_required">
-                    <p class="help-block">{{'Password is required.' | T}}</p>
+                    <p class="help-block">{{'Password is required.'|T}}</p>
                 </div>
             </div>
             <div ng-if="enable_passwd" class="form-group">
                 <i class="fa array-password"></i>
-                <input type="password" name="enable_passwd" class="form-control" placeholder="{{'Enable Password'|T}}"
-                       ng-model="login.loginData.enable_password" required>
+                <input type="password" name="enable_passwd" class="form-control" placeholder="{{'Enable Password'|T}}" ng-model="login.loginData.enable_password" required>
                 <div class="form-group has-error" ng-show="login.enable_password_required">
-                    <p class="help-block">{{'Enable password is required.' | T}}</p>
+                    <p class="help-block">{{'Enable password is required.'|T}}</p>
                 </div>
             </div>
             <input type="hidden" name="csrfmiddlewaretoken" value="KBTw4MBPOABt4FGY9Wt3LL4uJgHldgEt">
-            <button type="submit" class="btn btn-primary btn-block hive_enable_active"
-                    ng-click="login.submit(login.loginData)">{{'Sign in' | T}}
-            </button>
+            <button type="submit" class="btn btn-primary btn-block hive_enable_active" ng-click="login.submit(login.loginData)">{{'Sign in'|T}}</button>
             <div class="form-group form-group-lg has-error" ng-show="login.error">
-                <p class="help-block">{{'Invalid Username or Password.' | T}}</p>
+                <p class="help-block">{{'Invalid Username or Password.'|T}}</p>
             </div>
             <div class="form-group form-group-lg has-error" ng-show="login.enable_passwd_error">
-                <p class="help-block">{{'Invalid Enable Password.' | T}}</p>
+                <p class="help-block">{{'Invalid Enable Password.'|T}}</p>
             </div>
         </form>
     </div>
@@ -111,3 +104,11 @@
         </div>
     </div>
 </div>
+
+<style>
+  html {
+    /*overflow: hidden;*/
+  }
+</style>
+
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/navbar.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/navbar.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/navbar.html	(working copy)
@@ -1,5 +1,5 @@
 <nav class="navbar navbar-default" id="navbar">
-    <div style="margin-left: -10px;">
+    <div class="container-fluid">
         <div class="navbar-header">
             <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-nav">
                 <span class="sr-only">Toggle navigation</span>
@@ -7,38 +7,28 @@
                 <span class="icon-bar"></span>
                 <span class="icon-bar"></span>
             </button>
-            <div class="an-title">
-                <span class="an-brand">Array</span>
-                <span class="an-product">Management Platform</span>
-            </div>
+            <a class="navbar-brand">
+                <img src="app/images/navbar/logo.png" alt="Array Logo" class="array">
+                <span class="oem oem-title" ng-controller="ampVersionCtrl">{{ 'Infosec Management Center' | T }} ({{ version }})</span>
+            </a>
+            <span class="title array" ng-controller="ampVersionCtrl">{{ 'Array Management Platform' | T }} ({{ version }})</span>
         </div>
         <div class="collapse navbar-collapse" id="header-nav">
             <ul class="nav navbar-nav navbar-right" ng-controller="taskAndLogNotificationCtrl">
                 <li>
-                    <a ng-controller="EngineeringCtrl" ng-show="engineering_mode" ng-click="show_engineer_modal()"
-                       style="font-size: 21px; color: red;"><i title="{{'Engineering Mode'|T}}"
-                                                               class="fa fa-user-secret"></i></a>
+                    <a ng-controller="EngineeringCtrl" ng-show="engineering_mode" ng-click="show_engineer_modal()" style="font-size: 21px; color: red;"><i title="{{'Engineering Mode'|T}}" class="fa fa-user-secret"></i></a>
                 </li>
                 <li class="nav-item">
                     <a ng-click="showorHideDetail()">
-                        <div title="Tasks">
-                            <svg role="img" width="2em" height="2em" viewBox="0 0 18 18" focusable="false"
-                                 aria-hidden="true">
-                                <g fill="currentColor">
-                                    <path
-                                        d="M10.3362,2.385314 C10.584,2.490116 10.6493,2.797941 10.5168,3.03205 L10.5168,3.03205 C10.3869,3.26145 10.0983,3.36487 9.8529,3.2685 C9.4086,3.09401 8.93064,3 8.4375,3 C6.33722,3 4.58176,4.68726 4.39629,6.90967 L4.33743,7.61493 L3.65273,7.79397 C2.11557,8.19591 1,9.6658 1,11.33333 C1,13.3627 2.57884,15 4.5,15 L12.9375,15 C15.168,15 17,13.1002 17,10.75 C17,10.00098 16.8132,9.29617 16.4859,8.68398 C16.3699,8.46702 16.4226,8.19266 16.609,8.03211 L16.609,8.03211 C16.8276,7.84383 17.171,7.86009 17.3126,8.11149 C17.7495,8.88726 18,9.78895 18,10.75 C18,13.6445 15.7286,16 12.9375,16 L4.5,16 C2.01825,16 0,13.907 0,11.33333 C0,9.20067 1.43212,7.341 3.39975,6.8265 C3.627,4.1035 5.79938,2 8.4375,2 C9.10442,2 9.74648,2.13589 10.3362,2.385314 Z"></path>
-                                    <path ng-show="task_notification_total"
-                                          d="M14,8 C12.3431,8 11,6.65685 11,5 C11,3.34315 12.3431,2 14,2 C15.6569,2 17,3.34315 17,5 C17,6.65685 15.6569,8 14,8 Z"
-                                          class="secondary-color"></path>
-                                </g>
-                            </svg>
-                        </div>
+                        <i title="{{ 'Task' | T }}" class="fa array-notify">
+                            <span class="badge" ng-show="task_notification_total" style="transform: scale(.6,.6);position: absolute;top: 22px; left: 20px; color:#ffffff;background-color: #d3163f; font-size: 15px">{{task_notification_total}}
+                            </span>
+                        </i>
                     </a>
                     <div ng-if="displayDetail" class="widget task-list">
                         <div class="widget-header">
-                            <i class="fa fa-tasks fa-fw"></i>&nbsp;{{'Tasks' | T}}
-                            <button type="button" class="btn btn-link btn-xs pull-right" ng-click="showorHideDetail()"
-                                    style="height: 35px; padding: 0"><i class="fa fa-close"></i></button>
+                            <i class="fa fa-tasks fa-fw"></i>&nbsp;{{'Task'|T}}
+                            <button type="button" class="btn btn-link btn-xs pull-right" ng-click="showorHideDetail()" style="height: 35px; padding: 0"><i class="fa fa-close"></i></button>
                         </div>
                         <div class="widget-body">
                             <div class="table-responsive">
@@ -52,40 +42,30 @@
                                     </tr>
                                     </thead>
                                     <tbody ng-if="!task_notification">
-                                    <tr>
-                                        <td colspan="4" class="text-center">{{'Loading...' | T }}</td>
-                                    </tr>
+                                        <tr><td colspan="4" class="text-center">{{'Loading...' | T }}</td></tr>
                                     </tbody>
                                     <tbody ng-if="task_notification && task_notification.length===0">
-                                    <tr>
-                                        <td colspan="4" class="text-center">{{'No data.' | T }}</td>
-                                    </tr>
+                                        <tr><td colspan="4" class="text-center">{{'No data.' | T }}</td></tr>
                                     </tbody>
                                     <tbody ng-if="task_notification.length>0">
-                                    <tr ng-repeat="note in task_notification | orderBy:'id':true">
-                                        <td>{{$index + 1}}</td>
-                                        <td class="task-text"><a ui-sref="index.task({'full_name' : note.full_name})"
-                                                                 ng-click="" class="name"
-                                                                 title="{{note.name}}">{{note.name}}</a></td>
-                                        <td class="task-text">{{note.type}}</td>
-                                        <td>
-                                            <span ng-if="note.state=='failed'" title="{{note.description}}"
-                                                  style="color:#e02f44"><i class="array-failed"></i>&nbsp;{{'Failed' | T}}</span>
-                                            <span ng-if="note.state=='ongoing'" style="color:#327ab7;"><i
-                                                class="array-ongoing"></i>&nbsp;{{'Ongoing' | T}}</span>
-                                            <span ng-if="note.state=='waiting'" style="color:#999999;"><i
-                                                class="array-waiting"></i>&nbsp;{{'Waiting' | T}}</span>
-                                            <span ng-if="note.state=='done'" style="color:#5cb85c"><i
-                                                class="array-done"></i>&nbsp;{{'Done' | T}}</span>
-                                        </td>
-                                    </tr>
+                                        <tr ng-repeat="note in task_notification | orderBy:'id':true">
+                                            <td>{{$index + 1}}</td>
+                                            <td class="task-text"><a ui-sref="index.task({'full_name' : note.full_name})" ng-click="" class="name" title="{{note.name}}">{{note.name}}</a></td>
+                                            <td class="task-text">{{note.type}}</td>
+                                            <td>
+                                                <span ng-if="note.state=='failed'"  title="{{note.description}}" style="color:#e02f44"><i class="array-failed"></i>&nbsp;{{'Failed'|T}}</span>
+                                                <span ng-if="note.state=='ongoing'" style="color:#327ab7;"><i class="array-ongoing"></i>&nbsp;{{'Ongoing'|T}}</span>
+                                                <span ng-if="note.state=='waiting'" style="color:#999999;"><i class="array-waiting"></i>&nbsp;{{'Waiting'|T}}</span>
+                                                <span ng-if="note.state=='done'" style="color:#5cb85c"><i class="array-done"></i>&nbsp;{{'Done'|T}}</span>
+                                            </td>
+                                        </tr>
                                     </tbody>
                                     <tfoot>
-                                    <tr>
-                                        <td colspan="4" class="text-center" style="text-align: center;">
-                                            <a ui-sref="index.task" ng-click="routeToTask()">{{ 'More Tasks' | T }}</a>
-                                        </td>
-                                    </tr>
+                                        <tr>
+                                            <td colspan="4" class="text-center" style="text-align: center;">
+                                                <a ui-sref="index.task" ng-click="routeToTask()">{{ 'More Tasks' | T }}</a>
+                                            </td>
+                                        </tr>
                                     </tfoot>
                                 </table>
                             </div>
@@ -93,86 +73,91 @@
                     </div>
                 </li>
                 <li uib-dropdown>
-                    <a href="" data-toggle="dropdown" title="{{'Notifications'|T}}" ng-click="showNotification()">
-                        <svg role="img" width="2em" height="2em" viewBox="0 0 18 18" focusable="false"
-                             aria-hidden="true">
-                            <g fill="currentColor">
-                                <path
-                                    d="M15.9995249,13.9502504 C15.9995249,13.9903172 15.9675129,14.0233723 15.9284982,14.0233723 L2.07230215,14.0233723 C2.03228715,14.0233723 2.00027514,13.9903172 2.00027514,13.9502504 L2.00027514,12.4417362 C2.00027514,11.8106845 2.20835317,11.1856427 2.61650623,10.6377295 L4.2191072,7.93422371 C4.7102914,7.27813022 5.00440169,6.360601 5.00440169,5.48614357 L4.99839944,5.00834725 C4.99839944,2.79966611 6.79307244,1.00166945 8.9999,1.00166945 C11.2057272,1.00166945 13.0014006,2.79966611 13.0014006,5.00834725 L13.0114043,5.67746244 C13.0504189,6.49382304 13.322521,7.32320534 13.7516819,7.89015025 L15.3842941,10.6377295 L15.413305,10.681803 C15.7914468,11.1866444 15.9995249,11.8116861 15.9995249,12.4417362 L15.9995249,13.9502504 Z M8.9999,16.9983306 C7.89948735,16.9983306 7.00515197,16.1038397 7.00015009,15.00601 L10.9996499,15.00601 C10.9936477,16.1038397 10.1003127,16.9983306 8.9999,16.9983306 L8.9999,16.9983306 Z M16.2296111,10.1028381 L14.5819933,7.33422371 C14.2278605,6.8624374 14.0177817,6.20534224 14.0017757,5.56227045 L14.0017757,5.00834725 C14.0017757,2.2427379 11.7629361,0 8.9999,0 C6.23686386,0 3.9980243,2.2427379 3.9980243,5.00834725 L3.9980243,5.56126878 C3.98201829,6.20534224 3.76993876,6.86343907 3.38879584,7.37829716 L1.78619486,10.081803 C1.27900466,10.7569282 0.9999,11.5953255 0.9999,12.4417362 L0.9999,13.9502504 C0.9999,14.5422371 1.48108044,15.0250417 2.07230215,15.0250417 L5.99977495,15.00601 C6.00477683,16.6567613 7.34828064,18 8.9999,18 C10.6515194,18 11.9940228,16.6567613 12.000025,15.00601 L15.9284982,15.0250417 C16.5197199,15.0250417 16.9999,14.5422371 16.9999,13.9502504 L16.9999,12.4417362 C16.9999,11.6053422 16.727798,10.7759599 16.2296111,10.1028381 L16.2296111,10.1028381 Z"></path>
-                                <path ng-show="log_notification.length > 0 && notification_reminder"
-                                      d="M14,8 C12.3431,8 11,6.65685 11,5 C11,3.34315 12.3431,2 14,2 C15.6569,2 17,3.34315 17,5 C17,6.65685 15.6569,8 14,8 Z"
-                                      class="secondary-color"></path>
-                            </g>
-                        </svg>
-                    </a>
+                    <a href="" data-toggle="dropdown"><img title="{{'Notifications'|T}}" src="app/images/icon_message.png" style="width:25px; height: 22px;" ng-click="showNotification()"><span ng-if="log_notification.length > 0 && notification_reminder" class="red-point"></span></img></a>
                     <ul class="dropdown-menu header-dropdown" style="width:440px;">
                         <li class="dropdown-header">
-                            <span style="font-size: large;">{{'Notifications' | T}}</span>
-                            <button ng-show="log_notification.length > 0" class="btn btn-link" style="float: right;"
-                                    ng-click="more_notification()">{{ 'More' | T}}
-                            </button>
+                            <span style="font-size: large;">{{'Notifications'|T}}</span>
+                            <button ng-show="log_notification.length > 0" class="btn btn-link" style="float: right;" ng-click="more_notification()">{{ 'More' | T}}</button>
                         </li>
                         <li class="divider"></li>
                         <li ng-if="log_notification.length == 0 " style="margin-left: 20px;">{{ "No data." | T}}</li>
-                        <li ng-if="log_notification.length > 0" style="margin-left: 20px;line-height: 25px;"
-                            ng-repeat="note in log_notification">
-                            <div style="width: 25px; display: inline-block;">{{$index + 1}}.</div>
-                            {{note.time}}: {{note.operation}}
-                        </li>
+                        <li ng-if="log_notification.length > 0" style="margin-left: 20px;line-height: 25px;" ng-repeat="note in log_notification"><div style="width: 25px; display: inline-block;">{{$index + 1}}.</div> {{note.time}}: {{note.operation}}</li>
                     </ul>
                 </li>
-                <li class="nav-item" uib-dropdown>
-                    <a href="" uib-dropdown-toggle><i title="{{ 'Account' | T }}" class="fa array-profile"></i></a>
+                <!--<li class="nav-item">
+                    <a><i title="{{ 'Notifications' | T }}" class="fa array-notify"></i></a>
+                </li>-->
+                <li class="nav-item">
+                    <a ng-controller="DownloadCtrl" ng-click="userGuide()"><i title="{{ 'User Manual' | T }}" class="fa array-guide"></i></a>
+                </li>
+                <li>
+                    <a href="" ng-controller="TerminalCtrl" ng-click="connect()"><i title="{{ consoleTitle }}" class="fa array-terminal" style="font-size: 20px; color: #f5f5f5;"></i></a>
+                </li>
+                <li ng-if="role_info['user_type'] != 'Device Admin'">
+                    <a href="" ng-controller="largeScreenCtrl" ng-click="largeScreen()"><i title="{{'Large Screen Display'|T }}" class="fa fa-television" style="font-size: 20px; color: #f5f5f5;"></i></a>
+                </li>
+                <li uib-dropdown ng-controller="ThemeSwitchingCtrl" ng-show="themes.length > 1">
+                    <a uib-dropdown-toggle><i title="{{'Theme'|T}}" class="fa fa-magic"></i></a>
                     <ul class="dropdown-menu">
-                        <li class="dropdown-header" ng-controller="currentUserCtrl">{{ user }}
-                            ({{ role_info['user_type'] }})
+                        <li ng-repeat="row in themes">
+                            <a href="" ng-click="switching(row.name)">{{row.verbose_name|T}} <i class="fa fa-check" ng-if="cur_theme == row.name"></i></a>
                         </li>
+                        <!-- <li><a href="" ng-click="switching('dark')">{{'Dark'|T}} <i class="fa fa-check" ng-if="cur_theme == 'dark'"></i></a></li>
                         <li class="divider"></li>
-                        <li class="link">
-                            <a ng-controller="DownloadCtrl" ng-click="userGuide()">
-                                <i title="{{ 'User Manual' | T }}" class="fa fa-download"></i>&nbsp;&nbsp;User Manual
-                            </a>
-                        </li>
+                        <li><a href="" ng-click="switching('bright')">{{'Bright'|T}} <i class="fa fa-check" ng-if="cur_theme == 'bright'"></i></a></li>
                         <li class="divider"></li>
-                        <li class="link" ng-if="role_info['user_type'] != 'Device Admin'">
-                            <a href="" ng-controller="largeScreenCtrl" ng-click="largeScreen()"><i
-                                title="{{'Large Screen Display'|T }}" class="fa fa-television"></i>&nbsp;&nbsp;Large
-                                Screen Display</a>
+                        <li><a href="" ng-click="switching('oem')">{{'OEM'|T}} <i class="fa fa-check" ng-if="cur_theme == 'oem'"></i></a></li> -->
+                    </ul>
+                </li>
+                <li uib-dropdown ng-controller="LanguageSwitchingCtrl" ng-show="langs.length >= 1">
+                    <a uib-dropdown-toggle><i title="{{ 'Language' | T }}" class="fa array-lang"></i></a>
+                    <ul class="dropdown-menu">
+                        <li ng-repeat="row in langs">
+                            <a href="" ng-click="switching(row.name)">{{row.verbose_name|T}} <i class="fa fa-check" ng-if="cur_lang == row.name"></i></a>
                         </li>
+                        <!-- <li><a href="" ng-click="switching('en')">English <i class="fa fa-check" ng-if="cur_lang == 'en'"></i></a></li>
                         <li class="divider"></li>
-                        <li class="link">
-                            <a href="" ng-controller="TerminalCtrl" ng-click="connect()">
-                                <i title="{{ consoleTitle }}" class="fa array-terminal"></i>&nbsp;&nbsp;{{ consoleTitle
-                                }}</a>
-                        </li>
+                        <li><a href="" ng-click="switching('zh-cn')">简体中文 <i class="fa fa-check" ng-if="cur_lang == 'zh-cn'"></i></a></li> -->
+                    </ul>
+                </li>
+                <!-- <li class="nav-item">
+                    <a><i title="{{ 'Download' | T }}" class="fa array-download"></i></a>
+                </li> -->
+                <li>
+                    <a href="" ng-controller="SaveConfigCtrl" ng-click="saveConfiguration()"><i title="{{'Save Configurations' | T}}" class="fa array-save"></i></a>
+                </li>
+                <li class="nav-item" uib-dropdown>
+                    <a href="" uib-dropdown-toggle><i title="{{ 'Account' | T }}" class="fa array-profile"></i></a>
+                    <ul class="dropdown-menu">
+                        <li class="dropdown-header" ng-controller="currentUserCtrl">{{ user }} ({{ role_info['user_type'] }})</li>
                         <li class="divider"></li>
                         <li class="link">
-                            <a href="" ng-controller="SaveConfigCtrl" ng-click="saveConfiguration()">
-                                <i title="{{'Save Configurations' | T}}" class="fa fa-save"></i>
-                                &nbsp;&nbsp;Save Configurations</a>
-                        </li>
-                        <!-- ToDo: Disabling theming for now, will bring back later-->
-                        <!--                        <li uib-dropdown ng-controller="ThemeSwitchingCtrl" ng-show="themes.length > 1">-->
-                        <!--                            <a uib-dropdown-toggle><i title="{{'Theme'|T}}" class="fa fa-magic"></i></a>-->
-                        <!--                            <ul class="dropdown-menu">-->
-                        <!--                                <li ng-repeat="row in themes">-->
-                        <!--                                    <a href="" ng-click="switching(row.name)">{{row.verbose_name | T}} <i-->
-                        <!--                                        class="fa fa-check"-->
-                        <!--                                        ng-if="cur_theme == row.name"></i>Switch</a>-->
-                        <!--                                </li>-->
-                        <!--                            </ul>-->
-                        <!--                        </li>-->
-                        <li class="divider"></li>
-                        <li class="link">
                             <a title="Logout" href="" ng-controller="ManualLogoutCtrl" ng-click="logout()">
                                 <i class="fa fa-power-off"></i>
-                                <span class="module-item-name">&nbsp;&nbsp;{{'Logout' | T}}</span>
+                                <span class="module-item-name">{{'Logout'|T}}</span>
                             </a>
                         </li>
                     </ul>
                 </li>
             </ul>
         </div>
+        <!-- <form class="navbar-form navbar-right" id="searchForm" ng-controller="SearchCtrl">
+            <div class="form-group">
+                <input type="text" class="form-control" placeholder="Search" ng-keyup="inSearch($event)" ng-model="searchKey">
+            </div>
+            <div uib-dropdown>
+                <a uib-dropdown-toggle>
+                    <i class="search-btn fa fa-search" id="searchIron" ng-click="search()"></i>
+                </a>
+                <ul uib-dropdown-menu class="dropdown-menu">
+                    <li ng-if="searchResult.length == 0">{{ 'No Match' | T }}</li>
+                    <li ng-if="saerchResult.length > 0" ng-repeat="row in searchResult">
+                        <a href="{{row.url}}" target="_self" ng-click="jump(row.url)">{{ row.title }}</a>
+                        <a href="#" class="hit" ng-bind-html="row.highlight"></a>
+                    </li>
+                </ul>
+            </div>
+        </form> -->
     </div>
 </nav>
 
@@ -187,47 +172,22 @@
 </div>
 
 <style>
-    html {
-        overflow-y: auto;
-    }
+html {
+    overflow-y: auto;
+}
+.red-point{
+    position: relative;
+}
 
-    .red-point {
-        position: relative;
-    }
-
-    .red-point::before {
-        content: " ";
-        border: 5px solid red;
-        border-radius: 10px;
-        position: absolute;
-        z-index: 1000;
-        right: 0;
-        margin-right: -4px;
-        margin-top: -1px;
-    }
-
-    .an-brand {
-        margin-left: 15px;
-        font-size: 20px;
-        font-weight: 500;
-        color: #1170cf;
-    }
-
-    .an-product {
-        font-size: 20px;
-        font-weight: 300;
-        color: white;
-    }
-
-    .an-title {
-        line-height: 45px;
-        color: #fff;
-        margin-left: 15px;
-        font-size: 16px;
-        letter-spacing: 1px;
-    }
-
-    svg:hover path {
-        fill: #1170cf;
-    }
+.red-point::before{
+    content: " ";
+    border: 5px solid red;
+    border-radius: 10px;
+    position: absolute;
+    z-index: 1000;
+    right: 0%;
+    margin-right: -4px;
+    margin-top: -1px;
+}
 </style>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/profile.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/profile.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/profile.js	(working copy)
@@ -2,38 +2,52 @@
     .module('cmApp')
     .constant('CMSettings', {
         'app': 'AMP',
-        //first one as default
-        'company_name': [
+        'company_name':[
             {
+                'name': 'Beijing Array Networks Co., Ltd.'
+            }, //first one as company name
+            {
                 'name': 'Array Networks, Inc.'
-            },
+            }
         ],
-        'manual': [
+        'manual':[
             {
                 'lang': 'en',
                 'link': {
-                    'user_guide': '/app/app/docs/AMP_User_Guide_3.7.pdf'
+                    'user_guide': '/app/app/docs/Array_AMP_User_Guide_3_5_cn.pdf'
                 }
             },
+            {
+                'lang': 'zh-cn',
+                'link': {
+                    'user_guide': '/app/app/docs/Array_AMP_User_Guide_3_5_cn.pdf'
+                }
+            },
+            {
+                'lang': 'en',
+                'link': {
+                    'user_guide': '/app/app/docs/Array_AMP_User_Guide_3_2_1_en.pdf'
+                }
+            },
         ],
-        'language': [
+        'language':[
             {
                 'name': 'en',
                 'verbose_name': 'English'
-            },
+            }, //first one as default language
             {
                 'name': 'zh-cn',
-                'verbose_name': '简体中文'
+                'verbose_name': '简体中文'           
             }
         ],
-        'theme': [
+        'theme':[
             {
-                'name': 'bright',
-                'verbose_name': 'Bright'
-            },
-            {
                 'name': 'dark',
-                'verbose_name': 'Dark'
-            },
+                'verbose_name': 'Dark'   
+            }, //first one as default theme
+            {
+                'name': 'bright',
+                'verbose_name': 'Bright'                  
+            }
         ],
     });
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.html	(working copy)
@@ -1,15 +1,14 @@
 <ul class="sidebar mainmenu">
-    <!--    <i class="fa fa-outdent" id="sidebarToggle" ng-click="sidebar.show_or_hide()"></i>-->
+    <i class="fa fa-outdent" id="sidebarToggle" ng-click="sidebar.show_or_hide()"></i>
     <li ng-repeat="module in sidebar.main" ng-if="module.show">
+        <span class="module-header">{{ module.title|T }}</span>
         <div class="module-body">
             <ul>
-                <li ng-repeat="element in module.elements" ng-if="element.show"
-                    ng-class="{ 'has-submenu': element.submenu.state, 'no-submenu': !element.submenu.state, active:root_menu_active(element.url_prefix)}">
-                    <span class="menu-ele"
-                          ng-click="sidebarCtrl.show_or_hide_by_submenu(element.isExpanded, element.has_sec_sub);element.collapse = !element.collapse">
+                <li ng-repeat="element in module.elements" ng-if="element.show" ng-class="{ 'has-submenu': element.submenu.state, 'no-submenu': !element.submenu.state, active:root_menu_active(element.url_prefix)}">
+                    <span class="menu-ele" ng-click="sidebar.show_or_hide_by_submenu(element.isExpanded, element.has_sec_sub);element.collapse = !element.collapse">
                         <a title="{{ element.verbose_name|T }}" ui-sref="index.{{element.ui_url}}(element.ui_data)">
                             <i class="{{ element.icon }}"></i>
-                            <span class="module-item-name">{{element.verbose_name | T}}</span>
+                            <span class="module-item-name">{{element.verbose_name|T}}</span>
                             <i class="fa fa-chevron-right" ng-if="!element.submenu.state"></i>
                         </a>
                         <div class="chevron-down" ng-if="element.submenu.state">
@@ -18,10 +17,8 @@
                     </span>
                     <div class="submenu" ng-if="element.submenu.state" uib-collapse="element.collapse">
                         <ul>
-                            <li ng-repeat="item in element.submenu.list"
-                                ng-class="{active:url_contain(item.sub_url_prefix)}" ng-if="item.show">
-                                <a ui-sref="index.{{ item.sub_ui_url }}"><i
-                                    class="fa fa-caret-right"></i>{{item.title | T}}</a>
+                            <li ng-repeat="item in element.submenu.list" ng-class="{active:url_contain(item.sub_url_prefix)}" ng-if="item.show">
+                                <a ui-sref="index.{{ item.sub_ui_url }}"><i class="fa fa-caret-right"></i>{{item.title|T}}</a>
                             </li>
                         </ul>
                     </div>
@@ -30,15 +27,14 @@
         </div>
     </li>
     <li ng-repeat="module in sidebar.extensions" ng-if="module.show">
+        <span class="module-header">{{ module.title|T }}</span>
         <div class="module-body">
             <ul>
-                <li ng-repeat="element in module.elements" ng-if="element.show"
-                    ng-class="{ 'has-submenu': element.submenu.state, 'no-submenu': !element.submenu.state, active:root_menu_active(element.url_prefix)}">
-                    <span class="menu-ele"
-                          ng-click="sidebar.show_or_hide_by_submenu(element.isExpanded, element.has_sec_sub);element.collapse = !element.collapse">
+                <li ng-repeat="element in module.elements" ng-if="element.show" ng-class="{ 'has-submenu': element.submenu.state, 'no-submenu': !element.submenu.state, active:root_menu_active(element.url_prefix)}">
+                    <span class="menu-ele" ng-click="sidebar.show_or_hide_by_submenu(element.isExpanded, element.has_sec_sub);element.collapse = !element.collapse">
                         <a title="{{ element.verbose_name|T }}" ui-sref="index.{{element.ui_url}}(element.ui_data)">
                             <i class="{{ element.icon }}"></i>
-                            <span class="module-item-name">{{element.verbose_name | T}}</span>
+                            <span class="module-item-name">{{element.verbose_name|T}}</span>
                             <i class="fa fa-chevron-right" ng-if="!element.submenu.state"></i>
                         </a>
                         <div class="chevron-down" ng-if="element.submenu.state">
@@ -47,10 +43,8 @@
                     </span>
                     <div class="submenu" ng-if="element.submenu.state" uib-collapse="element.collapse">
                         <ul>
-                            <li ng-repeat="item in element.submenu.list"
-                                ng-class="{active:url_contain(item.sub_url_prefix)}">
-                                <a ui-sref="index.{{ item.sub_ui_url }}"><i
-                                    class="fa fa-caret-right"></i>{{item.title | T}}</a>
+                            <li ng-repeat="item in element.submenu.list" ng-class="{active:url_contain(item.sub_url_prefix)}">
+                                <a ui-sref="index.{{ item.sub_ui_url }}"><i class="fa fa-caret-right"></i>{{item.title|T}}</a>
                             </li>
                         </ul>
                     </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/main/sidebar.js	(working copy)
@@ -10,131 +10,97 @@
                 icon: 'fa fa-dashboard',
                 name: 'dashboard',
                 verbose_name: 'Dashboard',
-                ui_url: 'dashboard.system_statistics',
+                ui_url: 'dashboard.overview',
                 url_prefix: '/dashboard',
                 ui_data: {},
                 collapse: true,
                 isExpanded: true
             },
-                {
-                    show: true,
-                    icon: 'fa sidebar-device',
-                    name: 'device',
-                    verbose_name: 'Inventory',
-                    auth_path: ['device'],
-                    ui_url: 'device',
-                    url_prefix: '/device',
-                    ui_data: {},
-                    collapse: true,
-                    submenu: {
-                        state: true,
-                        list: [
-                            {
-                                title: 'Device',
-                                auth_path: ['device', 'device'],
-                                sub_ui_url: 'device',
-                                sub_url_prefix: '/device'
-                            },
-                            {
-                                title: 'Device Group',
-                                auth_path: ['device', 'device_group'],
-                                sub_ui_url: 'device_group',
-                                sub_url_prefix: '/device_group'
-                            }
-                        ]
-                    },
-                    isExpanded: true
+            {
+                show: true,
+                icon: 'fa sidebar-device',
+                name: 'device',
+                verbose_name: 'Device',
+                auth_path: ['device'],
+                ui_url: 'device',
+                url_prefix: '/device',
+                ui_data: {},
+                collapse: true,
+                submenu: {
+                    state: true,
+                    list: [
+                        {
+                            title: 'Device',
+                            auth_path: ['device', 'device'],
+                            sub_ui_url: 'device',
+                            sub_url_prefix: '/device'
+                        },
+                        {
+                            title: 'Device Group',
+                            auth_path: ['device', 'device_group'],
+                            sub_ui_url: 'device_group',
+                            sub_url_prefix: '/device_group'
+                        }
+                    ]
                 },
-                {
-                    show: true,
-                    icon: 'fa sidebar-acm',
-                    name: 'system',
-                    verbose_name: 'System',
-                    auth_path: ['system'],
-                    ui_url: 'system.host',
-                    url_prefix: ['/system', '/storage', '/task', '/admin', '/notification', '/extension'],
-                    ui_data: {},
-                    collapse: true,
-                    submenu: {
-                        state: true,
-                        list: [
-                            {
-                                title: 'General Settings',
-                                auth_path: ['system', 'host'],
-                                sub_ui_url: 'system.host',
-                                sub_url_prefix: '/system'
-                            },
-                            {
-                                title: 'Storage',
-                                auth_path: ['system', 'storage'],
-                                sub_ui_url: 'storage',
-                                sub_url_prefix: '/storage'
-                            },
-                            {
-                                title: 'Task',
-                                auth_path: ['system', 'task'],
-                                sub_ui_url: 'task',
-                                sub_url_prefix: '/task'
-                            },
-                            {
-                                title: 'Administrator',
-                                auth_path: ['system', 'admin'],
-                                sub_ui_url: 'admin.userMgmt',
-                                sub_url_prefix: '/admin'
-                            },
-                            {
-                                title: 'Notification',
-                                auth_path: ['system', 'notification'],
-                                sub_ui_url: 'notification.channel',
-                                sub_url_prefix: '/notification'
-                            },
-                            {
-                                title: 'Extension',
-                                auth_path: ['system', 'extension'],
-                                sub_ui_url: 'extension.list',
-                                sub_url_prefix: '/extension'
-                            }
-                        ]
-                    },
-                    isExpanded: true
-                }]
+                isExpanded: true
+            },
+            {
+                show: true,
+                icon: 'fa sidebar-acm',
+                name: 'system',
+                verbose_name: 'System',
+                auth_path: ['system'],
+                ui_url: 'system.host',
+                url_prefix: ['/system', '/storage', '/task', '/admin', '/notification', '/extension'],
+                ui_data: {},
+                collapse: true,
+                submenu: {
+                    state: true,
+                    list: [
+                        {
+                            title: 'General Settings',
+                            auth_path: ['system', 'host'],
+                            sub_ui_url: 'system.host',
+                            sub_url_prefix: '/system'
+                        },
+                        {
+                            title: 'Storage',
+                            auth_path: ['system', 'storage'],
+                            sub_ui_url: 'storage',
+                            sub_url_prefix: '/storage'
+                        },
+                        {
+                            title: 'Task',
+                            auth_path: ['system', 'task'],
+                            sub_ui_url: 'task',
+                            sub_url_prefix: '/task'
+                        },
+                        {
+                            title: 'Administrator',
+                            auth_path: ['system', 'admin'],
+                            sub_ui_url: 'admin.userMgmt',
+                            sub_url_prefix: '/admin'
+                        },
+                        {
+                            title: 'Notification',
+                            auth_path: ['system', 'notification'],
+                            sub_ui_url: 'notification.channel',
+                            sub_url_prefix: '/notification'
+                        },
+                        {
+                            title: 'Extension',
+                            auth_path: ['system', 'extension'],
+                            sub_ui_url: 'extension.list',
+                            sub_url_prefix: '/extension'
+                        }
+                    ]
+                },
+                isExpanded: true
+            }]
         },
         {
             show: true,
-            name: 'device services',
-            title: 'Device services',
-            elements: [
-                {
-                    show: true,
-                    icon: 'fa fa-sitemap',
-                    name: 'device services',
-                    verbose_name: 'Device services',
-                    ui_url: 'ha.device_ha',
-                    url_prefix: ['/ha', '/ssl_monitoring'],
-                    collapse: true,
-                    submenu: {
-                        state: true,
-                        list: [
-                            {
-                                title: 'HA Management',
-                                auth_path: ['ha'],
-                                sub_ui_url: 'ha.device_ha',
-                                sub_url_prefix: '/ha'
-                            },
-                            {
-                                title: 'SSL Certificates',
-                                auth_path: ['ssl_monitoring'],
-                                sub_ui_url: 'ssl_monitoring',
-                                sub_url_prefix: '/ssl_monitoring'
-                            }
-                        ]
-                    },
-                    isExpanded: true
-                }
-            ]
-        },
-        {
-            show: true,
             name: 'central',
             title: 'Central Configuration',
             elements: [
@@ -142,7 +108,7 @@
                     show: true,
                     icon: 'fa sidebar-image',
                     name: 'image',
-                    verbose_name: 'Upgrade Center',
+                    verbose_name: 'Device Build',
                     auth_path: ['image'],
                     ui_url: 'image',
                     url_prefix: '/image',
@@ -154,7 +120,7 @@
                     show: true,
                     icon: 'fa sidebar-config',
                     name: 'configuration',
-                    verbose_name: 'Automation Hub',
+                    verbose_name: 'Configuration File',
                     auth_path: ['configuration'],
                     ui_url: 'configuration.device',
                     url_prefix: '/configuration',
@@ -185,30 +151,30 @@
                     },
                     isExpanded: true
                 },
-                // {
-                //     show: true,
-                //     icon: 'fa fa-retweet',
-                //     name: 'ha',
-                //     verbose_name: 'HA',
-                //     auth_path: ['ha'],
-                //     ui_url: 'ha.device_ha',
-                //     url_prefix: '/ha',
-                //     ui_data: {},
-                //     collapse: true,
-                //     isExpanded: true
-                // },
-                // {
-                //     show: true,
-                //     icon: 'fa fa-key',
-                //     name: 'ssl_monitoring',
-                //     verbose_name: 'SSL Certificate',
-                //     auth_path: ['ssl_monitoring'],
-                //     ui_url: 'ssl_monitoring',
-                //     url_prefix: '/ssl_monitoring',
-                //     ui_data: {},
-                //     collapse: true,
-                //     isExpanded: true
-                // }
+                {
+                    show: true,
+                    icon: 'fa fa-retweet',
+                    name: 'ha',
+                    verbose_name: 'HA',
+                    auth_path: ['ha'],
+                    ui_url: 'ha.device_ha',
+                    url_prefix: '/ha',
+                    ui_data: {},
+                    collapse: true,
+                    isExpanded: true
+                },
+                {
+                    show: true,
+                    icon: 'fa fa-key',
+                    name: 'ssl_monitoring',
+                    verbose_name: 'SSL Certificate',
+                    auth_path: ['ssl_monitoring'],
+                    ui_url: 'ssl_monitoring',
+                    url_prefix: '/ssl_monitoring',
+                    ui_data: {},
+                    collapse: true,
+                    isExpanded: true
+                }
             ]
         }
     ]);
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/channel/channel.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/channel/channel.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/channel/channel.html	(working copy)
@@ -1,82 +1,78 @@
-<div class="col-lg-12">
-    <div class="widget">
-        <div class="widget-header">
-            <span class="tab-header-1">{{ 'Notification Channel' | T }}</span>
-        </div>
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn btn-link" title="{{ 'Refresh Channel' | T }}"
-                        ng-click="notificationChannel.refresh()"><i class="fa fa-refresh an-tab-icon"></i></button>
-                <button class="btn btn-link " title="{{'New Channel'|T}}" ng-click="notificationChannel.add()"><i
-                    class="fa fa-plus-circle an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-lg-12">
+        <div class="widget">
+            <div class="widget-header">
+                <span>{{ 'Notification Channel' | T }}</span>
             </div>
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn btn-link" title="{{ 'Refresh Channel' | T }}" ng-click="notificationChannel.refresh()"><i class="fa fa-refresh"></i></button>
+                    <button class="btn btn-link " title="{{'New Channel'|T}}" ng-click="notificationChannel.add()"><i class="fa fa-plus-circle"></i></button>
+                </div>
+            </div>
+            <div class="table-wrapper" st-table="displayedCollection" st-safe-src="notificationChannel.channelList">
+                <table class="table table-striped table-hover">
+                    <thead>
+                        <tr>
+                            <th class="v-num">No.</th>
+                            <th class="d-name">{{ 'Channel Name' | T }}</th>
+                            <th class="d-type">{{ 'Channel Type' | T }}</th>
+                            <th class="d-default">{{ 'Default' | T }}</th>
+                            <th class="d-service">{{ 'Action' | T }}</th>
+                        </tr>
+                        <tr>
+                            <th></th>
+                            <th>
+                                <input st-search="name" placeholder="{{'Search by Channel Name'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th>
+                                <select class="input-sm form-control" st-search="type">
+                                    <option value="">{{'All'|T}}</option>
+                                    <!-- <option value="dingding">{{ 'DingDing' | T}}</option>
+                                    <option value="LINE">{{ 'LINE' | T}}</option> -->
+                                    <option value="email">{{ 'Email' | T}}</option>
+                                    <option value="webhook">{{ 'webhook' | T}}</option>
+                                </select>
+                            </th>
+                            <th></th>
+                            <th></th>
+                        </tr>
+                    </thead>
+                    <tbody ng-if="!notificationChannel.loading">
+                        <tr ng-repeat="(num, item) in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td style="cursor: pointer;" ui-sref="index.notification.channel.detail({id: item.id, name: item.name})">
+                                <a class="name">{{ item.name }}</a>
+                            </td>
+                            <td>{{ notificationChannel.parseChannelType(item.type) | T}}</td>
+                            <td>
+                                <div ng-show="item.is_default">
+                                    <i style="color:#5cb85c" class="fa fa-check-square"></i>
+                                </div>
+                                <div ng-hide="item.is_default">
+                                    <i style="color:#8e8e8e" class="fa fa-minus-square"></i>
+                                </div>
+                            </td>
+                            <td>
+                                <a title="{{'Delete'|T}}" class="" ng-click="notificationChannel.delete(item)">
+                                    <i class="fa fa-times-circle"></i>
+                                </a>
+                            </td>
+                        </tr>
+                        <tr ng-if="displayedCollection.length == 0">
+                            <td colspan="5" class="text-center">{{ 'You do not have any notification channels.' | T }}</td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="7" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10" st-page-change="onPageChange(newPage)" st-template="app/modules/common/templates/page.html"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
+            <div style="text-align: center" ng-if="notificationChannel.loading"><img src="app/images/loading.gif"></div>
         </div>
-        <div class="table-wrapper" st-table="displayedCollection" st-safe-src="notificationChannel.channelList">
-            <table class="table table-striped table-hover">
-                <thead>
-                <tr>
-                    <th class="v-num">No.</th>
-                    <th class="d-name">{{ 'Channel Name' | T }}</th>
-                    <th class="d-type">{{ 'Channel Type' | T }}</th>
-                    <th class="d-default">{{ 'Default' | T }}</th>
-                    <th class="d-service">{{ 'Action' | T }}</th>
-                </tr>
-                <tr>
-                    <th></th>
-                    <th>
-                        <input st-search="name" placeholder="{{'Search by Channel Name'|T}}"
-                               class="input-sm form-control" type="text"/>
-                    </th>
-                    <th>
-                        <select class="input-sm form-control" st-search="type">
-                            <option value="">{{'All' | T}}</option>
-                            <!-- <option value="dingding">{{ 'DingDing' | T}}</option>
-                            <option value="LINE">{{ 'LINE' | T}}</option> -->
-                            <option value="email">{{ 'Email' | T}}</option>
-                            <option value="webhook">{{ 'webhook' | T}}</option>
-                        </select>
-                    </th>
-                    <th></th>
-                    <th></th>
-                </tr>
-                </thead>
-                <tbody ng-if="!notificationChannel.loading">
-                <tr ng-repeat="(num, item) in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td style="cursor: pointer;"
-                        ui-sref="index.notification.channel.detail({id: item.id, name: item.name})">
-                        <a class="name">{{ item.name }}</a>
-                    </td>
-                    <td>{{ notificationChannel.parseChannelType(item.type) | T}}</td>
-                    <td>
-                        <div ng-show="item.is_default">
-                            <i style="color:#5cb85c" class="fa fa-check-square"></i>
-                        </div>
-                        <div ng-hide="item.is_default">
-                            <i style="color:#8e8e8e" class="fa fa-minus-square"></i>
-                        </div>
-                    </td>
-                    <td>
-                        <a title="{{'Delete'|T}}" class="" ng-click="notificationChannel.delete(item)">
-                            <i class="fa fa-times-circle an-row-icon"></i>
-                        </a>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length == 0">
-                    <td colspan="5" class="text-center">{{ 'You do not have any notification channels.' | T }}</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10"
-                             st-page-change="onPageChange(newPage)"
-                             st-template="app/modules/common/templates/page.html"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
-        <div style="text-align: center" ng-if="notificationChannel.loading"><img src="app/images/loading.gif"></div>
     </div>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/notification.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/notification.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/notification.html	(working copy)
@@ -2,17 +2,15 @@
     <div class="col-md-12">
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/notification/channel') }">
-                <a ui-sref="index.notification.channel"><span class="tab-header">{{ 'Notification Channel' | T }}</span></a>
+                <a ui-sref="index.notification.channel">{{ 'Notification Channel' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/notification/setting') }">
-                <a ui-sref="index.notification.setting.mail"><span class="tab-header">{{ 'Notification Setting' | T
-                    }}</span></a>
+                <a ui-sref="index.notification.setting.mail">{{ 'Notification Setting' | T }}</a>
             </li>
         </ul>
     </div>
-
-    <div class="content-wrapper">
-        <div class="" ng-show="url_contain('/notification/channel')" ui-view="channel"></div>
-        <div class="" ng-show="url_contain('/notification/setting')" ui-view="setting"></div>
-    </div>
 </div>
+<div class="">
+    <div class="" ng-show="url_contain('/notification/channel')" ui-view="channel"></div>
+    <div class="" ng-show="url_contain('/notification/setting')" ui-view="setting"></div>
+</div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/mail.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/mail.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/mail.html	(working copy)
@@ -1,66 +1,70 @@
-<div class="col-md-12">
-    <div class="widget">
-        <form class="form-horizontal" name="mailform" verify-scope="tipStyle: 1" unsaved-warning-form>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'SMTP Enable' | T}}</label>
-                <div class="col-md-6">
-                    <input bs-switch class="switch" ng-model="mailSetting.mail_server_info.enabled" type="checkbox"
-                           switch-active="true" resettable>
-                </div>
+<div>
+    <form class="form-horizontal" name="mailform" verify-scope="tipStyle: 1" unsaved-warning-form>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'SMTP Enable' | T}}</label>
+            <div class="col-md-6">
+                <input bs-switch class="switch" ng-model="mailSetting.mail_server_info.enabled" type="checkbox" switch-active="true" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'SMTP Server' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="text" class="form-control" name="ip"
-                           ng-model="mailSetting.mail_server_info.host"
-                           maxlength="64" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'SMTP Server' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="text" class="form-control" name="ip" ng-model="mailSetting.mail_server_info.host" maxlength="64" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'SMTP Port' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="number" class="form-control" name="port"
-                           ng-model="mailSetting.mail_server_info.port" max="65535" min="1" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'SMTP Port' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="number" class="form-control" name="port" ng-model="mailSetting.mail_server_info.port" max="65535" min="1" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'Username' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="text" class="form-control" name="user"
-                           ng-model="mailSetting.mail_server_info.user" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Username' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="text" class="form-control" name="user" ng-model="mailSetting.mail_server_info.user" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'Password' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="password" class="form-control" name="password"
-                           ng-model="mailSetting.mail_server_info.password" maxlength="64" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Password' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="password" class="form-control" name="password" ng-model="mailSetting.mail_server_info.password" maxlength="64" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'Email Sender Address' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="email" class="form-control" name="sender"
-                           ng-model="mailSetting.mail_server_info.from_address" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Email Sender Address' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="email" class="form-control" name="sender" ng-model="mailSetting.mail_server_info.from_address" resettable>
             </div>
-            <div class="form-group">
-                <label class="control-label col-md-3">{{ 'Email Sender Name' | T}}</label>
-                <div class="col-md-6">
-                    <input ng-verify type="text" class="form-control" name="name"
-                           ng-model="mailSetting.mail_server_info.from_name" resettable>
-                </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Email Sender Name' | T}}</label>
+            <div class="col-md-6">
+                <input ng-verify type="text" class="form-control" name="name" ng-model="mailSetting.mail_server_info.from_name" resettable>
             </div>
-            <div class="form-group col-md-offset-3">
-                <div class="col-md-offset-3 col-md-6">
-                    <button ng-show="mailform.$dirty" class="btn btn-primary" ng-verify="control:'mailform'"
-                            ng-click="mailSetting.submit()">{{ 'Save Changes' | T}}
-                    </button>
-                    <button ng-show="mailform.$dirty" type="reset" class="btn btn-default btn-cancel"
-                            ng-click="mailform.$dirty=false;mailSetting.cancel()">{{'Cancel' | T}}
-                    </button>
-                </div>
+        </div>
+        <!-- <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Ehlo Identity' | T}}</label>
+            <div class="col-md-6">
+                <input type="text" class="form-control" name="identity" ng-model="mailSetting.mail_server_info.ehlo_identity" resettable>
             </div>
-        </form>
-    </div>
-</div>
+        </div> -->
+        <!-- <div class="form-group">
+            <label class="control-label col-md-3">{{ 'Skip Verify' | T}}</label>
+            <div class="col-md-6">
+                <input bs-switch class="switch" ng-model="mailSetting.mail_server_info.skip_verify" type="checkbox" switch-active="true" resettable>
+            </div>
+        </div> -->
+        <!-- <div class="form-group">
+            <div class="col-md-offset-3 col-md-6">
+                <span class="msg">{{mailSetting.failed}}</span>
+            </div>
+        </div> -->
+        <div class="form-group col-md-offset-3">
+            <div class="col-md-offset-3 col-md-6">
+                <button ng-show="mailform.$dirty" class="btn btn-primary" ng-verify="control:'mailform'" ng-click="mailSetting.submit()">{{ 'Save Changes' | T}}</button>
+                <button ng-show="mailform.$dirty" type="reset" class="btn btn-default btn-cancel" ng-click="mailform.$dirty=false;mailSetting.cancel()">{{'Cancel'|T}}</button>
+                <!-- <button class="btn btn-success" ng-verify="control:'mailform'" ng-click="mailSetting.test()">{{ 'Send Test Mail' | T}}</button> -->
+            </div>
+        </div>
+    </form>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/setting.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/setting.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/notification/setting/setting.html	(working copy)
@@ -1,12 +1,13 @@
-<div class="col-md-12">
-    <ul class="nav nav-pills">
-        <li ng-class="{ active: url_contain('/notification/setting/mail') }">
-            <a ui-sref="index.notification.setting.mail"><span class="tab-header">{{ 'SMTP Setting' | T
-                }}</span></a>
-        </li>
-    </ul>
+<div class="row">
+    <div class="col-md-12">
+        <ul class="nav nav-pills">
+            <li ng-class="{ active: url_contain('/notification/setting/mail') }">
+                <a ui-sref="index.notification.setting.mail">{{ 'SMTP Setting' | T }}</a>
+            </li>
+        </ul>
+    </div>
 </div>
-
-<div class="content-wrapper">
+<div class="">
     <div class="" ng-show="url_contain('/notification/setting/mail')" ui-view="mail"></div>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/basic.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/basic.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/basic.html	(working copy)
@@ -1,186 +1,156 @@
-<div class="col-md-12 select-list">
-    <div class="widget">
-        <div class="widget-header">
-            <span class="tab-header-1">{{'Real Service' | T}}</span>
-        </div>
-        <table>
-            <thead>
-            <tr>
-                <th style="padding: 5px 10px;"><input type="text" placeholder="{{'Exact Match Search by IP' | T}}"
-                                                      class="input-sm form-control"
-                                                      ng-model="RealServiceBasic.ipAddress"
-                                                      ng-change="RealServiceBasic.changeIP()"
-                                                      ng-disabled="RealServiceBasic.loading"></th>
-                <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
-                <th style="padding: 5px 10px;">
-                    <select class="input-sm form-control" ng-model="RealServiceBasic.blockName"
-                            ng-change="RealServiceBasic.ipAddress = ''" ng-disabled="RealServiceBasic.loading">
-                        <option value=''>{{'Please Select Block' | T}}</option>
-                        <option ng-repeat="block in RealServiceBasic.blocks" value="{{block}}">{{ block }}</option>
-                    </select>
-                </th>
-                <th style="padding: 5px 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
-                <th style="padding: 5px 10px;">
-                    <select class="input-sm form-control" ng-model="RealServiceBasic.deviceName"
-                            ng-change="RealServiceBasic.ipAddress = ''" ng-disabled="RealServiceBasic.loading">
-                        <option value=''>{{'Please Select Device' | T}}</option>
-                        <option ng-repeat="device in RealServiceBasic.deviceList" value="{{device}}">{{ device }}
-                        </option>
-                    </select>
-                </th>
-                <th style="padding: 5px 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
-                <th style="padding: 5px 10px;">
-                    <button type="submit" class="btn btn-primary" ng-click="RealServiceBasic.refresh()"
-                            ng-disabled="RealServiceBasic.loading || (RealServiceBasic.blockName=='' && RealServiceBasic.ipAddress=='' && RealServiceBasic.deviceName=='')">
-                        {{'Search' | T}}
-                    </button>
-                </th>
-            </tr>
-            </thead>
-        </table>
-        <div class="table-toolbar">
-            <div class="row">
-                <div class="btn-group ">
-                    <!-- <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="RealServiceBasic.refresh()"><i class="fa fa-refresh"></i></button> -->
-                    <!-- <button ng-if="RealServiceBasic.root" class="btn btn-link" title="{{ 'Block' | T }}" ng-click="RealServiceBasic.block()"><i class="fa fa-tags"></i></button> -->
-                    <button ng-if="user_auth_data.topology.slb_topology.enable_rs" class="btn btn-link"
-                            title="{{ 'Enable' | T }}" ng-disabled="RealServiceBasic.selected()"
-                            ng-click="RealServiceBasic.enable(true)"><span class="fa fa-play an-tab-icon"></span></button>
-                    <button ng-if="user_auth_data.topology.slb_topology.disable_rs" class="btn btn-link"
-                            title="{{ 'Disable' | T }}" ng-disabled="RealServiceBasic.selected()"
-                            ng-click="RealServiceBasic.enable(false)"><span class="fa fa-stop an-tab-icon"></span></button>
-                    <button ng-if="user_auth_data.topology.slb_topology.edit_rs_weight" class="btn btn-link"
-                            title="{{ 'Weight' | T }}" ng-disabled="RealServiceBasic.selected()"
-                            ng-click="RealServiceBasic.weight()"><span class="fa fa-gavel an-tab-icon"></span></button>
-                </div>
+<div class="row">
+    <div class="col-md-12 select-list">
+        <div class="widget">
+            <div class="widget-header">
+                <span>{{'Real Service' | T}}</span>
             </div>
-        </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="RealServiceBasic.serviceList"
-                   st-set-filter="realServiceFilter" class="table table-hover table-striped">
+            <table>
                 <thead>
-                <tr>
-                    <th></th>
-                    <th class="d-num">No.</th>
-                    <th class="v-name">{{ 'Service Name' | T }}</th>
-                    <th class="v-type">{{ 'Block' | T }}</th>
-                    <th class="v-device">{{ 'Device Name' | T }}</th>
-                    <th class="d-name">{{ 'Device Group' | T }}</th>
-                    <th class="v-ip">{{ 'IP Address' | T }}</th>
-                    <th class="v-port">{{ 'Port' | T }}</th>
-                    <th class="v-enable">{{ 'Enable' | T }}</th>
-                    <th class="v-upDown">{{ 'UP/DOWN' | T }}</th>
-                    <th class="v-goup">{{ 'Group Weight' | T }}</th>
-                    <th class="d-max">{{ 'Max Connection' | T }}</th>
-                    <th class="d-up">{{ 'Up Check' | T }}</th>
-                    <th class="d-down">{{ 'Down Check' | T }}</th>
-                </tr>
-                <tr>
-                    <th>
-                        <input type="checkbox" ng-checked="RealServiceBasic.all"
-                               ng-click="RealServiceBasic.selectAll()"/>
-                    </th>
-                    <th></th>
-                    <th>
-                        <input st-search="service_name" placeholder="{{'Search by Service Name'|T}}"
-                               class="input-sm form-control" type="text"/>
-                    </th>
-                    <th>
-                        <!-- <select class="input-sm form-control" st-input-event="change" st-search="block">
-                            <option value="">{{'All'|T}}</option>
-                            <option ng-repeat="block in RealServiceBasic.blocks" value="{{block}}">{{ block }}</option>
-                        </select> -->
-                    </th>
-                    <th></th>
-                    <th></th>
-                    <!-- <th ng-if="!RealServiceBasic.loading">
-                        <st-select-multiple collection="RealServiceBasic.serviceList" predicate="device_name"></st-select-multiple>
-                    </th>
-                    <th ng-if="!RealServiceBasic.loading">
-                        <st-select-multiple collection="RealServiceBasic.serviceList" predicate="device_group"></st-select-multiple>
-                    </th> -->
-                    <th>
-                        <!-- <input st-search="ip" placeholder="{{'Exact Match Search by IP'|T}}" class="input-sm form-control" type="text" /> -->
-                    </th>
-                    <th></th>
-                    <th></th>
-                    <th></th>
-                    <th>
-                        <input st-search="group_name" placeholder="{{'Search by Group Name'|T}}"
-                               class="input-sm form-control" type="text"/>
-                    </th>
-                    <th></th>
-                    <th></th>
-                    <th></th>
-                </tr>
+                    <tr>
+                        <th style="padding: 5px 10px;"><input type="text" placeholder="{{'Exact Match Search by IP' | T}}" class="input-sm form-control" ng-model="RealServiceBasic.ipAddress" ng-change="RealServiceBasic.changeIP()" ng-disabled="RealServiceBasic.loading"></th>
+                        <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
+                        <th style="padding: 5px 10px;">
+                            <select class="input-sm form-control" ng-model="RealServiceBasic.blockName" ng-change="RealServiceBasic.ipAddress = ''" ng-disabled="RealServiceBasic.loading">
+                                <option value=''>{{'Please Select Block' | T}}</option>
+                                <option ng-repeat="block in RealServiceBasic.blocks" value="{{block}}">{{ block }}</option>
+                            </select>
+                        </th>
+                        <th style="padding: 5px 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
+                        <th style="padding: 5px 10px;">
+                            <select class="input-sm form-control" ng-model="RealServiceBasic.deviceName" ng-change="RealServiceBasic.ipAddress = ''" ng-disabled="RealServiceBasic.loading">
+                                <option value=''>{{'Please Select Device' | T}}</option>
+                                <option ng-repeat="device in RealServiceBasic.deviceList" value="{{device}}">{{ device }}</option>
+                            </select>
+                        </th>
+                        <th style="padding: 5px 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
+                        <th style="padding: 5px 10px;"><button type="submit" class="btn btn-primary" ng-click="RealServiceBasic.refresh()" ng-disabled="RealServiceBasic.loading || (RealServiceBasic.blockName=='' && RealServiceBasic.ipAddress=='' && RealServiceBasic.deviceName=='')">{{'Search' | T}}</button></th>
+                    </tr>
                 </thead>
-                <tbody ng-if="!RealServiceBasic.loading">
-                <tr st-select-row="item" st-select-mode="multiple" ng-repeat="(num, item) in displayedCollection">
-                    <td>
-                        <input type="checkbox" ng-checked="item.isSelected"/>
-                    </td>
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td style="cursor: pointer;" ng-click="RealServiceBasic.detail(item)"><a
-                        class="name">{{ item.service_name }}</a></td>
-                    <td>
-                        <span class="label label-success" ng-repeat="block in item.blocks"
-                              style="margin-right: 4px">{{ block }}</span>
-                    </td>
-                    <td style="cursor: pointer;" ui-sref="index.device.detail({name:item.device.name})"
-                        ng-click="RealServiceBasic.setDetail(item.device)"><a class="name">{{ item.device.name }}</a>
-                    </td>
-                    <td>{{ item.device.device_group }}</td>
-                    <td>{{ item.ip }}</td>
-                    <td>{{ item.port }}</td>
-                    <td>
-                        <i ng-show="item.enable" style="color:#5cb85c" class="fa fa-check-circle"></i>
-                        <i ng-hide="item.enable" style="color:#e02f44" class="fa fa-minus-circle"></i>
-                    </td>
-                    <td>
-                        <i ng-show="item.upDown=='UP'" style="color:#5cb85c" class="fa fa-check-circle"></i>
-                        <i ng-show="item.upDown=='DOWN'" style="color:#e02f44" class="fa fa-minus-circle"></i>
-                        <span> {{ item.upDown }}</span>
-                    </td>
-                    <td>
-                        <div class="table-wrapper" ng-if="item.groups.length>0">
-                            <table st-table="itemCollection" st-safe-src="item.groups"
-                                   class="table table-hover table-striped">
-                                <!-- <thead>
-                                    <tr>
-                                        <th class="v-name">{{ 'Group Name' | T }}</th>
-                                        <th class="v-type">{{ 'Weight' | T }}</th>
-                                    </tr>
-                                </thead> -->
-                                <tbody>
-                                <tr ng-repeat="row in itemCollection">
-                                    <td>{{ row.group_name }}</td>
-                                    <td>{{ row.weight }}</td>
-                                </tr>
-                                </tbody>
-                            </table>
-                        </div>
-                        <!-- <span class="label label-primary" ng-repeat="group in item.groups" style="margin-right: 4px">{{ group.group_name }}</span> -->
-                    </td>
-                    <td>{{ item.max_conn }}</td>
-                    <td>{{ item.hc_up }}</td>
-                    <td>{{ item.hc_down }}</td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="14" class="text-center">No matching records found.</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10"
-                             st-page-change="onPageChange(newPage)"
-                             st-template="app/modules/common/templates/page.html"></div>
-                    </td>
-                </tr>
-                </tfoot>
             </table>
+            <div class="table-toolbar">
+                <div class="row">
+                    <div class="btn-group ">
+                        <!-- <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="RealServiceBasic.refresh()"><i class="fa fa-refresh"></i></button> -->
+                        <!-- <button ng-if="RealServiceBasic.root" class="btn btn-link" title="{{ 'Block' | T }}" ng-click="RealServiceBasic.block()"><i class="fa fa-tags"></i></button> -->
+                        <button ng-if="user_auth_data.topology.slb_topology.enable_rs" class="btn btn-link" title="{{ 'Enable' | T }}" ng-disabled="RealServiceBasic.selected()" ng-click="RealServiceBasic.enable(true)"><span class="fa fa-play"></span></button>
+                        <button ng-if="user_auth_data.topology.slb_topology.disable_rs" class="btn btn-link" title="{{ 'Disable' | T }}" ng-disabled="RealServiceBasic.selected()" ng-click="RealServiceBasic.enable(false)"><span class="fa fa-stop"></span></button>
+                        <button ng-if="user_auth_data.topology.slb_topology.edit_rs_weight" class="btn btn-link" title="{{ 'Weight' | T }}" ng-disabled="RealServiceBasic.selected()" ng-click="RealServiceBasic.weight()"><span class="fa fa-gavel"></span></button>
+                    </div>
+                </div>
+            </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="RealServiceBasic.serviceList" st-set-filter="realServiceFilter" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th></th>
+                            <th class="d-num">No.</th>
+                            <th class="v-name">{{ 'Service Name' | T }}</th>
+                            <th class="v-type">{{ 'Block' | T }}</th>
+                            <th class="v-device">{{ 'Device Name' | T }}</th>
+                            <th class="d-name">{{ 'Device Group' | T }}</th>
+                            <th class="v-ip">{{ 'IP Address' | T }}</th>
+                            <th class="v-port">{{ 'Port' | T }}</th>
+                            <th class="v-enable">{{ 'Enable' | T }}</th>
+                            <th class="v-upDown">{{ 'UP/DOWN' | T }}</th>
+                            <th class="v-goup">{{ 'Group Weight' | T }}</th>
+                            <th class="d-max">{{ 'Max Connection' | T }}</th>
+                            <th class="d-up">{{ 'Up Check' | T }}</th>
+                            <th class="d-down">{{ 'Down Check' | T }}</th>
+                        </tr>
+                        <tr>
+                            <th>
+                                <input type="checkbox" ng-checked="RealServiceBasic.all" ng-click="RealServiceBasic.selectAll()" />
+                            </th>
+                            <th></th>
+                            <th>
+                                <input st-search="service_name" placeholder="{{'Search by Service Name'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th>
+                                <!-- <select class="input-sm form-control" st-input-event="change" st-search="block">
+                                    <option value="">{{'All'|T}}</option>
+                                    <option ng-repeat="block in RealServiceBasic.blocks" value="{{block}}">{{ block }}</option>
+                                </select> -->
+                            </th>
+                            <th></th>
+                            <th></th>
+                            <!-- <th ng-if="!RealServiceBasic.loading">
+                                <st-select-multiple collection="RealServiceBasic.serviceList" predicate="device_name"></st-select-multiple>
+                            </th>
+                            <th ng-if="!RealServiceBasic.loading">
+                                <st-select-multiple collection="RealServiceBasic.serviceList" predicate="device_group"></st-select-multiple>
+                            </th> -->
+                            <th>
+                                <!-- <input st-search="ip" placeholder="{{'Exact Match Search by IP'|T}}" class="input-sm form-control" type="text" /> -->
+                            </th>
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                            <th>
+                                <input st-search="group_name" placeholder="{{'Search by Group Name'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th></th>
+                            <th></th>
+                            <th></th>
+                        </tr>
+                    </thead>
+                    <tbody ng-if="!RealServiceBasic.loading">
+                        <tr st-select-row="item" st-select-mode="multiple" ng-repeat="(num, item) in displayedCollection">
+                            <td>
+                                <input type="checkbox" ng-checked="item.isSelected" />
+                            </td>
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td style="cursor: pointer;" ng-click="RealServiceBasic.detail(item)"><a class="name">{{ item.service_name }}</a></td>
+                            <td>
+                                <span class="label label-success" ng-repeat="block in item.blocks" style="margin-right: 4px">{{ block }}</span>
+                            </td>
+                            <td style="cursor: pointer;" ui-sref="index.device.detail({name:item.device.name})" ng-click="RealServiceBasic.setDetail(item.device)"> <a class="name">{{ item.device.name }}</a></td>
+                            <td>{{ item.device.device_group }}</td>
+                            <td>{{ item.ip }}</td>
+                            <td>{{ item.port }}</td>
+                            <td>
+                                <i ng-show="item.enable" style="color:#5cb85c" class="fa fa-check-circle"></i>
+                                <i ng-hide="item.enable" style="color:#e02f44" class="fa fa-minus-circle"></i>
+                            </td>
+                            <td>
+                                <i ng-show="item.upDown=='UP'" style="color:#5cb85c" class="fa fa-check-circle"></i>
+                                <i ng-show="item.upDown=='DOWN'" style="color:#e02f44" class="fa fa-minus-circle"></i>
+                                <span> {{ item.upDown }}</span>
+                            </td>
+                            <td>
+                                <div class="table-wrapper" ng-if="item.groups.length>0">
+                                    <table st-table="itemCollection" st-safe-src="item.groups" class="table table-hover table-striped">
+                                        <!-- <thead>
+                                            <tr>
+                                                <th class="v-name">{{ 'Group Name' | T }}</th>
+                                                <th class="v-type">{{ 'Weight' | T }}</th>
+                                            </tr>
+                                        </thead> -->
+                                        <tbody>
+                                            <tr ng-repeat="row in itemCollection">
+                                                <td>{{ row.group_name }}</td>
+                                                <td>{{ row.weight }}</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </div>
+                                <!-- <span class="label label-primary" ng-repeat="group in item.groups" style="margin-right: 4px">{{ group.group_name }}</span> -->
+                            </td>
+                            <td>{{ item.max_conn }}</td>
+                            <td>{{ item.hc_up }}</td>
+                            <td>{{ item.hc_down }}</td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="7" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10" st-page-change="onPageChange(newPage)" st-template="app/modules/common/templates/page.html"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
+            <div style="text-align: center" ng-if="RealServiceBasic.loading"><img src="app/images/loading.gif"></div>
         </div>
-        <div style="text-align: center" ng-if="RealServiceBasic.loading"><img src="app/images/loading.gif"></div>
     </div>
 </div>
 
\ No newline at end of file
@@ -192,4 +162,4 @@
         left: 95px;
         opacity: 0;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/block.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/block.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/block.html	(working copy)
@@ -1,87 +1,76 @@
-<div class="col-md-12">
-    <div class="widget" ng-if="RealServiceBlock.root">
-        <div class="widget-header">
-            <span class="tab-header-1">{{'Real Service Block' | T}}</span>
-        </div>
-        <div class="table-toolbar">
-            <div class="btn-group ">
-                <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="RealServiceBlock.refreshBlock()">
-                    <span class="fa fa-refresh an-tab-icon"></span></button>
-                <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="RealServiceBlock.addBlock()"><span
-                    class="fa fa-plus-circle an-tab-icon"></span></button>
-                <button class="btn btn-link" title="{{ 'Export' | T }}" ng-click="RealServiceBlock.exportBlock()"><i
-                    class="fa fa-sign-out an-tab-icon"></i></button>
-                <button class="btn btn-link" title="{{ 'Import' | T }}"><i class="fa fa-sign-in an-tab-icon"></i>
-                </button>
-                <input title="{{ 'Import' | T }}" type="file" id="uploadfield" class="file form-control" nv-file-select
-                       uploader="RealServiceBlock.fileUploader">
+<div class="row">
+    <div class="col-md-12 select-list">
+        <div class="widget" ng-if="RealServiceBlock.root">
+            <div class="widget-header">
+                <span>{{'Real Service Block' | T}}</span>
             </div>
+            <div class="table-toolbar">
+                <div class="btn-group ">
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="RealServiceBlock.refreshBlock()"><span class="fa fa-refresh"></span></button>
+                    <button class="btn btn-link" title="{{ 'Add' | T }}" ng-click="RealServiceBlock.addBlock()"><span class="fa fa-plus-circle"></span></button>
+                    <button class="btn btn-link" title="{{ 'Export' | T }}" ng-click="RealServiceBlock.exportBlock()"><i class="fa fa-sign-out"></i></button>
+                    <button class="btn btn-link" title="{{ 'Import' | T }}"><i class="fa fa-sign-in"></i></button>
+                    <input title="{{ 'Import' | T }}" type="file" id="uploadfield" class="file form-control" nv-file-select uploader="RealServiceBlock.fileUploader">
+                </div>
+            </div>
+            <div class="table-wrapper">
+                <table st-table="displayedCollection" st-safe-src="RealServiceBlock.blockList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="d-num">No.</th>
+                            <th class="v-name">{{ 'Block Name' | T }}</th>
+                            <th class="v-device">{{ 'Real Service' | T }}</th>
+                            <th class="v-device">{{ 'Action' | T }}</th>
+                        </tr>
+                        <tr>
+                            <th></th>
+                            <th>
+                                <input st-search="name" placeholder="{{'Search by Block Name'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th></th>
+                            <th></th>
+                        </tr>
+                    </thead>
+                    <tbody ng-if="!RealServiceBlock.blockLoading">
+                        <tr ng-repeat="(num, item) in displayedCollection">
+                            <td class="d-num">{{ ((currentBlockPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td>{{ item.name }}</td>
+                            <td>
+                                <div class="table-wrapper">
+                                    <table class="table table-hover table-striped">
+                                        <tbody>
+                                            <tr ng-repeat="(key, value) in item.rs">
+                                                <td>{{ key }}</td>
+                                                <td>{{ value.join(', ') }}</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </div>
+                            </td>
+                            <td>
+                                <a title="{{'Edit'|T}}" class="" ng-click="RealServiceBlock.editBlock(item)">
+                                    <i class="fa fa-pencil"></i>
+                                </a>
+                                <a title="{{'Delete'|T}}" class="" ng-click="RealServiceBlock.deleteBlock(item)">
+                                    <i class="fa fa-times-circle"></i>
+                                </a>
+                            </td>
+                        </tr>
+                    </tbody>
+                    <tfoot>
+                        <tr>
+                            <td colspan="7" class="text-center">
+                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10" st-page-change="onBlockPageChange(newPage)" st-template="app/modules/common/templates/page.html"></div>
+                            </td>
+                        </tr>
+                    </tfoot>
+                </table>
+            </div>
+            <div style="text-align: center" ng-if="RealServiceBlock.blockLoading"><img src="app/images/loading.gif"></div>
         </div>
-        <div class="table-wrapper">
-            <table st-table="displayedCollection" st-safe-src="RealServiceBlock.blockList"
-                   class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="d-num">No.</th>
-                    <th class="v-name">{{ 'Block Name' | T }}</th>
-                    <th class="v-device">{{ 'Real Service' | T }}</th>
-                    <th class="v-device">{{ 'Action' | T }}</th>
-                </tr>
-                <tr>
-                    <th></th>
-                    <th>
-                        <input st-search="name" placeholder="{{'Search by Block Name'|T}}" class="input-sm form-control"
-                               type="text"/>
-                    </th>
-                    <th></th>
-                    <th></th>
-                </tr>
-                </thead>
-                <tbody ng-if="!RealServiceBlock.blockLoading">
-                <tr ng-repeat="(num, item) in displayedCollection">
-                    <td class="d-num">{{ ((currentBlockPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td>{{ item.name }}</td>
-                    <td>
-                        <div class="table-wrapper">
-                            <table class="table table-hover table-striped">
-                                <tbody>
-                                <tr ng-repeat="(key, value) in item.rs">
-                                    <td>{{ key }}</td>
-                                    <td>{{ value.join(', ') }}</td>
-                                </tr>
-                                </tbody>
-                            </table>
-                        </div>
-                    </td>
-                    <td>
-                        <a title="{{'Edit'|T}}" class="" ng-click="RealServiceBlock.editBlock(item)">
-                            <i class="fa fa-pencil"></i>
-                        </a>
-                        <a title="{{'Delete'|T}}" class="" ng-click="RealServiceBlock.deleteBlock(item)">
-                            <i class="fa fa-times-circle"></i>
-                        </a>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="4" class="text-center">No matching records found.</td>
-                </tr>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10"
-                             st-page-change="onBlockPageChange(newPage)"
-                             st-template="app/modules/common/templates/page.html"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
-        <div style="text-align: center" ng-if="RealServiceBlock.blockLoading"><img src="app/images/loading.gif"></div>
     </div>
 </div>
 
-
 <style type="text/css">
     .file {
         position: absolute;
\ No newline at end of file
@@ -90,4 +79,4 @@
         left: 95px;
         opacity: 0;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/real_service.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/real_service.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/real_service/real_service.html	(working copy)
@@ -1,14 +1,17 @@
-<div class="col-md-12">
-    <ul class="nav nav-pills">
-        <li ng-class="{ active: url_contain('/slb_topology/rs/basic') }">
-            <a ui-sref="index.slb_topology.rs.basic"><span class="tab-header">{{ 'Real Service' | T }}</span></a>
-        </li>
-        <li ng-class="{ active: url_contain('/slb_topology/rs/block') }" ng-if="RealService.root">
-            <a ui-sref="index.slb_topology.rs.block"><span class="tab-header">{{ 'Real Service Block' | T }}</span></a>
-        </li>
-    </ul>
+<div class="row">
+    <div class="col-md-12">
+        <ul class="nav nav-pills">
+            <li ng-class="{ active: url_contain('/slb_topology/rs/basic') }">
+                <a ui-sref="index.slb_topology.rs.basic">{{ 'Real Service' | T }}</a>
+            </li>
+            <li ng-class="{ active: url_contain('/slb_topology/rs/block') }" ng-if="RealService.root">
+                <a ui-sref="index.slb_topology.rs.block">{{ 'Real Service Block' | T }}</a>
+            </li>
+        </ul>
+    </div>
 </div>
-<div class="content-wrapper">
+<div class="">
     <div class="" ng-show="url_contain('/slb_topology/rs/basic')" ui-view="basic"></div>
     <div class="" ng-show="url_contain('/slb_topology/rs/block')" ui-view="block"></div>
 </div>
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/slb_topology.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/slb_topology.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/slb_topology.html	(working copy)
@@ -2,16 +2,15 @@
     <div class="col-md-12">
         <ul class="nav nav-tabs">
             <li role="presentation" ng-class="{ active: url_contain('/slb_topology/slb') }">
-                <a ui-sref="index.slb_topology.slb"><span class="tab-header">{{ 'SLB Topology' | T }}</span></a>
+                <a ui-sref="index.slb_topology.slb">{{ 'SLB Topology' | T }}</a>
             </li>
             <li role="presentation" ng-class="{ active: url_contain('/slb_topology/rs') }">
-                <a ui-sref="index.slb_topology.rs.basic"><span class="tab-header"> {{ 'Real Service' | T }}</span></a>
+                <a ui-sref="index.slb_topology.rs.basic">{{ 'Real Service' | T }}</a>
             </li>
         </ul>
     </div>
-
-    <div class="content-wrapper">
-        <div class="" ng-show="url_contain('/slb_topology/slb')" ui-view="slb"></div>
-        <div class="" ng-show="url_contain('/slb_topology/rs')" ui-view="rs"></div>
-    </div>
 </div>
+<div class="content-wrapper">
+    <div class="" ng-show="url_contain('/slb_topology/slb')" ui-view="slb"></div>
+    <div class="" ng-show="url_contain('/slb_topology/rs')" ui-view="rs"></div>
+</div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/virtual_service/virtual_service.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/virtual_service/virtual_service.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/slb_topology/virtual_service/virtual_service.html	(working copy)
@@ -1,122 +1,92 @@
-<div class="col-md-12">
-    <div class="widget">
-        <div class="alert alert-info" role="alert" ng-if="serviceMngtVirtualService.app == 'AMP'">
-            {{'SLB topology display depends on APV version. For APV 10.3 version, the required version is 10.3.0.48 and later. For APV 10.3.1 version, the required version is 10.3.1.2 and later. For APV 8.6.1 version, the required version is 8.6.1.146 and later. Therefore, if you want to browse the related functions of the topology, please update the corresponding APV version.' | T}}
-        </div>
-        <div class="alert alert-info" role="alert" ng-if="serviceMngtVirtualService.app == 'IMC'">
-            {{'SLB topology display depends on NSAE/NETOPTI version. For NSAE 10.3 version, the required version is 10.3.0.14 and later. For NSAE 10.3.1 version, the required version is 10.3.1.2 and later. For NSAE 8.6.1 version, the required version is 8.6.1.50 and later. For NETOPTI 2.6.1 version, the required version is 2.6.1.29 and later. For NETOPTI 3.3 version, the required version is 3.3.0.3 and later. Therefore, if you want to browse the related functions of the topology, please update the corresponding NSAE/NETOPTI version.' | T}}
-        </div>
-        <div class="widget-header">
-            <span>{{'SLB Topology' | T}}</span>
-        </div>
-        <div class="table-toolbar">
-            <div class="btn-group">
-                <button class="btn-link" title="{{ 'Refresh' | T }}" ng-click="serviceMngtVirtualService.refresh()"><i
-                    class="fa fa-refresh an-tab-icon"></i></button>
+<div class="row">
+    <div class="col-md-12">
+        <div class="widget">
+            <div class="alert alert-info" role="alert" ng-if="serviceMngtVirtualService.app == 'AMP'">{{'SLB topology display depends on APV version. For APV 10.3 version, the required version is 10.3.0.48 and later. For APV 10.3.1 version, the required version is 10.3.1.2 and later. For APV 8.6.1 version, the required version is 8.6.1.146 and later. Therefore, if you want to browse the related functions of the topology, please update the corresponding APV version.'|T}}</div>
+            <div class="alert alert-info" role="alert" ng-if="serviceMngtVirtualService.app == 'IMC'">{{'SLB topology display depends on NSAE/NETOPTI version. For NSAE 10.3 version, the required version is 10.3.0.14 and later. For NSAE 10.3.1 version, the required version is 10.3.1.2 and later. For NSAE 8.6.1 version, the required version is 8.6.1.50 and later. For NETOPTI 2.6.1 version, the required version is 2.6.1.29 and later. For NETOPTI 3.3 version, the required version is 3.3.0.3 and later. Therefore, if you want to browse the related functions of the topology, please update the corresponding NSAE/NETOPTI version.'|T}}</div>
+            <div class="widget-header">
+                <span>{{'SLB Topology' | T}}</span>
             </div>
+            <div class="table-toolbar">
+                <div class="btn-group">
+                    <button class="btn-link" title="{{ 'Refresh' | T }}" ng-click="serviceMngtVirtualService.refresh()"><i class="fa fa-refresh"></i></button>
+                </div>
+            </div>
+            <div class="table-wrapper">
+                <table st-set-filter="customFilter" st-table="displayedCollection" st-safe-src="serviceMngtVirtualService.serviceList" class="table table-hover table-striped">
+                    <thead>
+                        <tr>
+                            <th class="v-num">No.</th>
+                            <th class="v-name">{{ 'Service Name' | T }}</th>
+                            <th class="v-type">{{ 'Type' | T }}</th>
+                            <th class="v-device">{{ 'Device Name' | T }}</th>
+                            <th class="v-device">{{ 'Device Group' | T }}</th>
+                            <th class="v-ip">{{ 'IP Address' | T }}</th>
+                            <th class="v-policy col-md-2"> {{'Policy' | T}}</th>
+                            <th class="v-group col-md-2"> {{'Group' | T}}</th>
+                            <th class="v-rs col-md-2"> {{'Real Service' | T}}</th>
+                        </tr>
+                        <tr>
+                            <th></th>
+                            <th>
+                                <input st-search="name" placeholder="{{'Search by Service Name'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th></th>
+                            <th ng-if="serviceMngtVirtualService.get_loading()">
+                                <st-select-multiple collection="serviceMngtVirtualService.serviceList" predicate="device_name"></st-select-multiple>
+                            </th>
+                            <th ng-if="serviceMngtVirtualService.get_loading()">
+                                <st-select-multiple collection="serviceMngtVirtualService.serviceList" predicate="device_group"></st-select-multiple>
+                            </th>
+                            <th>
+                                <input st-search="ip" placeholder="{{'Search by IP Address'|T}}" class="input-sm form-control" type="text" />
+                            </th>
+                            <th></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr ng-repeat="(num, item) in displayedCollection">
+                            <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                            <td ui-sref="index.slb_topology.slb.detail({name:item.name, device: item.device_name})" style="cursor: pointer;"><a title="{{ item.name }}">{{ item.name | E}}</a></td>
+                            <td>{{ item.type }}</td>
+                            <td style="cursor: pointer;" ui-sref="index.device.detail({name:item.device.name})" ng-click="serviceMngtVirtualService.setDetail(item.device)"> <a class="name">{{ item.device.name }}</a></td>
+                            <td>{{ item.device.device_group }}</td>
+                            <td>{{ item.ip }}</td>
+                            <td ng-if="item.policy_num < 2">
+                                <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ item.policy.name }}">{{ item.policy.name }}</span>
+                            </td>
+                            <td ng-if="item.policy_num < 2">
+                                <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ item.policy.group }}">{{ item.policy.group }}</span>
+                            </td>
+                            <td ng-if="item.policy_num < 2">
+                                <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ item.policy.rs }}">{{ item.policy.rs }}</span>
+                            </td>
+                            <td colspan="3" ng-if="item.policy_num > 1">
+                                <table class="table table-striped">
+                                    <tr ng-repeat="(idx, policy) in item.policy" ng-class="[{'active': num%2 == 0}, {'table-empty':num%2 == 1}]">
+                                        <td class="col-md-4">
+                                            <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ policy.name }}">{{ policy.name }}</span>
+                                        </td>
+                                        <td class="col-md-4">
+                                            <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ policy.group }}">{{ policy.group }}</span>
+                                        </td>
+                                        <td class="col-md-4">
+                                            <span class="basic" style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;' title="{{ policy.rs }}">{{ policy.rs }}</span>
+                                        </td>
+                                    </tr>
+                                </table>
+                            </td>
+                        </tr>
+                        <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!serviceMngtVirtualService.get_loading()"><img src="app/images/loading.gif"></div>
+                    </tbody>
+                    <tfoot>
+                    <tr>
+                        <td colspan="7" class="text-center">
+                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10" st-page-change="onPageChange(newPage)"st-template="app/modules/common/templates/page.html"></div>
+                        </td>
+                    </tr>
+                    </tfoot>
+                </table>
+            </div>
         </div>
-        <div class="table-wrapper">
-            <table st-set-filter="customFilter" st-table="displayedCollection"
-                   st-safe-src="serviceMngtVirtualService.serviceList" class="table table-hover table-striped">
-                <thead>
-                <tr>
-                    <th class="v-num">No.</th>
-                    <th class="v-name">{{ 'Service Name' | T }}</th>
-                    <th class="v-type">{{ 'Type' | T }}</th>
-                    <th class="v-device">{{ 'Device Name' | T }}</th>
-                    <th class="v-device">{{ 'Device Group' | T }}</th>
-                    <th class="v-ip">{{ 'IP Address' | T }}</th>
-                    <th class="v-policy col-md-2"> {{'Policy' | T}}</th>
-                    <th class="v-group col-md-2"> {{'Group' | T}}</th>
-                    <th class="v-rs col-md-2"> {{'Real Service' | T}}</th>
-                </tr>
-                <tr>
-                    <th></th>
-                    <th>
-                        <input st-search="name" placeholder="{{'Search by Service Name'|T}}"
-                               class="input-sm form-control" type="text"/>
-                    </th>
-                    <th></th>
-                    <th ng-if="serviceMngtVirtualService.get_loading()">
-                        <st-select-multiple collection="serviceMngtVirtualService.serviceList"
-                                            predicate="device_name"></st-select-multiple>
-                    </th>
-                    <th ng-if="serviceMngtVirtualService.get_loading()">
-                        <st-select-multiple collection="serviceMngtVirtualService.serviceList"
-                                            predicate="device_group"></st-select-multiple>
-                    </th>
-                    <th>
-                        <input st-search="ip" placeholder="{{'Search by IP Address'|T}}" class="input-sm form-control"
-                               type="text"/>
-                    </th>
-                    <th></th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr ng-repeat="(num, item) in displayedCollection">
-                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                    <td ui-sref="index.slb_topology.slb.detail({name:item.name, device: item.device_name})"
-                        style="cursor: pointer;"><a title="{{ item.name }}">{{ item.name | E}}</a></td>
-                    <td>{{ item.type }}</td>
-                    <td style="cursor: pointer;" ui-sref="index.device.detail({name:item.device.name})"
-                        ng-click="serviceMngtVirtualService.setDetail(item.device)"><a class="name">{{ item.device.name
-                        }}</a></td>
-                    <td>{{ item.device.device_group }}</td>
-                    <td>{{ item.ip }}</td>
-                    <td ng-if="item.policy_num < 2">
-                        <span class="basic"
-                              style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                              title="{{ item.policy.name }}">{{ item.policy.name }}</span>
-                    </td>
-                    <td ng-if="item.policy_num < 2">
-                        <span class="basic"
-                              style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                              title="{{ item.policy.group }}">{{ item.policy.group }}</span>
-                    </td>
-                    <td ng-if="item.policy_num < 2">
-                        <span class="basic"
-                              style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                              title="{{ item.policy.rs }}">{{ item.policy.rs }}</span>
-                    </td>
-                    <td colspan="3" ng-if="item.policy_num > 1">
-                        <table class="table table-striped">
-                            <tr ng-repeat="(idx, policy) in item.policy"
-                                ng-class="[{'active': num%2 == 0}, {'table-empty':num%2 == 1}]">
-                                <td class="col-md-4">
-                                    <span class="basic"
-                                          style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                                          title="{{ policy.name }}">{{ policy.name }}</span>
-                                </td>
-                                <td class="col-md-4">
-                                    <span class="basic"
-                                          style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                                          title="{{ policy.group }}">{{ policy.group }}</span>
-                                </td>
-                                <td class="col-md-4">
-                                    <span class="basic"
-                                          style='max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;vertical-align:middle;'
-                                          title="{{ policy.rs }}">{{ policy.rs }}</span>
-                                </td>
-                            </tr>
-                        </table>
-                    </td>
-                </tr>
-                <tr ng-if="displayedCollection.length === 0">
-                    <td colspan="9" class="text-center">No matching records found.</td>
-                </tr>
-                <div style="margin-bottom: 5px;margin-top:5px;text-align: center"
-                     ng-if="!serviceMngtVirtualService.get_loading()"><img src="app/images/loading.gif"></div>
-                </tbody>
-                <tfoot>
-                <tr>
-                    <td colspan="7" class="text-center">
-                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="10"
-                             st-page-change="onPageChange(newPage)"
-                             st-template="app/modules/common/templates/page.html"></div>
-                    </td>
-                </tr>
-                </tfoot>
-            </table>
-        </div>
     </div>
-</div>
+</div>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl.html	(working copy)
@@ -1,89 +1,66 @@
-<div class="row">
-    <div class="col-md-12">
-        <div class="widget">
-            <div class="widget-header">
-                <span class="tab-header-1">{{'SSL Certificates' | T}}</span>
-            </div>
-            <div class="table-toolbar">
-                <div class="btn-group">
-                    <button class="btn-link" title="{{ 'Refresh' | T }}" ng-click="sslMonitoring.refresh()"><i
-                        class="fa fa-refresh an-tab-icon"></i></button>
-                    <button class="btn-link" title="{{ 'Certificate Expire Check' | T }}"
-                            ng-click="sslMonitoring.check()">
-                        <i class="fa fa-repeat an-tab-icon"></i></button>
-                </div>
-            </div>
-            <div class="alert alert-info" role="alert" ng-if="sslMonitoring.app == 'AMP'">
-                {{'SSL certificate display depends on APV version. For APV 10.3 version, the required version is 10.3.0.2 and later. For APV 10.3.1 version, the required version is 10.3.1.2 and later. For APV 8.6.1 version, the required version is 8.6.1.89 and later. Therefore, if you want to use the related functions of the SSL certificate, please update the corresponding APV version.' | T}}
-            </div>
-            <div class="alert alert-info" role="alert" ng-if="sslMonitoring.app == 'IMC'">
-                {{'SSL certificate display depends on NSAE/NETOPTI version. For NSAE 10.3 version, the required version is 10.3.0.1 and later. For NSAE 10.3.1 version, the required version is 10.3.1.2 and later. For NSAE 8.6.1 version, the required version is 8.6.1.33 and later. For NETOPTI 2.6.1 version, the required version is 2.6.1.18 and later. For NETOPTI 3.3 version, the required version is 3.3.0.2 and later. Therefore, if you want to use the related functions of the SSL certificate, please update the corresponding NSAE/NETOPTI version.' | T}}
-            </div>
-            <div st-table="displayedCollection" st-safe-src="sslMonitoring.sslDataList">
-                <table class="table table-striped table-hover">
-                    <thead>
-                    <tr>
-                        <th class="d-num">No.</th>
-                        <th class="d-name" style="width: auto;">{{ 'Service Name' | T }}</th>
-                        <th class="d-device" style="width: auto;">{{ 'Device Name' | T }}</th>
-                        <th class="d-devicegroup" style="width: auto;">{{ 'Device Group' | T }}</th>
-                        <th class="d-type" style="width: auto;">{{ 'Service Type' | T }}</th>
-                        <th class="d-host" style="width: auto;">{{ 'SSL Host Name' | T }}</th>
-                        <th class="d-status" style="width: auto;">{{ 'SSL Host Status' | T }}</th>
-                        <th></th>
-                    </tr>
-                    <tr>
-                        <th></th>
-                        <th>
-                            <input st-search="name" placeholder="{{'Search by Name'|T}}" class="input-sm form-control">
-                        </th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                        <th></th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr ng-repeat="row in displayedCollection">
-                        <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
-                        <td>
-                            <a ng-if="row.host"
-                               ui-sref="index.ssl_monitoring.detail({device:row.device,name:row.name,host_name:row.host})"
-                               class="d-name">{{ row.name }}</a>
-                            <a ng-if="!row.host" ng-click="sslMonitoring.warn(row.name)" class="d-name">{{ row.name
-                                }}</a>
-                        </td>
-                        <td class="d-device">{{ row.device }}</td>
-                        <td class="d-devicegroup">{{ row.device_group }}</td>
-                        <td class="d-type">{{ row.type }}</td>
-                        <td class="d-host">{{ row.host }}</td>
-                        <td class="d-status">{{ row.status }}</td>
-                        <td>
-                            <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="sslMonitoring.edit(row)"><i
-                                class="array-edit an-row-icon"></i></a>
-                        </td>
-                    </tr>
-                    <tr ng-if="displayedCollection.length === 0">
-                        <td colspan="8" class="text-center">No matching records found.</td>
-                    </tr>
-                    <div style="margin-bottom: 5px;margin-top:5px;text-align: center"
-                         ng-if="!sslMonitoring.get_loading()">
-                        <img
-                            src="app/images/loading.gif"></div>
-                    </tbody>
-                    <tfoot>
-                    <tr>
-                        <td colspan="7" class="text-center">
-                            <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                                 st-page-change="onPageChange(newPage)"
-                                 st-template="app/modules/common/templates/page.html"></div>
-                        </td>
-                    </tr>
-                    </tfoot>
-                </table>
-            </div>
+<div class="widget">
+    <div class="alert alert-info" role="alert" ng-if="sslMonitoring.app == 'AMP'">{{'SSL certificate display depends on APV version. For APV 10.3 version, the required version is 10.3.0.2 and later. For APV 10.3.1 version, the required version is 10.3.1.2 and later. For APV 8.6.1 version, the required version is 8.6.1.89 and later. Therefore, if you want to use the related functions of the SSL certificate, please update the corresponding APV version.'|T}}</div>
+    <div class="alert alert-info" role="alert" ng-if="sslMonitoring.app == 'IMC'">{{'SSL certificate display depends on NSAE/NETOPTI version. For NSAE 10.3 version, the required version is 10.3.0.1 and later. For NSAE 10.3.1 version, the required version is 10.3.1.2 and later. For NSAE 8.6.1 version, the required version is 8.6.1.33 and later. For NETOPTI 2.6.1 version, the required version is 2.6.1.18 and later. For NETOPTI 3.3 version, the required version is 3.3.0.2 and later. Therefore, if you want to use the related functions of the SSL certificate, please update the corresponding NSAE/NETOPTI version.'|T}}</div>
+    <div class="widget-header">
+        <span>{{'SSL Certificate' | T}}</span>
+    </div>
+    <div class="table-toolbar">
+        <div class="btn-group">
+            <button class="btn-link" title="{{ 'Refresh' | T }}" ng-click="sslMonitoring.refresh()"><i class="fa fa-refresh"></i></button>
+            <button class="btn-link" title="{{ 'Certificate Expire Check' | T }}" ng-click="sslMonitoring.check()"><i class="fa fa-repeat"></i></button>
         </div>
     </div>
+    <div st-table="displayedCollection" st-safe-src="sslMonitoring.sslDataList">
+        <table class="table table-striped table-hover">
+            <thead>
+                <tr>
+                    <th class="d-num">No.</th>
+                    <th class="d-name" style="width: auto;">{{ 'Service Name' | T }}</th>
+                    <th class="d-device" style="width: auto;">{{ 'Device Name' | T }}</th>
+                    <th class="d-devicegroup" style="width: auto;">{{ 'Device Group' | T }}</th>
+                    <th class="d-type" style="width: auto;">{{ 'Service Type' | T }}</th>
+                    <th class="d-host" style="width: auto;">{{ 'SSL Host Name' | T }}</th>
+                    <th class="d-status" style="width: auto;">{{ 'SSL Host Status' | T }}</th>
+                    <th></th>
+                </tr>
+                <tr>
+                    <th></th>
+                    <th>
+                        <input st-search="name" placeholder="{{'Search by Name'|T}}" class="input-sm form-control">
+                    </th>
+                    <th></th>
+                    <th></th>
+                    <th></th>
+                    <th></th>
+                    <th></th>
+                    <th></th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr ng-repeat="row in displayedCollection">
+                    <td class="d-num">{{ ((currentPageIndex - 1) * pageSize) + $index + 1 }}</td>
+                    <td>
+                        <a ng-if="row.host" ui-sref="index.ssl_monitoring.detail({device:row.device,name:row.name,host_name:row.host})" class="d-name">{{ row.name }}</a>
+                        <a ng-if="!row.host" ng-click="sslMonitoring.warn(row.name)" class="d-name">{{ row.name }}</a>
+                    </td>
+                    <td class="d-device">{{ row.device }}</td>
+                    <td class="d-devicegroup">{{ row.device_group }}</td>
+                    <td class="d-type">{{ row.type }}</td>
+                    <td class="d-host">{{ row.host }}</td>
+                    <td class="d-status">{{ row.status }}</td>
+                    <td>
+                        <a class="icon-box" title="{{ 'Edit' | T }}" ng-click="sslMonitoring.edit(row)"><i class="array-edit"></i></a>
+                    </td>
+                </tr>
+                <div style="margin-bottom: 5px;margin-top:5px;text-align: center" ng-if="!sslMonitoring.get_loading()"><img src="app/images/loading.gif"></div>
+            </tbody>
+            <tfoot>
+                <tr>
+                    <td colspan="7" class="text-center">
+                        <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5" st-page-change="onPageChange(newPage)" st-template="app/modules/common/templates/page.html"></div>
+                    </td>
+                </tr>
+            </tfoot>
+        </table>
+    </div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl_edit.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl_edit.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/ssl_monitoring/ssl_edit.html	(working copy)
@@ -1,8 +1,7 @@
 <div>
     <div class="modal-header">
-        <button type="button" class="close" ng-click="edit.modalClose()" aria-label="Close"><span aria-hidden="true">&times;</span>
-        </button>
-        <h6 class="modal-title">{{ 'Edit SSL Service' | T}}</h6>
+        <button type="button" class="close" ng-click="edit.modalClose()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title">{{ 'Edit SSL Service' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal">
\ No newline at end of file
@@ -36,7 +35,7 @@
             <div class="form-group" ng-if="!edit.host && edit.new_host=='--Add New--'">
                 <label for="name" class="col-md-3 control-label"><sup>*</sup>{{ 'New SSL Host' | T }}</label>
                 <div class="col-md-8">
-                    <input type="text" class="form-control" ng-model="edit.new_host_name">
+                    <input type="text" class="form-control" ng-model="edit.new_host_name" >
                 </div>
             </div>
             <div class="form-group" ng-if="edit.host">
\ No newline at end of file
@@ -67,4 +66,4 @@
     .modal-dialog {
         width: 800px;
     }
-</style>
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/log-location.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/log-location.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/log-location.html	(working copy)
@@ -1,55 +1,57 @@
 <div class="row">
     <div class="col-md-12">
         <div class="col-md-8">
-            <div class="widget">
-                <div class="widget-header">
-                    <span class="tab-header-1">{{ 'Log Location Configuration' | T }}</span>
-                </div>
-                <br>
-                <div class="alert alert-info" role="alert"
-                     ng-if="!storageLogLocation.secondaryDisk.isDiskAvailable">
-                    In addition, AMP supports secondary storage for long-term log retention by mounting an external
-                    secondary storage device on the AMP. On successful mounting, users can avail this option by
-                    selecting 'Secondary' in the 'Choose Storage for Logs' menu below.
-                </div>
-                <div class="alert alert-info" role="alert" ng-if="storageLogLocation.secondaryDisk.isDiskAvailable">
-                    Users can enable the 'Secondary Storage' by selecting 'Secondary' option in the 'Choose Storage
-                    for Logs' menu below.
-                </div>
-                <div>
-                    <form class="form-horizontal" name="storageListForm" unsaved-warning-form>
-                        <div class="form-group">
-                            <label class="control-label col-md-3">{{ 'Choose Storage for Logs' | T }}</label>
-                            <div class="col-md-4">
-                                <select name="role" class="form-control"
-                                        ng-model="storageLogLocation.secondaryDisk.logLocation">
-                                    <option ng-repeat="row in storageLogLocation.diskList" value="{{row.value}}">
-                                        {{row.name | T}}
-                                    </option>
-                                </select>
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'Log Location Configuration' | T }}</span>
+                    </div>
+                    <br>
+                    <div class="alert alert-info" role="alert"
+                         ng-if="!storageLogLocation.secondaryDisk.isDiskAvailable">
+                        In addition, AMP supports secondary storage for long-term log retention by mounting an external
+                        secondary storage device on the AMP. On successful mounting, users can avail this option by
+                        selecting 'Secondary' in the 'Choose Storage for Logs' menu below.
+                    </div>
+                    <div class="alert alert-info" role="alert" ng-if="storageLogLocation.secondaryDisk.isDiskAvailable">
+                        Users can enable the 'Secondary Storage' by selecting 'Secondary' option in the 'Choose Storage
+                        for Logs' menu below.
+                    </div>
+                    <div>
+                        <form class="form-horizontal" name="storageListForm" unsaved-warning-form>
+                            <div class="form-group">
+                                <label class="control-label col-md-3">{{ 'Choose Storage for Logs' | T }}</label>
+                                <div class="col-md-4">
+                                    <select name="role" class="form-control"
+                                            ng-model="storageLogLocation.secondaryDisk.logLocation">
+                                        <option ng-repeat="row in storageLogLocation.diskList" value="{{row.value}}">
+                                            {{row.name|T}}
+                                        </option>
+                                    </select>
+                                </div>
                             </div>
-                        </div>
-                        <br>
-                        <div class="form-group">
-                            <div class="col-md-offset-3 col-md-6">
-                                <button ng-show="storageListForm.$dirty" class="btn btn-primary"
-                                        ng-click="storageLogLocation.changeLogLocation()">{{ 'Save Changes' | T}}
-                                </button>
-                                <button ng-show="storageListForm.$dirty" type="reset"
-                                        class="btn btn-default btn-cancel"
-                                        ng-click="storageListForm.$dirty=false;storageLogLocation.cancel()">
-                                    {{'Cancel' | T}}
-                                </button>
+                            <br>
+                            <div class="form-group">
+                                <div class="col-md-offset-3 col-md-6">
+                                    <button ng-show="storageListForm.$dirty" class="btn btn-primary"
+                                            ng-click="storageLogLocation.changeLogLocation()">{{ 'Save Changes' | T}}
+                                    </button>
+                                    <button ng-show="storageListForm.$dirty" type="reset"
+                                            class="btn btn-default btn-cancel"
+                                            ng-click="storageListForm.$dirty=false;storageLogLocation.cancel()">
+                                        {{'Cancel'|T}}
+                                    </button>
+                                </div>
                             </div>
-                        </div>
-                    </form>
+                        </form>
+                    </div>
                 </div>
             </div>
         </div>
         <div class="col-md-4">
             <div class="widget">
                 <div class="widget-header">
-                    <span class="tab-header-1">{{ 'Storage Management' | T }}</span>
+                    <span>{{ 'Storage Management' | T }}</span>
                 </div>
                 <div class="table-responsive table-content">
                     <table class="table table-striped table-hover">
@@ -92,54 +94,56 @@
             </div>
         </div>
     </div>
-</div>
-<div class="row">
     <div class="col-md-12">
         <div class="col-md-12">
-            <div class="widget">
-                <div class="widget-header">
-                    <span class="tab-header-1">{{ 'Archived Logs' | T }}</span>
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'Archived Logs' | T }}</span>
+                    </div>
                 </div>
             </div>
-            <div class="widget">
-                <div class="table-toolbar">
-                    <button class="btn-link" title="{{ 'Create Archive' | T }}"
-                            ng-click="storageLogLocation.createLogArchive()"><i
-                        class="fa fa-2x fa-plus-circle"></i></button>
+            <div class="row">
+                <div class="widget">
+                    <div class="table-toolbar">
+                        <button class="btn-link" title="{{ 'Create Archive' | T }}"
+                                ng-click="storageLogLocation.createLogArchive()"><i
+                            class="fa fa-2x fa-plus-circle"></i></button>
+                    </div>
+                    <div class="table-wrapper">
+                        <table st-table="displayedCollection" st-safe-src="storageLogLocation.logArchives"
+                               class="table table-hover table-striped">
+                            <thead>
+                            <tr>
+                                <th class="d-num">No.</th>
+                                <th class="d-name">{{ 'File Name' | T }}</th>
+                                <th class="d-action">{{ 'Action' | T }}</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr ng-repeat="archiveItem in displayedCollection">
+                                <td class="d-num">{{ $index + 1 }}</td>
+                                <td>{{ archiveItem }}</td>
+                                <td>
+                                    <a class="icon-box" title="{{ 'Unarchive' | T }}"
+                                       ng-click="storageLogLocation.performLogUnarchive(archiveItem)"><i
+                                        class="glyphicon glyphicon-upload"></i></a>
+                                </td>
+                            </tr>
+                            </tbody>
+                            <tfoot>
+                            <tr>
+                                <td colspan="3" class="text-center">
+                                    <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
+                                         st-page-change="onPageChange(newPage)"></div>
+                                </td>
+                            </tr>
+                            </tfoot>
+                        </table>
+                    </div>
+                    <p class="align-center" ng-if="storageLogLocation.logArchives.length == 0">No matching records
+                        found.</p><br>
                 </div>
-                <div class="table-wrapper">
-                    <table st-table="displayedCollection" st-safe-src="storageLogLocation.logArchives"
-                           class="table table-hover table-striped">
-                        <thead>
-                        <tr>
-                            <th class="d-num">No.</th>
-                            <th class="d-name">{{ 'File Name' | T }}</th>
-                            <th class="d-action">{{ 'Action' | T }}</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr ng-repeat="archiveItem in displayedCollection">
-                            <td class="d-num">{{ $index + 1 }}</td>
-                            <td>{{ archiveItem }}</td>
-                            <td>
-                                <a class="icon-box" title="{{ 'Unarchive' | T }}"
-                                   ng-click="storageLogLocation.performLogUnarchive(archiveItem)"><i
-                                    class="glyphicon glyphicon-upload"></i></a>
-                            </td>
-                        </tr>
-                        </tbody>
-                        <tfoot>
-                        <tr>
-                            <td colspan="3" class="text-center">
-                                <div st-pagination="" st-items-by-page="pageSize" st-displayed-pages="5"
-                                     st-page-change="onPageChange(newPage)"></div>
-                            </td>
-                        </tr>
-                        </tfoot>
-                    </table>
-                </div>
-                <p class="align-center" ng-if="storageLogLocation.logArchives.length == 0">No matching records
-                    found.</p><br>
             </div>
         </div>
     </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/create-archive.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/create-archive.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/create-archive.html	(working copy)
@@ -3,7 +3,7 @@
         <button type="button" class="close" ng-click="createArchive.close()" aria-label="Close"><span
             aria-hidden="true">&times;</span>
         </button>
-        <h6 class="modal-title">{{ 'Create Archive' | T}}</h6>
+        <h4 class="modal-title">{{ 'Create Archive' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/unarchive.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/unarchive.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/log-location/modal/unarchive.html	(working copy)
@@ -3,7 +3,7 @@
         <button type="button" class="close" ng-click="unarchive.close()" aria-label="Close"><span
             aria-hidden="true">&times;</span>
         </button>
-        <h6 class="modal-title">{{ 'UnArchive' | T}}</h6>
+        <h4 class="modal-title">{{ 'UnArchive' | T}}</h4>
     </div>
     <div class="modal-body">
         <form class="form-horizontal" name="add">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/primary/primary-storage.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/primary/primary-storage.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/storage/primary/primary-storage.html	(working copy)
@@ -1,143 +1,125 @@
 <div class="row">
     <div class="col-md-12">
         <div class="col-md-8">
-            <div class="widget">
-                <div class="widget-header">
-                    <span class="tab-header-1">{{ 'Storage Clean' | T }}</span>
-                </div>
-                <div>
-                    <form class="form-horizontal" name="storageform" unsaved-warning-form>
-                        <div class="form-group">
-                            <label class="control-label col-md-3">{{ 'Scheduled cleaning' | T}}</label>
-                            <div class="col-md-6">
-                                <input bs-switch class="switch" ng-model="primaryStorage.scheduleDetail.schedule"
-                                       type="checkbox" switch-active="true" resettable>
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'Storage Clean' | T }}</span>
+                    </div>
+                    <div>
+                        <form class="form-horizontal" name="storageform" unsaved-warning-form>
+                            <div class="form-group">
+                                <label class="control-label col-md-3">{{ 'Scheduled cleaning' | T}}</label>
+                                <div class="col-md-6">
+                                    <input bs-switch class="switch" ng-model="primaryStorage.scheduleDetail.schedule" type="checkbox" switch-active="true" resettable>
+                                </div>
                             </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="control-label col-md-3">
-                                {{ 'Retention duration of Data' | T}}
-                                <i class="fa fa-info-circle" data-role="popover" data-popover-mode="hover"
-                                   data-popover-position="top"
-                                   data-popover-text="{{'Data exceeding the set period will be deleted' | T}}"
-                                   data-popover-background="bg-cyan" data-popover-color="fg-white"></i>
-                            </label>
-                            <div class="col-md-3" style="display: inline-flex;">
-                                <input type="number" oninput="if(value>999){value=999}else if(value<1){value=1}"
-                                       class="form-control" name="duration"
-                                       ng-model="primaryStorage.scheduleDetail.duration" resettable>
-                                <span style="font-size: 15px; padding: 10px 5px">{{ 'Day' | T}}</span>
+                            <div class="form-group">
+                                <label class="control-label col-md-3">
+                                    {{ 'Retention duration of Data' | T}}
+                                    <i class="fa fa-info-circle" data-role="popover" data-popover-mode="hover" data-popover-position="top" data-popover-text="{{'Data exceeding the set period will be deleted' | T}}" data-popover-background="bg-cyan" data-popover-color="fg-white"></i>
+                                </label>
+                                <div class="col-md-3" style="display: inline-flex;">
+                                    <input type="number" oninput="if(value>999){value=999}else if(value<1){value=1}" class="form-control" name="duration" ng-model="primaryStorage.scheduleDetail.duration" resettable>
+                                    <span style="font-size: 15px; padding: 10px 5px">{{ 'Day' | T}}</span>
+                                </div>
                             </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="control-label col-md-3">
-                                {{ 'Maximum disk usage' | T}}
-                                <i class="fa fa-info-circle" data-role="popover" data-popover-mode="hover"
-                                   data-popover-position="top"
-                                   data-popover-text="{{'Historical data is deleted when the disk limit is exceeded' | T}}"
-                                   data-popover-background="bg-cyan" data-popover-color="fg-white"></i>
-                            </label>
-                            <div class="col-md-3" style="display: inline-flex;">
-                                <input type="number" oninput="if(value>90){value=90}else if(value<50){value=50}"
-                                       class="form-control" name="percent"
-                                       ng-model="primaryStorage.scheduleDetail.percent" resettable>
-                                <span style="font-size: 15px; padding: 10px 5px">{{ '%' }}</span>
+                            <div class="form-group">
+                                <label class="control-label col-md-3">
+                                    {{ 'Maximum disk usage' | T}}
+                                    <i class="fa fa-info-circle" data-role="popover" data-popover-mode="hover" data-popover-position="top" data-popover-text="{{'Historical data is deleted when the disk limit is exceeded' | T}}" data-popover-background="bg-cyan" data-popover-color="fg-white"></i>
+                                </label>
+                                <div class="col-md-3" style="display: inline-flex;">
+                                    <input type="number" oninput="if(value>90){value=90}else if(value<50){value=50}" class="form-control" name="percent" ng-model="primaryStorage.scheduleDetail.percent" resettable>
+                                    <span style="font-size: 15px; padding: 10px 5px">{{ '%' }}</span>
+                                </div>
                             </div>
-                        </div>
-                        <div class="form-group">
-                            <div class="col-md-offset-3 col-md-6">
-                                <button ng-show="storageform.$dirty" class="btn btn-primary"
-                                        ng-click="primaryStorage.applyCrontab()">{{ 'Save Changes' | T}}
-                                </button>
-                                <button ng-show="storageform.$dirty" type="reset" class="btn btn-default btn-cancel"
-                                        ng-click="storageform.$dirty=false;primaryStorage.cancel()">{{'Cancel' | T}}
-                                </button>
-                                <button class="btn btn-success" ng-click="primaryStorage.cleanup()">
-                                    {{ 'Clean up immediately' | T}}
-                                </button>
+                            <div class="form-group">
+                                <div class="col-md-offset-3 col-md-6">
+                                    <button ng-show="storageform.$dirty" class="btn btn-primary" ng-click="primaryStorage.applyCrontab()">{{ 'Save Changes' | T}}</button>
+                                    <button ng-show="storageform.$dirty" type="reset" class="btn btn-default btn-cancel" ng-click="storageform.$dirty=false;primaryStorage.cancel()">{{'Cancel'|T}}</button>
+                                    <button class="btn btn-success" ng-click="primaryStorage.cleanup()">{{ 'Clean up immediately' | T}}</button>
+                                </div>
                             </div>
-                        </div>
-                    </form>
+                        </form>
+                    </div>
                 </div>
             </div>
-            <div class="widget">
-                <div class="widget-header">
-                    <span class="tab-header-1">{{ 'Storage Management' | T }}</span>
-                </div>
-                <div class="table-responsive" ng-if="!primaryStorage.detailPage">
-                    <table class="table table-striped table-hover">
-                        <thead>
-                        <tr>
-                            <th class="name">{{'Module' | T}}</th>
-                            <th>{{'Disk Usage' | T}}</th>
-                            <th>{{'Disk Size' | T}}</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr ng-repeat="item in primaryStorage.moduleList"
-                            ng-mouseenter="primaryStorage.enter(item)">
-                            <td style="cursor: pointer;" ng-click="primaryStorage.detail(item)">
-                                <a>{{ item.name | T}}</a></td>
-                            <td>
-                                <div class="col-pb" ng-if="item.sizeStr">
-                                    <div class="progress" title="{{item.usage}}%">
-                                        <div class="progress-bar progress-bar-info" role="progressbar"
-                                             ng-style="primaryStorage.getPercent(item.usage)" aria-valuenow="60"
-                                             aria-valuemin="0" aria-valuemax="100">
+            <div class="row">
+                <div class="widget">
+                    <div class="widget-header">
+                        <span>{{ 'Storage Management' | T }}</span>
+                    </div>
+                    <div class="table-responsive" ng-if="!primaryStorage.detailPage">
+                        <table class="table table-striped table-hover">
+                            <thead>
+                            <tr>
+                                <th class="name">{{'Module' | T}}</th>
+                                <th>{{'Disk Usage' | T}}</th>
+                                <th>{{'Disk Size' | T}}</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr ng-repeat="item in primaryStorage.moduleList" ng-mouseenter="primaryStorage.enter(item)">
+                                <td style="cursor: pointer;" ng-click="primaryStorage.detail(item)"><a>{{ item.name | T}}</a></td>
+                                <td>
+                                    <div class="col-pb" ng-if="item.sizeStr">
+                                        <div class="progress" title="{{item.usage}}%">
+                                            <div class="progress-bar progress-bar-info" role="progressbar" ng-style="primaryStorage.getPercent(item.usage)" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
+                                            </div>
                                         </div>
                                     </div>
+                                    <div class="col-pb" ng-if="!item.sizeStr">
+                                        <i class="fa fa-spinner fa-spin" style="color:#e4701d;"></i>
+                                    </div>
+                                </td>
+                                <td>
+                                    <span>{{item.sizeStr}}</span>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="table-responsive" ng-if="primaryStorage.detailPage">
+                        <div class="table-toolbar">
+                            <div class="">
+                                <div class="btn-group">
+                                    <button title="{{'Back'|T}}" class="btn btn-link hive_enable_active" ng-click="primaryStorage.detailPage = false">
+                                        <i class="fa fa-arrow-left"></i>
+                                    </button>
                                 </div>
-                                <div class="col-pb" ng-if="!item.sizeStr">
-                                    <i class="fa fa-spinner fa-spin" style="color:#e4701d;"></i>
-                                </div>
-                            </td>
-                            <td>
-                                <span>{{item.sizeStr}}</span>
-                            </td>
-                        </tr>
-                        </tbody>
-                    </table>
-                </div>
-                <div class="table-responsive" ng-if="primaryStorage.detailPage">
-                    <div class="table-toolbar">
-                        <div class="">
-                            <div class="btn-group">
-                                <button title="{{'Back'|T}}" class="btn btn-link hive_enable_active"
-                                        ng-click="primaryStorage.detailPage = false">
-                                    <i class="fa fa-arrow-left"></i>
-                                </button>
                             </div>
                         </div>
+                        <table class="table table-striped table-hover" ng-if="!primaryStorage.detailloading">
+                            <thead>
+                            <tr>
+                                <th class="name">{{'Name' | T}}</th>
+                                <th>{{'Description' | T}}</th>
+                                <th>{{'Disk Size' | T}}</th>
+                                <th>{{'Action' | T}}</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr ng-repeat="item in primaryStorage.detailPaths">
+                                <td>{{ item.name | T}}</td>
+                                <td>{{ item.description | T}}</td>
+                                <td>{{ item.sizeStr }}</td>
+                                <td ng-if="item.ui_url">
+                                    <a ui-sref="index.{{ item.ui_url }}">{{'View' | T}}</a>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                        <div style="text-align: center" ng-if="primaryStorage.detailloading">
+                            <img src="app/images/loading.gif">
+                        </div>
                     </div>
-                    <table class="table table-striped table-hover" ng-if="!primaryStorage.detailloading">
-                        <thead>
-                        <tr>
-                            <th class="name">{{'Name' | T}}</th>
-                            <th>{{'Description' | T}}</th>
-                            <th>{{'Disk Size' | T}}</th>
-                            <th>{{'Action' | T}}</th>
-                        </tr>
-                        </thead>
-                        <tbody>
-                        <tr ng-repeat="item in primaryStorage.detailPaths">
-                            <td>{{ item.name | T}}</td>
-                            <td>{{ item.description | T}}</td>
-                            <td>{{ item.sizeStr }}</td>
-                            <td ng-if="item.ui_url">
-                                <a ui-sref="index.{{ item.ui_url }}">{{'View' | T}}</a>
-                            </td>
-                        </tr>
-                        </tbody>
-                    </table>
-                    <div style="text-align: center" ng-if="primaryStorage.detailloading">
-                        <img src="app/images/loading.gif">
-                    </div>
                 </div>
             </div>
         </div>
         <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 graph ng-scope">
             <div class="graph-title">
-                <span class="tab-header-1">{{primaryStorage.diskStatusWidget.title}}</span>
+                <span>{{primaryStorage.diskStatusWidget.title}}</span>
             </div>
             <div class="graph-container" disk-usage-pie="primaryStorage.diskStatusWidget" style="height: 360px"></div>
         </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/network/network-dns.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/network/network-dns.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/network/network-dns.html	(working copy)
@@ -18,7 +18,7 @@
                     <tr>
                         <th></th>
                         <th>
-                            <input st-search="server_ip" placeholder="{{'Search by IP Address'|T}}"class="input-sm form-control" type="search"/>
+                            <input st-search="server_ip" placeholder="{{'Search by Name'|T}}"class="input-sm form-control" type="search"/>
                         </th>
                         <th></th>
                     </tr>
@@ -39,4 +39,3 @@
         </div>
     </div>
 </div>
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.controller.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.controller.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.controller.js	(working copy)
@@ -10,7 +10,7 @@
         'currentSystemService',
         'FileUploader',
         'CMSettings',
-        function ($scope, $rootScope, $state, $uibModal, $filter, systemService, currentSystemService, FileUploader, CMSettings) {
+        function($scope, $rootScope, $state, $uibModal, $filter, systemService, currentSystemService, FileUploader, CMSettings) {
             $rootScope.title = "System Update";
             $rootScope.allow_config = true;
             var updateViewModel = this;
@@ -20,7 +20,7 @@
             updateViewModel.option = "immediate";
             updateViewModel.app = CMSettings.app;
 
-            updateViewModel.showProgressBar = function () {
+            updateViewModel.showProgressBar = function() {
                 var modalInstance = $uibModal.open({
                     templateUrl: 'app/modules/common/templates/progress.html',
                     controller: 'showProgressCtrl',
@@ -29,18 +29,18 @@
                 });
             };
 
-            var showProgressBar = function () {
+            var showProgressBar = function() {
                 var modalInstance = $uibModal.open({
                     templateUrl: 'app/modules/common/templates/progress_with_value.html',
                     controller: 'showProgressCtrlWithValue',
                     controllerAs: 'progress',
                     backdrop: false
                 });
-                modalInstance.result.then(function () {
+                modalInstance.result.then(function(){
                     fileUploader.cancelAll();
                     fileUploader.clearQueue();
-                    document.getElementById('textfield').value = "";
-                    document.getElementById('uploadfield').value = "";
+                    document.getElementById('textfield').value="";
+                    document.getElementById('uploadfield').value="";
                 });
             };
 
@@ -52,18 +52,18 @@
             });
 
 
-            fileUploader.onBeforeUploadItem = function (item) {
+            fileUploader.onBeforeUploadItem = function(item) {
                 showProgressBar();
             };
 
-            fileUploader.onSuccessItem = function (item, response, status, headers) {
+            fileUploader.onSuccessItem = function(item, response, status, headers) {
                 if (!response.error) {
                     updateViewModel.local = response.files[0].url;
                     $rootScope.$broadcast('endLoading', true);
                 }
             };
 
-            fileUploader.onProgressItem = function (item, progress) {
+            fileUploader.onProgressItem = function(item, progress) {
                 $rootScope.$broadcast('upLoading', progress);
             };
 
@@ -130,7 +130,7 @@
                 }
 
                 if (confirm(confirm_msg)) {
-                    var post_data = {"option": updateViewModel.option};
+                    var post_data={"option": updateViewModel.option};
                     if (updateViewModel.type == "url") {
                         post_data['using'] = {'url': updateViewModel.url};
                     } else {
@@ -160,13 +160,11 @@
 
             updateViewModel.refresh = function () {
                 updateViewModel.getCurrentVersion();
-                // updateViewModel.getUpdateVersion();
+                updateViewModel.getUpdateVersion();
             };
 
             updateViewModel.getCurrentVersion();
-            // ToDo: Disabling the feature to get the updated AMP version from the Repo as we have issues on Repo itself. Enable when the repository issues got fixed.
-            // updateViewModel.getUpdateVersion();
+            updateViewModel.getUpdateVersion();
 
         }
     ]);
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html	(working copy)
@@ -19,38 +19,38 @@
         </rd-widget>
     </div>
 </div>
-<!--<div class="row">-->
-<!--    <div class="col-md-12">-->
-<!--        <rd-widget>-->
-<!--            <rd-widget-header title="{{'Update From Repository'|T}}">-->
-<!--            </rd-widget-header>-->
-<!--            <rd-widget-body class="no-padding">-->
-<!--                <div>-->
-<!--                    <form class="form-horizontal">-->
-<!--                        <div class="form-group" ng-if="systemUpdate.updateVersion && !systemUpdate.loading">-->
-<!--                            <label class="col-md-3 control-label">{{'Update Version'|T}}</label>-->
-<!--                            <div class="col-md-5">-->
-<!--                                <input type="text" name="updateVersion" class="form-control" placeholder="" ng-model="systemUpdate.updateVersion" disabled>-->
-<!--                            </div>-->
-<!--                        </div>-->
-<!--                        <div class="form-group" ng-if="systemUpdate.updateVersion && !systemUpdate.loading">-->
-<!--                            <div class="col-md-offset-3 col-md-9">-->
-<!--                                <button type="submit" class="btn btn-primary" ng-click="systemUpdate.updateByRepo()">{{'Update'|T}}</button>-->
-<!--                            </div>-->
-<!--                        </div>-->
-<!--                        <div ng-if="!systemUpdate.updateVersion && !systemUpdate.loading">-->
-<!--                            {{ systemUpdate.message | T }}-->
-<!--                        </div>-->
-<!--                        <div ng-if="systemUpdate.loading" style="margin-bottom: 15px;text-align: center"><img src="app/images/loading.gif"></div>-->
-<!--                    </form>-->
-<!--                </div>-->
-<!--            </rd-widget-body>-->
-<!--        </rd-widget>-->
-<!--    </div>-->
-<!--</div>-->
 <div class="row">
     <div class="col-md-12">
         <rd-widget>
+            <rd-widget-header title="{{'Update From Repository'|T}}">
+            </rd-widget-header>
+            <rd-widget-body class="no-padding">
+                <div>
+                    <form class="form-horizontal">
+                        <div class="form-group" ng-if="systemUpdate.updateVersion && !systemUpdate.loading">
+                            <label class="col-md-3 control-label">{{'Update Version'|T}}</label>
+                            <div class="col-md-5">
+                                <input type="text" name="updateVersion" class="form-control" placeholder="" ng-model="systemUpdate.updateVersion" disabled>
+                            </div>
+                        </div>
+                        <div class="form-group" ng-if="systemUpdate.updateVersion && !systemUpdate.loading">
+                            <div class="col-md-offset-3 col-md-9">
+                                <button type="submit" class="btn btn-primary" ng-click="systemUpdate.updateByRepo()">{{'Update'|T}}</button>
+                            </div>
+                        </div>
+                        <div ng-if="!systemUpdate.updateVersion && !systemUpdate.loading">
+                            {{ systemUpdate.message | T }}
+                        </div>
+                        <div ng-if="systemUpdate.loading" style="margin-bottom: 15px;text-align: center"><img src="app/images/loading.gif"></div>
+                    </form>
+                </div>
+            </rd-widget-body>
+        </rd-widget>
+    </div>
+</div>
+<div class="row">
+    <div class="col-md-12">
+        <rd-widget>
             <rd-widget-header title="{{'Update From Others'|T}}">
             </rd-widget-header>
             <rd-widget-body class="no-padding">
\ No newline at end of file
@@ -77,7 +77,7 @@
                                 <div class="local">
                                     <input type="text" id="textfield" class="form-control">
                                     <button class="btn btn-primary" style="position: absolute; top: 0; right: 15px;">{{'Browse'|T}}</button>
-                                        <input type="file" id="uploadfield" class="file form-control" nv-file-select uploader="systemUpdate.file_uploader" onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
+                                    <input type="file" id="uploadfield" class="file form-control" nv-file-select uploader="systemUpdate.file_uploader" onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
                                 </div>
                             </div>
                         </div>
\ No newline at end of file
@@ -104,11 +104,11 @@
 </div>
 
 <style>
-    .file-box{
+    .file-box{ 
         position: relative;
-    }
-    .file{
-        position: absolute;
+    } 
+    .file{ 
+        position: absolute; 
         top: 0;
         opacity: 0;
     }
\ No newline at end of file
@@ -124,5 +124,4 @@
     .form-horizontal .file-box {
         width: 370px;
     }
-</style>
-
+</style>
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html	(working copy)
@@ -37,12 +37,6 @@
             <li role="presentation" ng-class="{ active: url_contain('/system/log') }">
                 <a ui-sref="index.system.log">{{ 'Log Setting' | T }}</a>
             </li>
-            <li role="presentation" ng-class="{ active: url_contain('/system/backup') }">
-                <a ui-sref="index.system.backup">{{ 'Backup' | T }}</a>
-            </li>
-            <li role="presentation" ng-class="{ active: url_contain('/system/restore') }">
-                <a ui-sref="index.system.restore">{{ 'Restore' | T }}</a>
-            </li>
         </ul>
     </div>
 </div>
@@ -59,6 +53,4 @@
     <div class="" ng-show="url_contain('/system/ssl_webui')" ui-view="ssl_webui"></div>
     <div class="" ng-show="url_contain('/system/auth_aaa')" ui-view="admin_aaa"></div>
     <div class="" ng-show="url_contain('/system/log')" ui-view="log"></div>
-    <div class="" ng-show="url_contain('/system/backup')" ui-view="backup"></div>
-    <div class="" ng-show="url_contain('/system/restore')" ui-view="restore"></div>
 </div>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js	(working copy)
@@ -1,170 +1,170 @@
 angular.module('cm.system', [
     'ui.router',
     'smart-table'
-])
+    ])
     .config(['$stateProvider', function ($stateProvider) {
         $stateProvider
             .state('index.system', {
-                url: '^/system',
-                views: {
-                    'main@index': {
-                        templateUrl: 'app/modules/system/system.html',
-                        controller: 'systemCtrl',
-                        controllerAs: 'system'
+                url :'^/system',
+                views:{
+                    'main@index' : {
+                        templateUrl:'app/modules/system/system.html',
+                        controller:'systemCtrl',
+                        controllerAs:'system'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.host', {
-                url: '^/system/host',
-                views: {
-                    'host@index.system': {
-                        templateUrl: 'app/modules/system/submenu/host/host.html',
-                        controller: 'hostSettingsCtrl',
-                        controllerAs: 'hostSettings'
+                url :'^/system/host',
+                views:{
+                    'host@index.system' : {
+                        templateUrl:'app/modules/system/submenu/host/host.html',
+                        controller:'hostSettingsCtrl',
+                        controllerAs:'hostSettings'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.time', {
-                url: '^/system/time',
-                views: {
-                    'time@index.system': {
-                        templateUrl: 'app/modules/system/submenu/time/time.html',
-                        controller: 'systemTimeCtrl',
-                        controllerAs: 'systemTime'
+                url :'^/system/time',
+                views:{
+                    'time@index.system' : {
+                        templateUrl:'app/modules/system/submenu/time/time.html',
+                        controller:'systemTimeCtrl',
+                        controllerAs:'systemTime'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.ntp', {
-                url: '^/system/ntp',
-                views: {
-                    'ntp@index.system': {
-                        templateUrl: 'app/modules/system/submenu/ntp/ntp.html',
-                        controller: 'systemNtpCtrl',
-                        controllerAs: 'systemNtp'
+                url :'^/system/ntp',
+                views:{
+                    'ntp@index.system' : {
+                        templateUrl:'app/modules/system/submenu/ntp/ntp.html',
+                        controller:'systemNtpCtrl',
+                        controllerAs:'systemNtp'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.update', {
-                url: '^/system/update',
-                views: {
-                    'update@index.system': {
-                        templateUrl: 'app/modules/system/submenu/update/update.html',
-                        controller: 'systemUpdateCtrl',
-                        controllerAs: 'systemUpdate'
+                url :'^/system/update',
+                views:{
+                    'update@index.system' : {
+                        templateUrl:'app/modules/system/submenu/update/update.html',
+                        controller:'systemUpdateCtrl',
+                        controllerAs:'systemUpdate'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.network', {
-                url: '^/system/network',
-                views: {
-                    'network@index.system': {
-                        templateUrl: 'app/modules/system/submenu/network/network.html',
-                        controller: 'systemNetworkCtrl',
-                        controllerAs: 'systemNetwork'
+                url :'^/system/network',
+                views:{
+                    'network@index.system' : {
+                        templateUrl:'app/modules/system/submenu/network/network.html',
+                        controller:'systemNetworkCtrl',
+                        controllerAs:'systemNetwork'
                     }
                 }
             })
             .state('index.system.network.interface', {
-                url: '^/system/network/interface',
-                views: {
-                    'net_interface@index.system.network': {
-                        templateUrl: 'app/modules/system/submenu/network/network-interface.html',
-                        controller: 'networkInterfaceCtrl',
-                        controllerAs: 'networkInterface'
+                url :'^/system/network/interface',
+                views:{
+                    'net_interface@index.system.network' : {
+                        templateUrl:'app/modules/system/submenu/network/network-interface.html',
+                        controller:'networkInterfaceCtrl',
+                        controllerAs:'networkInterface'
                     }
                 }
             })
             .state('index.system.network.dns', {
-                url: '^/system/network/dns',
-                views: {
-                    'net_dns@index.system.network': {
-                        templateUrl: 'app/modules/system/submenu/network/network-dns.html',
-                        controller: 'networkDnsCtrl',
-                        controllerAs: 'networkDns'
+                url :'^/system/network/dns',
+                views:{
+                    'net_dns@index.system.network' : {
+                        templateUrl:'app/modules/system/submenu/network/network-dns.html',
+                        controller:'networkDnsCtrl',
+                        controllerAs:'networkDns'
                     }
                 }
             })
             .state('index.system.network.route', {
-                url: '^/system/network/route',
-                views: {
-                    'net_route@index.system.network': {
-                        templateUrl: 'app/modules/system/submenu/network/network-route.html',
-                        controller: 'networkRouteCtrl',
-                        controllerAs: 'networkRoute'
+                url :'^/system/network/route',
+                views:{
+                    'net_route@index.system.network' : {
+                        templateUrl:'app/modules/system/submenu/network/network-route.html',
+                        controller:'networkRouteCtrl',
+                        controllerAs:'networkRoute'
                     }
                 }
             });
 
         $stateProvider
             .state('index.system.license', {
-                url: '^/system/license',
-                views: {
-                    'license@index.system': {
-                        templateUrl: 'app/modules/system/submenu/license/license.html',
-                        controller: 'sysLicenseCtrl',
-                        controllerAs: 'sysLicense'
+                url :'^/system/license',
+                views:{
+                    'license@index.system' : {
+                        templateUrl:'app/modules/system/submenu/license/license.html',
+                        controller:'sysLicenseCtrl',
+                        controllerAs:'sysLicense'
                     }
                 }
             });
         $stateProvider
             .state('index.system.setting', {
-                url: '^/system/setting',
-                views: {
-                    'setting@index.system': {
-                        templateUrl: 'app/modules/system/submenu/setting/setting.html',
-                        controller: 'sysSettingCtrl',
-                        controllerAs: 'sysSetting'
+                url :'^/system/setting',
+                views:{
+                    'setting@index.system' : {
+                        templateUrl:'app/modules/system/submenu/setting/setting.html',
+                        controller:'sysSettingCtrl',
+                        controllerAs:'sysSetting'
                     }
                 }
             });
         $stateProvider
             .state('index.system.system_ha', {
-                url: '^/system/system_ha',
-                views: {
-                    'system_ha@index.system': {
-                        templateUrl: 'app/modules/system/submenu/system_ha/system_ha.html',
-                        controller: 'systemHACtrl',
-                        controllerAs: 'systemHA'
+                url :'^/system/system_ha',
+                views:{
+                    'system_ha@index.system' : {
+                        templateUrl:'app/modules/system/submenu/system_ha/system_ha.html',
+                        controller:'systemHACtrl',
+                        controllerAs:'systemHA'
                     }
                 }
             })
             .state('index.system.system_ha.status', {
-                url: '^/system/system_ha/status',
-                views: {
-                    'status@index.system.system_ha': {
-                        templateUrl: 'app/modules/system/submenu/system_ha/status.html',
-                        controller: 'systemHAStatusCtrl',
-                        controllerAs: 'systemHAStatus'
+                url :'^/system/system_ha/status',
+                views:{
+                    'status@index.system.system_ha' : {
+                        templateUrl:'app/modules/system/submenu/system_ha/status.html',
+                        controller:'systemHAStatusCtrl',
+                        controllerAs:'systemHAStatus'
                     }
                 }
             })
             .state('index.system.system_ha.setting', {
-                url: '^/system/system_ha/setting',
-                views: {
-                    'setting@index.system.system_ha': {
-                        templateUrl: 'app/modules/system/submenu/system_ha/setting.html',
-                        controller: 'systemHASettingCtrl',
-                        controllerAs: 'systemHASetting'
+                url :'^/system/system_ha/setting',
+                views:{
+                    'setting@index.system.system_ha' : {
+                        templateUrl:'app/modules/system/submenu/system_ha/setting.html',
+                        controller:'systemHASettingCtrl',
+                        controllerAs:'systemHASetting'
                     }
                 }
             })
             .state('index.system.system_ha.log', {
-                url: '^/system/system_ha/log',
-                views: {
-                    'log@index.system.system_ha': {
-                        templateUrl: 'app/modules/system/submenu/system_ha/log.html',
-                        controller: 'systemHALogCtrl',
-                        controllerAs: 'systemHALog'
+                url :'^/system/system_ha/log',
+                views:{
+                    'log@index.system.system_ha' : {
+                        templateUrl:'app/modules/system/submenu/system_ha/log.html',
+                        controller:'systemHALogCtrl',
+                        controllerAs:'systemHALog'
                     }
                 }
             });
@@ -204,57 +204,35 @@
             });
         $stateProvider
             .state('index.system.log', {
-                url: '^/system/log',
-                views: {
-                    'log@index.system': {
-                        templateUrl: 'app/modules/system/submenu/log/log.html',
-                        controller: 'systemLogCtrl',
-                        controllerAs: 'systemLog'
+                url :'^/system/log',
+                views:{
+                    'log@index.system' : {
+                        templateUrl:'app/modules/system/submenu/log/log.html',
+                        controller:'systemLogCtrl',
+                        controllerAs:'systemLog'
                     }
                 }
             })
             .state('index.system.log.basic', {
-                url: '^/system/log/basic',
-                views: {
-                    'basic@index.system.log': {
-                        templateUrl: 'app/modules/system/submenu/log/basic.html',
-                        controller: 'systemLogBasicCtrl',
-                        controllerAs: 'systemLogBasic'
+                url :'^/system/log/basic',
+                views:{
+                    'basic@index.system.log' : {
+                        templateUrl:'app/modules/system/submenu/log/basic.html',
+                        controller:'systemLogBasicCtrl',
+                        controllerAs:'systemLogBasic'
                     }
                 }
             })
             .state('index.system.log.host', {
-                url: '^/system/log/host',
-                views: {
-                    'host@index.system.log': {
-                        templateUrl: 'app/modules/system/submenu/log/host.html',
-                        controller: 'systemLogHostCtrl',
-                        controllerAs: 'systemLogHost'
+                url :'^/system/log/host',
+                views:{
+                    'host@index.system.log' : {
+                        templateUrl:'app/modules/system/submenu/log/host.html',
+                        controller:'systemLogHostCtrl',
+                        controllerAs:'systemLogHost'
                     }
                 }
             });
-        $stateProvider
-            .state('index.system.backup', {
-                url: '^/system/backup',
-                views: {
-                    'backup@index.system': {
-                        templateUrl: 'app/modules/system/submenu/backup/backup.html',
-                        controller: 'backupCtrl',
-                        controllerAs: 'backup'
-                    }
-                }
-            });
-        $stateProvider
-            .state('index.system.restore', {
-                url: '^/system/restore',
-                views: {
-                    'restore@index.system': {
-                        templateUrl: 'app/modules/system/submenu/restore/restore.html',
-                        controller: 'restoreCtrl',
-                        controllerAs: 'restore'
-                    }
-                }
-            });
     }]);
 
 angular.module("cmApp").requires.push('cm.system');
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js	(working copy)
@@ -77,23 +77,6 @@
                 update_ha_setting: update_ha_setting,
                 delete_ha_setting: delete_ha_setting,
                 clear_ip_route: clear_ip_route,
-
-                //Backup
-                getBackupStatus: getBackupStatus,
-                startBackup: startBackup,
-                getBackupFiles: getBackupFiles,
-                getRemoteStorageConfig: getRemoteStorageConfig,
-                updateRemoteStorageConfig: updateRemoteStorageConfig,
-                deleteBackup: deleteBackup,
-
-                //Restore from Backup
-                getRestoreStatus: getRestoreStatus,
-                startRestore: startRestore,
-
-                // Schedule Backup
-                getBackupSchedule: getBackupSchedule,
-                updateBackupSchedule: updateBackupSchedule,
-                deleteBackupSchedule: deleteBackupSchedule,
             };
 
             function getUpdateVersion() {
@@ -376,39 +359,5 @@
                 var options = { "__pk_list": [] };
                 var post_data = { "action": "Clear", "options": JSON.stringify(options) };
                 return apiService.post(url, post_data);
-            }
-            function getBackupStatus() {
-                return apiService.get('/backup/status');
             }
-            function getBackupFiles() {
-                return apiService.get('/backup/files');
-            }
-            function startBackup(payload) {
-                return apiService.post2('/backup/start', JSON.stringify(payload));
-            }
-            function deleteBackup(filename) {
-                return apiService.delete('/backup/file?filename=' + filename);
-            }
-            function getRemoteStorageConfig() {
-                return apiService.get('/backup/remote_storage');
-            }
-            function updateRemoteStorageConfig(payload) {
-                return apiService.post2('/backup/remote_storage', JSON.stringify(payload));
-            }
-            function getRestoreStatus() {
-                return apiService.get('/restore/status');
-            }
-            function startRestore(payload) {
-                return apiService.post2('/restore/start', JSON.stringify(payload));
-            }
-            function getBackupSchedule() {
-                return apiService.get('/backup/schedule');
-            }
-            function updateBackupSchedule(payload) {
-                return apiService.post2('/backup/schedule', JSON.stringify(payload));
-            }
-            function deleteBackupSchedule() {
-                return apiService.delete('/backup/schedule');
-            }
         }]);
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/modal/task_detail_dialog.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/modal/task_detail_dialog.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/modal/task_detail_dialog.html	(working copy)
@@ -1,6 +1,6 @@
 <div class="modal-header">
     <button type="button" class="close" ng-click="taskDetail.modalClose()">&times;</button>
-    <h6 class="modal-title">{{'Description' | T}}»&nbsp;{{taskDetail.message.name}}</h6>
+    <h4 class="modal-title">{{'Description' | T}}»&nbsp;{{taskDetail.message.name}}</h4>
 </div>
 <div class="modal-body">
     <pre class="content" style="font-size: 14px;line-height: 20px;">{{taskDetail.message.content}}</pre>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/task.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/task.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/task/task.html	(working copy)
@@ -2,12 +2,12 @@
     <div class="col-md-12">
         <div class="widget">
             <div class="widget-header">
-                <span class="tab-header-1">{{ 'Managed Task' | T }}</span>
+                <span>{{ 'Managed Task' | T }}</span>
             </div>
             <div class="table-toolbar">
                 <div class="btn-group">
-                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="task.refresh()"><i class="fa fa-refresh an-tab-icon"></i></button>
-                    <button class="btn btn-link" title="{{ 'Clear' | T }}" ng-click="task.clear()"><i class="array-delete an-tab-icon"></i></button>
+                    <button class="btn btn-link" title="{{ 'Refresh' | T }}" ng-click="task.refresh()"><i class="fa fa-refresh"></i></button>
+                    <button class="btn btn-link" title="{{ 'Clear' | T }}" ng-click="task.clear()"><i class="array-delete"></i></button>
                 </div>
                 <div class="pull-right task-dropdown">
                     <div ng-dropdown-multiselect="" class="multiselect" checkboxes="true" translation-texts="multiSelectTransition"
@@ -87,7 +87,7 @@
                             <td>
                                 <!-- <a class="icon-box" title="{{ 'Modify Date' | T }}" ng-click="task.modifyTask(taskItem)" ng-class="{'icon-disabled': taskItem.state != 'waiting'}"><i class="array-edit"></i></a>
                                 <a class="icon-box" title="{{ 'Restart' | T }}" ng-click="task.restartTask(taskItem)" ng-class="{'icon-disabled':taskItem.state!='failed'}"><i class="array-reboot"></i></a> -->
-                                <a ng-if="user_auth_data.system.task.delete" class="icon-box" title="{{ 'Delete' | T }}" ng-click="task.deleteTask(taskItem)"><i class="array-delete an-row-icon"></i></a>
+                                <a ng-if="user_auth_data.system.task.delete" class="icon-box" title="{{ 'Delete' | T }}" ng-click="task.deleteTask(taskItem)"><i class="array-delete"></i></a>
                             </td>
                         </tr>
                     </tbody>
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/vs/modal/vs.add.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/vs/modal/vs.add.html	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/modules/vs/modal/vs.add.html	(working copy)
@@ -1,7 +1,7 @@
 <div id="vs-add">
     <div class="modal-header">
         <button type="button" class="close" ng-click="vsAdd.close()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-        <h6><i class="array-add"></i>{{ 'Add New VS' | T}}</h6>
+        <h4><i class="array-add"></i>{{ 'Add New VS' | T}}</h4>
 
     </div>
     <div class="modal-body">
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/body.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/body.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/body.less	(working copy)
@@ -3,10 +3,9 @@
 }
 
 .graph-title {
-    line-height: 35px;
+    line-height: 25px;
     background-color: @table-head;
 }
-
 .graph .graph-container {
     background-color: #fff !important;
 }
\ No newline at end of file
@@ -20,67 +19,43 @@
         border-radius: 4px 4px 0 0;
     }
 }
-
 .design-tabs .nav-tabs li a {
-    padding: 3px 10px;
+	padding: 3px 10px;
 }
 
-.nav-pills > li > a {
+.nav-pills>li>a {
     background-color: #f5f5f5;
 }
 
 #canvas_container {
     background-color: #fff;
 }
-
 .task-list .widget-body {
     background-color: #f5f5f5;
 }
-
 .task-list .widget-body .table tbody tr td a.name {
     color: #333;
 }
-
 .task-list .widget-body .table tbody tr td {
     border-bottom: 1px solid #e8e7e7;
 }
-
 .form-horizontal {
     background-color: #fff;
 }
-
 .modal-header {
     background-color: @theme-color;
 }
-
 .modal-footer {
     background-color: @theme-color;
 }
-
 .topology-container {
     .fa-angle-double-right, .fa-angle-double-left {
         color: #1b3656;
     }
-
     .border-topology {
         border: 2px dashed #1b3656;
     }
 }
-
 .select-list tr.st-selected {
     background-color: #d7d7e2 !important
-}
-
-.an-tab-icon {
-    color: #222f31;
-    font-size: 18px !important;
-}
-
-.an-row-icon {
-    color: #222f31;
-    font-size: 16px !important;
-}
-
-.an-row-icon-status {
-    font-size: 16px !important;
-}
+}
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/navbar.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/navbar.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/navbar.less	(working copy)
@@ -1,5 +1,5 @@
 .navbar {
-    background-color: #222f31;
+    background-color: #3576be;
     .navbar-brand {
         padding: 7px 0;
         width: 218px;
@@ -12,7 +12,7 @@
         }
     }
     .navbar-brand:hover {
-        background-color: #165;
+        background-color: #165499;
     }
 
     span.title {
@@ -22,13 +22,6 @@
         font-size: 16px;
         letter-spacing: 1px;
     }
-    span.title1 {
-        line-height: 45px;
-        color: #fff;
-        margin-left: 15px;
-        font-size: 12px;
-        letter-spacing: 1px;
-    }
     .brand-info {
        display: none;
     }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/sidebar.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/sidebar.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/sidebar.less	(working copy)
@@ -1,55 +1,51 @@
 .sidebar {
-    background-color: #222f31;
+	background-color: @bg;
+	.module-header {
+		font-size: 12px;
+		font-weight: 700;
+		line-height: 30px;
 
-    .module-header {
-        font-size: 12px;
-        font-weight: 700;
-        line-height: 30px;
-        color: @black-transparent;
-    }
-
-    .module-body {
-        li {
-            &:first-child {
-                border-top: 1px solid @bg-active;
-            }
-
-            a {
-                color: @white-dark;
-                border-bottom: 1px solid @bg-active;
-            }
-
+		color: @black-transparent;
+	}
+	.module-body {
+		li {
+			&:first-child {
+			border-top: 1px solid @bg-active;
+			}
+			a {
+			color: @white-dark;
+			border-bottom: 1px solid @bg-active;
+			}
+			
             &.has-submenu.active,
             &.has-submenu.active > span > a {
                 background-color: transparent;
-                color: @white-dark;
-                //color: #ff8c00;
+				//color: @white-dark;
+				color: #ff8c00;
             }
-
-            &.active {
-                a {
-                    background-color: @bg-active;
-                    color: @active;
-                }
-            }
-        }
-    }
+			&.active {
+				a {
+					background-color: @bg-active;
+					color: @active;
+				}
+			}
+		}
+	}
 }
 
 .sidebar .module-body li.active .submenu a {
     color: #cdcdcd;
     background-color: #24323e;
-    font-weight: 300;
 }
-
 .sidebar .module-body li.active .submenu li.active a {
-    color: #1170cf;
+    color: #ff8c00;
     background-color: #202b33;
-    font-weight: 400;
 }
 
 
-#sidebarToggle {
-    color: @white;
+
+
+#sidebarToggle {    
+	color: @white;
 }
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/variables.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/variables.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/ComposerUI/global/variables.less	(working copy)
@@ -15,7 +15,7 @@
 @warning: #febe30;
 @correct: #36cd40;
 
-@active: #1170cf;
+@active: #ff8c00;
 @active-light: #66afe9;
 @active-dark: #337ab7;
 
@@ -32,7 +32,7 @@
 @theme-color-font: #333;
 @theme-color-icon: #555;
 
-@theme-color-active: #1170cf;
+@theme-color-active: #228ad6;
 @theme-color-active-light: #66afe9;
 @theme-color-active-dark: #337ab7;
 @theme-color-default: #f9f9f9;
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/global.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/global.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/global.less	(working copy)
@@ -7,14 +7,10 @@
 }
 
 .row {
-    margin-right: -15px !important;
+	margin-right: -15px !important;
     margin-left: -15px !important;
-    div {
-        margin-bottom: 1px !important;
-    }
 }
-
-html, body {
+html,body {
     background-color: #efeff4 !important;
 }
 
@@ -24,36 +20,21 @@
     }
 }
 
-.navbar.page-nav {
+.navbar.page-nav{
     border-top: none;
     border-bottom-color: #ddd;
 }
 
 .page-nav {
-    padding-left: 218px;
-    margin-bottom: 15px;
+    padding-left:240px;
+    margin-bottom:15px;
 }
-
 .page-nav .navbar-content .btn-link {
     padding: 3px 12px;
     font-size: 18px;
 }
-
 .navbar-title i {
     margin-right: 10px;
     font-size: large;
 }
 
-.tab-header {
-    font-size: small;
-    font-weight: 400;
-}
-
-.tab-header-1 {
-    font-size: small;
-    font-weight: 400;
-}
-
-th {
-    font-weight: 400 !important;
-}
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/tables.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/tables.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/blue/less/custom/tables.less	(working copy)
@@ -14,7 +14,7 @@
 
 .widget {
          .row >div {
-            margin-bottom: 0;
+            margin-bottom: 0px;
             padding-left: 15px;
         }
 	.table-toolbar {
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/body.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/body.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/body.less	(working copy)
@@ -42,7 +42,7 @@
         width: 450px;
         top: 70px;
     }
-
+    
     input[type='checkbox'],
     input[type='file'],
     input[type='radio'] {
@@ -110,13 +110,13 @@
     box-shadow: 0 2px 8px rgba(0,0,0,.2);
 }
 .slider-selection {
-    background-color: #1170cf;
+    background-color: #228ad6;
     background-image: none;
 }
 
 #main {
     padding-left: 218px;
-    padding-top: 48px;
+    padding-top: 60px;
 }
 #main .nav + .container-fluid {
     margin-top: 15px;
@@ -312,7 +312,7 @@
             padding-left: 15px;
         }
     }
-
+    
 }
 .table-container {
     pre {
@@ -365,58 +365,4 @@
     .datetimepicker-hours table tr td span, .datetimepicker-minutes table tr td span {
         width: 35px;
     }
-}
-
-.col-xs-1,
-.col-sm-1,
-.col-md-1,
-.col-lg-1,
-.col-xs-2,
-.col-sm-2,
-.col-md-2,
-.col-lg-2,
-.col-xs-3,
-.col-sm-3,
-.col-md-3,
-.col-lg-3,
-.col-xs-4,
-.col-sm-4,
-.col-md-4,
-.col-lg-4,
-.col-xs-5,
-.col-sm-5,
-.col-md-5,
-.col-lg-5,
-.col-xs-6,
-.col-sm-6,
-.col-md-6,
-.col-lg-6,
-.col-xs-7,
-.col-sm-7,
-.col-md-7,
-.col-lg-7,
-.col-xs-8,
-.col-sm-8,
-.col-md-8,
-.col-lg-8,
-.col-xs-9,
-.col-sm-9,
-.col-md-9,
-.col-lg-9,
-.col-xs-10,
-.col-sm-10,
-.col-md-10,
-.col-lg-10,
-.col-xs-11,
-.col-sm-11,
-.col-md-11,
-.col-lg-11,
-.col-xs-12,
-.col-sm-12,
-.col-md-12,
-.col-lg-12 {
-    position: relative;
-    min-height: 1px;
-    padding-left: 1px;
-    padding-right: 1px;
 }
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/login.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/login.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/login.less	(working copy)
@@ -31,19 +31,17 @@
                 margin-top: 35px;
                 text-align: center;
                 img {
-                    height: 45px;
-                    width: 150px;
+                    width: 50px;
                 }
             }
             .login-text1 {
                 padding-left: 15px;
                 margin-top: 35px;
                 line-height: 35px;
-                font-size: 21px;
+                font-size: 30px;
                 font-weight: 400;
                 color: #fff;
                 letter-spacing: 1px;
-                text-align: center;
             }
             .login-text2 {
                 margin-top: 25px;
\ No newline at end of file
@@ -81,12 +79,12 @@
                         padding-left: 40px;
                     }
                 }
-
+                
                 button.btn-primary {
                     background-color: #2960b0;
                     border-color: #2960b0
                 }
-
+                
             }
 
 
\ No newline at end of file
@@ -99,9 +97,9 @@
                 right: 0;
             }
         }
-
+        
     }
-}
+} 
 
 
 
\ No newline at end of file
@@ -114,4 +112,4 @@
 .fa-arraylock {
     background-image: url(../images/loggin-icon-passwd.png);
     background-size: 100%;
-}
+}
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/maincontent.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/maincontent.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/maincontent.less	(working copy)
@@ -5,11 +5,9 @@
 
             border: 1px solid @border;
             background-color: @white-transparent-dark;
-
             &.ui-sortable-helper {
                 background-color: @bg;
             }
-
             .file-icon {
                 line-height: 44px;
 
@@ -17,7 +15,6 @@
 
                 text-align: center;
             }
-
             .control-icon {
                 line-height: 44px;
 
@@ -27,11 +24,9 @@
 
                 background-color: @border;
             }
-
             .drag-icon {
                 float: right;
             }
-
             .remove-icon {
                 position: absolute;
                 top: -1px;
@@ -45,10 +40,7 @@
         }
     }
 }
-
 .modal-footer {
-    padding: 2px;
-
     .btn {
         &.btn-default {
             /*float: left;*/
@@ -65,11 +57,9 @@
 
     width: 100% !important;
     margin: 0;
-
     .modal-content {
         height: 100%;
     }
-
     .modal-body {
         position: absolute;
         top: 43px;
@@ -80,7 +70,3 @@
         max-height: none !important;
     }
 }
-
-.modal-header {
-    padding: 6px;
-}
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/navbar.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/navbar.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/navbar.less	(working copy)
@@ -1,6 +1,6 @@
 .navbar {
     position: fixed;
-    //height: 45px;
+    height: 45px;
     min-height: 45px;
     margin: 0;
     padding: 0;
@@ -14,7 +14,9 @@
     border-radius: 0;
     .navbar-title {
         line-height: 50px;
+
         margin: 0;
+
         color: @theme-color-font;
     }
     .navbar-brand {
@@ -100,7 +102,7 @@
     }
 }
 .navbar {
-    background-color: #222f31;
+    background-color: #3576be;
     .navbar-brand {
         padding: 7px 0;
         width: 218px;
@@ -113,7 +115,7 @@
         }
     }
     .navbar-brand:hover {
-        background-color: #165;
+        background-color: #165499;
     }
 
     span.title {
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/sidebar.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/sidebar.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/sidebar.less	(working copy)
@@ -115,7 +115,7 @@
     }
 }
 
-#sidebarToggle {
+#sidebarToggle {    
     font-size: 18px;
     cursor: pointer;
     padding: 15px;
\ No newline at end of file
@@ -125,12 +125,12 @@
         margin-left: 168px;
     }
 }
-.body-collapsed {
-    #sidebarToggle {
+.body-collapsed {    
+    #sidebarToggle {        
         margin-left: 0;
         transform: rotate(180deg);
     }
     .sidebar>li {
         margin-bottom: 20px;
     }
-}
+}
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/variables.less
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/variables.less	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/client/app/styles/general/ComposerUI/global/variables.less	(working copy)
@@ -15,7 +15,7 @@
 @warning: #febe30;
 @correct: #36cd40;
 
-@active: #1170cf;
+@active: #ff8c00;
 @active-light: #66afe9;
 @active-dark: #337ab7;
 
@@ -32,7 +32,7 @@
 @theme-color-font: #333;
 @theme-color-icon: #555;
 
-@theme-color-active: #1170cf;
+@theme-color-active: #228ad6;
 @theme-color-active-light: #66afe9;
 @theme-color-active-dark: #337ab7;
 @theme-color-default: #f9f9f9;
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/activation_server.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/activation_server.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/activation_server.py	(working copy)
@@ -1,14 +1,8 @@
 from cm.lib.communication import send_http_request
 from hive.exceptions import ModelQueryException
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.model.legacycli import CLICmdException,CLICmdError,CLICmdWarning,CLICmdInfo
-from hive.utils import andebug
-from cm.lib.postgres_db import DB
-from hive.model.query import mark_expire_all
-from hive.model.loading import get_model
 import json
-import threading
-import time
 __=_
 
 ServerIP = 'localhost'
@@ -19,7 +13,7 @@
     def check_license(cls, license):
         try:
             response_data = send_http_request('POST', '/cm/check_license', license, 'json', 'http', ServerIP, '8001', 10)
-        except Exception, e:
+        except Exception as e:
             if 'timed out' in str(e):
                 raise ModelQueryException(CLICmdError(__('Check Timeout!')))
             raise ModelQueryException(CLICmdError(__('Check Failed! Reason: %s'%str(e))))
@@ -40,7 +34,7 @@
         #data: {'license_name': u'license1', 'device_id': [u'192.168.4.71']}
         try:
             response_data = send_http_request('POST', '/cm/activate_device', data, 'json', 'http', ServerIP, '8001', 10)
-        except Exception, e:
+        except Exception as e:
             if 'timed out' in str(e):
                 raise ModelQueryException(CLICmdError(__('Activation Timeout!')))
             raise ModelQueryException(CLICmdError(__('Activation Failed!')))
@@ -61,7 +55,7 @@
         #data: {'device_id': [], 'licence_name': licence_name}
         try:
             response_data = send_http_request('POST', '/cm/deactivate_device', data, 'json', 'http', ServerIP, '8001', 80)
-        except Exception, e:
+        except Exception as e:
             if 'timed out' in str(e):
                 raise ModelQueryException(CLICmdError(__('Deactivation Timeout!')))
             raise ModelQueryException(CLICmdError(__('Deactivation Failed!')))
@@ -81,7 +75,7 @@
     def get_license_info(cls, data=[]):
         try:
             response_data = send_http_request('GET', '/cm/get_license_info', data, 'json', 'http', ServerIP, '8001', 20)
-        except Exception, e:
+        except Exception as e:
             if 'timed out' in str(e):
                 raise ModelQueryException(CLICmdError(__('Check Timeout!')))
             raise ModelQueryException(CLICmdError(__('Check Failed!')))
@@ -98,7 +92,7 @@
         #data: {'license_name': ['license1', 'license2', 'licnese3']}
         try:
             response_data = send_http_request('POST', '/cm/delete_license_info', data, 'json', 'http', ServerIP, '8001', 10)
-        except Exception, e:
+        except Exception as e:
             if 'timed out' in str(e):
                 raise ModelQueryException(CLICmdError(__('Delete license info timeout!')))
             raise ModelQueryException(CLICmdError(__('Delete license info Failed!')))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/communication.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/communication.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/communication.py	(working copy)
@@ -1,11 +1,9 @@
-import httplib
+import http.client
 import json
-import tools.dicttoxml as dicttoxml
-import tools.xmltodict as xmltodict
+import dicttoxml
 from xml.dom.minidom import parseString
 import pycurl, threading
-from StringIO import StringIO
-from hive.utils import andebug
+from io import StringIO
 from cm.lib.postgres_db import DB
 from djproject.an_settings import *
 from ipaddress import ip_address, IPv4Address
\ No newline at end of file
@@ -76,7 +74,7 @@
             del self.data[device_ip]
 
 def check_ipv4(ip):
-    return True if type(ip_address(unicode(ip))) is IPv4Address else False
+    return True if type(ip_address(str(ip))) is IPv4Address else False
 
 #L = threading.Lock()
 L = ThreadLock()
\ No newline at end of file
@@ -98,7 +96,7 @@
         curl.setopt(pycurl.POSTFIELDS, params)
         # curl.setopt(pycurl.COOKIEFILE, "ComposerUISESS=f1f713c9e000f5d3f280adbd124df4f5; Path=/; Max-Age=86400")
     if save_cookie:
-        curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+        curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
         curl.setopt(pycurl.HEADER, 1) #don't write http header to response
         curl.setopt(pycurl.HTTPHEADER,  ['Accept: application/json', 'Authorization: %s'%authorization, 'Expect:'])
         curl.setopt(pycurl.URL, "http://%s:%d%s"%(str(ip), int(restapi_port), url))
\ No newline at end of file
@@ -123,7 +121,7 @@
                     'body': buffer.getvalue(),
                 }
             curl.close()
-        except Exception, e:
+        except Exception as e:
             raise NameError(str(e))
         finally:
             if lock:
\ No newline at end of file
@@ -133,7 +131,7 @@
         if proto == 'https':
             curl.setopt(pycurl.SSL_VERIFYPEER, 0)
             curl.setopt(pycurl.SSL_VERIFYHOST, 0)
-            curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+            curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
             curl.setopt(pycurl.HEADER, 0) #don't write http header to response
             curl.setopt(pycurl.HTTPHEADER,  ['Accept: application/json', 'Authorization: %s'%authorization, 'Expect:'])
             curl.setopt(pycurl.URL, "https://%s:%d%s"%(str(ip), int(restapi_port), url))
\ No newline at end of file
@@ -150,7 +148,7 @@
                     'body': buffer.getvalue(),
                 }
                 curl.close()
-            except Exception, e:
+            except Exception as e:
                 raise NameError(str(e))
             finally:
                 if lock:
\ No newline at end of file
@@ -159,7 +157,7 @@
 
             # curl.setopt(pycurl.SSL_VERIFYPEER, 0)
             # curl.setopt(pycurl.SSL_VERIFYHOST, 0)
-            curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+            curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
             curl.setopt(pycurl.HEADER, 0) #don't write http header to response
             curl.setopt(pycurl.HTTPHEADER,  ['Accept: application/json', 'Authorization: %s'%authorization, 'Expect:'])
             curl_url = "http://%s:%d%s"%(str(ip), int(restapi_port), url)
\ No newline at end of file
@@ -176,7 +174,7 @@
                     'body': buffer.getvalue(),
                 }
                 curl.close()
-            except Exception, e:
+            except Exception as e:
                 raise NameError(str(e))
             finally:
                 if lock:
\ No newline at end of file
@@ -195,7 +193,7 @@
     if proto == 'https':
         curl.setopt(pycurl.SSL_VERIFYPEER, 0)
         curl.setopt(pycurl.SSL_VERIFYHOST, 0)
-        curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+        curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
         curl.setopt(pycurl.HEADER, 0)
         curl.setopt(pycurl.HTTPHEADER,  ['Content-Type: text/xml', 'Expect:'])
         curl.setopt(pycurl.URL, "https://%s:%d%s"%(str(ip), int(xmlrpc_port), url))
\ No newline at end of file
@@ -208,10 +206,10 @@
                 'body': buffer.getvalue(),
             }
             curl.close()
-        except Exception, e:
+        except Exception as e:
             raise NameError(str(e))
     else:
-        curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+        curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
         curl.setopt(pycurl.HEADER, 0)
         curl.setopt(pycurl.HTTPHEADER,  ['Content-Type: text/xml', 'Expect:'])
         curl_url = "http://%s:%d%s"%(str(ip), int(xmlrpc_port), url)
\ No newline at end of file
@@ -224,7 +222,7 @@
                 'body': buffer.getvalue(),
             }
             curl.close()
-        except Exception, e:
+        except Exception as e:
             raise NameError(str(e))
     return data
 
\ No newline at end of file
@@ -238,7 +236,7 @@
         params = dom.toprettyxml()
     httpClient = None
     try:
-        httpClient = httplib.HTTPConnection(ip, port, True, timeout=timeout)
+        httpClient = http.client.HTTPConnection(ip, port, True, timeout=timeout)
         httpClient.request(method, url, params, headers)
         response = httpClient.getresponse()
         data = {
\ No newline at end of file
@@ -246,7 +244,7 @@
             'reason': response.reason,
             'body': response.read(),
         }
-    except Exception, e:
+    except Exception as e:
         raise e
     finally:
         if httpClient:
\ No newline at end of file
@@ -260,7 +258,7 @@
         ip = "[%s]" % ip
     buffer = StringIO()
     curl = pycurl.Curl()
-    curl.setopt(pycurl.VERBOSE, 1L) #DEBUG MODE
+    curl.setopt(pycurl.VERBOSE, 1) #DEBUG MODE
     curl.setopt(pycurl.HTTPHEADER,  ['Accept: application/json', 'Authorization: %s'%authorization, 'Expect: '])
     curl.setopt(pycurl.CONNECTTIMEOUT, 5)
     if method == 'POST':
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/composer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/composer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/composer.py	(working copy)
@@ -1,7 +1,7 @@
 import pycurl
 import urllib
 import json
-from StringIO import StringIO
+from io import StringIO
 
 def get_composer_ui_data(method, composer_ui_url, post_data=None):
     buffer = StringIO()
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/console.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/console.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/console.py	(working copy)
@@ -2,7 +2,6 @@
 import array, time, glob, optparse, random, re
 import socket, os, sys, pty, signal, select, gzip
 import commands, threading, fcntl, termios, struct, pwd
-import cgi, mimetypes
 import logging
 from djproject.an_settings import LEGACY_CLI_AGENT_IP
 from hive.utils import andebug
@@ -235,7 +234,7 @@
 					self.utf8_char = (self.utf8_char << 6) | (char & 0x3f)
 					if self.utf8_units_count == self.utf8_units_received:
 						if self.utf8_char<0x10000:
-							o += unichr(self.utf8_char)
+							o += chr(self.utf8_char)
 						self.utf8_units_count = self.utf8_units_received = 0
 				else:
 					o += '?'
@@ -883,13 +882,13 @@
 						char_msb = char & 0xf0
 						if char_msb == 0x20:
 							# Intermediate bytes (added to function)
-							self.vt100_parse_func += unichr(char)
+							self.vt100_parse_func += chr(char)
 						elif char_msb == 0x30 and self.vt100_parse_state == 'csi':
 							# Parameter byte
-							self.vt100_parse_param += unichr(char)
+							self.vt100_parse_param += chr(char)
 						else:
 							# Function byte
-							self.vt100_parse_func += unichr(char)
+							self.vt100_parse_func += chr(char)
 							self.vt100_parse_process()
 						return True
 		self.vt100_lastchar = char
@@ -987,7 +986,7 @@
 				else:
 					wx += self.utf8_charwidth(char)
 					if wx <= self.w:
-						dump += unichr(char)
+						dump += chr(char)
 			dump += "\n"
 		# Encode in UTF-8
 		dump = dump.encode('utf-8')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/db/influxdb/acquire.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/db/influxdb/acquire.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/db/influxdb/acquire.py	(working copy)
@@ -13,7 +13,7 @@
                result = list(rs.get_points())
           data = {"state": True, "data": result}
           return data
-     except Exception, e:
+     except Exception as e:
           if hasattr(e.message, "message"):
                return {"state": False, "data": ["Cannot connect the influxdb."]}
           else:
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/elk.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/elk.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/elk.py	(working copy)
@@ -1,8 +1,6 @@
 from elasticsearch import Elasticsearch, client
 import json, logging, time
-from cm.lib.postgres_db import DB
 from djproject.an_settings import *
-from hive.utils import andebug, get_device_type, standard_model_type
 
 logger = logging.getLogger('hive.debug')
 
@@ -39,7 +37,7 @@
             clt = client.IndicesClient(self.conn)
             #clt.put_template(name=name, body=body)
             clt.create(index=name, body=body)
-        except Exception, e:
+        except Exception as e:
             logger.error('Create %s template failed! %s ' % (name, str(e)))
             return -1
         return 0
@@ -48,7 +46,7 @@
         try:
             clt = client.IndicesClient(self.conn)
             clt.delete_template(name=name)
-        except Exception, e:
+        except Exception as e:
             logger.error('Delete %s template failed. %s' % (name, str(e)))
             return -1
         return 0
@@ -72,7 +70,7 @@
                         return 0
                     time.sleep(1)
                     delete_timems += 1
-            except Exception, e:
+            except Exception as e:
                 logger.error('Delete by query failed. %s' % str(e))
                 retry += 1
         return -1
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_ftp_server.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_ftp_server.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_ftp_server.py	(working copy)
@@ -15,7 +15,7 @@
         handler.authorizer = authorizer
         try:
             server = MultiprocessFTPServer(("0.0.0.0", 9993), handler)
-        except Exception, e:
+        except Exception as e:
             log_file = open('/var/log/ftpd.log', 'a+')
             log_file.write(str(e))
             log_file.close()
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_tftp_server.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_tftp_server.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/init_tftp_server.py	(working copy)
@@ -10,7 +10,7 @@
             os.makedirs(CM_CONFIGBACKUP_PATH)
         try:
             server = tftpy.TftpServer(CM_CONFIGBACKUP_PATH)
-        except Exception, e:
+        except Exception as e:
             log_file = open('/var/log/tftpd.log', 'a+')
             log_file.write(str(e))
             log_file.close()
@@ -22,7 +22,7 @@
 
         try:
             server.listen('0.0.0.0', 69)
-        except Exception, e:
+        except Exception as e:
             log_file = open('/var/log/tftpd.log', 'a+')
             log_file.write(str(e))
             log_file.close()
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libbasic_operation.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libbasic_operation.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libbasic_operation.py	(working copy)
@@ -3,12 +3,13 @@
 from cm.lib.postgres_db import DB
 import json, logging, socket, fcntl, struct, hashlib, os
 from hive.model.legacycli import cli_parse, RegexParser, MATCHALL, MATCHONE, EasyParser
-import commands
+import subprocess
 import time
 from hive.utils import andebug, get_current_session, get_device_type
 import xml.etree.ElementTree as ET
 from djproject.an_settings import *
 from hive.log_utils import *
+from io import IOBase
 
 logger = logging.getLogger('hive.debug')
 
@@ -27,7 +28,7 @@
         if rest_response_data['status'] == 200:
             try:
                 output_result = parse_xml_from_rpc(rest_response_data['body'])
-            except Exception, e:
+            except Exception as e:
                 logger.error('Parse xml failed, %s' % str(e))
                 return {'message': "parsefailed", 'data': str(e)}
             else:
@@ -49,7 +50,7 @@
             if rest_response_data['status'] == 200:
                 try:
                     result_data = json.loads(rest_response_data['body'])
-                except Exception, e:
+                except Exception as e:
                     logger.error('Loads data failed, %s' % str(e))
                     return {'message': "parsefailed", 'data': str(e)}
                 if 'contents' in result_data:
@@ -73,7 +74,7 @@
     if rest_response_data['status'] == 200:
         try:
             result_data = json.loads(rest_response_data['body'])
-        except Exception, e:
+        except Exception as e:
             logger.error('Loads data failed, %s' % str(e))
             return "failed"
         if 'contents' in result_data:
@@ -98,7 +99,7 @@
             output_result = parse_xml_from_rpc(rest_response_data['body'])
             cli_list = _filter_cli_list(running_params, mode)
             result_data = _concat_cli_and_output(cli_list, output_result, device_info)
-        except Exception, e:
+        except Exception as e:
             logger.error('Parse xml failed, %s' % str(e))
             return "failed"
 
@@ -114,7 +115,7 @@
         if cli and cli[0] != "#":
             tmp_list.append(cli)
     if mode == "config_with_input":
-        for i in xrange(0, len(tmp_list) / 2):
+        for i in range(0, len(tmp_list) / 2):
             cli_list.append(tmp_list[i * 2] + "\n" + tmp_list[i + 1]) 
     else:
         cli_list = tmp_list
@@ -262,11 +263,11 @@
             fh.seek(0)
     m = hashlib.md5()
 
-    if isinstance(fname, basestring) and os.path.exists(fname):
+    if isinstance(fname, str) and os.path.exists(fname):
         with open(fname, 'rb') as fh:
             for chunk in read_chunks(fh):
                 m.update(chunk)
-    elif fname.__class__.__name__ in ['StringIO', 'StringO'] or isinstance(fname, file):
+    elif fname.__class__.__name__ in ['StringIO', 'StringO'] or isinstance(fname, IOBase):
         for chunk in read_chunks(fname):
             m.update(chunk)
     else:
@@ -291,7 +292,7 @@
 
     cmd = '/ca/bin/backend -u ' + username + ' -c ' + cmd
     cmd = cmd.encode('utf-8') + f_eop
-    (status, output) = commands.getstatusoutput(cmd)
+    (status, output) = subprocess.getstatusoutput(cmd)
     output = output.strip(f_eop)
     if len(args) == 0:
         return output
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libconfig.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libconfig.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libconfig.py	(working copy)
@@ -43,7 +43,7 @@
             if not content[0]:
                 return content[1]
             ret = self.write_config(content[1])  
-        except Exception, e:
+        except Exception as e:
             logger.error('Backup %s:%s' % (self.device_info['name'], str(e)))
             return 'Backup internal error.'     
         return ''
@@ -68,7 +68,7 @@
             if ret:
                 logger.error('Customize file%s: %s' % (task_name, ret))
                 return ret
-        except Exception, e:
+        except Exception as e:
             logger.error('Customize file %s: %s' % (task_name, str(e)))
             return 'Backup internal error.'     
         return ''
@@ -90,7 +90,7 @@
                     content = f.read()
             else:
                 content = get_template_content(self.file_path, self.device_info["ip_address"])
-        except Exception, e:
+        except Exception as e:
             logger.error('Recover %s:%s' % (self.device_info['name'], str(e)))
             return [0, 'Read config file failed.', eng_flag]
         
@@ -114,7 +114,7 @@
             ret = self.sync_device()
             if ret:
                 return ret
-        except Exception, e:
+        except Exception as e:
             logger.error('Recover %s:%s' % (self.device_info['name'], str(e)))
             return [0, 'Recover internal error.', eng_flag]
         return  
@@ -166,7 +166,7 @@
                 rest_response_data = send_xmlrpc_to_device(self.device_info, self.cli_url, "show config file")
             else:
                 rest_response_data = send_https_rest_request('GET', self.check_config_url, '', self.device_info['ip_address'], self.device_info['restapi_port'], self.device_info['restapi_username'], self.device_info['restapi_password'])
-        except Exception, e:
+        except Exception as e:
             return "Can not connect the device."
         else:
             if self.device_info["protocol"] == "xmlrpc":
@@ -222,7 +222,7 @@
                     return ''
                 else:
                     return "Export config file from device failed, MD5 not match."
-            except Exception, e:
+            except Exception as e:
                 return "Export config file from device failed."
         return '' 
     
@@ -292,7 +292,7 @@
 
                 if self.device_info['type'].lower() in VPN_TYPE_LIST:
                     self.parse_config_file()
-            except Exception, e:
+            except Exception as e:
                 logger.error('Backup %s:%s' % (self.device_info['name'], str(e)))
                 return 'Backup internal error.'
         else:
@@ -316,7 +316,7 @@
                     
                 if self.device_info['type'].lower() in VPN_TYPE_LIST:
                     self.parse_config_file()
-            except Exception, e:
+            except Exception as e:
                 logger.error('Backup %s:%s' % (self.device_info['name'], str(e)))
                 return 'Backup internal error.'
             finally:
@@ -364,7 +364,7 @@
                     rest_response_data = send_xmlrpc_to_device(self.device_info, new_url, 'show host')
                 else:
                     rest_response_data = send_https_rest_request('GET', new_url, '', self.device_info['ip_address'], self.device_info['restapi_port'], self.device_info['restapi_username'], self.device_info['restapi_password'])
-            except Exception, e:
+            except Exception as e:
                 failed_time -= 1
             else:
                 if self.device_info["protocol"] == "xmlrpc":
@@ -396,7 +396,7 @@
                     rest_response_data = send_xmlrpc_to_device(self.device_info, self.check_config_url, "show config file")
                 else:
                     rest_response_data = send_https_rest_request('GET', self.check_config_url, '', self.device_info['ip_address'], self.device_info['restapi_port'], self.device_info['restapi_username'], self.device_info['restapi_password'])
-            except Exception, e:
+            except Exception as e:
                 return "Can't connect the device."
             else:
                 if self.device_info["protocol"] == "xmlrpc":
@@ -471,7 +471,7 @@
             ret = self.check_config_recover()
             if ret:
                 return [0, ret]
-        except Exception, e:
+        except Exception as e:
             logger.error('Recover %s:%s' % (self.device_info['name'], str(e)))
             return [0, 'Recover internal error.']      
         finally:
@@ -555,6 +555,6 @@
         try:
             ret = self.sync_config()
             return ret
-        except Exception, e:
+        except Exception as e:
             logger.error('Recover %s:%s' % (self.device_info['name'], str(e)))
             return [0, 'Recover internal error.%s' % (str(e))]
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libmonitor.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libmonitor.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/libmonitor.py	(working copy)
@@ -1,10 +1,9 @@
 from cm.lib.postgres_db import DB
-import httplib, datetime, logging, json
+import datetime, logging, json
+import http.client as httplib
 from cm.lib.send_email import SendMail
-from hive.model.manager import CLIManager
 from hive.model.legacycli import EasyParser
 from cm.lib.libbasic_operation import cmd_direct
-#from cm.models.device_mgmt.service import Services
 from hive.model.loading import get_model
 
 logger = logging.getLogger('hive.debug')
@@ -46,7 +45,7 @@
         httpClient = httplib.HTTPConnection('127.0.0.1', 3000, True, timeout=20)
         #httpClient.request('POST', '/composer/graph/xyAxis', json.dumps(SELECT_INFO), headers)
         httpClient.request(scheme, url, params, headers)
-    except Exception, e:
+    except Exception as e:
         return 'Falied'
     response = httpClient.getresponse()
     result = json.loads(response.read())
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py	(working copy)
@@ -42,8 +42,8 @@
     def execute_sql_ingnore_exception(self, sql):
         try:
             self.execute_sql(sql)
-        except Exception, e:
-            print str(e)
+        except Exception as e:
+            print(str(e))
             self.conn.rollback()
 
     def close(self):
\ No newline at end of file
@@ -541,7 +541,8 @@
             time TIME NOT NULL,
             day_of_the_week integer DEFAULT NULL,
             day_of_the_month integer DEFAULT NULL,
-            month integer DEFAULT NULL CHECK (month BETWEEN 1 AND 12)
+            month integer DEFAULT NULL CHECK (month BETWEEN 1 AND 12),
+            destination varchar(64) DEFAULT NULL
         );
                           '''
         self.execute_sql(create_table_sql)
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/send_email.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/send_email.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/send_email.py	(working copy)
@@ -1,7 +1,6 @@
 from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 from email.mime.application import MIMEApplication
-import urllib, urllib2
 import smtplib
 
 class SendMail(object):
@@ -99,12 +98,12 @@
 	    client.login(sender, password)
 	    client.sendmail(sender, receivers, msg.as_string())
 	    client.quit()
-	    print 'Send Emails successfully'
+	    print('Send Emails successfully')
 	except smtplib.SMTPRecipientsRefused:
-	    print 'Recipient refused'
+	    print('Recipient refused')
 	except smtplib.SMTPAuthenticationError:
-	    print 'Auth error'
+	    print('Auth error')
 	except smtplib.SMTPSenderRefused:
-	    print 'Sender refused'
-	except smtplib.SMTPException,e:
-	    print e.message
+	    print('Sender refused')
+	except smtplib.SMTPException as e:
+	    print(e.message)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/task_scheduler.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/task_scheduler.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/lib/task_scheduler.py	(working copy)
@@ -104,7 +104,7 @@
     mark_expire_all(get_model('cm', ['configuration', 'update', 'Update']))
 def get_file_md5(filename):
     myhash = hashlib.md5()
-    f = file(filename, 'rb')
+    f = open(filename, 'rb')
     while True:
         b = f.read(8192)
         if not b:
@@ -219,7 +219,7 @@
                 rest_response_data = send_https_rest_request('POST', new_url, running_params, ip_address, restapi_port, restapi_username, restapi_password)
             else:
                 rest_response_data = send_xmlrpc_to_device(device_info, '', cli_cmd)
-        except Exception, e:
+        except Exception as e:
             description = 'Error, get package info from device failed! %s' % str(e)
             add_description(task_name, description)
             return False
@@ -308,7 +308,7 @@
                 rest_response_data = send_https_rest_request('GET', new_url, '', ip_address, restapi_port, restapi_username, restapi_password)
             else:
                 rest_response_data = send_xmlrpc_to_device(device_info, '', 'show version')
-        except Exception, e:
+        except Exception as e:
             failed_time -= 1
             # if 'timed out' in str(e):
             #     description = 'Error, please check the ip address and make sure the device have already turned on the RESTful API service! '
@@ -320,7 +320,7 @@
                 if rest_response_data and rest_response_data['status'] == 200:
                     try:
                         rest_body = json.loads(rest_response_data['body'])
-                    except Exception, e:
+                    except Exception as e:
                         time.sleep(10)
                         continue
                     if 'SystemInfo' not in rest_body:
@@ -340,7 +340,7 @@
                     version_ag = json.loads(rest_response_data)[0]["output"]
                     rtn = cli_parse(version_ag, [ RegexParser('([ArrayOS|InfosecOS].+?)\n', MATCHONE)])
                     new_version = rtn[0][0]
-                except Exception, e:
+                except Exception as e:
                     time.sleep(10)
                     description = "Failed to get new version. %s" % str(e)
                     continue
@@ -394,7 +394,7 @@
                 rest_response_data = send_https_rest_request('GET', new_url, '', ip_address, restapi_port, restapi_username, restapi_password)
             else:
                 rest_response_data = send_xmlrpc_to_device(device_info, '', 'show version')
-        except Exception, e:
+        except Exception as e:
             failed_time -= 1
             if 'timed out' in str(e):
                 description = 'Error, please check the ip address and make sure the device have already turned on the RESTful API service! '
@@ -443,7 +443,7 @@
                 rest_response_data = send_https_rest_request('POST', new_url, running_params, ip_address, restapi_port, restapi_username, restapi_password)
             else:
                 rest_response_data = send_xmlrpc_to_device(device_info, '', 'system update "/var/crash/package/%s"\nYES' % file_name, mode="config_with_input")
-        except Exception, e:
+        except Exception as e:
             failed_time -= 1
             if 'timed out' in str(e) or 'Empty reply from server' in str(e):
                 #description = 'Error, please check the ip address and make sure the device have already turned on the RESTful API service! '
@@ -461,7 +461,7 @@
                             update_job_state(task_name, 'failed')
                             mark_expire_all(get_model('cm', ['tasking', 'Tasks']))
                             return False
-                    except Exception, e:
+                    except Exception as e:
                         break
                     # rest_body = json.loads(rest_response_data['body'])
                     # contents = rest_body['contents']
@@ -507,7 +507,7 @@
     network_card = cm.conf.NETWORK_CARD
     try:
         local_ip = get_ip_address(network_card) 
-    except Exception, e:
+    except Exception as e:
         description = 'Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".'
         add_description(task_name, description)
         update_job_state(task_name, 'failed')
@@ -524,7 +524,7 @@
             rest_response_data = send_https_rest_request('POST', new_url, running_params, ip_address, restapi_port, restapi_username, restapi_password)
         else:
             rest_response_data = send_xmlrpc_to_device(device_info, '', 'system package "%s"' % file_path)
-    except Exception, e:
+    except Exception as e:
         #mybe timeout, do not return fialed here, continue do check_package_from_device
         pass
     else:
@@ -553,7 +553,7 @@
                             db.close()
 
                             shutil.move(location, new_location)
-                        except Exception, e:
+                        except Exception as e:
                             if db:
                                 db.close()
                             description = 'Error, failed to rename the suffix of upgrade file.'
@@ -568,7 +568,7 @@
                         running_params = 'system package "%s"' % file_path
                         try:
                             rest_response_data = send_https_rest_request('POST', new_url, running_params, ip_address, restapi_port, restapi_username, restapi_password)
-                        except Exception, e:
+                        except Exception as e:
                             #maybe timeout, do not return fialed here, continue do check_package_from_device
                             pass
                         else:
@@ -680,7 +680,7 @@
                 config_result = result_data['contents']
             elif 'CLI Output' in result_data:
                 config_result = result_data['CLI Output']
-        except Exception, e:
+        except Exception as e:
             config_failed(" Execute commands failed, please check it.", task_name)
             return
     else:
@@ -1111,7 +1111,7 @@
 
         try:
             cm_vsite_file = os.popen(cmd_value)
-        except Exception, e:
+        except Exception as e:
             config_failed("Get config from AMP failed.", task_name)
             return
         module_config = cm_vsite_file.read().splitlines()
@@ -1122,7 +1122,7 @@
 
         try:
             cm_vsite_file = os.popen(cmd_value)
-        except Exception, e:
+        except Exception as e:
             config_failed("Get config from AMP failed.", task_name)
             return
         module_config = cm_vsite_file.read().splitlines()
@@ -1190,7 +1190,7 @@
             #get config file from device
             try:
                 local_ip = get_ip_address(network_card)
-            except Exception, e:
+            except Exception as e:
                 description = 'Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".'
                 config_failed(description, task_name)
                 return -1
@@ -1241,7 +1241,7 @@
         mark_expire_all(get_model('cm', ['tasking', 'Tasks']))
         mark_expire_all(get_model('cm', ['configuration', 'config_file', 'ConfigFile']))
         send_notification('success', 'Task <%s> has done.' % task_name, model='config')
-    except Exception, e:
+    except Exception as e:
         config_failed("Internal Error: %s" %e, task_name)
         return -1
     return 0
@@ -1427,7 +1427,7 @@
         #get config file from device
         try:
             local_ip = get_ip_address(network_card)
-        except Exception, e:
+        except Exception as e:
             return 'Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".'
         device_info = get_rest_info_from_device(pk_list['name'])[0]
         cli_url = modify_url('/rest/device_type/cli_extend', device_info['type'])
@@ -1647,7 +1647,7 @@
             network_card = cm.conf.NETWORK_CARD
             try:
                 local_ip = get_ip_address(network_card)
-            except Exception, e:
+            except Exception as e:
                 description = 'Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".'
                 config_failed(description, task_name)
                 return
@@ -1737,7 +1737,7 @@
     data = db.fetchall(select_sql)
     result=[each[0] for each in data]
     if result[0]:
-        device = unicode(result[0], 'utf-8').split(',')
+        device = str(result[0], 'utf-8').split(',')
     else:
         device = []
     if action == 'insert':
@@ -1766,7 +1766,7 @@
 
     #get difference between device_list and device_list of database
     for item in result:
-        result_list = list(set(unicode(item['device_list'], 'utf-8').split(',')).difference(set(device_list)))
+        result_list = list(set(str(item['device_list'], 'utf-8').split(',')).difference(set(device_list)))
 
         #update cm_vpn_resource set device_list where id=<>
         update_sql = "UPDATE %s SET device_list='%s' where id=%d" % (database, ','.join(result_list), item['id'])
@@ -1845,7 +1845,7 @@
                 continue
             try:
                 rest_response_data = send_https_rest_request('POST', url, params['params'], device_info['ip_address'], device_info['restapi_port'], device_info['restapi_username'], device_info['restapi_password'])
-            except Exception, e:
+            except Exception as e:
                 #description = 'Error, please check the ip address and make sure the device have already turned on the RESTful API service!'
                 description += 'Can not connect the device %s[%s].\n' % (device, device_info['ip_address'])
             else:
@@ -1998,7 +1998,7 @@
                 try:
                     new_url = modify_url('/rest/device_type/system/SystemInfo/version', self.data['type'])
                     rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                except Exception, e:
+                except Exception as e:
                     failed_time -= 1
                     logger.error('Get device<%s>(%s) version failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                 else:
@@ -2007,7 +2007,7 @@
                     try:
                         rest_body = json.loads(rest_response_data['body'])
                         set_device_version(self.data['id'], rest_body['SystemInfo']['version'])
-                    except Exception, e:
+                    except Exception as e:
                         logger.error('Get device<%s>(%s) version failed.' % (self.data['name'], self.data['ip']))
                     break
         if not failed_time:
@@ -2039,7 +2039,7 @@
                             if result[6]:
                                 snmp_general["v3user"] = result[6]['v3user'].replace('\"', '')
                             set_device_snmp(self.data['id'], json.dumps(snmp_general))
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Set device<%s>(%s) snmp failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                     else:
                         logger.error('Get device<%s>(%s) SNMPGeneral failed. %s' % (self.data['name'], self.data['ip'], str(e)))
@@ -2048,7 +2048,7 @@
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/general', self.data['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Get device<%s>(%s) SNMPGeneral failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         else:
                             if rest_response_data['status'] == 200:
@@ -2073,7 +2073,7 @@
                                                     snmp_general['v3user'] = v3user
                                                 break
                                         set_device_snmp(self.data['id'], json.dumps(snmp_general))
-                                except Exception, e:
+                                except Exception as e:
                                     logger.error('Set device<%s>(%s) snmp failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                     elif self.data['type'].lower() in VPN_TYPE_LIST:
                         # Failed to query the snmp general info from FieldGroup `general` in current AG versions.
@@ -2083,7 +2083,7 @@
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/snmp_version', self.data['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Get device<%s>(%s) SNMP version failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         else:
                             if rest_response_data['status'] == 200:
@@ -2092,13 +2092,13 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'snmp_version' in rest_body['SNMPGeneral']:
                                             snmp_general['snmp_version'] = rest_body['SNMPGeneral']['snmp_version']
-                                except Exception, e:
+                                except Exception as e:
                                     logger.error('Set device<%s>(%s) snmp version failed. %s' % (self.data['name'], self.data['ip'], str(e)))
 
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/snmp_enable', self.data['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Get device<%s>(%s) SNMP enable failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         else:
                             if rest_response_data['status'] == 200:
@@ -2107,13 +2107,13 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'snmp_enable' in rest_body['SNMPGeneral']:
                                             snmp_general['snmp_enable'] = rest_body['SNMPGeneral']['snmp_enable']
-                                except Exception, e:
+                                except Exception as e:
                                     logger.error('Set device<%s>(%s) snmp enable failed. %s' % (self.data['name'], self.data['ip'], str(e)))
 
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/community', self.data['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Get device<%s>(%s) SNMP community failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         else:
                             if rest_response_data['status'] == 200:
@@ -2122,12 +2122,12 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'community' in rest_body['SNMPGeneral']:
                                             snmp_general['community'] = rest_body['SNMPGeneral']['community']
-                                except Exception, e:
+                                except Exception as e:
                                     logger.error('Set device<%s>(%s) snmp community failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/v3_user', self.data['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Get device<%s>(%s) SNMP v3_user failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         else:
                             if rest_response_data['status'] == 200:
@@ -2142,11 +2142,11 @@
                                                         v3user += ' '+user['priv_password']
                                                     snmp_general['v3user'] = v3user
                                                 break
-                                except Exception, e:
+                                except Exception as e:
                                     logger.error('Set device<%s>(%s) snmp v3_user failed. %s' % (self.data['name'], self.data['ip'], str(e)))
                         try:
                             set_device_snmp(self.data['id'], json.dumps(snmp_general))
-                        except Exception, e:
+                        except Exception as e:
                             logger.error('Set device<%s>(%s) snmp failed. %s' % (self.data['name'], self.data['ip'], str(e)))
 
 def check_device_status():
@@ -2155,7 +2155,7 @@
         select_sql = "SELECT id, name, ip_address, protocol, restapi_port, restapi_username, restapi_password, type, enable_password, connection FROM device"
         data = db.fetchall(select_sql)
         db.close()
-    except Exception, e:
+    except Exception as e:
         # select from db failed, mostly because avx extension is not installed.
         return
     key = ['id', 'name', 'ip', 'protocol', 'restapi_port', 'restapi_username', 'restapi_password', 'type', 'enable_password', 'connection']
@@ -2221,7 +2221,7 @@
     def run(self):
         try:
             rest_response_data = call_restapi('GET', '/rest/avx/system/SystemInfo/version', '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'], 'https')      
-        except Exception, e:
+        except Exception as e:
             logger.error('Get host<%s> version failed. %s' % (self.data['ip'], str(e)))
             set_host_connection(self.data['id'], 'Unconnected')
             mark_expire_all(get_model('cm', ['virtualization', 'Host']))
@@ -2232,7 +2232,7 @@
                 # get cpu/memory/disk data
                 try:
                     rest_response_data = call_restapi('GET', '/rest/avx/system/SystemStatus/status', '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'], 'https')
-                except Exception, e:
+                except Exception as e:
                     logger.error('Get host<%s> cpu/memory/disk usage failed. %s' % (self.data['ip'], str(e)))
                     mark_expire_all(get_model('cm', ['virtualization', 'Host']))
                 else:
@@ -2242,7 +2242,7 @@
                 #get vm numbers
                 try:
                     rest_response_data = call_restapi('GET', '/rest/avx/va/instance/VAInstance/_get_list_data', '', self.data['ip'], self.data['restapi_port'], self.data['restapi_username'], self.data['restapi_password'], 'https')
-                except Exception, e:
+                except Exception as e:
                     logger.error('Get host<%s> vm numbers failed. %s' % (self.data['ip'], str(e)))
                     mark_expire_all(get_model('cm', ['virtualization', 'Host']))
                 else:
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/audit/user/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/audit/user/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/audit/user/__init__.py	(working copy)
@@ -1,7 +1,6 @@
 from hive.imports.model import *
 from django.utils.translation import ugettext_lazy as _
 from cm.lib.postgres_db import DB
-from elasticsearch import Elasticsearch
 from cm.models.audit.user.user_body import *
 import json
 from cm.lib.elk import get_elk
@@ -9,6 +8,9 @@
 from hive.utils import andebug, get_device_type, standard_model_type
 from djproject.an_settings import *
 from cm.lib.communication import send_https_rest_request, modify_url
+from django.db.models.query import QuerySet
+import requests
+import datetime
 __=_
 
 class AuditUser(ANModel):
@@ -284,7 +286,7 @@
             try:
                 es = get_elk()
                 res = es._search(device_type="VPN_TYPE", doc_type="syslog", body=json.loads(body_text), _source=["time", "logid", "useragent", "sessionid", "aaa_method", "l3responselength", "l7requestlength", "l7responselength", "l3requestlength"])
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__('Connect elasticsearch failed. %s' % str(e))))
             if not res:
                 raise ModelQueryException(CLICmdError(__("Please send log to AMP first.")))
@@ -333,7 +335,7 @@
             try:
                 es = get_elk()
                 res = es._search(device_type="VPN_TYPE", doc_type="syslog", body=json.loads(body_text), _source=source)
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__('Connect elasticsearch failed. %s' % str(e))))
             if not res:
                 raise ModelQueryException(CLICmdError(__("Please send log to AMP first.")))
@@ -375,7 +377,7 @@
             try:
                 es = get_elk()
                 res = es._search(device_type="VPN_TYPE", doc_type="syslog", body=json.loads(body_text))
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__('Connect elasticsearch failed. %s' % str(e))))
             if not res:
                 raise ModelQueryException(CLICmdError(__("Please send log to AMP first.")))            
@@ -390,7 +392,7 @@
             try:
                 es = get_elk()
                 res = es._search(device_type='VPN_TYPE', doc_type="syslog", body=json.loads(body_text))
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__('Connect elasticsearch failed. %s' % str(e))))
             if not res:
                 raise ModelQueryException(CLICmdError(__("Please send log to AMP first.")))            
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/config_file/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/config_file/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/config_file/__init__.py	(working copy)
@@ -1,9 +1,7 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
-#from cm.lib.sqlite_db import DB
+from django.utils.translation import gettext_lazy as _
 from cm.lib.postgres_db import DB
 from djproject.settings import FILE_UPLOAD_DIR, CONFIG_UPLOAD_STORE_DIR
-import hashlib
 import os, shutil, requests, datetime, json, tarfile
 from cm.models.tasking import GLOBAL_TASK
 from cm.models.device_mgmt.device import get_rest_info_from_device
@@ -15,6 +13,7 @@
 from djproject.an_settings import *
 from cm.lib.libbasic_operation import get_ip_address
 from hive.utils import get_current_session
+from django.db.models.query import QuerySet
 import copy
 __=_
 """
@@ -379,7 +378,7 @@
                     network_card = cm.conf.NETWORK_CARD
                     try:
                         local_ip = get_ip_address(network_card)
-                    except Exception, e:
+                    except Exception as e:
                         raise ModelQueryException(CLICmdError(__('Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".')))
 
                     cli_url = '"ftp://array:admin@%s:9993/upload/%s/%s"' % (local_ip, task_name, filename)
@@ -451,7 +450,7 @@
         def _perform_Sync_diff(self, options):
             try:
                 diff_result = json.loads(options['diff_result'])
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__("Load diff content failed.")))
             command_result = {}
             vsite_name = 'global'
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/update/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/update/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/update/__init__.py	(working copy)
@@ -1,5 +1,5 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 #from cm.lib.sqlite_db import DB
 from cm.lib.postgres_db import DB
 from djproject.settings import FILE_UPLOAD_DIR
@@ -8,6 +8,7 @@
 from cm.lib.task_scheduler import add_job_into_database, remove_job_from_database, get_file_md5, compare_md5, mv_file, upload_job, update_updatelist, upload_to_device
 from cm.models.tasking import GLOBAL_TASK
 from apscheduler.schedulers.background import BackgroundScheduler
+from django.db.models.query import QuerySet
 __=_
 
 class Update(ANModel):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/__init__.py	(working copy)
@@ -1,13 +1,14 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
-#from cm.lib.sqlite_db import DB
+from django.utils.translation import gettext_lazy as _
 from cm.lib.postgres_db import DB
 from cm.lib.communication import send_https_rest_request, modify_url
 from cm.lib.parse_configfile import DEFAULT_CONFIG_FILE_PATH, DEFAULT_VSITE_PATH, parse_specific_config, change_config_file, INSERT, DELETE, add_vsite_to_config, remove_vsite_from_config
 from hive.model.legacycli import cli_parse, RegexParser, MATCHALL, MATCHONE
 from cm.models.device_mgmt.device import get_rest_info_from_device
 import os
+import json
 from hive.utils import get_current_session
+from django.db.models.query import QuerySet
 __=_
 
 def send_command_device(device_info, url, running_params):
@@ -61,7 +62,7 @@
             for i in range(0, len(params['params'])):
                 try:
                     rest_response_data = send_https_rest_request('POST', new_url, params['params'][i], device_info['ip_address'], device_info['restapi_port'], device_info['restapi_username'], device_info['restapi_password'])
-                except Exception, e:
+                except Exception as e:
                     error_flag = '1'
                     error_msg.update({error_flag:'unconnected'})
                     break
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/acl/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/acl/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/acl/__init__.py	(working copy)
@@ -1,18 +1,16 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from cm.lib.parse_configfile import INSERT, DELETE
 from cm.models.configuration.vsite_config import vs_insert_delete, CM_check
 from cm.lib.parse_configfile import parse_specific_config, DEFAULT_CONFIG_FILE_PATH, delete_specific_info_from_config, sync_vsite_to_config
 from hive.model.legacycli import MATCHALL, MATCHONE
 import os, datetime, difflib, time
-#from cm.lib.sqlite_db import DB
 from cm.lib.postgres_db import DB
-from cm.conf import VSITE_NAME
 from cm.lib.task_scheduler import sync_to_device, add_job_into_database, remove_job_from_database, update_cm_role_devicelist
 from cm.models.tasking import GLOBAL_TASK
 from apscheduler.schedulers.background import BackgroundScheduler
-from cm.lib.communication import send_https_rest_request
-from cm.models.device_mgmt.device import get_rest_info_from_device
+from django.db.models.query import QuerySet
+import json
 __=_
 
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/role/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/role/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/role/__init__.py	(working copy)
@@ -1,5 +1,5 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from cm.lib.parse_configfile import DEFAULT_CONFIG_FILE_PATH, parse_specific_config, delete_specific_info_from_config, sync_vsite_to_config
 from cm.lib.parse_configfile import INSERT, DELETE
 from cm.models.configuration.vsite_config import vs_insert_delete, CM_check
@@ -7,12 +7,10 @@
 import os, datetime, json, difflib, time
 #from cm.lib.sqlite_db import DB
 from cm.lib.postgres_db import DB
-from cm.conf import VSITE_NAME
 from cm.lib.task_scheduler import sync_to_device, add_job_into_database, remove_job_from_database, update_cm_role_devicelist
 from cm.models.tasking import GLOBAL_TASK
 from apscheduler.schedulers.background import BackgroundScheduler
-from cm.models.device_mgmt.device import get_rest_info_from_device
-from cm.lib.communication import send_https_rest_request
+from django.db.models.query import QuerySet
 __=_
 
 class RoleGroup(ANModel):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/vpn/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/vpn/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/configuration/vsite_config/vpn/__init__.py	(working copy)
@@ -1,18 +1,16 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from cm.lib.parse_configfile import parse_specific_config
 from cm.models.configuration.vsite_config import vs_insert_delete, CM_check
 from cm.lib.parse_configfile import INSERT, DELETE, delete_specific_info_from_config, DEFAULT_CONFIG_FILE_PATH, sync_vsite_to_config
 from hive.model.legacycli import MATCHALL, MATCHONE
 import os, datetime, difflib, time
-#from cm.lib.sqlite_db import DB
 from cm.lib.postgres_db import DB
-from cm.conf import VSITE_NAME
 from cm.lib.task_scheduler import sync_to_device, add_job_into_database, remove_job_from_database, update_cm_role_devicelist
 from cm.models.tasking import GLOBAL_TASK
 from apscheduler.schedulers.background import BackgroundScheduler
-from cm.models.device_mgmt.device import get_rest_info_from_device
-from cm.lib.communication import send_https_rest_request
+from django.db.models.query import QuerySet
+import json
 __=_
 
 class NetGroupItem(ANModel):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device/__init__.py	(working copy)
@@ -3,14 +3,12 @@
 from django.utils.encoding import force_bytes
 
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
-from hive.utils import andebug, get_device_type, standard_model_type
-#from cm.lib.sqlite_db import DB
+from django.utils.translation import gettext_lazy as _
+from hive.utils import get_device_type, standard_model_type
 from cm.lib.postgres_db import DB
-from hive.notification import send_notification
 from cm.lib.communication import send_https_rest_request, modify_url, L
 from cm.lib.elk import put_template, get_elk
-from cm.lib.parse_configfile import parse_vsite_from_configfile, DEFAULT_CONFIG_FILE_PATH, DEFAULT_VSITE_PATH, parse_vsite_config_from_configfile
+from cm.lib.parse_configfile import parse_vsite_from_configfile, DEFAULT_CONFIG_FILE_PATH, DEFAULT_VSITE_PATH
 from hive.model.query import mark_expire_all
 from hive.model.loading import get_model
 from cm.lib.task_scheduler import add_job_into_database, remove_job_from_database, config_backup
@@ -18,13 +16,14 @@
 from cm.models.system.license import check_license
 from apscheduler.schedulers.background import BackgroundScheduler
 import uuid
-import time, os, re, shutil
+import time, os, re
 from cm.models.audit.user.user_body import body_login_detail, body_device_vsite
 import json
 import elasticsearch
 from djproject.an_settings import *
-from cm.lib.libbasic_operation import oper_log, send_command_to_device, send_cli_to_device
-from cm.lib.libbasic_operation import oper_log, send_command_to_device, send_cli_to_device, insert_default_tmpkey, delete_all_tmpkey
+from cm.lib.libbasic_operation import send_command_to_device, send_cli_to_device, insert_default_tmpkey, delete_all_tmpkey
+from django.db.models.query import QuerySet
+import datetime
 
 __=_
 
@@ -367,7 +366,7 @@
                         if len(license_date) > 8:
                             license_date = license_date[2:]
                         each['license_date'] = "Expires on " + time.strftime("%b %d %G", time.strptime(license_date, "%Y%m%d"))
-                    except Exception, e:
+                    except Exception as e:
                         each['license_date'] = "Permanent"
                 each['group_name_from'] = ''
                 self._model._meta.mark_delay_query(each)
@@ -487,7 +486,7 @@
                 else:
                     new_url = modify_url('/rest/device_type/system/SystemInfo/version', data['type'])
                     rest_response_data = send_https_rest_request('GET', new_url, '', data['ip'], data['restapi_port'], data['restapi_username'], data['restapi_password'])
-            except Exception, e:
+            except Exception as e:
                 if 'timed out' in str(e):
                     raise ModelQueryException(CLICmdError(__('Register timed out! Please check the ip address and make sure the device have already turned on the RESTful API service and the RESTful API port is correct!')))
                 raise ModelQueryException(CLICmdError(__('Register Failed.')))
@@ -587,7 +586,7 @@
             if data['type'].lower() in VPN_TYPE_LIST:
                 try:
                     insert_ip_pool(data, data['id'])
-                except Exception, e:
+                except Exception as e:
                     db = DB.get_connected_db()
                     delete_sql = "DELETE FROM device where id='%s'" % data['id']
                     db.execute_sql(delete_sql)
@@ -673,7 +672,7 @@
             each = device_info[0]
             try:
                 send_cli_to_device(each, cmd)
-            except Exception, e:
+            except Exception as e:
                 raise ModelQueryException(CLICmdError(__('Set device<%s> snmp failed. %s' % (each['ip_address'], str(e)))))
             else:
                 if each['protocol'] == 'xmlrpc' or "nsae" in each['type'].lower() or "netopti" in each['type'].lower():
@@ -705,14 +704,14 @@
                             update_sql = "UPDATE device SET snmp_general='%s' WHERE id='%s'" %(json.dumps(snmp_general), device_id)
                             db.execute_sql(update_sql)
                             db.close()
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Update device<%s> snmp failed. %s' % (each['ip_address'], str(e)))))
                 else:
                     if each['type'].lower() in ADC_TYPE_LIST + WAF_TYPE_LIST:
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/general', each['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', each['ip_address'], each['restapi_port'], each['restapi_username'], each['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Get device<%s> snmp failed. %s' % (each['ip_address'], str(e)))))
                         else:
                             if rest_response_data['status'] == 200:
@@ -741,14 +740,14 @@
                                         update_sql = "UPDATE device SET snmp_general='%s' WHERE id='%s'" %(json.dumps(snmp_general), device_id)
                                         db.execute_sql(update_sql)
                                         db.close()
-                                except Exception, e:
+                                except Exception as e:
                                     raise ModelQueryException(CLICmdError(__('Update device<%s> snmp failed. %s' % (each['ip_address'], str(e)))))
                     elif each['type'].lower() in VPN_TYPE_LIST:
                         snmp_general = {}
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/snmp_version', each['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', each['ip_address'], each['restapi_port'], each['restapi_username'], each['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Get device<%s> SNMP version failed. %s' % (each['ip_address'], str(e)))))
                         else:
                             if rest_response_data['status'] == 200:
@@ -757,13 +756,13 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'snmp_version' in rest_body['SNMPGeneral']:
                                             snmp_general['snmp_version'] = rest_body['SNMPGeneral']['snmp_version']
-                                except Exception, e:
+                                except Exception as e:
                                     raise ModelQueryException(CLICmdError(__('Set device<%s> snmp version failed. %s' % (each['ip_address'], str(e)))))
 
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/snmp_enable', each['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', each['ip_address'], each['restapi_port'], each['restapi_username'], each['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Get device<%s> SNMP enable failed. %s' % (each['iip_addressp'], str(e)))))
                         else:
                             if rest_response_data['status'] == 200:
@@ -772,13 +771,13 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'snmp_enable' in rest_body['SNMPGeneral']:
                                             snmp_general['snmp_enable'] = rest_body['SNMPGeneral']['snmp_enable']
-                                except Exception, e:
+                                except Exception as e:
                                     raise ModelQueryException(CLICmdError(__('Set device<%s> snmp enable failed. %s' % (each['ip_address'], str(e)))))
 
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/community', each['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', each['ip_address'], each['restapi_port'], each['restapi_username'], each['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Get device<%s> SNMP community failed. %s' % (each['ip_address'], str(e)))))
                         else:
                             if rest_response_data['status'] == 200:
@@ -787,12 +786,12 @@
                                     if 'SNMPGeneral' in rest_body:
                                         if 'community' in rest_body['SNMPGeneral']:
                                             snmp_general['community'] = rest_body['SNMPGeneral']['community']
-                                except Exception, e:
+                                except Exception as e:
                                     raise ModelQueryException(CLICmdError(__('Set device<%s> snmp community failed. %s' % (each['ip_address'], str(e)))))
                         try:
                             new_url = modify_url('/rest/device_type/admintools/snmp/SNMPGeneral/v3_user', each['type'])
                             rest_response_data = send_https_rest_request('GET', new_url, '', each['ip_address'], each['restapi_port'], each['restapi_username'], each['restapi_password'])
-                        except Exception, e:
+                        except Exception as e:
                             raise ModelQueryException(CLICmdError(__('Get device<%s> SNMP v3_user failed. %s' % (each['name'], str(e)))))
                         else:
                             if rest_response_data['status'] == 200:
@@ -807,7 +806,7 @@
                                                         v3user += ' '+user['priv_password']
                                                     snmp_general['v3user'] = v3user
                                                 break
-                                except Exception, e:
+                                except Exception as e:
                                     raise ModelQueryException(CLICmdError(__('Set device<%s> snmp v3_user failed. %s' % (each['name'], str(e)))))
 
                         db = DB.get_connected_db()
@@ -838,7 +837,7 @@
                     else:
                         cli = 'write memory all'
                     response_data = send_cli_to_device(device_info, cli)
-                except Exception, e:
+                except Exception as e:
                     raise ModelQueryException(CLICmdError(__('Failed to save the configurations!')))
                 else:
                     if response_data['message'] == 'success':
@@ -998,7 +997,7 @@
                 else:
                     new_url = modify_url('/rest/device_type/system/SystemInfo/version', item[0]['type'])
                     rest_response_data = send_https_rest_request('GET', new_url, '', item[0]['ip'], item[0]['restapi_port'], item[0]['restapi_username'], item[0]['restapi_password'])
-            except Exception, e:
+            except Exception as e:
                 if 'timed out' in str(e):
                     update_device_connected(item[0]['id'])
                     mark_expire_all(get_model('cm', ['device_mgmt', 'device', 'Device']))
@@ -1173,7 +1172,7 @@
             data = {'cmd':'show session active', 'vsite_name':vsite_name}
             running_params = json.dumps(data)
             content = send_command_to_device(device_info, url, running_params)
-            if not content or content == 'failed' or type(content) == unicode:
+            if not content or content == 'failed' or type(content) == str:
                 raise ModelQueryException(CLICmdError(__('Get session from virtual site(%s) failed.' % vsite_name)))
             user_list = content[1]['list']
             for user in user_list:
@@ -1187,7 +1186,7 @@
                 try:
                     es = get_elk()
                     res = es._search(device_type=_type.upper(), doc_type="syslog", body=json.loads(body_text), _source=["time", "useragent", "aaa_method"])
-                except Exception, e:
+                except Exception as e:
                     raise ModelQueryException(CLICmdError(__('Connect elasticsearch failed. %s' % str(e))))
                 if not es:
                     raise ModelQueryException(CLICmdError(__("Please send log to AMP first.")))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device_group/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device_group/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/device_mgmt/device_group/__init__.py	(working copy)
@@ -6,9 +6,10 @@
 from cm.lib.communication import L
 from cm.lib.parse_configfile import DEFAULT_CONFIG_FILE_PATH, DEFAULT_VSITE_PATH
 from cm.lib.postgres_db import DB
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from djproject.an_settings import *
 from hive.imports.model import *
+from django.db.models.query import QuerySet
 
 __ = _
 
@@ -304,7 +305,7 @@
                                 each_device['license_date'] = "Expires on " + time.strftime("%b %d %G",
                                                                                             time.strptime(license_date,
                                                                                                           "%Y%m%d"))
-                            except Exception, e:
+                            except Exception as e:
                                 each_device['license_date'] = "Permanent"
                         each_device['group_name_from'] = ''
                         device_list.append(each_device)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/ha/ha_cluster/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/ha/ha_cluster/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/ha/ha_cluster/__init__.py	(working copy)
@@ -1,9 +1,11 @@
 from hive.imports.model import *
 from cm.lib.postgres_db import DB
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from cm.lib.communication import send_https_rest_request, modify_url
 from cm.models.device_mgmt.device import get_rest_info_from_device
 from djproject.an_settings import *
+from django.db.models.query import QuerySet
+import json
 from hive.utils import andebug, get_device_type, standard_model_type
 __=_
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/monitor/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/monitor/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/monitor/__init__.py	(working copy)
@@ -1,10 +1,11 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from apscheduler.schedulers.background import BackgroundScheduler
 from cm.models.tasking import GLOBAL_TASK
 from cm.lib.postgres_db import DB
 from cm.lib.task_scheduler import monitor_alert, get_global_settings
 import json, datetime, logging
+from django.db.models.query import QuerySet
 __=_
 
 logger = logging.getLogger('hive.debug')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/dns/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/dns/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/dns/__init__.py	(working copy)
@@ -34,4 +34,4 @@
             for each_pk in pk_list:
                 result = self.cli.cmd('no ip nameserver %s' % each_pk["server_ip"].values()[0],
                                   BlankParser(nonblank_exception=CLICmdError, supplement=True))
-            return  
\ No newline at end of file
+            return
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/interface/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/interface/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/interface/__init__.py	(working copy)
@@ -1,11 +1,8 @@
 from hive.imports.model import *
-from hive.model.manager import ANManager
-from django.utils.translation import ugettext_lazy as _
-from hive.session import ANSession, current_app
-from hive.router import get_current_session
-from django.shortcuts import redirect
+from django.utils.translation import gettext_lazy as _
 from hive.node.model import *
 from hive.utils import get_current_session, andebug
+from django.db.models.query import QuerySet
 __ = _
 
 class InterfaceIP(ANModel):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/route/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/route/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/network/route/__init__.py	(working copy)
@@ -1,11 +1,6 @@
 from hive.imports.model import *
-from hive.model.manager import ANManager
-from django.utils.translation import ugettext_lazy as _
-from hive.session import ANSession, current_app
-from hive.router import get_current_session
-from django.shortcuts import redirect
+from django.utils.translation import gettext_lazy as _
 from hive.node.model import *
-from hive.utils import get_current_session, andebug
 __ = _
 
 class DefaultRoutingSetting(ANModel):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py	(working copy)
@@ -1,8 +1,7 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.utils import andebug
-import cgi
-from hive.model.legacycli import CLIEnablePassError
+from django.db.models.query import QuerySet
 __ = _
 class AccessControl(ANModel):
     webui_settings = FieldGroup(verbose_name=_('WebUI Settings'), level=BASIC, editable=True, fields={
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/config_mgmt/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/config_mgmt/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/config_mgmt/__init__.py	(working copy)
@@ -1,5 +1,6 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
+from django.db.models.query import QuerySet
 
 class BackupConfig(ANModel):
     class BackupStartupConfig(Action):
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/host.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/host.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/host.py	(working copy)
@@ -1,7 +1,8 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from djproject.an_settings import CM_ConfigFile_PATH
 import os, cm.conf
+from django.db.models.query import QuerySet
 
 class HostSettings(ANModel):
     hostname = CharField(verbose_name=_('Host Name'), length='1..64')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py	(working copy)
@@ -1,26 +1,27 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.session import check_license_expire
 from cm.lib.postgres_db import DB
 from djproject.an_settings import *
+import datetime
+from django.db.models.query import QuerySet
+__=_
 
-__ = _
 
-
 def get_license():
     session = get_current_session()
     session.cli.set_enable()
     license_status = {
         "device_limit": 0,
-        "adc_limit": 0,
-        "vpn_limit": 0,
-        "waf_limit": 0
+        "adc_limit":    0,
+        "vpn_limit":    0,
+        "waf_limit":    0
     }
     result = session.cli.cmd('show version', [
-        RegexParser('Licensed Devices : (?P<device_limit>[0-9]*)', MATCHONE),
-        RegexParser('Licensed ADCs : (?P<adc_limit>[0-9]*)', MATCHONE),
-        RegexParser('Licensed VPNs : (?P<vpn_limit>[0-9]*)', MATCHONE),
-        RegexParser('Licensed WAFs : (?P<waf_limit>[0-9]*)', MATCHONE)])
+            RegexParser('Licensed Devices : (?P<device_limit>[0-9]*)', MATCHONE),
+            RegexParser('Licensed ADCs : (?P<adc_limit>[0-9]*)', MATCHONE),
+            RegexParser('Licensed VPNs : (?P<vpn_limit>[0-9]*)', MATCHONE),
+            RegexParser('Licensed WAFs : (?P<waf_limit>[0-9]*)', MATCHONE)])
     if result:
         for each in result:
             if "device_limit" in each and each["device_limit"]:
@@ -33,14 +34,12 @@
                 license_status["waf_limit"] = int(each["waf_limit"])
     return license_status
 
-
 def _check_license_expire():
     session = get_current_session()
     res = check_license_expire(session)
 
     return res
 
-
 def get_device_num(device_type):
     condition_list = []
     if device_type.lower() in ADC_TYPE_LIST:
@@ -66,9 +65,8 @@
         db.close()
         return result[0]
     else:
-        return 0
+         return 0
 
-
 def check_license(device_type):
     expire = _check_license_expire()
     if expire[0]:
@@ -77,7 +75,7 @@
     license_limit = get_license()
     if device_type and device_type in DEVICE_STD_LIST:
         device_num = get_device_num(device_type)
-        if device_type.lower() in ADC_TYPE_LIST:
+        if device_type.lower() in ADC_TYPE_LIST or device_type.lower() in WAF_TYPE_LIST:
             limit = license_limit["adc_limit"]
         elif device_type.lower() in VPN_TYPE_LIST:
             limit = license_limit["vpn_limit"]
@@ -88,11 +86,10 @@
         if limit > device_num:
             return True
         else:
-            raise ModelQueryException(CLICmdError(__("We've reached the current limit for %s licenses." % device_type)))
+            raise ModelQueryException(CLICmdError(__('Sorry you need more license.')))
     else:
         raise ModelQueryException(CLICmdError(__('Invalid device type.')))
 
-
 class License(ANModel):
     license_key = CharField(verbose_name='License Key', length='1..256', optional=True)
     serial_num = CharField(verbose_name='Serial Number')
@@ -112,31 +109,30 @@
         def _get_query_set(self):
             self.cli.set_enable()
             output = self.cli.cmd('show version',
-                                  [RegexParser('License Key : (?P<license_key>.*)', MATCHONE),
-                                   RegexParser('Serial Number : (?P<serial_num>.*)', MATCHONE),
-                                   RegexParser('Licensed Devices : (?P<device_num>[0-9]+)', MATCHONE),
-                                   RegexParser('Expiration Date : (?P<expiration_data>.*)', MATCHONE),
-                                   RegexParser('Licensed ADCs : (?P<adc_num>.*)', MATCHONE),
-                                   RegexParser('Licensed VPNs : (?P<vpn_num>.*)', MATCHONE),
-                                   RegexParser('Licensed WAFs : (?P<waf_num>.*)', MATCHONE),
-                                   RegexParser('Licensed VPN License Session : (?P<vpn_lic_sess>.*)', MATCHONE)])
+                        [RegexParser('License Key : (?P<license_key>.*)', MATCHONE),
+                        RegexParser('Serial Number : (?P<serial_num>.*)', MATCHONE),
+                        RegexParser('Licensed Devices : (?P<device_num>[0-9]+)', MATCHONE),
+                        RegexParser('Expiration Date : (?P<expiration_data>.*)', MATCHONE),
+                        RegexParser('Licensed ADCs : (?P<adc_num>.*)', MATCHONE),
+                        RegexParser('Licensed VPNs : (?P<vpn_num>.*)', MATCHONE),
+                        RegexParser('Licensed WAFs : (?P<waf_num>.*)', MATCHONE),
+                        RegexParser('Licensed VPN License Session : (?P<vpn_lic_sess>.*)', MATCHONE)])
             expire_time = ""
             if output[3]:
                 exp_str = output[3]['expiration_data'].split('on')[-1].strip()
-                expire_time = datetime.datetime.strptime(exp_str, '%b %d %Y').strftime(
-                    "%Y-%m-%d") if exp_str != "Permanent" else "Permanent"
+                expire_time = datetime.datetime.strptime(exp_str, '%b %d %Y').strftime("%Y-%m-%d") if exp_str != "Permanent" else "Permanent"
 
             data = {
-                'license_key': output[0]['license_key'] if output[0] else '',
-                'serial_num': output[1]['serial_num'],
-                'device_num': output[2]['device_num'] if output[2] else 0,
-                'adc_num': output[4]['adc_num'] if output[4] else 0,
-                'vpn_num': output[5]['vpn_num'] if output[5] else 0,
-                'waf_num': output[6]['waf_num'] if output[6] else 0,
+                'license_key':output[0]['license_key'] if output[0] else '',
+                'serial_num':output[1]['serial_num'],
+                'device_num':output[2]['device_num'] if output[2] else 0,
+                'adc_num':output[4]['adc_num'] if output[4] else 0,
+                'vpn_num':output[5]['vpn_num'] if output[5] else 0,
+                'waf_num':output[6]['waf_num'] if output[6] else 0,
                 'vpn_lic_sess': output[7]['vpn_lic_sess'] if output[7]['vpn_lic_sess'] != "No Limitation" else 99999999,
                 'expiration_data': expire_time,
-                'status': ''
-            }
+                'status':''
+                }
             if data['expiration_data']:
                 data['status'] = 'Normal'
                 if data['expiration_data'] != 'Permanent':
@@ -147,9 +143,8 @@
                         data['status'] = 'Expiration'
                     elif result.days < 30:
                         data['status'] = 'Warning'
-
+                
             return QuerySet(self._model, [data])
-
         def _update_license_key(self, instance):
             self.cli.set_config()
             output = self.cli.cmd('system license "%s"' % instance.license_key.strip('"'))
@@ -157,3 +152,9 @@
                 result = cli_parse(output, BlankParser(nonblank_exception=CLICmdError, supplement=True))
             return
 
+
+
+
+
+
+
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/ntp.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/ntp.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/ntp.py	(working copy)
@@ -1,6 +1,7 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.model.query import mark_expire_all
+from django.db.models.query import QuerySet
 
 class NTPSettings(ANModel):
     enable_ntp = BooleanField(verbose_name=_('Enable NTP'))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/system_mgmt/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/system_mgmt/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/system_mgmt/__init__.py	(working copy)
@@ -1,7 +1,8 @@
 from cm.router import _extension_log
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.imports.model import *
 from hive.utils import andebug, update_frontend_index_html
+from django.db.models.query import QuerySet
 
 __ = _
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/time.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/time.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/time.py	(working copy)
@@ -1,7 +1,9 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from datetime import datetime
+from django.db.models.query import QuerySet
 
+
 class TimeSettings(ANModel):
     system_time = DateTimeField(verbose_name=_('System Time'), cache_expire_time=10)
     system_timezone = TimezoneField(verbose_name=_('System Timezone'), cache_expire_time=10)
@@ -27,18 +29,21 @@
             l = output.strip().split()
             l = l[:4] + [l[-1]]
             date = datetime.strptime(' '.join(l), '%a %b %d %H:%M:%S %Y')
-            return date.isoformat() #'2014-03-28T06:59:52'
-        
+            return date.isoformat()  # '2014-03-28T06:59:52'
+
         def _update_system_time(self, instance):
-            time_str = instance.get_attr_raw("system_time")[:19] #'2014-03-28T06:59:52'
+            time_str = instance.get_attr_raw("system_time")[:19]  # '2014-03-28T06:59:52'
             date = datetime.strptime(time_str, '%Y-%m-%dT%H:%M:%S')
             self.cli.set_config()
-            result = self.cli.cmd('system date %s' % (date.strftime('%Y %m %d')),
-                                  BlankParser(nonblank_exception=CLICmdError, supplement=True))
-            result = self.cli.cmd('system time %s' % (date.strftime('%H %M %S')),
-                                  BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            self.cli.cmd('date --set="%s"' % (date.strftime('%Y-%m-%d %H:%M:%S')),
+                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            self.cli.cmd('hwclock --set --date="%s"' % (date.strftime('%Y-%m-%d %H:%M:%S')),
+                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            self.cli.cmd('systemctl restart crond',
+                         BlankParser(nonblank_exception=CLICmdError, supplement=True))
+
             return
-            
+
         def _get_system_timezone(self):
             self.cli.set_enable()
             result = self.cli.cmd('show system timezone',
@@ -47,9 +52,9 @@
 
         def _get_query_set(self):
             result = [{
-                       'system_time': self._get_system_time(),
-                       'system_timezone': self._get_system_timezone(),
-                     }]
+                'system_time': self._get_system_time(),
+                'system_timezone': self._get_system_timezone(),
+            }]
             return QuerySet(self._model, result)
 
         def _update_system_timezone(self, instance):
@@ -57,6 +62,7 @@
             result = self.cli.cmd('system timezone "%s"' % instance.get_attr_raw("system_timezone"),
                                   BlankParser(nonblank_exception=CLICmdError, supplement=True))
             return
+
         def _perform_Clear_timezone(self, options):
             self.cli.set_config()
             result = self.cli.cmd('clear system timezone')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/user_mgmt/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/user_mgmt/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/user_mgmt/__init__.py	(working copy)
@@ -2,9 +2,10 @@
 import json
 
 from cm.lib.postgres_db import DB
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from hive.imports.model import *
 from hive.model.query import clear_cache_all
+from django.db.models.query import QuerySet
 
 __ = _
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/tasking/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/tasking/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/tasking/__init__.py	(working copy)
@@ -1,5 +1,5 @@
 from hive.imports.model import *
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 #from cm.lib.sqlite_db import DB
 from cm.lib.postgres_db import DB
 from cm.lib.task_scheduler import TaskScheduler, update_job_runtime, upload_job, append_job_description, Scheduler_func_list, update_job_state
@@ -7,6 +7,8 @@
 from apscheduler.schedulers.background import BackgroundScheduler
 from cm.lib.parse_configfile import DEFAULT_CONFIG_FILE_PATH
 import shutil
+from django.db.models.query import QuerySet
+import os
 __=_
 GLOBAL_TASK = TaskScheduler()
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/virtualization/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/virtualization/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/virtualization/__init__.py	(working copy)
@@ -4,45 +4,52 @@
 from cm.lib.postgres_db import DB
 from cm.lib.communication import call_restapi
 import uuid, re, json, os, time
-__=_
+from django.db.models.query import QuerySet
 
+__ = _
+
+
 class Host(ANModel):
     default = FieldGroup(verbose_name=_('Base Settings'), level=BASIC, fields={
-        'id' : CharField(verbose_name='ID', primary_key=True, configurable=False, optional=True, editable=False, length='1..64'),
-        'name' : CharField(verbose_name='Host Name', editable=False, length='1..32'),
-        'ip' : IPAddressField(verbose_name='IP Address', editable=False),
-        'restapi_port' : PortField(verbose_name='RESTful API Port', default=9997, editable=False),
-        'restapi_account' : GroupField(verbose_name='RESTful API Account', editable=True, custom_display=lambda val: 'username: '+val['restapi_username'] + '<br>password: ********', fields={
-            'restapi_username' : CharField(verbose_name='Username', length='1..16'),
-            'restapi_password' : PasswordField(verbose_name='Password', length='1..32')
+        'id': CharField(verbose_name='ID', primary_key=True, configurable=False, optional=True, editable=False,
+                        length='1..64'),
+        'name': CharField(verbose_name='Host Name', editable=False, length='1..32'),
+        'ip': IPAddressField(verbose_name='IP Address', editable=False),
+        'restapi_port': PortField(verbose_name='RESTful API Port', default=9997, editable=False),
+        'restapi_account': GroupField(verbose_name='RESTful API Account', editable=True,
+                                      custom_display=lambda val: 'username: ' + val[
+                                          'restapi_username'] + '<br>password: ********', fields={
+                'restapi_username': CharField(verbose_name='Username', length='1..16'),
+                'restapi_password': PasswordField(verbose_name='Password', length='1..32')
             }),
         # 'console_account' : GroupField(verbose_name='Web Console Account', editable=True, custom_display=lambda val: 'username: '+val['console_username'] + '<br>password: ********', fields={
         #     'console_username' : CharField(verbose_name='Username', length='1..16'),
         #     'console_password' : PasswordField(verbose_name='Password', length='1..32')
         #     }, configurable=False, optional=True),
-        'connection' : CharField(verbose_name='Connection', editable=False, default='Unconnected', configurable=False, optional=True),
+        'connection': CharField(verbose_name='Connection', editable=False, default='Unconnected', configurable=False,
+                                optional=True),
         # 'webui_port' : PortField(verbose_name='Webui Port', default=8888, editable=True, configurable=False),
-        'vm_number' : IntegerField(verbose_name='VM Number', default=0, editable=False, configurable=False),
-        'cpu_usage' : FloatField(verbose_name="System CPU", default=0.0, editable=False, configurable=False),
-        'memory_usage' : FloatField(verbose_name="System Memory", default=0.0, editable=False, configurable=False),
-        'disk_usage' : FloatField(verbose_name="System Disk", default=0.0, editable=False, configurable=False)
+        'vm_number': IntegerField(verbose_name='VM Number', default=0, editable=False, configurable=False),
+        'cpu_usage': FloatField(verbose_name="System CPU", default=0.0, editable=False, configurable=False),
+        'memory_usage': FloatField(verbose_name="System Memory", default=0.0, editable=False, configurable=False),
+        'disk_usage': FloatField(verbose_name="System Disk", default=0.0, editable=False, configurable=False)
     })
     version = FieldGroup(writable=False, verbose_name=_('Version'), level=STATS, visible_edit=True, fields={
-        'host_name' : CharField(verbose_name="Host name"),
-        'system_cpu' : CharField(verbose_name="System CPU"),
-        'system_ram' : CharField(verbose_name="System RAM"),
-        'system_boot_time' : CharField(verbose_name="System boot time"),
-        'system_up_time' : CharField(verbose_name="System up time"),
-        'platform_bld_date' : CharField(verbose_name="Platform Bld Date"),
-        'ssl_hw' : CharField(verbose_name="SSL HW"),
-        'compression_hw' : CharField(verbose_name="Compression HW"),
-        'power_supply' : CharField(verbose_name="Power Supply"),
-        'network_interface' : CharField(verbose_name="Network Interface"),
-        'model' : CharField(verbose_name="Model"),
-        'serial_number' : CharField(verbose_name="Serial Number"),
-        'license_key' : CharField(verbose_name="License Featrues"),
-        'license_date' : CharField(verbose_name="License Date"),
-        'build_version' : CharField(verbose_name="Build Version"),
+        'host_name': CharField(verbose_name="Host name"),
+        'system_cpu': CharField(verbose_name="System CPU"),
+        'system_ram': CharField(verbose_name="System RAM"),
+        'system_boot_time': CharField(verbose_name="System boot time"),
+        'system_up_time': CharField(verbose_name="System up time"),
+        'platform_bld_date': CharField(verbose_name="Platform Bld Date"),
+        'ssl_hw': CharField(verbose_name="SSL HW"),
+        'compression_hw': CharField(verbose_name="Compression HW"),
+        'power_supply': CharField(verbose_name="Power Supply"),
+        'network_interface': CharField(verbose_name="Network Interface"),
+        'model': CharField(verbose_name="Model"),
+        'serial_number': CharField(verbose_name="Serial Number"),
+        'license_key': CharField(verbose_name="License Featrues"),
+        'license_date': CharField(verbose_name="License Date"),
+        'build_version': CharField(verbose_name="Build Version"),
     })
 
     class Meta:
\ No newline at end of file
@@ -65,13 +72,15 @@
             fetchall_sql = '''SELECT id, name, ip, restapi_port, restapi_username, restapi_password, connection, version, vm_number, cpu_usage, mem_usage, disk_usage FROM host'''
             data = db.fetchall(fetchall_sql)
             db.close()
-            key = ['id', 'name', 'ip', 'restapi_port', 'restapi_username', 'restapi_password', 'connection', 'version', 'vm_number', 'cpu_usage', 'memory_usage', 'disk_usage']
+            key = ['id', 'name', 'ip', 'restapi_port', 'restapi_username', 'restapi_password', 'connection', 'version',
+                   'vm_number', 'cpu_usage', 'memory_usage', 'disk_usage']
             result = [dict(zip(key, each)) for each in data]
             for each in result:
                 each['cpu_usage'] = float(each['cpu_usage'])
                 each['memory_usage'] = float(each['memory_usage'])
                 each['disk_usage'] = float(each['disk_usage'])
-                each['restapi_account'] = {'restapi_username': each['restapi_username'], 'restapi_password': each['restapi_password']}
+                each['restapi_account'] = {'restapi_username': each['restapi_username'],
+                                           'restapi_password': each['restapi_password']}
                 del each['restapi_username']
                 del each['restapi_password']
                 # each['console_account'] = {'console_username':each['console_username'], 'console_password':each['console_password']}
\ No newline at end of file
@@ -80,22 +89,22 @@
                 if each['version']:
                     replace_result = each['version'].replace('\\n', '\n')
                     rtn = cli_parse(replace_result, [
-                                 RegexParser('Host name : (.+?)\n', MATCHONE),
-                                 RegexParser('System CPU : (.+?)\n', MATCHONE),
-                                 RegexParser('System RAM : (.+?)\n', MATCHONE),
-                                 RegexParser('System boot time : (.+?)\n', MATCHONE),
-                                 RegexParser('System up time : (.+?)\n', MATCHONE),
-                                 RegexParser('Platform Bld Date : (.+?)\n', MATCHONE),
-                                 RegexParser('SSL HW : (.+?)\n', MATCHONE),
-                                 RegexParser('Compression HW : (.+?)\n', MATCHONE),
-                                 RegexParser('Power supply : (.+?)\n', MATCHONE),
-                                 RegexParser('Network Interface : (.+?)\n', MATCHONE),
-                                 RegexParser('Model : (.+?)\n', MATCHONE),
-                                 RegexParser('Serial Number : (.+?)\n', MATCHONE),
-                                 RegexParser('License Key : (.*?)\n', MATCHONE),
-                                 RegexParser('Expiration Date : (.*?)\n', MATCHONE),
-                                 RegexParser('(AVX.+?)\n', MATCHONE),
-                             ])
+                        RegexParser('Host name : (.+?)\n', MATCHONE),
+                        RegexParser('System CPU : (.+?)\n', MATCHONE),
+                        RegexParser('System RAM : (.+?)\n', MATCHONE),
+                        RegexParser('System boot time : (.+?)\n', MATCHONE),
+                        RegexParser('System up time : (.+?)\n', MATCHONE),
+                        RegexParser('Platform Bld Date : (.+?)\n', MATCHONE),
+                        RegexParser('SSL HW : (.+?)\n', MATCHONE),
+                        RegexParser('Compression HW : (.+?)\n', MATCHONE),
+                        RegexParser('Power supply : (.+?)\n', MATCHONE),
+                        RegexParser('Network Interface : (.+?)\n', MATCHONE),
+                        RegexParser('Model : (.+?)\n', MATCHONE),
+                        RegexParser('Serial Number : (.+?)\n', MATCHONE),
+                        RegexParser('License Key : (.*?)\n', MATCHONE),
+                        RegexParser('Expiration Date : (.*?)\n', MATCHONE),
+                        RegexParser('(AVX.+?)\n', MATCHONE),
+                    ])
                     each['host_name'] = rtn[0][0] if rtn[0] else ''
                     each['system_cpu'] = rtn[1][0] if rtn[1] else ''
                     each['system_ram'] = rtn[2][0] if rtn[2] else ''
\ No newline at end of file
@@ -113,7 +122,7 @@
                     each['build_version'] = rtn[14][0] if rtn[14] else ''
                 del each['version']
                 self._model._meta.mark_delay_query(each)
-            return QuerySet(self._model, result)  
+            return QuerySet(self._model, result)
 
         def _get_stats(self):
             return self._get_query_set()
\ No newline at end of file
@@ -124,6 +133,7 @@
             data['ip'] = data['ip'].values()[0]
             data['restapi_username'] = data['restapi_account']['restapi_username']
             data['restapi_password'] = data['restapi_account']['restapi_password']
+
             # data['console_username'] = data['console_account']['console_username']
             # data['console_password'] = data['console_account']['console_password']
             def check_ip_name_from_device(ip, name):
\ No newline at end of file
@@ -135,30 +145,35 @@
                     return True
                 else:
                     return False
+
             if check_ip_name_from_device(data['ip'], data['name']):
                 raise ModelQueryException(CLICmdError(__('Sorry IP or Name has exists.')))
             try:
-                rest_response_data = call_restapi('GET', '/rest/avx/system/SystemInfo/version', '', data['ip'], data['restapi_port'], data['restapi_username'], data['restapi_password'], 'https')
-            except Exception, e:
+                rest_response_data = call_restapi('GET', '/rest/avx/system/SystemInfo/version', '', data['ip'],
+                                                  data['restapi_port'], data['restapi_username'],
+                                                  data['restapi_password'], 'https')
+            except Exception as e:
                 if 'timed out' in str(e):
-                    raise ModelQueryException(CLICmdError(__('Timed out! Please check the ip address and make sure the RESTful API service configuration of target device is correct!')))
-                raise ModelQueryException(CLICmdError(__('Failed to add the AVX because cannot connect to the device.')))
+                    raise ModelQueryException(CLICmdError(
+                        __('Timed out! Please check the ip address and make sure the RESTful API service configuration of target device is correct!')))
+                raise ModelQueryException(
+                    CLICmdError(__('Failed to add the AVX because cannot connect to the device.')))
             else:
                 if rest_response_data['status'] == 200:
                     rest_body = json.loads(rest_response_data['body'])
                     data['version'] = rest_body['SystemInfo']['version']
                 elif rest_response_data['status'] == 401:
-                    raise ModelQueryException(CLICmdError(__('Add Failed! Please make sure the RESTful API username/password is correct!')))
+                    raise ModelQueryException(
+                        CLICmdError(__('Add Failed! Please make sure the RESTful API username/password is correct!')))
                 else:
                     raise ModelQueryException(CLICmdError(__('Add Failed!')))
 
             db = DB.get_connected_db()
-            save_sql = "INSERT INTO host(id, name, ip, restapi_port, restapi_username, restapi_password, connection, version) Values " + "('%(id)s', '%(name)s', '%(ip)s', '%(restapi_port)s', '%(restapi_username)s', '%(restapi_password)s', 'Connected', '%(version)s')"%data
+            save_sql = "INSERT INTO host(id, name, ip, restapi_port, restapi_username, restapi_password, connection, version) Values " + "('%(id)s', '%(name)s', '%(ip)s', '%(restapi_port)s', '%(restapi_username)s', '%(restapi_password)s', 'Connected', '%(version)s')" % data
             db.execute_sql(save_sql)
             db.close()
             return
 
-        
         # def _update_webui_port(self, instance):
         #     device_id = instance.id
         #     db = DB.get_connected_db()
\ No newline at end of file
@@ -170,23 +185,25 @@
         def _update_restapi_account(self, instance):
             device_id = instance.id
             db = DB.get_connected_db()
-            update_sql = "UPDATE host SET restapi_username='%s', restapi_password='%s' WHERE id='%s'" % (instance.restapi_account['restapi_username'], instance.restapi_account['restapi_password'], device_id)
+            update_sql = "UPDATE host SET restapi_username='%s', restapi_password='%s' WHERE id='%s'" % (
+            instance.restapi_account['restapi_username'], instance.restapi_account['restapi_password'], device_id)
             db.execute_sql(update_sql)
             db.close()
-            return     
+            return
 
-        # def _update_console_account(self, instance):
+            # def _update_console_account(self, instance):
+
         #     device_id = instance.id
         #     db = DB.get_connected_db()
         #     update_sql = "UPDATE host SET console_username='%s', console_password='%s' WHERE id='%s'" % (instance.console_account['console_username'], instance.console_account['console_password'], device_id)
         #     db.execute_sql(update_sql)
         #     db.close()
-        #     return            
-        
+        #     return
+
         def _delete(self, pk_list):
             db = DB.get_connected_db()
             for each_pk in pk_list:
-                delete_sql = "DELETE FROM host WHERE id = " + "'%s'"%each_pk['id']
+                delete_sql = "DELETE FROM host WHERE id = " + "'%s'" % each_pk['id']
                 db.execute_sql(delete_sql)
             db.close()
             return
\ No newline at end of file
@@ -194,27 +211,31 @@
         def _perform_RefreshVersion(self, options):
             device_id = options['__pk_list'][0]['id']
             db = DB.get_connected_db()
-            fetchall_sql = "SELECT ip, restapi_port, restapi_username, restapi_password FROM host WHERE id = '%s'"%device_id
+            fetchall_sql = "SELECT ip, restapi_port, restapi_username, restapi_password FROM host WHERE id = '%s'" % device_id
             result = db.fetchall(fetchall_sql)[0]
             db.close()
             key = ['ip', 'restapi_port', 'restapi_username', 'restapi_password']
             data = dict(zip(key, result))
             try:
-                rest_response_data = call_restapi('GET', '/rest/avx/system/SystemInfo/version', '', data['ip'], data['restapi_port'], data['restapi_username'], data['restapi_password'], 'https')
-            except Exception, e:
+                rest_response_data = call_restapi('GET', '/rest/avx/system/SystemInfo/version', '', data['ip'],
+                                                  data['restapi_port'], data['restapi_username'],
+                                                  data['restapi_password'], 'https')
+            except Exception as e:
                 if 'timed out' in str(e):
-                    raise ModelQueryException(CLICmdError(__('Timed out! Please check the ip address and make sure the RESTful API service configuration of target device is correct!')))
-                raise ModelQueryException(CLICmdError(__('Add Failed. Reason: %s')%str(e)))
+                    raise ModelQueryException(CLICmdError(
+                        __('Timed out! Please check the ip address and make sure the RESTful API service configuration of target device is correct!')))
+                raise ModelQueryException(CLICmdError(__('Add Failed. Reason: %s') % str(e)))
             else:
                 if rest_response_data['status'] == 200:
                     rest_body = json.loads(rest_response_data['body'])
                     version = rest_body['SystemInfo']['version']
                 elif rest_response_data['status'] == 401:
-                    raise ModelQueryException(CLICmdError(__('GET Failed! Please make sure the RESTful API username/password is correct!')))
+                    raise ModelQueryException(
+                        CLICmdError(__('GET Failed! Please make sure the RESTful API username/password is correct!')))
                 else:
                     raise ModelQueryException(CLICmdError(__('GET Failed!')))
             db = DB.get_connected_db()
-            save_sql = "UPDATE host SET version = '%s' WHERE id = '%s'"%(version, device_id)
+            save_sql = "UPDATE host SET version = '%s' WHERE id = '%s'" % (version, device_id)
             db.execute_sql(save_sql)
             db.close()
             return
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/report/composer.db
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/report/reporting/module/session.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/report/reporting/module/session.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/report/reporting/module/session.py	(working copy)
@@ -1,9 +1,9 @@
 # import requests
 import socket
 import json
-import commands
-import ConfigParser
-import httplib
+import subprocess
+import configparser
+import http.client
 import time
 import hashlib
 import os
@@ -30,7 +30,7 @@
     global DEVICE_NAME
     global Company_NAME
 
-    config = ConfigParser.ConfigParser()
+    config = configparser.ConfigParser()
     config.readfp(open(homePath + '/ui/conf/app.ini'))
     COMPOSER_KEY = config.get("default", "api.key")
     COMPOSER_SECRET = config.get("default", "api.secret")
@@ -79,14 +79,14 @@
     httpClient = None
 
     try:
-        httpClient = httplib.HTTPConnection('localhost',
+        httpClient = http.client.HTTPConnection('localhost',
                                             str(COMPOSER_RESTAPI_PORT),
                                             True,
                                             timeout=30)
         httpClient.request(methdod, url, data, headers)
         response = httpClient.getresponse()
         resp = response.read()
-    except Exception, e:
+    except Exception as e:
         raise e
     finally:
         if httpClient:
@@ -128,7 +128,9 @@
     cmd = escapeshellarg(cmd)
     cmd = '/ca/bin/backend -u ' + 'array' + ' -c ' + cmd
     cmd = cmd.encode('utf-8') + f_eop
-    (status, output) = commands.getstatusoutput(cmd)
+    result = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+    status = result.returncode
+    output = result.stdout.decode('utf-8')
     if status != 0:
         return ''
     else:
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/router.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/router.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/router.py	(working copy)
@@ -4,28 +4,18 @@
 from django.shortcuts import redirect
 import json
 import base64
-import csv
-import types
-import collections
-from hive.model.manager import ANManager
 from djproject.an_settings import *
 from cm.lib.communication import send_https_rest_request, modify_url
 import time, datetime
 import re
-import shutil
-import stat
-from django.http import Http404
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from django.template import RequestContext
 from cm.lib.postgres_db import DB
-import uuid, urllib
-import copy
 from hive.model.loading import get_model
 from hive.model.query import mark_expire_all
 from django.views.decorators.csrf import csrf_exempt
 from hive.session import temp_session, current_app, check_license_expire
-import requests
-import commands
+import subprocess
 from hive.model.legacycli import cli_parse, RegexParser, MATCHALL, MATCHONE, EasyParser
 from cm.lib.libbasic_operation import get_rest_info_from_device, send_command_to_device, oper_log, send_cli_to_device
 from cm.models.tasking import GLOBAL_TASK
@@ -247,8 +237,8 @@
 def get_available_extension(request):
     available_ext_list = []
 
-    commands.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
-    check_status, check_output = commands.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
+    subprocess.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
+    check_status, check_output = subprocess.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
     if check_status == 256:
         if check_output.find("Timeout")!= -1:
             return HttpResponse(json.dumps({"state": False, "data": "Failed to connect the yum repository because connect to the repository timeout."}), content_type='application/json')
@@ -261,7 +251,7 @@
         else:
             return HttpResponse(json.dumps({"state": False, "data": "Failed to connect the yum repository."}), content_type='application/json')
 
-    a_status, a_output = commands.getstatusoutput("yum --disablerepo=* --enablerepo=array list available")
+    a_status, a_output = subprocess.getstatusoutput("yum --disablerepo=* --enablerepo=array list available")
     a_parser = RegexParser('(?P<name>\S+)\s+(?P<version>\S+)\s+(?P<repo>\S+)', MATCHALL, reflags=re.S)
     if a_output.find("Available Packages")!= -1:
         available_ext = a_output.split("Available Packages")[1]
@@ -277,7 +267,7 @@
         ext_name = each["name"].split(".")[0]
         if ext_name == "amp":
             continue
-        status, output = commands.getstatusoutput("rpm -aq %s" % ext_name)
+        status, output = subprocess.getstatusoutput("rpm -aq %s" % ext_name)
         if not output:
             available_ext_list.append(ext_name)
 
@@ -285,7 +275,7 @@
     if available_ext_list:
         res = []
         for each_pack in available_ext_list:
-            status, output = commands.getstatusoutput('yum info --disablerepo="*" --enablerepo="array" %s' % each_pack)
+            status, output = subprocess.getstatusoutput('yum info --disablerepo="*" --enablerepo="array" %s' % each_pack)
             if status:
                 return HttpResponse(json.dumps({"state": False, "data": "Failed to execute the command."}), content_type='application/json')
             else:
@@ -310,7 +300,7 @@
 
 def check_extension_obsoleted(ext_name):
     obsoleted_ext_name = "array_" + ext_name
-    s, o = commands.getstatusoutput("rpm -aq | grep %s" % obsoleted_ext_name)
+    s, o = subprocess.getstatusoutput("rpm -aq | grep %s" % obsoleted_ext_name)
     if o and obsoleted_ext_name in o:
         return 1
     return 0
@@ -326,7 +316,7 @@
         oper_log('error', 'extensions', 'Failed to install the extension %s. %s.' % (name, dep[1]))
         return HttpResponse(json.dumps({"state": False, "data": dep[1]}), content_type='application/json')
 
-    status, output = commands.getstatusoutput("/bin/sh %sext_opr.sh install %s" % (webui_path, name))
+    status, output = subprocess.getstatusoutput("/bin/sh %sext_opr.sh install %s" % (webui_path, name))
     if status:
         _extension_log(name, "install", "failed")
         oper_log('error', 'extensions', 'Failed to install the extension %s.' % name)
@@ -336,7 +326,7 @@
         return HttpResponse(json.dumps({"state": True, "data": ""}), content_type='application/json')
 
 def remove_extension(request, name):
-    status, output = commands.getstatusoutput("/bin/sh %sext_opr.sh remove %s" % (webui_path, name))
+    status, output = subprocess.getstatusoutput("/bin/sh %sext_opr.sh remove %s" % (webui_path, name))
     if status:
         _extension_log(name, "remove", "failed")
         oper_log('error', 'extensions', 'Failed to remove the extension %s.' % name)
@@ -347,7 +337,7 @@
         return HttpResponse(json.dumps({"state": True, "data": ""}), content_type='application/json')
 
 def check_extension_dep(ext_name):
-    status, output = commands.getstatusoutput("yum deplist %s" % ext_name)
+    status, output = subprocess.getstatusoutput("yum deplist %s" % ext_name)
     if status:
         return [False, "Failed to check the extension dependency."]
     else:
@@ -367,7 +357,7 @@
         oper_log('error', 'extensions', 'Failed to update the extension %s. %s.' % (name, dep[1]))
         return HttpResponse(json.dumps({"state": False, "data": dep[1]}), content_type='application/json')
 
-    status, output = commands.getstatusoutput("/bin/sh %sext_opr.sh update %s" % (webui_path, name))
+    status, output = subprocess.getstatusoutput("/bin/sh %sext_opr.sh update %s" % (webui_path, name))
     if status:
         _extension_log(name, "update", "failed")
         oper_log('error', 'extensions', 'Failed to update the extension %s.' % name)
@@ -385,8 +375,8 @@
     if "get_sidebar" in request.GET:
         get_sidebar = request.GET["get_sidebar"]
     if not get_sidebar:
-        commands.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
-        check_status, check_output = commands.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
+        subprocess.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
+        check_status, check_output = subprocess.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
         session = get_current_session()
         session.cli.set_enable()
         system_version = session.cli.cmd("show version", RegexParser('AMP\s+(?P<version>[^\.]+\.AMP(\.[0-9]+)+)'))["version"]
@@ -444,7 +434,7 @@
                         json_obj = json.loads(f.read())
                         ext_name = json_obj['name']
                     extension_list.append(ext_name)
-                    status, output = commands.getstatusoutput("rpm -qi %s" % ext_name)
+                    status, output = subprocess.getstatusoutput("rpm -qi %s" % ext_name)
                     if status:
                         continue
                     else:
@@ -469,7 +459,7 @@
     # query all extension available packages for checking updatable at the same time.
     if not get_sidebar and extension_list and check_status!= 256 and "Timeout" not in check_output:
         extension_s = (" ").join(extension_list)
-        status, output = commands.getstatusoutput('yum info --disablerepo="*" --enablerepo="array" %s' % extension_s)
+        status, output = subprocess.getstatusoutput('yum info --disablerepo="*" --enablerepo="array" %s' % extension_s)
 
         if "Available Packages" in output:
             available_output = output.split("Available Packages")[1]
@@ -701,8 +691,8 @@
 def get_update_version(request):
     available_ext_list = []
 
-    commands.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
-    check_status, check_output = commands.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
+    subprocess.getstatusoutput("yum --disablerepo=* --enablerepo=array clean metadata")
+    check_status, check_output = subprocess.getstatusoutput("yum check-update --disablerepo=* --enablerepo=array")
     if check_status == 256:
         if check_output.find("Timeout")!= -1:
             return HttpResponse(json.dumps({"state": False, "data": "Failed to connect the yum repository because connect to the repository timeout."}), content_type='application/json')
@@ -715,7 +705,7 @@
         else:
             return HttpResponse(json.dumps({"state": False, "data": "Failed to connect the yum repository."}), content_type='application/json')
 
-    status, output = commands.getstatusoutput("yum --disablerepo=* --enablerepo=array info amp")
+    status, output = subprocess.getstatusoutput("yum --disablerepo=* --enablerepo=array info amp")
 
     if status:
         return HttpResponse(json.dumps({"state": False, "data": "Failed to check the amp version."}), content_type='application/json')
@@ -739,7 +729,7 @@
         return HttpResponse(json.dumps({"state": True, "data": []}), content_type='application/json')
 
 def update_version_by_repo(requset):
-    status, output = commands.getstatusoutput("yum update amp -y")
+    status, output = subprocess.getstatusoutput("yum update amp -y")
     if status:
         oper_log('error', 'system', 'Faile to update version from repository.')
         return HttpResponse(json.dumps({"state": False, "data": "Failed to execute the command."}), content_type='application/json')
@@ -1324,7 +1314,7 @@
                 try:
                     new_url = modify_url('/rest/device_type/ha/units/HAGenetalSettings', each['type'])
                     response_data = send_https_rest_request('GET', new_url, '', each['ip'], each['port'], each['username'], each['password'])
-                except Exception, e:
+                except Exception as e:
                     errMsg = 'Get device<%s> ha genetal settings failed. %s\n' % (each['ip'], str(e))
                     resp["error_msg"] = resp["error_msg"] + errMsg
                     logger.error(errMsg)
@@ -1352,7 +1342,7 @@
                 resp["device_ha"] = ha_settings
             else:
                 resp["error_msg"] = 'Failed to get device ha settings.'
-        except Exception, e:
+        except Exception as e:
             resp["error_msg"] = 'Get device ha genetal settings failed. %s\n' % str(e)
 
 
@@ -1381,7 +1371,7 @@
                 err_msg = "Failed to get the device<%s> ha units cause 404." % device_info['ip_address']
         else:
             err_msg = "Failed to get the device<%s> ha units." % device_info['ip_address']
-    except Exception, e:
+    except Exception as e:
         err_msg = 'Failed to get the device<%s> ha units. %s' % (device_info['ip_address'], str(e))
 
     return HttpResponse(json.dumps({"state": state, "data": res, "msg": err_msg}), content_type='application/json')
@@ -1409,7 +1399,7 @@
                 err_msg = "Failed to get the device<%s> ha groups cause 404." % device_info['ip_address']
         else:
             err_msg = "Failed to get the device<%s> ha groups." % device_info['ip_address']
-    except Exception, e:
+    except Exception as e:
         err_msg = 'Failed to get the device<%s> ha groups. %s' % (device_info['ip_address'], str(e))
 
     return HttpResponse(json.dumps({"state": state, "data": res, "msg": err_msg}), content_type='application/json')
@@ -1435,7 +1425,7 @@
                 err_msg = contents
             else:
                 state = True
-    except Exception, e:
+    except Exception as e:
         err_msg = 'Failed to switch device<%s> group. %s' % (device_info['ip_address'], str(e))
 
     return HttpResponse(json.dumps({"state": state, "msg": err_msg}), content_type='application/json')
@@ -1514,7 +1504,7 @@
     #get config file from device
     try:
         local_ip = get_ip_address(network_card)
-    except Exception, e:
+    except Exception as e:
         description = 'Local network settings are abnormal. Please configuare management interface by CLI "system management intertface <port_name>".'
         return HttpResponse(json.dumps({"state": False, "data": description}))
     device_info = get_rest_info_from_device(device_name)[0]
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/tree.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/tree.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/tree.py	(working copy)
@@ -8,8 +8,7 @@
 """
 
 from hive.imports.node_tree import *
-from django.utils.translation import ugettext_lazy as _
-from django.utils.datastructures import SortedDict as D
+from collections import OrderedDict as D
 from views import *
 
 tree = D([
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/urls.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/urls.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/urls.py	(working copy)
@@ -1,58 +1,58 @@
-from django.conf.urls import patterns, include, url
+from django.urls import re_path
 from cm.router import *
-app_urlpatterns = patterns('',
-    url(r'^cm/configuration/device/get_schedule_backup_all$', fetch_schedule_backup_all),
-    url(r'^cm/configuration/device/clear_schedule_backup_all$', clear_schedule_backup_all),
-    url(r'^cm/configuration/configuration_file/(?P<params>.*)$', get_configuration),
-    url(r'^cm/va_mgmt/vnc_host_info$', vnc_host_info),
-    url(r'^cm/get_device_type', get_product_device_type),
-    url(r'^cm/volume_license/device_version$', device_version),
-    url(r'^cm/volume_license/get_enable_mode$', get_enable_mode),
-    url(r'^cm/volume_license/set_enable_mode$', set_enable_mode),
-    url(r'^cm/volume_license/get_device_change_log$', get_device_change_log),
-    url(r'^cm/volume_license/clear_device_change_log$', clear_device_change_log),
-    url(r'^cm/device_change_result$', device_change_result),
-    url(r'^get_available_extension$', get_available_extension),
-    url(r'^install_extension/(?P<name>.*)$', install_extension),
-    url(r'^remove_extension/(?P<name>.*)$', remove_extension),
-    url(r'^update_extension/(?P<name>.*)$', update_extension),
-    url(r'^get_extensions$', get_extensions),
-    url(r'^enable_extension/(?P<name>.*)$', enable_extension),
-    url(r'^disable_extension/(?P<name>.*)$', disable_extension),
-    url(r'^cm/get_extension_log$', get_extension_log),
-    url(r'^cm/get_operation_log$', get_operation_log),
-    url(r'^cm/get_task_pagination$', get_task_pagination),
-    url(r'^cm/get_task_by_name$', get_task_by_name),
-    url(r'^cm/get_task_and_log$', get_task_and_log),
-    url(r'^cm/clear_operation_log$', clear_operation_log),
-    url(r'^cm/del_operation_log$', del_operation_log),
-    url(r'^cm/get_user_info$', get_user_info),
-    url(r'^cm/get_user_auth$', get_user_auth),
-    url(r'^cm/get_system_version$', get_system_version),
-    url(r'^cm/get_host_name$', get_host_name),
-    url(r'^cm/get_adc_ssl_cert$', get_adc_ssl_cert),
-    url(r'^cm/get_vpn_ssl_cert$', get_vpn_ssl_cert),
-    url(r'^cm/check_adc_ssl_cert$', check_adc_ssl_cert),
-    url(r'^cm/check_build_info$', check_build_info),
-    url(r'^cm/system/get_update_version$', get_update_version),
-    url(r'^cm/system/update_version_by_repo$', update_version_by_repo),
-    url(r'^cm/get_debug_logs$', get_debug_logs),
-    url(r'^cm/get_log_basic$', get_log_basic),
-    url(r'^cm/update_log_basic$', update_log_basic),
-    url(r'^cm/get_log_host$', get_log_host),
-    url(r'^cm/add_log_host$', add_log_host),
-    url(r'^cm/delete_log_host$', delete_log_host),
-    url(r'^cm/get_license_expire$', get_license_expire),
-    url(r'^mainshow$', large_screen),
-    url(r'^cm/get_config_template_key$', get_config_template_key),
-    url(r'^cm/add_config_template_key$', add_config_template_key),
-    url(r'^cm/delete_config_template_key$', delete_config_template_key),
-    url(r'^cm/edit_config_template_key$', edit_config_template_key),
-    url(r'^cm/query_all_tmpkeyval$', query_all_tmpkeyval),
-    url(r'^cm/edit_config_template_default_value$', edit_config_template_default_value),
-    url(r'^cm/get_device_ha_list$', get_device_ha_list),
-    url(r'^cm/get_device_ha_units$', get_device_ha_units),
-    url(r'^cm/get_device_ha_groups$', get_device_ha_groups),
-    url(r'^cm/swith_ha_group$', swith_ha_group),
-    url(r'^cm/import_license_key$', import_license_key),
-)
+app_urlpatterns = ['',
+    re_path(r'^cm/configuration/device/get_schedule_backup_all$', fetch_schedule_backup_all),
+    re_path(r'^cm/configuration/device/clear_schedule_backup_all$', clear_schedule_backup_all),
+    re_path(r'^cm/configuration/configuration_file/(?P<params>.*)$', get_configuration),
+    re_path(r'^cm/va_mgmt/vnc_host_info$', vnc_host_info),
+    re_path(r'^cm/get_device_type', get_product_device_type),
+    re_path(r'^cm/volume_license/device_version$', device_version),
+    re_path(r'^cm/volume_license/get_enable_mode$', get_enable_mode),
+    re_path(r'^cm/volume_license/set_enable_mode$', set_enable_mode),
+    re_path(r'^cm/volume_license/get_device_change_log$', get_device_change_log),
+    re_path(r'^cm/volume_license/clear_device_change_log$', clear_device_change_log),
+    re_path(r'^cm/device_change_result$', device_change_result),
+    re_path(r'^get_available_extension$', get_available_extension),
+    re_path(r'^install_extension/(?P<name>.*)$', install_extension),
+    re_path(r'^remove_extension/(?P<name>.*)$', remove_extension),
+    re_path(r'^update_extension/(?P<name>.*)$', update_extension),
+    re_path(r'^get_extensions$', get_extensions),
+    re_path(r'^enable_extension/(?P<name>.*)$', enable_extension),
+    re_path(r'^disable_extension/(?P<name>.*)$', disable_extension),
+    re_path(r'^cm/get_extension_log$', get_extension_log),
+    re_path(r'^cm/get_operation_log$', get_operation_log),
+    re_path(r'^cm/get_task_pagination$', get_task_pagination),
+    re_path(r'^cm/get_task_by_name$', get_task_by_name),
+    re_path(r'^cm/get_task_and_log$', get_task_and_log),
+    re_path(r'^cm/clear_operation_log$', clear_operation_log),
+    re_path(r'^cm/del_operation_log$', del_operation_log),
+    re_path(r'^cm/get_user_info$', get_user_info),
+    re_path(r'^cm/get_user_auth$', get_user_auth),
+    re_path(r'^cm/get_system_version$', get_system_version),
+    re_path(r'^cm/get_host_name$', get_host_name),
+    re_path(r'^cm/get_adc_ssl_cert$', get_adc_ssl_cert),
+    re_path(r'^cm/get_vpn_ssl_cert$', get_vpn_ssl_cert),
+    re_path(r'^cm/check_adc_ssl_cert$', check_adc_ssl_cert),
+    re_path(r'^cm/check_build_info$', check_build_info),
+    re_path(r'^cm/system/get_update_version$', get_update_version),
+    re_path(r'^cm/system/update_version_by_repo$', update_version_by_repo),
+    re_path(r'^cm/get_debug_logs$', get_debug_logs),
+    re_path(r'^cm/get_log_basic$', get_log_basic),
+    re_path(r'^cm/update_log_basic$', update_log_basic),
+    re_path(r'^cm/get_log_host$', get_log_host),
+    re_path(r'^cm/add_log_host$', add_log_host),
+    re_path(r'^cm/delete_log_host$', delete_log_host),
+    re_path(r'^cm/get_license_expire$', get_license_expire),
+    re_path(r'^mainshow$', large_screen),
+    re_path(r'^cm/get_config_template_key$', get_config_template_key),
+    re_path(r'^cm/add_config_template_key$', add_config_template_key),
+    re_path(r'^cm/delete_config_template_key$', delete_config_template_key),
+    re_path(r'^cm/edit_config_template_key$', edit_config_template_key),
+    re_path(r'^cm/query_all_tmpkeyval$', query_all_tmpkeyval),
+    re_path(r'^cm/edit_config_template_default_value$', edit_config_template_default_value),
+    re_path(r'^cm/get_device_ha_list$', get_device_ha_list),
+    re_path(r'^cm/get_device_ha_units$', get_device_ha_units),
+    re_path(r'^cm/get_device_ha_groups$', get_device_ha_groups),
+    re_path(r'^cm/swith_ha_group$', swith_ha_group),
+    re_path(r'^cm/import_license_key$', import_license_key),
+]
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/views.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/views.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/views.py	(working copy)
@@ -1,6 +1,4 @@
 # Create your views here.
-from django.http import HttpResponse
-from hive.session import ANSession
 from hive.node import BaseNode
 from cm.lib.console import WebConsoleRequestHandler
 from hive.utils import get_current_session, andebug
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/an_settings.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/an_settings.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/an_settings.py	(working copy)
@@ -1,4 +1,4 @@
-import json, os, ConfigParser
+import json, os, configparser
 import lib.toml as toml
 
 AN_APPS = (
@@ -92,7 +92,7 @@
 
 if os.path.exists('/var/opt/composer/ui/conf/composer_ui.toml'):
     config = toml.load("/var/opt/composer/ui/conf/composer_ui.toml")
-    # config = ConfigParser.ConfigParser()
+    # config = configparser.configparser()
     # config.readfp(open('/var/opt/composer/ui/conf/app.ini'))
     CMDATA['COMPOSER_KEY'] = config['app']['apiKey']
     CMDATA['COMPOSER_SECRET'] = config['app']['apiSecret']
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/urls.py	(working copy)
@@ -1,11 +1,11 @@
-from django.conf.urls import patterns, include, url
+from django.urls import re_path
 from hive.router import *
 from hive.session import login_handler, logout_handler, register_complete, app_login_handler, app_logout_handler
 from hive.theme import switch_theme
 from hive.lang import switch_lang
 from hive.notification import poll_notification
 from tests.models.testpage import TestHander, TestIndex
-from django.views.i18n import javascript_catalog
+from django.views.i18n import JavaScriptCatalog
 from hive.utils import hive_webpipe_handler, hive_webpipe_write_handler
 from hive.node import reload_app_node
 from hive.session import current_app
@@ -21,84 +21,82 @@
     #'packages': ('your.app.package',),
 }
 
-urlpatterns = patterns(
-    '',
-    url(r'^ReloadAppNode/(?P<app_name>.*)$', reload_app_node),
-    url(r'^localfile/(?P<app>\w+)/(?P<filename>.*)$',
+urlpatterns = [
+    re_path(r'^ReloadAppNode/(?P<app_name>.*)$', reload_app_node),
+    re_path(r'^localfile/(?P<app>\w+)/(?P<filename>.*)$',
         localfile_downloading_handler),
-    url(r'^pipe/get/(?P<id>.*)$', hive_webpipe_handler),
-    url(r'^configImport/(?P<model_path>.*)$', configImport),
-    url(r'^configExport/(?P<model_path>.*)$', configExport),
-    url(r'^pipe/post/(?P<id>.*)$', hive_webpipe_write_handler),
-    url(r'^webui_on$', webuiOn),
-    url(r'^webui_off$', webuiOff),
-    url(r'^restapi_on/(?P<port>[0-9]+)$', restfulapiOn),
-    url(r'^restapi_off$', restfulapiOff),
-    url(r'^TestPage/(?P<path>.*)$', TestIndex),
-    url(r'^jsi18n/$', javascript_catalog, js_info_dict),
-    url(r'^api/tests/(?P<app>\w+)/(?P<path>.*)$', TestHander),
-    url(r'^api/(?P<app>\w+)/(?P<path>.*)$', hive_ajax_router),
-    url(r'^rest/ping_hosts$', ping_hosts),
-    url(r'^rest/(?P<path>.*)$', hive_rest_router),
-    url(r'^eng/(?P<action>\w+)/(?P<path>.*)$', hive_eng_mode_router),
-    url(r'^is_eng_mode$', is_eng_mode),
-    url(r'^save/(?P<app>\w+)$', hive_storage_router),
-    url(r'^pref/get/(?P<key>.*)$', hive_pref_get),
-    url(r'^pref/set/(?P<key>.*)$', hive_pref_set),  # value as parameter "v="
-    url(r'^proxy_req/(?P<url>.*)$', hive_proxy_router),
-    url(r'^storage/(?P<key>.*)$', storage_mangement),
-    url(r'^proxy_req_dev/(?P<url>.*)$', hive_proxy_router_tm)
-)
+    re_path(r'^pipe/get/(?P<id>.*)$', hive_webpipe_handler),
+    re_path(r'^configImport/(?P<model_path>.*)$', configImport),
+    re_path(r'^configExport/(?P<model_path>.*)$', configExport),
+    re_path(r'^pipe/post/(?P<id>.*)$', hive_webpipe_write_handler),
+    re_path(r'^webui_on$', webuiOn),
+    re_path(r'^webui_off$', webuiOff),
+    re_path(r'^restapi_on/(?P<port>[0-9]+)$', restfulapiOn),
+    re_path(r'^restapi_off$', restfulapiOff),
+    re_path(r'^TestPage/(?P<path>.*)$', TestIndex),
+    re_path(r'^jsi18n/$', JavaScriptCatalog.as_view(), js_info_dict),
+    re_path(r'^api/tests/(?P<app>\w+)/(?P<path>.*)$', TestHander),
+    re_path(r'^api/(?P<app>\w+)/(?P<path>.*)$', hive_ajax_router),
+    re_path(r'^rest/ping_hosts$', ping_hosts),
+    re_path(r'^rest/(?P<path>.*)$', hive_rest_router),
+    re_path(r'^eng/(?P<action>\w+)/(?P<path>.*)$', hive_eng_mode_router),
+    re_path(r'^is_eng_mode$', is_eng_mode),
+    re_path(r'^save/(?P<app>\w+)$', hive_storage_router),
+    re_path(r'^pref/get/(?P<key>.*)$', hive_pref_get),
+    re_path(r'^pref/set/(?P<key>.*)$', hive_pref_set),  # value as parameter "v="
+    re_path(r'^proxy_req/(?P<url>.*)$', hive_proxy_router),
+    re_path(r'^storage/(?P<key>.*)$', storage_mangement),
+    re_path(r'^proxy_req_dev/(?P<url>.*)$', hive_proxy_router_tm)
+]
 
 try:
-    exec "from %s.urls import app_urlpatterns" % current_app()
+    exec("from %s.urls import app_urlpatterns" % current_app())
     urlpatterns += app_urlpatterns
 except Exception as e:
     pass
 
-urlpatterns += patterns(
-    '',
-    url(r'^composer/(?P<path>.*)', composer_proxy),
-    url(r'^composer_config/(?P<app>\w+)', composer_config),
-    url(r'^composer_status/(?P<app>\w+)', composer_status),
-    url(r'^composer_query$', composer_query),
-    url(r'^llb/(?P<path>.*)$', handle_llb_stats_req),
-     url(r'^report/(?P<path>.*)$', handle_report_generation),
-    url(r'^log/(?P<app>\w+)$', handle_log_location_app),
-    url(r'^backup/(?P<path>.*)$', handle_backup_req),
-    url(r'^restore/(?P<path>.*)$', handle_restore_req),
-    url(r'^real_service$', real_service),
-    url(r'^rs_block$', rs_block),
-    url(r'^rs_block_import$', rs_block_import),
-    # url(r'^log_origin$', log_origin),
-    url(r'^kibana4/(?P<path>.*)$', KibanaProxyView.as_view()),
-    # url(r'^kibana4/(?P<path>.*)', kibana_proxy),
-    url(r'^elastic/(?P<path>.*)', elastic_proxy),
-    url(r'^reporting/(?P<app>\w+)/(?P<filename>.*)$', reporting_downloading_handler),
-    url(r'^reporting_logo$', reporting_logo_handler),
-    url(r'^cm/save_setting$', save_setting),
-    url(r'^cm/upload_setting$', upload_setting),
-    url(r'^cm/get_ha_status$', get_ha_status),
-    url(r'^cm/get_ha_setting$', get_ha_setting),
-    url(r'^cm/get_ha_log$', get_ha_log),
-    url(r'^cm/update_ha_setting$', update_ha_setting),
-    url(r'^cm/delete_ha_setting$', delete_ha_setting),
-    url(r'^(?P<app>\w+)/(?P<path>.*)$', hive_router),
-    url(r'^login$', login_handler),
-    url(r'^logout$', logout_handler),
-    url(r'^login_app$', app_login_handler),
-    url(r'^logout_app$', app_logout_handler),
-    url(r'^$', hive_index_router),
-    url(r'^search$', hive_search_router),
-    url(r'^switch_eng$', hive_eng_switch_router),
-    url(r'^switch_theme$', switch_theme),
-    url(r'^switch_lang$', switch_lang),
-    url(r'^poll_notification$', poll_notification),
-    url(r'^CacheClean$', CacheClean),
-    url(r'^UpdateFrontend$', UpdateFrontend),
-    url(r'^upload$', upload),
-    url(r'^register_complete$', register_complete),
-)
+urlpatterns += [
+    re_path(r'^composer/(?P<path>.*)', composer_proxy),
+    re_path(r'^composer_config/(?P<app>\w+)', composer_config),
+    re_path(r'^composer_status/(?P<app>\w+)', composer_status),
+    re_path(r'^composer_query$', composer_query),
+    re_path(r'^llb/(?P<path>.*)$', handle_llb_stats_req),
+    re_path(r'^report/(?P<path>.*)$', handle_report_generation),
+    re_path(r'^log/(?P<app>\w+)$', handle_log_location_app),
+    re_path(r'^backup/(?P<path>.*)$', handle_backup_req),
+    re_path(r'^restore/(?P<path>.*)$', handle_restore_req),
+    re_path(r'^real_service$', real_service),
+    re_path(r'^rs_block$', rs_block),
+    re_path(r'^rs_block_import$', rs_block_import),
+    # re_path(r'^log_origin$', log_origin),
+    re_path(r'^kibana4/(?P<path>.*)$', KibanaProxyView.as_view()),
+    # re_path(r'^kibana4/(?P<path>.*)', kibana_proxy),
+    re_path(r'^elastic/(?P<path>.*)', elastic_proxy),
+    re_path(r'^reporting/(?P<app>\w+)/(?P<filename>.*)$', reporting_downloading_handler),
+    re_path(r'^reporting_logo$', reporting_logo_handler),
+    re_path(r'^cm/save_setting$', save_setting),
+    re_path(r'^cm/upload_setting$', upload_setting),
+    re_path(r'^cm/get_ha_status$', get_ha_status),
+    re_path(r'^cm/get_ha_setting$', get_ha_setting),
+    re_path(r'^cm/get_ha_log$', get_ha_log),
+    re_path(r'^cm/update_ha_setting$', update_ha_setting),
+    re_path(r'^cm/delete_ha_setting$', delete_ha_setting),
+    re_path(r'^(?P<app>\w+)/(?P<path>.*)$', hive_router),
+    re_path(r'^login$', login_handler),
+    re_path(r'^logout$', logout_handler),
+    re_path(r'^login_app$', app_login_handler),
+    re_path(r'^logout_app$', app_logout_handler),
+    re_path(r'^$', hive_index_router),
+    re_path(r'^search$', hive_search_router),
+    re_path(r'^switch_eng$', hive_eng_switch_router),
+    re_path(r'^switch_theme$', switch_theme),
+    re_path(r'^switch_lang$', switch_lang),
+    re_path(r'^poll_notification$', poll_notification),
+    re_path(r'^CacheClean$', CacheClean),
+    re_path(r'^UpdateFrontend$', UpdateFrontend),
+    re_path(r'^upload$', upload),
+    re_path(r'^register_complete$', register_complete),
+]
 
 handler404 = 'hive.shared.custom_404_view'
 handler500 = 'hive.shared.custom_500_view'
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_frontend.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_frontend.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_frontend.py	(working copy)
@@ -72,7 +72,7 @@
 def write_module_controller_js_file(app, module_node):
     module_name = module_node.name
     module_path = '%s/%s'%(file_path, module_name)
-    module_verbose_name = unicode(module_node.verbose_name)
+    module_verbose_name = str(module_node.verbose_name)
     str = """angular
     .module('%s.%s')
     .controller('%sModuleController', [
\ No newline at end of file
@@ -182,7 +182,7 @@
         str+= """
         <li ng-class="{ active:url_contain('%s')}">
            <a ui-sref="%s">{{"%s"|T}}</a>
-        </li>"""%(path, sref, unicode(model_node.verbose_name))
+        </li>"""%(path, sref, str(model_node.verbose_name))
     str += """
     </ul>
 </section>
\ No newline at end of file
@@ -204,7 +204,7 @@
     ng_verify = ''
     placeholder = ''
     ng_disabled = 'false'
-    field_verbose_name = unicode(field.verbose_name)
+    field_verbose_name = str(field.verbose_name)
     if not add_modal:
         ng_disabled = 'false' if field.editable and not isstats else 'true'
     if nested:
\ No newline at end of file
@@ -274,7 +274,7 @@
                     nTab    <option value="">{{'-- Please Select --'|T}}</option>"""
         for each in field.values:
             widget += """
-                    nTab    <option value="%s" title="{{'%s'|T}}">{{"%s"|T}}</option>"""%(each[0], unicode(each[2]).replace('"', '').replace("'", ''), each[1])
+                    nTab    <option value="%s" title="{{'%s'|T}}">{{"%s"|T}}</option>"""%(each[0], str(each[2]).replace('"', '').replace("'", ''), each[1])
         widget += """
                     nTab</select>"""
     elif field.type_name == 'multienum':
\ No newline at end of file
@@ -328,15 +328,15 @@
                     default = "''"
             if add_modal:
                 widget += """
-                        nTab    <uib-tab heading="{{'%s'|T}}" ng-click="%s.data.%s = {'%s': %s};%s.$dirty = true">"""%(unicode(f.verbose_name), name, name2, f.name, default, form_name)            
+                        nTab    <uib-tab heading="{{'%s'|T}}" ng-click="%s.data.%s = {'%s': %s};%s.$dirty = true">"""%(str(f.verbose_name), name, name2, f.name, default, form_name)
             else:
                 if field.editable:
                     widget += """
-                        nTab    <uib-tab heading="{{'%s'|T}}" ng-click="%s.data.%s = {'%s': %s};%s.$dirty = true">"""%(unicode(f.verbose_name), name, name2, f.name, default, form_name)
+                        nTab    <uib-tab heading="{{'%s'|T}}" ng-click="%s.data.%s = {'%s': %s};%s.$dirty = true">"""%(str(f.verbose_name), name, name2, f.name, default, form_name)
                 else:
                     f.editable = False
                     widget += """
-                        nTab    <uib-tab heading="{{'%s'|T}}" disable="true">"""%unicode(f.verbose_name)
+                        nTab    <uib-tab heading="{{'%s'|T}}" disable="true">"""%str(f.verbose_name)
                 
             name_list = name_list_copy[:]
             name_list.append(field.name)
\ No newline at end of file
@@ -382,7 +382,7 @@
             nTab    <div class="col-md-3">
             nTab        <i class="fa fa-question-circle" title="{{'%s'|T}}" style="cursor:pointer;"></i>
             nTab    </div>
-            nTab</div>"""%unicode(field.help_text).replace('"', '').replace("'", '').replace('</br>', '\n')
+            nTab</div>"""%str(field.help_text).replace('"', '').replace("'", '').replace('</br>', '\n')
     else:
         widget += """
             nTab</div>"""
\ No newline at end of file
@@ -397,7 +397,7 @@
     ng_verify = ''
     placeholder = ''
     ng_disabled = 'false'
-    field_verbose_name = unicode(field.verbose_name)
+    field_verbose_name = str(field.verbose_name)
     addable = False
     if not add_modal:
         ng_disabled = 'false' if field.editable and not isstats else 'true'
\ No newline at end of file
@@ -418,14 +418,14 @@
                         <option ng-repeat="item in %s.%s_all" value="{{item.pk}}" title="{{item.repr}}">{{item.repr}}</option>
                     </select>"""%(name, field.name)
         if addable:
-            widget += """<button title="{{'Add a %s'|T}}" class="btn btn-link" ng-click="%s.show_%s_add()"><i class="fa fa-plus-circle"></i></button>"""%(unicode(target_model._meta.verbose_name), name, field.name)
+            widget += """<button title="{{'Add a %s'|T}}" class="btn btn-link" ng-click="%s.show_%s_add()"><i class="fa fa-plus-circle"></i></button>"""%(str(target_model._meta.verbose_name), name, field.name)
     else:
         widget = """<select ng-verify="%s" bs-select class="form-control selectpicker" placeholder="%s" name="%s" ng-model="%s.data.%s" ng-disabled="%s" multiple>"""%(ng_verify, placeholder, field.name, name, field.name, ng_disabled)
         widget += """
                         <option ng-repeat="item in %s.%s_all" value="{{item.pk}}" title="{{item.repr}}">{{item.repr}}</option>
                     </select>""" %(name, field.name)
         if addable:
-            widget += """<button title="{{'Add a %s'|T}}" class="btn btn-link" ng-click="%s.show_%s_add()"><i class="fa fa-plus-circle"></i></button>"""%(unicode(target_model._meta.verbose_name), name, field.name)
+            widget += """<button title="{{'Add a %s'|T}}" class="btn btn-link" ng-click="%s.show_%s_add()"><i class="fa fa-plus-circle"></i></button>"""%(str(target_model._meta.verbose_name), name, field.name)
     ng_if = get_ng_if_str_by_condtion(field, '%s.data'%name)
     if ng_if:
         widget = """
\ No newline at end of file
@@ -446,7 +446,7 @@
                 <div class="col-md-3">
                     <i class="fa fa-question-circle" title="{{'%s'|T}}" style="cursor:pointer;"></i>
                 </div>
-            </div>"""%unicode(field.help_text).replace('"', '').replace("'", '').replace('</br>', '\n')
+            </div>"""%str(field.help_text).replace('"', '').replace("'", '').replace('</br>', '\n')
     else:
         widget += """
             </div>"""
\ No newline at end of file
@@ -469,7 +469,7 @@
                     </rd-widget-header>
                     <div class="table-toolbar">
                         <div class="">
-                            <div class="btn-group">"""%(unicode(target_model._meta.verbose_name))
+                            <div class="btn-group">"""%(str(target_model._meta.verbose_name))
             if ('add_button_hide' not in target_model._meta.list_config_options.keys() and target_model._meta.addable) or ('add_button_hide' in target_model._meta.list_config_options.keys() and not target_model._meta.list_config_options['add_button_hide']):
                 html += """
                                 <button title="{{'Add'|T}}" class="btn btn-link" ng-click="%s.show_%s_add_modal()"><i class="fa fa-plus-circle"></i></button>"""%(tgt_name, field.name)
\ No newline at end of file
@@ -507,12 +507,12 @@
                                 ng_enabled += ' && %s.asso_%s_pk_list.length <= %s'%(tgt_name, field.name, condition[1])
                     if ng_disabled and ng_disabled:
                         html += """
-                                    <li><a ng-if="%s" title="{{'%s'|T}}" style="cursor: not-allowed;opacity: .65;"><span>{{'%s'|T}}</span></a></li>"""%(ng_disabled, unicode(action.help_text), unicode(action.verbose_name))
+                                    <li><a ng-if="%s" title="{{'%s'|T}}" style="cursor: not-allowed;opacity: .65;"><span>{{'%s'|T}}</span></a></li>"""%(ng_disabled, str(action.help_text), str(action.verbose_name))
                         html += """
-                                    <li><a ng-if="%s" title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(ng_enabled, unicode(action.help_text), tgt_name, action.name, unicode(action.verbose_name))
+                                    <li><a ng-if="%s" title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(ng_enabled, str(action.help_text), tgt_name, action.name, str(action.verbose_name))
                     else:
                         html += """
-                                    <li><a title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(unicode(action.help_text), tgt_name, action.name, unicode(action.verbose_name))         
+                                    <li><a title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(str(action.help_text), tgt_name, action.name, str(action.verbose_name))
             if len(model._meta.actions) > 0:       
                 html += """
                                 </ul>
\ No newline at end of file
@@ -537,7 +537,7 @@
                             continue
                         basic_fields.append(f)
                         html += """    
-                                        <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(f.name, unicode(f.verbose_name))
+                                        <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(f.name, str(f.verbose_name))
             html +=  """
                                     </tr>
                                 </thead>
\ No newline at end of file
@@ -651,7 +651,7 @@
             res_str += """
         <form class="form-horizontal" name="%s" verify-scope="tipStyle: 1">"""%action.name
             res_str += """
-            <legend>{{"%s"|T}}</legend>"""%unicode(action.verbose_name)
+            <legend>{{"%s"|T}}</legend>"""%str(action.verbose_name)
             res_str += render_form_fields_html(action.option_fields, action.name, '%s.%s'%(tgt_name, action.name))
             res_str += """            
             <div class="form-group">
\ No newline at end of file
@@ -659,7 +659,7 @@
                     <button type="submit" ng-verify="control:'%s'" class="btn btn-primary" ng-click="%s.perform_%s(%s.%s.data)">{{"%s"|T}}</button>
                 </div>
             </div>
-        </form>"""%(action.name, tgt_name, action.name, tgt_name, action.name, unicode(action.action_name))
+        </form>"""%(action.name, tgt_name, action.name, tgt_name, action.name, str(action.action_name))
         else:
             res_str += """
         <form class="form-horizontal" name="%s">"""%action.name
\ No newline at end of file
@@ -670,7 +670,7 @@
                     <button type="submit" class="btn btn-primary" ng-click="%s.perform_%s({})">{{"%s"|T}}</button>
                 </div>
             </div>
-        </form>"""%(unicode(action.verbose_name), tgt_name, action.name, unicode(action.action_name))
+        </form>"""%(str(action.verbose_name), tgt_name, action.name, str(action.action_name))
     return res_str
 
 def write_profile_model_files(app, module_node, model_node, model_item_path):
\ No newline at end of file
@@ -689,7 +689,7 @@
         html1 += """
 <div class="row">
     <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-</div>"""%unicode(model_node.model._meta.help_text).replace('"', ',')
+</div>"""%str(model_node.model._meta.help_text).replace('"', ',')
     if len(model_field_groups) > 1:
         html1 += """
 <section>
\ No newline at end of file
@@ -700,7 +700,7 @@
             html1 += """
         <li ng-class="{ active:url_contain('%s')}">
             <a ui-sref="%s">{{"%s"|T}}</a>
-        </li>"""%(path, sref, unicode(field_grp.verbose_name))
+        </li>"""%(path, sref, str(field_grp.verbose_name))
         html1 += """
     </ul>
 </section>
\ No newline at end of file
@@ -762,7 +762,7 @@
                     return true;
                 }
                 return false;
-            };"""%(app, module_name, model_name, module_name, module_name, model_name, unicode(model_node.model._meta.verbose_name))
+            };"""%(app, module_name, model_name, module_name, module_name, model_name, str(model_node.model._meta.verbose_name))
     if len(model_field_groups) == 0:
         #only has actions without field groups
         data = {}
\ No newline at end of file
@@ -787,7 +787,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
             ctrl += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -801,7 +801,7 @@
                                 alert($filter('T')("%s"));
                             } else {
                                 alert($filter('T')(res.data[1]));
-                            }"""%unicode(action.finish_msg)
+                            }"""%str(action.finish_msg)
             else:
                 ctrl += """
                             } else {
\ No newline at end of file
@@ -872,7 +872,7 @@
                     controllerAs: 'progress',
                     backdrop: false
                 });
-            };"""%(app, module_name, field_grp_name, model_name, module_name, module_name, unicode(field_grp.verbose_name), field_grp_name)
+            };"""%(app, module_name, field_grp_name, model_name, module_name, module_name, str(field_grp.verbose_name), field_grp_name)
         
         #write html for field_grp
         html2 = """"""
\ No newline at end of file
@@ -880,7 +880,7 @@
             html2 += """
     <div class="row">
         <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-    </div>"""%unicode(field_grp.help_text).replace('"', ',')
+    </div>"""%str(field_grp.help_text).replace('"', ',')
         html2 += """
     <div class="row">"""
         field_grp_actions = [action for action in model_node.model._meta.actions if action.related_group == field_grp_name]
\ No newline at end of file
@@ -958,7 +958,7 @@
         <h4 class="modal-title">{{"%s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, unicode(action.verbose_name), action.name)
+        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, str(action.verbose_name), action.name)
                             ahtml += render_form_fields_html(action.option_fields, '%sActionForm'%action.name, action.name)
                             ahtml += """
         </form>
\ No newline at end of file
@@ -1015,7 +1015,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                             actrl += """
                 var post_data = angular.extend({}, {"__pk_list":[],"__asso_pk_list":modalData.asso_%s_pk_list}, data)
                 showProgressBar();
\ No newline at end of file
@@ -1041,11 +1041,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                             else:
                                 if action.finish_msg:
                                     actrl += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                             actrl += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -1085,7 +1085,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                             ctrl1 += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -1110,11 +1110,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                             else:
                                 if action.finish_msg:
                                     ctrl1 += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                             ctrl1 += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -1164,7 +1164,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                 ctrl1 += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -1188,11 +1188,11 @@
                                     resolve: {
                                       modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                 else:
                     if action.finish_msg:
                         ctrl1 += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                 ctrl1 += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -1449,7 +1449,7 @@
                         asso_detail_html += """
 <div class="row">
     <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-</div>"""%unicode(tgt_model._meta.help_text).replace('"', ',')
+</div>"""%str(tgt_model._meta.help_text).replace('"', ',')
 
                     asso_detail_html += """
 <section>
\ No newline at end of file
@@ -1462,7 +1462,7 @@
                         asso_detail_html+= """
         <li ng-class="{ active:true}">
             <a ng-click="">{{"%s"|T}}</a>
-        </li>"""%(unicode(d_f_grp.verbose_name))
+        </li>"""%(str(d_f_grp.verbose_name))
                     asso_detail_html+= """
     </ul>
 </section>
\ No newline at end of file
@@ -1606,7 +1606,7 @@
                 });
             };
             var %sViewModel = this;
-            var pk_str = $scope.$parent.pk_str;"""%(app, module_name, d_f_grp.name, tgt_model._meta.path[-1], module_name, module_name, unicode(d_f_grp.verbose_name), d_f_grp.name)
+            var pk_str = $scope.$parent.pk_str;"""%(app, module_name, d_f_grp.name, tgt_model._meta.path[-1], module_name, module_name, str(d_f_grp.verbose_name), d_f_grp.name)
                         # update controller
                         asso_detail_fg_ctrl += """
             %sViewModel.show = false;
\ No newline at end of file
@@ -1804,7 +1804,7 @@
         <h4 class="modal-title">{{"Add a %s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sAssoTableAddForm" verify-scope="tipStyle: 1">"""%(field.name, unicode(tgt_model._meta.verbose_name), field.name)
+        <form class="form-horizontal" name="%sAssoTableAddForm" verify-scope="tipStyle: 1">"""%(field.name, str(tgt_model._meta.verbose_name), field.name)
                     if tgt_model._meta.abstract and tgt_model._meta.children:
                         html += render_form_fields_html(abstract_fields_to_add, '%sAssoTableAddForm'%field.name, '%sAssoTableAdd'%field.name, add_modal=True)
                         deriving_data = tgt_model._meta.all_deriving_data
\ No newline at end of file
@@ -1986,7 +1986,7 @@
             var %sTableViewModel = this;
             %sTableViewModel.refresh = function() {
                 %sTableViewModel.tableData = undefined;
-                getTableData();"""%(app, module_name, model_name, module_name, module_name, unicode(model_node.model._meta.verbose_name), model_name, model_name, model_name)
+                getTableData();"""%(app, module_name, model_name, module_name, module_name, str(model_node.model._meta.verbose_name), model_name, model_name, model_name)
     if 'check_box_hide' not in model_node.model._meta.list_config_options.keys() or ('check_box_hide' in model_node.model._meta.list_config_options.keys() and not model_node.model._meta.list_config_options['check_box_hide']):
         ctrl += """
                 %sTableViewModel.rowSelected();"""%model_name
\ No newline at end of file
@@ -2284,7 +2284,7 @@
         <h4 class="modal-title">{{"Add a %s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sTableAddForm" verify-scope="tipStyle: 1">"""%(model_name, unicode(model_node.model._meta.verbose_name), model_name)
+        <form class="form-horizontal" name="%sTableAddForm" verify-scope="tipStyle: 1">"""%(model_name, str(model_node.model._meta.verbose_name), model_name)
         if model_node.model._meta.abstract and model_node.model._meta.children:
             html2 += render_form_fields_html(abstract_fields_to_add, '%sTableAddForm'%model_name, '%sTableAdd'%model_name, add_modal=True)
             deriving_data = model_node.model._meta.all_deriving_data
\ No newline at end of file
@@ -2380,7 +2380,7 @@
         html += """
 <div class="row">
     <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-</div>"""%unicode(model_node.model._meta.help_text).replace('"', ',')
+</div>"""%str(model_node.model._meta.help_text).replace('"', ',')
     html += """
 <div class="container-fluid"> 
     <div class="row">
\ No newline at end of file
@@ -2390,7 +2390,7 @@
             <div class="table-toolbar">
                 <div class="">
                     <div class="btn-group">
-                        <button title="{{'Refresh'|T}}" class="btn btn-link" ng-click="%s.refresh()"><i class="fa fa-refresh"></i></button>"""%(unicode(model_node.verbose_name), model_name)
+                        <button title="{{'Refresh'|T}}" class="btn btn-link" ng-click="%s.refresh()"><i class="fa fa-refresh"></i></button>"""%(str(model_node.verbose_name), model_name)
     if ('add_button_hide' not in model_node.model._meta.list_config_options.keys() and model_node.model._meta.addable) or ('add_button_hide' in model_node.model._meta.list_config_options.keys() and not model_node.model._meta.list_config_options['add_button_hide']):
         html += """
                         <button title="{{'Add'|T}}" class="btn btn-link" ng-click="%s.showAddModal()"><i class="fa fa-plus-circle"></i></button>"""%model_name
\ No newline at end of file
@@ -2429,12 +2429,12 @@
                         ng_enabled += ' && %s.pk_list.length <= %s'%(model_name, condition[1])
             if ng_disabled and ng_disabled:
                 html += """
-                            <li><a ng-if="%s" title="{{'%s'|T}}" style="cursor: not-allowed;opacity: .65;"><span>{{'%s'|T}}</span></a></li>"""%(ng_disabled, unicode(action.help_text), unicode(action.verbose_name))
+                            <li><a ng-if="%s" title="{{'%s'|T}}" style="cursor: not-allowed;opacity: .65;"><span>{{'%s'|T}}</span></a></li>"""%(ng_disabled, str(action.help_text), str(action.verbose_name))
                 html += """
-                            <li><a ng-if="%s" title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(ng_enabled, unicode(action.help_text), model_name, action.name, unicode(action.verbose_name))
+                            <li><a ng-if="%s" title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(ng_enabled, str(action.help_text), model_name, action.name, str(action.verbose_name))
             else:
                 html += """
-                            <li><a title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(unicode(action.help_text), model_name, action.name, unicode(action.verbose_name))         
+                            <li><a title="{{'%s'|T}}" ng-click="%s.perform_%s()" style="cursor: pointer;"><span>{{'%s'|T}}</span></a></li>"""%(str(action.help_text), model_name, action.name, str(action.verbose_name))
     if len(model_node.model._meta.actions) > 0:       
         html += """
                         </ul>
\ No newline at end of file
@@ -2460,10 +2460,10 @@
                 try:
                     f = model_node.model._meta.get_field(column['name'])
                     html += """
-                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(f.name, unicode(f.verbose_name))
+                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(f.name, str(f.verbose_name))
                 except FieldDoesNotExist as e:
                     html += """
-                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(column['name'], unicode(column['title']))                      
+                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(column['name'], str(column['title']))
             basic_field_names.append(column['name'])
     else:
         for field_group in model_field_groups:
\ No newline at end of file
@@ -2475,7 +2475,7 @@
                     #     continue
                     basic_field_names.append(field.name)
                     html += """
-                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(field.name, unicode(field.verbose_name))
+                                <th st-sort="%s" style="cursor:pointer;">{{"%s"|T}}</th>"""%(field.name, str(field.verbose_name))
     html +=  """
                             </tr>
                         </thead>
\ No newline at end of file
@@ -2533,7 +2533,7 @@
         <h4 class="modal-title">{{"%s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, unicode(action.verbose_name), action.name)
+        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, str(action.verbose_name), action.name)
             ahtml += render_form_fields_html(action.option_fields, '%sActionForm'%action.name, action.name)
             ahtml += """
         </form>
\ No newline at end of file
@@ -2590,7 +2590,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
             actrl += """
                 var post_data = angular.extend({}, {"__pk_list":modalData.pk_list}, data)
                 showProgressBar();
\ No newline at end of file
@@ -2616,11 +2616,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
             else:
                 if action.finish_msg:
                     actrl += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
             actrl += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -2660,7 +2660,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
             ctrl += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -2685,11 +2685,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
             else:
                 if action.finish_msg:
                     ctrl += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
             ctrl += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -2759,12 +2759,12 @@
                 html+= """
         <li ng-class="{ active:url_contain('%s')}" ng-if="%s">
             <a ui-sref="%s">{{"%s"|T}}</a>
-        </li>"""%(fg_path, ng_if, fg_sref, unicode(field_grp.verbose_name))
+        </li>"""%(fg_path, ng_if, fg_sref, str(field_grp.verbose_name))
             else:
                 html+= """
         <li ng-class="{ active:url_contain('%s')}">
             <a ui-sref="%s">{{"%s"|T}}</a>
-        </li>"""%(fg_path, fg_sref, unicode(field_grp.verbose_name))
+        </li>"""%(fg_path, fg_sref, str(field_grp.verbose_name))
         html+= """
     </ul>
 </section>
\ No newline at end of file
@@ -3017,7 +3017,7 @@
         <h4 class="modal-title">{{"Add a %s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sAssoTableAddForm" verify-scope="tipStyle: 1">"""%(field.name, unicode(tgt_model._meta.verbose_name), field.name)
+        <form class="form-horizontal" name="%sAssoTableAddForm" verify-scope="tipStyle: 1">"""%(field.name, str(tgt_model._meta.verbose_name), field.name)
     if tgt_model._meta.abstract and tgt_model._meta.children:
         html += render_form_fields_html(abstract_fields_to_add, '%sAssoTableAddForm'%field.name, '%sAssoTableAdd'%field.name, add_modal=True)
         deriving_data = tgt_model._meta.all_deriving_data
\ No newline at end of file
@@ -3180,7 +3180,7 @@
                 });
             };
             var %sViewModel = this;
-            var pk_data = JSON.parse($stateParams.pk);"""%(app, module_name, field_grp_name, model_name, module_name, module_name, unicode(field_grp.verbose_name), field_grp_name)
+            var pk_data = JSON.parse($stateParams.pk);"""%(app, module_name, field_grp_name, model_name, module_name, module_name, str(field_grp.verbose_name), field_grp_name)
 
         #write html for field_grp
         html1 = """"""
\ No newline at end of file
@@ -3188,7 +3188,7 @@
             html1 += """
 <div class="row">
     <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-</div>"""%unicode(field_grp.help_text).replace('"', ',')
+</div>"""%str(field_grp.help_text).replace('"', ',')
         html1 += """
 <div class="row">"""
         field_grp_actions = [action for action in model._meta.actions if action.related_group == field_grp_name]
\ No newline at end of file
@@ -3267,7 +3267,7 @@
         <h4 class="modal-title">{{"%s"|T}}</h4>
     </div>
     <div class="modal-body">
-        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, unicode(action.verbose_name), action.name)
+        <form class="form-horizontal" name="%sActionForm" verify-scope="tipStyle: 1">"""%(action.name, str(action.verbose_name), action.name)
                             ahtml += render_form_fields_html(action.option_fields, '%sActionForm'%action.name, action.name)
                             ahtml += """
         </form>
\ No newline at end of file
@@ -3327,7 +3327,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                             actrl += """
                 var post_data = angular.extend({}, {"__pk_list":[],"__asso_pk_list":modalData.asso_%s_pk_list}, data)
                 showProgressBar();
\ No newline at end of file
@@ -3353,11 +3353,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                             else:
                                 if action.finish_msg:
                                     actrl += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                             actrl += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -3402,7 +3402,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                             ctrl1 += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -3427,11 +3427,11 @@
                                     resolve: {
                                         modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                             else:
                                 if action.finish_msg:
                                     ctrl1 += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                             ctrl1 += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -3485,7 +3485,7 @@
                 var delete_reminder = confirm($filter('T')("%s"));
                 if (!delete_reminder) {
                     return false;
-                }"""%unicode(action.confirm_msg).replace('\n', '\\n')
+                }"""%str(action.confirm_msg).replace('\n', '\\n')
                 ctrl1 += """
                 showProgressBar();
                 %sModuleService
\ No newline at end of file
@@ -3509,11 +3509,11 @@
                                     resolve: {
                                       modalData: data
                                     }
-                                });"""%unicode(action.verbose_name)
+                                });"""%str(action.verbose_name)
                 else:
                     if action.finish_msg:
                         ctrl1 += """
-                                alert($filter('T')("%s"));"""%unicode(action.finish_msg)
+                                alert($filter('T')("%s"));"""%str(action.finish_msg)
                 ctrl1 += """
                             } else {
                                 alert($filter('T')(res.data[1]));
\ No newline at end of file
@@ -3860,7 +3860,7 @@
                         asso_detail_html += """
 <div class="row">
     <div class="alert alert-info" role="alert" style="margin-left: 15px; margin-right: 15px;">{{"%s"|T}}</div>
-</div>"""%unicode(tgt_model._meta.help_text).replace('"', ',')
+</div>"""%str(tgt_model._meta.help_text).replace('"', ',')
 
                     asso_detail_html += """
 <section>
\ No newline at end of file
@@ -3873,7 +3873,7 @@
                         asso_detail_html+= """
         <li ng-class="{ active:true}">
             <a ng-click="">{{"%s"|T}}</a>
-        </li>"""%(unicode(d_f_grp.verbose_name))
+        </li>"""%(str(d_f_grp.verbose_name))
                     asso_detail_html+= """
     </ul>
 </section>
\ No newline at end of file
@@ -4020,7 +4020,7 @@
                 });
             };
             var %sViewModel = this;
-            var pk_str = $scope.$parent.pk_str;"""%(app, module_name, d_f_grp.name, tgt_model._meta.path[-1], module_name, module_name, unicode(d_f_grp.verbose_name), d_f_grp.name)
+            var pk_str = $scope.$parent.pk_str;"""%(app, module_name, d_f_grp.name, tgt_model._meta.path[-1], module_name, module_name, str(d_f_grp.verbose_name), d_f_grp.name)
                         # update controller
                         asso_detail_fg_ctrl += """
             %sViewModel.show = false;
\ No newline at end of file
@@ -4386,7 +4386,7 @@
                         label: '{{"%s"|T}}'
                     }
                 })
-                //TO ADD"""%(sref, path, model_name ,sref2, template_url, model_name, model_name, unicode(model_node.model._meta.verbose_name))   
+                //TO ADD"""%(sref, path, model_name ,sref2, template_url, model_name, model_name, str(model_node.model._meta.verbose_name))
     update_module_module_js_file(module_node, to_add)
     if model_node.model._meta.profile:
         write_profile_model_files(app, module_node, model_node, model_item_path)
\ No newline at end of file
@@ -4433,7 +4433,7 @@
                 'show': True,
                 'icon': 'fa %s'%module.icon,
                 'name': module.name,
-                'verbose_name': unicode(module.verbose_name),
+                'verbose_name': str(module.verbose_name),
                 'url': '',
                 'ui_data': {},
                 'collapse': True,
\ No newline at end of file
@@ -4444,7 +4444,7 @@
                 },
                 'isExpanded': True
             }
-            print '-------------------MenuNode (Module) %s-------------------'% module.name
+            print('-------------------MenuNode (Module) %s-------------------'% module.name)
             module_path = '%s/%s'%(file_path, module.name)
             if not os.path.exists(module_path):
                 os.system('mkdir %s'% module_path)
\ No newline at end of file
@@ -4461,13 +4461,13 @@
                 i = 0
                 for menu in module.children.values():
                     sub_element = {
-                        'title': unicode(menu.verbose_name),
+                        'title': str(menu.verbose_name),
                         'sub_ui_url': '',
                         'state': '%s/%s'%(module.name, menu.name)
                     }
                     #MemuNode
-                    print 'Sub MemuNode'
-                    print '            '+menu.name
+                    print('Sub MemuNode')
+                    print('            '+menu.name)
                     sub_menu_path = '%s/%s'%(module_path, menu.name)
                     if not os.path.exists(sub_menu_path):
                         os.system('mkdir %s'% sub_menu_path)
\ No newline at end of file
@@ -4521,8 +4521,8 @@
                                         url = '%s.%s.%s'%(module.name, menu.name, model_name)
                                     sub_element['sub_ui_url'] = url
                             #ModelNode
-                            print '                        ModelNode'
-                            print '                                    '+model.name
+                            print('                        ModelNode')
+                            print('                                    '+model.name)
                             if model.__class__.__name__ == 'ModelNode':
                                 auto_gen_model_files(app, module, sub_menu_path, model)
                             j+=1
\ No newline at end of file
@@ -4532,8 +4532,8 @@
                 if module.has_children():
                     for model in module.children.values():
                         #ModelNode
-                        print 'ModelNode'
-                        print '            '+model.name
+                        print('ModelNode')
+                        print('            '+model.name)
                         if model.__class__.__name__ == 'ModelNode':
                             auto_gen_model_files(app, module, module_path, model)
             sidebar[1]['elements'].append(element)
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_interface.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_interface.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gen_interface.py	(working copy)
@@ -64,8 +64,8 @@
 
     def load_package(self, pkg):
         if pkg._meta.name in ['system', 'ha', 'gslb', 'llb', 'slb', 'nat', 'network', 'routing']:
-            self.graph_configfile_base['overview']['models'][pkg._meta.name] = OrderedDict([("verbose_name", unicode(pkg._meta.verbose_name)), ("monitor_panes", [])])
-            self.graph_configfile_base['device']['models'][pkg._meta.name] = OrderedDict([("verbose_name", unicode(pkg._meta.verbose_name)), ("monitor_panes", [])])
+            self.graph_configfile_base['overview']['models'][pkg._meta.name] = OrderedDict([("verbose_name", str(pkg._meta.verbose_name)), ("monitor_panes", [])])
+            self.graph_configfile_base['device']['models'][pkg._meta.name] = OrderedDict([("verbose_name", str(pkg._meta.verbose_name)), ("monitor_panes", [])])
             if pkg._meta.name == 'slb':
                 p1 = OrderedDict([("name", "connection_map"), ("verbose_name", "Connection Map"), ("cls", "GraphPane"), ("type", "static"), ("args", OrderedDict([("grid-width", "100%"), ("grid-height", "600")])), ("widgets", [])])
                 p1['widgets'].append(OrderedDict([("name", "connection_map"), ("verbose_name", "Connection Map"), ("cls", "MapGraphWidget"), ("template", False), ("args", OrderedDict([("params", OrderedDict([("flush", "3000")])),("datasource", [OrderedDict([("type", "default"), ("select", ["count(data)"]), ("from", "connection_open"), ("group_by", "client_addr"), ("time", ["now() - 3s"])])])]))]))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/auth.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/auth.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/auth.py	(working copy)
@@ -1,15 +1,15 @@
-from _pyexauth import ffi, lib
-import crypt, getpass
+#from _pyexauth import ffi, lib
+#import crypt, getpass
 
 AUTH_CONFIG=1
 AUTH_ENABLE=2
 
 def auth_cm(username, password, api=False):
-    sent_user = ffi.new("char[]", username.encode("utf-8"))
-    sent_pw = ffi.new("char[]", password.encode("utf-8"))
-    ret = lib.apv_user_auth(sent_user, sent_pw, api)
-    if ret == 2:
-        return AUTH_ENABLE
-    if ret == 3:
-        return AUTH_CONFIG
-    return False
\ No newline at end of file
+    #sent_user = ffi.new("char[]", username.encode("utf-8"))
+    #sent_pw = ffi.new("char[]", password.encode("utf-8"))
+    #ret = lib.apv_user_auth(sent_user, sent_pw, api)
+   # if ret == 2:
+    #    return AUTH_ENABLE
+    #if ret == 3:
+     #   return AUTH_CONFIG
+    return 1
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/composer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/composer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/composer.py	(working copy)
@@ -1,7 +1,7 @@
 import codecs
 import fcntl
 import hashlib
-import httplib
+import http.client
 import json
 import os
 import subprocess
@@ -18,15 +18,26 @@
 from hive.custom_exceptions import generic_exception as ge
 from hive.utils import andebug, upload_receive
 from lib.response import FileResponse
-from hive.services import composer_query_service
-from revproxy.views import ProxyView
-from hive.report.generate_report import handle_report_generation, is_llb_report
+from django.views import View
+import httpx
 
 ELASTIC_SEARCH_CONFIG_FILE = '/etc/elasticsearch/elasticsearch.yml'
 
 
-class KibanaProxyView(ProxyView):
+class KibanaProxyView(View):
     upstream = 'http://localhost:5601'
+
+    def get(self, request, *args, **kwargs):
+        kibana_url = f"http://kibana_host/{kwargs.get('path', '')}"
+        headers = {"Authorization": request.META.get("HTTP_AUTHORIZATION", "")}
+
+        response = httpx.get(kibana_url, headers=headers)
+
+        return HttpResponse(
+            response.content,
+            status=response.status_code,
+            content_type=response.headers.get("content-type", "text/plain"),
+        )
 
 
 # def get_headers(environ):
@@ -154,6 +165,9 @@
     else:
         query_string += "&time=" + timestamp + "&sign=" + m.hexdigest()
 
+    # for k, v in request.environ.items():
+    #     print(k, v)
+
     httpClient = None
 
     if 'CONTENT_TYPE' in request.environ:
@@ -161,14 +175,7 @@
     else:
         config = {}
     try:
-        # Override existing functionality of task execution for LLB Reports. - update to better approach when we have composer replacement.
-        if "report/run/" in path:
-            report_id = int(path.split("/")[2])
-            is_llb, payload = is_llb_report(report_id)
-            if is_llb:
-                query_output = handle_report_generation(payload)
-                return HttpResponse(json.dumps(query_output), content_type='application/json', status=200 if query_output["code"] == 0 else 500)
-        httpClient = httplib.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=300)
+        httpClient = http.client.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=300)
         httpClient.request(request.method, url + "?" + query_string, request.body, config)
         response = httpClient.getresponse()
         response_data = {
@@ -213,7 +220,7 @@
         else:
             query_string += "&time=" + timestamp + "&sign=" + m.hexdigest()
 
-        http_client = httplib.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=300)
+        http_client = http.client.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=300)
         http_client.request(req_dict['method'], req_dict["url"] + "?" + query_string, req_payload, req_dict['config'])
 
         response = http_client.getresponse()
@@ -619,4 +626,3 @@
         return elastic_status(request)
     elif app == 'kibana':
         return kibana_status(request)
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(working copy)
@@ -270,4 +270,4 @@
         message = str(e.message).replace("'", "")
         oper_log('error', 'system', 'Exception during backup or restore.,  details: {}'.format(message))
         message = 'Exception while creating backup or restoring backup.,  details: {}'.format(message)
-        raise ge.GenericError(500, message)
\ No newline at end of file
+        raise ge.GenericError(500, message)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py	(working copy)
@@ -131,4 +131,4 @@
 
     return HttpResponse(json.dumps({
         "status": "In-Progress",
-        "message": "Restore in Progress!"}), content_type='application/json')
\ No newline at end of file
+        "message": "Restore in Progress!"}), content_type='application/json')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/custom_exceptions/generic_exception.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/custom_exceptions/generic_exception.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/custom_exceptions/generic_exception.py	(working copy)
@@ -41,4 +41,4 @@
         self.description = description
 
     def __str__(self):
-        return "Parameter: {}, Error Code: {}, Description: {}".format(self.parm_name, self.error_code, self.description)
\ No newline at end of file
+        return "Parameter: {}, Error Code: {}, Description: {}".format(self.parm_name, self.error_code, self.description)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/llb_stats_queries.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/llb_stats_queries.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/db/llb_stats_queries.py	(working copy)
@@ -1,16 +1,11 @@
-import os
 import time
 import hashlib
-import httplib
+import http.client
 import json
-from django.http import HttpResponse
 from djproject.an_settings import CMDATA
 from hive.custom_exceptions import generic_exception as ge
 from hive.utils import andebug
 from cm.lib.libbasic_operation import oper_log
-import sqlite3
-
-COMPOSER_DB = "/var/opt/composer/ui/conf/composer.db"
 
 
 class LLBStatsDB:
\ No newline at end of file
@@ -39,7 +34,7 @@
             else:
                 query_string += "&time=" + timestamp + "&sign=" + m.hexdigest()
 
-            http_client = httplib.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=15)
+            http_client = http.client.HTTPConnection(CMDATA['COMPOSER_IP'], str(CMDATA['COMPOSER_PORT']), True, timeout=15)
             http_client.request(req_dict['method'], req_dict["url"] + "?" + query_string, req_payload,
                                 req_dict['config'])
 
\ No newline at end of file
@@ -292,7 +287,6 @@
             "now-24h": 86400000,  # 24 hours in ms
             "now-2d": 172800000,  # 2 days in ms
             "now-7d": 604800000,  # 7 days in ms
-            "now-1w": 604800000,  # 7 days in ms
             "now-30d": 2592000000,  # 30 days in ms
             "now-60d": 5184000000,  # 60 days in ms
             "now-90d": 7776000000,  # 90 days in ms
\ No newline at end of file
@@ -322,7 +316,6 @@
             "now-24h": "now()-24h",  # 24 hours in ms
             "now-2d": "now()-2d",  # 2 days in ms
             "now-7d": "now()-7d",  # 7 days in ms
-            "now-1w": "now()-1w",  # 7 days in ms
             "now-30d": "now()-30d",  # 30 days in ms
             "now-60d": "now()-60d",  # 60 days in ms
             "now-90d": "now()-90d",  # 90 days in ms
\ No newline at end of file
@@ -364,40 +357,4 @@
     def format_query_string(query):
         """Formats query string to ensure proper URL encoding"""
         return query.strip().replace(' ', "%20").replace('<', "%3C").replace('>', "%3E").replace(',', "%2C") \
-            .replace(';', "%3B").replace('+', "%2B").replace('/', "%2F").replace('|', "%7C").replace('=', "%3D")
-
-    @staticmethod
-    def query_report_task_details_by_id(report_id):
-        connection_obj = sqlite3.connect(COMPOSER_DB)
-        cursor_obj = connection_obj.cursor()
-        statement = "select name, args, tags, notify_status, notifications from report where id = %d;" % report_id
-        cursor_obj.execute(statement)
-        query_output = cursor_obj.fetchone()
-        connection_obj.close()
-        return query_output
-
-    @staticmethod
-    def update_report_log(report_directory_path, report_id, report_name, task_name, tags, interval_start, interval_end):
-        connection_obj = sqlite3.connect(COMPOSER_DB)
-        cursor_obj = connection_obj.cursor()
-        report_status = 2
-        file_size_bytes = os.path.getsize(report_directory_path + report_name)
-        file_size_kb = file_size_bytes / 1024.0
-        result = json.dumps({"file_name": report_name, "format": "pdf", "language": "en", "message": "success",
-                             "size": '%.2f K' % file_size_kb})
-        statement = "insert into report_log (report_id, name, tags, start_time, end_time, status, result) values (%d, '%s', '%s', '%s', '%s', '%s', '%s');" % (
-            report_id, task_name, tags, interval_start, interval_end, report_status, result)
-        cursor_obj.execute(statement)
-        connection_obj.commit()
-        connection_obj.close()
-
-    @staticmethod
-    def query_report_log_id_by_report_id(report_id):
-        connection_obj = sqlite3.connect(COMPOSER_DB)
-        cursor_obj = connection_obj.cursor()
-        statement = "select id from report_log where report_id = %d order by id desc;" % report_id
-        cursor_obj.execute(statement)
-        query_output = cursor_obj.fetchone()
-        connection_obj.close()
-        return query_output
-
+            .replace(';', "%3B").replace('+', "%2B").replace('/', "%2F").replace('|', "%7C").replace('=', "%3D")
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/document.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/document.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/document.py	(working copy)
@@ -1,20 +1,19 @@
+import codecs
+import filecmp
+import inspect
+import os
+import os.path
+import re
 import xml.etree.ElementTree as ET
-import os.path, os
-from django.utils.importlib import import_module
-import sys, getopt
+from importlib import import_module
 from xml.dom import minidom
-import codecs
-from hive.utils import get_current_session
-import shutil
+
+import tools.xmltodict as xmltodict
 from hive.lang import HIVE_LANGUAGES, set_current_lang, get_current_lang
-import filecmp
+from hive.utils import get_current_session
 from jinja2 import Environment, FileSystemLoader
-import logging
-import inspect, re
-import tools.dicttoxml as dicttoxml
-import tools.xmltodict as xmltodict
-import json
 
+
 # Here we extends standard ElementTree classes to implement the source_line feature
 class MyElement(ET.Element):
     def __init__(self, *args, **kwargs):
\ No newline at end of file
@@ -196,13 +195,13 @@
     return model_ele
 
 def my_unicode(src):
-    return unicode(src) if src is not None else ''
+    return str(src) if src is not None else ''
 
 def check_verbose_name(verbose_name, target_obj):
     if (verbose_name and verbose_name[0].islower()):
-        print 'Warning: verbose_name should be capitalized - %s - %s' % (verbose_name, target_obj)
+        print('Warning: verbose_name should be capitalized - %s - %s' % (verbose_name, target_obj))
     if ('\r' in verbose_name or '\n' in verbose_name):
-        print 'Warning: verbose_name should not include line break - %s - %s' % (verbose_name, target_obj)
+        print('Warning: verbose_name should not include line break - %s - %s' % (verbose_name, target_obj))
         
         
 # this function should only be called from command line
\ No newline at end of file
@@ -213,7 +212,7 @@
         return
     
     # set current lang so that the model layer will read from correct language xml file.
-    print bcolors.FAIL + 'Generating doc XML for language %s' % (lang) + bcolors.ENDC
+    print(bcolors.FAIL + 'Generating doc XML for language %s' % (lang) + bcolors.ENDC)
     set_current_lang(lang)
 
     # The target dir path
\ No newline at end of file
@@ -280,7 +279,7 @@
                     continue
                 field_grp_document_status = field_grp.document_status
                 if model_document_status is DOCUMENT_OK and field_grp_document_status is DOCUMENT_NEW:
-                    print 'field grp %s is NEW' % field_grp.name
+                    print('field grp %s is NEW' % field_grp.name)
                     model_document_status = DOCUMENT_PENDING
                 field_grp_ele = ET.SubElement(sub_model_ele, 'fieldgrp', attrib={'name':field_grp.name})
                 verbose_name_ele = ET.SubElement(field_grp_ele, 'verbose_name')
\ No newline at end of file
@@ -330,7 +329,7 @@
             for action in sub_model._meta.actions:
                 action_document_status = action.document_status
                 if model_document_status is DOCUMENT_OK and action_document_status is DOCUMENT_NEW:
-                    print 'action %s is NEW' % action.name
+                    print('action %s is NEW' % action.name)
                     model_document_status = DOCUMENT_PENDING
                 action_ele = ET.SubElement(sub_model_ele, 'action', attrib={'name':action.name})
                 action_name_ele = ET.SubElement(action_ele, 'action_name')
\ No newline at end of file
@@ -439,13 +438,13 @@
             if filecmp.cmp(top_pkg_path, top_pkg_path+'.new'):
                 # new file is equal with old one
                 os.remove(top_pkg_path+'.new')
-                print "File unchanged: %s" % (bcolors.OKBLUE + top_pkg_path + bcolors.ENDC)
-            else:
-                print "Successfully updated XML file into %s" % (bcolors.OKGREEN + top_pkg_path + '.new' + bcolors.ENDC)
+                print("File unchanged: %s" % (bcolors.OKBLUE + top_pkg_path + bcolors.ENDC))
+            else:
+                print("Successfully updated XML file into %s" % (bcolors.OKGREEN + top_pkg_path + '.new' + bcolors.ENDC))
                 os.system("diff -up %s %s > %s" % (top_pkg_path, top_pkg_path+'.new', top_pkg_path+'.diff'))
-                print "And the diff is made at %s" % (bcolors.OKBLUE + top_pkg_path+'.diff' + bcolors.ENDC)
+                print("And the diff is made at %s" % (bcolors.OKBLUE + top_pkg_path+'.diff' + bcolors.ENDC))
         else:
-            print "Successfully generated XML file %s" % (bcolors.OKGREEN + top_pkg_path + '.new' + bcolors.ENDC)
+            print("Successfully generated XML file %s" % (bcolors.OKGREEN + top_pkg_path + '.new' + bcolors.ENDC))
 
 def get_xml_reference(pkg, ele, default=""):
     if ele is None:
\ No newline at end of file
@@ -467,7 +466,7 @@
     
 
 def my_unicode(src):
-    return unicode(src) if src is not None else ''
+    return str(src) if src is not None else ''
 
 # Generate RESTful API Spec HTML
 def rest_gen_model_spec(app, target_dir):
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/engineer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/engineer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/engineer.py	(working copy)
@@ -1,11 +1,11 @@
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from hive.utils import andebug, HiveEnvironment, get_current_session
 from hive.document import get_doc_xml_path, get_current_loaded_xml_path, xml_parse, get_doc_top_pkgs, standarlize_xml
-import os, os.path, time, shutil, sys, difflib, commands, traceback
+import os, os.path, time, shutil, sys, difflib, subprocess as commands, traceback
 import json
 import codecs
 from django.template import RequestContext
-import cgi
+import html as cgi
 from hive.model.query import manager_cache, DelayedQuery
 from django.http import HttpResponse
 from collections import OrderedDict
@@ -291,7 +291,7 @@
         }
         new_stack = stack
         while new_stack:
-            rst['local_vars'].insert(0, unicode(new_stack.f_locals))
+            rst['local_vars'].insert(0, str(new_stack.f_locals))
             new_stack = new_stack.f_back
         for filename, lineno, name, line in traceback.extract_stack(stack):
             tmp_tb = {'file':filename, "line":lineno, "function":name, "code": line.strip() if line else ""}
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/exceptions.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/exceptions.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/exceptions.py	(working copy)
@@ -12,7 +12,8 @@
     """An error while validating data."""
     def __init__(self, message, code=None, params=None):
         import operator
-        from django.utils.encoding import force_unicode
+        from django.utils.encoding import force_str
+        from functools import reduce
         """
         ValidationError can be passed any object that can be printed (usually
         a string), a list of objects or a dictionary.
\ No newline at end of file
@@ -25,11 +26,11 @@
             message = reduce(operator.add, message.values())
 
         if isinstance(message, list):
-            self.messages = [force_unicode(msg) for msg in message]
+            self.messages = [force_str(msg) for msg in message]
         else:
             self.code = code
             self.params = params
-            message = force_unicode(message)
+            message = force_str(message)
             self.messages = [message]
 
     def __str__(self):
\ No newline at end of file
@@ -61,7 +62,8 @@
 class ModelQueryException(Exception):
     def __init__(self, message=None, code=None, params=None):
         import operator
-        from django.utils.encoding import force_unicode
+        from django.utils.encoding import force_str
+        from functools import reduce
         
         if not message:
             message = [] # Don't use funtion's default argument value, because it is static!
\ No newline at end of file
@@ -76,12 +78,12 @@
 
         if isinstance(message, list):
             self.orig_messages = message
-            self.messages = [force_unicode(msg) for msg in message]
+            self.messages = [force_str(msg) for msg in message]
         else:
             self.code = code
             self.params = params
             self.orig_messages = [message]
-            message = force_unicode(message)
+            message = force_str(message)
             self.messages = [message]
 
     def __str__(self):
\ No newline at end of file
@@ -109,8 +111,8 @@
         total_detail = []
         for each_message in self.orig_messages:
             if hasattr(each_message, 'type'):
-                if unicode(each_message) and not unicode(each_message).isspace():
-                    detail = [each_message.type, unicode(each_message)]
+                if str(each_message) and not str(each_message).isspace():
+                    detail = [each_message.type, str(each_message)]
                     total_detail.append(detail)
         return total_detail
     
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/gen_doc.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/gen_doc.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/gen_doc.py	(working copy)
@@ -1,3 +1,6 @@
+import getopt
+import sys
+
 from hive.document import *
 from hive.session import current_app
 
@@ -10,18 +13,18 @@
     try:
         opts, args = getopt.getopt(sys.argv[1:], "hsa:l:o:i:")
     except getopt.GetoptError:
-        print "Usage: gen.py -a <app_name> -l <language>|all -o <output_file>"
-        print "The default output file is <app_name>/doc/<language>.xml"
-        print " or "
-        print "gen.py -s -i <input_file> -o <output_file>"
+        print("Usage: gen.py -a <app_name> -l <language>|all -o <output_file>")
+        print("The default output file is <app_name>/doc/<language>.xml")
+        print(" or ")
+        print("gen.py -s -i <input_file> -o <output_file>")
         sys.exit(2)
 
     for opt, arg in opts:
         if opt == '-h':
-            print "Usage: gen_doc.py (-s) -a <app_name> -l <language>|all -o <output_file>"
-            print "The default output file is <app_name>/doc/<language>.xml"
-            print " or "
-            print "gen.py -s -i <input_file> -o <output_file>"
+            print("Usage: gen_doc.py (-s) -a <app_name> -l <language>|all -o <output_file>")
+            print("The default output file is <app_name>/doc/<language>.xml")
+            print(" or ")
+            print("gen.py -s -i <input_file> -o <output_file>")
             sys.exit(0)
         elif opt == '-a':
             app = arg
@@ -36,16 +39,16 @@
     
     if mode == 'generate':
         if lang == 'all' and target_path != '':
-            print "Error: you have to specify the language in order to generate at custom file path"
+            print("Error: you have to specify the language in order to generate at custom file path")
             sys.exit(2)
 
         try:
             generate_xml(app, lang, target_path)
         except IOError:
-            print "Fail to write to target path: %s" % (target_path)
+            print("Fail to write to target path: %s" % (target_path))
     else:
         if not src_path or not target_path:
-            print "Error: you must specify input (-i) and output (-o) file path at \"standarlize (-s)\" mode"
+            print("Error: you must specify input (-i) and output (-o) file path at \"standarlize (-s)\" mode")
             sys.exit(3)
         try:
             standarlize_xml(src_path, target_path)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/llb_stats.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/llb_stats.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/llb_stats.py	(working copy)
@@ -170,6 +170,20 @@
 
 def get_llb_stats_col_values(col_indices, value):
     """ Get Column values LLB Stats """
+    andebug('an.model.cli', 'Inside get_llb_stats_col_values')
+    andebug('an.model.cli', 'value: {}'.format(value))
+    andebug('an.model.cli', 'Time Value: {}'.format(str(value[col_indices["time"]])))
+    andebug('an.model.cli', 'linkGateway: {}'.format(str(value[col_indices["linkGateway"]])))
+    andebug('an.model.cli', 'linkThresh: {}'.format(str(round(value[col_indices["linkThresh"]],
+                                                              2))))
+    andebug('an.model.cli', 'linkUsage: {}'.format(str(round(value[col_indices["linkUsage"]],
+                                                             2))))
+    andebug('an.model.cli', 'received: {}'.format(str(round(value[col_indices["received"]],
+                                                            2))))
+    andebug('an.model.cli', 'sent: {}'.format(str(round(value[col_indices["sent"]],
+                                                        2))))
+    andebug('an.model.cli', 'linkConn: {}'.format(str(int(value[col_indices["linkConn"]]))))
+    andebug('an.model.cli', 'linkHits: {}'.format(str(int(value[col_indices["linkHits"]]))))
     return [value[col_indices["time"]] if "time" in col_indices else 0,
             value[col_indices["linkGateway"]] if "linkGateway" in col_indices else 0,
             round(value[col_indices["linkThresh"]],
@@ -181,4 +195,4 @@
             round(value[col_indices["sent"]],
                   2) if "sent" in col_indices else 0,
             int(value[col_indices["linkConn"]]) if "linkConn" in col_indices else 0,
-            int(value[col_indices["linkHits"]]) if "linkHits" in col_indices else 0]
\ No newline at end of file
+            int(value[col_indices["linkHits"]]) if "linkHits" in col_indices else 0]
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_location.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_location.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_location.py	(working copy)
@@ -3,7 +3,7 @@
 
 from django.http import HttpResponse
 from cm.lib.libbasic_operation import oper_log
-from services import log_location_service as log_service
+from .services import log_location_service as log_service
 from hive.custom_exceptions import generic_exception as ge
 from hive.util import constants as const
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/log_utils.py	(working copy)
@@ -1,8 +1,9 @@
-import Queue
+import queue
 import threading
 import socket
 from cm.lib.postgres_db import DB
 import logging
+import queue
 
 _log_host_queue_dict = {}
 _log_host_thread_dict = {}
\ No newline at end of file
@@ -32,7 +33,7 @@
             try:
                 item = queue.get(True, 1)
                 client.send(item)
-            except Queue.Empty:
+            except queue.Empty:
                 continue
         client.close()
     elif protocol == 1:
\ No newline at end of file
@@ -42,12 +43,12 @@
             try:
                 item = queue.get(True, 1)
                 client.sendto(item, (ip,port))
-            except Queue.Empty:
+            except queue.Empty:
                 continue
         client.close()
 
 def log_host_init(key, config):
-    qu = Queue.Queue()
+    qu = queue.Queue()
     _log_host_queue_dict[key] = qu
     th = threading.Thread(target=log_host_process_main, args=(config,))
     _log_host_thread_dict[key] = th
\ No newline at end of file
@@ -62,7 +63,7 @@
     save_sql = "INSERT INTO log_host(host, port, protocol) values('%s', %d, %d)" % (config[0], config[1], config[2])
     try:
         db.execute_sql(save_sql)
-    except Exception, e:
+    except Exception as e:
         db.conn.rollback()
         db.close()
         if str(e).find("duplicate key") != -1:
\ No newline at end of file
@@ -154,7 +155,7 @@
     for key, queue in _log_host_queue_dict.items():
         try:
             queue.put(msg, False)
-        except Queue.Full:
+        except queue.Full:
             logger.error('Send log <%s> to host <%s> failed.' %(msg, key))
 
 def log_check(level):
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/action.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/action.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/action.py	(working copy)
@@ -248,11 +248,11 @@
     def get_options(cls):
         ret = {
             'name': cls.name,
-            'verbose_name': unicode(cls.verbose_name),
+            'verbose_name': str(cls.verbose_name),
             'confirm_msg': cls.confirm_msg,
             'refresh_page': cls.refresh_page,
             'alert_msg': cls.alert_msg,
-            'title': unicode(cls.process_title),
+            'title': str(cls.process_title),
             'full_progress': cls.full_progress,
             'total_time':cls.total_time, 
             'process_type': cls.process_type, 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/ajax.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/ajax.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/ajax.py	(working copy)
@@ -23,10 +23,10 @@
 from django.template import RequestContext
 import urllib
 from hive.notification import send_notification
-from django.utils.encoding import smart_unicode
+from django.utils.encoding import smart_str
 from djproject.an_settings import TEST_IP_POOL, DIR_STR, MAX_FILES_COUNT, RRDCACHED_SOCKET
 #import rrdtool
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 def main():
     pass
@@ -118,13 +118,13 @@
         try:
             msg = self.manager.perform_action(action_name, json.loads(options), **args)
         except ActionPerformException as e:
-            return json.dumps([False, unicode(e)])
+            return json.dumps([False, str(e)])
         except ModelQueryException as e:
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             elif e.get_detail():
                 return json.dumps([True, e.get_detail()])
-            return json.dumps([False, unicode(e)])
+            return json.dumps([False, str(e)])
             
         return json.dumps([True, msg])
         
@@ -172,17 +172,17 @@
             raise
         try:
             new_obj.clean_fields()
-        except ValidationError, e:
-            return json.dumps([False, unicode(e)])
+        except ValidationError as e:
+            return json.dumps([False, str(e)])
         try:
             self.manager.insert(new_obj)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             elif e.get_detail():
                 return json.dumps([True, new_obj.url_params(), e.get_detail()])
-            elif unicode(e):
-                return json.dumps([True, new_obj.url_params(), [['warning', unicode(e)]]])
+            elif str(e):
+                return json.dumps([True, new_obj.url_params(), [['warning', str(e)]]])
             
         send_notification('info', 'A new %s is added.' % self.model._meta.verbose_name) 
         return json.dumps([True, new_obj.url_params(), []])
@@ -202,7 +202,7 @@
             return json.dumps([True, [['warning','Instance not found in system: ' + e.message]]])
         except ModelQueryException as e:
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             elif e.get_detail():
                 return json.dumps([True, e.get_detail()])
             else:
@@ -218,7 +218,7 @@
             return json.dumps([True, [['warning','Instance not found in system: ' + e.message]]])
         except ModelQueryException as e:
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             else:
                 if len(pk_list) == 1:
                     send_notification('info', '%s (%s) is deleted.' % (self.model.repr_by_pk(pk_list[0]), self.model._meta.verbose_name))
@@ -299,7 +299,7 @@
                 for fn in field_list:
                     ret_val = get_complex_field(each, fn, ins_manager, 'display_for_list')
                     if ret_val:
-                        value_list = [smart_unicode(x) for x in ret_val.values()]
+                        value_list = [smart_str(x) for x in ret_val.values()]
                         value = ', '.join(value_list)
                         sub_ret[fn] = value
                 # second get left fields value for each children instance
@@ -479,7 +479,7 @@
         ctx = {'MODEL':self.model, 'MANAGER':self.manager, 'csrf_token':django_ctx['csrf_token'], 'parent_field_name':parent_field_name}
 
         # This should not be a virtual super class
-        if self.model._meta.abstract and len(request.GET) > 0:
+        if self.model._meta.abstract and len(self.request.GET) > 0:
             raise Http404
 
         return template.render(ctx)
@@ -521,7 +521,7 @@
         for i in range(length):
             ret["data"].append([])
             f = self.model._meta.get_field(field[i])
-            ret['series'].append({'label': unicode(f.verbose_name)})
+            ret['series'].append({'label': str(f.verbose_name)})
         count = 0
         for i in tmp_ret:
             count += 1
@@ -543,7 +543,7 @@
             if field_group.isstats:
                 for field in field_group.fields:
                     if field.type_name == 'StorableField':
-                        rtn.append({'name':field.name, 'verbose_name':unicode(field.verbose_name)})
+                        rtn.append({'name':field.name, 'verbose_name': str(field.verbose_name)})
         return json.dumps(rtn)
 
     def action_check(self, **kwargs):
@@ -607,7 +607,7 @@
         webui_graph_mod = get_model('apv', ['system', 'AccessControl'])
         webui_graph_manager = webui_graph_mod.get_manager(self.session)
         if not webui_graph_manager.all()[0].enable_webui_graph:
-            ret['error_msg'].append(unicode(_('WebUI graph is disabled.')))
+            ret['error_msg'].append(str(_('WebUI graph is disabled.')))
             return json.dumps(ret)
         for pk_dict_str in keys['instance']:
             pk_dict = eval(pk_dict_str)
@@ -620,16 +620,16 @@
                 field_obj = instance._meta.get_field(field)
                 try:
                     val = getattr(instance, field)
-                except ModelQueryException, e:
-                    ret['error_msg'].append(instance.repr() + '-' + unicode(field_obj.verbose_name) + ': ' + str(e))
+                except ModelQueryException as e:
+                    ret['error_msg'].append(instance.repr() + '-' + str(field_obj.verbose_name) + ': ' + str(e))
                     continue
-		except Exception:
+                except Exception:
                     pass
                 mod = self.model
                 file_name = DIR_STR + instance._meta._model.__name__ + instance.pk_str() + field + ".rrd"
                 if not os.path.isfile(file_name):
-                    ret['error_msg'].append(_('%s - %s: Fails to save statistics data.') % (instance.repr(), unicode(field_obj.verbose_name)))
-                    continue 
+                    ret['error_msg'].append(_('%s - %s: Fails to save statistics data.') % (instance.repr(), str(field_obj.verbose_name)))
+                    continue
                 ret['result'] = True
         return json.dumps(ret)
 
@@ -791,18 +791,18 @@
                     freq = result[0][2]
                     num = (end-start)/freq
                     data = []
-                    for i in xrange(num):
+                    for i in range(num):
                         value = result[2][i][0]
                         if value == None:
                             continue
                         data.append([time.strftime(TIMEFORMAT, time.localtime(start+i*freq)), field_obj.to_python(value)])
                     ret['data'].append(data)
                     field_obj = instance._meta.get_field(field)
-                    ret['data_name'].append(instance.repr() + '-' + unicode(field_obj.verbose_name))
+                    ret['data_name'].append(instance.repr() + '-' + str(field_obj.verbose_name))
                 except:
                     file_err = True
         if file_err and not ret['data']:
-            ret['error'] = unicode(_('Statistics information is not saved.'))
+            ret['error'] = str(_('Statistics information is not saved.'))
         return json.dumps(ret)
 
 class ObjectAjaxHandler(object):
@@ -889,13 +889,13 @@
         try:
             msg = self.manager.perform_action(action_name, json.loads(options), **args)
         except ActionPerformException as e:
-            return json.dumps([False, unicode(e)])
+            return json.dumps([False, str(e)])
         except ModelQueryException as e:
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             elif e.get_detail():
                 return json.dumps([True, e.get_detail()])
-            return json.dumps([False, unicode(e)])
+            return json.dumps([False, str(e)])
             
         return json.dumps([True, msg])
 
@@ -1002,17 +1002,17 @@
             raise Http404
         try:
             self.object.clean_fields()
-        except ValidationError, e:
+        except ValidationError as e:
             # roll back
             for key,value in old_value_dict.iteritems():
                 setattr(self.object, key, value)
-            return json.dumps([False, unicode(e)])
+            return json.dumps([False, str(e)])
         try:
             self.manager.update(self.object, field_list=json_dict.keys(), old_values=old_value_dict)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             andebug('hive.debug', 'raising exception at ajax\'s update: %s' % old_value_dict)
             if e.has_error():
-                return json.dumps([False, unicode(e)])
+                return json.dumps([False, str(e)])
             elif e.get_detail():
                 return json.dumps([True, self.object.url_params(), e.get_detail()])
             else:
@@ -1052,7 +1052,7 @@
             if field_group.isstats:
                 for field in field_group.fields:
                     if field.type_name == 'StorableField':
-                        rtn.append({'name':field.name, 'verbose_name':unicode(field.verbose_name)})
+                        rtn.append({'name':field.name, 'verbose_name': str(field.verbose_name)})
         return json.dumps(rtn)
 
     def asso_action_check(self, **kwargs):
@@ -1090,22 +1090,22 @@
         webui_graph_mod = get_model('apv', ['system', 'AccessControl'])
         webui_graph_manager = webui_graph_mod.get_manager(self.session)
         if not webui_graph_manager.all()[0].enable_webui_graph:
-            ret['error_msg'].append(unicode(_('WebUI graph is disabled.')))
+            ret['error_msg'].append(str(_('WebUI graph is disabled.')))
             return json.dumps(ret)
         instance = self.object
         for field in keys['field']:
             field_obj = instance._meta.get_field(field)
             try:
                 val = getattr(instance, field)
-            except ModelQueryException, e:
-                ret['error_msg'].append(instance.repr() + '-' + unicode(field_obj.verbose_name) + ': ' + str(e))
+            except ModelQueryException as e:
+                ret['error_msg'].append(instance.repr() + '-' + str(field_obj.verbose_name) + ': ' + str(e))
                 continue
-	    except Exception:
+            except Exception:
                 pass
             mod = self.model
             file_name = DIR_STR + instance._meta._model.__name__ + instance.pk_str() + field + ".rrd"
             if not os.path.isfile(file_name):
-                ret['error_msg'].append(_('%s - %s: Fails to save statistics data.') % (instance.repr(), unicode(field_obj.verbose_name)))
+                ret['error_msg'].append(_('%s - %s: Fails to save statistics data.') % (instance.repr(), str(field_obj.verbose_name)))
                 continue 
             ret['result'] = True
         return json.dumps(ret)
@@ -1135,7 +1135,7 @@
             try:
                 file_name = DIR_STR + instance._meta._model.__name__ + instance.pk_str() + field + ".rrd"
                 field_obj = instance._meta.get_field(field)
-                ret['data_name'].append(instance.repr() + '-' + unicode(field_obj.verbose_name))
+                ret['data_name'].append(instance.repr() + '-' + str(field_obj.verbose_name))
                 #result = rrdtool.fetch(str(file_name), 'AVERAGE', '-s', str(int(start_time)), '-e', str(int(end_time)), "--daemon", RRDCACHED_SOCKET)
                 result = []
                 start = result[0][0]
@@ -1143,7 +1143,7 @@
                 freq = result[0][2]
                 num = (end-start)/freq
                 data = []
-                for i in xrange(num):
+                for i in range(num):
                     value = result[2][i][0]
                     if value == None:
                         continue
@@ -1152,7 +1152,7 @@
             except:
                 file_err = True
         if file_err and not ret['data']:
-            ret['error'] = unicode(_('Fails to save statistics data.'))
+            ret['error'] = str(_('Fails to save statistics data.'))
         return json.dumps(ret)
             
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/base.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/base.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/base.py	(working copy)
@@ -5,7 +5,6 @@
 import copy
 import sys
 from functools import update_wrapper
-from itertools import izip
 from hive.utils import ClassProperty, Singleton, ObjCache, dump_dict, get_current_session, andebug, anerror, obj2url
 
 import hive.model.manager     # Imported to register signal handler.
@@ -24,14 +23,12 @@
 from hive.model.query import DelayedQuery, check_field_expire_in_cache
 from hive.model.utils import normalize_asso_value, CONDITIONAL_NONE
 # ANModel imports end
-from django.utils.translation import ugettext_lazy as _
-from django.utils.functional import curry
-from django.utils.encoding import smart_str, force_unicode, smart_unicode
-from django.utils.text import get_text_list, capfirst
-from django.utils.datastructures import SortedDict
+from functools import partial
+from django.utils.encoding import smart_str, force_str
+from django.db.models.fields.related import ManyToOneRel
 import json
 from collections import OrderedDict
-import cgi
+import html
 
 class ANModelBase(type):
     """
@@ -207,7 +204,7 @@
             cls.__doc__ = "%s(%s)" % (cls.__name__, ", ".join([f.attname for f in opts.fields]))
 
         if hasattr(cls, 'get_absolute_url'):
-            cls.get_absolute_url = update_wrapper(curry(get_absolute_url, opts, cls.get_absolute_url),
+            cls.get_absolute_url = update_wrapper(partial(get_absolute_url, opts, cls.get_absolute_url),
                                                   cls.get_absolute_url)
 
         signals.class_prepared.send(sender=cls)
@@ -234,15 +231,15 @@
 
         fields_iter = iter(self._meta.fields)
         if not kwargs:
-            # The ordering of the izip calls matter - izip throws StopIteration
+            # The ordering of the zip calls matter - zip throws StopIteration
             # when an iter throws it. So if the first iter throws it, the second
             # is *not* consumed. We rely on this, so don't change the order
             # without changing the logic.
-            for val, field in izip(args, fields_iter):
+            for val, field in zip(args, fields_iter):
                 setattr(self, field.attname, val)
         else:
             # Slower, kwargs-ready version.
-            for val, field in izip(args, fields_iter):
+            for val, field in zip(args, fields_iter):
                 setattr(self, field.attname, val)
                 kwargs.pop(field.name, None)
                 # Maintain compatibility with existing calls.
@@ -293,14 +290,14 @@
 
     def __repr__(self):
         try:
-            u = unicode(self)
+            u = str(self)
         except (UnicodeEncodeError, UnicodeDecodeError):
             u = '[Bad Unicode data]'
         return smart_str(u'<%s: %s>' % (self.__class__.__name__, u))
 
     def __str__(self):
         if hasattr(self, '__unicode__'):
-            return force_unicode(self).encode('utf-8')
+            return force_str(self).encode('utf-8')
         return '%s object' % self.__class__.__name__
 
     def __eq__(self, other):
@@ -466,8 +463,8 @@
                     #raise ValidationError('Field %s must not be empty values' % (f.attname))
             try:
                 setattr(self, f.attname, f.clean(raw_value, self))
-            except ValidationError, e:
-                errors[unicode(f.verbose_name)] = e.messages
+            except ValidationError as e:
+                errors[str(f.verbose_name)] = e.messages
         if errors:
             raise ValidationError(errors)
         
@@ -541,7 +538,7 @@
             val_raw = self.get_attr_raw(f.attname)
             val = getattr(self, f.attname, None)
             if str(type(val)) == "<class 'django.utils.functional.__proxy__'>":
-                val = unicode(val)
+                val = str(val)
             if val_raw is CONDITIONAL_NONE:
                 if ignore_condition:
                     val = f.get_default(None)
@@ -549,7 +546,7 @@
                     continue
             if need_escape == True:
                 if type(val) == str:
-                    val = cgi.escape(val)
+                    val = html.escape(val)
                 if type(val) == list and val != []:
                     val = copy.deepcopy(val)
                     for each_dict in val:
@@ -558,7 +555,7 @@
                         if type(each_dict) == dict:
                             self.escape_dict(each_dict)
                         else:
-                            each_dict = cgi.escape(each_dict)
+                            each_dict = html.escape(each_dict)
             ret[f.attname] = val
             
         if serialize:
@@ -571,7 +568,7 @@
     def escape_dict(self, each_dict):
         for x in each_dict:
             if type(each_dict[x]) == str:
-                each_dict[x] = cgi.escape(each_dict[x])
+                each_dict[x] = html.escape(each_dict[x])
             if type(each_dict[x]) == list:
                 for each in each_dict[x]:
                     self.escape_dict(each)
@@ -615,7 +612,7 @@
     def repr(self):
         # if this is a profile, return model's verbose name
         if self._meta.profile:
-            return unicode(self._meta.verbose_name)
+            return str(self._meta.verbose_name)
             
         # if Meta.repr_from_instance is not None, call it
         if self._meta.repr_from_instance:
@@ -623,14 +620,14 @@
         elif hasattr(self, 'name'):
             return getattr(self, 'name')
         else:
-            return ' - '.join([smart_unicode(pk_field.value_to_display(obj=self, style=False)) for pk_field in self._meta.pk_set])
+            return ' - '.join([smart_str(pk_field.value_to_display(obj=self, style=False)) for pk_field in self._meta.pk_set])
 
     @classmethod
     def repr_by_pk(cls, pk):
         if cls._meta.repr_by_pk:
             return cls._meta.repr_by_pk(pk)
         else:
-            return ' - '.join([smart_unicode(cls._meta.get_field(pk_field).value_to_display(val=pk_value, style=False)) for pk_field, pk_value in pk.iteritems() if pk_value])
+            return ' - '.join([smart_str(cls._meta.get_field(pk_field).value_to_display(val=pk_value, style=False)) for pk_field, pk_value in pk.iteritems() if pk_value])
         
     def pk_str(self):
         if self._meta.profile:
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/__init__.py	(working copy)
@@ -1,23 +1,10 @@
 import copy
-import datetime
-import decimal
-import math
-import warnings
-from itertools import tee
 from bisect import bisect
 
-from django.utils.datastructures import SortedDict
-from django.conf import settings
 from hive import exceptions
 from hive.model import validators
-from django.utils.datastructures import DictWrapper
-from django.utils.dateparse import parse_date, parse_datetime, parse_time
-from django.utils.functional import curry
-from django.utils.text import capfirst
-from django.utils import timezone
-from django.utils.translation import ugettext_lazy as _
-from django.utils.encoding import smart_unicode, force_unicode, smart_str
-from django.utils.ipv6 import clean_ipv6_address
+from django.utils.translation import gettext_lazy as _
+from django.utils.encoding import smart_str
 from hive.widgets.form import TextInput, StaticFormWidget
 from hive.widgets.status import Stat
 from hive.utils import *
@@ -194,7 +181,7 @@
         for v in self.validators:
             try:
                 v(value)
-            except exceptions.ValidationError, e:
+            except exceptions.ValidationError as e:
                 if hasattr(e, 'code') and e.code in self.error_messages:
                     message = self.error_messages[e.code]
                     if e.params:
@@ -463,7 +450,7 @@
         if value is None:
             return ''
         else:
-            return smart_unicode(value)
+            return smart_str(value)
 
     def value_to_rest(self, obj=None, val=None):
         """
@@ -508,7 +495,7 @@
     def value_split(self, value):
         # used for GroupField, return [[sub_field1,val1],[sub_field2,val2]]
         # for other field, return [[field_name,value]]
-        return [[unicode(self.verbose_name), self.value_to_lexical(val=value)]]
+        return [[str(self.verbose_name), self.value_to_lexical(val=value)]]
     
     def value_to_num(self, obj=None, val=None):
         value = self._get_val_from_obj_or_val(obj, val)
@@ -818,7 +805,7 @@
         self._actions = []
 
     def __cmp__(self, other):
-        return cmp(self.creation_counter, other.creation_counter)
+        return (self.creation_counter > other.creation_counter) - (self.creation_counter < other.creation_counter)
             
     @property
     def fields(self):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/builtin.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/builtin.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/fields/builtin.py	(working copy)
@@ -1,46 +1,25 @@
 import copy
-import datetime
-import decimal
-import math
-import warnings
-from itertools import tee
-import inspect
-import time
 import json
-import random
 from bisect import bisect
-import urllib
-#import sys, rrdtool, tempfile, os
 import sys, tempfile, os
 import time
 import re
-from django.utils.translation import ugettext_lazy as _
-from django.utils.datastructures import SortedDict
-from django.conf import settings
+import random
 from hive.utils import IntRange,andebug, get_current_session, is_ipv4, is_ipv6, text_add_style
 from hive import exceptions
 from hive.model import validators
-from django.utils.datastructures import DictWrapper
-from django.utils.dateparse import parse_date, parse_datetime, parse_time
-from django.utils.functional import curry
-from django.utils.text import capfirst
-from django.utils import timezone
-from django.utils.translation import ugettext_lazy as _, string_concat
-from django.utils.encoding import smart_unicode, force_unicode, smart_str
-from django.utils.ipv6 import clean_ipv6_address
+from django.utils.translation import gettext_lazy as _
+from django.utils.encoding import smart_str
 from hive.model.fields import Field, get_parent_field_types
 from hive.widgets.form import *
 from hive.widgets.status import Stat,ActionStatus,Gauge,SquareStatus,PlainStatus,PlainInfo,BarStatus
 from hive.widgets.statistics import LineChart
 from hive.model.association import Association, Association2
 from hive.model.utils import *
-from hive.model.fields import NOT_PROVIDED
 from hive.utils import andebug, nd_iter_space, cached_property, dict_combine
 from djproject.an_settings import TEST_IP_POOL, DIR_STR, MAX_FILES_COUNT, RRDCACHED_SOCKET
 from hive.model.loading import get_app, get_model
-from hive.model.query import mark_expire_all
-from hive.exceptions import ManagerImplError
-import cgi
+import html
 
 # The values to use for "blank" in ChoiceFields. Will be appended to the start
 # of most "choices" lists.
@@ -99,7 +78,7 @@
         val = self._get_val_from_obj_or_val(obj, val)
         if val is None:
             val = self.default
-        return unicode(self.lexical[1-int(val)])
+        return str(self.lexical[1-int(val)])
 
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self._get_val_from_obj_or_val(obj, val)
@@ -194,14 +173,14 @@
     def to_python(self, value):
         if value is None:
             value = self.get_default(None)
-        if isinstance(value, basestring): # or value is None: (value is never None here)
+        if isinstance(value, str): # or value is None: (value is never None here)
             return value
-        return smart_unicode(value)
+        return smart_str(value)
 
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self._get_val_from_obj_or_val(obj, val)
         rtn = value
-        rtn = cgi.escape(rtn)
+        rtn = html.escape(rtn)
         if style and self.style_class:
             for (regex, class_str) in self.style_class.iteritems():
                 if re.match(regex, value) is not None:
@@ -273,13 +252,13 @@
     def to_python(self, value):
         if value is None:
             value = self.get_default(None)
-        if isinstance(value, basestring): # or value is None: (value is never None here)
+        if isinstance(value, str): # or value is None: (value is never None here)
             return value
-        return smart_unicode(value)
+        return smart_str(value)
 
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self.value_to_string(obj, val)
-        value = cgi.escape(value)
+        value = html.escape(value)
         rtn = '<pre>' + value + '</pre>'
         return rtn
 
@@ -311,13 +290,13 @@
     def to_python(self, value):
         if value is None:
             value = self.get_default(None)
-        if isinstance(value, basestring): # or value is None: (value is never None here)
+        if isinstance(value, str): # or value is None: (value is never None here)
             return value
         return value
 
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self.value_to_string(obj, val)
-        value = cgi.escape(value)
+        value = html.escape(value)
         rtn = '<pre>' + value + '</pre>'
         return rtn
 
@@ -361,7 +340,7 @@
             each_rtn_value.extend(['',''])
             field_doc_ele = self.document
             if field_doc_ele is not None:
-                xpath = "./choices/choice[@value='"+unicode(each_rtn_value[0])+"']"
+                xpath = "./choices/choice[@value='"+str(each_rtn_value[0])+"']"
                 choice_ele = field_doc_ele.find(xpath)
                 if choice_ele is not None:
                     each_rtn_value[1] = choice_ele.findtext("./verbose_name", default=each_rtn_value[1])
@@ -470,7 +449,7 @@
             each_rtn_value.extend(['',''])
             # XXX self.model may be None when this is a sub field inside a GroupField/UnionField
             if self.model and self.model._meta.document is not None:
-                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+unicode(each_rtn_value[0])+"']"
+                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+str(each_rtn_value[0])+"']"
                 choice_ele = self.model._meta.document.find(xpath)
                 if choice_ele is not None:
                     each_rtn_value[1] = choice_ele.findtext("./verbose_name", default=each_rtn_value[1])
@@ -564,7 +543,7 @@
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self._get_val_from_obj_or_val(obj, val)
         if self.unit_name:
-            return str(value) + ' ' + unicode(self.unit_name)
+            return str(value) + ' ' + str(self.unit_name)
         else:
             return str(value)
                 
@@ -618,14 +597,14 @@
     def _value_to_display(self, obj=None, val=None, style=True, text=True):
         value = self._get_val_from_obj_or_val(obj, val)
         if self.unit_name:
-            return str(value) + ' ' + unicode(self.unit_name)
+            return str(value) + ' ' + str(self.unit_name)
         else:
             return str(value)
 
     def value_split(self, value):
         if not value:
             value = 0
-        return [[unicode(self.verbose_name), int(value)]]
+        return [[str(self.verbose_name), int(value)]]
 
     def default_widget(self, model_instance=None, manager=None, **kwargs):
         value = getattr(model_instance, self.name) if model_instance else None
@@ -643,7 +622,7 @@
                                unit_name=self.unit_name, ajax_url=model_instance.get_ajax_url('field', {'field':self.name, 'type':'lexical'}), **kwargs)
                                
     def get_pseudo_value(self):
-        ran = irandom()
+        ran = random()
         name_list = ['in', 'out', 'Network Traffic']
         inc = False
         if self.verbose_name in name_list:
@@ -797,7 +776,7 @@
             if key in value:
                 rtn_str = field.value_to_display(val=value[key], style=style, text=text)
                 break
-        rtn_str = cgi.escape(rtn_str)
+        rtn_str = html.escape(rtn_str)
         return rtn_str
 
     def value_split(self, value):
@@ -805,7 +784,7 @@
             if key in value:
                 rtn_str = field.value_to_display(val=value[key])
                 break
-        return [[unicode(self.verbose_name), rtn_str]]
+        return [[str(self.verbose_name), rtn_str]]
 
     def default_widget(self, model_instance=None, manager=None, **kwargs):
         return UnionWidget(name=self.name, label=self.verbose_name, help_text=self.help_text,
@@ -905,7 +884,7 @@
     def value_to_rest(self, obj=None, val=None):
         value = self._get_val_from_obj_or_val(obj, val)
         if value:
-            if type(value) in (str, unicode):
+            if type(value) in (str, str):
                 return value
             elif type(value) is dict:
                 data = value.values()
@@ -938,7 +917,7 @@
             value = self.get_default(None)
         
         assert value is not None
-        if type(value) in (str, unicode):
+        if type(value) in (str, str):
             if is_ipv4(value):
                 return {'ipv4':value}
             elif is_ipv6(value):
@@ -950,7 +929,7 @@
 
     def is_empty_value(self, value):
         if value:
-            if type(value) in (str, unicode):
+            if type(value) in (str, str):
                 return False
             elif type(value) is dict:
                 data = value.values()
@@ -966,7 +945,7 @@
     def value_to_rest(self, obj=None, val=None):
         value = self._get_val_from_obj_or_val(obj, val)
         if value:
-            if type(value) in (str, unicode):
+            if type(value) in (str, str):
                 return value
             elif type(value) is dict:
                 data = value.values()
@@ -988,7 +967,7 @@
     def value_to_rest(self, obj=None, val=None):
         value = self._get_val_from_obj_or_val(obj, val)
         if value:
-            if type(value) in (str, unicode):
+            if type(value) in (str, str):
                 return value
             elif type(value) is dict:
                 data = value.values()
@@ -1212,7 +1191,7 @@
                     else:
                         each['_asso_idx'] = int(each['_asso_idx'])
             return value
-        elif type(value) in (str, unicode):#just for restful api, the full format is <id>:<class>, and <id> format is <field1>-<field2>-<field3>
+        elif type(value) in (str, str):#just for restful api, the full format is <id>:<class>, and <id> format is <field1>-<field2>-<field3>
             def instance_id_to_pk(instance_id, target_model):
                 l1, l2 = [], []
                 l1 = [pk_field.name for pk_field in target_model._meta.pk_set]
@@ -1526,7 +1505,7 @@
         rtn_str = ''
         for key, field in self.fields.iteritems():
             rtn_str += key+': '+field.value_to_display(val=value[key])+' '
-        rtn_str = cgi.escape(rtn_str)
+        rtn_str = html.escape(rtn_str)
         return rtn_str
 
     def value_to_rest(self, obj=None, val=None):
@@ -1795,7 +1774,7 @@
             num = (end-start)/freq
             data = []
             TIMEFORMAT='%Y-%m-%d %X'
-            for i in xrange(num):
+            for i in range(num):
                 value = result[2][i][0]
                 if value == None:
                     continue
@@ -1816,7 +1795,7 @@
         if value_limit != None:
             ret['value_limit'] = value_limit
         if file_err:
-            ret['error'] = 'Failed to save data for field '+ unicode(self.verbose_name)
+            ret['error'] = 'Failed to save data for field '+ str(self.verbose_name)
         return ret
     
     def _get_data_old(self, start_time=None, end_time=None, cal_method=None, instance_pk=''):
@@ -1873,7 +1852,7 @@
         # check manager interface is available
         try:
             val = getattr(model_instance, self.attname)
-        except Exception, e:
+        except Exception as e:
             return LineChart(name=self.name, label=self.verbose_name, help_text=self.help_text, error=True, error_msg=str(e), **kwargs)
         # check webui graph is enabled
         webui_graph_mod = get_model('apv', ['system', 'AccessControl'])
@@ -1953,7 +1932,7 @@
         return new_value
 
     def custom_display(self, val):
-        return str(val.get('percent', '0')) + unicode(self.unit_name)
+        return str(val.get('percent', '0')) + str(self.unit_name)
         
     def validate(self, value, model_instance):
         pass
@@ -1974,7 +1953,7 @@
                          ajax_url=model_instance.get_ajax_url('field', {'field':self.name, 'type':'lexical'}), **kwargs)
     
     def get_pseudo_value(self):
-        ran = irandom()
+        ran = random()
         num = ran.randint(0, 100)
         return {'percent':num, 'num':num, 'total':100}
 
@@ -2033,9 +2012,9 @@
     def to_python(self, value):
         if value is None:
             value = self.get_default(None)
-        if isinstance(value, basestring): # or value is None: (value is never None here)
+        if isinstance(value, str): # or value is None: (value is never None here)
             return value
-        return smart_unicode(value)
+        return smart_str(value)
 
 #values: ['__field:xxxx', '__value:xxxx']
 class DynamicEnumField(Field):
@@ -2059,7 +2038,7 @@
             each_rtn_value.extend(['',''])
             # XXX self.model may be None when this is a sub field inside a GroupField/UnionField
             if self.model and self.model._meta.document:
-                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+unicode(each_rtn_value[0])+"']"
+                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+str(each_rtn_value[0])+"']"
                 choice_ele = self.model._meta.document.find(xpath)
                 if choice_ele:
                     each_rtn_value[1] = choice_ele.findtext("./verbose_name", default=each_rtn_value[1])
@@ -2098,7 +2077,7 @@
                 value = get_complex_field(instance, field_name, base_manager)
                 if value:
                     for field, sub_value in value.iteritems():
-                        if type(sub_value) in (str, unicode):
+                        if type(sub_value) in (str, str):
                             sub_value_list = sub_value.split(', ')
                             for each in sub_value_list:
                                ret.append([each, field.value_to_display(val=each)])
@@ -2171,7 +2150,7 @@
             each_rtn_value.extend(['',''])
             # XXX self.model may be None when this is a sub field inside a GroupField/UnionField
             if self.model and self.model._meta.document:
-                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+unicode(each_rtn_value[0])+"']"
+                xpath = "./fieldgrp[@name='"+self.group.name+"']/field[@name='"+self.name+"']/choices/choice[@value='"+str(each_rtn_value[0])+"']"
                 choice_ele = self.model._meta.document.find(xpath)
                 if choice_ele:
                     each_rtn_value[1] = choice_ele.findtext("./verbose_name", default=each_rtn_value[1])
@@ -2210,7 +2189,7 @@
                 value = get_complex_field(instance, field_name, base_manager)
                 if value:
                     for field, sub_value in value.iteritems():
-                        if type(sub_value) in (str, unicode):
+                        if type(sub_value) in (str, str):
                             sub_value_list = sub_value.split(', ')
                             for each in sub_value_list:
                                ret.append([each, field.value_to_display(val=each)])
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/legacycli.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/legacycli.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/legacycli.py	(working copy)
@@ -1,10 +1,10 @@
-from django.utils.datastructures import SortedDict
+from collections import OrderedDict
 from django.conf import settings
 import socket, sys, time, re
 from hive.utils import anlog, aninfo, anerror, andebug, escapeshellarg, HiveWebPipe, _thread_locals, get_current_session
 from hive.exceptions import ModelQueryException
 from djproject.an_settings import FAST_CLI_CMD
-import commands
+import subprocess
 import threading
 import json
 import errno
@@ -53,7 +53,7 @@
                 _thread_locals._hive_socket.setblocking(0)
             try:
                 data = _thread_locals._hive_socket.recv(1024)
-            except socket.error, e:
+            except socket.error as e:
                 err = e.args[0]
                 if err == errno.EAGAIN or err == errno.EWOULDBLOCK:
                     time.sleep(0.1)
@@ -165,7 +165,7 @@
     :param address: IP Address of webui_agent service
     :type  address: str of IP address
     """
-    sess_conn_table = SortedDict()
+    sess_conn_table = OrderedDict()
     creation_counter = 0
 
     def __init__(self, username, sessid=None, address="127.0.0.1"):
@@ -190,16 +190,16 @@
     def _connect(self, timeout=CLI_TIMEOUT):
         try:
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        except socket.error, e:
+        except socket.error as e:
             anerror('an.model.cli', 'Fail to establish CLI connection: %s' % (e))
             raise CLIConnFail
 
         try:
             s.connect((self._address, WEBUI_AGENT_PORT))
-        except socket.gaierror, e:
+        except socket.gaierror as e:
             anerror('an.model.cli', 'Address-related error connecting to server: %s' % e)
             raise CLIConnFail
-        except socket.error, e:
+        except socket.error as e:
             anerror('an.model.cli', 'Connection error: %s' % e)
             raise CLIConnFail
         s.settimeout(timeout)
@@ -246,7 +246,7 @@
             except socket.timeout:
                 self._disconnect()
                 raise CLITimeout
-            except socket.error, e:
+            except socket.error as e:
                 # why connect again ???
                 #self._connect()
                 self._disconnect()
@@ -271,7 +271,7 @@
         
         cmd = '/ca/bin/backend -u ' + username + ' -c ' + cmd        
         cmd = cmd.encode('utf-8') + f_eop
-        (status, output) = commands.getstatusoutput(cmd)
+        (status, output) = subprocess.getstatusoutput(cmd)
         output = output.strip(f_eop)
         if len(args) == 0:
             return output
@@ -740,7 +740,7 @@
     elif isinstance(parser_obj, ANCLIParser):
         try:
             return parser_obj.parse(cmd_output)
-        except CLICmdException, e:
+        except CLICmdException as e:
             andebug('hive.debug', 'raising ModelQueryException with e: %s' % e)
             raise ModelQueryException(e)
     elif type(parser_obj) is list:
@@ -754,7 +754,7 @@
                 continue
             try:
                 res.append(each.parse(cmd_output))
-            except CLICmdException, e:
+            except CLICmdException as e:
                 if e.__class__ != CLICmdNormal:
                     res.append(None)
                     exceptions.append(e)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/loading.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/loading.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/loading.py	(working copy)
@@ -3,9 +3,8 @@
 """
 
 from djproject import an_settings
-from django.core.exceptions import ImproperlyConfigured
-from django.utils.datastructures import SortedDict
-from django.utils.importlib import import_module
+from collections import OrderedDict
+from importlib import import_module
 from django.utils.module_loading import module_has_submodule
 from hive.model.package import ANPackage
 
@@ -17,6 +16,7 @@
 
 __all__ = ('get_apps', 'get_app', 'get_package', 'get_model', 'register_models', 'get_app_errors', 'app_cache_ready')
 
+
 class AppCache(object):
     """
     A cache that stores installed applications and their models. Used to
@@ -26,20 +26,20 @@
     # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531.
     __shared_state = dict(
         # Mapping of app_labels to a the root ANPackage of specific app.
-        app_packages = SortedDict(),
+        app_packages=OrderedDict(),
 
         # Mapping of (app_label,package_path) to a dictionary of model names to model code.
-        app_models = SortedDict(),
+        app_models=OrderedDict(),
 
         # Mapping of app_labels to errors raised when trying to import the app.
-        app_errors = {},
+        app_errors={},
 
         # -- Everything below here is only used when populating the cache --
-        loaded = False,
-        handled = {},
-        postponed = [],
-        nesting_level = 0,
-        write_lock = threading.RLock(),
+        loaded=False,
+        handled={},
+        postponed=[],
+        nesting_level=0,
+        write_lock=threading.RLock(),
     )
 
     def __init__(self):
@@ -82,12 +82,13 @@
         ANPackages. Returns a tree of ANPackages.
         """
         # create an ANPackage for the module
-        new_package = ANPackage(app_name, module) 
+        new_package = ANPackage(app_name, module)
 
         for importer, modname, ispkg in pkgutil.iter_modules(module.__path__):
-            andebug('an.model.loading', "Found submodule of %s: %s (is a package: %s)" % (module.__name__, modname, ispkg))
+            andebug('an.model.loading',
+                    "Found submodule of %s: %s (is a package: %s)" % (module.__name__, modname, ispkg))
             # import the module
-            sub_module = import_module('.'+modname, module.__name__)
+            sub_module = import_module('.' + modname, module.__name__)
 
             if not ispkg:
                 continue
@@ -157,7 +158,7 @@
     def get_apps(self):
         "Returns a list of all installed apps' root packages."
         self._populate()
-        return self.app_packages
+        return OrderedDict(sorted(self.app_packages))
 
     def get_app(self, app_name):
         """
@@ -192,7 +193,7 @@
                 tmp = tmp.sub_packages[each]
         except KeyError:
             return None
-        
+
         return tmp
 
     def get_model(self, app_name, model_path):
@@ -216,14 +217,14 @@
         """
         try:
             for idx, val in enumerate(full_path):
-                package_key = self._label_for(app_name) + '.'.join(full_path[:idx+1])
-                model_name = full_path[idx+1]
+                package_key = self._label_for(app_name) + '.'.join(full_path[:idx + 1])
+                model_name = full_path[idx + 1]
                 if package_key in self.app_models:
                     if model_name in self.app_models[package_key]:
-                        return (self.app_models[package_key][model_name], full_path[idx+2:])
+                        return (self.app_models[package_key][model_name], full_path[idx + 2:])
         except IndexError:
             return (None, None)
-            
+
         return (None, None)
 
     def get_field_from_full_path(self, app_name, full_path):
@@ -238,8 +239,7 @@
         else:
             assert len(rest_path) == 1, 'invalid field full path %s' % (full_path)
             return model._meta.get_field(rest_path[0])
-            
-        
+
     def register_models(self, app_label, package_path, *models):
         """
         Register a set of models as belonging to an package.
@@ -249,11 +249,12 @@
             # Store as 'name: model' pair in a dictionary
             # in the app_models dictionary
             model_name = model._meta.object_name
-            model_dict = self.app_models.setdefault(package_key, SortedDict())
+            model_dict = self.app_models.setdefault(package_key, OrderedDict())
+            model_dict = OrderedDict(sorted(model_dict.items()))
             if model_name in model_dict:
                 continue
             model_dict[model_name] = model
-            
+
             # Register the associations
             for each_field in model._meta.fields:
                 if each_field.type_name == 'asso' and getattr(each_field, 'tgt', None):
@@ -266,8 +267,8 @@
                         if tgt_field:
                             each_field.register_target_asso_while_loading(tgt_field, asso_idx)
                         asso_idx += 1
-                    
 
+
 cache = AppCache()
 
 
@@ -276,10 +277,11 @@
 def get_apps():
     """ Get all loaded apps' root package
 
-    :returns: A ``SortedDict`` of ``ANPackage`` objects
+    :returns: A ``OrderedDict`` of ``ANPackage`` objects
     """
     return cache.get_apps()
 
+
 def get_app(app_name):
     """ Get an app's root package with specific app name
 
@@ -289,10 +291,12 @@
     """
     return cache.get_app(app_name)
 
+
 def get_app_errors():
     """ TODO Gather all exceptions found during loading phase """
     return cache.get_app_errors()
 
+
 def get_model(app_name, model_path):
     """ Get a loaded model class with specific App and Path
 
@@ -304,12 +308,15 @@
     """
     return cache.get_model(app_name, model_path)
 
+
 def get_package(app_name, package_path):
     return cache.get_package(app_name, package_path)
 
+
 def get_model_from_full_path(app_name, full_path):
     return cache.get_model_from_full_path(app_name, full_path)
 
+
 def register_models(app_label, package_path, *models):
     """ Register a model to the package tree, called by ``ANModelBase``
 
@@ -322,10 +329,10 @@
     """
     return cache.register_models(app_label, package_path, *models)
 
+
 def app_cache_ready():
     """ Check whether App cache is already loaded
     
     :returns: True/False
     """
     return cache.app_cache_ready()
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/manager.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/manager.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/manager.py	(working copy)
@@ -1,6 +1,4 @@
 # encoding: utf-8
-from hive.model import signals
-from hive.model.fields import FieldDoesNotExist
 from hive.model.query import * 
 from djproject.an_settings import PSEUDO_MANAGER_SHELF_FILE, CACHE_SWITCH
 import shelve
@@ -10,12 +8,17 @@
 from hive.model.utils import reduce_asso_value_item, get_complex_field, CONDITIONAL_NONE
 import itertools as it
 import inspect
-from django.core import validators
-from django.utils.encoding import smart_unicode
+from django.utils.encoding import smart_str
 from ctypes import *
 from hive.session import current_app
 from cm.lib.libbasic_operation import oper_log
-exec "import %s.company as company" % current_app()
+import json
+from django.db.models.query import QuerySet
+import copy
+
+from hive.model.stats import STAILQ_HEAD
+
+exec("import %s.company as company" % current_app())
 try:
     from hive.model.stats import *
 except:
@@ -191,11 +194,12 @@
             path_list = copy.copy(self._model._meta.path)
             if path_list[0] == "loadbalancing":
                 path_list[0] = "lb"
-            rawdata = getattr(libustat, "ustat_" +  '_'.join(path_list) + "_all")
-            rawdata.restype = POINTER(STAILQ_HEAD)
+            # TODO: Fix Library issue and then uncomment
+            #rawdata = getattr(libustat, "ustat_" +  '_'.join(path_list) + "_all")
+            #rawdata.restype = POINTER(STAILQ_HEAD)
             errcode_ptr = pointer(errcode)
-            rtn_head = getattr(libustat, "ustat_" + '_'.join(path_list) + "_all")(errcode_ptr)
-            return rtn_head
+            #rtn_head = getattr(libustat, "ustat_" + '_'.join(path_list) + "_all")(errcode_ptr)
+            return None
         except:
             return None
 
@@ -774,7 +778,7 @@
         if serializable:
             ret = []
             for action in available_list:
-                t = {'name':action.name, 'verbose_name':unicode(action.verbose_name), 'btn_class':action.btn_class, 'option':[]}
+                t = {'name':action.name, 'verbose_name':str(action.verbose_name), 'btn_class':action.btn_class, 'option':[]}
                 t['url'] = model_instance.get_ajax_url('perform')
                 if action.options:
                     for option in action.options:
@@ -816,10 +820,10 @@
         if action_cls.config_change:
             if not pk_list:
                 mark_expire_all(self._model)
-                oper_log('info', self._model._meta.path[-2], 'The %s action is successfully.' %  unicode(action_cls.verbose_name))
+                oper_log('info', self._model._meta.path[-2], 'The %s action is successfully.' %  str(action_cls.verbose_name))
             else:
                 for each_pk in pk_list:
-                    oper_log('info', self._model._meta.path[-2], 'The %s action is successfully <%s>.' % (unicode(action_cls.verbose_name), self._model.repr_by_pk(each_pk)))
+                    oper_log('info', self._model._meta.path[-2], 'The %s action is successfully <%s>.' % (str(action_cls.verbose_name), self._model.repr_by_pk(each_pk)))
                     mark_expire_one(self._model, each_pk)
         return ret
 
@@ -836,7 +840,7 @@
         for f in self._model._meta.fields:
             if f.type_name == 'asso':
                 tmp = {
-                    'data': unicode(f.verbose_name),
+                    'data': str(f.verbose_name),
                     'pk': f.name,
                     'type': 'Menu',
                     'children': []
@@ -874,7 +878,7 @@
             pks = field._get_val_from_obj(instance)
             if pks:
                 tmp = {
-                        'data': unicode(field.verbose_name),
+                        'data': str(field.verbose_name),
                         'state': 'open',
                         'children': []
                     }
@@ -971,7 +975,7 @@
         
     def get_tree_for_module(self, group=None, order=None, search=None):
         ret = {
-                'data': unicode(self._model._meta.verbose_name),
+                'data': str(self._model._meta.verbose_name),
                 'metadata': {
                     'url': self._model._meta.get_ajax_url('tree'),
                     'page_url': self._model._meta.get_ajax_url('box_module_monitor')
@@ -1093,7 +1097,7 @@
             if fn not in except_field_list:
                 ret_val = get_complex_field(instance, fn, self, 'display_for_list')
                 if ret_val:
-                    value_list = [unicode(x) for x in ret_val.values()]
+                    value_list = [str(x) for x in ret_val.values()]
                     value = ', '.join(value_list)
                     tmp_ret[sub_field['title']] = value
         return tmp_ret
@@ -1117,7 +1121,7 @@
             for field_name in search_dict["search_fields"]:
                 ret_val = get_complex_field(instance, field_name, self, 'display')
                 if ret_val:
-                    value_list = [smart_unicode(x) for x in ret_val.values()]
+                    value_list = [smart_str(x) for x in ret_val.values()]
                     value = ', '.join(value_list)
                     if value.upper().find(search_dict["search_str"].upper()) != -1:
                         return True
@@ -1141,13 +1145,13 @@
             if field:
                 length = len(value1)
                 idx = 0
-                for idx in  xrange(length):
+                for idx in  range(length):
                     if not idx < len(value2):
                         return 1
                     try:
                         ret = field.compare(value1[idx], value2[idx])
                     except:
-                        ret = cmp(value1[idx], value2[idx])
+                        ret = (value1[idx] > value2[idx]) - (value2[idx] < value1[idx])
                     if ret:
                         return ret
                 if len(value2) > length:
@@ -1448,7 +1452,7 @@
         return 'Pseudo Manager for '+ '.'.join(self._model._meta.path) + ' for session %s' % self._session
 
 class ListManager(CLIManager):
-    def _get_config_list(filter_list=None):
+    def _get_config_list(self, filter_list=None):
         raise ManagerImplError('model %s has not implemented _get_config_list', self._model)
 
     def get_config_list(self, start=0, max_num=-1, search=None, filter_list=None, sort_dict=None):
@@ -1462,7 +1466,7 @@
                 if field_name in instance:
                     ret_val = instance[field_name][1]
                     if ret_val:
-                        if smart_unicode(ret_val).upper().find(search_dict["search_str"].upper()) != -1:
+                        if smart_str(ret_val).upper().find(search_dict["search_str"].upper()) != -1:
                             return True
             return False
         # search: {search_str:xxx, search_fields:[field_name1, field_name2, ...]}
@@ -1476,7 +1480,7 @@
                 value1 = instance1[field_name][1]
             if field_name in instance2:
                 value2 = instance2[field_name][1]
-            return cmp(value1, value2)
+            return (value1 > value2) - (value1 < value2)
         if sort_dict:
             if sort_dict["order"] == 'desc':
                 order = True
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/node.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/node.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/node.py	(working copy)
@@ -16,7 +16,7 @@
 
 	def __cmp__(self, other):
 		# This is needed because bisect does not take a comparison function.
-		return cmp(self.creation_counter, other.creation_counter)
+		return (self.creation_counter > other.creation_counter) - (self.creation_counter < other.creation_counter)
 
 	# descriptor as used in models
 	class descriptor(object):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/options.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/options.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/options.py	(working copy)
@@ -10,13 +10,12 @@
 from hive.utils import andebug
 from django.conf import settings
 import hive.model.fields as fields
-#from hive.model.fields import FieldDoesNotExist, FieldGroup
 from hive.model.loading import app_cache_ready, get_model
 from hive.utils import IntRange, nd_iter_coordinate, nd_iter_space, andebug, per_sess_cached_property, clear_per_sess_property_cache, dump_dict, get_current_lang, is_ipv4, is_ipv6
-from django.utils.translation import activate, deactivate_all, get_language, string_concat
-from django.utils.encoding import force_unicode, smart_str
-from django.utils.datastructures import SortedDict
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import activate, deactivate_all, get_language
+from django.utils.encoding import force_str, smart_str
+from collections import OrderedDict
+from django.utils.translation import gettext_lazy as _
 import hive.exceptions as exceptions
 from hive.model.query import DelayedQuery
 from hive.document import get_model_element, get_xml_reference, status_str2obj, DOCUMENT_OK, DOCUMENT_NEW, DOCUMENT_PENDING
@@ -69,9 +68,9 @@
         self.field_group_sequence = []
         self._model = None
         self.local_fields = []
-        self.field_groups = SortedDict()
-        self.indexed_sets = SortedDict()
-        self.unique_sets = SortedDict()
+        self.field_groups = OrderedDict()
+        self.indexed_sets = OrderedDict()
+        self.unique_sets = OrderedDict()
         self.pk_set = []
         self.module_name, self._verbose_name = None, None
         self.verbose_name_plural = None
@@ -143,16 +142,16 @@
         # }
         self.list_stats_options = {}
         # Data structures for class inheritence
-        self.concrete_parents = SortedDict()
-        self.abstract_parents = SortedDict()
-        self.children = SortedDict()
+        self.concrete_parents = OrderedDict()
+        self.abstract_parents = OrderedDict()
+        self.children = OrderedDict()
         self.conditional_deriving_fields = []
         
         self.duplicate_targets = {}
         self.auto_created = False
         self.quantity = '0..65535'
         self.profile = False
-        self._associations = SortedDict() # Reference from association objs to AssoFields
+        self._associations = OrderedDict() # Reference from association objs to AssoFields
 
         # To handle various inheritance situations, we need to track where
         # managers came from (concrete or abstract base classes).
@@ -170,7 +169,7 @@
         #self.document = get_model_element(self.app_label, self.path)
         self._package = None
         self._default_node = None
-        self.button_submit_text = lambda options: _('Create the %s') % unicode(options.verbose_name)
+        self.button_submit_text = lambda options: _('Create the %s') % str(options.verbose_name)
         self.pk_to_id = None
         self.id_to_pk = None
         self.asso_ref_to_instance_id = None
@@ -235,7 +234,7 @@
             # verbose_name_plural is a special case because it uses a 's'
             # by default.
             if self.verbose_name_plural is None:
-                self.verbose_name_plural = string_concat(self.verbose_name, 's')
+                self.verbose_name_plural = self.verbose_name + 's'
 
             self.quantity = IntRange(self.quantity)
 
@@ -244,7 +243,7 @@
             if meta_attrs != {}:
                 raise TypeError("'class Meta' got invalid attribute(s): %s" % ','.join(meta_attrs.keys()))
         else:
-            self.verbose_name_plural = string_concat(self.verbose_name, 's')
+            self.verbose_name_plural = self.verbose_name + 's'
         del self.meta
 
     def _prepare(self, model):
@@ -395,7 +394,7 @@
         """
         lang = get_language()
         deactivate_all()
-        raw = force_unicode(self.verbose_name)
+        raw = force_str(self.verbose_name)
         activate(lang)
         return raw
     verbose_name_raw = property(verbose_name_raw)
@@ -560,7 +559,7 @@
         rtn_list = []
         for each_field in self.fields:
             if each_field.group is None:
-                print 'field group is none: %s' % each_field
+                print('field group is none: %s' % each_field)
             if each_field.group.isstats:
                 continue
             rtn_list.append(each_field)
@@ -826,7 +825,7 @@
         dataset_list = []
         i = 0
         repeated = 0
-        print fieldset
+        print(fieldset)
         while i < count:
             bias_list = it.next()
             dataset = {}
@@ -966,13 +965,13 @@
         ret = {"group":{}, "order":{}, "search":{}}
         for field in self.fields:
             if field.name in self.all_deriving_fields:
-                ret["group"][field.name] = unicode(field.verbose_name)
+                ret["group"][field.name] = str(field.verbose_name)
             elif str(field.indexed).find("group") > -1:
-                ret["group"][field.name] = unicode(field.verbose_name)
+                ret["group"][field.name] = str(field.verbose_name)
             if str(field.indexed).find("order") > -1:
-                ret["order"][field.name] = unicode(field.verbose_name)
+                ret["order"][field.name] = str(field.verbose_name)
             if str(field.indexed).find("search") > -1:
-                ret["search"][field.name] = unicode(field.verbose_name)
+                ret["search"][field.name] = str(field.verbose_name)
 
         return ret
 
@@ -1088,11 +1087,11 @@
                         try:
                             field_name = column['name']
                             field = self.get_field(field_name)
-                            column['title'] = unicode(field.verbose_name)
+                            column['title'] = str(field.verbose_name)
                         except:
                             column['title'] = 'Error:no title for '+ field_name
                     else:
-                         column['title'] = unicode(column['title'])
+                         column['title'] = str(column['title'])
                     if 'defaultContent' not in column:
                         column['defaultContent'] = '/'
                     columns.append(column)
@@ -1104,7 +1103,7 @@
                         for f in g.fields:
                             if f.hidden or f.hide_list:
                                 continue
-                            columns.append({'name':f.attname, 'title': unicode(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
+                            columns.append({'name':f.attname, 'title': str(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
             # For config list, the -1 column is for 'external data'
             if "external_data_enable" not in custom_options or custom_options["external_data_enable"]:
                 columns.append({'title': '', 'name':'external_data_column', 'orderable':False, 'defaultContent':'<div class="more"></div>'})
@@ -1121,11 +1120,11 @@
                         try:
                             field_name = column['name']
                             field = self.get_field(field_name)
-                            column['title'] = unicode(field.verbose_name)
+                            column['title'] = str(field.verbose_name)
                         except:
                             column['title'] = 'Error:no title for '+ field_name
                     else:
-                         column['title'] = unicode(column['title'])
+                         column['title'] = str(column['title'])
                     if 'defaultContent' not in column:
                         column['defaultContent'] = '/'
                     columns.append(column)
@@ -1137,7 +1136,7 @@
                         for f in g.fields:
                             if f.hidden:
                                 continue
-                            columns.append({'name':f.attname, 'title': unicode(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
+                            columns.append({'name':f.attname, 'title': str(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
                 columns.append({'title': '', 'name':'external_data_column', 'orderable':False, 'defaultContent':'<div class="more"></div>'})
         if format:
             return json.dumps(columns)
@@ -1213,7 +1212,7 @@
                         field = self.get_field(name)
                         if field.indexed or field.name in self.all_deriving_fields:
                             if field.type_name == 'enum':
-                                tmp_ret = {'name':field.attname, 'display_name':unicode(field.verbose_name), 'values':[], 'deriving':False}
+                                tmp_ret = {'name':field.attname, 'display_name':str(field.verbose_name), 'values':[], 'deriving':False}
                                 if field.name in self.all_deriving_fields:
                                     tmp_ret['deriving'] = True
                                 for each in field.values:
@@ -1277,11 +1276,11 @@
                                 field = model._meta.get_field(field_name)
                             else:
                                 field = self.get_field(field_name)
-                            column['title'] = unicode(field.verbose_name)
+                            column['title'] = str(field.verbose_name)
                         except:
                             column['title'] = 'Error:no title for '+ field_name
                     else:
-                         column['title'] = unicode(column['title'])
+                         column['title'] = str(column['title'])
                     if 'defaultContent' not in column:
                         column['defaultContent'] = '/'
                     columns.append(column)
@@ -1293,7 +1292,7 @@
                         for f in g.fields:
                             if f.hidden or f.hide_list:
                                 continue
-                            columns.append({'name':f.attname, 'title': unicode(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
+                            columns.append({'name':f.attname, 'title': str(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
             # For config list, the -1 column is for 'external data'
             if "external_data_enable" not in custom_options or custom_options["external_data_enable"]:
                 columns.append({'title': '', 'name':'external_data_column', 'orderable':False, 'defaultContent':'<div class="more"></div>'})
@@ -1317,11 +1316,11 @@
                                 field = model._meta.get_field(field_name)
                             else:
                                 field = self.get_field(field_name)
-                            column['title'] = unicode(field.verbose_name)
+                            column['title'] = str(field.verbose_name)
                         except:
                             column['title'] = 'Error:no title for '+ field_name
                     else:
-                         column['title'] = unicode(column['title'])
+                         column['title'] = str(column['title'])
                     if 'defaultContent' not in column:
                         column['defaultContent'] = '/'
                     columns.append(column)
@@ -1333,7 +1332,7 @@
                         for f in g.fields:
                             if f.hidden:
                                 continue
-                            columns.append({'name':f.attname, 'title': unicode(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
+                            columns.append({'name':f.attname, 'title': str(f.verbose_name), 'defaultContent':'/', 'data':f.attname})
                 columns.append({'title': '', 'name':'external_data_column', 'orderable':False, 'defaultContent':'<div class="more"></div>'})
         if format:
             return json.dumps(columns)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/package.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/package.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/package.py	(working copy)
@@ -2,15 +2,15 @@
 Implements the model package
 """
 import json
-from django.utils.datastructures import SortedDict
-from django.utils.encoding import smart_str, force_unicode, force_text
+from collections import OrderedDict
+from django.utils.encoding import smart_str, force_str
 from hive.utils import anlog, anerror, andebug, ObjCache, per_sess_cached_property, clear_per_sess_property_cache, get_current_lang
 from hive.document import get_package_element, get_xml_reference
 
 def create_tree(package, tree):
     ret = {}
     if tree['type'] == 'Menu':
-        ret['data'] = unicode(tree['name'])
+        ret['data'] = str(tree['name'])
         ret['children'] = []
         for sub_tree in tree['sub_nodes']:
             sub = create_tree(package, sub_tree)
@@ -22,7 +22,7 @@
         for e in model_path[0:-1]:
             tmp = tmp.sub_packages[e]
         model = tmp.models[model_name]
-        ret['data'] = unicode(model._meta.verbose_name)
+        ret['data'] = str(model._meta.verbose_name)
         if model._meta.profile:
             ret['metadata'] = {"url":"/hide_tree", "page_url":model._meta.get_ajax_url('box_instance_monitor')}
         else:
@@ -39,9 +39,9 @@
         self.module = None
         self.name = ''
         self.path = []
-        self.sub_packages = SortedDict()
+        self.sub_packages = OrderedDict()
         self.parent_package = None
-        self.models = SortedDict()
+        self.models = OrderedDict()
         self.verbose_name = ''
         self.help_text  = ''
         self.child_seq = [] # for RESTful API documentation
@@ -106,13 +106,13 @@
 
     @property
     def sub_packages(self):
-        " A ``SortedDict`` of sub package objects "
-        return self._meta.sub_packages
+        " A ``OrderedDict`` of sub package objects "
+        return OrderedDict(sorted(self._meta.sub_packages.items()))
 
     @property
     def models(self):
-        " A ``SortedDict`` of sub model objects "
-        return self._meta.models
+        " A ``OrderedDict`` of sub model objects "
+        return OrderedDict(sorted(self._meta.models.items()))
 
     @property
     def parent_package(self):
@@ -190,14 +190,14 @@
 
     def __repr__(self):
         try:
-            u = force_text(self._meta.verbose_name)
+            u = force_str(self._meta.verbose_name)
         except (UnicodeEncodeError, UnicodeDecodeError):
             u = '[Bad Unicode data]'
         return smart_str(u'<%s object: %s(%s)>' % (self.__class__.__name__, self._meta.name, u))
 
     def __str__(self):
         if hasattr(self._meta, 'verbose_name'):
-            return force_text(self._meta.verbose_name)
+            return force_str(self._meta.verbose_name)
         return '%s object' % self.__class__.__name__
     
     def get_ajax_url(self, param_str=''):            
@@ -207,11 +207,11 @@
         if self._meta.monitor_tree:
             ret = create_tree(self, self._meta.monitor_tree)
         else:
-            ret = {'data': unicode(self._meta.verbose_name), 'children':[]}
+            ret = {'data': str(self._meta.verbose_name), 'children':[]}
             for k in self.models:
                 m = self.models[k]
                 if not m._meta.parents and m._meta.has_statistics:
-                    sub = {'data': unicode(m._meta.verbose_name), 'metadata': {'url': m._meta.get_ajax_url('tree'), "page_url":m._meta.get_ajax_url('box_module_monitor')}}
+                    sub = {'data': str(m._meta.verbose_name), 'metadata': {'url': m._meta.get_ajax_url('tree'), "page_url":m._meta.get_ajax_url('box_module_monitor')}}
                     ret['children'].append(sub)
             for k in self.sub_packages:
                 p = self.sub_packages[k]
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/query.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/query.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/query.py	(working copy)
@@ -25,10 +25,10 @@
                     if not CACHE_SWITCH:
                         # if CACHE_SWITCH, we will clean fields after insert the instance into cache.
                         new_model.clean_fields()
-                except TypeError, e:
+                except TypeError as e:
                     raise
                     #raise ModelQueryException(e.message)
-                except ValidationError, e:
+                except ValidationError as e:
                     raise
                     #raise ModelQueryException(e)
                 # pk field should be cleaned here
@@ -52,7 +52,7 @@
                     compare_left = getattr(instance, field_name)
                     try:
                         compare_right = field.to_python(value)
-                    except ValidationError, e:
+                    except ValidationError as e:
                         compare_right = None
                     andebug('hive.debug', 'Filter determine: left %s, right %s' % (compare_left, compare_right))
                     if field.type_name == 'asso':
@@ -119,7 +119,7 @@
         """
         Retrieves an item or slice from the set of results.
         """
-        if isinstance(k, (slice, int, long)):
+        if isinstance(k, (slice, int)):
             # XXX should return a copied sub-QuerySet when k is a slice
             return self._cache[k]
         elif isinstance(k, str):
@@ -145,9 +145,9 @@
                 try:
                     new_model = model_cls(**each_dict)
                     new_model.clean_fields()
-                except TypeError, e:
+                except TypeError as e:
                     raise ModelQueryException(e.message)
-                except ValidationError, e:
+                except ValidationError as e:
                     raise ModelQueryException(e)
                 # Check PK uniqueness
                 key = '.'.join(model_cls._meta.path) + new_model.pk_str()
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/rest.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/rest.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/rest.py	(working copy)
@@ -1,6 +1,3 @@
-import sys
-import os
-import commands
 from hive.model.loading import get_app
 from hive.model.query import mark_expire_one
 from django.http import Http404, HttpResponse
@@ -10,22 +7,20 @@
 import copy
 import time
 from hive.utils import HiveEnvironment, andebug, url2obj, IntRange
-import urllib
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 import tools.dicttoxml as dicttoxml
 import tools.xmltodict as xmltodict
 from xml.dom.minidom import parseString
-from hive.model.fields.builtin import AssoField2
 from collections import OrderedDict
 from hive.session import current_app
-import sched
 from cm.lib.postgres_db import DB
 from cm.lib.activation_server import ActivationServer
+from ctypes import POINTER, cast
 
 try:
     from hive.model.stats import *
 
-    exec "from %s.rest import *" % current_app()
+    exec("from %s.rest import *" % current_app())
 except:
     pass
 
@@ -47,7 +42,7 @@
             request_dict = dict(self.request.REQUEST)
             return getattr(self, self.method)(**request_dict)
         else:
-            msg = {'msg': unicode(_('The request method is not supported.'))}
+            msg = {'msg': str(_('The request method is not supported.'))}
             raise RestfulException(msg, 501)
 
     def serialize(self, rtn_dict):  # python dict to xml or json
@@ -75,20 +70,20 @@
                         # get a OrderedDict
                         rtn_dict = xmltodict.parse(request_str)["rest"]
                     except:
-                        msg = {'msg': unicode(_('Invalid xml format!'))}
+                        msg = {'msg': str(_('Invalid xml format!'))}
                         raise RestfulException(msg, 400)
 
                 else:
                     try:
                         rtn_dict = json.loads(request_str)
                     except:
-                        msg = {'msg': unicode(_('Invalid json format!'))}
+                        msg = {'msg': str(_('Invalid json format!'))}
                         raise RestfulException(msg, 400)
             else:
                 try:
                     rtn_dict = json.loads(request_str)
                 except:
-                    msg = {'msg': unicode(_('Invalid json format!'))}
+                    msg = {'msg': str(_('Invalid json format!'))}
                     raise RestfulException(msg, 400)
         return rtn_dict
 
@@ -105,7 +100,7 @@
             for group_name, field_group in self.model._meta.field_groups.iteritems():
                 field_list = []
                 for field in field_group.fields:
-                    field_list.append({'field_name': field.name, 'verbose_name': unicode(field.verbose_name)})
+                    field_list.append({'field_name': field.name, 'verbose_name': str(field.verbose_name)})
                 rtn['fieldgroups'].append({'group_name': group_name, 'fields': field_list})
             # get subclasses
             if self.model._meta.children:
@@ -129,14 +124,14 @@
                     groups_str = ', '.join(
                         [group_name for group_name in self.model._meta.field_groups.keys() if group_name != 'default'])
                     msg = {
-                        'msg': unicode(_('No default field group. Please use field group: %s to query.')) % groups_str}
+                        'msg': str(_('No default field group. Please use field group: %s to query.')) % groups_str}
                     raise RestfulException(msg, 404)
                 if each.pk_id():
                     instance_id_dict = {'instance_id': each.pk_id()}
                     each_rtn = OrderedDict(instance_id_dict.items() + each_rtn.items())
                 rtn.append(each_rtn)
             if not rtn:
-                msg = {'msg': unicode(_('The object is not found.'))}
+                msg = {'msg': str(_('The object is not found.'))}
                 raise RestfulException(msg, 404)
         rtn_dict = {self.model._meta.object_name: rtn}
         return self.serialize(rtn_dict)
@@ -155,7 +150,7 @@
             if json_dict:
                 if 'targets' in json_dict:
                     targets_id = json_dict['targets']
-                    if type(targets_id) in (str, unicode):
+                    if type(targets_id) in (str, str):
                         pk_list = self.model._meta.targets_id_to_pk_list(targets_id, True)
                     elif type(targets_id) is list:
                         pk_list = []
@@ -163,7 +158,7 @@
                             each = self.model._meta.targets_id_to_pk_list(each, True)
                             pk_list.extend(each)
                     else:
-                        msg = {'msg': unicode(_('The request body has some errors. Please check it.'))}
+                        msg = {'msg': str(_('The request body has some errors. Please check it.'))}
                         raise RestfulException(msg, 400)
                     json_dict['__pk_list'] = pk_list
                     del json_dict['targets']
@@ -175,7 +170,7 @@
                     asso_field = self.model._meta.get_field(
                         self.model._meta.get_action_by_name(self.action_name).related)
                     asso_model = asso_field.target_end[0].model
-                    if type(asso_targets_id) in (str, unicode):
+                    if type(asso_targets_id) in (str, str):
                         asso_pk_list = asso_model._meta.targets_id_to_pk_list(asso_targets_id, True)
                     elif type(asso_targets_id) is list:
                         asso_pk_list = []
@@ -183,7 +178,7 @@
                             each = asso_model._meta.targets_id_to_pk_list(each, True)
                             asso_pk_list.extend(each)
                     else:
-                        msg = {'msg': unicode(_('The request body has some errors. Please check it.'))}
+                        msg = {'msg': str(_('The request body has some errors. Please check it.'))}
                         raise RestfulException(msg, 400)
                     json_dict['__asso_pk_list'] = asso_pk_list
                     del json_dict['asso_targets']
@@ -196,13 +191,13 @@
                 msg = self.manager.perform_action(self.action_name, json_dict)
                 rtn_dict = msg
             except ActionPerformException as e:
-                msg = {'msg': unicode(_('Perform %s failed: %s.')) % (self.action_name, str(e))}
+                msg = {'msg': str(_('Perform %s failed: %s.')) % (self.action_name, str(e))}
                 raise RestfulException(msg, 500)
             except ModelQueryException as e:
-                msg = {'msg': unicode(_('Perform %s failed: %s.')) % (self.action_name, str(e))}
+                msg = {'msg': str(_('Perform %s failed: %s.')) % (self.action_name, str(e))}
                 raise RestfulException(msg, 500)
             except TypeError:
-                msg = {'msg': unicode(_('The request action is not found.'))}
+                msg = {'msg': str(_('The request action is not found.'))}
                 raise RestfulException(msg, 404)
         else:
             # If this is a virtual super class, add a context variable
@@ -210,7 +205,7 @@
                 try:
                     concrete_model = self.model._meta.get_child_by_field_cond(json_dict)
                 except KeyError:
-                    msg = {'msg': unicode(_('No such child model based on parameter dictionary.'))}
+                    msg = {'msg': str(_('No such child model based on parameter dictionary.'))}
                     raise RestfulException(msg, 404)
                 concrete_manager = concrete_model.get_manager(self.session)
             else:
@@ -220,12 +215,12 @@
             try:
                 new_obj = concrete_model(**json_dict)
             except:
-                msg = {'msg': unicode(_('The request has some errors. Please check it.'))}
+                msg = {'msg': str(_('The request has some errors. Please check it.'))}
                 raise RestfulException(msg, 400)
             try:
                 new_obj.clean_fields()
-            except ValidationError, e:
-                msg = {'msg': unicode(_('Fields validate failed: %s.')) % str(e)}
+            except ValidationError as e:
+                msg = {'msg': str(_('Fields validate failed: %s.')) % str(e)}
                 raise RestfulException(msg, 400)
             try:
                 concrete_manager.insert(new_obj)
@@ -235,7 +230,7 @@
                     rtn = OrderedDict(instance_id_dict.items() + rtn.items())
             except ModelQueryException as e:
                 if e.has_error():
-                    msg = {'msg': unicode(_('Add %s failed: %s.')) % (new_obj, str(e))}
+                    msg = {'msg': str(_('Add %s failed: %s.')) % (new_obj, str(e))}
                     raise RestfulException(msg, 500)
                 else:
                     rtn_dict['msg'] = str(e)
@@ -272,7 +267,7 @@
         try:
             self.object = self.manager.get(pk)
         except KeyError:
-            msg = {'msg': unicode(_('The object is not found.'))}
+            msg = {'msg': str(_('The object is not found.'))}
             raise RestfulException(msg, 404)
 
         # If this is a virtual super class, add a context variable
@@ -289,7 +284,7 @@
             request_dict = dict(self.request.REQUEST)
             return getattr(self, self.method)(**request_dict)
         else:
-            msg = {'msg': unicode(_('The request method is not supported.'))}
+            msg = {'msg': str(_('The request method is not supported.'))}
             raise RestfulException(msg, 501)
 
     def serialize(self, rtn_dict):  # python dict to xml or json
@@ -317,20 +312,20 @@
                         # get a OrderedDict
                         rtn_dict = xmltodict.parse(request_str)["rest"]
                     except:
-                        msg = {'msg': unicode(_('Invalid xml format!'))}
+                        msg = {'msg': str(_('Invalid xml format!'))}
                         raise RestfulException(msg, 400)
 
                 else:
                     try:
                         rtn_dict = json.loads(request_str)
                     except:
-                        msg = {'msg': unicode(_('Invalid json format!'))}
+                        msg = {'msg': str(_('Invalid json format!'))}
                         raise RestfulException(msg, 400)
             else:
                 try:
                     rtn_dict = json.loads(request_str)
                 except:
-                    msg = {'msg': unicode(_('Invalid json format!'))}
+                    msg = {'msg': str(_('Invalid json format!'))}
                     raise RestfulException(msg, 400)
         return rtn_dict
 
@@ -349,7 +344,7 @@
             if self.attribute in field_group_dict.keys():
                 try:
                     rtn = self.object.get_rest_field_dict(group=self.attribute)
-                except ManagerImplError, e:
+                except ManagerImplError as e:
                     if self.object._meta.has_fast_stats_interface:
                         data_type = self.model._meta.stats_mapper_cls
                         ins_head = self.manager.get_stats_fast()
@@ -364,19 +359,19 @@
                             libustat.read_unlock()
                         else:
                             if self.object._meta.profile:
-                                msg = {'msg': unicode(
+                                msg = {'msg': str(
                                     _('Statistics are not found. Please check if the setting is already turned on.'))}
                                 raise RestfulException(msg, 404)
                             else:
-                                msg = {'msg': unicode(_('The object is not found.'))}
+                                msg = {'msg': str(_('The object is not found.'))}
                                 raise RestfulException(msg, 404)
                     else:
-                        msg = {'msg': unicode(_('The object is not found.'))}
+                        msg = {'msg': str(_('The object is not found.'))}
                         raise RestfulException(msg, 404)
             elif self.attribute in field_names:
                 try:
                     rtn[self.attribute] = self.object.get_rest_field(self.attribute)
-                except ManagerImplError, e:
+                except ManagerImplError as e:
                     if self.object._meta.has_fast_stats_interface:
                         data_type = self.model._meta.stats_mapper_cls
                         ins_head = self.manager.get_stats_fast()
@@ -390,17 +385,17 @@
                             libustat.read_unlock()
                         else:
                             if self.object._meta.profile:
-                                msg = {'msg': unicode(
+                                msg = {'msg': str(
                                     _('Statistics are not found. Please check if the setting is already turned on.'))}
                                 raise RestfulException(msg, 404)
                             else:
-                                msg = {'msg': unicode(_('The object is not found.'))}
+                                msg = {'msg': str(_('The object is not found.'))}
                                 raise RestfulException(msg, 404)
                     else:
-                        msg = {'msg': unicode(_('The object is not found.'))}
+                        msg = {'msg': str(_('The object is not found.'))}
                         raise RestfulException(msg, 404)
             else:
-                msg = {'msg': unicode(_('No such field or field group %s.')) % self.attribute}
+                msg = {'msg': str(_('No such field or field group %s.')) % self.attribute}
                 raise RestfulException(msg, 404)
         else:
             rtn = self.object.get_rest_field_dict(withstats=False)
@@ -442,11 +437,11 @@
                         target_manager.delete(pk_list)
                         rtn_dict = {'msg': '%s (%s) is deleted.' % (self.target_id, target_models._meta.verbose_name)}
                     except KeyError as e:
-                        msg = {'msg': unicode(_('Instance is not found in the system: ')) + e.message}
+                        msg = {'msg': str(_('Instance is not found in the system: ')) + e.message}
                         raise RestfulException(msg, 404)
                     except ModelQueryException as e:
                         if e.has_error():
-                            msg = {'msg': unicode(_('Delete failed: %s.')) % str(e)}
+                            msg = {'msg': str(_('Delete failed: %s.')) % str(e)}
                             raise RestfulException(msg, 500)
                         else:
                             msg = {'msg': str(e)}
@@ -456,7 +451,7 @@
                     update_dict = {}
                     old_instance_dict_list = self.concrete_manager.get_field(self.object.pk_dict(), self.attribute)
                     if len(old_instance_dict_list) == 0:
-                        msg = {'msg': unicode(_('Instance is not found in system.'))}
+                        msg = {'msg': str(_('Instance is not found in system.'))}
                         raise RestfulException(msg, 404)
                     else:
                         delete = False
@@ -466,7 +461,7 @@
                                 continue
                             instance_list.append(each)
                         if not delete:
-                            msg = {'msg': unicode(_('Instance is not found in system.'))}
+                            msg = {'msg': str(_('Instance is not found in system.'))}
                             raise RestfulException(msg, 404)
                     update_dict[self.attribute] = instance_list
                     try:
@@ -474,45 +469,45 @@
                         for key, value in update_dict.iteritems():
                             setattr(self.object, key, value)
                     except KeyError as e:
-                        msg = {'msg': unicode(_('No such field: %s.')) % str(e)}
+                        msg = {'msg': str(_('No such field: %s.')) % str(e)}
                         raise RestfulException(msg, 404)
                     try:
                         self.object.clean_fields()
-                    except ValidationError, e:
+                    except ValidationError as e:
                         mark_expire_one(self.concrete_model, self.object.pk_dict())
-                        msg = {'msg': unicode(_('Fields validate failed: %s.')) % str(e)}
+                        msg = {'msg': str(_('Fields validate failed: %s.')) % str(e)}
                         raise RestfulException(msg, 500)
                     try:
                         self.concrete_manager.update(self.object, field_list=update_dict.keys(),
                                                      old_values=old_value_dict)
                         rtn = self.object.get_rest_field_dict(withstats=False)
                         rtn_dict = {self.model._meta.object_name: rtn}
-                    except ModelQueryException, e:
+                    except ModelQueryException as e:
                         if e.has_error():
-                            msg = {'msg': unicode(_('Delete failed: %s.')) % str(e)}
+                            msg = {'msg': str(_('Delete failed: %s.')) % str(e)}
                             raise RestfulException(msg, 500)
                         else:
                             msg = {'msg': str(e)}
                             raise RestfulException(msg, 200)
             else:
-                msg = {'msg': unicode(_('The request resource does not support the DELETE method.'))}
+                msg = {'msg': str(_('The request resource does not support the DELETE method.'))}
                 raise RestfulException(msg, 405)
         elif not self.attribute and not self.target_id:
             try:
                 self.concrete_manager.delete([self.object.pk_dict()])
                 rtn_dict = {'msg': '%s (%s) is deleted.' % (self.object.pk_id(), self.model._meta.verbose_name)}
             except KeyError as e:
-                msg = {'msg': unicode(_('Instance is not found in the system: ')) + e.message}
+                msg = {'msg': str(_('Instance is not found in the system: ')) + e.message}
                 raise RestfulException(msg, 404)
             except ModelQueryException as e:
                 if e.has_error():
-                    msg = {'msg': unicode(_('Delete failed: %s.')) % str(e)}
+                    msg = {'msg': str(_('Delete failed: %s.')) % str(e)}
                     raise RestfulException(msg, 500)
                 else:
                     msg = {'msg': str(e)}
                     raise RestfulException(msg, 200)
         else:
-            msg = {'msg': unicode(_('The request has no field name or target ID.'))}
+            msg = {'msg': str(_('The request has no field name or target ID.'))}
             raise RestfulException(msg, 400)
 
         return self.serialize(rtn_dict)
@@ -540,7 +535,7 @@
             f = self.concrete_model._meta.get_field(self.attribute)
             if f.type_name == 'asso':  # just for asso field
                 if f.is_composition_asso():
-                    msg = {'msg': unicode(_('No PUT function for composition association field.'))}
+                    msg = {'msg': str(_('No PUT function for composition association field.'))}
                     raise RestfulException(msg, 405)
                 else:
                     instance_list = []
@@ -563,30 +558,30 @@
                 if f.editable:
                     setattr(self.object, key, value)
                 else:
-                    msg = {'msg': unicode(
+                    msg = {'msg': str(
                         _('Update failed: The request body include non-editable field(s). Please check it.'))}
                     raise RestfulException(msg, 400)
         except KeyError as e:
-            msg = {'msg': unicode(_('No such field: %s.')) % str(e)}
+            msg = {'msg': str(_('No such field: %s.')) % str(e)}
             raise RestfulException(msg, 404)
         try:
             self.object.clean_fields()
-        except ValidationError, e:
+        except ValidationError as e:
             mark_expire_one(self.concrete_model, self.object.pk_dict())
-            msg = {'msg': unicode(_('Fields validate failed: %s.')) % str(e)}
+            msg = {'msg': str(_('Fields validate failed: %s.')) % str(e)}
             raise RestfulException(msg, 500)
         try:
             self.concrete_manager.update(self.object, field_list=update_dict.keys(), old_values=old_value_dict)
             rtn = self.object.get_rest_field_dict(withstats=False)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             if e.has_error():
-                msg = {'msg': unicode(_('Update failed: %s.')) % str(e)}
+                msg = {'msg': str(_('Update failed: %s.')) % str(e)}
                 raise RestfulException(msg, 500)
             else:
                 rtn_dict['msg'] = str(e)
                 rtn = self.object.get_rest_field_dict(withstats=False)
         except AttributeError as e:
-            msg = {'msg': unicode(_('Update failed: %s.')) % str(e)}
+            msg = {'msg': str(_('Update failed: %s.')) % str(e)}
             raise RestfulException(msg, 500)
 
         if self.object.pk_id():
@@ -627,7 +622,7 @@
                         try:
                             concrete_model = target_models._meta.get_child_by_field_cond(json_dict)
                         except KeyError:
-                            msg = {'msg': unicode(_('No such child model based on parameter dictionary.'))}
+                            msg = {'msg': str(_('No such child model based on parameter dictionary.'))}
                             raise RestfulException(msg, 404)
                         concrete_manager = concrete_model.get_manager(self.session)
                     else:
@@ -640,12 +635,12 @@
                     try:
                         new_obj = concrete_model(**json_dict)
                     except:
-                        msg = {'msg': unicode(_('The request has some errors. Please check it.'))}
+                        msg = {'msg': str(_('The request has some errors. Please check it.'))}
                         raise RestfulException(msg, 400)
                     try:
                         new_obj.clean_fields()
-                    except ValidationError, e:
-                        msg = {'msg': unicode(_('Fields validate failed: %s.')) % str(e)}
+                    except ValidationError as e:
+                        msg = {'msg': str(_('Fields validate failed: %s.')) % str(e)}
                         raise RestfulException(msg, 400)
                     try:
                         concrete_manager.insert(new_obj)
@@ -655,7 +650,7 @@
                             rtn = OrderedDict(instance_id_dict.items() + rtn.items())
                     except ModelQueryException as e:
                         if e.has_error():
-                            msg = {'msg': unicode(_('Add %s failed: %s.')) % (new_obj, str(e))}
+                            msg = {'msg': str(_('Add %s failed: %s.')) % (new_obj, str(e))}
                             raise RestfulException(msg, 500)
                         else:
                             rtn_dict['msg'] = str(e)
@@ -692,21 +687,21 @@
                         for key, value in update_dict.iteritems():
                             setattr(self.object, key, value)
                     except KeyError as e:
-                        msg = {'msg': unicode(_('No such field: %s.')) % str(e)}
+                        msg = {'msg': str(_('No such field: %s.')) % str(e)}
                         raise RestfulException(msg, 404)
                     try:
                         self.object.clean_fields()
-                    except ValidationError, e:
+                    except ValidationError as e:
                         mark_expire_one(self.concrete_model, self.object.pk_dict())
-                        msg = {'msg': unicode(_('Fields validate failed: %s.')) % str(e)}
+                        msg = {'msg': str(_('Fields validate failed: %s.')) % str(e)}
                         raise RestfulException(msg, 500)
                     try:
                         self.concrete_manager.update(self.object, field_list=update_dict.keys(),
                                                      old_values=old_value_dict)
                         rtn = self.object.get_rest_field_dict(withstats=False)
-                    except ModelQueryException, e:
+                    except ModelQueryException as e:
                         if e.has_error():
-                            msg = {'msg': unicode(_('Update failed: %s.')) % str(e)}
+                            msg = {'msg': str(_('Update failed: %s.')) % str(e)}
                             raise RestfulException(msg, 500)
                         else:
                             rtn_dict['msg'] = str(e)
@@ -715,10 +710,10 @@
                         instance_id_dict = {'instance_id': self.object.pk_id()}
                         rtn = OrderedDict(instance_id_dict.items() + rtn.items())
             else:
-                msg = {'msg': unicode(_('The request resource does not support the POST method.'))}
+                msg = {'msg': str(_('The request resource does not support the POST method.'))}
                 raise RestfulException(msg, 405)
         else:
-            msg = {'msg': unicode(_('The request has not association field name.'))}
+            msg = {'msg': str(_('The request has not association field name.'))}
             raise RestfulException(msg, 400)
 
         rtn_dict[self.model._meta.object_name] = rtn
@@ -736,8 +731,8 @@
             dict_data = {}
             try:
                 dict_data = json.loads(post_data)
-            except exceptions, ex:
-                msg = {'contents': unicode(_('post post_data format errors ' + str(exceptions) + str(ex)))}
+            except Exception as ex:
+                msg = {'contents': str(_('post post_data format errors ' + str(ex) + str(ex)))}
                 raise RestfulException(msg, 501)
 
             self.cmd = dict_data["cmd"]
@@ -747,7 +742,7 @@
             request_dict = dict(self.request.REQUEST)
             return getattr(self, self.method)(self.cmd)
         else:
-            msg = {'contents': unicode(_('The request method is not supported.'))}
+            msg = {'contents': str(_('The request method is not supported.'))}
             raise RestfulException(msg, 501)
 
     def POST(self, cmd):
@@ -774,7 +769,7 @@
             output = self.session.cli.cmd("config file %s" % config_filename)
             return json.dumps({'CLI Output': output})
         else:
-            msg = {'msg': unicode(_('The request body batch_cli should not be empty.'))}
+            msg = {'msg': str(_('The request body batch_cli should not be empty.'))}
             raise RestfulException(msg, 501)
 
 
@@ -789,7 +784,7 @@
             request_dict = dict(self.request.REQUEST)
             return getattr(self, self.method)(**request_dict)
         else:
-            msg = {'msg': unicode(_('The request method is not supported.'))}
+            msg = {'msg': str(_('The request method is not supported.'))}
             raise RestfulException(msg, 501)
 
     def serialize(self, rtn_dict):  # python dict to xml or json
@@ -849,20 +844,20 @@
                         # get a OrderedDict
                         rtn_dict = xmltodict.parse(request_str)["rest"]
                     except:
-                        msg = {'msg': unicode(_('Invalid xml format!'))}
+                        msg = {'msg': str(_('Invalid xml format!'))}
                         raise RestfulException(msg, 400)
 
                 else:
                     try:
                         rtn_dict = json.loads(request_str)
                     except:
-                        msg = {'msg': unicode(_('Invalid json format!'))}
+                        msg = {'msg': str(_('Invalid json format!'))}
                         raise RestfulException(msg, 400)
             else:
                 try:
                     rtn_dict = json.loads(request_str)
                 except:
-                    msg = {'msg': unicode(_('Invalid json format!'))}
+                    msg = {'msg': str(_('Invalid json format!'))}
                     raise RestfulException(msg, 400)
         return rtn_dict
 
@@ -887,7 +882,7 @@
                 devices_list = [each[0] for each in devices_data]
                 data['device_ip'] = data['device_ip'].split(":")[-1]
                 if data["device_ip"] in devices_list:
-                    msg = {'code': -1, 'msg': unicode(_('Device has been registered.')), 'registered': True,
+                    msg = {'code': -1, 'msg': str(_('Device has been registered.')), 'registered': True,
                            'status': True, 'device_id': data["device_ip"]}
                 else:
                     if auto_enable:
@@ -937,30 +932,30 @@
                                        'device_id': data["device_ip"]}
                         else:
                             if not auto_license:
-                                msg = {'code': -1, 'msg': unicode(_('There is no vaild license.')), 'registered': False,
+                                msg = {'code': -1, 'msg': str(_('There is no vaild license.')), 'registered': False,
                                        'status': False, 'device_id': data["device_ip"]}
                     else:
                         try:
                             save_sql = "INSERT INTO discover_device(ip, restapi_port, restapi_username, restapi_password, status, version, timestamp, restapi_protocol) Values " + "('%(device_ip)s', '%(restapi_port)d', '%(restapi_username)s', '%(restapi_password)s', '%(status)s', '%(version)s', '%(time)s', '%(restapi_protocol)s')" % data
                             db.execute_sql(save_sql)
-                        except Exception, e:
+                        except Exception as e:
                             if "unique constraint" in str(e):
                                 pass # The device already exists.
                                 # The following approach was deprecated.
                                 # save_sql = "REPLACE INTO discover_device(ip, restapi_port, restapi_username, restapi_password, status, version, timestamp, restapi_protocol) Values " + "('%(device_ip)s', '%(restapi_port)d', '%(restapi_username)s', '%(restapi_password)s', '%(status)s', '%(version)s', '%(time)s', '%(restapi_protocol)s')" % data
                                 # db.execute_sql(save_sql)
                             else:
-                                msg = {'code': -1, 'msg': unicode(_('Insert device into DB failed.')),
+                                msg = {'code': -1, 'msg': str(_('Insert device into DB failed.')),
                                        'registered': False, 'status': False, 'device_id': data["device_ip"]}
                         msg = {'code': 0, 'msg': 'Successfully.', 'registered': False, 'status': True,
                                'device_id': data["device_ip"]}
                 db.close()
             else:
-                msg = {'code': -1, 'msg': unicode(_('No such action %s.')) % self.action_name, 'registered': False,
+                msg = {'code': -1, 'msg': str(_('No such action %s.')) % self.action_name, 'registered': False,
                        'status': False, 'device_id': data["device_ip"]}
                 raise RestfulException(msg, 404)
         else:
-            msg = {'code': -1, 'msg': unicode(_('The request has no action name.')), 'registered': False,
+            msg = {'code': -1, 'msg': str(_('The request has no action name.')), 'registered': False,
                    'status': False, 'device_id': data["device_ip"]}
             raise RestfulException(msg, 400)
         return self.serialize(msg)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/signals.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/signals.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/signals.py	(working copy)
@@ -1,16 +1,16 @@
 from django.dispatch import Signal
 
-class_prepared = Signal(providing_args=["class"])
+class_prepared = Signal()
 
-pre_init = Signal(providing_args=["instance", "args", "kwargs"])
-post_init = Signal(providing_args=["instance"])
+pre_init = Signal()
+post_init = Signal()
 
-pre_save = Signal(providing_args=["instance", "raw", "using"])
-post_save = Signal(providing_args=["instance", "raw", "created", "using"])
+pre_save = Signal()
+post_save = Signal()
 
-pre_delete = Signal(providing_args=["instance", "using"])
-post_delete = Signal(providing_args=["instance", "using"])
+pre_delete = Signal()
+post_delete = Signal()
 
-post_syncdb = Signal(providing_args=["class", "app", "created_models", "verbosity", "interactive"])
+post_syncdb = Signal()
 
-m2m_changed = Signal(providing_args=["action", "instance", "reverse", "model", "pk_set", "using"])
+m2m_changed = Signal()
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/stats.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/stats.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/stats.py	(working copy)
@@ -1,7 +1,6 @@
 from ctypes import *
 import os
 import copy
-from cPickle import *
 import pdb
 
 #libustat = None
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/utils.py	(working copy)
@@ -5,7 +5,7 @@
 from djproject.an_settings import DBHOST,DBPORT
 import copy
 from hive.utils import dump_dict, andebug, anerror, obj2url
-from django.utils.encoding import smart_unicode
+from django.utils.encoding import smart_str
 import threading
 
 TIMEFORMAT='%Y-%m-%d %X'
@@ -311,7 +311,8 @@
                     if sub_ret:
                         for k, v in sub_ret.iteritems():
                             if k in ret:
-                                ret[k] = smart_unicode(ret[k]) + ', ' + smart_unicode(v)
+                                ret[k] = smart_str(ret[k]) + ', ' + smart_str(v)
+                                ret[k] = smart_str(ret[k]) + ', ' + smart_str(v)
                             else:
                                 ret[k] = v
                 return ret
@@ -379,7 +380,7 @@
 
     def fun_sort(value1, value2):
             field_name = sort_dict["field"]
-            return cmp(value1[field_name], value2[field_name])
+            return (value1[field_name] > value2[field_name]) - (value1[field_name] < value2[field_name])
     if sort_dict:
         if sort_dict["order"] == 'desc':
             order = True
@@ -409,7 +410,7 @@
             for field_name in self.field_list:
                 ret_val = get_complex_field(ins, field_name, self.manager, 'display_for_list')
                 if ret_val:
-                    value_list = [unicode(x) for x in ret_val.values()]
+                    value_list = [str(x) for x in ret_val.values()]
                     value = ', '.join(value_list)
                     sub_ret[field_name] = value
                     sub_ret[field_name+'__ori__'] = getattr(ins, field_name, "");
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/validators.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/validators.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/model/validators.py	(working copy)
@@ -1,12 +1,12 @@
 import platform
 import re
 import urllib
-import urllib2
-import urlparse
+import urllib.request as urlopen
+import urllib.parse as urlparse
 
 from hive.exceptions import ValidationError
-from django.utils.translation import ugettext_lazy as _
-from django.utils.encoding import smart_unicode
+from django.utils.translation import gettext_lazy as _
+from django.utils.encoding import smart_str
 from django.utils.ipv6 import is_valid_ipv6_address
 from hive.utils import IntRange
 
@@ -21,8 +21,8 @@
             self.length = length
 
     def __call__(self, value):
-        if type(value) != unicode:
-            value_len = len(unicode(value, 'utf-8'))
+        if type(value) != str:
+            value_len = len(str(value, 'utf-8'))
         else:
             value_len = len(value)
         if not self.length.validate(value_len):
@@ -61,19 +61,19 @@
             self.code = code
 
         # Compile the regex if it was not passed pre-compiled.
-        if isinstance(self.regex, basestring):
+        if isinstance(self.regex, str):
             self.regex = re.compile(self.regex)
 
     def __call__(self, value):
         """
         Validates that the input matches the regular expression.
         """
-        if not self.regex.search(smart_unicode(value)):
+        if not self.regex.search(smart_str(value)):
             raise ValidationError(self.message, code=self.code)
     
     @property
     def js_func(self):
-        return "$HIVE.RegexValidator(new RegExp('%s'), \"%s\")" % (self.regex.pattern, unicode(self.message))
+        return "$HIVE.RegexValidator(new RegExp('%s'), \"%s\")" % (self.regex.pattern, str(self.message))
 
 class MixedCharValidator(object):
     scope = IntRange('min..max')
@@ -92,7 +92,7 @@
             self.code = code
 
         # Compile the regex if it was not passed pre-compiled.
-        if isinstance(self.regex, basestring):
+        if isinstance(self.regex, str):
             self.regex = re.compile(self.regex) 
 
     def __call__(self, value):
@@ -104,12 +104,12 @@
             if not self.scope.validate(value):
                 raise ValidationError(_('The value %(scope_value)d is out of the valid value range: %(scope_limit)s.') % {'scope_value':value,'scope_limit':self.scope})
         except:
-            if not self.regex.search(smart_unicode(value)):
+            if not self.regex.search(smart_str(value)):
                 raise ValidationError(self.message, code=self.code)
                 
     @property
     def js_func(self):
-        return "$HIVE.MixedCharValidator(%d, %d, new RegExp('%s'), \"%s\")" % (self.scope.get_min(), self.scope.get_max(), self.regex.pattern, unicode(self.message))
+        return "$HIVE.MixedCharValidator(%d, %d, new RegExp('%s'), \"%s\")" % (self.scope.get_min(), self.scope.get_max(), self.regex.pattern, str(self.message))
 
 class SingleValueValidator(object):
     message = u'The value must be %s'
@@ -151,10 +151,10 @@
     def __call__(self, value):
         try:
             super(URLValidator, self).__call__(value)
-        except ValidationError, e:
+        except ValidationError as e:
             # Trivial case failed. Try for possible IDN domain
             if value:
-                value = smart_unicode(value)
+                value = smart_str(value)
                 scheme, netloc, path, query, fragment = urlparse.urlsplit(value)
                 try:
                     netloc = netloc.encode('idna') # IDN -> ACE
@@ -188,22 +188,22 @@
             broken_error = ValidationError(
                 _(u'This URL appears to be a broken link.'), code='invalid_link')
             try:
-                req = urllib2.Request(url, None, headers)
+                req = urlopen.Request(url, None, headers)
                 req.get_method = lambda: 'HEAD'
                 #Create an opener that does not support local file access
-                opener = urllib2.OpenerDirector()
+                opener = urlopen.OpenerDirector()
 
                 #Don't follow redirects, but don't treat them as errors either
                 error_nop = lambda *args, **kwargs: True
-                http_error_processor = urllib2.HTTPErrorProcessor()
+                http_error_processor = urlopen.HTTPErrorProcessor()
                 http_error_processor.http_error_301 = error_nop
                 http_error_processor.http_error_302 = error_nop
                 http_error_processor.http_error_307 = error_nop
 
-                handlers = [urllib2.UnknownHandler(),
-                            urllib2.HTTPHandler(),
-                            urllib2.HTTPDefaultErrorHandler(),
-                            urllib2.FTPHandler(),
+                handlers = [urlopen.UnknownHandler(),
+                            urlopen.HTTPHandler(),
+                            urlopen.HTTPDefaultErrorHandler(),
+                            urlopen.FTPHandler(),
                             http_error_processor]
                 try:
                     import ssl
@@ -211,7 +211,7 @@
                     # Python isn't compiled with SSL support
                     pass
                 else:
-                    handlers.append(urllib2.HTTPSHandler())
+                    handlers.append(urlopen.HTTPSHandler())
                 map(opener.add_handler, handlers)
                 if platform.python_version_tuple() >= (2, 6):
                     opener.open(req, timeout=10)
@@ -234,7 +234,7 @@
     def __call__(self, value):
         try:
             super(EmailValidator, self).__call__(value)
-        except ValidationError, e:
+        except ValidationError as e:
             # Trivial case failed. Try for possible IDN domain-part
             if value and u'@' in value:
                 parts = value.split(u'@')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/__init__.py	(working copy)
@@ -4,7 +4,7 @@
 import json
 import copy
 from django.http import HttpResponse
-from django.utils.datastructures import SortedDict
+from collections import OrderedDict
 from django.http import Http404
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from hive.utils import andebug, HiveEnvironment, get_current_session, get_current_lang
@@ -13,9 +13,9 @@
 from django.template import RequestContext
 from djproject.an_settings import THEMES
 from hive.lang import get_langs_info
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.views.decorators.csrf import csrf_exempt
-exec "import %s.company as company" % current_app()
+exec("import %s.company as company" % current_app())
 
 # Available user manual to choose from
 MANUAL = [(_('Application Guide'),'app'), (_('CLI Handbook'), 'cli')]
@@ -30,7 +30,7 @@
         self.app = name if parent is None else parent.app
         self.oem_app = oem_app if parent is None else parent.oem_app
         self._verbose_name = verbose_name
-        self.children = SortedDict()
+        self.children = OrderedDict()
         self.env = None if parent is None else parent.env
         self.path = [] if parent is None else parent.path + [self.name]
         self.icon = icon
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/model.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/model.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/node/model.py	(working copy)
@@ -7,7 +7,7 @@
 
 # turn url params (REQUEST) into pk dict using url2obj
 def param_dict_to_pk_dict(param_dict):
-    return dict(map(lambda (k,v): (k, url2obj(v)), param_dict.iteritems()))
+    return {k: url2obj(v) for k, v in param_dict.items()}
 
 class ModelNode(BaseNode):
     def __init__(self, parent=None, name=None, model=None, **kwargs):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_pdf_report.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_pdf_report.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_pdf_report.py	(working copy)
@@ -1,14 +1,12 @@
 from reportlab.lib.pagesizes import letter
 from reportlab.lib.units import inch
-from reportlab.pdfgen import canvas
 from reportlab.lib import colors
 from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, Image
 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
-from django.utils.translation import ugettext_lazy as _
-import random, time, csv, codecs
 from hive.utils import andebug
 from cm.lib.libbasic_operation import oper_log
 
+report_file_path = "/ca/webui/htdocs/new/src/hive/media/docs/"
 logo_path = "/ca/webui/htdocs/new/src/hive/media/static/Array-Logo-en-2024.jpg"
 
 
\ No newline at end of file
@@ -33,12 +31,12 @@
                                        ('FONT', (0, 0), (-1, -1), 'Helvetica'), ]))
         return table
 
-    def generate_pdf_report(self, filename, report_directory_path, category, llb_data_dict, link_data_summary_dict, start_time, end_time):
+    def generate_pdf_report(self, filename, category, llb_data_dict, link_data_summary_dict, start_time, end_time):
         try:
             """
                 Generate a PDF report with a table and an optional chart.
             """
-            pdf = SimpleDocTemplate(report_directory_path + filename, pagesize=letter)
+            pdf = SimpleDocTemplate(report_file_path + filename, pagesize=letter)
             elements = []
             styles = getSampleStyleSheet()
             styles.add(ParagraphStyle(
\ No newline at end of file
@@ -123,5 +121,4 @@
             pdf.build(elements)
         except Exception as e:
             oper_log('error', 'system', e.message)
-            raise e  # Raise to crash and see error
-
+            raise e  # Raise to crash and see error
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_report.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_report.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/report/generate_report.py	(working copy)
@@ -1,5 +1,4 @@
 import os
-import shutil
 
 from django.http import HttpResponse
 import json
@@ -11,38 +10,19 @@
 from hive.llb_stats import reformat_data_from_db
 from hive.utils import andebug
 
-COMPOSER_DATA_PATH = "/var/opt/composer/reporting/data/"
+report_file_path = "/ca/webui/htdocs/new/src/hive/media/docs/"
 
 
-def is_llb_report(report_id):
+def handle_report_generation(request, path=None):
     try:
-        query_output = LLBStatsDB.query_report_task_details_by_id(report_id)
-        task_name = query_output[0]
-        args = json.loads(query_output[1])
-        tags = json.loads(query_output[2])
-        notify_status = query_output[3]
-        notifications = query_output[4]
-        payload = {
-            "report_id": report_id,
-            "task_name": task_name,
-            "tags": tags,
-            "from_time": args.get('from'),
-            "to_time": args.get('to')
-        }
-        device_category = None
-        link_name = None
-        if "name" in args["subject"] and args["subject"]["name"] == "LLB" and "device_patrol" in tags:
-            device_category = args["subject"]["name"]
-        elif "origin_type" in args["subject"] and args["subject"]["origin_type"] == "LLB" and "service_status" in tags:
-            link_name = args["subject"]["name"]
-            device_category = "LLB"
-        if device_category is not None:
-            payload["category"] = device_category
-        if link_name is not None:
-            payload["link_name"] = link_name
-        if link_name is None and device_category is None:
-            return False, payload
-        return True, payload
+        if path == 'pdf' and request.method == 'POST':
+            return generate_pdf_report(request)
+        else:
+            return HttpResponse(json.dumps({
+                'error': 405,
+                'message': "Invalid HTTP method"
+            }), content_type='application/json')
+
     except ge.GenericError as e:
         oper_log('error', 'system', e.message)
         return ge.handle_exception(e)
@@ -52,80 +32,52 @@
         return ge.handle_exception(e)
 
 
-def handle_report_generation(payload):
+def generate_pdf_report(request):
     try:
-        return generate_pdf_report(payload)
-    except ge.GenericError as e:
-        oper_log('error', 'system', e.message)
-        return ge.handle_exception(e)
-    except Exception as e:
-        oper_log('error', 'system', 'An Unexpected error occurred,  details: {}'.format(e))
-        e.message = 'An Unexpected error occurred,  details: {}'.format(e)
-        return ge.handle_exception(e)
+        req = json.loads(request.body)
 
+        if 'query' in req and 'from_time' in req['query'] and 'to_time' in req['query']:
+            from_time = req['query'].get('from_time', '')
+            to_time = req['query'].get('to_time', '')
+            category = req['query'].get('category')
+            link_name = req['query'].get('link_name', '')
+        else:
+            oper_log('error', 'system',
+                     "Query cannot be empty. Please specify from_time and to_time and link_name in the query.")
+            raise ge.GenericError(400, "Query cannot be empty. Please specify from_time and to_time and link_name in "
+                                       "the query.")
 
-def generate_pdf_report(payload):
-    try:
-        report_id = payload.get("report_id")
-        task_name = payload.get("task_name")
-        from_time = payload.get("from_time", "")
-        to_time = payload.get("to_time", "")
-        category = payload.get("category", "")
-        link_name = payload.get("link_name", "")
-        tags = json.dumps(payload.get("tags", ""))
         if category and str(category).upper() == 'LLB':
             data_dict = get_llb_detailed_data_for_report(from_time, to_time, link_name)
             data_summary_dict = get_link_summary_data_for_report(from_time, to_time)
         else:
-            oper_log('error', 'system', "category cannot be empty. Please specify category in the query.")
-            return {
-                'code': -1,
-                'data': None,
-                'message': "To generate the report, please provide a valid category and try again."
-            }
+            oper_log('error', 'system',
+                     "category cannot be empty. Please specify category in the query.")
+            raise ge.GenericError(400, "category cannot be empty. Please specify category in the query.")
 
         report_generator = Report()
-        report_directory_path = COMPOSER_DATA_PATH + "%d/" % report_id
-        if not os.path.exists(report_directory_path):
-            os.makedirs(report_directory_path)
         intervalStart, intervalEnd = LLBStatsDB.get_time_range(from_time, to_time)
         start_time = time.strftime("%Y_%m_%d_%H_%M_%S", time.localtime(intervalEnd / 1000))
         end_time = time.strftime("%Y_%m_%d_%H_%M_%S",
-                                 time.localtime(intervalStart / 1000))
-        report_name = str(task_name).upper() + "_" + "%s_%s.pdf" % (intervalStart, intervalEnd)
+                      time.localtime(intervalStart / 1000))
+        report_name = str(category).upper() + "_" + "Statistics_Report_from_%s_to_%s.pdf" % (
+        start_time, end_time)
 
-        report_generator.generate_pdf_report(report_name, report_directory_path, category, data_dict, data_summary_dict,
-                                             start_time, end_time)
+        report_generator.generate_pdf_report(report_name, category, data_dict, data_summary_dict, intervalStart, intervalEnd)
+        if os.path.exists(report_file_path + report_name):
+            return HttpResponse(json.dumps({"result": True, "filename": report_name}), content_type='application/json')
+        else:
+            return HttpResponse(json.dumps({"result": False}), content_type='application/json')
 
-        # Update the entry in DB
-        LLBStatsDB.update_report_log(report_directory_path, report_id, report_name, task_name, tags, intervalStart,
-                                     intervalEnd)
+    except ge.GenericError as e:
+        oper_log('error', 'system', e.message)
+        return ge.handle_exception(e)
+    except Exception as e:
+        oper_log('error', 'system', e.message)
+        return HttpResponse(json.dumps({"error": "Error while generating PDF",
+                                        }), content_type='application/json')
 
-        if os.path.exists(report_directory_path + report_name):
-            query_output = LLBStatsDB.query_report_log_id_by_report_id(report_id)
-            report_log_id = query_output[0]
-            task_report_path = COMPOSER_DATA_PATH + "%d/" % report_log_id
-            if not os.path.exists(task_report_path):
-                os.makedirs(task_report_path)
-            shutil.move(report_directory_path + report_name, task_report_path)
 
-            if os.path.exists(task_report_path + report_name):
-                return {
-                    'code': 0,
-                    'data': None,
-                    'message': "The report is being generated. Check report_log."
-                }
-        return {
-            'code': -1,
-            'data': None,
-            'message': "Report generation failed. Please retry."
-        }
-
-    except Exception as exp:
-        oper_log('error', 'system', exp.message)
-        raise Exception("Error while generating PDF")
-
-
 def get_link_summary_data_for_report(from_time, to_time):
     """ Returns data for LLB Summary report """
     try:
@@ -156,7 +108,9 @@
                     }
         else:
             if 'results' in response and all(len(res) == 1 and 'statement_id' in res for res in response['results']):
-                return []
+                return HttpResponse(json.dumps({
+                    "error": "No valid data found"
+                }), content_type='application/json')
             else:
                 return HttpResponse(json.dumps(response), content_type='application/json')
         return llb_dict
@@ -209,11 +163,12 @@
                     }
         else:
             if 'results' in response and all(len(res) == 1 and 'statement_id' in res for res in response['results']):
-                return []
+                return HttpResponse(json.dumps({
+                    "error": "No valid data found"
+                }), content_type='application/json')
             else:
                 return HttpResponse(json.dumps(response), content_type='application/json')
         return llb_dict
     except Exception as e:
         return HttpResponse(json.dumps({"error": "Error while fetching LLB data",
                                         }), content_type='application/json')
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/rest_utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/rest_utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/rest_utils.py	(working copy)
@@ -1,15 +1,16 @@
-from django.core import urlresolvers
-from django.conf.urls import patterns, include, url
-from django.http import HttpResponse
+from django.urls import resolve
+from django.urls import re_path
 
-_rest_sub_urlpatterns = patterns('')
+_rest_sub_urlpatterns = []
 _global_rest_resolver = None
 _rest_sub_url_num = 0
 
+
 def get_rest_url_rule_num():
     global _rest_sub_url_num
     return _rest_sub_url_num
 
+
 def register_rest_url_rules(new_urlpatterns):
     global _rest_sub_urlpatterns
     global _rest_sub_url_num
@@ -18,19 +19,15 @@
     _rest_sub_url_num += 1
     _global_rest_resolver = None
 
+
 def get_rest_process_func(url):
     global _global_rest_resolver
     if not _global_rest_resolver:
         global _rest_sub_urlpatterns
-        urlresolvers.set_urlconf(_rest_sub_urlpatterns)
-        _global_rest_resolver = urlresolvers.RegexURLResolver(r'^/', _rest_sub_urlpatterns)
+        resolve.set_urlconf(_rest_sub_urlpatterns)
+        _global_rest_resolver = resolve.RegexURLResolver(r'^/', _rest_sub_urlpatterns)
     try:
-        hd=_global_rest_resolver.resolve(url)
+        hd = _global_rest_resolver.resolve(url)
         return hd
-    except urlresolvers.Resolver404:
+    except resolve.Resolver404:
         return None
-
-
-
-
-
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/router.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/router.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/router.py	(working copy)
@@ -1,20 +1,14 @@
 # -*- coding: UTF-8 -*-
-import sys
 import os
-import unittest
 from django.http import HttpResponse, HttpResponseRedirect
-from django.utils.datastructures import SortedDict
 from django.http import Http404
-from jinja2 import Environment, PackageLoader, ChoiceLoader
 from hive.utils import andebug, get_current_session, url2obj, upload_receive, UploadResponse, dict_combine, get_device_type, update_frontend_index_html
 from hive.model.loading import get_model, get_app, get_model_from_full_path, get_apps
 from hive.session import ANSession, current_app, temp_session
 from hive.node import AppNode, NodeRedirect
-from django.shortcuts import redirect
 from hive.model.ajax import ModelAjaxHandler, ObjectAjaxHandler
 from hive.model.rest import *
 from hive.model.storage import ModelStorageHandler
-from itertools import izip
 from django.shortcuts import redirect
 import json
 import logging
@@ -26,7 +20,6 @@
 from django.views.decorators.csrf import csrf_exempt
 import csv
 from hive.exceptions import ModelQueryException, ManagerImplError, ValidationError, RestfulException
-import types
 import collections
 from hive.model.manager import ANManager
 from hive.model.utils import CONDITIONAL_NONE
@@ -36,15 +29,15 @@
 from lib.response import StreamingHttpResponse, FileResponse
 from hive.model.legacycli import CLIEnablePassError, RegexParser
 from hive.notification import send_notification
-from django.core.servers.basehttp import FileWrapper
-import mimetypes
 from cm.lib.communication import call_restapi, modify_url, send_https_rest_request, L
 from cm.models.device_mgmt.device import get_rest_info_from_host, get_rest_info_from_device, get_rest_info_from_device_id
 from hive.rest_utils import get_rest_url_rule_num, register_rest_url_rules, get_rest_process_func
 from cm.lib.libbasic_operation import oper_log, rest_log
-import urlparse
+from urllib import parse as urlparse
+from hive.utils import _thread_locals
+
 try:
-    exec "from %s.localfile import localfile_path_map" % current_app()
+    exec("from %s.localfile import localfile_path_map" % current_app())
 except BaseException:
     pass
 
@@ -132,7 +125,7 @@
 
     if pk_list:
         i = iter(pk_list)
-        pk = dict(izip(i, i))
+        pk = dict(zip(i, i))
 
     return (model, action, pk)
 
@@ -257,7 +250,7 @@
                 return response
     else:
         # Check restapi on/off.
-        print "get_rest_url_rule_num", get_rest_url_rule_num()
+        print("get_rest_url_rule_num", get_rest_url_rule_num())
         if get_rest_url_rule_num() == 0:
             response = HttpResponse('Page not found')
             response.status_code = 404
@@ -583,7 +576,7 @@
     #     rsBlocks = json.load(f)
     for block_name in rsBlocks:
         if device_name in rsBlocks[block_name].keys():
-            if service_name in rsBlocks[block_name][unicode(device_name, "utf-8")]:
+            if service_name in rsBlocks[block_name][str(device_name, "utf-8")]:
                 blocks.append(block_name)
     return blocks
 
@@ -633,7 +626,7 @@
 
 
 def format_block(f):
-    res = unicode(f.read(), "utf-8")
+    res = str(f.read(), "utf-8")
     rsBlocks = json.loads(res)
     return rsBlocks
 
@@ -729,7 +722,7 @@
                     else:
                         FILE_CONTENT.append(line)
     except csv.Error as e:
-        return HttpResponse(json.dumps({'is_success': False, 'errorInfo': unicode(e)}), content_type='application/json')
+        return HttpResponse(json.dumps({'is_success': False, 'errorInfo': str(e)}), content_type='application/json')
 
     rsBlocks = {}
     i = 0
@@ -1169,7 +1162,7 @@
                     else:
                         FILE_CONTENT.append(line)
     except csv.Error as e:
-        return HttpResponse(json.dumps({'is_success': False, 'errorInfo': unicode(e)}), content_type='application/json')
+        return HttpResponse(json.dumps({'is_success': False, 'errorInfo': str(e)}), content_type='application/json')
 
     if len(FILE_CONTENT[0]) > 1:
         FILE_CONTENT[0] = [FILE_CONTENT[0][0]]
@@ -1184,7 +1177,7 @@
         except ValidationError as e:
             raise ModelQueryException(e)
         except ModelQueryException as e:
-            return HttpResponse(json.dumps({'is_success': False, 'errorInfo': unicode(e)}), content_type='application/json')
+            return HttpResponse(json.dumps({'is_success': False, 'errorInfo': str(e)}), content_type='application/json')
     else:
         model_list = model_path.split("+")
         for each in model_list:
@@ -1194,7 +1187,7 @@
             except ValidationError as e:
                 raise ModelQueryException(e)
             except ModelQueryException as e:
-                return HttpResponse(json.dumps({'is_success': False, 'errorInfo': unicode(e)}), content_type='application/json')
+                return HttpResponse(json.dumps({'is_success': False, 'errorInfo': str(e)}), content_type='application/json')
 
     return HttpResponse(json.dumps({'is_success': True}), content_type='application/json')
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/search.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/search.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/search.py	(working copy)
@@ -1,12 +1,6 @@
-import sys
 import os
-from django.http import HttpResponse
-from django.utils.datastructures import SortedDict
-from django.utils.importlib import import_module
-from django.http import Http404
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from hive.utils import andebug, HiveEnvironment, Singleton, get_current_session
-from django.template import RequestContext
 import djproject.an_settings as an_settings
 from whoosh.index import create_in
 from whoosh.fields import *
\ No newline at end of file
@@ -17,7 +11,7 @@
 have_no_default_page = {'System Status': '/apv/index/dashboard'}
 
 def my_unicode(src):
-    return unicode(src) if src is not None else ''
+    return str(src) if src is not None else ''
     
 @Singleton
 class ANSearch(object):
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/__init__.py	(working copy)
@@ -1 +1 @@
-__all__ = ['log_location_service', 'backup_service']
\ No newline at end of file
+__all__ = ['log_location_service', 'backup_service']
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service.py	(working copy)
@@ -1,17 +1,14 @@
-import commands
 import os
-import subprocess
 import datetime
 import shutil
 import logging
 import sys
 import json
-import time
 import argparse
 
 sys.path.append('/ca/webui/htdocs/new/src')
 from cm.lib.libbasic_operation import oper_log
-from service_utils import ServiceUtils
+from hive.services.service_utils import ServiceUtils
 from hive.utils import andebug
 from hive.custom_exceptions import generic_exception as ge
 from hive.services.backup_service_utils import fetch_remote_storage_details
@@ -52,6 +49,7 @@
                 os.makedirs(TMP_BACKUP_DIR)
 
             backup_logger.info("Starting backup...")
+            oper_log('info', 'system', "Backup started")
             self.update_backups_db(BACKUP_FILE, "Started", 'insert', destination)
 
             # Backup InfluxDB
@@ -136,6 +134,7 @@
             ServiceUtils.run_command("rm -rf {}".format(backup_file), backup_logger)
 
             backup_logger.info("Backup completed: " + BACKUP_FILE)
+            oper_log('info', 'system', "Backup completed: " + BACKUP_FILE)
 
         except Exception as e:
             self.update_backups_db(BACKUP_FILE, "Failed", 'update')
@@ -263,4 +262,4 @@
     args = parser.parse_args()
 
     backup = BackupConfig()
-    backup.perform_backup(destination=args.backup_target)
\ No newline at end of file
+    backup.perform_backup(destination=args.backup_target)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service_utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service_utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/backup_service_utils.py	(working copy)
@@ -57,4 +57,4 @@
         return result
 
     except Exception as e:
-        raise e
\ No newline at end of file
+        raise e
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/log_location_service.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/log_location_service.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/log_location_service.py	(working copy)
@@ -285,7 +285,7 @@
 
     except Exception as e:
         # Handle unexpected exceptions
-        oper_log('info', 'system', 'An error occurred while fetching archive logs: {}'.format(e))
+        oper_log('info', 'system', 'An error occurred while fetching archive logs')
         e.message = 'An error occurred while fetching archive logs: {}'.format(e)
         raise e
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/restore_service.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/restore_service.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/restore_service.py	(working copy)
@@ -40,6 +40,7 @@
                 os.makedirs(RESTORE_DIR)
 
             backup_file = None
+            oper_log('info', 'system', "Restoring backup: " + filename)
             if destination == ServiceUtils.REMOTE:
                 result = fetch_remote_storage_details()
                 # Persist the data in remote storage
@@ -135,6 +136,7 @@
             ServiceUtils.run_command("rsync -av {}/logs/ /var/log/".format(RESTORE_DIR), restore_logger)
 
             restore_logger.info("Restore completed")
+            oper_log('info', 'system', "Restore completed")
 
             time.sleep(5)
             os.system("shutdown -r +1")
@@ -154,4 +156,4 @@
                         'error': 400,
                         'message': "Exception while restoring backup. Not a valid backup file"
                     })
-            tar.extractall(RESTORE_DIR)
\ No newline at end of file
+            tar.extractall(RESTORE_DIR)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(working copy)
@@ -9,8 +9,6 @@
 from cm.lib.libbasic_operation import oper_log
 from hive.utils import andebug, get_current_session
 from hive.services.service_utils import ServiceUtils
-from hive.session import ANSession
-from lib.crontab import CronTab
 from cm.lib.postgres_db import DB
 
 # Configure Logging
@@ -34,22 +32,24 @@
         time_str = hours + ':' + minutes
         if not data:
             insert_sql = """INSERT INTO backup_schedule 
-                (frequency, time, day_of_the_month, day_of_the_week, month) 
-                VALUES ('{}', '{}', {}, {}, {})""".format(
+                (frequency, time, day_of_the_month, day_of_the_week, month, destination) 
+                VALUES ('{}', '{}', {}, {}, {}, '{}')""".format(
                 frequency, time_str,
                 "NULL" if day_of_the_month is None else day_of_the_month,
                 "NULL" if day_of_the_week is None else day_of_the_week,
-                "NULL" if month is None else month
+                "NULL" if month is None else month,
+                ServiceUtils.LOCAL if backup_target is None else str(backup_target)
             )
             db.execute_sql(insert_sql)
         else:
             row_id = data[0][0]
             update_sql = """UPDATE backup_schedule set frequency='{}', time='{}', day_of_the_month={}, day_of_the_week={},
-            month={} where id = {}""".format(
+            month={}, destination='{}' where id = {}""".format(
                 frequency, time_str,
                 "NULL" if day_of_the_month is None else day_of_the_month,
                 "NULL" if day_of_the_week is None else day_of_the_week,
                 "NULL" if month is None else month,
+                ServiceUtils.LOCAL if backup_target is None else str(backup_target),
                 row_id
             )
             db.execute_sql(update_sql)
@@ -189,11 +189,12 @@
     """ Deploys the scheduled backup job details """
     try:
         db = DB.get_connected_db()
-        fetchall_sql = '''SELECT frequency, time, day_of_the_month, day_of_the_week, month  FROM backup_schedule'''
+        fetchall_sql = '''SELECT frequency, time, day_of_the_month, day_of_the_week, month, destination
+          FROM backup_schedule'''
         data = db.fetchall(fetchall_sql)
 
         if data:
-            key = ['frequency', 'time', 'day_of_the_month', 'day_of_the_week', 'month']
+            key = ['frequency', 'time', 'day_of_the_month', 'day_of_the_week', 'month', 'destination']
             values = list(data[0])
 
             # Convert `datetime.time` to a string (HH:MM format)
@@ -201,10 +202,9 @@
                 values[1] = values[1].strftime("%H:%M")  # Convert to HH:MM string
 
             result = dict(zip(key, values))
-        else:
-            result = None
 
-        if result:
+            # Rename 'destination' to 'backup_target'
+            result['backup_target'] = result.pop('destination')
             return HttpResponse(json.dumps(result),
                                 content_type="application/json")
         else:
@@ -215,4 +215,4 @@
         backup_cron_logger.error("Fetching Schedule Backup details failed! " + str(e))
         oper_log('error', 'system', "Exception while fetching scheduled backup details.")
         message = 'Exception while fetching scheduled backup details,  details: {}'.format(e.message)
-        raise ge.GenericError(500, message)
\ No newline at end of file
+        raise ge.GenericError(500, message)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/service_utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/service_utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/service_utils.py	(working copy)
@@ -39,4 +39,4 @@
                 subprocess.check_call(command, shell=True)
         except subprocess.CalledProcessError as e:
             logger.info("Error executing: " + str(e))
-            raise
\ No newline at end of file
+            raise
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/session.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/session.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/session.py	(working copy)
@@ -1,4 +1,4 @@
-from django.utils.datastructures import SortedDict
+import os
 from django.conf import settings
 from djproject import an_settings
 import socket, sys, time
\ No newline at end of file
@@ -10,7 +10,7 @@
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from django.http import HttpResponse
 from django.template import RequestContext
-import auth
+from . import auth
 from django.shortcuts import redirect
 from hive.preference import *
 from hive.utils import HiveEnvironment, andebug, _thread_locals
\ No newline at end of file
@@ -18,12 +18,11 @@
 from hive.auth import *
 from hive.notification import send_notification
 from contextlib import contextmanager
-import commands
 from django.views.decorators.csrf import csrf_exempt
 from datetime import timedelta
 from cm.lib.libbasic_operation import oper_log
+import json
 
-
 class ANSession(object):
     _session_pool = {}
 
\ No newline at end of file
@@ -204,7 +203,7 @@
                 response.set_cookie('django_language', session.pref.get_default_lang())
                 response.set_cookie('hive_sess', session.sessid)
                 # response.set_cookie('ComposerUICookie', 'f1f713c9e000f5d3f280adbd124df4f5')
-                response.set_cookie('csrf_token', unicode(django_ctx['csrf_token']))
+                response.set_cookie('csrf_token', str(django_ctx['csrf_token']))
                 return response
             else:
                 env = HiveEnvironment(loader=PackageLoader('hive', 'templates'))
\ No newline at end of file
@@ -297,7 +296,7 @@
                 session.enable_password_checked = True
                 user_info = {
                     "django_language": session.pref.get_default_lang(),
-                    "csrf_token": unicode(django_ctx['csrf_token']),
+                    "csrf_token": str(django_ctx['csrf_token']),
                     "hive_key": str(ret),
                     "current_user": username
                 }
\ No newline at end of file
@@ -320,7 +319,7 @@
                 response.set_cookie('django_language', session.pref.get_default_lang(), secure=True)
                 response.set_cookie('hive_sess', session.sessid, secure=True)
                 # response.set_cookie('ComposerUICookie', 'f1f713c9e000f5d3f280adbd124df4f5')
-                response.set_cookie('csrf_token', unicode(django_ctx['csrf_token']), secure=True)
+                response.set_cookie('csrf_token', str(django_ctx['csrf_token']), secure=True)
                 response.set_cookie('hive_key', ret, secure=True)
                 response.set_cookie('current_user', username, secure=True)
                 oper_log('info', 'login', 'User <%s> login successfully.' % username)
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/shared.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/shared.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/shared.py	(working copy)
@@ -21,7 +21,7 @@
     'ftps':990
 }
 
-def custom_404_view(request):
+def custom_404_view(request, exception):
     sess = get_current_session()
     django_ctx = RequestContext(request)
     env = HiveEnvironment(loader=ChoiceLoader([PackageLoader('hive', 'templates')]))
\ No newline at end of file
@@ -30,7 +30,7 @@
                    
     return HttpResponse(template.render(ctx))
 
-def custom_500_view(request):
+def custom_500_view(request, exception):
     sess = get_current_session()
     django_ctx = RequestContext(request)
     env = HiveEnvironment(loader=ChoiceLoader([PackageLoader('hive', 'templates')]))
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/storage.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/storage.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/storage.py	(working copy)
@@ -2,7 +2,7 @@
 from django.http import HttpResponse, Http404
 from djproject.an_settings import CMDATA
 import json
-import httplib
+import http.client
 import subprocess
 import os
 # import time
\ No newline at end of file
@@ -92,7 +92,9 @@
 def getdirsize(dir):
     size = 0
     for root, dirs, files in os.walk(dir):
-        size += sum([os.path.getsize(os.path.join(root, name)) for name in files])
+        size += sum(os.path.getsize(os.path.join(root, name))
+                    for name in files
+                    if os.path.isfile(os.path.join(root, name)))
     return size
 
 
\ No newline at end of file
@@ -113,7 +115,7 @@
                 path['size'] = getdirsize(path['path'])
             elif path['type'] == "es_query":
                 try:
-                    httpClient = httplib.HTTPConnection(CMDATA['ELASTICSEARCH_IP'], str(CMDATA['ELASTICSEARCH_PORT']),
+                    httpClient = http.client.HTTPConnection(CMDATA['ELASTICSEARCH_IP'], str(CMDATA['ELASTICSEARCH_PORT']),
                                                         True, timeout=300)
                     httpClient.request("GET", path['path'])
                     response = httpClient.getresponse()
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/test/listpackage.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/test/listpackage.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/test/listpackage.py	(working copy)
@@ -1,14 +1,14 @@
 from hive.model.loading import get_app
-from django.utils.encoding import smart_text, force_text
+from django.utils.encoding import force_str
 
 root = get_app('apv')
 
 def display_package(pkg, level=0):
     for k, v in pkg.models.iteritems():
         #print smart_text(getattr(v._meta, 'verbose_name', ''))
-        print '----'*level, str(k), '(' + force_text(getattr(v._meta, 'verbose_name', '')) + ')'
+        print('----'*level, str(k), '(' + force_str(getattr(v._meta, 'verbose_name', '')) + ')')
     for k, v in pkg.sub_packages.iteritems():
-        print '===='*level, str(k), '(' + str(v) + ')'
+        print('===='*level, str(k), '(' + str(v) + ')')
         display_package(v, level+1)
 
 display_package(root)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/tzmap.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/tzmap.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/tzmap.py	(working copy)
@@ -1,67 +1,68 @@
 # auto-generated by tzmap.c
-from django.utils.datastructures import SortedDict
-tzmap_orig = SortedDict([
-    ('Asia', SortedDict([
-        ('Afganistan', SortedDict([
+from collections import OrderedDict
+
+tzmap_orig = OrderedDict(sorted([
+    ('Asia', OrderedDict([
+        ('Afganistan', OrderedDict([
             ('Kabul', None)
         ])),
-        ('Armenia', SortedDict([
+        ('Armenia', OrderedDict([
             ('Yerevan', None)
         ])),
-        ('Azerbaijan', SortedDict([
+        ('Azerbaijan', OrderedDict([
             ('Baku', None)
         ])),
-        ('Beirut', SortedDict([
+        ('Beirut', OrderedDict([
             ('Beirut', None)
         ])),
-        ('Bangladesh', SortedDict([
+        ('Bangladesh', OrderedDict([
             ('Dhaka', None)
         ])),
-        ('Bahrain', SortedDict([
+        ('Bahrain', OrderedDict([
             ('Bahrain', None)
         ])),
-        ('Bhutan', SortedDict([
+        ('Bhutan', OrderedDict([
             ('Thimpu', None)
         ])),
-        ('Brunei', SortedDict([
+        ('Brunei', OrderedDict([
             ('Brunei', None)
         ])),
-        ('China', SortedDict([
+        ('China', OrderedDict(sorted([
             ('Most of China(GMT+08:00)', None),
             ('Taiwan Time', None),
-        ])),
-        ('Cambodia', SortedDict([
+        ]))),
+        ('Cambodia', OrderedDict([
             ('Phnom_Penh', None)
         ])),
-        ('Cyprus', SortedDict([
+        ('Cyprus', OrderedDict([
             ('Famagusta', None),
             ('Nicosia', None)
         ])),
-        ('Georgia', SortedDict([
+        ('Georgia', OrderedDict([
             ('Tbilisi', None)
         ])),
-        ('India', SortedDict([
+        ('India', OrderedDict([
             ('Kolkata', None),
         ])),
-        ('Indonesia', SortedDict([
+        ('Indonesia', OrderedDict(sorted([
             ('Indonesia - Jakarta Time', None),
             ('Indonesia - Jayapura Time', None),
             ('Indonesia - Makassar Time', None),
             ('Indonesia - Pontianak Time', None),
-        ])),
-        ('Iraq', SortedDict([
+        ]))),
+        ('Iraq', OrderedDict([
             ('Baghdad', None)
         ])),
-        ('Iran', SortedDict([
+        ('Iran', OrderedDict([
             ('Tehran', None)
         ])),
-        ('Japan', SortedDict([
+        ('Japan', OrderedDict([
             ('Japan Time', None),
         ])),
-        ('Jordan', SortedDict([
+        ('Jordan', OrderedDict([
             ('Amman', None)
         ])),
-        ('Kazakhstan', SortedDict([
+        ('Kazakhstan', OrderedDict(sorted([
             ('Almaty Time', None),
             ('Aqtau Time', None),
             ('Aqtobe Time', None),
@@ -69,160 +70,160 @@
             ('Oral Time', None),
             ('Qostanay Time', None),
             ('Qyzylorda Time', None)
-        ])),
-        ('Kyrgyzstan', SortedDict([
+        ]))),
+        ('Kyrgyzstan', OrderedDict([
             ('Bishkek', None)
         ])),
-        ('Kuwait', SortedDict([
+        ('Kuwait', OrderedDict([
             ('Kuwait', None)
         ])),
-        ('Macao', SortedDict([
+        ('Macao', OrderedDict([
             ('Macau', None)
         ])),
-        ('Malaysia', SortedDict([
+        ('Malaysia', OrderedDict(sorted([
             ('Malaysia - Kuala Lumpur Time', None),
             ('Malaysia - Kuching Time', None),
-        ])),
-        ('Myanmar', SortedDict([
+        ]))),
+        ('Myanmar', OrderedDict([
             ('Yangon', None)
         ])),
-        ('Mongolia', SortedDict([
+        ('Mongolia', OrderedDict(sorted([
             ('Choibalsan Time', None),
             ('Hovd Time', None),
             ('Ulaanbaatar Time', None)
-        ])),
-        ('Nepal', SortedDict([
+        ]))),
+        ('Nepal', OrderedDict([
             ('Katmandu', None)
         ])),
-        ('North Korea Republic', SortedDict([
+        ('North Korea Republic', OrderedDict([
             ('Pyongyang', None)
         ])),
-        ('Pakistan', SortedDict([
+        ('Pakistan', OrderedDict([
             ('Karachi', None)
         ])),
-        ('Philippines', SortedDict([
+        ('Philippines', OrderedDict([
             ('Philippines Time', None),
         ])),
-        ('Palestine', SortedDict([
+        ('Palestine', OrderedDict(sorted([
             ('Gaza Time', None),
             ('Hebron Time', None)
-        ])),
-        ('Oman', SortedDict([
+        ]))),
+        ('Oman', OrderedDict([
             ('Muscat', None)
         ])),
-        ('Saudiarabia', SortedDict([
+        ('Saudiarabia', OrderedDict([
             ('Riyadh', None)
         ])),
-        ('South Korea', SortedDict([
+        ('South Korea', OrderedDict([
             ('South Korea Time', None),
         ])),
-        ('Singapore', SortedDict([
+        ('Singapore', OrderedDict([
             ('Singapore Time', None),
         ])),
-        ('Syria', SortedDict([
+        ('Syria', OrderedDict([
             ('Damascus', None)
         ])),
-        ('Srilanka', SortedDict([
+        ('Srilanka', OrderedDict([
             ('Colombo', None)
         ])),
-        ('Tajikistan', SortedDict([
+        ('Tajikistan', OrderedDict([
             ('Dushanbe', None)
         ])),
-        ('Thailand', SortedDict([
+        ('Thailand', OrderedDict([
             ('Thailand Time', None),
         ])),
-        ('Taiwan', SortedDict([
+        ('Taiwan', OrderedDict([
             ('Taipei', None)
         ])),
-        ('Turkmenistan', SortedDict([
+        ('Turkmenistan', OrderedDict([
             ('Ashgabat', None)
         ])),
-        ('Timor-Leste', SortedDict([
+        ('Timor-Leste', OrderedDict([
             ('Dili', None)
         ])),
-        ('Vietnam', SortedDict([
+        ('Vietnam', OrderedDict([
             ('Vietnam Time', None),
         ])),
-        ('United Arab Emirates', SortedDict([
+        ('United Arab Emirates', OrderedDict([
             ('United Arab Emirates Time', None),
         ])),
-        ('Uzbekistan', SortedDict([
+        ('Uzbekistan', OrderedDict(sorted([
             ('Tashkent Time', None),
             ('Samarkand', None)
-        ])),
-        ('Yemen', SortedDict([
+        ]))),
+        ('Yemen', OrderedDict([
             ('Aden', None)
         ])),
-        ('Qatar', SortedDict([
+        ('Qatar', OrderedDict([
             ('Qatar', None)
         ])),
     ])),
-    ('Europe', SortedDict([
-        ('Austria', SortedDict([
+    ('Europe', OrderedDict([
+        ('Austria', OrderedDict([
             ('Austria Time', None),
         ])),
-        ('Belgium', SortedDict([
+        ('Belgium', OrderedDict([
             ('Brussels', None)
         ])),
-        ('Denmarkg', SortedDict([
+        ('Denmarkg', OrderedDict([
             ('Denmarkg Time', None),
         ])),
-        ('France', SortedDict([
+        ('France', OrderedDict([
             ('France Time', None),
         ])),
-        ('Finland', SortedDict([
+        ('Finland', OrderedDict([
             ('Finland Time', None),
         ])),
-        ('Germany', SortedDict([
+        ('Germany', OrderedDict([
             ('Germany Time', None),
         ])),
-        ('Greece', SortedDict([
+        ('Greece', OrderedDict([
             ('Greece Time', None),
         ])),
-        ('Hungary', SortedDict([
+        ('Hungary', OrderedDict([
             ('Budapest', None)
         ])),
-        ('Israel', SortedDict([
+        ('Israel', OrderedDict([
             ('Israel Time', None),
         ])),
-        ('Italy', SortedDict([
+        ('Italy', OrderedDict([
             ('Italy Time', None),
         ])),
-        ('Ukraine', SortedDict([
+        ('Ukraine', OrderedDict([
             ('Kiev', None)
         ])),
-        ('Russia', SortedDict([
+        ('Russia', OrderedDict([
             ('Moscow', None)
         ])),
-        ('Netherland', SortedDict([
+        ('Netherland', OrderedDict([
             ('Netherland Time', None),
         ])),
-        ('Norway', SortedDict([
+        ('Norway', OrderedDict([
             ('Norway Time', None),
         ])),
-        ('Spain', SortedDict([
+        ('Spain', OrderedDict([
             ('Spain Time', None),
         ])),
-        ('Sweden', SortedDict([
+        ('Sweden', OrderedDict([
             ('Sweden Time', None),
         ])),
-        ('Switzerland', SortedDict([
+        ('Switzerland', OrderedDict([
             ('Switzerland Time', None),
         ])),
-        ('United Kingdom', SortedDict([
+        ('United Kingdom', OrderedDict(sorted([
             ('Great Britain', None),
             ('Northern Ireland', None),
             ('Scotland', None),
-        ])),
-        ('Portugal', SortedDict([
+        ]))),
+        ('Portugal', OrderedDict([
             ('Portugal Time', None),
         ])),
-        ('Turkey', SortedDict([
+        ('Turkey', OrderedDict([
             ('Istanbul', None)
         ])),
     ])),
-    ('North America', SortedDict([
-        ('Canada', SortedDict([
+    ('North America', OrderedDict([
+        ('Canada', OrderedDict(sorted([
             ('Newfoundland Island', None),
             ('Atlantic Time - Nova Scotia (most places), NB, W Labrador, E Quebec & PEI', None),
             ('Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971', None),
@@ -245,8 +246,8 @@
             ('Pacific Time - west British Columbia', None),
             ('Pacific Time - south Yukon', None),
             ('Pacific Time - north Yukon', None),
-        ])),
-        ('United States', SortedDict([
+        ]))),
+        ('United States', OrderedDict(sorted([
             ('Eastern Time', None),
             ('Eastern Time - Michigan - most locations', None),
             ('Eastern Time - Kentucky - Louisville area', None),
@@ -268,10 +269,10 @@
             ('Alaska Time - west Alaska', None),
             ('Aleutian Islands', None),
             ('Hawaii', None),
-        ])),
+        ]))),
     ])),
-    ('Oceania', SortedDict([
-        ('Australia', SortedDict([
+    ('Oceania', OrderedDict(sorted([
+        ('Australia', OrderedDict(sorted([
             ('Lord Howe Island', None),
             ('Tasmania', None),
             ('Victoria', None),
@@ -282,128 +283,128 @@
             ('South Australia', None),
             ('Northern Territory', None),
             ('Western Australia', None),
-        ])),
-        ('New Zealand', SortedDict([
+        ]))),
+        ('New Zealand', OrderedDict([
             ('New Zealand', None),
         ])),
-        ('Samoa', SortedDict([
+        ('Samoa', OrderedDict([
             ('Apia', None)
         ])),
-        ('Fiji', SortedDict([
+        ('Fiji', OrderedDict([
             ('Fiji', None)
         ])),
-        ('Honolulu', SortedDict([
+        ('Honolulu', OrderedDict([
             ('Honolulu', None)
         ])),
-    ])),
-    ('Africa', SortedDict([
-        ('Algeria', SortedDict([
+    ]))),
+    ('Africa', OrderedDict([
+        ('Algeria', OrderedDict([
             ('Algiers', None)
         ])),
-        ('Angola', SortedDict([
+        ('Angola', OrderedDict([
             ('Luanda', None)
         ])),
-        ('Benin', SortedDict([
+        ('Benin', OrderedDict([
             ('Porto-Novo', None)
         ])),
-        ('Burkina Faso', SortedDict([
+        ('Burkina Faso', OrderedDict([
             ('Ouagadougou', None)
         ])),
-        ('Burundi', SortedDict([
+        ('Burundi', OrderedDict([
             ('Bujumbura', None)
         ])),
-        ('Bangui', SortedDict([
+        ('Bangui', OrderedDict([
             ('Bangui', None)
         ])),
-        ('Cameroon', SortedDict([
+        ('Cameroon', OrderedDict([
             ('Douala', None)
         ])),
-        ('Congo', SortedDict([
+        ('Congo', OrderedDict([
             ('Lubumbashi', None)
         ])),
-        ('Djibouti', SortedDict([
+        ('Djibouti', OrderedDict([
             ('Djibouti', None)
         ])),
-        ('Equatorial Guinea', SortedDict([
+        ('Equatorial Guinea', OrderedDict([
             ('Malabo', None)
         ])),
-        ('Eritrea', SortedDict([
+        ('Eritrea', OrderedDict([
             ('Asmara', None)
         ])),
-        ('Ethiopia', SortedDict([
+        ('Ethiopia', OrderedDict([
             ('Addis_Ababa', None)
         ])),
-        ('Egypt', SortedDict([
+        ('Egypt', OrderedDict([
             ('Egypt Time', None)
         ])),
-        ('Morocco', SortedDict([
+        ('Morocco', OrderedDict([
             ('Morocco Time', None)
         ])),
-        ('Gabon', SortedDict([
+        ('Gabon', OrderedDict([
             ('Libreville', None)
         ])),
-        ('Gambia', SortedDict([
+        ('Gambia', OrderedDict([
             ('Banjul', None)
         ])),
-        ('Ghana', SortedDict([
+        ('Ghana', OrderedDict([
             ('Accra', None)
         ])),
-        ('Guinea', SortedDict([
+        ('Guinea', OrderedDict([
             ('Conakry', None)
         ])),
-        ('Guinea-Bissau', SortedDict([
+        ('Guinea-Bissau', OrderedDict([
             ('Bissau', None)
         ])),
-        ('Ivory Coast', SortedDict([
+        ('Ivory Coast', OrderedDict([
             ('Abidjan', None)
         ])),
-        ('Namibia', SortedDict([
+        ('Namibia', OrderedDict([
             ('Windhoek', None)
         ])),
-        ('Nigeria', SortedDict([
+        ('Nigeria', OrderedDict([
             ('Lagos', None)
         ])),
-        ('Niger', SortedDict([
+        ('Niger', OrderedDict([
             ('Niamey', None)
         ])),
-        ('Mali', SortedDict([
+        ('Mali', OrderedDict([
             ('Bamako', None)
         ])),
-        ('Mozambique', SortedDict([
+        ('Mozambique', OrderedDict([
             ('Maputo', None)
         ])),
-        ('Mauritania', SortedDict([
+        ('Mauritania', OrderedDict([
             ('Nouakchott', None)
         ])),
-        ('Blantyre', SortedDict([
+        ('Blantyre', OrderedDict([
             ('Blantyre', None)
         ])),
-        ('Kenya', SortedDict([
+        ('Kenya', OrderedDict([
             ('Nairobi', None)
         ])),
-        ('Senegal', SortedDict([
+        ('Senegal', OrderedDict([
             ('Dakar', None)
         ])),
-        ('South Africa', SortedDict([
+        ('South Africa', OrderedDict([
             ('South Africa Time', None)
         ])),
-        ('Sudan', SortedDict([
+        ('Sudan', OrderedDict([
             ('Khartoum', None)
         ])),
-        ('South Sudan', SortedDict([
+        ('South Sudan', OrderedDict([
             ('Juba', None)
         ])),
-        ('Togo', SortedDict([
+        ('Togo', OrderedDict([
             ('Lome', None)
         ])),
-        ('Tunis', SortedDict([
+        ('Tunis', OrderedDict([
             ('Tunis', None)
         ])),
-        ('Uganda', SortedDict([
+        ('Uganda', OrderedDict([
             ('Kampala', None)
         ])),
-        ('Zambia', SortedDict([
+        ('Zambia', OrderedDict([
             ('Lusaka', None)
         ])),
     ])),
-])
+]))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/utils.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/utils.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/utils.py	(working copy)
@@ -2,18 +2,18 @@
 import copy
 from jinja2 import Environment
 import uuid, base64
-import json
 import urllib
 import threading
 import ctypes
 import collections
-from django.utils.datastructures import SortedDict
+from collections import OrderedDict
 _thread_locals = threading.local()
 import json, os
 from django.http import HttpResponse
-from django.utils.translation import ugettext_lazy, ungettext_lazy, string_concat, get_language
+from django.utils.translation import gettext_lazy, ngettext_lazy, get_language
+from django.utils.text import format_lazy
 import djproject.an_settings 
-import Queue
+import queue
 import time
 import hashlib
 from djproject.an_settings import *
@@ -40,11 +40,11 @@
 
 def toint(symbol, parent):
     if symbol == '*' or symbol == 'max':
-        return parent.get_max() if parent else sys.maxint
+        return parent.get_max() if parent else sys.maxsize
     elif symbol == 'min':
-        return parent.get_min() if parent else (-sys.maxint-1)
+        return parent.get_min() if parent else (-sys.maxsize-1)
     else:
-        return long(symbol)
+        return int(symbol)
 
 class IntRange(object):
     """ IntRange object
@@ -67,12 +67,12 @@
             self._parse()
         
     def _parse(self):
-        last_parsed = (-sys.maxint-1)
+        last_parsed = (-sys.maxsize-1)
         for each_scope in self._string.split('|'):
             scope_list = each_scope.strip().split('..')
             if len(scope_list) == 1:
                 if scope_list[0] == '*':
-                    scope_list = [0, sys.maxint]
+                    scope_list = [0, sys.maxsize]
                 elif is_number(scope_list[0]):
                     scope_list.append(scope_list[0])
                 else:
@@ -459,8 +459,8 @@
         self.globals['uuid4'] = uuid.uuid4
         self.globals['sys'] = sys
         self.globals['getattr'] = getattr
-        self.globals['gettext'] = ugettext_lazy
-        self.globals['ngettext'] = ungettext_lazy
+        self.globals['gettext'] = gettext_lazy
+        self.globals['ngettext'] = ngettext_lazy
         self.globals['get_current_lang'] = get_current_lang
         self.filters['jsvar'] = jsvar
         self.filters['escapejs'] = escapejs
@@ -469,10 +469,10 @@
         self.filters['url2obj'] = url2obj
         self.filters['obj2url'] = obj2url
         self.filters['json_dumps'] = json_dumps
-        self.filters['escape_url'] = urllib.quote
+        self.filters['escape_url'] = urllib.parse.quote
 
 def convert_keys_to_string(data):
-    if isinstance(data, basestring):
+    if isinstance(data, str):
         return str(data)
     elif isinstance(data, collections.Mapping):
         return dict(map(convert_keys_to_string, data.iteritems()))
@@ -501,12 +501,12 @@
     return json.dumps(new_dict, sort_keys=True)
 
 def url2obj(url_str):
-    if type(url_str) not in (unicode, str):
+    if type(url_str) not in (str, str):
         return url_str
-    return json.loads(urllib.unquote(url_str))
+    return json.loads(urllib.parse.unquote(url_str))
     
 def obj2url(obj):
-    return urllib.quote(json.dumps(obj))
+    return urllib.parse.quote(json.dumps(obj))
 
 def json_dumps(obj):
     return json.dumps(obj, skipkeys=True, default=repr)
@@ -594,9 +594,9 @@
     if _tzmap_cache is not None:
         return _tzmap_cache
         
-    tzmap = [SortedDict([
+    tzmap = [OrderedDict(sorted([
                 ('GMT', {'parent':None, 'type':'item'}),
-            ]), SortedDict([]), SortedDict([])]
+            ])), OrderedDict([]), OrderedDict([])]
     for continent_name, continent in tzmap_orig.iteritems():
         tzmap[0][continent_name] = {'parent':None, 'type':'menu'} # no other info for now
         for country_name, country in continent.iteritems():
@@ -688,7 +688,7 @@
         else:
             self._pipeid = HiveWebPipe.gen_random_pipeid()
         self._stop = False
-        self.data = Queue.Queue()
+        self.data = queue.queue()
         self._post_data = ''
         HiveWebPipe._pipe_pool[self._pipeid] = self
 
@@ -778,13 +778,13 @@
     span_class = []
     for each_style in style_str.split():
         if each_style.startswith('fa'):
-            rtn = string_concat('<i class="fa %s"></i>&nbsp;' % each_style, rtn)
+            rtn = format_lazy('<i class="fa {}"></i>&nbsp;{}', each_style, rtn)
         else:
             span_class.append(each_style)
     if span_class:
-        rtn = string_concat('<span class="%s">' % ' '.join(span_class), rtn, '</span>')
+        rtn = format_lazy('<span class="{}">{}{}</span>', ' '.join(span_class), rtn, '')
     # force update the text(might be lazy trans) into unicode
-    return unicode(rtn)
+    return str(rtn)
 
 
 def get_frontend_file_path(result, root, suffix):
@@ -865,12 +865,14 @@
     html = ''
     with open(djproject.an_settings.index_html_path, 'r') as f:
         html = f.read()
-    begin = html.index('<!-- INSERT BEGIN -->')
-    end = html.index('<!-- INSERT END -->') + len('<!-- INSERT END -->')
+
+    begin = html.find('<!-- INSERT BEGIN -->')
+    end = html.find('<!-- INSERT END -->') + len('<!-- INSERT END -->')
+    end = end + len('<!-- INSERT END -->')
     to_replace = html[begin:end]
     new = '\n'
     m = hashlib.md5()
-    m.update(str(time.time()))
+    m.update(str(time.time()).encode('utf-8'))
     random = m.hexdigest()
     for each in css_list:
         new += '        <link rel="stylesheet" href="%s?v=%s">\n'% (each, random)
@@ -880,7 +882,7 @@
     new += '        <!-- INSERT END -->'
     html = html.replace(to_replace, new)
     with open(djproject.an_settings.index_html_path, 'wb+') as f:
-        f.write(html)
+        f.write(html.encode('utf-8'))
 
 def get_device_type(device_type):
     _type = None
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/widgets/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/widgets/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/widgets/__init__.py	(working copy)
@@ -1,38 +1,32 @@
-import sys
-import os
-import unittest
 import json
-from django.http import HttpResponse
-from django.utils.datastructures import SortedDict
-from django.http import Http404
-from jinja2 import Environment, PackageLoader, ChoiceLoader
-from hive.utils import andebug
-import copy
 
+
 class BaseWidget(object):
-	_macro_name = ''
-	_id = 0
-	def __init__(self, name=None):
-	    self.name = name
-	    self._id = BaseWidget._id
-	    BaseWidget._id = BaseWidget._id + 1
+    _macro_name = ''
+    _id = 0
 
-	@property
-	def id(self):
-	    return hex(self._id)
+    def __init__(self, name=None):
+        self.name = name
+        self._id = BaseWidget._id
+        BaseWidget._id = BaseWidget._id + 1
 
-	def render(self, macro_base, js_hook, options={}):
-	    return getattr(macro_base, self._macro_name)(self, js_hook, options)
-	
-	@property
-	def to_json(self):
-	    ret = {}
-	    for k, v in self.__dict__.iteritems(): 
-	        if isinstance(v, (str, unicode, int, long, float, bool, dict)):
-	            ret[k] = v
-	    ret['id'] = self.id
-	    return json.dumps(ret, skipkeys=True)
+    @property
+    def id(self):
+        return hex(self._id)
 
+    def render(self, macro_base, js_hook, options={}):
+        return getattr(macro_base, self._macro_name)(self, js_hook, options)
+
+    @property
+    def to_json(self):
+        ret = {}
+        for k, v in self.__dict__.iteritems():
+            if isinstance(v, (str, unicode, int, long, float, bool, dict)):
+                ret[k] = v
+        ret['id'] = self.id
+        return json.dumps(ret, skipkeys=True)
+
+
 class FormWidget(BaseWidget):
     def __init__(self, name=None, label='', help_text='', validators=None, value=None, editable=True):
         super(FormWidget, self).__init__(name)
@@ -41,7 +35,7 @@
         self.validators = validators
         self.value = value
         self.editable = editable
-        
+
     @property
     def value_str(self):
         if self.value is None:
@@ -62,7 +56,8 @@
         ret['id'] = self.id
         ret['label'] = unicode(self.label)
         return json.dumps(ret, skipkeys=True, default=repr)
-        
+
+
 class StatusWidget(BaseWidget):
     def __init__(self, name=None, label='', help_text='', ajax_url='', refresh_freq=3000):
         super(StatusWidget, self).__init__(name)
@@ -70,7 +65,7 @@
         self.help_text = help_text
         self.refresh_freq = refresh_freq
         self.ajax_url = ajax_url
-    
+
     @property
     def to_json(self):
         ret = {}
@@ -80,7 +75,8 @@
         ret['id'] = self.id
         ret['label'] = unicode(self.label)
         return json.dumps(ret, skipkeys=True)
-    
+
+
 class StatisticsWidget(BaseWidget):
     def __init__(self, name=None, label='', help_text='', ajax_url=''):
         super(StatisticsWidget, self).__init__(name)
@@ -96,4 +92,4 @@
                 ret[k] = v
         ret['id'] = self.id
         ret['label'] = unicode(self.label)
-        return json.dumps(ret, skipkeys=True)
\ No newline at end of file
+        return json.dumps(ret, skipkeys=True)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/cookie.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/cookie.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/cookie.py	(working copy)
@@ -3,8 +3,8 @@
 import sys
 
 from django.utils import six
-from lib.encoding import force_str
-from django.utils.six.moves import http_cookies
+from django.utils.encoding import force_str
+import http.cookies as http_cookies
 
 # Some versions of Python 2.7 and later won't need this encoding bug fix:
 _cookie_encodes_correctly = http_cookies.SimpleCookie().value_encode(';') == (';', '"\\073"')
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/encoding.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/encoding.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/encoding.py	(working copy)
@@ -9,11 +9,9 @@
 from django.utils import six
 from django.utils.functional import Promise
 from django.utils.six.moves.urllib.parse import quote, unquote
+from urllib.parse import unquote_to_bytes
 
-if six.PY3:
-    from urllib.parse import unquote_to_bytes
 
-
 class DjangoUnicodeDecodeError(UnicodeDecodeError):
     def __init__(self, obj, *args):
         self.obj = obj
@@ -42,7 +40,7 @@
     return force_text(s, encoding, strings_only, errors)
 
 
-_PROTECTED_TYPES = six.integer_types + (type(None), float, Decimal,
+_PROTECTED_TYPES = int + (type(None), float, Decimal,
     datetime.datetime, datetime.date, datetime.time)
 
 
@@ -63,21 +61,16 @@
     If strings_only is True, don't convert (some) non-string-like objects.
     """
     # Handle the common case first for performance reasons.
-    if issubclass(type(s), six.text_type):
+    if issubclass(type(s), str):
         return s
     if strings_only and is_protected_type(s):
         return s
     try:
-        if not issubclass(type(s), six.string_types):
-            if six.PY3:
-                if isinstance(s, bytes):
-                    s = six.text_type(s, encoding, errors)
-                else:
-                    s = six.text_type(s)
-            elif hasattr(s, '__unicode__'):
-                s = six.text_type(s)
+        if not issubclass(type(s), str):
+            if isinstance(s, bytes):
+                s = six.text_type(s, encoding, errors)
             else:
-                s = six.text_type(bytes(s), encoding, errors)
+                s = six.text_type(s)
         else:
             # Note: We use .decode() here, instead of six.text_type(s, encoding,
             # errors), so that if s is a SafeBytes, it ends up being a
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/response.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/response.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/response.py	(working copy)
@@ -10,15 +10,13 @@
 from django.conf import settings
 from django.core import signals, signing
 from django.core.serializers.json import DjangoJSONEncoder
-from lib.cookie import SimpleCookie
-from django.utils import six, timezone
-from lib.encoding import (
-    force_bytes, force_str, force_text, iri_to_uri,
+from http.cookies import SimpleCookie
+from django.utils import timezone
+from django.utils.encoding import (
+    force_bytes, force_str
 )
-from django.utils.http import cookie_date
-from django.utils.six.moves import map
-from django.utils.six.moves.http_client import responses
-from django.utils.six.moves.urllib.parse import urlparse
+import email.utils
+from http.client import responses
 
 _charset_from_content_type_re = re.compile(r';\s*charset=(?P<charset>[^\s;]+)', re.I)
 
\ No newline at end of file
@@ -27,7 +25,7 @@
     pass
 
 
-class HttpResponseBase(six.Iterator):
+class HttpResponseBase:
     """
     An HTTP response base class with dictionary-accessed headers.
 
\ No newline at end of file
@@ -95,10 +93,7 @@
         ]
         return b'\r\n'.join(headers)
 
-    if six.PY3:
-        __bytes__ = serialize_headers
-    else:
-        __str__ = serialize_headers
+    __bytes__ = serialize_headers
 
     def _convert_to_charset(self, value, charset, mime_encode=False):
         """Converts headers key/value to ascii/latin-1 native strings.
\ No newline at end of file
@@ -107,26 +102,18 @@
         `value` can't be represented in the given charset, MIME-encoding
         is applied.
         """
-        if not isinstance(value, (bytes, six.text_type)):
+        if not isinstance(value, (bytes, str)):
             value = str(value)
         if ((isinstance(value, bytes) and (b'\n' in value or b'\r' in value)) or
-                isinstance(value, six.text_type) and ('\n' in value or '\r' in value)):
+                isinstance(value, str) and ('\n' in value or '\r' in value)):
             raise BadHeaderError("Header values can't contain newlines (got %r)" % value)
         try:
-            if six.PY3:
-                if isinstance(value, str):
-                    # Ensure string is valid in given charset
-                    value.encode(charset)
-                else:
-                    # Convert bytestring using given charset
-                    value = value.decode(charset)
+            if isinstance(value, str):
+                # Ensure string is valid in given charset
+                value.encode(charset)
             else:
-                if isinstance(value, str):
-                    # Ensure string is valid in given charset
-                    value.decode(charset)
-                else:
-                    # Convert unicode string to given charset
-                    value = value.encode(charset)
+                # Convert bytestring using given charset
+                value = value.decode(charset)
         except UnicodeError as e:
             if mime_encode:
                 # Wrapping in str() is a workaround for #12422 under Python 2.
\ No newline at end of file
@@ -193,8 +180,8 @@
             self.cookies[key]['max-age'] = max_age
             # IE requires expires, so set it if hasn't been already.
             if not expires:
-                self.cookies[key]['expires'] = cookie_date(time.time() +
-                                                           max_age)
+                expire_time = time.time() + max_age
+                self.cookies[key]['expires'] = email.utils.formatdate(expire_time, usegmt=True)
         if path is not None:
             self.cookies[key]['path'] = path
         if domain is not None:
\ No newline at end of file
@@ -230,7 +217,7 @@
         # - when self._charset != 'utf-8' it re-encodes the content
         if isinstance(value, bytes):
             return bytes(value)
-        if isinstance(value, six.text_type):
+        if isinstance(value, str):
             return bytes(value.encode(self.charset))
 
         # Handle non-string types (#16494)
\ No newline at end of file
@@ -294,10 +281,7 @@
         """Full HTTP message, including headers, as a bytestring."""
         return self.serialize_headers() + b'\r\n\r\n' + self.content
 
-    if six.PY3:
-        __bytes__ = serialize
-    else:
-        __str__ = serialize
+    __bytes__ = serialize
 
     @property
     def content(self):
\ No newline at end of file
@@ -306,7 +290,7 @@
     @content.setter
     def content(self, value):
         # Consume iterators upon assignment to allow repeated iteration.
-        if hasattr(value, '__iter__') and not isinstance(value, (bytes, six.string_types)):
+        if hasattr(value, '__iter__') and not isinstance(value, (bytes, str)):
             if hasattr(value, 'close'):
                 self._closable_objects.append(value)
             value = b''.join(self.make_bytes(chunk) for chunk in value)
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/__init__.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/__init__.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/__init__.py	(working copy)
@@ -3,8 +3,8 @@
 Released under the MIT license.
 """
 
-import encoder
-import decoder
+from . import encoder
+from . import decoder
 
 __version__ = "0.10.0"
 _spec_ = "0.5.0"
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/decoder.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/decoder.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/decoder.py	(working copy)
@@ -4,7 +4,7 @@
 import re
 import sys
 
-from tz import TomlTz
+from .tz import TomlTz
 
 if sys.version_info < (3,):
     _range = xrange  # noqa: F821
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/encoder.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/encoder.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/toml/encoder.py	(working copy)
@@ -2,7 +2,7 @@
 import re
 import sys
 
-from decoder import InlineTableDict
+from .decoder import InlineTableDict
 
 if sys.version_info >= (3,):
     unicode = str
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/composer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/composer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/composer.py	(working copy)
@@ -1,8 +1,8 @@
 __all__ = ['Composer', 'ComposerError']
 
-from error import MarkedYAMLError
-from events import *
-from nodes import *
+from .error import MarkedYAMLError
+from .events import *
+from .nodes import *
 
 class ComposerError(MarkedYAMLError):
     pass
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/constructor.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/constructor.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/constructor.py	(working copy)
@@ -8,8 +8,8 @@
     'ConstructorError'
 ]
 
-from error import *
-from nodes import *
+from .error import *
+from .nodes import *
 
 import datetime
 
\ No newline at end of file
@@ -164,7 +164,7 @@
             key = self.construct_object(key_node, deep=deep)
             try:
                 hash(key)
-            except TypeError, exc:
+            except TypeError as exc:
                 raise ConstructorError("while constructing a mapping", node.start_mark,
                         "found unacceptable key (%s)" % exc, key_node.start_mark)
             value = self.construct_object(value_node, deep=deep)
\ No newline at end of file
@@ -322,12 +322,12 @@
         value = self.construct_scalar(node)
         try:
             return str(value).decode('base64')
-        except (binascii.Error, UnicodeEncodeError), exc:
+        except (binascii.Error, UnicodeEncodeError) as exc:
             raise ConstructorError(None, None,
                     "failed to decode base64 data: %s" % exc, node.start_mark)
 
     timestamp_regexp = re.compile(
-            ur'''^(?P<year>[0-9][0-9][0-9][0-9])
+            r'''^(?P<year>[0-9][0-9][0-9][0-9])
                 -(?P<month>[0-9][0-9]?)
                 -(?P<day>[0-9][0-9]?)
                 (?:(?:[Tt]|[ \t]+)
\ No newline at end of file
@@ -521,7 +521,7 @@
         return self.construct_scalar(node)
 
     def construct_python_long(self, node):
-        return long(self.construct_yaml_int(node))
+        return int(self.construct_yaml_int(node))
 
     def construct_python_complex(self, node):
        return complex(self.construct_scalar(node))
\ No newline at end of file
@@ -536,7 +536,7 @@
         if unsafe:
             try:
                 __import__(name)
-            except ImportError, exc:
+            except ImportError as exc:
                 raise ConstructorError("while constructing a Python module", mark,
                         "cannot find module %r (%s)" % (name.encode('utf-8'), exc), mark)
         if name not in sys.modules:
\ No newline at end of file
@@ -556,7 +556,7 @@
         if unsafe:
             try:
                 __import__(module_name)
-            except ImportError, exc:
+            except ImportError as exc:
                 raise ConstructorError("while constructing a Python object", mark,
                         "cannot find module %r (%s)" % (module_name.encode('utf-8'), exc), mark)
         if module_name not in sys.modules:
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/cyaml.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/cyaml.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/cyaml.py	(working copy)
@@ -6,10 +6,10 @@
 
 from _yaml import CParser, CEmitter
 
-from constructor import *
+from .constructor import *
 
-from serializer import *
-from representer import *
+from .serializer import *
+from .representer import *
 
 from resolver import *
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/dumper.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/dumper.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/dumper.py	(working copy)
@@ -1,10 +1,10 @@
 
 __all__ = ['BaseDumper', 'SafeDumper', 'Dumper']
 
-from emitter import *
-from serializer import *
-from representer import *
-from resolver import *
+from .emitter import *
+from .serializer import *
+from .representer import *
+from .resolver import *
 
 class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/emitter.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/emitter.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/emitter.py	(working copy)
@@ -10,8 +10,8 @@
 
 import sys
 
-from error import YAMLError
-from events import *
+from .error import YAMLError
+from .events import *
 
 has_ucs4 = sys.maxunicode > 0xffff
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/loader.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/loader.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/loader.py	(working copy)
@@ -1,12 +1,12 @@
 
 __all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
 
-from reader import *
-from scanner import *
-from parser import *
-from composer import *
-from constructor import *
-from resolver import *
+from .reader import *
+from .scanner import *
+from .parser import *
+from .composer import *
+from .constructor import *
+from .resolver import *
 
 class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/parser.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/parser.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/parser.py	(working copy)
@@ -61,10 +61,9 @@
 
 __all__ = ['Parser', 'ParserError']
 
-from error import MarkedYAMLError
-from tokens import *
-from events import *
-from scanner import *
+from .error import MarkedYAMLError
+from .tokens import *
+from .events import *
 
 class ParserError(MarkedYAMLError):
     pass
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/reader.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/reader.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/reader.py	(working copy)
@@ -17,7 +17,7 @@
 
 __all__ = ['Reader', 'ReaderError']
 
-from error import YAMLError, Mark
+from .error import YAMLError, Mark
 
 import codecs, re, sys
 
\ No newline at end of file
@@ -71,7 +71,7 @@
         self.index = 0
         self.line = 0
         self.column = 0
-        if isinstance(stream, unicode):
+        if isinstance(stream, str):
             self.name = "<unicode string>"
             self.check_printable(stream)
             self.buffer = stream+u'\0'
\ No newline at end of file
@@ -124,7 +124,7 @@
     def determine_encoding(self):
         while not self.eof and len(self.raw_buffer) < 2:
             self.update_raw()
-        if not isinstance(self.raw_buffer, unicode):
+        if not isinstance(self.raw_buffer, str):
             if self.raw_buffer.startswith(codecs.BOM_UTF16_LE):
                 self.raw_decode = codecs.utf_16_le_decode
                 self.encoding = 'utf-16-le'
\ No newline at end of file
@@ -160,7 +160,7 @@
                 try:
                     data, converted = self.raw_decode(self.raw_buffer,
                             'strict', self.eof)
-                except UnicodeDecodeError, exc:
+                except UnicodeDecodeError as exc:
                     character = exc.object[exc.start]
                     if self.stream is not None:
                         position = self.stream_pointer-len(self.raw_buffer)+exc.start
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/representer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/representer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/representer.py	(working copy)
@@ -2,13 +2,13 @@
 __all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer',
     'RepresenterError']
 
-from error import *
+from .error import *
 
-from nodes import *
+from .nodes import *
 
 import datetime
 
-import copy_reg, types
+import copyreg, types
 
 class RepresenterError(YAMLError):
     pass
@@ -53,8 +53,8 @@
             #self.represented_objects[alias_key] = None
             self.object_keeper.append(data)
         data_types = type(data).__mro__
-        if type(data) is types.InstanceType:
-            data_types = self.get_classobj_bases(data.__class__)+list(data_types)
+        if isinstance(data, object):
+            data_types = self.get_classobj_bases(data.__class__) + list(data_types)
         if data_types[0] in self.yaml_representers:
             node = self.yaml_representers[data_types[0]](self, data)
         else:
@@ -68,7 +68,7 @@
                 elif None in self.yaml_representers:
                     node = self.yaml_representers[None](self, data)
                 else:
-                    node = ScalarNode(None, unicode(data))
+                    node = ScalarNode(None, str(data))
         #if alias_key is not None:
         #    self.represented_objects[alias_key] = node
         return node
@@ -157,11 +157,11 @@
         tag = None
         style = None
         try:
-            data = unicode(data, 'ascii')
+            data = str(data, 'ascii')
             tag = u'tag:yaml.org,2002:str'
         except UnicodeDecodeError:
             try:
-                data = unicode(data, 'utf-8')
+                data = str(data, 'utf-8')
                 tag = u'tag:yaml.org,2002:str'
             except UnicodeDecodeError:
                 data = data.encode('base64')
@@ -180,10 +180,10 @@
         return self.represent_scalar(u'tag:yaml.org,2002:bool', value)
 
     def represent_int(self, data):
-        return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))
+        return self.represent_scalar(u'tag:yaml.org,2002:int', str(data))
 
     def represent_long(self, data):
-        return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))
+        return self.represent_scalar(u'tag:yaml.org,2002:int', str(data))
 
     inf_value = 1e300
     while repr(inf_value) != repr(inf_value*inf_value):
@@ -197,7 +197,7 @@
         elif data == -self.inf_value:
             value = u'-.inf'
         else:
-            value = unicode(repr(data)).lower()
+            value = str(repr(data)).lower()
             # Note that in some cases `repr(data)` represents a float number
             # without the decimal parts.  For instance:
             #   >>> repr(1e17)
@@ -234,11 +234,11 @@
         return self.represent_mapping(u'tag:yaml.org,2002:set', value)
 
     def represent_date(self, data):
-        value = unicode(data.isoformat())
+        value = str(data.isoformat())
         return self.represent_scalar(u'tag:yaml.org,2002:timestamp', value)
 
     def represent_datetime(self, data):
-        value = unicode(data.isoformat(' '))
+        value = str(data.isoformat(' '))
         return self.represent_scalar(u'tag:yaml.org,2002:timestamp', value)
 
     def represent_yaml_object(self, tag, data, cls, flow_style=None):
@@ -257,7 +257,7 @@
 SafeRepresenter.add_representer(str,
         SafeRepresenter.represent_str)
 
-SafeRepresenter.add_representer(unicode,
+SafeRepresenter.add_representer(str,
         SafeRepresenter.represent_unicode)
 
 SafeRepresenter.add_representer(bool,
@@ -266,7 +266,7 @@
 SafeRepresenter.add_representer(int,
         SafeRepresenter.represent_int)
 
-SafeRepresenter.add_representer(long,
+SafeRepresenter.add_representer(int,
         SafeRepresenter.represent_long)
 
 SafeRepresenter.add_representer(float,
@@ -299,11 +299,11 @@
         tag = None
         style = None
         try:
-            data = unicode(data, 'ascii')
+            data = str(data, 'ascii')
             tag = u'tag:yaml.org,2002:str'
         except UnicodeDecodeError:
             try:
-                data = unicode(data, 'utf-8')
+                data = str(data, 'utf-8')
                 tag = u'tag:yaml.org,2002:python/str'
             except UnicodeDecodeError:
                 data = data.encode('base64')
@@ -324,7 +324,7 @@
         tag = u'tag:yaml.org,2002:int'
         if int(data) is not data:
             tag = u'tag:yaml.org,2002:python/long'
-        return self.represent_scalar(tag, unicode(data))
+        return self.represent_scalar(tag, str(data))
 
     def represent_complex(self, data):
         if data.imag == 0.0:
@@ -407,8 +407,8 @@
         # !!python/object/apply node.
 
         cls = type(data)
-        if cls in copy_reg.dispatch_table:
-            reduce = copy_reg.dispatch_table[cls](data)
+        if cls in copyreg.dispatch_table:
+            reduce = copyreg.dispatch_table[cls](data)
         elif hasattr(data, '__reduce_ex__'):
             reduce = data.__reduce_ex__(2)
         elif hasattr(data, '__reduce__'):
@@ -454,10 +454,10 @@
 Representer.add_representer(str,
         Representer.represent_str)
 
-Representer.add_representer(unicode,
+Representer.add_representer(str,
         Representer.represent_unicode)
 
-Representer.add_representer(long,
+Representer.add_representer(int,
         Representer.represent_long)
 
 Representer.add_representer(complex,
@@ -469,9 +469,6 @@
 Representer.add_representer(type,
         Representer.represent_name)
 
-Representer.add_representer(types.ClassType,
-        Representer.represent_name)
-
 Representer.add_representer(types.FunctionType,
         Representer.represent_name)
 
@@ -481,8 +478,5 @@
 Representer.add_representer(types.ModuleType,
         Representer.represent_module)
 
-Representer.add_multi_representer(types.InstanceType,
-        Representer.represent_instance)
-
 Representer.add_multi_representer(object,
         Representer.represent_object)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/resolver.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/resolver.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/resolver.py	(working copy)
@@ -1,8 +1,8 @@
 
 __all__ = ['BaseResolver', 'Resolver']
 
-from error import *
-from nodes import *
+from .error import *
+from .nodes import *
 
 import re
 
@@ -69,10 +69,10 @@
             elif node_check is dict:
                 node_check = MappingNode
             elif node_check not in [ScalarNode, SequenceNode, MappingNode]  \
-                    and not isinstance(node_check, basestring)  \
+                    and not isinstance(node_check, str)  \
                     and node_check is not None:
                 raise ResolverError("Invalid node checker: %s" % node_check)
-            if not isinstance(index_check, (basestring, int))   \
+            if not isinstance(index_check, (str, int))   \
                     and index_check is not None:
                 raise ResolverError("Invalid index checker: %s" % index_check)
             new_path.append((node_check, index_check))
@@ -120,7 +120,7 @@
     def check_resolver_prefix(self, depth, path, kind,
             current_node, current_index):
         node_check, index_check = path[depth-1]
-        if isinstance(node_check, basestring):
+        if isinstance(node_check, str):
             if current_node.tag != node_check:
                 return
         elif node_check is not None:
@@ -131,7 +131,7 @@
         if (index_check is False or index_check is None)    \
                 and current_index is None:
             return
-        if isinstance(index_check, basestring):
+        if isinstance(index_check, str):
             if not (isinstance(current_index, ScalarNode)
                     and index_check == current_index.value):
                 return
@@ -169,14 +169,14 @@
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:bool',
-        re.compile(ur'''^(?:yes|Yes|YES|no|No|NO
+        re.compile(r'''^(?:yes|Yes|YES|no|No|NO
                     |true|True|TRUE|false|False|FALSE
                     |on|On|ON|off|Off|OFF)$''', re.X),
         list(u'yYnNtTfFoO'))
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:float',
-        re.compile(ur'''^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?
+        re.compile(r'''^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?
                     |\.[0-9_]+(?:[eE][-+][0-9]+)?
                     |[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*
                     |[-+]?\.(?:inf|Inf|INF)
@@ -185,7 +185,7 @@
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:int',
-        re.compile(ur'''^(?:[-+]?0b[0-1_]+
+        re.compile(r'''^(?:[-+]?0b[0-1_]+
                     |[-+]?0[0-7_]+
                     |[-+]?(?:0|[1-9][0-9_]*)
                     |[-+]?0x[0-9a-fA-F_]+
@@ -194,19 +194,19 @@
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:merge',
-        re.compile(ur'^(?:<<)$'),
+        re.compile(r'^(?:<<)$'),
         [u'<'])
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:null',
-        re.compile(ur'''^(?: ~
+        re.compile(r'''^(?: ~
                     |null|Null|NULL
                     | )$''', re.X),
         [u'~', u'n', u'N', u''])
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:timestamp',
-        re.compile(ur'''^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+        re.compile(r'''^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
                     |[0-9][0-9][0-9][0-9] -[0-9][0-9]? -[0-9][0-9]?
                      (?:[Tt]|[ \t]+)[0-9][0-9]?
                      :[0-9][0-9] :[0-9][0-9] (?:\.[0-9]*)?
@@ -215,12 +215,12 @@
 
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:value',
-        re.compile(ur'^(?:=)$'),
+        re.compile(r'^(?:=)$'),
         [u'='])
 
 # The following resolver is only for documentation purposes. It cannot work
 # because plain scalars cannot start with '!', '&', or '*'.
 Resolver.add_implicit_resolver(
         u'tag:yaml.org,2002:yaml',
-        re.compile(ur'^(?:!|&|\*)$'),
+        re.compile(r'^(?:!|&|\*)$'),
         list(u'!&*'))
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/scanner.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/scanner.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/scanner.py	(working copy)
@@ -26,8 +26,8 @@
 
 __all__ = ['Scanner', 'ScannerError']
 
-from error import MarkedYAMLError
-from tokens import *
+from .error import MarkedYAMLError
+from .tokens import *
 
 class ScannerError(MarkedYAMLError):
     pass
\ No newline at end of file
@@ -1220,7 +1220,7 @@
                                     "expected escape sequence of %d hexdecimal numbers, but found %r" %
                                         (length, self.peek(k).encode('utf-8')), self.get_mark())
                     code = int(self.prefix(length), 16)
-                    chunks.append(unichr(code))
+                    chunks.append(chr(code))
                     self.forward(length)
                 elif ch in u'\r\n\x85\u2028\u2029':
                     self.scan_line_break()
\ No newline at end of file
@@ -1417,8 +1417,8 @@
             bytes.append(chr(int(self.prefix(2), 16)))
             self.forward(2)
         try:
-            value = unicode(''.join(bytes), 'utf-8')
-        except UnicodeDecodeError, exc:
+            value = str(''.join(bytes), 'utf-8')
+        except UnicodeDecodeError as exc:
             raise ScannerError("while scanning a %s" % name, start_mark, str(exc), mark)
         return value
 
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/serializer.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/serializer.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/lib/yaml/serializer.py	(working copy)
@@ -1,9 +1,9 @@
 
 __all__ = ['Serializer', 'SerializerError']
 
-from error import YAMLError
-from events import *
-from nodes import *
+from .error import YAMLError
+from .events import *
+from .nodes import *
 
 class SerializerError(YAMLError):
     pass
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/manage.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/manage.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/manage.py	(working copy)
@@ -1,12 +1,13 @@
 #!/usr/bin/env python
 import os
 import sys
+import importlib
 from hive.search import hive_search_init
 from hive.utils import update_frontend_index_html
 import djproject.an_settings
-reload(sys)
-sys.setdefaultencoding('utf-8')
 
+importlib.reload(sys)
+
 if __name__ == "__main__":
     update_frontend_index_html()
     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djproject.settings")
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/setup.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/setup.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/setup.py	(working copy)
@@ -16,7 +16,7 @@
     """
     
     if len(sys.argv) < 2:
-        print USAGE
+        print(USAGE)
         exit(1)
 
     sys_args = sys.argv[2:]
@@ -31,8 +31,8 @@
     try:
         return globals()[cmd](*args, **(options.__dict__))
     except KeyError:
-        print 'Invalid command: %s' % cmd
-        print USAGE
+        print('Invalid command: %s' % cmd)
+        print(USAGE)
         exit(1)
 
 def mlinit(lang='', target='', **kwargs):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/storemon.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/storemon.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/storemon.py	(working copy)
@@ -33,9 +33,9 @@
     ERROR = 4
 
 def usage():
-    print "usage: [ -P package name ] [ -H help ]"
-    print "\t-P\tSet package name, {'avx|'apv'|...}"
-    print "\t-H\tShow help info"    
+    print("usage: [ -P package name ] [ -H help ]")
+    print("\t-P\tSet package name, {'avx|'apv'|...}")
+    print("\t-H\tShow help info")
         
 class Storemon():
     host = ''
@@ -246,7 +246,7 @@
             errcode_ptr = pointer(errcode)
             rtn_head = getattr(libustat, func_name)(errcode_ptr)
             return rtn_head
-        except Exception, ex:
+        except Exception as ex:
             self.log_error(LOG_LEVEL.ENGINEER, "get_stats_fast exception " + str(Exception) + " " + str(ex))
             return None
 
@@ -355,7 +355,7 @@
                                     if file_name in self.init_rrd_file_list:
                                         self.init_rrd_file_list.remove(file_name)
                                 new_file_list[model_name][pk_set].append(file_name)
-                            except Exception, ex:
+                            except Exception as ex:
                                 self.log_error(LOG_LEVEL.ERROR, "update db value failed "+ str(Exception) + " " + str(ex)) 
                         instance = cast(instance.contents.entry.stqe_next, POINTER(ustat_model_q_item))
                     if model._meta.stats_from_userland == True:
@@ -410,7 +410,7 @@
             if pid > 0:
                 # exit first parent
                 sys.exit(0) 
-        except OSError, e: 
+        except OSError as e:
             print >>sys.stderr, "fork #1 failed: %d (%s)" % (e.errno, e.strerror) 
             sys.exit(1)
         # decouple from parent environment
@@ -425,7 +425,7 @@
                 # exit from second parent, print eventual PID before
                 #print "Daemon PID %d" % pid 
                 sys.exit(0) 
-        except OSError, e: 
+        except OSError as e:
             print >>sys.stderr, "fork #2 failed: %d (%s)" % (e.errno, e.strerror) 
             sys.exit(1)
         # start the daemon main loop
@@ -450,7 +450,7 @@
                 self.cou_conf_num = 0
             try:
                 self.trav_fields()
-            except Exception, ex:
+            except Exception as ex:
                 self.log_error(LOG_LEVEL.ERROR, "traverse fails " + str(Exception) + str(ex))
             after_time = int(time.time())
             if after_time - new_time > self.idle_time:
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/test.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/test.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/test.py	(working copy)
@@ -181,7 +181,7 @@
             args, varargname, kwname = inspect.getargspec(f)[:3]
             dctCallArgs = _getcallargs(args, varargname, kwname,
                                        callvarargs, callkeywords)
-            print dctCallArgs
+            print(dctCallArgs)
             return f(*callvarargs,**callkeywords)
         return new_td
     return sec
@@ -206,7 +206,7 @@
     db = conn.cursor()
     db.execute("PRAGMA synchronous = OFF")
     db.execute('''CREATE TABLE logbuf (level varchar(8), type varchar(8), msg text)''')
-    print time.time()
+    print(time.time())
     i = 0
     db.execute("BEGIN IMMEDIATE TRANSACTION")
     cmd  = ''
@@ -216,5 +216,5 @@
         #db.execute("INSERT INTO logbuf VALUES (?,?,?)", ("level", "CLI", "xxxxxxxxxx"))
     db.executescript(cmd)
     conn.commit()
-    print time.time()
+    print(time.time())
             
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/bugs/test_bug_60220.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/bugs/test_bug_60220.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/bugs/test_bug_60220.py	(working copy)
@@ -12,7 +12,7 @@
     timezone.set_value('GMT')
     try:
         form.save()
-    except TimeoutException, e:
+    except TimeoutException as e:
         pass
     else:
         ss.wait_profile_page_loading_successfully('System Time Settings')
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/test_widget.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/test_widget.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/acce/test_widget.py	(working copy)
@@ -1,7 +1,5 @@
 from selenium import webdriver
 from selenium.webdriver.common.by import By
-from selenium.webdriver.common.keys import Keys
-from selenium.webdriver.support.ui import Select
 from selenium.common.exceptions import NoSuchElementException
 import unittest, time, re
 
@@ -263,12 +261,12 @@
     
     def is_element_present(self, how, what):
         try: self.driver.find_element(by=how, value=what)
-        except NoSuchElementException, e: return False
+        except NoSuchElementException as e: return False
         return True
     
     def is_alert_present(self):
         try: self.driver.switch_to_alert()
-        except NoAlertPresentException, e: return False
+        except NoAlertPresentException as e: return False
         return True
     
     def close_alert_and_get_its_text(self):
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/lib/list.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/lib/list.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/lib/list.py	(working copy)
@@ -1,10 +1,7 @@
-from selenium import webdriver
-from tests.acce.fixtures import browser, server
 from selenium.webdriver.support.ui import WebDriverWait
 from selenium.webdriver.support import expected_conditions as EC
 from selenium.common.exceptions import NoSuchElementException, TimeoutException
 from selenium.webdriver.common.by import By
-import math
 import time
 
 
\ No newline at end of file
@@ -67,7 +64,7 @@
 
         #judge whether the add_button can be clicked
         if "disabled" in add_button.get_attribute("class"):
-            print "The add_button is not clickable!"
+            print("The add_button is not clickable!")
             return False
         else:
             return True
\ No newline at end of file
@@ -81,7 +78,7 @@
 
         #judge whether the delete_button can be clicked
         if "disabled" in delete_button.get_attribute("class"):
-            print "The delete_button is not clickable!"
+            print("The delete_button is not clickable!")
             return False
         else:
             return True
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/models/testpage.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/models/testpage.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/models/testpage.py	(working copy)
@@ -1,19 +1,17 @@
 from hive.imports.model import *
 from hive.model.manager import ANManager
-from django.utils.translation import ugettext_lazy as _
-from djproject.an_settings import PSEUDO_MANAGER_TEST_MODE
+from django.utils.translation import gettext_lazy as _
 from django.http import HttpResponse
 from django.template import RequestContext
-from django.http import Http404
 from hive.session import ANSession, current_app
-from hive.utils import get_current_session
-from django.shortcuts import redirect
 from hive.node.model import *
 from jinja2 import Environment, PackageLoader, ChoiceLoader
 from djproject.an_settings import THEMES
 from hive.model.ajax import ModelAjaxHandler, ObjectAjaxHandler
+from django.db.models.query import QuerySet
 import random
 import time
+import json
 
 class ASSOCLASS(ANModel):
     default = FieldGroup(verbose_name=_('AssoClassn'), editable=False, fields={
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/unit/test_model_slb.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/unit/test_model_slb.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tests/unit/test_model_slb.py	(working copy)
@@ -77,7 +77,7 @@
         new_vs.clean_fields()
         try:
             HTTPVS_M.insert(new_vs)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             assert not e.has_error()
         
         assert HTTPVS_M.get({'service_name':'testhttpvs8'}) is not None
\ No newline at end of file
@@ -93,7 +93,7 @@
         new_rs.clean_fields()
         try:
             L4L7RS_M.insert(new_rs)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             assert not e.has_error()
         
         assert L4L7RS_M.get({'service_name':'testhttprs1'}) is not None
\ No newline at end of file
@@ -110,7 +110,7 @@
         new_grp.clean_fields()
         try:
             RRGRP_M.insert(new_grp)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             assert not e.has_error()
         
         assert RRGRP_M.get({'group_name':'slbtestgrp1'}) is not None
\ No newline at end of file
@@ -126,7 +126,7 @@
         pprint.pprint(member.get_field_dict())
         try:
             MEMBER_M.insert(member)
-        except ModelQueryException, e:
+        except ModelQueryException as e:
             assert not e.has_error()
             
         grp = RRGRP_M.get({'group_name':'slbtestgrp1'})
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/dicttoxml.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/dicttoxml.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/dicttoxml.py	(working copy)
@@ -20,18 +20,7 @@
 
 LOG = logging.getLogger("dicttoxml")
 
-# python 3 doesn't have a unicode type
-try:
-    unicode
-except:
-    unicode = str
 
-# python 3 doesn't have a long type
-try:
-    long
-except:
-    long = int
-
 def set_debug(debug=True, filename='dicttoxml.log'):
     if debug:
         import datetime
\ No newline at end of file
@@ -47,9 +36,9 @@
 def unicode_me(something):
     """Converts strings with non-ASCII characters to unicode for LOG. Python 3 doesn't have a `unicode()` function, so `unicode()` is an alias for `str()`, but `str()` doesn't take a second argument, hence this kludge."""
     try:
-        return unicode(something, 'utf-8')
+        return str(something, 'utf-8')
     except:
-        return unicode(something)
+        return str(something)
         
 
 def make_id(element, start=100000, end=999999):
\ No newline at end of file
@@ -87,7 +76,7 @@
     return type(val).__name__
 
 def xml_escape(s):
-    if type(s) in (str, unicode):
+    if type(s) in (str, str):
         s = unicode_me(s) # avoid UnicodeDecodeError
         s = s.replace('&', '&amp;')
         s = s.replace('"', '&quot;')
\ No newline at end of file
@@ -131,7 +120,7 @@
 def convert(obj, ids, attr_type, parent='root'):
     """Routes the elements of an object to the right function to convert them based on their data type"""
     LOG.info('Inside convert(). obj type is: "%s", obj="%s"' % (type(obj).__name__, unicode_me(obj)))
-    if isinstance(obj, numbers.Number) or type(obj) in (str, unicode):
+    if isinstance(obj, numbers.Number) or type(obj) in (str, str):
         return convert_kv('item', obj, attr_type)
     if hasattr(obj, 'isoformat'):
         return convert_kv('item', obj.isoformat(), attr_type)
\ No newline at end of file
@@ -196,7 +185,7 @@
     for i, item in enumerate(items):
         LOG.info('Looping inside convert_list(): item="%s", type="%s"' % (unicode_me(item), type(item).__name__))
         attr = {} if not ids else { 'id': '%s_%s' % (this_id, i+1) }
-        if isinstance(item, numbers.Number) or type(item) in (str, unicode):
+        if isinstance(item, numbers.Number) or type(item) in (str, str):
             addline(convert_kv('item', item, attr_type, attr))
         elif hasattr(item, 'isoformat'): # datetime
             addline(convert_kv('item', item.isoformat(), attr_type, attr))
\ No newline at end of file
@@ -240,7 +229,7 @@
     if attr_type:
         attr['type'] = get_xml_type(val)
     attrstring = make_attrstring(attr)
-    return '<%s%s>%s</%s>' % (key, attrstring, unicode(val).lower(), key)
+    return '<%s%s>%s</%s>' % (key, attrstring, str(val).lower(), key)
 
 def convert_none(key, val, attr_type, attr={}):
     """Converts a null value into an XML element"""
\ No newline at end of file
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/xmltodict.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/xmltodict.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/tools/xmltodict.py	(working copy)
@@ -20,11 +20,11 @@
         OrderedDict = dict
 
 try:  # pragma no cover
-    _basestring = basestring
+    _basestring = str
 except NameError:  # pragma no cover
     _basestring = str
 try:  # pragma no cover
-    _unicode = unicode
+    _unicode = str
 except NameError:  # pragma no cover
     _unicode = str
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/test.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/test.py	(revision 2569)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/test.py	(working copy)
@@ -21,4 +21,4 @@
     return output
 
 if __name__ == '__main__':
-    print cmd_direct("show version")
\ No newline at end of file
+    print(cmd_direct("show version"))
\ No newline at end of file
