     autoHeight: true
    };
 
+
+
 var loadingIndicator = null;
 
 $(function () {
 
+var dv = Slick.Data.DataView();
 var gridSorter = function(columnField, isAsc, grid, gridData) {
     var sign = isAsc ? 1 : -1;
     var field = columnField

   [:script {:src "/slick-grid/plugins/slick.cellrangedecorator.js"}]
   [:script {:src "/slick-grid/plugins/slick.cellrangeselector.js"}]
   [:script {:src "/slick-grid/plugins/slick.rowselectionmodel.js"}]
   [:script {:src "//code.jquery.com/ui/1.10.3/jquery-ui.js"}]
   [:script {:type "text/javascript"}
    "$.fn.serializeObject = function()

});

grid.onSort.subscribe(function(e, args) {
  gridSorter(args.sortCol.field, args.sortAsc, grid, dv);
});

dv.onRowCountChanged.subscribe(function(e, args) {
  grid.updateRowCount();
  grid.render();
});

dv.onRowsChanged.subscribe(function (e, args) {
  grid.invalidateRows(args.rows);
  grid.render();
});

$.ajax({
  url: '/api/tokens/" (url-encode app) "',
  type: 'GET',
  success: function(data) {
    dv.setItems(data, 'name');
  },
  error: function(req, status, message) {
    alert('Error loading data');
  }
});

  })"
)]]))
