-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ReadOnly label to replicated tables (#970)
- Loading branch information
1 parent
071b0a7
commit 669f7f0
Showing
10 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"common.created": "Created", | ||
"common.type": "Type" | ||
"common.type": "Type", | ||
"no-data": "No data" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import {registerKeysets} from '../../../utils/i18n'; | ||
|
||
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
const COMPONENT = 'ydb-components-info-viewer'; | ||
|
||
export default registerKeysets(COMPONENT, {ru, en}); | ||
export default registerKeysets(COMPONENT, {en}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {Flex, Label} from '@gravity-ui/uikit'; | ||
|
||
import type {TPathDescription} from '../../../types/api/schema'; | ||
import i18n from '../i18n'; | ||
import {getEntityName, isReadOnlyTable} from '../utils'; | ||
|
||
interface EntityTitleProps { | ||
data?: TPathDescription; | ||
} | ||
|
||
export function EntityTitle({data}: EntityTitleProps) { | ||
const entityName = getEntityName(data); | ||
|
||
if (isReadOnlyTable(data)) { | ||
return ( | ||
<Flex gap={1} wrap={'nowrap'}> | ||
{entityName} <Label>{i18n('label.read-only')}</Label> | ||
</Flex> | ||
); | ||
} | ||
|
||
return entityName; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters