Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b8a515f
#2497 Add display format as Hex numbers or binary numbers
Patrykb0802 May 6, 2025
5150b7c
#2497 Add display format as Hex numbers or binary numbers
Patrykb0802 May 7, 2025
128eb4c
#3174 Updated REST API with incoming data for XSS protection:
Limraj Jul 31, 2025
e414ba9
#3174 Updated REST API with incoming data for XSS protection:
Limraj Jul 31, 2025
f263929
#3174 Updated REST API with incoming data for XSS protection:
Limraj Jul 31, 2025
b2a33a9
#3174 Updated REST API with incoming data for XSS protection:
Limraj Aug 8, 2025
ecdb80a
#3174 Updated REST API with incoming data for XSS protection:
Limraj Aug 8, 2025
caa0954
#3178 Hide user information in DWR:
Limraj Aug 9, 2025
644c6e7
Merge remote-tracking branch 'origin/release/2.8.0' into fix/#3178_Hi…
Limraj Aug 9, 2025
a9ec1ba
#3178 Hide user information in DWR:
Limraj Aug 12, 2025
1cfaed4
Merge pull request #3051 from SCADA-LTS/release/2.8.0
Limraj Oct 17, 2025
9ef92fa
Merge remote-tracking branch 'origin/release/2.8.1' into feature/#317…
Limraj Oct 17, 2025
761d4cd
Merge remote-tracking branch 'origin/release/2.8.1' into fix/#3178_Hi…
Limraj Oct 17, 2025
acdad95
Merge pull request #3202 from SCADA-LTS/fix/#3178_Hide_user_informati…
Limraj Oct 24, 2025
0e40e4a
Merge branch 'release/2.8.1' into feature/#3174_Updated_REST_API_with…
Limraj Oct 24, 2025
ee78bfe
Merge pull request #3201 from SCADA-LTS/feature/#3174_Updated_REST_AP…
Limraj Oct 24, 2025
453b567
#3214 Safe mode for scripting:
Limraj Nov 8, 2025
0e0aa7e
#3214 Safe mode for scripting:
Limraj Nov 10, 2025
2341445
#3214 Safe mode for scripting:
Limraj Nov 10, 2025
f84286a
#3214 Safe mode for scripting:
Limraj Nov 10, 2025
39e1e1c
#3218 Synoptic panel file problem:
Limraj Nov 18, 2025
d66bf33
#3220 Fixed time shift between Return to Normal status and Reise even…
Limraj Nov 25, 2025
e3bfded
#3213 How Connect to Kepware OPC Server:
Limraj Nov 26, 2025
42bae16
#3213 How Connect to Kepware OPC Server:
Limraj Nov 26, 2025
d10fdbb
#3214 safe mode for scripting:
Limraj Nov 27, 2025
901ac2e
Merge pull request #3221 from SCADA-LTS/fix/#3220_Fixed_time_shift_be…
Limraj Nov 27, 2025
f7e9da6
#3213 How Connect to Kepware OPC Server:
Limraj Nov 28, 2025
5ee1007
#3213 How Connect to Kepware OPC Server:
Limraj Nov 29, 2025
7300b70
#3213 How Connect to Kepware OPC Server:
Limraj Nov 29, 2025
8b6791a
#3213 How Connect to Kepware OPC Server:
Limraj Nov 29, 2025
7ed01bb
#3218 Synoptic panel file problem:
Limraj Dec 1, 2025
ec8e185
Merge pull request #3219 from SCADA-LTS/fix/#3218_Synoptic_panel_file…
Limraj Dec 1, 2025
d8d774f
#3218 Synoptic panel file problem:
Limraj Dec 1, 2025
1c5f9c7
#3218 Synoptic panel file problem:
Limraj Dec 1, 2025
f65ddb7
Revert "#3218 Synoptic panel file problem:"
Limraj Dec 1, 2025
7f16395
Revert "#3218 Synoptic panel file problem:"
Limraj Dec 1, 2025
cca42cb
#3213 How Connect to Kepware OPC Server:
Limraj Dec 1, 2025
4ca7daa
#3225 Wrong endpoint type in AuthenticationAPI
Patrykb0802 Dec 4, 2025
64d08ad
#3225 Wrong endpoint type in AuthenticationAPI
Patrykb0802 Dec 8, 2025
1fa1306
#3228 Configure SameSite attribute for session cookie
Patrykb0802 Dec 12, 2025
157eda1
#3214 safe mode for scripting:
Limraj Dec 15, 2025
c9b49a0
#3228 Configure SameSite attribute for session cookie
Patrykb0802 Dec 16, 2025
ad811c7
#3214 safe mode for scripting:
Limraj Dec 17, 2025
10e987e
#3214 safe mode for scripting:
Limraj Dec 18, 2025
ce070a8
#3214 safe mode for scripting:
Limraj Dec 18, 2025
9068e6f
#3214 safe mode for scripting:
Limraj Dec 18, 2025
f064943
Merge pull request #3222 from SCADA-LTS/fix/#3213_How_Connect_to_Kepw…
Limraj Dec 23, 2025
38cec7c
Merge branch 'release/2.8.1' into fix/#3214_Safe_mode_for_scripting
Limraj Dec 23, 2025
dbc65c4
Merge pull request #3215 from SCADA-LTS/fix/#3214_Safe_mode_for_scrip…
Limraj Dec 23, 2025
6a4d676
#3228 Configure SameSite attribute for session cookie:
Limraj Dec 23, 2025
94af4f8
Revert "#3228 Configure SameSite attribute for session cookie:"
Limraj Dec 23, 2025
32b53e6
Merge pull request #3226 from SCADA-LTS/fix/#3225_Wrong_endpoint_type…
Limraj Dec 23, 2025
b8a4caa
Merge pull request #3229 from SCADA-LTS/feature/#3228_Configure_SameS…
Limraj Dec 23, 2025
4943a13
#3218 Synoptic panel file problem:
Limraj Dec 30, 2025
303e18e
#2497 Add display format as Hex numbers or binary numbers
Patrykb0802 Jan 19, 2026
c995b8e
Merge branch 'release/2.8.1' into feature/#2497_Add_display_format_as…
Patrykb0802 Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions WebContent/META-INF/context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@
connectionProperties="useSSL=false;allowPublicKeyRetrieval=true"
url="jdbc:mysql://localhost:3306/scadalts"
/>
<CookieProcessor
className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
sameSiteCookies="Strict" />
</Context>
4 changes: 4 additions & 0 deletions WebContent/WEB-INF/dwr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
<convert converter="exception" match="java.lang.Exception">
<param name="include" value="message"/>
</convert>

<convert converter="bean" match="org.scada_lts.dao.model.UserIdentifier"/>
<convert converter="bean" match="org.scada_lts.web.mvc.api.dto.MailingListJson"/>
<convert converter="bean" match="org.scada_lts.web.mvc.api.dto.EmailRecipientJson"/>
</allow>
<signatures>
<![CDATA[
Expand Down
16 changes: 13 additions & 3 deletions WebContent/WEB-INF/jsp/mailingLists.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script>
var users = new Array();
var editingMailingList;
var nextAddressEntryId = 1;
var nextAddressEntryId;

function init() {
MailingListsDwr.init(function(response) {
Expand Down Expand Up @@ -60,7 +60,7 @@
if (entry.recipientType == <c:out value="<%= EmailRecipient.TYPE_USER %>"/>)
appendUserEntry(entry);
else if (entry.recipientType == <c:out value="<%= EmailRecipient.TYPE_ADDRESS %>"/>) {
entry.referenceId = nextAddressEntryId++;
entry.referenceId = (nextAddressEntryId = nextInt());
appendAddressEntry(entry);
}
}
Expand Down Expand Up @@ -222,7 +222,7 @@
}
var addressEntry = {
recipientType : <c:out value="<%= EmailRecipient.TYPE_ADDRESS %>"/>,
referenceId : nextAddressEntryId++,
referenceId : (nextAddressEntryId = nextInt()),
referenceAddress : addr
};
editingMailingList.entries[editingMailingList.entries.length] = addressEntry;
Expand Down Expand Up @@ -439,6 +439,16 @@
hide("dailyLimitSentEmailsNumberTr");
}
}

function nextInt() {
return getRandomInt(10000, 10000000);
}

function getRandomInt(min, max) {
let ceil = Math.ceil(min);
let floor = Math.floor(max);
return Math.floor(Math.random() * (floor - ceil) + ceil);
}
</script>

<table class="subPageHeader">
Expand Down
8 changes: 8 additions & 0 deletions WebContent/WEB-INF/jsp/pointEdit/textRenderer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@
<td class="formField"><input id="textRendererTimeConversionExponent" type="text" value="<c:catch var="exception"><c:out value="${form.textRenderer.conversionExponent}" /></c:catch>"/></td>
</tr>
</tbody>
<tbody id="textRendererBinaryNumber" style="display:none;">
</tbody>
<tbody id="textRendererHexadecimal" style="display:none;">
</tbody>
</table>
</div>

Expand Down Expand Up @@ -248,6 +252,10 @@
} else if (typeName == "textRendererTime")
DataPointEditDwr.setTimeTextRenderer($get("textRendererTimeFormat"),
$get("textRendererTimeConversionExponent"), callback);
else if (typeName == "textRendererHexadecimal")
DataPointEditDwr.setHexadecimalRenderer(callback);
else if (typeName == "textRendererBinaryNumber")
DataPointEditDwr.setBinaryRenderer(callback);
else
callback();
};
Expand Down
69 changes: 55 additions & 14 deletions WebContent/WEB-INF/jsp/scripting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,33 @@

