From 5bc8255d8f99644f9ae8ce4287c8ccdba298b11e Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Fri, 15 Aug 2014 23:02:47 -0400 Subject: [PATCH] Job detail page Fixed https://trello.com/c/JW7zmAsD/312-job-detail-duplicate-tasks-listed-when-double-clicking-a-play --- awx/ui/static/js/helpers/JobDetail.js | 6 ++++-- awx/ui/static/less/ansible-ui.less | 2 +- awx/ui/static/less/job-details.less | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/awx/ui/static/js/helpers/JobDetail.js b/awx/ui/static/js/helpers/JobDetail.js index 5105f183e9..7d9c1dca9b 100644 --- a/awx/ui/static/js/helpers/JobDetail.js +++ b/awx/ui/static/js/helpers/JobDetail.js @@ -712,6 +712,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge Rest.get() .success(function(data) { scope.next_plays = data.next; + scope.plays = []; data.results.forEach(function(event, idx) { var status, status_text, start, end, elapsed; @@ -801,7 +802,6 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge url, play; scope.tasks = []; - scope.tasksMap = {}; if (scope.selectedPlay) { url = scope.job.url + 'job_tasks/?event_id=' + scope.selectedPlay; @@ -823,6 +823,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge Rest.get() .success(function(data) { scope.next_tasks = data.next; + scope.tasks = []; data.results.forEach(function(event, idx) { var end, elapsed, status, status_text; @@ -948,7 +949,6 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge url; scope.hostResults = []; - scope.hostResultsMap = {}; if (scope.selectedTask) { // If we have a selected task, then get the list of hosts @@ -961,6 +961,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge Rest.get() .success(function(data) { scope.next_host_results = data.next; + scope.hostResults = []; data.results.forEach(function(event) { var status, status_text, item, msg; if (event.event === "runner_on_skipped") { @@ -1060,6 +1061,7 @@ function($rootScope, $log, UpdatePlayStatus, UpdateHostStatus, AddHostResult, Ge Rest.get() .success(function(data) { scope.next_host_summaries = data.next; + scope.hosts = []; data.results.forEach(function(event) { var name; if (event.host_name) { diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 403c547120..61ff3f72a3 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -7,7 +7,7 @@ * */ -@active-color: #c6e5e5; +@active-color: #EDF2F2; // #c6e5e5; @black: #171717; @blue: #1778c3; /* logo blue */ @blue-link: #1778c3; diff --git a/awx/ui/static/less/job-details.less b/awx/ui/static/less/job-details.less index f2ed39ff02..b68c95aec7 100644 --- a/awx/ui/static/less/job-details.less +++ b/awx/ui/static/less/job-details.less @@ -293,7 +293,7 @@ border: none; } .active { - background-color: #EDF2F2; + background-color: @active-color; } .loading-info { padding-top: 5px;