* Mon Mar 03 2025 Brian Read <brianr@koozali.org> 11.0.0-6.sme
- Add in SM2 NutUPS configuration and status panel [SME: 12949]
This commit is contained in:
		| @@ -0,0 +1,44 @@ | ||||
| .ups-status-page { | ||||
|     font-family: Arial, sans-serif; | ||||
|     line-height: 1.6; | ||||
|     color: #333; | ||||
|     max-width: 1200px; | ||||
|     margin: 0 auto; | ||||
|     padding: 20px; | ||||
| } | ||||
|  | ||||
| .ups-status-page h1 { | ||||
|     color: #2c3e50; | ||||
| } | ||||
|  | ||||
| .ups-status-page .grid { | ||||
|     display: grid; | ||||
|     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | ||||
|     gap: 20px; | ||||
| } | ||||
|  | ||||
| .ups-status-page .card { | ||||
|     background: #f9f9f9; | ||||
|     border-radius: 5px; | ||||
|     padding: 20px; | ||||
|     box-shadow: 0 2px 5px rgba(0,0,0,0.1); | ||||
| } | ||||
|  | ||||
| .ups-status-page h2 { | ||||
|     color: #3498db; | ||||
|     margin-top: 0; | ||||
| } | ||||
|  | ||||
| .ups-status-page table { | ||||
|     width: 100%; | ||||
|     border-collapse: collapse; | ||||
| } | ||||
|  | ||||
| .ups-status-page td { | ||||
|     padding: 8px 0; | ||||
|     border-bottom: 1px solid #ddd; | ||||
| } | ||||
|  | ||||
| .ups-status-page td:first-child { | ||||
|     font-weight: bold; | ||||
| } | ||||
							
								
								
									
										69
									
								
								root/usr/share/smanager/themes/default/public/css/nutups.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								root/usr/share/smanager/themes/default/public/css/nutups.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | ||||
| /* | ||||
| Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-01-20 16:09:58 | ||||
| */ | ||||
| .Nutups-panel {} | ||||
| .name {} | ||||
| .rout {} | ||||
| .grou1 {} | ||||
| .link1 {} | ||||
| .endg1 {} | ||||
| .subh1 {} | ||||
| .para1 {} | ||||
| .text1 {} | ||||
| .name {} | ||||
| .rout {} | ||||
| .subh2 {} | ||||
| .sele1 {} | ||||
| .sele2 {} | ||||
| .grou2 {} | ||||
| .subh3 {} | ||||
| .text3 {} | ||||
| .pass4 {} | ||||
| .endg2 {} | ||||
| .grou3 {} | ||||
| .subh4 {} | ||||
| .text5 {} | ||||
| .pass6 {} | ||||
| .endg3 {} | ||||
| .text7 {} | ||||
| .text8 {} | ||||
| .subh5 {} | ||||
| .text9 {} | ||||
| .text10 {} | ||||
| .text11 {} | ||||
| .subm12 {} | ||||
| .inline-buttons { | ||||
|     display: flex; /* Use flexbox to arrange items horizontally */ | ||||
|     gap: 10px;     /* Optional: Add space between buttons */ | ||||
|   } | ||||
|  | ||||
|   .inline-buttons .link { | ||||
|     /* Additional styling can be added here if needed */ | ||||
|   } | ||||
|    | ||||
|    | ||||
|   .inline-buttons .link { | ||||
|     display: inline-block; /* Keep links as inline-block for button shape */ | ||||
|     padding: 7px 14px;     /* Adjusted padding to approximate 70% of the original */ | ||||
|     margin: 0;             /* Remove margin */ | ||||
|     background-color: #efefef; /* Light gray background color */ | ||||
|     color: black;          /* Text color */ | ||||
|     text-decoration: none; /* Remove underline */ | ||||
|     border: 2px solid #bbb; /* Thin, light gray border */ | ||||
|     border-radius: 3px;    /* Slightly rounded corners */ | ||||
|     font-size: 11.2px;     /* Adjusted font size to approximate 70% of the original */ | ||||
|     text-align: center;    /* Center the text */ | ||||
|     cursor: pointer;       /* Pointer cursor on hover */  } | ||||
|  | ||||
|   /* Hover and active effects for better interaction */ | ||||
|   .inline-buttons .link:hover { | ||||
|     background-color: #d9d9d9; /* Darker shade on hover */ | ||||
|   } | ||||
|  | ||||
|   .inline-buttons .link:active { | ||||
|     background-color: #c0c0c0; /* Even darker shade on click */ | ||||
|   } | ||||
|    | ||||
|   span .label { | ||||
| 	padding-top:13em; | ||||
|   } | ||||
							
								
								
									
										28
									
								
								root/usr/share/smanager/themes/default/public/js/nutups.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								root/usr/share/smanager/themes/default/public/js/nutups.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| $(document).ready(function() { | ||||
|     function toggleUPSClasses() { | ||||
|         var selectedOption = $('#Nutmode_select').val(); | ||||
|         $('.masterups').toggle(selectedOption === 'netserver' || selectedOption === 'standalone'); // Show/Hide masterups based on Net Server or Standalone | ||||
|         $('.slaveups').toggle(selectedOption === 'netclient'); // Show/Hide slaveups based on Net Client | ||||
|          | ||||
|         // Enable/Disable inputs based on the selected option | ||||
|         $('.masterups input').prop('disabled', !(selectedOption === 'netserver' || selectedOption === 'standalone'));  | ||||
|         $('.slaveups input').prop('disabled', selectedOption !== 'netclient');  | ||||
|     } | ||||
|  | ||||
|     function toggleGenerics() { | ||||
|         var upsModelValue = $('#UPS_Model_select').val().toLowerCase(); // Get the current value from UPS_Model | ||||
|         var isGenericUps = upsModelValue === 'genericups'; // Check if it's 'genericups' | ||||
|  | ||||
|         // Show/Hide generics section and enable/disable inputs | ||||
|         $('.generics').toggle(isGenericUps);  | ||||
|         $('.generics input').prop('disabled', !isGenericUps); // Enable/Disable inputs based on the value | ||||
|     } | ||||
|  | ||||
|     // Event listener for the selections | ||||
|     $('#Nutmode_select').change(toggleUPSClasses); | ||||
|     $('#UPS_Model_select').change(toggleGenerics); // Listen for changes in the UPS_Model dropdown | ||||
|  | ||||
|     // Set the initial state based on current selections | ||||
|     toggleGenerics(); | ||||
|     toggleUPSClasses(); | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user