Remove extraneous unused code/comments

This commit is contained in:
Joe Fiorini 2015-01-27 16:23:51 -05:00
parent e567386c69
commit 38b8ed4e9e
4 changed files with 2 additions and 61 deletions

View File

@ -72,26 +72,6 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait,
//Wait('start');
}
if ($scope.removeWidgetLoaded) {
$scope.removeWidgetLoaded();
}
$scope.removeWidgetLoaded = $scope.$on('WidgetLoaded', function (e, label, jobscope, schedulescope) {
// Once all the widgets report back 'loaded', turn off Wait widget
if(label==="dashboard_jobs"){
jobs_scope = jobscope;
schedule_scope = schedulescope;
}
loadedCount++;
if (loadedCount === waitCount) {
// console.log('binding to resize');
// angular.element($window).on('resize', _.debounce(function() {
// console.log('resize from controller');
// Wait('stop');
// }, 500));
// $(window).resize();
}
});
if ($scope.removeDashboardReady) {
$scope.removeDashboardReady();
}
@ -130,23 +110,6 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait,
});
if ($rootScope.removeJobStatusChange) {
$rootScope.removeJobStatusChange();
}
// $rootScope.removeJobStatusChange = $rootScope.$on('JobStatusChange', function() {
// jobs_scope.refreshJobs();
// $scope.$emit('ReloadJobStatusGraph');
// });
if ($rootScope.removeScheduleChange) {
$rootScope.removeScheduleChange();
}
$rootScope.removeScheduleChange = $rootScope.$on('ScheduleChange', function() {
schedule_scope.refreshSchedules();
$scope.$emit('ReloadJobStatusGraph');
});
$scope.showActivity = function () {
Stream({
scope: $scope

View File

@ -94,8 +94,6 @@ angular.module('DashboardGraphs').
.duration(500)
.call(license_graph)
.style({
// 'width': width,
// 'height': height,
"font-family": 'Open Sans',
"font-style": "normal",
"font-weight":400,
@ -103,7 +101,6 @@ angular.module('DashboardGraphs').
});
// nv.utils.windowResize(license_graph.update);
scope.$emit('WidgetLoaded');
adjustGraphSize(license_graph, element);

View File

@ -67,8 +67,6 @@ angular.module('DashboardGraphs')
d3.select(element.find('svg')[0])
.datum(data)
// .attr('width', width)
// .attr('height', height)
.transition().duration(350)
.call(host_pie_chart)
.style({
@ -77,7 +75,7 @@ angular.module('DashboardGraphs')
"font-weight":400,
"src": "url(/static/fonts/OpenSans-Regular.ttf)"
});
// nv.utils.windowResize(host_pie_chart.update);
adjustGraphSize();
return host_pie_chart;
}

View File

@ -11,7 +11,6 @@ angular.module('DashboardGraphs')
var html;
var url;
var job_status_chart;
var job_status_chart;
var cleanup = angular.noop;
scope.period="month";
@ -64,10 +63,7 @@ angular.module('DashboardGraphs')
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
.showYAxis(true) //Show the y-axis
.showXAxis(true) //Show the x-axis
// .width(width)
// .height(height)
;
.showXAxis(true); //Show the x-axis
var width = $('.graph-container').width(); // nv.utils.windowSize().width/3,
@ -86,13 +82,8 @@ angular.module('DashboardGraphs')
d3.select(element.find('svg')[0])
.datum(graphData)
// .attr('width', width)
// .attr('height', height)
// .transition().duration(100)
.call(job_status_chart)
.style({
// 'width': width,
// 'height': height,
"font-family": 'Open Sans',
"font-style": "normal",
"font-weight":400,
@ -121,9 +112,6 @@ angular.module('DashboardGraphs')
}
var w = angular.element($window);
angular.element($window).on('resize', function() {
adjustGraphSize(job_status_chart, element);
});
@ -136,10 +124,5 @@ angular.module('DashboardGraphs')
scope.removeGraphDataReady();
}
scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) {
return job_status_chart;
});
}
}]);