diff --git a/web/app/app.js b/web/app/app.js index fcbf7640..bb0aef2a 100644 --- a/web/app/app.js +++ b/web/app/app.js @@ -5,6 +5,7 @@ angular.module('myApp', [ 'ngRoute', 'myApp.home', 'myApp.about', + 'myApp.settings', 'myApp.version' ]). config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) { diff --git a/web/app/controllers.js b/web/app/controllers.js new file mode 100644 index 00000000..e69de29b diff --git a/web/app/index.html b/web/app/index.html index 66d52107..b6ff3be1 100644 --- a/web/app/index.html +++ b/web/app/index.html @@ -54,6 +54,7 @@ + diff --git a/web/app/views/settings/settings.html b/web/app/views/settings/settings.html index 03ea571e..c5045b36 100644 --- a/web/app/views/settings/settings.html +++ b/web/app/views/settings/settings.html @@ -1,28 +1,51 @@

Settings

-

All enabled currencies

-
-

{{exchange.exchangeName}}

- - - - - - - - - - - - - - - - - - - -
CurrencyLastHighLowVolumeBidAsk
{{value.CryptoCurrency}}{{value.Last}}{{value.High}}{{value.Low}}{{value.Volume}}{{value.Bid}}{{value.Ask}}
-
- +
+

Exchange config

+
+
+

{{exchange.Name}}

+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/web/app/views/settings/settings.js b/web/app/views/settings/settings.js index d2412903..f4fd4bce 100644 --- a/web/app/views/settings/settings.js +++ b/web/app/views/settings/settings.js @@ -1,28 +1,28 @@ 'use strict'; -angular.module('myApp.home', ['ngRoute']) +angular.module('myApp.settings', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/', { - templateUrl: '/views/home/home.html', - controller: 'HomeController' + $routeProvider.when('/settings', { + templateUrl: '/views/settings/settings.html', + controller: 'SettingsController' }); }]) -.controller('HomeController', function ($scope, $http) { - $scope.getDashboardData = function() { +.controller('SettingsController', function ($scope, $http) { + $scope.getconfigData = function() { $http({ method: 'GET', - url: '/data/all-enabled-currencies' + url: '/config/all' }). success(function (data, status, headers, config) { - $scope.exchanges = data.data; + $scope.config = data; }). error(function (data, status, headers, config) { console.log('error'); }); }; - $scope.getDashboardData(); + $scope.getconfigData(); }); \ No newline at end of file diff --git a/web/server.js b/web/server.js index 7f2bf597..1720eba9 100644 --- a/web/server.js +++ b/web/server.js @@ -17,7 +17,14 @@ app.get('/data/all-enabled-currencies', function (req, res) { },function(err, resp, body){ res.send(body); }) - +}); + +app.get('/config/all', function (req, res) { + request({ + url :'http://localhost:9050/config/all' + },function(err, resp, body){ + res.send(body); + }) });