@arkxos/arkos-app-gateway-manage 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/ark_dist/ark-meta.json +75 -0
- package/ark_dist/ark_userChunk_1.js +5 -0
- package/ark_dist/ark_userChunk_2.js +49 -0
- package/ark_dist/css/views/views-CreateGateway.41b2bde6.css +297 -0
- package/ark_dist/favicon.ico +0 -0
- package/ark_dist/img/404.png +0 -0
- package/ark_dist/img/auth_banner.jpg +0 -0
- package/ark_dist/img/avatar.jpg +0 -0
- package/ark_dist/img/avatar2.gif +0 -0
- package/ark_dist/img/avatar3.gif +0 -0
- package/ark_dist/img/loginbg.svg +1 -0
- package/ark_dist/img/logo-r.png +0 -0
- package/ark_dist/img/logo.png +0 -0
- package/ark_dist/img/no-widgets.svg +57 -0
- package/ark_dist/img/tasks-example.png +0 -0
- package/ark_dist/img/ver.svg +236 -0
- package/ark_dist/index.html +132 -0
- package/ark_dist/js/app.e014b7a5.js +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js +3 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.LICENSE.txt +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.map +1 -0
- package/ark_proxy/entry.js +30 -0
- package/ark_proxy_es/entry.js +18 -0
- package/package.json +156 -0
- package/scripts/check.js +13 -0
- package/scripts/meta.js +21 -0
- package/scripts/prepublishOnly.js +28 -0
- package/src/api/apidoc_api.js +35 -0
- package/src/api/authority.js +161 -0
- package/src/api/balanced_api.js +101 -0
- package/src/api/client_api.js +68 -0
- package/src/api/count_api.js +62 -0
- package/src/api/gateway-manage/client_api.js +68 -0
- package/src/api/gateway-manage/open_client.js +188 -0
- package/src/api/gateway_api.js +81 -0
- package/src/api/global_function.js +278 -0
- package/src/api/global_variable.js +35 -0
- package/src/api/groovyscript_api.js +130 -0
- package/src/api/ip_api.js +47 -0
- package/src/api/monitor_api.js +24 -0
- package/src/api/regserver_api.js +224 -0
- package/src/api/request.js +107 -0
- package/src/assets/font_1930435_u2cpsigmd9d.js +38 -0
- package/src/assets/font_ma6wg7gw3td/demo.css +539 -0
- package/src/assets/font_ma6wg7gw3td/demo_index.html +674 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.css +105 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.eot +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.js +1 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.json +163 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.svg +92 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.ttf +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff2 +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/particles.json +110 -0
- package/src/auto-imports.d.ts +307 -0
- package/src/component/BoxCard.vue +156 -0
- package/src/component/ClientInfo.vue +82 -0
- package/src/component/GroovyScriptTable.vue +74 -0
- package/src/component/PanThumb/index.vue +149 -0
- package/src/component/RouteAccessChart.vue +85 -0
- package/src/component/RouteInfo.vue +146 -0
- package/src/component/RouteRequestCount.vue +126 -0
- package/src/component/TextHoverEffect/Mallki.vue +120 -0
- package/src/configs/subApp.ts +9 -0
- package/src/entrance/libProperties.ts +30 -0
- package/src/entrance/libTypes.ts +27 -0
- package/src/main.ts +13 -0
- package/src/plugins/index.ts +11 -0
- package/src/router/constantRoutes.js +155 -0
- package/src/router/loadComponent.js +29 -0
- package/src/views/AddClientGateway.vue +253 -0
- package/src/views/AddGatewayClient.vue +360 -0
- package/src/views/AddGroovyScript.vue +337 -0
- package/src/views/ApiCount.vue +291 -0
- package/src/views/ApiDoc.vue +293 -0
- package/src/views/ApiMonitor.vue +292 -0
- package/src/views/ClientList.vue +217 -0
- package/src/views/CreateBalanced.vue +341 -0
- package/src/views/CreateClient.vue +171 -0
- package/src/views/CreateGateway.vue +836 -0
- package/src/views/GatewayList.vue +322 -0
- package/src/views/GatewayTopology.vue +245 -0
- package/src/views/IpList.vue +218 -0
- package/src/views/LoadBalanced.vue +389 -0
- package/src/views/Main.vue +98 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
|
|
3
|
+
<div class="pan-info">
|
|
4
|
+
<div class="pan-info-roles-container">
|
|
5
|
+
<slot />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<!-- eslint-disable-next-line -->
|
|
9
|
+
<div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: 'PanThumb',
|
|
16
|
+
data(){
|
|
17
|
+
return {
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
image: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
25
|
+
zIndex: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 1
|
|
28
|
+
},
|
|
29
|
+
width: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '150px'
|
|
32
|
+
},
|
|
33
|
+
height: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: '150px'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
.pan-item {
|
|
43
|
+
width: 200px;
|
|
44
|
+
height: 200px;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
position: relative;
|
|
48
|
+
cursor: default;
|
|
49
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.panThumb {
|
|
53
|
+
z-index: 100;
|
|
54
|
+
height: 60px!important;
|
|
55
|
+
width: 60px!important;
|
|
56
|
+
position: absolute!important;
|
|
57
|
+
top: -45px;
|
|
58
|
+
left: 0px;
|
|
59
|
+
border: 5px solid #ffffff;
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
margin: auto;
|
|
62
|
+
box-shadow: none!important;
|
|
63
|
+
::v-deep .pan-info {
|
|
64
|
+
box-shadow: none!important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pan-info-roles-container {
|
|
69
|
+
padding: 20px;
|
|
70
|
+
text-align: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pan-thumb {
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
background-position: center center;
|
|
77
|
+
background-size: cover;
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
position: absolute;
|
|
81
|
+
transform-origin: 95% 40%;
|
|
82
|
+
transition: all 0.3s ease-in-out;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pan-info {
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: inherit;
|
|
88
|
+
height: inherit;
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.pan-info h3 {
|
|
95
|
+
color: #fff;
|
|
96
|
+
text-transform: uppercase;
|
|
97
|
+
position: relative;
|
|
98
|
+
letter-spacing: 2px;
|
|
99
|
+
font-size: 18px;
|
|
100
|
+
margin: 0 60px;
|
|
101
|
+
padding: 22px 0 0 0;
|
|
102
|
+
height: 85px;
|
|
103
|
+
font-family: 'Open Sans', Arial, sans-serif;
|
|
104
|
+
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.pan-info p {
|
|
108
|
+
color: #fff;
|
|
109
|
+
padding: 10px 5px;
|
|
110
|
+
font-style: italic;
|
|
111
|
+
margin: 0 30px;
|
|
112
|
+
font-size: 12px;
|
|
113
|
+
border-top: 1px solid rgba(255, 255, 255, 0.5);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.pan-info p a {
|
|
117
|
+
display: block;
|
|
118
|
+
color: #333;
|
|
119
|
+
width: 80px;
|
|
120
|
+
height: 80px;
|
|
121
|
+
background: rgba(255, 255, 255, 0.3);
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
color: #fff;
|
|
124
|
+
font-style: normal;
|
|
125
|
+
font-weight: 700;
|
|
126
|
+
text-transform: uppercase;
|
|
127
|
+
font-size: 9px;
|
|
128
|
+
letter-spacing: 1px;
|
|
129
|
+
padding-top: 24px;
|
|
130
|
+
margin: 7px auto 0;
|
|
131
|
+
font-family: 'Open Sans', Arial, sans-serif;
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
|
|
134
|
+
transform: translateX(60px) rotate(90deg);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.pan-info p a:hover {
|
|
138
|
+
background: rgba(255, 255, 255, 0.5);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.pan-item:hover .pan-thumb {
|
|
142
|
+
transform: rotate(-110deg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.pan-item:hover .pan-info p a {
|
|
146
|
+
opacity: 1;
|
|
147
|
+
transform: translateX(0px) rotate(0deg);
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="routeAccessChart" :style="{ width: '100%', height: '220px'}"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import * as echarts from 'echarts'
|
|
7
|
+
import {countBalancedRequest} from '../api/count_api.js'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {};
|
|
12
|
+
},
|
|
13
|
+
methods: {
|
|
14
|
+
loadAccessCard(balancedId, routeIds, dateType){
|
|
15
|
+
let _this = this;
|
|
16
|
+
console.log("balancedId", balancedId);
|
|
17
|
+
countBalancedRequest({balancedId: balancedId,routeIds: routeIds, dateType:dateType}).then(function(result){
|
|
18
|
+
if (result && result.data){
|
|
19
|
+
_this.drawLine(result.data);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
drawLine(result) {
|
|
24
|
+
let xAxisData = result.dates;
|
|
25
|
+
let seriesData = [];
|
|
26
|
+
result.datas.forEach((row,index)=>{
|
|
27
|
+
let data = {
|
|
28
|
+
name: row.routeId,
|
|
29
|
+
type: 'line',
|
|
30
|
+
stack: '总量',
|
|
31
|
+
smooth: true,
|
|
32
|
+
symbol: 'none',
|
|
33
|
+
areaStyle: {},
|
|
34
|
+
data: row.counts
|
|
35
|
+
}
|
|
36
|
+
seriesData.push(data);
|
|
37
|
+
});
|
|
38
|
+
console.log("chart data", seriesData);
|
|
39
|
+
let _this = this;
|
|
40
|
+
// 基于准备好的dom,初始化echarts实例
|
|
41
|
+
let routeAccessChart = echarts.init(document.getElementById('routeAccessChart'));
|
|
42
|
+
var colors = ['#00ADD0', '#FFA12F', '#B62AFF', '#727CF5', '#1890FF', '#00f6ff', '#20C0F4', '#95F300', '#04FDB8', '#AF5AFF'];
|
|
43
|
+
var option = {
|
|
44
|
+
color: colors,
|
|
45
|
+
tooltip: {
|
|
46
|
+
trigger: 'axis',
|
|
47
|
+
axisPointer: {
|
|
48
|
+
type: 'cross',
|
|
49
|
+
label: {
|
|
50
|
+
backgroundColor: '#6a7985'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
grid: {
|
|
55
|
+
top: '10%',
|
|
56
|
+
left: '3%',
|
|
57
|
+
right: '4%',
|
|
58
|
+
bottom: '3%',
|
|
59
|
+
containLabel: true
|
|
60
|
+
},
|
|
61
|
+
xAxis: [
|
|
62
|
+
{
|
|
63
|
+
type: 'category',
|
|
64
|
+
boundaryGap: false,
|
|
65
|
+
data: xAxisData
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
yAxis: [
|
|
69
|
+
{
|
|
70
|
+
type: 'value',
|
|
71
|
+
boundaryGap: [0, '10%']
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
series: seriesData
|
|
75
|
+
};
|
|
76
|
+
// 绘制图表
|
|
77
|
+
routeAccessChart.setOption(option, true);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<style>
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div style="height: 42px; background-color: #2A2E32;font-size: 14pt; font-weight: bold; color: #F0F0F0; padding-top: 18px; padding-left: 20px;">
|
|
4
|
+
<i class="el-icon-connection"></i> 服务详情
|
|
5
|
+
</div>
|
|
6
|
+
<!-- <el-divider content-position="left"><span style="color: #606266; ">网关服务详情</span></el-divider> -->
|
|
7
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
8
|
+
<el-col :span="6" class="gateway-info-label">服务ID:</el-col>
|
|
9
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small">{{infoForm. id}}</el-tag></el-col>
|
|
10
|
+
</el-row>
|
|
11
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
12
|
+
<el-col :span="6" class="gateway-info-label">服务名称:</el-col>
|
|
13
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small">{{infoForm.name}}</el-tag></el-col>
|
|
14
|
+
</el-row>
|
|
15
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
16
|
+
<el-col :span="6" class="gateway-info-label">服务地址:</el-col>
|
|
17
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.uri}}</el-tag></el-col>
|
|
18
|
+
</el-row>
|
|
19
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.method != undefined && infoForm.method != ''">
|
|
20
|
+
<el-col :span="6" class="gateway-info-label">请求模式:</el-col>
|
|
21
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.method}}</el-tag></el-col>
|
|
22
|
+
</el-row>
|
|
23
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
24
|
+
<el-col :span="6" class="gateway-info-label">断言路径:</el-col>
|
|
25
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.path}}</el-tag></el-col>
|
|
26
|
+
</el-row>
|
|
27
|
+
<el-row :gutter="24" v-if="infoForm.host != undefined && infoForm.host != ''" style="border: 0px solid red;">
|
|
28
|
+
<el-col :span="6" class="gateway-info-label">断言Host:</el-col>
|
|
29
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.host}}</el-tag></el-col>
|
|
30
|
+
</el-row>
|
|
31
|
+
<el-row :gutter="24" v-if="infoForm.remoteAddr != undefined && infoForm.remoteAddr != ''" style="border: 0px solid red;">
|
|
32
|
+
<el-col :span="6" class="gateway-info-label">断言远程地址:</el-col>
|
|
33
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.remoteAddr}}</el-tag></el-col>
|
|
34
|
+
</el-row>
|
|
35
|
+
<el-row :gutter="24" v-if="infoForm.header != undefined && infoForm.header != ''" style="border: 0px solid red;">
|
|
36
|
+
<el-col :span="6" class="gateway-info-label">断言Header:</el-col>
|
|
37
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">{{infoForm.header}}</el-tag></el-col>
|
|
38
|
+
</el-row>
|
|
39
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
40
|
+
<el-col :span="6" class="gateway-info-label">断言截取:</el-col>
|
|
41
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="success">StripPrefix={{infoForm.stripPrefix}}</el-tag></el-col>
|
|
42
|
+
</el-row>
|
|
43
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
44
|
+
<el-col :span="6" class="gateway-info-label">请求参数:</el-col>
|
|
45
|
+
<el-col :span="18" class="gateway-info-value" :title="infoForm.requestParameter"><el-tag size="small" type="success">RequestParameter={{infoForm.requestParameter}}</el-tag></el-col>
|
|
46
|
+
</el-row>
|
|
47
|
+
<el-row :gutter="24" v-if="infoForm.rewritePath != undefined && infoForm.rewritePath != ''" style="border: 0px solid red;">
|
|
48
|
+
<el-col :span="6" class="gateway-info-label">重定向:</el-col>
|
|
49
|
+
<el-col :span="18" class="gateway-info-value" :title="infoForm.rewritePath"><el-tag size="small" type="success">{{infoForm.rewritePath}}</el-tag></el-col>
|
|
50
|
+
</el-row>
|
|
51
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.filterGatewayName != undefined && infoForm.filterGatewayName != ''">
|
|
52
|
+
<el-col :span="6" class="gateway-info-label">过滤器:</el-col>
|
|
53
|
+
<el-col :span="18" class="gateway-info-value">
|
|
54
|
+
<el-tag size="small" v-if="infoForm.filterGatewayName.indexOf('ip') != -1" type="warning">IP</el-tag>
|
|
55
|
+
<el-tag size="small" v-if="infoForm.filterGatewayName.indexOf('token') != -1" type="warning">TOKEN</el-tag>
|
|
56
|
+
<el-tag size="small" v-if="infoForm.filterGatewayName.indexOf('id') != -1" type="warning">ID</el-tag>
|
|
57
|
+
</el-col>
|
|
58
|
+
</el-row>
|
|
59
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.degradeRuleName != undefined && infoForm.degradeRuleName == 'default'">
|
|
60
|
+
<el-col :span="6" class="gateway-info-label">熔断器:</el-col>
|
|
61
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="warning">启用</el-tag></el-col>
|
|
62
|
+
</el-row>
|
|
63
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.flowRuleName != undefined && infoForm.flowRuleName != ''">
|
|
64
|
+
<el-col :span="6" class="gateway-info-label">限流器:</el-col>
|
|
65
|
+
<el-col :span="18" class="gateway-info-value">
|
|
66
|
+
<el-tag size="small" v-if="infoForm.flowRuleName === 'default'" type="warning">直接拒绝</el-tag>
|
|
67
|
+
<el-tag size="small" v-if="infoForm.flowRuleName === 'warmUp'" type="warning">冷启动</el-tag>
|
|
68
|
+
<el-tag size="small" v-if="infoForm.flowRuleName === 'rateLimiter'" type="warning">匀速器</el-tag>
|
|
69
|
+
</el-col>
|
|
70
|
+
</el-row>
|
|
71
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.filterAuthorizeName != undefined && infoForm.filterAuthorizeName != ''">
|
|
72
|
+
<el-col :span="6" class="gateway-info-label">鉴权器:</el-col>
|
|
73
|
+
<el-col :span="18" class="gateway-info-value">
|
|
74
|
+
<el-collapse accordion>
|
|
75
|
+
<el-collapse-item v-if="infoForm.filterAuthorizeName.indexOf('header') != -1">
|
|
76
|
+
<template slot="title">
|
|
77
|
+
<el-tag size="small" type="warning">HEADER验证</el-tag>
|
|
78
|
+
</template>
|
|
79
|
+
<div><el-tag size="mini" type="">{{infoForm.accessHeader}}</el-tag></div>
|
|
80
|
+
</el-collapse-item>
|
|
81
|
+
<el-collapse-item v-if="infoForm.filterAuthorizeName.indexOf('ip') != -1">
|
|
82
|
+
<template slot="title">
|
|
83
|
+
<el-tag size="small" type="warning">IP验证</el-tag>
|
|
84
|
+
</template>
|
|
85
|
+
<div><el-tag size="mini" type="">ip={{infoForm.accessIp}}</el-tag></div>
|
|
86
|
+
</el-collapse-item>
|
|
87
|
+
<el-collapse-item v-if="infoForm.filterAuthorizeName.indexOf('parm') != -1">
|
|
88
|
+
<template slot="title">
|
|
89
|
+
<el-tag size="small" type="warning">参数验证</el-tag>
|
|
90
|
+
</template>
|
|
91
|
+
<div><el-tag size="mini" type="">{{infoForm.accessParameter}}</el-tag></div>
|
|
92
|
+
</el-collapse-item>
|
|
93
|
+
<el-collapse-item v-if="infoForm.filterAuthorizeName.indexOf('time') != -1">
|
|
94
|
+
<template slot="title">
|
|
95
|
+
<el-tag size="small" type="warning">时间验证</el-tag>
|
|
96
|
+
</template>
|
|
97
|
+
<div><el-tag size="mini" type="">时间区间:{{infoForm.accessTime}}</el-tag></div>
|
|
98
|
+
</el-collapse-item>
|
|
99
|
+
<el-collapse-item v-if="infoForm.filterAuthorizeName.indexOf('cookie') != -1">
|
|
100
|
+
<template slot="title">
|
|
101
|
+
<el-tag size="small" type="warning">Cookie验证</el-tag>
|
|
102
|
+
</template>
|
|
103
|
+
<div><el-tag size="mini" type="">{{infoForm.accessCookie}}</el-tag></div>
|
|
104
|
+
</el-collapse-item>
|
|
105
|
+
</el-collapse>
|
|
106
|
+
</el-col>
|
|
107
|
+
</el-row>
|
|
108
|
+
<el-row :gutter="24" style="border: 0px solid red;" v-if="infoForm.cacheTtl != undefined && infoForm.cacheTtl != ''">
|
|
109
|
+
<el-col :span="6" class="gateway-info-label">缓存时间:</el-col>
|
|
110
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="warning">{{infoForm.cacheTtl}}s</el-tag></el-col>
|
|
111
|
+
</el-row>
|
|
112
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
113
|
+
<el-col :span="6" class="gateway-info-label">创建时间:</el-col>
|
|
114
|
+
<el-col :span="18" class="gateway-info-value"><el-tag size="small" type="danger">{{infoForm.createTime}}</el-tag></el-col>
|
|
115
|
+
</el-row>
|
|
116
|
+
<el-row :gutter="24" style="border: 0px solid red;">
|
|
117
|
+
<el-col :span="6" class="gateway-info-label">服务状态:</el-col>
|
|
118
|
+
<el-col :span="18" class="gateway-info-value">
|
|
119
|
+
<el-tag size="small" type="danger">{{infoForm.status === '0'?'启用':'禁用'}}</el-tag>
|
|
120
|
+
</el-col>
|
|
121
|
+
</el-row>
|
|
122
|
+
<!-- <el-divider content-position="left">服务运行状态</el-divider> -->
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
|
|
126
|
+
<script>
|
|
127
|
+
export default {
|
|
128
|
+
data() {
|
|
129
|
+
return {
|
|
130
|
+
name:'routeInfo',
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
created: function() {
|
|
134
|
+
this.init();
|
|
135
|
+
},
|
|
136
|
+
props:['infoForm'],//父组件传参
|
|
137
|
+
methods:{
|
|
138
|
+
init() {
|
|
139
|
+
console.log('infoForm',this.infoForm)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style>
|
|
146
|
+
</style>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-dialog :title="dialogTitle" v-model="dialogFormVisible" width="55%" :close-on-click-modal="false">
|
|
4
|
+
<i class="iconfont icon-icon_renwujincheng" style="font-size: 16pt; color: #90A0A5;"></i>
|
|
5
|
+
<span class="span_14">7日请求总量</span>
|
|
6
|
+
<el-divider style="width: 80%;"></el-divider>
|
|
7
|
+
<div id="route7dayAccessChart" class="chart_line_2"></div>
|
|
8
|
+
<br/>
|
|
9
|
+
<i class="iconfont icon-yibiaopan" style="font-size: 16pt; color: #90A0A5;"></i>
|
|
10
|
+
<span class="span_14">24小时请求总量</span>
|
|
11
|
+
<el-divider style="width: 80%;"></el-divider>
|
|
12
|
+
<div id="route24HourAccessChart" class="chart_line_2"></div>
|
|
13
|
+
<br/>
|
|
14
|
+
<i class="iconfont icon-yibiaopan" style="font-size: 16pt; color: #90A0A5;"></i>
|
|
15
|
+
<span class="span_14">60分钟请求总量</span>
|
|
16
|
+
<el-divider style="width: 80%;"></el-divider>
|
|
17
|
+
<div id="route60MinAccessChart" class="chart_line_2"></div>
|
|
18
|
+
<div slot="footer" class="dialog-footer">
|
|
19
|
+
<el-button icon="el-icon-s-release" size="mini" type="warning" @click="dialogFormVisible = false">关 闭</el-button>
|
|
20
|
+
</div>
|
|
21
|
+
</el-dialog>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import * as echarts from 'echarts'
|
|
27
|
+
import {countAppRequestTotal} from '../api/count_api.js'
|
|
28
|
+
export default {
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
name: "routeRequestCount",
|
|
32
|
+
dialogFormVisible: false,
|
|
33
|
+
dialogTitle: '统计详情'
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
created: function () {
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
count(obj){
|
|
40
|
+
this.dialogTitle = obj.name + '统计详情';
|
|
41
|
+
let _this = this;
|
|
42
|
+
countAppRequestTotal({id:obj.id}).then(function(result){
|
|
43
|
+
console.log(result);
|
|
44
|
+
if (result.data){
|
|
45
|
+
_this.drawLine('route7dayAccessChart', result.data.dayCounts, '#37A2FF','rgba(128, 255, 165)', 'rgba(1, 191, 236)');
|
|
46
|
+
_this.drawLine('route24HourAccessChart', result.data.hourCounts, '#FFBF00','rgba(55, 162, 255)', 'rgba(116, 21, 219)');
|
|
47
|
+
_this.drawLine('route60MinAccessChart', result.data.minCounts, '#00DDFF', 'rgba(0, 221, 255)', 'rgba(77, 119, 255)');
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
drawLine(id, result, color, color0, color1) {
|
|
52
|
+
let xAxisData = [];
|
|
53
|
+
let seriesData = [];
|
|
54
|
+
if (result != undefined && result.dates && result.counts){
|
|
55
|
+
xAxisData = result.dates;
|
|
56
|
+
seriesData = result.counts;
|
|
57
|
+
}
|
|
58
|
+
//console.log("chart data", seriesData);
|
|
59
|
+
let _this = this;
|
|
60
|
+
// 基于准备好的dom,初始化echarts实例
|
|
61
|
+
let accessChart = echarts.init(document.getElementById(id));
|
|
62
|
+
//渐变色效果
|
|
63
|
+
var option = {
|
|
64
|
+
// color: ['#80FFA5', '#00DDFF', '#37A2FF', '#00DDFF', '#FFBF00'],
|
|
65
|
+
color: [color],
|
|
66
|
+
tooltip: {
|
|
67
|
+
trigger: 'axis',
|
|
68
|
+
axisPointer: {
|
|
69
|
+
type: 'cross',
|
|
70
|
+
label: {
|
|
71
|
+
backgroundColor: '#6a7985'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
grid: {
|
|
76
|
+
top: '5%',
|
|
77
|
+
left: '1%',
|
|
78
|
+
right: '2%',
|
|
79
|
+
bottom: '1%',
|
|
80
|
+
containLabel: true
|
|
81
|
+
},
|
|
82
|
+
xAxis: [
|
|
83
|
+
{
|
|
84
|
+
type: 'category',
|
|
85
|
+
boundaryGap: false,
|
|
86
|
+
data: xAxisData
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
yAxis: {
|
|
90
|
+
type: 'value'
|
|
91
|
+
},
|
|
92
|
+
series: [
|
|
93
|
+
{
|
|
94
|
+
type: 'line',
|
|
95
|
+
smooth: true,
|
|
96
|
+
showSymbol: true,
|
|
97
|
+
areaStyle: {
|
|
98
|
+
opacity: 0.8,
|
|
99
|
+
color: echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
100
|
+
offset: 0,
|
|
101
|
+
color: color0
|
|
102
|
+
}, {
|
|
103
|
+
offset: 1,
|
|
104
|
+
color: color1
|
|
105
|
+
}])
|
|
106
|
+
},
|
|
107
|
+
emphasis: {
|
|
108
|
+
focus: 'series'
|
|
109
|
+
},
|
|
110
|
+
data: seriesData
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
};
|
|
114
|
+
// 绘制图表
|
|
115
|
+
accessChart.setOption(option, true);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style>
|
|
122
|
+
.chart_line_2 {
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 180px;
|
|
125
|
+
}
|
|
126
|
+
</style>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a :class="className" class="link--mallki" href="#">
|
|
3
|
+
{{ text }}
|
|
4
|
+
<span :data-letters="text" />
|
|
5
|
+
<span :data-letters="text" />
|
|
6
|
+
</a>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
className: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
16
|
+
text: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: 'vue-element-admin'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
/* Mallki */
|
|
26
|
+
.mallki-text {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0px;
|
|
29
|
+
right: 0px;
|
|
30
|
+
font-size: 20px;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
float: right;
|
|
33
|
+
}
|
|
34
|
+
.link--mallki {
|
|
35
|
+
font-weight: 800;
|
|
36
|
+
color: #4dd9d5;
|
|
37
|
+
font-family: 'Dosis', sans-serif;
|
|
38
|
+
-webkit-transition: color 0.5s 0.25s;
|
|
39
|
+
transition: color 0.5s 0.25s;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
position: relative;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
outline: none;
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.link--mallki:hover {
|
|
49
|
+
-webkit-transition: none;
|
|
50
|
+
transition: none;
|
|
51
|
+
color: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.link--mallki::before {
|
|
55
|
+
content: '';
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 6px;
|
|
58
|
+
margin: -3px 0 0 0;
|
|
59
|
+
background: #3888fa;
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: 0;
|
|
62
|
+
top: 50%;
|
|
63
|
+
-webkit-transform: translate3d(-100%, 0, 0);
|
|
64
|
+
transform: translate3d(-100%, 0, 0);
|
|
65
|
+
-webkit-transition: -webkit-transform 0.4s;
|
|
66
|
+
transition: transform 0.4s;
|
|
67
|
+
-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
68
|
+
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.link--mallki:hover::before {
|
|
72
|
+
-webkit-transform: translate3d(100%, 0, 0);
|
|
73
|
+
transform: translate3d(100%, 0, 0);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.link--mallki span {
|
|
77
|
+
position: absolute;
|
|
78
|
+
height: 50%;
|
|
79
|
+
width: 100%;
|
|
80
|
+
left: 0;
|
|
81
|
+
top: 0;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.link--mallki span::before {
|
|
86
|
+
content: attr(data-letters);
|
|
87
|
+
color: red;
|
|
88
|
+
position: absolute;
|
|
89
|
+
left: 0;
|
|
90
|
+
width: 100%;
|
|
91
|
+
color: #3888fa;
|
|
92
|
+
-webkit-transition: -webkit-transform 0.5s;
|
|
93
|
+
transition: transform 0.5s;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.link--mallki span:nth-child(2) {
|
|
97
|
+
top: 50%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.link--mallki span:first-child::before {
|
|
101
|
+
top: 0;
|
|
102
|
+
-webkit-transform: translate3d(0, 100%, 0);
|
|
103
|
+
transform: translate3d(0, 100%, 0);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.link--mallki span:nth-child(2)::before {
|
|
107
|
+
bottom: 0;
|
|
108
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
109
|
+
transform: translate3d(0, -100%, 0);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.link--mallki:hover span::before {
|
|
113
|
+
-webkit-transition-delay: 0.3s;
|
|
114
|
+
transition-delay: 0.3s;
|
|
115
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
116
|
+
transform: translate3d(0, 0, 0);
|
|
117
|
+
-webkit-transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
|
|
118
|
+
transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
|
|
119
|
+
}
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 对应 package.json/appGroupName
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const LIB_NAME = '@arkxos/arkos-app-gateway-manage'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 这些组件暴露给使用方
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
// import Store from '../store/modules/index';
|
|
9
|
+
import constantRoutes from '../router/constantRoutes';
|
|
10
|
+
// import dynamicRoutes from '../router/dynamicRoutes';
|
|
11
|
+
import loadComponent from '../router/loadComponent';
|
|
12
|
+
import { RouteRecordRaw } from 'vue-router';
|
|
13
|
+
// 自定义指令
|
|
14
|
+
|
|
15
|
+
// 注册插件
|
|
16
|
+
import plugins from '../plugins/index'; // plugins
|
|
17
|
+
|
|
18
|
+
const staticRoutes: RouteRecordRaw[] = [];
|
|
19
|
+
staticRoutes.push(...constantRoutes)
|
|
20
|
+
// staticRoutes.push(...dynamicRoutes)
|
|
21
|
+
|
|
22
|
+
export const comps = {
|
|
23
|
+
staticRoutes: staticRoutes,
|
|
24
|
+
loadComponent: loadComponent,
|
|
25
|
+
// store: Store,
|
|
26
|
+
install: plugins
|
|
27
|
+
}
|
|
28
|
+
export type LibProperties = typeof comps;
|
|
29
|
+
|
|
30
|
+
export default comps
|