mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Attachment size, changed calculation to npm filesize (Admin Reports)
This commit is contained in:
parent
110a83a736
commit
3aba91885f
2 changed files with 4 additions and 2 deletions
|
@ -88,7 +88,7 @@ template(name="filesReport")
|
|||
each att in results
|
||||
tr
|
||||
td {{ att.name }}
|
||||
td.right {{fileSize att.size }}
|
||||
td.right {{ fileSize att.size }}
|
||||
td {{ att.type }}
|
||||
td {{ att._id }}
|
||||
td {{ att.meta.boardId }}
|
||||
|
|
|
@ -4,6 +4,7 @@ import { CardSearchPagedComponent } from '/client/lib/cardSearch';
|
|||
import SessionData from '/models/usersessiondata';
|
||||
import { QueryParams } from '/config/query-classes';
|
||||
import { OPERATOR_LIMIT } from '/config/search-const';
|
||||
const filesize = require('filesize');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
subscription: null,
|
||||
|
@ -114,7 +115,8 @@ class AdminReport extends BlazeComponent {
|
|||
}
|
||||
|
||||
fileSize(size) {
|
||||
return Math.round(size / 1024);
|
||||
const ret = filesize(size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
abbreviate(text) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue