mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Correction of undefined db_helper following merge
This commit is contained in:
parent
e381ebe239
commit
05ced7610e
@ -201,7 +201,7 @@ class Stats:
|
||||
for s in servers:
|
||||
|
||||
server_id = s.get('server_id', None)
|
||||
server = db_helper.get_server_data_by_id(server_id)
|
||||
server = servers_helper.get_server_data_by_id(server_id)
|
||||
|
||||
|
||||
logger.debug('Getting stats for server: {}'.format(server_id))
|
||||
|
@ -101,7 +101,7 @@ class Controller:
|
||||
self.servers_list.append(temp_server_dict)
|
||||
|
||||
if s['auto_start']:
|
||||
db_helper.set_waiting_start(s['server_id'], True)
|
||||
self.servers.set_waiting_start(s['server_id'], True)
|
||||
|
||||
self.refresh_server_settings(s['server_id'])
|
||||
|
||||
|
@ -185,7 +185,7 @@ class Server:
|
||||
|
||||
logger.info("Starting server in {p} with command: {c}".format(p=self.server_path, c=self.server_command))
|
||||
|
||||
db_helper.set_waiting_start(self.server_id, False)
|
||||
servers_helper.set_waiting_start(self.server_id, False)
|
||||
try:
|
||||
self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding='utf-8')
|
||||
except Exception as ex:
|
||||
@ -196,7 +196,7 @@ class Server:
|
||||
})
|
||||
return False
|
||||
if helper.check_internet():
|
||||
loc_server_port = db_helper.get_server_stats_by_id(self.server_id)['server_port']
|
||||
loc_server_port = servers_helper.get_server_stats_by_id(self.server_id)['server_port']
|
||||
if helper.check_port(loc_server_port):
|
||||
websocket_helper.broadcast('send_start_reload', {
|
||||
})
|
||||
|
@ -58,7 +58,7 @@ class AjaxHandler(BaseHandler):
|
||||
|
||||
server_id = bleach.clean(server_id)
|
||||
|
||||
server_data = ser.get_server_data_by_id(server_id)
|
||||
server_data = self.controller.servers.get_server_data_by_id(server_id)
|
||||
if not server_data:
|
||||
logger.warning("Server Data not found in server_log ajax call")
|
||||
self.redirect("/panel/error?error=Server ID Not Found")
|
||||
@ -154,7 +154,7 @@ class AjaxHandler(BaseHandler):
|
||||
if srv_obj.check_running():
|
||||
srv_obj.send_command(command)
|
||||
|
||||
db_helper.add_to_audit_log(user_data['user_id'], "Sent command to {} terminal: {}".format(db_helper.get_server_friendly_name(server_id), command), server_id, self.get_remote_ip())
|
||||
self.controller.management.add_to_audit_log(user_data['user_id'], "Sent command to {} terminal: {}".format(self.controller.servers.get_server_friendly_name(server_id), command), server_id, self.get_remote_ip())
|
||||
|
||||
elif page == "create_file":
|
||||
file_parent = self.get_body_argument('file_parent', default=None, strip=True)
|
||||
@ -208,7 +208,7 @@ class AjaxHandler(BaseHandler):
|
||||
except Exception as e:
|
||||
logger.error("Could not find PID for requested termsig. Full error: {}".format(e))
|
||||
else:
|
||||
logger.error("Could not find PID for requested termsig. Full error: {}".format(e))
|
||||
logger.error("Could not find PID for requested termsig. Full error: svr.get_pid() = FALSE")
|
||||
return
|
||||
|
||||
@tornado.web.authenticated
|
||||
|
Loading…
x
Reference in New Issue
Block a user