Commit 923cd866 authored by Jan Scheffler's avatar Jan Scheffler Committed by Commit Bot

Reland "[devtools] Add Url and Path Column to Network Log"

This is a reland of 12915a69

Original change's description:
> [devtools] Add Url and Path Column to Network Log
>
> This patch adds url and path as available columns to
> the network log view and allows the name to be removed
> because it is not needed if the user decides to show
> the path or the whole url.
>
> Bug: chromium:993366
> Change-Id: Ib4600d1631bd436cb3c8b8e79b3709dddc38b166
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809161
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#698891}

Bug: chromium:993366
Change-Id: I0061afbb7bdbc03cf3a7bd567530d21b66fa6d30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823859Reviewed-by: default avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707746}
parent 9c29099f
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
<message name="IDS_DEVTOOLS_03301bd5f0d1517cf88b2f8348b82dfc" desc="Accessible text for the value in bytes in memory allocation or coverage view."> <message name="IDS_DEVTOOLS_03301bd5f0d1517cf88b2f8348b82dfc" desc="Accessible text for the value in bytes in memory allocation or coverage view.">
<ph name="THIS__COVERAGEINFO_SIZE_______">$1s<ex>12345</ex></ph> bytes <ph name="THIS__COVERAGEINFO_SIZE_______">$1s<ex>12345</ex></ph> bytes
</message> </message>
<message name="IDS_DEVTOOLS_02a3a357710cc2a5dfdfb74ed012fb59" desc="Text in Timeline UIUtils of the Performance panel">
Url
</message>
<message name="IDS_DEVTOOLS_040c4b52a3c06c6067fac76c4c7c3a2c" desc="Title of the 'Network conditions' tool in the bottom drawer"> <message name="IDS_DEVTOOLS_040c4b52a3c06c6067fac76c4c7c3a2c" desc="Title of the 'Network conditions' tool in the bottom drawer">
Network conditions Network conditions
</message> </message>
......
...@@ -729,6 +729,12 @@ Network.NetworkRequestNode = class extends Network.NetworkNode { ...@@ -729,6 +729,12 @@ Network.NetworkRequestNode = class extends Network.NetworkNode {
case 'name': case 'name':
this._renderNameCell(cell); this._renderNameCell(cell);
break; break;
case 'path':
this._setTextAndTitle(cell, this._request.pathname);
break;
case 'url':
this._setTextAndTitle(cell, this._request.url());
break;
case 'method': case 'method':
this._setTextAndTitle(cell, this._request.requestMethod); this._setTextAndTitle(cell, this._request.requestMethod);
break; break;
......
...@@ -668,7 +668,6 @@ Network.NetworkLogViewColumns._defaultColumnConfig = { ...@@ -668,7 +668,6 @@ Network.NetworkLogViewColumns._defaultColumnConfig = {
hideable: true, hideable: true,
nonSelectable: true, nonSelectable: true,
isResponseHeader: false, isResponseHeader: false,
alwaysVisible: false,
isCustomHeader: false isCustomHeader: false
}; };
...@@ -684,9 +683,22 @@ Network.NetworkLogViewColumns._defaultColumns = [ ...@@ -684,9 +683,22 @@ Network.NetworkLogViewColumns._defaultColumns = [
weight: 20, weight: 20,
hideable: false, hideable: false,
nonSelectable: false, nonSelectable: false,
alwaysVisible: true,
sortingFunction: Network.NetworkRequestNode.NameComparator sortingFunction: Network.NetworkRequestNode.NameComparator
}, },
{
id: 'path',
title: ls`Path`,
nonSelectable: false,
hideable: true,
sortingFunction: Network.NetworkRequestNode.RequestPropertyComparator.bind(null, 'path')
},
{
id: 'url',
title: ls`Url`,
nonSelectable: false,
hideable: true,
sortingFunction: Network.NetworkRequestNode.RequestPropertyComparator.bind(null, 'url')
},
{ {
id: 'method', id: 'method',
title: Common.UIString('Method'), title: Common.UIString('Method'),
......
...@@ -642,6 +642,13 @@ export default class NetworkRequest extends Common.Object { ...@@ -642,6 +642,13 @@ export default class NetworkRequest extends Common.Object {
return lastSlashIndex !== -1 ? path.substring(0, lastSlashIndex) : ''; return lastSlashIndex !== -1 ? path.substring(0, lastSlashIndex) : '';
} }
/**
* @return {string}
*/
get pathname() {
return this._parsedURL.path;
}
/** /**
* @return {!Common.ResourceType} * @return {!Common.ResourceType}
*/ */
......
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
<message name="IDS_DEVTOOLS_01ea16e89d02c33ef2a6a5db67665e0a" desc="Text in Timeline Flame Chart Data Provider of the Performance panel"> <message name="IDS_DEVTOOLS_01ea16e89d02c33ef2a6a5db67665e0a" desc="Text in Timeline Flame Chart Data Provider of the Performance panel">
Main — <ph name="TRACK_URL">$1s<ex>example.com</ex></ph> Main — <ph name="TRACK_URL">$1s<ex>example.com</ex></ph>
</message> </message>
<message name="IDS_DEVTOOLS_02a3a357710cc2a5dfdfb74ed012fb59" desc="Text in Timeline UIUtils of the Performance panel">
Url
</message>
<message name="IDS_DEVTOOLS_04cbdd8baeb482d9ff2e48b186479a06" desc="Text in Timeline UIUtils of the Performance panel"> <message name="IDS_DEVTOOLS_04cbdd8baeb482d9ff2e48b186479a06" desc="Text in Timeline UIUtils of the Performance panel">
Streaming Wasm Response Streaming Wasm Response
</message> </message>
......
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