Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Mar 13, 2024

Test stand: https://nda.ya.ru/t/wz9ltBPp74yLGq

Design: https://nda.ya.ru/t/YmNBafzM74yLYK

Current version is without controls buttons and usage section, they will be added further: #760 and #761

Comment on lines -29 to -32
<div className={b('row')} key="versions">
<SkeletonLabel />
<Skeleton className={b('versions')} />
</div>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since ClusterInfo is moved to a separate tab, layout shifts on data load doesn't affect us as much as before, so there is no need to fully preserve content height.

Removed separate versions row to make component usable for all tabs and pages

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with LinkWithIcon

Copy link
Member Author

@artemmufazalov artemmufazalov Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly data from NodeStructure PDisk. Removed pDiskId, available and total fields, added links field

@artemmufazalov artemmufazalov linked an issue Mar 14, 2024 that may be closed by this pull request
@artemmufazalov artemmufazalov requested a review from Raubzeug March 14, 2024 10:01
@artemmufazalov artemmufazalov marked this pull request as ready for review March 14, 2024 10:01
<>
{title}
{'\u00a0'}
<Icon name="external" viewBox={'0 0 16 16'} width={16} height={16} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets start to get rid of custom Icon component and use icons from @gravity-ui/icons?

@@ -0,0 +1,42 @@
import {Icon} from '@gravity-ui/uikit';

import circleExclamationIcon from '../../assets/icons/circle-exclamation.svg';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use @gravity-ui icons if possible.

});

useEffect(() => {
dispatch(setHeaderBreadcrumbs('pDisk', {nodeId, pDiskId}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this action should be done not in useEffect, but when link leading to Pdisk page is clicked.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it should be done in useEffect, because you can get to this page using direct link (e.g. someone send link to problematic PDisk in some messenger)

Copy link
Member Author

@artemmufazalov artemmufazalov Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our breadcrumbs reflect logical structure, not real user path. So for example Tenant is always inside some cluster, PDisk is always inside some Node, VDisk is always inside some PDisk

}, [dispatch, nodeId, pDiskId]);

useEffect(() => {
dispatch(getNodesList());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one too should be done when link leading to Pdisk page is clicked.

Copy link
Member Author

@artemmufazalov artemmufazalov Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's needed for PDisk groups section

};

return (
<>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need in wrapper

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It contains two <div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally blind today, sorry :(

) {
const preparedGroups: PreparedStorageGroup[] = [];

data.StoragePools?.forEach((pool) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is rather difficult to read and needs a little refactoring as for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDIsk page

3 participants