Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-viewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnew-gh <github@hazelden.ca>2021-04-05 09:31:31 +0300
committerjnew-gh <github@hazelden.ca>2021-04-05 09:31:31 +0300
commit59500036db9196b6315b4a5278e51116d9f0a0cb (patch)
treeac34590d48b49655d86234e9831da036de7da042 /dmarcts-report-viewer-report-list.php
parenteb5de8f7dd7e92be2302b24f3f167a32201f3014 (diff)
Add Report List Alignment Status Circles
Add Report List columns for status circles. Change status cirlces from Unicode font symbol to circles created in css. Add title messages in Report List
Diffstat (limited to 'dmarcts-report-viewer-report-list.php')
-rw-r--r--dmarcts-report-viewer-report-list.php30
1 files changed, 18 insertions, 12 deletions
diff --git a/dmarcts-report-viewer-report-list.php b/dmarcts-report-viewer-report-list.php
index 977efce..40764b6 100644
--- a/dmarcts-report-viewer-report-list.php
+++ b/dmarcts-report-viewer-report-list.php
@@ -42,7 +42,8 @@ function tmpl_reportList($reports, $sort) {
if (sizeof($reports) == 0) {
$reportlist[] = "<div class='center'><b>No Reports Match this filter</b><br />Click the <i>Reset</i> button or choose a different value for <i>DMARC Result</i>, <i>Month</i>, <i>Domain(s)</i> or <i>Reporter(s)</i>.</div>";
} else {
- $title_message = "Click to toggle sort direction by this column";
+ $title_message_th = "Click to toggle sort direction by this column.";
+ $title_message_tr = "Click to view detailed report data.";
// echo $sort;
// Resizer handles
// --------------------------------------------------------------------------
@@ -51,13 +52,15 @@ function tmpl_reportList($reports, $sort) {
$reportlist[] = "<table id='reportlistTbl' class='reportlist'>";
$reportlist[] = " <thead>";
$reportlist[] = " <tr>";
- $reportlist[] = " <th title='" . $title_message . "'><span class=\"circle_black\"><span style='display:none;'>1</span></span></th>";
- $reportlist[] = " <th class=\"" . strtolower($sort) . "_triangle\" title='" . $title_message . "'>Start Date</th>";
- $reportlist[] = " <th title='" . $title_message . "'>End Date</th>";
- $reportlist[] = " <th title='" . $title_message . "'>Domain</th>";
- $reportlist[] = " <th title='" . $title_message . "'>Reporting Organization</th>";
- $reportlist[] = " <th title='" . $title_message . " (currently doesn&#39;t really sort well)'>Report ID</th>";
- $reportlist[] = " <th title='" . $title_message . "'>Messages</th>";
+ $reportlist[] = " <th class='circle_container' style='padding-left: 5px' title='DMARC Result. " . $title_message_th . "'><div class='circle circle_left circle_black'></div><span style='display:none;'>1</span></span></th>";
+ $reportlist[] = " <th class='circle_container'></th>";
+ $reportlist[] = " <th class='circle_container' title='SPF/DKIM/DMARC Results. " . $title_message_th . "'><div class='circle circle_right circle_black'></div><span style='display:none;'>1</span></span></th>";
+ $reportlist[] = " <th class=\"" . strtolower($sort) . "_triangle\" title='" . $title_message_th . "'>Start Date</th>";
+ $reportlist[] = " <th title='" . $title_message_th . "'>End Date</th>";
+ $reportlist[] = " <th title='" . $title_message_th . "'>Domain</th>";
+ $reportlist[] = " <th title='" . $title_message_th . "'>Reporting Organization</th>";
+ $reportlist[] = " <th title='" . $title_message_th . " (currently doesn&#39;t really sort well)'>Report ID</th>";
+ $reportlist[] = " <th title='" . $title_message_th . "'>Messages</th>";
$reportlist[] = " </tr>";
$reportlist[] = " </thead>";
@@ -67,20 +70,23 @@ function tmpl_reportList($reports, $sort) {
foreach ($reports as $row) {
$row = array_map('htmlspecialchars', $row);
$date_output_format = "Y-m-d G:i:s T";
- $reportlist[] = " <tr class='linkable' onclick=\"showReport('" . $row['serial'] . "')\" id='report" . $row['serial'] . "'>";
- $reportlist[] = " <td class='right'><span class=\"circle_".get_status_color($row)[0]."\"><span style='display:none;'>" . get_status_color($row)[1] . "</span></span></td>"; // Col 0
+ $reportlist[] = " <tr class='linkable' onclick=\"showReport('" . $row['serial'] . "')\" id='report" . $row['serial'] . "' title='" . $title_message_tr . "'>";
+
+ $reportlist[] = " <td class='circle_container'><span class='status_sort_key'>" . get_dmarc_result($row)['status_sort_key'] . "</span></td>"; // Col 0
+ $reportlist[] = " <td class='circle_container'><div style='white-space: nowrap;' title='DMARC: " . get_dmarc_result($row)['result'] . "\nSPF/DKIM/DMARC: " . get_report_status($row)['status_text'] . "\n" . $title_message_tr . "'><div class='circle circle_left circle_" . get_dmarc_result($row)['color'] . "'></div><div class='circle circle_right circle_" . get_report_status($row)['color'] . "'></div></div></td>"; // Col 0
+ $reportlist[] = " <td class='circle_container'><span class='status_sort_key'>" . get_report_status($row)['status_sort_key'] . "</span></span></td>"; // Col 0
$reportlist[] = " <td class='right'>". format_date($row['mindate'], $date_output_format). "</td>"; // Col 1
$reportlist[] = " <td class='right'>". format_date($row['maxdate'], $date_output_format). "</td>"; // Col 3
$reportlist[] = " <td class='center'>". $row['domain']. "</td>"; // Col 5
$reportlist[] = " <td class='center'>". $row['org']. "</td>"; // Col 6
$reportlist[] = " <td class='center'>". $row['reportid'] . "</td>";
- $reportlist[] = " <td class='center'>". number_format($row['rcount']+0,0). "</td>"; // Col 9
+ $reportlist[] = " <td class='right'>". number_format($row['rcount']+0,0). "</td>"; // Col 9
$reportlist[] = " </tr>";
$reportsum += $row['rcount'];
}
$reportlist[] = " </tbody>";
- $reportlist[] = "<tr class='sum'><td></td><td></td><td></td><td></td><td></td><td class='right'>Sum:</td><td class='center'>".number_format($reportsum,0)."</td></tr>";
+ $reportlist[] = "<tr class='sum'><td class='circle_container'></td><td class='circle_container'></td><td class='circle_container'></td><td></td><td></td><td></td><td></td><td class='right'>Sum:</td><td class='right'>".number_format($reportsum,0)."</td></tr>";
$reportlist[] = "</table>";
$reportlist[] = "<!-- End of report list -->";