Browse Source

perf: luna连接时不显示 WinRM 协议选项

pull/10080/head^2
jiangweidong 2 years ago committed by Jiangjie.Bai
parent
commit
8e81aee1fd
  1. 8
      apps/assets/models/platform.py

8
apps/assets/models/platform.py

@ -26,6 +26,14 @@ class PlatformProtocol(models.Model):
def secret_types(self):
return Protocol.settings().get(self.name, {}).get('secret_types', ['password'])
def set_public(self):
private_protocol_set = ('winrm',)
self.public = self.name not in private_protocol_set
def save(self, **kwargs):
self.set_public()
return super().save(**kwargs)
class PlatformAutomation(models.Model):
ansible_enabled = models.BooleanField(default=False, verbose_name=_("Enabled"))

Loading…
Cancel
Save