web/origin-manager: display the reason for a diff failure.

This commit is contained in:
Jimmy Berry 2019-08-28 17:15:19 -05:00
parent 114f25e004
commit e3d67622e9
2 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,6 @@ aside {
overflow: auto;
}
#details p {
#details p, #details pre {
margin: 20px;
}

View File

@ -352,6 +352,10 @@ function potential_set(project, package, origin) {
if (text == '') {
$('#details').html('<p>No difference</p>');
return;
} else if (text.startsWith('# diff failed')) {
$('#details').html('<p>Failed to generate diff</p><pre></pre>');
$('#details pre').text(text);
return;
}
$('#details').html(Diff2Html.getPrettyHtml(text));
});