这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const modifyReducer = (tableName, schemas, modifyStateOrig, action) => {
...modifyState,
relAdd: {
...modifyState.relAdd,
isManualExpanded: true,
isManualExpanded: !modifyState.relAdd.isManualExpanded,
},
};
case REL_NAME_CHANGED:
Expand Down Expand Up @@ -164,8 +164,6 @@ const modifyReducer = (tableName, schemas, modifyStateOrig, action) => {
relAdd: {
...modifyState.relAdd,
isObjRel: action.isObjRel,
rTable: null,
rcol: '',
},
};
case REL_SET_RTABLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@ const getRelationshipLine = (isObjRel, lcol, rcol, rTable) => {
const finalRTable = rTable.name ? rTable.name : rTable;
return isObjRel ? (
<span>
&nbsp;{lcol}&nbsp;&nbsp;&rarr;&nbsp;&nbsp;{rTable} :: {rcol}
&nbsp;
{lcol}
&nbsp;&nbsp;&rarr;&nbsp;&nbsp;
{rTable} :: {rcol}
</span>
) : (
<span>
&nbsp;{finalRTable} :: {rcol}&nbsp;&nbsp;&rarr;&nbsp;&nbsp;{lcol}
&nbsp;
{finalRTable} :: {rcol}
&nbsp;&nbsp;&rarr;&nbsp;&nbsp;
{lcol}
</span>
);
};
Expand Down Expand Up @@ -348,7 +354,8 @@ const AddRelationship = ({
<div className={`${styles.remove_margin_bottom} form-group`}>
<label>
{' '}
You have no new relationships that can be added. Add a foreign key{' '}
You have no new relationships that can be added. Add a foreign key to
get suggestions{' '}
</label>
</div>
);
Expand Down Expand Up @@ -402,7 +409,9 @@ const AddRelationship = ({
{[
'Suggested object relationships',
'Suggested Array relationships',
].map((s, i) => <th key={i}>{s}</th>)}
].map((s, i) => (
<th key={i}>{s}</th>
))}
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -485,9 +494,15 @@ const AddManualRelationship = ({
const onAddRelClicked = () => {
dispatch(addRelViewMigrate(tableName));
};
const onCloseClicked = () => {
dispatch(relManualAddClicked());
};
return (
<div>
<div className={styles.subheading_text}> Add a Manual Relationship </div>
<div className={styles.subheading_text}>
{' '}
Add a relationship manually{' '}
</div>
<div className="form-group">
<div className={`${styles.relBlockInline} ${styles.relBlockLeft}`}>
Relationship Type
Expand Down Expand Up @@ -577,6 +592,13 @@ const AddManualRelationship = ({
>
Add
</button>
<button
className={styles.add_mar_left + ' btn btn-default btn-sm'}
onClick={onCloseClicked}
data-test="table-close-manual-relationship"
>
Close
</button>
</div>
);
};
Expand Down Expand Up @@ -751,7 +773,7 @@ class Relationships extends Component {
}}
data-test="add-manual-relationship"
>
+ Add a manual relationship
+ Add a relationship manually
</button>
)}
<hr />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,17 @@ const getRelationshipLine = (isObjRel, lcol, rcol, rTable) => {
const getGrayText = value => <i>{value}</i>;
return isObjRel ? (
<span>
&nbsp;{getGrayText(lcol)}&nbsp;&nbsp;&rarr;&nbsp;&nbsp;{rTable} :: {rcol}
&nbsp;
{getGrayText(lcol)}
&nbsp;&nbsp;&rarr;&nbsp;&nbsp;
{rTable} :: {rcol}
</span>
) : (
<span>
&nbsp;{rTable.name} :: {rcol}&nbsp;&nbsp;&rarr;&nbsp;&nbsp;{getGrayText(
lcol
)}
&nbsp;
{rTable.name} :: {rcol}
&nbsp;&nbsp;&rarr;&nbsp;&nbsp;
{getGrayText(lcol)}
</span>
);
};
Expand Down Expand Up @@ -120,7 +124,7 @@ const AddRelationship = ({
return (
<div>
<div>
<div className={styles.subheading_text}> Add New Relationship </div>
<div className={styles.subheading_text}> Add new relationship </div>
<div className="form-group">
<div className={`${styles.relBlockInline} ${styles.relBlockLeft}`}>
Relationship Type
Expand Down Expand Up @@ -209,7 +213,7 @@ const AddRelationship = ({
onClick={onAddRelClicked}
data-test="view-add-relationship"
>
Add Relationship
Add
</button>
</div>
</div>
Expand Down