Commit 2e5d94181a3c02c819f2fec4c5d88378bf2b5848
1 parent
6c969a63
支持修改页面展示的sip ip
Showing
3 changed files
with
13 additions
and
7 deletions
src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java
| @@ -4,7 +4,6 @@ package com.genersoft.iot.vmp.conf; | @@ -4,7 +4,6 @@ package com.genersoft.iot.vmp.conf; | ||
| 4 | import org.junit.jupiter.api.Order; | 4 | import org.junit.jupiter.api.Order; |
| 5 | import org.springframework.boot.context.properties.ConfigurationProperties; | 5 | import org.springframework.boot.context.properties.ConfigurationProperties; |
| 6 | import org.springframework.stereotype.Component; | 6 | import org.springframework.stereotype.Component; |
| 7 | -import org.springframework.util.ObjectUtils; | ||
| 8 | 7 | ||
| 9 | @Component | 8 | @Component |
| 10 | @ConfigurationProperties(prefix = "sip", ignoreInvalidFields = true) | 9 | @ConfigurationProperties(prefix = "sip", ignoreInvalidFields = true) |
| @@ -13,6 +12,8 @@ public class SipConfig { | @@ -13,6 +12,8 @@ public class SipConfig { | ||
| 13 | 12 | ||
| 14 | private String ip; | 13 | private String ip; |
| 15 | 14 | ||
| 15 | + private String showIp; | ||
| 16 | + | ||
| 16 | private Integer port; | 17 | private Integer port; |
| 17 | 18 | ||
| 18 | private String domain; | 19 | private String domain; |
| @@ -96,9 +97,14 @@ public class SipConfig { | @@ -96,9 +97,14 @@ public class SipConfig { | ||
| 96 | this.alarm = alarm; | 97 | this.alarm = alarm; |
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | - public void getLocalIp(String deviceLocalIp) { | ||
| 100 | - if (ObjectUtils.isEmpty(deviceLocalIp)) { | ||
| 101 | - | 100 | + public String getShowIp() { |
| 101 | + if (this.showIp == null) { | ||
| 102 | + return this.ip; | ||
| 102 | } | 103 | } |
| 104 | + return showIp; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public void setShowIp(String showIp) { | ||
| 108 | + this.showIp = showIp; | ||
| 103 | } | 109 | } |
| 104 | } | 110 | } |
src/main/resources/all-application.yml
| @@ -65,10 +65,10 @@ server: | @@ -65,10 +65,10 @@ server: | ||
| 65 | 65 | ||
| 66 | # 作为28181服务器的配置 | 66 | # 作为28181服务器的配置 |
| 67 | sip: | 67 | sip: |
| 68 | - # [必须修改] 本机的IP, 必须是网卡上的IP,用于sip下协议栈监听ip,如果监听所有设置为0.0.0.0 | ||
| 69 | - monitor-ip: 0.0.0.0 | ||
| 70 | # [必须修改] 本机的IP | 68 | # [必须修改] 本机的IP |
| 71 | ip: 192.168.0.100 | 69 | ip: 192.168.0.100 |
| 70 | + # [可选] 没有任何业务需求,仅仅是在前端展示的时候用 | ||
| 71 | + show-ip: 192.168.0.100 | ||
| 72 | # [可选] 28181服务监听的端口 | 72 | # [可选] 28181服务监听的端口 |
| 73 | port: 5060 | 73 | port: 5060 |
| 74 | # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) | 74 | # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) |
web_src/src/components/dialog/configInfo.vue
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | <el-descriptions title="国标服务信息" v-if="configInfoData.sip" :span="2"> | 13 | <el-descriptions title="国标服务信息" v-if="configInfoData.sip" :span="2"> |
| 14 | <el-descriptions-item label="编号" >{{configInfoData.sip.id}}</el-descriptions-item> | 14 | <el-descriptions-item label="编号" >{{configInfoData.sip.id}}</el-descriptions-item> |
| 15 | <el-descriptions-item label="域">{{configInfoData.sip.domain}}</el-descriptions-item> | 15 | <el-descriptions-item label="域">{{configInfoData.sip.domain}}</el-descriptions-item> |
| 16 | - <el-descriptions-item label="IP">{{configInfoData.sip.ip}}</el-descriptions-item> | 16 | + <el-descriptions-item label="IP">{{configInfoData.sip.showIp}}</el-descriptions-item> |
| 17 | <el-descriptions-item label="端口">{{configInfoData.sip.port}}</el-descriptions-item> | 17 | <el-descriptions-item label="端口">{{configInfoData.sip.port}}</el-descriptions-item> |
| 18 | <el-descriptions-item label="密码"> | 18 | <el-descriptions-item label="密码"> |
| 19 | <el-tag size="small">{{configInfoData.sip.password}}</el-tag> | 19 | <el-tag size="small">{{configInfoData.sip.password}}</el-tag> |