Fixed blinking notification (#2200)

* Fixed blinking notification

* Updated CHANGELOG
main
Boris Sekachev 6 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,12 +99,13 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
return; return;
} }
if (prevProps.tasksFetching && !tasksFetching) {
if (numberOfHiddenTasks) { if (numberOfHiddenTasks) {
message.destroy(); message.destroy();
message.info( message.info(
<> <>
<Text> <Text>
Some tasks have not been showed because they do not have any data. Some tasks are temporary hidden since they are without any data
</Text> </Text>
<Button <Button
type='link' type='link'
@ -119,10 +116,11 @@ class TasksPageComponent extends React.PureComponent<TasksPageProps & RouteCompo
> >
Show all Show all
</Button> </Button>
</>, 7, </>, 5,
); );
} }
} }
}
private handleSearch = (value: string): void => { private handleSearch = (value: string): void => {
const { const {

Loading…
Cancel
Save