var myLocation = getAppLocation();
var urlGetDataPoints = "api/datapoint/getAll";
function executeScript(){
var xid = jQuery("#xid");
// saveScript() nie zdarzy zapisac !!!
jQuery.ajax({
url: myLocation+"script/execute/"+xid[0].value,
type:"POST",
success: function(){
function executeScript() {

let payload = {}
payload.id = -1;
payload.script = $get("script");

let toSave = this.scriptPointsContext.convertToSave();
payload.pointsOnContext = convertPointsOnContext(toSave);
payload.datapointContext = objectsContextArray[0] ? objectsContextArray[0].value : "";
payload.datasourceContext = objectsContextArray[1] ? objectsContextArray[1].value : "";

jQuery.ajax({
url: myLocation+"api/scripts/execute-test",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify(payload),
success: function() {
setUserMessage("<spring:message code="script.execute.success"/> ")
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
console.log(XMLHttpRequest);
setUserMessage("<spring:message code="script.execute.error"/> "+XMLHttpRequest.responseText);
}
});
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(textStatus);
console.log(XMLHttpRequest);
console.log(errorThrown);
setUserMessage("<spring:message code="script.execute.error"/> "+XMLHttpRequest.responseText);
}
});
};

var pointsArray = new Array();
Expand All @@ -65,6 +77,35 @@
});
}

function getDataPointById(id) {
for(let i = 0; i < pointsArray.length; i++) {
if(pointsArray[i].id === id) {
return pointsArray[i];
}
}
return null;
}

function convertPointsOnContext(toSave) {
let pointsOnContext = [];
for(let i = 0; i < toSave.length; i++) {
let entry = toSave[i];
let dataPoint = getDataPointById(entry.key);
if(dataPoint) {
let dataPointXid = dataPoint.xid;
let varName = entry.value;
let object = {
dataPointXid: dataPointXid,
varName: varName
};
pointsOnContext[pointsOnContext.length] = object;
} else {
throw new Error();
}
}
return pointsOnContext;
}

function getPointsCB()
{
jQuery.ajax({
Expand Down
Loading
Loading