Compare commits

..

7 Commits

Author SHA1 Message Date
John Crisp
0811200222 Update AdminLTE to 4.0.0-rc4 2025-07-23 17:26:22 +02:00
John Crisp
8e17b87a2f Update AdminLTE to 4.0.0-rc4 2025-07-23 16:16:54 +02:00
John Crisp
64de86dcf7 Work on multi password fix 2025-07-08 11:07:29 +02:00
John Crisp
6fc7fd819f Add missing files 2025-07-07 17:26:28 +02:00
John Crisp
f571879414 Tidy Nut UPS more and general formatting 2025-07-07 17:24:24 +02:00
John Crisp
5b7e0a4d94 More tweaks to NUT panels 2025-07-06 17:52:41 +02:00
John Crisp
142c05fbd7 11.0.0-44.sme Tidy up Nut Panels 2025-07-06 17:25:17 +02:00
28 changed files with 2400 additions and 1378 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -110,7 +110,11 @@ html {
} */
.user-table-max-wdith {
.user-table-max-width {
max-width: 50%;
}
.nutTable tr td:nth-child(1){
width:30%;
}

View File

@@ -5,9 +5,78 @@ $(document).ready(function () {
let pass = togglePassword;
if (pass) {
togglePassword.addEventListener("click", function () {
// toggle the type attribute
togglePassword.addEventListener("click", function () {
// toggle the type attribute
const type = password.getAttribute("type") === "password" ? "text" : "password";
password.setAttribute("type", type);
// toggle the eye icon
if (type === "text") {
$(this).removeClass("bi-eye");
$(this).addClass("bi-eye-slash");
} else {
$(this).removeClass("bi-eye-slash");
$(this).addClass("bi-eye");
}
});
}
});
$(document).ready(function () {
// Get the fields
const toggle = document.querySelector("#togglePasswords");
const passwords = document.querySelectorAll('[type="password"]');
// listen for click events on the toggle
toggle.addEventListener("click", function () {
// loop through each password field
for (let password of passwords) {
// if toggle is checked, change type to "text"
// otherwise, change it back to "password"
if (toggle.checked) {
password.type = "text";
} else {
password.type = "password";
}
}
});
});
$(document).ready(function () {
// For each password input
$('.sme-password').each(function () {
// Create a new container
//alert("sme-password");
//var $inputContainer = $('<div class="input-container"></div>');
// Move the input into the new container
//$(this).wrap($inputContainer);
// Create the toggle image
//var $togglePassword = $('<img src="images/visible.png" alt="Show Password" class="toggle-password" />');
// Append the toggle image to the container
//$(this).after($togglePassword);
});
$('.toggle-password').on('click', function () {
alert("toggle-password");
// Find the associated password field
var input = $(this).siblings('.sme-password');
// Toggle the type attribute between password and text
//var inputType = input.attr('type') === 'password' ? 'text' : 'password';
//input.attr('type', inputType);
// Toggle the icon source based on the input type
//var iconSrc = inputType === 'password' ? 'images/visible.png' : 'images/visible-slash.png';
//$(this).attr('src', iconSrc);
const type = password.getAttribute("type") === "password" ? "text" : "password";
password.setAttribute("type", type);
// toggle the eye icon
if (type === "text") {
@@ -17,6 +86,9 @@ $(document).ready(function () {
$(this).removeClass("bi-eye-slash");
$(this).addClass("bi-eye");
}
});
}
});

View File

@@ -12,15 +12,17 @@
% if ( stash 'error' ) {
<br>
<div class="">
%= $c->render_to_string(inline => stash 'error')
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1> Embedded - <%=$title %></h1>
<br>
<p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p>
<div>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</div>
% my $height = $c->stash('height') | '600px';
% if ($height !~ /px$/) { $height = $height.'px';}
<object id="" class="" data="<%=$c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
<object class="" data="<%=$c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
</div>
%end

View File

@@ -23,21 +23,6 @@
%= include 'common_js'
%= include 'common_css'
<!-- should move the JS in here to a proper file if required -->
%# if (config 'hasJquery') {
%#= include 'partials/_js_imports'
%# }
<!-- Custom overrides js/css? -->
<!-- This needs refining - do contribs add in their own stuff?? -->
<!-- This needs refining -->
<!-- the sections below should add the correct JS/CSS per panel -->
%# if ($c->current_route eq 'nutups') {
%#= include 'partials/_nutups_overrides'
%# }
%# panel specific css file
% my $controller = stash('controller');
% if ($controller) {
@@ -48,8 +33,6 @@
% }
% }
</head>
<body class="sidebar-expand-lg bg-body-tertiary app-loaded">
@@ -223,7 +206,7 @@
<div id="adminlte-version"></div>
%# Specific panel js code
%# Specific panel general js code
% $controller = stash('controller');
% if ($controller) {
% my $js_path = "js/$controller.js";
@@ -233,6 +216,17 @@
% }
% }
%# Specific panel general js code
% $controller = stash('controller');
% if ($controller) {
% my $js_path = "smanager/koozali/$controller.js";
%# Use the url_for helper to generate the correct static file URL
% if (app->static->file($js_path)) {
<script src="<%= url_for("smanager/koozali/$js_path") %>"></script>
% }
% }
</body>
</html>

View File

@@ -10,8 +10,8 @@
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $nut_data->{trt}
<%= dumper $c->current_route %>
<%= dumper $nut_data->{trt} %>
</pre>
% }
@@ -22,28 +22,26 @@
% }
%if ($c->stash('first')) {
<br><p>
<br>
<div>
<%=$c->render_to_string(inline =>$c->l($c->stash('first'))) %>
</p>
</div>
%} elsif ($c->stash('success')) {
% } elsif ($c->stash('success')) {
<div class="text-success">
<h2><%=$c->l('nut_Status_Report') %></h2>
<div>
<%= $c->l($c->stash('success')); %>
</div>
</div>
<br>
%} elsif ($c->stash('error')) {
% } elsif ($c->stash('error')) {
<div class="text-danger">
<h2><%=$c->l('nut_Error_Status_Report') %></h2>
<div>
<%= $c->l($c->stash('error')); %>
</div>
</div>
<br>
%}
% }
%#Routing to partials according to trt parameter.
%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
@@ -52,14 +50,15 @@
% if ($nut_data->{trt} eq "STATUS") {
<%= include 'partials/_nut_STATUS' %>
%}
% }
<br>
% if ($nut_data->{trt} eq "CONFIG") {
<%= include 'partials/_nut_CONFIG' %>
%}
% }
<br>
</div>

