diff --git a/src/SelfServe/SelfServe.tsx b/src/SelfServe/SelfServe.tsx index 2550f465c..946305540 100644 --- a/src/SelfServe/SelfServe.tsx +++ b/src/SelfServe/SelfServe.tsx @@ -41,13 +41,15 @@ const getDescriptor = async (selfServeType: SelfServeType): Promise { ]); const expectedDescriptor = { root: { - id: "TestClass", children: [ { id: "dbThroughput", @@ -270,7 +269,7 @@ describe("SelfServeUtils", () => { "invalidRegions", ], }; - const descriptor = mapToSmartUiDescriptor("TestClass", context); + const descriptor = mapToSmartUiDescriptor(context); expect(descriptor).toEqual(expectedDescriptor); }); }); diff --git a/src/SelfServe/SelfServeUtils.tsx b/src/SelfServe/SelfServeUtils.tsx index 8106153a2..bec436597 100644 --- a/src/SelfServe/SelfServeUtils.tsx +++ b/src/SelfServe/SelfServeUtils.tsx @@ -112,21 +112,18 @@ export const updateContextWithDecorator = { const context = Reflect.getMetadata(className, target) as Map; - const smartUiDescriptor = mapToSmartUiDescriptor(className, context); + const smartUiDescriptor = mapToSmartUiDescriptor(context); Reflect.defineMetadata(className, smartUiDescriptor, target); }; -export const mapToSmartUiDescriptor = ( - className: string, - context: Map -): SelfServeDescriptor => { +export const mapToSmartUiDescriptor = (context: Map): SelfServeDescriptor => { const inputNames: string[] = []; const root = context.get("root"); context.delete("root"); const smartUiDescriptor: SelfServeDescriptor = { root: { - id: className, + id: undefined, info: undefined, children: [], }, diff --git a/src/SelfServe/SqlX/SqlX.tsx b/src/SelfServe/SqlX/SqlX.tsx index b27f69e69..fe08a5c62 100644 --- a/src/SelfServe/SqlX/SqlX.tsx +++ b/src/SelfServe/SqlX/SqlX.tsx @@ -177,7 +177,7 @@ export default class SqlX extends SelfServeBaseClass { currentValues: Map, baselineValues: Map ): Promise => { - selfServeTrace({ selfServeClassName: "SqlX" }); + selfServeTrace({ selfServeClassName: this.constructor.name }); const dedicatedGatewayCurrentlyEnabled = currentValues.get("enableDedicatedGateway")?.value as boolean; const dedicatedGatewayOriginallyEnabled = baselineValues.get("enableDedicatedGateway")?.value as boolean;