Feature #15020
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
import { collectionsContentAddressActions } from './collections-content-address-panel-actions';
import { navigateTo } from '~/store/navigation/navigation-action';
import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions';
import { collectionsContentAddressActions } from './collections-content-address-panel-actions';
import { navigateTo } from '~/store/navigation/navigation-action';
+import { updateFavorites } from '~/store/favorites/favorites-actions';
+import { updatePublicFavorites } from '~/store/public-favorites/public-favorites-actions';
export class CollectionsWithSameContentAddressMiddlewareService extends DataExplorerMiddlewareService {
constructor(private services: ServiceRepository, id: string) {
export class CollectionsWithSameContentAddressMiddlewareService extends DataExplorerMiddlewareService {
constructor(private services: ServiceRepository, id: string) {
offset: dataExplorer.page * dataExplorer.rowsPerPage,
filters: new FilterBuilder()
.addEqual('portableDataHash', contentAddress)
offset: dataExplorer.page * dataExplorer.rowsPerPage,
filters: new FilterBuilder()
.addEqual('portableDataHash', contentAddress)
+ .addILike("name", dataExplorer.searchValue)
+ api.dispatch<any>(updateFavorites(response.items.map(item => item.uuid)));
+ api.dispatch<any>(updatePublicFavorites(response.items.map(item => item.uuid)));
if (response.itemsAvailable === 1) {
api.dispatch<any>(navigateTo(response.items[0].uuid));
api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
if (response.itemsAvailable === 1) {
api.dispatch<any>(navigateTo(response.items[0].uuid));
api.dispatch(progressIndicatorActions.PERSIST_STOP_WORKING(this.getId()));
enum CollectionContentAddressPanelColumnNames {
COLLECTION_WITH_THIS_ADDRESS = "Collection with this address",
enum CollectionContentAddressPanelColumnNames {
COLLECTION_WITH_THIS_ADDRESS = "Collection with this address",
LAST_MODIFIED = "Last modified"
}
LAST_MODIFIED = "Last modified"
}
render: uuid => <ResourceName uuid={uuid} />
},
{
render: uuid => <ResourceName uuid={uuid} />
},
{
- name: CollectionContentAddressPanelColumnNames.OWNER,
+ name: CollectionContentAddressPanelColumnNames.LOCATION,
selected: true,
configurable: true,
filters: createTree(),
selected: true,
configurable: true,
filters: createTree(),
-export interface CollectionContentAddressMainCardActionProps {
+export interface CollectionContentAddressPanelActionProps {
onContextMenu: (event: React.MouseEvent<any>, uuid: string) => void;
onItemClick: (item: string) => void;
onItemDoubleClick: (item: string) => void;
}
onContextMenu: (event: React.MouseEvent<any>, uuid: string) => void;
onItemClick: (item: string) => void;
onItemDoubleClick: (item: string) => void;
}
-const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressMainCardActionProps => ({
+const mapDispatchToProps = (dispatch: Dispatch): CollectionContentAddressPanelActionProps => ({
onContextMenu: (event, resourceUuid) => {
const isAdmin = dispatch<any>(getIsAdmin());
const kind = resourceKindToContextMenuKind(resourceUuid, isAdmin);
onContextMenu: (event, resourceUuid) => {
const isAdmin = dispatch<any>(getIsAdmin());
const kind = resourceKindToContextMenuKind(resourceUuid, isAdmin);
export const CollectionsContentAddressPanel = withStyles(styles)(
connect(null, mapDispatchToProps)(
export const CollectionsContentAddressPanel = withStyles(styles)(
connect(null, mapDispatchToProps)(
- class extends React.Component<CollectionContentAddressMainCardActionProps & WithStyles<CssRules>> {
+ class extends React.Component<CollectionContentAddressPanelActionProps & WithStyles<CssRules>> {
render() {
return <Grid item xs={12}>
render() {
return <Grid item xs={12}>
- {/* <Link to={`/collections/${this.props.collection.uuid}`} className={this.props.classes.backLink}>
+ {/* <Link to={`/collections/${collectionUuid}`} className={this.props.classes.backLink}>
<BackIcon className={this.props.classes.backIcon} />
<BackIcon className={this.props.classes.backIcon} />
</Link> */}
<DataExplorer
id={COLLECTIONS_CONTENT_ADDRESS_PANEL_ID}
</Link> */}
<DataExplorer
id={COLLECTIONS_CONTENT_ADDRESS_PANEL_ID}