Commit 9988455d authored by 王英豪's avatar 王英豪

优化获取列表 甘特图

parent d595ef20
......@@ -16,6 +16,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/tutorial-env" />
<excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/.vscode" />
</content>
<orderEntry type="jdk" jdkName="Python 3.7 (AutomatedTestPlatform) (2)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
......
......@@ -126,6 +126,114 @@ if ENV_PROFILE == "SERVER":
}
}
elif ENV_PROFILE == "QA":
# 生产环境地址
ALLOWED_HOSTS = ["172.16.0.82", "127.0.0.1", "lzyz-ui-td.liangkebang.net"]
# ALLOWED_HOSTS = ['*']
# 配置自动化脚本日志文件的存储位置
WEB_ROOT = os.path.join('/home/quant_group/data/Web_Script')
# 配置上传文件的存储位置
JMETER_ROOT = os.path.join('/home/quant_group/data/jmeter/jmeter_script')
# 配置上传jmeter参数化文件的存储位置
JMETER_DATA_SET_ROOT = os.path.join('/home/quant_group/data/jmeter/jmeter_data_set')
# jmeter测试报告
JMETER_REPORT = os.path.join('/home/quant_group/data/jmeter/jmeter_report/Report')
JMETER_REPORT_URL = "/home/quant_group/data/jmeter/jmeter_report/Report"
# API测试用例上传 excel
API_TEST_CASE_ROOT = os.path.join('/data/api_test_case_excel/')
# 访问资源上传的路径
WEB_URL = "/home/quant_group/data/Web_Script/"
CORS_ALLOWED_ORIGINS = (
['http://127.0.0.1:*', 'http://172.16.0.82:*', 'https://lzyz-ui-td.liangkebang.net']
)
# mysql
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': BASE_DIR + '/qa.cnf',
'init_command': 'SET foreign_key_checks = 0;',
'charset': 'utf8mb4',
},
}
}
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(levelname)s %(message)s'
},
'standard': {
'format': ' [%(levelname)s] %(asctime)s [%(threadName)s:%(thread)d] [%(name)s:%(lineno)d] '
'[%(module)s:%(funcName)s] - %(message)s'}
},
'filters': {
},
'handlers': {
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/home/quant_group/logs/all.log', # 日志输出文件
'maxBytes': 1024 * 1024 * 30, # 文件大小
'backupCount': 2, # 备份份数
'formatter': 'standard', # 使用哪种formatters日志格式
'encoding': 'utf-8',
},
'error': {
'level': 'ERROR',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/home/quant_group/logs/error.log',
'maxBytes': 1024 * 1024 * 30,
'backupCount': 2,
'formatter': 'standard',
'encoding': 'utf-8',
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'info': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/home/quant_group/logs/info.log',
'maxBytes': 1024 * 1024 * 30,
'backupCount': 2,
'formatter': 'standard',
'encoding': 'utf-8',
},
},
'loggers': {
'django': {
'handlers': ['default', 'console'],
'level': 'INFO',
'propagate': False
},
'django.request': {
'handlers': ['default', 'console'],
'level': 'INFO',
'propagate': False,
},
'interface': {
'handlers': ['default', 'info', 'console', 'error'],
'level': 'INFO',
'propagate': False,
},
}
}
elif ENV_PROFILE == "1":
print("windows环境")
# 测试环境地址
......
......@@ -23,15 +23,24 @@ class PersonnelAllocationView(View):
return response_success()
data = json.loads(body)
TestingProgress.objects.create(testing_progress_title=data['text'],
start_date=data['start_date'],
end_date=data['end_date'],
duration=data['duration'],
group=data['group'],
parent=data['parent'],
testing_progress=data['progress'],
type=data['color'],
description=data['description'])
if 'color' in data.keys():
TestingProgress.objects.create(testing_progress_title=data['text'],
start_date=data['start_date'],
end_date=data['end_date'],
duration=data['duration'],
group=data['group'],
parent=data['parent'],
testing_progress=data['progress'],
type=data['color'],
description=data['description'])
else:
TestingProgress.objects.create(testing_progress_title=data['text'],
group=data['group'],
parent=data['parent'],
testing_progress='',
type='',
description='')
return response_success("创建成功")
......@@ -108,6 +117,7 @@ class PersonnelAllocationListView(View):
"text": testing_progress.testing_progress_title,
"id": testing_progress.id,
"render": render,
"parent": testing_progress.parent,
"group": str(testing_progress.group),
"color": testing_progress.type,
"description": testing_progress.description
......
[client]
host = 172.16.92.55
port = 30241
user = qa
password = qatest
database = test_qa
default-character-set = utf8
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment