Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.7.5.3 #2535

Merged
merged 54 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
181c4a3
#2499 Fixed loaded Data Source list - corrected mehtod getConnectionD…
Limraj Apr 4, 2023
1ed5fe9
#2499 Fixed loaded Data Source list - corrected
Limraj Apr 4, 2023
ad9452d
Merge pull request #2500 from SCADA-LTS/fix/#2499_Fixed_loaded_Data_S…
Limraj Apr 5, 2023
f73f6a6
#2498 OPC DA Data Source - disable validation for username and passwo…
Limraj Apr 5, 2023
ec728f9
#2484 Inconsistency between hierarchy added by UI and by json - fixed…
Limraj Apr 6, 2023
0b8aee7
#2507 Fixed language selection - permanent remembering of the languag…
Limraj Apr 16, 2023
8b8a144
#2508 Fixed year on login page
Limraj Apr 16, 2023
e252021
Merge pull request #2510 from SCADA-LTS/fix/#2508_Fixed_year_on_login…
Limraj Apr 16, 2023
6bfcca4
Merge remote-tracking branch 'origin/release/2.7.5.3' into fix/#2507_…
Limraj Apr 16, 2023
c2d7493
#2507 Fixed language selection - translation of the login page into t…
Limraj Apr 16, 2023
2fe9784
#2507 Fixed language selection - corrected localization in jsp; reduc…
Limraj Apr 16, 2023
35ea3a9
#2511 Fixed system events handler
Limraj Apr 17, 2023
17d1078
Merge pull request #2512 from SCADA-LTS/fix/#2511_Fixed_system_events…
Limraj Apr 17, 2023
8efe38f
Merge pull request #2509 from SCADA-LTS/fix/#2507_Fixed_language_sele…
Limraj Apr 17, 2023
f841dab
#2506 Absence of scroll bar - added scroll bar for views and scripts
Limraj Apr 17, 2023
5dd2527
#2478 The fatest way to disable fullscreen warning text
Limraj Apr 17, 2023
8a154a2
#2498 OPC DA Data Source - revert validation
Limraj Apr 17, 2023
cc6f400
#2478 The fatest way to disable fullscreen warning text - added param…
Limraj Apr 20, 2023
5a3f549
#2515 Corrected Slave ID limit 240 - extension of the limit for the S…
Limraj Apr 21, 2023
3e6d11b
#2515 Corrected Slave ID limit 240 - revert package-lock.json
Limraj Apr 21, 2023
80b5861
#2507 Fixed language selection - corrected update user
Limraj Apr 21, 2023
8d08c37
#2525 Fixed update logged user
Limraj Apr 24, 2023
9d12009
#2456 Error message on WatchList Get Chart
Limraj Apr 24, 2023
00846cd
#2456 Error message on WatchList Get Chart - using ceil() and abs() f…
Limraj Apr 24, 2023
cd323a4
Merge pull request #2504 from SCADA-LTS/fix/#2484_Inconsistency_betwe…
Limraj Apr 24, 2023
4a5317f
Merge pull request #2523 from SCADA-LTS/fix/#2507_Fixed_language_sele…
Limraj Apr 24, 2023
e9783fb
Merge pull request #2526 from SCADA-LTS/fix/#2525_Fixed_update_logged…
Limraj Apr 24, 2023
852d436
Merge branch 'release/2.7.5.3' into feature/#2478_The_fatest_way_to_d…
Limraj Apr 24, 2023
ec2aea4
Merge remote-tracking branch 'origin/release/2.7.5.3' into fix/#2506_…
Limraj Apr 24, 2023
72370ef
#2478 The fatest way to disable fullscreen warning text - revert layo…
Limraj Apr 24, 2023
dd2a3a0
#2506 Absence of scroll bar #2506 - center/middle text in button
Limraj Apr 24, 2023
08ff445
#2515 corrected slave id limit 240 - Scan to address 255 extension in…
Limraj Apr 25, 2023
a98366a
#2478 The fatest way to disable fullscreen warning text - update new …
Limraj Apr 28, 2023
e3298a9
#2529 Fixed visible event list in new ui
Limraj May 2, 2023
6829881
#2529 Fixed visible event list in new ui - revert common_DEFAULT.css
Limraj May 2, 2023
ad7251d
#2531 Centering the text in the buttons in the view
Limraj May 2, 2023
45d9d6e
#2515 corrected slave id limit 240 - refactor - added: SlaveIdLimit25…
Limraj May 2, 2023
f1186c2
#2515 corrected slave id limit 240 - added @Override annotation to Pr…
Limraj May 2, 2023
1658da5
#2533 Basic auth by HTTPS for API httpds - update spring-security.xml…
Limraj May 8, 2023
43ccef2
Merge pull request #2522 from SCADA-LTS/feature/#2515_Corrected_Slave…
Limraj May 8, 2023
20f0513
Merge branch 'release/2.7.5.3' into feature/#2478_The_fatest_way_to_d…
Limraj May 8, 2023
6e9d2e9
Merge pull request #2530 from SCADA-LTS/fix/#2529_Fixed_visible_event…
Limraj May 8, 2023
fe08a79
Merge pull request #2527 from SCADA-LTS/xt_man/#2456_Error_message_on…
Limraj May 8, 2023
84574bf
Merge pull request #2532 from SCADA-LTS/feature/#2531_Centering_the_t…
Limraj May 8, 2023
f8a9176
Merge pull request #2501 from SCADA-LTS/feature/#2498_OPC_DA_Data_Source
Limraj May 8, 2023
90088c9
Merge pull request #2513 from SCADA-LTS/fix/#2506_Absence_of_scroll_bar
Limraj May 8, 2023
5fe07da
Merge pull request #2514 from SCADA-LTS/feature/#2478_The_fatest_way_…
Limraj May 8, 2023
9ab97a2
Merge pull request #2534 from SCADA-LTS/feature/#2533_Basic_auth_by_H…
Limraj May 8, 2023
7178d51
#2533 Basic auth by HTTPS for API httpds - added httpds-basic user
Limraj May 15, 2023
24a865a
#2538 Added permissions for report preventPurge function
Limraj May 15, 2023
00749d8
#2537 Allow if object with identifier does not exist
Limraj May 15, 2023
fc5654e
Merge pull request #2539 from SCADA-LTS/feature/#2538_Added_permissio…
Limraj May 15, 2023
a1f541f
Merge pull request #2540 from SCADA-LTS/feature/#2537_Allow_if_object…
Limraj May 15, 2023
6eafe85
#2507 Fixed language selection - removed temp field in User class
Limraj May 15, 2023
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
2 changes: 1 addition & 1 deletion WebContent/WEB-INF/dwr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<param name="include" value="id,xid,name,extendedName,dataSourceId,enabled,dataTypeMessage,pointLocator"/>
</convert>
<convert converter="bean" match="com.serotonin.mango.vo.User">
<param name="include" value="id,username,email,phone,admin,disabled,receiveAlarmEmails,receiveOwnAuditEvents,dataSourcePermissions,dataPointPermissions,userProfile,homeUrl,hideMenu,theme,firstName,lastName"/>
<param name="include" value="id,username,email,phone,admin,disabled,receiveAlarmEmails,receiveOwnAuditEvents,dataSourcePermissions,dataPointPermissions,userProfile,homeUrl,hideMenu,theme,firstName,lastName,enableFullScreen,hideShortcutDisableFullScreen"/>
</convert>
<convert converter="bean" match="br.org.scadabr.vo.permission.WatchListAccess">
<param name="include" value="id,permission"/>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/WEB-INF/jsp/scripting.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
</div>
</td>

<td valign="top" style="display:none; position: fixed;" id="scriptDetails">
<td valign="top" style="display:none; position: auto;" id="scriptDetails">
<div class="borderDiv">
<table width="100%">
<tr>
Expand Down
18 changes: 18 additions & 0 deletions WebContent/WEB-INF/jsp/systemSettings.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
along with this program. If not, see http://www.gnu.org/licenses/.
--%>
<%@page import="org.scada_lts.dao.SystemSettingsDAO"%>
<%@page import="org.scada_lts.utils.SystemSettingsUtils"%>
<%@page import="com.serotonin.mango.Common"%>
<%@page import="com.serotonin.mango.rt.event.AlarmLevels"%>
<%@page import="com.serotonin.mango.rt.event.type.EventType"%>
Expand Down Expand Up @@ -94,6 +95,9 @@

$set("<c:out value="<%= SystemSettingsDAO.INSTANCE_DESCRIPTION %>"/>", settings.<c:out value="<%= SystemSettingsDAO.INSTANCE_DESCRIPTION %>"/>);

$set("<c:out value="<%= SystemSettingsDAO.VIEW_FORCE_FULL_SCREEN_MODE %>"/>", settings.<c:out value="<%= SystemSettingsDAO.VIEW_FORCE_FULL_SCREEN_MODE %>"/>);
$set("<c:out value="<%= SystemSettingsDAO.VIEW_HIDE_SHORTCUT_DISABLE_FULL_SCREEN %>"/>", settings.<c:out value="<%= SystemSettingsDAO.VIEW_HIDE_SHORTCUT_DISABLE_FULL_SCREEN %>"/>);

