Compare commits
4 Commits
cdd1f2113f
...
cdf778df93
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdf778df93 | ||
|
|
8761b5e45e | ||
|
|
62c642643d | ||
|
|
cd0bc86803 |
@@ -22,9 +22,9 @@ export interface NdmSwitchPortInfo {
|
|||||||
|
|
||||||
lastChangeTime: string;
|
lastChangeTime: string;
|
||||||
|
|
||||||
opticalTemperature?: number;
|
opticalTemperature: number;
|
||||||
opticalVoltage?: number;
|
opticalVoltage: number;
|
||||||
opticalBiasCurrent?: number;
|
opticalBiasCurrent: number;
|
||||||
opticalReceivePower?: number;
|
opticalReceivePower: number;
|
||||||
opticalTransmitPower?: number;
|
opticalTransmitPower: number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ const { mutate: unlinkDevice } = useMutation({
|
|||||||
delete modifiedUpperLinkDescription.downstream?.[circuitIndex];
|
delete modifiedUpperLinkDescription.downstream?.[circuitIndex];
|
||||||
modifiedUpperDevice.linkDescription = JSON.stringify(modifiedUpperLinkDescription);
|
modifiedUpperDevice.linkDescription = JSON.stringify(modifiedUpperLinkDescription);
|
||||||
|
|
||||||
// 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
// TODO: 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
||||||
if (offlineDev.value) {
|
if (offlineDev.value) {
|
||||||
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ const { mutate: linkPortToDevice, isPending: linking } = useMutation({
|
|||||||
}
|
}
|
||||||
modifiedLowerDevice.linkDescription = JSON.stringify(modifiedLowerDeviceLinkDescription);
|
modifiedLowerDevice.linkDescription = JSON.stringify(modifiedLowerDeviceLinkDescription);
|
||||||
|
|
||||||
// 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
// TODO: 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
||||||
if (offlineDev.value) {
|
if (offlineDev.value) {
|
||||||
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ const { mutate: unlinkDevice } = useMutation({
|
|||||||
delete modifiedUpperLinkDescription.downstream?.[port.portName];
|
delete modifiedUpperLinkDescription.downstream?.[port.portName];
|
||||||
modifiedUpperDevice.linkDescription = JSON.stringify(modifiedUpperLinkDescription);
|
modifiedUpperDevice.linkDescription = JSON.stringify(modifiedUpperLinkDescription);
|
||||||
|
|
||||||
// 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
// TODO: 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
||||||
if (offlineDev.value) {
|
if (offlineDev.value) {
|
||||||
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
||||||
}
|
}
|
||||||
@@ -281,11 +281,11 @@ onBeforeUnmount(() => {
|
|||||||
<NDescriptionsItem label="上行速率">{{ transformPortSpeed(port, 'in') }}</NDescriptionsItem>
|
<NDescriptionsItem label="上行速率">{{ transformPortSpeed(port, 'in') }}</NDescriptionsItem>
|
||||||
<NDescriptionsItem label="下行速率">{{ transformPortSpeed(port, 'out') }}</NDescriptionsItem>
|
<NDescriptionsItem label="下行速率">{{ transformPortSpeed(port, 'out') }}</NDescriptionsItem>
|
||||||
<NDescriptionsItem label="总速率">{{ transformPortSpeed(port, 'total') }}</NDescriptionsItem>
|
<NDescriptionsItem label="总速率">{{ transformPortSpeed(port, 'total') }}</NDescriptionsItem>
|
||||||
<NDescriptionsItem v-if="!!port.opticalTemperature && port.opticalTemperature >= 0" label="光模块温度">{{ port.opticalTemperature }} ℃</NDescriptionsItem>
|
<NDescriptionsItem v-if="port.opticalTemperature >= 0" label="光模块温度">{{ port.opticalTemperature }} ℃</NDescriptionsItem>
|
||||||
<NDescriptionsItem v-if="!!port.opticalVoltage && port.opticalVoltage >= 0" label="光模块电压">{{ port.opticalVoltage }} mV</NDescriptionsItem>
|
<NDescriptionsItem v-if="port.opticalVoltage >= 0" label="光模块电压">{{ port.opticalVoltage }} mV</NDescriptionsItem>
|
||||||
<NDescriptionsItem v-if="!!port.opticalBiasCurrent && port.opticalBiasCurrent >= 0" label="光模块偏置电流">{{ port.opticalBiasCurrent }} μA</NDescriptionsItem>
|
<NDescriptionsItem v-if="port.opticalBiasCurrent >= 0" label="光模块偏置电流">{{ port.opticalBiasCurrent }} μA</NDescriptionsItem>
|
||||||
<NDescriptionsItem v-if="!!port.opticalReceivePower && port.opticalReceivePower >= 0" label="光模块接收功率">{{ port.opticalReceivePower / 100 }} dBm</NDescriptionsItem>
|
<NDescriptionsItem v-if="port.opticalReceivePower >= 0" label="光模块接收功率">{{ port.opticalReceivePower / 100 }} dBm</NDescriptionsItem>
|
||||||
<NDescriptionsItem v-if="!!port.opticalTransmitPower && port.opticalTransmitPower >= 0" label="光模块发送功率">{{ port.opticalTransmitPower / 100 }} dBm</NDescriptionsItem>
|
<NDescriptionsItem v-if="port.opticalTransmitPower >= 0" label="光模块发送功率">{{ port.opticalTransmitPower / 100 }} dBm</NDescriptionsItem>
|
||||||
<NDescriptionsItem label="关联设备">
|
<NDescriptionsItem label="关联设备">
|
||||||
<span v-if="getLowerDeviceByPort(port)" style="text-decoration: underline; cursor: pointer" @click="() => navigateToLowerDevice(port)">
|
<span v-if="getLowerDeviceByPort(port)" style="text-decoration: underline; cursor: pointer" @click="() => navigateToLowerDevice(port)">
|
||||||
{{ getLowerDeviceByPort(port)?.name || '-' }}
|
{{ getLowerDeviceByPort(port)?.name || '-' }}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ const { mutate: linkPortToDevice, isPending: linking } = useMutation({
|
|||||||
}
|
}
|
||||||
modifiedLowerDevice.linkDescription = JSON.stringify(modifiedLowerDeviceLinkDescription);
|
modifiedLowerDevice.linkDescription = JSON.stringify(modifiedLowerDeviceLinkDescription);
|
||||||
|
|
||||||
// 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
// TODO: 3. 发起update请求并获取最新的设备详情(离线模式下直接修改本地数据)
|
||||||
if (offlineDev.value) {
|
if (offlineDev.value) {
|
||||||
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
return { upperDevice: modifiedUpperDevice, lowerDevice: modifiedLowerDevice };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user