mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 14:12:26 +02:00
Update the domain-wizard to include threading options.
This commit is contained in:
parent
58bbab6b42
commit
a513bba8c6
3 changed files with 66 additions and 14 deletions
|
@ -1168,7 +1168,7 @@
|
|||
"label": "Automatically determine thread count",
|
||||
"type": "checkbox",
|
||||
"help": "Allow system to determine number of threads (recommended)",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"advanced": true
|
||||
},
|
||||
{
|
||||
|
@ -1458,7 +1458,7 @@
|
|||
"label": "Automatically determine thread count",
|
||||
"type": "checkbox",
|
||||
"help": "Allow system to determine number of threads (recommended)",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"advanced": true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<div class="wizard-step col-md-9 col-centered" style="display: none;">
|
||||
<h4 class="step-title"></h4>
|
||||
<div class="row">
|
||||
<p id="permissions-description" class="col-md-12 step-info"><b>Localhost</b> has been granted administrator privileges to this domain. (Localhost is any</br>user on the same machine as the High Fidelity Server)</p>
|
||||
<p id="permissions-description" class="col-md-12 step-info"><b>Localhost</b> has been granted administrator privileges to this domain. (Localhost is any</br>user on the same machine as the Vircadia server)</p>
|
||||
</div>
|
||||
<div id="admin-row" class="row">
|
||||
<p class="col-md-6">
|
||||
|
@ -186,7 +186,37 @@
|
|||
<button type="button" class="btn btn-md btn-block btn-default back-button">Back</button>
|
||||
</dd>
|
||||
<dd class="col-md-3 col-md-offset-6">
|
||||
<button id="save-username-password" type="button" class="btn btn-md btn-block btn-primary">Finish</button>
|
||||
<button id="save-username-password" type="button" class="btn btn-md btn-block btn-primary next-button">Next</button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="wizard-step col-md-8 col-centered" style="display: none;">
|
||||
<h4 class="step-title"></h4>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span class='step-description'>
|
||||
Would you like use automatic threading for your server's avatars and audio?
|
||||
If you are hosting this server on your local computer and it is not very powerful, then consider leaving this off because the server will use more resources if it is being utilized extensively, thereby slowing down your computer.
|
||||
If you are running this server on a powerful system and intend to have a large audience, then turn this setting on.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="automatic-threading-options-row" class="row">
|
||||
<p class="col-md-2">
|
||||
<label>
|
||||
<input id="enable-automatic-threading" name="threading-checkbox" type="checkbox" value="true"> Enable Automatic Threading
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<dl class="row">
|
||||
<dd class="col-md-3">
|
||||
<button type="button" class="btn btn-md btn-block btn-default back-button">Back</button>
|
||||
</dd>
|
||||
<dd class="col-md-3 col-md-offset-6">
|
||||
<button id="save-threading-settings" type="button" class="btn btn-md btn-block btn-primary">Finish</button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -201,7 +231,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-xs-offset-1">
|
||||
<p id="main-description" class="step-info">You have successfully setup and configured your cloud hosted domain.</p>
|
||||
<p id="main-description" class="step-info">You have successfully setup and configured your Vircadia domain.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -51,6 +51,10 @@ $(document).ready(function(){
|
|||
$('body').on('click', '#save-permissions', function() {
|
||||
savePermissions();
|
||||
});
|
||||
|
||||
$('body').on('click', '#save-threading-settings', function() {
|
||||
saveThreadingSettings();
|
||||
});
|
||||
|
||||
function triggerSaveUsernamePassword(event) {
|
||||
if (event.keyCode === 13) {
|
||||
|
@ -103,7 +107,7 @@ $(document).ready(function(){
|
|||
$(this).prop('disabled', true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
reloadSettings(function(success) {
|
||||
if (success) {
|
||||
getDomainFromAPI();
|
||||
|
@ -145,7 +149,7 @@ function setupWizardSteps() {
|
|||
$('#admin-description').html('Add more High Fidelity usernames');
|
||||
} else {
|
||||
$('.cloud-only').remove();
|
||||
$('#save-permissions').text("Finish");
|
||||
$('#save-threading-settings').text("Finish");
|
||||
|
||||
steps = $('.wizard-step');
|
||||
$(steps).each(function(i) {
|
||||
|
@ -254,10 +258,6 @@ function goToNextStep() {
|
|||
var currentStep = $('body').find('.wizard-step:visible');
|
||||
var nextStep = currentStep.next('.wizard-step');
|
||||
|
||||
var formJSON = {
|
||||
"wizard": {}
|
||||
}
|
||||
|
||||
if (nextStep.length > 0) {
|
||||
currentStep.hide();
|
||||
nextStep.show();
|
||||
|
@ -515,7 +515,29 @@ function saveUsernamePassword() {
|
|||
$(this).blur();
|
||||
|
||||
// POST the form JSON to the domain-server settings.json endpoint so the settings are saved
|
||||
postSettings(formJSON, function() {
|
||||
location.reload();
|
||||
});
|
||||
postSettings(formJSON, goToNextStep);
|
||||
}
|
||||
|
||||
function saveThreadingSettings() {
|
||||
var enable_automatic_threading = $("#enable-automatic-threading").prop("checked");
|
||||
|
||||
currentStepNumber += 1;
|
||||
|
||||
var formJSON = {
|
||||
"audio_threading": {
|
||||
"auto_threads": enable_automatic_threading
|
||||
},
|
||||
"avatar_mixer": {
|
||||
"auto_threads": enable_automatic_threading
|
||||
},
|
||||
"wizard": {
|
||||
"steps_completed": currentStepNumber.toString()
|
||||
}
|
||||
}
|
||||
|
||||
// remove focus from the button
|
||||
$(this).blur();
|
||||
|
||||
// POST the form JSON to the domain-server settings.json endpoint so the settings are saved
|
||||
postSettings(formJSON, goToNextStep);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue