From 31be7840c35d28ee3e4ee357155b534a4f80f4aa Mon Sep 17 00:00:00 2001 From: Ajay Parulekar Date: Tue, 8 Oct 2024 17:08:37 +0530 Subject: [PATCH] Changes --- .../en/GlobalSecondaryIndexesBuilder.json | 48 ------------------- .../en/MaterializedViewsBuilder.json | 25 +++++++++- .../MaterializedViewsBuilder.rp.ts | 8 ++-- .../MaterializedViewsBuilder.tsx | 22 ++++----- 4 files changed, 39 insertions(+), 64 deletions(-) delete mode 100644 src/Localization/en/GlobalSecondaryIndexesBuilder.json diff --git a/src/Localization/en/GlobalSecondaryIndexesBuilder.json b/src/Localization/en/GlobalSecondaryIndexesBuilder.json deleted file mode 100644 index d4164ba61..000000000 --- a/src/Localization/en/GlobalSecondaryIndexesBuilder.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "GlobalsecondaryindexesBuilderDescription": "Provision a Globalsecondaryindexes builder cluster for your Azure Cosmos DB account. Globalsecondaryindexes builder is compute in your account that performs read operations on source collection for any updates and updates the global secondary indexes as per the globalsecondaryindexes definition.", - "GlobalsecondaryindexesBuilder": "Globalsecondaryindexes Builder", - "Provisioned": "Provisioned", - "Deprovisioned": "Deprovisioned", - "LearnAboutGlobalSecondaryIndexes": "Learn more about globalsecondaryindexes.", - "GlobalsecondaryindexesDeprovisioningDetailsText": "Learn more about globalsecondaryindexes.", - "GlobalsecondaryindexesBuilderPricing": "Learn more about Globalsecondaryindexes pricing.", - "SKUs": "SKUs", - "SKUsPlaceHolder": "Select SKUs", - "NumberOfInstances": "Number of instances", - "CosmosD2s": "Cosmos.D2s (General Purpose Cosmos Compute with 2 vCPUs, 8 GB Memory)", - "CosmosD4s": "Cosmos.D4s (General Purpose Cosmos Compute with 4 vCPUs, 16 GB Memory)", - "CosmosD8s": "Cosmos.D8s (General Purpose Cosmos Compute with 8 vCPUs, 32 GB Memory)", - "CosmosD16s": "Cosmos.D16s (General Purpose Cosmos Compute with 16 vCPUs, 64 GB Memory)", - "CosmosD32s": "Cosmos.D32s (General Purpose Cosmos Compute with 32 vCPUs, 128 GB Memory)", - "GlobalsecondaryindexesCreateMessage": "GlobalSecondaryIndexesBuilder resource is being created.", - "CreateInitializeTitle": "Provisioning resource", - "GlobalsecondaryindexesCreateInitializeMessage": "Globalsecondaryindexes Builder resource will be provisioned.", - "CreateSuccessTitle": "Resource provisioned", - "GlobalsecondaryindexesCreateSuccesseMessage": "Globalsecondaryindexes Builder resource provisioned.", - "CreateFailureTitle": "Failed to provision resource", - "GlobalsecondaryindexesCreateFailureMessage": "Globalsecondaryindexes Builder resource provisioning failed.", - "GlobalsecondaryindexesUpdateMessage": "GlobalSecondaryIndexesBuilder resource is being updated.", - "UpdateInitializeTitle": "Updating resource", - "GlobalsecondaryindexesUpdateInitializeMessage": "Globalsecondaryindexes Builder resource will be updated.", - "UpdateSuccessTitle": "Resource updated", - "GlobalsecondaryindexesUpdateSuccesseMessage": "Globalsecondaryindexes Builder resource updated.", - "UpdateFailureTitle": "Failed to update resource", - "GlobalsecondaryindexesUpdateFailureMessage": "Globalsecondaryindexes Builder resource updation failed.", - "GlobalsecondaryindexesDeleteMessage": "GlobalSecondaryIndexesBuilder resource is being deleted.", - "DeleteInitializeTitle": "Deleting resource", - "GlobalsecondaryindexesDeleteInitializeMessage": "Globalsecondaryindexes Builder resource will be deleted.", - "DeleteSuccessTitle": "Resource deleted", - "GlobalsecondaryindexesDeleteSuccesseMessage": "Globalsecondaryindexes Builder resource deleted.", - "DeleteFailureTitle": "Failed to delete resource", - "GlobalsecondaryindexesDeleteFailureMessage": "Globalsecondaryindexes Builder resource deletion failed.", - "ApproximateCost": "Approximate Cost Per Hour", - "GlobalsecondaryindexesCostText": "Hourly cost of the Globalsecondaryindexes Builder resource depends on the SKU selection, number of instances per region, and number of regions.", - "MetricsString": "Metrics", - "GlobalsecondaryindexesMetricsText": "Monitor the CPU and memory usage for the Globalsecondaryindexes Builder instances in ", - "MetricsBlade": "the metrics blade.", - "MonitorUsage": "Monitor Usage", - "GlobalsecondaryindexesResizingDecisionText": "To understand if the Globalsecondaryindexes Builder is the right size, ", - "RGlobalsecondaryindexesesizingDecisionLink": "learn more about Globalsecondaryindexes Builder sizing.", - "GlobalsecondaryindexesWarningBannerOnUpdate": "Adding or modifying Globalsecondaryindexes Builder instances may affect your bill.", - "GlobalsecondaryindexesWarningBannerOnDelete": "After deprovisioning the Globalsecondaryindexes Builder, your globalsecondaryindexes will not be updated with new source changes anymore. Globalsecondaryindexes builder is compute in your account that performs read operations on source collection for any updates and applies them on global secondary indexes as per the global secondary indexes definition." -} \ No newline at end of file diff --git a/src/Localization/en/MaterializedViewsBuilder.json b/src/Localization/en/MaterializedViewsBuilder.json index 7c3aaa032..54b77ddad 100644 --- a/src/Localization/en/MaterializedViewsBuilder.json +++ b/src/Localization/en/MaterializedViewsBuilder.json @@ -44,5 +44,28 @@ "ResizingDecisionText": "To understand if the Materializedviews Builder is the right size, ", "ResizingDecisionLink": "learn more about Materializedviews Builder sizing.", "WarningBannerOnUpdate": "Adding or modifying Materializedviews Builder instances may affect your bill.", - "WarningBannerOnDelete": "After deprovisioning the Materializedviews Builder, your materializedviews will not be updated with new source changes anymore. Materializedviews builder is compute in your account that performs read operations on source collection for any updates and applies them on materialized views as per the materializedview definition." + "WarningBannerOnDelete": "After deprovisioning the Materializedviews Builder, your materializedviews will not be updated with new source changes anymore. Materializedviews builder is compute in your account that performs read operations on source collection for any updates and applies them on materialized views as per the materializedview definition.", + "GlobalsecondaryindexesBuilderDescription": "Provision a Globalsecondaryindexes builder cluster for your Azure Cosmos DB account. Globalsecondaryindexes builder is compute in your account that performs read operations on source collection for any updates and updates the global secondary indexes as per the globalsecondaryindexes definition.", + "GlobalsecondaryindexesBuilder": "Globalsecondaryindexes Builder", + "LearnAboutGlobalSecondaryIndexes": "Learn more about globalsecondaryindexes.", + "GlobalsecondaryindexesDeprovisioningDetailsText": "Learn more about globalsecondaryindexes.", + "GlobalsecondaryindexesBuilderPricing": "Learn more about Globalsecondaryindexes pricing.", + "GlobalsecondaryindexesCreateMessage": "GlobalSecondaryIndexesBuilder resource is being created.", + "GlobalsecondaryindexesCreateInitializeMessage": "Globalsecondaryindexes Builder resource will be provisioned.", + "GlobalsecondaryindexesCreateSuccesseMessage": "Globalsecondaryindexes Builder resource provisioned.", + "GlobalsecondaryindexesCreateFailureMessage": "Globalsecondaryindexes Builder resource provisioning failed.", + "GlobalsecondaryindexesUpdateMessage": "GlobalSecondaryIndexesBuilder resource is being updated.", + "GlobalsecondaryindexesUpdateInitializeMessage": "Globalsecondaryindexes Builder resource will be updated.", + "GlobalsecondaryindexesUpdateSuccesseMessage": "Globalsecondaryindexes Builder resource updated.", + "GlobalsecondaryindexesUpdateFailureMessage": "Globalsecondaryindexes Builder resource updation failed.", + "GlobalsecondaryindexesDeleteMessage": "GlobalSecondaryIndexesBuilder resource is being deleted.", + "GlobalsecondaryindexesDeleteInitializeMessage": "Globalsecondaryindexes Builder resource will be deleted.", + "GlobalsecondaryindexesDeleteSuccesseMessage": "Globalsecondaryindexes Builder resource deleted.", + "GlobalsecondaryindexesDeleteFailureMessage": "Globalsecondaryindexes Builder resource deletion failed.", + "GlobalsecondaryindexesCostText": "Hourly cost of the Globalsecondaryindexes Builder resource depends on the SKU selection, number of instances per region, and number of regions.", + "GlobalsecondaryindexesMetricsText": "Monitor the CPU and memory usage for the Globalsecondaryindexes Builder instances in ", + "GlobalsecondaryindexesResizingDecisionText": "To understand if the Globalsecondaryindexes Builder is the right size, ", + "GlobalsecondaryindexesesizingDecisionLink": "learn more about Globalsecondaryindexes Builder sizing.", + "GlobalsecondaryindexesWarningBannerOnUpdate": "Adding or modifying Globalsecondaryindexes Builder instances may affect your bill.", + "GlobalsecondaryindexesWarningBannerOnDelete": "After deprovisioning the Globalsecondaryindexes Builder, your globalsecondaryindexes will not be updated with new source changes anymore. Globalsecondaryindexes builder is compute in your account that performs read operations on source collection for any updates and applies them on global secondary indexes as per the global secondary indexes definition." } \ No newline at end of file diff --git a/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts index d5fae8d0d..f0457c6cb 100644 --- a/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts +++ b/src/SelfServe/MaterializedViewsBuilder/MaterializedViewsBuilder.rp.ts @@ -6,9 +6,9 @@ import { RefreshResult } from "../SelfServeTypes"; import MaterializedViewsBuilder from "./MaterializedViewsBuilder"; import { FetchPricesResponse, + MaterializedViewsBuilderServiceResource, PriceMapAndCurrencyCode, RegionsResponse, - MaterializedViewsBuilderServiceResource, UpdateMaterializedViewsBuilderRequestParameters, } from "./MaterializedViewsBuilderTypes"; @@ -123,11 +123,11 @@ export const refreshMaterializedViewsBuilderProvisioning = async (): Promise => { }; const NumberOfInstancesDropdownInfo: Info = { - messageTKey: "ResizingDecisionText", + messageTKey: userContext.apiType === "SQL" ? "GlobalsecondaryindexesResizingDecisionText" : "ResizingDecisionText", link: { - href: "https://aka.ms/cosmos-db-materializedviewsbuilder-size", - textTKey: "ResizingDecisionLink", + href: userContext.apiType === "SQL" ? "https://aka.ms/cosmos-db-globalsecondaryindexesbuilder-size" : "https://aka.ms/cosmos-db-materializedviewsbuilder-size", + textTKey: userContext.apiType === "SQL" ? "GlobalsecondaryindexesesizingDecisionLink" : "ResizingDecisionLink", }, }; @@ -368,11 +368,11 @@ export default class MaterializedViewsBuilder extends SelfServeBaseClass { @Values({ description: { - textTKey: "GlobalsecondaryindexesBuilderDescription", + textTKey: userContext.apiType === "SQL" ? "GlobalsecondaryindexesBuilderDescription" : "MaterializedViewsBuilderDescription", type: DescriptionType.Text, link: { - href: "https://aka.ms/cosmos-db-globalsecondaryindexes", - textTKey: "LearnAboutGlobalSecondaryIndexes", + href: userContext.apiType === "SQL" ? "https://aka.ms/cosmos-db-globalsecondaryindexes" : "https://aka.ms/cosmos-db-materializedviews", + textTKey: userContext.apiType === "SQL" ? "LearnAboutGlobalSecondaryIndexes" : "LearnAboutMaterializedViews", }, }, }) @@ -380,7 +380,7 @@ export default class MaterializedViewsBuilder extends SelfServeBaseClass { @OnChange(onEnableMaterializedViewsBuilderChange) @Values({ - labelTKey: "GlobalSecondaryIndexesBuilder", + labelTKey: userContext.apiType === "SQL" ? "GlobalSecondaryIndexesBuilder" : "MaterializedViewsBuilder", trueLabelTKey: "Provisioned", falseLabelTKey: "Deprovisioned", })