Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js

Issue 2894083002: [DevTools] Set row background instead of the table (Closed)
Patch Set: Fixed a comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Network.EventSourceMessagesView = class extends UI.VBox { 7 Network.EventSourceMessagesView = class extends UI.VBox {
8 /** 8 /**
9 * @param {!SDK.NetworkRequest} request 9 * @param {!SDK.NetworkRequest} request
10 */ 10 */
11 constructor(request) { 11 constructor(request) {
12 super(); 12 super();
13 this.registerRequiredCSS('network/eventSourceMessagesView.css'); 13 this.registerRequiredCSS('network/eventSourceMessagesView.css');
14 this.element.classList.add('event-source-messages-view'); 14 this.element.classList.add('event-source-messages-view');
15 this._request = request; 15 this._request = request;
16 16
17 var columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([ 17 var columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([
18 {id: 'id', title: Common.UIString('Id'), sortable: true, weight: 8}, 18 {id: 'id', title: Common.UIString('Id'), sortable: true, weight: 8},
19 {id: 'type', title: Common.UIString('Type'), sortable: true, weight: 8}, 19 {id: 'type', title: Common.UIString('Type'), sortable: true, weight: 8},
20 {id: 'data', title: Common.UIString('Data'), sortable: false, weight: 88}, 20 {id: 'data', title: Common.UIString('Data'), sortable: false, weight: 88},
21 {id: 'time', title: Common.UIString('Time'), sortable: true, weight: 8} 21 {id: 'time', title: Common.UIString('Time'), sortable: true, weight: 8}
22 ]); 22 ]);
23 23
24 this._dataGrid = new DataGrid.SortableDataGrid(columns); 24 this._dataGrid = new DataGrid.SortableDataGrid(columns);
25 this._dataGrid.setStriped(true);
25 this._dataGrid.setStickToBottom(true); 26 this._dataGrid.setStickToBottom(true);
26 this._dataGrid.markColumnAsSortedBy('time', DataGrid.DataGrid.Order.Ascendin g); 27 this._dataGrid.markColumnAsSortedBy('time', DataGrid.DataGrid.Order.Ascendin g);
27 this._sortItems(); 28 this._sortItems();
28 this._dataGrid.addEventListener(DataGrid.DataGrid.Events.SortingChanged, thi s._sortItems, this); 29 this._dataGrid.addEventListener(DataGrid.DataGrid.Events.SortingChanged, thi s._sortItems, this);
29 30
30 this._dataGrid.setName('EventSourceMessagesView'); 31 this._dataGrid.setName('EventSourceMessagesView');
31 this._dataGrid.asWidget().show(this.element); 32 this._dataGrid.asWidget().show(this.element);
32 } 33 }
33 34
34 /** 35 /**
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 var bValue = b._message[field]; 100 var bValue = b._message[field];
100 return aValue < bValue ? -1 : aValue > bValue ? 1 : 0; 101 return aValue < bValue ? -1 : aValue > bValue ? 1 : 0;
101 }; 102 };
102 103
103 /** @type {!Object.<string, function(!Network.EventSourceMessageNode, !Network.E ventSourceMessageNode):number>} */ 104 /** @type {!Object.<string, function(!Network.EventSourceMessageNode, !Network.E ventSourceMessageNode):number>} */
104 Network.EventSourceMessageNode.Comparators = { 105 Network.EventSourceMessageNode.Comparators = {
105 'id': Network.EventSourceMessageNodeComparator.bind(null, 'eventId'), 106 'id': Network.EventSourceMessageNodeComparator.bind(null, 'eventId'),
106 'type': Network.EventSourceMessageNodeComparator.bind(null, 'eventName'), 107 'type': Network.EventSourceMessageNodeComparator.bind(null, 'eventName'),
107 'time': Network.EventSourceMessageNodeComparator.bind(null, 'time') 108 'time': Network.EventSourceMessageNodeComparator.bind(null, 'time')
108 }; 109 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698