Improve tooltip for partyness information in logger

This commit is contained in:
Raymond Hill 2018-12-15 12:23:13 -05:00
parent 261ef8c510
commit 8214a0b17d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 24 additions and 10 deletions

View File

@ -254,10 +254,12 @@ body #netInspector td {
} }
#netInspector tr td:nth-of-type(5) { #netInspector tr td:nth-of-type(5) {
cursor: default; cursor: default;
overflow: visible !important;
position: relative; position: relative;
text-align: center; text-align: center;
} }
#netInspector tr.tab_bts td:nth-of-type(5)::after { /* visual for tabless network requests */
#netInspector tr.tab_bts td:nth-of-type(5)::before {
border: 5px solid #bbb; border: 5px solid #bbb;
border-bottom: 0; border-bottom: 0;
border-top: 0; border-top: 0;
@ -270,6 +272,19 @@ body #netInspector td {
width: calc(100% - 10px); width: calc(100% - 10px);
z-index: -1; z-index: -1;
} }
/* visual for quick tooltip */
#netInspector tr td[data-parties]:nth-of-type(5):hover::after {
background-color: #feb;
border: 1px outset #feb;
color: black;
content: attr(data-parties);
left: 100%;
padding: 0.4em 0.6em;
position: absolute;
text-align: left;
top: -50%;
white-space: pre;
}
#netInspector tr td:nth-of-type(6) { #netInspector tr td:nth-of-type(6) {
text-align: right; text-align: right;
} }

View File

@ -165,7 +165,7 @@ const createCellAt = function(tr, index) {
} }
if ( td ) { if ( td ) {
td.removeAttribute('colspan'); td.removeAttribute('colspan');
td.removeAttribute('title'); td.removeAttribute('data-parties');
td.textContent = ''; td.textContent = '';
} else { } else {
td = document.createElement('td'); td = document.createElement('td');
@ -186,7 +186,6 @@ var createRow = function(layout) {
tr.removeAttribute('data-dochn'); tr.removeAttribute('data-dochn');
tr.removeAttribute('data-filter'); tr.removeAttribute('data-filter');
tr.removeAttribute('data-tabid'); tr.removeAttribute('data-tabid');
tr.removeAttribute('title');
} else { } else {
tr = document.createElement('tr'); tr = document.createElement('tr');
} }
@ -318,14 +317,14 @@ var renderNetLogEntry = function(tr, details) {
} }
} }
td.textContent = text; td.textContent = text;
text = details.domain; let indent = '\t';
if ( details.docDomain ) { text = details.tabDomain;
text = details.docDomain + ' \u21d2 ' + text; if ( details.docDomain !== details.tabDomain ) {
text += ` \u21d2\n\t${details.docDomain}`;
indent = '\t\t';
} }
if ( details.tabDomain && details.tabDomain !== details.docDomain ) { text += ` \u21d2\n${indent}${details.domain}`;
text = details.tabDomain + ' \u21d2 ' + text; td.setAttribute('data-parties', text);
}
td.setAttribute('title', text);
} }
tr.cells[5].textContent = (prettyRequestTypes[type] || type); tr.cells[5].textContent = (prettyRequestTypes[type] || type);