Commit 2af86823 authored by wangyix's avatar wangyix Committed by Commit bot

Replace net-internals/export tab with deprecation msg and button to show old UI.

BUG=472699,678386
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2722483004
Cr-Commit-Position: refs/heads/master@{#453830}
parent 97478718
......@@ -18,7 +18,16 @@
</style>
<div id=export-view-tab-content class=content-box>
<div>
<div id=export-view-deprecated-notice>
<b>WARNING</b>: chrome://net-internals is being deprecated for exporting log files (<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=678386" target="_blank">crbug.com/678386</a>).
<p>
Use <a href="chrome://net-export" target="_blank">chrome://net-export</a> instead.
</p>
<button id=export-view-show-deprecated-ui>Show deprecated UI</button>
</div>
<div style="display: none" id=export-view-ui-deprecated>
<input id=export-view-privacy-stripping-checkbox type=checkbox checked=yes>
<label for=export-view-privacy-stripping-checkbox>
Strip private information (cookies and credentials).
......@@ -40,7 +49,7 @@
How to provide data for bug reports
</a>
</div>
</div>
<a style="display: none" id=export-view-download-anchor download="net-internals-log.json"></a>
......
......@@ -20,6 +20,11 @@ var ExportView = (function() {
// Call superclass's constructor.
superClass.call(this, ExportView.MAIN_BOX_ID);
this.deprecatedNoticeUI_ = $(ExportView.DEPRECATED_NOTICE_UI_ID);
this.showDeprecatedUIButton_ = $(ExportView.SHOW_DEPRECATED_UI_BUTTON_ID);
this.showDeprecatedUIButton_.onclick = this.onShowDeprecatedUI_.bind(this);
this.deprecatedExportUI_ = $(ExportView.DEPRECATED_EXPORT_UI_ID);
var privacyStrippingCheckbox = $(ExportView.PRIVACY_STRIPPING_CHECKBOX_ID);
privacyStrippingCheckbox.onclick =
this.onSetPrivacyStripping_.bind(this, privacyStrippingCheckbox);
......@@ -46,6 +51,10 @@ var ExportView = (function() {
ExportView.TAB_HASH = '#export';
// IDs for special HTML elements in export_view.html
ExportView.DEPRECATED_NOTICE_UI_ID = 'export-view-deprecated-notice';
ExportView.SHOW_DEPRECATED_UI_BUTTON_ID = 'export-view-show-deprecated-ui';
ExportView.DEPRECATED_EXPORT_UI_ID = 'export-view-ui-deprecated';
ExportView.MAIN_BOX_ID = 'export-view-tab-content';
ExportView.DOWNLOAD_ANCHOR_ID = 'export-view-download-anchor';
ExportView.SAVE_FILE_BUTTON_ID = 'export-view-save-log-file';
......@@ -61,6 +70,15 @@ var ExportView = (function() {
// Inherit the superclass's methods.
__proto__: superClass.prototype,
/**
* Hides the export-view deprecation warning message and shows the
* deprecated export-view UI.
*/
onShowDeprecatedUI_: function() {
setNodeDisplay(this.deprecatedNoticeUI_, false);
setNodeDisplay(this.deprecatedExportUI_, true);
},
/**
* Depending on the value of the checkbox, enables or disables stripping
* cookies and passwords from log dumps and displayed events.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment