Skip to content

Commit

Permalink
Merge pull request #175 from gavsto/dev
Browse files Browse the repository at this point in the history
FIX: Domain Analyser + Added Documentation
  • Loading branch information
gavsto authored Nov 2, 2021
2 parents b909a0a + 5474c39 commit 088722e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions Documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ For full functionality, you'll need the following permissions for your Secure Ap
| DeviceManagementServiceConfig.ReadWrite.All | Delegated, Application | Read and write Microsoft Intune configuration |
| Directory.AccessAsUser.All | Delegated | Access directory as the signed in user |
| Directory.Read.All | Application | Read directory data |
| Domain.Read.All | Delegated | Read domain data |
| Group.Create | Application | Create groups |
| Group.Read.All | Application | Read all groups |
| Group.ReadWrite.All | Delegated, Application | Read and write all groups |
Expand Down
29 changes: 21 additions & 8 deletions js/datatables/datatablesDomainAnalyser.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,14 @@ $(document).ready(function () {
}
if (data === true) {
if (row.SPFPassAll === true) {
return '<h5><span class="badge bg-success">SPF Pass</span></h5>';
return '<h5><span class="badge bg-success">SPF Pass</span></h5>';
}
else
{
else {
return '<h5><span class="badge bg-danger">SPF Soft Fail</span></h5>';
}
}
if (data === false) {
return '<h5><span class="badge bg-danger">SPF Fail</span></h5>';
return '<h5><span class="badge bg-danger">SPF Fail</span></h5>';
} else {
return '<h5><span class="badge bg-secondary">No Data</span></h5>'
}
Expand Down Expand Up @@ -117,15 +116,29 @@ $(document).ready(function () {
"render": function (data, type, row) {
if (type === "export" || type === "sort" || type === "filter") {
if (data === true) {
return 'PASS: DMARC Record Present'
if (row.DMARCReportingActive === true) {
return 'PASS: DMARC Record Present'
}
if (row.DMARCReportingActive === false) {
return 'WARN: DMARC Present Reporting Not Configured'
}

} else if (data === false) {
return 'FAIL: DMARC Not Present'
} else {
return 'No Data'
}
}
if (data === true) {
return '<h5><span class="badge bg-success">DMARC Present</span></h5>';
if (row.DMARCReportingActive === true) {
return '<h5><span class="badge bg-success">DMARC Present</span></h5>';
}
if (row.DMARCReportingActive === false) {
return '<h5><span class="badge bg-warning">DMARC Present No Reporting</span></h5>';
}
if (!row.DMARCReportingActive) {
return '<h5><span class="badge bg-danger">DMARC Present No Reporting Data</span></h5>';
}
}
if (data === false) {
return '<h5><span class="badge bg-danger">DMARC Missing</span></h5>';
Expand Down Expand Up @@ -229,8 +242,8 @@ $(document).ready(function () {
"data": "ActualMXRecord",
"render": function (data, type, row) {
if (type === "export" || type === "sort" || type === "filter") {
return 'No Data'
}
return 'No Data'
}
return '<button type="button" class="btn btn-warning btn-sm" data-bs-toggle="modal" data-bs-target="#' + row.GUID + 'MoreInfo">More</button><!-- Modal --><div class="modal fade" id="' + row.GUID + 'MoreInfo" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="exampleModalLabel">More Information</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><h3>Tenant: ' + row.Tenant + '</h3><br /><br /><strong>Score Explanation: </strong>' + row.ScoreExplanation + '<br /><br /><strong>Expected SPF Record: </strong> ' + row.ExpectedSPFRecord + '<br /><strong>Actual SPF Record: </strong>' + row.ActualSPFRecord + '<br /><br /><strong>DMARC Full Policy: </strong>' + row.DMARCFullPolicy + '<br /><br /><strong>Expected MX Record: </strong>' + row.ExpectedMXRecord + '<br /><strong>Actual MX Record: </strong>' + row.ActualMXRecord + '<br /><br /><strong>Supported Services: </strong>' + row.SupportedServices + '<br /><strong>Is Default Domain: </strong>' + row.IsDefault + '<br /><strong>Data Last Refreshed:</strong>' + row.LastRefresh + '</div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button></div></div></div></div>'
}
}
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.1
1.2.2

0 comments on commit 088722e

Please sign in to comment.