* Added log control to admin client

* Added logs to users, authenticators and services (need more work)
This commit is contained in:
Adolfo Gómez 2013-02-01 10:10:43 +00:00
parent 1f218a4f96
commit 83278c7c6b
24 changed files with 740 additions and 160 deletions

View File

@ -33,6 +33,6 @@ using System.Resources;
// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
// mediante el asterisco ('*'), como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.8.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.269
// Versión de runtime:4.0.30319.17929
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
@ -13,12 +13,12 @@ namespace UdsAdmin {
/// <summary>
/// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
/// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o vuelva a generar su proyecto de VS.
// con la opción /str o recompile su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
@ -48,7 +48,7 @@ namespace UdsAdmin {
/// <summary>
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
/// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@ -834,6 +834,24 @@ namespace UdsAdmin {
}
}
/// <summary>
/// Busca una cadena traducida similar a Src Host.
/// </summary>
internal static string sourceHost {
get {
return ResourceManager.GetString("sourceHost", resourceCulture);
}
}
/// <summary>
/// Busca una cadena traducida similar a Src IP.
/// </summary>
internal static string sourceIp {
get {
return ResourceManager.GetString("sourceIp", resourceCulture);
}
}
/// <summary>
/// Busca una cadena traducida similar a You need to specify the authenticator to be used.
/// </summary>

View File

@ -501,4 +501,10 @@
<data name="cantModifyUsers" xml:space="preserve">
<value>This authenticator do not allows the modification of users at administration interface</value>
</data>
<data name="sourceHost" xml:space="preserve">
<value>Src Host</value>
</data>
<data name="sourceIp" xml:space="preserve">
<value>Src IP</value>
</data>
</root>

View File

@ -95,6 +95,12 @@
<Compile Include="controls\panel\AuthsPanel.Designer.cs">
<DependentUpon>AuthsPanel.cs</DependentUpon>
</Compile>
<Compile Include="controls\panel\LogViewer.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="controls\panel\LogViewer.Designer.cs">
<DependentUpon>LogViewer.cs</DependentUpon>
</Compile>
<Compile Include="controls\panel\NetworksPanel.cs">
<SubType>UserControl</SubType>
</Compile>
@ -421,6 +427,18 @@
<EmbeddedResource Include="controls\panel\GroupsPanel.fr.resx">
<DependentUpon>GroupsPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="controls\panel\LogViewer.de.resx">
<DependentUpon>LogViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="controls\panel\LogViewer.es.resx">
<DependentUpon>LogViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="controls\panel\LogViewer.fr.resx">
<DependentUpon>LogViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="controls\panel\LogViewer.resx">
<DependentUpon>LogViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="controls\panel\NetworksPanel.de.resx">
<DependentUpon>NetworksPanel.cs</DependentUpon>
</EmbeddedResource>

View File

@ -34,6 +34,11 @@
this.typeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.priority = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// listView
@ -51,6 +56,7 @@
this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details;
this.listView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
this.listView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listView_KeyUp);
//
// name
@ -71,13 +77,34 @@
//
resources.ApplyResources(this.priority, "priority");
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listView);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// logViewer1
//
resources.ApplyResources(this.logViewer1, "logViewer1");
this.logViewer1.Name = "logViewer1";
//
// AuthsPanel
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.listView);
this.Controls.Add(this.splitContainer1);
this.Name = "AuthsPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -89,5 +116,7 @@
private System.Windows.Forms.ColumnHeader comments;
private System.Windows.Forms.ColumnHeader typeName;
private System.Windows.Forms.ColumnHeader priority;
private System.Windows.Forms.SplitContainer splitContainer1;
private LogViewer logViewer1;
}
}

View File

@ -60,6 +60,9 @@ namespace UdsAdmin.controls.panel
private void updateList()
{
int[] selected = new int[listView.SelectedIndices.Count];
listView.SelectedIndices.CopyTo(selected, 0);
try
{
xmlrpc.Authenticator[] auths = xmlrpc.UdsAdminService.GetAuthenticators();
@ -79,6 +82,15 @@ namespace UdsAdmin.controls.panel
gui.UserNotifier.notifyRpcException(ex);
}
foreach (int i in selected)
{
try
{
listView.SelectedIndices.Add(i);
}
catch (Exception)
{ }
}
}
private void listView_KeyUp(object sender, KeyEventArgs e)
@ -101,5 +113,24 @@ namespace UdsAdmin.controls.panel
_listSorter.ColumnClick(sender, e);
}
private void listView_SelectedIndexChanged(object sender, EventArgs e)
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
foreach (ListViewItem i in listView.SelectedItems)
{
try
{
xmlrpc.LogEntry[] logs = xmlrpc.UdsAdminService.GetAuthLogs((string)i.Tag);
data.AddRange(logs);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
}
logViewer1.setLogs(data.ToArray());
}
}
}

View File

@ -148,7 +148,7 @@
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 279</value>
<value>699, 216</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -160,11 +160,89 @@
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;listView.Parent" xml:space="preserve">
<value>$this</value>
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="logViewer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 59</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;logViewer1.Name" xml:space="preserve">
<value>logViewer1</value>
</data>
<data name="&gt;&gt;logViewer1.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.LogViewer, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;logViewer1.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;logViewer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 279</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;splitContainer1.Name" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -29,30 +29,40 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeployedPanel));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.listView = new System.Windows.Forms.ListView();
this.Id = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.friendlyName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Revision = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.CreationDate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.State = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.StatusDate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.listView = new System.Windows.Forms.ListView();
this.friendlyName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Revision = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// Id
// splitContainer1
//
resources.ApplyResources(this.Id, "Id");
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// CreationDate
// splitContainer1.Panel1
//
resources.ApplyResources(this.CreationDate, "CreationDate");
this.splitContainer1.Panel1.Controls.Add(this.panel1);
//
// State
// splitContainer1.Panel2
//
resources.ApplyResources(this.State, "State");
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// StatusDate
// panel1
//
resources.ApplyResources(this.StatusDate, "StatusDate");
this.panel1.Controls.Add(this.listView);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// listView
//
@ -70,10 +80,14 @@
this.listView.Name = "listView";
this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details;
this.listView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
this.listView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listView_KeyUp);
this.listView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_MouseUp);
//
// Id
//
resources.ApplyResources(this.Id, "Id");
//
// friendlyName
//
resources.ApplyResources(this.friendlyName, "friendlyName");
@ -82,25 +96,50 @@
//
resources.ApplyResources(this.Revision, "Revision");
//
// CreationDate
//
resources.ApplyResources(this.CreationDate, "CreationDate");
//
// State
//
resources.ApplyResources(this.State, "State");
//
// StatusDate
//
resources.ApplyResources(this.StatusDate, "StatusDate");
//
// logViewer1
//
resources.ApplyResources(this.logViewer1, "logViewer1");
this.logViewer1.Name = "logViewer1";
//
// DeployedPanel
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.listView);
this.Controls.Add(this.splitContainer1);
this.Name = "DeployedPanel";
this.VisibleChanged += new System.EventHandler(this.DeployedPanel_VisibleChanged);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private LogViewer logViewer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ListView listView;
private System.Windows.Forms.ColumnHeader Id;
private System.Windows.Forms.ColumnHeader friendlyName;
private System.Windows.Forms.ColumnHeader Revision;
private System.Windows.Forms.ColumnHeader CreationDate;
private System.Windows.Forms.ColumnHeader State;
private System.Windows.Forms.ColumnHeader StatusDate;
private System.Windows.Forms.ColumnHeader Revision;
private System.Windows.Forms.ColumnHeader friendlyName;
}
}

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2012 Virtual Cable S.L.
// Copyright (c) 2012-2013 Virtual Cable S.L.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -99,31 +99,37 @@ namespace UdsAdmin.controls.panel
{
ColumnHeader userHeader = new ColumnHeader(); userHeader.Text = Strings.owner; userHeader.TextAlign = HorizontalAlignment.Center;
ColumnHeader usedHeader = new ColumnHeader(); usedHeader.Text = Strings.occopied; usedHeader.TextAlign = HorizontalAlignment.Center;
listView.Columns.AddRange(new ColumnHeader[]{ userHeader, usedHeader});
ColumnHeader srcHostHeader = new ColumnHeader(); srcHostHeader.Text = Strings.sourceHost; srcHostHeader.TextAlign = HorizontalAlignment.Center;
ColumnHeader srcIpHeader = new ColumnHeader(); srcIpHeader.Text = Strings.sourceIp; srcIpHeader.TextAlign = HorizontalAlignment.Center;
listView.Columns.AddRange(new ColumnHeader[]{ userHeader, usedHeader, srcHostHeader, srcIpHeader});
}
private ListViewItem getListViewItemFrom(xmlrpc.UserDeployedService uds)
private ListViewItem getListViewItemFrom(xmlrpc.UserService uds)
{
if (_cache == true)
return new ListViewItem(new string[] { uds.uniqueId, uds.friendlyName, uds.revision, uds.creationDate.ToString(),
xmlrpc.Util.GetStringFromState(uds.state, uds.osState), uds.stateDate.ToString(),
((xmlrpc.CachedDeployedService)uds).cacheLevel});
xmlrpc.AssignedDeployedService udss = (xmlrpc.AssignedDeployedService)uds;
((xmlrpc.CachedUserService)uds).cacheLevel});
xmlrpc.AssignedUserService udss = (xmlrpc.AssignedUserService)uds;
return new ListViewItem(new string[] { uds.uniqueId, uds.friendlyName, uds.revision, uds.creationDate.ToString(),
xmlrpc.Util.GetStringFromState(uds.state, uds.osState), uds.stateDate.ToString(), udss.user, udss.inUse ? Strings.yes : Strings.no} );
xmlrpc.Util.GetStringFromState(uds.state, uds.osState), uds.stateDate.ToString(), udss.user, udss.inUse ? Strings.yes : Strings.no,
udss.sourceHost, udss.sourceIp} );
}
private void updateList()
{
int[] selected = new int[listView.SelectedIndices.Count];
listView.SelectedIndices.CopyTo(selected, 0);
xmlrpc.UserDeployedService[] servs;
xmlrpc.UserService[] servs;
if (_cache == true)
servs = xmlrpc.UdsAdminService.GetCachedDeployedServices(_parent);
else
servs = xmlrpc.UdsAdminService.GetAssignedDeployedServices(_parent);
List<ListViewItem> lst = new List<ListViewItem>();
foreach (xmlrpc.UserDeployedService uds in servs)
foreach (xmlrpc.UserService uds in servs)
{
ListViewItem itm = getListViewItemFrom(uds);
itm.Tag = uds.id;
@ -132,6 +138,17 @@ namespace UdsAdmin.controls.panel
}
listView.Items.Clear();
listView.Items.AddRange(lst.ToArray());
foreach (int i in selected)
{
try
{
listView.SelectedIndices.Add(i);
}
catch (Exception)
{ }
}
}
private void assignToUser(object sender, EventArgs e)
@ -208,5 +225,24 @@ namespace UdsAdmin.controls.panel
}
}
private void listView_SelectedIndexChanged(object sender, EventArgs e)
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
foreach (ListViewItem i in listView.SelectedItems)
{
try
{
xmlrpc.LogEntry[] logs = xmlrpc.UdsAdminService.GetUserServiceLogs((string)i.Tag);
data.AddRange(logs);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
}
logViewer1.setLogs(data.ToArray());
}
}
}

View File

@ -117,6 +117,17 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="Id.Text" xml:space="preserve">
<value>Id</value>
</data>
@ -124,6 +135,18 @@
<data name="Id.Width" type="System.Int32, mscorlib">
<value>125</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Friendly Name</value>
</data>
<data name="friendlyName.Width" type="System.Int32, mscorlib">
<value>142</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Revision</value>
</data>
<data name="Revision.Width" type="System.Int32, mscorlib">
<value>109</value>
</data>
<data name="CreationDate.Text" xml:space="preserve">
<value>Creation Date</value>
</data>
@ -142,34 +165,20 @@
<data name="StatusDate.Width" type="System.Int32, mscorlib">
<value>143</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Friendly Name</value>
</data>
<data name="friendlyName.Width" type="System.Int32, mscorlib">
<value>142</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Revision</value>
</data>
<data name="Revision.Width" type="System.Int32, mscorlib">
<value>109</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="listView.LabelWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="listView.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>4, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 279</value>
<value>776, 212</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>2</value>
</data>
<data name="&gt;&gt;listView.Name" xml:space="preserve">
<value>listView</value>
@ -178,11 +187,107 @@
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;listView.Parent" xml:space="preserve">
<value>$this</value>
<value>panel1</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>4, 0, 4, 4</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 216</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="logViewer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 59</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;logViewer1.Name" xml:space="preserve">
<value>logViewer1</value>
</data>
<data name="&gt;&gt;logViewer1.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.LogViewer, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;logViewer1.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;logViewer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 279</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;splitContainer1.Name" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -198,6 +303,18 @@
<data name="&gt;&gt;Id.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;friendlyName.Name" xml:space="preserve">
<value>friendlyName</value>
</data>
<data name="&gt;&gt;friendlyName.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Revision.Name" xml:space="preserve">
<value>Revision</value>
</data>
<data name="&gt;&gt;Revision.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;CreationDate.Name" xml:space="preserve">
<value>CreationDate</value>
</data>
@ -216,18 +333,6 @@
<data name="&gt;&gt;StatusDate.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;friendlyName.Name" xml:space="preserve">
<value>friendlyName</value>
</data>
<data name="&gt;&gt;friendlyName.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Revision.Name" xml:space="preserve">
<value>Revision</value>
</data>
<data name="&gt;&gt;Revision.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DeployedPanel</value>
</data>

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2012 Virtual Cable S.L.
// Copyright (c) 2012-2013 Virtual Cable S.L.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2012 Virtual Cable S.L.
// Copyright (c) 2012-2013 Virtual Cable S.L.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,

