mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
initial use of a json file to describe setup options
This commit is contained in:
parent
a684191cf1
commit
2e176589b7
5 changed files with 52 additions and 4 deletions
|
@ -18,4 +18,16 @@ $(document).ready(function(){
|
|||
resizeFn();
|
||||
$(window).resize(resizeFn);
|
||||
});
|
||||
|
||||
|
||||
var listSource = $('#list-group-template').html();
|
||||
var listTemplate = _.template(listSource);
|
||||
|
||||
reloadSettings();
|
||||
|
||||
function reloadSettings() {
|
||||
$.getJSON('describe-setup.json', function(data){
|
||||
$('.list-group').html(listTemplate(data));
|
||||
});
|
||||
}
|
||||
});
|
31
domain-server/resources/web/setup/describe-setup.json
Normal file
31
domain-server/resources/web/setup/describe-setup.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"descriptions": {
|
||||
"basic": {
|
||||
"label": "Basic",
|
||||
"settings": {
|
||||
"http-username": {
|
||||
"label": "HTTP Username",
|
||||
"help": "Username used for basic HTTP authentication"
|
||||
},
|
||||
"http-password": {
|
||||
"label": "HTTP Password",
|
||||
"type": "password",
|
||||
"help": "Password used for basic HTTP authentication"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metaverse": {
|
||||
"label": "Metaverse Registration",
|
||||
"settings": {
|
||||
"access-token": {
|
||||
"label": "High Fidelity Access Token",
|
||||
"help": "This is an access token generated on the <a href='https://data.highfidelity.io/tokens'>My Tokens</a> page of your High Fidelity account.<br/>Generate a token with the 'domains' scope and paste it here.<br/>This is required to associate this domain-server with a domain in your account."
|
||||
},
|
||||
"id": {
|
||||
"label": "Domain ID",
|
||||
"help": "This is your High Fidelity domain ID. If you do not want your domain to be registered in the High Fidelity metaverse you can leave this blank."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,9 +3,13 @@
|
|||
<div class="col-md-3 col-sm-3" id="setup-sidebar-col">
|
||||
<div id="setup-sidebar" data-clampedwidth="#setup-sidebar-col" class="hidden-xs" data-spy="affix" data-offset-top="50">
|
||||
<div class="list-group">
|
||||
<a href="#metaverse" class="list-group-item active">
|
||||
Metaverse Registration
|
||||
</a>
|
||||
<script id="list-group-template" type="text/template">
|
||||
<% _.each(descriptions, function(group, group_key){ %>
|
||||
<a href="" class="list-group-item">
|
||||
<%- group.label %>
|
||||
</a>
|
||||
<% }); %>
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<button id="save-button" class="btn btn-success">Save and restart</button>
|
||||
|
@ -67,4 +71,5 @@
|
|||
|
||||
<!--#include virtual="footer.html"-->
|
||||
<script src='/js/setup.js'></script>
|
||||
<script src='/js/underscore-1.5.0.min.js'></script>
|
||||
<!--#include virtual="page-end.html"-->
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "DomainServerSettingsManager.h"
|
||||
|
||||
const QString SETTINGS_DESCRIPTION_RELATIVE_PATH = "/resources/web/settings/describe.json";
|
||||
const QString SETTINGS_DESCRIPTION_RELATIVE_PATH = "/resources/web/settings/describe-settings.json";
|
||||
const QString SETTINGS_JSON_FILE_RELATIVE_PATH = "/resources/settings.json";
|
||||
|
||||
DomainServerSettingsManager::DomainServerSettingsManager() :
|
||||
|
|
Loading…
Reference in a new issue