Readded dashboard to manager

This commit is contained in:
Pax1601
2024-01-23 08:01:34 +01:00
parent 05f98b2738
commit 6f7b251094
15 changed files with 355 additions and 146 deletions

View File

@@ -45,11 +45,10 @@
<div class="input-group client-port">
<span>Client port
<img src="./icons/circle-info-solid.svg"
title="This port is used to allow access to Olympus.
Be sure to allow this port through your firewall if you want people to connect remotely">
title="This port is used to allow access to Olympus. Be sure to allow this port through your firewall if you want people to connect remotely">
</span>
<div>
<input type="number" min="1024" max="65535" value="<%= activeInstance[" clientPort"] %>">
<input type="number" min="1024" max="65535" value="<%= activeInstance["clientPort"] %>">
<img class="success hide">
<div class="error hide">
<img> <span>Port already in use</span>
@@ -59,11 +58,10 @@
<div class="input-group backend-port">
<span>Backend port
<img src="./icons/circle-info-solid.svg"
title="This port is used by Olympus to communicate with DCS.
You only need to allow it through your firewall if you enable direct API connection">
title="This port is used by Olympus to communicate with DCS. You only need to allow it through your firewall if you enable direct API connection">
</span>
<div>
<input type="number" min="1024" max="65535" value="<%= activeInstance[" backendPort"] %>"
<input type="number" min="1024" max="65535" value="<%= activeInstance["backendPort"] %>"
onchange="signal('onBackendPortChanged', this.value)">
<img class="success hide">
<div class="error hide">
@@ -75,12 +73,10 @@
<span onclick="signal('onEnableAPIClicked')">
<div class="checkbox"></div> Enable direct backend API connection
<img src="./icons/circle-info-solid.svg"
title="Allows services to connect to Olympus directly.
This is NOT NEEDED for normal Olympus operation, even for dedicated servers.
Leave it unchecked if in doubt.">
title="Allows services to connect to Olympus directly. This is NOT NEEDED for normal Olympus operation, even for dedicated servers. Leave it unchecked if in doubt.">
</span>
</div>
<div class="note warning">
<div class="note warning hide">
Note: if you enable direct backend API connection, you will be required to run DCS as admin or run the netsh
command for others to connect. Leave unchecked if you don't know what this is. <br>See the Olympus
documentation for more details.

View File

@@ -1,9 +1,4 @@
<style>
#manager-instances {
padding-left: 80px;
padding-right: 80px;
}
#manager-instances .scroll-container {
height: 100%;
overflow-y: auto;
@@ -18,7 +13,7 @@
height: fit-content;
width: 100%;
flex-wrap: wrap;
padding: 15px;
padding: 15px 40px;
}
#manager-instances .option {
@@ -47,10 +42,6 @@
#manager-instances .option:not(.installed) .server-data {
opacity: 50%;
}
#manager-instances>.instructions {
margin-bottom: 10px;
}
#manager-instances .button.cancel {
position: absolute;
@@ -119,7 +110,7 @@
#manager-instances .instance-info {
display: flex;
flex-direction: column;
row-gap: 5px;
row-gap: 10px;
width: 100%;
}
@@ -225,13 +216,13 @@
}
</style>
<div id="manager-instances">
<div id="manager-instances" style="margin-bottom: 10px;">
<div class="content">
<div class="instructions">
<span>
<div class="instructions" style="display: flex; flex-direction: column; row-gap: 10px; align-items: center; padding: 20px;">
<span style="color: var(--offwhite); font-size: 18px; font-weight: 600;">
View and manage installs
</span>
<span>
<span style="color: var(--offwhite); font-size: 14px; text-align: center;">
The following DCS installations have been identified. <br>You can start an Olympus server, modify settings and uninstall below.
</span>
</div>
@@ -241,10 +232,6 @@
<div class="option <%= instances[i].installed? 'installed': '' %>" data-folder="<%= instances[i].folder %>">
<div class="instance-info">
<span><%= instances[i].name %></span>
<span class="<%= instances[i].installed? (instances[i].error? 'error': 'installed'): '' %>">
<%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
</span>
<span><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
<div class="server-data">
<div class="server-status webserver online hide">ACTIVE</div>
<div class="server-status webserver offline">OFFLINE</div>
@@ -254,34 +241,42 @@
<div class="server-data-entry load"><img src="./icons/server-solid.svg"><span>Load: </span><span class="data">0</span></div>
<div class="server-data-entry uptime"></div>
</div>
<div class="divider"></div>
<div class="info">
<div>Client port</div>
<div> <%= instances[i].installed? instances[i].clientPort: "N/A" %> </div>
</div>
<div class="info">
<div>Backend port</div>
<div> <%= instances[i].installed? instances[i].backendPort: "N/A" %> </div>
</div>
<div class="info">
<div>Backend address</div>
<div> <%= instances[i].installed? instances[i].backendAddress: "N/A" %> </div>
<span class="<%= instances[i].installed? (instances[i].error? 'error': 'installed'): '' %>">
<%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
</span>
<span><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
<div style="display: flex; flex-direction: column; row-gap: 5px;">
<div class="info">
<div>Client port</div>
<div> <%= instances[i].installed? instances[i].clientPort: "N/A" %> </div>
</div>
<div class="info">
<div>Backend port</div>
<div> <%= instances[i].installed? instances[i].backendPort: "N/A" %> </div>
</div>
<div class="info">
<div>Backend address</div>
<div> <%= instances[i].installed? instances[i].backendAddress: "N/A" %> </div>
</div>
</div>
</div>
<div class="instance-buttons">
<div class="button start collapse">
Start Olympus
<div>
<div class="button start-server">Start server</div>
<div class="button start-client">Start client</div>
<div class="button start-server" onclick="signal('onStartServerClicked', '<%= instances[i].name %>')">Start server</div>
<div class="button start-client" onclick="signal('onStartClientClicked', '<%= instances[i].name %>')">Start client</div>
</div>
</div>
<div class="button edit">Edit settings</div>
<div class="button install">Install Olympus</div>
<div class="button uninstall">Uninstall Olympus</div>
<div class="button open-browser hide">Open in browser</div>
<div class="button stop hide">Stop Olympus</div>
<div class="button edit" onclick="signal('onEditClicked', '<%= instances[i].name %>')">Edit settings</div>
<div class="button install" onclick="signal('onInstallClicked', '<%= instances[i].name %>')">Install Olympus</div>
<div class="button uninstall" onclick="signal('onUninstallClicked', '<%= instances[i].name %>')">Uninstall Olympus</div>
<div class="button open-browser hide" onclick="signal('onOpenBrowserClicked', '<%= instances[i].name %>')">Open in browser</div>
<div class="button stop hide" onclick="signal('onStopClicked', '<%= instances[i].name %>')">Stop Olympus</div>
</div>
</div>
<% } %>