View File

@@ -1,25 +1,42 @@
<% use POSIX qw(strftime); %>
<div id="">
<% if (! $c->session->{PwdSet} ) { %>
<div class=""><h5>
Warning: you have not yet changed the default system password.</h5></div>
<% } %>
<% if ( $c->is_unsafe ) { %>
<div class=""><h5>
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
may leave your system in an unknown state!</h5></div>
<% } %>
<% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) { %>
<div class=""><h5>
Warning: Development or debug mode enabled AND public access is offered !
</h5></div>
<% } %>
% use POSIX qw(strftime);
<div>
% if (! $c->session->{PwdSet} ) {
<div>
<h5 class="text-danger">
Warning: you have not yet changed the default system password.
</h5>
</div>
% }
% if ( $c->is_unsafe ) {
<div>
<h5 class="text-danger">
Warning: a reconfigure and reboot is required before proceeding!<br>
Failure to do so now may leave your system in an unknown state!
</h5>
</div>
% }
% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) {
<div>
<h5 class="text-danger">
Warning: Development or debug mode enabled AND public access is offered !
</h5>
</div>
% }
<% my $curdate = strftime '%Y%m%d', localtime; %>
<% if ( "$curdate" >= "20290531" ) { %>
<div class=""><h5>
URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version. Failure to upgrade may lead to the compromise of this server.
<br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get the latest version
</h5></div>
<% } %>
% if ( "$curdate" >= "20290531" ) {
<div>
<h5>
URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE.<br>
NO support will be offered for any issue found with this installed version.<br>
Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version.<br>
Failure to upgrade may lead to the compromise of this server.<br>
Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get the latest version
</h5>
</div>
% }
</div>

View File

@@ -1,3 +1,5 @@
<!-- Not used -->
<div class="login-page bg-body-secondary app-loaded">
<!-- /.login-logo -->
<br>

View File

@@ -22,20 +22,22 @@
% end
% content_for 'end' => begin
<div id="" class="">
content_end
<div>
content_end
</div>
% end
<div id="">
<div>
<p> < %= $title % ></p><br>
<%= $modul %><br>
Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam.
Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam.
Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si.
Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si.
Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco.
Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco.
<br>
<p>
%= link_to Welcome => '/'
</p>

View File

