Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
162 lines
7.1 KiB
JavaScript
162 lines
7.1 KiB
JavaScript
var buttonsAdded = false;
|
|
|
|
export function getLongName () {
|
|
return "Asset Management";
|
|
}
|
|
|
|
export function createButtons (webSocket) {
|
|
//Container
|
|
if (!buttonsAdded){
|
|
//Base Dl Request
|
|
var baseDlRequestContainer = document.createElement("div");
|
|
baseDlRequestContainer.id = "BaseDlRequestContainer";
|
|
baseDlRequestContainer.className = "py-1";
|
|
//Button
|
|
var baseDlRequestBtn = document.createElement("button");
|
|
baseDlRequestBtn.id = "BaseDlRequestBtn";
|
|
baseDlRequestBtn.classList.add ("btn", "btn-primary");
|
|
baseDlRequestBtn.innerHTML = "Send <i>BaseDlRequest</i>";
|
|
//Append
|
|
(document.getElementById ("RequestButtonContainer")).appendChild (baseDlRequestContainer);
|
|
(document.getElementById ("BaseDlRequestContainer")).appendChild (baseDlRequestBtn);
|
|
//Funktion
|
|
document.getElementById("BaseDlRequestBtn").addEventListener('click', function() {
|
|
baseDlRequest(webSocket);
|
|
});
|
|
|
|
/*
|
|
//get Asset State
|
|
var getAssetStateContainer = document.createElement("div");
|
|
getAssetStateContainer.id = "GetAssetStateContainer";
|
|
getAssetStateContainer.className = "py-1";
|
|
//Form
|
|
var string = '<div class="input-group"><input id="GetAssetState1" type="text" class="form-control border-primary" placeholder="Asset ID"><input id="GetAssetState2" type="text" class="form-control border-primary" placeholder="Asset Tag"><input id="GetAssetState3" type="text" class="form-control border-primary" placeholder="UUID"><button id= "GetAssetStateBtn" class="btn btn-primary" type="button" id="button-addon2">get Asset State</button></div>'
|
|
getAssetStateContainer.innerHTML = string;
|
|
//Append
|
|
(document.getElementById ("RequestButtonContainer")).appendChild (getAssetStateContainer);
|
|
//Funktion
|
|
document.getElementById("GetAssetStateBtn").addEventListener('click', function() {
|
|
getAssetState(webSocket);
|
|
});
|
|
|
|
//get Building State
|
|
var getBuildingStateContainer = document.createElement("div");
|
|
getBuildingStateContainer.id = "GetBuildingStateContainer";
|
|
getBuildingStateContainer.className = "py-1";
|
|
//Form
|
|
var string = '<div class="input-group"><input id="GetBuildingState1" type="text" class="form-control border-primary" placeholder="Building ID"><input id="GetBuildingState2" type="text" class="form-control border-primary" placeholder="UUID"><button id= "GetBuildingStateBtn" class="btn btn-primary" type="button" id="button-addon2">get Building State</button></div>'
|
|
getBuildingStateContainer.innerHTML = string;
|
|
//Append
|
|
(document.getElementById ("RequestButtonContainer")).appendChild (getBuildingStateContainer);
|
|
//Funktion
|
|
document.getElementById("GetBuildingStateBtn").addEventListener('click', function() {
|
|
getBuildingState(webSocket);
|
|
});
|
|
|
|
//get Building State
|
|
var getAssetsContainer = document.createElement("div");
|
|
getAssetsContainer.id = "GetAssetsContainer";
|
|
getAssetsContainer.className = "py-1";
|
|
//Form
|
|
var string = '<div class="input-group"><input id="GetAssets1" type="text" class="form-control border-primary" placeholder="Asset Type ID"><input id="GetAssets2" type="text" class="form-control border-primary" placeholder="UUID"><button id= "GetAssetsBtn" class="btn btn-primary" type="button" id="button-addon2">get Assets</button></div>'
|
|
getAssetsContainer.innerHTML = string;
|
|
//Append
|
|
(document.getElementById ("RequestButtonContainer")).appendChild (getAssetsContainer);
|
|
//Funktion
|
|
document.getElementById("GetAssetsBtn").addEventListener('click', function() {
|
|
sendGetAssets(webSocket);
|
|
});
|
|
*/
|
|
|
|
buttonsAdded = true;
|
|
}
|
|
}
|
|
|
|
export function decryptMessage (message) {
|
|
document.getElementById("OutputContainer").hidden = false
|
|
|
|
var table = document.createElement ("table");
|
|
table.classList.add("table","table-hover", "table-condensed");
|
|
var tHead = document.createElement ("thead");
|
|
var tBody = document.createElement ("tbody");
|
|
var headRow = document.createElement ("tr");
|
|
var accordionItem = document.createElement ("div")
|
|
accordionItem.className = "accordion-item";
|
|
accordionItem.innerHTML = `<h2 class="accordion-header" id="heading-${JSON.parse(message.data).type}">
|
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-${JSON.parse(message.data).type}">
|
|
${JSON.parse(message.data).type}
|
|
</button>
|
|
</h2>
|
|
<div id="collapse-${JSON.parse(message.data).type}" class="accordion-collapse collapse show" data-bs-parent="#Output">
|
|
<div id="body-${JSON.parse(message.data).type}" class="accordion-body"></div>
|
|
</div>
|
|
</div>`
|
|
|
|
var keys = new Map;
|
|
JSON.parse(message.data).data.forEach ((item, index, array) => {
|
|
var keyIndexCounter = keys.size;
|
|
for (var key in item){
|
|
if (!keys.has(key)){
|
|
var headCell = headRow.insertCell(keys.size);
|
|
headCell.innerHTML = key;
|
|
keys.set(key, keyIndexCounter);
|
|
keyIndexCounter++;
|
|
}
|
|
}
|
|
var row = tBody.insertRow();
|
|
for (var key of keys) {
|
|
var cell = row.insertCell (keys.get(key));
|
|
if (typeof item[key[0]] === 'object') { //Objekt formatieren, falls erforderlich - Funktion rekursiv aufrufen?
|
|
cell.innerHTML = JSON.stringify(item[key[0]])
|
|
}
|
|
else cell.innerHTML = item[key[0]];
|
|
}
|
|
});
|
|
tHead.appendChild (headRow);
|
|
table.appendChild (tHead);
|
|
table.appendChild (tBody);
|
|
document.getElementById("Output").appendChild (accordionItem);
|
|
document.getElementById("body-" + JSON.parse(message.data).type).appendChild(table);
|
|
}
|
|
|
|
//Requests
|
|
function baseDlRequest(webSocket) {
|
|
webSocket.send(JSON.stringify({
|
|
type: "baseDlRequest",
|
|
uuid: "UUID"
|
|
}));
|
|
}
|
|
|
|
function sendGetAssets(webSocket) {
|
|
webSocket.send(JSON.stringify({
|
|
type: "getAssets",
|
|
uuid: document.getElementById("GetAssets2").value,
|
|
data: {
|
|
assetTypeId: document.getElementById("GetAssets1").value
|
|
}
|
|
}));
|
|
|
|
}
|
|
|
|
function getAssetState(webSocket) {
|
|
webSocket.send(JSON.stringify({
|
|
type: "getAssetState",
|
|
assetId: document.getElementById("GetAssetState1").value,
|
|
assetTag: document.getElementById("GetAssetState2").value,
|
|
uuid: document.getElementById("GetAssetState3").value
|
|
}));
|
|
}
|
|
|
|
function getBuildingState(webSocket) {
|
|
webSocket.send(JSON.stringify({
|
|
type: "getBuildingState",
|
|
uuid: document.getElementById("GetBuildingState2").value,
|
|
data: {
|
|
buildingId: document.getElementById("GetBuildingState1").value
|
|
}
|
|
|
|
}));
|
|
}
|
|
|
|
|