mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 21:57:50 +08:00
FEATURE: Add Top Uploads
report (#6825)
Co-Authored-By: I am very Pro-Grammer. <khalilovcmded@users.noreply.github.com>
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user