diff --git a/App/FeatureSet/Dashboard/src/Components/Telemetry/Documentation.tsx b/App/FeatureSet/Dashboard/src/Components/Telemetry/Documentation.tsx index c0069ae63b..873d806e02 100644 --- a/App/FeatureSet/Dashboard/src/Components/Telemetry/Documentation.tsx +++ b/App/FeatureSet/Dashboard/src/Components/Telemetry/Documentation.tsx @@ -17,6 +17,10 @@ import { FormType } from "Common/UI/Components/Forms/ModelForm"; import API from "Common/UI/Utils/API/API"; import IconProp from "Common/Types/Icon/IconProp"; import Icon from "Common/UI/Components/Icon/Icon"; +import Dropdown, { + DropdownOption, + DropdownValue, +} from "Common/UI/Components/Dropdown/Dropdown"; import Protocol from "Common/Types/API/Protocol"; export type TelemetryType = "logs" | "metrics" | "traces" | "exceptions"; @@ -1017,21 +1021,33 @@ const TelemetryDocumentation: FunctionComponent = (
{/* Key selector row */}
- +
+ { + return { + value: key.id?.toString() || "", + label: key.name || "Unnamed Key", + }; + })} + value={ + ingestionKeys + .filter((key: TelemetryIngestionKey) => key.id?.toString() === selectedKeyId) + .map((key: TelemetryIngestionKey): DropdownOption => { + return { + value: key.id?.toString() || "", + label: key.name || "Unnamed Key", + }; + })[0] + } + onChange={(value: DropdownValue | Array | null) => { + if (value) { + setSelectedKeyId(value.toString()); + } + }} + placeholder="Select an ingestion key" + ariaLabel="Select ingestion key" + /> +