Certain client authors send very long fields here (particularly for platform, which can include all sorts of details of the OS, compiler, etc). So truncate long fields rather than display an enormous table.
This commit is contained in:
parent
d01575346a
commit
1e0c5e0873
|
|
@ -195,7 +195,7 @@ acronym { background: #add; color: #222; padding: 2px 4px; border-radius: 2px; -
|
|||
|
||||
acronym.warning { background: #daa; }
|
||||
|
||||
.status-red acronym, .status-yellow acronym, .status-green acronym, small acronym { background: none; color: inherit; padding: 0; border-bottom: 1px dotted; cursor: default; }
|
||||
.status-red acronym, .status-yellow acronym, .status-green acronym, small acronym, acronym.normal { background: none; color: inherit; padding: 0; border-bottom: 1px dotted; cursor: default; }
|
||||
|
||||
acronym.type { background: none; color: inherit; padding: 0; border-bottom: 1px dotted #ddd; cursor: default; }
|
||||
|
||||
|
|
|
|||
|
|
@ -486,19 +486,25 @@ function fmt_shortened_uri(uri0) {
|
|||
function fmt_client_name(properties) {
|
||||
var res = [];
|
||||
if (properties.product != undefined) {
|
||||
res.push(properties.product);
|
||||
res.push(fmt_trunc(properties.product, 10));
|
||||
}
|
||||
if (properties.platform != undefined) {
|
||||
res.push(properties.platform);
|
||||
res.push(fmt_trunc(properties.platform, 10));
|
||||
}
|
||||
res = res.join(" / ");
|
||||
|
||||
if (properties.version != undefined) {
|
||||
res += '<sub>' + properties.version + '</sub>';
|
||||
res += '<sub>' + fmt_trunc(properties.version) + '</sub>';
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function fmt_trunc(str, max_length) {
|
||||
return str.length > max_length ?
|
||||
('<acronym class="normal" title="' + str + '">' +
|
||||
str.substring(0, max_length) + '...</acronym>') : str;
|
||||
}
|
||||
|
||||
function alt_rows(i) {
|
||||
return (i % 2 == 0) ? ' class="alt1"' : ' class="alt2"';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue