[Update] 修改系统设置-命令/录像存储页面(添加,删除)

This commit is contained in:
BaiJiangJie
2018-10-23 19:22:18 +08:00
parent c9f4b104c7
commit 284e8be45c
13 changed files with 710 additions and 71 deletions

View File

@@ -2,6 +2,9 @@ from importlib import import_module
from django.conf import settings
from .command.serializers import SessionCommandSerializer
from common import utils
from common.models import common_settings, Setting
TYPE_ENGINE_MAPPING = {
'elasticsearch': 'terminal.backends.command.es',
}
@@ -16,7 +19,9 @@ def get_command_storage():
def get_terminal_command_storages():
storage_list = {}
for name, params in settings.TERMINAL_COMMAND_STORAGE.items():
command_storage = utils.get_command_storage_or_create_default_storage()
for name, params in command_storage.items():
tp = params['TYPE']
if tp == 'server':
storage = get_command_storage()