Skip to content

Commit

Permalink
changed job type to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed May 12, 2023
1 parent b3144ff commit 3fb345e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cvat-core/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export enum JobState {
}

export enum JobType {
ANNOTATION = 'annotation',
NORMAL = 'normal',
GROUND_TRUTH = 'ground_truth',
}

Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export class Job extends Session {
assignee: null,
stage: undefined,
state: undefined,
type: JobType.ANNOTATION,
type: JobType.NORMAL,
start_frame: undefined,
stop_frame: undefined,
project_id: null,
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/actions/annotation-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ export function getJobAsync(

const [job] = await cvat.jobs.get({ jobID: jid });
let gtJob = null;
if (job.type === JobType.ANNOTATION) {
if (job.type === JobType.NORMAL) {
try {
const [task] = await cvat.tasks.get({ id: tid });
[gtJob] = task.jobs.filter((_job: Job) => _job.type === JobType.GROUND_TRUTH);
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/components/jobs-page/jobs-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function JobsContentComponent(): JSX.Element {
return (
<Row justify='center' align='middle'>
<Col className='cvat-jobs-page-list' {...dimensions}>
{jobs.filter((job: Job) => job.type === JobType.ANNOTATION).map((job: Job): JSX.Element => (
{jobs.filter((job: Job) => job.type === JobType.NORMAL).map((job: Job): JSX.Element => (
<JobCard job={job} key={job.id} />
))}
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function JobListComponent(props: Props): JSX.Element {
const history = useHistory();
const { id: taskId } = taskInstance;
const { jobs } = taskInstance;
const [renderedJobs] = useState<Job[]>(jobs.filter((job: Job) => job.type === JobType.ANNOTATION));
const [renderedJobs] = useState<Job[]>(jobs.filter((job: Job) => job.type === JobType.NORMAL));
const [jobsReports, setJobsReports] = useState<Record<number, QualityReport>>({});
const jobReportsFromState: QualityReport[] =
useSelector((state: CombinedState) => state.analytics.quality.jobsReports);
Expand Down
3 changes: 2 additions & 1 deletion cvat-ui/src/components/task-page/job-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ function JobListComponent(props: Props): JSX.Element {
const history = useHistory();
const { id: taskId } = taskInstance;
let { jobs } = taskInstance;
jobs = jobs.filter((job: Job) => job.type === JobType.ANNOTATION);

jobs = jobs.filter((job: Job) => job.type === JobType.NORMAL);

function sorter(path: string) {
return (obj1: any, obj2: any): number => {
Expand Down

0 comments on commit 3fb345e

Please sign in to comment.