Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update tag/edge edit page #128

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

hetao92
Copy link
Contributor

@hetao92 hetao92 commented Feb 24, 2022

No description provided.

Comment on lines 56 to 66
} else {
setLoading(true);
const res = await createTagOrEdge({
gql,
type: createType
});
setLoading(false);
if (res.code === 0) {
message.success(intl.get('schema.createSuccess'));
history.push(`/schema/${space}/${createType}/edit/${name}`);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary else

Comment on lines 64 to 68
onOk: async() => {
if (properties.length > 0) {
handlePropertyDelete(properties);
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary async

Comment on lines 119 to 121
if (editField && editField.alterType === 'ADD') {
setList(list.slice(0, list.length - 1));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (editField?.alterType === 'ADD') {
  setList(list.slice(0, - 1));
}

} else {
setTtlRequired(true);
handleEditBefore();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary else

Comment on lines 88 to 90
onOk: async() => {
handleTtlDelete();
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// tiny
onOk: () => handleTtlDelete()

// or
onOk: handleTtlDelete

Comment on lines 141 to 138
const hasIndex = res.filter(i => i.name === editName).length > 0;
return hasIndex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return res.some(i => i.name === editName);

Comment on lines 80 to 92
const infoList = reg.exec(str) || [];
const properties: IProperty[] = fieldInfo.map(i => ({
name: i.Field,
showType: i.Type,
type: i.Type.startsWith('fixed_string') ? 'fixed_string' : i.Type,
allowNull: i.Null === 'YES',
comment: i.Comment === '_EMPTY_' ? '' : i.Comment,
value: i.Default === '_EMPTY_' ? '' : convertBigNumberToString(i.Default),
fixedLength: i.Type.startsWith('fixed_string')
? i.Type.replace(/[fixed_string(|)]/g, '')
: '',
})) || [];
const duration = (infoList && infoList[2].split(' = ')[1]) || '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// const infoList = reg.exec(str) || []
// infoList should be certain Array
const duration = infoList[2]?.split(' = ')[1] || '';

@huaxiabuluo huaxiabuluo merged commit 4f77a95 into vesoft-inc:v3.3.0-dev Feb 24, 2022
@hetao92 hetao92 deleted the hetao-dev branch February 24, 2022 08:00
hetao92 added a commit to hetao92/nebula-studio that referenced this pull request Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants