private String getVerboseConfig ( ) { StringBuilder builder = new StringBuilder ( ) ; GridHubConfiguration config = getRegistry ( ) . getHub ( ) . getConfiguration ( ) ; builder . append ( "<div id='verbose-config-container'>" ) ; builder . append ( "<a id='verbose-config-view-toggle' href='#'>View Verbose</a>" ) ; builder . append ( "<div id='verbose-config-content'>" ) ; GridHubConfiguration tmp = new GridHubConfiguration ( ) ; builder . append ( "<br/><b>The final configuration comes from:</b><br/>" ) ; builder . append ( "<b>the default :</b><br/>" ) ; builder . append ( prettyHtmlPrint ( tmp ) ) ; if ( config . getRawArgs ( ) != null ) { builder . append ( "<b>updated with command line options:</b><br/>" ) ; builder . append ( String . join ( " " , config . getRawArgs ( ) ) ) ; if ( config . getConfigFile ( ) != null ) { builder . append ( "<br/><b>and configuration loaded from " ) . append ( config . getConfigFile ( ) ) . append ( ":</b><br/>" ) ; try { builder . append ( String . join ( "<br/>" , Files . readAllLines ( new File ( config . getConfigFile ( ) ) . toPath ( ) ) ) ) ; } catch ( IOException e ) { builder . append ( "<b>" ) . append ( e . getMessage ( ) ) . append ( "</b>" ) ; } } } builder . append ( "</div>" ) ; // End of Verbose Content builder . append ( "</div>" ) ; // End of Verbose Container return builder . toString ( ) ; }
Displays more detailed configuration