-
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.
fix(EntityStatus): remove additionalControls, fix ClipboardButton lay…
…out (#1524)
- Loading branch information
Showing
27 changed files
with
306 additions
and
185 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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
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,49 @@ | ||
import {DefinitionList, PopoverBehavior} from '@gravity-ui/uikit'; | ||
|
||
import {getTabletPagePath} from '../../routes'; | ||
import {selectIsUserAllowedToMakeChanges} from '../../store/reducers/authentication/authentication'; | ||
import {createTabletDeveloperUIHref} from '../../utils/developerUI/developerUI'; | ||
import {useTypedSelector} from '../../utils/hooks'; | ||
import {CellWithPopover} from '../CellWithPopover/CellWithPopover'; | ||
import {EntityStatus} from '../EntityStatus/EntityStatus'; | ||
import {LinkWithIcon} from '../LinkWithIcon/LinkWithIcon'; | ||
|
||
import i18n from './i18n'; | ||
|
||
interface TabletNameWrapperProps { | ||
tabletId: string | number; | ||
database?: string; | ||
} | ||
|
||
export function TabletNameWrapper({tabletId, database}: TabletNameWrapperProps) { | ||
const isUserAllowedToMakeChanges = useTypedSelector(selectIsUserAllowedToMakeChanges); | ||
|
||
const tabletPath = getTabletPagePath(tabletId, { | ||
tenantName: database, | ||
}); | ||
|
||
return ( | ||
<CellWithPopover | ||
disabled={!isUserAllowedToMakeChanges} | ||
content={ | ||
<DefinitionList responsive> | ||
<DefinitionList.Item name={i18n('field_links')}> | ||
<LinkWithIcon | ||
title={i18n('context_developer-ui')} | ||
url={createTabletDeveloperUIHref(tabletId)} | ||
/> | ||
</DefinitionList.Item> | ||
</DefinitionList> | ||
} | ||
placement={['top', 'bottom']} | ||
behavior={PopoverBehavior.Immediate} | ||
> | ||
<EntityStatus | ||
name={tabletId.toString()} | ||
path={tabletPath} | ||
hasClipboardButton | ||
showStatus={false} | ||
/> | ||
</CellWithPopover> | ||
); | ||
} |
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,4 @@ | ||
{ | ||
"field_links": "Links", | ||
"context_developer-ui": "Developer UI" | ||
} |
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,7 @@ | ||
import {registerKeysets} from '../../../utils/i18n'; | ||
|
||
import en from './en.json'; | ||
|
||
const COMPONENT = 'ydb-tablet-name-wrapper'; | ||
|
||
export default registerKeysets(COMPONENT, {en}); |
Oops, something went wrong.