|
16 | 16 | // under the License. |
17 | 17 |
|
18 | 18 | <template> |
19 | | - <a-row :gutter="24" style="margin: 6px"> |
20 | | - <a-col |
21 | | - :md="6" |
22 | | - :style="{ marginBottom: '12px', marginTop: '12px' }" |
23 | | - v-for="(section, index) in sections" |
24 | | - v-if="routes[section]" |
25 | | - :key="index"> |
26 | | - <chart-card :loading="loading"> |
27 | | - <div class="chart-card-inner"> |
28 | | - <router-link :to="{ name: section.substring(0, section.length - 1) }"> |
29 | | - <h2>{{ $t(routes[section].title) }}</h2> |
30 | | - <h1><a-icon :type="routes[section].icon" /> {{ stats[section] }}</h1> |
31 | | - </router-link> |
32 | | - </div> |
33 | | - </chart-card> |
| 19 | + <a-row :gutter="24"> |
| 20 | + <a-col :md="18"> |
| 21 | + <a-card> |
| 22 | + <breadcrumb /> |
| 23 | + </a-card> |
34 | 24 | </a-col> |
35 | | - <!-- move refresh and ssl cert setup somewhere more friendly --> |
36 | 25 | <a-col |
37 | | - :md="6" |
38 | | - :style="{ marginBottom: '12px', marginTop: '12px' }"> |
| 26 | + :md="6" > |
39 | 27 | <a-card> |
40 | 28 | <a-button |
41 | | - style="width: 100%" |
42 | | - icon="reload" |
| 29 | + style="margin-left: 10px; float: right" |
43 | 30 | @click="fetchData()" |
| 31 | + icon="reload" |
44 | 32 | :loading="loading" |
45 | 33 | type="primary"> |
46 | 34 | {{ $t('Refresh') }} |
47 | 35 | </a-button> |
48 | 36 | <a-button |
49 | | - style="width: 100%" |
| 37 | + style="margin-left: 10px; float: right" |
| 38 | + @click="sslFormVisible = true" |
50 | 39 | icon="safety-certificate"> |
51 | 40 | {{ $t('SSL Certificate') }} |
52 | 41 | </a-button> |
| 42 | + <a-modal |
| 43 | + :title="$t('SSL Certificate')" |
| 44 | + v-model="sslFormVisible" |
| 45 | + @ok="handle"> |
| 46 | + <p>Some contents...</p> |
| 47 | + <p>Some contents...</p> |
| 48 | + <p>Some contents...</p> |
| 49 | + </a-modal> |
53 | 50 | </a-card> |
54 | 51 | </a-col> |
| 52 | + <a-col |
| 53 | + :md="6" |
| 54 | + :style="{ marginBottom: '12px', marginTop: '12px' }" |
| 55 | + v-for="(section, index) in sections" |
| 56 | + v-if="routes[section]" |
| 57 | + :key="index"> |
| 58 | + <chart-card :loading="loading"> |
| 59 | + <div class="chart-card-inner"> |
| 60 | + <router-link :to="{ name: section.substring(0, section.length - 1) }"> |
| 61 | + <h2>{{ $t(routes[section].title) }}</h2> |
| 62 | + <h1><a-icon :type="routes[section].icon" /> {{ stats[section] }}</h1> |
| 63 | + </router-link> |
| 64 | + </div> |
| 65 | + </chart-card> |
| 66 | + </a-col> |
55 | 67 | </a-row> |
56 | 68 | </template> |
57 | 69 |
|
58 | 70 | <script> |
59 | 71 | import { api } from '@/api' |
60 | 72 | import router from '@/router' |
61 | 73 |
|
| 74 | +import Breadcrumb from '@/components/widgets/Breadcrumb' |
62 | 75 | import ChartCard from '@/components/widgets/ChartCard' |
63 | 76 |
|
64 | 77 | export default { |
65 | 78 | name: 'InfraSummary', |
66 | 79 | components: { |
| 80 | + Breadcrumb, |
67 | 81 | ChartCard |
68 | 82 | }, |
69 | 83 | data () { |
70 | 84 | return { |
71 | 85 | loading: true, |
72 | | - sections: ['zones', 'pods', 'clusters', 'hosts', 'storagepools', 'imagestores', 'systemvms', 'routers', 'cpusockets', 'managementservers', 'alerts'], |
73 | 86 | routes: {}, |
| 87 | + sections: ['zones', 'pods', 'clusters', 'hosts', 'storagepools', 'imagestores', 'systemvms', 'routers', 'cpusockets', 'managementservers', 'alerts'], |
| 88 | + sslFormVisible: false, |
74 | 89 | stats: {} |
75 | 90 | } |
76 | 91 | }, |
@@ -99,6 +114,9 @@ export default { |
99 | 114 | }).finally(f => { |
100 | 115 | this.loading = false |
101 | 116 | }) |
| 117 | + }, |
| 118 | + handleSslForm (e) { |
| 119 | + console.log(e) |
102 | 120 | } |
103 | 121 | } |
104 | 122 | } |
|
0 commit comments