PHP Class Scalr_UI_Controller_Admin_Analytics_Costcenters

Inheritance: extends Scalr_UI_Controller, use trait Scalr\Stats\CostAnalytics\Forecast
Exibir arquivo Open project: scalr/scalr

Public Methods

Method Description
defaultAction ( )
editAction ( string $ccId = null ) Edit cost center action
hasAccess ( )
moveProjectsAction ( string $ccId ) Action for managing projects
notificationsAction ( string $ccId )
xGetMovingAverageToDateAction ( string $ccId, string $mode, string $date, string $startDate, string $endDate ) xGetMovingAverageToDateAction
xGetPeriodDataAction ( string $ccId, string $mode, string $startDate, string $endDate ) xGetPeriodDataAction
xListAction ( string $query = null, boolean $showArchived = false ) xListAction
xMoveProjectsAction ( JsonData $projects = null ) xMoveProjectsAction
xRemoveAction ( string $ccId ) xRemoveAction
xSaveAction ( string $name, string $billingCode, string $leadEmail, integer $locked, string $ccId = null, string $description = null ) xSaveAction
xSaveNotificationsAction ( string $ccId, JsonData $notifications )

Private Methods

Method Description
getCostCenterData ( Scalr\Stats\CostAnalytics\Entity\CostCentreEntity $cc, string $calculate = false ) : array Gets cost centre properties and parameters
getCostCentersList ( string $query = null, boolean $showArchived = false ) : array Gets the list of the cost centres
saveNotifications ( string $ccId, string $subjectType, array $settings )
saveReports ( string $ccId, array $settings )

Method Details

defaultAction() public method

public defaultAction ( )

editAction() public method

Edit cost center action
public editAction ( string $ccId = null )
$ccId string optional Cost center identifier

hasAccess() public method

public hasAccess ( )

moveProjectsAction() public method

Action for managing projects
public moveProjectsAction ( string $ccId )
$ccId string Cost center identifier

notificationsAction() public method

public notificationsAction ( string $ccId )
$ccId string

xGetMovingAverageToDateAction() public method

xGetMovingAverageToDateAction
public xGetMovingAverageToDateAction ( string $ccId, string $mode, string $date, string $startDate, string $endDate )
$ccId string The identifier of the Cost center
$mode string The mode
$date string The date within specified period 'Y-m-d H:00'
$startDate string The start date of the period 'Y-m-d'
$endDate string The end date of the period 'Y-m-d'

xGetPeriodDataAction() public method

xGetPeriodDataAction
public xGetPeriodDataAction ( string $ccId, string $mode, string $startDate, string $endDate )
$ccId string The identifier of the cost center (UUID)
$mode string Mode (week, month, quarter, year, custom)
$startDate string Start date in UTC (Y-m-d)
$endDate string End date in UTC (Y-m-d)

xListAction() public method

xListAction
public xListAction ( string $query = null, boolean $showArchived = false )
$query string optional Search query
$showArchived boolean optional show old archived cost centers

xMoveProjectsAction() public method

xMoveProjectsAction
public xMoveProjectsAction ( JsonData $projects = null )
$projects Scalr\UI\Request\JsonData Projects that should be moved

xRemoveAction() public method

xRemoveAction
public xRemoveAction ( string $ccId )
$ccId string Cost center identifier

xSaveAction() public method

xSaveAction
public xSaveAction ( string $name, string $billingCode, string $leadEmail, integer $locked, string $ccId = null, string $description = null )
$name string Cost center name
$billingCode string Cost center billing code
$leadEmail string Cost center lead's email address
$locked integer 1 if locked. 0 otherwise.
$ccId string optional Cost center identifier
$description string optional Description

xSaveNotificationsAction() public method

public xSaveNotificationsAction ( string $ccId, JsonData $notifications )
$ccId string
$notifications Scalr\UI\Request\JsonData