Пример #1
0
    def __init__(self):
        self.request: Request = flask.request
        self.request_dict = request_dict.create('')

        self.error: Optional[str] = None
        self.user_id: Optional[int] = cookie_auth.get_user_id_via_auth_cookie(
            self.request)
        self.user = user_service.find_user_by_id(self.user_id)
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.users = user_service.get_users_list()
     self.name = self.request_dict.name
     self.email = self.request_dict.email.lower().strip()
     self.password = self.request_dict.password.strip()
     self.user_to_remove = self.request_dict.user_to_remove
Пример #3
0
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.router_name = self.request_dict.name
     self.router_ip = self.request_dict.router_ip
     self.username = self.request_dict.username
     self.password = self.request_dict.password
     self.ignore: Optional[str] = None
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.routers = router_service.get_router_list()
     self.router_to_update = self.request_dict.selected_router
     self.router_name = self.request_dict.name
     self.router_ip = self.request_dict.router_ip
     self.username = self.request_dict.username
     self.password = self.request_dict.password
     self.ignore: Optional[str] = None
Пример #5
0
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.routers = router_service.get_router_list()
     self.router_count = router_service.get_router_count()
     self.backup_complete_count = router_service.get_backup_complete_count()
     self.config_complete_count = router_service.get_config_complete_count()
     self.backup_failed_count = router_service.get_backup_failed_count()
     self.config_failed_count = router_service.get_config_failed_count()
     self.unknown_count = router_service.get_unknown_status_count()
     self.ignore_count = router_service.get_router_ignore_count()
Пример #6
0
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.router_name = self.request.path.strip('/router-info/')
     self.router = router_service.get_router_details(
         self.request.path.strip('/router-info/'))
     self.uptime = self.router.uptime
     self.version = self.router.router_os_version
     self.free_memory = self.router.free_memory
     self.total_memory = self.router.total_memory
     self.cpu_load = self.router.cpu_load
     self.free_hdd_space = self.router.free_hdd_space
     self.total_hdd_space = self.router.total_hdd_space
     self.bad_blocks = self.router.bad_blocks
     self.board_name = self.router.board_name
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)
     self.routers = router_service.get_router_list()
     self.router_to_remove = self.request_dict.selected_router
Пример #8
0
 def __init__(self):
     super().__init__()
     self.user = user_service.find_user_by_id(self.user_id)