mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 16:57:00 +08:00
Reland "[devtools] Add Url and Path Column to Network Log"
This is a reland of 12915a6957ebe9ca20ef30c0e5141ad1dee87a7d 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/+/1823859 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#707746} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 923cd866fb089619bbbd971ff16cd7d766c1fb67 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871557 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
4a1e8c7288
commit
3d970e3f33
@@ -7,6 +7,9 @@
|
||||
<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
|
||||
</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">
|
||||
Network conditions
|
||||
</message>
|
||||
|
||||
@@ -729,6 +729,12 @@ Network.NetworkRequestNode = class extends Network.NetworkNode {
|
||||
case 'name':
|
||||
this._renderNameCell(cell);
|
||||
break;
|
||||
case 'path':
|
||||
this._setTextAndTitle(cell, this._request.pathname);
|
||||
break;
|
||||
case 'url':
|
||||
this._setTextAndTitle(cell, this._request.url());
|
||||
break;
|
||||
case 'method':
|
||||
this._setTextAndTitle(cell, this._request.requestMethod);
|
||||
break;
|
||||
|
||||
@@ -668,7 +668,6 @@ Network.NetworkLogViewColumns._defaultColumnConfig = {
|
||||
hideable: true,
|
||||
nonSelectable: true,
|
||||
isResponseHeader: false,
|
||||
alwaysVisible: false,
|
||||
isCustomHeader: false
|
||||
};
|
||||
|
||||
@@ -684,9 +683,22 @@ Network.NetworkLogViewColumns._defaultColumns = [
|
||||
weight: 20,
|
||||
hideable: false,
|
||||
nonSelectable: false,
|
||||
alwaysVisible: true,
|
||||
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',
|
||||
title: Common.UIString('Method'),
|
||||
|
||||
@@ -642,6 +642,13 @@ export default class NetworkRequest extends Common.Object {
|
||||
return lastSlashIndex !== -1 ? path.substring(0, lastSlashIndex) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
get pathname() {
|
||||
return this._parsedURL.path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Common.ResourceType}
|
||||
*/
|
||||
@@ -1645,4 +1652,4 @@ SDK.NetworkRequest.BlockedSetCookieWithReason;
|
||||
* responseHeadersText: (string|undefined)
|
||||
* }}
|
||||
*/
|
||||
SDK.NetworkRequest.ExtraResponseInfo;
|
||||
SDK.NetworkRequest.ExtraResponseInfo;
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
<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>
|
||||
</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">
|
||||
Streaming Wasm Response
|
||||
</message>
|
||||
|
||||
Reference in New Issue
Block a user