var sel = $("<c:out value="<%= SystemSettingsDAO.LANGUAGE %>"/>");
<c:forEach items="${availableLanguages}" var="lang">
sel.options[sel.options.length] = new Option("${lang.value}", "${lang.key}");
Expand Down Expand Up @@ -263,6 +267,8 @@
SystemSettingsDwr.saveMiscSettings(
$get("<c:out value="<%= SystemSettingsDAO.UI_PERFORMANCE %>"/>"),
$get("<c:out value="<%= SystemSettingsDAO.DATAPOINT_RUNTIME_VALUE_SYNCHRONIZED %>"/>"),
$get("<c:out value="<%= SystemSettingsDAO.VIEW_FORCE_FULL_SCREEN_MODE %>"/>"),
$get("<c:out value="<%= SystemSettingsDAO.VIEW_HIDE_SHORTCUT_DISABLE_FULL_SCREEN %>"/>"),
function(response) {
stopImageFader("saveMiscSettingsImg");
if (response.hasMessages)
Expand Down Expand Up @@ -854,6 +860,18 @@
</select>
</td>
</tr>
<tr>
<td class="formLabelRequired"><fmt:message key="systemsettings.view.forceFullScreen"/></td>
<td class="formField">
<input type="checkbox" id="<c:out value="<%= SystemSettingsDAO.VIEW_FORCE_FULL_SCREEN_MODE %>"/>" />
</td>
</tr>
<tr>
<td class="formLabelRequired"><fmt:message key="systemsettings.view.hideShortcutDisableFullScreen"/></td>
<td class="formField">
<input type="checkbox" id="<c:out value="<%= SystemSettingsDAO.VIEW_HIDE_SHORTCUT_DISABLE_FULL_SCREEN %>"/>" />
</td>
</tr>
<tr>
<td colspan="2" id="miscMessage" class="formError"></td>
</tr>
Expand Down
44 changes: 36 additions & 8 deletions WebContent/WEB-INF/jsp/users.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
var i, j;
for (i=0; i<data.users.length; i++) {
appendUser(data.users[i].id);
updateUser(data.users[i]);
updateUser({user: data.users[i]});
}

var usersProfileHtml = "", userProfileId, userProfileName;
Expand Down Expand Up @@ -97,7 +97,7 @@
// Not an admin user.
adminUser = false;
editingUserId = data.user.id;
showUserCB(data.user);
showUserCB(data);
hide("usersProfilesListTable");
}
});
Expand All @@ -117,9 +117,25 @@

}

