Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Draft
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
40 changes: 36 additions & 4 deletions src/assets/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@
_react2.default.createElement(
"h3",
null,
"GANACHE (ganache-cli)"
"GANACHE (ganache)"
),
_react2.default.createElement(
"div",
{ className: "tile is-ancestor" },
_react2.default.createElement(
"div",
{ className: "tile is-12" },
_react2.default.createElement(_downloads2.default, { colorclassName: "is-ganache", packageName: "ganache-cli", startDate: "2017-10-01" })
_react2.default.createElement(_downloads2.default, { colorclassName: "is-ganache", packageName: "ganache", startDate: "2017-10-01" })
)
),
_react2.default.createElement(
Expand Down Expand Up @@ -22125,8 +22125,40 @@

(0, _reduce2.default)(requests, [], function (memo, item, callback) {
_axios2.default.get(item).then(function (response) {
var downloads = response.data.downloads;
callback(null, memo.concat(downloads));
var downloads = response.data.downloads;
if (item.endsWith("ganache")){
_axios2.default.get(item+"-cli").then(function (response) {
var downloads2 = response.data.downloads;
_axios2.default.get(item+"-core").then(function (response) {
var downloads3 = response.data.downloads;
const all = downloads;
downloads2.forEach(entry => {
for (let i = 0; i < all.length; i++) {
if (all[i].day === entry.day) {
all[i].downloads += entry.downloads;
return;
}
}
all[i].push(entry);
});
downloads3.forEach(entry => {
for (let i = 0; i < all.length; i++) {
if (all[i].day === entry.day) {
all[i].downloads += entry.downloads;
return;
}
}
all[i].push(entry);
});
callback(null, memo.concat(all).sort((a, b) => {
return new Date(a.day) - new Date(b.day);
}));
});
});
} else {
var downloads = response.data.downloads;
callback(null, memo.concat(downloads));
}
}).catch(callback);
}, function (err, downloads) {

Expand Down
38 changes: 35 additions & 3 deletions src/dashboard/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@
_react2.default.createElement(
"h3",
null,
"GANACHE (ganache-cli)"
"GANACHE (ganache)"
),
_react2.default.createElement(
"div",
{ className: "tile is-ancestor" },
_react2.default.createElement(
"div",
{ className: "tile is-12" },
_react2.default.createElement(_downloads2.default, { colorclassName: "is-ganache", packageName: "ganache-cli", startDate: "2017-10-01" })
_react2.default.createElement(_downloads2.default, { colorclassName: "is-ganache", packageName: "ganache", startDate: "2017-10-01" })
)
),
_react2.default.createElement(
Expand Down Expand Up @@ -22126,7 +22126,39 @@
(0, _reduce2.default)(requests, [], function (memo, item, callback) {
_axios2.default.get(item).then(function (response) {
var downloads = response.data.downloads;
callback(null, memo.concat(downloads));
if (item.endsWith("ganache")){
_axios2.default.get(item+"-cli").then(function (response) {
var downloads2 = response.data.downloads;
_axios2.default.get(item+"-core").then(function (response) {
var downloads3 = response.data.downloads;
const all = downloads;
downloads2.forEach(entry => {
for (let i = 0; i < all.length; i++) {
if (all[i].day === entry.day) {
all[i].downloads += entry.downloads;
return;
}
}
all[i].push(entry);
});
downloads3.forEach(entry => {
for (let i = 0; i < all.length; i++) {
if (all[i].day === entry.day) {
all[i].downloads += entry.downloads;
return;
}
}
all[i].push(entry);
});
callback(null, memo.concat(all).sort((a, b) => {
return new Date(a.day) - new Date(b.day);
}));
});
});
} else {
var downloads = response.data.downloads;
callback(null, memo.concat(downloads));
}
}).catch(callback);
}, function (err, downloads) {

Expand Down