1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-07-16 00:22:22 +08:00

enable performance montoring api, fix date format, api request path etc.

This commit is contained in:
Hai Liang Wang 2019-12-08 15:00:38 +08:00
parent 15d0063ec2
commit d84fb8be4c
10 changed files with 59 additions and 10 deletions

View File

@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<version>1.5.10.RELEASE</version>
<relativePath/>
</parent>
<properties>
@ -149,6 +149,24 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Hypermedia for actuator MVC endpoints -->
<!-- https://docs.spring.io/spring-boot/docs/1.5.6.RELEASE/reference/html/production-ready-endpoints.html#production-ready-endpoint-hypermedia -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<!-- Micrometer Prometheus registry -->
<!-- https://www.callicoder.com/spring-boot-actuator-metrics-monitoring-dashboard-prometheus-grafana/ -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>

View File

@ -581,6 +581,8 @@
cache.putAgentStatusByOrgi(agentStatus, orgi);
agentStatusRes.save(agentStatus);
agentStatusProxy.broadcastAgentsStatus(orgi, "agent", "notready", agentStatus.getAgentno());
acdWorkMonitor.recordAgentStatus(agentStatus.getAgentno(),
agentStatus.getUsername(),
agentStatus.getAgentno(),

View File

@ -227,7 +227,9 @@ public class AgentServiceProxy {
/**
* 获取关联数据
*/
processRelaData(logined.getId(), orgi, agentService, map);
if(agentService != null){
processRelaData(logined.getId(), orgi, agentService, map);
}
}

View File

@ -199,4 +199,27 @@ spring.activemq.broker-url=tcp://localhost:61616
spring.activemq.user=admin
spring.activemq.password=admin
spring.activemq.pool.enabled=true
spring.activemq.pool.max-connections=50
spring.activemq.pool.max-connections=50
##############################################
# Actuator 监控数据采集
# https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/html/production-ready-endpoints.html
##############################################
management.context-path=/actuator
endpoints.sensitive=true
endpoints.hypermedia.enabled=true
endpoints.prometheus.enabled=true
endpoints.metrics.enabled=true
endpoints.health.enabled=true
endpoints.info.enabled=true
endpoints.actuator.enabled=true
endpoints.beans.enabled=false
endpoints.auditevents.enabled=false
endpoints.autoconfig.enabled=false
endpoints.env.enabled=false
endpoints.loggers.enabled=false
endpoints.configprops.enabled=false
endpoints.mappings.enabled=false
endpoints.shutdown.enabled=false
endpoints.trace.enabled=false

View File

@ -6,7 +6,7 @@ function sendInvitationToOnlineUser(onlineUserId, isFirstInvite){
if ($("#agentstatus", parent.document).hasClass('layui-form-onswitch') && $("#agentstatus_busy", parent.document).hasClass('layui-form-onswitch-notbusy') && !$("#agentstatus_busy", parent.document).hasClass('layui-form-onswitch-busy') ){
// 就绪状态
restApiRequest({
path: "/apps",
path: "apps",
silent: true,
data: {
ops: "invite",

View File

@ -2,7 +2,7 @@
function checkAgentStatusData() {
var payload = {
silent: true,
path: '/agentuser',
path: 'agentuser',
data: { ops: "inserv" },
};
return restApiRequest(payload);
@ -32,7 +32,7 @@ function handleAgentStatusData(data){
function reAllotOnlineUsers(){
var payload = {
silent: true,
path: '/agentuser',
path: 'agentuser',
data: { ops: "withdraw" },
};
return restApiRequest(payload);

View File

@ -204,7 +204,7 @@
<label class="layui-form-label">手机号:</label>
<div class="layui-input-inline" style="width:auto;">
<div class="layui-input-block">
<input type="text" name="contacts.mobile" id="getdate" autocomplete="off" class="layui-input" lay-verify="entphone">
<input type="text" name="contacts.mobile" autocomplete="off" class="layui-input" lay-verify="entphone">
</div>
</div>
</div>
@ -278,7 +278,7 @@
var laydate = layui.laydate;
var date = {
min : '2010-01-01 00:00:00',
min : '1950-01-01 00:00:00',
max : laydate.now(),
istoday : false
};

View File

@ -170,7 +170,9 @@ word-break: break-all;"><#if curagentuser??>${curagentuser.username!''}<#if cura
<h1 class="site-h1" style="background-color:#EEEEEE;">
访问信息
<div style="float:right;">
<#if user?? && user.admin?? && user.admin == true>
<button class="layui-btn layui-btn-small layui-btn-radius layui-btn-danger" href="/apps/cca/blacklist/add.html?userid=${curagentuser.userid!''}&agentserviceid=${curagentuser.agentserviceid!''}&agentuserid=${curagentuser.id}&times=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0</#if>" data-toggle="ajax" data-title="拉黑访客" data-width="900">拉黑访客</button>
</#if>
</div>
</h1>
</div>

View File

@ -492,7 +492,9 @@
chat = data.message;
if(data.msgtype == "image"){
chat = "<a href='"+data.message+"&original=true' target='_blank'><img src='"+data.message+"' class='ukefu-media-image'/></a>" ;
}else if(data.msgtype == "cooperation"){
}else if(data.msgtype == "file"){
chat = "<div class='ukefu-message-file'><div class='ukefu-file-icon'><img src='/im/img/file.png'></div><div class='ukefu-file-desc'><a href='"+data.message+"' target='_blank'><div>"+data.filename+"</div><div>"+(data.filesize/1024).toFixed(3)+"Kb</div></a></div></div>" ;
}else if(data.msgtype == "cooperation"){
chat = "<a href='javascript:void(0)' onclick='acceptInvite(\""+data.message+"\", \""+data.attachmentid+"\")'>您收到一个协作邀请,点击进入协作</a>" ;
}else if(data.msgtype == "action"){
//检查访客是否在协作页面上,如果在协作页面上,就开始执行重绘,否则不做处理

View File

@ -62,7 +62,7 @@
邀请
</a>
</#if>
<a href="/service/current/end.html?id=${agentService.id!''}" data-toggle="tip" data-title="关闭对话将会强制终端坐席和访客的对话,请确认是否关闭?" style="margin-left:10px;">
<a href="/service/current/end.html?id=${agentService.id!''}" data-toggle="tip" data-title="关闭对话将会强制中断坐席和访客的对话,请确认是否关闭?" style="margin-left:10px;">
<i class="kfont">&#xe609;</i>
关闭
</a>