Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
王涛
2 years ago
Commit
659fb3670825b04915d042b0cfc78fe88d9c4c5c
2 parents
0c365cc8
66d28c03
Merge branch 'mater-ztq' into 'master'
浙江 腾讯云详情页 See merge request
!1151
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
653 additions
and
157 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/tencent_cloud_plat.js
hg-monitor-web-base/src/main/resources/static/src/controller/tencent_cloud_plat_bak.js
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/tencent_cloud_plat.html
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/tencent_cloud_plat_cluster.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/tencentCloud/index.html
hg-monitor-web-base/src/main/resources/static/vue3/src/views/tencentCloud/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/public/common/common.css
hg-monitor-web-zj/src/main/resources/static/vue3/public/css/tencentCloud.css
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/tencent-cloud-host.png
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/tencent-cloud-virtualMachine.png
hg-monitor-web-zj/src/main/resources/static/vue3/src/router/index.js
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/index.html
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/index.js
hg-monitor-web-base/src/main/resources/static/src/controller/tencent_cloud_plat.js
View file @
659fb36
...
...
@@ -11,12 +11,14 @@ layui.define(['commonDetail','common'], function (exports) {
}
else
{
resId
=
data
.
resId
;
}
localStorage
.
setItem
(
'resId'
,
resId
);
commonDetail
.
bindTips
();
//基本信息指标
var
baseKpi
=
"KPIE13DD9A3,KPIF74D9D2B"
;
//配额信息指标
var
settingKpi
=
"KPI
765DC686,KPI082FF572,KPIACD20183,KPI3882E0B7,KPI70B7AF1D
"
;
var
settingKpi
=
"KPI
2BB31EE0,KPI38E2673F,KPI576DDB1D,KPI3793A3FE,KPI8DBA891C,KPIB5848895,KPI1DA60197,KPI19A7770E,KPI4A216352,KPI9311A2A3,KPI29D42042,KPI1988842F,KPI50331084
"
;
reload
();
...
...
@@ -26,8 +28,8 @@ layui.define(['commonDetail','common'], function (exports) {
commonDetail
.
renderResHealth
(
"tencent_cloud_plat_health_state"
,
resId
);
//基本信息
commonDetail
.
renderText
(
"tencent_cloud_plat_baseinfo"
,
resId
,
baseKpi
);
//配额信息
commonDetail
.
renderTable
(
"tencent_cloud_plat_setting"
,
false
,
resId
,
settingKpi
,
"配额信息"
,
"tencent_bill_"
);
//售卖信息
commonDetail
.
renderTable
(
"tencent_cloud_plat_sales"
,
false
,
resId
,
settingKpi
,
"售卖信息"
,
"tencent-capacity"
);
//活动告警
commonDetail
.
renderActiveAlarms
(
"tencent_cloud_plat_active_alarm"
,
resId
);
}
...
...
hg-monitor-web-base/src/main/resources/static/src/controller/tencent_cloud_plat_bak.js
0 → 100644
View file @
659fb36
//tencent_cloud_plat(腾讯云)详情页js
layui
.
define
([
'commonDetail'
,
'common'
],
function
(
exports
)
{
var
commonDetail
=
layui
.
commonDetail
;
var
common
=
layui
.
common
;
//对外暴露的接口
exports
(
'tencent_cloud_plat'
,
function
(
data
)
{
var
resId
=
''
;
var
showFlag
=
common
.
getUrlParam
(
"show"
);
if
(
showFlag
&&
showFlag
==
'0'
){
resId
=
common
.
getUrlParam
(
"resId"
);
}
else
{
resId
=
data
.
resId
;
}
commonDetail
.
bindTips
();
//基本信息指标
var
baseKpi
=
"KPIE13DD9A3,KPIF74D9D2B"
;
//配额信息指标
var
settingKpi
=
"KPI765DC686,KPI082FF572,KPIACD20183,KPI3882E0B7,KPI70B7AF1D"
;
reload
();
//渲染页面
function
reload
()
{
//资源状态
commonDetail
.
renderResHealth
(
"tencent_cloud_plat_health_state"
,
resId
);
//基本信息
commonDetail
.
renderText
(
"tencent_cloud_plat_baseinfo"
,
resId
,
baseKpi
);
//配额信息
commonDetail
.
renderTable
(
"tencent_cloud_plat_setting"
,
false
,
resId
,
settingKpi
,
"配额信息"
,
"tencent_bill_"
);
//活动告警
commonDetail
.
renderActiveAlarms
(
"tencent_cloud_plat_active_alarm"
,
resId
);
}
//定时任务
var
timer
=
setInterval
(
function
()
{
reload
()
},
commonDetail
.
timerTime
);
commonDetail
.
detailTimer
.
push
(
timer
);
});
});
\ No newline at end of file
...
...
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/tencent_cloud_plat.html
View file @
659fb36
<!--tencent_cloud_plat详细页面-->
<article
class=
"page-container template template_redis"
>
<div
class=
"page-panel"
>
<div
class=
"main"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item lay-row-item--big"
>
<h5
class=
"lay-row-title"
>
基本信息
<i
data-id=
"tencent_cloud_plat_baseinfo"
class=
"iconfont detail_base_info"
>

</i></h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_baseinfo"
></ul>
</div>
<div
class=
"lay-row-item lay-row-item--small"
>
<h5
class=
"lay-row-title"
>
资源状态
</h5>
<div
class=
"res-state"
id=
"tencent_cloud_plat_health_state"
></div>
</div>
<div
class=
"lay-row"
style=
"height: 748px;"
>
<iframe
src=
"/vue3/index.html#/vue3/tencentCloud"
class=
"layadmin-iframe"
style=
"height: 748px!important;border: none!important;"
/>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
配额信息
<span
id=
"tencent_cloud_plat_settingDownload"
class=
"layui-table-link"
style=
"margin-left: 10px;"
>
下载
</span><span
id=
"tencent_cloud_plat_settingMore"
class=
"layui-table-link"
>
更多
</span></h5>
<div
id=
"tencent_cloud_plat_setting"
></div>
<h5
class=
"lay-row-title"
>
售卖情况
<span
id=
"tencent_cloud_plat_salesDownload"
class=
"layui-table-link"
style=
"margin-left: 10px;"
>
下载
</span><span
id=
"tencent_cloud_plat_salesMore"
class=
"layui-table-link"
>
更多
</span></h5>
<div
id=
"tencent_cloud_plat_sales"
></div>
</div>
</div>
<div
class=
"lay-row"
>
...
...
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/tencent_cloud_plat_cluster.html
View file @
659fb36
<style>
#content
{
padding
:
5px
;
background
:
#f1f4fb
;
}
.overview
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.overview
>
div
.overview-item
{
width
:
50%
;
box-sizing
:
border-box
;
}
.overview-item
:nth-of-type
(
1
)
{
margin-right
:
5px
;
}
.overview-item-dialog
{
border-radius
:
4px
;
padding-left
:
10px
;
padding-right
:
10px
;
background
:
#FFFFFF
;
}
.overview-item-dialog
header
{
padding
:
10px
0
;
font-size
:
18px
;
font-weight
:
bold
;
}
.overview-item
:nth-of-type
(
1
)
.overview-item-dialog
header
{
color
:
#0b50b8
;
border-bottom
:
2px
solid
#d5e5fc
;
}
.overview-item
:nth-of-type
(
2
)
.overview-item-dialog
header
{
color
:
#0069a5
;
border-bottom
:
2px
solid
#c3e9f2
;
}
.overview-item-host
,
.overview-item-virtualMachine
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
padding
:
40px
0px
;
}
.overview-item-host
{
padding-bottom
:
0
;
}
.overview-item-host
.host-img
,
.overview-item-virtualMachine
.virtualMachine-img
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
padding-right
:
20px
;
border-right
:
2px
solid
#d5e5fc
;
}
.overview-item-host
.host-img
img
,
.overview-item-virtualMachine
.virtualMachine-img
img
{
height
:
100px
;
margin-bottom
:
30px
;
}
.overview-item-host
.host-num
,
.overview-item-virtualMachine
.virtualMachine-num
{
padding-left
:
20px
;
flex
:
1
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.overview-item-host
.host-num
.host-num-item
,
.overview-item-virtualMachine
.virtualMachine-num
.virtualMachine-num-item
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
flex-direction
:
column
;
flex
:
1
;
}
.host-num-item-value
,
.virtualMachine-num-item-value
{
height
:
130px
;
line-height
:
130px
;
font-size
:
28px
;
font-weight
:
bold
;
}
.count
{
color
:
#575d6d
;
}
.success
{
color
:
#24ae1b
;
}
.error
{
color
:
#d71d04
;
}
.waring
{
color
:
#ff7f02
;
}
.overview-item-box
{
margin
:
5px
0
;
padding-left
:
10px
;
padding-right
:
10px
;
background
:
#FFFFFF
;
border-radius
:
4px
;
}
.overview-item-box
header
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#555c6c
;
padding
:
10px
0
;
border-bottom
:
2px
solid
;
}
.res-ratio
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
padding
:
20px
0px
;
}
.res-ratio
.progress
{
width
:
68%
;
margin
:
0
10px
;
background-color
:
#eef7fe
;
overflow
:
hidden
;
height
:
30px
;
border-radius
:
30px
;
}
.progress-bar
{
height
:
30px
;
line-height
:
30px
;
text-align
:
right
;
border-radius
:
30px
;
background
:
#469bf5
;
color
:
#FFFFFF
;
}
</style>
<!--tencent_cloud_plat_cluster详细页面-->
<article
class=
"page-container template template_redis"
>
<iframe
src=
"/vue3/index.html#/vue3/tencentCloud"
class=
"layadmin-iframe"
style=
"height: 99.5%!important;"
/>
</article>
\ No newline at end of file
<div
class=
"page-panel"
>
<div
class=
"main"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
基本信息
<i
data-id=
"tencent_cloud_plat_cluster_baseinfo"
class=
"iconfont detail_base_info"
>

</i></h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_baseinfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
重要信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_keyinfo"
></ul>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
Node信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_nodeinfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
Pod信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_podinfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
项目信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_projectinfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
应用信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_appinfo"
></ul>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
cpu信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_cpuinfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
内存信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_meminfo"
></ul>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
磁盘信息
</h5>
<ul
class=
"info-table"
id=
"tencent_cloud_plat_cluster_diskinfo"
></ul>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
CPU分配率
</h5>
<div
id=
"tencent_cloud_plat_cluster_cpu_linechart"
class=
"detail_line_chart"
></div>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
内存分配率
</h5>
<div
id=
"tencent_cloud_plat_cluster_mem_linechart"
class=
"detail_line_chart"
></div>
</div>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
磁盘分配率
</h5>
<div
id=
"tencent_cloud_plat_cluster_disk_linechart"
class=
"detail_line_chart"
></div>
</div>
</div>
<div
class=
"lay-row"
>
<div
class=
"lay-row-item"
>
<h5
class=
"lay-row-title"
>
实时告警动态
</h5>
<div
id=
"tencent_cloud_plat_cluster_active_alarm"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
<textarea
id=
"tencent_cloud_plat_cluster_param_id"
style=
"display: none;"
>
{{d}}
</textarea>
<script>
layui
.
use
(
'tencent_cloud_plat_cluster'
,
function
(
fn
)
{
var
$
=
layui
.
$
;
var
parm
=
$
(
"#tencent_cloud_plat_cluster_param_id"
).
val
();
if
(
parm
.
indexOf
(
'{{d'
)
!=
-
1
){
fn
();
}
else
{
fn
(
JSON
.
parse
(
parm
));
}
});
</script>
\ No newline at end of file
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/tencentCloud/index.html
View file @
659fb36
...
...
@@ -99,7 +99,7 @@
</div>
</div>
</div>
<cm-table-page
:columns=
"tableData.columns"
:dataList=
"tableData.dataList"
<
!--<
cm-table-page :columns="tableData.columns" :dataList="tableData.dataList"
:height="height - 365"
:loading="false"
:pageSize="queryParams.pageSize"
...
...
@@ -120,5 +120,5 @@
</span>
</div>
</template>
</cm-table-page>
</cm-table-page>
-->
</div>
\ No newline at end of file
...
...
hg-monitor-web-base/src/main/resources/static/vue3/src/views/tencentCloud/index.js
View file @
659fb36
...
...
@@ -161,19 +161,19 @@ export default {
}
let
dictCpu
=
{
use
:
""
,
count
:
""
,
ratio
:
""
,
use
:
"KPIB5848895"
,
count
:
"KPI8DBA891C"
,
ratio
:
"KPIC5BEEC49"
,
}
let
dictMem
=
{
use
:
""
,
count
:
""
,
ratio
:
""
,
use
:
"KPI4A216352"
,
count
:
"KPI1DA60197"
,
ratio
:
"KPI31CB8D97"
,
}
let
dictDisk
=
{
use
:
""
,
count
:
""
,
ratio
:
""
,
use
:
"KPI1988842F"
,
count
:
"KPI29D42042"
,
ratio
:
"KPI2C8A6D17"
,
}
// 获取列表
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/public/common/common.css
View file @
659fb36
...
...
@@ -54,3 +54,5 @@
/*对比分析*/
@import
"../css/analysis.css"
;
@import
"../css/tencentCloud.css"
;
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/public/css/tencentCloud.css
0 → 100644
View file @
659fb36
.overview
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
background
:
#f1f4fb
;
padding
:
5px
;
}
.overview
>
div
.overview-item
{
width
:
50%
;
box-sizing
:
border-box
;
}
.overview-item
:nth-of-type
(
1
)
{
margin-right
:
5px
;
}
.overview-item-dialog
{
border-radius
:
4px
;
background
:
#fff
;
}
.overview-item-dialog
header
{
padding
:
10px
;
font-size
:
18px
;
font-weight
:
bold
;
text-align
:
left
;
}
.overview-item
:nth-of-type
(
1
)
.overview-item-dialog
header
{
color
:
#0b50b8
;
border-bottom
:
2px
solid
#d5e5fc
;
box-shadow
:
2px
10px
10px
5px
#e5eeff
,
0px
0px
46px
5px
#e5eeff
inset
;
}
.overview-item
:nth-of-type
(
2
)
.overview-item-dialog
header
{
color
:
#0268a6
;
border-bottom
:
2px
solid
#c3e9f2
;
box-shadow
:
2px
10px
10px
5px
#dff7fb
,
0px
0px
46px
5px
#dff7fb
inset
;
}
.overview-item-host
,
.overview-item-virtualMachine
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
padding
:
40px
10px
;
}
.overview-item-host
{
padding-bottom
:
0
;
}
.overview-item-host
.host-img
,
.overview-item-virtualMachine
.virtualMachine-img
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
padding-right
:
20px
;
border-right
:
2px
solid
#d5e5fc
;
}
.overview-item-host
.host-img
img
,
.overview-item-virtualMachine
.virtualMachine-img
img
{
height
:
100px
;
margin-bottom
:
30px
;
}
.overview-item-host
.host-num
,
.overview-item-virtualMachine
.virtualMachine-num
{
padding-left
:
20px
;
flex
:
1
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.overview-item-host
.host-num
.host-num-item
,
.overview-item-virtualMachine
.virtualMachine-num
.virtualMachine-num-item
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
flex-direction
:
column
;
flex
:
1
;
}
.host-num-item-value
,
.virtualMachine-num-item-value
{
height
:
130px
;
line-height
:
130px
;
font-size
:
28px
;
font-weight
:
bold
;
}
.count
{
color
:
#575d6d
;
}
.success
{
color
:
#24ae1b
;
}
.error
{
color
:
#d71d04
;
}
.waring
{
color
:
#ff7f02
;
}
.overview-item-box
{
margin
:
5px
0
;
background
:
#FFFFFF
;
border-radius
:
4px
;
}
.overview-item-box
header
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#555c6c
;
padding
:
10px
;
text-align
:
left
;
border-bottom
:
2px
solid
#f5f7f6
;
}
.res-ratio
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
padding
:
20px
10px
;
}
.res-ratio
.progress
{
width
:
65%
;
margin
:
0
10px
;
background-color
:
#eef7fe
;
overflow
:
hidden
;
height
:
30px
;
border-radius
:
30px
;
}
.progress-bar
{
height
:
30px
;
line-height
:
30px
;
text-align
:
right
;
border-radius
:
30px
;
background
:
#469bf5
;
color
:
#FFFFFF
;
box-sizing
:
border-box
;
}
.progress-bar
>
span
{
margin-right
:
10px
;
}
\ No newline at end of file
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/tencent-cloud-host.png
0 → 100644
View file @
659fb36
9.11 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/assets/images/machineRoom/tencent-cloud-virtualMachine.png
0 → 100644
View file @
659fb36
8.9 KB
hg-monitor-web-zj/src/main/resources/static/vue3/src/router/index.js
View file @
659fb36
...
...
@@ -199,6 +199,11 @@ const routes = [{
name
:
'license'
,
component
:
()
=>
myImport
(
'views/license/index'
)
},
{
path
:
'/vue3/tencentCloud'
,
name
:
'tencentCloud'
,
component
:
()
=>
myImport
(
'views/tencentCloud/index'
)
}
];
// hash模式: createWebHashHistory
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/index.html
0 → 100644
View file @
659fb36
<div
:style=
""
class=
""
>
<div
:style=
""
class=
"cm-card"
>
<div>
<div
id=
"content"
>
<div
class=
"overview"
>
<div
class=
"overview-item"
v-for=
"(item,index) in overviewList"
:key=
"index"
>
<div
class=
"overview-item-dialog"
>
<header>
{{ item.title }}
</header>
<div
class=
"overview-item-host"
>
<div
class=
"host-img"
>
<img
src=
"/vue3/src/assets/images/machineRoom/tencent-cloud-host.png"
alt=
""
>
<span>
{{item.host.name}}
</span>
</div>
<div
class=
"host-num"
>
<div
class=
"host-num-item"
>
<span
class=
"host-num-item-value count"
>
<span>
{{item.host.total}}
</span>
<span
style=
"font-size: 16px;margin-left: 5px;"
>
台
</span>
</span>
<span>
总量
</span>
</div>
<div
class=
"host-num-item"
>
<span
class=
"host-num-item-value success"
>
{{item.host.success}}
</span>
<span>
正常
</span>
</div>
<div
class=
"host-num-item"
>
<span
class=
"host-num-item-value error"
>
{{item.host.error}}
</span>
<span>
异常
</span>
</div>
<div
class=
"host-num-item"
>
<span
class=
"host-num-item-value waring"
>
{{item.host.stop}}
</span>
<span>
暂停
</span>
</div>
<div
class=
"host-num-item"
>
<span
class=
"host-num-item-value waring"
>
{{item.host.operating}}
</span>
<span>
操作中
</span>
</div>
<div
class=
"host-num-item"
></div>
</div>
</div>
<div
class=
"overview-item-virtualMachine"
>
<div
class=
"virtualMachine-img"
>
<img
src=
"/vue3/src/assets/images/machineRoom/tencent-cloud-virtualMachine.png"
alt=
""
>
<span>
{{item.virtualMachine.name}}
</span>
</div>
<div
class=
"virtualMachine-num"
>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value count"
>
<span>
{{item.virtualMachine.total}}
</span>
<span
style=
"font-size: 16px;margin-left: 5px;"
>
台
</span>
</span>
<span>
总量
</span>
</div>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value success"
>
{{item.virtualMachine.success}}
</span>
<span>
正常
</span>
</div>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value waring"
>
{{item.virtualMachine.operating}}
</span>
<span>
操作中
</span>
</div>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value waring"
>
{{item.virtualMachine.shutdown}}
</span>
<span>
已关机
</span>
</div>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value waring"
>
{{item.virtualMachine.recovery}}
</span>
<span>
待回收
</span>
</div>
<div
class=
"virtualMachine-num-item"
>
<span
class=
"virtualMachine-num-item-value error"
>
{{item.virtualMachine.waring}}
</span>
<span>
异常
</span>
</div>
</div>
</div>
</div>
<div
class=
"overview-item-box"
>
<header>
{{item.res.title}}
</header>
<div
class=
"res-ratio"
>
<div>
CPU
</div>
<div
class=
"progress"
>
<div
:style=
"{width:item.res.cpu.ratio+'%'}"
class=
"progress-bar"
><span>
{{item.res.cpu.ratio==0?'':item.res.cpu.ratio+'%'}}
</span></div>
</div>
<div>
已使用:{{item.res.cpu.use}}核/总量:{{item.res.cpu.count}}核
</div>
</div>
<div
class=
"res-ratio"
>
<div>
内存
</div>
<div
class=
"progress"
>
<div
:style=
"{width:item.res.storage.ratio+'%'}"
class=
"progress-bar"
><span>
{{item.res.storage.ratio==0?'':item.res.storage.ratio+'%'}}
</span></div>
</div>
<div>
已使用:{{item.res.storage.use}}G/总量:{{item.res.storage.count}}G
</div>
</div>
<div
class=
"res-ratio"
>
<div>
磁盘
</div>
<div
class=
"progress"
>
<div
:style=
"{width:item.res.disk.ratio+'%'}"
class=
"progress-bar"
><span>
{{item.res.disk.ratio==0?'':item.res.disk.ratio+'%'}}
</span></div>
</div>
<div>
已使用:{{item.res.disk.use}}G/总量:{{item.res.disk.count}}G
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
...
...
hg-monitor-web-zj/src/main/resources/static/vue3/src/views/tencentCloud/index.js
0 → 100644
View file @
659fb36
export
default
{
name
:
"tencentCloud"
,
template
:
''
,
components
:
{
},
props
:
[],
setup
(
props
,{
attrs
,
slots
,
emit
}){
const
{
proxy
}
=
Vue
.
getCurrentInstance
();
const
resId
=
localStorage
.
getItem
(
'resId'
);
let
height
=
Vue
.
ref
(
window
.
innerHeight
);
let
overviewList
=
Vue
.
ref
([
{
title
:
"CVM(overlay)资源实例概览"
,
host
:{
name
:
"overlay宿主机"
,
total
:
0
,
success
:
0
,
error
:
0
,
stop
:
0
,
operating
:
0
,
},
virtualMachine
:{
name
:
"overlay虚拟机"
,
total
:
0
,
success
:
0
,
operating
:
0
,
shutdown
:
0
,
recovery
:
0
,
waring
:
0
},
res
:{
title
:
"overlay资源(核)"
,
cpu
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
},
storage
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
},
disk
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
}
}
},
{
title
:
"CVM(underlay)资源实例概览"
,
host
:{
name
:
"underlay宿主机"
,
total
:
0
,
success
:
0
,
error
:
0
,
stop
:
0
,
operating
:
0
,
},
virtualMachine
:{
name
:
"underlay虚拟机"
,
total
:
0
,
success
:
0
,
operating
:
0
,
shutdown
:
0
,
recovery
:
0
,
waring
:
0
},
res
:{
title
:
"underlay资源(核)"
,
cpu
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
},
storage
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
},
disk
:{
use
:
0
,
count
:
0
,
ratio
:
0
,
}
}
}
])
let
dict
=
{
total
:
"KPI43C8CCFC"
,
success
:
"KPI95E996B3"
,
error
:
"KPI597F8EA4"
,
stop
:
"KPIC1A8B053"
,
operating
:
"KPIBD0389BD"
,
shutdown
:
"KPI7FCD9C30"
,
recovery
:
"KPI7FCD9C30"
,
waring
:
"KPICA7BF228"
,
}
let
dictCpu
=
{
use
:
"KPIB5848895"
,
count
:
"KPI8DBA891C"
,
ratio
:
"KPIC5BEEC49"
,
}
let
dictMem
=
{
use
:
"KPI4A216352"
,
count
:
"KPI1DA60197"
,
ratio
:
"KPI31CB8D97"
,
}
let
dictDisk
=
{
use
:
"KPI1988842F"
,
count
:
"KPI29D42042"
,
ratio
:
"KPI2C8A6D17"
,
}
// 获取列表
let
getDataList
=
()
=>
{
// 资源实例概览
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"overlay-physic-"
,
kpiIds
:
"KPI43C8CCFC,KPI95E996B3,KPI597F8EA4,KPIC1A8B053,KPIBD0389BD"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dict
){
overviewList
.
value
[
0
].
host
[
i
]
=
res
.
map
[
dict
[
i
]]
||
0
;
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"overlay-virtual-"
,
kpiIds
:
"KPI43C8CCFC,KPI95E996B3,KPIBD0389BD,KPI7FCD9C30,KPICA7BF228,KPI597F8EA4"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dict
){
overviewList
.
value
[
0
].
virtualMachine
[
i
]
=
res
.
map
[
dict
[
i
]]
||
0
;
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"underlay-physic-"
,
kpiIds
:
"KPI43C8CCFC,KPI95E996B3,KPI597F8EA4,KPIC1A8B053,KPIBD0389BD"
,
},(
res
)
=>
{
console
.
log
(
res
.
map
);
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dict
){
overviewList
.
value
[
1
].
host
[
i
]
=
res
.
map
[
dict
[
i
]]
||
0
;
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"underlay-virtual-"
,
kpiIds
:
"KPI43C8CCFC,KPI95E996B3,KPIBD0389BD,KPI7FCD9C30,KPICA7BF228,KPI597F8EA4"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dict
){
overviewList
.
value
[
1
].
virtualMachine
[
i
]
=
res
.
map
[
dict
[
i
]]
||
0
;
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
// 资源使用率
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"overlay-cpu"
,
kpiIds
:
"KPI8DBA891C,KPIB5848895,KPIC5BEEC49"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictCpu
){
overviewList
.
value
[
0
].
res
.
cpu
[
i
]
=
res
.
map
[
dictCpu
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"overlay-mem"
,
kpiIds
:
"KPI1DA60197,KPI4A216352,KPI31CB8D97"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictMem
){
overviewList
.
value
[
0
].
res
.
storage
[
i
]
=
res
.
map
[
dictMem
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"overlay-disk"
,
kpiIds
:
"KPI29D42042,KPI1988842F,KPI2C8A6D17"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictDisk
){
overviewList
.
value
[
0
].
res
.
disk
[
i
]
=
res
.
map
[
dictDisk
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"underlay-cpu"
,
kpiIds
:
"KPI8DBA891C,KPIB5848895,KPIC5BEEC49"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictCpu
){
overviewList
.
value
[
1
].
res
.
cpu
[
i
]
=
res
.
map
[
dictCpu
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"underlay-mem"
,
kpiIds
:
"KPI1DA60197,KPI4A216352,KPI31CB8D97"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictMem
){
overviewList
.
value
[
1
].
res
.
storage
[
i
]
=
res
.
map
[
dictMem
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
proxy
.
$http
.
get
(
`
/
api
-
web
/
detail
/
getTencentCloudPlatInfo
`
,{
resId
:
resId
,
flag
:
"underlay-disk"
,
kpiIds
:
"KPI29D42042,KPI1988842F,KPI2C8A6D17"
,
},(
res
)
=>
{
if
(
Object
.
keys
(
res
.
map
).
length
){
for
(
let
i
in
dictDisk
){
overviewList
.
value
[
1
].
res
.
disk
[
i
]
=
res
.
map
[
dictDisk
[
i
]];
}
}
},(
err
)
=>
{
console
.
log
(
err
);
})
};
getDataList
();
return
{
height
,
overviewList
,
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment