Commit 46036376 authored by 张俊's avatar 张俊

运行状态样式

parent 85c67c0f
<template> <template>
<div class="card"> <div class="card" :style="flag?{borderRadius: '0px 12px 0px 0px'}:{}">
<div class="card_title"><div class="circle"></div>{{title}}</div> <div class="card_title"><div class="circle"></div>{{title}}</div>
<div class="card_contain"> <div class="card_contain">
<slot></slot> <slot></slot>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<script> <script>
export default { export default {
props: ['title'], props: ['title','flag'],
components: { components: {
}, },
......
...@@ -57,7 +57,9 @@ export default { ...@@ -57,7 +57,9 @@ export default {
methods: { methods: {
subevent(val){ subevent(val){
if(val == 0){ if(val == 0){
this.$emit('deploy',this.data) // this.$emit('deploy',this.data)
this.$router.push(`/yygl/${this.$route.params.level}/${this.$route.params.type}/deployment/${this.$route.params.id}`)
console.log(this.$route);
}else if(val == 1){ }else if(val == 1){
this.$emit('editapp') this.$emit('editapp')
}else if(val == 2){ }else if(val == 2){
......
...@@ -125,34 +125,77 @@ ...@@ -125,34 +125,77 @@
</nor-card> </nor-card>
</div> </div>
<p class="service_title" style="margin-top:20px;"> <p class="service_title" style="margin-top:20px;">
<span></span>应用设置 <span></span>微服务
</p> </p>
<div class="addimage">多版本回滚</div> <div style="overflow:hidden;height:700px;">
<p class="imagebox"> <el-scrollbar class="service_list">
<span <div class="service_box" v-for="(item,index) in service_list_arr" :key="index+60000">{{item.service}} <span v-if="item.is_unhealth" class="service_tips">故障</span> </div>
@click="image_select = index" </el-scrollbar>
:style=" <div class="service_detail">
image_select == index <nor-card title="服务概况" flag="true">
? { backgroundColor: '#8390ee', color: '#f8f9fd' } <template>
: {} <div style="overflow:hidden;height:160px;padding-top:10px;">
" <div style="height:115px;padding-top:10px;" class="service_card_box">
v-for="(item, index) in image_arr" <p
:key="index + 6000" style="color: #707693;font-size: 16px;text-align:center;"
>{{ item.name }}</span> >服务状态</p>
</p> <waveIcon :state="yx_state.state" style="margin:10px auto;"></waveIcon>
<table-um <p
v-for="(item, index) in image_arr" style="color: #58617a;font-size: 16px;text-align:center;"
:key="index+7000" >{{ yx_state.state }}</p>
v-show="image_select == index" </div>
:headers="header_image_arr"
:datas="image_arr[index].data" <div style="height:115px;" class="service_num service_card_box">
:stripe="true" <span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">服务平均响应时间</span>
:paginationShow="true" <p>{{ yx_state.averageTime }}</p>
@update="update" <p>最大响应时间:{{ yx_state.maxTime }}</p>
@rollback="rollback" </div>
@grouppublic="grouppublic"
@online="online" <div style="height:115px;" class="service_num service_card_box">
></table-um> <span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">吞吐率</span>
<p>{{ yx_state.averageTraffic }}</p>
<p>最大吞吐率:{{ yx_state.maxTraffic }}</p>
</div>
<div style="height:115px;padding-top:30px;" class="service_num service_card_box">
<span style="color: #707693;font-size: 16px;text-align:center;margin-bottom:26px;display:inline-block;">内存使用</span>
<p>{{ yx_state.memory }}</p>
</div>
</div>
</template>
</nor-card>
<nor-card title="服务设置" flag="true">
<div class="addimage">多版本回滚</div>
<!-- <p class="imagebox">
<span
@click="image_select = index"
:style="
image_select == index
? { backgroundColor: '#8390ee', color: '#f8f9fd' }
: {}
"
v-for="(item, index) in image_arr"
:key="index + 6000"
>{{ item.name }}</span>
</p> -->
<table-um
v-for="(item, index) in image_arr"
:key="index+7000"
v-show="image_select == index"
:headers="header_image_arr"
:datas="image_arr[index].data"
:stripe="true"
:paginationShow="true"
@update="update"
@rollback="rollback"
@grouppublic="grouppublic"
@online="online"
></table-um>
</nor-card>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -191,6 +234,84 @@ export default { ...@@ -191,6 +234,84 @@ export default {
oldpag_name: "镜像文件002.rar", oldpag_name: "镜像文件002.rar",
imgList: [], imgList: [],
imgList1: [], imgList1: [],
service_list_arr:[
{
service:'cemplat-api1',
is_unhealth:1
},
{
service:'cemplat-api1',
is_unhealth:1
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
{
service:'cemplat-api1',
is_unhealth:0
},
],
yx_state: { yx_state: {
state: "", state: "",
averageTime: "", averageTime: "",
...@@ -477,6 +598,7 @@ export default { ...@@ -477,6 +598,7 @@ export default {
this.getServiceBaseInfo(); this.getServiceBaseInfo();
this.getServiceyxztInfo(); this.getServiceyxztInfo();
this.getImageInfo(); this.getImageInfo();
this.get_service_list();
if (this.$route.query.showstate) { if (this.$route.query.showstate) {
this.now_service = 1; this.now_service = 1;
} }
...@@ -662,12 +784,24 @@ export default { ...@@ -662,12 +784,24 @@ export default {
let data = response.data.data; let data = response.data.data;
this.markdown = data; this.markdown = data;
}); });
},
get_service_list(){
this.$http
.get(`/apaas/hubApi/market/services/${this.$route.params.deploy_id}`)
.then(response => {
if(response.data.success){
this.service_list_arr = response.data.data
}
})
} }
} }
}; };
</script> </script>
<style> <style>
.el-scrollbar__wrap {
overflow-x: hidden;
}
.savebtn .el-button { .savebtn .el-button {
float: right; float: right;
margin-left: 20px; margin-left: 20px;
...@@ -684,7 +818,8 @@ export default { ...@@ -684,7 +818,8 @@ export default {
.info_contain2 .el-input__inner { .info_contain2 .el-input__inner {
background-color: #f7f8f9; background-color: #f7f8f9;
width: 1022px; width: 1022px;
} }
</style> </style>
<style scoped> <style scoped>
.detail_contain { .detail_contain {
...@@ -772,6 +907,7 @@ export default { ...@@ -772,6 +907,7 @@ export default {
border-radius: 8px; border-radius: 8px;
margin-top: 20px; margin-top: 20px;
margin-bottom: 30px; margin-bottom: 30px;
margin-left: 40px;
cursor: pointer; cursor: pointer;
} }
.use_know p { .use_know p {
...@@ -881,4 +1017,50 @@ export default { ...@@ -881,4 +1017,50 @@ export default {
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.service_list{
float: left;
width: 400px;
height: 100%;
overflow-x: hidden;
border: 1px solid #e5f0ff;
border-radius: 12px 0px 0px 12px;
}
.service_box{
width: 400px;
height: 48px;
line-height: 48px;
text-align: left;
padding-left: 38px;
border-bottom: 1px solid #e5f0ff;
position: relative;
cursor: pointer;
}
.service_tips{
display: inline-block;
position: absolute;
font-size: 12px;
color: #e15260;
width: 42px;
height: 20px;
line-height: 20px;
text-align: center;
background-color: #ffefef;
border-radius: 4px;
border: solid 1px #d7a4a9;
top:13px;
right:50px;
}
.service_detail{
float: left;
height: 270px;
width: calc(100% - 425px);
}
.service_card_box{
float: left;
border-right: 1px solid #e5f0ff;
width: calc(25%);
}
.card_contain .service_card_box:nth-last-of-type(1){
border-right:0;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment