Merge pull request #1276 from MihaelaStoica/CA-192747

CA-192747: Default name for the performance graphs
This commit is contained in:
mcintyre94 2016-11-10 17:32:10 +00:00 committed by GitHub
commit 34eb42802c
4 changed files with 21 additions and 0 deletions

View File

@ -724,6 +724,11 @@ namespace XenAdmin.Controls.CustomDataGraph
LoadDefaultGraphs();
}
public List<string> DisplayNames
{
get { return Graphs.ConvertAll(g => g.DisplayName); }
}
protected override void OnDrawToBuffer(PaintEventArgs paintEventArgs)
{
if (Plots.IndexInRange(SelectedGraphIndex))

View File

@ -37,6 +37,7 @@ using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
using XenAdmin.Controls.CustomDataGraph;
using XenAdmin.Core;
namespace XenAdmin.Dialogs
@ -70,6 +71,9 @@ namespace XenAdmin.Dialogs
if (isNew)
{
this.designedGraph = new DesignedGraph();
// Generate an unique suggested name for the graph
if (graphList != null)
this.designedGraph.DisplayName = Helpers.MakeUniqueName(Messages.GRAPH_NAME, graphList.DisplayNames);
base.Text = Messages.GRAPHS_NEW_TITLE;
}
else

View File

@ -16043,6 +16043,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Performance Graph.
/// </summary>
public static string GRAPH_NAME {
get {
return ResourceManager.GetString("GRAPH_NAME", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to To view memory data for this VM, you need to install [XenServer product] Tools.
/// </summary>

View File

@ -5658,6 +5658,9 @@ Note: Any custom color selections will remain unchanged</value>
<data name="GRAPH_LOADING" xml:space="preserve">
<value>Loading Data...</value>
</data>
<data name="GRAPH_NAME" xml:space="preserve">
<value>Performance Graph</value>
</data>
<data name="GRAPH_NEEDS_TOOLS" xml:space="preserve">
<value>To view memory data for this VM, you need to install [XenServer product] Tools</value>
</data>