Merge dev v0.5.1 before 0.6 update with calender. #25
@@ -179,6 +179,18 @@
|
||||
<label class="text-sm font-medium text-gray-500 dark:text-gray-400">Hardware Model</label>
|
||||
<p id="viewHardwareModel" class="mt-1 text-gray-900 dark:text-white font-medium">--</p>
|
||||
</div>
|
||||
<div id="viewModemLoginSection" class="hidden">
|
||||
<label class="text-sm font-medium text-gray-500 dark:text-gray-400">Management Interface</label>
|
||||
<p class="mt-1">
|
||||
<a id="viewModemLoginLink" href="#" target="_blank"
|
||||
class="inline-flex items-center gap-2 text-seismo-orange hover:text-orange-600 font-medium">
|
||||
<span id="viewModemLoginText">--</span>
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
|
||||
</svg>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -837,6 +849,36 @@ function populateViewMode() {
|
||||
document.getElementById('viewPhoneNumber').textContent = currentUnit.phone_number || '--';
|
||||
document.getElementById('viewHardwareModel').textContent = currentUnit.hardware_model || '--';
|
||||
|
||||
// Modem management interface link
|
||||
const modemLoginSection = document.getElementById('viewModemLoginSection');
|
||||
const modemLoginLink = document.getElementById('viewModemLoginLink');
|
||||
const modemLoginText = document.getElementById('viewModemLoginText');
|
||||
|
||||
if (currentUnit.ip_address && currentUnit.hardware_model) {
|
||||
let loginUrl = '';
|
||||
let loginLabel = '';
|
||||
|
||||
if (currentUnit.hardware_model === 'RV50' || currentUnit.hardware_model === 'RV55') {
|
||||
// ACEmanager uses port 9191
|
||||
loginUrl = `http://${currentUnit.ip_address}:9191`;
|
||||
loginLabel = 'ACEmanager';
|
||||
} else if (currentUnit.hardware_model === 'RX55') {
|
||||
// AirLink uses HTTPS on port 443
|
||||
loginUrl = `https://${currentUnit.ip_address}:443`;
|
||||
loginLabel = 'AirLink';
|
||||
}
|
||||
|
||||
if (loginUrl) {
|
||||
modemLoginLink.href = loginUrl;
|
||||
modemLoginText.textContent = loginLabel;
|
||||
modemLoginSection.classList.remove('hidden');
|
||||
} else {
|
||||
modemLoginSection.classList.add('hidden');
|
||||
}
|
||||
} else {
|
||||
modemLoginSection.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Notes
|
||||
document.getElementById('viewNote').textContent = currentUnit.note || '--';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user