mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 16:28:43 -03:30
Remove try/catch block of copyRevisionHash()
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.RevisionHash-name {
|
.RevisionHash-name {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.RevisionHash-copy {
|
.RevisionHash-copy {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export default
|
export default
|
||||||
[ 'templateUrl',
|
[ 'templateUrl',
|
||||||
'Rest',
|
'Rest',
|
||||||
'$q',
|
'$q',
|
||||||
@@ -38,18 +38,10 @@ export default
|
|||||||
textArea.style.background = 'transparent';
|
textArea.style.background = 'transparent';
|
||||||
|
|
||||||
textArea.value = full_revision;
|
textArea.value = full_revision;
|
||||||
|
|
||||||
document.body.appendChild(textArea);
|
document.body.appendChild(textArea);
|
||||||
|
|
||||||
textArea.select();
|
textArea.select();
|
||||||
|
|
||||||
try {
|
document.execCommand('copy');
|
||||||
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.body.removeChild(textArea);
|
document.body.removeChild(textArea);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
Attr(field, 'columnClass') : "";
|
Attr(field, 'columnClass') : "";
|
||||||
html += `
|
html += `
|
||||||
<td ${classList}>
|
<td ${classList}>
|
||||||
<revisions class=\"RevisionHash\"></revisions>
|
<revisions class=\"RevisionHash\"></revisions>
|
||||||
</td>`;
|
</td>`;
|
||||||
} else if (field.type === 'badgeCount') {
|
} else if (field.type === 'badgeCount') {
|
||||||
html = BadgeCount(params);
|
html = BadgeCount(params);
|
||||||
|
|||||||
Reference in New Issue
Block a user