Skip to content

Commit

Permalink
[risk=low][no ticket] Restore sorting of the last-modified-time in th…
Browse files Browse the repository at this point in the history
…e analysis tab (#8412)
  • Loading branch information
jmthibault79 authored Mar 5, 2024
1 parent 55cdd56 commit 8ff2795
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ui/src/app/pages/appAnalysis/app-files-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const AppFilesList = withCurrentWorkspace()(
}
}, [workspace, isTransferComplete]);

const displayMenu = (row) => {
const displayMenu = (row: FileDetail) => {
return (
<NotebookActionMenu
resource={convertToResources([row], props.workspace)[0]}
Expand All @@ -159,14 +159,14 @@ export const AppFilesList = withCurrentWorkspace()(
);
};

const displayAppLogo = (row) => {
const displayAppLogo = (row: FileDetail) => {
// Find App Type on the basis of file name extension
const { name } = row;
const appType = getAppInfoFromFileName(name).appType;
return <AppBanner appType={appType} style={{ marginRight: '1em' }} />;
};

const displayName = (row) => {
const displayName = (row: FileDetail) => {
const {
workspace: { namespace, id },
} = props;
Expand All @@ -189,7 +189,7 @@ export const AppFilesList = withCurrentWorkspace()(
);
};

const displayLastModifiedTime = (row) => {
const displayLastModifiedTime = (row: FileDetail) => {
const time = displayDateWithoutHours(row.lastModifiedTime);
return <div>{time}</div>;
};
Expand Down Expand Up @@ -242,7 +242,7 @@ export const AppFilesList = withCurrentWorkspace()(
style={styles.columns}
headerStyle={styles.tableHeader}
header='Name'
field={'name'}
field='name'
body={displayName}
bodyStyle={styles.rows}
filter
Expand All @@ -255,6 +255,8 @@ export const AppFilesList = withCurrentWorkspace()(
style={styles.columns}
bodyStyle={styles.rows}
header='Last Modified Time'
field='lastModifiedTime'
sortable
body={displayLastModifiedTime}
/>
<Column
Expand Down

0 comments on commit 8ff2795

Please sign in to comment.