mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-07 15:51:04 +08:00
Add product info dialogue
This commit is contained in:
parent
188c9f1af7
commit
bd0c322450
@ -3,6 +3,11 @@ MAINTAINER Hai Liang Wang <hain@chatopera.com>
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG VCS_REF
|
||||
ARG APPLICATION_CUSTOMER_ENTITY
|
||||
ARG APPLICATION_BUILD_DATESTR
|
||||
|
||||
ENV APPLICATION_CUSTOMER_ENTITY=$APPLICATION_CUSTOMER_ENTITY
|
||||
ENV APPLICATION_BUILD_DATESTR=$APPLICATION_BUILD_DATESTR
|
||||
|
||||
LABEL org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vcs-url="https://github.com/chatopera/cosin"
|
||||
|
@ -8,6 +8,8 @@ baseDir=$(cd `dirname "$0"`;pwd)
|
||||
appHome=$baseDir/..
|
||||
registryName=dockerhub.qingcloud.com
|
||||
imagename=chatopera/contact-center
|
||||
TIMESTAMP=`date "+%Y%m%d.%H%M%S"`
|
||||
|
||||
# functions
|
||||
|
||||
# main
|
||||
@ -24,5 +26,7 @@ if [ ! $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
docker build --build-arg VCS_REF=$PACKAGE_VERSION \
|
||||
--build-arg APPLICATION_BUILD_DATESTR=$TIMESTAMP \
|
||||
--build-arg APPLICATION_CUSTOMER_ENTITY=$APPLICATION_CUSTOMER_ENTITY \
|
||||
--no-cache \
|
||||
--force-rm=true --tag $registryName/$imagename:$PACKAGE_VERSION .
|
@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@ -35,6 +36,18 @@ import java.util.TimeZone;
|
||||
public class ApplicationController extends Handler {
|
||||
private final static Logger logger = LoggerFactory.getLogger(ApplicationController.class);
|
||||
|
||||
@Value("${git.build.version}")
|
||||
private String appVersionNumber;
|
||||
|
||||
@Value("${git.commit.id.abbrev}")
|
||||
private String appVersionAbbrev;
|
||||
|
||||
@Value("${application.build.datestr}")
|
||||
private String appBuildDate;
|
||||
|
||||
@Value("${application.customer.entity}")
|
||||
private String appCustomerEntity;
|
||||
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
@ -50,6 +63,13 @@ public class ApplicationController extends Handler {
|
||||
view.addObject("istenantshare", super.isEnabletneant());
|
||||
view.addObject("timeDifference", timezone.getRawOffset());
|
||||
|
||||
|
||||
// 增加版本信息
|
||||
view.addObject("appBuildDate", appBuildDate);
|
||||
view.addObject("appVersionAbbrev", appVersionAbbrev);
|
||||
view.addObject("appVersionNumber", appVersionNumber);
|
||||
view.addObject("appCustomerEntity", appCustomerEntity);
|
||||
|
||||
if (super.isEnabletneant()) {
|
||||
// 多租户启用 非管理员 一定要选择租户才能进入界面
|
||||
if (!logined.isAdmin() && StringUtils.isNotBlank(
|
||||
|
@ -33,6 +33,7 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
@ -49,7 +50,6 @@ import java.util.List;
|
||||
|
||||
@Controller
|
||||
public class AppsController extends Handler {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(AppsController.class);
|
||||
|
||||
@Autowired
|
||||
@ -133,7 +133,6 @@ public class AppsController extends Handler {
|
||||
|
||||
// 获取agentStatus
|
||||
map.put("agentStatus", cache.findOneAgentStatusByAgentnoAndOrig(user.getId(), orgi));
|
||||
|
||||
return request(super.createAppsTempletResponse("/apps/desktop/index"));
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,9 @@
|
||||
|
||||
# 在集群状态下,每个Node都有自己唯一的ID
|
||||
application.node.id=localhost
|
||||
application.build.datestr=PLACEHOLDER
|
||||
application.customer.entity=Trial
|
||||
|
||||
|
||||
##############################################
|
||||
# 安全设置
|
||||
|
@ -175,8 +175,9 @@
|
||||
<span style="display: inline-block;max-width: 90px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float: left">
|
||||
<#if user??>${user.uname!''}<#if tenant??&&tenant.tenantname??>(${tenant.tenantname!''})</#if></#if></span></a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="/apps/profile.html" data-toggle="ajax" data-width="750" data-title="修改资料">个人资料</a></dd>
|
||||
<dd><a href="javascript:void(0)" onclick="quitSystem()" >退出系统</a></dd>
|
||||
<dd><a href="/apps/profile.html" data-toggle="ajax" data-width="750" data-title="修改资料">个人资料</a></dd>
|
||||
<dd><a href="javascript:void(0)" onclick="quitSystem()" >退出系统</a></dd>
|
||||
<dd><a href="javascript:void(0)" onclick="showSystemBuildInfo()">关于产品</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
@ -370,6 +371,16 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 展示系统构建信息
|
||||
function showSystemBuildInfo(){
|
||||
console.log("showSystemBuildInfo")
|
||||
layer.confirm('<div style="text-align:center;"> <img src="/images/favicon.ico" width="50px" height="50px"><p>春松客服<span>®</span></p></div> Release: ${appVersionNumber} <br> Build: ${appBuildDate}.${appVersionAbbrev} <br> Copyright (2018-2019) <a href="https://www.chatopera.com" target="_blank">北京华夏春松科技有限公司</a> <br> Business License applied to ${appCustomerEntity}',
|
||||
{icon: -1, title:'关于产品', btn:["关闭"]}, function(index, layero){
|
||||
//do something
|
||||
console.log("close showSystemBuildInfo");
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
// 登出系统
|
||||
// https://gitlab.chatopera.com/chatopera/cosinee.w4l/issues/291
|
||||
|
Loading…
x
Reference in New Issue
Block a user