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.
This commit is contained in:
Chris Houseknecht
2014-07-17 17:30:50 -04:00
parent 4df2fbc38f
commit a75c455633
5 changed files with 12 additions and 9 deletions

View File

@@ -19,7 +19,6 @@ function JobsListController ($log, $scope, $compile, $routeParams, ClearScope, B
choicesCount = 0, choicesCount = 0,
listCount = 0, listCount = 0,
api_complete = false, api_complete = false,
event_socket,
schedule_socket, schedule_socket,
job_socket, job_socket,
event_queue = [], event_queue = [],
@@ -48,9 +47,9 @@ function JobsListController ($log, $scope, $compile, $routeParams, ClearScope, B
}); });
schedule_socket.init(); schedule_socket.init();
schedule_socket.on("status_change", function(data) { schedule_socket.on("status_change", function() {
if (api_complete) { if (api_complete) {
schedule_scope.search('schedule'); scheduled_scope.search('schedule');
} }
}); });

View File

@@ -327,7 +327,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
} else { } else {
scope[iterator + 'SearchParams'] += '&' + scope[iterator + 'SearchParams'] += '&' +
list.fields[scope[iterator + 'SearchField' + modifier]].searchObject + 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]; scope[iterator + 'SearchValue' + modifier];
} }
} else { } else {

View File

@@ -331,12 +331,13 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
view = GenerateList, view = GenerateList,
base = $location.path().replace(/^\//, '').split('/')[0], base = $location.path().replace(/^\//, '').split('/')[0],
parent_scope = params.scope, parent_scope = params.scope,
scope = parent_scope.$new(),
search_iterator = params.search_iterator, // use to get correct current_search_params from local store 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'), PreviousSearchParams = (search_iterator) ? Store(search_iterator + '_current_search_params') : Store('CurrentSearchParams'),
inventory_name = (params && params.inventory_name) ? params.inventory_name : null, inventory_name = (params && params.inventory_name) ? params.inventory_name : null,
onClose = params.onClose, // optional callback to $emit after AS closes onClose = params.onClose, // optional callback to $emit after AS closes
url = (params && params.url) ? params.url : null, url = (params && params.url) ? params.url : null,
type, paths, itm, scope; type, paths, itm;
$rootScope.flashMessage = null; $rootScope.flashMessage = null;
@@ -364,7 +365,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
} }
// Add a container for the stream widget // 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(); StreamBreadCrumbs();
@@ -379,7 +380,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti
ShowStream(); ShowStream();
// Generate the list // 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 // descriptive title describing what AS is showing
scope.streamTitle = (params && params.title) ? params.title : null; scope.streamTitle = (params && params.title) ? params.title : null;

View File

@@ -1606,6 +1606,9 @@ tr td button i {
margin-bottom: 15px; margin-bottom: 15px;
margin-top: 5px; margin-top: 5px;
} }
padding-left: 10px;
padding-right: 10px;
} }
#stream-content { #stream-content {

View File

@@ -141,9 +141,9 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
html += "<ul class=\"ansible-breadcrumb\">\n"; html += "<ul class=\"ansible-breadcrumb\">\n";
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"\" " + "ng-click=\"closeStream(crumb.path)\">" + html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"\" " + "ng-click=\"closeStream(crumb.path)\">" +
"{{ crumb.title }}</a></li>\n"; "{{ crumb.title }}</a></li>\n";
html += "<li class=\"active\">"; html += "<li class=\"active\"><a href=\"\">";
html += list.editTitle; 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.mode !== 'lookup' && (options.breadCrumbs === undefined || options.breadCrumbs)) {
else if (options.breadCrumbs) { else if (options.breadCrumbs) {