프로그래밍/zeppelin

zeppelin 데이터 csv 다운로드 기능 추가 (datatable)

메이슨김 2015. 12. 2. 14:27

현재 버전업 후 다르게 개발 추후 포스팅 하겠습니다.



1. zeppelin-web/Gruntfile.js 추가

  dest: '<%= yeoman.dist %>/styles/images'

        }, {

          expand: true,

          cwd: 'bower_components/datatables/media/images',

          src: '{,*/}*.{png,jpg,jpeg,gif}',

          dest: '<%= yeoman.dist %>/images'

        }, {

          expand: true,

          cwd: 'bower_components/datatables-tabletools/swf',

          src: '{,*/}*.swf',

          dest: '<%= yeoman.dist %>/images'

        }]


2. zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js 추가

// set table height

      var height = $scope.paragraph.config.graph.height;

      angular.element('#p' + $scope.paragraph.id + '_table').height(height);

// use datatables

      angular.element('#p'+$scope.paragraph.id+'_table .table').DataTable( {

        dom: 'T<"clear">lfrtip',

        tableTools: {

          'sSwfPath': 'images/copy_csv_xls.swf'

        }

      });


3. zeppelin-web => bower.json 추가

 "angular-xeditable": "0.1.8",

  "datatables": "~1.10.5",

  "datatables-tabletools": "~2.2.3",

반응형