Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: set project capacity with async #147

Merged
merged 5 commits into from
Sep 18, 2019

Conversation

zivyangll
Copy link
Member

No description provided.

const readableSize = bufSize >= 1024 ?
`${(bufSize / 1024).toFixed(2)}KB` :
`${bufSize}B`;
const readableSize = bufSize >= 1024 * 1024 ?
Copy link
Member

Choose a reason for hiding this comment

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

用filesize吧

app/router.js Outdated
@@ -24,6 +24,7 @@ module.exports = app => {
router.get('/notfound', controller.page.notfound);

router.get('/api/project', controller.api.project.showAll);
router.get('/api/project/capacity', controller.api.project.capacity);
Copy link
Member

Choose a reason for hiding this comment

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

statistics? capacity不专业

Copy link
Member Author

Choose a reason for hiding this comment

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

可以~

@codecov
Copy link

codecov bot commented Sep 18, 2019

Codecov Report

Merging #147 into master will decrease coverage by 1.63%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   93.27%   91.63%   -1.64%     
==========================================
  Files          40       40              
  Lines         877      885       +8     
==========================================
- Hits          818      811       -7     
- Misses         59       74      +15
Impacted Files Coverage Δ
app/middleware/export_data.js 50% <0%> (ø) ⬆️
app/router.js 100% <100%> (ø) ⬆️
app/controller/api/project.js 74.24% <62.5%> (-22.37%) ⬇️

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 142812c...a6c2ba2. Read the comment docs.

@zivyangll zivyangll merged commit ae57659 into master Sep 18, 2019
@zivyangll zivyangll deleted the feature/async-get-project-capacity branch September 18, 2019 01:52
@@ -3,6 +3,7 @@ language: node_js
node_js:
- '8'
install:
- rm -rf node_modules
Copy link
Member

Choose a reason for hiding this comment

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

这里不用删除吧?

Copy link
Member Author

Choose a reason for hiding this comment

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

昨天 npminstall 在 ci 一直报权限问题,删掉就可以了


item.capacity = {
count: iterfaceList.length,
size: readableSize,
size: filesize,
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

这个方便~ 我换下

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants