File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 1+ function filterStatsGraphs ( event , container ) {
2+ const filter = event . target . value ;
3+ const filters = filter . split ( ',' ) ;
4+ container . childNodes . forEach ( node => {
5+ if ( node . nodeName !== 'DETAILS' ) {
6+ return ;
7+ }
8+ const statsType = node . attributes [ 'data-statsType' ] ;
9+ if ( ! filter || filters . includes ( statsType ) ||
10+ filters . find ( f => statsType . includes ( f ) ) ) {
11+ node . style . display = 'block' ;
12+ } else {
13+ node . style . display = 'none' ;
14+ }
15+ } ) ;
16+ }
17+
118export function createContainers ( connid , url , containers ) {
219 let el ;
320 const container = document . createElement ( 'details' ) ;
Original file line number Diff line number Diff line change @@ -533,20 +533,3 @@ function processConnections(connectionIds, data) {
533533 }
534534 } ) ;
535535}
536-
537- function filterStatsGraphs ( event , container ) {
538- const filter = event . target . value ;
539- const filters = filter . split ( ',' ) ;
540- container . childNodes . forEach ( node => {
541- if ( node . nodeName !== 'DETAILS' ) {
542- return ;
543- }
544- const statsType = node . attributes [ 'data-statsType' ] ;
545- if ( ! filter || filters . includes ( statsType ) ||
546- filters . find ( f => statsType . includes ( f ) ) ) {
547- node . style . display = 'block' ;
548- } else {
549- node . style . display = 'none' ;
550- }
551- } ) ;
552- }
You can’t perform that action at this time.
0 commit comments