Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.2: ui: change selection order of workload insights #92936

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/src/insights/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ export const getInsightFromProblem = (
};

export const InsightExecOptions = new Map<string, string>([
[InsightExecEnum.TRANSACTION.toString(), "Transaction Executions"],
[InsightExecEnum.STATEMENT.toString(), "Statement Executions"],
[InsightExecEnum.TRANSACTION.toString(), "Transaction Executions"],
]);

export type WorkloadInsightEventFilters = Pick<Filters, "app">;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ export const WorkloadInsightsRootControl = ({
}: WorkloadInsightsViewProps): React.ReactElement => {
const location = useLocation();
const history = useHistory();
let viewValue =
queryByName(location, viewAttr) || InsightExecEnum.TRANSACTION;
// Use the default Transaction page if an
let viewValue = queryByName(location, viewAttr) || InsightExecEnum.STATEMENT;
// Use the default Statement page if an
// unrecognized string was passed in from the URL
if (!InsightExecOptions.has(viewValue)) {
viewValue = InsightExecEnum.TRANSACTION;
viewValue = InsightExecEnum.STATEMENT;
}

const [selectedInsightView, setSelectedInsightView] = useState(viewValue);
Expand Down