Skip to content

Commit

Permalink
make public/js/stats/*.js into directives
Browse files Browse the repository at this point in the history
 * plugins/moment/*.js added
 * FIXME The bome chart does not work correctly
  • Loading branch information
hackmod committed Apr 18, 2018
1 parent 2c934c6 commit 5f25f1a
Show file tree
Hide file tree
Showing 13 changed files with 1,362 additions and 272,110 deletions.
1,357 changes: 1,356 additions & 1 deletion public/js/controllers/StatsController.js

Large diffs are not rendered by default.

19 changes: 2 additions & 17 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,33 +204,18 @@ BlocksApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvide
.state('stats', {
url: "/stats/{chart}",
templateUrl: "views/stats/index.html",
data: {pageTitle: 'Transaction'},
data: {pageTitle: 'Statistics'},
controller: "StatsController",
resolve: {
deps: ['$ocLazyLoad', '$stateParams', function($ocLazyLoad, $stateParams) {
var bundle = '/js/stats/bundle_';

switch ($stateParams.chart) {
case "etc_hashrate":
bundle = bundle + "hashrate.js";
break;
case "miner_hashrate":
bundle = bundle + "hashrate_distribution.js";
break;

case "The_bomb_chart":
bundle = bundle + "The_bomb_chart_with_ECIP_1010.js";
break;

}
return $ocLazyLoad.load({
insertBefore: '#ng_load_plugins_before', // load the above css files before '#ng_load_plugins_before'
files: [
'/js/controllers/StatsController.js',
'/css/stats.css',
"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.js",
"/plugins/async.min.js",
bundle
"/plugins/moment/moment.min.js"
]
});
}]
Expand Down
291 changes: 0 additions & 291 deletions public/js/stats/The_bomb_chart.js

This file was deleted.

Loading

0 comments on commit 5f25f1a

Please sign in to comment.