#NEWLINE# def Layout( self , request , response ) : #NEWLINE# #INDENT# 'Update the progress bar based on the progress reported.' #NEWLINE# self . flow_name = request . REQ . get ( 'flow_path' , '' ) . split ( '/' ) [ ( - 1 ) ] #NEWLINE# try : #NEWLINE# #INDENT# flow_class = flow . GRRFlow . classes [ self . flow_name ] #NEWLINE# if ( not aff4 . issubclass ( flow_class , flow . GRRFlow ) ) : #NEWLINE# #INDENT# return response #NEWLINE# #UNINDENT# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return response #NEWLINE# #UNINDENT# self . states = [ ] #NEWLINE# for state_method in flow_class . __dict__ . values ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# next_states = state_method . next_states #NEWLINE# try : #NEWLINE# #INDENT# func_doc = state_method . func_doc . split ( '\n' ) [ 0 ] . strip ( ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# func_doc = '' #NEWLINE# #UNINDENT# self . states . append ( ( state_method . func_name , func_doc , ', ' . join ( next_states ) ) ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# prototypes = [ ] #NEWLINE# for type_descriptor in flow_class . args_type . type_infos : #NEWLINE# #INDENT# if ( not type_descriptor . hidden ) : #NEWLINE# #INDENT# prototypes . append ( ( '%s' % type_descriptor . name ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . prototype = ( '%s(%s)' % ( flow_class . __name__ , ', ' . join ( prototypes ) ) ) #NEWLINE# self . flow_doc = state_method . __doc__ #NEWLINE# return super ( FlowInformation , self ) . Layout ( request , response )