From 340c615efe748670774cfe119b8657aa66439704 Mon Sep 17 00:00:00 2001 From: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com> Date: Wed, 26 Dec 2018 14:43:43 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20session=20model=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20vnc=20=E5=8D=8F=E8=AE=AE=20(#2278)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Bugfix] session model 添加 vnc 协议 * [Update] 修改表结构 --- .../migrations/0014_auto_20181226_1441.py | 18 ++++++++++++++++++ apps/terminal/models.py | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 apps/terminal/migrations/0014_auto_20181226_1441.py diff --git a/apps/terminal/migrations/0014_auto_20181226_1441.py b/apps/terminal/migrations/0014_auto_20181226_1441.py new file mode 100644 index 000000000..fa890365a --- /dev/null +++ b/apps/terminal/migrations/0014_auto_20181226_1441.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1 on 2018-12-26 06:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('terminal', '0013_auto_20181123_1113'), + ] + + operations = [ + migrations.AlterField( + model_name='session', + name='protocol', + field=models.CharField(choices=[('ssh', 'ssh'), ('rdp', 'rdp'), ('vnc', 'vnc')], default='ssh', max_length=8), + ), + ] diff --git a/apps/terminal/models.py b/apps/terminal/models.py index 6491bdf35..880637efe 100644 --- a/apps/terminal/models.py +++ b/apps/terminal/models.py @@ -132,7 +132,8 @@ class Session(OrgModelMixin): ) PROTOCOL_CHOICES = ( ('ssh', 'ssh'), - ('rdp', 'rdp') + ('rdp', 'rdp'), + ('vnc', 'vnc') ) id = models.UUIDField(default=uuid.uuid4, primary_key=True)