Skip to content

Commit f20505a

Browse files
author
白衣
committed
封网
1 parent dce222e commit f20505a

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

src/api/platform/platform.block.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import request from '@/plugin/axios'
2+
3+
const baseUrl = '/platform'
4+
5+
export function queryBlockPlatformStatus () {
6+
return request({
7+
url: baseUrl + '/block/status/query',
8+
method: 'get'
9+
})
10+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div>
3+
<div v-show="isShow">
4+
<div v-for="item in status.blockPlatforms" :key="item.id" style="margin-bottom: 10px">
5+
<el-alert :title="item.comment" type="warning" show-icon>封网时间 {{ item.startTime}} - {{ item.endTime}}</el-alert>
6+
</div>
7+
</div>
8+
</div>
9+
</template>
10+
11+
<script>
12+
13+
import { queryBlockPlatformStatus } from '@api/platform/platform.block.js'
14+
15+
export default {
16+
name: 'BlockPlatformStatus',
17+
data () {
18+
return {
19+
status: {
20+
blockPlatforms: []
21+
},
22+
isShow: true
23+
}
24+
},
25+
mounted () {
26+
this.fetchData()
27+
},
28+
components: {},
29+
methods: {
30+
fetchData () {
31+
queryBlockPlatformStatus()
32+
.then(res => {
33+
this.status = res.body
34+
this.isShow = this.status.show
35+
})
36+
}
37+
}
38+
}
39+
</script>
40+
41+
<style scoped>
42+
43+
</style>

src/pages/workbench/continuous-integration/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
</el-col>
1111
<el-col :span="17">
1212
<announcement-carousel></announcement-carousel>
13+
<block-platform-status></block-platform-status>
1314
<el-card shadow="hover" v-show="buildType">
1415
<div slot="header" class="clearfix">
1516
<span>All build jobs</span>
@@ -41,6 +42,7 @@
4142
import MyCiJobTable from '@/components/opscloud/application/MyCiJobTable.vue'
4243
import MyCdJobTable from '@/components/opscloud/application/MyCdJobTable.vue'
4344
import AnnouncementCarousel from '@/components/opscloud/announcement/AnnouncementCarousel.vue'
45+
import BlockPlatformStatus from '@/components/opscloud/platform/BlockPlatformStatus.vue'
4446
4547
export default {
4648
data () {
@@ -56,7 +58,8 @@
5658
JenkinsEngineStatus,
5759
MyCiJobTable,
5860
MyCdJobTable,
59-
AnnouncementCarousel
61+
AnnouncementCarousel,
62+
BlockPlatformStatus
6063
},
6164
beforeDestroy () {
6265
clearInterval(this.timer) // 销毁定时器

0 commit comments

Comments
 (0)