@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,267 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CloudBackupAndRecoverySVG,
|
|
3
|
+
CloudContainerEngineSVG,
|
|
4
|
+
CloudSearchServiceSVG,
|
|
5
|
+
DataLakeInsightSVG,
|
|
6
|
+
DataWarehouseServiceSVG,
|
|
7
|
+
DistributedCacheServiceForMemcachedSVG,
|
|
8
|
+
DistributedCacheServiceForRedisSVG,
|
|
9
|
+
DistributedMessageServiceForKafkaSVG,
|
|
10
|
+
DistributedMessageServiceForRabbitMqSVG,
|
|
11
|
+
DocumentDatabaseServiceSVG,
|
|
12
|
+
ElasticCloudServerSVG,
|
|
13
|
+
ElasticLoadBalanceSVG,
|
|
14
|
+
MapReduceServiceSVG,
|
|
15
|
+
ObjectStorageServiceSVG,
|
|
16
|
+
PlaceholderSVG,
|
|
17
|
+
RelationalDatabaseServiceSVG,
|
|
18
|
+
ScalableFileServiceSVG,
|
|
19
|
+
ServerlessFunctionSVG,
|
|
20
|
+
SnatSVG,
|
|
21
|
+
} from '@cloud-ru/uikit-product-icons';
|
|
22
|
+
|
|
23
|
+
import { PLATFORM } from '../../../constants';
|
|
24
|
+
import { CatalogConfig } from '../../../types';
|
|
25
|
+
import { ADVANCED_PRODUCT } from './constants';
|
|
26
|
+
import {
|
|
27
|
+
CLOUD_BACKUP_FORM_CONFIG,
|
|
28
|
+
CLOUD_CONTAINER_ENGINE_FORM_CONFIG,
|
|
29
|
+
CLOUD_SERVER_FORM_CONFIG,
|
|
30
|
+
DATA_AS_YOU_USE_FORM_CONFIG,
|
|
31
|
+
DATA_LAKE_INSIGHT_FORM_CONFIG,
|
|
32
|
+
DATA_WAREHOUSE_SERVICE_FORM_CONFIG,
|
|
33
|
+
DCS_REDIS_FORM_CONFIG,
|
|
34
|
+
DMS_KAFKA_FORM_CONFIG,
|
|
35
|
+
DOCUMENT_DATABASE_FORM_CONFIG,
|
|
36
|
+
DSC_MEMCACHED_FORM_CONFIG,
|
|
37
|
+
DSC_RABBIT_MQ_FORM_CONFIG,
|
|
38
|
+
ELASTIC_LOAD_BALANCE_FORM_CONFIG,
|
|
39
|
+
ELASTIC_SEARCH_FORM_CONFIG,
|
|
40
|
+
FUNCTION_GRAPH_FORM_CONFIG,
|
|
41
|
+
MAP_REDUCE_FORM_CONFIG,
|
|
42
|
+
MYSQL_DATA_BASE_FORM_CONFIG,
|
|
43
|
+
NETWORK_FORM_CONFIG,
|
|
44
|
+
OBJECT_STORAGE_FORM_CONFIG,
|
|
45
|
+
POSTGRE_SQL_DATA_BASE_FORM_CONFIG,
|
|
46
|
+
SCALABLE_FILE_FORM_CONFIG,
|
|
47
|
+
SQL_DATA_BASE_FORM_CONFIG,
|
|
48
|
+
} from './product-config';
|
|
49
|
+
|
|
50
|
+
export const ADVANCED_PRODUCTS: CatalogConfig['products'] = {
|
|
51
|
+
[ADVANCED_PRODUCT.AdvancedMySqlDataBase]: {
|
|
52
|
+
id: ADVANCED_PRODUCT.AdvancedMySqlDataBase,
|
|
53
|
+
platform: PLATFORM.Advanced,
|
|
54
|
+
label: 'Advanced Relational Database service for MySQL',
|
|
55
|
+
caption: 'Базы данных с поддержкой MySQL',
|
|
56
|
+
icon: RelationalDatabaseServiceSVG,
|
|
57
|
+
dataTestId: 'advancedMySqlDataBase',
|
|
58
|
+
formConfig: MYSQL_DATA_BASE_FORM_CONFIG,
|
|
59
|
+
enableChangeProductQuantity: true,
|
|
60
|
+
},
|
|
61
|
+
[ADVANCED_PRODUCT.AdvancedDcsMemcached]: {
|
|
62
|
+
id: ADVANCED_PRODUCT.AdvancedDcsMemcached,
|
|
63
|
+
platform: PLATFORM.Advanced,
|
|
64
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDcsMemcached,
|
|
65
|
+
formConfig: DSC_MEMCACHED_FORM_CONFIG,
|
|
66
|
+
label: 'Advanced Distributed Cache Service for Memcached',
|
|
67
|
+
caption: 'Кеширование данных в памяти на базе Memcached',
|
|
68
|
+
icon: DistributedCacheServiceForMemcachedSVG,
|
|
69
|
+
enableChangeProductQuantity: false,
|
|
70
|
+
},
|
|
71
|
+
[ADVANCED_PRODUCT.AdvancedDmsRabbitMq]: {
|
|
72
|
+
id: ADVANCED_PRODUCT.AdvancedDmsRabbitMq,
|
|
73
|
+
platform: PLATFORM.Advanced,
|
|
74
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDmsRabbitMq,
|
|
75
|
+
formConfig: DSC_RABBIT_MQ_FORM_CONFIG,
|
|
76
|
+
label: 'Advanced Distributed Message Service for RabbitMQ',
|
|
77
|
+
caption: 'Брокер сообщений на базе RabbitMQ',
|
|
78
|
+
icon: DistributedMessageServiceForRabbitMqSVG,
|
|
79
|
+
enableChangeProductQuantity: false,
|
|
80
|
+
},
|
|
81
|
+
[ADVANCED_PRODUCT.AdvancedDcsRedis]: {
|
|
82
|
+
id: ADVANCED_PRODUCT.AdvancedDcsRedis,
|
|
83
|
+
platform: PLATFORM.Advanced,
|
|
84
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDcsRedis,
|
|
85
|
+
formConfig: DCS_REDIS_FORM_CONFIG,
|
|
86
|
+
label: 'Advanced Distributed Cache Service for Redis',
|
|
87
|
+
caption: 'Кеширование данных в памяти на базе Redis',
|
|
88
|
+
icon: DistributedCacheServiceForRedisSVG,
|
|
89
|
+
enableChangeProductQuantity: false,
|
|
90
|
+
},
|
|
91
|
+
[ADVANCED_PRODUCT.AdvancesDmsKafka]: {
|
|
92
|
+
id: ADVANCED_PRODUCT.AdvancesDmsKafka,
|
|
93
|
+
platform: PLATFORM.Advanced,
|
|
94
|
+
dataTestId: ADVANCED_PRODUCT.AdvancesDmsKafka,
|
|
95
|
+
formConfig: DMS_KAFKA_FORM_CONFIG,
|
|
96
|
+
label: 'Advanced Distributed Message Service for Kafka',
|
|
97
|
+
caption: 'Брокер сообщений на базе Apache Kafka',
|
|
98
|
+
icon: DistributedMessageServiceForKafkaSVG,
|
|
99
|
+
enableChangeProductQuantity: false,
|
|
100
|
+
},
|
|
101
|
+
[ADVANCED_PRODUCT.AdvancedMapReduce]: {
|
|
102
|
+
id: ADVANCED_PRODUCT.AdvancedMapReduce,
|
|
103
|
+
platform: PLATFORM.Advanced,
|
|
104
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedMapReduce,
|
|
105
|
+
formConfig: MAP_REDUCE_FORM_CONFIG,
|
|
106
|
+
label: 'Advanced MapReduce Service',
|
|
107
|
+
caption: 'Хранение, обработка и анализ больших данных',
|
|
108
|
+
icon: MapReduceServiceSVG,
|
|
109
|
+
enableChangeProductQuantity: false,
|
|
110
|
+
},
|
|
111
|
+
[ADVANCED_PRODUCT.AdvancedDataLakeInsight]: {
|
|
112
|
+
id: ADVANCED_PRODUCT.AdvancedDataLakeInsight,
|
|
113
|
+
platform: PLATFORM.Advanced,
|
|
114
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDataLakeInsight,
|
|
115
|
+
formConfig: DATA_LAKE_INSIGHT_FORM_CONFIG,
|
|
116
|
+
label: 'Advanced Data Lake Insight',
|
|
117
|
+
caption: 'Сервис для обработки и анализа больших данных',
|
|
118
|
+
icon: DataLakeInsightSVG,
|
|
119
|
+
enableChangeProductQuantity: false,
|
|
120
|
+
},
|
|
121
|
+
[ADVANCED_PRODUCT.AdvancedDataAsYouUse]: {
|
|
122
|
+
id: ADVANCED_PRODUCT.AdvancedDataAsYouUse,
|
|
123
|
+
platform: PLATFORM.Advanced,
|
|
124
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDataAsYouUse,
|
|
125
|
+
formConfig: DATA_AS_YOU_USE_FORM_CONFIG,
|
|
126
|
+
label: 'Advanced DataArts Studio',
|
|
127
|
+
caption: 'Хранение, вычисление и анализ больших данных',
|
|
128
|
+
icon: PlaceholderSVG,
|
|
129
|
+
enableChangeProductQuantity: false,
|
|
130
|
+
},
|
|
131
|
+
[ADVANCED_PRODUCT.AdvancedServerlessFunctions]: {
|
|
132
|
+
id: ADVANCED_PRODUCT.AdvancedServerlessFunctions,
|
|
133
|
+
platform: PLATFORM.Advanced,
|
|
134
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedServerlessFunctions,
|
|
135
|
+
label: 'Advanced Function Graph',
|
|
136
|
+
caption: 'Запуск кода в бессерверной среде (serverless)',
|
|
137
|
+
formConfig: FUNCTION_GRAPH_FORM_CONFIG,
|
|
138
|
+
icon: ServerlessFunctionSVG,
|
|
139
|
+
enableChangeProductQuantity: false,
|
|
140
|
+
},
|
|
141
|
+
[ADVANCED_PRODUCT.AdvancedElasticLoadBalance]: {
|
|
142
|
+
id: ADVANCED_PRODUCT.AdvancedElasticLoadBalance,
|
|
143
|
+
platform: PLATFORM.Advanced,
|
|
144
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedElasticLoadBalance,
|
|
145
|
+
label: 'Advanced Elastic Load Balance',
|
|
146
|
+
caption: 'Сервис для балансировки сетевого трафика',
|
|
147
|
+
formConfig: ELASTIC_LOAD_BALANCE_FORM_CONFIG,
|
|
148
|
+
icon: ElasticLoadBalanceSVG,
|
|
149
|
+
enableChangeProductQuantity: false,
|
|
150
|
+
},
|
|
151
|
+
[ADVANCED_PRODUCT.AdvancedObjectStorage]: {
|
|
152
|
+
id: ADVANCED_PRODUCT.AdvancedObjectStorage,
|
|
153
|
+
platform: PLATFORM.Advanced,
|
|
154
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedObjectStorage,
|
|
155
|
+
label: 'Advanced Object Storage Service',
|
|
156
|
+
caption: 'Объектное хранилище, полностью совместимое с S3',
|
|
157
|
+
formConfig: OBJECT_STORAGE_FORM_CONFIG,
|
|
158
|
+
icon: ObjectStorageServiceSVG,
|
|
159
|
+
enableChangeProductQuantity: true,
|
|
160
|
+
},
|
|
161
|
+
[ADVANCED_PRODUCT.AdvancedElasticsearch]: {
|
|
162
|
+
id: ADVANCED_PRODUCT.AdvancedElasticsearch,
|
|
163
|
+
platform: PLATFORM.Advanced,
|
|
164
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedElasticsearch,
|
|
165
|
+
label: 'Advanced Cloud Search Service',
|
|
166
|
+
caption: 'Распределенная поисковая система на базе Elasticsearch',
|
|
167
|
+
formConfig: ELASTIC_SEARCH_FORM_CONFIG,
|
|
168
|
+
icon: CloudSearchServiceSVG,
|
|
169
|
+
enableChangeProductQuantity: false,
|
|
170
|
+
},
|
|
171
|
+
[ADVANCED_PRODUCT.AdvancedDataWarehouseService]: {
|
|
172
|
+
id: ADVANCED_PRODUCT.AdvancedDataWarehouseService,
|
|
173
|
+
platform: PLATFORM.Advanced,
|
|
174
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDataWarehouseService,
|
|
175
|
+
label: 'Advanced Data Warehouse Service',
|
|
176
|
+
caption: 'Надежное хранилище корпоративных данных',
|
|
177
|
+
formConfig: DATA_WAREHOUSE_SERVICE_FORM_CONFIG,
|
|
178
|
+
icon: DataWarehouseServiceSVG,
|
|
179
|
+
enableChangeProductQuantity: false,
|
|
180
|
+
},
|
|
181
|
+
[ADVANCED_PRODUCT.AdvancedScalableFile]: {
|
|
182
|
+
id: ADVANCED_PRODUCT.AdvancedScalableFile,
|
|
183
|
+
platform: PLATFORM.Advanced,
|
|
184
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedScalableFile,
|
|
185
|
+
label: 'Advanced Scalable File Service Turbo',
|
|
186
|
+
caption: 'Масштабируемая файловая система NFS',
|
|
187
|
+
formConfig: SCALABLE_FILE_FORM_CONFIG,
|
|
188
|
+
icon: ScalableFileServiceSVG,
|
|
189
|
+
enableChangeProductQuantity: false,
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
[ADVANCED_PRODUCT.AdvancedCloudBackup]: {
|
|
193
|
+
id: ADVANCED_PRODUCT.AdvancedCloudBackup,
|
|
194
|
+
platform: PLATFORM.Advanced,
|
|
195
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedCloudBackup,
|
|
196
|
+
label: 'Advanced Cloud Backup and Recovery',
|
|
197
|
+
caption: 'Резервное копирование облачных дисков и серверов',
|
|
198
|
+
formConfig: CLOUD_BACKUP_FORM_CONFIG,
|
|
199
|
+
icon: CloudBackupAndRecoverySVG,
|
|
200
|
+
enableChangeProductQuantity: false,
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
[ADVANCED_PRODUCT.AdvancedCloudContainerEngine]: {
|
|
204
|
+
id: ADVANCED_PRODUCT.AdvancedCloudContainerEngine,
|
|
205
|
+
platform: PLATFORM.Advanced,
|
|
206
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedCloudContainerEngine,
|
|
207
|
+
label: 'Advanced Cloud Container Engine',
|
|
208
|
+
caption: 'Управляемые высокопроизводительные кластеры Kubernetes',
|
|
209
|
+
formConfig: CLOUD_CONTAINER_ENGINE_FORM_CONFIG,
|
|
210
|
+
icon: CloudContainerEngineSVG,
|
|
211
|
+
enableChangeProductQuantity: true,
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
[ADVANCED_PRODUCT.AdvancedSqlDatabase]: {
|
|
215
|
+
id: ADVANCED_PRODUCT.AdvancedSqlDatabase,
|
|
216
|
+
platform: PLATFORM.Advanced,
|
|
217
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedSqlDatabase,
|
|
218
|
+
label: 'Advanced Relational Database service for SQL Server',
|
|
219
|
+
caption: 'Базы данных с поддержкой SQL Server',
|
|
220
|
+
formConfig: SQL_DATA_BASE_FORM_CONFIG,
|
|
221
|
+
icon: RelationalDatabaseServiceSVG,
|
|
222
|
+
enableChangeProductQuantity: true,
|
|
223
|
+
},
|
|
224
|
+
[ADVANCED_PRODUCT.AdvancedPostgreSqlDatabase]: {
|
|
225
|
+
id: ADVANCED_PRODUCT.AdvancedPostgreSqlDatabase,
|
|
226
|
+
platform: PLATFORM.Advanced,
|
|
227
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedPostgreSqlDatabase,
|
|
228
|
+
label: 'Advanced Relational Database Service for PostgreSQL',
|
|
229
|
+
caption: 'Базы данных с поддержкой PostgreSQL',
|
|
230
|
+
formConfig: POSTGRE_SQL_DATA_BASE_FORM_CONFIG,
|
|
231
|
+
icon: RelationalDatabaseServiceSVG,
|
|
232
|
+
enableChangeProductQuantity: true,
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
[ADVANCED_PRODUCT.AdvancedDocumentDatabase]: {
|
|
236
|
+
id: ADVANCED_PRODUCT.AdvancedDocumentDatabase,
|
|
237
|
+
platform: PLATFORM.Advanced,
|
|
238
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedDocumentDatabase,
|
|
239
|
+
label: 'Advanced Document Database Service with MongoDB',
|
|
240
|
+
caption: 'Распределенная реляционная БД с поддержкой MySQL',
|
|
241
|
+
formConfig: DOCUMENT_DATABASE_FORM_CONFIG,
|
|
242
|
+
icon: DocumentDatabaseServiceSVG,
|
|
243
|
+
enableChangeProductQuantity: false,
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
[ADVANCED_PRODUCT.AdvancedCloudServer]: {
|
|
247
|
+
id: ADVANCED_PRODUCT.AdvancedCloudServer,
|
|
248
|
+
platform: PLATFORM.Advanced,
|
|
249
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedCloudServer,
|
|
250
|
+
label: 'Advanced Elastic Cloud Server',
|
|
251
|
+
caption: 'Виртуальные машины для любых сценариев использования',
|
|
252
|
+
formConfig: CLOUD_SERVER_FORM_CONFIG,
|
|
253
|
+
icon: ElasticCloudServerSVG,
|
|
254
|
+
enableChangeProductQuantity: true,
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
[ADVANCED_PRODUCT.AdvancedNetwork]: {
|
|
258
|
+
id: ADVANCED_PRODUCT.AdvancedNetwork,
|
|
259
|
+
platform: PLATFORM.Advanced,
|
|
260
|
+
dataTestId: ADVANCED_PRODUCT.AdvancedNetwork,
|
|
261
|
+
label: 'Advanced NAT Gateway',
|
|
262
|
+
caption: 'NAT-шлюз для облачных и локальных серверов',
|
|
263
|
+
formConfig: NETWORK_FORM_CONFIG,
|
|
264
|
+
icon: SnatSVG,
|
|
265
|
+
enableChangeProductQuantity: true,
|
|
266
|
+
},
|
|
267
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Alert } from '@snack-uikit/alert';
|
|
2
|
+
import { Link } from '@snack-uikit/link';
|
|
3
|
+
|
|
4
|
+
import { CATEGORY, PLATFORM } from '../../../constants';
|
|
5
|
+
import { CatalogConfig } from '../../../types';
|
|
6
|
+
import { EVOLUTION_PRODUCT } from './constants';
|
|
7
|
+
|
|
8
|
+
export const EVOLUTION_CATALOG: CatalogConfig['catalog'] = {
|
|
9
|
+
[PLATFORM.Evolution]: [
|
|
10
|
+
{
|
|
11
|
+
id: CATEGORY.Popular,
|
|
12
|
+
label: 'Популярное',
|
|
13
|
+
dataTestId: 'popular',
|
|
14
|
+
visibleProducts: [
|
|
15
|
+
EVOLUTION_PRODUCT.EvolutionCloudServer,
|
|
16
|
+
EVOLUTION_PRODUCT.EvolutionCloudServerFreeTier,
|
|
17
|
+
EVOLUTION_PRODUCT.EvolutionKubernetes,
|
|
18
|
+
EVOLUTION_PRODUCT.EvolutionStorageS3FreeTier,
|
|
19
|
+
EVOLUTION_PRODUCT.EvolutionStorageS3,
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: CATEGORY.FreeTier,
|
|
24
|
+
label: 'Free Tier',
|
|
25
|
+
dataTestId: 'free-tier',
|
|
26
|
+
visibleProducts: [
|
|
27
|
+
EVOLUTION_PRODUCT.EvolutionCloudServerFreeTier,
|
|
28
|
+
EVOLUTION_PRODUCT.EvolutionStorageS3FreeTier,
|
|
29
|
+
EVOLUTION_PRODUCT.EvolutionContainerAppsFreeTier,
|
|
30
|
+
],
|
|
31
|
+
banner: (
|
|
32
|
+
<Alert
|
|
33
|
+
appearance='info'
|
|
34
|
+
outline
|
|
35
|
+
description={
|
|
36
|
+
<>
|
|
37
|
+
Free tier — это облачные ресурсы, за которые не надо платить. После активации сервис
|
|
38
|
+
останется навсегда бесплатным. Подробнее в
|
|
39
|
+
<Link
|
|
40
|
+
size='m'
|
|
41
|
+
appearance='primary'
|
|
42
|
+
textMode='accent'
|
|
43
|
+
insideText
|
|
44
|
+
target='_blank'
|
|
45
|
+
href='https://cloud.ru/docs/evolution/overview/topics/free-tier'
|
|
46
|
+
text='документации'
|
|
47
|
+
/>
|
|
48
|
+
</>
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: CATEGORY.Computations,
|
|
55
|
+
label: 'Инфраструктура',
|
|
56
|
+
dataTestId: 'computations',
|
|
57
|
+
visibleProducts: [
|
|
58
|
+
EVOLUTION_PRODUCT.EvolutionCloudServer,
|
|
59
|
+
EVOLUTION_PRODUCT.EvolutionCloudServerFreeTier,
|
|
60
|
+
EVOLUTION_PRODUCT.EvolutionBareMetal,
|
|
61
|
+
EVOLUTION_PRODUCT.EvolutionCloudServerGpu,
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: CATEGORY.Network,
|
|
66
|
+
label: 'Сети',
|
|
67
|
+
dataTestId: 'network',
|
|
68
|
+
visibleProducts: [EVOLUTION_PRODUCT.EvolutionSnatGateway, EVOLUTION_PRODUCT.EvolutionPublicIp],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: CATEGORY.Storage,
|
|
72
|
+
label: 'Хранение и резервное копирование',
|
|
73
|
+
dataTestId: 'storage',
|
|
74
|
+
visibleProducts: [EVOLUTION_PRODUCT.EvolutionStorageS3, EVOLUTION_PRODUCT.EvolutionStorageS3FreeTier],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: CATEGORY.Containerization,
|
|
78
|
+
label: 'Контейнеры',
|
|
79
|
+
dataTestId: 'containerization',
|
|
80
|
+
visibleProducts: [
|
|
81
|
+
EVOLUTION_PRODUCT.EvolutionKubernetes,
|
|
82
|
+
EVOLUTION_PRODUCT.EvolutionContainerApps,
|
|
83
|
+
EVOLUTION_PRODUCT.EvolutionContainerAppsFreeTier,
|
|
84
|
+
EVOLUTION_PRODUCT.EvolutionArtifactRegistry,
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: CATEGORY.Database,
|
|
89
|
+
label: 'Платформы данных',
|
|
90
|
+
dataTestId: 'database',
|
|
91
|
+
visibleProducts: [
|
|
92
|
+
EVOLUTION_PRODUCT.EvolutionManagedPostgreSQL,
|
|
93
|
+
EVOLUTION_PRODUCT.EvolutionArenadataDb,
|
|
94
|
+
EVOLUTION_PRODUCT.EvolutionManagedTrino,
|
|
95
|
+
EVOLUTION_PRODUCT.EvolutionManagedMetastore,
|
|
96
|
+
EVOLUTION_PRODUCT.EvolutionManagedRedis,
|
|
97
|
+
EVOLUTION_PRODUCT.EvolutionManagedSpark,
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: CATEGORY.ML,
|
|
102
|
+
label: 'ML/AI Инструменты',
|
|
103
|
+
dataTestId: 'ml',
|
|
104
|
+
visibleProducts: [EVOLUTION_PRODUCT.EvolutionMlInference],
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export const EVOLUTION_PRODUCT = {
|
|
2
|
+
EvolutionCloudServer: 'evolutionCloudServer',
|
|
3
|
+
EvolutionCloudServerGpu: 'evolutionCloudServerGpu',
|
|
4
|
+
EvolutionCloudServerFreeTier: 'evolutionCloudServerFreeTier',
|
|
5
|
+
EvolutionKubernetes: 'evolutionKubernetes',
|
|
6
|
+
EvolutionStorageS3FreeTier: 'evolutionStorageS3FreeTier',
|
|
7
|
+
EvolutionStorageS3: 'evolutionStorageS3',
|
|
8
|
+
EvolutionManagedPostgreSQL: 'evolutionPostgreSql',
|
|
9
|
+
EvolutionBareMetal: 'evolutionBareMetal',
|
|
10
|
+
EvolutionContainerApps: 'evolutionContainerApps',
|
|
11
|
+
EvolutionContainerAppsFreeTier: 'evolutionContainerAppsFreeTier',
|
|
12
|
+
EvolutionArenadataDb: 'evolutionArenadataDb',
|
|
13
|
+
EvolutionMlInference: 'evolutionMlInference',
|
|
14
|
+
EvolutionSnatGateway: 'evolutionSnatGateway',
|
|
15
|
+
EvolutionManagedMetastore: 'evolutionManagedMetastore',
|
|
16
|
+
EvolutionPublicIp: 'evolutionPublicIp',
|
|
17
|
+
EvolutionArtifactRegistry: 'evolutionArtifactRegistry',
|
|
18
|
+
EvolutionManagedTrino: 'evolutionManagedTrino',
|
|
19
|
+
EvolutionManagedRedis: 'evolutionManagedRedis',
|
|
20
|
+
EvolutionManagedSpark: 'evolutionManagedSpark',
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
const GuaranteedPartItem = {
|
|
24
|
+
'10': '10',
|
|
25
|
+
'30': '30',
|
|
26
|
+
'100': '100',
|
|
27
|
+
'120': '120',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const guaranteedPartToVCpuMap = {
|
|
31
|
+
[GuaranteedPartItem[10]]: [1, 2, 4, 8],
|
|
32
|
+
[GuaranteedPartItem[30]]: [1, 2, 4, 8, 16, 24, 32],
|
|
33
|
+
[GuaranteedPartItem[100]]: [1, 2, 4, 8, 16, 24, 32, 64],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const guaranteedPartVCpuToRamMap: Record<string, Record<string, number[]>> = {
|
|
37
|
+
[GuaranteedPartItem[10]]: {
|
|
38
|
+
'1': [1, 2],
|
|
39
|
+
'2': [4],
|
|
40
|
+
'4': [8, 16, 32],
|
|
41
|
+
'8': [16, 32],
|
|
42
|
+
},
|
|
43
|
+
[GuaranteedPartItem[30]]: {
|
|
44
|
+
'1': [1, 2],
|
|
45
|
+
'2': [4],
|
|
46
|
+
'4': [8, 16, 32, 64],
|
|
47
|
+
'8': [16, 32, 64],
|
|
48
|
+
'16': [32, 64],
|
|
49
|
+
'24': [48],
|
|
50
|
+
'32': [64],
|
|
51
|
+
},
|
|
52
|
+
[GuaranteedPartItem[100]]: {
|
|
53
|
+
'1': [1, 2],
|
|
54
|
+
'2': [4],
|
|
55
|
+
'4': [8, 16, 32, 64],
|
|
56
|
+
'8': [16, 32, 64, 128],
|
|
57
|
+
'16': [32, 64, 128, 256],
|
|
58
|
+
'24': [32, 48],
|
|
59
|
+
'32': [64, 128, 256],
|
|
60
|
+
'64': [128, 256],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export enum DeploymentMode {
|
|
65
|
+
Standard = 'standart',
|
|
66
|
+
Business = 'business',
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const deploymentModes = [
|
|
70
|
+
{
|
|
71
|
+
label: 'Стандарт',
|
|
72
|
+
value: DeploymentMode.Standard,
|
|
73
|
+
description: 'Для тестирования и несложных приложений',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'Бизнес',
|
|
77
|
+
value: DeploymentMode.Business,
|
|
78
|
+
description: 'Для высоконагруженных сервисов',
|
|
79
|
+
},
|
|
80
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EvolutionSVG } from '@cloud-ru/uikit-product-icons';
|
|
2
|
+
|
|
3
|
+
import { PLATFORM } from '../../../constants';
|
|
4
|
+
import { Platform } from '../../../types';
|
|
5
|
+
|
|
6
|
+
export const EVOLUTION_PLATFORM: Platform = {
|
|
7
|
+
id: PLATFORM.Evolution,
|
|
8
|
+
icon: <EvolutionSVG />,
|
|
9
|
+
label: 'Evolution Cloud.ru',
|
|
10
|
+
description: 'Публичное российское облако на базе open source',
|
|
11
|
+
access: 'public',
|
|
12
|
+
dataTestId: 'calculator-catalog-platform-evolution',
|
|
13
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { CONTROL, FormConfig } from '../../../../components';
|
|
2
|
+
import { WORKING_HOURS_ITEMS, WorkingHoursSpecification } from '../../../../constants';
|
|
3
|
+
import { getMaxWorkingHoursAmount, getNumeralWord } from '../../../utils';
|
|
4
|
+
|
|
5
|
+
const StorageSizeItem = {
|
|
6
|
+
Size3TB: '3',
|
|
7
|
+
Size5TB: '5',
|
|
8
|
+
Size10TB: '10',
|
|
9
|
+
Size20TB: '20',
|
|
10
|
+
Size50TB: '50',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const storageSizeItems = [
|
|
14
|
+
{
|
|
15
|
+
label: '3 ТБ',
|
|
16
|
+
value: StorageSizeItem.Size3TB,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '5 ТБ',
|
|
20
|
+
value: StorageSizeItem.Size5TB,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: '10 ТБ',
|
|
24
|
+
value: StorageSizeItem.Size10TB,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: '20 ТБ',
|
|
28
|
+
value: StorageSizeItem.Size20TB,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: '50 ТБ',
|
|
32
|
+
value: StorageSizeItem.Size50TB,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const LicenseRentItem = {
|
|
37
|
+
Test: 'test',
|
|
38
|
+
Full: 'full',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const licenseRentItems = [
|
|
42
|
+
{
|
|
43
|
+
label: 'Тестовая',
|
|
44
|
+
value: LicenseRentItem.Test,
|
|
45
|
+
description: 'Для тестирования гипотез с ограниченной поддержкой Arenadata',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'Полная',
|
|
49
|
+
value: LicenseRentItem.Full,
|
|
50
|
+
description: 'Для хранилищ данных корпоративного уровня с полной поддержкой Arenadata',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export const EVOLUTION_ARENADATA_DB_FORM_CONFIG: FormConfig = {
|
|
55
|
+
ui: [['storageSize'], ['workHours', 'workHoursSpecification'], 'licenseRent', 'alert', 'snat', 'publicIp'],
|
|
56
|
+
controls: {
|
|
57
|
+
storageSize: {
|
|
58
|
+
type: CONTROL.Segmented,
|
|
59
|
+
accessorKey: 'storageSize',
|
|
60
|
+
items: storageSizeItems,
|
|
61
|
+
decoratorProps: {
|
|
62
|
+
label: 'Размер хранилища',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
workHours: {
|
|
66
|
+
type: CONTROL.Stepper,
|
|
67
|
+
accessorKey: 'workingHours',
|
|
68
|
+
defaultValue: 1,
|
|
69
|
+
uiProps: {
|
|
70
|
+
min: 1,
|
|
71
|
+
max: 1,
|
|
72
|
+
postfix: 'час',
|
|
73
|
+
},
|
|
74
|
+
decoratorProps: {
|
|
75
|
+
label: 'Время работы',
|
|
76
|
+
},
|
|
77
|
+
watchedControls: { period: 'workingHoursSpecification', workingHours: 'workingHours' },
|
|
78
|
+
relateFn: ({ period, workingHours }) => {
|
|
79
|
+
const maxWorkingHours = getMaxWorkingHoursAmount(period, {
|
|
80
|
+
hour: 1,
|
|
81
|
+
day: 24,
|
|
82
|
+
month: 720,
|
|
83
|
+
});
|
|
84
|
+
const isStepperDisabled = maxWorkingHours === 1;
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
uiProps: {
|
|
88
|
+
min: 1,
|
|
89
|
+
max: maxWorkingHours,
|
|
90
|
+
showHint: !isStepperDisabled,
|
|
91
|
+
disabled: isStepperDisabled,
|
|
92
|
+
postfix: getNumeralWord(workingHours, ['час', 'часа', 'часов']),
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
workHoursSpecification: {
|
|
98
|
+
type: CONTROL.SelectSingle,
|
|
99
|
+
accessorKey: 'workingHoursSpecification',
|
|
100
|
+
defaultValue: WorkingHoursSpecification.Hour,
|
|
101
|
+
items: WORKING_HOURS_ITEMS,
|
|
102
|
+
uiProps: {
|
|
103
|
+
showClearButton: false,
|
|
104
|
+
searchable: false,
|
|
105
|
+
},
|
|
106
|
+
decoratorProps: {
|
|
107
|
+
label: 'Период',
|
|
108
|
+
},
|
|
109
|
+
onChangePeriod: (period, setValue) => {
|
|
110
|
+
setValue([['workingHoursSpecification', period]]);
|
|
111
|
+
},
|
|
112
|
+
canChangeWholePricePeriod: true,
|
|
113
|
+
},
|
|
114
|
+
licenseRent: {
|
|
115
|
+
type: CONTROL.ToggleCards,
|
|
116
|
+
accessorKey: 'licenseRent',
|
|
117
|
+
items: licenseRentItems,
|
|
118
|
+
decoratorProps: {
|
|
119
|
+
label: 'Тип арендуемой лицензии',
|
|
120
|
+
labelTooltip:
|
|
121
|
+
'Сервис тарифицируется по модели Allocated. Стоимость начинает расчитываться с момента передачи в аренду и до отказа от аренды.',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
alert: {
|
|
125
|
+
type: CONTROL.Alert,
|
|
126
|
+
uiProps: {
|
|
127
|
+
description: 'При подключении сервиса SNAT-шлюз добавляется по умолчанию',
|
|
128
|
+
},
|
|
129
|
+
accessorKey: 'alert',
|
|
130
|
+
},
|
|
131
|
+
snat: {
|
|
132
|
+
type: CONTROL.Toggle,
|
|
133
|
+
accessorKey: 'snat',
|
|
134
|
+
defaultValue: true,
|
|
135
|
+
decoratorProps: {
|
|
136
|
+
label: 'SNAT-шлюз',
|
|
137
|
+
},
|
|
138
|
+
uiProps: {
|
|
139
|
+
disabled: true,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
publicIp: {
|
|
143
|
+
type: CONTROL.Toggle,
|
|
144
|
+
accessorKey: 'publicIp',
|
|
145
|
+
defaultValue: false,
|
|
146
|
+
decoratorProps: {
|
|
147
|
+
label: 'Публичный IP',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CONTROL, FormConfig } from '../../../../components';
|
|
2
|
+
|
|
3
|
+
export const EVOLUTION_ARTIFACT_REGISTRY: FormConfig = {
|
|
4
|
+
ui: ['tariffType', ['storageSize', 'outgoingTraffic']],
|
|
5
|
+
controls: {
|
|
6
|
+
tariffType: {
|
|
7
|
+
type: CONTROL.Carousel,
|
|
8
|
+
defaultValue: 'basic',
|
|
9
|
+
accessorKey: 'tariff',
|
|
10
|
+
items: [
|
|
11
|
+
{
|
|
12
|
+
value: 'basic',
|
|
13
|
+
label: 'Базовый',
|
|
14
|
+
description: 'В рамках этого тарифа Artifact Registry обеспечивает хранение и скачивание артефактов',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
value: 'premium',
|
|
18
|
+
label: 'Премиум',
|
|
19
|
+
description:
|
|
20
|
+
'Этот тариф включает хранение и скачивание артефактов, сканирование образов на уязвимости, карантин и настройку политики удаления артефактов',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
decoratorProps: {
|
|
24
|
+
label: 'Тариф',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
storageSize: {
|
|
28
|
+
type: CONTROL.Stepper,
|
|
29
|
+
decoratorProps: {
|
|
30
|
+
label: 'Размер хранилища',
|
|
31
|
+
},
|
|
32
|
+
accessorKey: 'storageSize',
|
|
33
|
+
defaultValue: 1,
|
|
34
|
+
uiProps: {
|
|
35
|
+
showHint: false,
|
|
36
|
+
min: 1,
|
|
37
|
+
max: 9_999_999_999,
|
|
38
|
+
postfix: 'ГБ',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
outgoingTraffic: {
|
|
42
|
+
type: CONTROL.Stepper,
|
|
43
|
+
decoratorProps: {
|
|
44
|
+
label: 'Исходящий трафик',
|
|
45
|
+
labelTooltip: 'Бесплатно до 100 ГБ',
|
|
46
|
+
},
|
|
47
|
+
accessorKey: 'outgoingTraffic',
|
|
48
|
+
defaultValue: 0,
|
|
49
|
+
uiProps: {
|
|
50
|
+
showHint: false,
|
|
51
|
+
min: 0,
|
|
52
|
+
max: 9_999_999_999,
|
|
53
|
+
postfix: 'ГБ',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|