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

Unified Diff: netlog_viewer/quic_view.js

Issue 2178423002: Bring the gh-pages branch up to date with the master branch (Closed) Base URL: https://github.com/catapult-project/catapult.git@gh-pages
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « netlog_viewer/quic_view.html ('k') | netlog_viewer/sdch_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: netlog_viewer/quic_view.js
diff --git a/netlog_viewer/quic_view.js b/netlog_viewer/quic_view.js
index 4eba9f21bfc6509b47e21e420dbed001a8d9dc61..2cb87de71cadf74afc5b3aa86266d572135942a2 100644
--- a/netlog_viewer/quic_view.js
+++ b/netlog_viewer/quic_view.js
@@ -30,6 +30,43 @@ var QuicView = (function() {
// IDs for special HTML elements in quic_view.html
QuicView.MAIN_BOX_ID = 'quic-view-tab-content';
+ QuicView.STATUS_QUIC_ENABLED = 'quic-view-quic-enabled';
+ QuicView.STATUS_ORIGINS_TO_FORCE_QUIC_ON =
+ 'quic-view-origins-to-force-quic-on';
+ QuicView.STATUS_CONNECTION_OPTIONS =
+ 'quic-view-connection-options';
+ QuicView.STATUS_CONSISTENT_PORT_SELECTION_ENABLED =
+ 'quic-view-port-selection-enabled';
+ QuicView.STATUS_LOAD_SERVER_INFO_TIMEOUT_MULTIPLIER =
+ 'quic-view-server-info-timeout-mult';
+ QuicView.STATUS_ENABLE_CONNECTION_RACING =
+ 'quic-view-enable-connection-racing';
+ QuicView.STATUS_DISABLE_DISK_CACHE =
+ 'quic-view-disable-disk-cache';
+ QuicView.STATUS_PREFER_AES =
+ 'quic-view-prefer-aes';
+ QuicView.STATUS_MAX_NUM_OF_LOSSY_CONNECTIONS =
+ 'quic-view-max-num-lossy-connections';
+ QuicView.STATUS_PACKET_LOSS_THRESHOLD =
+ 'quic-view-packet-loss-threshold';
+ QuicView.STATUS_DELAY_TCP_RACE = 'quic-view-delay-tcp-race';
+ QuicView.STATUS_STORE_SERVER_CONFIGS_IN_PROPERITES_FILE =
+ 'quic-view-configs-in-file';
+ QuicView.STATUS_IDLE_CONNECTION_TIMEOUT_IN_SECS =
+ 'quic-view-connection-timeout-in-secs';
+ QuicView.STATUS_DISABLE_PRECONNECT_IF_ORTT =
+ 'quic-view-disable-preconnect-if-ortt';
+ QuicView.STATUS_DISABLE_QUIC_ON_TIMEOUT_WITH_OPEN_STREAMS =
+ 'quic-view-disable-quic-on-timeout-with-open-streams';
+ QuicView.STATUS_DYNAMICALLY_DISABLED_BULLET_POINT =
+ 'quic-view-dynamically-disabled-bullet-point';
+ QuicView.STATUS_DYNAMICALLY_DISABLED_SPAN =
+ 'quic-view-dynamically-disabled-span';
+ QuicView.SESSION_INFO_CONTENT_ID =
+ 'quic-view-session-info-content';
+ QuicView.SESSION_INFO_NO_CONTENT_ID =
+ 'quic-view-session-info-no-content';
+ QuicView.SESSION_INFO_TBODY_ID = 'quic-view-session-info-tbody';
cr.addSingletonGetter(QuicView);
@@ -48,9 +85,99 @@ var QuicView = (function() {
onQuicInfoChanged: function(quicInfo) {
if (!quicInfo)
return false;
- // TODO(rayraymond): Update DOM without use of jstemplate.
- // var input = new JsEvalContext(quicInfo);
- // jstProcess(input, $(QuicView.MAIN_BOX_ID));
+
+ $(QuicView.STATUS_QUIC_ENABLED).textContent =
+ !!quicInfo.quic_enabled;
+
+ $(QuicView.STATUS_ORIGINS_TO_FORCE_QUIC_ON).textContent =
+ quicInfo.origins_to_force_quic_on;
+
+ $(QuicView.STATUS_CONNECTION_OPTIONS).textContent =
+ quicInfo.connection_options;
+
+ $(QuicView.STATUS_CONSISTENT_PORT_SELECTION_ENABLED).
+ textContent = !!quicInfo.enable_quic_port_selection;
+
+ $(QuicView.STATUS_LOAD_SERVER_INFO_TIMEOUT_MULTIPLIER).
+ textContent = quicInfo.load_server_info_timeout_srtt_multiplier;
+
+ $(QuicView.STATUS_ENABLE_CONNECTION_RACING).textContent =
+ !!quicInfo.enable_connection_racing;
+
+ $(QuicView.STATUS_DISABLE_DISK_CACHE).textContent =
+ !!quicInfo.disable_disk_cache;
+
+ $(QuicView.STATUS_PREFER_AES).textContent =
+ !!quicInfo.prefer_aes;
+
+ $(QuicView.STATUS_MAX_NUM_OF_LOSSY_CONNECTIONS).textContent =
+ quicInfo.max_number_of_lossy_connections;
+
+ $(QuicView.STATUS_PACKET_LOSS_THRESHOLD).textContent =
+ quicInfo.packet_loss_threshold;
+
+ $(QuicView.STATUS_DELAY_TCP_RACE).textContent =
+ !!quicInfo.delay_tcp_race;
+
+ $(QuicView.STATUS_STORE_SERVER_CONFIGS_IN_PROPERITES_FILE).
+ textContent = !!quicInfo.store_server_configs_in_properties;
+
+ $(QuicView.STATUS_IDLE_CONNECTION_TIMEOUT_IN_SECS).textContent =
+ quicInfo.idle_connection_timeout_seconds;
+
+ $(QuicView.STATUS_DISABLE_PRECONNECT_IF_ORTT).textContent =
+ quicInfo.disable_preconnect_if_0rtt;
+
+ $(QuicView.STATUS_DISABLE_QUIC_ON_TIMEOUT_WITH_OPEN_STREAMS).
+ textContent =
+ quicInfo.disable_quic_on_timeout_with_open_streams;
+
+ setNodeDisplay($(QuicView.STATUS_DYNAMICALLY_DISABLED_BULLET_POINT),
+ quicInfo.disabled_reason && quicInfo.disabled_reason.length > 0);
+ if (quicInfo.disabled_reason &&
+ quicInfo.disabled_reason.length > 0) {
+ $(QuicView.STATUS_DYNAMICALLY_DISABLED_SPAN).textContent =
+ 'QUIC dynamically disabled: ' + quicInfo.disabled_reason;
+ }
+
+ var sessions = quicInfo.sessions;
+
+ var hasSessions = sessions && sessions.length > 0;
+
+ setNodeDisplay($(QuicView.SESSION_INFO_CONTENT_ID), hasSessions);
+ setNodeDisplay($(QuicView.SESSION_INFO_NO_CONTENT_ID), !hasSessions);
+
+ var tbody = $(QuicView.SESSION_INFO_TBODY_ID);
+ tbody.innerHTML = '';
+
+ // Fill in the sessions info table.
+ for (var i = 0; i < sessions.length; ++i) {
+ var q = sessions[i];
+ var tr = addNode(tbody, 'tr');
+
+ addNodeWithText(tr, 'td', q.aliases ? q.aliases.join(' ') : '');
+ addNodeWithText(tr, 'td', !!q.secure);
+ addNodeWithText(tr, 'td', q.version);
+ addNodeWithText(tr, 'td', q.peer_address);
+
+ var connectionUIDCell = addNode(tr, 'td');
+ var a = addNode(connectionUIDCell, 'a');
+ a.href = '#events&q=type:QUIC_SESSION%20' + q.connection_id;
+ a.textContent = q.connection_id;
+
+ addNodeWithText(tr, 'td', q.open_streams);
+
+ addNodeWithText(tr, 'td',
+ q.active_streams && q.active_streams.length > 0 ?
+ q.active_streams.join(', ') : 'None');
+
+ addNodeWithText(tr, 'td', q.total_streams);
+ addNodeWithText(tr, 'td', q.packets_sent);
+ addNodeWithText(tr, 'td', q.packets_lost);
+ addNodeWithText(tr, 'td', q.packets_received);
+ addNodeWithText(tr, 'td', q.connected);
+ }
+
return true;
},
};
« no previous file with comments | « netlog_viewer/quic_view.html ('k') | netlog_viewer/sdch_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698