File tree Expand file tree Collapse file tree
components/opscloud/platform
pages/workbench/continuous-integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
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 () {
5658 JenkinsEngineStatus,
5759 MyCiJobTable,
5860 MyCdJobTable,
59- AnnouncementCarousel
61+ AnnouncementCarousel,
62+ BlockPlatformStatus
6063 },
6164 beforeDestroy () {
6265 clearInterval (this .timer ) // 销毁定时器
You can’t perform that action at this time.
0 commit comments