diff --git a/api/migrations/0006_connlog.py b/api/migrations/0006_connlog.py index 0fbd103..230b5a7 100644 --- a/api/migrations/0006_connlog.py +++ b/api/migrations/0006_connlog.py @@ -9,18 +9,18 @@ class Migration(migrations.Migration): ('api', '0005_log_alter_rustdesdevice_options_and_more'), ] - operations = [ - migrations.CreateModel( - name='ConnLog', - fields=[ - ('id', models.IntegerField(primary_key=True, serialize=False, verbose_name='ID')), - ('action', models.CharField(max_length=20, verbose_name='Action')), - ('conn_id', models.IntegerField(verbose_name='Connection ID')), - ('from_ip', models.CharField(max_length=30, verbose_name='From IP')), - ('rid', models.CharField(max_length=20, verbose_name='To ID')), - ('logged_at', models.CharField(max_length=25, verbose_name='Logged At')), - ('session_id', models.IntegerField(verbose_name='Session ID')), - ('uuid', models.CharField(max_length=60, verbose_name='UUID')), - ], - ), - ] + # operations = [ + # migrations.CreateModel( + # name='ConnLog', + # fields=[ + # ('id', models.IntegerField(primary_key=True, serialize=False, verbose_name='ID')), + # ('action', models.CharField(max_length=20, verbose_name='Action')), + # ('conn_id', models.IntegerField(verbose_name='Connection ID')), + # ('from_ip', models.CharField(max_length=30, verbose_name='From IP')), + # ('rid', models.CharField(max_length=20, verbose_name='To ID')), + # ('logged_at', models.CharField(max_length=25, verbose_name='Logged At')), + # ('session_id', models.IntegerField(verbose_name='Session ID')), + # ('uuid', models.CharField(max_length=60, verbose_name='UUID')), + # ], + # ), + # ] diff --git a/api/models_work.py b/api/models_work.py index fc2bfeb..8599a85 100644 --- a/api/models_work.py +++ b/api/models_work.py @@ -122,38 +122,6 @@ class RustDesDeviceAdmin(admin.ModelAdmin): search_fields = ('hostname', 'memory') list_filter = ('rid', ) -class ConnLog(models.Model): - id = models.IntegerField(verbose_name='ID',primary_key=True) - action = models.CharField(verbose_name='Action', max_length=20, null=True) - conn_id = models.CharField(verbose_name='Connection ID', max_length=10, null=True) - from_ip = models.CharField(verbose_name='From IP', max_length=30, null=True) - from_id = models.CharField(verbose_name='From ID', max_length=20, null=True) - rid = models.CharField(verbose_name='To ID', max_length=20, null=True) - conn_start = models.DateTimeField(verbose_name='Connected', null=True) - conn_end = models.DateTimeField(verbose_name='Disconnected', null=True) - session_id = models.CharField(verbose_name='Session ID', max_length=60, null=True) - uuid = models.CharField(verbose_name='uuid', max_length=60, null=True) - -class ConnLogAdmin(admin.ModelAdmin): - list_display = ('id', 'action', 'conn_id', 'from_ip', 'from_id', 'rid', 'conn_start', 'conn_end', 'session_id', 'uuid') - search_fields = ('from_ip', 'rid') - list_filter = ('id', 'from_ip', 'from_id', 'rid', 'conn_start', 'conn_end') - -class FileLog(models.Model): - id = models.IntegerField(verbose_name='ID',primary_key=True) - file = models.CharField(verbose_name='Path', max_length=500) - remote_id = models.CharField(verbose_name='Remote ID', max_length=20, default='0') - user_id = models.CharField(verbose_name='User ID', max_length=20, default='0') - user_ip = models.CharField(verbose_name='User IP', max_length=20, default='0') - filesize = models.CharField(verbose_name='Filesize', max_length=500, default='') - direction = models.IntegerField(verbose_name='Direction', default=0) - logged_at = models.DateTimeField(verbose_name='Logged At', null=True) - -class FileLogAdmin(admin.ModelAdmin): - list_display = ('id', 'file', 'remote_id', 'user_id', 'user_ip', 'filesize', 'direction', 'logged_at') - search_fields = ('file', 'remote_id', 'user_id', 'user_ip') - list_filter = ('id', 'file', 'remote_id', 'user_id', 'user_ip', 'filesize', 'direction', 'logged_at') - class ShareLink(models.Model): ''' Share link '''