summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Zakharov <m.zakharov@IBS.RU>2022-07-25 14:44:44 +0300
committerMaksim Zakharov <m.zakharov@IBS.RU>2022-07-25 14:44:44 +0300
commitf1c66a53a142a2c590830aff32aeff2e3c589449 (patch)
treee114bd66e7296d26a29f97d416f139de970d182c
parentf8f67579ce0b85b982761b3654ab84d079805eeb (diff)
downloadwebui-vue-f1c66a53a142a2c590830aff32aeff2e3c589449.tar.xz
add divider for memory
-rw-r--r--src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue137
1 files changed, 93 insertions, 44 deletions
diff --git a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
index db304d24..78dbc98f 100644
--- a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
+++ b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue
@@ -1,55 +1,104 @@
<template>
<b-container fluid="xl">
<page-title :description="$t('appPageTitle.dynamicInformation')" />
-
- <chart
- type="memory"
- :colors="colors"
- :data="filteredSensors"
- :warning="temperatureWarning"
- :non-normal="temperatureNonNormal"
- :critical-start="temperatureCriticalStart"
- ></chart>
- <b-table
- v-if="items && items.length > 0"
- responsive="md"
- show-empty
- table-variant="accessory"
- hover
- :items="items"
- :fields="fields"
- :empty-text="$t('global.table.emptyMessage')"
- >
- <template #cell(name)="{ value, index }">
- <div
- class="item-color"
- :style="`background-color: ${colors[index]}`"
- ></div>
- {{ value }}
- </template>
- <template #cell(minDate)="{ value }">
- <span style="color: rgb(12, 28, 41)">
- {{ value.time }}
- </span>
- <span>
- {{ value.date }}
- </span>
- </template>
- <template #cell(maxDate)="{ value }">
- <span style="color: rgb(12, 28, 41)">
- {{ value.time }}
- </span>
- <span>
- {{ value.date }}
- </span>
- </template>
- </b-table>
+ <table-date-picker style="margin: -2rem 0 0 -2rem" />
+ <div class="custom-divider" style="margin-top: 0">
+ <b-button
+ variant="collapse"
+ class="d-flex flex-nowrap justify-content-start"
+ >
+ <img src="@/assets/images/_sila/collapsed/temperature.svg" />
+ {{ $t('pageMemory.temperature') }}
+ </b-button>
+ <b-row class="align-items-end p-2">
+ <b-col xs="12" md="6" lg="3" class="pt-2">
+ <b-form-group :label="$t('pageMemory.labels.notNormal')">
+ <b-form-input
+ v-model="temperatureNonNormalInput"
+ type="number"
+ :min="0"
+ :max="temperatureCriticalInput"
+ ></b-form-input>
+ </b-form-group>
+ </b-col>
+ <b-col xs="12" md="6" lg="3" class="pt-2">
+ <b-form-group :label="$t('pageMemory.labels.critical')">
+ <b-form-input
+ v-model="temperatureCriticalInput"
+ type="number"
+ :min="temperatureNonNormalInput"
+ :max="temperatureWarningInput"
+ >
+ </b-form-input>
+ </b-form-group>
+ </b-col>
+ <b-col xs="12" md="6" lg="3" class="pt-2">
+ <b-form-group :label="$t('pageMemory.labels.warning')">
+ <b-form-input
+ v-model="temperatureWarningInput"
+ type="number"
+ :min="temperatureCriticalInput"
+ :max="100"
+ >
+ </b-form-input>
+ </b-form-group>
+ </b-col>
+ <b-col xs="12" md="6" lg="3" class="pt-2">
+ <b-button variant="primary" style="height: 35px">
+ {{ 'Сохранить' }}
+ </b-button>
+ </b-col>
+ </b-row>
+ <chart
+ type="memory"
+ :colors="colors"
+ :data="filteredSensors"
+ :warning="temperatureWarning"
+ :non-normal="temperatureNonNormal"
+ :critical-start="temperatureCriticalStart"
+ ></chart>
+ <b-table
+ v-if="items && items.length > 0"
+ responsive="md"
+ show-empty
+ table-variant="accessory"
+ hover
+ :items="items"
+ :fields="fields"
+ :empty-text="$t('global.table.emptyMessage')"
+ >
+ <template #cell(name)="{ value, index }">
+ <div
+ class="item-color"
+ :style="`background-color: ${colors[index]}`"
+ ></div>
+ {{ value }}
+ </template>
+ <template #cell(minDate)="{ value }">
+ <span style="color: rgb(12, 28, 41)">
+ {{ value.time }}
+ </span>
+ <span>
+ {{ value.date }}
+ </span>
+ </template>
+ <template #cell(maxDate)="{ value }">
+ <span style="color: rgb(12, 28, 41)">
+ {{ value.time }}
+ </span>
+ <span>
+ {{ value.date }}
+ </span>
+ </template>
+ </b-table>
+ </div>
</b-container>
</template>
<script>
import PageTitle from '@/components/_sila/Global/PageTitle';
import Chart from '@/components/_sila/Global/Chart';
+import TableDatePicker from '@/components/_sila/Global/TableDatePicker';
import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin';
import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin';
@@ -57,7 +106,7 @@ import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin';
import { getItems } from '@/utilities/_sila/metricProperties';
export default {
- components: { PageTitle, Chart },
+ components: { PageTitle, Chart, TableDatePicker },
mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin],
data() {
return {