Manager installation process completed

This commit is contained in:
Pax1601 2023-12-22 19:22:49 +01:00
parent 15e8c9e791
commit 24ed96b348
7 changed files with 30 additions and 18 deletions

View File

@ -1,6 +1,6 @@
<style>
#manager-instances .scroll-container {
height: 440px;
height: 500px;
overflow-y: auto;
}
@ -105,17 +105,11 @@
</style>
<div id="manager-instances">
<div class="page-header">
Step 1: Select DCS Installations
Step 1: Select Olympus Installations
</div>
<div class="instructions">
<span>
Select the copy of DCS you want to install Olympus to.
</span>
<span>
For most people, this is your main DCS installation.
</span>
<span>
If you are running a dedicated server, you would also install Olympus to this DCS version.
Select the copy of Olympus you want to manage.
</span>
</div>
<div class="scroll-container">

View File

@ -40,6 +40,6 @@
Update/remove Olympus
</div>
<div class="option inverted manage">
View and manage instances
View and manage instances (WIP)
</div>
</div>

View File

@ -153,8 +153,8 @@
<div class="button back">
Back to main menu
</div>
<div class="button cancel">
<!--<div class="button cancel">
Close
</div>
</div>-->
</div>
</div>

View File

@ -6,6 +6,7 @@ var path = require('path')
const vi = require('win-version-info');
const checkPort = require('./net')
const dircompare = require('dir-compare');
const { installJSON } = require('./filesystem')
class DCSInstance {
static instances = null;
@ -64,6 +65,15 @@ class DCSInstance {
this.name = path.basename(folder);
if (fs.existsSync(path.join(folder, "Config", "olympus.json"))){
try {
var config = JSON.parse(fs.readFileSync(path.join(folder, "Config", "olympus.json")));
this.clientPort = config["client"]["port"];
this.backendPort = config["server"]["port"];
this.backendAddress = config["server"]["address"];
} catch (err) {
console.error(err)
}
this.installed = true;
const options = { compareContent: true };
var err1 = true;

View File

@ -16,7 +16,7 @@ class ManagerResult extends ManagerPage {
element.innerHTML = str;
this.element.querySelector(".back").addEventListener("click", (e) => this.onBackClicked(e));
this.element.querySelector(".cancel").addEventListener("click", (e) => this.onCancelClicked(e));
//this.element.querySelector(".cancel").addEventListener("click", (e) => this.onCancelClicked(e));
}
show(instance) {

View File

@ -110,7 +110,7 @@ async function setup() {
}
/* Instances */
var managerInstances = new ManagerInstances({ instances: instances });
var managerInstances = new ManagerInstances({ instances: instances.filter((instance) => {return instance.installed; }) });
managerInstances.onBackClicked = (e) => {
managerInstances.hide();
managerMenu.show();
@ -189,11 +189,11 @@ async function setup() {
var managerResult = new ManagerResult();
managerResult.onBackClicked = (e) => {
managerResult.hide();
managerMenu.show();
location.reload();
}
managerResult.onCancelClicked = (e) => {
managerResult.hide();
managerMenu.show();
location.reload();
}
document.body.appendChild(managerMenu.getElement());

View File

@ -9,9 +9,17 @@ echo "* |_____/ \_____|_____/ \____/|_|\__, |_| |_| |_| .__/ \__,_|___/ *
echo "* __/ | | | *"
echo "* |___/ |_| *"
echo "*********************************************************************"
echo Welcome to the DCS Olympus v{{OLYMPUS_VERSION_NUMBER}} installation script. Please wait while the necessary dependencies are installed!
echo Welcome to the DCS Olympus {{OLYMPUS_VERSION_NUMBER}} installation script. Please wait while the necessary dependencies are installed!
echo:
echo The output of this script is also available in the file %CD%\output.log. If you encounter any error, make sure to attach that file to your help request!
WHERE /q powershell
if %ERRORLEVEL% NEQ 0 (
echo Powershell not installed in the system, no output log available.
) else (
echo The output of this script is also available in the file "%CD%\output.log". If you encounter any error, make sure to attach that file to your help request!
)
timeout /t 5
echo Checking if node.js framework is installed...