View File

@ -35,6 +35,11 @@
this.state = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lastAccess = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// listView
@ -52,6 +57,7 @@
this.listView.UseCompatibleStateImageBehavior = false;
this.listView.View = System.Windows.Forms.View.Details;
this.listView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView_ColumnClick);
this.listView.SelectedIndexChanged += new System.EventHandler(this.listView_SelectedIndexChanged);
this.listView.DoubleClick += new System.EventHandler(this.modifyItem);
this.listView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listView_KeyUp);
this.listView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_MouseUp);
@ -80,13 +86,34 @@
//
resources.ApplyResources(this.comments, "comments");
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listView);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// logViewer1
//
resources.ApplyResources(this.logViewer1, "logViewer1");
this.logViewer1.Name = "logViewer1";
//
// UsersPanel
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.listView);
this.Controls.Add(this.splitContainer1);
this.Name = "UsersPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -99,5 +126,7 @@
private System.Windows.Forms.ColumnHeader state;
private System.Windows.Forms.ColumnHeader lastAccess;
private System.Windows.Forms.ColumnHeader comments;
private System.Windows.Forms.SplitContainer splitContainer1;
private LogViewer logViewer1;
}
}

View File

@ -129,6 +129,9 @@ namespace UdsAdmin.controls.panel
private void updateList()
{
int[] selected = new int[listView.SelectedIndices.Count];
listView.SelectedIndices.CopyTo(selected, 0);
try
{
xmlrpc.User[] usrs = xmlrpc.UdsAdminService.GetUsers(_auth.id);
@ -148,6 +151,16 @@ namespace UdsAdmin.controls.panel
{
gui.UserNotifier.notifyRpcException(ex);
}
foreach (int i in selected)
{
try
{
listView.SelectedIndices.Add(i);
}
catch (Exception)
{ }
}
}
private void newItem(object sender, EventArgs e)
@ -257,5 +270,24 @@ namespace UdsAdmin.controls.panel
}
}
private void listView_SelectedIndexChanged(object sender, EventArgs e)
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
foreach (ListViewItem i in listView.SelectedItems)
{
try
{
xmlrpc.LogEntry[] logs = xmlrpc.UdsAdminService.GetUserLogs((string)i.Tag);
data.AddRange(logs);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
}
logViewer1.setLogs(data.ToArray());
}
}
}

View File

