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

添加手动执行功能 #178

Merged
merged 11 commits into from
May 8, 2019
Merged

添加手动执行功能 #178

merged 11 commits into from
May 8, 2019

Conversation

yzypals
Copy link
Collaborator

@yzypals yzypals commented May 7, 2019

关联issue #117

@request-info
Copy link

request-info bot commented May 7, 2019

你好!感谢你反馈的问题/bug,但是你的描述好像是空的,我们需要你完整的信息,这样才能帮你解决问题 如果不知道怎么写,在新建issue的时候有若干个模板可供选择,祝好!

@yzypals
Copy link
Collaborator Author

yzypals commented May 7, 2019

重新提交的 手动执行上线语句的pr

@codecov
Copy link

codecov bot commented May 7, 2019

Codecov Report

Merging #178 into master will increase coverage by 0.23%.
The diff coverage is 82.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
+ Coverage   73.95%   74.18%   +0.23%     
==========================================
  Files          62       62              
  Lines        6727     6760      +33     
==========================================
+ Hits         4975     5015      +40     
+ Misses       1752     1745       -7
Impacted Files Coverage Δ
sql/models.py 94.57% <ø> (ø) ⬆️
sql/tests.py 100% <100%> (ø) ⬆️
sql/sql_workflow.py 62.19% <60%> (+5.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1dcf6c...4cf8dd6. Read the comment docs.

@hhyo
Copy link
Owner

hhyo commented May 7, 2019

@LeoQuote 增加手工执行结束状态的话,国际化文件需要增加些什么吗

context = {'errMsg': '你无权操作当前工单!'}
return render(request, 'error.html', context)

# 将流程状态修改为执行中
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该是手工执行完成?

audit_id = Audit.detail_by_workflow_id(workflow_id=workflow_id,
workflow_type=WorkflowDict.workflow_type['sqlreview']).audit_id
Audit.add_log(audit_id=audit_id,
operation_type=5,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

状态和类型可能标记执行结束会更合理,这里应该是手工执行完成后回过来手工做个流程确认吧

Audit.add_log(audit_id=audit_id,
operation_type=5,
operation_type_desc='执行工单',
operation_info="人工操作执行",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

操作信息也可以体现这一点

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

手工执行当前状态1
手工执行工单状态1
当前状态还需要改下css 颜色

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 7, 2019

https://github.com/hhyo/Archery/tree/master/sql/locale/zh_Hans/LC_MESSAGES 这个目录下的两个本地化文件需要添加一下新工单状态的翻译,照着添加就可以了。

不会的话可以我来添加,我看看我能不能直接提交

@yzypals
Copy link
Collaborator Author

yzypals commented May 7, 2019

第一次用这个git 这个 你们是怎么样合并我这和分支的呢, 我看上面都是好多都是红色XX

@LeoQuote
Copy link
Collaborator

LeoQuote commented May 7, 2019

有红色的叉叉是因为单元测试覆盖率没达要求,最好是你也提供一下单元测试,单元测试统一放在代码所在文件夹的 tests.py里面

@LeoQuote LeoQuote added enhancement New feature or request and removed 请提供更多信息 labels May 8, 2019
@LeoQuote
Copy link
Collaborator

LeoQuote commented May 8, 2019

我仔细看了一下代码, 我发现手动执行和自动执行的逻辑非常相似, 只是少了实际执行工单的那一步, 可不可以考虑只是简单的在execute中加一个参数, 如果这个参数为真就不做实际执行?

这样view的代码也可以复用, 单元测试同样可以复用。

@yzypals
Copy link
Collaborator Author

yzypals commented May 8, 2019

按你说的 改了代码了 减少了代码量 复用一个view 来做处理

@LeoQuote LeoQuote self-requested a review May 8, 2019 13:01
requirements.txt Outdated Show resolved Hide resolved
Repository owner deleted a comment from codecov bot May 8, 2019
@LeoQuote LeoQuote requested a review from hhyo May 8, 2019 14:56
@hhyo hhyo merged commit 342b596 into hhyo:master May 8, 2019
@hhyo
Copy link
Owner

hhyo commented May 8, 2019

已合并,感谢贡献,后续可以在功能开发前就提交PR,方便及时的进行review和修正

找时间补充一个贡献指南

@yzypals yzypals deleted the manually branch May 9, 2019 01:03
hhyo added a commit that referenced this pull request May 9, 2019
* 确认手工执行结束的工单,详情展示的信息为提交信息
#178 #180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants