Merge pull request #1695 from jakemcdermott/fix-1614-1615-1616

disable activity stream for relaunched job labels, fix ui activity stream links
This commit is contained in:
Jake McDermott 2018-05-07 12:57:44 -04:00 committed by GitHub
commit 8e75cabcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -838,8 +838,11 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
setattr(unified_job, fd, val)
unified_job.save()
# Labels coppied here
copy_m2m_relationships(self, unified_job, fields)
# Labels copied here
from awx.main.signals import disable_activity_stream
with disable_activity_stream():
copy_m2m_relationships(self, unified_job, fields)
return unified_job
def launch_prompts(self):

View File

@ -62,10 +62,23 @@ export default function BuildAnchor($log, $filter) {
case 'workflow_job_template':
url += `templates/workflow_job_template/${obj.id}`;
break;
case 'workflow_job':
url += `workflows/${obj.id}`;
break;
case 'label':
url = null;
break;
default:
url += resource + 's/' + obj.id + '/';
}
return ' <a href=\"' + url + '\"> ' + $filter('sanitize')(obj.name || obj.username) + ' </a> ';
const name = $filter('sanitize')(obj.name || obj.username);
if (url) {
return ` <a href=\"${url}\"> ${name} </a> `;
}
return ` <span> ${name} </span> `;
}
catch(err){
$log.debug(err);