diff options
Diffstat (limited to 'src/views/_sila/Processors/Specification/ProcessorsSpecificationTable.vue')
-rw-r--r-- | src/views/_sila/Processors/Specification/ProcessorsSpecificationTable.vue | 251 |
1 files changed, 251 insertions, 0 deletions
diff --git a/src/views/_sila/Processors/Specification/ProcessorsSpecificationTable.vue b/src/views/_sila/Processors/Specification/ProcessorsSpecificationTable.vue new file mode 100644 index 00000000..c872eefc --- /dev/null +++ b/src/views/_sila/Processors/Specification/ProcessorsSpecificationTable.vue @@ -0,0 +1,251 @@ +<template> + <b-table + sort-icon-left + no-sort-reset + :sort-desc="true" + responsive="md" + show-empty + no-border-collapse + :items="processors" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + :empty-filtered-text="$t('global.table.emptySearchMessage')" + > + <template #cell(expandRow)="row"> + <b-button + variant="link" + data-test-id="hardwareStatus-button-expandProcessors" + :title="expandRowLabel" + class="btn-icon-only" + @click="toggleRowDetails(row)" + > + <icon-chevron /> + <span class="sr-only">{{ expandRowLabel }}</span> + </b-button> + </template> + <template #cell(status)="{ value }"> + <div v-if="value" class="fans-table-col-first__cell"> + <img class="status__img" src="@/assets/images/status/on.svg" /> + <span> + {{ $t('global.status.inWork') }} + </span> + </div> + <div v-else class="fans-table-col-first__cell"> + <img class="status__img" src="@/assets/images/_sila/status/off.svg" /> + <span> + {{ $t('global.status.outWorking') }} + </span> + </div> + </template> + + <template #row-details="{ index }"> + <b-container fluid> + <!-- ProcessorCapabilityInfo --> + <b-row> + <b-col class="mt-3 mb-2 p-0 bold-12px__caps"> + {{ $t('pageInventory.table.processorCacheInfo') }} + </b-col> + </b-row> + <b-row> + <b-col class="mt-2 p-0" sm="3" xl="3"> + <dl class="light-12px"> + <!-- Attributes Names --> + <dd class="attrib-names">{{ $t('global.table.attributes') }}</dd> + <dd>{{ 'Уровень кеша' }}</dd> + <dd>{{ 'Максимальный объем' }}</dd> + <dd>{{ 'Установленный объем' }}</dd> + <dd>{{ 'Тип кэша' }}</dd> + <dd>{{ 'Локализация' }}</dd> + <dd>{{ 'Политика записи' }}</dd> + <dd>{{ 'Ассоциативность' }}</dd> + <dd>{{ 'Тип исправления ошибки' }}</dd> + </dl> + </b-col> + <b-col class="mt-2 p-0" sm="3" xl="3"> + <dl class="light-12px"> + <!-- Status КЭШ-1 --> + <dd class="attrib-names">{{ 'КЭШ-1' }}</dd> + <dd v-for="item in processors[index].cache_1" :key="item.cache_1"> + {{ dataFormatter(item) }} + </dd> + </dl> + </b-col> + <b-col class="mt-2 p-0" sm="3" xl="3"> + <dl class="light-12px"> + <!-- Status state --> + <dd class="attrib-names">{{ 'КЭШ-2' }}</dd> + <dd v-for="item in processors[index].cache_2" :key="item.cache_2"> + {{ dataFormatter(item) }} + </dd> + </dl> + </b-col> + <b-col class="mt-2 p-0" sm="3" xl="3"> + <dl class="light-12px"> + <dd class="attrib-names">{{ 'КЭШ-3' }}</dd> + <dd v-for="item in processors[index].cache_3" :key="item.cache_3"> + {{ dataFormatter(item) }} + </dd> + </dl> + </b-col> + </b-row> + <b-row> + <b-col class="mt-3 mb-2 p-0 bold-12px__caps"> + {{ $t('pageInventory.table.SupportedTechnologies') }} + </b-col> + </b-row> + <b-row> + <b-col class="mt-2 p-0" sm="6" xl="6"> + <dl class="light-12px"> + <dd class="attrib-names">{{ $t('global.table.attributes') }}</dd> + <dd></dd> + <dd>{{ 'processor' }}</dd> + <dd>{{ 'vendor_id' }}</dd> + <dd>{{ 'cpu family' }}</dd> + <dd>{{ 'model' }}</dd> + <dd>{{ 'model name' }}</dd> + <dd>{{ 'stepping' }}</dd> + <dd>{{ 'microcode' }}</dd> + <dd>{{ 'cpu MHz' }}</dd> + <dd>{{ 'cache size' }}</dd> + <dd>{{ 'physical id' }}</dd> + <dd>{{ 'siblings' }}</dd> + <dd>{{ 'core id' }}</dd> + <dd>{{ 'cpu cores' }}</dd> + <dd>{{ 'apicid' }}</dd> + <dd>{{ 'initial apicid' }}</dd> + <dd>{{ 'fpu' }}</dd> + <dd>{{ 'fpu_exception' }}</dd> + <dd>{{ 'cpuid level' }}</dd> + <dd>{{ 'wp' }}</dd> + <dd>{{ 'flags' }}</dd> + <dd>{{ 'bugs' }}</dd> + </dl> + </b-col> + <b-col class="mt-2 p-0" sm="6" xl="6"> + <dl class="light-12px"> + <dd class="attrib-names">{{ $t('global.table.value') }}</dd> + <dd + v-for="item in processors[index].description" + :key="item.description" + > + {{ dataFormatter(item) }} + </dd> + </dl> + </b-col> + </b-row> + </b-container> + </template> + </b-table> +</template> + +<script> +import TableRowExpandMixin, { + expandRowLabel, +} from '@/components/Mixins/TableRowExpandMixin'; +import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; +import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; + +import { processors } from './helpers'; +export default { + components: { IconChevron }, + mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin], + data() { + return { + isBusy: true, + isAddersСolon: false, + processors, + fields: [ + { + key: 'expandRow', + label: '', + thStyle: { width: '3%' }, + sortable: false, + }, + { + key: 'status', + label: 'Статус', + formatter: this.dataFormatter, + thStyle: { width: '17%' }, + }, + { + key: 'name', + label: 'Имя', + formatter: this.dataFormatter, + thStyle: { width: '15%' }, + }, + { + key: 'model', + label: 'Модель', + formatter: this.dataFormatter, + thStyle: { width: '12%' }, + }, + { + key: 'serialNumber', + label: 'Серийный номер', + formatter: this.dataFormatter, + thStyle: { width: '15%' }, + }, + { + key: 'version', + label: 'Версия', + formatter: this.dataFormatter, + thStyle: { width: '10%' }, + }, + { + key: 'frequency', + label: 'Частота', + formatter: this.dataFormatter, + thStyle: { width: '10%' }, + }, + { + key: 'cores', + label: 'Ядра', + formatter: this.dataFormatter, + thStyle: { width: '10%' }, + }, + ], + expandRowLabel: expandRowLabel, + }; + }, +}; +</script> +<style lang="scss" scoped> +.row { + margin: 0px; + flex-wrap: nowrap; +} +.fans-table-col-first__cell { + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: flex-start; +} + +.status__img { + margin-right: 7px; +} + +.bold-16px { + margin: 24px 0 0 2rem; +} + +.bold-12px__caps { + color: $text-secondary; +} + +.attrib-names { + border-bottom: 1px solid $faint-secondary-primary-10; + color: $text-secondary !important; + font-weight: 600; +} + +.custom-switch { + margin: 0; +} + +.btn-link { + width: 30px !important; + height: 20px !important; +} +</style> |