|
|
@ -75,13 +75,23 @@ class Queue extends Component {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const nextState = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (prevProps.items !== items) {
|
|
|
|
|
|
|
|
nextState.items = items;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const selectedIds = this.getSelectedIds();
|
|
|
|
const selectedIds = this.getSelectedIds();
|
|
|
|
const isPendingSelected = _.some(this.props.items, (item) => {
|
|
|
|
const isPendingSelected = _.some(this.props.items, (item) => {
|
|
|
|
return selectedIds.indexOf(item.id) > -1 && item.status === 'delay';
|
|
|
|
return selectedIds.indexOf(item.id) > -1 && item.status === 'delay';
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (isPendingSelected !== this.state.isPendingSelected) {
|
|
|
|
if (isPendingSelected !== this.state.isPendingSelected) {
|
|
|
|
this.setState({ isPendingSelected });
|
|
|
|
nextState.isPendingSelected = isPendingSelected;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!_.isEmpty(nextState)) {
|
|
|
|
|
|
|
|
this.setState(nextState);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -216,26 +226,29 @@ class Queue extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<PageContentBody>
|
|
|
|
<PageContentBody>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isRefreshing && !isAllPopulated &&
|
|
|
|
isRefreshing && !isAllPopulated ?
|
|
|
|
<LoadingIndicator />
|
|
|
|
<LoadingIndicator /> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
!isRefreshing && hasError &&
|
|
|
|
!isRefreshing && hasError ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
Failed to load Queue
|
|
|
|
Failed to load Queue
|
|
|
|
</div>
|
|
|
|
</div> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isAllPopulated && !hasError && !items.length &&
|
|
|
|
isAllPopulated && !hasError && !items.length ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
Queue is empty
|
|
|
|
Queue is empty
|
|
|
|
</div>
|
|
|
|
</div> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isAllPopulated && !hasError && !!items.length &&
|
|
|
|
isAllPopulated && !hasError && !!items.length ?
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Table
|
|
|
|
<Table
|
|
|
|
columns={columns}
|
|
|
|
columns={columns}
|
|
|
@ -270,7 +283,8 @@ class Queue extends Component {
|
|
|
|
isFetching={isRefreshing}
|
|
|
|
isFetching={isRefreshing}
|
|
|
|
{...otherProps}
|
|
|
|
{...otherProps}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div> :
|
|
|
|
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</PageContentBody>
|
|
|
|
</PageContentBody>
|
|
|
|
|
|
|
|
|
|
|
|