WebAppHandler

The WebAppHandler module provides a class to handle web requests from the DIRAC WebApp. It is not indented to be used in diracx

class DIRAC.MonitoringSystem.Service.WebAppHandler.WebAppHandler(handlerInitDict, trid)

Bases: RequestHandler

__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service

  • trid (object) – Transport to use

auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
auth_whoami = ['all']
static export_echo(data)

This method is used for testing performance of the service

Parameters:

data (str) – data to be sent back to the caller

Returns:

S_OK, Value is the input data

classmethod export_getApplicationStates(condDict=None, older=None, newer=None)

Return Distinct Values of ApplicationStatus job Attribute in WMS

classmethod export_getDistinctAttributeValues(attribute, selectDict)
classmethod export_getJobGroups(condDict=None, older=None, cutDate=None)

Return Distinct Values of ProductionId job Attribute in WMS

export_getJobPageSummaryWeb(selectDict, sortList, startItem, maxItems, selectJobs=True)

Get the summary of the job information for a given page in the job monitor in a generic format

classmethod export_getJobStats(attribute, selectDict)

Get job statistics distribution per attribute value with a given selection

classmethod export_getJobTypes(condDict=None, older=None, newer=None)

Return Distinct Values of JobType job Attribute in WMS

classmethod export_getJobsCounters(attrList, attrDict=None, cutDate='')

Retrieve list of distinct attributes values from attrList with attrDict as condition. For each set of distinct values, count number of occurences. Return a list. Each item is a list with 2 items, the list of distinct attribute values and the counter

classmethod export_getMinorStates(condDict=None, older=None, newer=None)

Return Distinct Values of Minor Status job Attribute in WMS

classmethod export_getOwnerGroup()

Return Distinct Values of OwnerGroup from the JobDB

classmethod export_getOwners(condDict=None, older=None, newer=None)

Return Distinct Values of Owner job Attribute in WMS

classmethod export_getPilotMonitorSelectors()

Get all the distinct selector values for the Pilot Monitor web portal page

classmethod export_getPilotMonitorWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the pilot information for a given page in the pilot monitor in a generic format

classmethod export_getPilotStatistics(attribute, selectDict)

Get pilot statistics distribution per attribute value with a given selection

classmethod export_getPilotSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the pilot information for a given page in the pilot monitor in a generic format

classmethod export_getPilotsCounters(table, keys, condDict, newer=None, timeStamp='SubmissionTime')

Set the pilot agent status

classmethod export_getSiteSummarySelectors()

Get all the distinct selector values for the site summary web portal page

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSiteSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the jobs running on sites in a generic format

Parameters:
  • selectDict (dict) – selectors

  • sortList (list) – sorting list

  • startItem (int) – start item number

  • maxItems (int) – maximum of items

Returns:

S_OK(dict)/S_ERROR()

classmethod export_getSites(condDict=None, older=None, newer=None)

Return Distinct Values of Site job Attribute in WMS

classmethod export_getStates(condDict=None, older=None, newer=None)

Return Distinct Values of Status job Attribute in WMS

classmethod export_getTransformationFilesSummaryWeb(selectDict, sortList, startItem, maxItems)
classmethod export_getTransformationSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the transformation information for a given page in the generic format

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:

fromMaster (bool) – flag to refresh from the controller configuration service

export_whoami()

A simple whoami, returns all credential dictionary, except certificate chain object.

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:

Value for serviceSection/optionName in the CS being defaultValue the default

getRemoteAddress()

Get the address of the remote peer.

Returns:

Address of remote peer.

getRemoteCredentials()

Get the credentials of the remote peer.

Returns:

Credentials dictionary of remote peer.

initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(serviceInfoDict)

Initialization of DB objects

classmethod parseSelectors(selectDict=None)

Parse selectors before DB query

Parameters:

selectDict (dict) – selectors

Returns:

str, str, dict – start/end date, selectors

srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:

Value for serviceSection/optionName in the CS being defaultValue the default

srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns:

Address of remote peer.

srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns:

Credentials dictionary of remote peer.

classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_echo = [<class 'str'>]
types_getApplicationStates = []
types_getDistinctAttributeValues = [<class 'str'>, <class 'dict'>]
types_getJobGroups = []
types_getJobPageSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getJobStats = [<class 'str'>, <class 'dict'>]
types_getJobTypes = []
types_getJobsCounters = [<class 'list'>]
types_getMinorStates = []
types_getOwnerGroup = []
types_getOwners = []
types_getPilotMonitorSelectors = []
types_getPilotMonitorWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getPilotStatistics = [<class 'str'>, <class 'dict'>]
types_getPilotSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getPilotsCounters = [<class 'str'>, <class 'list'>, <class 'dict'>]
types_getSiteSummarySelectors = []
types_getSiteSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getSites = []
types_getStates = []
types_getTransformationFilesSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_getTransformationSummaryWeb = [<class 'dict'>, <class 'list'>, <class 'int'>, <class 'int'>]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_whoami = []