Improve some JavaScript issues reported by eslint
This commit is contained in:
parent
f040418bdd
commit
4efbbde335
|
@ -125,4 +125,4 @@ function checkForAjaxError(xhr, action)
|
||||||
}
|
}
|
||||||
showAjaxError(xhr, action);
|
showAjaxError(xhr, action);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,7 +498,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
|
||||||
},
|
},
|
||||||
resultData: function(value, row) {
|
resultData: function(value, row) {
|
||||||
switch(value.index) {
|
switch(value.index) {
|
||||||
case 3: // update info
|
case 3: { // update info
|
||||||
const formElement = document.createElement('form');
|
const formElement = document.createElement('form');
|
||||||
formElement.className = 'update-info-form';
|
formElement.className = 'update-info-form';
|
||||||
formElement.appendChild(renderTableFromJsonObject({
|
formElement.appendChild(renderTableFromJsonObject({
|
||||||
|
@ -534,6 +534,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
|
||||||
};
|
};
|
||||||
formElement.appendChild(addSelectedInput);
|
formElement.appendChild(addSelectedInput);
|
||||||
return formElement;
|
return formElement;
|
||||||
|
}
|
||||||
case 4: // build preparation info
|
case 4: // build preparation info
|
||||||
return renderTableFromJsonObject({
|
return renderTableFromJsonObject({
|
||||||
data: value.data,
|
data: value.data,
|
||||||
|
@ -547,7 +548,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
case 7: // reporitory problems
|
case 7: { // reporitory problems
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.className = 'repo-problems';
|
container.className = 'repo-problems';
|
||||||
for (const [database, problems] of Object.entries(value.data)) {
|
for (const [database, problems] of Object.entries(value.data)) {
|
||||||
|
@ -578,6 +579,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
|
||||||
container.appendChild(table);
|
container.appendChild(table);
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return renderStandardTableCell(value.data);
|
return renderStandardTableCell(value.data);
|
||||||
}
|
}
|
||||||
|
@ -821,7 +823,6 @@ function renderOrphanPackage(value, obj, level, row)
|
||||||
package.version,
|
package.version,
|
||||||
row.sourceDbs,
|
row.sourceDbs,
|
||||||
);
|
);
|
||||||
return document.createTextNode();
|
|
||||||
}, function(package1, package2) {
|
}, function(package1, package2) {
|
||||||
return package1.name.localeCompare(package2.name);
|
return package1.name.localeCompare(package2.name);
|
||||||
});
|
});
|
||||||
|
@ -901,4 +902,4 @@ function initBuildActionDetails(sectionElement, sectionData, newHashParts)
|
||||||
queryBuildActionDetails(newBuildActionIds);
|
queryBuildActionDetails(newBuildActionIds);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,4 +53,4 @@ function renderIconLink(value, row, handler, tooltip, href, middleClickHref)
|
||||||
const link = renderLink(renderIcon(value), row, handler, tooltip, href, middleClickHref);
|
const link = renderLink(renderIcon(value), row, handler, tooltip, href, middleClickHref);
|
||||||
link.className = 'icon-link';
|
link.className = 'icon-link';
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ function renderTextPossiblyElidingTheEnd(value)
|
||||||
element.appendChild(elipses);
|
element.appendChild(elipses);
|
||||||
element.onclick = function () {
|
element.onclick = function () {
|
||||||
element.removeChild(element.lastChild);
|
element.removeChild(element.lastChild);
|
||||||
(expaned = !expaned) ? element.appendChild(remainingText) : element.appendChild(elipses);
|
((expaned = !expaned)) ? element.appendChild(remainingText) : element.appendChild(elipses);
|
||||||
};
|
};
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
@ -629,4 +629,4 @@ function renderObjectWithHeadings(object, row, level)
|
||||||
elements.push(heading, renderStandardTableCell(value, object, level));
|
elements.push(heading, renderStandardTableCell(value, object, level));
|
||||||
}
|
}
|
||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,4 +186,4 @@ window.functionsPostponedUntilGlobalInfo = [];
|
||||||
window.hasGlobalStatus = false;
|
window.hasGlobalStatus = false;
|
||||||
window.buildActionStates = {};
|
window.buildActionStates = {};
|
||||||
window.buildActionResults = {};
|
window.buildActionResults = {};
|
||||||
window.buildActionTypes = {};
|
window.buildActionTypes = {};
|
||||||
|
|
|
@ -18,4 +18,4 @@ function initLog()
|
||||||
addSearchToTerminal(terminal, mainElement);
|
addSearchToTerminal(terminal, mainElement);
|
||||||
terminal.open(mainElement);
|
terminal.open(mainElement);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,4 +114,4 @@ function renderPackage(package, withoutBasics)
|
||||||
});
|
});
|
||||||
table.className = 'package-details-table';
|
table.className = 'package-details-table';
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,4 +34,4 @@ function showPackageSearchResults(ajaxRequest)
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
packageSearchResults.appendChild(table);
|
packageSearchResults.appendChild(table);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,4 +75,4 @@ function streamRouteIntoTerminal(method, path, terminal)
|
||||||
ajaxRequest.open(method, apiPrefix + path, true);
|
ajaxRequest.open(method, apiPrefix + path, true);
|
||||||
ajaxRequest.send();
|
ajaxRequest.send();
|
||||||
return ajaxRequest;
|
return ajaxRequest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ function alterFormSelection(form, command)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProperty(object, property, fallback)
|
function getProperty(object, property, fallback)
|
||||||
|
@ -115,4 +115,4 @@ function getSelectedRowProperties(data, propertyName)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return propertyValues;
|
return propertyValues;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue