
    k                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	K
Jr   " S
 S\R                  5      rg)zThe Browse command.    )absolute_import)division)unicode_literals)base)browser_dispatcher)flags)log)
propertiesc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Browse   z/Open the specified service(s) in a browser.

  EXAMPLESa            To show the url for the default service in the browser, run:

              $ {command} default

          To show version `v1` of service `myService` in the browser, run:

              $ {command} myService --version="v1"

          To show multiple services side-by-side, run:

              $ {command} default otherService

          To show multiple services side-by-side with a specific version, run:

              $ {command} s1 s2 --version=v1
          c                     U R                   R                  S5        [        R                  R	                  U 5        U R                  SSSS9  U R                  SSSS	9  g )
Nz_
          table(
            service:label=SERVICE,
            url:label=URL
          )
    services+zI        The services to open (optionally filtered by the --version flag).)nargshelpz	--versionz-vz            If specified, open services with a given version. If not
            specified, use a version based on the service's traffic split .
            )r   )display_info	AddFormatr   LAUNCH_BROWSERAddToParseradd_argument)parsers    "lib/surface/app/services/browse.pyArgsBrowse.Args7   sq    
!! # 	 
$$V,
M  N
       c           	         [         R                  R                  R                  R	                  SS9n/ nUR
                   H?  nUR                  [        R                  " UUUR                  UR                  5      5        MA     [        U5      (       a2  UR                  (       a  [        R                  R                  S5        U$ g)z5Launch a browser, or return a table of URLs to print.T)requiredz@Did not detect your browser. Go to these links to view your app:N)r
   VALUEScoreprojectGetr   appendr   	BrowseAppversionlaunch_browseranyr	   statusPrint)selfargsr"   outputsservices        r   Run
Browse.RunM   s    $$,,00$0?GG==nn'11'2926,,262E2EG H !
 7||			

N	Pnr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r/   __static_attributes__r1   r   r   r   r      s1    
  -(  *r   r   N)r6   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.appr   r   googlecloudsdk.corer	   r
   Commandr   r1   r   r   <module>r?      s4      '  ' ( = 0 # *>T\\ >r   