@cloud-ru/uikit-product-calculator 0.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1508 -0
- package/LICENSE +201 -0
- package/README.md +85 -0
- package/package.json +75 -0
- package/src/components/Calculator/Calculator.tsx +79 -0
- package/src/components/Calculator/index.ts +1 -0
- package/src/components/CalculatorContent/CalculatorContent.tsx +38 -0
- package/src/components/CalculatorContent/index.ts +1 -0
- package/src/components/CalculatorContent/styles.module.scss +79 -0
- package/src/components/Catalog/Catalog.tsx +225 -0
- package/src/components/Catalog/components/PrivateCardHeader.tsx +63 -0
- package/src/components/Catalog/components/index.ts +1 -0
- package/src/components/Catalog/components/styles.module.scss +35 -0
- package/src/components/Catalog/index.ts +1 -0
- package/src/components/Catalog/styles.module.scss +104 -0
- package/src/components/Controls/AlertControl/AlertControl.tsx +44 -0
- package/src/components/Controls/AlertControl/index.ts +1 -0
- package/src/components/Controls/ArrayControl/ArrayControl.tsx +105 -0
- package/src/components/Controls/ArrayControl/index.ts +1 -0
- package/src/components/Controls/ArrayControl/styles.module.scss +33 -0
- package/src/components/Controls/CarouselControl/CarouselControl.tsx +173 -0
- package/src/components/Controls/CarouselControl/index.ts +1 -0
- package/src/components/Controls/CarouselControl/styles.module.scss +32 -0
- package/src/components/Controls/Control/Control.tsx +205 -0
- package/src/components/Controls/Control/index.ts +1 -0
- package/src/components/Controls/ObjectControl/ObjectControl.tsx +150 -0
- package/src/components/Controls/ObjectControl/index.ts +1 -0
- package/src/components/Controls/ObjectControl/styles.module.scss +18 -0
- package/src/components/Controls/ObjectDecorator/ObjectDecorator.tsx +23 -0
- package/src/components/Controls/ObjectDecorator/index.ts +1 -0
- package/src/components/Controls/ObjectDecorator/styles.module.scss +15 -0
- package/src/components/Controls/SegmentedControl/SegmentedControl.tsx +79 -0
- package/src/components/Controls/SegmentedControl/SegmentedControlCard.tsx +38 -0
- package/src/components/Controls/SegmentedControl/index.ts +1 -0
- package/src/components/Controls/SegmentedControl/styles.module.scss +8 -0
- package/src/components/Controls/SelectControl/SelectControl.tsx +172 -0
- package/src/components/Controls/SelectControl/index.ts +1 -0
- package/src/components/Controls/SelectControl/styles.module.scss +5 -0
- package/src/components/Controls/SliderControl/SliderControl.tsx +92 -0
- package/src/components/Controls/SliderControl/index.ts +1 -0
- package/src/components/Controls/StepperControl/StepperControl.tsx +160 -0
- package/src/components/Controls/StepperControl/index.ts +1 -0
- package/src/components/Controls/StepperControl/styles.module.scss +16 -0
- package/src/components/Controls/TableControl/TableControl.tsx +162 -0
- package/src/components/Controls/TableControl/helperComponents/StepperWithAllowedValues.tsx +50 -0
- package/src/components/Controls/TableControl/helperComponents/index.ts +1 -0
- package/src/components/Controls/TableControl/helperComponents/styles.module.scss +53 -0
- package/src/components/Controls/TableControl/index.ts +1 -0
- package/src/components/Controls/TableControl/styles.module.scss +104 -0
- package/src/components/Controls/ToggleCard/ToggleCard.tsx +46 -0
- package/src/components/Controls/ToggleCard/index.ts +1 -0
- package/src/components/Controls/ToggleCard/styles.module.scss +11 -0
- package/src/components/Controls/ToggleCardsControl/ToggleCardsControl.tsx +93 -0
- package/src/components/Controls/ToggleCardsControl/index.ts +1 -0
- package/src/components/Controls/ToggleCardsControl/styles.module.scss +40 -0
- package/src/components/Controls/ToggleControl/ToggleControl.tsx +59 -0
- package/src/components/Controls/ToggleControl/components/SwitchRow.tsx +98 -0
- package/src/components/Controls/ToggleControl/components/index.ts +1 -0
- package/src/components/Controls/ToggleControl/components/styles.module.scss +110 -0
- package/src/components/Controls/ToggleControl/index.ts +1 -0
- package/src/components/Controls/ToggleObjectControl/ToggleObjectControl.tsx +111 -0
- package/src/components/Controls/ToggleObjectControl/index.ts +1 -0
- package/src/components/Controls/ToggleObjectControl/styles.module.scss +13 -0
- package/src/components/Controls/constants.ts +16 -0
- package/src/components/Controls/index.tsx +26 -0
- package/src/components/Controls/types.ts +181 -0
- package/src/components/Controls/utils.ts +49 -0
- package/src/components/Disclaimer/Disclaimer.tsx +33 -0
- package/src/components/Disclaimer/index.ts +1 -0
- package/src/components/Disclaimer/styles.module.scss +14 -0
- package/src/components/HeaderContainer/index.tsx +32 -0
- package/src/components/HeaderContainer/styles.module.scss +24 -0
- package/src/components/PriceSummary/PriceSummary.tsx +158 -0
- package/src/components/PriceSummary/components/PricePeriodSelect/PricePeriodSelect.tsx +81 -0
- package/src/components/PriceSummary/components/PricePeriodSelect/index.ts +1 -0
- package/src/components/PriceSummary/components/ProductCard/ProductCard.tsx +85 -0
- package/src/components/PriceSummary/components/ProductCard/index.ts +1 -0
- package/src/components/PriceSummary/components/ProductCard/styles.module.scss +7 -0
- package/src/components/PriceSummary/components/ProductListActions/ProductListActions.tsx +118 -0
- package/src/components/PriceSummary/components/ProductListActions/index.ts +1 -0
- package/src/components/PriceSummary/components/ProductListActions/styles.module.scss +38 -0
- package/src/components/PriceSummary/components/index.ts +3 -0
- package/src/components/PriceSummary/hooks.ts +36 -0
- package/src/components/PriceSummary/index.ts +1 -0
- package/src/components/PriceSummary/styles.module.scss +110 -0
- package/src/components/PriceSummary/utils/getTotalPrice.ts +19 -0
- package/src/components/PriceSummary/utils/index.ts +2 -0
- package/src/components/PriceSummary/utils/transformToProductCardData.ts +36 -0
- package/src/components/ProductHeadline/ProductPageHeadline.tsx +134 -0
- package/src/components/ProductHeadline/components/PriceCount.tsx +93 -0
- package/src/components/ProductHeadline/components/index.ts +1 -0
- package/src/components/ProductHeadline/components/styles.module.scss +52 -0
- package/src/components/ProductHeadline/index.ts +1 -0
- package/src/components/ProductHeadline/styles.module.scss +32 -0
- package/src/components/ProductPage/ProductPage.tsx +105 -0
- package/src/components/ProductPage/index.ts +1 -0
- package/src/components/ProductPage/styles.module.scss +13 -0
- package/src/components/Welcome/Welcome.tsx +138 -0
- package/src/components/Welcome/index.ts +1 -0
- package/src/components/Welcome/styles.module.scss +155 -0
- package/src/components/index.ts +3 -0
- package/src/config/config.tsx +27 -0
- package/src/config/index.ts +2 -0
- package/src/config/platforms/advanced/catalog.ts +82 -0
- package/src/config/platforms/advanced/constants.ts +23 -0
- package/src/config/platforms/advanced/index.ts +5 -0
- package/src/config/platforms/advanced/platform.tsx +13 -0
- package/src/config/platforms/advanced/product-config/AdvancedCloudBackup.ts +76 -0
- package/src/config/platforms/advanced/product-config/AdvancedCloudContainerEngine.tsx +260 -0
- package/src/config/platforms/advanced/product-config/AdvancedCloudServer.tsx +526 -0
- package/src/config/platforms/advanced/product-config/AdvancedDataAsYouUse.ts +159 -0
- package/src/config/platforms/advanced/product-config/AdvancedDataLakeInsight.ts +134 -0
- package/src/config/platforms/advanced/product-config/AdvancedDataWarehouseService.ts +94 -0
- package/src/config/platforms/advanced/product-config/AdvancedDcsMemcached.ts +69 -0
- package/src/config/platforms/advanced/product-config/AdvancedDcsRedis.ts +220 -0
- package/src/config/platforms/advanced/product-config/AdvancedDmsKafka.tsx +186 -0
- package/src/config/platforms/advanced/product-config/AdvancedDmsRabbitMq.ts +202 -0
- package/src/config/platforms/advanced/product-config/AdvancedDocumentDatabase.tsx +323 -0
- package/src/config/platforms/advanced/product-config/AdvancedElasticLoadBalance.tsx +252 -0
- package/src/config/platforms/advanced/product-config/AdvancedElasticSearch.ts +365 -0
- package/src/config/platforms/advanced/product-config/AdvancedFunctionGraph.tsx +65 -0
- package/src/config/platforms/advanced/product-config/AdvancedMapReduce.tsx +394 -0
- package/src/config/platforms/advanced/product-config/AdvancedMySqlDataBase.ts +417 -0
- package/src/config/platforms/advanced/product-config/AdvancedNetwork.ts +146 -0
- package/src/config/platforms/advanced/product-config/AdvancedObjectStorage.ts +232 -0
- package/src/config/platforms/advanced/product-config/AdvancedPostgreSqlDatabase.ts +402 -0
- package/src/config/platforms/advanced/product-config/AdvancedScalableFile.tsx +161 -0
- package/src/config/platforms/advanced/product-config/AdvancedSqlDatabase.ts +380 -0
- package/src/config/platforms/advanced/product-config/index.ts +21 -0
- package/src/config/platforms/advanced/products.ts +267 -0
- package/src/config/platforms/evolution/catalog.tsx +107 -0
- package/src/config/platforms/evolution/constants.ts +80 -0
- package/src/config/platforms/evolution/index.ts +5 -0
- package/src/config/platforms/evolution/platform.tsx +13 -0
- package/src/config/platforms/evolution/product-config/EvolutionArenadataDb.ts +151 -0
- package/src/config/platforms/evolution/product-config/EvolutionArtifactRegistry.ts +57 -0
- package/src/config/platforms/evolution/product-config/EvolutionBareMetal.tsx +172 -0
- package/src/config/platforms/evolution/product-config/EvolutionCloudServer.tsx +407 -0
- package/src/config/platforms/evolution/product-config/EvolutionCloudServerFreeTier.tsx +185 -0
- package/src/config/platforms/evolution/product-config/EvolutionCloudServerGpu.tsx +301 -0
- package/src/config/platforms/evolution/product-config/EvolutionContainerApps.ts +84 -0
- package/src/config/platforms/evolution/product-config/EvolutionContainerAppsFreeTier.ts +29 -0
- package/src/config/platforms/evolution/product-config/EvolutionKubernetes.ts +388 -0
- package/src/config/platforms/evolution/product-config/EvolutionManagedMetastore.ts +38 -0
- package/src/config/platforms/evolution/product-config/EvolutionManagedRedis.ts +161 -0
- package/src/config/platforms/evolution/product-config/EvolutionManagedSpark.ts +360 -0
- package/src/config/platforms/evolution/product-config/EvolutionManagedTrino.ts +53 -0
- package/src/config/platforms/evolution/product-config/EvolutionMlInference.tsx +703 -0
- package/src/config/platforms/evolution/product-config/EvolutionPostgreSql.ts +217 -0
- package/src/config/platforms/evolution/product-config/EvolutionPublicIp.ts +39 -0
- package/src/config/platforms/evolution/product-config/EvolutionSnatGateway.ts +22 -0
- package/src/config/platforms/evolution/product-config/EvolutionStorageS3.ts +223 -0
- package/src/config/platforms/evolution/product-config/EvolutionStorageS3FreeTier.ts +97 -0
- package/src/config/platforms/evolution/product-config/index.ts +17 -0
- package/src/config/platforms/evolution/products.ts +260 -0
- package/src/config/platforms/index.ts +3 -0
- package/src/config/platforms/vmware/catalog.ts +19 -0
- package/src/config/platforms/vmware/constants.ts +6 -0
- package/src/config/platforms/vmware/index.ts +5 -0
- package/src/config/platforms/vmware/platform.tsx +13 -0
- package/src/config/platforms/vmware/product-config/VmWareCloudBackup.ts +56 -0
- package/src/config/platforms/vmware/product-config/VmWareVirtualDataCenter.ts +309 -0
- package/src/config/platforms/vmware/product-config/VmWareVirtualMachinesBackup.ts +58 -0
- package/src/config/platforms/vmware/product-config/VmWareVirtualWorkspaces.tsx +210 -0
- package/src/config/platforms/vmware/product-config/index.ts +4 -0
- package/src/config/platforms/vmware/products.ts +63 -0
- package/src/config/styles.module.scss +9 -0
- package/src/config/utils/disk.ts +94 -0
- package/src/config/utils/diskPostgreSqlMySQL.ts +94 -0
- package/src/config/utils/eip.ts +104 -0
- package/src/config/utils/index.ts +52 -0
- package/src/config/utils/obs.ts +100 -0
- package/src/constants.ts +56 -0
- package/src/contexts/CalculatorContext.tsx +193 -0
- package/src/contexts/ProductContext.ts +25 -0
- package/src/contexts/index.ts +2 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useAdaptive.ts +20 -0
- package/src/hooks/useCatalogCardClick.ts +37 -0
- package/src/hooks/useProductClick.ts +14 -0
- package/src/hooks/useProductDelete.ts +46 -0
- package/src/index.ts +6 -0
- package/src/services/constants.ts +5 -0
- package/src/services/getFetcherFn.ts +57 -0
- package/src/services/getInitPrice.ts +64 -0
- package/src/services/getOnDownloadFileClick.ts +37 -0
- package/src/services/getOnShareClick.ts +56 -0
- package/src/services/index.ts +4 -0
- package/src/types/CalculatorType.ts +16 -0
- package/src/types/CatalogConfig.ts +13 -0
- package/src/types/Category.ts +14 -0
- package/src/types/FetcherFn.ts +26 -0
- package/src/types/FormValues.ts +4 -0
- package/src/types/Platform.ts +24 -0
- package/src/types/Price.ts +18 -0
- package/src/types/Product.ts +39 -0
- package/src/types/ProductState.ts +11 -0
- package/src/types/State.ts +7 -0
- package/src/types/index.ts +10 -0
- package/src/utils/filterNonEmptyArrays.ts +13 -0
- package/src/utils/formatNumber.ts +5 -0
- package/src/utils/getPrice.ts +38 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/parseKeyToDataTest.ts +14 -0
- package/src/utils/value.ts +11 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { PlusSVG } from '@cloud-ru/uikit-product-icons';
|
|
2
|
+
import { LAYOUT_TYPE } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
import { ButtonFilled } from '@snack-uikit/button';
|
|
4
|
+
import { FieldStepper } from '@snack-uikit/fields';
|
|
5
|
+
import { Typography } from '@snack-uikit/typography';
|
|
6
|
+
|
|
7
|
+
import { useCalculatorContext, useProductContext } from '../../contexts';
|
|
8
|
+
import { PRICE_PERIOD } from '../../types';
|
|
9
|
+
import { parseKeyToDataTest } from '../../utils';
|
|
10
|
+
import { HeaderContainer } from '../HeaderContainer';
|
|
11
|
+
import { PriceSummary, SummaryAppearance } from '../PriceSummary';
|
|
12
|
+
import { PriceCount } from '../ProductHeadline/components';
|
|
13
|
+
import styles from './styles.module.scss';
|
|
14
|
+
|
|
15
|
+
const WELCOME_STEPS = [
|
|
16
|
+
'Нажмите Добавить сервис',
|
|
17
|
+
'Выберите платформу и продукт',
|
|
18
|
+
'Настройте конфигурацию',
|
|
19
|
+
'Подключите сразу или оставьте заявку',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
type WelcomeProps = { image?: string };
|
|
23
|
+
|
|
24
|
+
export function Welcome({ image }: WelcomeProps) {
|
|
25
|
+
const {
|
|
26
|
+
setCatalogOpen,
|
|
27
|
+
actions: { onStartClick },
|
|
28
|
+
} = useCalculatorContext();
|
|
29
|
+
|
|
30
|
+
const { price } = useProductContext();
|
|
31
|
+
|
|
32
|
+
const handleCatalogOpen = () => {
|
|
33
|
+
onStartClick?.();
|
|
34
|
+
setCatalogOpen(true);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const { layoutType } = useCalculatorContext();
|
|
38
|
+
|
|
39
|
+
const isTablet = layoutType !== LAYOUT_TYPE.Desktop && layoutType !== LAYOUT_TYPE.DesktopSmall;
|
|
40
|
+
const isDesctopSmall = layoutType === LAYOUT_TYPE.DesktopSmall;
|
|
41
|
+
const isMobile = layoutType === LAYOUT_TYPE.Mobile;
|
|
42
|
+
|
|
43
|
+
const TitleComponent = isTablet ? Typography.SansTitleL : Typography.SansHeadlineS;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
data-test-id={parseKeyToDataTest('welcome')}
|
|
48
|
+
className={styles.wrapper}
|
|
49
|
+
data-desktop-small={isDesctopSmall || undefined}
|
|
50
|
+
data-tablet={isTablet || undefined}
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
className={styles.configurator}
|
|
54
|
+
data-test-id={parseKeyToDataTest('welcome', 'configurator')}
|
|
55
|
+
data-desktop-small={isDesctopSmall || undefined}
|
|
56
|
+
data-tablet={isTablet || undefined}
|
|
57
|
+
>
|
|
58
|
+
<HeaderContainer dataTestId={parseKeyToDataTest('welcome', 'header')}>
|
|
59
|
+
<div className={styles.left}>
|
|
60
|
+
<TitleComponent data-test-id={parseKeyToDataTest('product', 'title')}>Конфигурация сервиса</TitleComponent>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div className={styles.right} data-tablet={isTablet || undefined}>
|
|
64
|
+
<PriceCount price={price} pricePeriod={PRICE_PERIOD.Month} mobile={isMobile} />
|
|
65
|
+
|
|
66
|
+
<div className={styles.counter} data-test-id={parseKeyToDataTest('product', 'counter')}>
|
|
67
|
+
<FieldStepper size='m' step={1} min={1} max={1} value={1} disabled allowMoreThanLimits={false} />
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{!isTablet && (
|
|
71
|
+
<ButtonFilled
|
|
72
|
+
fullWidth={isTablet}
|
|
73
|
+
label='Подключить'
|
|
74
|
+
size='m'
|
|
75
|
+
appearance='primary'
|
|
76
|
+
onClick={() => {}}
|
|
77
|
+
disabled
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
</HeaderContainer>
|
|
82
|
+
<div
|
|
83
|
+
className={styles.body}
|
|
84
|
+
data-mobile={isMobile || undefined}
|
|
85
|
+
data-tablet={isTablet || undefined}
|
|
86
|
+
data-test-id={parseKeyToDataTest('welcome', 'body')}
|
|
87
|
+
>
|
|
88
|
+
<div className={styles.headings}>
|
|
89
|
+
<Typography.SansBodyM className={styles.desc} data-test-id={parseKeyToDataTest('welcome', 'desc')}>
|
|
90
|
+
Соберите свою конфигурацию ресурсов, узнайте ее стоимость
|
|
91
|
+
<br />и подключите. Калькулятор предложит бесплатные
|
|
92
|
+
<br />
|
|
93
|
+
конфигурации для экономии на старте
|
|
94
|
+
</Typography.SansBodyM>
|
|
95
|
+
{(isTablet || isDesctopSmall) && (
|
|
96
|
+
<ButtonFilled
|
|
97
|
+
onClick={handleCatalogOpen}
|
|
98
|
+
size='m'
|
|
99
|
+
icon={<PlusSVG />}
|
|
100
|
+
label='Добавить сервис'
|
|
101
|
+
appearance='primary'
|
|
102
|
+
data-test-id={parseKeyToDataTest('welcome', 'button')}
|
|
103
|
+
/>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
<div className={styles.steps} data-test-id={parseKeyToDataTest('welcome', 'steps')}>
|
|
107
|
+
{WELCOME_STEPS.map((item, index) => (
|
|
108
|
+
<div className={styles.step} key={index} data-test-id={parseKeyToDataTest('welcome', 'step')}>
|
|
109
|
+
<div className={styles.number}>
|
|
110
|
+
<Typography.SansLabelL>{index + 1}</Typography.SansLabelL>
|
|
111
|
+
</div>
|
|
112
|
+
<Typography.SansTitleS>{item}</Typography.SansTitleS>
|
|
113
|
+
</div>
|
|
114
|
+
))}
|
|
115
|
+
</div>
|
|
116
|
+
{image && (
|
|
117
|
+
<img
|
|
118
|
+
className={styles.image}
|
|
119
|
+
src={image}
|
|
120
|
+
alt='calculator'
|
|
121
|
+
data-test-id={parseKeyToDataTest('welcome', 'image')}
|
|
122
|
+
data-mobile={isMobile || undefined}
|
|
123
|
+
data-tablet={isTablet || undefined}
|
|
124
|
+
/>
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div
|
|
129
|
+
className={styles.priceSummary}
|
|
130
|
+
data-desktop-small={isDesctopSmall || undefined}
|
|
131
|
+
data-tablet={isTablet || undefined}
|
|
132
|
+
data-test-id={parseKeyToDataTest('welcome', 'summary')}
|
|
133
|
+
>
|
|
134
|
+
<PriceSummary appearance={SummaryAppearance.Welcome} />
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Welcome';
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
@use '@sbercloud/figma-tokens-cloud-platform/build/scss/styles-theme-variables' as stv;
|
|
2
|
+
|
|
3
|
+
.wrapper {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 32px;
|
|
6
|
+
|
|
7
|
+
&[data-desktop-small] {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[data-tablet] {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.configurator {
|
|
17
|
+
background-color: stv.$sys-neutral-background1-level;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
width: 800px;
|
|
22
|
+
min-height: 569px;
|
|
23
|
+
|
|
24
|
+
&[data-desktop-small] {
|
|
25
|
+
width: 100%;
|
|
26
|
+
min-height: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-tablet] {
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-height: auto;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.priceSummary {
|
|
36
|
+
width: 384px;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
position: sticky;
|
|
39
|
+
top: 24px;
|
|
40
|
+
|
|
41
|
+
&[data-desktop-small] {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-tablet] {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.left,
|
|
51
|
+
.right {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.left {
|
|
58
|
+
gap: stv.$dimension-1m;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.right {
|
|
62
|
+
justify-content: flex-end;
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
gap: stv.$dimension-2m;
|
|
65
|
+
|
|
66
|
+
&[data-tablet] {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.counter {
|
|
72
|
+
max-width: 140px;
|
|
73
|
+
min-width: 100px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.body {
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
padding: stv.$dimension-4m;
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: stv.$dimension-4m;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
position: relative;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
87
|
+
z-index: 0;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
|
|
90
|
+
&[data-tablet] {
|
|
91
|
+
padding: stv.$dimension-3m;
|
|
92
|
+
|
|
93
|
+
@media (max-width: 767px) {
|
|
94
|
+
padding-bottom: 150px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&[data-mobile] {
|
|
99
|
+
padding: stv.$dimension-2m;
|
|
100
|
+
padding-bottom: 150px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.headings {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: stv.$dimension-3m;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.steps {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: stv.$dimension-2m;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.image {
|
|
117
|
+
width: 400px;
|
|
118
|
+
height: 293px;
|
|
119
|
+
object-fit: cover;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
right: 0;
|
|
122
|
+
position: absolute;
|
|
123
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
124
|
+
z-index: -1;
|
|
125
|
+
|
|
126
|
+
&[data-tablet] {
|
|
127
|
+
width: 309px;
|
|
128
|
+
height: 210px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&[data-mobile] {
|
|
132
|
+
width: 240px;
|
|
133
|
+
height: 164px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.desc {
|
|
138
|
+
color: stv.$sys-neutral-text-support;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.step {
|
|
142
|
+
display: flex;
|
|
143
|
+
gap: 12px;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.number {
|
|
148
|
+
background-color: stv.$sys-neutral-background;
|
|
149
|
+
height: 24px;
|
|
150
|
+
width: 24px;
|
|
151
|
+
box-sizing: border-box;
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
align-items: center;
|
|
155
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CatalogConfig } from '../types';
|
|
2
|
+
import { ADVANCED_CATALOG, ADVANCED_PLATFORM, ADVANCED_PRODUCT, ADVANCED_PRODUCTS } from './platforms/advanced';
|
|
3
|
+
import { EVOLUTION_CATALOG, EVOLUTION_PLATFORM, EVOLUTION_PRODUCT, EVOLUTION_PRODUCTS } from './platforms/evolution';
|
|
4
|
+
import { VM_WARE_CATALOG, VM_WARE_PLATFORM, VM_WARE_PRODUCT, VM_WARE_PRODUCTS } from './platforms/vmware';
|
|
5
|
+
|
|
6
|
+
export type ValueOf<T> = T[keyof T];
|
|
7
|
+
|
|
8
|
+
export const CATALOG_CONFIG: CatalogConfig = {
|
|
9
|
+
platforms: [EVOLUTION_PLATFORM, ADVANCED_PLATFORM, VM_WARE_PLATFORM],
|
|
10
|
+
|
|
11
|
+
products: {
|
|
12
|
+
...EVOLUTION_PRODUCTS,
|
|
13
|
+
...ADVANCED_PRODUCTS,
|
|
14
|
+
...VM_WARE_PRODUCTS,
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
catalog: {
|
|
18
|
+
...EVOLUTION_CATALOG,
|
|
19
|
+
...ADVANCED_CATALOG,
|
|
20
|
+
...VM_WARE_CATALOG,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type ProductType =
|
|
25
|
+
| ValueOf<typeof ADVANCED_PRODUCT>
|
|
26
|
+
| ValueOf<typeof VM_WARE_PRODUCT>
|
|
27
|
+
| ValueOf<typeof EVOLUTION_PRODUCT>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { CATEGORY, PLATFORM } from '../../../constants';
|
|
2
|
+
import { CatalogConfig } from '../../../types';
|
|
3
|
+
import { ADVANCED_PRODUCT } from './constants';
|
|
4
|
+
|
|
5
|
+
export const ADVANCED_CATALOG: CatalogConfig['catalog'] = {
|
|
6
|
+
[PLATFORM.Advanced]: [
|
|
7
|
+
{
|
|
8
|
+
id: CATEGORY.Popular,
|
|
9
|
+
label: 'Популярное',
|
|
10
|
+
dataTestId: 'popular',
|
|
11
|
+
visibleProducts: [
|
|
12
|
+
ADVANCED_PRODUCT.AdvancedCloudServer,
|
|
13
|
+
ADVANCED_PRODUCT.AdvancedMySqlDataBase,
|
|
14
|
+
ADVANCED_PRODUCT.AdvancedPostgreSqlDatabase,
|
|
15
|
+
ADVANCED_PRODUCT.AdvancedSqlDatabase,
|
|
16
|
+
ADVANCED_PRODUCT.AdvancedObjectStorage,
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: CATEGORY.Computations,
|
|
21
|
+
label: 'Вычисления',
|
|
22
|
+
dataTestId: 'computations',
|
|
23
|
+
visibleProducts: [ADVANCED_PRODUCT.AdvancedCloudServer, ADVANCED_PRODUCT.AdvancedServerlessFunctions],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: CATEGORY.Network,
|
|
27
|
+
label: 'Сеть',
|
|
28
|
+
dataTestId: 'network',
|
|
29
|
+
visibleProducts: [ADVANCED_PRODUCT.AdvancedNetwork, ADVANCED_PRODUCT.AdvancedElasticLoadBalance],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: CATEGORY.Containerization,
|
|
33
|
+
label: 'Контейнеры',
|
|
34
|
+
dataTestId: 'containerization',
|
|
35
|
+
visibleProducts: [ADVANCED_PRODUCT.AdvancedCloudContainerEngine],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: CATEGORY.Database,
|
|
39
|
+
label: 'Базы данных',
|
|
40
|
+
dataTestId: 'database',
|
|
41
|
+
visibleProducts: [
|
|
42
|
+
ADVANCED_PRODUCT.AdvancedMySqlDataBase,
|
|
43
|
+
ADVANCED_PRODUCT.AdvancedPostgreSqlDatabase,
|
|
44
|
+
ADVANCED_PRODUCT.AdvancedSqlDatabase,
|
|
45
|
+
ADVANCED_PRODUCT.AdvancedDocumentDatabase,
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: CATEGORY.Storage,
|
|
50
|
+
label: 'Хранилище',
|
|
51
|
+
dataTestId: 'storage',
|
|
52
|
+
visibleProducts: [
|
|
53
|
+
ADVANCED_PRODUCT.AdvancedObjectStorage,
|
|
54
|
+
ADVANCED_PRODUCT.AdvancedCloudBackup,
|
|
55
|
+
ADVANCED_PRODUCT.AdvancedScalableFile,
|
|
56
|
+
ADVANCED_PRODUCT.AdvancedDataWarehouseService,
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: CATEGORY.Analytic,
|
|
61
|
+
label: 'Аналитика данных',
|
|
62
|
+
dataTestId: CATEGORY.Analytic,
|
|
63
|
+
visibleProducts: [
|
|
64
|
+
ADVANCED_PRODUCT.AdvancedMapReduce,
|
|
65
|
+
ADVANCED_PRODUCT.AdvancedDataLakeInsight,
|
|
66
|
+
ADVANCED_PRODUCT.AdvancedDataAsYouUse,
|
|
67
|
+
ADVANCED_PRODUCT.AdvancedElasticsearch,
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: CATEGORY.Development,
|
|
72
|
+
label: 'Разработка',
|
|
73
|
+
dataTestId: 'development',
|
|
74
|
+
visibleProducts: [
|
|
75
|
+
ADVANCED_PRODUCT.AdvancedDmsRabbitMq,
|
|
76
|
+
ADVANCED_PRODUCT.AdvancesDmsKafka,
|
|
77
|
+
ADVANCED_PRODUCT.AdvancedDcsRedis,
|
|
78
|
+
ADVANCED_PRODUCT.AdvancedDcsMemcached,
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const ADVANCED_PRODUCT = {
|
|
2
|
+
AdvancedMySqlDataBase: 'mySqlDatabase',
|
|
3
|
+
AdvancedDcsMemcached: 'dcsMemcached',
|
|
4
|
+
AdvancedDmsRabbitMq: 'dmsRabbitMq',
|
|
5
|
+
AdvancedDcsRedis: 'dcsRedis',
|
|
6
|
+
AdvancesDmsKafka: 'dmsKafka',
|
|
7
|
+
AdvancedMapReduce: 'mapReduce',
|
|
8
|
+
AdvancedDataLakeInsight: 'dataLakeInsight',
|
|
9
|
+
AdvancedDataAsYouUse: 'dataAsYouUse',
|
|
10
|
+
AdvancedServerlessFunctions: 'functionGraph',
|
|
11
|
+
AdvancedObjectStorage: 'objectStorage',
|
|
12
|
+
AdvancedElasticsearch: 'cloudSearchService',
|
|
13
|
+
AdvancedDataWarehouseService: 'dataWarehouseService',
|
|
14
|
+
AdvancedScalableFile: 'scalableFile',
|
|
15
|
+
AdvancedCloudBackup: 'cloudBackup',
|
|
16
|
+
AdvancedCloudContainerEngine: 'cloudContainerEngine',
|
|
17
|
+
AdvancedElasticLoadBalance: 'elasticLoadBalance',
|
|
18
|
+
AdvancedSqlDatabase: 'sqlDatabase',
|
|
19
|
+
AdvancedPostgreSqlDatabase: 'postgreSqlDatabase',
|
|
20
|
+
AdvancedDocumentDatabase: 'documentDatabase',
|
|
21
|
+
AdvancedCloudServer: 'cloudServer',
|
|
22
|
+
AdvancedNetwork: 'network',
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AdvancedPlatformSVG } from '@cloud-ru/uikit-product-icons';
|
|
2
|
+
|
|
3
|
+
import { PLATFORM } from '../../../constants';
|
|
4
|
+
import { Platform } from '../../../types';
|
|
5
|
+
|
|
6
|
+
export const ADVANCED_PLATFORM: Platform = {
|
|
7
|
+
id: PLATFORM.Advanced,
|
|
8
|
+
icon: <AdvancedPlatformSVG />,
|
|
9
|
+
label: 'Advanced Cloud.ru',
|
|
10
|
+
description: '60+ IaaS- и PaaS-сервисов для развития инфраструктуры',
|
|
11
|
+
access: 'request',
|
|
12
|
+
dataTestId: 'calculator-catalog-platform-advanced',
|
|
13
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { CONTROL, FormConfig } from '../../../../components';
|
|
2
|
+
import { getObs, UnitsOfCalculationItem } from '../../../utils/obs';
|
|
3
|
+
|
|
4
|
+
const StorageClassItem = {
|
|
5
|
+
VirtualServer: 'Virtual server',
|
|
6
|
+
Volume: 'Volume',
|
|
7
|
+
SFSTurbo: 'SFS Turbo',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const storageClassItems = [
|
|
11
|
+
{
|
|
12
|
+
value: StorageClassItem.VirtualServer,
|
|
13
|
+
label: 'Virtual server',
|
|
14
|
+
description:
|
|
15
|
+
'Предназначен для сервисов Elastic Cloud Server (ECS) и Bare Metal Server (BMS), с помощью которого осуществляется бэкап системных дисков и дисков с данными.',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: StorageClassItem.Volume,
|
|
19
|
+
label: 'Volume',
|
|
20
|
+
description:
|
|
21
|
+
'Предназначен для сервиса Elastic Volume Sevice (EVS), с помощью которого осуществляется бэкап системных дисков или дисков с данными.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: StorageClassItem.SFSTurbo,
|
|
25
|
+
label: 'SFS Turbo',
|
|
26
|
+
description:
|
|
27
|
+
'Предназначен для сервиса Scalable File Service (SFS), с помощью которого осуществляется бэкап файлового хранилища.',
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export const CLOUD_BACKUP_FORM_CONFIG: FormConfig = {
|
|
32
|
+
ui: ['serviceAlert', 'service', ['storage']],
|
|
33
|
+
controls: {
|
|
34
|
+
serviceAlert: {
|
|
35
|
+
type: CONTROL.Alert,
|
|
36
|
+
uiProps: {
|
|
37
|
+
description: 'Рекомендуем выбирать объем хранилища под бэкапы на 20% больше объема самого продукта',
|
|
38
|
+
},
|
|
39
|
+
accessorKey: 'cbr.alert',
|
|
40
|
+
},
|
|
41
|
+
service: {
|
|
42
|
+
type: CONTROL.Carousel,
|
|
43
|
+
defaultValue: StorageClassItem.VirtualServer,
|
|
44
|
+
items: storageClassItems,
|
|
45
|
+
accessorKey: 'cbr.service',
|
|
46
|
+
decoratorProps: {
|
|
47
|
+
label: 'Тип продукта',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
storage: getObs({
|
|
51
|
+
space: {
|
|
52
|
+
accessorKey: 'cbr.storage.space',
|
|
53
|
+
label: 'Размер хранилища',
|
|
54
|
+
defaultValue: 1,
|
|
55
|
+
uiProps: {
|
|
56
|
+
min: 1,
|
|
57
|
+
max: 9_999_998_976,
|
|
58
|
+
},
|
|
59
|
+
relateFn: ({ unitsOfCalculation }) => {
|
|
60
|
+
if (unitsOfCalculation === UnitsOfCalculationItem.Tb) {
|
|
61
|
+
return {
|
|
62
|
+
uiProps: {
|
|
63
|
+
max: 9_765_624,
|
|
64
|
+
postfix: 'ТБ',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
units: {
|
|
71
|
+
accessorKey: 'cbr.storage.unitsOfCalculation',
|
|
72
|
+
defaultValue: 'gb',
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
};
|