Skip to content

Commit

Permalink
Merge pull request #504 from w3c/tripu/fix-301
Browse files Browse the repository at this point in the history
When auto-detecting, show also extracted metadata in result table
  • Loading branch information
deniak authored Sep 30, 2016
2 parents 5eeae07 + a987187 commit 3769c1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions public/js/specberus.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ jQuery.extend({
socket.on("start", function (data) {
console.log('Started.');
done = 0;
result = {exceptions: [], errors: [], warnings: [], infos: []};
total = data.rules.length;
$progressStyler.addClass("active progress-striped");
$progressContainer.fadeIn();
Expand Down Expand Up @@ -325,7 +324,9 @@ jQuery.extend({
$progressContainer.hide();
$progress.text('');
$progress.attr('style', '0');
var message;
var message
, metadataURL = `${baseURI}api/metadata?url=${encodeURIComponent(url.value)}`
;
if (result.errors.length > 0 || result.exceptions.length > 0) {
message = `<span class="icon red pull-left">&#10007;</span>`;
if (result.warnings.length > 0)
Expand All @@ -346,7 +347,9 @@ jQuery.extend({
message += `<p class="details">`;
if (total > 0 && profile)
message += `<a href="doc/rules?profile=${profile}">${total} rules</a> were checked. `;
message += `Hover over the rows below for options.<p>`;
message += `Hover over the rows below for options.<br />`;
message += `Tip: review the <a href="${metadataURL}">metadata that was inferred from the document</a> to make sure that there are no errors.`;
message += '</p>';
$resultsBody.html(message);
message = '';
if (result.exceptions.length > 0 || result.errors.length > 0 || result.warnings.length > 0 || result.infos.length > 0) {
Expand Down

0 comments on commit 3769c1a

Please sign in to comment.