完善monitor
This commit is contained in:
parent
45d58895cf
commit
1e51780331
@ -33,12 +33,12 @@
|
||||
|
||||
.resu {
|
||||
margin-left: 360px;
|
||||
width: 1160px;
|
||||
width: 1152px;
|
||||
min-height: 700px;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 1100px;
|
||||
width: 1152px;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
@ -97,11 +97,11 @@
|
||||
<el-table :data="data.groupData" :default-sort = "{prop: 'total', order: 'descending'}" @sort-change="sortChange" height="700" >
|
||||
<el-table-column label="IP" prop="ip" v-if="query.groupBy === 'ip'" width="120"></el-table-column>
|
||||
<el-table-column label="接口" prop="interfaceName" v-if="query.groupBy === 'name'" width="230"></el-table-column>
|
||||
<el-table-column label="数量" prop="total" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="失败" prop="failure" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="平均" prop="averageTime" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="最大" prop="maxTime" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="最小" prop="minTime" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="数量" prop="total" width="78" sortable='custom'></el-table-column>
|
||||
<el-table-column label="失败" prop="failure" width="78" sortable='custom'></el-table-column>
|
||||
<el-table-column label="平均" prop="averageTime" width="78" sortable='custom'></el-table-column>
|
||||
<el-table-column label="最大" prop="maxTime" width="78" sortable='custom'></el-table-column>
|
||||
<el-table-column label="最小" prop="minTime" width="78" sortable='custom'></el-table-column>
|
||||
<el-table-column label="10ms" prop="over10ms" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="50ms" prop="over50ms" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="100ms" prop="over100ms" width="88" sortable='custom'></el-table-column>
|
||||
@ -307,7 +307,7 @@
|
||||
},
|
||||
async groupData() {
|
||||
let groupData = await API.groupData(this.query.host, this.query);
|
||||
// groupData = groupData.filter(data => data.interfaceName && data.interfaceName.indexOf('/admin/monitor') === -1);
|
||||
groupData = groupData.filter(data => data.interfaceName && data.interfaceName.indexOf('/admin/monitor') === -1);
|
||||
this.data.groupData = groupData;
|
||||
this.data.showLine = false;
|
||||
this.data.showTable = true;
|
||||
@ -324,14 +324,6 @@
|
||||
this.init();
|
||||
},
|
||||
watch: {
|
||||
// 'query.host': async function (newVal) {
|
||||
// if (this.interval) {
|
||||
// clearTimeout(this.interval)
|
||||
// }
|
||||
// this.interval = setTimeout(async () => {
|
||||
// this.init();
|
||||
// }, 100);
|
||||
// },
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -68,8 +68,8 @@ public class CacheConfig {
|
||||
configMap.put(GROUP, new LocalMapConfig(10000, 300));
|
||||
configMap.put(WX_USER, new LocalMapConfig(10000, 3600));
|
||||
|
||||
configMap.put(VIDEO_ONLINE_USER, new LocalMapConfig(1000000, 604800, InMemoryFormat.OBJECT));
|
||||
configMap.put(GROUP_ONLINE_USER, new LocalMapConfig(1000000, 604800, InMemoryFormat.OBJECT));
|
||||
configMap.put(VIDEO_ONLINE_USER, new LocalMapConfig(1000000, 172800, InMemoryFormat.OBJECT));
|
||||
configMap.put(GROUP_ONLINE_USER, new LocalMapConfig(1000000, 172800, InMemoryFormat.OBJECT));
|
||||
|
||||
return configMap;
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class OnlineUserService {
|
||||
|
||||
public Set<String> getOnlineUserIds(Integer productType, Integer productId) {
|
||||
String cacheName = getOnlineCacheName(productType);
|
||||
String sql = "SELECT distinct userId FROM " + cacheName + " WHERE productId = " + productId;
|
||||
String sql = "SELECT distinct userId FROM " + cacheName + " WHERE productId = " + productId + " and isOnline = 1";
|
||||
SqlResult result = hazelcastInstance.getSql().execute(sql);
|
||||
Set<String> set = new HashSet<>();
|
||||
for (SqlRow row : result) {
|
||||
|
||||
@ -7,8 +7,6 @@ import cn.hutool.crypto.SecureUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.syzb.common.handler.BizException;
|
||||
import com.syzb.common.result.ResponseStatus;
|
||||
@ -22,7 +20,10 @@ import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user