private void GenerateDomainInformation()
        {
            AddBeginTable();
            AddHeaderText("Domain");
            AddHeaderText("Netbios Name");
            AddHeaderText("Domain Functional Level");
            AddHeaderText("Forest Functional Level");
            AddHeaderText("Creation date");
            AddHeaderText("Nb DC");
            AddHeaderText("Engine");
            AddHeaderText("Level");
            AddHeaderText("Schema version");
            AddBeginTableData();

            foreach (HealthcheckData data in Report)
            {
                AddBeginRow();
                AddPrintDomain(data.Domain);
                AddCellText(data.NetBIOSName);
                AddCellText(ReportHelper.DecodeDomainFunctionalLevel(data.DomainFunctionalLevel));
                AddCellText(ReportHelper.DecodeForestFunctionalLevel(data.ForestFunctionalLevel));
                AddCellDate(data.DomainCreation);
                AddCellNum(data.NumberOfDC);
                AddCellText(data.EngineVersion);
                AddCellText(data.Level.ToString());
                AddCellText(ReportHelper.GetSchemaVersion(data.SchemaVersion));
                AddEndRow();
            }
            AddEndTable(() =>
            {
                AddCellText("Total");
                AddCellNum(Report.Count);
            });

            AddBeginTable();
            AddHeaderText("Source");
            AddHeaderText("Name");
            AddHeaderText("OS");
            AddHeaderText("Creation");
            AddHeaderText("Startup time");
            AddHeaderText("IP");
            AddHeaderText("FSMO");
            AddBeginTableData();
            foreach (HealthcheckData data in Report)
            {
                foreach (var dc in data.DomainControllers)
                {
                    AddBeginRow();
                    AddPrintDomain(data.Domain);
                    AddCellText(dc.DCName);
                    AddCellText(dc.OperatingSystem);
                    AddCellDate(dc.CreationDate);
                    AddCellDate(dc.StartupTime);
                    AddCellText(dc.IP == null ? string.Empty : string.Join(",", dc.IP.ToArray()));
                    AddCellText(dc.FSMO == null ? string.Empty : string.Join(",", dc.FSMO.ToArray()));
                    AddEndRow();
                }
            }
            AddEndTable();
        }
Пример #2
0
        private void GenerateDomainInformation()
        {
            Add(@"
		<div class=""row"">
			<div class=""col-md-12 table-responsive"">
				<table class=""table table-striped table-bordered sortable-theme-bootstrap"" data-sortable="""">
					<thead><tr> 
						<th>Domain</th>
						<th>Netbios Name</th>
						<th>Domain Functional Level</th>
						<th>Forest Functional Level</th>
						<th>Creation date</th>
						<th>Nb DC</th>
						<th>Engine</th>
						<th>Level</th>
						<th>Schema version</th>
						</tr>
					</thead>
					<tbody>
");
            foreach (HealthcheckData data in Report)
            {
                Add(@"
						<tr>
							<td class='text'>"                            );
                Add(PrintDomain(data.Domain));
                Add(@"</td>
							<td class='text'>"                            );
                AddEncoded(data.NetBIOSName);
                Add(@"</td>
							<td class='text'>"                            );
                Add(ReportHelper.DecodeDomainFunctionalLevel(data.DomainFunctionalLevel));
                Add(@"</td>
							<td class='text'>"                            );
                Add(ReportHelper.DecodeForestFunctionalLevel(data.ForestFunctionalLevel));
                Add(@"</td>
							<td class='text'>"                            );
                Add(data.DomainCreation.ToString("u"));
                Add(@"</td>
							<td class='num'>"                            );
                Add(data.NumberOfDC);
                Add(@"</td>
							<td class='text'>"                            );
                Add(data.EngineVersion);
                Add(@"</td>
							<td class='text'>"                            );
                Add(data.Level.ToString());
                Add(@"</td>
							<td class='text'>"                            );
                Add(ReportHelper.GetSchemaVersion(data.SchemaVersion));
                Add(@"</td>
						</tr>"                        );
            }
            Add(@"
					</tbody>
					<tfoot>
						<tr>
							<td class='text'><b>Total</b></td>
							<td class='num'>"                             + Report.Count + @"</td>
						</tr>
					</tfoot>
				</table>
			</div>
		</div>
");
        }