How to use the dirac.lib.webconfig.gWebConfig.getSetups function in DIRAC

To help you get started, we’ve selected a few DIRAC examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / webBase.py View on Github external
def getSetups():
  availableSetups = [ "{ text : '%s', url : '%s' }" % ( setupName,
                                                      diracURL( controller = 'web/userdata',
                                                                action = 'changeSetup',
                                                                id = setupName ) ) for setupName in gWebConfig.getSetups() ]
  return "[%s]" % ",".join( availableSetups )
github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / credentials.py View on Github external
def __checkSetup( setup ):
  if setup not in gWebConfig.getSetups():
    return gWebConfig.getDefaultSetup()
  return setup
github DIRACGrid / -obsolete-DIRACWeb / dirac / controllers / web / userdata.py View on Github external
def changeSetup( self ):
    return self.__changeURLPropertyAndRedirect( 'dsetup', gWebConfig.getSetups() )
github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / credentials.py View on Github external
def getSelectedSetup():
  setup = request.environ[ 'pylons.routes_dict' ][ 'dsetup' ]
  if setup not in gWebConfig.getSetups():
   return gWebConfig.getDefaultSetup()
  return setup