summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals/sourceentry.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources/net_internals/sourceentry.js')
-rw-r--r--chrome/browser/resources/net_internals/sourceentry.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/resources/net_internals/sourceentry.js b/chrome/browser/resources/net_internals/sourceentry.js
index 74313d2..2cbbf4e 100644
--- a/chrome/browser/resources/net_internals/sourceentry.js
+++ b/chrome/browser/resources/net_internals/sourceentry.js
@@ -9,7 +9,8 @@
*
* @constructor
*/
-function SourceEntry(parentView) {
+function SourceEntry(parentView, id) {
+ this.id_ = id;
this.entries_ = [];
this.parentView_ = parentView;
this.isSelected_ = false;
@@ -126,6 +127,8 @@ SourceEntry.prototype.createRow_ = function() {
checkbox.type = 'checkbox';
var idCell = addNode(tr, 'td');
+ idCell.style.textAlign = 'right';
+
var typeCell = addNode(tr, 'td');
var descriptionCell = addNode(tr, 'td');
@@ -141,7 +144,10 @@ SourceEntry.prototype.createRow_ = function() {
tr.onmouseout = this.onMouseout_.bind(this);
// Set the cell values to match this source's data.
- addTextNode(idCell, this.getSourceId());
+ if (this.getSourceId() >= 0)
+ addTextNode(idCell, this.getSourceId());
+ else
+ addTextNode(idCell, "-");
var sourceTypeString = this.getSourceTypeString();
addTextNode(typeCell, sourceTypeString);
addTextNode(descriptionCell, this.getDescription());
@@ -210,7 +216,7 @@ SourceEntry.prototype.getSelectionCheckbox = function() {
};
SourceEntry.prototype.getSourceId = function() {
- return this.entries_[0].source.id;
+ return this.id_;
};
SourceEntry.prototype.remove = function() {