kopia lustrzana https://github.com/OpenDroneMap/NodeODM
NodeODM name change, pass token to /options
rodzic
ba5eff08d0
commit
c23d8bde75
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Node-OpenDroneMap</title>
|
||||
<title>NodeODM</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<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>
|
||||
</div>
|
||||
|
@ -66,13 +66,13 @@
|
|||
|
||||
<div data-bind="visible: showOptions()">
|
||||
|
||||
<div >
|
||||
<div>
|
||||
<label for="webhook">webhook callback url (optional):</label>
|
||||
<br/>
|
||||
<input id="webhook" name="webhook" class="form-control" type="text">
|
||||
<button type="submit" class="btn glyphicon glyphicon-info-sign btn-info" data-toggle="tooltip" data-placement="top" title="Optional webhook" ></button>
|
||||
<button id="resetWebhook" type="submit" class="btn glyphicon glyphicon glyphicon-repeat btn-default" data-toggle="tooltip" data-placement="top" title="Reset to default" ></button>
|
||||
<br/><br/>
|
||||
<br/><br/>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -84,8 +84,8 @@
|
|||
<!-- ko if: properties.type === 'bool' -->
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" data-bind="checked: value"> Enable
|
||||
</label>
|
||||
<input type="checkbox" data-bind="checked: value"> Enable
|
||||
</label>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<button type="submit" class="btn glyphicon glyphicon-info-sign btn-info" data-toggle="tooltip" data-placement="top" data-bind="attr: {title: properties.help}"></button>
|
||||
|
@ -157,8 +157,8 @@
|
|||
<hr>
|
||||
|
||||
<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>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>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/NodeODM" target="_blank">NodeODM</a> on Github for more information.</p>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
|
|
@ -178,7 +178,7 @@ $(function() {
|
|||
self.info({ error: url + " is unreachable." });
|
||||
});
|
||||
}
|
||||
this.fetchOutputInterval = setInterval(fetchOutput, 2000);
|
||||
this.fetchOutputInterval = setInterval(fetchOutput, 5000);
|
||||
fetchOutput();
|
||||
|
||||
this.viewingOutput(true);
|
||||
|
@ -193,7 +193,7 @@ $(function() {
|
|||
this.refreshInfo();
|
||||
this.refreshInterval = setInterval(function() {
|
||||
self.refreshInfo();
|
||||
}, 500); // TODO: change to larger value
|
||||
}, 2000);
|
||||
};
|
||||
Task.prototype.stopRefreshingInfo = function() {
|
||||
if (this.refreshInterval) {
|
||||
|
@ -359,6 +359,14 @@ $(function() {
|
|||
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() {
|
||||
var self = this;
|
||||
|
||||
|
@ -371,7 +379,7 @@ $(function() {
|
|||
this.showOptions = ko.observable(false);
|
||||
this.error = ko.observable();
|
||||
|
||||
$.get("/options")
|
||||
$.get("/options?token=" + token)
|
||||
.done(function(json) {
|
||||
if (json.error) self.error(json.error);
|
||||
else {
|
||||
|
|
Ładowanie…
Reference in New Issue