Skip to content

Commit

Permalink
Left align DNSSEC icons
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <[email protected]>
  • Loading branch information
rdwebdesign committed Dec 19, 2024
1 parent 43efed6 commit 8f57898
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions scripts/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ function formatReplyTime(replyTime, type) {

// Parse DNSSEC status
function parseDNSSEC(data) {
var icon = null, // Icon to display
color = false, // Class to apply to text
var icon = "", // Icon to display
color = "", // Class to apply to text
text = data.dnssec; // Text to display
switch (text) {
case "SECURE":
Expand All @@ -270,8 +270,8 @@ function parseDNSSEC(data) {
default:
// No DNSSEC or UNKNOWN
text = "N/A";
color = false;
icon = false;
color = "";
icon = "";
}

return { text: text, icon: icon, color: color };
Expand Down Expand Up @@ -332,7 +332,7 @@ function formatInfo(data) {

// Show DNSSEC status if applicable
var dnssecInfo = "";
if (dnssec.color !== false) {
if (dnssec.color !== "") {
dnssecInfo =
divStart +
'DNSSEC status:&nbsp&nbsp;<strong><span class="' +
Expand Down Expand Up @@ -591,19 +591,16 @@ $(function () {
// Substitute domain by "." if empty
var domain = data.domain === 0 ? "." : data.domain;

// Append colored icon to domain text
var dnssecIcon = "";
if (dnssec.color !== false) {
// Append colored icon to domain text
dnssecIcon =
"&nbsp;&nbsp;" +
'<i class="fa fa-fw ' +
dnssec.icon +
" " +
dnssec.color +
'" title="DNSSEC: ' +
dnssec.text +
'"></i>';
}
dnssecIcon =
'<i class="fa fa-fw ' +
dnssec.icon +
" " +
dnssec.color +
'" title="DNSSEC: ' +
dnssec.text +
'"></i>&nbsp;&nbsp;';

// Escape HTML in domain
domain = utils.escapeHtml(domain) + dnssecIcon;
Expand Down

0 comments on commit 8f57898

Please sign in to comment.