fix: show ExternalIPAddress from properties in device table
This commit is contained in:
1 parent
bc9ac4f125
commit
0109bca236
2 files changed
+7
-7
No files matched your search
@@ -140,7 +140,7 @@ async function deleteSelected() {
|
||||
<td>{{ device.deviceId?.manufacturer }}</td>
|
||||
<td>{{ device.deviceId?.productClass }}</td>
|
||||
<td>{{ device.deviceId?.serialNumber }}</td>
|
||||
<td>{{ getParameterValue(device.parameters, 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress') || getPropertyValue(device.properties, 'Device.IP.Interface.1.IPv4Address.1.IPAddress') || '—' }}</td>
|
||||
<td>{{ getParameterValue(device.parameters, 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress') || getPropertyValue(device.properties, 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress') || getParameterValue(device.parameters, 'Device.IP.Interface.1.IPv4Address.1.IPAddress') || getPropertyValue(device.properties, 'Device.IP.Interface.1.IPv4Address.1.IPAddress') || '—' }}</td>
|
||||
<td>{{ getPropertyValue(device.properties, 'InternetGatewayDevice.DeviceInfo.SoftwareVersion') || getPropertyValue(device.properties, 'Device.DeviceInfo.SoftwareVersion') || '—' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -31,7 +31,7 @@ vi.mock('../../../app/models/command.js', () => ({
|
||||
import { MainStateMachine } from '../../../app/services/cwmp/main_state_machine.js'
|
||||
import { Device } from '../../../app/domain/device/device.js'
|
||||
import { DeviceId } from '../../../app/domain/device/device_id.js'
|
||||
import { DeviceProperty, DeviceParameter } from '../../../app/domain/device/device_parameter.js'
|
||||
import { DeviceProperty } from '../../../app/domain/device/device_parameter.js'
|
||||
import { CWMPTaskQueue } from '../../../app/services/cwmp/task_queue.js'
|
||||
import { ParameterType } from '../../../app/domain/shared/types.js'
|
||||
|
||||
@@ -111,7 +111,7 @@ describe('MainStateMachine — TR-181 device', () => {
|
||||
await sm.start()
|
||||
|
||||
// Get the task from the queue and execute its callback manually
|
||||
const tasks = Array.from((taskQueue as any).tasks.values())
|
||||
const tasks: any[] = Array.from((taskQueue as any).tasks.values())
|
||||
const gpnTask = tasks.find((t: any) => t.type === 'get_parameter_names')
|
||||
expect(gpnTask).toBeDefined()
|
||||
|
||||
@@ -127,7 +127,7 @@ describe('MainStateMachine — TR-181 device', () => {
|
||||
it('GPN callback sets gpnStatus to supported on success', async () => {
|
||||
await sm.start()
|
||||
|
||||
const tasks = Array.from((taskQueue as any).tasks.values())
|
||||
const tasks: any[] = Array.from((taskQueue as any).tasks.values())
|
||||
const gpnTask = tasks.find((t: any) => t.type === 'get_parameter_names')
|
||||
expect(gpnTask).toBeDefined()
|
||||
|
||||
@@ -150,7 +150,7 @@ describe('MainStateMachine — TR-181 device', () => {
|
||||
|
||||
await sm.start()
|
||||
|
||||
const tasks = Array.from((taskQueue as any).tasks.values())
|
||||
const tasks: any[] = Array.from((taskQueue as any).tasks.values())
|
||||
const gpnTask = tasks.find((t: any) => t.type === 'get_parameter_names')
|
||||
|
||||
await taskQueue.executeTaskCallback(gpnTask!.id, 'success' as any, {
|
||||
@@ -276,7 +276,7 @@ describe('DeviceActionExecutor — reclassification after updateFromValues', ()
|
||||
expect(spvXml).toContain('SetParameterValues')
|
||||
|
||||
// Get the task and execute callback with success (simulating CPE response)
|
||||
const tasks = Array.from((taskQueue as any).tasks.values())
|
||||
const tasks: any[] = Array.from((taskQueue as any).tasks.values())
|
||||
const spvTask = tasks.find((t: any) => t.type === 'set_parameter_values')
|
||||
expect(spvTask).toBeDefined()
|
||||
|
||||
@@ -304,7 +304,7 @@ describe('DeviceActionExecutor — reclassification after updateFromValues', ()
|
||||
async () => ''
|
||||
)
|
||||
|
||||
const tasks = Array.from((taskQueue as any).tasks.values())
|
||||
const tasks: any[] = Array.from((taskQueue as any).tasks.values())
|
||||
const spvTask = tasks.find((t: any) => t.type === 'set_parameter_values')
|
||||
await taskQueue.executeTaskCallback(spvTask!.id, 'success' as any, { Status: 0 })
|
||||
|
||||
|
||||
Reference in new issue
Block a user