function showUserCB(user) {

function showUserCB(response) {
var user = response.data ? response.data.user : response.user;
var forceFullScreenMode = response.data ? response.data.forceFullScreenMode : response.forceFullScreenMode;
var forceHideShortcutDisableFulLScreen = response.data ? response.data.forceHideShortcutDisableFulLScreen : response.forceHideShortcutDisableFulLScreen;
show($("userDetails"));
if(forceFullScreenMode) {
document.getElementById("enableFullScreen").disabled = true;
document.getElementById("enableFullScreen").title = '<fmt:message key="user.view.forceAdminTitle"/>';
} else {
document.getElementById("enableFullScreen").disabled = false;
document.getElementById("enableFullScreen").title = '<fmt:message key="user.view.enableFullScreen"/>';
}
if(forceHideShortcutDisableFulLScreen) {
document.getElementById("hideShortcutDisableFullScreen").disabled = true;
document.getElementById("hideShortcutDisableFullScreen").title = '<fmt:message key="user.view.forceAdminTitle"/>';
} else {
document.getElementById("hideShortcutDisableFullScreen").disabled = false;
document.getElementById("hideShortcutDisableFullScreen").title = '<fmt:message key="user.view.hideShortcutDisableFullScreen"/>';
}
$set("username", user.username);
$set("firstName", user.firstName);
$set("lastName", user.lastName);
Expand All @@ -133,8 +149,10 @@
$set("hideMenu", user.hideMenu);
$set("homeUrl", user.homeUrl);
$set("theme", user.theme);
$set("hideShortcutDisableFullScreen", user.hideShortcutDisableFullScreen);
$set("enableFullScreen", user.enableFullScreen);



if(user.id != <c:out value="<%= Common.NEW_ID %>"/>) {
$set("usersProfilesList", user.userProfile);
//console.log("User profile: " + user.userProfile);
Expand Down Expand Up @@ -236,12 +254,12 @@
UsersDwr.saveUserAdmin(editingUserId, $get("username"), $get("firstName"), $get("lastName"), $get("password"), $get("email"), $get("phone"),
$get("administrator"), $get("disabled"), $get("receiveAlarmEmails"), $get("receiveOwnAuditEvents"),
dsPermis, dpPermis, $get("usersProfilesList"), $get("hideMenu"), $get("theme"), parseHomeUrl($get("homeUrl")),
saveUserCB);
$get("enableFullScreen"), $get("hideShortcutDisableFullScreen"), saveUserCB);
}
else
UsersDwr.saveUser(editingUserId, $get("firstName"), $get("lastName"), $get("password"), $get("email"), $get("phone"),
$get("receiveAlarmEmails"), $get("receiveOwnAuditEvents"), $get("usersProfilesList"),
$get("theme"), saveUserCB);
$get("theme"), $get("enableFullScreen"), $get("hideShortcutDisableFullScreen"), saveUserCB);

}

Expand Down Expand Up @@ -298,7 +316,8 @@
createFromTemplate("u_TEMPLATE_", userId, "usersTable");
}

