mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 08:51:24 +00:00
Adding in experimentation for autoscale test (#345)
* Adding autoscale flight info * Add flight info to cassandra collection pane * Add telemetry for autoscale toggle on/off in create resource blade and scale/settings * Run formatting and add expected properties to test file * removing empty line * Updating to pass unit tests Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
@@ -5,6 +5,9 @@ import ThroughputInputComponentAutoscaleV3 from "./ThroughputInputComponentAutos
|
||||
import { KeyCodes } from "../../../Common/Constants";
|
||||
import { WaitsForTemplateViewModel } from "../../WaitsForTemplateViewModel";
|
||||
|
||||
import { userContext } from "../../../UserContext";
|
||||
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||
/**
|
||||
* Throughput Input:
|
||||
*
|
||||
@@ -201,6 +204,16 @@ export class ThroughputInputViewModel extends WaitsForTemplateViewModel {
|
||||
this.label = options.label || ko.observable<string>();
|
||||
this.showAutoPilot = options.showAutoPilot !== undefined ? options.showAutoPilot : ko.observable<boolean>(true);
|
||||
this.isAutoPilotSelected = options.isAutoPilotSelected || ko.observable<boolean>(false);
|
||||
this.isAutoPilotSelected.subscribe(value => {
|
||||
TelemetryProcessor.trace(Action.ToggleAutoscaleSetting, ActionModifiers.Mark, {
|
||||
changedSelectedValueTo: value ? ActionModifiers.ToggleAutoscaleOn : ActionModifiers.ToggleAutoscaleOff,
|
||||
databaseAccountName: userContext.databaseAccount?.name,
|
||||
subscriptionId: userContext.subscriptionId,
|
||||
apiKind: userContext.defaultExperience,
|
||||
dataExplorerArea: "Scale Tab V1"
|
||||
});
|
||||
});
|
||||
|
||||
this.throughputAutoPilotRadioId = options.throughputAutoPilotRadioId;
|
||||
this.throughputProvisionedRadioId = options.throughputProvisionedRadioId;
|
||||
this.throughputModeRadioName = options.throughputModeRadioName;
|
||||
|
||||
Reference in New Issue
Block a user