#NEWLINE# @ property #NEWLINE# def rows( self ) : #NEWLINE# #INDENT# domains = [ res [ '_source' ] for res in self . es_results . get ( 'hits' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'hits' , [ ] ) ] #NEWLINE# def format_date( dstr , default ) : #NEWLINE# #INDENT# return ( datetime . strptime ( dstr [ : 19 ] , '%Y-%m-%dT%H:%M:%S' ) . strftime ( '%Y/%m/%d %H:%M:%S' ) if dstr else default ) #NEWLINE# #UNINDENT# for dom in domains : #NEWLINE# #INDENT# if ( 'name' in dom ) : #NEWLINE# #INDENT# ( yield [ ( dom . get ( 'hr_name' ) or dom . get ( 'name' ) ) , self . get_name_or_link ( dom , internal_settings = True ) , format_date ( dom . get ( 'date_created' ) , _ ( 'No date' ) ) , ( dom . get ( 'internal' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'organization_name' ) or _ ( 'No org' ) ) , format_date ( ( dom . get ( 'deployment' ) or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'date' ) , _ ( 'No date' ) ) , ( ( dom . get ( 'deployment' ) or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'countries' ) or _ ( 'No countries' ) ) , dom . get ( 'cp_n_active_cc_users' , _ ( 'Not yet calculated' ) ) , dom . get ( 'cp_n_forms' , _ ( 'Not yet calculated' ) ) , dom . get ( 'cp_n_forms_30_d' , _ ( 'Not yet calculated' ) ) , ( dom . get ( 'internal' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'notes' ) or _ ( 'No notes' ) ) , ( dom . get ( 'internal' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'area' ) or _ ( 'No info' ) ) , ( dom . get ( 'internal' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'sub_area' ) or _ ( 'No info' ) ) ] )