Skip to content
Snippets Groups Projects
Select Git revision
  • c7526e3810091c9c9f997e64be2f48219d5f2a2d
  • master default protected
  • feature/startup_node_selection
  • hugo/startup_node_selection
  • develop
  • feature/encrypted_comment
  • feature/cesium_plus_pod_2
  • feature/android_api_19
  • Vivakvo/cesium-patch-8
  • gitlab_migration_1
  • dev
  • rml8
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
  • v1.6.10
  • v1.6.9
  • v1.6.8
  • v1.6.7
  • v1.6.6
  • v1.6.5
  • v1.6.4
  • v1.6.3
  • v1.6.2
  • v1.6.2-alpha
  • v1.6.1
  • v1.6.0
  • v1.5.12
  • v1.5.11
  • v1.5.10
  • v1.5.9
  • v1.5.8
32 results

currency-charts-controllers.js

Blame
  • Forked from clients / Cesium-grp / Cesium
    2229 commits behind, 4 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;
        });
      };
    
    }