1.1 Tagging (again...)

This commit is contained in:
Adolfo Gómez 2013-02-19 04:31:00 +00:00
commit 5a4a3b8f5f
91 changed files with 5492 additions and 2783 deletions

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.261
// Versión de runtime:4.0.30319.18034
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
@ -118,5 +118,14 @@ namespace UdsAdmin.Properties {
this["MaxControlWidth"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("200")]
public int StatsItems {
get {
return ((int)(this["StatsItems"]));
}
}
}
}

View File

@ -26,5 +26,8 @@
<Setting Name="MaxControlWidth" Type="System.Int32" Scope="User">
<Value Profile="(Default)">320</Value>
</Setting>
<Setting Name="StatsItems" Type="System.Int32" Scope="Application">
<Value Profile="(Default)">200</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.17929
// Versión de runtime:4.0.30319.18034
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
@ -492,6 +492,15 @@ namespace UdsAdmin {
}
}
/// <summary>
/// Busca una cadena traducida similar a Legend.
/// </summary>
internal static string legend {
get {
return ResourceManager.GetString("legend", resourceCulture);
}
}
/// <summary>
/// Busca una cadena traducida similar a Manage groups for this authenticator.
/// </summary>

View File

@ -344,7 +344,7 @@
<value>Transporte</value>
</data>
<data name="networks" xml:space="preserve">
<value>Neworks</value>
<value>Aufstrebende</value>
</data>
<data name="invalidIpAddress" xml:space="preserve">
<value>Ungültige IP-Adresse</value>
@ -472,4 +472,22 @@
<data name="titleConfiguration" xml:space="preserve">
<value>Konfiguration</value>
</data>
<data name="cantCreateGroups" xml:space="preserve">
<value>Diese Authentifikator nicht ermöglicht die Erstellung von neuen Gruppen im Administrations-Oberfläche</value>
</data>
<data name="cantCreateUsers" xml:space="preserve">
<value>Diese Authentifikator nicht ermöglicht die Erstellung von auf der Administrations-Oberfläche</value>
</data>
<data name="cantModifyUsers" xml:space="preserve">
<value>Diese Authentifikator nicht erlaubt die Änderung der Benutzer bei Administrations-Oberfläche</value>
</data>
<data name="sourceHost" xml:space="preserve">
<value>Src-Host</value>
</data>
<data name="sourceIp" xml:space="preserve">
<value>Quell-IP-</value>
</data>
<data name="legend" xml:space="preserve">
<value>Legende</value>
</data>
</root>

View File

@ -492,4 +492,22 @@
<data name="titleConfiguration" xml:space="preserve">
<value>Configuración</value>
</data>
<data name="cantCreateGroups" xml:space="preserve">
<value>Este autenticador no permite la creación de nuevos grupos en la interfaz de administración</value>
</data>
<data name="cantCreateUsers" xml:space="preserve">
<value>Este autenticador no permite la creación de nuevos usuarios en la interfaz de administración</value>
</data>
<data name="cantModifyUsers" xml:space="preserve">
<value>Este autenticador no permite la modificación de los usuarios en la interfaz de administración</value>
</data>
<data name="sourceHost" xml:space="preserve">
<value>Src Host</value>
</data>
<data name="sourceIp" xml:space="preserve">
<value>Src IP</value>
</data>
<data name="legend" xml:space="preserve">
<value>Leyenda</value>
</data>
</root>

View File

@ -472,4 +472,22 @@
<data name="titleConfiguration" xml:space="preserve">
<value>Configuration</value>
</data>
<data name="cantCreateGroups" xml:space="preserve">
<value>Cet authentificateur ne pas permet la création de nouveaux groupes à l'interface d'administration</value>
</data>
<data name="cantCreateUsers" xml:space="preserve">
<value>Cet authentificateur ne pas permet la création de nouveaux utilisateurs à l'interface d'administration</value>
</data>
<data name="cantModifyUsers" xml:space="preserve">
<value>Cet authentificateur permet pas la modification des utilisateurs à l'interface d'administration</value>
</data>
<data name="sourceHost" xml:space="preserve">
<value>Hôte de la SRC</value>
</data>
<data name="sourceIp" xml:space="preserve">
<value>SRC IP</value>
</data>
<data name="legend" xml:space="preserve">
<value>Légende</value>
</data>
</root>

View File

@ -507,4 +507,7 @@
<data name="sourceIp" xml:space="preserve">
<value>Src IP</value>
</data>
<data name="legend" xml:space="preserve">
<value>Legend</value>
</data>
</root>

View File

@ -75,6 +75,7 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
@ -89,12 +90,18 @@
<Compile Include="controls\ListEditor.Designer.cs">
<DependentUpon>ListEditor.cs</DependentUpon>
</Compile>
<Compile Include="controls\SplitContainerEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="controls\panel\AuthsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="controls\panel\AuthsPanel.Designer.cs">
<DependentUpon>AuthsPanel.cs</DependentUpon>
</Compile>
<Compile Include="controls\panel\ChartPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="controls\panel\LogViewer.cs">
<SubType>UserControl</SubType>
</Compile>

View File

@ -4,6 +4,9 @@
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="UdsAdmin.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="UdsAdmin.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<startup><supportedRuntime version="v2.0.50727"/></startup><userSettings>
<UdsAdmin.Properties.Settings>
@ -33,4 +36,11 @@
</setting>
</UdsAdmin.Properties.Settings>
</userSettings>
<applicationSettings>
<UdsAdmin.Properties.Settings>
<setting name="StatsItems" serializeAs="String">
<value>200</value>
</setting>
</UdsAdmin.Properties.Settings>
</applicationSettings>
</configuration>

View File

@ -112,54 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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="bntOpen.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="bntOpen.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="bntOpen.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bntOpen.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="bntOpen.Text" xml:space="preserve">
<value>Öffnen Sie den editor</value>
</data>
<data name="&gt;&gt;bntOpen.Name" xml:space="preserve">
<value>bntOpen</value>
</data>
<data name="&gt;&gt;bntOpen.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bntOpen.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bntOpen.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>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ListEditor</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>Öffnen Sie den Editor</value>
</data>
</root>

View File

@ -112,54 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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="bntOpen.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="bntOpen.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="bntOpen.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bntOpen.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="bntOpen.Text" xml:space="preserve">
<value>Abrir el editor</value>
</data>
<data name="&gt;&gt;bntOpen.Name" xml:space="preserve">
<value>bntOpen</value>
</data>
<data name="&gt;&gt;bntOpen.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bntOpen.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bntOpen.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>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ListEditor</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>Abra el editor</value>
</data>
</root>

View File

@ -112,54 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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="bntOpen.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="bntOpen.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="bntOpen.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="bntOpen.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="bntOpen.Text" xml:space="preserve">
<value>Ouvrez l'éditeur</value>
</data>
<data name="&gt;&gt;bntOpen.Name" xml:space="preserve">
<value>bntOpen</value>
</data>
<data name="&gt;&gt;bntOpen.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;bntOpen.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;bntOpen.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>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 23</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ListEditor</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>Ouvrez l&amp;#39;éditeur</value>
</data>
</root>

View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace UdsAdmin.controls
{
public class SplitContainerEx : SplitContainer
{
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
HandlePaint(e);
}
private void HandlePaint(PaintEventArgs e)
{
//paint the three dots'
Point[] points = new Point[3];
var w = Width;
var h = Height;
var d = SplitterDistance;
var sW = SplitterWidth;
//calculate the position of the points'
if (Orientation == Orientation.Horizontal)
{
points[0] = new Point((w / 2), d + (sW / 2));
points[1] = new Point(points[0].X - 10, points[0].Y);
points[2] = new Point(points[0].X + 10, points[0].Y);
}
else
{
points[0] = new Point(d + (sW / 2), (h / 2));
points[1] = new Point(points[0].X, points[0].Y - 10);
points[2] = new Point(points[0].X, points[0].Y + 10);
}
foreach (Point p in points)
{
p.Offset(-2, -2);
e.Graphics.FillEllipse(SystemBrushes.ControlDark,
new Rectangle(p, new Size(3, 3)));
p.Offset(1, 1);
e.Graphics.FillEllipse(SystemBrushes.ControlLight,
new Rectangle(p, new Size(3, 3)));
}
}
}
}

View File

@ -112,13 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Text" xml:space="preserve">
<value>ListEditorFormfr</value>
<data name="btnImport.Text" xml:space="preserve">
<value>Import-Datei</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Entfernen</value>
@ -126,10 +126,10 @@
<data name="btnAdd.Text" xml:space="preserve">
<value>Hinzufügen</value>
</data>
<data name="btnImport.Text" xml:space="preserve">
<value>Datei importieren</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>Editor schließen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Editor</value>
</data>
</root>

View File

@ -112,21 +112,24 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnAdd.Text" xml:space="preserve">
<value>Añadir</value>
<data name="btnImport.Text" xml:space="preserve">
<value>Importar archivo</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Quitar</value>
</data>
<data name="btnImport.Text" xml:space="preserve">
<value>Archivo de importación</value>
<data name="btnAdd.Text" xml:space="preserve">
<value>Añadir</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>Cerrar editor</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Editor</value>
</data>
</root>

View File

@ -112,24 +112,24 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.Text" xml:space="preserve">
<value>ListEditorFormfr</value>
<data name="btnImport.Text" xml:space="preserve">
<value>Importer un fichier</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>Supprimer</value>
<value>Enlever</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>Ajouter</value>
</data>
<data name="btnImport.Text" xml:space="preserve">
<value>Fichier d'importation</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>Éditeur étroite</value>
<value>Fermer éditeur</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Éditeur</value>
</data>
</root>

View File

@ -29,18 +29,31 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AuthsPanel));
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.listView = new System.Windows.Forms.ListView();
this.name = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
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();
//
// 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);
//
// listView
//
this.listView.AutoArrange = false;
@ -77,19 +90,6 @@
//
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");
@ -102,6 +102,7 @@
this.Controls.Add(this.splitContainer1);
this.Name = "AuthsPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.Resize += new System.EventHandler(this.AuthsPanel_Resize);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
@ -116,7 +117,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 SplitContainerEx splitContainer1;
private LogViewer logViewer1;
}
}

View File

@ -60,9 +60,6 @@ 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();
@ -82,14 +79,10 @@ namespace UdsAdmin.controls.panel
gui.UserNotifier.notifyRpcException(ex);
}
foreach (int i in selected)
if (listView.Items.Count > 0)
{
try
{
listView.SelectedIndices.Add(i);
}
catch (Exception)
{ }
listView.Items[0].Selected = listView.Items[0].Focused = true;
listView.Focus();
}
}
@ -99,6 +92,7 @@ namespace UdsAdmin.controls.panel
{
case Keys.F5:
updateList();
updateLogs();
break;
case Keys.E:
if (e.Modifiers == Keys.Control)
@ -114,6 +108,11 @@ namespace UdsAdmin.controls.panel
}
private void listView_SelectedIndexChanged(object sender, EventArgs e)
{
updateLogs();
}
private void updateLogs()
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
foreach (ListViewItem i in listView.SelectedItems)
@ -132,5 +131,11 @@ namespace UdsAdmin.controls.panel
logViewer1.setLogs(data.ToArray());
}
private void AuthsPanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
splitContainer1.Size = this.Size;
}
}
}

View File

@ -112,20 +112,20 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="name.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Kommentare</value>
</data>
<data name="typeName.Text" xml:space="preserve">
<value>Typ</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Kommentare</value>
</data>
<data name="priority.Text" xml:space="preserve">
<value>Priorität</value>
</data>

View File

@ -112,20 +112,20 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="name.Text" xml:space="preserve">
<value>Nombre</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Comentarios</value>
</data>
<data name="typeName.Text" xml:space="preserve">
<value>Tipo</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Comentarios</value>
</data>
<data name="priority.Text" xml:space="preserve">
<value>Prioridad</value>
</data>

View File

@ -112,20 +112,20 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="name.Text" xml:space="preserve">
<value>Nom</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Commentaires</value>
</data>
<data name="typeName.Text" xml:space="preserve">
<value>Type</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Commentaires</value>
</data>
<data name="priority.Text" xml:space="preserve">
<value>Priorité</value>
</data>

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.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</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="name.Text" xml:space="preserve">
<value>Name</value>
</data>
@ -136,19 +147,17 @@
<data name="priority.Width" type="System.Int32, mscorlib">
<value>73</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>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 216</value>
<value>737, 400</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -165,15 +174,6 @@
<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>
@ -192,8 +192,11 @@
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="logViewer1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 59</value>
<value>737, 101</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -223,10 +226,13 @@
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 279</value>
<value>737, 509</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
<value>400</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -235,7 +241,7 @@
<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>
<value>UdsAdmin.controls.SplitContainerEx, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
@ -250,7 +256,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>699, 279</value>
<value>737, 509</value>
</data>
<data name="&gt;&gt;name.Name" xml:space="preserve">
<value>name</value>

View File

