X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/78e3c7b8d6a4fe84989182745267d1af468dfa7f..5e805cf2209d3afe42699e4658d8a12e50bcd5a4:/src/views/public-favorites-panel/public-favorites-panel.tsx

diff --git a/src/views/public-favorites-panel/public-favorites-panel.tsx b/src/views/public-favorites-panel/public-favorites-panel.tsx
index 7e845d6c..9b1e9102 100644
--- a/src/views/public-favorites-panel/public-favorites-panel.tsx
+++ b/src/views/public-favorites-panel/public-favorites-panel.tsx
@@ -2,43 +2,44 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core';
-import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
+import { DataExplorer } from "views-components/data-explorer/data-explorer";
 import { connect, DispatchProp } from 'react-redux';
-import { DataColumns } from '~/components/data-table/data-table';
+import { DataColumns } from 'components/data-table/data-table';
 import { RouteComponentProps } from 'react-router';
-import { DataTableFilterItem } from '~/components/data-table-filters/data-table-filters';
-import { SortDirection } from '~/components/data-table/data-column';
-import { ResourceKind } from '~/models/resource';
-import { ArvadosTheme } from '~/common/custom-theme';
+import { DataTableFilterItem } from 'components/data-table-filters/data-table-filters';
+import { SortDirection } from 'components/data-table/data-column';
+import { ResourceKind } from 'models/resource';
+import { ArvadosTheme } from 'common/custom-theme';
 import {
     ProcessStatus,
     ResourceFileSize,
     ResourceLastModifiedDate,
     ResourceType,
     ResourceName,
-    ResourceOwner
-} from '~/views-components/data-explorer/renderers';
-import { PublicFavoriteIcon } from '~/components/icon/icon';
+    ResourceOwnerWithName
+} from 'views-components/data-explorer/renderers';
+import { PublicFavoriteIcon } from 'components/icon/icon';
 import { Dispatch } from 'redux';
 import {
     openContextMenu,
     resourceUuidToContextMenuKind
-} from '~/store/context-menu/context-menu-actions';
-import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
-import { navigateTo } from '~/store/navigation/navigation-action';
-import { ContainerRequestState } from "~/models/container-request";
-import { RootState } from '~/store/store';
-import { DataTableDefaultView } from '~/components/data-table-default-view/data-table-default-view';
-import { createTree } from '~/models/tree';
-import { getSimpleObjectTypeFilters } from '~/store/resource-type-filters/resource-type-filters';
-import { PUBLIC_FAVORITE_PANEL_ID } from '~/store/public-favorites-panel/public-favorites-action';
-import { PublicFavoritesState } from '~/store/public-favorites/public-favorites-reducer';
-import { getResource, ResourcesState } from '~/store/resources/resources';
-import { GroupContentsResource } from '~/services/groups-service/groups-service';
+} from 'store/context-menu/context-menu-actions';
+import { loadDetailsPanel } from 'store/details-panel/details-panel-action';
+import { navigateTo } from 'store/navigation/navigation-action';
+import { ContainerRequestState } from "models/container-request";
+import { RootState } from 'store/store';
+import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view';
+import { createTree } from 'models/tree';
+import { getSimpleObjectTypeFilters } from 'store/resource-type-filters/resource-type-filters';
+import { PUBLIC_FAVORITE_PANEL_ID } from 'store/public-favorites-panel/public-favorites-action';
+import { PublicFavoritesState } from 'store/public-favorites/public-favorites-reducer';
+import { getResource, ResourcesState } from 'store/resources/resources';
+import { GroupContentsResource } from 'services/groups-service/groups-service';
+import { CollectionResource } from 'models/collection';
 
-type CssRules = "toolbar" | "button";
+type CssRules = "toolbar" | "button" | "root";
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     toolbar: {
@@ -48,6 +49,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     button: {
         marginLeft: theme.spacing.unit
     },
+    root: {
+        width: '100%',
+    },
 });
 
 export enum PublicFavoritePanelColumnNames {
@@ -91,7 +95,7 @@ export const publicFavoritePanelColumns: DataColumns<string> = [
         selected: false,
         configurable: true,
         filters: createTree(),
-        render: uuid => <ResourceOwner uuid={uuid} />
+        render: uuid => <ResourceOwnerWithName uuid={uuid} />
     },
     {
         name: PublicFavoritePanelColumnNames.FILE_SIZE,
@@ -134,6 +138,7 @@ const mapDispatchToProps = (dispatch: Dispatch): PublicFavoritePanelActionProps
             dispatch<any>(openContextMenu(event, {
                 name: resource.name,
                 description: resource.description,
+                storageClassesDesired: (resource as CollectionResource).storageClassesDesired,
                 uuid: resourceUuid,
                 ownerUuid: '',
                 kind: ResourceKind.NONE,
@@ -158,7 +163,7 @@ export const PublicFavoritePanel = withStyles(styles)(
     connect(mapStateToProps, mapDispatchToProps)(
         class extends React.Component<FavoritePanelProps> {
             render() {
-                return <DataExplorer
+                return <div className={this.props.classes.root}><DataExplorer
                     id={PUBLIC_FAVORITE_PANEL_ID}
                     onRowClick={this.props.onItemClick}
                     onRowDoubleClick={this.props.onItemDoubleClick}
@@ -168,7 +173,7 @@ export const PublicFavoritePanel = withStyles(styles)(
                         <DataTableDefaultView
                             icon={PublicFavoriteIcon}
                             messages={['Public favorites list is empty.']} />
-                    } />;
+                    } /></div>;
             }
         }
     )
