Skip to content

Commit

Permalink
refactor: Simplify interface structure and formatting in services/typ…
Browse files Browse the repository at this point in the history
…es.ts, F_ExperimentList.tsx, and api.ts.
  • Loading branch information
thiagodallacqua-hpe committed Oct 14, 2024
1 parent c5ea9a9 commit e0a49d9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const FilterField = ({
);
}

return col.displayName || col.column;
return col.displayName || col.column;
};

return (
Expand Down
6 changes: 1 addition & 5 deletions webui/react/src/pages/F_ExpList/F_ExperimentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,7 @@ const F_ExperimentList: React.FC<Props> = ({ project }) => {
);

if (mounted) {
setProjectColumns(
Loaded(
columns,
),
);
setProjectColumns(Loaded(columns));
}
} catch (e) {
handleError(e, { publicSubject: 'Unable to fetch project columns' });
Expand Down
6 changes: 5 additions & 1 deletion webui/react/src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,4 +1031,8 @@ export const deleteGlobalConfigPolicies = generateDetApi<
Api.V1DeleteGlobalConfigPoliciesResponse
>(Config.deleteGlobalConfigPolicies);

export const postRunMetadata = generateDetApi<Service.PostRunMetadata, Api.V1PostRunMetadataResponse, Api.V1PostRunMetadataResponse>(Config.postRunMetadata);
export const postRunMetadata = generateDetApi<
Service.PostRunMetadata,
Api.V1PostRunMetadataResponse,
Api.V1PostRunMetadataResponse
>(Config.postRunMetadata);
6 changes: 1 addition & 5 deletions webui/react/src/services/apiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2271,9 +2271,5 @@ export const postRunMetadata: DetApi<
name: 'postRunMetadata',
postProcess: identity,
request: (params: Service.PostRunMetadata, options) =>
detApi.Internal.postRunMetadata(
params.runId,
params.body,
options,
),
detApi.Internal.postRunMetadata(params.runId, params.body, options),
};
5 changes: 4 additions & 1 deletion webui/react/src/services/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,4 +593,7 @@ export interface DeleteGlobalConfigPolicies {
workloadType: 'NTSC' | 'EXPERIMENT';
}

export interface PostRunMetadata { runId: number, body: Api.V1PostRunMetadataRequest };
export interface PostRunMetadata {
runId: number;
body: Api.V1PostRunMetadataRequest;
}

0 comments on commit e0a49d9

Please sign in to comment.