Fixed blinking notification (#2200)

* Fixed blinking notification

* Updated CHANGELOG
main
Boris Sekachev 5 years ago committed by GitHub
parent 4d869c3cf5
commit 8330015ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,6 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed CVAT format import for frame stepped tasks (<https://github.com/openvinotoolkit/cvat/pull/2151>) - Fixed CVAT format import for frame stepped tasks (<https://github.com/openvinotoolkit/cvat/pull/2151>)
- Fixed unnecessary pyhash dependency (<https://github.com/openvinotoolkit/cvat/pull/2170>) - Fixed unnecessary pyhash dependency (<https://github.com/openvinotoolkit/cvat/pull/2170>)
- Fixed Data is not getting cleared, even after deleting the Task from Django Admin App(<https://github.com/openvinotoolkit/cvat/issues/1925>) - Fixed Data is not getting cleared, even after deleting the Task from Django Admin App(<https://github.com/openvinotoolkit/cvat/issues/1925>)
- Fixed blinking message: "Some tasks have not been showed because they do not have any data" (<https://github.com/openvinotoolkit/cvat/pull/2200>)
- Fixed case when a task with 0 jobs is shown as "Completed" in UI (<https://github.com/openvinotoolkit/cvat/pull/2200>)
### Security ### Security
- -

@ -84,7 +84,7 @@ class TaskItemComponent extends React.PureComponent<TaskItemProps & RouteCompone
// Progress appearence depends on number of jobs // Progress appearence depends on number of jobs
let progressColor = null; let progressColor = null;
let progressText = null; let progressText = null;
if (numOfCompleted === numOfJobs) { if (numOfCompleted && numOfCompleted === numOfJobs) {
progressColor = 'cvat-task-completed-progress'; progressColor = 'cvat-task-completed-progress';
progressText = <Text strong className={progressColor}>Completed</Text>; progressText = <Text strong className={progressColor}>Completed</Text>;
} else if (numOfCompleted) { } else if (numOfCompleted) {

@ -76,12 +76,7 @@ function updateQuery(previousQuery: TasksQuery, searchString: string): TasksQuer
class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteComponentProps> { class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteComponentProps> {
public componentDidMount(): void { public componentDidMount(): void {
const { const { gettingQuery, location, onGetTasks } = this.props;
gettingQuery,
location,
onGetTasks,
} = this.props;
const query = updateQuery(gettingQuery, location.search); const query = updateQuery(gettingQuery, location.search);
onGetTasks(query); onGetTasks(query);
} }
@ -90,8 +85,9 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
const { const {
location, location,
gettingQuery, gettingQuery,
onGetTasks, tasksFetching,
numberOfHiddenTasks, numberOfHiddenTasks,
onGetTasks,
hideEmptyTasks, hideEmptyTasks,
} = this.props; } = this.props;
@ -103,24 +99,26 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
return; return;
} }
if (numberOfHiddenTasks) { if (prevProps.tasksFetching && !tasksFetching) {
message.destroy(); if (numberOfHiddenTasks) {
message.info( message.destroy();
<> message.info(
<Text> <>
Some tasks have not been showed because they do not have any data. <Text>
</Text> Some tasks are temporary hidden since they are without any data
<Button </Text>
type='link' <Button
onClick={(): void => { type='link'
hideEmptyTasks(false); onClick={(): void => {
message.destroy(); hideEmptyTasks(false);
}} message.destroy();
> }}
Show all >
</Button> Show all
</>, 7, </Button>
); </>, 5,
);
}
} }
} }

Loading…
Cancel
Save