chore: improve project overview widget

This commit is contained in:
Robin Shen 2024-01-22 08:49:53 +08:00
parent baf04f3047
commit 776f5e1492
4 changed files with 17 additions and 3 deletions

View File

@ -2,7 +2,7 @@
> **Note**
> 1. Do not worry about security advisories above. They are fixed as soon as discovered and published to notify users</span>
> 1. We develop OneDev at <a href="https://code.onedev.io">code.onedev.io</a> for sake of dogfooding. Please submit issues there
> 1. We develop OneDev at <a href="https://code.onedev.io">code.onedev.io</a> for sake of dogfooding. Please submit issues and pull requests there
</div>

View File

@ -6115,6 +6115,20 @@ public class DataMigrator {
}
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Dashboards.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element : dom.getRootElement().elements()) {
for (var widgetElement : element.element("widgets").elements()) {
if (widgetElement.getName().contains("ProjectOverviewWidget")) {
widgetElement.addElement("showCodeStats").setText("true");
widgetElement.addElement("showPullRequestStats").setText("true");
widgetElement.addElement("showIssueStatus").setText("true");
widgetElement.addElement("showBuildStatus").setText("true");
widgetElement.addElement("showPackStats").setText("true");
}
}
}
dom.writeToFile(file, false);
}
}
}

View File

@ -308,7 +308,7 @@ public class Project extends AbstractEntity implements LabelSupport<ProjectLabel
private boolean codeManagement = true;
private boolean packManagement;
private boolean packManagement = true;
private boolean issueManagement = true;

@ -1 +1 @@
Subproject commit 81fe46e0d78ad4f4f2099702f9d5fdcd82e7cb3b
Subproject commit 50c0d0e3206a2321892418ddb86b1caf7c5b6653