Package Products :: Package Zuul :: Package routers :: Module report :: Class ReportRouter
[hide private]
[frames] | no frames]

Class ReportRouter

source code

ZenUtils.Ext.DirectRouter --+    
                            |    
                   TreeRouter --+
                                |
                               ReportRouter

A JSON/ExtDirect interface to operations on reports

Instance Methods [hide private]
 
__init__(self, context, request) source code
 
_getFacade(self)
Abstract method for child classes to use to get their facade
source code
[dictionary]
getTree(self, id)
Returns the tree structure of an organizer hierarchy where the root node is the organizer identified by the id parameter.
source code
DirectResponse
getReportTypes(self)
Get the available report types.
source code
[dictionary]
asyncGetTree(self, id=None)
Server side method for asynchronous tree calls.
source code
DirectResponse
addNode(self, nodeType, contextUid, id)
Add a new report or report organizer.
source code
[dictionary]
deleteNode(self, uid)
Remove a report or report organizer.
source code
 
_getTreeUpdates(self, contextUid, newId=None) source code
[dictionary]
moveNode(self, uid, target)
Move a report or report organizer from one organizer to another.
source code
 
_treeMoveUpdates(self, uid, target) source code
 
_marshalPath(self, contextUid, newId=None, localKeys=None) source code
 
_correctReportTitles(self, data) source code
 
getGraphReportDefs(self, uid, drange=None)
Returns the json necessary for rendering graphs with the metric service for each component in the graph definition.
source code
 
getMultiGraphReportDefs(self, uid, drange=None)
Gets the json necessary for rendering graphs with the metric services for multi graph reports.
source code

Inherited from TreeRouter: gunzip_b64, gzip_b64, moveOrganizer, objectExists

Inherited from TreeRouter (private): _canDeleteUid

Method Details [hide private]

_getFacade(self)

source code 

Abstract method for child classes to use to get their facade

Overrides: TreeRouter._getFacade
(inherited documentation)

getTree(self, id)

source code 

Returns the tree structure of an organizer hierarchy where the root node is the organizer identified by the id parameter.

Parameters:
  • id (string) - Id of the root node of the tree to be returned
Returns: [dictionary]
Object representing the tree

getReportTypes(self)

source code 

Get the available report types.

Returns: DirectResponse
Properties:
  • menuText: ([string]) Human readable list of report types
  • reportTypes: ([string]) A list of the available report types

asyncGetTree(self, id=None)

source code 

Server side method for asynchronous tree calls. Retrieves the immediate children of the node specified by "id"

NOTE: our convention on the UI side is if we are asking for the root node then return the root and its children otherwise just return the children

Parameters:
  • id - The uid of the node we are getting the children for
Returns: [dictionary]
Object representing the immediate children
Overrides: TreeRouter.asyncGetTree
(inherited documentation)

addNode(self, nodeType, contextUid, id)

source code 

Add a new report or report organizer.

Parameters:
  • nodeType (string) - Type of new node. Can either be 'organizer' or one of the report types returned from getReportTypes()
  • contextUid (string) - The organizer where the new node should be added
  • id (string) - The new node's ID
Returns: DirectResponse
Properties:
  • tree: (dictionary) Object representing the new Reports tree
  • newNode: (dictionary) Object representing the added node
Decorators:
  • @require('Manage DMD')
Overrides: TreeRouter.addNode

deleteNode(self, uid)

source code 

Remove a report or report organizer.

Parameters:
  • uid (string) - The UID of the node to delete
Returns: [dictionary]
Properties:
  • tree: (dictionary) Object representing the new Reports tree
Decorators:
  • @require('Manage DMD')
Overrides: TreeRouter.deleteNode

moveNode(self, uid, target)

source code 

Move a report or report organizer from one organizer to another.

Parameters:
  • uid (string) - The UID of node to move
  • target (string) - The UID of the target Report organizer
Returns: [dictionary]
Properties:
  • tree: (dictionary) Object representing the new Reports tree
  • newNode: (dictionary) Object representing the moved node
Decorators:
  • @require('Manage DMD')

getGraphReportDefs(self, uid, drange=None)

source code 

Returns the json necessary for rendering graphs with the metric service for each component in the graph definition.

Parameters:
  • uid (string) - unique identifier of an object

getMultiGraphReportDefs(self, uid, drange=None)

source code 

Gets the json necessary for rendering graphs with the metric services for multi graph reports.

Parameters:
  • uid (string) - unique identifier of an object