summaryrefslogtreecommitdiff
path: root/src/components/Global/SilaComponents/InventoryControlSystem.vue
blob: de5432e14f4c8beb7f97252e51acc9597485f2cd (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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<template>
  <page-section class="system-control-section">
    <div class="system-control__table">
      <div class="system-control__table__row">
        <div class="system-control__table__cell">
          <div>
            <span class="semi-bold-12px">
              {{ $t('SystemDescription.title.ReloadServer') }}
            </span>
          </div>
          <popover
            id="popover-reactive-1"
            description="SystemDescription.ReloadOSAndServer"
            popup="SystemDescription.ReloadOSAndServer_popup"
          />
          <popover
            id="popover-reactive-2"
            description="SystemDescription.ReloadServer"
            popup="SystemDescription.ReloadServer_popup"
          />
          <div>
            <span class="regular-12px underline" @click="redirectConsole">
              {{ $t('SystemDescription.ConnectToDesktop') }}
            </span>
          </div>
        </div>

        <div class="system-control__table__cell system-control__table__cell__2">
          <div class="reload-progress__container">
            <span class="regular-12px">
              {{ $t('SystemDescription.status') }}
            </span>
            <span class="semi-bold-12px progress_bar_percent"
              >{{ progress1.value }}%</span
            >
            <b-progress
              class="reload-progress"
              :value="progress1.value"
            ></b-progress>
          </div>
          <div class="reload-progress__container">
            <span class="regular-12px">
              {{ $t('SystemDescription.status') }}
            </span>
            <span
              v-if="progress2.value === null"
              class="semi-bold-12px progress_bar_percent"
              >{{ $t('SystemDescription.NotRunning') }}</span
            >
            <span v-else class="semi-bold-12px progress_bar_percent"
              >{{ progress2.value }}%</span
            >
            <b-progress
              class="reload-progress"
              :value="progress2.value"
            ></b-progress>
          </div>
        </div>

        <div class="system-control__table__cell">
          <div>
            <span class="semi-bold-12px">
              {{ $t('SystemDescription.title.OnOffServer') }}
            </span>
          </div>
          <div>
            <popover
              id="popover-reactive-3"
              description="SystemDescription.OffOsAndServer"
              popup="SystemDescription.OffOsAndServer_popup"
              button="global.action.off"
            />
            <popover
              id="popover-reactive-4"
              description="SystemDescription.OffServer"
              popup="SystemDescription.OffServer_popup"
              button="global.action.off"
            />
          </div>
        </div>
      </div>
      <div class="system-control__table__row">
        <div class="system-control__table__cell system-control__table__cell__4">
          <div>
            <span class="semi-bold-12px">
              {{ $t('SystemDescription.title.setupDatetime') }}
            </span>
          </div>
          <b-form @submit.prevent="onResetSubmit">
            <b-form-radio-group
              v-model="timeOption"
              class="system-control__radio regular-12px"
            >
              <b-form-radio value="NTP">
                {{ $t('SystemDescription.GetNtpFromServer') }}
              </b-form-radio>
              <b-form-radio value="serverDate">
                {{ $t('SystemDescription.UseServerDatettime') }}
              </b-form-radio>
            </b-form-radio-group>
          </b-form>
          <ntp-popover
            id="popover-reactive-5"
            description="SystemDescription.NtpSettings"
          />
        </div>
      </div>
    </div>
  </page-section>
</template>

<script>
import PageSection from '@/components/Global/PageSection';
import Popover from '@/components/Global/Popover';
import NtpPopover from '@/components/Global/SilaComponents/NtpPopover';

export default {
  components: {
    PageSection,
    NtpPopover,
    Popover,
  },
  data() {
    return {
      timeOption: 'resetBios',
      picked: '',
      options: [
        { text: 'Toggle this custom radio', value: 'first' },
        { text: 'Or toggle this other custom radio', value: 'second' },
      ],
      progress1: {
        value: 90,
      },
      progress2: {
        value: null,
      },
    };
  },
  methods: {
    redirectConsole() {
      this.$router.push('/console/kvm');
    },
  },
};
</script>
<style lang="scss" scoped>
a {
  list-style-type: none;
}

.system-control-section {
  position: relative;
  margin: 16px 2rem 2rem !important;
  width: 90%;
}

.system-control__table__row {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  width: 85%;
}

.system-control__table__cell {
  display: flex;
  flex-flow: column nowrap;
  align-items: flex-start;
  row-gap: 6px;
}

.system-control__table__cell__2 {
  margin-top: 37px;
  row-gap: 14px;
}

.reload-progress__container {
  display: flex;
  flex-flow: row nowrap;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  column-gap: 4px;
}

.semi-bold-12px {
  display: inline-block;
}

label {
  padding-top: 5px;
}
.system-control__table__cell__4 {
  margin-top: 26px;
}

.custom-radio ::before {
  border: 1px solid $red-brand-primary;
  background-color: #fff;
  border-radius: 100%;
}

.system-control-section::v-deep
  .custom-control-input:checked
  ~ .custom-control-label::before {
  border: 2px solid $red-brand-primary;
  background-color: $red-brand-primary;
  box-shadow: 0px 0px 0px 2.5px $white inset;
  border-radius: 100%;
}

.system-control-section::v-deep
  .custom-control-input:hover
  ~ .custom-control-label::before {
  background-color: $red-brand-primary-hover !important;
  box-shadow: 0px 0px 0px 2.5px $white inset;
  border-color: $red-brand-primary-hover;
}

.system-control-section::v-deep
  .custom-control-input:checked
  ~ .custom-control-label::after {
  background-image: none !important;
  border-radius: 100%;
}

.system-control-section::v-deep
  .custom-control-input:active
  ~ .custom-control-label::before {
  background-color: $red-brand-primary-active !important;
  box-shadow: 0px 0px 0px 2.5px $white inset;
  border-color: $red-brand-primary-active;
}
</style>