added filter for service name

alpha
alex 2023-03-04 09:38:58 +01:00
parent 8d81e87526
commit bb9d0d42da
3 changed files with 25 additions and 7 deletions

13
dist/index.html vendored
View File

@ -32,7 +32,18 @@
<input type="checkbox" id="checkbox-beta" name="beta" value="beta" checked> <input type="checkbox" id="checkbox-beta" name="beta" value="beta" checked>
<label for="beta">Beta</label><br> <label for="beta">Beta</label><br>
<input type="checkbox" id="checkbox-stable" name="stable" value="stable" checked> <input type="checkbox" id="checkbox-stable" name="stable" value="stable" checked>
<label for="stable">Stable</label> <label for="stable">Stable</label><br>
<hr color="#34495e">
<input type="checkbox" id="checkbox-api" name="api" value="api" checked>
<label for="api">API</label><br>
<input type="checkbox" id="checkbox-ws" name="ws" value="ws" checked>
<label for="ws">WS</label><br>
<input type="checkbox" id="checkbox-sse" name="sse" value="sse" checked>
<label for="sse">SSE</label><br>
<input type="checkbox" id="checkbox-mailer" name="mailer" value="mailer" checked>
<label for="mailer">Mailer</label><br>
<input type="checkbox" id="checkbox-storage" name="storage" value="storage" checked>
<label for="storage">Storage</label>
</div> </div>
</div> </div>

17
dist/script.js vendored
View File

@ -61,10 +61,15 @@ const wsAddress = "ws://192.168.178.93:50000/ws?auth=aksmdaksdmaskdm213askm"
* Begin of code * Begin of code
*/ */
const viewersCount = document.getElementById("viewers-count") const viewersCount = document.getElementById("viewers-count")
const connectionStatus = document.getElementById("connection-status")
const checkboxAlpha = document.getElementById("checkbox-alpha") const checkboxAlpha = document.getElementById("checkbox-alpha")
const checkboxBeta = document.getElementById("checkbox-beta") const checkboxBeta = document.getElementById("checkbox-beta")
const checkboxStable = document.getElementById("checkbox-stable") const checkboxStable = document.getElementById("checkbox-stable")
const connectionStatus = document.getElementById("connection-status") const checkboxApi = document.getElementById("checkbox-api")
const checkboxWs = document.getElementById("checkbox-ws")
const checkboxSse = document.getElementById("checkbox-sse")
const checkboxMailer = document.getElementById("checkbox-mailer")
const checkboxStorage = document.getElementById("checkbox-storage")
const messages = document.getElementById("messages") const messages = document.getElementById("messages")
let autoScroll = true; let autoScroll = true;
@ -125,10 +130,6 @@ function clampClosed() {
} }
function formatServiceCode(code) { function formatServiceCode(code) {
if (code == "") {
code = "000" // default value
}
return clampOn() + return clampOn() +
"<span style='color: "+serviceCodeColor+"'>" + "<span style='color: "+serviceCodeColor+"'>" +
code + "</span>" + clampClosed() code + "</span>" + clampClosed()
@ -240,6 +241,12 @@ function connectWS() {
if (serviceType == 1 && !checkboxBeta.checked) return if (serviceType == 1 && !checkboxBeta.checked) return
if (serviceType == 2 && !checkboxStable.checked) return if (serviceType == 2 && !checkboxStable.checked) return
if (serviceName == 0 && !checkboxApi.checked) return
if (serviceName == 1 && !checkboxMailer.checked) return
if (serviceName == 2 && !checkboxStorage.checked) return
if (serviceName == 3 && !checkboxSse.checked) return
if (serviceName == 4 && !checkboxWs.checked) return
addMessage(serviceCode, messageType, serviceType, serviceName, data.Msg, timestamp) addMessage(serviceCode, messageType, serviceType, serviceName, data.Msg, timestamp)
} }
} }

2
dist/style.css vendored
View File

@ -56,7 +56,7 @@ button {
border-radius: 6px; border-radius: 6px;
} }
.checkbox-container{ .checkbox-container {
position: absolute; position: absolute;
top: 0; top: 0;
position: -webkit-sticky; /* Safari */ position: -webkit-sticky; /* Safari */