mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Remove extraneous unused code/comments
This commit is contained in:
@@ -72,26 +72,6 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, $log, Wait,
|
|||||||
//Wait('start');
|
//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) {
|
if ($scope.removeDashboardReady) {
|
||||||
$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 () {
|
$scope.showActivity = function () {
|
||||||
Stream({
|
Stream({
|
||||||
scope: $scope
|
scope: $scope
|
||||||
|
|||||||
@@ -94,8 +94,6 @@ angular.module('DashboardGraphs').
|
|||||||
.duration(500)
|
.duration(500)
|
||||||
.call(license_graph)
|
.call(license_graph)
|
||||||
.style({
|
.style({
|
||||||
// 'width': width,
|
|
||||||
// 'height': height,
|
|
||||||
"font-family": 'Open Sans',
|
"font-family": 'Open Sans',
|
||||||
"font-style": "normal",
|
"font-style": "normal",
|
||||||
"font-weight":400,
|
"font-weight":400,
|
||||||
@@ -103,7 +101,6 @@ angular.module('DashboardGraphs').
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// nv.utils.windowResize(license_graph.update);
|
|
||||||
scope.$emit('WidgetLoaded');
|
scope.$emit('WidgetLoaded');
|
||||||
|
|
||||||
adjustGraphSize(license_graph, element);
|
adjustGraphSize(license_graph, element);
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ angular.module('DashboardGraphs')
|
|||||||
|
|
||||||
d3.select(element.find('svg')[0])
|
d3.select(element.find('svg')[0])
|
||||||
.datum(data)
|
.datum(data)
|
||||||
// .attr('width', width)
|
|
||||||
// .attr('height', height)
|
|
||||||
.transition().duration(350)
|
.transition().duration(350)
|
||||||
.call(host_pie_chart)
|
.call(host_pie_chart)
|
||||||
.style({
|
.style({
|
||||||
@@ -77,7 +75,7 @@ angular.module('DashboardGraphs')
|
|||||||
"font-weight":400,
|
"font-weight":400,
|
||||||
"src": "url(/static/fonts/OpenSans-Regular.ttf)"
|
"src": "url(/static/fonts/OpenSans-Regular.ttf)"
|
||||||
});
|
});
|
||||||
// nv.utils.windowResize(host_pie_chart.update);
|
|
||||||
adjustGraphSize();
|
adjustGraphSize();
|
||||||
return host_pie_chart;
|
return host_pie_chart;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ angular.module('DashboardGraphs')
|
|||||||
var html;
|
var html;
|
||||||
var url;
|
var url;
|
||||||
var job_status_chart;
|
var job_status_chart;
|
||||||
var job_status_chart;
|
|
||||||
var cleanup = angular.noop;
|
var cleanup = angular.noop;
|
||||||
|
|
||||||
scope.period="month";
|
scope.period="month";
|
||||||
@@ -64,10 +63,7 @@ angular.module('DashboardGraphs')
|
|||||||
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
|
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
|
||||||
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
|
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
|
||||||
.showYAxis(true) //Show the y-axis
|
.showYAxis(true) //Show the y-axis
|
||||||
.showXAxis(true) //Show the x-axis
|
.showXAxis(true); //Show the x-axis
|
||||||
// .width(width)
|
|
||||||
// .height(height)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
var width = $('.graph-container').width(); // nv.utils.windowSize().width/3,
|
var width = $('.graph-container').width(); // nv.utils.windowSize().width/3,
|
||||||
@@ -86,13 +82,8 @@ angular.module('DashboardGraphs')
|
|||||||
|
|
||||||
d3.select(element.find('svg')[0])
|
d3.select(element.find('svg')[0])
|
||||||
.datum(graphData)
|
.datum(graphData)
|
||||||
// .attr('width', width)
|
|
||||||
// .attr('height', height)
|
|
||||||
// .transition().duration(100)
|
|
||||||
.call(job_status_chart)
|
.call(job_status_chart)
|
||||||
.style({
|
.style({
|
||||||
// 'width': width,
|
|
||||||
// 'height': height,
|
|
||||||
"font-family": 'Open Sans',
|
"font-family": 'Open Sans',
|
||||||
"font-style": "normal",
|
"font-style": "normal",
|
||||||
"font-weight":400,
|
"font-weight":400,
|
||||||
@@ -121,9 +112,6 @@ angular.module('DashboardGraphs')
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var w = angular.element($window);
|
|
||||||
|
|
||||||
|
|
||||||
angular.element($window).on('resize', function() {
|
angular.element($window).on('resize', function() {
|
||||||
adjustGraphSize(job_status_chart, element);
|
adjustGraphSize(job_status_chart, element);
|
||||||
});
|
});
|
||||||
@@ -136,10 +124,5 @@ angular.module('DashboardGraphs')
|
|||||||
scope.removeGraphDataReady();
|
scope.removeGraphDataReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) {
|
|
||||||
|
|
||||||
return job_status_chart;
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Reference in New Issue
Block a user