77b65bea-e766-4e3c-a1ed-c4c2534b6019
true
D0001-SQL-11.sdt.local
jazz dev master
true
<ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll
Amazon.Lambda.S3Events
AWSSDK.Core
AWSSDK.S3
Amazon
Amazon.Auth.AccessControlPolicy
Amazon.Auth.AccessControlPolicy.ActionIdentifiers
Amazon.Internal
Amazon.Lambda.S3Events
Amazon.MissingTypes
Amazon.Runtime
Amazon.Runtime.CredentialManagement
Amazon.Runtime.CredentialManagement.Internal
Amazon.Runtime.EventStreams
Amazon.Runtime.EventStreams.Internal
Amazon.Runtime.Internal
Amazon.Runtime.Internal.Auth
Amazon.Runtime.Internal.Settings
Amazon.Runtime.Internal.Transform
Amazon.Runtime.Internal.Util
Amazon.Runtime.SharedInterfaces
Amazon.Runtime.SharedInterfaces.Internal
Amazon.S3
Amazon.S3.Encryption
Amazon.S3.Encryption.Internal
Amazon.S3.Internal
Amazon.S3.IO
Amazon.S3.Model
Amazon.S3.Model.Internal.MarshallTransformations
Amazon.S3.Transfer
Amazon.S3.Util
Amazon.Util
Amazon.Util.Internal
Amazon.Util.Internal.PlatformServices
Newtonsoft.Json
Newtonsoft.Json.Converters
Newtonsoft.Json.Linq
Newtonsoft.Json.Schema
Newtonsoft.Json.Serialization
System
System.ComponentModel.Composition
System.ComponentModel.Composition.Hosting
System.ComponentModel.Composition.Primitives
System.ComponentModel.Composition.ReflectionModel
System.Diagnostics
System.Diagnostics.Tracing
System.IO.Compression
System.Net.Http
System.Net.Http.Headers
System.Numerics
ThirdParty.BouncyCastle.Asn1
ThirdParty.BouncyCastle.Asn1.Utilities
ThirdParty.BouncyCastle.Math
ThirdParty.BouncyCastle.OpenSsl
ThirdParty.BouncyCastle.Utilities.IO.Pem
ThirdParty.Ionic.Zlib
ThirdParty.Json.LitJson
ThirdParty.MD5
System.Dynamic
var emptyGuid = Guid.Empty.ToString();
var dashboards = (from dashboard in DesktopTemplates
join module in SystemCenterModules on dashboard.ModuleGUID equals module.ModuleGUID
join solution in SystemCenterSolutions on module.SolutionGUID equals solution.SolutionGUID
where dashboard.IsLegacy == false && solution.IsStatusDisabled == false
select new
{
solution = solution.Name,
primarySort = solution.SortOrder,
module = module.Name,
categories = module.SystemCenterCategories
.Where(c => c.IsMaintenanceMode == true).OrderBy(c => c.SortOrder)
.Select(c => new { c.Name, SortOrder = c.SortOrder.ToString() }).ToList(),
secondarySort = module.SortOrder,
dashboard.DesktopTemplateGUID,
dashboard.Name,
dashboard.Description,
parameters = dashboard.DesktopParameters.Any()
? dashboard.DesktopParameters.Select(p => new
{
p.Name,
p.ColumnName,
p.DimensionName,
p.AttributeName,
p.DataSourceGUID,
ExcludedWidgetGuids = string.IsNullOrEmpty(p.ExcludedWidgetGuidsCSV) ? null : p.ExcludedWidgetGuidsCSV.Split(',')
}).Distinct().ToList()
: null,
// columns = dashboard.DesktopColumns.Any() ? dashboard.DesktopColumns.ToList() : null,
widgets = dashboard.DashboardWidgets.Any()
? dashboard.DashboardWidgets.Select(w => new
{
w.Name,
w.Row,
w.Col,
w.Height,
w.Width,
w.WidgetClassName,
DataSourceGUID = w.DataSourceGUID.ToString() == "00000000-0000-0000-0000-000000000000" ? "" : w.DataSourceGUID.ToString(),
WidgetJSON = (JsonConvert.DeserializeObject(w.WidgetJSON) as IDictionary)
})
.Select(w => new
{
w.Name,
w.Row,
w.Col,
w.Height,
w.Width,
w.WidgetClassName,
w.DataSourceGUID,
w.WidgetJSON,
ReportGuid = w.WidgetClassName == "Grid" || w.WidgetClassName == "Chart" ||
(w.WidgetClassName == "Metric" && w.WidgetJSON["ReportGuid"] != emptyGuid)
? w.WidgetJSON["ReportGuid"]
: null
})
.OrderBy(w => w.Row).ThenBy(w => w.Col).ToList()
: null,
desktop = dashboard.DesktopWidgets.Any()
? dashboard.DesktopWidgets.Select(w => new
{
w.Name,
w.Height,
w.DesktopTemplateGUID,
w.WidgetFullName,
w.WidgetXML
}).ToList()
: null
})
.OrderBy(x => x.primarySort).ThenBy(x => x.secondarySort).ThenBy(x => x.Name).ToList();
dashboards.Dump();
dashboards.Where(d => d.parameters != null).SelectMany(d => d.parameters)
.OrderBy(d => d.DimensionName).ThenBy(d => d.AttributeName).Dump();
dashboards.SelectMany(d => d.widgets.Where(w => w.WidgetClassName == "Report" || w.WidgetClassName == "Chart")
.Select(w => new {Dashboard = d.Name, Report = w.Name, w.Row, w.Col, w.Height, w.Width, w.WidgetClassName, w.DataSourceGUID, w.ReportGuid}))
.OrderBy(d => d.Dashboard).ThenBy(d => d.Report).Dump();
dashboards.SelectMany(d => d.widgets.Where(w => w.WidgetClassName == "Metric")
.Select(w => new { Dashboard = d.Name, Report = w.Name, w.Row, w.Col, w.Height, w.Width, w.WidgetClassName, w.DataSourceGUID, w.WidgetJSON }))
.OrderBy(d => d.Dashboard).ThenBy(d => d.Report).Dump();