[Update] 修改common settings配置

This commit is contained in:
ibuler
2018-11-19 12:18:52 +08:00
parent c9aab608a9
commit dda367a956
9 changed files with 39 additions and 76 deletions

View File

@@ -18,7 +18,7 @@ def get_command_storage():
def get_terminal_command_storages():
storage_list = {}
command_storage = utils.get_command_storage_or_create_default_storage()
command_storage = utils.get_command_storage_setting()
for name, params in command_storage.items():
tp = params['TYPE']

View File

@@ -9,14 +9,14 @@ from .models import Terminal
def get_all_command_storage():
from common import utils
command_storage = utils.get_command_storage_or_create_default_storage()
command_storage = utils.get_command_storage_setting()
for k, v in command_storage.items():
yield (k, k)
def get_all_replay_storage():
from common import utils
replay_storage = utils.get_replay_storage_or_create_default_storage()
replay_storage = utils.get_replay_storage_setting()
for k, v in replay_storage.items():
yield (k, k)

View File

@@ -64,8 +64,7 @@ class Terminal(models.Model):
configs.update(self.get_common_storage())
configs.update(self.get_replay_storage())
configs.update({
'SECURITY_MAX_IDLE_TIME': common_settings.SECURITY_MAX_IDLE_TIME or
settings.DEFAULT_SECURITY_MAX_IDLE_TIME,
'SECURITY_MAX_IDLE_TIME': common_settings.SECURITY_MAX_IDLE_TIME
})
return configs