Skip to content

Commit f7c67de

Browse files
committed
Changes to UI -> AID
1 parent ccd1d27 commit f7c67de

File tree

61 files changed

+14910
-4595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+14910
-4595
lines changed

config/VOR_V3.json

+189-4,486
Large diffs are not rendered by default.

config/aasx/files/ArcaAntrieb.png

59.7 KB
Loading

config/aasx/files/ArcaValve.png

19.5 KB
Loading
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
property_name,type,readOnly,observable,updateFrequency,unit,submodelId,idShortPath,href,requestType
2+
Temperature_PADIM,Float,yes,True,subscribe,Celsius,ww.ovgu.de/submodel/test123,ser_1,opc.tcp://localhost:4851/ns=1;i=1023,
3+
Temperature,Float,yes,True,subscribe,Celsius,ww.ovgu.de/submodel/test123,ser_1,opc.tcp://localhost:4851/ns=1;i=1020,

config/templates/asset_interface_description.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
},
279279
"type": "href",
280280
"valueType": "",
281-
"value": "opc.tcp://admin:[email protected]:4840/ns=4;s=|var|WAGO 750-8202 PFC200 CS 2ETH RS.Application.PLC_PRG.sPermission"
281+
"value": ""
282282
}
283283
]
284284
}

data/web/images/update.svg

+114
Loading

data/web/images/update1.svg

+114
Loading

data/web/js/aaselements.js

