aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/CAPS/AdminWebFront.cs
diff options
context:
space:
mode:
authorMW2007-03-30 10:14:15 +0000
committerMW2007-03-30 10:14:15 +0000
commitd14a24d5caa6a8b8fc3a09fd0be12420d7ce6372 (patch)
tree4590bd24aa556c4fbd53bfef99b311a07e39df93 /OpenSim.RegionServer/CAPS/AdminWebFront.cs
parentWhen you change the name of a inventory item, it should no longer revert afte... (diff)
downloadopensim-SC_OLD-d14a24d5caa6a8b8fc3a09fd0be12420d7ce6372.zip
opensim-SC_OLD-d14a24d5caa6a8b8fc3a09fd0be12420d7ce6372.tar.gz
opensim-SC_OLD-d14a24d5caa6a8b8fc3a09fd0be12420d7ce6372.tar.bz2
opensim-SC_OLD-d14a24d5caa6a8b8fc3a09fd0be12420d7ce6372.tar.xz
Started to add a few features to the web front end that should be useful during debugging.
First such feature is that you can see a list of any connected clients inventory.
Diffstat (limited to 'OpenSim.RegionServer/CAPS/AdminWebFront.cs')
-rw-r--r--OpenSim.RegionServer/CAPS/AdminWebFront.cs47
1 files changed, 43 insertions, 4 deletions
diff --git a/OpenSim.RegionServer/CAPS/AdminWebFront.cs b/OpenSim.RegionServer/CAPS/AdminWebFront.cs
index 4995e54..72fbdaf 100644
--- a/OpenSim.RegionServer/CAPS/AdminWebFront.cs
+++ b/OpenSim.RegionServer/CAPS/AdminWebFront.cs
@@ -5,6 +5,8 @@ using System.IO;
5using OpenSim.world; 5using OpenSim.world;
6using OpenSim.UserServer; 6using OpenSim.UserServer;
7using OpenSim.Servers; 7using OpenSim.Servers;
8using OpenSim.Assets;
9using OpenSim.Framework.Inventory;
8 10
9namespace OpenSim.CAPS 11namespace OpenSim.CAPS
10{ 12{
@@ -16,9 +18,11 @@ namespace OpenSim.CAPS
16 private string passWord = "Admin"; 18 private string passWord = "Admin";
17 private World m_world; 19 private World m_world;
18 private LoginServer _userServer; 20 private LoginServer _userServer;
21 private InventoryCache _inventoryCache;
19 22
20 public AdminWebFront(string password, World world, LoginServer userserver) 23 public AdminWebFront(string password, World world, InventoryCache inventoryCache, LoginServer userserver)
21 { 24 {
25 _inventoryCache = inventoryCache;
22 _userServer = userserver; 26 _userServer = userserver;
23 m_world = world; 27 m_world = world;
24 passWord = password; 28 passWord = password;
@@ -31,9 +35,10 @@ namespace OpenSim.CAPS
31 server.AddRestHandler("GET", "/Admin/Welcome", GetWelcomePage); 35 server.AddRestHandler("GET", "/Admin/Welcome", GetWelcomePage);
32 server.AddRestHandler("GET", "/Admin/Accounts", GetAccountsPage ); 36 server.AddRestHandler("GET", "/Admin/Accounts", GetAccountsPage );
33 server.AddRestHandler("GET", "/Admin/Clients", GetConnectedClientsPage ); 37 server.AddRestHandler("GET", "/Admin/Clients", GetConnectedClientsPage );
38 server.AddRestHandler("GET", "/ClientInventory", GetClientsInventory);
34 39
35 server.AddRestHandler("POST", "/Admin/NewAccount", PostNewAccount ); 40 server.AddRestHandler("POST", "/Admin/NewAccount", PostNewAccount );
36 server.AddRestHandler("POST", "/Admin/Login", PostLogin ); 41 server.AddRestHandler("POST", "/Admin/Login", PostLogin );
37 } 42 }
38 43
39 private string GetWelcomePage(string request, string path) 44 private string GetWelcomePage(string request, string path)
@@ -120,14 +125,48 @@ namespace OpenSim.CAPS
120 if (m_world.Entities[UUID].ToString() == "OpenSim.world.Avatar") 125 if (m_world.Entities[UUID].ToString() == "OpenSim.world.Avatar")
121 { 126 {
122 TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID]; 127 TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID];
123 responseString += "<p>"; 128 responseString += "<p> Client: ";
124 responseString += String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()); 129 responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString();//String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString());
125 responseString += "</p>"; 130 responseString += "</p>";
126 } 131 }
127 } 132 }
128 return responseString; 133 return responseString;
129 } 134 }
130 135
136 private string GetClientsInventory(string request, string path)
137 {
138 string[] line;
139 string delimStr = "/";
140 char[] delimiter = delimStr.ToCharArray();
141 string responseString;
142 responseString = " <p> Listing Inventory </p>";
143
144 line = path.Split(delimiter);
145 if (line.Length > 2)
146 {
147 if (line[1] == "ClientInventory")
148 {
149 AgentInventory inven = this._inventoryCache.GetAgentsInventory(new libsecondlife.LLUUID(line[2]));
150 responseString += " <p> Client: " + inven.AgentID.ToStringHyphenated() +" </p>";
151 if (inven != null)
152 {
153 foreach (InventoryItem item in inven.InventoryItems.Values)
154 {
155 responseString += "<p> InventoryItem: ";
156 responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ; //String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", item.Name, item.ItemID, item.Type, item.FolderID, item.AssetID, item.Description);
157 responseString += "</p>";
158 }
159 }
160 }
161 }
162 return responseString;
163 }
164
165 private string GetCachedAssets(string request, string path)
166 {
167 return "";
168 }
169
131 private string GetAccountsPage(string request, string path) 170 private string GetAccountsPage(string request, string path)
132 { 171 {
133 string responseString; 172 string responseString;