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:
parent
15d0063ec2
commit
d84fb8be4c
@ -10,7 +10,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.5.6.RELEASE</version>
|
<version>1.5.10.RELEASE</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
@ -149,6 +149,24 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
@ -581,6 +581,8 @@
|
|||||||
cache.putAgentStatusByOrgi(agentStatus, orgi);
|
cache.putAgentStatusByOrgi(agentStatus, orgi);
|
||||||
agentStatusRes.save(agentStatus);
|
agentStatusRes.save(agentStatus);
|
||||||
|
|
||||||
|
agentStatusProxy.broadcastAgentsStatus(orgi, "agent", "notready", agentStatus.getAgentno());
|
||||||
|
|
||||||
acdWorkMonitor.recordAgentStatus(agentStatus.getAgentno(),
|
acdWorkMonitor.recordAgentStatus(agentStatus.getAgentno(),
|
||||||
agentStatus.getUsername(),
|
agentStatus.getUsername(),
|
||||||
agentStatus.getAgentno(),
|
agentStatus.getAgentno(),
|
||||||
|
@ -227,7 +227,9 @@ public class AgentServiceProxy {
|
|||||||
/**
|
/**
|
||||||
* 获取关联数据
|
* 获取关联数据
|
||||||
*/
|
*/
|
||||||
processRelaData(logined.getId(), orgi, agentService, map);
|
if(agentService != null){
|
||||||
|
processRelaData(logined.getId(), orgi, agentService, map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,4 +199,27 @@ spring.activemq.broker-url=tcp://localhost:61616
|
|||||||
spring.activemq.user=admin
|
spring.activemq.user=admin
|
||||||
spring.activemq.password=admin
|
spring.activemq.password=admin
|
||||||
spring.activemq.pool.enabled=true
|
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
|
@ -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') ){
|
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({
|
restApiRequest({
|
||||||
path: "/apps",
|
path: "apps",
|
||||||
silent: true,
|
silent: true,
|
||||||
data: {
|
data: {
|
||||||
ops: "invite",
|
ops: "invite",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
function checkAgentStatusData() {
|
function checkAgentStatusData() {
|
||||||
var payload = {
|
var payload = {
|
||||||
silent: true,
|
silent: true,
|
||||||
path: '/agentuser',
|
path: 'agentuser',
|
||||||
data: { ops: "inserv" },
|
data: { ops: "inserv" },
|
||||||
};
|
};
|
||||||
return restApiRequest(payload);
|
return restApiRequest(payload);
|
||||||
@ -32,7 +32,7 @@ function handleAgentStatusData(data){
|
|||||||
function reAllotOnlineUsers(){
|
function reAllotOnlineUsers(){
|
||||||
var payload = {
|
var payload = {
|
||||||
silent: true,
|
silent: true,
|
||||||
path: '/agentuser',
|
path: 'agentuser',
|
||||||
data: { ops: "withdraw" },
|
data: { ops: "withdraw" },
|
||||||
};
|
};
|
||||||
return restApiRequest(payload);
|
return restApiRequest(payload);
|
||||||
|
@ -204,7 +204,7 @@
|
|||||||
<label class="layui-form-label">手机号:</label>
|
<label class="layui-form-label">手机号:</label>
|
||||||
<div class="layui-input-inline" style="width:auto;">
|
<div class="layui-input-inline" style="width:auto;">
|
||||||
<div class="layui-input-block">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -278,7 +278,7 @@
|
|||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
|
|
||||||
var date = {
|
var date = {
|
||||||
min : '2010-01-01 00:00:00',
|
min : '1950-01-01 00:00:00',
|
||||||
max : laydate.now(),
|
max : laydate.now(),
|
||||||
istoday : false
|
istoday : false
|
||||||
};
|
};
|
||||||
|
@ -170,7 +170,9 @@ word-break: break-all;"><#if curagentuser??>${curagentuser.username!''}<#if cura
|
|||||||
<h1 class="site-h1" style="background-color:#EEEEEE;">
|
<h1 class="site-h1" style="background-color:#EEEEEE;">
|
||||||
访问信息
|
访问信息
|
||||||
<div style="float:right;">
|
<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}×=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0</#if>" data-toggle="ajax" data-title="拉黑访客" data-width="900">拉黑访客</button>
|
<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}×=${serviceCount!0}&chattime=<#if onlineUser?? && onlineUser.betweentime??>${onlineUser.betweentime}<#else>0</#if>" data-toggle="ajax" data-title="拉黑访客" data-width="900">拉黑访客</button>
|
||||||
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -492,7 +492,9 @@
|
|||||||
chat = data.message;
|
chat = data.message;
|
||||||
if(data.msgtype == "image"){
|
if(data.msgtype == "image"){
|
||||||
chat = "<a href='"+data.message+"&original=true' target='_blank'><img src='"+data.message+"' class='ukefu-media-image'/></a>" ;
|
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>" ;
|
chat = "<a href='javascript:void(0)' onclick='acceptInvite(\""+data.message+"\", \""+data.attachmentid+"\")'>您收到一个协作邀请,点击进入协作</a>" ;
|
||||||
}else if(data.msgtype == "action"){
|
}else if(data.msgtype == "action"){
|
||||||
//检查访客是否在协作页面上,如果在协作页面上,就开始执行重绘,否则不做处理
|
//检查访客是否在协作页面上,如果在协作页面上,就开始执行重绘,否则不做处理
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
邀请
|
邀请
|
||||||
</a>
|
</a>
|
||||||
</#if>
|
</#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"></i>
|
<i class="kfont"></i>
|
||||||
关闭
|
关闭
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user