@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
namespace UdsAdmin.controls.panel
{
public class ChartPanel : UserControl
{
private System.ComponentModel.IContainer components = null;
System.Windows.Forms.DataVisualization.Charting.Chart chart;
public ChartPanel()
{
InitializeComponent();
ResizeRedraw = true;
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
chart = new System.Windows.Forms.DataVisualization.Charting.Chart();
((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
SuspendLayout();
chartArea1.Name = "ChartArea1";
chart.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
legend1.LegendStyle = LegendStyle.Column;
legend1.Title = Strings.legend;
chart.Legends.Add(legend1);
chart.Dock = DockStyle.Fill;
chart.Name = "Chart";
chart.TabIndex = 0;
chart.Text = "chart1";
chart.Palette = ChartColorPalette.Pastel;
Controls.Add(chart);
Load += new System.EventHandler(this.ChartPanel_Load);
((System.ComponentModel.ISupportInitialize)(chart)).EndInit();
ResumeLayout(false);
// For testing how chart looks like
/*System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
series1.ChartArea = "ChartArea1";
series1.Legend = "Legend1";
series1.XValueType = ChartValueType.DateTime;
series1.YValueType = ChartValueType.Double;
series1.Name = "Series1";
series1.ChartType = SeriesChartType.SplineArea;
DateTime a = DateTime.Now;
a = a.AddDays(-360);
for (int i = 0; i < 360; i++)
{
series1.Points.AddXY(a, 100+100*Math.Sin(i*Math.PI/180));
a = a.AddDays(1);
}
this.chart.Series.Add(series1);
chart.Invalidate();*/
}
private void ChartPanel_Load(object sender, EventArgs e)
{
}
public void clearSeries()
{
chart.Series.Clear();
}
public void addSerie(xmlrpc.StatCounter counter)
{
SuspendLayout();
string n = (1+chart.Series.Count).ToString();
/*Legend legend = new Legend();
legend.Name = "Legend" + n;
legend.LegendStyle = LegendStyle.Column;
legend.Title = counter.title;
this.chart.Legends.Add(legend);*/
Series serie = new Series();
serie.ChartArea = "ChartArea1";
serie.Legend = "Legend1";
serie.XValueType = ChartValueType.DateTime;
serie.YValueType = ChartValueType.Double;
serie.Name = counter.title;
serie.ChartType = SeriesChartType.SplineArea;
foreach( xmlrpc.StatCounterData i in counter.data )
{
serie.Points.AddXY(i.stamp, i.value);
}
this.chart.Series.Add(serie);
this.chart.Invalidate();
ResumeLayout();
}
}
}

View File

@ -112,21 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="auth.Text" xml:space="preserve">
<value>Authenticator</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="state.Text" xml:space="preserve">
<value>Staat</value>
<value>Zustand</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Kommentare</value>
</data>
<data name="auth.Text" xml:space="preserve">
<value>Authentifikator</value>
</data>
</root>

View File

@ -112,11 +112,14 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="auth.Text" xml:space="preserve">
<value>Autenticador</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Nombre</value>
</data>
@ -126,7 +129,4 @@
<data name="comments.Text" xml:space="preserve">
<value>Comentarios</value>
</data>
<data name="auth.Text" xml:space="preserve">
<value>Autenticador</value>
</data>
</root>

View File

@ -112,11 +112,14 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="auth.Text" xml:space="preserve">
<value>Authenticator</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Nom</value>
</data>
@ -126,7 +129,4 @@
<data name="comments.Text" xml:space="preserve">
<value>Commentaires</value>
</data>
<data name="auth.Text" xml:space="preserve">
<value>Authentificateur</value>
</data>
</root>

View File

@ -29,8 +29,7 @@
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.splitContainer1 = new SplitContainerEx();
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()));
@ -42,7 +41,6 @@
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
@ -52,18 +50,12 @@
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.panel1);
this.splitContainer1.Panel1.Controls.Add(this.listView);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// panel1
//
this.panel1.Controls.Add(this.listView);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// listView
//
this.listView.AutoArrange = false;
@ -123,16 +115,14 @@
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 SplitContainerEx 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;

View File

@ -112,81 +112,27 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Id.Text" xml:space="preserve">
<value>ID</value>
<value>Identifikation</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Friendly Name</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Revision</value>
</data>
<data name="CreationDate.Text" xml:space="preserve">
<value>Erstellungsdatum</value>
</data>
<data name="State.Text" xml:space="preserve">
<value>Staat</value>
<value>Zustand</value>
</data>
<data name="StatusDate.Text" xml:space="preserve">
<value>Statusdatum</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Angezeigter Name</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Überarbeitung</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>$this</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;Id.Name" xml:space="preserve">
<value>Id</value>
</data>
<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;CreationDate.Name" xml:space="preserve">
<value>CreationDate</value>
</data>
<data name="&gt;&gt;CreationDate.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;State.Name" xml:space="preserve">
<value>State</value>
</data>
<data name="&gt;&gt;State.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;StatusDate.Name" xml:space="preserve">
<value>StatusDate</value>
</data>
<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>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>Status Datum</value>
</data>
</root>

View File

@ -112,22 +112,13 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Id.Text" xml:space="preserve">
<value>ID</value>
</data>
<data name="CreationDate.Text" xml:space="preserve">
<value>Fecha de creación</value>
</data>
<data name="State.Text" xml:space="preserve">
<value>Estado</value>
</data>
<data name="StatusDate.Text" xml:space="preserve">
<value>Fecha de Estado</value>
<value>Identificación</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Nombre descriptivo</value>
@ -135,58 +126,13 @@
<data name="Revision.Text" xml:space="preserve">
<value>Revisión</value>
</data>
<data name="&gt;&gt;listView.Name" xml:space="preserve">
<value>listView</value>
<data name="CreationDate.Text" xml:space="preserve">
<value>Fecha de creación de</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="State.Text" xml:space="preserve">
<value>Estado</value>
</data>
<data name="&gt;&gt;listView.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;Id.Name" xml:space="preserve">
<value>Id</value>
</data>
<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;CreationDate.Name" xml:space="preserve">
<value>CreationDate</value>
</data>
<data name="&gt;&gt;CreationDate.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;State.Name" xml:space="preserve">
<value>State</value>
</data>
<data name="&gt;&gt;State.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;StatusDate.Name" xml:space="preserve">
<value>StatusDate</value>
</data>
<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>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="StatusDate.Text" xml:space="preserve">
<value>Etapa Fecha</value>
</data>
</root>

View File

@ -112,13 +112,19 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Id.Text" xml:space="preserve">
<value>ID</value>
<value>Id</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Nom convivial</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Révision</value>
</data>
<data name="CreationDate.Text" xml:space="preserve">
<value>Date de création</value>
@ -127,66 +133,6 @@
<value>État</value>
</data>
<data name="StatusDate.Text" xml:space="preserve">
<value>Date d'État</value>
</data>
<data name="friendlyName.Text" xml:space="preserve">
<value>Nom convivial</value>
</data>
<data name="Revision.Text" xml:space="preserve">
<value>Révision</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>$this</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;Id.Name" xml:space="preserve">
<value>Id</value>
</data>
<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;CreationDate.Name" xml:space="preserve">
<value>CreationDate</value>
</data>
<data name="&gt;&gt;CreationDate.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;State.Name" xml:space="preserve">
<value>State</value>
</data>
<data name="&gt;&gt;State.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;StatusDate.Name" xml:space="preserve">
<value>StatusDate</value>
</data>
<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>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>Date de statut</value>
</data>
</root>

View File

@ -172,10 +172,10 @@
<value>False</value>
</data>
<data name="listView.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 0</value>
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>776, 212</value>
<value>737, 400</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@ -187,36 +187,9 @@
<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>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">
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve">
@ -237,8 +210,11 @@
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="logViewer1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 59</value>
<value>737, 101</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -268,10 +244,13 @@
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 279</value>
<value>737, 509</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
<value>400</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -295,7 +274,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>784, 279</value>
<value>737, 509</value>
</data>
<data name="&gt;&gt;Id.Name" xml:space="preserve">
<value>Id</value>

View File

@ -29,6 +29,11 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DeployedServicePanel));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupLabel = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
@ -38,20 +43,77 @@
this.lBaseService = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lOsManager = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.lInitial = new System.Windows.Forms.Label();
this.cacheLabel = new System.Windows.Forms.Label();
this.lCache = new System.Windows.Forms.Label();
this.cacheL2Label = new System.Windows.Forms.Label();
this.lL2Cache = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.lMax = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.lState = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.inUseChart = new UdsAdmin.controls.panel.ChartPanel();
this.assignedChart = new UdsAdmin.controls.panel.ChartPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
this.tabControl1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tabControl1_KeyUp);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.splitContainer1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.panel1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.logViewer1);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tableLayoutPanel1);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
this.label4.UseMnemonic = false;
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
@ -96,19 +158,19 @@
// lName
//
resources.ApplyResources(this.lName, "lName");
this.lName.BackColor = System.Drawing.SystemColors.Window;
this.lName.BackColor = System.Drawing.Color.Transparent;
this.lName.Name = "lName";
//
// lComments
//
resources.ApplyResources(this.lComments, "lComments");
this.lComments.BackColor = System.Drawing.SystemColors.Window;
this.lComments.BackColor = System.Drawing.Color.Transparent;
this.lComments.Name = "lComments";
//
// lBaseService
//
resources.ApplyResources(this.lBaseService, "lBaseService");
this.lBaseService.BackColor = System.Drawing.SystemColors.Window;
this.lBaseService.BackColor = System.Drawing.Color.Transparent;
this.lBaseService.Name = "lBaseService";
//
// label3
@ -120,19 +182,13 @@
// lOsManager
//
resources.ApplyResources(this.lOsManager, "lOsManager");
this.lOsManager.BackColor = System.Drawing.SystemColors.Window;
this.lOsManager.BackColor = System.Drawing.Color.Transparent;
this.lOsManager.Name = "lOsManager";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.CausesValidation = false;
this.label10.Name = "label10";
//
// lInitial
//
resources.ApplyResources(this.lInitial, "lInitial");
this.lInitial.BackColor = System.Drawing.SystemColors.Window;
this.lInitial.BackColor = System.Drawing.Color.Transparent;
this.lInitial.Name = "lInitial";
//
// cacheLabel
@ -144,7 +200,7 @@
// lCache
//
resources.ApplyResources(this.lCache, "lCache");
this.lCache.BackColor = System.Drawing.SystemColors.Window;
this.lCache.BackColor = System.Drawing.Color.Transparent;
this.lCache.Name = "lCache";
//
// cacheL2Label
@ -156,19 +212,13 @@
// lL2Cache
//
resources.ApplyResources(this.lL2Cache, "lL2Cache");
this.lL2Cache.BackColor = System.Drawing.SystemColors.Window;
this.lL2Cache.BackColor = System.Drawing.Color.Transparent;
this.lL2Cache.Name = "lL2Cache";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.CausesValidation = false;
this.label7.Name = "label7";
//
// lMax
//
resources.ApplyResources(this.lMax, "lMax");
this.lMax.BackColor = System.Drawing.SystemColors.Window;
this.lMax.BackColor = System.Drawing.Color.Transparent;
this.lMax.Name = "lMax";
//
// label6
@ -180,53 +230,105 @@
// lState
//
resources.ApplyResources(this.lState, "lState");
this.lState.BackColor = System.Drawing.SystemColors.Window;
this.lState.BackColor = System.Drawing.Color.Transparent;
this.lState.Name = "lState";
//
// label4
// label10
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
this.label4.UseMnemonic = false;
resources.ApplyResources(this.label10, "label10");
this.label10.CausesValidation = false;
this.label10.Name = "label10";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.CausesValidation = false;
this.label7.Name = "label7";
//
// logViewer1
//
resources.ApplyResources(this.logViewer1, "logViewer1");
this.logViewer1.Name = "logViewer1";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.tableLayoutPanel2);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tableLayoutPanel2
//
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
this.tableLayoutPanel2.Controls.Add(this.inUseChart, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.assignedChart, 0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
//
// inUseChart
//
resources.ApplyResources(this.inUseChart, "inUseChart");
this.inUseChart.Name = "inUseChart";
//
// assignedChart
//
resources.ApplyResources(this.assignedChart, "assignedChart");
this.assignedChart.Name = "assignedChart";
//
// DeployedServicePanel
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.label4);
this.Controls.Add(this.tableLayoutPanel1);
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tabControl1);
this.Name = "DeployedServicePanel";
this.VisibleChanged += new System.EventHandler(this.DeployedServicePanel_VisibleChanged);
this.Resize += new System.EventHandler(this.DeployedServicePanel_Resize);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private SplitContainerEx splitContainer1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label groupLabel;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label cacheLabel;
private System.Windows.Forms.Label cacheL2Label;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label lName;
private System.Windows.Forms.Label lComments;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label lBaseService;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lOsManager;
private System.Windows.Forms.Label lInitial;
private System.Windows.Forms.Label cacheLabel;
private System.Windows.Forms.Label lCache;
private System.Windows.Forms.Label cacheL2Label;
private System.Windows.Forms.Label lL2Cache;
private System.Windows.Forms.Label lState;
private System.Windows.Forms.Label lMax;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label lState;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label7;
private LogViewer logViewer1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private ChartPanel assignedChart;
private ChartPanel inUseChart;
private System.Windows.Forms.Panel panel1;
}
}

View File

@ -41,6 +41,8 @@ namespace UdsAdmin.controls.panel
public partial class DeployedServicePanel : UserControl
{
private string _dsId;
private DateTime shownToCharts = new DateTime();
public DeployedServicePanel(xmlrpc.DeployedService ds)
{
_dsId = ds.id;
@ -52,11 +54,15 @@ namespace UdsAdmin.controls.panel
private void DeployedServicePanel_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
updateData();
if (tabControl1.SelectedTab == tabPage2)
updateCharts();
else
updateData();
}
private void updateData()
{
SuspendLayout();
xmlrpc.DeployedService ds = xmlrpc.UdsAdminService.GetDeployedService(_dsId);
lName.Text = ds.name;
lComments.Text = ds.comments;
@ -67,6 +73,88 @@ namespace UdsAdmin.controls.panel
lState.Text = ds.state;
lBaseService.Text = ds.serviceName;
lOsManager.Text = ds.osManagerName;
updateLogs();
ResumeLayout();
}
private void updateCharts()
{
SuspendLayout();
DateTime now = DateTime.Now;
DateTime to = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
DateTime since = to.AddDays(-7);
if (to == shownToCharts)
return;
try
{
xmlrpc.StatCounter assigned = xmlrpc.UdsAdminService.GetDeployedServiceCounters(_dsId,
xmlrpc.Constants.COUNTER_ASSIGNED, since, to, Properties.Settings.Default.StatsItems, true);
xmlrpc.StatCounter inUse = xmlrpc.UdsAdminService.GetDeployedServiceCounters(_dsId,
xmlrpc.Constants.COUNTER_INUSE, since, to, Properties.Settings.Default.StatsItems, true);
assignedChart.clearSeries();
assignedChart.addSerie(assigned);
inUseChart.clearSeries();
inUseChart.addSerie(inUse);
shownToCharts = to;
}
catch (CookComputing.XmlRpc.XmlRpcFaultException e)
{
gui.UserNotifier.notifyRpcException(e);
}
ResumeLayout();
}
private void updateLogs()
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
try
{
xmlrpc.LogEntry[] logs = xmlrpc.UdsAdminService.GetDeployedServiceLogs(_dsId);
data.AddRange(logs);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
logViewer1.setLogs(data.ToArray());
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (tabControl1.SelectedTab == tabPage2)
{
if (sender == null)
shownToCharts = new DateTime();
updateCharts();
}
else
updateData();
}
private void tabControl1_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.F5:
tabControl1_SelectedIndexChanged(null, null);
break;
}
}
private void DeployedServicePanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
tabControl1.Size = this.Size;
}
}
}

View File

@ -780,4 +780,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="" xml:space="preserve">
<value> </value>
</data>
</root>

View File

@ -780,4 +780,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="" xml:space="preserve">
<value> </value>
</data>
</root>

View File

@ -780,4 +780,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="" xml:space="preserve">
<value> </value>
</data>
</root>

