15856: Merge branch 'master' into 15856-illegal-chars-warning
[arvados-workbench2.git] / src / views / collection-panel / collection-panel.tsx
index 5c4b28df005f13081449bc28c0e40da5f8340bab..b92557f9de35b59557318ea6a4ba8b69f5f3c588 100644 (file)
@@ -24,6 +24,7 @@ import { formatFileSize } from "~/common/formatters";
 import { openDetailsPanel } from '~/store/details-panel/details-panel-action';
 import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
 import { PropertyChipComponent } from '~/views-components/resource-properties-form/property-chip';
+import { IllegalNamingWarning } from '~/components/warning/warning';
 
 type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link';
 
@@ -65,8 +66,7 @@ type CollectionPanelProps = CollectionPanelDataProps & DispatchProp
 export const CollectionPanel = withStyles(styles)(
     connect((state: RootState, props: RouteComponentProps<{ id: string }>) => {
         const item = getResource(props.match.params.id)(state.resources);
-        const data = getResourceData(props.match.params.id)(state.resourcesData);
-        return { item, data };
+        return { item };
     })(
         class extends React.Component<CollectionPanelProps> {
 
@@ -90,7 +90,7 @@ export const CollectionPanel = withStyles(styles)(
                                         </IconButton>
                                     </Tooltip>
                                 }
-                                title={item && item.name}
+                                title={item && <span><IllegalNamingWarning name={item.name}/>{item.name}</span>}
                                 titleTypographyProps={this.titleProps}
                                 subheader={item && item.description}
                                 subheaderTypographyProps={this.titleProps} />