This commit is contained in:
stevenernst131 2018-03-21 09:26:46 -07:00
Родитель ea86c88838
Коммит 6b790559f6
2 изменённых файлов: 93 добавлений и 22 удалений

Просмотреть файл

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Diagnostics.ModelsAndUtils
{
public class Rendering
{
public RenderingType RenderingType { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public Rendering()
{
RenderingType = RenderingType.TimeSeries;
}
public Rendering(RenderingType type)
{
RenderingType = type;
}
}
public class TableRendering : Rendering
{
public IEnumerable<string> DisplayColumnNames { get; set; }
public string GroupByColumnName { get; set; }
public TableRendering() : base(RenderingType.Table)
{
DisplayColumnNames = null;
GroupByColumnName = null;
}
}
public class TimeSeriesRendering : Rendering
{
public int DefaultValue { get; set; }
public TimeSeriesType GraphType { get; set; }
public string TimestampColumnName { get; set; }
public string RoleInstanceColumnName { get; set; }
public IEnumerable<string> SeriesColumns { get; set; }
public TimeSeriesRendering()
{
DefaultValue = 0;
GraphType = TimeSeriesType.LineGraph;
}
}
public class TimeSeriesPerInstanceRendering : Rendering
{
public TimeSeriesType GraphType { get; set; }
public string TimestampColumnName { get; set; }
public string RoleInstanceColumnName { get; set; }
public string CounterColumnName { get; set; }
public string ValueColumnName { get; set; }
public IEnumerable<string> InstanceFilter { get; set; }
public IEnumerable<string> CounterNameFilter { get; set; }
public string SelectedInstance { get; set; }
}
public enum RenderingType
{
NoGraph = 0,
Table,
TimeSeries,
TimeSeriesPerInstance,
PieChart
}
public enum TimeSeriesType
{
LineGraph = 0,
BarGraph,
StackedAreaGraph,
StackedBarGraph
}
}

Просмотреть файл

@ -29,26 +29,4 @@ namespace Diagnostics.ModelsAndUtils
RenderingProperties = new Rendering();
}
}
public class Rendering
{
public GraphType Type { get; set; }
public Rendering()
{
Type = GraphType.TimeSeries;
}
public Rendering(GraphType type)
{
Type = type;
}
}
public enum GraphType
{
NoGraph = 0,
Table,
TimeSeries
}
}