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.0.1-prestable
parent
b2ae86dd6a
commit
d14a24d5ca
|
@ -1,4 +1,4 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
|
@ -6,7 +6,8 @@
|
|||
<ProjectGuid>{66591469-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenGridServices.UserServer</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenGridServices.UserServer</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,26 +61,23 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" >
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" >
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>System.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" >
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="OpenSim.Framework.dll" >
|
||||
<HintPath>..\bin\OpenSim.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="libsecondlife.dll" >
|
||||
<Reference Include="libsecondlife.dll">
|
||||
<HintPath>..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
|
@ -84,7 +87,11 @@
|
|||
<Name>OpenSim.Framework.Console</Name>
|
||||
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
|
||||
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||
<Name>OpenSim.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,6 +5,8 @@ using System.IO;
|
|||
using OpenSim.world;
|
||||
using OpenSim.UserServer;
|
||||
using OpenSim.Servers;
|
||||
using OpenSim.Assets;
|
||||
using OpenSim.Framework.Inventory;
|
||||
|
||||
namespace OpenSim.CAPS
|
||||
{
|
||||
|
@ -16,9 +18,11 @@ namespace OpenSim.CAPS
|
|||
private string passWord = "Admin";
|
||||
private World m_world;
|
||||
private LoginServer _userServer;
|
||||
private InventoryCache _inventoryCache;
|
||||
|
||||
public AdminWebFront(string password, World world, LoginServer userserver)
|
||||
public AdminWebFront(string password, World world, InventoryCache inventoryCache, LoginServer userserver)
|
||||
{
|
||||
_inventoryCache = inventoryCache;
|
||||
_userServer = userserver;
|
||||
m_world = world;
|
||||
passWord = password;
|
||||
|
@ -31,6 +35,7 @@ namespace OpenSim.CAPS
|
|||
server.AddRestHandler("GET", "/Admin/Welcome", GetWelcomePage);
|
||||
server.AddRestHandler("GET", "/Admin/Accounts", GetAccountsPage );
|
||||
server.AddRestHandler("GET", "/Admin/Clients", GetConnectedClientsPage );
|
||||
server.AddRestHandler("GET", "/ClientInventory", GetClientsInventory);
|
||||
|
||||
server.AddRestHandler("POST", "/Admin/NewAccount", PostNewAccount );
|
||||
server.AddRestHandler("POST", "/Admin/Login", PostLogin );
|
||||
|
@ -120,14 +125,48 @@ namespace OpenSim.CAPS
|
|||
if (m_world.Entities[UUID].ToString() == "OpenSim.world.Avatar")
|
||||
{
|
||||
TempAv = (OpenSim.world.Avatar)m_world.Entities[UUID];
|
||||
responseString += "<p>";
|
||||
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 += "<p> Client: ";
|
||||
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());
|
||||
responseString += "</p>";
|
||||
}
|
||||
}
|
||||
return responseString;
|
||||
}
|
||||
|
||||
private string GetClientsInventory(string request, string path)
|
||||
{
|
||||
string[] line;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string responseString;
|
||||
responseString = " <p> Listing Inventory </p>";
|
||||
|
||||
line = path.Split(delimiter);
|
||||
if (line.Length > 2)
|
||||
{
|
||||
if (line[1] == "ClientInventory")
|
||||
{
|
||||
AgentInventory inven = this._inventoryCache.GetAgentsInventory(new libsecondlife.LLUUID(line[2]));
|
||||
responseString += " <p> Client: " + inven.AgentID.ToStringHyphenated() +" </p>";
|
||||
if (inven != null)
|
||||
{
|
||||
foreach (InventoryItem item in inven.InventoryItems.Values)
|
||||
{
|
||||
responseString += "<p> 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 += "</p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return responseString;
|
||||
}
|
||||
|
||||
private string GetCachedAssets(string request, string path)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
private string GetAccountsPage(string request, string path)
|
||||
{
|
||||
string responseString;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ if (http_request.readyState==4)
|
|||
</head>
|
||||
|
||||
<body onload="loadXMLDoc('Admin/Welcome')">
|
||||
<div id="T1" style="border:1px solid black;height:500;width:600">
|
||||
<div id="T1" style="border:1px solid black;height:500;width:800">
|
||||
<br>
|
||||
</div><br />
|
||||
<button onclick="loadXMLDoc('Admin/Clients')">Clients</button>
|
||||
|
|
Loading…
Reference in New Issue