Skip to content

Commit d0a4442

Browse files
committed
feat(Storage): display shield icon for encrypted groups
1 parent cdff5e9 commit d0a4442

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

src/assets/icons/shield.svg

Lines changed: 3 additions & 0 deletions
Loading

src/containers/Storage/StorageGroups/StorageGroups.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import _ from 'lodash';
22
import cn from 'bem-cn-lite';
33
import DataTable, {Column, Settings, SortOrder} from '@yandex-cloud/react-data-table';
4-
import {Label, Popover, PopoverBehavior} from '@gravity-ui/uikit';
4+
import {Icon, Label, Popover, PopoverBehavior} from '@gravity-ui/uikit';
5+
6+
import shieldIcon from '../../../assets/icons/shield.svg';
57

68
import {Stack} from '../../../components/Stack/Stack';
79
//@ts-ignore
@@ -119,7 +121,23 @@ function StorageGroups({data, tableSettings, visibleEntities, nodes, onShowAll}:
119121
{
120122
name: TableColumnsIds.Type,
121123
header: tableColumnsNames[TableColumnsIds.Type],
122-
render: ({value}) => <Label>{value as string || '—'}</Label>,
124+
render: ({value, row}) => (
125+
<>
126+
<Label>{value as string || '—'}</Label>
127+
{' '}
128+
{row.Encryption && (
129+
<Popover
130+
content={i18n('encrypted')}
131+
placement="right"
132+
behavior={PopoverBehavior.Immediate}
133+
>
134+
<Label>
135+
<Icon data={shieldIcon} />
136+
</Label>
137+
</Popover>
138+
)}
139+
</>
140+
),
123141
},
124142
{
125143
name: TableColumnsIds.Missing,

src/containers/Storage/StorageGroups/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"empty.default": "No such groups",
33
"empty.out_of_space": "No groups with out of space errors",
44
"empty.degraded": "No degraded groups",
5-
"show_all": "Show all groups"
5+
"show_all": "Show all groups",
6+
"encrypted": "Encrypted group"
67
}

src/containers/Storage/StorageGroups/i18n/ru.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"empty.default": "Нет групп",
33
"empty.out_of_space": "Нет групп, в которых кончается место",
44
"empty.degraded": "Нет деградировавших групп",
5-
"show_all": "Показать все группы"
5+
"show_all": "Показать все группы",
6+
"encrypted": "Зашифрованная группа"
67
}

src/types/api/storage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export interface TBSGroupStateInfo {
191191
ReadThroughput?: string;
192192
/** uint64 */
193193
WriteThroughput?: string;
194+
Encryption?: boolean;
194195
}
195196

196197
interface THiveStorageGroupStats {

0 commit comments

Comments
 (0)