Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加离线导出工单,可通过查询页面右侧切换 #2685

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Jun 20, 2024

  1. 1、sql/templates/sqlsubmit.html

    	添加导出工单参数,默认为非导出工单
    
    2、sql/templates/sqlquery.html
    	增加导出工单表单信息,并增加扫描行数检查
    
    3、common/templates/config.html
    	增加导出工单相关配置表单
    
    4、sql/views.py
    	传递相关页面所需值
    
    5、sql/templates/sqlworkflow.html
    	增加工单页面,导出格式的显示
    
    6、sql/templates/detail.html
    	增加下载按钮,与 offlinedownload.py 交互
    
    7、common/check.py
    	增加config内oss、sftp及本地存储的检查
    
    8、sql_api/serializers.py
    	传递相关参数
    
    9、sql/utils/workflow_audit.py
    	取消导出工单的自动审核,正常情况下导出工单不应自动审核
    
    10、sql/engines/offlinedownload.py
    	导出工单主要代码
    
    11、sql/engines/goinception.py
    	增加导出工单类型
    
    12、sql/engines/mysql.py
    	传递相关参数
    
    13、sql/models.py
    	(1)syntax_type新增(3,导出工单)
    	(2)新增字段is_offline_export、export_format、file_name
    	(3)permissions新增("offline_download", "离线下载权限")
    	涉及 sql:
    	alter table sql_workflow
    		add column export_format varchar(10) DEFAULT NULL,
    		add column is_offline_export varchar(3) NOT NULL,
     		add column file_name varchar(255) DEFAULT NULL;
    
      	set @content_type_id=(select id from django_content_type where app_label='sql' and model='permission');
      	insert IGNORE INTO auth_permission (name, content_type_id, codename) VALUES('离线下载权限', @content_type_id, 'offline_download');
    
    14、sql/sql_workflow.py
    	增加导出格式参数
    15、sql/urls.py
    	增加 offlinedownload 的路由
    
    新增 sql 脚本: src/init_sql/v1.11.1_offlinedownload.sql 与上方 sql 内容一致,无需反复执行
    新增依赖:
    	sqlparse==0.4.4
    	paramiko==3.4.0
    	oss2==2.18.3
    	openpyxl==3.1.2
    Wondermique authored and LeoQuote committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e05c0c5 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Configuration menu
    Copy the full SHA
    2f2da36 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    069e543 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a5a11be View commit details
    Browse the repository at this point in the history
  4. 1、优化导出工单审批方法的参数

    2、增加测试配置参数
    Wondermique committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    ba1b782 View commit details
    Browse the repository at this point in the history