• BaiJiangJie's avatar
    [Feature] 添加功能 RemoteApp (#2706) · 1eca5179
    BaiJiangJie authored
    * [Feature] RemoteApp添加Model
    
    * [Feature] RemoteApp添加ViewSet API
    
    * [Feature] RemoteApp添加获取connection-info API
    
    * [Feature] Perms模块修改目录结构
    
    * [Feature] RemoteAppPermission添加Model
    
    * [Feature] RemoteAppPermission添加ViewSet API
    
    * [Feature] RemoteAppPermission添加用户/用户组获取被授权的RemoteApp API
    
    * [Feature] RemoteAppPermission添加校验用户对RemoteApp的权限 API
    
    * [Feature] RemoteAppPermission添加获取用户授权的RemoteApp树 API
    
    * [Feature] RemoteAppPermission添加<添加/移除>所授权的<用户/RemoteApp> API
    
    * [Feature] RemoteApp添加创建、更新、详情、删除、用户RemoteApp等页面
    
    * [Feature] RemoteAppPermission添加创建、更新、详情、删除、授权用户、授权RemoteApp等页面
    
    * [Feature] RemoteApp从assets模块迁移到新添加的applications模块
    
    * [Feature] RemoteApp/RemoteAppPermission添加迁移文件
    
    * [Feature] RemoteApp/RemoteAppPermission修改小细节
    
    * [Feature] RemoteApp/RemoteAppPermission修改小细节2
    
    * [Feature] RemoteApp/RemoteAppPermission修改小细节3
    
    * [Feature] RemoteApp更新迁移文件
    
    * [Feature] RemoteApp/RemoteAppPermission添加翻译信息
    
    * [Feature] RemoteApp/RemoteAppPermission删除迁移文件
    
    * [Feature] RemoteApp/RemoteAppPermission添加迁移文件
    
    * [Feature] RemoteApp/RemoteAppPermission修改代码风格
    1eca5179
0001_initial.py 2.1 KB
# Generated by Django 2.1.7 on 2019-05-20 11:04

import common.fields.model
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('assets', '0026_auto_20190325_2035'),
    ]

    operations = [
        migrations.CreateModel(
            name='RemoteApp',
            fields=[
                ('org_id', models.CharField(blank=True, db_index=True, default='', max_length=36, verbose_name='Organization')),
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128, verbose_name='Name')),
                ('type', models.CharField(choices=[('Browser', (('chrome', 'Chrome'),)), ('Database tools', (('mysql_workbench', 'MySQL Workbench'),)), ('Virtualization tools', (('vmware_client', 'VMware Client'),)), ('custom', 'Custom')], default='chrome', max_length=128, verbose_name='App type')),
                ('path', models.CharField(max_length=128, verbose_name='App path')),
                ('params', common.fields.model.EncryptJsonDictTextField(blank=True, default={}, max_length=4096, null=True, verbose_name='Parameters')),
                ('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
                ('comment', models.TextField(blank=True, default='', max_length=128, verbose_name='Comment')),
                ('asset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assets.Asset', verbose_name='Asset')),
                ('system_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assets.SystemUser', verbose_name='System user')),
            ],
            options={
                'verbose_name': 'RemoteApp',
                'ordering': ('name',),
            },
        ),
        migrations.AlterUniqueTogether(
            name='remoteapp',
            unique_together={('org_id', 'name')},
        ),
    ]