[Groonga-commit] groonga/grafana-datasource-plugin-groonga at 5ccd687 [master] Filter out not numeric columns

Back to archive index

Masafumi Yokoyama null+****@clear*****
Sat Feb 27 20:19:21 JST 2016


Masafumi Yokoyama	2016-02-27 20:19:21 +0900 (Sat, 27 Feb 2016)

  New Revision: 5ccd687b5bad054cc33816a10818809f0b4f3edb
  https://github.com/groonga/grafana-datasource-plugin-groonga/commit/5ccd687b5bad054cc33816a10818809f0b4f3edb

  Message:
    Filter out not numeric columns

  Modified files:
    query_ctrl.js

  Modified: query_ctrl.js (+14 -2)
===================================================================
--- query_ctrl.js    2016-02-27 17:02:30 +0900 (a4dccf7)
+++ query_ctrl.js    2016-02-27 20:19:21 +0900 (dd6da1a)
@@ -34,8 +34,20 @@ function (angular) {
     $scope.updateTable = function () {
       $scope.target.table = $scope.table;
       var columns = $scope.schema.tables[$scope.table].columns;
-      angular.forEach(columns, function(_, columnName) {
-        $scope.availableColumns.push(columnName);
+      angular.forEach(columns, function(column, columnName) {
+        switch (column.value_type.name) {
+          case 'Int8':
+          case 'Int16':
+          case 'Int32':
+          case 'Int64':
+          case 'UInt8':
+          case 'UInt16':
+          case 'UInt32':
+          case 'UInt64':
+          case 'Float':
+            $scope.availableColumns.push(columnName);
+            break;
+        }
       });
     }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index