Skip to content
Snippets Groups Projects
Select Git revision
  • a2c984e6f9c8dc11f047fbf273710c38caad3338
  • master default protected
  • patch-1
  • issue_4
  • issue_780
  • gitlab_migration_1
  • dev
  • rml8
  • v1.3.2
  • v1.3.1
  • v1.3.0
  • v1.2.10
  • v1.2.9
  • v1.2.8
  • v1.2.7
  • v1.2.6
  • v1.2.5
  • v1.2.4
  • v1.2.3
  • v1.test.3
  • v1.test.2
  • v1.test.1
  • v1.2.2
  • v1.2.1
  • v1.2.0
  • v1.1.9
  • v1.1.8
  • v1.1.7
28 results

currency-charts-controllers.js

Blame
  • Forked from clients / Cesium-grp / Cesium
    2229 commits behind, 2 commits ahead of the upstream repository.
    currency-charts-controllers.js 1.21 KiB
    
    angular.module('cesium.currency-charts.controllers', ['cesium.services'])
    
    .config(function($stateProvider) {
      'ngInject';
    
      $stateProvider
    
        .state('app.currency_ud', {
          url: "/currency/ud",
          nativeTransitions: {
              "type": "flip",
              "direction": "up"
          },
          views: {
            'menuContent': {
              templateUrl: "templates/currency/charts/ud.html",
              controller: 'CurrencyUdCtrl'
            }
          }
        })
        ;
    })
    
    .controller('CurrencyUdCtrl', CurrencyUdController)
    
    ;
    
    function CurrencyUdController($scope, BMA, $q, csHttp) {
      'ngInject';
    
      $scope.$on('$ionicView.enter', function() {
          $scope.loadUds()
          .then(function (res) {
            // TODO: plot
            console.log(res);
          });
        });
    
      $scope.loadUds = function() {
        var request = {
            query: {
              /*TODO */
            },
            from: 0,
            size: 10000,
            sort: "number"
            _source: ['number','dividend','medianTime']
          };
    
        var httpPost = csHttp.post('localhost', '9200', '/test_net/block/_search?pretty');
        return httpPost(request)
        .then(function (res) {
          console.log(res);
          // TODO transform data into array (X, Y, etc.)
          return res;
        });
      };
    
    }