File tree 4 files changed +66
-0
lines changed
4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 5
5
border-top : $border ;
6
6
}
7
7
8
+ .no-data {
9
+ display : flex ;
10
+ flex-direction : column ;
11
+ align-items : center ;
12
+ padding-top : $size-xxxl ;
13
+
14
+ .network-icon {
15
+ fill : $brand-primary-light-gray ;
16
+ height : $size-xl ;
17
+ width : $size-xl ;
18
+ }
19
+
20
+ .header {
21
+ padding : $size-xl 0 $size-s 0 ;
22
+ font-weight : 600 ;
23
+ color : $brand-primary-dark-gray ;
24
+ }
25
+
26
+ .subtext {
27
+ color : $brand-primary-gray ;
28
+ }
29
+ }
30
+
31
+
8
32
.network-table-header {
9
33
display : flex ;
10
34
width : 100% ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { TABLE_ENTRY_HEIGHT } from '../../constants';
8
8
import { useResizeObserver } from '../../hooks/useResizeObserver' ;
9
9
import Styles from './NetworkTable.styles.scss' ;
10
10
import { useTheme } from '../../state/theme/Context' ;
11
+ import IconNetworkRequest from '../../icons/IconNetworkRequest' ;
11
12
12
13
/* eslint no-underscore-dangle: 0 */
13
14
@@ -45,6 +46,7 @@ const NetworkTableBody = ({ height }) => {
45
46
const { enableAutoScroll } = useTheme ( ) ;
46
47
const numberOfNewEntries = state . get ( 'numberOfNewEntries' ) ;
47
48
const data = state . get ( 'data' ) ;
49
+ const actualData = state . get ( 'actualData' ) ;
48
50
const totalNetworkTime = state . get ( 'totalNetworkTime' ) ;
49
51
const selectedReqIndex = state . get ( 'selectedReqIndex' ) ;
50
52
@@ -75,6 +77,19 @@ const NetworkTableBody = ({ height }) => {
75
77
callbacks . onRequestSelect ( payload ) ;
76
78
} ;
77
79
80
+ if ( actualData . size === 0 ) {
81
+ return (
82
+ < div
83
+ ref = { ref }
84
+ className = { Styles [ 'no-data' ] }
85
+ >
86
+ < IconNetworkRequest className = { Styles [ 'network-icon' ] } />
87
+ < span className = { Styles . header } > Recording network activity</ span >
88
+ < span className = { Styles . subtext } > Perform a request to see the network activity</ span >
89
+ </ div >
90
+ ) ;
91
+ }
92
+
78
93
return (
79
94
< >
80
95
< FixedSizeList
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
3
+
4
+ const IconNetworkRequest = ( { className } ) => (
5
+ < svg
6
+ className = { className }
7
+ height = "24"
8
+ viewBox = "0 0 24 24"
9
+ width = "24"
10
+ xmlns = "http://www.w3.org/2000/svg"
11
+ >
12
+ < path d = "M5.5 14.4999C5.5 14.7761 5.72386 14.9999 6 14.9999H8C8.27614 14.9999 8.5 14.7761 8.5 14.4999V6.99994H12.5697C12.7399 6.99994 12.8323 6.80096 12.7225 6.67093L7.1531 0.0736706C7.0732 -0.0209768 6.92735 -0.0209758 6.84745 0.0736716L1.27803 6.67093C1.16826 6.80096 1.26069 6.99994 1.43085 6.99994H5.5V14.4999Z" />
13
+ < path d = "M15.5 9.49994C15.5 9.2238 15.7239 8.99994 16 8.99994H18C18.2761 8.99994 18.5 9.2238 18.5 9.49994V16.9999H22.5697C22.7399 16.9999 22.8323 17.1989 22.7225 17.329L17.1531 23.9262C17.0732 24.0209 16.9274 24.0209 16.8474 23.9262L11.278 17.329C11.1683 17.1989 11.2607 16.9999 11.4309 16.9999H15.5V9.49994Z" />
14
+ </ svg >
15
+
16
+ ) ;
17
+
18
+ IconNetworkRequest . propTypes = {
19
+ className : PropTypes . string ,
20
+ } ;
21
+
22
+ IconNetworkRequest . defaultProps = {
23
+ className : '' ,
24
+ } ;
25
+
26
+ export default IconNetworkRequest ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ $brand-success: #70be44;
4
4
$brand-warning : #f68d38 ;
5
5
$brand-primary-dark-gray : #1E2127 ;
6
6
$brand-primary-gray : #6D7584 ;
7
+ $brand-primary-light-gray : #979EAB ;
7
8
$dark-gray : #5c7288 ;
8
9
$bg-blue-50 : #e6f1fd ;
9
10
$bg-gray-90 : #F7F8FA ;
You can’t perform that action at this time.
0 commit comments