From d14a24d5caa6a8b8fc3a09fd0be12420d7ce6372 Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 30 Mar 2007 10:14:15 +0000
Subject: 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.
---
.../OpenGridServices.UserServer.csproj | 43 +++++++++++---------
OpenSim.RegionServer/CAPS/AdminWebFront.cs | 47 ++++++++++++++++++++--
OpenSim.RegionServer/OpenSimMain.cs | 2 +-
OpenSim.sln | 2 +-
Servers/BaseHttpServer.cs | 10 ++---
Servers/IRestHandler.cs | 2 +-
bin/testadmin.htm | 2 +-
7 files changed, 77 insertions(+), 31 deletions(-)
diff --git a/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
index e823793..da38f10 100644
--- a/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
+++ b/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
@@ -1,4 +1,4 @@
-
"; - 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()); + responseString += "
Client: "; + responseString += TempAv.firstname + " , " + TempAv.lastname + " , " + UUID + " , " + 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()); responseString += "
"; } } return responseString; } + private string GetClientsInventory(string request, string path) + { + string[] line; + string delimStr = "/"; + char[] delimiter = delimStr.ToCharArray(); + string responseString; + responseString = "Listing Inventory
"; + + line = path.Split(delimiter); + if (line.Length > 2) + { + if (line[1] == "ClientInventory") + { + AgentInventory inven = this._inventoryCache.GetAgentsInventory(new libsecondlife.LLUUID(line[2])); + responseString += "Client: " + inven.AgentID.ToStringHyphenated() +"
"; + if (inven != null) + { + foreach (InventoryItem item in inven.InventoryItems.Values) + { + responseString += "InventoryItem: "; + 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); + responseString += "
"; + } + } + } + } + return responseString; + } + + private string GetCachedAssets(string request, string path) + { + return ""; + } + private string GetAccountsPage(string request, string path) { string responseString; diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 36e1817..ffa64b5 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -199,7 +199,7 @@ namespace OpenSim } } - AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, adminLoginServer); + AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer); adminWebFront.LoadMethods( HttpServer ); m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); diff --git a/OpenSim.sln b/OpenSim.sln index b6b12b0..2823728 100644 --- a/OpenSim.sln +++ b/OpenSim.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +# Visual C# Express 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}" diff --git a/Servers/BaseHttpServer.cs b/Servers/BaseHttpServer.cs index 174402a..2f73f46 100644 --- a/Servers/BaseHttpServer.cs +++ b/Servers/BaseHttpServer.cs @@ -4,7 +4,7 @@ using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading; -using OpenSim.CAPS; +//using OpenSim.CAPS; using Nwc.XmlRpc; using System.Collections; @@ -191,11 +191,11 @@ namespace OpenSim.Servers public void Start() { - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: Starting up HTTP Server"); + OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: Starting up HTTP Server"); - m_workerThread = new Thread(new ThreadStart(StartHTTP)); - m_workerThread.IsBackground = true; - m_workerThread.Start(); + m_workerThread = new Thread(new ThreadStart(StartHTTP)); + m_workerThread.IsBackground = true; + m_workerThread.Start(); } private void StartHTTP() diff --git a/Servers/IRestHandler.cs b/Servers/IRestHandler.cs index 46459ff..08737cc 100644 --- a/Servers/IRestHandler.cs +++ b/Servers/IRestHandler.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.CAPS +namespace OpenSim.Servers { public delegate string RestMethod( string request, string path ); } diff --git a/bin/testadmin.htm b/bin/testadmin.htm index 4252ffd..1e34cf7 100644 --- a/bin/testadmin.htm +++ b/bin/testadmin.htm @@ -110,7 +110,7 @@ if (http_request.readyState==4) -