View File

@ -117,21 +117,72 @@
<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="tabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<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>3, 3</value>
</data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label4.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="label4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>194, 16</value>
</data>
<data name="label4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Information</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="groupLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="groupLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="groupLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="groupLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 6</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
</data>
@ -162,8 +213,11 @@
<data name="label2.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 27</value>
<value>3, 28</value>
</data>
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -195,8 +249,11 @@
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 48</value>
<value>3, 50</value>
</data>
<data name="label1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -235,7 +292,7 @@
<value>NoControl</value>
</data>
<data name="lName.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 4</value>
<value>233, 4</value>
</data>
<data name="lName.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -271,7 +328,7 @@
<value>NoControl</value>
</data>
<data name="lComments.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 25</value>
<value>233, 26</value>
</data>
<data name="lComments.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -307,7 +364,7 @@
<value>NoControl</value>
</data>
<data name="lBaseService.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 46</value>
<value>233, 48</value>
</data>
<data name="lBaseService.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -336,8 +393,11 @@
<data name="label3.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 69</value>
<value>3, 72</value>
</data>
<data name="label3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -376,7 +436,7 @@
<value>NoControl</value>
</data>
<data name="lOsManager.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 67</value>
<value>233, 70</value>
</data>
<data name="lOsManager.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -412,7 +472,7 @@
<value>NoControl</value>
</data>
<data name="lInitial.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 88</value>
<value>233, 92</value>
</data>
<data name="lInitial.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -448,7 +508,7 @@
<value>NoControl</value>
</data>
<data name="cacheLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 112</value>
<value>3, 117</value>
</data>
<data name="cacheLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -487,7 +547,7 @@
<value>NoControl</value>
</data>
<data name="lCache.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 109</value>
<value>233, 114</value>
</data>
<data name="lCache.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -523,7 +583,7 @@
<value>NoControl</value>
</data>
<data name="cacheL2Label.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 133</value>
<value>3, 139</value>
</data>
<data name="cacheL2Label.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -562,7 +622,7 @@
<value>NoControl</value>
</data>
<data name="lL2Cache.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 130</value>
<value>233, 136</value>
</data>
<data name="lL2Cache.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -598,7 +658,7 @@
<value>NoControl</value>
</data>
<data name="lMax.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 151</value>
<value>233, 158</value>
</data>
<data name="lMax.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -634,7 +694,7 @@
<value>NoControl</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 175</value>
<value>3, 183</value>
</data>
<data name="label6.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -673,7 +733,7 @@
<value>NoControl</value>
</data>
<data name="lState.Location" type="System.Drawing.Point, System.Drawing">
<value>155, 172</value>
<value>233, 180</value>
</data>
<data name="lState.Size" type="System.Drawing.Size, System.Drawing">
<value>11, 13</value>
@ -709,7 +769,7 @@
<value>NoControl</value>
</data>
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 91</value>
<value>3, 95</value>
</data>
<data name="label10.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -748,7 +808,7 @@
<value>NoControl</value>
</data>
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 154</value>
<value>3, 161</value>
</data>
<data name="label7.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
@ -775,16 +835,16 @@
<value>17</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 25</value>
<value>25, 35</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>367, 215</value>
<value>460, 223</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>5</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -793,45 +853,267 @@
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
<value>panel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lComments" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lBaseService" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lOsManager" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lInitial" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lCache" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheL2Label" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lL2Cache" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lMax" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lState" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label10" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label7" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0" /&gt;&lt;Rows Styles="Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="groupLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lComments" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lBaseService" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lOsManager" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lInitial" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lCache" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cacheL2Label" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lL2Cache" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="lMax" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label6" Row="8" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="lState" Row="8" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label10" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="label7" Row="7" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,50,Percent,50" /&gt;&lt;Rows Styles="Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10,Percent,10" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="label4.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>186, 6</value>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 397</value>
</data>
<data name="label4.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 6, 3, 0</value>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="label4.TabIndex" type="System.Int32, mscorlib">
<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.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 69</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="label4.Text" xml:space="preserve">
<value>Information</value>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 474</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>397</value>
</data>
<data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>0</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>UdsAdmin.controls.SplitContainerEx, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>tabPage1</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabPage1.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 23</value>
</data>
<data name="tabPage1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>727, 480</value>
</data>
<data name="tabPage1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="tabPage1.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="&gt;&gt;tabPage1.Name" xml:space="preserve">
<value>tabPage1</value>
</data>
<data name="&gt;&gt;tabPage1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage1.Parent" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabPage1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="inUseChart.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="inUseChart.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 240</value>
</data>
<data name="inUseChart.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 231</value>
</data>
<data name="inUseChart.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;inUseChart.Name" xml:space="preserve">
<value>inUseChart</value>
</data>
<data name="&gt;&gt;inUseChart.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.ChartPanel, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;inUseChart.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;inUseChart.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="assignedChart.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="assignedChart.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="assignedChart.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 231</value>
</data>
<data name="assignedChart.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;assignedChart.Name" xml:space="preserve">
<value>assignedChart</value>
</data>
<data name="&gt;&gt;assignedChart.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.ChartPanel, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;assignedChart.Parent" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;assignedChart.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>721, 474</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Name" xml:space="preserve">
<value>tableLayoutPanel2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.Parent" xml:space="preserve">
<value>tabPage2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="inUseChart" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="assignedChart" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="Percent,50,Percent,50" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tabPage2.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 23</value>
</data>
<data name="tabPage2.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>727, 480</value>
</data>
<data name="tabPage2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value>Statistics</value>
</data>
<data name="&gt;&gt;tabPage2.Name" xml:space="preserve">
<value>tabPage2</value>
</data>
<data name="&gt;&gt;tabPage2.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage2.Parent" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>735, 507</value>
</data>
<data name="tabControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tabControl1.Name" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabControl1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<data name="&gt;&gt;tabControl1.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">
@ -841,7 +1123,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>442, 272</value>
<value>731, 503</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>DeployedServicePanel</value>

View File

@ -34,6 +34,21 @@
this.kind = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.state = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.comments = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.assignedChart = new UdsAdmin.controls.panel.ChartPanel();
this.inUseChart = new UdsAdmin.controls.panel.ChartPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// listView
@ -51,6 +66,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
@ -72,13 +88,82 @@
resources.ApplyResources(this.comments, "comments");
this.comments.Width = global::UdsAdmin.Properties.Settings.Default.wCommentsCol;
//
// tabControl1
//
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.splitContainer1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.Transparent;
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";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.tableLayoutPanel1);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.assignedChart, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.inUseChart, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// assignedChart
//
resources.ApplyResources(this.assignedChart, "assignedChart");
this.assignedChart.Name = "assignedChart";
//
// inUseChart
//
resources.ApplyResources(this.inUseChart, "inUseChart");
this.inUseChart.Name = "inUseChart";
//
// DeployedServicesPanel
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.listView);
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.tabControl1);
this.DoubleBuffered = true;
this.Name = "DeployedServicesPanel";
this.VisibleChanged += new System.EventHandler(this.UsersPanel_VisibleChanged);
this.Resize += new System.EventHandler(this.DeployedServicesPanel_Resize);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -90,5 +175,13 @@
private System.Windows.Forms.ColumnHeader state;
private System.Windows.Forms.ColumnHeader comments;
private System.Windows.Forms.ColumnHeader kind;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private SplitContainerEx splitContainer1;
private LogViewer logViewer1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ChartPanel assignedChart;
private ChartPanel inUseChart;
}
}

View File

@ -41,6 +41,7 @@ namespace UdsAdmin.controls.panel
public partial class DeployedServicesPanel : UserControl
{
gui.ListViewSorter _listSorter;
private DateTime shownToCharts = new DateTime();
public DeployedServicesPanel()
{
@ -53,9 +54,10 @@ namespace UdsAdmin.controls.panel
private void UsersPanel_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
{
updateList();
}
if (tabControl1.SelectedTab == tabPage2)
updateCharts();
else
updateList();
}
private void updateList()
@ -81,6 +83,62 @@ namespace UdsAdmin.controls.panel
gui.UserNotifier.notifyRpcException(ex);
}
if (listView.Items.Count > 0)
{
listView.Items[0].Selected = listView.Items[0].Focused = true;
listView.Focus();
}
}
private void updateCharts()
{
SuspendLayout();
DateTime now = DateTime.Now;
DateTime to = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
DateTime since = to.AddDays(-7);
if (to == shownToCharts)
return;
try
{
xmlrpc.StatCounter assigned = xmlrpc.UdsAdminService.GetDeployedServiceCounters(xmlrpc.Constants.ALL,
xmlrpc.Constants.COUNTER_ASSIGNED, since, to, Properties.Settings.Default.StatsItems, true);
xmlrpc.StatCounter inUse = xmlrpc.UdsAdminService.GetDeployedServiceCounters(xmlrpc.Constants.ALL,
xmlrpc.Constants.COUNTER_INUSE, since, to, Properties.Settings.Default.StatsItems, true);
assignedChart.clearSeries();
assignedChart.addSerie(assigned);
inUseChart.clearSeries();
inUseChart.addSerie(inUse);
shownToCharts = to;
}
catch (CookComputing.XmlRpc.XmlRpcFaultException e)
{
gui.UserNotifier.notifyRpcException(e);
}
ResumeLayout();
}
private void updateLogs()
{
List<xmlrpc.LogEntry> data = new List<xmlrpc.LogEntry>();
foreach (ListViewItem i in listView.SelectedItems)
{
try
{
xmlrpc.LogEntry[] logs = xmlrpc.UdsAdminService.GetDeployedServiceLogs((string)i.Tag);
data.AddRange(logs);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
}
logViewer1.setLogs(data.ToArray());
}
private void listView_KeyUp(object sender, KeyEventArgs e)
@ -88,10 +146,10 @@ namespace UdsAdmin.controls.panel
switch (e.KeyCode)
{
case Keys.F5:
updateList();
tabControl1_SelectedIndexChanged(null, null);
break;
case Keys.E:
if (e.Modifiers == Keys.Control)
if (e.Modifiers == Keys.Control && tabControl1.SelectedTab == tabPage1)
foreach (ListViewItem i in listView.Items)
i.Selected = true;
break;
@ -103,5 +161,28 @@ namespace UdsAdmin.controls.panel
_listSorter.ColumnClick(sender, e);
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (tabControl1.SelectedTab == tabPage2)
{
if (sender == null)
shownToCharts = new DateTime();
updateCharts();
}
else
updateList();
}
private void listView_SelectedIndexChanged(object sender, EventArgs e)
{
updateLogs();
}
private void DeployedServicesPanel_Resize(object sender, EventArgs e)
{
// Workaround to "dock" not fitting the content correctly
tabControl1.Size = this.Size;
}
}
}

View File

@ -145,7 +145,7 @@
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>660, 279</value>
<value>723, 375</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -157,11 +157,254 @@
<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="tabControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</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>3, 3</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.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 93</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>723, 476</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>375</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</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>UdsAdmin.controls.SplitContainerEx, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>tabPage1</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tabPage1.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 23</value>
</data>
<data name="tabPage1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 482</value>
</data>
<data name="tabPage1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="tabPage1.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="&gt;&gt;tabPage1.Name" xml:space="preserve">
<value>tabPage1</value>
</data>
<data name="&gt;&gt;tabPage1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage1.Parent" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabPage1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="assignedChart.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="assignedChart.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="assignedChart.Size" type="System.Drawing.Size, System.Drawing">
<value>717, 232</value>
</data>
<data name="assignedChart.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;assignedChart.Name" xml:space="preserve">
<value>assignedChart</value>
</data>
<data name="&gt;&gt;assignedChart.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.ChartPanel, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;assignedChart.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;assignedChart.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="inUseChart.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="inUseChart.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 241</value>
</data>
<data name="inUseChart.Size" type="System.Drawing.Size, System.Drawing">
<value>717, 232</value>
</data>
<data name="inUseChart.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;inUseChart.Name" xml:space="preserve">
<value>inUseChart</value>
</data>
<data name="&gt;&gt;inUseChart.Type" xml:space="preserve">
<value>UdsAdmin.controls.panel.ChartPanel, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;inUseChart.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;inUseChart.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>723, 476</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>tabPage2</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="assignedChart" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="inUseChart" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100,Absolute,20" /&gt;&lt;Rows Styles="Percent,50,Percent,50" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="tabPage2.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 23</value>
</data>
<data name="tabPage2.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>729, 482</value>
</data>
<data name="tabPage2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value>Statistics</value>
</data>
<data name="&gt;&gt;tabPage2.Name" xml:space="preserve">
<value>tabPage2</value>
</data>
<data name="&gt;&gt;tabPage2.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabPage2.Parent" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabPage2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tabControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>737, 509</value>
</data>
<data name="tabControl1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tabControl1.Name" xml:space="preserve">
<value>tabControl1</value>
</data>
<data name="&gt;&gt;tabControl1.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tabControl1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tabControl1.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>
@ -169,7 +412,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>660, 279</value>
<value>737, 509</value>
</data>
<data name="&gt;&gt;name.Name" xml:space="preserve">
<value>name</value>

View File

@ -0,0 +1,139 @@
namespace UdsAdmin.controls.panel
{
partial class LogViewer
{
/// <summary>
/// Variable del diseñador requerida.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de componentes
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LogViewer));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.listView = new System.Windows.Forms.ListView();
this.date = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.level = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.source = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.message = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.levelFilterCombo = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.listView, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// listView
//
this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.date,
this.level,
this.source,
this.message});
resources.ApplyResources(this.listView, "listView");
this.listView.FullRowSelect = true;
this.listView.GridLines = true;
this.listView.MultiSelect = false;
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.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listView_KeyUp);
//
// date
//
resources.ApplyResources(this.date, "date");
//
// level
//
resources.ApplyResources(this.level, "level");
//
// source
//
resources.ApplyResources(this.source, "source");
//
// message
//
resources.ApplyResources(this.message, "message");
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.levelFilterCombo);
this.flowLayoutPanel1.Controls.Add(this.label2);
this.flowLayoutPanel1.Controls.Add(this.label1);
resources.ApplyResources(this.flowLayoutPanel1, "flowLayoutPanel1");
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
//
// levelFilterCombo
//
this.levelFilterCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.levelFilterCombo.FormattingEnabled = true;
resources.ApplyResources(this.levelFilterCombo, "levelFilterCombo");
this.levelFilterCombo.Name = "levelFilterCombo";
this.levelFilterCombo.SelectedIndexChanged += new System.EventHandler(this.levelFilterCombo_SelectedIndexChanged);
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// LogViewer
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "LogViewer";
this.tableLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.ListView listView;
private System.Windows.Forms.ColumnHeader date;
private System.Windows.Forms.ColumnHeader level;
private System.Windows.Forms.ColumnHeader source;
private System.Windows.Forms.ColumnHeader message;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox levelFilterCombo;
private System.Windows.Forms.Label label2;
}
}