View File

@@ -80,13 +80,13 @@
</div>
</div>
<div id="menu" style="row-gap: 20px; width: 60%;">
<div class="option <%= installEnabled? '': 'disabled' %>" onclick="signal('onInstallClicked')">
<div class="option <%= installEnabled? '': 'disabled' %>" onclick="signal('onInstallMenuClicked')">
Add Olympus
<div>
Add or update Olympus to a new DCS instance
</div>
</div>
<div class="option <%= editEnabled? '': 'disabled' %>" onclick="signal('onEditClicked')">
<div class="option <%= editEnabled? '': 'disabled' %>" onclick="signal('onEditMenuClicked')">
Change settings
<div>
Adjust port, address and password settings

View File

@@ -19,19 +19,22 @@
<span>Game Master Password<img src="./icons/circle-info-solid.svg"
title="This password is used to access Olympus as Game Master with full privileges.">
</span>
<input type="password" minlength="8">
<input type="password" minlength="8" onchange="signal('onGameMasterPasswordChanged', this.value)" value="<%= activeInstance["installed"]? 'This is a long string so that users know this is not actually their password. Hi Tony!': '' %>">
</div>
<div class="input-group blue-commander">
<span>Blue Commander Password<img src="./icons/circle-info-solid.svg"
title="This password is used to access Olympus as blue coalition Commander.">
</span>
<input type="password" minlength="8">
<input type="password" minlength="8" onchange="signal('onBlueCommanderPasswordChanged', this.value)" value="<%= activeInstance["installed"]? 'This is a long string so that users know this is not actually their password. Hi Tony!': '' %>">
</div>
<div class="input-group red-commander">
<span>Red Commander Password<img src="./icons/circle-info-solid.svg"
title="This password is used to access Olympus as red coalition Commander.">
</span>
<input type="password" minlength="8">
<input type="password" minlength="8" onchange="signal('onRedCommanderPasswordChanged', this.value)" value="<%= activeInstance["installed"]? 'This is a long string so that users know this is not actually their password. Hi Tony!': '' %>">
</div>
<div class="<%= activeInstance["installed"]? '': 'hide' %>" style="color: var(--offwhite); font-size: 14px; color: var(--lightgray);">
Note: to keep the old passwords, click <b>Next</b> without editing any value.
</div>
</div>
</div>

View File

