FEATURE: Add Top Uploads report (#6825)

Co-Authored-By: I am very Pro-Grammer. <khalilovcmded@users.noreply.github.com>
This commit is contained in:
Joffrey JAFFEUX
2018-12-28 20:48:54 +01:00
committed by GitHub
parent 608abd4c08
commit f1269fa807
5 changed files with 136 additions and 2 deletions

View File

@ -272,6 +272,7 @@ const Report = Discourse.Model.extend({
if (type === "seconds") return this._secondsLabel(value);
if (type === "link") return this._linkLabel(label.properties, row);
if (type === "percent") return this._percentLabel(value);
if (type === "bytes") return this._bytesLabel(value);
if (type === "number") {
return this._numberLabel(value, opts);
}
@ -381,6 +382,13 @@ const Report = Discourse.Model.extend({
};
},
_bytesLabel(value) {
return {
value,
formatedValue: I18n.toHumanSize(value)
};
},
_dateLabel(value, date, format = "LL") {
return {
value,