#NEWLINE# def get( self , service_name ) : #NEWLINE# #INDENT# ' Displays a list of hosts that have logs for the given service. ' #NEWLINE# is_cloud_admin = self . helper . is_user_cloud_admin ( ) #NEWLINE# apps_user_is_admin_on = self . helper . get_owned_apps ( ) #NEWLINE# if ( ( not is_cloud_admin ) and ( service_name not in apps_user_is_admin_on ) ) : #NEWLINE# #INDENT# self . redirect ( StatusPage . PATH , self . response ) #NEWLINE# #UNINDENT# service = LoggedService . get_by_id ( service_name ) #NEWLINE# if service : #NEWLINE# #INDENT# exists = True #NEWLINE# hosts = service . hosts #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# exists = False #NEWLINE# hosts = [ ] #NEWLINE# #UNINDENT# self . render_page ( page = 'logs' , template_file = self . TEMPLATE , values = { #NEWLINE# #INDENT# 'exists' : exists , #NEWLINE# 'service_name' : service_name , #NEWLINE# 'hosts' : hosts , #NEWLINE# #UNINDENT# } )