提交 ff76c648 编写于 作者: K klakhov

removed outdated code, removed submit and open

上级 65d67138
......@@ -39,23 +39,6 @@ export default class QualitySettings {
#compareAttributes: boolean;
constructor(initialData: SerializedQualitySettingsData) {
const data: SerializedQualitySettingsData = {
id: undefined,
task: undefined,
iou_threshold: undefined,
oks_sigma: undefined,
line_thickness: undefined,
low_overlap_threshold: undefined,
compare_line_orientation: undefined,
line_orientation_threshold: undefined,
compare_groups: undefined,
group_match_threshold: undefined,
check_covered_annotations: undefined,
object_visibility_threshold: undefined,
panoptic_comparison: undefined,
compare_attributes: undefined,
};
this.#id = initialData.id;
this.#task = initialData.task;
this.#iouThreshold = initialData.iou_threshold;
......@@ -70,22 +53,6 @@ export default class QualitySettings {
this.#objectVisibilityThreshold = initialData.object_visibility_threshold;
this.#panopticComparison = initialData.panoptic_comparison;
this.#compareAttributes = initialData.compare_attributes;
for (const property in data) {
if (Object.prototype.hasOwnProperty.call(data, property) && property in initialData) {
data[property] = initialData[property];
}
}
Object.defineProperties(
this,
Object.freeze({
id: {
get: () => data.id,
},
}),
);
}
get id(): number {
......
......@@ -2201,13 +2201,11 @@ async function receiveWebhookEvents(type: WebhookSourceType): Promise<string[]>
}
async function getQualityReports(filter): Promise<SerializedQualityReportData[]> {
const params = enableOrganization();
const { backendAPI } = config;
try {
const response = await Axios.get(`${backendAPI}/quality/reports`, {
params: {
...params,
...filter,
},
});
......@@ -2235,18 +2233,16 @@ async function getQualityConflicts(filter): Promise<SerializedQualityConflictDat
}
async function getQualitySettings(taskID: number): Promise<SerializedQualitySettingsData> {
const params = enableOrganization();
const { backendAPI } = config;
try {
const response = await Axios.get(`${backendAPI}/quality/settings`, {
params: {
...params,
task_id: taskID,
},
});
const settings = response.data.results[0];
return settings;
return response.data.results[0];
} catch (errorData) {
throw generateError(errorData);
}
......
......@@ -9,7 +9,6 @@ import { Row, Col } from 'antd/lib/grid';
import Form from 'antd/lib/form';
import Button from 'antd/lib/button';
import Select from 'antd/lib/select';
import notification from 'antd/lib/notification';
import InputNumber from 'antd/lib/input-number';
import CVATTooltip from 'components/common/cvat-tooltip';
......@@ -75,24 +74,13 @@ function JobForm(props: Props): JSX.Element {
}
}, [task]);
const onSubmitAndOpen = async (): Promise<void> => {
const onSubmit = async (): Promise<void> => {
const createdJob = await submit();
if (createdJob) {
history.push(`/tasks/${task.id}/jobs/${createdJob.id}`);
}
};
const onSubmit = async (): Promise<void> => {
const res = await submit();
if (res) {
form.resetFields();
notification.info({
message: 'Job has been successfully created',
className: 'cvat-notification-create-job-success',
});
}
};
const onQuantityChange = useCallback((value: number | null) => {
if (value) {
const newFrameCount = Math.round((value * taskSize) / 100);
......@@ -222,16 +210,6 @@ function JobForm(props: Props): JSX.Element {
</Col>
<Col span={24} className='cvat-create-job-actions'>
<Row justify='end'>
<Col>
<Button
className='cvat-submit-and-open-job-button'
type='primary'
onClick={onSubmitAndOpen}
loading={fetching}
>
Submit & Open
</Button>
</Col>
<Col>
<Button
className='cvat-submit-job-button'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册