chore: sort trial log's filter options
@@ -10,6 +10,7 @@ import ResponsiveFilters from 'components/ResponsiveFilters';
import { V1TrialLogsFieldsResponse } from 'services/api-ts-sdk';
import { detApi } from 'services/apiConfig';
import { consumeStream } from 'services/utils';
+import { alphanumericSorter } from 'utils/data';
import css from './TrialLogFilters.module.scss';
@@ -110,7 +111,18 @@ const TrialLogFilters: React.FC<Props> = ({ filter, onChange, trialId }: Props)
true,
{ signal: canceler.signal },
),
- event => setAvailableFilters(event),
+ event => {
+ if (event.rankIds) {
+ event.rankIds.sort(alphanumericSorter);
+ }
+ if (event.agentIds) {
+ event.agentIds.sort(alphanumericSorter);
+ }
+ if (event.containerIds) {
+ event.containerIds.sort(alphanumericSorter);
+ }
+ setAvailableFilters(event);
+ },
);
return () => canceler.abort();
