mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-19 01:45:27 +00:00
fix: ES 自动创建索引
This commit is contained in:
@@ -76,6 +76,15 @@ class CommandStorage(CommonModelMixin):
|
||||
qs.model = Command
|
||||
return qs
|
||||
|
||||
def save(self, force_insert=False, force_update=False, using=None,
|
||||
update_fields=None):
|
||||
super().save()
|
||||
|
||||
if self.type in TYPE_ENGINE_MAPPING:
|
||||
engine_mod = import_module(TYPE_ENGINE_MAPPING[self.type])
|
||||
backend = engine_mod.CommandStore(self.config)
|
||||
backend.pre_use_check()
|
||||
|
||||
|
||||
class ReplayStorage(CommonModelMixin):
|
||||
name = models.CharField(max_length=128, verbose_name=_("Name"), unique=True)
|
||||
|
Reference in New Issue
Block a user