Skip to content

Commit

Permalink
Merge pull request #2 from catscarlet/dev
Browse files Browse the repository at this point in the history
minor update
  • Loading branch information
catscarlet committed Nov 22, 2018
2 parents 0a60910 + aa6a3f3 commit b5ee61a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ yarn.lock, so:

## Known-Issues

- The analyed data is saved in locatstorage. When the size of data is over than 5M (about 300,000 lines), **Chrome will crash straightly without any information**. Firefox will stop the script and throw `Persistent storage maximum size reached` , It can be avoid by setting `about:config` - `dom.storage.default_quota` to expand the limit.
- No progress info when analyzing. Using setTimeout will cause terrible IDLE time, that would waste about 30 times of time.
- The analyed data is saved in locatstorage. When the size of data is over than 5M (about 300,000 lines), **Chrome may crash straightly without any information**. Firefox will stop the script and throw `Persistent storage maximum size reached` , It can be avoid by setting `about:config` - `dom.storage.default_quota` to expand the limit.
- No progress info when analyzing. Using setTimeout will cause terrible IDLE time, that would waste about at least 60 times of time.
- Analyze Status can't show Analyzing. No idea why `vue.$nextTick()` refused to work.
- Change `Number per Page` will cause page refreshing. vue-router don't support safe reload or instant reload.
- VUE and Element UI will cause any kinds of unknown bugs. The code is working today, but tomorrow, it may be unavaliable to build with no reason.
Expand Down
4 changes: 2 additions & 2 deletions README_zh-cmn-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ If you need a log-file as test simple, here is a log-file from my bike404-site:

## Known-Issues

- 因为数据信息目前是保存在 locatstorage 中,当信息大于 5M 时(约30W条日志),**Chrome 会直接崩溃并不提示任何相关信息**,Firefox 则会报错 `NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached` ,可修改 Firefox 的 `about:config` 中的 `dom.storage.default_quota` 来扩大限制。
- 没有分析进度,因为调用 setTimeout 会产生严重的浏览器 IDLE 时间,导致效率大幅下降(约30倍)。
- 因为数据信息目前是保存在 locatstorage 中,当信息大于 5M 时(约30W条日志),**Chrome 可能直接崩溃并不提示任何相关信息**,Firefox 则会报错 `NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached` ,可修改 Firefox 的 `about:config` 中的 `dom.storage.default_quota` 来扩大限制。
- 没有分析进度,因为调用 setTimeout 会产生严重的浏览器 IDLE 时间,导致效率大幅下降(至少60倍)。
- Analyze Status 没有 Analyzing,不知为何 `vue.$nextTick()` 没有效果。
- 修改 `Number per Page` 会导致整页刷新,因为 vue-router 没有提供也不能实现当前路由重建重载。
- VUE 以及 Element UI 的各种 BUGS 可能会导致今天还能用,过一夜之后再编译就满页疮痍。
Expand Down
13 changes: 11 additions & 2 deletions vue-app/src/common/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
export const toThousands = (num) => {
export const toThousands = (number) => {
let num = (number || 0).toString();
let result = '';
while (num.length > 3) {
result = ',' + num.slice(-3) + result;
num = num.slice(0, num.length - 3);
}
if (num) {
result = num + result;
}

return num.toLocaleString('en-US');
return result;
};

export const loadNumberPerPage = () => {
Expand Down

0 comments on commit b5ee61a

Please sign in to comment.