@@ -4,7 +4,6 @@
flex-direction: column;
row-gap: 30px;
padding: 60px 120px;
color: var(--offwhite);
}
#result-page .result-summary {
@@ -29,11 +28,6 @@
font-size: 13px;
}
#result-page .result-summary.wait{
color: var(--offwhite);
border: 1px solid var(--offwhite);
}
#result-page .result-summary.success{
color: var(--background-color);
background-color: var(--green);
@@ -44,6 +38,13 @@
background-color: var(--red);
}
#result-page .instructions-group {
display: flex;
color: var(--offwhite);
flex-direction: column;
row-gap: 15px;
}
#result-page .usage-instructions {
background-color: var(--background-usage);
border-radius: 10px;
@@ -75,47 +76,67 @@
}
</style>
<div id="result-page">
<div class="result-summary wait">
<div class="title"><img src="./icons/spinner-solid.svg" style="animation: rotate 2s linear infinite;">Please wait while Olympus is being added to <i><%= activeInstance["name"] %></i></div>
</div>
<div class="result-summary success hide">
<div class="title"><img src="./icons/check-solid-background.svg">Olympus successfully added to <i><%= activeInstance["name"] %></i></div>
<div class="title"><img src="./icons/check-solid-background.svg">Olympus successfully added to <i style="margin-left: 3px"><%= activeInstance["name"] %></i></div>
<div class="description">See the <b>DCS Olympus Wiki</b> for more information on how to use Olympus and for troubleshooting issues. You may now close the installer.</div>
</div>
<div class="result-summary error hide">
<div class="title"><img src="./icons/triangle-exclamation-solid-background.svg">An error occurred while adding Olympus to <i><%= activeInstance["name"] %></i></div>
<div class="description">See the manager log located in TODO for more information.</div>
</div>
<div style="font-size: 18px; font-weight: bold;">
How to launch Olympus
</div>
<div style="font-size: 13px;">
To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
</div>
<div class="usage-instructions">
<div>
<img src="./icons/server-solid.svg">
<div>
Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
</div>
<div class="instructions-group hide">
<div style="font-size: 18px; font-weight: bold; color: var(--offwhite);">
How to launch Olympus
</div>
<img src="./icons/arrow-right-solid.svg">
<div>
<img src="./icons/chrome.svg">
<div>
Visit http://localhost:3000 in a web browser (Google Chrome recommended).
</div>
<div style="font-size: 13px; color: var(--offwhite);">
To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
</div>
<img src="./icons/arrow-right-solid.svg">
<div>
<img src="./icons/gamepad-solid.svg">
<div>
Launch DCS, load a mission and unpause the game. Enjoy!
<% if (activeInstance["installationType"] === "singleplayer") { %>
<div class="usage-instructions" style="width: 600px;">
<div>
<img src="./icons/olympus_white.png">
<div>
Launch the Olympus Client via the shortcut in DCS Olympus / Saved Games.
</div>
</div>
<img src="./icons/arrow-right-solid.svg">
<div>
<img src="./icons/gamepad-solid.svg">
<div>
Launch DCS, load a mission and unpause the game. Enjoy!
</div>
</div>
</div>
</div>
</div>
<div style="font-size: 13px;">
Alternatively, you can run the Olympus Client instead to replace the first two steps above.
<div style="font-size: 13px;">
Alternatively, you can run the Olympus Server instead and visit http://localhost:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended) to replace the first step above.
</div>
<% } else { %>
<div class="usage-instructions">
<div>
<img src="./icons/server-solid.svg">
<div>
Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
</div>
</div>
<img src="./icons/arrow-right-solid.svg">
<div>
<img src="./icons/chrome.svg">
<div>
Visit http://<%= ip %>:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended).
</div>
</div>
<img src="./icons/arrow-right-solid.svg">
<div>
<img src="./icons/gamepad-solid.svg">
<div>
Launch DCS, load a mission and unpause the game. Enjoy!
</div>
</div>
</div>
<div style="font-size: 13px;">
Note, to access Olympus from this PC, you need to visit http://localhost:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended) instead.
</div>
<% } %>
</div>
<div class="buttons-footer">

View File

@@ -70,8 +70,8 @@
}
</style>
<div class="wizard-page">
<div class="cancel" style="font-size: 14px; font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px;">
<img src="./icons/chevron-left-solid.svg" style="height: 14px;">Cancel install
<div class="cancel" style="font-size: 14px; font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px; cursor: pointer; text-decoration: underline;" onclick="signal('onCancelClicked')">
<img src="./icons/chevron-left-solid.svg" style=" height: 14px;">Cancel install
</div>
<div class="content">