@@ -3,16 +3,9 @@
%#
<div>
<!-- reetp This needs fixing -->
<!--
<script>
window.onload = function() {
SelectInput();
};
</script>
-->
% if (config->{debug} == 0) {
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
</pre>
@@ -38,7 +31,7 @@
%# param 'status' => $nut_data->{status} unless param 'status';
% my @status_options = selected_field([['Disabled' => 'disabled'], ['Enabled' => 'enabled']], $nut_data->{status});
<%= select_field 'status' => @status_options, class => "form-select" %>
<%= select_field 'status' => @status_options, class => "form-select", id => 'status_select' %>
</div>
</div>
@@ -51,139 +44,172 @@
<div class="col-auto">
% my @Nutmode_options = [['Standalone' => 'standalone'], ['Net Server' => 'netserver'], ['Net Client ' => 'netclient']];
% param 'Nutmode' => $nut_data->{Nutmode} unless param 'Nutmode';
<%= select_field 'Nutmode' => @Nutmode_options, class => "form-select" %>
<%= select_field 'Nutmode' => @Nutmode_options, class => "input form-select", id => "Nutmode_select" %>
</div>
</div>
<br><br>
<h2><%=l('nut_if_Net_Server')%></h2>
<div class="masterups">
<div class="secondaryups">
<br>
<h2><%=l('nut_if_Net_Server')%></h2>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputMasterUPSName" class="col-form-label"><%= l ('nut_MasterUPS_UPSNAME@IP') %></label>
</div>
<div class="col-auto">
% param 'MasterUPS_Name' => $nut_data->{MasterUPS_Name} unless param 'MasterUPS_Name';
<%= 'ups@'. $nut_data->{'localip'} %>
</div>
</div>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<%= l ('nut_SlaveUPS_User') %>
</div>
<div class="col-auto">
<%= 'upssecondary' %>
</div>
</div>
<div class="row g-3 align-items-center">
<div class="col-md-1">
%=l('nut_SlaveUPS_Password')
</div>
<div class="col-auto">
<%= $nut_data->{'SlaveUPS_Pass'}%>
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputMasterUPSName" class="col-form-label"><%= l ('nut_MasterUPS_UPSNAME@IP') %></label>
</div>
<div class="col-auto">
% param 'MasterUPS_Name' => $nut_data->{MasterUPS_Name} unless param 'MasterUPS_Name';
<input type="text" name="MasterUPS_Name" pattern=".*" size="50" id="inputMasterUPSName" class="form-control" aria-describedby="Master UPS Name" placeholder="ups@localhost" value="<%= $nut_data->{MasterUPS_Name} %>" >
<br>
<div>
<h2><%= l ('nut_UPS_Device') %></h2>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="UPS_Model_select" class="col-form-label"><%= l ('nut_UPS_Model') %></label>
</div>
<div class="col-auto">
% my @UPS_Model_options = $c->get_model_options();
% param 'UPS_Model' => $nut_data->{UPS_Model} unless param 'UPS_Model';
<%= select_field 'UPS_Model' => \@UPS_Model_options, class => "form-select", id => 'UPS_Model_select' %>
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSDevice" class="col-form-label"><%= l ('nut_UPS_Device') %></label>
</div>
<div class="col-auto">
% param 'UPS_Device' => $nut_data->{UPS_Device} unless param 'UPS_Device';
<input type="text" name="UPS_Device" pattern=".*" size="50" id="inputUPSDevice" class="form-control" aria-describedby="UPS Device" placeholder="auto (for usb)" value="<%= $nut_data->{UPS_Device} %>" >
</div>
</div>
</div>
</div>
<br>
<div class="slaveups">
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="MasterUPSPassword" class="col-form-label"><%= l ('nut_MasterUPS_Password') %></label>
</div>
<div class="col-auto">
% param 'MasterUPS_Password' => $nut_data->{MasterUPS_Password} unless param 'MasterUPS_Password';
<input type="password" name="MasterUPS_Password" id="MasterUPSPassword" class="form-control" aria-describedby="Master UPS Password" value="<%= $nut_data->{MasterUPS_Password} %>">
</div>
<!-- reetp fix toggle password -->
<!-- <div class="col-auto">
<span id="togglePassword" class="bi bi-eye"></span>
</div>
-->
</div>
<h2><%=l('nut_if_Net_Client')%></h2>
<br>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<%= l ('nut_UPS_Model') %>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputClientUPSDevice" class="col-form-label"><%= l ('nut_SlaveUPS_UPSNAME@IP') %></label>
</div>
<div class="col-auto">
% param 'ClientUPS_Name' => $nut_data->{ClientUPS_Name} unless param 'ClientUPS_Name';
<input type="text" name="ClientUPS_Name" pattern=".*" size="50" id="inputClientUPSDevice" class="form-control" aria-describedby="Client UPS Name" placeholder="upsname@IP[:port]" value="<%= $nut_data->{ClientUPS_Name} %>" >
</div>
</div>
<div class="col-auto">
% my @UPS_Model_options = $c->get_model_options();
% param 'UPS_Model' => $nut_data->{UPS_Model} unless param 'UPS_Model';
%= select_field 'UPS_Model' => \@UPS_Model_options, class => "form-select"
</div>
</div>
<br>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSDevice" class="col-form-label"><%= l ('nut_UPS_Device') %></label>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="ClientUPSUsername" class="col-form-label"><%= l ('nut_ClientUPS_Username') %></label>
</div>
<div class="col-auto">
% param 'ClientUPS_User' => $nut_data->{ClientUPS_User} unless param 'ClientUPS_User';
<input type="text" name="ClientUPS_User" id="ClientUPSUsername" class="form-control" aria-describedby="Client UPS Username" placeholder="Client username" value="<%= $nut_data->{ClientUPS_User} %>" >
</div>
</div>
<div class="col-auto">
% param 'UPS_Device' => $nut_data->{UPS_Device} unless param 'UPS_Device';
<input type="text" name="UPS_Device" pattern=".*" size="50" id="inputUPSDevice" class="form-control" aria-describedby="UPS Device" placeholder="auto (for usb)" value="<%= $nut_data->{UPS_Device} %>" >
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="password" class="col-form-label"><%= l ('nut_ClientUPS_Password') %></label>
</div>
<div class="col-auto">
% param 'ClientUPS_Pass' => $nut_data->{ClientUPS_Pass} unless param 'ClientUPS_Pass';
<input type="password" name="ClientUPS_Pass" id="password" class="form-control" aria-describedby="Client UPS Password" placeholder="Client password" value="<%= $nut_data->{ClientUPS_Pass} %>" >
</div>
<div class="col-auto">
<span id="togglePassword" class="bi bi-eye"></span>
</div>
</div>
</div>
<br><br>
<h2><%=l('nut_if_Net_Client')%></h2>
<div class="generics">
<br>
<h2><%=l('nut_if_genericups')%></h2>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputSlaveUPSDevice" class="col-form-label"><%= l ('nut_SlaveUPS_UPSNAME@IP') %></label>
<br><br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSGenericType" class="col-form-label"><%= l ('nut_UPS_Generic_Type') %></label>
</div>
<div class="col-auto">
% param 'UPS_gen_Type' => $nut_data->{UPS_gen_Type} unless param 'UPS_gen_Type';
<input type="text" name="UPS_gen_Type" pattern=".*" size="50" id="inputUPSGenericType" class="form-control" aria-describedby="UPS Generic Type" placeholder="UPS_Gen_Type" value="<%= $nut_data->{UPS_gen_Type} %>" >
</div>
</div>
<div class="col-auto">
% param 'SlaveUPS_Name' => $nut_data->{SlaveUPS_Name} unless param 'SlaveUPS_Name';
<input type="text" name="SlaveUPS_Name" pattern=".*" size="50" id="inputSlaveUPSDevice" class="form-control" aria-describedby="Slave UPS Name" placeholder="upsname@IP" value="<%= $nut_data->{SlaveUPS_Name} %>" >
</div>
</div>
<br>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="SlaveUPSPassword" class="col-form-label"><%= l ('nut_SlaveUPS_Password') %></label>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSManufacturer" class="col-form-label"><%= l ('nut_UPS_Generic_Manufacturer') %></label>
</div>
<div class="col-auto">
% param 'UPS_gen_Mfr' => $nut_data->{UPS_gen_Mfr} unless param 'UPS_gen_Mfr';
<input type="text" name="UPS_gen_Mfr" pattern=".*" size="50" id="inputUPSManufacturer" class="form-control" aria-describedby="UPS Generic Manufacturer" placeholder="UPS_sen_Mfr" value="<%= $nut_data->{UPS_gen_Mfr} %>" >
</div>
</div>
<div class="col-auto">
% param 'SlaveUPS_Pass' => $nut_data->{SlaveUPS_Pass} unless param 'SlaveUPS_Pass';
<input type="password" name="SlaveUPS_Pass" id="SlaveUPSPassword" class="form-control" aria-describedby="Slave UPS Password" value="<%= $nut_data->{SlaveUPS_Pass} %>">
</div>
<!-- reetp fix toggle password -->
<!-- <div class="col-auto">
<span id="togglePassword" class="bi bi-eye"></span>
</div>
-->
</div>
<br><br>
<br>
<h2><%=l('nut_if_genericups')%></h2>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSGenericType" class="col-form-label"><%= l ('nut_UPS_Generic_Type') %></label>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSModel" class="col-form-label"><%= l ('nut_UPS_Generic_Model') %></label>
</div>
<div class="col-auto">
% param 'UPS_gen_Model' => $nut_data->{UPS_gen_Model} unless param 'UPS_gen_Model';
<input type="text" name="UPS_gen_Model" pattern=".*" size="50" id="inputUPSModel" class="form-control" aria-describedby="UPS Generic Model" placeholder="UPS_gen_Model" value="<%= $nut_data->{UPS_gen_Model} %>" >
</div>
</div>
<div class="col-auto">
% param 'UPS_gen_Type' => $nut_data->{UPS_gen_Type} unless param 'UPS_gen_Type';
<input type="text" name="UPS_gen_Type" pattern=".*" size="50" id="inputUPSGenericType" class="form-control" aria-describedby="UPS Generic Type" placeholder="UPS_Gen_Type" value="<%= $nut_data->{UPS_gen_Type} %>" >
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSManufacturer" class="col-form-label"><%= l ('nut_UPS_Generic_Manufacturer') %></label>
</div>
<div class="col-auto">
% param 'UPS_gen_Mfr' => $nut_data->{UPS_gen_Mfr} unless param 'UPS_gen_Mfr';
<input type="text" name="UPS_gen_Mfr" pattern=".*" size="50" id="inputUPSManufacturer" class="form-control" aria-describedby="UPS Generic Manufacturer" placeholder="UPS_sen_Mfr" value="<%= $nut_data->{UPS_gen_Mfr} %>" >
</div>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="inputUPSModel" class="col-form-label"><%= l ('nut_UPS_Generic_Model') %></label>
</div>
<div class="col-auto">
% param 'UPS_gen_Model' => $nut_data->{UPS_gen_Model} unless param 'UPS_gen_Model';
<input type="text" name="UPS_gen_Model" pattern=".*" size="50" id="inputUPSModel" class="form-control" aria-describedby="UPS Generic Model" placeholder="UPS_gen_Model" value="<%= $nut_data->{UPS_gen_Model} %>" >
</div>
</div>
<br>
@@ -199,8 +225,8 @@
</div>
</div>
%# Probably finally by a submit.
</form>
<br>
</div>

View File

@@ -3,37 +3,35 @@
%#
<div>
<!--
<!--
<script>
window.onload = function() {
SelectInput();
};
</script>
-->
-->
% if (config->{debug} == 1) {
<pre>
%= dumper $nut_data
<%= dumper $nut_data %>
</pre>
% }
% my $btn = l('nut_APPLY');
%= form_for "nutupsu" => (method => 'POST') => begin
<form action="/smanager/nutupsu" method="POST">
% param 'trt' => $nut_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $nut_data->{trt}
<%= hidden_field 'trt' => $nut_data->{trt} %>
%# Inputs etc in here.
<div class="">
<a href='nutupsd?trt=CONFIG' class="">
%= l('nut_Configure_NutUPS')
</a>
%#= link_to l('nut_Configure_NutUPS'), 'nutupsd?trt=CONFIG' , class=> 'link link1'
<div>
<a href='nutupsd?trt=CONFIG' class = "btn btn-sm btn-primary">
<%= l ('nut_Configure_NutUPS') %>
</a>
</div>
<br>
<h2><%= l ('nut_Status_of_the_controlled_UPS')%></h2>
@@ -41,7 +39,9 @@
<%= l ('nut_Descriptive_paragraph') %>
</div>
<!--
<br>
<!--
<span class="">
%=l('nut_Status_(from_upsc)')
</span>
@@ -50,10 +50,11 @@
%= text_area 'UPSStatus', cols=>55, rows=>35, Readonly=>'true'
</span>
<br>
-->
-->
%= include 'partials/_nut_UPS_STATUS'
<%= include 'partials/_nut_UPS_STATUS' %>
%# Probably finally by a submit.
%end
</form>
</div>

View File

@@ -1,11 +1,9 @@
<h1>UPS Status</h1>
%= stylesheet '/css/nut_ups-status-page.css'
<h2>UPS Status</h2>
<div class="container-md">
<div>
<h2>Device Information</h2>
<table class="table table-bordered">
<table class="table table-bordered nutTable">
<tr>
<td>Manufacturer:</td>
<td><%= $nut_data->{'ups_data'}->{'device.mfr'} %></td>
@@ -29,7 +27,7 @@
<div>
<h2>Battery Status</h2>
<table class="table table-bordered">
<table class="table table-bordered nutTable">
<tr>
<td>Charge:</td>
<td><%= $nut_data->{'ups_data'}->{'battery.charge'} %>%</td>
@@ -53,7 +51,7 @@
<div>
<h2>Input Power</h2>
<table class="table table-bordered">
<table class="table table-bordered nutTable">
<tr>
<td>Voltage:</td>
<td><%= $nut_data->{'ups_data'}->{'input.voltage'} %>V</td>
@@ -81,7 +79,7 @@
<div>
<h2>UPS Status</h2>
<table class="table table-bordered">
<table class="table table-bordered nutTable">
<tr>
<td>Status:</td>
<td><%= $nut_data->{'ups_data'}->{'ups.status'} %></td>

View File

@@ -12,18 +12,18 @@
<li class="nav-header">USER</li>
<li class="nav-item">
<a href='#' id="" class="nav-link">
<a href='#' class="nav-link">
<i class="nav-icon bi bi-person-fill"></i>Current User: <%= session 'username' %>
</a>
</li>
% my $cc = 300;
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
% my ($classNew, $target, $href) = '';
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% next if ($_->{'MENUCAT'} ne 'U' ); # menu User
% next if ($_->{'MENUCAT'} ne 'U' ); # menu User
% if ( $_->{'FILENAME'} =~ m/^2\// ) {
% $target = '_self';
% (my $file2 = $_->{'FILENAME'}) =~ s|^2/||;

View File

@@ -40,14 +40,14 @@
% if (!($url =~ /https:/)) {
% $url = 'https://' . $url;
%}
% }
<div class="container-fluid">
<a href="<%= "https://".$thisdomain."/" %>roundcube?_user=<%= $username %>">
<button class="" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %>
</button>
</a>
<object id="" data="<%=$url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
<object data="<%=$url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
</div>
</div>

View File

@@ -4,117 +4,115 @@
<div class="card-body">
% if (config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $pwd_datas
</p>
% if (config->{debug} == 0) {
<pre>
<%= dumper $c->current_route %>
<%= dumper $pwd_datas %>
</pre>
% }
<h2><%= l 'pwd_ACCOUNT_PASSWORD_CHANGE' %></h2>
% if ( stash 'error' ) {
<br>
<div>
%= $c->render_to_string(inline => stash 'error')
<div CLASS="text-danvgr">
<%= $c->render_to_string(inline => stash 'error') %>
</div>
%}
% }
% my $btn = l('pwd_PASSWORD_CHANGE');
% my $url = '/userpassword';
% my $btn = l('pwd_PASSWORD_CHANGE');
% my $url = '/userpassword';
<div>
%= $c->render_to_string( inline => l('pwd_DESCRIPTION'));
<%= $c->render_to_string( inline => l('pwd_DESCRIPTION')); %>
</div>
% if ( $pwd_datas->{trt} eq 'RESET' ) {
% my $btn = l('pwd_PASSWORD_RESET');
% my $url = '/userpasswordr';
%= $c->render_to_string( inline => l('pwd_DESCRIPTION_RESET'));
% my $btn = l('pwd_PASSWORD_RESET');
% my $url = '/userpasswordr';
<%= $c->render_to_string( inline => l('pwd_DESCRIPTION_RESET')); %>
% }
<br>
<!-- Start of Form -->
%= form_for $url => (method => 'POST') => begin
<table class="table table-bordered user-table-max-wdith">
<thead>
<tr>
<th class="col-sm">
%= l 'pwd_YOUR_ACCOUNT'
</th>
<th class="col-sm">
%=l 'USER_NAME'
</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= $pwd_datas->{Account} %></td>
<td><%= $pwd_datas->{name} %>Not in pwd_datas-> name ? :-( </td>
</tr>
</tbody>
</table>
<form action="smanager/userpassword" method="POST">
<br>
% if ( $pwd_datas->{trt} ne 'RESET' ) {
<div>
<%= l 'pwd_PASSWORD_OLD' %>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="YourAccount" class="col-form-label"><%= l 'pwd_YOUR_ACCOUNT' %></label>
</div>
<div class="col-auto">
<input type="text" name="Account" id="YourAccount" class="form-control-plaintext" value="<%= $pwd_datas->{Account} %>" readonly>
</div>
</div>
<br>
% if ( $pwd_datas->{trt} ne 'RESET' ) {
<div class="row g-3 align-items-center">
<div class="col-md-1">
<label for="OldPass" class="col-form-label"><%= l 'pwd_PASSWORD_OLD' %></label>
</div>
<div class="col-auto">
<input name="OldPass" type="password" id="OldPass" class="form-control" placeholder="Old Password">
</div>
<div class="col-auto">
<span id="togglePasswordVerify" class="bi bi-eye"></span>
</div>
</div>
<br>
% }
<div class="row g-3 align-items-center">
<div class="col-md-2">
<input name="OldPass" id="OldPass" type="password" class="form-control sme-password" placeholder="Password">
<div class="col-md-1">
<label for="Pass" class="col-form-label"><%= l 'pwd_PASSWORD_NEW' %></label>
</div>
<div class="col-auto">
<input name="Pass" type="password" id="Pass" class="form-control" placeholder="New Password">
</div>
<div class="col-auto">
<span id="togglePasswordVerify" class="bi bi-eye"></span>
</div>
</div>
% }
<br>
<br>
<div>
<%= l 'pwd_PASSWORD_NEW' %>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<input name="Pass" id="Pass" type="password" class="form-control sme-password" placeholder="Password">
<div class="row g-3 align-items-center sme-password">
<div class="col-md-1">
<label for="PassVerify" class="col-form-label"><%=l 'pwd_PASSWORD_VERIFY_NEW' %></label>
</div>
<div class="col-auto">
<input name="Passverify" type="password" id="PassVerify" class="form-control" placeholder="Verify Password">
</div>
<div class="col-auto">
<span id="togglePassword" class="bi bi-eye"></span>
</div>
</div>
</div>
<br>
<br>
<div>
%=l 'pwd_PASSWORD_VERIFY_NEW'
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<input name="Passverify" id="PassVerify" type="password" class="form-control sme-password" placeholder="Password">
<div>
Show All Passwords Test
<span id="togglePasswords" class="bi bi-eye"></span>
</div>
</div>
<br>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<button type="submit" class="btn btn-primary btn-sm"><%= $btn %></button>
<%= hidden_field 'User' => $pwd_datas->{Account} %>
<%= hidden_field 'Trt' => $pwd_datas->{trt} %>
<%= hidden_field 'jwt' => $pwd_datas->{jwt} %>
<div class="row g-3 align-items-center">
<div class="col-md-1">
<button type="submit" class="btn btn-primary btn-sm"><%= $btn %></button>
</div>
</div>
</div>
%= hidden_field 'User' => $pwd_datas->{Account}
%= hidden_field 'Trt' => $pwd_datas->{trt}
%= hidden_field 'jwt' => $pwd_datas->{jwt}
% end
</form>
<!-- End of Form -->
</div>

View File

@@ -4,69 +4,73 @@
<div class="card-body">
<p>Index on line - Welcome page
<br>
</p>
<p>
Cogo diam enim ibidem paulatim pertineo velit. Comis patria pertineo secundum. Aliquip laoreet quibus zelus. Gravis incassum interdico iustum lucidus neo os paratus. Autem causa haero pneum similis sudo vindico. Iusto molior neque oppeto. Ideo minim nibh refoveo veniam vereor virtus. Appellatio pala scisco.
<div>Index on line - Welcome page<br></div>
Caecus esse exputo ideo laoreet valde. Appellatio feugiat haero jus lucidus tum valetudo vulputate. Amet illum imputo volutpat. Acsi adipiscing brevitas facilisi illum laoreet lobortis lucidus sagaciter uxor. Defui dolor hos luptatum quadrum saluto verto vicis wisi.
<div>
Cogo diam enim ibidem paulatim pertineo velit. Comis patria pertineo secundum. Aliquip laoreet quibus zelus. Gravis incassum interdico iustum lucidus neo os paratus. Autem causa haero pneum similis sudo vindico. Iusto molior neque oppeto. Ideo minim nibh refoveo veniam vereor virtus. Appellatio pala scisco.
Acsi ideo pagus ymo. Ea jugis lobortis nimis utrum veniam vereor. Aliquip amet autem gilvus hos iaceo loquor natu pagus refoveo. Adipiscing laoreet probo tation tum vero. Enim minim ymo. Dolore imputo iusto iustum lobortis meus molior vulputate. Dolor immitto iustum jumentum olim pagus saluto uxor zelus. Capto commodo eu euismod. Duis ille nunc premo quidem tamen ulciscor wisi.
Caecus esse exputo ideo laoreet valde. Appellatio feugiat haero jus lucidus tum valetudo vulputate. Amet illum imputo volutpat. Acsi adipiscing brevitas facilisi illum laoreet lobortis lucidus sagaciter uxor. Defui dolor hos luptatum quadrum saluto verto vicis wisi.
Abdo abico damnum dolor et facilisi incassum melior populus saepius. Commodo conventio ex exputo pagus quae valetudo. Eligo jumentum lobortis suscipit tamen torqueo validus venio voco. Letalis molior tego tincidunt tum. Bene iriure melior natu obruo os te voco. Ea oppeto refoveo tum. Consectetuer dolus ut.
Acsi ideo pagus ymo. Ea jugis lobortis nimis utrum veniam vereor. Aliquip amet autem gilvus hos iaceo loquor natu pagus refoveo. Adipiscing laoreet probo tation tum vero. Enim minim ymo. Dolore imputo iusto iustum lobortis meus molior vulputate. Dolor immitto iustum jumentum olim pagus saluto uxor zelus. Capto commodo eu euismod. Duis ille nunc premo quidem tamen ulciscor wisi.
Abdo abico damnum dolor et facilisi incassum melior populus saepius. Commodo conventio ex exputo pagus quae valetudo. Eligo jumentum lobortis suscipit tamen torqueo validus venio voco. Letalis molior tego tincidunt tum. Bene iriure melior natu obruo os te voco. Ea oppeto refoveo tum. Consectetuer dolus ut.
Abdo abigo aptent commoveo inhibeo molior nibh plaga pneum zelus. Conventio genitus neo nulla patria pneum saluto velit voco. Abigo defui dolore humo nulla nunc. Autem commodo erat gemino nisl olim pecus ratis tego. Fere luctus nunc sit. Bene humo imputo paulatim suscipit. Aliquam diam dolor feugiat gravis imputo lucidus modo nulla obruo. Ea macto melior neo qui ratis velit.
</div>
<%= l ('MESS_TEST','toto') %>
<div>
<%= link_to Initial => '/' %>
</div>
<div>
<%= link_to Manual => '/manual' %>
</div>
<div>
<%= link_to Welcome => '/welcome' %>
<a href="<%= url_for 'index' %>">Accueil</a>
</div>
% use SrvMngr::Navigation2;
% my %nav = %{SrvMngr::navigation2->getNavigation( $c->languages() )};
Abdo abigo aptent commoveo inhibeo molior nibh plaga pneum zelus. Conventio genitus neo nulla patria pneum saluto velit voco. Abigo defui dolore humo nulla nunc. Autem commodo erat gemino nisl olim pecus ratis tego. Fere luctus nunc sit. Bene humo imputo paulatim suscipit. Aliquam diam dolor feugiat gravis imputo lucidus modo nulla obruo. Ea macto melior neo qui ratis velit.
</p>
%= l ('MESS_TEST','toto')
<p>
%= link_to Initial => '/'
</p>
<p>
%= link_to Manual => '/manual'
</p>
<p>
%= link_to Welcome => '/welcome'
<a href="<%= url_for 'index' %>">Accueil</a -->.
</p>
% use SrvMngr::Navigation2;
% my %nav = %{SrvMngr::navigation2->getNavigation( $c->languages() )};
<!-- % = dumper %nav -->
<div>
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
% foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
% <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
</div>
<div>
%= $h
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% my ($target, $classNew) = ( $_->{'FILENAME'} =~ m/^2\// ) ?
% ('_self',' accent') :
% ('main','') ;
% my $href = '/server-manager' . $_->{'FILENAME'};
<div class=""><a class="" target='
%= $target
' onclick=\"swapClasses('sme
%= $c
')\" id="" href='
%= $href
'>
%= $_->{'DESCRIPTION'}
</a>
</div>
% $c++;
% }
<%= $h %>
% }
% foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
% my ($target, $classNew) = ( $_->{'FILENAME'} =~ m/^2\// ) ?
% ('_self',' accent') :
% ('main','') ;
% my $href = '/server-manager' . $_->{'FILENAME'};
<div class=""><a class="" target='
%= $target
' onclick=\"swapClasses('sme
%= $c
')\" href='
%= $href
'>
%= $_->{'DESCRIPTION'}
</a>
</div>
% $c++;
% }
% }
</div>
</div>
% end

View File

@@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE
%define version 11.0.0
%define release 43
%define release 48
Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2
Name: %{name}
@@ -17,7 +17,7 @@ BuildArchitectures: noarch
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildRequires: smeserver-devtools
Requires: smeserver-release >= 11.0
Requires: smeserver-manager >= 11.0.0-101
Requires: smeserver-manager >= 11.0.0-104
Requires: smeserver-lib >= 11.0.0-13
Requires: e-smith-manager >= 2.4.0-22
@@ -29,6 +29,22 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%changelog
* Wed Jul 23 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-48.sme
- Update to AdminLTE 4.0.0-rc4
* Tue Jul 08 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-47.sme
- Working on multipassword show/hide
* Mon Jul 07 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-46.sme
- Too fast on the build button and missed some files
* Mon Jul 07 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-45.sme
- Tidy up Nut panels more
- other general formatting
* Sun Jul 06 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-44.sme
- Tidy up Nut panels
* Sun Jul 06 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-43.sme
- Make buttons smaller
- Fix mail_data instances