#NEWLINE# def _process_panel_group_configuration( self , config ) : #NEWLINE# #INDENT# 'Adds a panel group to the dashboard.' #NEWLINE# panel_group_slug = config . get ( 'PANEL_GROUP' ) #NEWLINE# try : #NEWLINE# #INDENT# dashboard = config . get ( 'PANEL_GROUP_DASHBOARD' ) #NEWLINE# if ( not dashboard ) : #NEWLINE# #INDENT# LOG . warning ( "Skipping %s because it doesn't have PANEL_GROUP_DASHBOARD defined." , config . __name__ ) #NEWLINE# return #NEWLINE# #UNINDENT# dashboard_cls = self . get_dashboard ( dashboard ) #NEWLINE# panel_group_name = config . get ( 'PANEL_GROUP_NAME' ) #NEWLINE# if ( not panel_group_name ) : #NEWLINE# #INDENT# LOG . warning ( "Skipping %s because it doesn't have PANEL_GROUP_NAME defined." , config . __name__ ) #NEWLINE# return #NEWLINE# #UNINDENT# panel_group = type ( panel_group_slug , ( PanelGroup , ) , { #NEWLINE# #INDENT# 'slug' : panel_group_slug , #NEWLINE# 'name' : panel_group_name , #NEWLINE# 'panels' : [ ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# panels = list ( dashboard_cls . panels ) #NEWLINE# panels . append ( panel_group_slug ) #NEWLINE# dashboard_cls . panels = tuple ( panels ) #NEWLINE# dashboard_cls . _autodiscover_complete = False #NEWLINE# dashboard_cls . _autodiscover ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# LOG . warning ( 'Could not process panel group %(panel_group)s: %(exc)s' , { #NEWLINE# #INDENT# 'panel_group' : panel_group_slug , #NEWLINE# 'exc' : e , #NEWLINE# #UNINDENT# } )