| | |
| | | /** |
| | | * git的全版本号 |
| | | */ |
| | | @JSONField(name="GIT-Revision") |
| | | @JSONField(name="GIT_Revision") |
| | | private String GIT_Revision; |
| | | /** |
| | | * maven版本 |
| | | */ |
| | | @JSONField(name = "Create-By") |
| | | @JSONField(name = "Create_By") |
| | | private String Create_By; |
| | | /** |
| | | * git的分支 |
| | | */ |
| | | @JSONField(name = "GIT-BRANCH") |
| | | @JSONField(name = "GIT_BRANCH") |
| | | private String GIT_BRANCH; |
| | | /** |
| | | * git的url |
| | | */ |
| | | @JSONField(name = "GIT-URL") |
| | | @JSONField(name = "GIT_URL") |
| | | private String GIT_URL; |
| | | /** |
| | | * 构建日期 |
| | | */ |
| | | @JSONField(name = "BUILD-DATE") |
| | | @JSONField(name = "BUILD_DATE") |
| | | private String BUILD_DATE; |
| | | /** |
| | | * 构建日期 |
| | | */ |
| | | @JSONField(name = "GIT_DATE") |
| | | private String GIT_DATE; |
| | | /** |
| | | * 项目名称 配合pom使用 |
| | | */ |
| | |
| | | /** |
| | | * git局部版本号 |
| | | */ |
| | | @JSONField(name = "GIT-Revision-SHORT") |
| | | @JSONField(name = "GIT_Revision_SHORT") |
| | | private String GIT_Revision_SHORT; |
| | | /** |
| | | * 项目的版本如2.0.1.0 配合pom使用 |
| | |
| | | public String getBuild_Jdk() { |
| | | return Build_Jdk; |
| | | } |
| | | |
| | | public String getGIT_DATE() { |
| | | return GIT_DATE; |
| | | } |
| | | |
| | | public void setGIT_DATE(String GIT_DATE) { |
| | | this.GIT_DATE = GIT_DATE; |
| | | } |
| | | } |
| | |
| | | versionPo.setBUILD_DATE(gitUtil.getBuildDate()); |
| | | versionPo.setGIT_Revision_SHORT(gitUtil.getCommitIdShort()); |
| | | versionPo.setVersion(gitUtil.getBuildVersion()); |
| | | versionPo.setGIT_DATE(gitUtil.getCommitTime()); |
| | | |
| | | return versionPo; |
| | | } |
| | |
| | | |
| | | @Value("${git.branch:}") |
| | | private String branch; |
| | | @Value("${git.commit.id.abbrev:}") |
| | | @Value("${git.commit.id:}") |
| | | private String gitCommitId; |
| | | @Value("${git.remote.origin.url:}") |
| | | private String gitUrl; |
New file |
| | |
| | | package com.genersoft.iot.vmp.vmanager.bean; |
| | | |
| | | import com.genersoft.iot.vmp.common.VersionPo; |
| | | import com.genersoft.iot.vmp.conf.SipConfig; |
| | | import com.genersoft.iot.vmp.conf.UserSetting; |
| | | import com.genersoft.iot.vmp.conf.VersionInfo; |
| | | |
| | | public class SystemConfigInfo { |
| | | |
| | | private int serverPort; |
| | | private SipConfig sip; |
| | | private UserSetting addOn; |
| | | private VersionPo version; |
| | | |
| | | public int getServerPort() { |
| | | return serverPort; |
| | | } |
| | | |
| | | public void setServerPort(int serverPort) { |
| | | this.serverPort = serverPort; |
| | | } |
| | | |
| | | public SipConfig getSip() { |
| | | return sip; |
| | | } |
| | | |
| | | public void setSip(SipConfig sip) { |
| | | this.sip = sip; |
| | | } |
| | | |
| | | public UserSetting getAddOn() { |
| | | return addOn; |
| | | } |
| | | |
| | | public void setAddOn(UserSetting addOn) { |
| | | this.addOn = addOn; |
| | | } |
| | | |
| | | public VersionPo getVersion() { |
| | | return version; |
| | | } |
| | | |
| | | public void setVersion(VersionPo version) { |
| | | this.version = version; |
| | | } |
| | | } |
| | | |
| | |
| | | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo; |
| | | import com.genersoft.iot.vmp.vmanager.bean.ResourceInfo; |
| | | import com.genersoft.iot.vmp.vmanager.bean.SystemConfigInfo; |
| | | import gov.nist.javax.sip.SipStackImpl; |
| | | |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | }); |
| | | }; |
| | | |
| | | @Operation(summary = "获取系统信息信息") |
| | | @GetMapping(value = "/system/configInfo") |
| | | @ResponseBody |
| | | public SystemConfigInfo getConfigInfo() { |
| | | SystemConfigInfo systemConfigInfo = new SystemConfigInfo(); |
| | | systemConfigInfo.setVersion(versionInfo.getVersion()); |
| | | systemConfigInfo.setSip(sipConfig); |
| | | systemConfigInfo.setAddOn(userSetting); |
| | | systemConfigInfo.setServerPort(serverPort); |
| | | return systemConfigInfo; |
| | | } |
| | | |
| | | @Operation(summary = "获取版本信息") |
| | | @GetMapping(value = "/version") |
| | | @ResponseBody |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <configInfo ref="configInfo"></configInfo> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import consoleNodeLoad from './console/ConsoleNodeLoad.vue' |
| | | import consoleDisk from './console/ConsoleDisk.vue' |
| | | import consoleResource from './console/ConsoleResource.vue' |
| | | import configInfo from './dialog/configInfo.vue' |
| | | |
| | | import echarts from 'echarts'; |
| | | |
| | |
| | | consoleNodeLoad, |
| | | consoleDisk, |
| | | consoleResource, |
| | | configInfo, |
| | | }, |
| | | data() { |
| | | return { |
| | | timer: null |
| | | timer: null, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | showInfo: function (){ |
| | | |
| | | this.$axios({ |
| | | method: 'get', |
| | | url: `/api/server/system/configInfo`, |
| | | }).then( (res)=> { |
| | | console.log(res) |
| | | if (res.data.code === 0) { |
| | | console.log(2222) |
| | | console.log(this.$refs.configInfo) |
| | | this.$refs.configInfo.openDialog(res.data.data) |
| | | } |
| | | }).catch( (error)=> { |
| | | }); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <template> |
| | | <div id="configInfo"> |
| | | <el-dialog |
| | | title="系统信息" |
| | | width="=80%" |
| | | top="2rem" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="showDialog" |
| | | :destroy-on-close="true" |
| | | @close="close()" |
| | | > |
| | | <div id="shared" style="margin-top: 1rem;margin-right: 100px;"> |
| | | <el-descriptions title="国标服务信息" v-if="configInfoData.sip" :span="2"> |
| | | <el-descriptions-item label="编号" >{{configInfoData.sip.id}}</el-descriptions-item> |
| | | <el-descriptions-item label="域">{{configInfoData.sip.domain}}</el-descriptions-item> |
| | | <el-descriptions-item label="IP">{{configInfoData.sip.ip}}</el-descriptions-item> |
| | | <el-descriptions-item label="端口">{{configInfoData.sip.port}}</el-descriptions-item> |
| | | <el-descriptions-item label="密码"> |
| | | <el-tag size="small">{{configInfoData.sip.password}}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-descriptions title="版本信息"v-if="configInfoData.sip"> |
| | | <el-descriptions-item label="版本">{{configInfoData.version.version}}</el-descriptions-item> |
| | | <el-descriptions-item label="编译时间">{{configInfoData.version.BUILD_DATE}}</el-descriptions-item> |
| | | <el-descriptions-item label="GIT版本">{{configInfoData.version.GIT_Revision_SHORT}}</el-descriptions-item> |
| | | <el-descriptions-item label="GIT最后提交时间">{{configInfoData.version.GIT_DATE}}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "configInfo", |
| | | props: {}, |
| | | computed: {}, |
| | | created() {}, |
| | | data() { |
| | | return { |
| | | showDialog: false, |
| | | configInfoData: { |
| | | sip:{}, |
| | | |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | openDialog: function (data) { |
| | | console.log(data) |
| | | this.showDialog = true; |
| | | this.configInfoData = data; |
| | | }, |
| | | close: function () { |
| | | this.showDialog = false; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |