Created
December 16, 2013 15:55
-
-
Save jtsoi/7989326 to your computer and use it in GitHub Desktop.
Code to show extra counters in Admin view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(["admin/plugins/charts/charts", "admin/models/store"], function(charts, storeModel){ | |
$(".bar-chart").remove(); | |
var storeId = storeModel.get('id'); | |
var barChartOptions = [ | |
{ | |
row: 0, | |
storeId: storeId, | |
eventId: 1, | |
metricName: "integration", | |
dataUrl: "/analytics/v1/time-range/", | |
title: "Product check sync" | |
}, | |
{ | |
row: 0, | |
storeId: storeId, | |
eventId: 2, | |
metricName: "integration", | |
dataUrl: "/analytics/v1/time-range/", | |
title: "Valid product sync" | |
}, | |
{ | |
row: 1, | |
storeId: storeId, | |
eventId: 3, | |
metricName: "integration", | |
dataUrl: "/analytics/v1/time-range/", | |
title: "Product check async" | |
}, | |
{ | |
row: 1, | |
storeId: storeId, | |
eventId: 4, | |
metricName: "integration", | |
dataUrl: "/analytics/v1/time-range/", | |
title: "Valid product async" | |
} | |
]; | |
_(barChartOptions).each(function(options){ | |
$('.stats-row').eq(options.row).append(new charts.BarChart(options).el); | |
}, this); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment