minor: Increase size of parcel name field in "land show" console command output. Construct table using CDT rather than string formats

0.8.0.3
Justin Clark-Casey (justincc) 2014-03-06 00:40:24 +00:00
parent 14569992e1
commit aa2fb1ec25
2 changed files with 18 additions and 13 deletions

View File

@ -35,9 +35,14 @@ namespace OpenSim.Framework.Console
public static class ConsoleDisplayUtil
{
public const int CoordTupleSize = 11;
public const int EstateNameSize = 20;
public const int PortSize = 5;
public const int EstateNameSize = 20;
public const int ParcelNameSize = 40;
public const int RegionNameSize = 20;
public const int UserNameSize = 35;
public const int UuidSize = 36;
public const int VectorSize = 15;
}
}

View File

@ -2088,27 +2088,27 @@ namespace OpenSim.Region.CoreModules.World.Land
private void AppendParcelsSummaryReport(StringBuilder report)
{
report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName);
report.AppendFormat(
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
"Parcel Name",
"Local ID",
"Area",
"Starts",
"Ends",
"Owner");
report.AppendFormat("Land information for {0}\n", m_scene.Name);
ConsoleDisplayTable cdt = new ConsoleDisplayTable();
cdt.AddColumn("Parcel Name", ConsoleDisplayUtil.ParcelNameSize);
cdt.AddColumn("ID", 3);
cdt.AddColumn("Area", 6);
cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize);
cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize);
cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize);
lock (m_landList)
{
foreach (ILandObject lo in m_landList.Values)
{
LandData ld = lo.LandData;
report.AppendFormat(
"{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
cdt.AddRow(
ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
}
}
report.Append(cdt.ToString());
}
private void AppendParcelReport(StringBuilder report, ILandObject lo)