NodeODM name change, pass token to /options

pull/51/head
Piero Toffanin 2018-11-13 12:04:50 -05:00
rodzic ba5eff08d0
commit c23d8bde75
2 zmienionych plików z 19 dodań i 11 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Node-OpenDroneMap</title> <title>NodeODM</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -28,7 +28,7 @@
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand" href="/">Node-OpenDroneMap</a> <a class="navbar-brand" href="/">NodeODM</a>
<p class="navbar-text navbar-right">Open Source Drone Aerial Imagery Processing</a> <p class="navbar-text navbar-right">Open Source Drone Aerial Imagery Processing</a>
</p> </p>
</div> </div>
@ -157,8 +157,8 @@
<hr> <hr>
<footer> <footer>
<p>Links: <a href="https://github.com/OpenDroneMap/node-OpenDroneMap/blob/master/docs/index.adoc" target="_blank">API Docs</a> | <a href="https://github.com/OpenDroneMap/WebODM" target="_blank">WebODM</a> <p>Links: <a href="https://github.com/OpenDroneMap/NodeODM/blob/master/docs/index.adoc" target="_blank">API Docs</a> | <a href="https://github.com/OpenDroneMap/WebODM" target="_blank">WebODM</a>
<p>This software is released under the terms of the <a href="https://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPLv3 License</a>. See <a href="https://github.com/OpenDroneMap/node-OpenDroneMap" target="_blank">node-opendronemap</a> on Github for more information.</p> <p>This software is released under the terms of the <a href="https://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPLv3 License</a>. See <a href="https://github.com/OpenDroneMap/NodeODM" target="_blank">NodeODM</a> on Github for more information.</p>
</footer> </footer>
</div> </div>
<!-- /container --> <!-- /container -->

Wyświetl plik

@ -178,7 +178,7 @@ $(function() {
self.info({ error: url + " is unreachable." }); self.info({ error: url + " is unreachable." });
}); });
} }
this.fetchOutputInterval = setInterval(fetchOutput, 2000); this.fetchOutputInterval = setInterval(fetchOutput, 5000);
fetchOutput(); fetchOutput();
this.viewingOutput(true); this.viewingOutput(true);
@ -193,7 +193,7 @@ $(function() {
this.refreshInfo(); this.refreshInfo();
this.refreshInterval = setInterval(function() { this.refreshInterval = setInterval(function() {
self.refreshInfo(); self.refreshInfo();
}, 500); // TODO: change to larger value }, 2000);
}; };
Task.prototype.stopRefreshingInfo = function() { Task.prototype.stopRefreshingInfo = function() {
if (this.refreshInterval) { if (this.refreshInterval) {
@ -359,6 +359,14 @@ $(function() {
this.value(undefined); this.value(undefined);
}; };
function query(key) {
key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));
return match && decodeURIComponent(match[1].replace(/\+/g, " "));
}
var token = query('token') || "";
function OptionsModel() { function OptionsModel() {
var self = this; var self = this;
@ -371,7 +379,7 @@ $(function() {
this.showOptions = ko.observable(false); this.showOptions = ko.observable(false);
this.error = ko.observable(); this.error = ko.observable();
$.get("/options") $.get("/options?token=" + token)
.done(function(json) { .done(function(json) {
if (json.error) self.error(json.error); if (json.error) self.error(json.error);
else { else {