diff --git a/apps/common/forms.py b/apps/common/forms.py index 491ae779a..10ac4ec17 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -147,18 +147,6 @@ class TerminalSettingForm(BaseForm): TERMINAL_ASSET_LIST_SORT_BY = forms.ChoiceField( choices=SORT_BY_CHOICES, initial='hostname', label=_("List sort by") ) - # TERMINAL_COMMAND_STORAGE = FormEncryptDictField( - # label=_("Command storage"), help_text=_( - # "Set terminal storage setting, `default` is the using as default," - # "You can set other storage and some terminal using" - # ) - # ) - # TERMINAL_REPLAY_STORAGE = FormEncryptDictField( - # label=_("Replay storage"), help_text=_( - # "Set replay storage setting, `default` is the using as default," - # "You can set other storage and some terminal using" - # ) - # ) class TerminalCommandStorage(BaseForm): diff --git a/apps/terminal/forms.py b/apps/terminal/forms.py index 55997a31b..893f15b12 100644 --- a/apps/terminal/forms.py +++ b/apps/terminal/forms.py @@ -10,21 +10,15 @@ 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_choice = [] for k, v in command_storage.items(): - command_storage_choice.append((k, k)) - - return command_storage_choice + yield (k, k) def get_all_replay_storage(): from common import utils replay_storage = utils.get_replay_storage_or_create_default_storage() - replay_storage_choice = [] for k, v in replay_storage.items(): - replay_storage_choice.append((k, k)) - - return replay_storage_choice + yield (k, k) class TerminalForm(forms.ModelForm):