能力运行监控
This commit is contained in:
parent
961a8076fd
commit
194f6fcb3c
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -24,20 +24,9 @@
|
|||
<div class="RankingList">
|
||||
<h4 class="title">API异常次数排行TOP10</h4>
|
||||
<ul>
|
||||
<li
|
||||
class="RankingListData"
|
||||
v-for="(item, index) in RankingData"
|
||||
:key="index"
|
||||
>
|
||||
<i
|
||||
><b>{{ index + 1 }}</b></i
|
||||
>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="item.name"
|
||||
placement="top"
|
||||
>
|
||||
<li class="RankingListData" v-for="(item, index) in RankingData" :key="index">
|
||||
<i><b>{{ index + 1 }}</b></i>
|
||||
<el-tooltip class="item" effect="dark" :content="item.name" placement="top">
|
||||
<h6>{{ item.name }}</h6>
|
||||
</el-tooltip>
|
||||
<span>{{ item.num }}</span>
|
||||
|
@ -48,7 +37,7 @@
|
|||
<div class="AbnormalDistribution">
|
||||
<h4 class="title">API异常分布</h4>
|
||||
<div class="container-body1">
|
||||
<div id="main" style="width: 100px; height: 260px"></div>
|
||||
<div id="main" style="width: 120px; height: 260px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- API异常次数统计 -->
|
||||
|
@ -56,28 +45,24 @@
|
|||
<h4 class="title">API异常次数统计</h4>
|
||||
<div class="AnomalyStatisticsTable">
|
||||
<el-table :data="AnomalyStatisticsTable" border style="width: 100%">
|
||||
<el-table-column prop="name" label="接口名称" width="80">
|
||||
<el-table-column prop="name" label="接口名称" width="80" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="接口地址" width="200">
|
||||
<el-table-column prop="address" label="接口地址" width="200" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="method" label="调用方法">
|
||||
<el-table-column prop="method" label="调用方法" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="组件类型"> </el-table-column>
|
||||
<el-table-column prop="provider" label="提供商">
|
||||
<el-table-column prop="type" label="组件类型" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="provider" label="提供商" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="监控状态" :resizable="false" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="监控状态"> </el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<div class="tablePagination">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage4"
|
||||
:page-size="5"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
>
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page="currentPage4" :page-size="5" layout="total, prev, pager, next, jumper" :total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -214,12 +199,23 @@ export default {
|
|||
fontSize: 12, // 图例文字字体大小
|
||||
color: '#666666' // 图例文字颜色
|
||||
},
|
||||
bottom: '22%'
|
||||
bottom: '13%',
|
||||
formatter: function (name) {
|
||||
var index = 0
|
||||
var clientlabels = ['智能算法', '图层服务', '开发组件', '业务组件']
|
||||
var clientcounts = ['25%', '25%', '25%', '25%']
|
||||
clientlabels.forEach(function (value, i) {
|
||||
if (value == name) {
|
||||
index = i
|
||||
}
|
||||
})
|
||||
return name + ' ' + clientcounts[index]
|
||||
}
|
||||
},
|
||||
color: ['#0087ff', '#ff8a00', '#fcc549', '#49c988'],
|
||||
series: [
|
||||
{
|
||||
center: ['50%', '20%'],
|
||||
center: ['50%', '23%'],
|
||||
name: 'api异常分布',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
|
@ -261,7 +257,6 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.contentBox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 1.25rem 0;
|
||||
|
||||
.generalizeBox {
|
||||
|
@ -281,8 +276,7 @@ export default {
|
|||
}
|
||||
|
||||
.ApiBox {
|
||||
background: url('~@/assets/img/CapabilityOperationMonitoring/bg-blue.png')
|
||||
no-repeat;
|
||||
background: url('~@/assets/img/CapabilityOperationMonitoring/bg-blue.png') no-repeat;
|
||||
background-size: 100%;
|
||||
width: 22.5rem;
|
||||
height: 6.875rem;
|
||||
|
@ -319,8 +313,7 @@ export default {
|
|||
}
|
||||
|
||||
.ApiBox:last-of-type {
|
||||
background: url('~@/assets/img/CapabilityOperationMonitoring/bg-yellow.png')
|
||||
no-repeat;
|
||||
background: url('~@/assets/img/CapabilityOperationMonitoring/bg-yellow.png') no-repeat;
|
||||
background-size: 100%;
|
||||
|
||||
div {
|
||||
|
@ -390,11 +383,9 @@ export default {
|
|||
display: block;
|
||||
height: 1.25rem;
|
||||
width: 2.25rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
background: linear-gradient(to right,
|
||||
rgba(204, 204, 204, 0.6),
|
||||
rgba(0, 0, 0, 0)
|
||||
);
|
||||
rgba(0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -421,11 +412,9 @@ export default {
|
|||
|
||||
.RankingListData:nth-of-type(1) i b {
|
||||
width: 3.75rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
background: linear-gradient(to right,
|
||||
rgba(251, 59, 5, 0.6),
|
||||
rgba(0, 0, 0, 0)
|
||||
);
|
||||
rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.RankingListData:nth-of-type(1) span {
|
||||
|
@ -434,11 +423,9 @@ export default {
|
|||
|
||||
.RankingListData:nth-of-type(2) i b {
|
||||
width: 3.125rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
background: linear-gradient(to right,
|
||||
rgba(251, 123, 5, 0.6),
|
||||
rgba(0, 0, 0, 0)
|
||||
);
|
||||
rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.RankingListData:nth-of-type(2) span {
|
||||
|
@ -447,11 +434,9 @@ export default {
|
|||
|
||||
.RankingListData:nth-of-type(3) i b {
|
||||
width: 2.75rem;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
background: linear-gradient(to right,
|
||||
rgba(250, 179, 2, 0.6),
|
||||
rgba(0, 0, 0, 0)
|
||||
);
|
||||
rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.RankingListData:nth-of-type(3) span {
|
||||
|
@ -462,8 +447,7 @@ export default {
|
|||
.AbnormalDistribution {
|
||||
margin-right: 3.75rem;
|
||||
|
||||
.container-body1 {
|
||||
}
|
||||
.container-body1 {}
|
||||
}
|
||||
|
||||
.AnomalyStatistics {
|
||||
|
@ -472,7 +456,7 @@ export default {
|
|||
}
|
||||
|
||||
.AnomalyStatisticsTable {
|
||||
width: 41rem;
|
||||
width: 38.2rem;
|
||||
|
||||
::v-deep .el-table th {
|
||||
padding: 0;
|
||||
|
@ -489,6 +473,11 @@ export default {
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
::v-deep .el-table tbody tr:hover>td {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tablePagination {
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
<template>
|
||||
<div class="topBox">
|
||||
<h1 class="topTitle">能力运行平台</h1>
|
||||
<div class="topNav">
|
||||
<div class="topTab">
|
||||
<div @click="timeSwitch('日')" :class="timeSwitchindex == '日' ? 'timeDown' : ''">当天</div>
|
||||
<div @click="timeSwitch('周')" :class="timeSwitchindex == '周' ? 'timeDown' : ''">最近一周</div>
|
||||
<div @click="timeSwitch('月')" :class="timeSwitchindex == '月' ? 'timeDown' : ''">最近一月</div>
|
||||
</div>
|
||||
<div class="topTimme">
|
||||
<span>选择时间段</span>
|
||||
<el-date-picker v-model="timeStart" type="datetime" placeholder="请选择起始时间">
|
||||
</el-date-picker>
|
||||
<el-date-picker v-model="timeEnd" type="datetime" placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" round>确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
timeSwitchindex: '日',
|
||||
timeStart: '',
|
||||
timeEnd: ''
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
methods: {
|
||||
timeSwitch(name) {
|
||||
this.timeSwitchindex = name
|
||||
}
|
||||
},
|
||||
created() { },
|
||||
mounted() { }
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.topBox {
|
||||
.topTitle {
|
||||
font-size: 1.5rem;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding: 0.3125rem 0 1.25rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.topNav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.topTab {
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
width: 6.875rem;
|
||||
height: 1.75rem;
|
||||
line-height: 1.75rem;
|
||||
text-align: center;
|
||||
border-radius: 0.875rem;
|
||||
font-size: 1rem;
|
||||
color: #666666;
|
||||
margin-right: 0.9375rem;
|
||||
border: 0.0625rem solid #cccccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.timeDown {
|
||||
color: #1182fb;
|
||||
border: 0.0625rem solid #1182fb;
|
||||
}
|
||||
}
|
||||
|
||||
.topTimme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 1rem;
|
||||
display: block;
|
||||
margin-right: 1.25rem;
|
||||
}
|
||||
|
||||
::v-deep .el-date-editor.el-input {
|
||||
margin-right: 0.625rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,8 +1,23 @@
|
|||
<!-- 权限管理-能力运行监控 -->
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="capability-operation-monitoring-top">
|
||||
<capability-operation-monitoring-time></capability-operation-monitoring-time>
|
||||
<div class="topBox">
|
||||
<h1 class="topTitle">能力运行平台</h1>
|
||||
<div class="topNav">
|
||||
<div class="topTab">
|
||||
<div @click="timeSwitch('日')" :class="timeSwitchindex == '日' ? 'timeDown' : ''">当天</div>
|
||||
<div @click="timeSwitch('周')" :class="timeSwitchindex == '周' ? 'timeDown' : ''">最近一周</div>
|
||||
<div @click="timeSwitch('月')" :class="timeSwitchindex == '月' ? 'timeDown' : ''">最近一月</div>
|
||||
</div>
|
||||
<div class="topTimme">
|
||||
<span>选择时间段</span>
|
||||
<el-date-picker v-model="timeStart" type="date" placeholder="请选择起始时间" :picker-options="pickerOptions0">
|
||||
</el-date-picker>
|
||||
<el-date-picker v-model="timeEnd" type="date" placeholder="请选择结束时间" :picker-options="pickerOptions1">
|
||||
</el-date-picker>
|
||||
<el-button type="primary" round>确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="capability-operation-monitoring-center">
|
||||
<abnormal-situation></abnormal-situation>
|
||||
|
@ -16,25 +31,139 @@
|
|||
<script>
|
||||
import AbnormalSituation from './components/AbnormalSituation.vue'
|
||||
import AnalysisOfTheRequest from './components/AnalysisOfTheRequest.vue'
|
||||
import CapabilityOperationMonitoringTime from './components/CapabilityOperationMonitoringTime.vue'
|
||||
import * as moment from 'moment'
|
||||
export default {
|
||||
components: {
|
||||
AbnormalSituation,
|
||||
AnalysisOfTheRequest,
|
||||
CapabilityOperationMonitoringTime
|
||||
AnalysisOfTheRequest
|
||||
},
|
||||
props: {},
|
||||
data () {
|
||||
return {}
|
||||
return {
|
||||
timeSwitchindex: '日',
|
||||
timeStart: '',
|
||||
timeEnd: '',
|
||||
pickerOptions0: {
|
||||
disabledDate: (time) => {
|
||||
if (this.timeEnd != '') {
|
||||
return time.getTime() > this.timeEnd
|
||||
}
|
||||
}
|
||||
},
|
||||
pickerOptions1: {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() < this.timeStart
|
||||
}
|
||||
},
|
||||
callTheTrendData: []
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
methods: {},
|
||||
methods: {
|
||||
timeSwitch (name) {
|
||||
this.timeSwitchindex = name
|
||||
this.callTheTrendData = []
|
||||
if (name == '周') {
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const time = moment()
|
||||
.subtract('days', 6 - i)
|
||||
.format('MM-DD')
|
||||
this.callTheTrendData.push(time)
|
||||
} console.log('time', this.callTheTrendData, name)
|
||||
// callTheTrend(callTheTrendData.value)
|
||||
} else if (name == '月') {
|
||||
for (let i = 0; i < 31; i++) {
|
||||
const time = moment()
|
||||
.subtract('days', 30 - i)
|
||||
.format('MM-DD')
|
||||
this.callTheTrendData.push(time)
|
||||
} console.log('time', this.callTheTrendData, name)
|
||||
// callTheTrend(callTheTrendData.value)
|
||||
} else {
|
||||
const time = moment().startOf('day').format('YYYY-MM-DD 23:59:59')
|
||||
this.callTheTrendData.push(time)
|
||||
console.log(time, this.callTheTrendData)
|
||||
}
|
||||
}
|
||||
},
|
||||
created () { },
|
||||
mounted () {}
|
||||
mounted () {
|
||||
this.timeSwitch('日')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
.topBox {
|
||||
.topTitle {
|
||||
font-size: 1.5rem;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding: 0.3125rem 0 1.25rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.topNav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.topTab {
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
width: 6.875rem;
|
||||
height: 1.75rem;
|
||||
line-height: 1.75rem;
|
||||
text-align: center;
|
||||
border-radius: 0.875rem;
|
||||
font-size: 1rem;
|
||||
color: #666666;
|
||||
margin-right: 0.9375rem;
|
||||
border: 0.0625rem solid #cccccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.timeDown {
|
||||
color: #1182fb;
|
||||
border: 0.0625rem solid #1182fb;
|
||||
}
|
||||
}
|
||||
|
||||
.topTimme {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
color: #666666;
|
||||
font-size: 1rem;
|
||||
display: block;
|
||||
margin-right: 1.25rem;
|
||||
}
|
||||
|
||||
::v-deep .el-date-editor.el-input {
|
||||
margin-right: 0.625rem;
|
||||
width: 9.375rem;
|
||||
|
||||
.el-input__inner {
|
||||
border-radius: 17px;
|
||||
padding: 0;
|
||||
padding-left: 10px;
|
||||
padding-right: 0;
|
||||
background-image: url(~@/assets/img/CapabilityOperationMonitoring/calendar.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 18px 18px;
|
||||
background-position: 118px center;
|
||||
}
|
||||
|
||||
.el-input__prefix {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue