@@ -31,8 +31,12 @@ class CurrentOpComponent extends React.Component {
31
31
*/
32
32
componentDidMount ( ) {
33
33
this . unsubscribeRefresh = this . props . store . listen ( this . refresh . bind ( this ) ) ;
34
- this . unsubscribeShowOperationDetails = Actions . showOperationDetails . listen ( this . hide . bind ( this ) ) ;
35
- this . unsubscribeHideOperationDetails = Actions . hideOperationDetails . listen ( this . show . bind ( this ) ) ;
34
+ this . unsubscribeShowOperationDetails = Actions . showOperationDetails . listen (
35
+ this . hide . bind ( this )
36
+ ) ;
37
+ this . unsubscribeHideOperationDetails = Actions . hideOperationDetails . listen (
38
+ this . show . bind ( this )
39
+ ) ;
36
40
37
41
if ( ! DBErrorStore . ops . currentOp ) {
38
42
this . unsubscribeError = DBErrorStore . listen ( this . stop . bind ( this ) ) ;
@@ -125,9 +129,7 @@ class CurrentOpComponent extends React.Component {
125
129
< header className = "rt-lists__header" >
126
130
< h2 className = "rt-lists__headerlabel" > Slowest Operations</ h2 >
127
131
</ header >
128
- < div
129
- data-testid = "no-slow-operations"
130
- className = "rt-lists__empty-error" >
132
+ < div data-testid = "no-slow-operations" className = "rt-lists__empty-error" >
131
133
✔ No Slow Operations
132
134
</ div >
133
135
</ div >
@@ -141,9 +143,14 @@ class CurrentOpComponent extends React.Component {
141
143
*/
142
144
renderGraph ( ) {
143
145
const showOperationDetails = this . showOperationDetails ;
144
- const rows = this . state . data . map ( function ( row , i ) {
146
+ const rows = this . state . data . map ( function ( row , i ) {
145
147
return (
146
- < li className = "rt-lists__item rt-lists__item--slow" onClick = { showOperationDetails . bind ( null , row ) } key = { `list-item-${ i } ` } >
148
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
149
+ < li
150
+ className = "rt-lists__item rt-lists__item--slow"
151
+ onClick = { showOperationDetails . bind ( null , row ) }
152
+ key = { `list-item-${ i } ` }
153
+ >
147
154
< div className = "rt-lists__op" > { row . op } </ div >
148
155
< div className = "rt-lists__collection-slow" > { row . ns } </ div >
149
156
< div className = "rt-lists__time" > { row . ms_running + ' ms' } </ div >
@@ -156,9 +163,7 @@ class CurrentOpComponent extends React.Component {
156
163
< h2 className = "rt-lists__headerlabel" > Slowest Operations</ h2 >
157
164
</ header >
158
165
< div className = "rt-lists__listdiv" id = "div-scroll" >
159
- < ul className = "rt-lists__list" >
160
- { rows }
161
- </ ul >
166
+ < ul className = "rt-lists__list" > { rows } </ ul >
162
167
</ div >
163
168
</ div >
164
169
) ;
@@ -182,7 +187,7 @@ class CurrentOpComponent extends React.Component {
182
187
183
188
CurrentOpComponent . propTypes = {
184
189
store : PropTypes . any . isRequired ,
185
- interval : PropTypes . number . isRequired
190
+ interval : PropTypes . number . isRequired ,
186
191
} ;
187
192
188
193
CurrentOpComponent . displayName = 'CurrentOpComponent' ;
0 commit comments