View File

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace UdsAdmin.controls.panel
{
public partial class LogViewer : UserControl
{
gui.ListViewSorter _listSorter;
private readonly int[] levelIndex = new int[] { xmlrpc.Constants.LEVEL_DEBUG_I, xmlrpc.Constants.LEVEL_INFO_I,
xmlrpc.Constants.LEVEL_WARN_I, xmlrpc.Constants.LEVEL_ERROR_I, xmlrpc.Constants.LEVEL_FATAL_I };
xmlrpc.LogEntry[] logs = null;
public LogViewer()
{
InitializeComponent();
ResizeRedraw = true;
listView.ListViewItemSorter = _listSorter = new gui.ListViewSorter(listView, new int[] { 3, 5 });
levelFilterCombo.Items.AddRange(new string[] { xmlrpc.Constants.LEVEL_DEBUG, xmlrpc.Constants.LEVEL_INFO,
xmlrpc.Constants.LEVEL_WARN, xmlrpc.Constants.LEVEL_ERROR, xmlrpc.Constants.LEVEL_FATAL });
levelFilterCombo.SelectedIndex = 2;
}
public void setLogs(xmlrpc.LogEntry[] logs)
{
this.logs = logs;
updateList();
}
private void updateList()
{
if( logs == null )
return;
List<ListViewItem> lst = new List<ListViewItem>();
int minLevel = levelIndex[levelFilterCombo.SelectedIndex];
foreach (xmlrpc.LogEntry l in logs)
{
if (l.level < minLevel)
continue;
ListViewItem itm = new ListViewItem(new string[] { l.date.ToString(), xmlrpc.Constants.stringFromLevel(l.level), l.source, l.message });
// Color is got from ranges
itm.ForeColor = gui.Colors.getColorForLogLevel(l.level);
lst.Add(itm);
}
listView.Items.Clear();
listView.Items.AddRange(lst.ToArray());
}
private void listView_ColumnClick(object sender, ColumnClickEventArgs e)
{
_listSorter.ColumnClick(sender, e);
}
private void levelFilterCombo_SelectedIndexChanged(object sender, EventArgs e)
{
updateList();
}
private void listView_KeyUp(object sender, KeyEventArgs e)
{
/*switch (e.KeyCode)
{
case Keys.F5:
updateList();
break;
}*/
}
}
}

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Text" xml:space="preserve">
<value>Filter:</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Ebene</value>
</data>
<data name="level.Text" xml:space="preserve">
<value>Ebene</value>
</data>
<data name="message.Text" xml:space="preserve">
<value>Nachricht</value>
</data>
<data name="source.Text" xml:space="preserve">
<value>Quelle</value>
</data>
<data name="date.Text" xml:space="preserve">
<value>Datum</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Text" xml:space="preserve">
<value>Filtrar:</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Nivel</value>
</data>
<data name="level.Text" xml:space="preserve">
<value>nivel</value>
</data>
<data name="message.Text" xml:space="preserve">
<value>mensaje</value>
</data>
<data name="source.Text" xml:space="preserve">
<value>fuente</value>
</data>
<data name="date.Text" xml:space="preserve">
<value>fecha</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Text" xml:space="preserve">
<value>Filtre:</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Niveau</value>
</data>
<data name="level.Text" xml:space="preserve">
<value>niveau</value>
</data>
<data name="message.Text" xml:space="preserve">
<value>message</value>
</data>
<data name="source.Text" xml:space="preserve">
<value>source</value>
</data>
<data name="date.Text" xml:space="preserve">
<value>date</value>
</data>
</root>

View File

@ -0,0 +1,366 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="date.Text" xml:space="preserve">
<value>date</value>
</data>
<data name="date.Width" type="System.Int32, mscorlib">
<value>100</value>
</data>
<data name="level.Text" xml:space="preserve">
<value>level</value>
</data>
<data name="level.Width" type="System.Int32, mscorlib">
<value>109</value>
</data>
<data name="source.Text" xml:space="preserve">
<value>source</value>
</data>
<data name="source.Width" type="System.Int32, mscorlib">
<value>92</value>
</data>
<data name="message.Text" xml:space="preserve">
<value>message</value>
</data>
<data name="message.Width" type="System.Int32, mscorlib">
<value>389</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>
<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.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 178</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>1</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>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="levelFilterCombo.Location" type="System.Drawing.Point, System.Drawing">
<value>591, 3</value>
</data>
<data name="levelFilterCombo.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 21</value>
</data>
<data name="levelFilterCombo.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;levelFilterCombo.Name" xml:space="preserve">
<value>levelFilterCombo</value>
</data>
<data name="&gt;&gt;levelFilterCombo.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;levelFilterCombo.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;levelFilterCombo.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>552, 0</value>
</data>
<data name="label2.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 4, 0, 0</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>33, 17</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Level</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>503, 0</value>
</data>
<data name="label1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 4, 0, 0</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>43, 17</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Filter: </value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="flowLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="flowLayoutPanel1.FlowDirection" type="System.Windows.Forms.FlowDirection, System.Windows.Forms">
<value>RightToLeft</value>
</data>
<data name="flowLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 178</value>
</data>
<data name="flowLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="flowLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 32</value>
</data>
<data name="flowLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Name" xml:space="preserve">
<value>flowLayoutPanel1</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;flowLayoutPanel1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 210</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Type" xml:space="preserve">
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="listView" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="flowLayoutPanel1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="Percent,100,Absolute,32" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>715, 210</value>
</data>
<data name="&gt;&gt;date.Name" xml:space="preserve">
<value>date</value>
</data>
<data name="&gt;&gt;date.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;level.Name" xml:space="preserve">
<value>level</value>
</data>
<data name="&gt;&gt;level.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;source.Name" xml:space="preserve">
<value>source</value>
</data>
<data name="&gt;&gt;source.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;message.Name" xml:space="preserve">
<value>message</value>
</data>
<data name="&gt;&gt;message.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>LogViewer</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -35,7 +35,7 @@
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.splitContainer1 = new SplitContainerEx();
this.logViewer1 = new UdsAdmin.controls.panel.LogViewer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -126,7 +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 SplitContainerEx splitContainer1;
private LogViewer logViewer1;
}
}

View File

@ -117,6 +117,21 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="username.Text" xml:space="preserve">
<value>Username</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="state.Text" xml:space="preserve">
<value>State</value>
</data>
<data name="lastAccess.Text" xml:space="preserve">
<value>Last Access</value>
</data>
<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">
<value>Fill</value>
@ -130,7 +145,7 @@
<value>0, 0</value>
</data>
<data name="listView.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 216</value>
<value>737, 400</value>
</data>
<data name="listView.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -147,21 +162,6 @@
<data name="&gt;&gt;listView.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="username.Text" xml:space="preserve">
<value>Username</value>
</data>
<data name="name.Text" xml:space="preserve">
<value>Name</value>
</data>
<data name="state.Text" xml:space="preserve">
<value>State</value>
</data>
<data name="lastAccess.Text" xml:space="preserve">
<value>Last Access</value>
</data>
<data name="comments.Text" xml:space="preserve">
<value>Comments</value>
</data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -189,8 +189,11 @@
<data name="logViewer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="logViewer1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="logViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 58</value>
<value>737, 101</value>
</data>
<data name="logViewer1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -220,10 +223,13 @@
<value>1</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 278</value>
<value>737, 509</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>216</value>
<value>400</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@ -247,7 +253,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>597, 278</value>
<value>737, 509</value>
</data>
<data name="&gt;&gt;username.Name" xml:space="preserve">
<value>username</value>

View File

@ -207,4 +207,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Authentifikator</value>
</data>
</root>

View File

@ -207,4 +207,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Autenticador</value>
</data>
</root>

View File

@ -207,4 +207,7 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Authentificateur</value>
</data>
</root>

View File

@ -29,7 +29,7 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer1 = new UdsAdmin.controls.SplitContainerEx();
this.treeActions = new System.Windows.Forms.TreeView();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
@ -158,6 +158,7 @@
//
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
resources.ApplyResources(this.aboutToolStripMenuItem1, "aboutToolStripMenuItem1");
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
//
// serviceProviderToolStripMenuItem
//
@ -253,7 +254,7 @@
private System.Windows.Forms.ToolStripMenuItem serviceProviderToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem newServiceProviderMenu;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.SplitContainer splitContainer1;
private UdsAdmin.controls.SplitContainerEx splitContainer1;
private System.Windows.Forms.TreeView treeActions;
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem;

View File

@ -200,6 +200,10 @@ namespace UdsAdmin.forms
{
gui.ActionTree.showAssociatedPanel(splitContainer1.Panel2, treeActions, this);
}
catch (CookComputing.XmlRpc.XmlRpcFaultException ex)
{
gui.UserNotifier.notifyRpcException(ex);
}
catch (Exception)
{
// Nothing done right now
@ -691,5 +695,10 @@ namespace UdsAdmin.forms
return new Point(form.Location.X + form.Width / 2 - f.Width / 2, form.Location.Y + form.Height / 2 - f.Height / 2);
}
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
(new AboutBoxForm()).ShowDialog();
}
}
}

View File

@ -189,6 +189,9 @@
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>146</value>
</data>
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
@ -196,7 +199,7 @@
<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>
<value>UdsAdmin.controls.SplitContainerEx, UdsAdmin, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve">
<value>$this</value>
@ -234,53 +237,17 @@
<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="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>
<data name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>42, 21</value>
</data>
<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 name="fileToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>42, 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 name="fileToolStripMenuItem.Text" xml:space="preserve">
<value>File</value>
</data>
<data name="englishToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 22</value>
@ -306,6 +273,12 @@
<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>
@ -318,11 +291,35 @@
<data name="aboutToolStripMenuItem1.Text" xml:space="preserve">
<value>About</value>
</data>
<data name="serviceProviderToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>103, 20</value>
<data name="toolsToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 21</value>
</data>
<data name="serviceProviderToolStripMenuItem.Text" xml:space="preserve">
<value>Service Provider</value>
<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>
<data name="newServiceProviderMenu.Size" type="System.Drawing.Size, System.Drawing">
<value>106, 22</value>
@ -333,15 +330,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>
@ -354,6 +351,12 @@
<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>
@ -363,6 +366,18 @@
<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>
@ -387,18 +402,6 @@
<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

@ -463,14 +463,17 @@ namespace UdsAdmin.gui
// Hides all visible controls
foreach (Control ctrl in panel.Controls)
ctrl.Hide();
//panel.Controls.Clear();
string key = getKey(selected);
if (panel.Controls.ContainsKey(key))
{
panel.Controls[key].Show();
}
else // Don't exists, creates a new panel associated with the tree view and initializes it
{
Control ctrl;
switch( selected.Name )
switch (selected.Name)
{
case USERS:
{

View File

@ -61,6 +61,13 @@ namespace UdsAdmin.xmlrpc
public const string STATE_CANCELED = "C";
public const string STATE_CANCELING = "K";
public const int COUNTER_LOAD_TYPE = 0;
public const int COUNTER_STORAGE = 1;
public const int COUNTER_ASSIGNED = 2;
public const int COUNTER_INUSE = 3;
public const string ALL = "-1";
public const string LEVEL_OTHER = "OTHER";
public const int LEVEL_OTHER_I = 10000;
public const string LEVEL_DEBUG = "DEBUG";

View File

@ -338,6 +338,14 @@ namespace UdsAdmin.xmlrpc
[XmlRpcMethod("getAuthLogs")]
LogEntry[] GetAuthLogs(string credentials, string id);
[XmlRpcMethod("getDeployedServiceLogs")]
LogEntry[] GetDeployedServiceLogs(string credentials, string id);
// Statistics stuff
[XmlRpcMethod("getDeployedServiceCounters")]
StatCounter GetDeployedServiceCounters(string credentials, string id, int counter_type, DateTime since, DateTime to, int points, bool use_max);
// Callbacks invoker
[XmlRpcMethod("chooseCallback")]
GuiFieldValue[] InvokeChooseCallback(string credentials, string name, GuiFieldValue[] parameters);

View File

@ -725,6 +725,17 @@ namespace UdsAdmin.xmlrpc
return s.GetAuthLogs(credentials, id);
}
public static LogEntry[] GetDeployedServiceLogs(string id)
{
return s.GetDeployedServiceLogs(credentials, id);
}
// Stats methods
public static StatCounter GetDeployedServiceCounters(string id, int counter_type, DateTime since, DateTime to, int points, bool use_max = false)
{
return s.GetDeployedServiceCounters(credentials, id, counter_type, since, to, points, use_max);
}
// Calbacks
public static GuiFieldValue[] InvokeChooseCallback(string name, GuiFieldValue[] parameters)

View File

@ -399,7 +399,7 @@ namespace UdsAdmin.xmlrpc
{
this.section = section; this.key = key; this.value = value; this.crypt = crypt; this.longText = longText;
}
};
}
public class LogEntry
{
@ -409,6 +409,19 @@ namespace UdsAdmin.xmlrpc
public string source;
}
// Stats structures
public class StatCounterData
{
public DateTime stamp;
public int value;
}
public class StatCounter
{
public string title;
public StatCounterData[] data;
}
public struct ChoiceCallback
{
public string callbackName;

View File

@ -10,7 +10,7 @@ Name "UDS Administration"
!define URL http://www.virtualcable.es
# MultiUser Symbol Definitions
!define MULTIUSER_EXECUTIONLEVEL Standard
!define MULTIUSER_EXECUTIONLEVEL Admin
!define MULTIUSER_INSTALLMODE_COMMANDLINE
!define MULTIUSER_INSTALLMODE_INSTDIR "UDS Administration Client"
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${REGKEY}"
@ -57,7 +57,7 @@ InstallDir "UDS Administration Client"
CRCCheck on
XPStyle on
ShowInstDetails show
VIProductVersion 1.0.0.0
VIProductVersion 1.1.0.0
VIAddVersionKey /LANG=${LANG_ENGLISH} ProductName "UDS Administration Client"
VIAddVersionKey /LANG=${LANG_ENGLISH} ProductVersion "${VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyName "${COMPANY}"
@ -83,6 +83,13 @@ Section -Main SEC0000
File ..\..\UdsAdmin\bin\Release\es\UdsAdmin.resources.dll
SetOutPath $INSTDIR\fr
File ..\..\UdsAdmin\bin\Release\fr\UdsAdmin.resources.dll
SetOutPath $TEMP
File MSChart.exe
System::Call "kernel32::CreateMutexA(i 0, i 0, t 'ChartInstall') i .r0 ?e"
ExecWait "$TEMP\MSChart.exe /q /log %temp%\msclog.htm /norestart" $0
Delete "$TEMP\MSChart.exe"
WriteRegStr HKLM "${REGKEY}\Components" Main 1
SectionEnd
@ -142,6 +149,14 @@ SectionEnd
Function .onInit
InitPluginsDir
StrCpy $StartMenuGroup "Virtual Cable\UDS Administration Client"
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5" SP
${if} $0 != 1
MessageBox MB_OK "$(^NoDotNet)"
Abort
${EndIf}
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro MULTIUSER_INIT
FunctionEnd
@ -155,9 +170,14 @@ Function un.onInit
FunctionEnd
# Installer Language Strings
# TODO Update the Language Strings with the appropriate translations.
LangString ^NoDotNet ${LANG_ENGLISH} ".NET 3.5 sp1 Required.$\nPlease, install it to proceed"
LangString ^NoDotNet ${LANG_SPANISH} "Se requiere .NET 3.5 sp1.$\nPor favor, instalelo para proceder"
LangString ^NoDotNet ${LANG_FRENCH} ".NET Framework 3.5 SP1 requis.$\nVeuillez, installez-le de procéder"
LangString ^NoDotNet ${LANG_GERMAN} "Erforderlich ist. NET 3.5 sp1.$\nPor Bitte installieren Sie es, um fortzufahren"
LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)"
LangString ^UninstallLink ${LANG_SPANISH} "Uninstall $(^Name)"
LangString ^UninstallLink ${LANG_FRENCH} "Uninstall $(^Name)"
LangString ^UninstallLink ${LANG_GERMAN} "Uninstall $(^Name)"
LangString ^UninstallLink ${LANG_SPANISH} "Desinstalar $(^Name)"
LangString ^UninstallLink ${LANG_FRENCH} "Désinstaller $(^Name)"
LangString ^UninstallLink ${LANG_GERMAN} "Deinstallieren $(^Name)"

View File

@ -44,6 +44,7 @@ encoding//src/uds/core/auths/GroupsManager.py=utf-8
encoding//src/uds/core/auths/User.py=utf-8
encoding//src/uds/core/auths/__init__.py=utf-8
encoding//src/uds/core/auths/auth.py=utf-8
encoding//src/uds/core/db/__init__.py=utf-8
encoding//src/uds/core/jobs/DelayedTask.py=utf-8
encoding//src/uds/core/jobs/DelayedTaskRunner.py=utf-8
encoding//src/uds/core/jobs/Job.py=utf-8
@ -54,6 +55,7 @@ encoding//src/uds/core/managers/CryptoManager.py=utf-8
encoding//src/uds/core/managers/DownloadsManager.py=utf-8
encoding//src/uds/core/managers/LogManager.py=utf-8
encoding//src/uds/core/managers/PublicationManager.py=utf-8
encoding//src/uds/core/managers/StatsManager.py=utf-8
encoding//src/uds/core/managers/TaskManager.py=utf-8
encoding//src/uds/core/managers/UserPrefsManager.py=utf-8
encoding//src/uds/core/managers/UserServiceManager.py=utf-8
@ -86,11 +88,15 @@ encoding//src/uds/core/util/UniqueNameGenerator.py=utf-8
encoding//src/uds/core/util/connection.py=utf-8
encoding//src/uds/core/util/log.py=utf-8
encoding//src/uds/core/util/modfinder.py=utf-8
encoding//src/uds/core/util/stats/__init__.py=utf-8
encoding//src/uds/core/util/stats/charts.py=utf-8
encoding//src/uds/core/util/stats/counters.py=utf-8
encoding//src/uds/core/workers/AssignedAndUnused.py=utf-8
encoding//src/uds/core/workers/CacheCleaner.py=utf-8
encoding//src/uds/core/workers/DeployedServiceCleaner.py=utf-8
encoding//src/uds/core/workers/PublicationCleaner.py=utf-8
encoding//src/uds/core/workers/ServiceCacheUpdater.py=utf-8
encoding//src/uds/core/workers/StatsCollector.py=utf-8
encoding//src/uds/core/workers/UserServiceCleaner.py=utf-8
encoding//src/uds/dispatchers/__init__.py=utf-8
encoding//src/uds/dispatchers/pam/urls.py=utf-8
@ -110,6 +116,7 @@ encoding//src/uds/migrations/0005_auto__add_field_config_crypt.py=utf-8
encoding//src/uds/migrations/0008_auto__add_userservicelog__add_field_userservice_src_hostname__add_fiel.py=utf-8
encoding//src/uds/migrations/0009_auto__del_userservicelog__add_log.py=utf-8
encoding//src/uds/migrations/0010_auto__add_field_log_owner_type.py=utf-8
encoding//src/uds/migrations/0011_auto__add_statscounters__add_statsevents__chg_field_log_created__chg_f.py=utf-8
encoding//src/uds/models.py=utf-8
encoding//src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py=utf-8
encoding//src/uds/osmanagers/LinuxOsManager/__init__.py=utf-8
@ -194,6 +201,8 @@ encoding//src/uds/xmlrpc/services/Publications.py=utf-8
encoding//src/uds/xmlrpc/services/ServiceProviders.py=utf-8
encoding//src/uds/xmlrpc/services/Services.py=utf-8
encoding//src/uds/xmlrpc/services/UserDeployedServices.py=utf-8
encoding//src/uds/xmlrpc/stats/__init__.py=utf-8
encoding//src/uds/xmlrpc/stats/stats.py=utf-8
encoding//src/uds/xmlrpc/tools/Cache.py=utf-8
encoding//src/uds/xmlrpc/tools/Config.py=utf-8
encoding//src/uds/xmlrpc/transports/Networks.py=utf-8

View File

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''

View File

@ -0,0 +1,207 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from uds.models import Provider
from uds.models import Service
import logging
logger = logging.getLogger(__name__)
class StatsManager(object):
'''
Manager for loggins statistics, so we can provide usefull info about platform usage
Right now, we are going to provide an interface to "counter stats", that is, statistics
that has counters (such as how many users is at a time active at platform, how many services
are assigned, are in use, in cache, etc...
'''
_manager = None
def __init__(self):
pass
@staticmethod
def manager():
if StatsManager._manager == None:
StatsManager._manager = StatsManager()
return StatsManager._manager
# Counter stats
def addCounter(self, owner_type, owner_id, counterType, counterValue, stamp = None):
'''
Adds a new counter stats to database.
Args:
toWhat: if of the counter
counterType: The type of counter that will receive the value (i.e. STORAGE_COUNTER_TYPE, LOAD_COUNTER_TYPE
counterValue: Counter to store. Right now, this must be an integer value (-2G ~ 2G)
stamp: if not None, this will be used as date for cuounter, else current date/time will be get
(this has a granurality of seconds)
Returns:
Nothing
'''
from uds.models import getSqlDatetime, StatsCounters
import time
if stamp is None:
stamp = getSqlDatetime()
# To Unix epoch
stamp = int(time.mktime(stamp.timetuple()))
try:
StatsCounters.objects.create(owner_type=owner_type, owner_id=owner_id, counter_type=counterType, value=counterValue, stamp=stamp)
return True
except:
logger.error('Exception handling stats saving (maybe database is full?)')
return False
def removeCounters(self, fromWat):
'''
Removes counters from item
Args:
fromWhat: if of the counter
counter: Counter to store. Right now, this must be an integer value (-2G ~ 2G)
stamp: if not None, this will be used as date for cuounter, else current date/time will be get
(this has a granurality of seconds)
Returns:
Nothing
'''
pass
def getCounters(self, ownerType, counterType, ownerIds, since, to, limit, use_max = False):
'''
Retrieves counters from item
Args:
counterTye: Type of counter to get values
counterId: (optional), if specified, limit counter to only this id, all ids for specidied type if not
maxElements: (optional) Maximum number of elements to retrieve, all if nothing specified
from: date from what to obtain counters. Unlimited if not specified
to: date until obtain counters. Unlimited if not specified
Returns:
Iterator, containing (date, counter) each element
'''
from uds.models import StatsCounters
import time
# To Unix epoch
since = int(time.mktime(since.timetuple()))
to = int(time.mktime(to.timetuple()))
return StatsCounters.get_grouped(ownerType, counterType, owner_id = ownerIds, since = since, to = to, limit = limit, use_max = use_max)
def cleanupCounter(self):
'''
Removes all counters previous to configured max keep time for stat information from database.
'''
pass
# Event stats
# Counter stats
def addEvent(self, toWhat, stamp = None):
'''
Adds a new counter stat to database.
Args:
toWhat: if of the counter
counter: Counter to store. Right now, this must be an integer value (-2G ~ 2G)
stamp: if not None, this will be used as date for cuounter, else current date/time will be get
(this has a granurality of seconds)
Returns:
Nothing
'''
pass
def removeEvents(self, fromWhat):
'''
Removes counters from item
Args:
toWhat: if of the counter
counter: Counter to store. Right now, this must be an integer value (-2G ~ 2G)
stamp: if not None, this will be used as date for cuounter, else current date/time will be get
(this has a granurality of seconds)
Returns:
Nothing
'''
pass
def getEvents(self, fromWhat, **kwargs):
'''
Retrieves counters from item
Args:
fromWhat: From what object to get counters
maxElements: (optional) Maximum number of elements to retrieve
Returns:
Array of lists, containing (date, counter)
'''
def cleanupEvents(self):
'''
Removes all counters previous to configured max keep time for stat information from database.
'''
pass

View File

@ -82,6 +82,7 @@ class TaskManager(object):
from uds.core.workers.PublicationCleaner import PublicationInfoItemsCleaner, PublicationCleaner
from uds.core.workers.CacheCleaner import CacheCleaner
from uds.core.workers.DeployedServiceCleaner import DeployedServiceInfoItemsCleaner, DeployedServiceRemover
from uds.core.workers.StatsCollector import DeployedServiceStatsCollector
logger.info("Registering sheduled tasks")
TaskManager.registerJob('Service Cache Updater', ServiceCacheUpdater)
@ -92,7 +93,7 @@ class TaskManager(object):
TaskManager.registerJob('Utility Cache Cleaner', CacheCleaner)
TaskManager.registerJob('Deployed Service Info Cleaner', DeployedServiceInfoItemsCleaner)
TaskManager.registerJob('Deployed Service Cleaner', DeployedServiceRemover)
TaskManager.registerJob('Deployed Service Stats', DeployedServiceStatsCollector)
@staticmethod

View File

@ -102,6 +102,7 @@ class UserServiceOpChecker(DelayedTask):
else:
# Canceled,
userService.setState(State.CANCELED)
userServiceInstance.osmanager().release(userService)
userService.updateData(userServiceInstance)
elif State.isErrored(state):
checkLater = False
@ -228,12 +229,12 @@ class UserServiceManager(object):
@transaction.commit_on_success
def createCacheFor(self, deployedService, cacheLevel):
def createCacheFor(self, deployedServicePublication, cacheLevel):
'''
Creates a new cache for the deployed service publication at level indicated
'''
logger.debug('Creating a new cache element at level {0} for publication {1}'.format(cacheLevel, deployedService))
cache = self.__createCacheAtDb(deployedService, cacheLevel)
logger.debug('Creating a new cache element at level {0} for publication {1}'.format(cacheLevel, deployedServicePublication))
cache = self.__createCacheAtDb(deployedServicePublication, cacheLevel)
ci = cache.getInstance()
state = ci.deployForCache(cacheLevel)

View File

@ -50,3 +50,7 @@ def downloadsManager():
def logManager():
from LogManager import LogManager
return LogManager.manager()
def statsManager():
from StatsManager import StatsManager
return StatsManager.manager()

View File

