mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added plugin counts to report summary.
Also split the summary up into version info and plugin & message count sections.
This commit is contained in:
@@ -24,14 +24,25 @@
|
||||
<h2 id="txtSummary"></h2>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td id="txtLootVersion"></td><td id="lootVersion"></td></tr>
|
||||
<tr><td id="txtMasterlistUpdating"></td><td id="masterlistUpdating"></td></tr>
|
||||
<tr><td id="txtMasterlistRevision"></td><td id="masterlistRevision"></td></tr>
|
||||
<tr><td id="txtMasterlistDate"></td><td id="masterlistDate"></td></tr>
|
||||
<tr><td id="txtTotalMessageNo"></td><td id="totalMessageNo"></td></tr>
|
||||
<tr><td id="txtTotalWarningNo"></td><td id="totalWarningNo"></td></tr>
|
||||
<tr><td id="txtTotalErrorNo"></td><td id="totalErrorNo"></td></tr>
|
||||
</tbody>
|
||||
<tr><td id="txtLootVersion"><td id="lootVersion">
|
||||
<tr><td id="txtMasterlistUpdating"><td id="masterlistUpdating">
|
||||
<tr><td id="txtMasterlistRevision"><td id="masterlistRevision">
|
||||
<tr><td id="txtMasterlistDate"><td id="masterlistDate">
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2 id="txtCounts"></h2>
|
||||
<table style="float:left;">
|
||||
<tbody>
|
||||
<tr><td id="txtActivePluginNo"><td id="activePluginNo">
|
||||
<tr><td id="txtDirtyPluginNo"><td id="dirtyPluginNo">
|
||||
<tr><td id="txtTotalPluginNo"><td id="totalPluginNo">
|
||||
</table>
|
||||
<table style="float:left;">
|
||||
<tbody>
|
||||
<tr><td id="txtTotalWarningNo"><td id="totalWarningNo">
|
||||
<tr><td id="txtTotalErrorNo"><td id="totalErrorNo">
|
||||
<tr><td id="txtTotalMessageNo"><td id="totalMessageNo">
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
@@ -51,7 +62,7 @@
|
||||
<input type="checkbox" id="hideAllPluginMessages" /><label id="txtHideAllPluginMessages" for="hideAllPluginMessages"></label><br>
|
||||
<input type="checkbox" id="hideMessagelessPlugins" /><label id="txtHideMessagelessPlugins" for="hideMessagelessPlugins"></label><br>
|
||||
<div>
|
||||
<span id="txtPluginsHidden"></span>: <span id="hiddenPluginNo">0</span> / <span id="totalPluginNo"></span>
|
||||
<span id="txtPluginsHidden"></span>: <span id="hiddenPluginNo">0</span> / <span id="filterTotalPluginNo"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span id="txtMessagesHidden"></span>: <span id="hiddenMessageNo">0</span> / <span id="filterTotalMessageNo"></span>
|
||||
|
||||
@@ -224,6 +224,8 @@ function processURLParams() {
|
||||
var totalMessageNo = 0;
|
||||
var warnMessageNo = 0;
|
||||
var errorMessageNo = 0;
|
||||
var activePluginNo = 0;
|
||||
var dirtyPluginNo = 0;
|
||||
/* Fill report with data. */
|
||||
document.getElementById('lootVersion').textContent = data.lootVersion;
|
||||
document.getElementById('masterlistRevision').textContent = data.masterlist.revision;
|
||||
@@ -250,6 +252,14 @@ function processURLParams() {
|
||||
|
||||
li.setAttribute('data-active', data.plugins[i].isActive);
|
||||
|
||||
if (data.plugins[i].isActive) {
|
||||
++activePluginNo;
|
||||
}
|
||||
|
||||
if (data.plugins[i].isDirty) {
|
||||
++dirtyPluginNo;
|
||||
}
|
||||
|
||||
var mod = document.createElement('div');
|
||||
mod.className = 'mod';
|
||||
mod.textContent = data.plugins[i].name;
|
||||
@@ -301,11 +311,14 @@ function processURLParams() {
|
||||
}
|
||||
pluginsList.appendChild(li);
|
||||
}
|
||||
document.getElementById('totalMessageNo').textContent = totalMessageNo;
|
||||
document.getElementById('filterTotalMessageNo').textContent = totalMessageNo;
|
||||
document.getElementById('totalPluginNo').textContent = data.plugins.length;
|
||||
document.getElementById('totalMessageNo').textContent = totalMessageNo;
|
||||
document.getElementById('totalWarningNo').textContent = warnMessageNo;
|
||||
document.getElementById('totalErrorNo').textContent = errorMessageNo;
|
||||
document.getElementById('filterTotalPluginNo').textContent = data.plugins.length;
|
||||
document.getElementById('totalPluginNo').textContent = data.plugins.length;
|
||||
document.getElementById('activePluginNo').textContent = activePluginNo;
|
||||
document.getElementById('dirtyPluginNo').textContent = dirtyPluginNo;
|
||||
|
||||
/* Now apply translated UI strings. */
|
||||
for (var id in data.l10n) {
|
||||
|
||||
@@ -78,6 +78,9 @@ table td:first-child {
|
||||
text-align:left;
|
||||
padding-left:0;
|
||||
}
|
||||
table:not(:last-child) {
|
||||
margin-right: 3em;
|
||||
}
|
||||
#noChanges {
|
||||
font-weight:bold;
|
||||
font-size:12pt;
|
||||
|
||||
@@ -184,6 +184,7 @@ namespace loot {
|
||||
|
||||
std::list<Message> messages = plugin.Messages();
|
||||
std::set<PluginDirtyInfo> dirtyInfo = plugin.DirtyInfo();
|
||||
size_t numDirtyInfo(0);
|
||||
for (const auto &element: dirtyInfo) {
|
||||
boost::format f;
|
||||
if (element.ITMs() > 0 && element.UDRs() > 0 && element.DeletedNavmeshes() > 0)
|
||||
@@ -208,8 +209,16 @@ namespace loot {
|
||||
f = boost::format(boost::locale::translate("Contains %1% ITM records and %2% UDR records. Clean with %3%.")) % element.ITMs() % element.UDRs() % element.CleaningUtility();
|
||||
|
||||
messages.push_back(loot::Message(loot::Message::warn, f.str()));
|
||||
++numDirtyInfo;
|
||||
}
|
||||
|
||||
//Also add some metadata so that the summary can count the total number of cleaning messages.
|
||||
out << YAML::Key << "isDirty";
|
||||
if (numDirtyInfo > 0)
|
||||
out << YAML::Value << true;
|
||||
else
|
||||
out << YAML::Value << false;
|
||||
|
||||
if (!messages.empty()) {
|
||||
out << YAML::Key << "messages"
|
||||
<< YAML::Value << YAML::BeginSeq;
|
||||
@@ -312,7 +321,7 @@ namespace loot {
|
||||
<< YAML::Value << boost::locale::translate("Summary").str()
|
||||
|
||||
<< YAML::Key << "txtSummary"
|
||||
<< YAML::Value << boost::locale::translate("Summary").str()
|
||||
<< YAML::Value << boost::locale::translate("Version Information").str()
|
||||
|
||||
<< YAML::Key << "txtLootVersion"
|
||||
<< YAML::Value << boost::locale::translate("LOOT Version").str()
|
||||
@@ -326,14 +335,26 @@ namespace loot {
|
||||
<< YAML::Key << "txtMasterlistUpdating"
|
||||
<< YAML::Value << boost::locale::translate("Masterlist Updating").str()
|
||||
|
||||
<< YAML::Key << "txtCounts"
|
||||
<< YAML::Value << boost::locale::translate("Plugin & Message Counts").str()
|
||||
|
||||
<< YAML::Key << "txtTotalPluginNo"
|
||||
<< YAML::Value << boost::locale::translate("Total Plugins").str()
|
||||
|
||||
<< YAML::Key << "txtActivePluginNo"
|
||||
<< YAML::Value << boost::locale::translate("Active Plugins").str()
|
||||
|
||||
<< YAML::Key << "txtDirtyPluginNo"
|
||||
<< YAML::Value << boost::locale::translate("Dirty Plugins").str()
|
||||
|
||||
<< YAML::Key << "txtTotalMessageNo"
|
||||
<< YAML::Value << boost::locale::translate("Total Number of Messages").str()
|
||||
<< YAML::Value << boost::locale::translate("Total Messages").str()
|
||||
|
||||
<< YAML::Key << "txtTotalWarningNo"
|
||||
<< YAML::Value << boost::locale::translate("Number of Warnings").str()
|
||||
<< YAML::Value << boost::locale::translate("Warnings").str()
|
||||
|
||||
<< YAML::Key << "txtTotalErrorNo"
|
||||
<< YAML::Value << boost::locale::translate("Number of Errors").str()
|
||||
<< YAML::Value << boost::locale::translate("Errors").str()
|
||||
|
||||
<< YAML::Key << "txtGeneralMessages"
|
||||
<< YAML::Value << boost::locale::translate("General Messages").str()
|
||||
|
||||
Reference in New Issue
Block a user