mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Remove try/catch block of copyRevisionHash()
This commit is contained in:
parent
82683d423f
commit
62c4efe19b
@ -6,7 +6,7 @@
|
||||
}
|
||||
|
||||
.RevisionHash-name {
|
||||
font-family: monospace;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.RevisionHash-copy {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export default
|
||||
export default
|
||||
[ 'templateUrl',
|
||||
'Rest',
|
||||
'$q',
|
||||
@ -38,18 +38,10 @@ export default
|
||||
textArea.style.background = 'transparent';
|
||||
|
||||
textArea.value = full_revision;
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
var successful = document.execCommand('copy');
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
console.log('Copying text command was ' + msg);
|
||||
} catch (err) {
|
||||
console.log('Oops, unable to copy');
|
||||
}
|
||||
|
||||
document.execCommand('copy');
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
};
|
||||
|
||||
@ -506,7 +506,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
Attr(field, 'columnClass') : "";
|
||||
html += `
|
||||
<td ${classList}>
|
||||
<revisions class=\"RevisionHash\"></revisions>
|
||||
<revisions class=\"RevisionHash\"></revisions>
|
||||
</td>`;
|
||||
} else if (field.type === 'badgeCount') {
|
||||
html = BadgeCount(params);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user