diff --git a/yukon/domain/avatar.py b/yukon/domain/avatar.py index fb30b3b..19169a6 100644 --- a/yukon/domain/avatar.py +++ b/yukon/domain/avatar.py @@ -272,6 +272,8 @@ def to_builtin(self) -> Any: software_version = getattr(info, "software_version") hardware_version = getattr(info, "hardware_version") software_vcs_revision_id = getattr(info, "software_vcs_revision_id") + if software_vcs_revision_id: + software_vcs_revision_id = hex(software_vcs_revision_id) software_major_version = getattr(software_version, "major", 0) software_minor_version = getattr(getattr(info, "software_version"), "minor", 0) hardware_major_version = getattr(hardware_version, "major", 0) @@ -339,6 +341,16 @@ def to_builtin(self) -> Any: ^ hash(frozenset(self._ports.sub)) ^ hash(frozenset(self._ports.cln)) ^ hash(frozenset(self._ports.srv)) + ^ hash( + json.dumps( + { + "vendor_specific_status_code": vendor_specific_status_code, + "mode": mode_value, + "health": health_value, + }, + sort_keys=True, + ) + ) ^ hash(self._info.name.tobytes().decode() if self._info is not None else None) ^ hash(self.random_str_for_forced_update) # This accounts for is_disappeared and is_being_queried ^ hash(self.disappeared_since) diff --git a/yukon/services/utils.py b/yukon/services/utils.py index a182dac..ae7e6e6 100644 --- a/yukon/services/utils.py +++ b/yukon/services/utils.py @@ -52,6 +52,7 @@ class Datatype: is_fixed_id: bool name: str class_reference: typing.Any + is_service: bool def __hash__(self) -> int: return hash(self.name) @@ -115,6 +116,7 @@ def scan_package_look_for_classes( break counter += 1 module_or_class, previous_module_or_class = queue.get_nowait() + is_potentially_a_service = False # Get all modules and classes that are seen in the imported module elements = inspect.getmembers(module_or_class, lambda x: inspect.ismodule(x) or inspect.isclass(x)) for element in elements: @@ -133,7 +135,13 @@ def scan_package_look_for_classes( except Exception: logger.exception("Failed to get model for %s", _class) continue - classes.append(Datatype(hasattr(_class, "_FIXED_PORT_ID_"), model.full_name, _class)) + if _class.__name__ == "Request" or _class.__name__ == "Response": + is_potentially_a_service = True + classes.append( + Datatype( + hasattr(_class, "_FIXED_PORT_ID_"), model.full_name, _class, is_service=is_potentially_a_service + ) + ) except Empty: pass # logger.debug(f"Loop {loop_unique_id} took {time.time() - loop_start} seconds") @@ -152,12 +160,14 @@ def get_datatype_return_dto(all_classes: typing.List[Datatype]) -> typing.Any: return_object["fixed_id_messages"][str(datatype.class_reference._FIXED_PORT_ID_)] = { "short_name": datatype.class_reference.__name__, "name": datatype.name, + "is_service": datatype.is_service, } else: return_object["variable_id_messages"].append( { "short_name": datatype.class_reference.__name__, "name": datatype.name, + "is_service": datatype.is_service, } ) except Exception as e: diff --git a/yukon/version.py b/yukon/version.py index bcbba9d..41f762f 100644 --- a/yukon/version.py +++ b/yukon/version.py @@ -1 +1 @@ -__version__ = "2023.3.42" +__version__ = "2023.3.44" diff --git a/yukon/web/modules/context-menu.module.js b/yukon/web/modules/context-menu.module.js index 01892fd..2e00b5d 100644 --- a/yukon/web/modules/context-menu.module.js +++ b/yukon/web/modules/context-menu.module.js @@ -562,7 +562,7 @@ export function make_context_menus(yukon_state) { }, click: async (e, elementOpenedOn) => { const portNr = parseInt(elementOpenedOn.getAttribute("data-port")); - const datatypes = await getDatatypesForPort(portNr, yukon_state); + const datatypes = await getDatatypesForPort(portNr, "pub", yukon_state); const response = await yukon_state.zubax_apij.make_simple_publisher_with_datatype_and_port_id(datatypes[0], portNr); const portType = elementOpenedOn.getAttribute("data-port-type"); // sub or pub or cln or srv if (response && response.success) { diff --git a/yukon/web/modules/meanings.module.js b/yukon/web/modules/meanings.module.js index 020e7a0..deed391 100644 --- a/yukon/web/modules/meanings.module.js +++ b/yukon/web/modules/meanings.module.js @@ -42,7 +42,7 @@ export function getLinkInfo(subject_id, node_id, yukon_state) { } return Array.from(new Set(infos)); } -export function getRelatedLinks(port, yukon_state) { +export function getRelatedLinks(port, port_type, yukon_state) { let links = []; for (const avatar of yukon_state.current_avatars) { const registersKeys = Object.keys(avatar.registers_values); @@ -56,6 +56,7 @@ export function getRelatedLinks(port, yukon_state) { const link_name = results[2]; const value = avatar.registers_values[register_name]; if (parseInt(value) === parseInt(port) && register_name.endsWith(".id")) { + if((port_type === "pub" || port_type === "sub") && (link_type === "cln" || link_type === "srv")) continue; const datatype_key = registersKeys.find((a) => a.endsWith(link_name + ".type")); const datatype = avatar.registers_values[datatype_key]; links.push({ name: link_name, node_id: avatar.node_id, "port": port, type: link_type, "register_name": register_name, "datatype": datatype }); @@ -63,4 +64,54 @@ export function getRelatedLinks(port, yukon_state) { } } return Array.from(new Set(links)); +} +export function decodeTelegaVSSC(vssc) { + const high_number = vssc / 16; + const low_number = vssc % 16; + if (low_number !== 0) { + if(high_number === 0) { + return "Fault in Standby, fault code: " + low_number; + } else if (high_number == 1) { + // self test + return "Fault in Self test, fault code: " + low_number; + } else if (high_number == 2) { + return "Fault in Motor ID, fault code: " + low_number; + } else if (high_number == 5) { + // drive + if(low_number === 1) { + return "Torque control mode"; + } else if(low_number === 2) { + return "Voltage control mode"; + } else if(low_number === 3) { + return "Velocity control mode"; + } else if(low_number === 9) { + // Ratiometric torque control mode + return "Ratiometric torque control mode"; + } else if (low_number === 10) { + // Ratiometric voltage control mode + return "Ratiometric voltage control mode"; + } else { + return "Fault in Drive, fault code: " + low_number; + } + } else if (high_number == 7) { + // servo + return "Fault in Servo, fault code: " + low_number; + } + } else { + if (high_number === 0) { + return "Standby"; + } else if (high_number == 1) { + // self test + return "Self test"; + } else if (high_number == 2) { + return "Motor ID"; + } else if (high_number == 5) { + // drive + return "Drive"; + } else if (high_number == 7) { + // servo + return "Servo"; + } + } + return "Unknown code"; } \ No newline at end of file diff --git a/yukon/web/modules/panels/monitor2/highlights.module.js b/yukon/web/modules/panels/monitor2/highlights.module.js index 224723f..a0363a1 100644 --- a/yukon/web/modules/panels/monitor2/highlights.module.js +++ b/yukon/web/modules/panels/monitor2/highlights.module.js @@ -38,12 +38,12 @@ export function setPortStateAsUnhiglighted(portNr, yukon_state) { } export function highlightElement(element, color, settings, yukon_state) { if (element.classList.contains("arrowhead")) { - element.style.setProperty("border-top-color", color); + element.style.setProperty("border-top-color", color, "important"); } else if (element.classList.contains("horizontal_line_label") && element.tagName === "LABEL") { - element.style.setProperty("background-color", settings.LinkLabelHighlightColor); - element.style.setProperty("color", settings.LinkLabelHighlightTextColor); + element.style.setProperty("background-color", settings.LinkLabelHighlightColor, "important"); + element.style.setProperty("color", settings.LinkLabelHighlightTextColor, "important"); } else if (element.classList.contains("horizontal_line") || element.classList.contains("line") || element.classList.contains("circle")) { - element.style.setProperty("background-color", color); + element.style.setProperty("background-color", color, "important"); } } export function highlightElements(objects, settings, yukon_state) { diff --git a/yukon/web/modules/panels/monitor2/monitor2.module.js b/yukon/web/modules/panels/monitor2/monitor2.module.js index a350075..8413f18 100644 --- a/yukon/web/modules/panels/monitor2/monitor2.module.js +++ b/yukon/web/modules/panels/monitor2/monitor2.module.js @@ -1,5 +1,5 @@ import { areThereAnyNewOrMissingHashes, updateLastHashes } from "../../hash_checks.module.js"; -import { getRelatedLinks } from "../../meanings.module.js"; +import { getRelatedLinks, decodeTelegaVSSC } from "../../meanings.module.js"; import { waitForElm, getKnownDatatypes, doCommandFeedbackResult } from "../../utilities.module.js"; import { getHoveredContainerElementAndContainerObject, @@ -455,7 +455,7 @@ async function update_monitor2(containerElement, monitor2Div, yukon_state, force continue; } // Getting info about more links than necessary for later highlighting purposes - const relatedLinks = getRelatedLinks(port.port, yukon_state); + const relatedLinks = getRelatedLinks(port.port, port.type, yukon_state); const currentLinkObjects = relatedLinks.filter(link => link.port === port.port && link.type === matchingPort.type && link.node_id === avatar.node_id); function doStuff(currentLinkObject) { let toggledOn = { value: false }; @@ -463,8 +463,13 @@ async function update_monitor2(containerElement, monitor2Div, yukon_state, force let fixed_datatype_short = null; let fixed_datatype_full = null; if (datatypes_response["fixed_id_messages"] && datatypes_response["fixed_id_messages"][port.port] !== undefined) { - fixed_datatype_short = datatypes_response["fixed_id_messages"][port.port]["short_name"]; - fixed_datatype_full = datatypes_response["fixed_id_messages"][port.port]["name"]; + const type_of_interest = datatypes_response["fixed_id_messages"][port.port]; + const is_a_service_and_for_a_service = type_of_interest.is_service && (port.type === "cln" || port.type === "srv"); + const is_a_message_and_for_a_message = !type_of_interest.is_service && (port.type === "pub" || port.type === "sub"); + if (is_a_service_and_for_a_service || is_a_message_and_for_a_message) { + fixed_datatype_short = datatypes_response["fixed_id_messages"][port.port]["short_name"]; + fixed_datatype_full = datatypes_response["fixed_id_messages"][port.port]["name"]; + } } if (currentLinkObject && !fixed_datatype_full) { currentLinkDsdlDatatype = currentLinkObject.datatype || ""; @@ -652,7 +657,7 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d // node.style.backgroundColor = avatar.color; node.innerText = text; if (avatar.is_being_queried) { - node.innerText += " (querying...)"; + node.innerText += " (looking for registers...)"; } else if (!avatar.has_port_list) { node.innerText += " (no port list)"; } @@ -663,6 +668,9 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d const fieldDiv = document.createElement("div"); containerDiv.appendChild(fieldDiv); fieldDiv.classList.add("d-inline-flex", "field"); + if (field === "VSSC" && fieldsObject["Name"] === "com.zubax.telega") { + fieldsObject[field] = decodeTelegaVSSC(parseInt(fieldsObject[field])) + " (" + fieldsObject[field] + ")"; + } fieldDiv.innerHTML = field; fieldDiv.style.fontWeight = "bold"; const valueDiv = document.createElement("div"); @@ -675,22 +683,36 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d if (field == Object.keys(fieldsObject)[Object.keys(fieldsObject).length - 1]) { containerDiv.style.marginBottom = "6px"; } + valueDiv.style.removeProperty("color"); + valueDiv.style.removeProperty("background-color"); // This is for Health status - if (fieldsObject[field] === "CAUTION") { - valueDiv.style.backgroundColor = "orange"; - } else if (fieldsObject[field] === "WARNING") { - valueDiv.style.backgroundColor = "red"; - } else if (fieldsObject[field] === "ADVISORY") { - valueDiv.style.backgroundColor = "yellow"; + if (field === "Health") { + valueDiv.style.paddingLeft = "3px"; + valueDiv.style.paddingRight = "3px"; + if (fieldsObject[field] === "Nominal") { + valueDiv.style.backgroundColor = "green"; + } else if (fieldsObject[field] === "CAUTION") { + valueDiv.style.backgroundColor = "orange"; + } else if (fieldsObject[field] === "WARNING") { + valueDiv.style.backgroundColor = "red"; + } else if (fieldsObject[field] === "ADVISORY") { + valueDiv.style.backgroundColor = "yellow"; + valueDiv.style.color = "black"; + } } - if (fieldsObject[field] === "OPERATIONAL") { - valueDiv.style.backgroundColor = "green"; - } else if (fieldsObject[field] === "INITIALIZATION") { - valueDiv.style.backgroundColor = "pink"; - } else if (fieldsObject[field] === "MAINTENANCE") { - valueDiv.style.backgroundColor = "yellow"; - } else if (fieldsObject[field] === "SOFTWARE_UPDATE") { - valueDiv.style.backgroundColor = "blue"; + if (field === "Mode") { + valueDiv.style.paddingLeft = "3px"; + valueDiv.style.paddingRight = "3px"; + if (fieldsObject[field] === "OPERATIONAL") { + valueDiv.style.backgroundColor = "green"; + } else if (fieldsObject[field] === "INITIALIZATION") { + valueDiv.style.backgroundColor = "pink"; + } else if (fieldsObject[field] === "MAINTENANCE") { + valueDiv.style.backgroundColor = "yellow"; + valueDiv.style.color = "black"; + } else if (fieldsObject[field] === "SOFTWARE_UPDATE") { + valueDiv.style.backgroundColor = "blue"; + } } if (field === "Uptime") { let intervalId = null; @@ -720,17 +742,15 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d // Make an input-group for the buttons const inputGroup = document.createElement("div"); inputGroup.classList.add("input-group"); + inputGroup.style.width = "100%"; inputGroup.style.setProperty("backgroundColor", "transparent", "important"); let neededButtons = [{ "name": "Restart", "command": "65535", "title": "Restart device" }, { "name": "Save", "command": "65530", "title": "Save persistent states" }, { "name": "Estop", "command": "65531", "title": "Emergency stop" }]; - const telegaButtons = [{ "name": "Cancel", "command": "0", "title": "Cancel" }, { "name": "SelfTest", "command": "1", "title": "SelfTest" }, { "name": "MotorID", "command": "2", "title": "MotorID" }]; - if (fieldsObject && fieldsObject["Name"] && fieldsObject["Name"].includes("telega")) { - neededButtons.push(...telegaButtons); - } for (const button of neededButtons) { const btnButton = document.createElement("button"); btnButton.style.fontSize = "12px"; btnButton.id = "btn" + avatar.node_id + "_" + button.name; btnButton.classList.add("btn_button"); + btnButton.style.flexGrow = "2"; btnButton.classList.add("btn"); btnButton.classList.add("btn-primary"); btnButton.classList.add("btn-sm"); @@ -743,6 +763,33 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d inputGroup.appendChild(btnButton); } node.appendChild(inputGroup); + const telegaButtons = [{ "name": "Cancel", "command": "0", "title": "Cancel" }, { "name": "SelfTest", "command": "1", "title": "SelfTest" }, { "name": "MotorID", "command": "2", "title": "MotorID" }]; + if (fieldsObject && fieldsObject["Name"] && fieldsObject["Name"].includes("telega")) { + const telegaInputGroup = document.createElement("div"); + telegaInputGroup.classList.add("input-group"); + telegaInputGroup.style.width = "100%"; + telegaInputGroup.style.setProperty("backgroundColor", "transparent", "important"); + for (const button of telegaButtons) { + const btnButton = document.createElement("button"); + btnButton.style.fontSize = "12px"; + btnButton.id = "btn" + avatar.node_id + "_" + button.name; + btnButton.classList.add("btn_button"); + btnButton.style.flexGrow = "2"; + btnButton.classList.add("btn"); + btnButton.classList.add("btn-primary"); + btnButton.classList.add("btn-sm"); + btnButton.innerHTML = button.name; + btnButton.title = button.title; + btnButton.onclick = async () => { + const result = await yukon_state.zubax_apij.send_command(avatar.node_id, button.command, ""); + doCommandFeedbackResult(result, feedbackMessage); + }; + telegaInputGroup.appendChild(btnButton); + } + node.appendChild(telegaInputGroup); + } + + // Add an input-group input-group-text for command id and command text argument, both should have inputs. Then add a send command button const customCommandInputGroup = document.createElement("div"); @@ -783,6 +830,8 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d inputGroup2.style.setProperty("backgroundColor", "transparent", "important"); // Add a button for firmware update const btnFirmwareUpdate = document.createElement("button"); + btnFirmwareUpdate.style.width = "100%"; + btnFirmwareUpdate.title = "Please also enable firmware update in settings and choose the correct folder there." btnFirmwareUpdate.style.fontSize = "12px"; btnFirmwareUpdate.classList.add("btn_button", "btn", "btn-secondary", "btn-sm"); btnFirmwareUpdate.innerHTML = "Choose firmware"; @@ -802,6 +851,7 @@ function createElementForNode(avatar, text, container, fieldsObject, get_up_to_d btnMore.classList.add("btn_button", "btn", "btn-secondary", "btn-sm"); btnMore.innerHTML = "..."; btnMore.title = "More commands" + btnMore.style.display = "none"; btnMore.addEventListener("click", async function () { yukon_state.commandsComponent.parent.parent.setActiveContentItem(yukon_state.commandsComponent.parent); @@ -931,21 +981,21 @@ function addHorizontalElements(monitor2Div, matchingPort, currentLinkDsdlDatatyp horizontal_line_label.style.width = "fit-content"; // settings.LinkInfoWidth - settings.LabelLeftMargin + "px"; horizontal_line_label.style.height = "fit-content"; horizontal_line_label.style.position = "absolute"; - if (currentLinkDsdlDatatype.endsWith(".Response")) { - currentLinkDsdlDatatype = currentLinkDsdlDatatype.replace(".Response", ""); + if (currentLinkDsdlDatatype.endsWith(".Response") || currentLinkDsdlDatatype.endsWith(".Request")) { + currentLinkDsdlDatatype = currentLinkDsdlDatatype.replace(".Response", "").replace(".Request", ""); } horizontal_line_label.innerHTML = currentLinkDsdlDatatype; horizontal_line_label.style.zIndex = "3"; - horizontal_line_label.style.backgroundColor = settings["LinkLabelColor"]; - horizontal_line_label.style.color = settings["LinkLabelTextColor"]; + // horizontal_line_label.style.backgroundColor = settings["LinkLabelColor"]; + // horizontal_line_label.style.color = settings["LinkLabelTextColor"]; horizontal_line_label.addEventListener("mouseover", () => { - horizontal_line_label.style.backgroundColor = settings["LinkLabelHighlightColor"]; - horizontal_line_label.style.color = settings["LinkLabelHighlightTextColor"]; + horizontal_line_label.style.setProperty("background-color", settings["LinkLabelHighlightColor"], "important"); + horizontal_line_label.style.setProperty("color", settings["LinkLabelHighlightTextColor"], "important"); }); horizontal_line_label.addEventListener("mouseout", () => { if (!toggledOn.value) { - horizontal_line_label.style.backgroundColor = settings["LinkLabelColor"]; - horizontal_line_label.style.color = settings["LinkLabelTextColor"]; + horizontal_line_label.style.removeProperty("background-color"); + horizontal_line_label.style.removeProperty("color"); } }); if (settings.ShowLinkNameOnSeparateLine && settings.ShowNameAboveDatatype && link_name_label) { @@ -1126,14 +1176,14 @@ function addVerticalLines(monitor2Div, ports, y_counter, containerElement, setti potentialPopup.remove(); potentialPopup = null; } else { - const datatypes = await getDatatypesForPort(port.port, yukon_state); + const datatypes = await getDatatypesForPort(port.port, port.type, yukon_state); potentialPopup = document.createElement("div"); potentialPopup.classList.add("popup"); potentialPopup.style.position = "absolute"; potentialPopup.style.top = port_label.getBoundingClientRect().height + "px"; potentialPopup.style.left = "0px"; potentialPopup.style.border = "1px solid black"; - potentialPopup.style.borderRadius = "5px"; + potentialPopup.style.borderRadius = "0px"; potentialPopup.style.padding = "5px"; potentialPopup.style.zIndex = "5"; potentialPopup.style.width = "fit-content(400px)"; diff --git a/yukon/web/modules/panels/monitor2/publishers.module.js b/yukon/web/modules/panels/monitor2/publishers.module.js index a79f282..1ac0e7f 100644 --- a/yukon/web/modules/panels/monitor2/publishers.module.js +++ b/yukon/web/modules/panels/monitor2/publishers.module.js @@ -108,6 +108,7 @@ async function createPublisherFrame(publisher, yukon_state) { async function typeWasChosen() { // Create a vertical flexbox for holding rows of content chooseTypeField.disabled = true; + const content = document.createElement('div'); content.classList.add("publisher-content"); frame.appendChild(content); @@ -130,6 +131,7 @@ async function createPublisherFrame(publisher, yukon_state) { portIdInput.classList.add("port-id-input"); portIdInput.placeholder = "Port ID"; portIdInput.title = "Port ID" + portIdInput.disabled = true; // TODO: Get the port id value in case the datatype of the publisher // uses a fixed port id portIdInput.addEventListener('input', async () => { diff --git a/yukon/web/modules/panels/monitor2/subscriptions.module.js b/yukon/web/modules/panels/monitor2/subscriptions.module.js index 7d13649..12048d0 100644 --- a/yukon/web/modules/panels/monitor2/subscriptions.module.js +++ b/yukon/web/modules/panels/monitor2/subscriptions.module.js @@ -579,7 +579,7 @@ export async function drawSubscriptions(subscriptionsDiv, settings, yukon_state) const select = document.createElement("select"); async function updateSelectElements() { select.innerHTML = ""; - const datatypesOfPort = await getDatatypesForPort(subject_id_display.value, yukon_state); + const datatypesOfPort = await getDatatypesForPort(subject_id_display.value, "sub", yukon_state); for (const datatype of datatypesOfPort) { const option = document.createElement("option"); option.value = datatype; diff --git a/yukon/web/modules/utilities.module.js b/yukon/web/modules/utilities.module.js index 2b9c9ab..c437248 100644 --- a/yukon/web/modules/utilities.module.js +++ b/yukon/web/modules/utilities.module.js @@ -109,18 +109,23 @@ function createPortStructure(yukon_state) { } return ports; } -export async function getDatatypesForPort(portNr, yukon_state) { +export async function getDatatypesForPort(portNr, port_type, yukon_state) { const chosenDatatypes = {}; - const relatedLinks = getRelatedLinks(portNr, yukon_state); + const relatedLinks = getRelatedLinks(portNr, port_type, yukon_state); //const ports = createPortStructure(yukon_state); const currentLinkObjects = relatedLinks.filter(link => link.port === portNr && (link.type === "sub" || link.type === "pub")); let fixed_datatype_short = null; let fixed_datatype_full = null; const datatypes_response = await yukon_state.zubax_apij.get_known_datatypes_from_dsdl(); if (datatypes_response && datatypes_response["fixed_id_messages"] && datatypes_response["fixed_id_messages"][portNr] !== undefined) { - fixed_datatype_short = datatypes_response["fixed_id_messages"][portNr]["short_name"]; - fixed_datatype_full = datatypes_response["fixed_id_messages"][portNr]["name"]; - chosenDatatypes[fixed_datatype_full] = 1; + const fixed_datatype = datatypes_response["fixed_id_messages"][portNr]; + const is_a_service_and_for_a_service = fixed_datatype.is_service && (port_type === "cln" || port_type === "srv"); + const is_a_message_and_for_a_message = !fixed_datatype.is_service && (port_type === "pub" || port_type === "sub"); + if(is_a_service_and_for_a_service || is_a_message_and_for_a_message) { + fixed_datatype_short = datatypes_response["fixed_id_messages"][portNr]["short_name"]; + fixed_datatype_full = datatypes_response["fixed_id_messages"][portNr]["name"]; + chosenDatatypes[fixed_datatype_full] = 1; + } } if (currentLinkObjects.length > 0) { for (const link of currentLinkObjects) { diff --git a/yukon/web/style/darkmode.css b/yukon/web/style/darkmode.css index 35d4d27..b4e2e29 100644 --- a/yukon/web/style/darkmode.css +++ b/yukon/web/style/darkmode.css @@ -19,6 +19,10 @@ background-size: 80% !important; } + .horizontal_line_label { + color: lightblue !important; + } + .lm_content { color: #ffffff } diff --git a/yukon/web/style/monitor2.css b/yukon/web/style/monitor2.css index 3958f55..87dabaa 100644 --- a/yukon/web/style/monitor2.css +++ b/yukon/web/style/monitor2.css @@ -112,7 +112,7 @@ max-width: 700px; background-color: rgb(165 66 66); border: 1px solid #ccc; - border-radius: 4px; + border-radius: 0px; padding: 0.5em; margin-top: 0.5em; box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .2); @@ -145,6 +145,9 @@ border-right-style: solid; border-top-style: solid; } +:root { + --line-color: silver; +} @media (prefers-color-scheme: dark) { #monitor2 .node { @@ -153,16 +156,16 @@ } #monitor2 .line { - background-color: rgb(69, 43, 9); + background-color: var(--line-color); color: antiquewhite; } #monitor2 .circle { - background-color: rgb(69, 43, 9); + background-color: var(--line-color); } #monitor2 .horizontal_line { - background-color: rgb(69, 43, 9); + background-color: var(--line-color); color: antiquewhite; text-wrap: none; } @@ -172,6 +175,6 @@ } #monitor2>.arrowhead { - border-top-color: rgb(69, 43, 9); + border-top-color: var(--line-color); } } \ No newline at end of file diff --git a/yukon/web/style/style.css b/yukon/web/style/style.css index 23e7fcc..bf9030f 100644 --- a/yukon/web/style/style.css +++ b/yukon/web/style/style.css @@ -24,6 +24,10 @@ margin-left: 0px !important; } +.horizontal_line_label { + color: darkblue !important; +} + .lm_header .lm_controls { display: flex; flex-direction: row; @@ -43,7 +47,7 @@ } label.port_number_label { - font-weight: 500; + font-weight: 400; display: flex; justify-content: flex-end; align-items: center; @@ -51,7 +55,7 @@ label.port_number_label { textarea.port_number_label, input.port_number_label { - font-weight: 500; + font-weight: 400; border: none; border-left: 6px solid SlateBlue; } @@ -260,7 +264,7 @@ body { #toolbar button { border: 1px solid #000; height: 1.7em; - border-radius: 0.25em; + border-radius: 0; background-color: rgb(135, 135, 135); color: #fff; font-size: 1.5em; @@ -312,7 +316,7 @@ button#btnShowHideToolbar { width: 1em; height: 1em; border: 1px solid #000; - border-radius: 0.25em; + border-radius: 0em; font-size: 1.5em; padding: 0.25em 0.5em; z-index: 3; @@ -462,7 +466,7 @@ button#btnShowHideToolbar:active { .my-modal-content { margin-top: 10vh; padding: 20px 10px; - border-radius: 10px; + border-radius: 0px; width: 80%; background-color: white; }