mirror of
https://github.com/corda/corda.git
synced 2025-05-30 06:04:24 +00:00
Review fixes.
This commit is contained in:
parent
88f4317606
commit
11afce9bbf
@ -102,7 +102,7 @@ can see the other terminals whilst you run this command!:
|
|||||||
IRS web demo
|
IRS web demo
|
||||||
------------
|
------------
|
||||||
|
|
||||||
To install the web demo please follo these steps;
|
To install the web demo please follow these steps;
|
||||||
|
|
||||||
1. Install Node: https://nodejs.org/en/download/ and ensure the npm executable is on your classpath
|
1. Install Node: https://nodejs.org/en/download/ and ensure the npm executable is on your classpath
|
||||||
2. Open a terminal
|
2. Open a terminal
|
||||||
|
@ -27,7 +27,7 @@ define(['angular', 'lodash', 'viewmodel/Deal'], (angular, _, dealViewModel) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.getDate = () => {
|
this.getDate = () => {
|
||||||
return load('date', $http.get('http://localhost:31338/api/irs/demodate')).then((resp) => {
|
return load('date', $http.get('/api/irs/demodate')).then((resp) => {
|
||||||
const parts = resp.data.split("-");
|
const parts = resp.data.split("-");
|
||||||
date = new Date(parts[0], parts[1] - 1, parts[2]); // JS uses 0 based months
|
date = new Date(parts[0], parts[1] - 1, parts[2]); // JS uses 0 based months
|
||||||
return this.getDateModel(date);
|
return this.getDateModel(date);
|
||||||
@ -54,13 +54,13 @@ define(['angular', 'lodash', 'viewmodel/Deal'], (angular, _, dealViewModel) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.getDeals = () => {
|
this.getDeals = () => {
|
||||||
return load('deals', $http.get('http://localhost:31338/api/irs/deals')).then((resp) => {
|
return load('deals', $http.get('/api/irs/deals')).then((resp) => {
|
||||||
return resp.data.reverse();
|
return resp.data.reverse();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getDeal = (dealId) => {
|
this.getDeal = (dealId) => {
|
||||||
return load('deal' + dealId, $http.get('http://localhost:31338/api/irs/deals/' + dealId)).then((resp) => {
|
return load('deal' + dealId, $http.get('/api/irs/deals/' + dealId)).then((resp) => {
|
||||||
// Do some data modification to simplify the model
|
// Do some data modification to simplify the model
|
||||||
let deal = resp.data;
|
let deal = resp.data;
|
||||||
deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.ratioUnit.value * 100).toString().slice(0, 6);
|
deal.fixedLeg.fixedRate.value = (deal.fixedLeg.fixedRate.ratioUnit.value * 100).toString().slice(0, 6);
|
||||||
@ -87,7 +87,7 @@ define(['angular', 'lodash', 'viewmodel/Deal'], (angular, _, dealViewModel) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.createDeal = (deal) => {
|
this.createDeal = (deal) => {
|
||||||
return load('create-deal', $http.post('http://localhost:31338/api/irs/deals', deal.toJson()))
|
return load('create-deal', $http.post('/api/irs/deals', deal.toJson()))
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
return deal.tradeId;
|
return deal.tradeId;
|
||||||
}, (resp) => {
|
}, (resp) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user