diff options
author | Chris Houseknecht <chouse@ansible.com> | 2014-07-17 23:30:50 +0200 |
---|---|---|
committer | Chris Houseknecht <chouse@ansible.com> | 2014-07-17 23:30:50 +0200 |
commit | a75c455633c36e9181876b737f691e17ac0b6806 (patch) | |
tree | 4b855db606506434d3253eced7a5d2df2b1aa939 | |
parent | Schedules / Activity Stream (diff) | |
download | awx-a75c455633c36e9181876b737f691e17ac0b6806.tar.xz awx-a75c455633c36e9181876b737f691e17ac0b6806.zip |
Activity Streams
Activity stream button was not working. Broke when tabs were removed from index.html. Fixed a bug in Users stream search on related username.
-rw-r--r-- | awx/ui/static/js/controllers/Jobs.js | 5 | ||||
-rw-r--r-- | awx/ui/static/js/helpers/search.js | 2 | ||||
-rw-r--r-- | awx/ui/static/js/widgets/Stream.js | 7 | ||||
-rw-r--r-- | awx/ui/static/less/ansible-ui.less | 3 | ||||
-rw-r--r-- | awx/ui/static/lib/ansible/list-generator.js | 4 |
5 files changed, 12 insertions, 9 deletions
diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index 2bb3f28d21..5d41f5b9f5 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -19,7 +19,6 @@ function JobsListController ($log, $scope, $compile, $routeParams, ClearScope, B choicesCount = 0, listCount = 0, api_complete = false, - event_socket, schedule_socket, job_socket, event_queue = [], @@ -48,9 +47,9 @@ function JobsListController ($log, $scope, $compile, $routeParams, ClearScope, B }); schedule_socket.init(); - schedule_socket.on("status_change", function(data) { + schedule_socket.on("status_change", function() { if (api_complete) { - schedule_scope.search('schedule'); + scheduled_scope.search('schedule'); } }); diff --git a/awx/ui/static/js/helpers/search.js b/awx/ui/static/js/helpers/search.js index f60e1d8401..697d17ff7e 100644 --- a/awx/ui/static/js/helpers/search.js +++ b/awx/ui/static/js/helpers/search.js @@ -327,7 +327,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper']) } else { scope[iterator + 'SearchParams'] += '&' + list.fields[scope[iterator + 'SearchField' + modifier]].searchObject + - '__name__icontains=' + + ( (list.fields[scope[iterator + 'SearchField' + modifier]].searchObject === 'user') ? '__username__icontains=' : '__name__icontains=' ) + scope[iterator + 'SearchValue' + modifier]; } } else { diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 31ff0f4c08..78c04adeac 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -331,12 +331,13 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti view = GenerateList, base = $location.path().replace(/^\//, '').split('/')[0], parent_scope = params.scope, + scope = parent_scope.$new(), search_iterator = params.search_iterator, // use to get correct current_search_params from local store PreviousSearchParams = (search_iterator) ? Store(search_iterator + '_current_search_params') : Store('CurrentSearchParams'), inventory_name = (params && params.inventory_name) ? params.inventory_name : null, onClose = params.onClose, // optional callback to $emit after AS closes url = (params && params.url) ? params.url : null, - type, paths, itm, scope; + type, paths, itm; $rootScope.flashMessage = null; @@ -364,7 +365,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti } // Add a container for the stream widget - $('#tab-content-container').append("<div id=\"stream-container\"><div id=\"stream-content\"></div></div><!-- Stream widget -->"); + $('#main-view').append("<div id=\"stream-container\"><div id=\"stream-content\"></div></div><!-- Stream widget -->"); StreamBreadCrumbs(); @@ -379,7 +380,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti ShowStream(); // Generate the list - scope = view.inject(list, { mode: 'edit', id: 'stream-content', searchSize: 'col-lg-3', secondWidget: true, activityStream: true }); + view.inject(list, { mode: 'edit', id: 'stream-content', searchSize: 'col-lg-3', secondWidget: true, activityStream: true, scope: scope }); // descriptive title describing what AS is showing scope.streamTitle = (params && params.title) ? params.title : null; diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 4c13754229..93fea2bb0d 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -1606,6 +1606,9 @@ tr td button i { margin-bottom: 15px; margin-top: 5px; } + + padding-left: 10px; + padding-right: 10px; } #stream-content { diff --git a/awx/ui/static/lib/ansible/list-generator.js b/awx/ui/static/lib/ansible/list-generator.js index 8f5d86fa71..351e59964a 100644 --- a/awx/ui/static/lib/ansible/list-generator.js +++ b/awx/ui/static/lib/ansible/list-generator.js @@ -141,9 +141,9 @@ angular.module('ListGenerator', ['GeneratorHelpers']) html += "<ul class=\"ansible-breadcrumb\">\n"; html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"\" " + "ng-click=\"closeStream(crumb.path)\">" + "{{ crumb.title }}</a></li>\n"; - html += "<li class=\"active\">"; + html += "<li class=\"active\"><a href=\"\">"; html += list.editTitle; - html += "</li>\n</ul>\n</div>\n"; + html += "</a></li>\n</ul>\n</div>\n"; } //else if (options.mode !== 'lookup' && (options.breadCrumbs === undefined || options.breadCrumbs)) { else if (options.breadCrumbs) { |