Skip to content

Commit 2034691

Browse files
added grid menu and export to csv
1 parent 8ee57ed commit 2034691

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/resources/static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
<div class="panel-body" ng-if="tab('items')">
7272
<div id="grid1" ui-grid="gridOptions"
73-
ui-grid-selection
73+
ui-grid-selection ui-grid-exporter
7474
ng-if="showGrid" class="data-grid"></div>
7575
</div>
7676
</div>

src/main/resources/static/js/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var app = angular.module('dynamodb-web-gui',
2-
['ui.bootstrap', 'ui.grid', 'ui.grid.selection','angular-json-tree']);
2+
['ui.bootstrap', 'ui.grid', 'ui.grid.selection','ui.grid.exporter','angular-json-tree']);
33

44
app.controller('ModalPopup', ModalPopup);
55
app.controller('tables', function ($scope, $http, $uibModal) {
@@ -21,6 +21,9 @@ app.controller('tables', function ($scope, $http, $uibModal) {
2121
$scope.showGrid = false;
2222
if (name !== undefined) {
2323
$scope.gridOptions = {
24+
enableGridMenu: true,
25+
exporterMenuPdf: false,
26+
exporterCsvFilename: 'exports.csv',
2427
enableFiltering: true,
2528
flatEntityAccess: false,
2629
enableRowSelection: true,
@@ -30,6 +33,7 @@ app.controller('tables', function ($scope, $http, $uibModal) {
3033
multiSelect: false,
3134
modifierKeysToMultiSelect: false,
3235
noUnselect: true,
36+
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
3337
onRegisterApi: function (gridApi) {
3438
$scope.gridApi = gridApi;
3539
},

0 commit comments

Comments
 (0)