diff --git a/module/metric/model.php b/module/metric/model.php index fe03e90a2a..e51a5083f2 100755 --- a/module/metric/model.php +++ b/module/metric/model.php @@ -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.