@ -168,25 +168,25 @@ class GlobalConfig:
'''
SESSION_EXPIRE_TIME = Config.section(GLOBAL_SECTION).value('sessionExpireTime', '24') # Max session duration (in use) after a new publishment has been made
# Delay between cache checks. reducing this number will increase cache generation speed but also will load service providers
CACHE_CHECK_DELAY = Config.section(GLOBAL_SECTION).value('cacheCheckDelay', '20')
CACHE_CHECK_DELAY = Config.section(GLOBAL_SECTION).value('cacheCheckDelay', '19')
# Delayed task number of threads PER SERVER, with higher number of threads, deplayed task will complete sooner, but it will give more load to overall system
DELAYED_TASKS_THREADS = Config.section(GLOBAL_SECTION).value('delayedTasksThreads', '2')
# Number of scheduler threads running PER SERVER, with higher number of threads, deplayed task will complete sooner, but it will give more load to overall system
SCHEDULER_THREADS = Config.section(GLOBAL_SECTION).value('schedulerThreads', '2')
# Waiting time before removing "errored" and "removed" publications, cache, and user assigned machines. Time is in seconds
CLEANUP_CHECK = Config.section(GLOBAL_SECTION).value('cleanupCheck', '3600')
CLEANUP_CHECK = Config.section(GLOBAL_SECTION).value('cleanupCheck', '3607')
# Time to maintaing "info state" items before removing it, in seconds
KEEP_INFO_TIME = Config.section(GLOBAL_SECTION).value('keepInfoTime', '14400') # Defaults to 2 days 172800?? better 4 hours xd
KEEP_INFO_TIME = Config.section(GLOBAL_SECTION).value('keepInfoTime', '14401') # Defaults to 2 days 172800?? better 4 hours xd
# Max number of services to be "preparing" at same time
MAX_PREPARING_SERVICES = Config.section(GLOBAL_SECTION).value('maxPreparingServices', '15') # Defaults to 15 services at once (per service provider)
# Max number of service to be at "removal" state at same time
MAX_REMOVING_SERVICES = Config.section(GLOBAL_SECTION).value('maxRemovinggServices', '15') # Defaults to 15 services at once (per service provider)
MAX_REMOVING_SERVICES = Config.section(GLOBAL_SECTION).value('maxRemovingServices', '15') # Defaults to 15 services at once (per service provider)
# If we ignore limits (max....)
IGNORE_LIMITS = Config.section(GLOBAL_SECTION).value('ignoreLimits', '0')
# Number of services to initiate removal per run of CacheCleaner
USER_SERVICE_CLEAN_NUMBER = Config.section(GLOBAL_SECTION).value('userServiceCleanNumber', '3') # Defaults to 3 per wun
# Removal Check time for cache, publications and deployed services
REMOVAL_CHECK = Config.section(GLOBAL_SECTION).value('removalCheck', '30') # Defaults to 30 seconds
REMOVAL_CHECK = Config.section(GLOBAL_SECTION).value('removalCheck', '31') # Defaults to 30 seconds
# Login URL
LOGIN_URL = Config.section(GLOBAL_SECTION).value('loginUrl', '/login') # Defaults to /login
# Session duration
@ -199,7 +199,7 @@ class GlobalConfig:
ADMIN_IDLE_TIME = Config.section(GLOBAL_SECTION).value('adminIdleTime', '14400') # Defaults to 4 hous
# Time betwen checks of unused services by os managers
# Unused services will be invoked for every machine assigned but not in use AND that has been assigned at least 1/2 of this time
CHECK_UNUSED_TIME = Config.section(GLOBAL_SECTION).value('checkUnusedTime', '600') # Defaults to 10 minutes
CHECK_UNUSED_TIME = Config.section(GLOBAL_SECTION).value('checkUnusedTime', '631') # Defaults to 10 minutes
# Default CSS Used
CSS = Config.section(GLOBAL_SECTION).value('css', settings.STATIC_URL + 'css/uds.css')
# Max logins before blocking an account
@ -220,6 +220,9 @@ class GlobalConfig:
# Maximum logs per user service
MAX_LOGS_PER_ELEMENT = Config.section(GLOBAL_SECTION).value('maxLogPerElement', '100')
# Time to restrain a deployed service in case it gives some error at some point
RESTRAINT_TIME = Config.section(GLOBAL_SECTION).value('restrainTime', '600')
initDone = False
@staticmethod
@ -250,6 +253,7 @@ class GlobalConfig:
GlobalConfig.MAX_INITIALIZING_TIME.get()
GlobalConfig.CUSTOM_HTML_LOGIN.get()
GlobalConfig.MAX_LOGS_PER_ELEMENT.get()
GlobalConfig.RESTRAINT_TIME.get()
except:
logger.debug('Config table do not exists!!!, maybe we are installing? :-)')

View File

@ -36,6 +36,8 @@ import logging
logger = logging.getLogger(__name__)
MAX_SEQ = 1000000000000000
class UniqueIDGenerator(object):
def __init__(self, typeName, owner, baseName = 'uds'):
@ -45,10 +47,10 @@ class UniqueIDGenerator(object):
def setBaseName(self, newBaseName):
self._baseName = newBaseName
def __filter(self, rangeStart):
return dbUniqueId.objects.filter( basename = self._baseName, seq__gte=rangeStart )
def __filter(self, rangeStart, rangeEnd=MAX_SEQ):
return dbUniqueId.objects.filter( basename = self._baseName, seq__gte=rangeStart, seq__lte=rangeEnd )
def get(self, rangeStart=0, rangeEnd=1000000000):
def get(self, rangeStart=0, rangeEnd=MAX_SEQ):
'''
Tries to generate a new unique id in the range provided. This unique id
is global to "unique ids' database
@ -56,7 +58,7 @@ class UniqueIDGenerator(object):
# First look for a name in the range defined
try:
dbUniqueId.objects.lock()
flt = self.__filter(rangeStart)
flt = self.__filter(rangeStart, rangeEnd)
try:
item = flt.filter(assigned=False)[0]
dbUniqueId.objects.filter(id=item.id).update( owner = self._owner, assigned = True )
@ -69,7 +71,7 @@ class UniqueIDGenerator(object):
seq = rangeStart
logger.debug('Found seq {0}'.format(seq))
if seq > rangeEnd:
return None # No ids free in range
return -1 # No ids free in range
dbUniqueId.objects.create( owner = self._owner, basename = self._baseName, seq = seq, assigned = True)
return seq
except Exception:

View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import counters
counters._initializeData()

View File

@ -0,0 +1,121 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import datetime
import cairo
import pycha.line
import StringIO
import time
from uds.models import getSqlDatetime
import counters
# Chart types
CHART_TYPE_LINE, CHART_TYPE_AREA, CHART_TYPE_BAR = xrange(3)
__typeTitles = None
def make(obj, counterType, **kwargs):
width, height = (kwargs.get('width', 800), kwargs.get('height', 600))
since = kwargs.get('since', None)
to = kwargs.get('to', None)
if since is None and to is None:
interval = kwargs.get('interval', None)
if interval is not None:
to = getSqlDatetime()
since = to - datetime.timedelta(days=interval)
limit = width
dataset1 = tuple((int(time.mktime(x[0].timetuple())), x[1]) for x in counters.getCounters(obj, counterType, since=since, to=to, limit=limit, use_max = kwargs.get('use_max', False)))
if len(dataset1) == 0:
dataset1 = ( (getSqlDatetime(True)-3600, 0), (getSqlDatetime(True), 0) )
firstLast = (dataset1[0][0], getSqlDatetime(True))
xLabelFormat = '%y-%m-%d'
diffInterval = firstLast[1] - firstLast[0]
if diffInterval <= 60*60*24: # Less than one day
xLabelFormat = '%H:%M'
elif diffInterval <= 60*60*24*7:
xLabelFormat = '%A'
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
dataset = ( ( counters.getCounterTitle(counterType).encode('iso-8859-1', errors='ignore'), dataset1 ),)
options = {
'axis': {
'x': {
'ticks': [dict(v=i, label=datetime.datetime.fromtimestamp(i).strftime(xLabelFormat)) for i in firstLast],
'range': (firstLast[0], firstLast[1])
},
'y': {
'tickCount': 4,
}
},
'legend': {'hide': True},
'background': {
'chartColor': '#ffeeff',
'baseColor': '#ffffff',
'lineColor': '#444444'
},
'colorScheme': {
'name': 'gradient',
'args': {
'initialColor': 'red',
},
},
'legend': {
'hide': True,
},
'padding': {
'left': 0,
'bottom': 0,
},
'title': 'Sample Chart'
}
chart = pycha.line.LineChart(surface, options)
chart.addDataset(dataset)
chart.render()
output = StringIO.StringIO()
surface.write_to_png(output)
return output.getvalue()

View File

@ -0,0 +1,208 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from uds.models import NEVER
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from django.utils.translation import ugettext_lazy as _
from uds.core.managers import statsManager
import datetime
import logging
logger = logging.getLogger(__name__)
# Posible counters, note that not all are used by every posible type
# FIRST_COUNTER_TYPE, LAST_COUNTER_TYPE are just a placeholder for sanity checks
(
CT_LOAD, CT_STORAGE, CT_ASSIGNED, CT_INUSE,
) = xrange(4)
__caRead = None
__caWrite = None
__transDict = None
__typeTitles = None
def addCounter(obj, counterType, counterValue, stamp = None):
'''
Adds a counter stat to specified object
Although any counter type can be added to any object, there is a relation that must be observed
or, otherway, the stats will not be recoverable at all:
note: Runtime checks are done so if we try to insert an unssuported stat, this won't be inserted and it will be logged
'''
if type(obj) not in __caWrite.get(counterType, ()):
logger.error('Type {0} does not accepts counter of type {1}',format(type(obj), counterValue))
return False
return statsManager().addCounter(__transDict[type(obj)], obj.id, counterType, counterValue, stamp)
def getCounters(obj, counterType, **kwargs):
'''
Get counters
Args:
obj: Obj for which to recover stats counters
counterType: type of counter to recover
since: (optional, defaults to 'Since beginning') Start date for counters to recover
to: (optional, defaults to 'Until end') En date for counter to recover
limit: (optional, defaults to 1000) Number of counter to recover. This is an 'At most' advice. The returned number of value
can be lower, or even 1 more than requested due to a division for retrieving object at database
all: (optinal), indicates that get all counters for the type of obj passed in, not only for that obj.
Returns:
A generator, that contains pairs of (stamp, value) tuples
'''
since = kwargs.get('since', NEVER)
to = kwargs.get('to', datetime.datetime.now())
limit = kwargs.get('limit', 1000)
use_max = kwargs.get('use_max', False)
readFncTbl = __caRead.get(type(obj), None)
if readFncTbl is None:
logger.error('Type {0} has no registered stats'.format(type(obj)))
return
fnc = readFncTbl.get(counterType, None)
if fnc is None:
logger.error('Type {0} has no registerd stats of type {1}'.format(type(obj), counterType))
return
if kwargs.get('all', None) is not True:
owner_ids = fnc(obj)
else:
owner_ids = None
for i in statsManager().getCounters(__transDict[type(obj)], counterType, owner_ids, since, to, limit, use_max):
val = (datetime.datetime.fromtimestamp(i.stamp), i.value)
yield val
def getCounterTitle(counterType):
return __typeTitles.get(counterType, '').title()
# Data initialization
def _initializeData():
'''
Initializes dictionaries.
Hides data from global var space
'''
from uds.models import Provider, Service, DeployedService
global __caWrite
global __caRead
global __transDict
global __typeTitles
__caWrite = {
CT_LOAD: (Provider,),
CT_STORAGE: (Service,),
CT_ASSIGNED: (DeployedService,),
CT_INUSE: (DeployedService,),
}
# OBtain ids from variups type of object to retrieve stats
def get_Id(obj):
return obj.id
def get_P_S_Ids(provider):
return (i.id for i in provider.services.all())
def get_S_DS_Ids(service):
return (i.id for i in service.deployedServices.all())
def get_P_S_DS_Ids(provider):
res = ()
for i in provider.services.all():
res += get_S_DS_Ids(i)
return res
__caRead = {
Provider: {
CT_LOAD: get_Id,
CT_STORAGE: get_P_S_Ids,
CT_ASSIGNED: get_P_S_DS_Ids,
CT_INUSE: get_P_S_DS_Ids
},
Service: {
CT_STORAGE: get_Id,
CT_ASSIGNED: get_S_DS_Ids,
CT_INUSE: get_S_DS_Ids
},
DeployedService: {
CT_ASSIGNED: get_Id,
CT_INUSE: get_Id
}
}
def _getIds(obj):
to = type(obj)
if to is DeployedService:
return to.id;
if to is Service:
return (i.id for i in obj.userServices.all())
res = ()
if to is Provider:
for i in obj.services.all():
res += _getIds(i)
return res
return ()
OT_PROVIDER, OT_SERVICE, OT_DEPLOYED = xrange(3)
# Dict to convert objects to owner types
# Dict for translations
__transDict = {
DeployedService : OT_DEPLOYED,
Service : OT_SERVICE,
Provider : OT_PROVIDER
}
# Titles of types
__typeTitles = {
CT_ASSIGNED: _('Assigned'),
CT_INUSE: _('In use'),
CT_LOAD: _('Load'),
CT_STORAGE: _('Storage')
}

View File