+25-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function addSubmodeltoForm(exdomain){
77
function addAASElementtoForm(event,exdomain,formId,aasIdentifier,submodelId,IdShortPath){
88
event.stopPropagation();
99
event.preventDefault();
10-
console.log(formId);
1110
aas_element_form = document.getElementById(formId);
1211
aas_element_form.innerHTML = '';
1312
aas_element_form.innerHTML = `<form onsubmit="createNewAASElement(event,'aas_element_form','`+aasIdentifier+`','`+submodelId+`','`+IdShortPath+`');return false;">
@@ -39,7 +38,10 @@ function addAASElementtoForm(event,exdomain,formId,aasIdentifier,submodelId,IdSh
3938
_aas_elem = new Range();
4039
_aas_elem.createDom(formId,exdomain);
4140
}
42-
41+
else if (aas_elem_type === "MultiLanguageProperty"){
42+
_aas_elem = new MultiLanguageProperty();
43+
_aas_elem.createDom(formId,exdomain);
44+
}
4345
}
4446
function createNewSubmodel1(event,element_form_id,aasIdentifier){
4547
event.stopPropagation();
@@ -125,3 +127,24 @@ function saveSubmodel(event,submodelIdentifier,aasIdentifier){
125127
httpGetRequest.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
126128
httpGetRequest.send(JSON.stringify(_submodel_New));
127129
}
130+
function delete_element(event,submodelIdentifier,aasIdentifier){
131+
if (submodelIdentifier === event.target.alt){
132+
var httpGetRequest = new XMLHttpRequest();
133+
httpGetRequest.open('DELETE',"/submodels/"+btoa(submodelIdentifier));
134+
httpGetRequest.onload = () => {
135+
window.location.replace("/shells/"+aasIdentifier+"/webui");
136+
137+
}
138+
httpGetRequest.send();
139+
}
140+
else{
141+
var httpGetRequest = new XMLHttpRequest();
142+
143+
httpGetRequest.open('DELETE',"/shells/"+aasIdentifier+"/aas/submodels/"+btoa(submodelIdentifier)+"/submodel/submodel-elements/"+ event.target.alt);
144+
httpGetRequest.onload = () => {
145+
window.location.replace("/shells/"+aasIdentifier+"/aas/submodels/"+btoa(submodelIdentifier)+"/submodel/webui");
146+
147+
}
148+
httpGetRequest.send();
149+
}
150+
}

data/web/js/script.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1111,4 +1111,6 @@ function getCFP(conversationId){
11111111
}
11121112
}
11131113
httpGetRequest.send();
1114-
}
1114+
}
1115+
1116+

data/web/js/typedefinitions.js

+15-6
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ class ListCollection{
307307
deserialize(data,parentId,exdomain){
308308
this.exdomain = exdomain;
309309
for (var i = 0; i < data.length; i++ ) {
310-
console.log(data[i]);
310+
311311
let _iuuid = crypto.randomUUID();
312312
let _classObject = this.getclassObject(_iuuid);
313313
let _objectDIv = this.getObjectDom(_iuuid);
@@ -987,7 +987,6 @@ class SubmodelElement extends Referable {
987987
}
988988
deserialize(data,parentId,exdomain){
989989
if (data.hasOwnProperty('qualifiers')){
990-
console.log(data["qualifiers"]);
991990
this._Qualifiable.deserialize(data['qualifiers'],parentId,exdomain);
992991
}
993992
this._HasSemantics.deserialize(data,parentId,exdomain);
@@ -1069,7 +1068,7 @@ class MultiLanguageProperty extends DataElement{
10691068
checksum,kind,semanticId,supplementalSemanticIds,
10701069
qualifiers,embeddedDataSpecifications);
10711070
this.value = new ListCollection("value","LangString");
1072-
this.valueId =valueId;
1071+
this.valueId =new ComplexObject("valueId","Reference");
10731072
this.modelType = "MultiLanguageProperty";
10741073
}
10751074
serialize(){
@@ -1088,15 +1087,22 @@ class MultiLanguageProperty extends DataElement{
10881087
}
10891088
}
10901089
createDom(parentId,exdomain){
1090+
this.uuid = crypto.randomUUID();
1091+
this.exdomain = exdomain;
1092+
document.getElementById(parentId).insertAdjacentHTML(
1093+
'afterbegin',
1094+
`<div class="temp" id = "`+this.uuid+`">
1095+
</div>`);
10911096
this.value.createDom(parentId,exdomain);
1097+
this.valueId.createDom(this.uuid,exdomain);
10921098
super.createDom(parentId,exdomain);
10931099
}
10941100
}
10951101
class Range extends DataElement{
10961102
constructor(extensions,category,idShort,displayName,description,
10971103
checksum,kind,semanticId,supplementalSemanticIds,
10981104
qualifiers,embeddedDataSpecifications,
1099-
valueType,
1105+
valueType="xs:string",
11001106
min,
11011107
max){
11021108
super(extensions,category,idShort,displayName,description,
@@ -1105,13 +1111,15 @@ class Range extends DataElement{
11051111
this.valueType = new SelectObject("valueType",DataTypeXSD,valueType);
11061112
this.min = new StringObject("min");
11071113
this.max = new StringObject("max");
1114+
this.valueId = new ComplexObject("valueId","Reference");
11081115
this.modelType = "Range";
11091116
}
11101117
serialize(){
11111118
let jsonData = super.serialize();
11121119
if (this.valueId._object != null){
11131120
jsonData["valueId"] = this.valueId.serialize();
11141121
}
1122+
jsonData["valueType"] = this.valueType.getSelectedItem();
11151123
jsonData["min"] = this.min.getString();
11161124
jsonData["max"] = this.max.getString();
11171125
jsonData["modelType"] = "Range";
@@ -1127,7 +1135,6 @@ class Range extends DataElement{
11271135
}
11281136
}
11291137
createDom(parentId,exdomain){
1130-
11311138
this.uuid = crypto.randomUUID();
11321139
this.exdomain = exdomain;
11331140
document.getElementById(parentId).insertAdjacentHTML(
@@ -1136,6 +1143,8 @@ class Range extends DataElement{
11361143
</div>`);
11371144
this.max.createDom(this.uuid,exdomain);
11381145
this.min.createDom(this.uuid,exdomain);
1146+
this.valueType.createDom(this.uuid,exdomain);
1147+
this.valueId.createDom(this.uuid,exdomain);
11391148
super.createDom(this.uuid,exdomain);
11401149

11411150
}
@@ -1469,7 +1478,7 @@ class Submodel extends Identifiable{
14691478
deserialize(data,parentId,exdomain){
14701479
super.deserialize(data,parentId,exdomain);
14711480
if (data.hasOwnProperty('qualifiers')){
1472-
console.log(data["qualifiers"]);
1481+
14731482
this._Qualifiable.deserialize(data['qualifiers'],parentId,exdomain);
14741483
}
14751484
if (data.hasOwnProperty('submodelElements')){
Binary file not shown.

0 commit comments

Comments
 (0)