Skip to content

Commit 20a3afd

Browse files
committed
Add minor improvement to dashboard
1 parent 0442b42 commit 20a3afd

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.local.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SENTRIUS_VERSION=1.1.369
1+
SENTRIUS_VERSION=1.1.371
22
SENTRIUS_SSH_VERSION=1.1.41
33
SENTRIUS_KEYCLOAK_VERSION=1.1.53
44
SENTRIUS_AGENT_VERSION=1.1.42

.local.env.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SENTRIUS_VERSION=1.1.369
1+
SENTRIUS_VERSION=1.1.371
22
SENTRIUS_SSH_VERSION=1.1.41
33
SENTRIUS_KEYCLOAK_VERSION=1.1.53
44
SENTRIUS_AGENT_VERSION=1.1.42

api/src/main/resources/static/js/add_system.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ console.log("Script loaded"); // This should fire immediately if the script load
55
document.addEventListener('DOMContentLoaded', function () {
66
console.log("DOMContentLoaded event fired");
77

8-
const disableSSHButton = document.getElementById('disable-ssh-button');
8+
const disableSSHButton = document.getElementById('disable-systems-button');
99
if (disableSSHButton) {
1010

1111

1212
fetch(`/api/v1/system/settings/lockdownEnabled`)
1313
.then(response => response.json())
1414
.then(data => {
15-
if (data.lockdownEnabled) {
15+
if (!data.lockdownEnabled) {
1616
disableSSHButton.innerText = 'LockDown Systems';
1717
}
1818
else {
@@ -22,7 +22,7 @@ document.addEventListener('DOMContentLoaded', function () {
2222
.catch(error => {
2323

2424
});
25-
document.getElementById('disable-ssh-button').addEventListener('click', function(event) {
25+
document.getElementById('disable-systems-button').addEventListener('click', function(event) {
2626
event.preventDefault(); // Prevent the default anchor behavior
2727
const csrfToken = document.getElementById('csrf-token').value; // Get CSRF token value
2828
fetch('/api/v1/system/settings/lockdown/toggle', {
@@ -33,7 +33,7 @@ document.addEventListener('DOMContentLoaded', function () {
3333
}
3434
}).then(response => response.json())
3535
.then(data => {
36-
if (data.sshEnabled) {
36+
if (!data.lockdownEnabled) {
3737
disableSSHButton.innerText = 'LockDown Systems';
3838
}
3939
else {

api/src/main/resources/templates/sso/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ <h5 class="card-title">System Operations</h5>
615615
<!-- Buttons -->
616616
<div class="mb-4 d-flex justify-content-center gap-2">
617617
<input type="hidden" id="csrf-token" th:value="${_csrf.token}" />
618-
<a href="#" id="disable-ssh-button" class="btn btn-danger">Lock Down Enclaves</a>
618+
<a href="#" id="disable-systems-button" class="btn btn-danger">Lock Down Enclaves</a>
619619
<a href="/sso/v1/system/settings" class="btn btn-primary">Update Settings</a>
620620
<a href="/sso/v1/sessions/audit/list" class="btn btn-primary"
621621
th:if="${#sets.contains(operatingUser.authorizationType.accessSet, 'CAN_MANAGE_SYSTEMS')}">Audit User</a>

0 commit comments

Comments
 (0)