mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
improve formatting
This commit is contained in:
@@ -41,19 +41,19 @@ public class InfoCheck extends Check {
|
||||
for (String[] ss : new String[][] {
|
||||
new String[] {
|
||||
ConfigurationManager.getProperty("assetstore.dir"),
|
||||
"Assetstore size: ", },
|
||||
"Assetstore size", },
|
||||
new String[] {
|
||||
ConfigurationManager.getProperty("search.dir"),
|
||||
"Search dir size: ", },
|
||||
"Search dir size", },
|
||||
new String[] {
|
||||
ConfigurationManager.getProperty("log.dir"),
|
||||
"Log dir size: ", }, })
|
||||
"Log dir size", }, })
|
||||
{
|
||||
try {
|
||||
File dir = new File(ss[0]);
|
||||
if (dir.exists()) {
|
||||
long dir_size = FileUtils.sizeOfDirectory(dir);
|
||||
sb.append(String.format("%s: %s\n", ss[1],
|
||||
sb.append(String.format("%-20s: %s\n", ss[1],
|
||||
FileUtils.byteCountToDisplaySize(dir_size))
|
||||
);
|
||||
} else {
|
||||
|
@@ -54,7 +54,7 @@ public class LogAnalyserCheck extends Check {
|
||||
|
||||
// create report
|
||||
for (String[] info : interesting_fields ) {
|
||||
sb.append( String.format("%-17s: %s\n", info[1], info_map.get(info[0])) );
|
||||
sb.append( String.format("%-20s: %s\n", info[1], info_map.get(info[0])) );
|
||||
}
|
||||
sb.append( String.format("Items added since [%s] (db): %s\n",
|
||||
new SimpleDateFormat("yyyy-MM-dd").format(ri.from().getTime()),
|
||||
|
@@ -62,16 +62,18 @@ public class UserCheck extends Check {
|
||||
}
|
||||
|
||||
ret += String.format(
|
||||
"Users: %d\n", info.get("Count"));
|
||||
"%-20s: %d\n", "Users", info.get("Count"));
|
||||
ret += String.format(
|
||||
"Have email: %d\n", info.get("Have email"));
|
||||
"%-20s: %d\n", "Have email", info.get("Have email"));
|
||||
for (Map.Entry<String, Integer> e : info.entrySet()) {
|
||||
if (!e.getKey().equals("Count") && !e.getKey().equals("Have email")) {
|
||||
ret += String.format("%s: %s\n", e.getKey(),
|
||||
ret += String.format("%-20s: %s\n", e.getKey(),
|
||||
String.valueOf(e.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
ret += "\n";
|
||||
|
||||
try {
|
||||
// empty group
|
||||
List<String> egs = Core.getEmptyGroups();
|
||||
|
Reference in New Issue
Block a user