mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 04:29:21 -02:30
Swap out regex on related for IDs in summary_fields
This commit is contained in:
@@ -204,12 +204,12 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
$scope.removeGoToJobDetails();
|
$scope.removeGoToJobDetails();
|
||||||
}
|
}
|
||||||
$scope.removeGoToJobDetails = $scope.$on('GoToJobDetails', function(e, data) {
|
$scope.removeGoToJobDetails = $scope.$on('GoToJobDetails', function(e, data) {
|
||||||
if (data.related.current_update || data.related.last_update) {
|
if (data.summary_fields.current_update || data.summary_fields.last_update) {
|
||||||
|
|
||||||
Wait('start');
|
Wait('start');
|
||||||
|
|
||||||
// Pull the id out of the URL
|
// Grab the id from summary_fields
|
||||||
var id = (data.related.current_update) ? data.related.current_update.replace(/^\//, '').split('/')[3] : data.related.last_update.replace(/^\//, '').split('/')[3];
|
var id = (data.summary_fields.current_update) ? data.summary_fields.current_update.id : data.summary_fields.last_update.id;
|
||||||
|
|
||||||
$state.go('scmUpdateStdout', {id: id});
|
$state.go('scmUpdateStdout', {id: id});
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
scope.removeSourceReady = scope.$on('SourceReady', function(e, source) {
|
scope.removeSourceReady = scope.$on('SourceReady', function(e, source) {
|
||||||
|
|
||||||
// Pull the ID out of related.current_update / related.last_update
|
// Pull the ID out of related.current_update / related.last_update
|
||||||
var update_id = (source.current_update) ? source.related.current_update.replace(/^\//, '').split('/')[3] : source.related.last_update.replace(/^\//, '').split('/')[3];
|
var update_id = (source.current_update) ? source.summary_fields.current_update.id : source.summary_fields.last_update.id;
|
||||||
|
|
||||||
$state.go('inventorySyncStdout', {id: update_id});
|
$state.go('inventorySyncStdout', {id: update_id});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user