Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
623 changes: 322 additions & 301 deletions public/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/angular-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ databusApplication.directive('activityChart', function () {
.attr("dy", "1em")
.attr("font-size", "1.1em")
.attr("text-anchor", "end")
.text("Uploaded Data (GByte)");
.text("Uploaded Data (GiByte)");

var path = g.append("path")
.datum(scope.data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ function CollectionDataTableController($http, $scope, $location, $sce) {
}

ctrl.formatUploadSize = function(size) {
if(size < 1024) return size + " B";
else if (size < 1048576) return Math.round(size / 1024) + " KB";
else if (size < 1073741824) return (Math.round(10 * size / 1048576) / 10) + " MB";
else return (Math.round(100 * size / 1073741824) / 100) + " GB";
return DatabusUtils.formatFileSize(size);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

Expand Down
8 changes: 4 additions & 4 deletions public/js/utils/databus-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ class DatabusUtils {

static formatFileSize(size) {
if (size == undefined) {
return '0 KB'
return '0 KiB'
}

if (size < 1024) return size + " B";
else if (size < 1048576) return Math.round(size / 1024) + " KB";
else if (size < 1073741824) return (Math.round(10 * size / 1048576) / 10) + " MB";
else return (Math.round(100 * size / 1073741824) / 100) + " GB";
else if (size < 1048576) return Math.round(size / 1024) + " KiB";
else if (size < 1073741824) return (Math.round(10 * size / 1048576) / 10) + " MiB";
else return (Math.round(100 * size / 1073741824) / 100) + " GiB";
};

static checkField(value, regex, min, max) {
Expand Down
2 changes: 1 addition & 1 deletion server/app/common/queries/query-modules/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function createActivityChartData(bindings) {
// Create datestring for entry and map lookup (YYYY-MM)
let dateString = date.toISOString().substring(0, 7);

// Create the entry with datestring and scaled value (GB)
// Create the entry with datestring and scaled value (GiB)
result.push({
date: dateString,
value: totalSize / (1024 * 1024 * 1024)
Expand Down