Class: Session

Session(id, label)

This class represents a performance analysis session.

Constructor

new Session(id, label)

Constructs a Session object, which is the main place for storing all information about a performance analysis session.

Parameters:
Name Type Description
id String

ID of a session as known by the server.

label String

Human-readable label of a session.

Source:

Members

instances

Static dictionary storing all instances of a Session class under their IDs.

Source:

Methods

sendRequest(entity, node, module, data, done_func, fail_func, content_type)

Sends a request to the server side of Adaptyst Analyser. The request will be handled by the Python code of a corresponding Adaptyst Analyser module.

Use Window.sendRequest() to send requests if you can. Calling Session.sendRequest() is preferred only in case you don't have an eligible Window-inheriting object and don't want to create one.

Parameters:
Name Type Description
entity String

ID of an entity.

node String

ID of a node.

module String

Name of a module.

data Object

Data to be sent in form of JSON.

done_func

Function to be called when the request succeeds. The function must take exactly one argument which is the content returned by the server side.

fail_func

Function to be called when the request fails for any reason. The function must take exactly the arguments described in the "error" entry of "settings" in the jQuery.ajax() documentation here.

content_type String

Content type expected from the server side. Use one of the values explained in the "dataType" entry in "settings" in the jQuery.ajax documentation here. It can be undefined, this is then interpreted as 'json'.

Source: