diff --git a/XenAdmin/Controls/CustomDataGraph/GraphHelpers.cs b/XenAdmin/Controls/CustomDataGraph/GraphHelpers.cs index 2052df90a..e2fc91f8c 100644 --- a/XenAdmin/Controls/CustomDataGraph/GraphHelpers.cs +++ b/XenAdmin/Controls/CustomDataGraph/GraphHelpers.cs @@ -172,6 +172,9 @@ namespace XenAdmin.Controls.CustomDataGraph public static class DataSourceItemList { + private static Regex io_throughput_rw_regex = new Regex("^io_throughput_(read|write)_([a-f0-9]{8})$"); // old SR read/write datasources + private static Regex sr_rw_regex = new Regex("^(read|write)_([a-f0-9]{8})$"); // replacement SR read/write datasources + public static List BuildList(IXenObject xenObject, List dataSources) { List dataSourceItems = new List(); @@ -194,9 +197,6 @@ namespace XenAdmin.Controls.CustomDataGraph } // Filter old datasources only if we have their replacement ones - Regex io_throughput_rw_regex = new Regex("^io_throughput_(read|write)_([a-f0-9]{8})$"); // old datasources - Regex sr_rw_regex = new Regex("^(read|write)_([a-f0-9]{8})$"); // replacement datasources - if (dataSourceItems.Any(dsi => sr_rw_regex.IsMatch(dsi.DataSource.name_label))) { // Remove any old style data sources