Skip to content

Commit

Permalink
noflo-runtime: Allow to change base app for noflo-browser launch
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Nov 3, 2014
1 parent a535016 commit c8264fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions elements/noflo-runtime-browserdebug.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
</style>
<div class="modal-container" on-click="{{ bgClick }}">
<h1>Launch noflo-browser device</h1>
<label>
<span>Base application</span>
<input type="text" value="{{ baseApp }}" on-change="{{ generateRuntimeInfo }}">
</label>
<div class='info'>
<div><a id='runtimeLink' href="{{ runtimeUrl }}">Launch</a></div>
<div><img id='qrcode' src="{{ qrCodeUrl }}"></a></div>
Expand All @@ -28,6 +32,7 @@ <h1>Launch noflo-browser device</h1>
Polymer('noflo-runtime-browserdebug', {
qrCodeUrl: '',
runtimeUrl: '',
baseApp: 'http://noflojs.org/noflo-browser-app/main.html',
runtime: {},
attached: function () {
document.getElementById('container').classList.add('blur');
Expand All @@ -37,7 +42,6 @@ <h1>Launch noflo-browser device</h1>
document.getElementById('container').classList.remove('blur');
},
generateRuntimeInfo: function () {
var baseAppUrl = 'http://noflojs.org/noflo-browser-app/main.html'; // TEMP
var signaller = 'http://flowhub-rtc.herokuapp.com'; // TEMP
var id = require('uuid')();
var address = signaller+'#'+id;
Expand All @@ -55,7 +59,7 @@ <h1>Launch noflo-browser device</h1>
address: address
};
this.runtime = runtime;
var appDebugUrl = baseAppUrl+params;
var appDebugUrl = this.baseApp+params;
var qrBase = 'https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=';

this.qrCodeUrl = qrBase+encodeURIComponent(appDebugUrl);
Expand Down

0 comments on commit c8264fb

Please sign in to comment.