|
@@ -113,7 +113,7 @@
|
|
|
<div class="interface-box">
|
|
|
<h6 class="h6">慢接口TOP5</h6>
|
|
|
<el-table
|
|
|
- v-loading="loading"
|
|
|
+ v-loading="loading3"
|
|
|
:data="slowTopList"
|
|
|
@row-click="handleRowClickInterFace"
|
|
|
>
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
serviceBarObj: {},
|
|
|
timer: null,
|
|
|
slowTopQuery: {
|
|
|
- app_id: 0,
|
|
|
+ app_alias: '',
|
|
|
limit: 5,
|
|
|
start_time: '',
|
|
|
end_time: ''
|
|
@@ -305,7 +305,8 @@ export default {
|
|
|
slowBinsTopQuery: {
|
|
|
start_time: '',
|
|
|
end_time: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ loading3: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -314,7 +315,6 @@ export default {
|
|
|
var live = false
|
|
|
if (newValue) {
|
|
|
this.topoUrl = ''
|
|
|
- this.changeQuery('/business-analysis/topology/index', newValue.startTime, newValue.endTime, live)
|
|
|
this.topoUrl = '/ui/index.html'
|
|
|
this.serviceBarQuery.start_time = newValue.startTime
|
|
|
this.serviceBarQuery.end_time = newValue.endTime
|
|
@@ -324,15 +324,14 @@ export default {
|
|
|
this.dbslowtopQuery.end_time = newValue.endTime
|
|
|
this.slowBinsTopQuery.start_time = newValue.startTime
|
|
|
this.slowBinsTopQuery.end_time = newValue.endTime
|
|
|
-
|
|
|
this.queryScore.interval = newValue.interval
|
|
|
- this.getAppsScore()
|
|
|
- this.getdbslowtop()
|
|
|
- this.getServiceBar()
|
|
|
- this.getslowTopUrlMapping()
|
|
|
- this.getSlowInterfaceFn()
|
|
|
+ this.getAppsScore() // 应用黄金指标(RED)
|
|
|
+ this.getdbslowtop() // 慢查询TOP5
|
|
|
+ this.getServiceBar() // 服务性能
|
|
|
+
|
|
|
+ this.getslowTopUrlMapping() // 慢接口TOP5
|
|
|
+ this.getSlowInterfaceFn()// 慢业务TOP5
|
|
|
}
|
|
|
-
|
|
|
if (newValue.timeOut) {
|
|
|
if (newValue.timeOut == 1) {
|
|
|
live = false
|
|
@@ -344,12 +343,12 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.topoUrl = ''
|
|
|
- this.changeQuery('/business-analysis/topology/index', newValue.startTime, newValue.endTime, live)
|
|
|
+ // this.changeQuery('/business-analysis/topology/index', newValue.startTime, newValue.endTime, live)
|
|
|
this.topoUrl = '/ui/index.html'
|
|
|
} else {
|
|
|
live = false
|
|
|
this.topoUrl = ''
|
|
|
- this.changeQuery('/business-analysis/topology/index', newValue.startTime, newValue.endTime, live)
|
|
|
+ // this.changeQuery('/business-analysis/topology/index', newValue.startTime, newValue.endTime, live)
|
|
|
this.topoUrl = '/ui/index.html'
|
|
|
}
|
|
|
},
|
|
@@ -398,13 +397,13 @@ export default {
|
|
|
handler(newValue, oldValue) {
|
|
|
this.sendObj.app_alias = newValue
|
|
|
this.serviceBarQuery.app_alias = newValue
|
|
|
+ this.slowTopQuery.app_alias = newValue
|
|
|
this.dbslowtopQuery.app_alias = newValue
|
|
|
- this.getAppsScore()
|
|
|
- this.getdbslowtop()
|
|
|
- this.getServiceBar()
|
|
|
- this.getslowTopUrlMapping()
|
|
|
- this.getSlowInterfaceFn()
|
|
|
- // this.changeQuery('/business-analysis/topology/index', this.appItem.start_time, this.appItem.end_time, this.appItem.live)
|
|
|
+ this.getAppsScore() // 应用黄金指标(RED)
|
|
|
+ this.getdbslowtop() // 慢查询TOP5
|
|
|
+ this.getServiceBar() // 服务性能
|
|
|
+ this.getslowTopUrlMapping() // 慢接口TOP5
|
|
|
+ this.getSlowInterfaceFn() // 慢业务TOP5
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
@@ -423,20 +422,20 @@ export default {
|
|
|
this.serviceBarQuery.app_alias = this.appItem.alias
|
|
|
this.serviceBarQuery.start_time = start_time
|
|
|
this.serviceBarQuery.end_time = end_time
|
|
|
- this.getServiceBar()
|
|
|
- this.slowTopQuery.app_id = this.appItem.id
|
|
|
+ this.getServiceBar() // 服务性能
|
|
|
+ this.slowTopQuery.app_alias = this.appItem.alias
|
|
|
this.slowTopQuery.start_time = start_time
|
|
|
this.slowTopQuery.end_time = end_time
|
|
|
- this.getslowTopUrlMapping()
|
|
|
+
|
|
|
+ this.getslowTopUrlMapping() // 慢接口TOP5
|
|
|
this.dbslowtopQuery.app_alias = this.appItem.alias
|
|
|
this.dbslowtopQuery.start_time = start_time
|
|
|
this.dbslowtopQuery.end_time = end_time
|
|
|
|
|
|
- // this.getList()
|
|
|
- this.getAppsScore()
|
|
|
- this.getdbslowtop()
|
|
|
- this.changeQuery('/business-analysis/topology/index', this.appItem.start_time, this.appItem.end_time, this.appItem.live)
|
|
|
- this.getSlowInterfaceFn()
|
|
|
+ this.getAppsScore() // 应用黄金指标(RED)
|
|
|
+ this.getdbslowtop() // 慢查询TOP5
|
|
|
+ // this.changeQuery('/business-analysis/topology/index', this.appItem.start_time, this.appItem.end_time, this.appItem.live)
|
|
|
+ this.getSlowInterfaceFn() // 慢业务TOP5
|
|
|
}
|
|
|
if (this.$route.query.id != undefined) {
|
|
|
this.appId = this.$route.query.id
|
|
@@ -446,7 +445,7 @@ export default {
|
|
|
clearInterval(this.timer)
|
|
|
},
|
|
|
methods: {
|
|
|
- getAppsScore() {
|
|
|
+ getAppsScore() { // 应用黄金指标(RED)
|
|
|
this.queryScore.req_applist.push({ app_alias: this.appItem.alias })
|
|
|
appsScore(this.queryScore).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -518,13 +517,11 @@ export default {
|
|
|
},
|
|
|
Refresh(timeOut) {
|
|
|
this.timer = setInterval(() => {
|
|
|
- // this.getList();
|
|
|
- this.getServiceBar()
|
|
|
- this.getAppsScore()
|
|
|
- this.getslowTopUrlMapping()
|
|
|
- this.getdbslowtop()
|
|
|
- this.getSlowInterfaceFn()
|
|
|
- // this.getDigitsService();
|
|
|
+ this.getServiceBar() // 服务性能
|
|
|
+ this.getAppsScore() // 应用黄金指标(RED)
|
|
|
+ this.getslowTopUrlMapping() // 慢接口TOP5
|
|
|
+ this.getdbslowtop() // 慢查询TOP5
|
|
|
+ this.getSlowInterfaceFn() // 慢业务TOP5
|
|
|
}, timeOut)
|
|
|
},
|
|
|
toggleBox() {
|
|
@@ -564,7 +561,7 @@ export default {
|
|
|
console.log(err)
|
|
|
})
|
|
|
},
|
|
|
- getServiceBar() {
|
|
|
+ getServiceBar() { // 服务性能
|
|
|
serviceBar(this.serviceBarQuery, this.serviceBarQuery.app_alias).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.serviceBarObj = res.data
|
|
@@ -692,16 +689,17 @@ export default {
|
|
|
that.compareChart.setOption(option)
|
|
|
})
|
|
|
},
|
|
|
- getslowTopUrlMapping() {
|
|
|
- this.loading = true
|
|
|
+ getslowTopUrlMapping() { // 慢接口TOP5
|
|
|
+ this.loading3 = true
|
|
|
+ console.log('慢接口TOP5f---方法')
|
|
|
slowTopUrlMapping(this.slowTopQuery).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.slowTopList = res.data
|
|
|
- this.loading = false
|
|
|
+ this.loading3 = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getdbslowtop() {
|
|
|
+ getdbslowtop() {// 慢查询TOP5
|
|
|
this.loading = true
|
|
|
dbslowtop(this.dbslowtopQuery).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -710,7 +708,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async getSlowInterfaceFn() {
|
|
|
+ async getSlowInterfaceFn() { // 慢业务TOP5
|
|
|
this.loading2 = true
|
|
|
const res = await getSlowInterfaceData(this.dbslowtopQuery)
|
|
|
this.loading2 = false
|