Skip to content

Commit 717ae6a

Browse files
committed
feat: add resource pool icon
1 parent 81c5344 commit 717ae6a

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

src/components/NavigationTree/NavigationTreeNode.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {ExternalTableIcon} from '../icons/ExternalTable';
99
import {FolderIcon} from '../icons/Folder';
1010
import {FolderOpenIcon} from '../icons/FolderOpen';
1111
import {IndexIcon} from '../icons/Index';
12+
import {ResourcePoolIcon} from '../icons/ResourcePool';
1213
import {TableIcon} from '../icons/Table';
1314
import {TopicIcon} from '../icons/Topic';
1415
import {ViewIcon} from '../icons/View';
@@ -32,7 +33,7 @@ export interface NavigationTreeNodeProps {
3233
cache?: boolean;
3334
}
3435

35-
function renderIcon(type: NavigationTreeNodeType | string, collapsed: boolean) {
36+
function renderIcon(type: NavigationTreeNodeType, collapsed: boolean) {
3637
switch (type) {
3738
case 'async_replication':
3839
return <AsyncReplicationIcon height={16} />;
@@ -57,6 +58,8 @@ function renderIcon(type: NavigationTreeNodeType | string, collapsed: boolean) {
5758
return <ExternalDataSourceIcon height={16} />;
5859
case 'view':
5960
return <ViewIcon height={16} />;
61+
case 'resource_pool':
62+
return <ResourcePoolIcon height={16} />;
6063
default:
6164
return null;
6265
}

src/components/NavigationTree/__stories__/NavigationTree.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ async function fetchPath(path: string) {
129129
name: 'view',
130130
type: 'view',
131131
},
132+
{
133+
name: 'resource_pool',
134+
type: 'resource_pool',
135+
},
132136
];
133137
}
134138

src/components/NavigationTree/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type {DropdownMenuItemMixed} from '@gravity-ui/uikit';
33
export type NavigationTreeNodeType =
44
| 'async_replication'
55
| 'column_table'
6+
| 'resource_pool'
67
| 'database'
78
| 'directory'
89
| 'external_data_source'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
3+
export function ResourcePoolIcon(props: React.SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" {...props}>
6+
<path
7+
fillRule="evenodd"
8+
clipRule="evenodd"
9+
d="M1.5 3.25C1.5 2.83579 1.83579 2.5 2.25 2.5H3.26087C3.67508 2.5 4.01087 2.16421 4.01087 1.75C4.01087 1.33579 3.67508 1 3.26087 1H2.25C1.00736 1 0 2.00736 0 3.25V12.75C0 13.9926 1.00736 15 2.25 15H3.26087C3.67508 15 4.01087 14.6642 4.01087 14.25C4.01087 13.8358 3.67508 13.5 3.26087 13.5H2.25C1.83579 13.5 1.5 13.1642 1.5 12.75V3.25ZM12.7391 1C12.3249 1 11.9891 1.33579 11.9891 1.75C11.9891 2.16421 12.3249 2.5 12.7391 2.5H13.75C14.1642 2.5 14.5 2.83579 14.5 3.25V12.75C14.5 13.1642 14.1642 13.5 13.75 13.5H12.7391C12.3249 13.5 11.9891 13.8358 11.9891 14.25C11.9891 14.6642 12.3249 15 12.7391 15H13.75C14.9926 15 16 13.9926 16 12.75V3.25C16 2.00736 14.9926 1 13.75 1H12.7391ZM11.3075 7.90538C10.3701 8.35764 9.18489 8.54157 7.99728 8.54157C6.80968 8.54157 5.6245 8.35764 4.68702 7.90538C4.47528 7.80323 4.26658 7.68139 4.07001 7.53905V7.99996C4.07001 9.37139 5.82831 10.0571 7.99728 10.0571C10.1663 10.0571 11.9246 9.37139 11.9246 7.99996V7.53905C11.728 7.68139 11.5193 7.80323 11.3075 7.90538ZM7.99728 7.3143C10.1663 7.3143 11.9246 6.62858 11.9246 5.25716C11.9246 3.88573 10.1663 3.20001 7.99728 3.20001C5.82831 3.20001 4.07001 3.88573 4.07001 5.25716C4.07001 6.62858 5.82831 7.3143 7.99728 7.3143ZM11.9246 10.7429C11.9246 12.1143 10.1663 12.8 7.99728 12.8C5.82831 12.8 4.07001 12.1143 4.07001 10.7429V10.2819C4.26658 10.4242 4.47528 10.546 4.68702 10.6482C5.6245 11.1004 6.80968 11.2844 7.99728 11.2844C9.18489 11.2844 10.3701 11.1004 11.3075 10.6482C11.5193 10.546 11.728 10.4242 11.9246 10.2819V10.7429Z"
10+
fill="currentColor"
11+
/>
12+
</svg>
13+
);
14+
}

0 commit comments

Comments
 (0)