def addadmin(): username = request.forms.username password = request.forms.password root_path = request.forms.root_path isadmin = request.forms.isadmin if(isadmin == 'true'): isadmin = True else: isadmin = False params = { 'username': username, 'password': password, 'root_path': root_path, 'isadmin': isadmin } data = addAdmin(params) return return_Json(data)
def gethtop(): top = getHtop() return return_Json(top)
def getsync(): mem = getMem() return return_Json(mem)
def getsystem(): system = getSys() return return_Json(system)
def deladmin(): username = request.forms.username data = delAdmin(username) return return_Json(data)
def getAdminlist(): data = getAdminList() return return_Json(data)
def logout(): data = Logout() return return_Json(data)
def login(): username = request.forms.username password = request.forms.password data = Login(username, password) return return_Json(data)