Skip to content

Commit

Permalink
Merge pull request #92936 from maryliag/change-order
Browse files Browse the repository at this point in the history
release-22.2: ui: change selection order of workload insights
  • Loading branch information
maryliag authored Dec 2, 2022
2 parents 225c06d + f0bc602 commit 923796d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 923796d

Please sign in to comment.