mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
improve verbiage in activity stream for associating/disassociating wf nodes
This commit is contained in:
parent
1d03625b27
commit
685f4018f2
@ -10,6 +10,7 @@ export default function BuildAnchor($log, $filter) {
|
||||
// catch-all case to avoid generating urls if a resource has been deleted
|
||||
// if a resource still exists, it'll be serialized in the activity's summary_fields
|
||||
if (!activity.summary_fields[resource]){
|
||||
console.log(activity);
|
||||
throw {name : 'ResourceDeleted', message: 'The referenced resource no longer exists'};
|
||||
}
|
||||
let name;
|
||||
|
@ -85,8 +85,12 @@ export default function BuildDescription(BuildAnchor, $log, i18n) {
|
||||
'from ' + activity.object1 + BuildAnchor(activity.summary_fields.group[0], activity.object1, activity);
|
||||
}
|
||||
else {
|
||||
activity.description += activity.object2 + BuildAnchor(activity.summary_fields[activity.object2][0], activity.object2, activity) +
|
||||
'from ' + activity.object1 + BuildAnchor(activity.summary_fields[activity.object1][0], activity.object1, activity);
|
||||
if (activity.object1 === 'workflow_job_template_node' && activity.object2 === 'workflow_job_template_node') {
|
||||
activity.description += 'two nodes on workflow' + BuildAnchor(activity.summary_fields[activity.object1[0]], activity.object1, activity);
|
||||
} else {
|
||||
activity.description += activity.object2 + BuildAnchor(activity.summary_fields[activity.object2][0], activity.object2, activity) +
|
||||
'from ' + activity.object1 + BuildAnchor(activity.summary_fields[activity.object1][0], activity.object1, activity);
|
||||
}
|
||||
}
|
||||
break;
|
||||
// expected outcome "associated <object2> to <object1>"
|
||||
@ -97,8 +101,12 @@ export default function BuildDescription(BuildAnchor, $log, i18n) {
|
||||
'to ' + activity.object2 + BuildAnchor(activity.summary_fields.group[1], activity.object2, activity);
|
||||
}
|
||||
else {
|
||||
activity.description += activity.object1 + BuildAnchor(activity.summary_fields[activity.object1][0], activity.object1, activity) +
|
||||
'to ' + activity.object2 + BuildAnchor(activity.summary_fields[activity.object2][0], activity.object2, activity);
|
||||
if (activity.object1 === 'workflow_job_template_node' && activity.object2 === 'workflow_job_template_node') {
|
||||
activity.description += 'two nodes on workflow' + BuildAnchor(activity.summary_fields[activity.object1[0]], activity.object1, activity);
|
||||
} else {
|
||||
activity.description += activity.object1 + BuildAnchor(activity.summary_fields[activity.object1][0], activity.object1, activity) +
|
||||
'to ' + activity.object2 + BuildAnchor(activity.summary_fields[activity.object2][0], activity.object2, activity);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
|
Loading…
Reference in New Issue
Block a user