* Add method to get metric pairs.

This commit is contained in:
zhouxin
2023-12-01 17:31:27 +08:00
parent 67ccf80a0a
commit cbe97c9634
+21
View File
@@ -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.