diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 55e142b976..932ce78f02 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -23,13 +23,14 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb refresh: { mode: 'all', awToolTip: "Refresh the page", - ngClick: "refresh()" - }, - stream: { - ngClick: "showActivity()", - awToolTip: "View Activity Stream", - mode: 'all' + ngClick: "refresh()", + ngShow:"socketStatus == 'error'" } + // stream: { + // ngClick: "showActivity()", + // awToolTip: "View Activity Stream", + // mode: 'all' + // } }; html = Button({ @@ -38,11 +39,11 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb toolbar: true }); - html += Button({ - btn: buttons.stream, - action: 'stream', - toolbar: true - }); + // html += Button({ + // btn: buttons.stream, + // action: 'stream', + // toolbar: true + // }); e = angular.element(document.getElementById('home-list-actions')); e.html(html); @@ -75,7 +76,7 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb nv.dev=false; var winHeight = $(window).height(), - available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 80; + available_height = winHeight - $('#main-menu-container .navbar').outerHeight() - $('#count-container').outerHeight() - 93; $('.graph-container').height(available_height/2); // chart.update(); @@ -99,7 +100,7 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb }); } else{ - $('#dash-host-count-graph').replaceWith("
"); + $('#dash-host-count-graph').remove(); //replaceWith(""); } diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index ec3986b202..3d4ce52bc9 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -105,7 +105,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar if ($rootScope.jobDetailInterval) { window.clearInterval($rootScope.jobDetailInterval); } - $scope.$emit('LoadJob'); + $scope.$emit('LoadJob'); //this is what is used for the refresh } } }); @@ -1135,6 +1135,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar status: status }); }; + scope.refresh = function(){ + $scope.$emit('LoadJob'); + }; scope.editHost = function(id) { HostsEdit({ diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 3aab816ac4..6704998d1c 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -68,7 +68,7 @@ function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, if (event_queue > 0) { // events happened since the last check $log.debug('checking for stdout...'); - if (loaded_sections.length === 0) { + if (loaded_sections.length === 0) { ////this if statement for refresh $log.debug('calling LoadStdout'); $scope.$emit('LoadStdout'); } @@ -159,6 +159,16 @@ function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, msg: 'Failed to retrieve job: ' + job_id + '. GET returned: ' + status }); }); + $scope.refresh = function(){ + if (loaded_sections.length === 0) { ////this if statement for refresh + $log.debug('calling LoadStdout'); + $scope.$emit('LoadStdout'); + } + else if (live_event_processing) { + $log.debug('calling getNextSection'); + getNextSection(); + } + }; $scope.stdOutScrollToTop = function() { // scroll up or back in time toward the beginning of the file diff --git a/awx/ui/static/js/widgets/JobStatusGraph.js b/awx/ui/static/js/widgets/JobStatusGraph.js index a0b78af553..92783e1e72 100644 --- a/awx/ui/static/js/widgets/JobStatusGraph.js +++ b/awx/ui/static/js/widgets/JobStatusGraph.js @@ -139,7 +139,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities']) ; chart.xAxis - .axisLabel("Time").showMaxMin(true) + .axisLabel("Time")//.showMaxMin(true) .tickFormat(function(d) { var dx = graphData[0].values[d] && graphData[0].values[d].x || 0; return dx ? d3.time.format(timeFormat)(new Date(Number(dx+'000'))) : ''; @@ -159,7 +159,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities']) .datum(graphData).transition() .attr('width', width) .attr('height', height) - .duration(500) + .duration(1000) .call(chart) .style({ // 'width': width, diff --git a/awx/ui/static/partials/home.html b/awx/ui/static/partials/home.html index 3faf398429..825103ded0 100644 --- a/awx/ui/static/partials/home.html +++ b/awx/ui/static/partials/home.html @@ -1,12 +1,12 @@