Added support for self serve telemetry + Localization fixes (#580)

* initial telemetry commit

* Added localization changes

* moved telemetrymessage types to selfservetypes

* fixed compile errors

* fixed failing test

* changed translation file format

* Addressed PR comments

* modified test
This commit is contained in:
Srinath Narayanan
2021-03-30 10:11:43 -07:00
committed by GitHub
parent 63e13cdabe
commit 6cdac3c53b
18 changed files with 1306 additions and 193 deletions

View File

@@ -1,4 +1,5 @@
import { IsDisplayable, OnChange, RefreshOptions, Values } from "../Decorators";
import { trace } from "../SelfServeTelemetryProcessor";
import {
ChoiceItem,
Description,
@@ -147,10 +148,10 @@ const onEnableDedicatedGatewayChange = (
};
const skuDropDownItems: ChoiceItem[] = [
{ label: "CosmosD4s", key: CosmosD4s },
{ label: "CosmosD8s", key: CosmosD8s },
{ label: "CosmosD16s", key: CosmosD16s },
{ label: "CosmosD32s", key: CosmosD32s },
{ labelTKey: "CosmosD4s", key: CosmosD4s },
{ labelTKey: "CosmosD8s", key: CosmosD8s },
{ labelTKey: "CosmosD16s", key: CosmosD16s },
{ labelTKey: "CosmosD32s", key: CosmosD32s },
];
const getSkus = async (): Promise<ChoiceItem[]> => {
@@ -176,6 +177,8 @@ export default class SqlX extends SelfServeBaseClass {
currentValues: Map<string, SmartUiInput>,
baselineValues: Map<string, SmartUiInput>
): Promise<OnSaveResult> => {
trace({ selfServeClassName: "SqlX" });
const dedicatedGatewayCurrentlyEnabled = currentValues.get("enableDedicatedGateway")?.value as boolean;
const dedicatedGatewayOriginallyEnabled = baselineValues.get("enableDedicatedGateway")?.value as boolean;