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 | 4 | import org.junit.jupiter.api.Order; |
| 5 | 5 | import org.springframework.boot.context.properties.ConfigurationProperties; |
| 6 | 6 | import org.springframework.stereotype.Component; |
| 7 | -import org.springframework.util.ObjectUtils; | |
| 8 | 7 | |
| 9 | 8 | @Component |
| 10 | 9 | @ConfigurationProperties(prefix = "sip", ignoreInvalidFields = true) |
| ... | ... | @@ -13,6 +12,8 @@ public class SipConfig { |
| 13 | 12 | |
| 14 | 13 | private String ip; |
| 15 | 14 | |
| 15 | + private String showIp; | |
| 16 | + | |
| 16 | 17 | private Integer port; |
| 17 | 18 | |
| 18 | 19 | private String domain; |
| ... | ... | @@ -96,9 +97,14 @@ public class SipConfig { |
| 96 | 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 | 65 | |
| 66 | 66 | # 作为28181服务器的配置 |
| 67 | 67 | sip: |
| 68 | - # [必须修改] 本机的IP, 必须是网卡上的IP,用于sip下协议栈监听ip,如果监听所有设置为0.0.0.0 | |
| 69 | - monitor-ip: 0.0.0.0 | |
| 70 | 68 | # [必须修改] 本机的IP |
| 71 | 69 | ip: 192.168.0.100 |
| 70 | + # [可选] 没有任何业务需求,仅仅是在前端展示的时候用 | |
| 71 | + show-ip: 192.168.0.100 | |
| 72 | 72 | # [可选] 28181服务监听的端口 |
| 73 | 73 | port: 5060 |
| 74 | 74 | # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) | ... | ... |
web_src/src/components/dialog/configInfo.vue
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <el-descriptions title="国标服务信息" v-if="configInfoData.sip" :span="2"> |
| 14 | 14 | <el-descriptions-item label="编号" >{{configInfoData.sip.id}}</el-descriptions-item> |
| 15 | 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 | 17 | <el-descriptions-item label="端口">{{configInfoData.sip.port}}</el-descriptions-item> |
| 18 | 18 | <el-descriptions-item label="密码"> |
| 19 | 19 | <el-tag size="small">{{configInfoData.sip.password}}</el-tag> | ... | ... |