function updateUser(user) {
function updateUser(response) {
var user = response.data ? response.data.user : response.user;
$("u"+ user.id +"Username").innerHTML = user.username;
setUserImg(user.admin, user.disabled, $("u"+ user.id +"Img"));
}
Expand Down Expand Up @@ -459,6 +478,15 @@
<td class="formField"><select id="usersProfilesList" onchange="checkProfile()">
</select></td>
</tr>
</tbody>
<tr>
<td class="formLabelRequired"><fmt:message key="user.view.enableFullScreen"/></td>
<td class="formField"><input type="checkbox" id="enableFullScreen" /></td>
</tr>
<tr>
<td class="formLabelRequired"><fmt:message key="user.view.hideShortcutDisableFullScreen"/></td>
<td class="formField"><input type="checkbox" id="hideShortcutDisableFullScreen" /></td>
</tr>
</div>

<tbody id="dataSources" style="display:none;">
Expand Down
26 changes: 20 additions & 6 deletions WebContent/WEB-INF/jsp/views.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@
<script type="text/javascript" src="resources/node_modules/sweetalert2/dist/sweetalert2.min.js"></script>

<script type="text/javascript">

jQuery.noConflict();

shortcut.add("Ctrl+Shift+F",function() {
closeFullScreen();
var forceFullScreenMode = ${forceFullScreenMode};
if(!forceFullScreenMode || ${isAdmin})
closeFullScreen();
});

//check replace alert
Expand Down Expand Up @@ -182,6 +184,9 @@

function checkFullScreen(){
var check = getCookie("fullScreen");
var forceFullScreenMode = ${forceFullScreenMode};
var enableFullScreenMode = ${enableFullScreenMode};
check = forceFullScreenMode || enableFullScreenMode ? 'yes' : check;
if(check!=null && check!=""){
if(check=="yes"){
openFullScreen();
Expand All @@ -194,18 +199,28 @@

function openFullScreen() {
setCookie("fullScreen","yes");
document.getElementById('fsOut').style.display = "block";
var hideShortcutDisableFullScreenFromSystemSettings = ${hideShortcutDisableFullScreenFromSystemSettings};
var hideShortcutDisableFullScreenFromUser = ${hideShortcutDisableFullScreenFromUser};
if(hideShortcutDisableFullScreenFromSystemSettings || hideShortcutDisableFullScreenFromUser) {
document.getElementById('fsOut').style.display = "none";
} else {
document.getElementById('fsOut').style.display = "block";
jQuery('#fsOut').fadeOut(5000, function(){});
}
document.getElementById('mainHeader').style.display = "none";
document.getElementById('subHeader').style.display = "none";
document.getElementById('graphical').style.display = "none";
jQuery('#fsOut').fadeOut(5000, function(){});
document.getElementById('sltsContent').style = "padding-top: 0px !important;";
document.getElementById('fullScreenOut').style = "padding: 0px !important;";
}

function closeFullScreen() {
setCookie("fullScreen","no");
document.getElementById('mainHeader').style.display = "flex";
document.getElementById('subHeader').style.display = "flex";
document.getElementById('graphical').style.display = "table";
document.getElementById('sltsContent').style = "";
document.getElementById('fullScreenOut').style = "";
}

function keyListen(e) {
Expand Down Expand Up @@ -233,7 +248,6 @@
<c:if test="${fn:length(views) != 0}">
<td>
<tag:img png="arrow_out" title="viewEdit.fullScreen" onclick="fullScreen()" />
<!-- <input type="button" name="buttonFull" value="Full Screen" onClick="fullScreen();" /> -->
</td>
</c:if>
<td align="right"><sst:select value="${currentView.id}"
Expand All @@ -259,7 +273,7 @@

</table>

<table>
<table id="fullScreenOut">
<tr>
<td class="smallTitle" id="fsOut">
<fmt:message key="fullScreenOut"/>
Expand Down
2 changes: 2 additions & 0 deletions WebContent/WEB-INF/jsp/watchList.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@
jQuery("#imageChartLiveImg").attr('src', 'images/control_play_blue.png');
var width = dojo.html.getContentBox($("imageChartDiv")).width - 20;
var height = dojo.html.getContentBox($("chartContainer")).height - 80;
width = Math.ceil(Math.abs(width));
height = Math.ceil(Math.abs(height));
height = height < 100 ? 100 : height;
startImageFader($("imageChartImg"));
WatchListDwr.getImageChartData(getChartPointList(), $get("fromYear"), $get("fromMonth"), $get("fromDay"),
Expand Down
17 changes: 17 additions & 0 deletions WebContent/WEB-INF/spring-security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@
<session-management session-fixation-protection="newSession" />
</http>

<http use-expressions="true" disable-url-rewriting="true" pattern="/httpds/**"
authentication-manager-ref="authenticationManager" entry-point-ref="basicAuthenticationEntryPoint">
<headers>
<cache-control disabled="true"/>
<content-type-options disabled="true"/>
<hsts/>
<frame-options policy="SAMEORIGIN"/>
<xss-protection/>
<header ref="headersFromSystemSettingsWriter"/>
</headers>
<csrf disabled="true"/>
<intercept-url pattern="/**" access="hasAnyRole('ROLE_ADMIN', 'ROLE_USER')" requires-channel="https"/>

<custom-filter position="BASIC_AUTH_FILTER" ref="basicAuthFilter"/>
<session-management session-fixation-protection="newSession" />
</http>

<http use-expressions="true" disable-url-rewriting="true"
authentication-manager-ref="authenticationManager">
<headers>
Expand Down
7 changes: 7 additions & 0 deletions WebContent/assets/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ input[type="submit"], input[type="button"] {
position:relative;
margin: 0px;
padding: 0px;
overflow-x: auto;
max-width: 100%;
}
#viewContent img {
display: block;
Expand Down Expand Up @@ -432,4 +434,9 @@ form.view-edit-form {
}
textarea#cssEditor {
white-space: pre-wrap !important;
}

#viewContent input[type='button'] {
text-align: center;
vertical-align: middle;
}
7 changes: 6 additions & 1 deletion scadalts-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1048,5 +1048,10 @@
"systemsettings.misc.dataPointRuntimeValueSynchronized.all": "All",
"systemsettings.misc.dataPointRuntimeValueSynchronized.partial": "Partial",
"systemsettings.misc.dataPointRuntimeValueSynchronized.none": "None",
"systemsettings.http.response.headers": "HTTP response headers"
"systemsettings.http.response.headers": "HTTP response headers",
"systemsettings.view.forceFullScreen": "Force full screen mode",
"systemsettings.view.hideShortcutDisableFullScreen": "Hide shortcut to disable full screen",
"userDetails.view.forceAdminTitle": "The function is enforced by the Admin",
"userDetails.view.enableFullScreen": "Enable full screen mode",
"userDetails.view.hideShortcutDisableFullScreen": "Hide shortcut to disable full screen"
}
4 changes: 4 additions & 0 deletions scadalts-ui/src/store/users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const storeUsers = {
theme: 'DEFAULT',
hideMenu: false,
userProfile: -1,
enableFullScreen: false,
hideShortcutDisableFullScreen: false,
forceFullScreenMode: false,
forceHideShortcutDisableFulLScreen: false
}
},

Expand Down
8 changes: 4 additions & 4 deletions scadalts-ui/src/views/Alarms/EventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -708,12 +708,12 @@ export default {
async fetchEventList() {
this.loading = true;
const result = await this.$store.dispatch('searchEvents', { ...this.searchFilters, itemsPerPage: this.options.itemsPerPage });

if (result.length > this.options.itemsPerPage) {
this.eventList = result.slice(0,this.options.itemsPerPage);
const rows = result.rows;
if (rows.length > this.options.itemsPerPage) {
this.eventList = rows.slice(0,this.options.itemsPerPage);
this.totalEvents = this.options.itemsPerPage * this.options.page +1
} else {
this.eventList = result;
this.eventList = rows;
this.totalEvents = this.options.itemsPerPage * this.options.page
}
// document.getElementsByClassName('v-data-footer__pagination')[0].innerHTML=''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
:label="$t('systemsettings.misc.dataPointRuntimeValueSynchronized')"
dense
></v-select>
</v-col>
<v-col cols="12">
<v-switch
v-model="miscSettings.enableFullScreen"
:label="$t('systemsettings.view.forceFullScreen')"
@change="watchDataChange()"
></v-switch>
</v-col>
<v-col cols="12">
<v-switch
v-model="miscSettings.hideShortcutDisableFullScreen"
:label="$t('systemsettings.view.hideShortcutDisableFullScreen')"
@change="watchDataChange()"
></v-switch>
</v-col>
</v-row>
</v-card-text>
Expand Down
Loading
Loading