Skip to content

Commit

Permalink
添加刷新中状态提示,relationships id字段显示指明必填
Browse files Browse the repository at this point in the history
  • Loading branch information
YanhuiJessica committed Mar 5, 2021
1 parent e4c2d5c commit 3663204
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/Relationship.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
SimpleForm,
TextInput,
Create,
required,
} from "react-admin";

const RelationShipTypes = [
Expand Down Expand Up @@ -68,7 +69,7 @@ const RelationshipForm = (props: any) => {
return (
<SimpleForm {...props}>
<TextInput source="type" defaultValue='relationship' disabled />
<TextInput source="id" disabled={disabled} />
<TextInput source="id" disabled={disabled} validate={required()} />

<ReferenceInput
label="source_ref"
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/customAppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const CustomAppBar = (props:any) => {

const submitHandler = (e:any) => {
e.preventDefault()
setState({
open: true,
Transition: Fade,
msg: "刷新中......"
});
fetch('http://attack-seaman.com:6868/attackPatterns/save',{
method: 'POST',
}).then(response => {
Expand Down

0 comments on commit 3663204

Please sign in to comment.