@ -52,7 +52,8 @@ class ServiceCacheUpdater(Job):
if cache is not needed.
This is included as a scheduled task that will run every X seconds, and scheduler will keep it so it will be only executed by one backend at a time
'''
frecuency = GlobalConfig.CACHE_CHECK_DELAY.getInt() # Request run cache manager every configured seconds. If config value is changed, it will be used at next reload
frecuency = GlobalConfig.CACHE_CHECK_DELAY.getInt() # Request run cache manager every configured seconds (defaults to 20 seconds).
# If config value is changed, it will be used at next reload
def __init__(self, environment):
super(ServiceCacheUpdater,self).__init__(environment)
@ -84,6 +85,10 @@ class ServiceCacheUpdater(Job):
logger.debug('Stopped cache generation for deployed service with publication running: {0}'.format(ds))
continue
if ds.isRestrained():
logger.info('Deployed service {0} is restrained, will check this later'.format(ds.name))
continue
# Get data related to actual state of cache
inCacheL1 = ds.cachedUserServices().filter(UserServiceManager.getCacheStateFilter(services.UserDeployment.L1_CACHE)).count()
inCacheL2 = ds.cachedUserServices().filter(UserServiceManager.getCacheStateFilter(services.UserDeployment.L2_CACHE)).count()
@ -174,6 +179,8 @@ class ServiceCacheUpdater(Job):
except MaxServicesReachedException as e:
logger.error(str(e))
# TODO: When alerts are ready, notify this
except:
logger.exception('Exception')
@transaction.autocommit
def growL2Cache(self, ds, cacheL1, cacheL2, assigned):

View File

@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from uds.models import DeployedService
from uds.core.util.State import State
from uds.core.util.stats import counters
from uds.core.jobs.Job import Job
import logging
logger = logging.getLogger(__name__)
class DeployedServiceStatsCollector(Job):
frecuency = 599 # Once every ten minutes, 601 is prime
def __init__(self, environment):
super(DeployedServiceStatsCollector,self).__init__(environment)
def run(self):
logger.debug('Starting Deployed service stats collector')
for ds in DeployedService.objects.filter(state = State.ACTIVE):
try:
fltr = ds.assignedUserServices().exclude(state__in=State.INFO_STATES)
assigned = fltr.count()
inUse = fltr.filter(in_use=True).count()
counters.addCounter(ds, counters.CT_ASSIGNED, assigned)
counters.addCounter(ds, counters.CT_INUSE, inUse)
except:
logger.exception('Getting counters for deployed service {0}'.format(ds))
logger.debug('Done Deployed service stats collector')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,287 @@
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'StatsCounters'
db.create_table('uds_stats_c', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('owner_id', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
('owner_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0, db_index=True)),
('counter_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0, db_index=True)),
('stamp', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
('value', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
))
db.send_create_signal('uds', ['StatsCounters'])
# Adding model 'StatsEvents'
db.create_table('uds_stats_e', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('owner_id', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
('owner_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0, db_index=True)),
('event_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0, db_index=True)),
('stamp', self.gf('django.db.models.fields.IntegerField')(default=0, db_index=True)),
))
db.send_create_signal('uds', ['StatsEvents'])
# Adding index on 'UserService', fields ['state_date']
db.create_index('uds__user_service', ['state_date'])
# Changing field 'Log.created'
db.alter_column('uds_log', 'created', self.gf('django.db.models.fields.DateTimeField')())
# Changing field 'Log.owner_type'
db.alter_column('uds_log', 'owner_type', self.gf('django.db.models.fields.SmallIntegerField')())
# Adding index on 'Config', fields ['section']
db.create_index('uds_configuration', ['section'])
# Adding index on 'Config', fields ['key']
db.create_index('uds_configuration', ['key'])
from uds.models import Config
try:
Config.objects.get(section='UDS', key='maxRemovinggServices').delete()
except:
pass
def backwards(self, orm):
# Removing index on 'Config', fields ['key']
db.delete_index('uds_configuration', ['key'])
# Removing index on 'Config', fields ['section']
db.delete_index('uds_configuration', ['section'])
# Removing index on 'UserService', fields ['state_date']
db.delete_index('uds__user_service', ['state_date'])
# Deleting model 'StatsCounters'
db.delete_table('uds_stats_c')
# Deleting model 'StatsEvents'
db.delete_table('uds_stats_e')
# Changing field 'Log.created'
db.alter_column('uds_log', 'created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
# Changing field 'Log.owner_type'
db.alter_column('uds_log', 'owner_type', self.gf('django.db.models.fields.IntegerField')())
models = {
'uds.authenticator': {
'Meta': {'ordering': "('name',)", 'object_name': 'Authenticator'},
'comments': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data_type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
'priority': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
},
'uds.cache': {
'Meta': {'object_name': 'Cache', 'db_table': "'uds_utility_cache'"},
'created': ('django.db.models.fields.DateTimeField', [], {}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}),
'owner': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
'validity': ('django.db.models.fields.IntegerField', [], {'default': '60'}),
'value': ('django.db.models.fields.TextField', [], {'default': "''"})
},
'uds.config': {
'Meta': {'unique_together': "(('section', 'key'),)", 'object_name': 'Config', 'db_table': "'uds_configuration'"},
'crypt': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
'long': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'section': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
'value': ('django.db.models.fields.TextField', [], {'default': "''"})
},
'uds.delayedtask': {
'Meta': {'object_name': 'DelayedTask'},
'execution_delay': ('django.db.models.fields.PositiveIntegerField', [], {}),
'execution_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'insert_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'instance': ('django.db.models.fields.TextField', [], {}),
'tag': ('django.db.models.fields.CharField', [], {'max_length': '64', 'db_index': 'True'}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '128'})
},
'uds.deployedservice': {
'Meta': {'object_name': 'DeployedService', 'db_table': "'uds__deployed_service'"},
'assignedGroups': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'deployedServices'", 'symmetrical': 'False', 'db_table': "'uds__ds_grps'", 'to': "orm['uds.Group']"}),
'cache_l1_srvs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'cache_l2_srvs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'comments': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}),
'current_pub_revision': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'initial_srvs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'max_srvs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128'}),
'osmanager': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deployedServices'", 'null': 'True', 'to': "orm['uds.OSManager']"}),
'service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deployedServices'", 'null': 'True', 'to': "orm['uds.Service']"}),
'state': ('django.db.models.fields.CharField', [], {'default': "'A'", 'max_length': '1', 'db_index': 'True'}),
'state_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1972, 7, 1, 0, 0)'}),
'transports': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'deployedServices'", 'symmetrical': 'False', 'db_table': "'uds__ds_trans'", 'to': "orm['uds.Transport']"})
},
'uds.deployedservicepublication': {
'Meta': {'ordering': "('publish_date',)", 'object_name': 'DeployedServicePublication', 'db_table': "'uds__deployed_service_pub'"},
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'deployed_service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publications'", 'to': "orm['uds.DeployedService']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'publish_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
'revision': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'P'", 'max_length': '1', 'db_index': 'True'}),
'state_date': ('django.db.models.fields.DateTimeField', [], {})
},
'uds.group': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('manager', 'name'),)", 'object_name': 'Group'},
'comments': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'manager': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'groups'", 'to': "orm['uds.Authenticator']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'A'", 'max_length': '1', 'db_index': 'True'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'groups'", 'symmetrical': 'False', 'to': "orm['uds.User']"})
},
'uds.log': {
'Meta': {'object_name': 'Log'},
'created': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
'data': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'owner_id': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'owner_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'source': ('django.db.models.fields.CharField', [], {'default': "'internal'", 'max_length': '16', 'db_index': 'True'})
},
'uds.network': {
'Meta': {'object_name': 'Network'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
'net_end': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
'net_start': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
'transports': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'networks'", 'symmetrical': 'False', 'db_table': "'uds_net_trans'", 'to': "orm['uds.Transport']"})
},
'uds.osmanager': {
'Meta': {'ordering': "('name',)", 'object_name': 'OSManager'},
'comments': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data_type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
},
'uds.provider': {
'Meta': {'ordering': "('name',)", 'object_name': 'Provider'},
'comments': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data_type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
},
'uds.scheduler': {
'Meta': {'object_name': 'Scheduler'},
'frecuency': ('django.db.models.fields.PositiveIntegerField', [], {'default': '86400'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_execution': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
'next_execution': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1972, 7, 1, 0, 0)', 'db_index': 'True'}),
'owner_server': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64', 'db_index': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'X'", 'max_length': '1', 'db_index': 'True'})
},
'uds.service': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('provider', 'name'),)", 'object_name': 'Service'},
'comments': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data_type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'services'", 'to': "orm['uds.Provider']"})
},
'uds.statscounters': {
'Meta': {'object_name': 'StatsCounters', 'db_table': "'uds_stats_c'"},
'counter_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'owner_id': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'owner_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'stamp': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'value': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
},
'uds.statsevents': {
'Meta': {'object_name': 'StatsEvents', 'db_table': "'uds_stats_e'"},
'event_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'owner_id': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'owner_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'stamp': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
},
'uds.storage': {
'Meta': {'object_name': 'Storage'},
'attr1': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '64', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '64', 'primary_key': 'True'}),
'owner': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'})
},
'uds.transport': {
'Meta': {'ordering': "('name',)", 'object_name': 'Transport'},
'comments': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'data_type': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
'nets_positive': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'priority': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
},
'uds.uniqueid': {
'Meta': {'ordering': "('-seq',)", 'unique_together': "(('basename', 'seq'),)", 'object_name': 'UniqueId'},
'assigned': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
'basename': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'owner': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'db_index': 'True'}),
'seq': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'})
},
'uds.user': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('manager', 'name'),)", 'object_name': 'User'},
'comments': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_access': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1972, 7, 1, 0, 0)'}),
'manager': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'users'", 'to': "orm['uds.Authenticator']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128'}),
'real_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'staff_member': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '1', 'db_index': 'True'})
},
'uds.userpreference': {
'Meta': {'object_name': 'UserPreference'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'module': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'preferences'", 'to': "orm['uds.User']"}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'})
},
'uds.userservice': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'UserService', 'db_table': "'uds__user_service'"},
'cache_level': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'default': "''"}),
'deployed_service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'userServices'", 'to': "orm['uds.DeployedService']"}),
'friendly_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'in_use': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'in_use_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1972, 7, 1, 0, 0)'}),
'os_state': ('django.db.models.fields.CharField', [], {'default': "'P'", 'max_length': '1'}),
'publication': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'userServices'", 'null': 'True', 'to': "orm['uds.DeployedServicePublication']"}),
'src_hostname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
'src_ip': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '15'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'P'", 'max_length': '1', 'db_index': 'True'}),
'state_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
'unique_id': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '128', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'userServices'", 'null': 'True', 'blank': 'True', 'to': "orm['uds.User']"})
}
}
complete_apps = ['uds']

View File

@ -35,20 +35,22 @@ from django.db import models
from django.db.models import signals
from uds.core.jobs.JobsFactory import JobsFactory
from uds.core.Environment import Environment
from uds.core.util.db.LockingManager import LockingManager
from uds.core.db.LockingManager import LockingManager
from uds.core.util.State import State
from uds.core.util import log
from uds.core.services.Exceptions import InvalidServiceException
from datetime import datetime, timedelta
from time import mktime
import logging
logger = logging.getLogger(__name__)
NEVER = datetime(1972, 7, 1)
NEVER_UNIX = int(mktime(NEVER.timetuple()))
def getSqlDatetime():
def getSqlDatetime(unix=False):
'''
Returns the current date/time of the database server.
@ -63,9 +65,14 @@ def getSqlDatetime():
cursor = con.cursor()
if con.vendor == 'mysql':
cursor.execute('SELECT NOW()')
return cursor.fetchone()[0]
return datetime.now() # If not know how to get database datetime, returns local datetime (this is fine for sqlite, which is local)
date = cursor.fetchone()[0]
else:
date = datetime.now() # If not know how to get database datetime, returns local datetime (this is fine for sqlite, which is local)
if unix:
return int(mktime(date.timetuple()))
else:
return date
# Services
@ -860,7 +867,34 @@ class DeployedService(models.Model):
getConnectionInfo without knowing if it is requested by a DeployedService or an UserService
'''
return [username, password]
def isRestrained(self):
'''
Maybe this deployed service is having problems, and that may block some task in some
situations.
To avoid this, we will use a "restrain" policy, where we restrain a deployed service for,
for example, create new cache elements is reduced.
The policy to check is that if a Deployed Service has 3 errors in the last 20 Minutes (by default), it is
considered restrained.
The time that a service is in restrain mode is 20 minutes by default (1200 secs), but it can be modified
at globalconfig variables
'''
from uds.core.util.Config import GlobalConfig
if GlobalConfig.RESTRAINT_TIME.getInt() <= 0:
return False # Do not perform any restraint check if we set the globalconfig to 0 (or less)
date = getSqlDatetime() - timedelta(seconds=GlobalConfig.RESTRAINT_TIME.getInt())
if self.userServices.filter(state=State.ERROR, state_date__gt=date).count() >= 3:
return True
return False
def setState(self, state, save = True):
'''
Updates the state of this object and, optionally, saves it
@ -1190,7 +1224,7 @@ class UserService(models.Model):
# We need to keep separated two differents os states so service operations (move beween caches, recover service) do not affects os manager state
state = models.CharField(max_length=1, default=State.PREPARING, db_index = True) # We set index so filters at cache level executes faster
os_state = models.CharField(max_length=1, default=State.PREPARING) # The valid values for this field are PREPARE and USABLE
state_date = models.DateTimeField(auto_now_add=True)
state_date = models.DateTimeField(auto_now_add=True, db_index = True)
creation_date = models.DateTimeField(db_index = True)
data = models.TextField(default='')
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name = 'userServices', null=True, blank=True, default = None)
@ -1376,7 +1410,7 @@ class UserService(models.Model):
return [username, password]
return ds.osmanager.getInstance().processUserPassword(self, username, password)
def setState(self, state):
'''
Updates the state of this object and, optionally, saves it
@ -1533,17 +1567,16 @@ signals.pre_delete.connect(UserService.beforeDelete, sender = UserService)
# Especific loggin information for an user service
class Log(models.Model):
'''
This class represents the log associated with an user service.
Log model associated with an object.
This log is mainly used to keep track of log infor relative to the service
(such as when a user access a machine,
of information related to
This log is mainly used to keep track of log relative to objects
(such as when a user access a machine, or information related to user logins/logout, errors, ...)
'''
owner_id = models.IntegerField(db_index=True, default=0)
owner_type = models.IntegerField(db_index=True, default=0)
owner_type = models.SmallIntegerField(db_index=True, default=0)
created = models.DateTimeField(auto_now_add=True, db_index=True)
created = models.DateTimeField(db_index=True)
source = models.CharField(max_length=16, default='internal', db_index=True)
level = models.PositiveSmallIntegerField(default=0, db_index=True)
data = models.CharField(max_length=255, default='')
@ -1557,7 +1590,124 @@ class Log(models.Model):
def __unicode__(self):
return "Log of {0}({1}): {2} - {3} - {4} - {5}".format(self.owner_type, self.owner_id, self.created, self.source, self.level, self.data)
return u"Log of {0}({1}): {2} - {3} - {4} - {5}".format(self.owner_type, self.owner_id, self.created, self.source, self.level, self.data)
class StatsCounters(models.Model):
'''
Counter statistocs mpdes the counter statistics
'''
owner_id = models.IntegerField(db_index=True, default=0)
owner_type = models.SmallIntegerField(db_index=True, default=0)
counter_type = models.SmallIntegerField(db_index=True, default=0)
stamp = models.IntegerField(db_index=True, default=0)
value = models.IntegerField(db_index=True, default=0)
class Meta:
'''
Meta class to declare db table
'''
db_table = 'uds_stats_c'
@staticmethod
def get_grouped(owner_type, counter_type, **kwargs):
'''
Returns the average stats grouped by interval for owner_type and owner_id (optional)
Note: if someone cant get this more optimized, please, contribute it!
'''
filt = 'owner_type'
if type(owner_type) in (list, tuple):
filt += ' in (' + ','.join((str(x) for x in owner_type)) + ')'
else:
filt += '='+str(owner_type)
owner_id = None
if kwargs.get('owner_id', None) is not None:
filt += ' AND OWNER_ID'
oid = kwargs['owner_id']
if type(oid) in (list, tuple):
filt += ' in (' + ','.join(str(x) for x in oid) + ')'
else:
filt += '='+str(oid)
filt += ' AND counter_type='+str(counter_type)
since = kwargs.get('since', None)
to = kwargs.get('to', None)
since = since and int(since) or NEVER_UNIX
to = to and int(to) or getSqlDatetime(True)
interval = 600 # By default, group items in ten minutes interval (600 seconds)
limit = kwargs.get('limit', None)
if limit is not None:
limit = int(limit)
elements = kwargs['limit']
# Protect for division a few lines below... :-)
if elements < 2:
elements = 2
if owner_id is None:
q = StatsCounters.objects.filter(stamp__gte=since, stamp__lte=to)
else:
q = StatsCounters.objects.filter(owner_id=owner_id, stamp__gte=since, stamp__lte=to)
if type(owner_type) in (list, tuple):
q = q.filter(owner_type__in=owner_type)
else:
q = q.filter(owner_type=owner_type)
if q.count() > elements:
first = q.order_by('stamp')[0].stamp
last = q.order_by('stamp').reverse()[0].stamp
interval = int((last-first)/(elements-1))
filt += ' AND stamp>={0} AND stamp<={1} GROUP BY CEIL(stamp/{2}) ORDER BY stamp'.format(
since, to, interval)
fnc = kwargs.get('use_max', False) and 'MAX' or 'AVG'
query = ('SELECT -1 as id,-1 as owner_id,-1 as owner_type,-1 as counter_type,stamp,'
'CEIL({0}(value)) AS value '
'FROM {1} WHERE {2}').format(fnc, StatsCounters._meta.db_table, filt)
logger.debug('Stats query: {0}'.format(query))
# We use result as an iterator
return StatsCounters.objects.raw(query)
def __unicode__(self):
return u"Log of {0}({1}): {2} - {3} - {4}".format(self.owner_type, self.owner_id, self.stamp, self.counter_type, self.value)
class StatsEvents(models.Model):
'''
Counter statistocs mpdes the counter statistics
'''
owner_id = models.IntegerField(db_index=True, default=0)
owner_type = models.SmallIntegerField(db_index=True, default=0)
event_type = models.SmallIntegerField(db_index=True, default=0)
stamp = models.IntegerField(db_index=True, default=0)
class Meta:
'''
Meta class to declare db table
'''
db_table = 'uds_stats_e'
def __unicode__(self):
return u"Log of {0}({1}): {2} - {3} - {4} - {5}".format(self.owner_type, self.owner_id, self.created, self.source, self.level, self.data)
# General utility models, such as a database cache (for caching remote content of slow connections to external services providers for example)
@ -1597,15 +1747,15 @@ class Cache(models.Model):
expired = "Expired"
else:
expired = "Active"
return "{0} {1} = {2} ({3})".format(self.owner, self.key, self.value, expired)
return u"{0} {1} = {2} ({3})".format(self.owner, self.key, self.value, expired)
class Config(models.Model):
'''
General configuration values model. Used to store global and specific modules configuration values.
This model is managed via uds.core.util.Config.Config class
'''
section = models.CharField(max_length=128)
key = models.CharField(max_length=64)
section = models.CharField(max_length=128, db_index=True)
key = models.CharField(max_length=64, db_index=True)
value = models.TextField(default = '')
crypt = models.BooleanField(default = False)
long = models.BooleanField(default = False)
@ -1618,7 +1768,7 @@ class Config(models.Model):
unique_together = (('section', 'key'),)
def __unicode__(self):
return "Config {0} = {1}".format(self.key, self.value)
return u"Config {0} = {1}".format(self.key, self.value)
class Storage(models.Model):
'''
@ -1633,7 +1783,7 @@ class Storage(models.Model):
objects = LockingManager()
def __unicode__(self):
return "{0} {1} = {2}, {3}".format(self.owner, self.key, self.data, str.join( '/', [self.attr1]))
return u"{0} {1} = {2}, {3}".format(self.owner, self.key, self.data, str.join( '/', [self.attr1]))
class UniqueId(models.Model):
'''
@ -1656,7 +1806,7 @@ class UniqueId(models.Model):
def __unicode__(self):
return "{0} {1}.{2}, assigned is {3}".format(self.owner, self.basename, self.seq, self.assigned)
return u"{0} {1}.{2}, assigned is {3}".format(self.owner, self.basename, self.seq, self.assigned)
class Scheduler(models.Model):
@ -1716,7 +1866,7 @@ class Scheduler(models.Model):
def __unicode__(self):
return "Scheduled task {0}, every {1}, last execution at {2}, state = {3}".format(self.name, self.frecuency, self.last_execution, self.state)
return u"Scheduled task {0}, every {1}, last execution at {2}, state = {3}".format(self.name, self.frecuency, self.last_execution, self.state)
# Connects a pre deletion signal to Scheduler
signals.pre_delete.connect(Scheduler.beforeDelete, sender = Scheduler)
@ -1742,7 +1892,7 @@ class DelayedTask(models.Model):
#objects = LockingManager()
def __unicode__(self):
return "Run Queue task {0} owned by {3},inserted at {1} and with {2} seconds delay".format(self.type, self.insert_date, self.execution_delay, self.owner_server)
return u"Run Queue task {0} owned by {3},inserted at {1} and with {2} seconds delay".format(self.type, self.insert_date, self.execution_delay, self.owner_server)
class Network(models.Model):
@ -1839,5 +1989,5 @@ class Network(models.Model):
self.save()
def __unicode__(self):
return 'Network {0} from {1} to {2}'.format(self.name, Network.longToIp(self.net_start), Network.longToIp(self.net_end))
return u'Network {0} from {1} to {2}'.format(self.name, Network.longToIp(self.net_start), Network.longToIp(self.net_end))

View File

@ -14,6 +14,9 @@ from uds.core.ui.UserInterface import gui
from uds.core.managers.CryptoManager import CryptoManager
from uds.core import osmanagers
from WindowsOsManager import WindowsOsManager, scrambleMsg
from uds.core.util import log
import dns.resolver
import ldap
import logging
@ -26,7 +29,7 @@ class WinDomainOsManager(WindowsOsManager):
iconFile = 'wosmanager.png'
# Apart form data from windows os manager, we need also domain and credentials
domain = gui.TextField(length=64, label = _('Domain'), order = 1, tooltip = _('Domain to join machines to (better use dns form of domain)'), required = True)
domain = gui.TextField(length=64, label = _('Domain'), order = 1, tooltip = _('Domain to join machines to (use FQDN form, netbios name not allowed)'), required = True)
account = gui.TextField(length=64, label = _('Account'), order = 2, tooltip = _('Account with rights to add machines to domain'), required = True)
password = gui.PasswordField(length=64, label = _('Password'), order = 3, tooltip = _('Password of the account'), required = True)
ou = gui.TextField(length=64, label = _('OU'), order = 4, tooltip = _('Organizational unit where to add machines in domain (check it before using it)'))
@ -37,11 +40,15 @@ class WinDomainOsManager(WindowsOsManager):
super(WinDomainOsManager, self).__init__(environment, values)
if values != None:
if values['domain'] == '':
raise osmanagers.OSManager.ValidationException(_('Must provide a domain!!!'))
raise osmanagers.OSManager.ValidationException(_('Must provide a domain!'))
if values['domain'].find('.') == -1:
raise osmanagers.OSManager.ValidationException(_('Must provide domain in FQDN'))
if values['account'] == '':
raise osmanagers.OSManager.ValidationException(_('Must provide an account to add machines to domain!!!'))
raise osmanagers.OSManager.ValidationException(_('Must provide an account to add machines to domain!'))
if values['account'].find('\\') != -1:
raise osmanagers.OSManager.ValidationException(_('DOM\\USER form is not allowed!'))
if values['password'] == '':
raise osmanagers.OSManager.ValidationException(_('Must provide a password for the account!!!'))
raise osmanagers.OSManager.ValidationException(_('Must provide a password for the account!'))
self._domain = values['domain']
self._ou = values['ou']
self._account = values['account']
@ -51,10 +58,134 @@ class WinDomainOsManager(WindowsOsManager):
self._ou = ""
self._account = ""
self._password = ""
self._ou = self._ou.replace(' ', '')
if self._domain != '' and self._ou != '':
lpath = 'dc=' + ',dc='.join(self._domain.split('.'))
if self._ou.find(lpath) == -1:
self._ou += ',' + lpath
def __getLdapError(self, e):
logger.debug('Ldap Error: {0} {1}'.format(e, e.message))
_str = ''
if type(e.message) == dict:
#_str += e.message.has_key('info') and e.message['info'] + ',' or ''
_str += e.message.has_key('desc') and e.message['desc'] or ''
else :
_str += str(e)
return _str
def __connectLdap(self):
'''
Tries to connect to LDAP
Raises an exception if not found:
dns.resolver.NXDOMAIN
ldap.LDAPError
'''
servers = reversed(sorted(dns.resolver.query('_ldap._tcp.'+self._domain, 'SRV'), key=lambda i: i.priority * 10000 + i.weight))
for server in servers:
_str = ''
try:
uri = "%s://%s:%d" % ('ldap', str(server.target)[:-1], server.port)
logger.debug('URI: {0}'.format(uri))
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) # Disable certificate check
l = ldap.initialize(uri=uri)
l.set_option(ldap.OPT_REFERRALS, 0)
l.network_timeout = l.timeout = 5
l.protocol_version = ldap.VERSION3
account = self._account
if account.find('@') is False:
account += '@' + self._domain
l.simple_bind_s(who = account, cred = self._password)
return l
except ldap.LDAPError as e:
_str = self.__getLdapError(e)
raise ldap.LDAPError(_str)
def release(self, service):
'''
service is a db user service object
'''
super(WinDomainOsManager,self).release(service)
# TODO: remove machine from active directory os, under ou or default location if not specified
try:
l = self.__connectLdap()
except dns.resolver.NXDOMAIN: # No domain found, log it and pass
logger.warn('Could not find _ldap._tcp.'+self._domain)
log.doLog(service, log.WARN, "Could not remove machine from domain (_ldap._tcp.{0} not found)".format(self._domain), log.OSMANAGER);
except ldap.LDAPError as e:
log.doLog(service, log.WARN, "Could not remove machine from domain (invalid credentials for {0})".format(self._account), log.OSMANAGER);
#_filter = '(&(objectClass=computer)(sAMAccountName=%s$))' % service.friendly_name
try:
# res = l.search_ext_s(base = self._ou, scope = ldap.SCOPE_SUBTREE,
# filterstr = _filter)[0]
l.delete('cn={0},{1}'.format(service.friendly_name, self._ou))
except:
logger.exception('Not found: ')
def check(self):
try:
l = self.__connectLdap()
except ldap.LDAPError as e:
return _('Check error: {0}').format(self.__getLdapError(e))
except dns.resolver.NXDOMAIN:
return [True, _('Could not find server parameters (_ldap._tcp.{0} can\'r be resolved)').format(self._domain)]
except Exception as e:
logger.exception('Exception ')
return [False, str(e)]
try:
r = l.search_st(self._ou, ldap.SCOPE_BASE)
except ldap.LDAPError as e:
return _('Check error: {0}').format(self.__getLdapError(e))
return _('Server check was successful')
@staticmethod
def test(env, data):
logger.debug('Test invoked')
try:
wd = WinDomainOsManager(env, data)
logger.debug(wd)
try:
l = wd.__connectLdap()
except ldap.LDAPError as e:
return [False, _('Could not access AD using LDAP ({0})').format(wd.__getLdapError(e))]
ou = wd._ou
if ou == '':
ou = 'cn=Computers,dc='+',dc='.join(wd._domain.split('.'))
logger.debug('Checking {0} with ou {1}'.format(wd._domain,ou))
r = l.search_st(ou, ldap.SCOPE_BASE)
logger.debug('Result of search: {0}'.format(r))
except ldap.LDAPError:
if wd._ou == '':
return [False, _('The default path {0} for computers was not found!!!').format(ou)]
else:
return [False, _('The ou path {0} was not found!!!').format(ou)]
except dns.resolver.NXDOMAIN:
return [True, _('Could not check parameters (_ldap._tcp.{0} can\'r be resolved)').format(wd._domain)]
except Exception as e:
logger.exception('Exception ')
return [False, str(e)]
return [True, _("All parameters seems to work fine.")]
def infoVal(self, service):
return 'domain:{0}\t{1}\t{2}\t{3}\t{4}'.format( self.getName(service), self._domain, self._ou, self._account, self._password)

View File

@ -67,6 +67,7 @@ class Client(object):
except:
cached_api_key = None
raise Exception("Can't connet to server at {0}".format(self._host))
return None
def __init__(self, host, username, password, timeout, cache):

View File

@ -36,6 +36,7 @@ from ..auths.AdminAuth import needs_credentials
from ..util.Exceptions import FindException
from uds.core.util import log
from uds.models import DeployedService
from uds.models import UserService
from uds.models import User
from uds.models import Authenticator
@ -44,13 +45,23 @@ import logging
logger = logging.getLogger(__name__)
@needs_credentials
def getDeployedServiceLogs(credentials, id):
try:
ds = DeployedService.objects.get(pk=id)
return log.getLogs(ds)
except:
logger.exception('Exception')
raise FindException(_('Deployed service does not exists'))
@needs_credentials
def getUserServiceLogs(credentials, id):
try:
us = UserService.objects.get(pk=id)
return log.getLogs(us)
except:
raise FindException(_('Service does not exists'))
raise FindException(_('User service does not exists'))
@needs_credentials
def getUserLogs(credentials, id):
@ -71,6 +82,7 @@ def getAuthLogs(credentials, id):
# Registers XML RPC Methods
def registerLogFunctions(dispatcher):
dispatcher.register_function(getDeployedServiceLogs, 'getDeployedServiceLogs')
dispatcher.register_function(getUserServiceLogs, 'getUserServiceLogs')
dispatcher.register_function(getUserLogs, 'getUserLogs')
dispatcher.register_function(getAuthLogs, 'getAuthLogs')

View File

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
from django.utils.translation import ugettext as _
from uds.models import DeployedService
from ..auths.AdminAuth import needs_credentials
from ..util.Exceptions import FindException
from uds.core.util.stats import counters
from uds.core.util.Cache import Cache
import cPickle
import time
import logging
logger = logging.getLogger(__name__)
cache = Cache('StatsDispatcher')
@needs_credentials
def getDeployedServiceCounters(credentials, id, counter_type, since, to, points, use_max):
try:
cacheKey = id + str(counter_type)+str(since)+str(to)+str(points)+str(use_max)
val = cache.get(cacheKey)
if val is None:
if id == '-1':
us = DeployedService()
all = True
else:
us = DeployedService.objects.get(pk=id)
all = False
val = []
for x in counters.getCounters(us, counter_type, since=since, to=to, limit=points, use_max=use_max, all=all):
val.append({ 'stamp': x[0], 'value': int(x[1]) })
if len(val) > 2:
cache.put(cacheKey, cPickle.dumps(val).encode('zip'), 3600)
else:
val = [{'stamp':since, 'value':0 }, {'stamp':to, 'value':0}]
else:
val = cPickle.loads(val.decode('zip'))
return { 'title': counters.getCounterTitle(counter_type), 'data': val }
except:
logger.exception('exception')
raise FindException(_('Service does not exists'))
# Registers XML RPC Methods
def registerStatsFunctions(dispatcher):
dispatcher.register_function(getDeployedServiceCounters, 'getDeployedServiceCounters')

View File

@ -58,10 +58,10 @@ def DuplicateEntryException(msg):
return Fault(DUPLICATE_FAIL, msg)
def InsertException(msg):
return Fault(FIND_FAIL, msg)
return Fault(INSERT_FAIL, msg)
def FindException(msg):
return Fault()
return Fault(FIND_FAIL, msg)
def DeleteException(msg):
return Fault(DELETE_FAIL, msg)

View File

@ -53,6 +53,7 @@ from auths.UserPreferences import registerPreferencesFunctions
from tools.Cache import registerCacheFunctions
from tools.Config import registerConfigurationFunctions
from log.logs import registerLogFunctions
from stats.stats import registerStatsFunctions
import logging
@ -144,3 +145,4 @@ registerPreferencesFunctions(dispatcher)
registerCacheFunctions(dispatcher)
registerConfigurationFunctions(dispatcher)
registerLogFunctions(dispatcher)
registerStatsFunctions(dispatcher)