mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-11 20:17:03 +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 DEBIAN_FRONTEND=noninteractive
|
||||||
ARG VCS_REF
|
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 \
|
LABEL org.label-schema.vcs-ref=$VCS_REF \
|
||||||
org.label-schema.vcs-url="https://github.com/chatopera/cosin"
|
org.label-schema.vcs-url="https://github.com/chatopera/cosin"
|
||||||
|
@ -8,6 +8,8 @@ baseDir=$(cd `dirname "$0"`;pwd)
|
|||||||
appHome=$baseDir/..
|
appHome=$baseDir/..
|
||||||
registryName=dockerhub.qingcloud.com
|
registryName=dockerhub.qingcloud.com
|
||||||
imagename=chatopera/contact-center
|
imagename=chatopera/contact-center
|
||||||
|
TIMESTAMP=`date "+%Y%m%d.%H%M%S"`
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
# main
|
# main
|
||||||
@ -24,5 +26,7 @@ if [ ! $? -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
docker build --build-arg VCS_REF=$PACKAGE_VERSION \
|
docker build --build-arg VCS_REF=$PACKAGE_VERSION \
|
||||||
|
--build-arg APPLICATION_BUILD_DATESTR=$TIMESTAMP \
|
||||||
|
--build-arg APPLICATION_CUSTOMER_ENTITY=$APPLICATION_CUSTOMER_ENTITY \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--force-rm=true --tag $registryName/$imagename:$PACKAGE_VERSION .
|
--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.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
@ -35,6 +36,18 @@ import java.util.TimeZone;
|
|||||||
public class ApplicationController extends Handler {
|
public class ApplicationController extends Handler {
|
||||||
private final static Logger logger = LoggerFactory.getLogger(ApplicationController.class);
|
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
|
@Autowired
|
||||||
private Cache cache;
|
private Cache cache;
|
||||||
|
|
||||||
@ -50,6 +63,13 @@ public class ApplicationController extends Handler {
|
|||||||
view.addObject("istenantshare", super.isEnabletneant());
|
view.addObject("istenantshare", super.isEnabletneant());
|
||||||
view.addObject("timeDifference", timezone.getRawOffset());
|
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 (super.isEnabletneant()) {
|
||||||
// 多租户启用 非管理员 一定要选择租户才能进入界面
|
// 多租户启用 非管理员 一定要选择租户才能进入界面
|
||||||
if (!logined.isAdmin() && StringUtils.isNotBlank(
|
if (!logined.isAdmin() && StringUtils.isNotBlank(
|
||||||
|
@ -33,6 +33,7 @@ import org.apache.commons.lang.StringUtils;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.Page;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
@ -49,7 +50,6 @@ import java.util.List;
|
|||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class AppsController extends Handler {
|
public class AppsController extends Handler {
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(AppsController.class);
|
private final static Logger logger = LoggerFactory.getLogger(AppsController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -133,7 +133,6 @@ public class AppsController extends Handler {
|
|||||||
|
|
||||||
// 获取agentStatus
|
// 获取agentStatus
|
||||||
map.put("agentStatus", cache.findOneAgentStatusByAgentnoAndOrig(user.getId(), orgi));
|
map.put("agentStatus", cache.findOneAgentStatusByAgentnoAndOrig(user.getId(), orgi));
|
||||||
|
|
||||||
return request(super.createAppsTempletResponse("/apps/desktop/index"));
|
return request(super.createAppsTempletResponse("/apps/desktop/index"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
|
|
||||||
# 在集群状态下,每个Node都有自己唯一的ID
|
# 在集群状态下,每个Node都有自己唯一的ID
|
||||||
application.node.id=localhost
|
application.node.id=localhost
|
||||||
|
application.build.datestr=PLACEHOLDER
|
||||||
|
application.customer.entity=Trial
|
||||||
|
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# 安全设置
|
# 安全设置
|
||||||
|
@ -177,6 +177,7 @@
|
|||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd><a href="/apps/profile.html" data-toggle="ajax" data-width="750" data-title="修改资料">个人资料</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="quitSystem()" >退出系统</a></dd>
|
||||||
|
<dd><a href="javascript:void(0)" onclick="showSystemBuildInfo()">关于产品</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -370,6 +371,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<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
|
// https://gitlab.chatopera.com/chatopera/cosinee.w4l/issues/291
|
||||||
|
Loading…
x
Reference in New Issue
Block a user