aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-03-30 10:14:15 +0000
committerMW2007-03-30 10:14:15 +0000
commitd14a24d5caa6a8b8fc3a09fd0be12420d7ce6372 (patch)
tree4590bd24aa556c4fbd53bfef99b311a07e39df93
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.
-rw-r--r--OpenGridServices.UserServer/OpenGridServices.UserServer.csproj43
-rw-r--r--OpenSim.RegionServer/CAPS/AdminWebFront.cs47
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs2
-rw-r--r--OpenSim.sln2
-rw-r--r--Servers/BaseHttpServer.cs10
-rw-r--r--Servers/IRestHandler.cs2
-rw-r--r--bin/testadmin.htm2
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 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup> 2 <PropertyGroup>
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
@@ -6,7 +6,8 @@
6 <ProjectGuid>{66591469-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{66591469-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon>
10 </ApplicationIcon>
10 <AssemblyKeyContainerName> 11 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 12 </AssemblyKeyContainerName>
12 <AssemblyName>OpenGridServices.UserServer</AssemblyName> 13 <AssemblyName>OpenGridServices.UserServer</AssemblyName>
@@ -15,9 +16,11 @@
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 17 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType> 18 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 19 <AppDesignerFolder>
20 </AppDesignerFolder>
19 <RootNamespace>OpenGridServices.UserServer</RootNamespace> 21 <RootNamespace>OpenGridServices.UserServer</RootNamespace>
20 <StartupObject></StartupObject> 22 <StartupObject>
23 </StartupObject>
21 <FileUpgradeFlags> 24 <FileUpgradeFlags>
22 </FileUpgradeFlags> 25 </FileUpgradeFlags>
23 </PropertyGroup> 26 </PropertyGroup>
@@ -28,7 +31,8 @@
28 <ConfigurationOverrideFile> 31 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile> 32 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants> 33 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile> 34 <DocumentationFile>
35 </DocumentationFile>
32 <DebugSymbols>True</DebugSymbols> 36 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 37 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 38 <Optimize>False</Optimize>
@@ -37,7 +41,8 @@
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel> 43 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn> 44 <NoWarn>
45 </NoWarn>
41 </PropertyGroup> 46 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -46,7 +51,8 @@
46 <ConfigurationOverrideFile> 51 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile> 52 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants> 53 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile> 54 <DocumentationFile>
55 </DocumentationFile>
50 <DebugSymbols>False</DebugSymbols> 56 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 57 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 58 <Optimize>True</Optimize>
@@ -55,26 +61,23 @@
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel> 63 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn> 64 <NoWarn>
65 </NoWarn>
59 </PropertyGroup> 66 </PropertyGroup>
60 <ItemGroup> 67 <ItemGroup>
61 <Reference Include="System" > 68 <Reference Include="System">
62 <HintPath>System.dll</HintPath> 69 <HintPath>System.dll</HintPath>
63 <Private>False</Private> 70 <Private>False</Private>
64 </Reference> 71 </Reference>
65 <Reference Include="System.Data" > 72 <Reference Include="System.Data">
66 <HintPath>System.Data.dll</HintPath> 73 <HintPath>System.Data.dll</HintPath>
67 <Private>False</Private> 74 <Private>False</Private>
68 </Reference> 75 </Reference>
69 <Reference Include="System.Xml" > 76 <Reference Include="System.Xml">
70 <HintPath>System.Xml.dll</HintPath> 77 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private> 78 <Private>False</Private>
72 </Reference> 79 </Reference>
73 <Reference Include="OpenSim.Framework.dll" > 80 <Reference Include="libsecondlife.dll">
74 <HintPath>..\bin\OpenSim.Framework.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="libsecondlife.dll" >
78 <HintPath>..\bin\libsecondlife.dll</HintPath> 81 <HintPath>..\bin\libsecondlife.dll</HintPath>
79 <Private>False</Private> 82 <Private>False</Private>
80 </Reference> 83 </Reference>
@@ -84,7 +87,11 @@
84 <Name>OpenSim.Framework.Console</Name> 87 <Name>OpenSim.Framework.Console</Name>
85 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 88 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 89 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private> 90 <Private>False</Private>
91 </ProjectReference>
92 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
93 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
94 <Name>OpenSim.Framework</Name>
88 </ProjectReference> 95 </ProjectReference>
89 </ItemGroup> 96 </ItemGroup>
90 <ItemGroup> 97 <ItemGroup>
@@ -105,4 +112,4 @@
105 <PostBuildEvent> 112 <PostBuildEvent>
106 </PostBuildEvent> 113 </PostBuildEvent>
107 </PropertyGroup> 114 </PropertyGroup>
108</Project> 115</Project> \ No newline at end of file
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;
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
199 } 199 }
200 } 200 }
201 201
202 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, adminLoginServer); 202 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
203 adminWebFront.LoadMethods( HttpServer ); 203 adminWebFront.LoadMethods( HttpServer );
204 204
205 m_console.WriteLine("Main.cs:Startup() - Starting HTTP server"); 205 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 @@
1Microsoft Visual Studio Solution File, Format Version 9.00 1Microsoft Visual Studio Solution File, Format Version 9.00
2# Visual Studio 2005 2# Visual C# Express 2005
3Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}" 3Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}"
4EndProject 4EndProject
5Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}" 5Project("{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;
4using System.Text; 4using System.Text;
5using System.Text.RegularExpressions; 5using System.Text.RegularExpressions;
6using System.Threading; 6using System.Threading;
7using OpenSim.CAPS; 7//using OpenSim.CAPS;
8using Nwc.XmlRpc; 8using Nwc.XmlRpc;
9using System.Collections; 9using System.Collections;
10 10
@@ -191,11 +191,11 @@ namespace OpenSim.Servers
191 191
192 public void Start() 192 public void Start()
193 { 193 {
194 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: Starting up HTTP Server"); 194 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("BaseHttpServer.cs: Starting up HTTP Server");
195 195
196 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 196 m_workerThread = new Thread(new ThreadStart(StartHTTP));
197 m_workerThread.IsBackground = true; 197 m_workerThread.IsBackground = true;
198 m_workerThread.Start(); 198 m_workerThread.Start();
199 } 199 }
200 200
201 private void StartHTTP() 201 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;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.CAPS 5namespace OpenSim.Servers
6{ 6{
7 public delegate string RestMethod( string request, string path ); 7 public delegate string RestMethod( string request, string path );
8} 8}
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)
110</head> 110</head>
111 111
112<body onload="loadXMLDoc('Admin/Welcome')"> 112<body onload="loadXMLDoc('Admin/Welcome')">
113<div id="T1" style="border:1px solid black;height:500;width:600"> 113<div id="T1" style="border:1px solid black;height:500;width:800">
114<br> 114<br>
115</div><br /> 115</div><br />
116<button onclick="loadXMLDoc('Admin/Clients')">Clients</button> 116<button onclick="loadXMLDoc('Admin/Clients')">Clients</button>