1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<template>
<b-container
:style="{ display: 'flex', 'flex-direction': 'column' }"
fluid="xxl pt-0 m-0"
>
<page-title />
<div class="main-container">
<data-tabs
:slots="raidSlots"
:switch-tab="switchRaidSlot"
:current-tab="currentRaidSlot"
:slot-width="100"
:slider-width="79"
style="margin-top: 16px"
/>
<page-section class="bootstrap-table__section info_section">
<span class="bold-16px">{{ $t('RAID.cache_info') }}</span>
<b-table
responsive="md"
show-empty
class="bootstrap-rounded-table"
:items="items"
:fields="fields"
:empty-text="$t('global.table.emptyMessage')"
>
</b-table>
</page-section>
</div>
</b-container>
</template>
<script>
import PageTitle from '@/components/Global/PageTitle';
import PageSection from '@/components/Global/PageSection';
import DataTabs from '@/components/Global/SilaComponents/DataTabs';
export default {
components: { PageTitle, PageSection, DataTabs },
data() {
return {
currentRaidSlot: 1,
raidSlots: [
{ id: 1, name: 'Контроллер 1' },
{ id: 2, name: 'Контроллер 2' },
{ id: 3, name: 'Контроллер 3' },
],
fields: [
{
key: 'parametr',
label: 'Параметр',
formatter: this.dataFormatter,
thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
class: `bootstrap-rounded-table__column-first
cache-table-col-first`,
tdClass: 'regular-12px bootstrap-rounded-table__td',
},
{
key: 'value',
label: 'Значение',
formatter: this.dataFormatter,
thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg',
class: 'bootstrap-rounded-table__column-last',
tdClass: 'regular-12px bootstrap-rounded-table__td',
},
],
items: [
{
parametr: 'Статус наличия',
value: 'Есть',
},
{
parametr: 'Текущее значение занятой емкости',
value: '1 024 000 Мб',
},
{
parametr: 'Текущее значение свободной емкости',
value: '1 004 256 Мб',
},
{
parametr: 'Статус наличия BBU',
value: 'Есть',
},
{
parametr: 'Статус наличия FBU',
value: 'Нет',
},
{
parametr: 'Состояние BBU',
value: 'Готов',
},
{
parametr: 'Состояние FBU',
value: 'Заряжается',
},
{
parametr: 'Номинальная емкость',
value: '1 004 256 Мб',
},
],
};
},
methods: {
switchRaidSlot(period) {
this.currentRaidSlot = period;
},
},
};
</script>
<style lang="scss">
.cache-table-col-first {
width: 50%;
}
</style>
<style lang="scss" scoped>
.bootstrap-table__section {
margin-bottom: 24px;
}
.bold-16px {
display: block;
margin: 0 0 16px 0;
}
</style>
|