Skip to content
Snippets Groups Projects
Commit 6fe1cbd9 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Now show IP+port listened by the node during currency creation + use UPnP

parent 285a9ae7
No related branches found
No related tags found
No related merge requests found
......@@ -21,11 +21,20 @@ module.exports = ($scope, $http, $state, BMA) => {
$scope.start = () => co(function *() {
try {
yield BMA.webmin.server.http.start();
let hosts = [];
if ($scope.$parent.conf.remote_ipv4) {
hosts.push([$scope.$parent.conf.remote_ipv4, $scope.$parent.conf.rport].join(':'));
}
if ($scope.$parent.conf.remote_ipv6) {
hosts.push(["[" + $scope.$parent.conf.remote_ipv6 + "]", $scope.$parent.conf.rport].join(':'));
}
$scope.host_listening = hosts.join('\n');
$scope.started = true;
yield BMA.webmin.server.sendConf({
conf: $scope.$parent.conf
});
yield BMA.webmin.server.http.start();
yield BMA.webmin.server.http.openUPnP();
yield $scope.try();
} catch (e) {
$scope.message = e.message;
......
......@@ -79,6 +79,7 @@
"configuration.create_root.need_a_try": "You need to generate a first block with the « Give a try » button. Start HTTP server to do so.",
"configuration.create_root.button.accept_and_send": "Accept this block and start currency",
"configuration.create_root.button.cancel": "Cancel creation and go to home screen",
"configuration.create_root.host_listening": "Host listening at:",
"configuration.create_uid.pubkey_preview": "Public key preview",
"home.current.number": "Current block #",
"home.current.membersCount": "Members count",
......
......@@ -124,7 +124,8 @@ module.exports = (angular) => {
server: {
http: {
start: getResource('/webmin/server/http/start'),
stop: getResource('/webmin/server/http/stop')
stop: getResource('/webmin/server/http/stop'),
openUPnP: getResource('/webmin/server/http/upnp/open')
},
services: {
startAll: getResource('/webmin/server/services/start_all'),
......
......@@ -122,6 +122,12 @@ nav
background-color #d7edf5
line-height 60px
.host_listening
background-color #d7edf5
line-height 21px
padding-top 20px
padding-bottom 20px
blockquote
padding-top 10px
padding-bottom 10px
......
......@@ -23,6 +23,10 @@
.card-action
.container(ng-if="host_listening")
h5(translate="configuration.create_root.host_listening")
pre.host_listening {{ host_listening }}
pre.card-panel.teal.white-text.code.left-align.small(ng-show="generated") {{ generated }}
blockquote.card-panel.left-align(ng-show="message") {{ message | translate }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment