summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 02:04:15 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 02:04:15 +0000
commit2a5005ef3a551342e543b01b6db1f4c576aab941 (patch)
tree33060d28091c265db717fe6997e94bbddada2001 /chrome/browser
parent76d3a9bcf76e90cbb0e2596237e2ae119e93e922 (diff)
downloadchromium_src-2a5005ef3a551342e543b01b6db1f4c576aab941.zip
chromium_src-2a5005ef3a551342e543b01b6db1f4c576aab941.tar.gz
chromium_src-2a5005ef3a551342e543b01b6db1f4c576aab941.tar.bz2
Aesthetic changes to about:net-internals#import.
- hilight loading errors/warnings - remove the reload link - reduce some of the text Review URL: http://codereview.chromium.org/9455076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/resources/net_internals/import_view.html39
-rw-r--r--chrome/browser/resources/net_internals/import_view.js23
2 files changed, 42 insertions, 20 deletions
diff --git a/chrome/browser/resources/net_internals/import_view.html b/chrome/browser/resources/net_internals/import_view.html
index ea4cd1a..9109c60 100644
--- a/chrome/browser/resources/net_internals/import_view.html
+++ b/chrome/browser/resources/net_internals/import_view.html
@@ -4,6 +4,34 @@
/* Wrap long lines inside of PREs */
white-space: pre-wrap;
}
+
+#import-view-load-status-text {
+ /* Wrap long lines inside of PREs */
+ white-space: pre-wrap;
+}
+
+.import-view-pending-log {
+ font-family: sans-serif;
+ color: blue;
+ font-weight: bold;
+}
+
+.import-view-success-log {
+ font-family: sans-serif;
+ color: green;
+ font-weight: bold;
+}
+
+.import-view-error-log {
+ color: red;
+ padding: 5px;
+ border: 1px solid red;
+}
+
+.import-view-warning-log {
+ color: red;
+}
+
</style>
<div id=import-view-tab-content>
@@ -36,16 +64,9 @@
<div>
<h2>Load data</h2>
<p><input type=file value="Load log from file" id=import-view-load-log-file /></p>
- <pre id=import-view-load-status-text></pre>
-
- <p>Once a log is loaded, this page will stop collecting data, and will
- only start gathering data again when
- <a id="import-view-reloaded-link" href="#">reloaded</a>.
- </p>
-
<ul>
- <li><b>NOTE</b>: The currently captured data will be discarded when you load a file.</li>
- <li><b>TIP</b>: Drag-and-drop of log files into this window works too!</li>
+ <li><b>TIP</b>: Try drag-and-drop into this window!</li>
</ul>
+ <pre id=import-view-load-status-text></pre>
</div>
</div>
diff --git a/chrome/browser/resources/net_internals/import_view.js b/chrome/browser/resources/net_internals/import_view.js
index 49bb67fd..41eb694 100644
--- a/chrome/browser/resources/net_internals/import_view.js
+++ b/chrome/browser/resources/net_internals/import_view.js
@@ -35,8 +35,6 @@ var ImportView = (function() {
dropTarget.ondragover = this.onDrag.bind(this);
dropTarget.ondrop = this.onDrop.bind(this);
- $(ImportView.RELOAD_LINK_ID).onclick = this.clickedReload_.bind(this);
-
this.loadedInfoBuildName_ = $(ImportView.LOADED_INFO_BUILD_NAME_ID);
this.loadedInfoExportDate_ = $(ImportView.LOADED_INFO_EXPORT_DATE_ID);
this.loadedInfoOsType_ = $(ImportView.LOADED_INFO_OS_TYPE_ID);
@@ -51,7 +49,6 @@ var ImportView = (function() {
ImportView.LOADED_DIV_ID = 'import-view-loaded-div';
ImportView.LOAD_LOG_FILE_ID = 'import-view-load-log-file';
ImportView.LOAD_STATUS_TEXT_ID = 'import-view-load-status-text';
- ImportView.RELOAD_LINK_ID = 'import-view-reloaded-link';
ImportView.LOADED_INFO_EXPORT_DATE_ID = 'import-view-export-date';
ImportView.LOADED_INFO_BUILD_NAME_ID = 'import-view-build-name';
ImportView.LOADED_INFO_OS_TYPE_ID = 'import-view-os-type';
@@ -76,14 +73,6 @@ var ImportView = (function() {
},
/**
- * Called when the user clicks the "reloaded" link.
- */
- clickedReload_: function() {
- window.location.reload();
- return false;
- },
-
- /**
* Called when something is dragged over the drop target.
*
* Returns false to cancel default browser behavior when a single file is
@@ -175,6 +164,18 @@ var ImportView = (function() {
this.loadFileElement_ = $(loadFileElementId);
this.loadFileElement_.onchange = loadFileElementOnChange;
}
+
+ // Style the log output differently depending on what just happened.
+ var pos = text.indexOf('Log loaded.');
+ if (isLoading) {
+ this.loadStatusText_.className = 'import-view-pending-log';
+ } else if (pos == 0) {
+ this.loadStatusText_.className = 'import-view-success-log';
+ } else if (pos != -1) {
+ this.loadStatusText_.className = 'import-view-warning-log';
+ } else {
+ this.loadStatusText_.className = 'import-view-error-log';
+ }
},
enableLoadFileElement_: function(enabled) {