X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8a8318d34c4ce519eca0c97c83e698f58713c6d7..6a1b2741a1ac383be09971a957553d2d15de6d5b:/src/views/favorite-panel/favorite-panel.tsx?ds=sidebyside

diff --git a/src/views/favorite-panel/favorite-panel.tsx b/src/views/favorite-panel/favorite-panel.tsx
index 9f35ecd6..948885f7 100644
--- a/src/views/favorite-panel/favorite-panel.tsx
+++ b/src/views/favorite-panel/favorite-panel.tsx
@@ -30,7 +30,6 @@ import { navigateTo } from '~/store/navigation/navigation-action';
 import { ContainerRequestState } from "~/models/container-request";
 import { FavoritesState } from '../../store/favorites/favorites-reducer';
 import { RootState } from '~/store/store';
-import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view';
 import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
 
 type CssRules = "toolbar" | "button";
@@ -65,16 +64,14 @@ export const favoritePanelColumns: DataColumns<string, FavoritePanelFilter> = [
         configurable: true,
         sortDirection: SortDirection.ASC,
         filters: [],
-        render: uuid => <ResourceName uuid={uuid} />,
-        width: "450px"
+        render: uuid => <ResourceName uuid={uuid} />
     },
     {
         name: "Status",
         selected: true,
         configurable: true,
         filters: [],
-        render: uuid => <ProcessStatus uuid={uuid} />,
-        width: "75px"
+        render: uuid => <ProcessStatus uuid={uuid} />
     },
     {
         name: FavoritePanelColumnNames.TYPE,
@@ -97,24 +94,21 @@ export const favoritePanelColumns: DataColumns<string, FavoritePanelFilter> = [
                 type: ResourceKind.PROJECT
             }
         ],
-        render: uuid => <ResourceType uuid={uuid} />,
-        width: "125px"
+        render: uuid => <ResourceType uuid={uuid} />
     },
     {
         name: FavoritePanelColumnNames.OWNER,
         selected: true,
         configurable: true,
         filters: [],
-        render: uuid => <ResourceOwner uuid={uuid} />,
-        width: "200px"
+        render: uuid => <ResourceOwner uuid={uuid} />
     },
     {
         name: FavoritePanelColumnNames.FILE_SIZE,
         selected: true,
         configurable: true,
         filters: [],
-        render: uuid => <ResourceFileSize uuid={uuid} />,
-        width: "50px"
+        render: uuid => <ResourceFileSize uuid={uuid} />
     },
     {
         name: FavoritePanelColumnNames.LAST_MODIFIED,
@@ -122,8 +116,7 @@ export const favoritePanelColumns: DataColumns<string, FavoritePanelFilter> = [
         configurable: true,
         sortDirection: SortDirection.NONE,
         filters: [],
-        render: uuid => <ResourceLastModifiedDate uuid={uuid} />,
-        width: "150px"
+        render: uuid => <ResourceLastModifiedDate uuid={uuid} />
     }
 ];
 
@@ -170,23 +163,18 @@ export const FavoritePanel = withStyles(styles)(
     connect(mapStateToProps, mapDispatchToProps)(
         class extends React.Component<FavoritePanelProps> {
             render() {
-                return this.hasAnyFavorites()
-                    ? <DataExplorer
-                        id={FAVORITE_PANEL_ID}
-                        onRowClick={this.props.onItemClick}
-                        onRowDoubleClick={this.props.onItemDoubleClick}
-                        onContextMenu={this.props.onContextMenu}
-                        contextMenuColumn={true}
-                        dataTableDefaultView={<DataTableDefaultView icon={FavoriteIcon}/>} />
-                    : <PanelDefaultView
-                        icon={FavoriteIcon}
-                        messages={['Your favorites list is empty.']} />;
-            }
-
-            hasAnyFavorites = () => {
-                return Object
-                    .keys(this.props.favorites)
-                    .find(uuid => this.props.favorites[uuid]);
+                return <DataExplorer
+                    id={FAVORITE_PANEL_ID}
+                    onRowClick={this.props.onItemClick}
+                    onRowDoubleClick={this.props.onItemDoubleClick}
+                    onContextMenu={this.props.onContextMenu}
+                    contextMenuColumn={true}
+                    dataTableDefaultView={
+                        <DataTableDefaultView
+                            icon={FavoriteIcon}
+                            messages={['Your favorites list is empty.']}
+                            />
+                    } />;
             }
         }
     )
