Index: trunk/extensions/MetricsReporting/MetricsReporting.php |
— | — | @@ -54,5 +54,8 @@ |
55 | 55 | $wgAutoloadClasses['DumpNewRegisteredEditorsMetric'] = $metricsDir . 'DumpNewRegisteredEditorsMetric.php'; |
56 | 56 | $wgMetricAPIModules['dumpnewregisterededitors'] = 'DumpNewRegisteredEditorsMetric'; |
57 | 57 | |
| 58 | +$wgAutoloadClasses['EstimateOfflineMetric'] = $metricsDir . 'EstimateOfflineMetric.php'; |
| 59 | +$wgMetricAPIModules['estimateoffline'] = 'EstimateOfflineMetric'; |
| 60 | + |
58 | 61 | $wgAutoloadClasses['SquidPageViewsMetric'] = $metricsDir . 'SquidPageViewsMetric.php'; |
59 | 62 | $wgMetricAPIModules['squidpageviews'] = 'SquidPageViewsMetric'; |
Index: trunk/extensions/MetricsReporting/metrics/EstimateOfflineMetric.php |
— | — | @@ -0,0 +1,38 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class EstimateOfflineMetric extends ApiAnalyticsBase { |
| 5 | + |
| 6 | + public function getAllowedFilters() { |
| 7 | + return array( |
| 8 | + ); |
| 9 | + } |
| 10 | + |
| 11 | + protected function getQueryInfo() { |
| 12 | + return array( |
| 13 | + 'table' => 'offline', |
| 14 | + 'conds' => array(), |
| 15 | + 'options' => array(), |
| 16 | + 'join_conds' => array(), |
| 17 | + ); |
| 18 | + } |
| 19 | + |
| 20 | + protected function getQueryFields() { |
| 21 | + return array( |
| 22 | + 'date', 'readers', |
| 23 | + ); |
| 24 | + } |
| 25 | + |
| 26 | + public function getDescription() { |
| 27 | + return 'Estimated number of Offline Users'; |
| 28 | + } |
| 29 | + |
| 30 | + protected function getExamples() { |
| 31 | + return array( |
| 32 | + 'api.php?action=analytics&metric=estimateoffline', |
| 33 | + ); |
| 34 | + } |
| 35 | + |
| 36 | + public function getVersion() { |
| 37 | + return __CLASS__ . ': $Id$'; |
| 38 | + } |
| 39 | +} |
Property changes on: trunk/extensions/MetricsReporting/metrics/EstimateOfflineMetric.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 40 | + native |
Added: svn:keywords |
2 | 41 | + Id |