]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: performance counter browsers 21492/head
authorRubab-Syed <rubab.syed21@gmail.com>
Tue, 9 Jan 2018 23:32:42 +0000 (04:32 +0500)
committerBoris Ranto <branto@redhat.com>
Fri, 20 Apr 2018 11:27:29 +0000 (13:27 +0200)
Signed-off-by: Rubab-Syed <rubab.syed21@gmail.com>
(cherry picked from commit 25ecfbd9cfb620463de1545ca0be50001c805460)
Conflicts: Removed dashboard changes

src/pybind/mgr/mgr_module.py
src/pybind/mgr/prometheus/module.py

index be4510265f9d0ac794e0503975f800931ccf0fe6..38283d2446d34bf0ef957c1c5f1e18eab3cfb76e 100644 (file)
@@ -298,6 +298,21 @@ class MgrModule(ceph_module.BaseMgrModule):
         """
         return self._ceph_get(data_name)
 
+    def _stattype_to_str(self, stattype):
+        
+        typeonly = stattype & self.PERFCOUNTER_TYPE_MASK
+        if typeonly == 0:
+            return 'gauge'
+        if typeonly == self.PERFCOUNTER_LONGRUNAVG:
+            # this lie matches the DaemonState decoding: only val, no counts
+            return 'counter'
+        if typeonly == self.PERFCOUNTER_COUNTER:
+            return 'counter'
+        if typeonly == self.PERFCOUNTER_HISTOGRAM:
+            return 'histogram'
+        
+        return ''
+
     def get_server(self, hostname):
         """
         Called by the plugin to load information about a particular
index 86f71133c3633ddb48a2005366c69a38322e356e..c7daa128dd8af16fee1ae408895653f2684d8d18 100644 (file)
@@ -140,21 +140,6 @@ class Metrics(object):
             self.metrics[path] = metric
 
 
-    def _stattype_to_str(self, stattype):
-
-        typeonly = stattype & self.PERFCOUNTER_TYPE_MASK
-        if typeonly == 0:
-            return 'gauge'
-        if typeonly == self.PERFCOUNTER_LONGRUNAVG:
-            # this lie matches the DaemonState decoding: only val, no counts
-            return 'counter'
-        if typeonly == self.PERFCOUNTER_COUNTER:
-            return 'counter'
-        if typeonly == self.PERFCOUNTER_HISTOGRAM:
-            return 'histogram'
-
-        return ''
-
     def _setup_static_metrics(self):
         metrics = {}
         metrics['health_status'] = Metric(