* Add method to get metric pairs.
This commit is contained in:
@@ -16,6 +16,27 @@ class metricModel extends model
|
||||
{
|
||||
public $errorInfo = '';
|
||||
|
||||
/**
|
||||
* Get scope pairs.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getScopePairs()
|
||||
{
|
||||
$scopePairs = array();
|
||||
foreach($this->config->metric->scopeList as $scope)
|
||||
{
|
||||
$scopePair = new stdclass();
|
||||
$scopePair->value = $scope;
|
||||
$scopePair->label = $this->lang->metric->scopeList[$scope];
|
||||
|
||||
$scopePairs[] = $scopePair;
|
||||
}
|
||||
|
||||
return $scopePairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取度量项数据列表。
|
||||
* Get metric data list.
|
||||
|
||||
Reference in New Issue
Block a user