@ -117,6 +117,36 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.LabelWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="listView.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 216</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;listView.Name" xml:space="preserve">
<value>listView</value>
</data>
<data name="&gt;&gt;listView.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;listView.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="username.Text" xml:space="preserve">
<value>Username</value>
</data>
@ -132,34 +162,82 @@
<data name="comments.Text" xml:space="preserve">
<value>Comments</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="listView.LabelWrap" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="listView.Location" type="System.Drawing.Point, System.Drawing">
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 278</value>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;listView.Name" xml:space="preserve">
<value>listView</value>
<data name="logViewer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;listView.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="&gt;&gt;listView.Parent" xml:space="preserve">
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 58</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;logViewer1.Name" xml:space="preserve">
<value>logViewer1</value>
</data>
<data name="&gt;&gt;logViewer1.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.LogViewer, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;logViewer1.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;logViewer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 278</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;splitContainer1.Name" xml:space="preserve">
<value>splitContainer1</value>
</data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@ -51,7 +51,7 @@ namespace UdsAdmin.forms
private void AssignDeployed_Load(object sender, EventArgs e)
{
xmlrpc.AssignableDeployedService[] services = xmlrpc.UdsAdminService.GetAssignableDeployedServices(_parent.id);
xmlrpc.AssignableUserService[] services = xmlrpc.UdsAdminService.GetAssignableDeployedServices(_parent.id);
if (services.Length == 0)
{
MessageBox.Show(Strings.error, Strings.services, MessageBoxButtons.OK, MessageBoxIcon.Error);
@ -93,7 +93,7 @@ namespace UdsAdmin.forms
try {
xmlrpc.UdsAdminService.AssignDeployedService(_parent.id,
((xmlrpc.AssignableDeployedService)serviceCombo.SelectedItem).id,
((xmlrpc.AssignableUserService)serviceCombo.SelectedItem).id,
((xmlrpc.User)userCombo.SelectedItem).id);
DialogResult = System.Windows.Forms.DialogResult.OK;
}

View File

@ -72,7 +72,6 @@
//
resources.ApplyResources(this.treeActions, "treeActions");
this.treeActions.HideSelection = false;
this.treeActions.MinimumSize = new System.Drawing.Size(200, 4);
this.treeActions.Name = "treeActions";
this.treeActions.ShowNodeToolTips = true;
this.treeActions.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeActions_BeforeExpand);

View File

@ -131,6 +131,9 @@
<data name="treeActions.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="treeActions.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>200, 4</value>
</data>
<data name="treeActions.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 376</value>
</data>
@ -231,11 +234,29 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 17</value>
</metadata>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 22</value>
<data name="menuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Exit</value>
<data name="menuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>610, 25</value>
</data>
<data name="menuStrip1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="menuStrip1.Text" xml:space="preserve">
<value>topMenu</value>
</data>
<data name="&gt;&gt;menuStrip1.Name" xml:space="preserve">
<value>menuStrip1</value>
</data>
<data name="&gt;&gt;menuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;menuStrip1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>42, 21</value>
@ -243,6 +264,24 @@
<data name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 22</value>
</data>
<data name="exitToolStripMenuItem.Text" xml:space="preserve">
<value>Exit</value>
</data>
<data name="toolsToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 21</value>
</data>
<data name="toolsToolStripMenuItem1.Text" xml:space="preserve">
<value>Tools</value>
</data>
<data name="languageToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 22</value>
</data>
<data name="languageToolStripMenuItem1.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="englishToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 22</value>
</data>
@ -267,12 +306,6 @@
<data name="germanToolStripMenuItem.Text" xml:space="preserve">
<value>German</value>
</data>
<data name="languageToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 22</value>
</data>
<data name="languageToolStripMenuItem1.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="configurationToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>165, 22</value>
</data>
@ -285,35 +318,11 @@
<data name="aboutToolStripMenuItem1.Text" xml:space="preserve">
<value>About</value>
</data>
<data name="toolsToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 21</value>
<data name="serviceProviderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 20</value>
</data>
<data name="toolsToolStripMenuItem1.Text" xml:space="preserve">
<value>Tools</value>
</data>
<data name="menuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="menuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>610, 25</value>
</data>
<data name="menuStrip1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="menuStrip1.Text" xml:space="preserve">
<value>topMenu</value>
</data>
<data name="&gt;&gt;menuStrip1.Name" xml:space="preserve">
<value>menuStrip1</value>
</data>
<data name="&gt;&gt;menuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;menuStrip1.ZOrder" xml:space="preserve">
<value>3</value>
<data name="serviceProviderToolStripMenuItem.Text" xml:space="preserve">
<value>Service Provider</value>
</data>
<data name="newServiceProviderMenu.Size" type="System.Drawing.Size, System.Drawing">
<value>106, 22</value>
@ -324,15 +333,15 @@
<data name="testToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>106, 22</value>
</data>
<data name="serviceProviderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 20</value>
</data>
<data name="serviceProviderToolStripMenuItem.Text" xml:space="preserve">
<value>Service Provider</value>
</data>
<data name="toolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>32, 19</value>
</data>
<data name="languageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>126, 22</value>
</data>
<data name="languageToolStripMenuItem.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="spanishToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>126, 22</value>
</data>
@ -345,12 +354,6 @@
<data name="englishToolStripMenuItem.Text" xml:space="preserve">
<value>English</value>
</data>
<data name="languageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>126, 22</value>
</data>
<data name="languageToolStripMenuItem.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="aboutToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>126, 22</value>
</data>
@ -360,18 +363,6 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>248, 17</value>
</metadata>
<data name="toolStripButton1.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButton1.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 22</value>
</data>
<data name="toolStripButton1.Text" xml:space="preserve">
<value>Flush Cache</value>
</data>
<data name="toolStripButton1.ToolTipText" xml:space="preserve">
<value>Clears the cache</value>
</data>
<data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 25</value>
</data>
@ -396,6 +387,18 @@
<data name="&gt;&gt;toolStrip1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="toolStripButton1.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButton1.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 22</value>
</data>
<data name="toolStripButton1.Text" xml:space="preserve">
<value>Flush Cache</value>
</data>
<data name="toolStripButton1.ToolTipText" xml:space="preserve">
<value>Clears the cache</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -45,6 +45,8 @@ namespace UdsAdmin.gui
public static Color BlockedColor = Color.Red;
public static Color RunningColor = Color.Green;
public static Color ErrorColor = Color.Red;
public static Color InfoColor = Color.Blue;
public static Color DebugColor = Color.Black;
public static Color InactiveBackColor = Color.Red;
public static Color InactiveForeColor = Color.Yellow;
public static Color ActiveBackColor = Color.Green;
@ -74,5 +76,16 @@ namespace UdsAdmin.gui
return BlackColor;
}
}
public static Color getColorForLogLevel(int level)
{
if (level >= xmlrpc.Constants.LEVEL_ERROR_I)
return ErrorColor;
if (level >= xmlrpc.Constants.LEVEL_INFO_I)
return InfoColor;
return DebugColor;
}
}
}

View File

@ -68,7 +68,9 @@ namespace UdsAdmin.gui
{
h.TextAlign = HorizontalAlignment.Left;
h.ImageKey = "empty";
h.Width = TextRenderer.MeasureText(h.Text, lst.Parent.Font).Width + 40;
int width = TextRenderer.MeasureText(h.Text, lst.Parent.Font).Width + 40;
if (width > h.Width)
h.Width = width;
}
}

View File

@ -60,5 +60,33 @@ namespace UdsAdmin.xmlrpc
public const string STATE_ERROR = "E";
public const string STATE_CANCELED = "C";
public const string STATE_CANCELING = "K";
public const string LEVEL_OTHER = "OTHER";
public const int LEVEL_OTHER_I = 10000;
public const string LEVEL_DEBUG = "DEBUG";
public const int LEVEL_DEBUG_I = 20000;
public const string LEVEL_INFO = "INFO";
public const int LEVEL_INFO_I = 30000;
public const string LEVEL_WARN = "WARN";
public const int LEVEL_WARN_I = 40000;
public const string LEVEL_ERROR = "ERROR";
public const int LEVEL_ERROR_I = 50000;
public const string LEVEL_FATAL = "FATAL";
public const int LEVEL_FATAL_I = 60000;
public static string stringFromLevel(int level)
{
if (level >= LEVEL_FATAL_I)
return LEVEL_FATAL;
if (level >= LEVEL_ERROR_I)
return LEVEL_ERROR;
if (level >= LEVEL_WARN_I)
return LEVEL_WARN;
if (level >= LEVEL_INFO_I)
return LEVEL_INFO;
if (level >= LEVEL_DEBUG_I)
return LEVEL_DEBUG;
return LEVEL_OTHER;
}
}
}

View File

@ -239,7 +239,7 @@ namespace UdsAdmin.xmlrpc
Network[] GetNetworks(string credentials);
[XmlRpcMethod("getNetworksForTransport")]
string[] getNetworksForTransport(string credentials, string id);
string[] GetNetworksForTransport(string credentials, string id);
[XmlRpcMethod("setNetworksForTransport")]
bool setNetworksForTransport(string credentials, string id, string[] networks);
@ -301,13 +301,13 @@ namespace UdsAdmin.xmlrpc
bool CancelPublication(string credentials, string id);
[XmlRpcMethod("getCachedDeployedServices")]
CachedDeployedService[] GetCachedDeployedServices(string credentials, string idParent);
CachedUserService[] GetCachedDeployedServices(string credentials, string idParent);
[XmlRpcMethod("getAssignedDeployedServices")]
AssignedDeployedService[] GetAssignedDeployedServices(string credentials, string idParent);
AssignedUserService[] GetAssignedDeployedServices(string credentials, string idParent);
[XmlRpcMethod("getAssignableDeployedServices")]
AssignableDeployedService[] GetAssignableDeployedServices(string credentials, string idParent);
AssignableUserService[] GetAssignableDeployedServices(string credentials, string idParent);
[XmlRpcMethod("removeUserService")]
bool RemoveUserService(string credentials, string[] ids);
@ -328,6 +328,16 @@ namespace UdsAdmin.xmlrpc
[XmlRpcMethod("updateConfiguration")]
bool UpdateConfiguration(string credentials, Configuration[] configuration);
// Log stuff
[XmlRpcMethod("getUserServiceLogs")]
LogEntry[] GetUserServiceLogs(string credentials, string id);
[XmlRpcMethod("getUserLogs")]
LogEntry[] GetUserLogs(string credentials, string id);
[XmlRpcMethod("getAuthLogs")]
LogEntry[] GetAuthLogs(string credentials, string id);
// Callbacks invoker
[XmlRpcMethod("chooseCallback")]
GuiFieldValue[] InvokeChooseCallback(string credentials, string name, GuiFieldValue[] parameters);

View File

@ -561,7 +561,7 @@ namespace UdsAdmin.xmlrpc
public static string[] GetNetworksForTransport(string id)
{
return s.getNetworksForTransport(credentials, id);
return s.GetNetworksForTransport(credentials, id);
}
public static bool SetNetworksForTransport(string id, string[] networks)
@ -662,17 +662,17 @@ namespace UdsAdmin.xmlrpc
}
public static CachedDeployedService[] GetCachedDeployedServices(DeployedService deployedService)
public static CachedUserService[] GetCachedDeployedServices(DeployedService deployedService)
{
return s.GetCachedDeployedServices(credentials, deployedService.id);
}
public static AssignedDeployedService[] GetAssignedDeployedServices(DeployedService deployedService)
public static AssignedUserService[] GetAssignedDeployedServices(DeployedService deployedService)
{
return s.GetAssignedDeployedServices(credentials, deployedService.id);
}
public static AssignableDeployedService[] GetAssignableDeployedServices(string idParent)
public static AssignableUserService[] GetAssignableDeployedServices(string idParent)
{
return s.GetAssignableDeployedServices(credentials, idParent);
}
@ -709,6 +709,22 @@ namespace UdsAdmin.xmlrpc
return s.UpdateConfiguration(credentials, configuration);
}
// Log methods
public static LogEntry[] GetUserServiceLogs(string id)
{
return s.GetUserServiceLogs(credentials, id);
}
public static LogEntry[] GetUserLogs(string id)
{
return s.GetUserLogs(credentials, id);
}
public static LogEntry[] GetAuthLogs(string id)
{
return s.GetAuthLogs(credentials, id);
}
// Calbacks
public static GuiFieldValue[] InvokeChooseCallback(string name, GuiFieldValue[] parameters)

View File

@ -337,7 +337,7 @@ namespace UdsAdmin.xmlrpc
public string revision;
}
public class UserDeployedService
public class UserService
{
public string idParent;
public string id;
@ -350,19 +350,21 @@ namespace UdsAdmin.xmlrpc
public string revision;
}
public class CachedDeployedService : UserDeployedService
public class CachedUserService : UserService
{
public string cacheLevel;
}
public class AssignedDeployedService : UserDeployedService
public class AssignedUserService : UserService
{
public string user;
public bool inUse;
public DateTime inUseDate;
public string sourceHost;
public string sourceIp;
}
public class AssignableDeployedService
public class AssignableUserService
{
public string id;
public string name;
@ -399,6 +401,14 @@ namespace UdsAdmin.xmlrpc
}
};
public class LogEntry
{
public DateTime date;
public int level;
public string message;
public string source;
}
public struct ChoiceCallback
{
public string callbackName;