Added telelmetry for settings v2 and v1 (#269)

* Added telelmetry for settings v2 and v1

* format errors fixed

* renamed actions
This commit is contained in:
Srinath Narayanan
2020-10-12 09:01:00 -07:00
committed by GitHub
parent 47cc6fd7a8
commit a9a57f4ba9
5 changed files with 24 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ import Q from "q";
import SaveIcon from "../../../images/save-cosmos.svg";
import TabsBase from "./TabsBase";
import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor";
import { Action } from "../../Shared/Telemetry/TelemetryConstants";
import { Action, ActionModifiers } from "../../Shared/Telemetry/TelemetryConstants";
import { PlatformType } from "../../PlatformType";
import { RequestOptions } from "@azure/cosmos/dist-esm";
import Explorer from "../Explorer";
@@ -1233,6 +1233,9 @@ export default class SettingsTab extends TabsBase implements ViewModels.WaitsFor
};
public onRevertClick = (): Q.Promise<any> => {
TelemetryProcessor.trace(Action.DiscardSettings, ActionModifiers.Mark, {
message: "Settings Discarded"
});
this.throughput.setBaseline(this.throughput.getEditableOriginalValue());
this.timeToLive.setBaseline(this.timeToLive.getEditableOriginalValue());
this.timeToLiveSeconds.setBaseline(this.timeToLiveSeconds.getEditableOriginalValue());

View File

@@ -9,6 +9,7 @@ export default class SettingsTabV2 extends TabsBase {
constructor(options: ViewModels.TabOptions) {
super(options);
this.tabId = "SettingsV2-" + this.tabId;
const props: SettingsComponentProps = {
settingsTab: this
};

View File

@@ -88,7 +88,8 @@ export default class TabsBase extends WaitsForTemplateViewModel {
databaseAccountName: this.getContainer().databaseAccount().name,
defaultExperience: this.getContainer().defaultExperience(),
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle()
tabTitle: this.tabTitle(),
tabId: this.tabId
});
}
@@ -145,7 +146,8 @@ export default class TabsBase extends WaitsForTemplateViewModel {
databaseAccountName: this.getContainer().databaseAccount().name,
defaultExperience: this.getContainer().defaultExperience(),
dataExplorerArea: Constants.Areas.Tab,
tabTitle: this.tabTitle()
tabTitle: this.tabTitle(),
tabId: this.tabId
});
return Q();
}