From cdea9b667496622881e1dd40110a9db90882a2e4 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Thu, 16 Jun 2016 12:22:17 +0100 Subject: [PATCH] Added more content to the deal page in demo web UI --- src/main/webdemo/www/deal.html | 96 +++++++++++++++++++++++++++++++++ src/main/webdemo/www/index.html | 2 +- src/main/webdemo/www/js/app.js | 12 ++++- 3 files changed, 108 insertions(+), 2 deletions(-) diff --git a/src/main/webdemo/www/deal.html b/src/main/webdemo/www/deal.html index edec8da699..3a7e8703d8 100644 --- a/src/main/webdemo/www/deal.html +++ b/src/main/webdemo/www/deal.html @@ -96,6 +96,44 @@ Terminates {{deal.fixedLeg.terminationDate}} + + Payment Rule + {{deal.fixedLeg.paymentRule}} + + + Payment Calendars + + + {{calendar}}, + + + + + +
+
+ + Holiday Dates +
+
+ + + + + + +
{{date}}
+
+
+ + + + Fixed Rate + + - + {{deal.fixedLeg.fixedRate.value}}% + + @@ -127,6 +165,64 @@ Terminates {{deal.floatingLeg.terminationDate}} + + Payment Rule + {{deal.floatingLeg.paymentRule}} + + + Payment Calendars + + + {{calendar}}, + + + + + +
+
+ + Holiday Dates +
+
+ + + + + + +
{{date}}
+
+
+ + + + Fixing Calendars + + + {{calendar}}, + + + + + +
+
+ + Holiday Dates +
+
+ + + + + + +
{{date}}
+
+
+ + diff --git a/src/main/webdemo/www/index.html b/src/main/webdemo/www/index.html index 020a416cde..0e1b07902b 100644 --- a/src/main/webdemo/www/index.html +++ b/src/main/webdemo/www/index.html @@ -61,7 +61,7 @@ - {{deal.ref}} + {{deal.ref}} {{deal.fixedLeg.fixedRatePayer}} {{deal.fixedLeg.notional.quantity}} {{deal.fixedLeg.notional.token}} {{deal.floatingLeg.floatingRatePayer}} diff --git a/src/main/webdemo/www/js/app.js b/src/main/webdemo/www/js/app.js index ba0bc65525..c8b7446ea1 100644 --- a/src/main/webdemo/www/js/app.js +++ b/src/main/webdemo/www/js/app.js @@ -62,7 +62,11 @@ let nodeService = irsViewer.factory('nodeService', ($http) => { this.getDeal = (dealId) => { return load('deal' + dealId, $http.get('http://localhost:31338/api/irs/deals/' + dealId)).then((resp) => { - return resp.data; + // Do some data modification to simplify the model + let deal = resp.data; + deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.ratioUnit.value * 100).toString().slice(0, 6); + console.log(deal); + return deal; }); }; @@ -99,6 +103,12 @@ irsViewer.controller('HomeController', ($http, $scope, nodeService) => { }); irsViewer.controller('DealController', ($http, $scope, nodeService) => { + let initSemanticUi = () => { + $('.ui.accordion').accordion(); + } + + initSemanticUi(); + $scope.isLoading = nodeService.isLoading; nodeService.getDeal('T000000001').then((deal) => $scope.deal = deal);