Log Error Check UI

Change-Id: I749c784b3b105c681fdc9bdb0993362e74be6e60
This commit is contained in:
cuizc 2023-12-22 10:06:47 +08:00
parent d20e71453a
commit 474ae1ade5
2 changed files with 34 additions and 18 deletions

View File

@ -32,18 +32,24 @@
$scope.getChart3();
};
$scope.getChart1 = function () {
debugger
var config1 = {
start_time: $scope.model.start_time.getTime() / 1000,
end_time: $scope.model.end_time.getTime() / 1000,
type: 'error_stats'
};
venusSrv.getError(config1).then(function (res) {
if (res.data.stats.length()>0) {
res.data.stats.forEach(i => {
$scope.chart1.componentList.push(i)
if (res.data.data.stats.length>0) {
res.data.data.stats.forEach(i => {
let keyArray1 = i.key.split('/');
$scope.chart1.componentList.push(keyArray1[3])
});
$scope.chart1.componentList.unshift("all");
$scope.chart1.chartData = res.data.stats;
//
var obj1 = document.getElementById("selectPicker1");
for (var i=0;i<$scope.chart1.componentList.length;i++) {
obj1.add(new Option($scope.chart1.componentList[i],$scope.chart1.componentList[i]));
}
$scope.chart1.chartData = res.data.data && res.data.data.stats[0].count;
}
$scope.updateChart('svg1');
});
@ -55,12 +61,17 @@
type: 'rabbitmq_error_stats'
};
venusSrv.getError(config2).then(function (res) {
if (res.data.stats.length()>0) {
res.data.stats.forEach(i => {
$scope.chart2.componentList.push(i.key)
if (res.data.data.stats.length>0) {
res.data.data.stats.forEach(i => {
let keyArray2 = i.key.split('/');
$scope.chart2.componentList.push(keyArray2[3])
});
$scope.chart2.componentList.unshift('全部')
$scope.chart2.chartData = res.data.stats;
//
var obj2 = document.getElementById("selectPicker2");
for (var j=0;i<$scope.chart2.componentList.length;i++) {
obj2.add(new Option($scope.chart2.componentList[j], $scope.chart2.componentList[j]));
}
$scope.chart2.chartData = res.data.data && res.data.data.stats[0].count;
}
$scope.updateChart('svg2');
});
@ -72,12 +83,17 @@
type: 'mysql_error_stats'
};
venusSrv.getError(config3).then(function (res) {
if (res.data.stats.length()>0) {
res.data.stats.forEach(i => {
$scope.chart3.componentList.push(i.key)
if (res.data.data.stats.length>0) {
res.data.data.stats.forEach(i => {
let keyArray3 = i.key.split('/');
$scope.chart3.componentList.push(keyArray3[3])
});
$scope.chart3.componentList.unshift('全部')
$scope.chart3.chartData = res.data.stats;
//
var obj3 = document.getElementById("selectPicker3");
for (var k=0;i<$scope.chart3.componentList.length;i++) {
obj3.add(new Option($scope.chart3.componentList[k], $scope.chart3.componentList[k]));
}
$scope.chart3.chartData = res.data.data && res.data.data.stats[0].count;
}
$scope.updateChart('svg3');
});

View File

@ -18,7 +18,7 @@
</div>
<div>
<span>主要组件调用错误</span>
<select class="selectPicker1" id="chart1">
<select id="selectPicker1">
</select>
</div>
<div class="venus-chart-wrapper">
@ -26,7 +26,7 @@
</div>
<div>
<span>主要组件RabbitMQ调用错误</span>
<select class="selectPicker2" id="chart2">
<select id="selectPicker2">
</select>
</div>
<div class="venus-chart-wrapper">
@ -34,7 +34,7 @@
</div>
<div>
<span>主要组件MySQL调用错误</span>
<select class="selectPicker3" id="chart3" >
<select id="selectPicker3" >
</select>
</div>
<div class="venus-chart-wrapper">