Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jeff Vandrew Jr 2019-02-13 22:34:25 -05:00
commit 73a03c6f82
11 changed files with 82 additions and 62 deletions

View File

@ -425,28 +425,46 @@ THE SOFTWARE.
@angular/material/icon
angular2-qrcode
angularx-qrcode
MIT
The MIT License (MIT)
---------------------
Copyright (c) 2018 - present Andreas Jacob (Cordobo)
qrious
GPL-3.0
QRious
Copyright (C) 2017 Alasdair Mercer
Copyright (C) 2010 Tom Zerucha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
qrcodejs2
MIT
The MIT License (MIT)
---------------------
Copyright (c) 2012 davidshimjs
Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@angular/material/card

View File

@ -8,5 +8,5 @@
<link rel="stylesheet" href="styles.5e0b52f71274005aea8e.css"></head>
<body>
<rtl-app></rtl-app>
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.44b7bcda2d457ee3a6e9.js"></script></body>
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.6a58ac00262ec13bea69.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

View File

@ -3,8 +3,8 @@ var clArgs = require('optimist').argv;
var ini = require('ini');
var common = require('./common');
var path = require('path');
var crypto = require('crypto');
var upperCase = require('upper-case');
var logger = require('./controllers/logger');
var options = {};
var defaultConfig = {
@ -186,12 +186,26 @@ var setOptions = () => {
};
}
var logEnvVariables = () => {
if (!common.enable_logging) {
return;
}
logger.info('\r\nConfig Setup Variable PORT: ' + common.port);
logger.info('\r\nConfig Setup Variable LND_SERVER_URL: ' + common.lnd_server_url);
logger.info('\r\nConfig Setup Variable MACAROON_PATH: ' + common.macaroon_path);
logger.info('\r\nConfig Setup Variable NODE_AUTH_TYPE: ' + common.node_auth_type);
logger.info('\r\nConfig Setup Variable LND_CONFIG_PATH: ' + common.lnd_config_path);
logger.info('\r\nConfig Setup Variable RTL_CONFIG_PATH: ' + common.rtl_conf_file_path);
logger.info('\r\nConfig Setup Variable BITCOIND_CONFIG_PATH: ' + common.bitcoind_config_path);
logger.info('\r\nConfig Setup Variable RTL_SSO: ' + common.rtl_sso);
logger.info('\r\nConfig Setup Variable RTL_COOKIE_PATH: ' + common.rtl_cookie_path);
logger.info('\r\nConfig Setup Variable LOGOUT_REDIRECT_LINK: ' + common.logout_redirect_link);
}
var errMsg = '';
var configFileExists = () => {
common.rtl_conf_file_path = (undefined !== process.env.RTL_CONFIG_PATH) ? process.env.RTL_CONFIG_PATH.substring(0, process.env.RTL_CONFIG_PATH.length - 9) : path.normalize(__dirname);
RTLConfFile = common.rtl_conf_file_path + '/RTL.conf';
console.log(common.rtl_conf_file_path);
console.log(RTLConfFile);
let exists = fs.existsSync(RTLConfFile);
if (exists) {
var config = ini.parse(fs.readFileSync(RTLConfFile, 'utf-8'));
@ -199,6 +213,7 @@ var configFileExists = () => {
validateConfigFile(config);
setOptions();
setSSOParams();
logEnvVariables();
} else {
try {
fs.writeFileSync(RTLConfFile, ini.stringify(defaultConfig));
@ -207,6 +222,7 @@ var configFileExists = () => {
validateConfigFile(config);
setOptions();
setSSOParams();
logEnvVariables();
}
catch(err) {
console.error('Something went wrong, unable to create config file!\n' + err);

View File

@ -17,8 +17,8 @@ exports.authenticateUser = (req, res, next) => {
res.status(200).json({ token: token });
} else {
res.status(401).json({
message: "SSO Authentication Failed!",
error: "Please check app stack configurations!"
message: "Login Failure!",
error: "SSO Authentication Failed!"
});
}
} else {

View File

@ -5,6 +5,7 @@ var logger = require('./logger');
exports.getInfo = (req, res, next) => {
options.url = common.lnd_server_url + '/getinfo';
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));
const body_str = (undefined === body) ? '' : JSON.stringify(body);

View File

@ -2,7 +2,9 @@ var fs = require('fs');
var common = require('../common');
exports.info = (msgStr) => {
console.log('Console: ' + msgStr);
if (msgStr.indexOf('Config Setup Variable') === -1) {
console.log('Console: ' + msgStr);
}
if(common.enable_logging) {
fs.appendFile(common.log_file, msgStr, function(err) {
if (err) {

52
package-lock.json generated
View File

@ -1393,12 +1393,12 @@
"tslib": "^1.9.0"
}
},
"angular2-qrcode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/angular2-qrcode/-/angular2-qrcode-2.0.1.tgz",
"integrity": "sha1-G05lwwJpS1B4ygb3ETj35DZ3VNw=",
"angularx-qrcode": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/angularx-qrcode/-/angularx-qrcode-1.5.3.tgz",
"integrity": "sha512-9WTsnOGNv3IvSriVSHOc7k6PIBcqqjivAQXhEF9SjDYgcio63zCkcsAC627vSaTqUoDkgE5MRoT4PO2UMROk2w==",
"requires": {
"qrious": "^2.2.0"
"qrcodejs2": "0.0.2"
}
},
"ansi-colors": {
@ -2318,15 +2318,6 @@
"integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==",
"dev": true
},
"canvas": {
"version": "1.6.13",
"resolved": "https://registry.npmjs.org/canvas/-/canvas-1.6.13.tgz",
"integrity": "sha512-XAfzfEOHZ3JIPjEV+WSI6PpISgUta3dgmndWbsajotz+0TQOX/jDpp2kawjRERatOGv9sMMzk5auB3GKEKA6hg==",
"optional": true,
"requires": {
"nan": "^2.10.0"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
@ -5183,10 +5174,9 @@
"dev": true
},
"handlebars": {
"version": "4.0.12",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz",
"integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==",
"dev": true,
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz",
"integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==",
"requires": {
"async": "^2.5.0",
"optimist": "^0.6.1",
@ -5195,19 +5185,17 @@
},
"dependencies": {
"async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"dev": true,
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
"integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.11"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}
}
},
@ -8631,13 +8619,10 @@
"integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
"dev": true
},
"qrious": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/qrious/-/qrious-2.3.0.tgz",
"integrity": "sha1-ynzmioIJmmepDkl59LHN9R7zJHU=",
"requires": {
"canvas": "^1.6.5"
}
"qrcodejs2": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
"integrity": "sha1-Rlr+Xjnxn6zsuTLBH3oYYQkUauE="
},
"qs": {
"version": "6.5.2",
@ -10659,7 +10644,6 @@
"version": "3.4.9",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
"integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
"dev": true,
"optional": true,
"requires": {
"commander": "~2.17.1",
@ -10670,14 +10654,12 @@
"version": "2.17.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
"dev": true,
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true
}
}

View File

@ -32,7 +32,7 @@
"@ngrx/store-devtools": "^7.0.0",
"@swimlane/ngx-charts": "^10.0.0",
"angular-user-idle": "^2.0.0",
"angular2-qrcode": "^2.0.1",
"angularx-qrcode": "^1.5.3",
"atob": "^2.1.2",
"core-js": "^2.5.4",
"express": "^4.16.4",

5
rtl.js
View File

@ -30,7 +30,7 @@ const onError = error => {
process.exit(1);
break;
case "ECONNREFUSED":
console.error("LND Server is down/locked");
console.error("Server is down/locked");
default:
console.error("DEFUALT ERROR");
console.error(error.code);
@ -42,6 +42,7 @@ const onListening = () => {
const addr = server.address();
const bind = typeof addr === "string" ? "pipe " + addr : "port " + port;
debug("Listening on " + bind);
console.log('Server is up and running, please open the UI at http://localhost:' + port);
};
const port = normalizePort(process.env.PORT || common.port);
@ -50,4 +51,4 @@ const server = http.createServer(app);
server.on("error", onError);
server.on("listening", onListening);
server.listen(port);
console.log('Server is up and running, please open the UI at http://localhost:' + port);