21224: merge stable Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>
[arvados.git] / services / workbench2 / src / views / project-panel / project-panel.tsx
index 5e09bfa8345f4e9f24c34f5efc0871c27814a6e6..433cb112094057253552284ff57d30b4869ac2f3 100644 (file)
@@ -52,28 +52,19 @@ import { CollectionResource } from 'models/collection';
 import { resourceIsFrozen } from 'common/frozen-resources';
 import { ProjectResource } from 'models/project';
 import { deselectAllOthers, toggleOne } from 'store/multiselect/multiselect-actions';
+import { ProjectDetailsCard } from 'views-components/project-details-card/project-details-card';
 
-type CssRules = 'root' | 'button' | 'loader' | 'notFoundView';
+type CssRules = 'root' | 'button' ;
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
         width: '100%',
+        display: 'flex',
+        flexDirection: 'column',
     },
     button: {
         marginLeft: theme.spacing.unit,
     },
-    loader: {
-        top: "25%",
-        left: "46.5%",
-        marginLeft: "-84px",
-        position: "absolute",
-    },
-    notFoundView: {
-        top: "30%",
-        left: "50%",
-        marginLeft: "-84px",
-        position: "absolute",
-    },
 });
 
 export enum ProjectPanelColumnNames {
@@ -256,7 +247,6 @@ interface ProjectPanelDataProps {
     userUuid: string;
     dataExplorerItems: any;
     working: boolean;
-    is404: boolean;
 }
 
 type ProjectPanelProps = ProjectPanelDataProps & DispatchProp & WithStyles<CssRules> & RouteComponentProps<{ id: string }>;
@@ -264,13 +254,9 @@ type ProjectPanelProps = ProjectPanelDataProps & DispatchProp & WithStyles<CssRu
 const mapStateToProps = (state: RootState) => {
     const currentItemId = getProperty<string>(PROJECT_PANEL_CURRENT_UUID)(state.properties);
     const project = getResource<GroupResource>(currentItemId || "")(state.resources);
-    const working = !!state.progressIndicator.some(p => p.id === PROJECT_PANEL_ID && p.working);
-    const is404 = state.dataExplorer[PROJECT_PANEL_ID].isResponse404;
     return {
-        working,
         currentItemId,
         project,
-        is404,
         resources: state.resources,
         userUuid: state.auth.user!.uuid,
     };
@@ -283,6 +269,7 @@ export const ProjectPanel = withStyles(styles)(
             render() {
                 const { classes } = this.props;
                 return <div data-cy='project-panel' className={classes.root}>
+                    <ProjectDetailsCard />
                     <DataExplorer
                         id={PROJECT_PANEL_ID}
                         onRowClick={this.handleRowClick}
@@ -291,8 +278,6 @@ export const ProjectPanel = withStyles(styles)(
                         contextMenuColumn={true}
                         defaultViewIcon={ProjectIcon}
                         defaultViewMessages={DEFAULT_VIEW_MESSAGES}
-                        working={this.props.working}
-                        is404={this.props.is404}
                     />
                 </div>
             }