@@ -28,8 +28,7 @@ const filter = (list, toFilter) => {
2828 } ) ;
2929} ;
3030
31-
32- const emptyMessage = 'No issues detected in these files!'
31+ const emptyMessage = "No issues detected in these files!" ;
3332
3433export class GuidedInspectorPage extends Page {
3534 constructor ( ...args ) {
@@ -58,11 +57,11 @@ export class GuidedInspectorPage extends Page {
5857
5958 getStatus = ( list ) => {
6059 return list . reduce ( ( acc , o ) => {
61- const res = getMessageType ( o )
62- if ( acc === ' error' ) return acc
63- else return res
64- } , ' valid' )
65- }
60+ const res = getMessageType ( o ) ;
61+ if ( acc === " error" ) return acc ;
62+ else return res ;
63+ } , " valid" ) ;
64+ } ;
6665
6766 render ( ) {
6867 const { globalState } = this . info ;
@@ -80,8 +79,6 @@ export class GuidedInspectorPage extends Page {
8079 . flat ( ) ;
8180 return html ` ${ until (
8281 ( async ( ) => {
83-
84-
8582 if ( fileArr . length <= 1 ) {
8683 const items =
8784 inspector ??
@@ -101,58 +98,54 @@ export class GuidedInspectorPage extends Page {
10198 return truncateFilePaths ( report , path ) ;
10299 } ) ( ) ;
103100
104-
105101 const _instances = fileArr . map ( ( { subject, session, info } ) => {
102+ const file_path = [ `sub-${ subject } ` , `sub-${ subject } _ses-${ session } ` ] ;
103+ const filtered = removeFilePaths ( filter ( items , { file_path } ) ) ;
106104
107- const file_path = [ `sub-${ subject } ` , `sub-${ subject } _ses-${ session } ` ]
108- const filtered = removeFilePaths ( filter ( items , { file_path } ) )
109-
110- const display = ( ) => new InspectorList ( { items : filtered , emptyMessage } )
111- display . status = this . getStatus ( filtered )
105+ const display = ( ) => new InspectorList ( { items : filtered , emptyMessage } ) ;
106+ display . status = this . getStatus ( filtered ) ;
112107
113108 return {
114109 subject,
115110 session,
116- display
111+ display,
117112 } ;
118113 } ) ;
119114
120115 const instances = _instances . reduce ( ( acc , { subject, session, display } ) => {
121- const subLabel = `sub-${ subject } `
116+ const subLabel = `sub-${ subject } ` ;
122117 if ( ! acc [ `sub-${ subject } ` ] ) acc [ subLabel ] = { } ;
123118 acc [ subLabel ] [ `ses-${ session } ` ] = display ;
124119 return acc ;
125120 } , { } ) ;
126121
127122 Object . keys ( instances ) . forEach ( ( subLabel ) => {
128-
129123 const subItems = filter ( items , { file_path : `${ subLabel } ${ nodePath . sep } ${ subLabel } _ses-` } ) ; // NOTE: This will not run on web-only now
130124 const path = getSharedPath ( subItems . map ( ( o ) => o . file_path ) ) ;
131- const filtered = truncateFilePaths ( subItems , path )
125+ const filtered = truncateFilePaths ( subItems , path ) ;
132126
133- const display = ( ) => new InspectorList ( { items : filtered , emptyMessage } )
134- display . status = this . getStatus ( filtered )
127+ const display = ( ) => new InspectorList ( { items : filtered , emptyMessage } ) ;
128+ display . status = this . getStatus ( filtered ) ;
135129
136130 instances [ subLabel ] = {
137131 [ "All Files" ] : display ,
138132 ...instances [ subLabel ] ,
139133 } ;
140134 } ) ;
141135
142- const allDisplay = ( ) => new InspectorList ( { items, emptyMessage } )
143- allDisplay . status = this . getStatus ( items )
136+ const allDisplay = ( ) => new InspectorList ( { items, emptyMessage } ) ;
137+ allDisplay . status = this . getStatus ( items ) ;
144138
145-
146139 const allInstances = {
147140 [ "All Files" ] : allDisplay ,
148141 ...instances ,
149- }
142+ } ;
150143
151144 const manager = new InstanceManager ( {
152- instances :allInstances
145+ instances : allInstances ,
153146 } ) ;
154-
155- return manager
147+
148+ return manager ;
156149 } ) ( ) ,
157150 ""
158151 ) } `;
0 commit comments