Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
define(function(require, exports, module) {
var _ = require('_');
var Highcharts = require('angular-highcharts').Highcharts;
var COLORS = Highcharts.getOptions().colors;
var IndexController = ['$scope', '$http', '$modal', function($scope, $http, $modal) {
// 获取总体统计数据
$scope.getDashboard = function() {
$scope.dashboardXHR = httpGet('/admin/dashboard', function(data) {
$scope.dashboard = data;
// 如果启用了 ga chart
if ($scope.dashboard.ga_enable) {
$scope.getTopPages();
$scope.getDailyVisit();
$scope.getBrowser();
}
else {
$scope.nowDate = Highcharts.dateFormat('%m月%d日', new Date().getTime());