mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 15:37:29 -02:30
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:
@@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1606,6 +1606,9 @@ tr td button i {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#stream-content {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user