How to use the dirac.lib.webconfig.gWebConfig.getSchemaSections 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 htmlSchemaAreas( areasList = False ):
  actualWebPath = currentPath()
  dirList = [ dir.strip() for dir in actualWebPath.split( "/" ) if not dir.strip() == "" ]
  htmlData = ""
  if not areasList:
    areasList = gWebConfig.getSchemaSections( "" )
  for area in areasList:
    htmlData += "" % area
    if area.lower() == dirList[0]:
      htmlData += "<div class="selectedLabel" id="%sMenuAnchor">" % area
    else:
      htmlData += "<div class="label" id="%sMenuAnchor">" % area
    htmlData += "%s</div>\n" % area.capitalize()
  return htmlData
</div>
github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / webBase.py View on Github external
def getSchemaContents( section = "" ):
  subContents = []
  for subSection in gWebConfig.getSchemaSections( section ):
    subSectionPath = "%s/%s" % ( section, subSection )
    subJSTxt = getSchemaContents( subSectionPath )
    if len( subJSTxt ) > 0:
      subContents.append( "{ text: '%s', menu : %s }" % ( subSection.capitalize(), subJSTxt ) )
  for page in gWebConfig.getSchemaPages( section ):
    pageData = gWebConfig.getSchemaPageData( "%s/%s" % ( section, page ) )
    if len( pageData ) is not 3:
      continue
    if not checkPropertiesWithUser( pageData[2:] ):
      continue
    if pageData[0].find( "http" ) == 0:
      pagePath = pageData[0]
    else:
      pagePath = diracURL( "/%s" % ( pageData[0] ) )
    subContents.append( "{ text : '%s', url : '%s' }" % ( page, pagePath ) )
github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / webBase.py View on Github external
def jsSchemaSection( area, section ):
  jsTxt = "["
  for subSection in gWebConfig.getSchemaSections( section ):
    subSectionPath = "%s/%s" % ( section, subSection )
    subJSTxt = jsSchemaSection( area, subSectionPath )
    if len( subJSTxt ) &gt; 0:
      jsTxt += "{ text: '%s', submenu : { id: '%s', itemdata : %s } }, " % ( subSection, subSectionPath, subJSTxt )
  for page in gWebConfig.getSchemaPages( section ):
    pageData = gWebConfig.getSchemaPageData( "%s/%s" % ( section, page ) )
    if page != "Delimiter" or len( pageData ) &lt; 3 or 'all' in pageData[2:] or credentials.getSelectedGroup() in pageData[2:]:
      if pageData[0].find( "http" ) == 0:
        pagePath = pageData[0]
      else:
        pagePath = diracURL( "/%s/%s" % ( area, pageData[0] ) )
      jsTxt += "{ text : '%s', url : '%s' }," % ( page, pagePath )
  jsTxt += "]"
  return jsTxt
github DIRACGrid / -obsolete-DIRACWeb / dirac / lib / webBase.py View on Github external
def schemaAreas():
  return gWebConfig.getSchemaSections( "" )