summaryrefslogtreecommitdiff
path: root/src/views/SILA/AnalyticalPanel/AnalyticalPanelPage.vue
blob: b736f02608c9f6f536b751933e007fab5731fdd6 (plain)
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
  <b-container fluid="xxl pt-0 m-0">
    <page-title />
    <div class="main-container">
      <div class="tables-container">
        <div class="server-table">
          <span class="semi-bold-16px">Состояние сервера</span>
          <b-table
            show-empty
            responsive="md"
            class="bootstrap-analytical-table"
            :items="server_items"
            :fields="server_fields"
          >
            <template #cell(value)="{ value }">
              <b-col v-if="value" col="1">
                <img
                  src="@/assets/images/icon-ok.svg"
                  class="system-network-table__icon"
                />
              </b-col>
              <b-col v-else>
                <img
                  src="@/assets/images/icon-no.svg"
                  class="system-network-table__icon"
                />
              </b-col>
            </template>
          </b-table>
        </div>
        <div class="events-table">
          <span class="semi-bold-16px">События</span>
          <b-table
            show-empty
            responsive="md"
            class="bootstrap-analytical-table"
            :items="events_items"
            :fields="events_fields"
          >
          </b-table>
        </div>
      </div>
    </div>
  </b-container>
</template>

<script>
import PageTitle from '@/components/Global/PageTitle';

export default {
  components: {
    PageTitle,
  },

  data() {
    return {
      server_fields: [
        {
          key: 'param',
          label: 'Раздел',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-analytical-table__head_bg',
          class: 'bootstrap-analytical-table__column-first',
          tdClass: 'regular-12px bootstrap-analytical-table__td',
        },
        {
          key: 'value',
          label: 'Статус',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-analytical-table__head_bg',
          class:
            'bootstrap-rounded-table__column-last analytical-table__status',
          tdClass: 'regular-12px bootstrap-analytical-table__td',
        },
      ],
      server_items: [
        { param: 'Сервер №1', value: true },
        { param: 'ВМС', value: true },
        { param: 'Аналитическая панель', value: true },
        { param: 'RAID-контроллеры', value: false },
        { param: 'Модули памяти', value: true },
        { param: 'Процессоры', value: true },
        { param: 'Источники питания', value: true },
        { param: 'Вентиляторы', value: true },
        { param: 'Физические накопители', value: true },
        { param: 'Виртуальные накопители', value: true },
        { param: 'Материнская плата', value: true },
        { param: 'Сетевые адаптеры', value: true },
        { param: 'PCI устройства', value: true },
      ],
      events_fields: [
        {
          key: 'time',
          label: 'Время',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-analytical-table__head_bg',
          class: 'bootstrap-analytical-table__column-first',
          tdClass: 'regular-12px bootstrap-analytical-table__td',
        },
        {
          key: 'type',
          label: 'Тип события',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-analytical-table__head_bg',
          tdClass: 'regular-12px bootstrap-analytical-table__td',
        },
        {
          key: 'info',
          label: 'О событии',
          formatter: this.dataFormatter,
          thClass: 'semi-bold-12px__caps bootstrap-analytical-table__head_bg',
          class: 'bootstrap-rounded-table__column-last',
          tdClass: 'regular-12px bootstrap-analytical-table__td',
        },
      ],
      events_items: [
        { time: 'Сервер №1', type: 'Критические', info: 'true' },
        { time: 'ВМС', type: 'Критические', info: 'true' },
        {
          time: 'Аналитическая панель',
          type: 'Критические',
          info: 'true',
        },
        {
          time: 'RAID-контроллеры',
          type: 'Критические',
          info: 'false',
        },
        {
          time: 'Модули памяти',
          type: 'Критические',
          info: 'true',
        },
        { time: 'Процессоры', type: 'Критические', info: 'true' },
        {
          time: 'Источники питания',
          type: 'Критические',
          info: 'true',
        },
        { time: 'Вентиляторы', type: 'Критические', info: 'true' },
        { time: 'Физические накопители', type: 'Критические', info: 'true' },
      ],
    };
  },
};
</script>
<style lang="scss">
.analytical-table__status {
  width: 10%;
}
</style>
<style lang="scss" scoped>
.tables-container {
  display: flex;
  flex-flow: row nowrap;
  margin: 16px 32px;
  gap: 24px;
}

.server-table {
  width: 35%;
}

.events-table {
  width: 65%;
}
</style>