[Groonga-commit] groonga/groonga-admin at 9b54618 [master] Support showing JSON

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 27 15:38:44 JST 2014


Kouhei Sutou	2014-10-27 15:38:44 +0900 (Mon, 27 Oct 2014)

  New Revision: 9b54618e315390a4c8b7cec5b848c9af727eb2ab
  https://github.com/groonga/groonga-admin/commit/9b54618e315390a4c8b7cec5b848c9af727eb2ab

  Message:
    Support showing JSON

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

  Modified: app/scripts/controllers/table-search-controller.js (+3 -0)
===================================================================
--- app/scripts/controllers/table-search-controller.js    2014-10-27 15:34:45 +0900 (f3bb856)
+++ app/scripts/controllers/table-search-controller.js    2014-10-27 15:38:44 +0900 (115f3d8)
@@ -30,6 +30,7 @@ angular.module('groongaAdminApp')
 
     $scope.table = $routeParams.table;
     $scope.style = 'table';
+    $scope.rawData = [];
     $scope.columns = [];
     $scope.records = [];
     $scope.commandLine = '';
@@ -58,6 +59,8 @@ angular.module('groongaAdminApp')
     });
     $http.jsonp('/d/select.json', {params: parameters})
       .success(function(data) {
+        $scope.rawData = data;
+
         $scope.commandLine = buildCommandLine('select', parameters);
 
         var response = new GroongaResponse.Select(data);

  Modified: app/views/tables/search.html (+7 -0)
===================================================================
--- app/views/tables/search.html    2014-10-27 15:34:45 +0900 (9675723)
+++ app/views/tables/search.html    2014-10-27 15:38:44 +0900 (3da4e8f)
@@ -34,6 +34,9 @@
     <li role="tab" data-toggle="tab">
       <a ng-click="style = 'list'">List</a>
     </li>
+    <li role="tab" data-toggle="tab">
+      <a ng-click="style = 'json'">JSON</a>
+    </li>
   </ul>
 
   <div class="table-search-result" ng-show="style == 'table'">
@@ -71,4 +74,8 @@
       </div>
     </div>
   </div>
+
+  <div class="list-search-result" ng-show="style == 'json'">
+    <pre>{{rawData | json}}</pre>
+  </div>
 </div>
-------------- next part --------------
HTML����������������������������...
Descargar 



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