Multinode bug fixes 2

Multinode bug fixes 2
pull/121/head
ShahanaFarooqui 5 years ago
parent a8e7cce0e0
commit d5e931205f

@ -8,5 +8,5 @@
<link rel="stylesheet" href="styles.bab7f62b489f0c86770d.css"></head>
<body>
<rtl-app></rtl-app>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.181b5a67c421a167a96a.js"></script><script type="text/javascript" src="main.9e142f99e4861933b2c8.js"></script></body>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.181b5a67c421a167a96a.js"></script><script type="text/javascript" src="main.a318f52fe363adad98c0.js"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -6,7 +6,7 @@ var common = require('../common');
exports.updateSelectedNode = (req, res, next) => {
const selNodeIndex = req.body.selNodeIndex;
common.selectedNode = common.findNode(selNodeIndex);
logger.info('\r\nConf: 9: ' + JSON.stringify(Date.now()) + ': INFO: Selected Node Updated!' + JSON.stringify(common.selectedNode));
logger.info('\r\nConf: 9: ' + JSON.stringify(Date.now()) + ': INFO: Selected Node Updated!' + JSON.stringify(common.selectedNode.ln_node));
res.status(200).json({status: 'Selected Node Updated!'});
};
@ -29,7 +29,7 @@ exports.getRTLConfig = (req, res, next) => {
lndConfigPath: common.nodes[0].lnd_config_path,
bitcoindConfigPath: common.nodes[0].bitcoind_config_path
};
res.status(200).json({ sso: sso, nodes: [{
res.status(200).json({ selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: [{
index: common.nodes[0].index,
lnNode: 'SingleNode',
lnImplementation: '',
@ -44,7 +44,7 @@ exports.getRTLConfig = (req, res, next) => {
if (err) {
if (err.code === 'ENOENT') {
logger.error('\r\nRTLConf.js: 36: ' + JSON.stringify(Date.now()) + ': INFO: Multi Node Config does not exist!');
res.status(200).json({ sso: {}, nodes: [] });
res.status(200).json({ selectedNodeIndex: {}, sso: {}, nodes: [] });
} else {
logger.error('\r\nRTLConf.js: 39: ' + JSON.stringify(Date.now()) + ': ERROR: Getting Multi Node Config Failed!');
res.status(500).json({
@ -72,7 +72,7 @@ exports.getRTLConfig = (req, res, next) => {
settings: node.Settings,
authentication: authentication})
});
res.status(200).json({ sso: sso, nodes: nodesArr });
res.status(200).json({ selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: nodesArr });
}
});
}

@ -7,7 +7,7 @@ exports.getInfo = (req, res, next) => {
common.setOptions();
options = common.getOptions();
options.url = common.getSelLNDServerUrl() + '/getinfo';
logger.info('\r\nSelected Node: ' + JSON.stringify(common.selectedNode));
logger.info('\r\nSelected Node: ' + JSON.stringify(common.selectedNode.ln_node));
logger.info('\r\nCalling getinfo from lnd server url: INFO: ' + options.url);
request(options).then((body) => {
logger.info('\r\nGetInfo: 9: ' + JSON.stringify(Date.now()) + ': INFO: ' + JSON.stringify(body));

@ -9,13 +9,16 @@
<mat-card-content>
<form (ngSubmit)="onSignin()" #signinForm="ngForm">
<mat-form-field fxFlex="50" fxLayoutAlign="start">
<input matInput placeholder="Password" type="password" id="password" name="password" [(ngModel)]="password" tabindex="1" required>
<input matInput placeholder="Password" type="password" id="password" name="password" [(ngModel)]="password"
tabindex="1" required>
<mat-hint>{{hintStr}}</mat-hint>
</mat-form-field>
<button fxFlex="10" class="mr-2" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="2" type="submit" [disabled]="!password">Login</button>
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="3" type="reset" (click)="resetData()">Clear</button>
</form>
<button fxFlex="10" class="mr-2" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="2"
type="submit" [disabled]="!password">Login</button>
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="3" type="reset"
(click)="resetData()">Clear</button>
</form>
</mat-card-content>
</mat-card>
</div>
</div>
</div>

@ -28,7 +28,7 @@ export class ForwardingHistoryComponent implements OnInit, OnDestroy {
public endDate = this.today;
public startDate = this.yesterday;
public flgSticky = false;
private unsub: Array<Subject<void>> = [new Subject(), new Subject()];
private unsub: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.State>, private actions$: Actions) {
switch (true) {

@ -37,6 +37,7 @@ export class Node {
export class RTLConfiguration {
constructor(
public selectedNodeIndex: number,
public sso: SSO,
public nodes: Node[]
) { }

@ -38,6 +38,7 @@ const initialState: State = {
effectErrors: [],
selNode: {settings: initNodeSettings, authentication: initNodeAuthentication},
appConfig: {
selectedNodeIndex: -1,
sso: { rtlSSO: 0, logoutRedirectLink: '/login' },
nodes: [{ settings: initNodeSettings, authentication: initNodeAuthentication}]
},
@ -98,7 +99,7 @@ export function RTLRootReducer(state = initialState, action: RTLActions.RTLActio
case RTLActions.SET_RTL_CONFIG:
return {
...state,
selNode: action.payload.nodes[0],
selNode: action.payload.nodes.find(node => +node.index === action.payload.selectedNodeIndex),
appConfig: action.payload
};
case RTLActions.SET_INFO:

@ -1 +1 @@
export const VERSION = '0.2.17-beta';
export const VERSION = '0.3.0-beta';
Loading…
Cancel
Save