...
|
...
|
@@ -18,10 +18,9 @@ export default { |
|
|
sortBy:'dbTime',
|
|
|
scopeBy:'dbTimeStr.keyword',
|
|
|
keyword: '',
|
|
|
type:'syslog',
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
dateTime:[],
|
|
|
dateTime:'',
|
|
|
resType:'',
|
|
|
});
|
|
|
let dialog = Vue.ref({
|
...
|
...
|
@@ -39,21 +38,21 @@ export default { |
|
|
label: '采集时间',
|
|
|
sortable: true,
|
|
|
align: 'center',
|
|
|
width: '250',
|
|
|
width: '150',
|
|
|
},
|
|
|
{
|
|
|
prop: 'dbTime',
|
|
|
prop: 'dbTimeStr',
|
|
|
label: '入库时间',
|
|
|
sortable: true,
|
|
|
align: 'center',
|
|
|
width: '250'
|
|
|
width: '150'
|
|
|
},
|
|
|
{
|
|
|
prop: 'kpiValue',
|
|
|
label: '采集值',
|
|
|
sortable: true,
|
|
|
align: 'center',
|
|
|
width: '200'
|
|
|
width: '100'
|
|
|
},
|
|
|
{
|
|
|
prop: 'taskName',
|
...
|
...
|
@@ -80,7 +79,7 @@ export default { |
|
|
label: '扩展信息',
|
|
|
sortable: true,
|
|
|
align: 'center',
|
|
|
width: '200',
|
|
|
width: '260',
|
|
|
render:function (row){
|
|
|
return `<pre>${row.ext}</pre>`
|
|
|
}
|
...
|
...
|
@@ -89,9 +88,12 @@ export default { |
|
|
label: '异常信息',
|
|
|
sortable: true,
|
|
|
align: 'center',
|
|
|
width:'500',
|
|
|
render:function (row){
|
|
|
return `<pre>${row.message}</pre>`
|
|
|
let str=JSON.stringify(JSON.parse(row.message))
|
|
|
return `<pre>${str}</pre>`
|
|
|
}
|
|
|
|
|
|
}
|
|
|
]
|
|
|
})
|
...
|
...
|
@@ -125,10 +127,13 @@ export default { |
|
|
let getDataList = () => {
|
|
|
let nowDate=getDateTime(new Date());
|
|
|
let dateStr='';
|
|
|
let type='collector';
|
|
|
if(kpiIdent.value==1){
|
|
|
dateStr='monitor-performance_';
|
|
|
type='performance';
|
|
|
}else{
|
|
|
dateStr='monitor-collector_';
|
|
|
type='collector';
|
|
|
}
|
|
|
if(search.value.dateTime){
|
|
|
dateStr+=search.value.dateTime;
|
...
|
...
|
@@ -137,16 +142,12 @@ export default { |
|
|
}
|
|
|
|
|
|
let params={
|
|
|
resId:resId.value,
|
|
|
kpiId:search.value.kpiId,
|
|
|
flag:search.value.flag,
|
|
|
indexName:dateStr,
|
|
|
pageNum: search.value.pageNum,
|
|
|
pageSize: search.value.pageSize,
|
|
|
type:search.value.type,
|
|
|
type:type,
|
|
|
sortBy:search.value.sortBy,
|
|
|
scopeBy:search.value.scopeBy,
|
|
|
resType:search.value.resType,
|
|
|
param:{}
|
|
|
}
|
|
|
if(search.value.keyword){
|
...
|
...
|
@@ -156,9 +157,15 @@ export default { |
|
|
'message.keyword':search.value.keyword,
|
|
|
}
|
|
|
}
|
|
|
if(resId.value){
|
|
|
params['param']['resId.keyword']=resId.value;
|
|
|
}
|
|
|
if(search.value.kpiId){
|
|
|
params['param']['kpiId.keyword']=search.value.kpiId;
|
|
|
}
|
|
|
if(search.value.flag){
|
|
|
params['param']['flag.keyword']=search.value.flag;
|
|
|
}
|
|
|
proxy.$http.post(`/api-web/esData/list`, params, function (res) {
|
|
|
if (res && res.object) {
|
|
|
let dataList=res.object.content;
|
...
|
...
|
@@ -172,6 +179,9 @@ export default { |
|
|
tableData.value.dataList = [];
|
|
|
tableData.value.count = 0;
|
|
|
}
|
|
|
/* tableData.value.dataList=[{
|
|
|
message:dataJSON('{"resId":"4044b7e0f1344aefb80c89018b2a52a5","kpiId":"","indexName":"monitor-collector_2022-04-19","pageNum":1,"pageSize":20,"type":"syslog","sortBy":"dbTime","scopeBy":"dbTimeStr.keyword","resType":"","param":{"resId":"4044b7e0f1344aefb80c89018b2a52a5","kpiId":""}}')
|
|
|
}]*/
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
@@ -203,7 +213,10 @@ export default { |
|
|
//指标数据
|
|
|
let kpiData=Vue.ref([]);
|
|
|
let getKpiData=()=>{
|
|
|
proxy.$http.post(`/api-web/manage/ddic/findSucDdics/LOG_SOURCE_TYPE`, {}, function (res) {
|
|
|
let param={
|
|
|
resId:resId.value,
|
|
|
}
|
|
|
proxy.$http.get(`/api-web/ping/getKpi`, param, function (res) {
|
|
|
if (res && res.data) {
|
|
|
kpiData.value = res.data;
|
|
|
}
|
...
|
...
|
@@ -212,7 +225,11 @@ export default { |
|
|
//flag数据
|
|
|
let flagData=Vue.ref([]);
|
|
|
let getFlagData=()=>{
|
|
|
proxy.$http.post(`/api-web/manage/ddic/findSucDdics/LOG_SOURCE_TYPE?kpiId=`+search.kpiId+'&resId='+resId.value, {}, function (res) {
|
|
|
let param={
|
|
|
resId:resId.value,
|
|
|
kpiId:search.value.kpiId
|
|
|
}
|
|
|
proxy.$http.get(`/api-web/ping/getKpi`, param, function (res) {
|
|
|
if (res && res.data) {
|
|
|
flagData.value = res.data;
|
|
|
}
|
...
|
...
|
@@ -220,6 +237,11 @@ export default { |
|
|
}
|
|
|
//指标改变事件
|
|
|
let kpiChange=(val)=>{
|
|
|
kpiData.value.map(item=>{
|
|
|
if(val==item.kpiId){
|
|
|
kpiIdent.value=item.kpiIdent;
|
|
|
}
|
|
|
})
|
|
|
getFlagData();
|
|
|
}
|
|
|
let detail=Vue.ref({})
|
...
|
...
|
@@ -229,6 +251,11 @@ export default { |
|
|
resId.value=proxy.$route.query.resId;
|
|
|
|
|
|
}
|
|
|
//json格式化方法
|
|
|
let dataJSON=(val)=>{
|
|
|
let str=val.trim()
|
|
|
return JSON.parse(str);
|
|
|
}
|
|
|
// 挂载完
|
|
|
Vue.onMounted(() => {
|
|
|
getResId();
|
...
|
...
|
@@ -238,6 +265,7 @@ export default { |
|
|
|
|
|
|
|
|
return {
|
|
|
dataJSON,
|
|
|
resId,
|
|
|
getResId,
|
|
|
detail,
|
...
|
...
|
|