[Groonga-commit] groonga/groonga-admin at 4011645 [master] Extract specific code from common code

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 17 23:21:52 JST 2014


Kouhei Sutou	2014-11-17 23:21:52 +0900 (Mon, 17 Nov 2014)

  New Revision: 4011645f1cde1bb6e04adda8a2fba45af2492206
  https://github.com/groonga/groonga-admin/commit/4011645f1cde1bb6e04adda8a2fba45af2492206

  Message:
    Extract specific code from common code

  Modified files:
    app/scripts/controllers/table-search-controller.js

  Modified: app/scripts/controllers/table-search-controller.js (+9 -9)
===================================================================
--- app/scripts/controllers/table-search-controller.js    2014-11-17 23:18:30 +0900 (64bacf7)
+++ app/scripts/controllers/table-search-controller.js    2014-11-17 23:21:52 +0900 (097116f)
@@ -200,15 +200,6 @@ angular.module('groongaAdminApp')
       }
 
       function extractColumnsInfo(table, columns) {
-        if (table.name === $scope.table) {
-          columns.forEach(function(column) {
-            if (column.isIndex) {
-              return;
-            }
-            $scope.allColumns.push(createColumnInfo(column));
-          });
-        }
-
         columns.forEach(function(column) {
           if (!column.isIndex) {
             return;
@@ -283,6 +274,15 @@ angular.module('groongaAdminApp')
 
             client.execute('column_list', {table: currentTable.name})
               .success(function(response) {
+                if (currentTable.name === $scope.table) {
+                  response.columns().forEach(function(column) {
+                    if (column.isIndex) {
+                      return;
+                    }
+                    $scope.allColumns.push(createColumnInfo(column));
+                  });
+                }
+
                 extractColumnsInfo(currentTable, response.columns());
 
                 $scope.allTables.forEach(function(table) {
-------------- next part --------------
HTML����������������������������...
下載 



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