这是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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

### Other changes

- console: disable editing action relationships
- cli: fix typo in cli example for squash (fix #4047) (#4049)
- console: fix run_sql migration modal messaging (close #4020) (#4060)
- docs: add note on pg versions for actions (#4034)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ const RelationshipEditor = ({

// rel name input
const getRelNameInput = () => {
/*
There is no neat solution to renaming a relationship.
This is because name is the only unique identifier of a relationship.
TODO FIXME
*/
const isDisabled = !!existingRelConfig;
Copy link
Contributor

Choose a reason for hiding this comment

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

Approving anyway, but is new variable really needed?

const relNameInputTitle = isDisabled
? 'A relationship cannot be renamed. Please drop and re-create if you really must.'
: undefined;
return (
<div className={`${styles.add_mar_bottom}`}>
<div className={`${styles.add_mar_bottom_mid}`}>
Expand All @@ -129,6 +138,8 @@ const RelationshipEditor = ({
className={`${styles.select} form-control ${styles.add_pad_left}`}
placeholder="Enter relationship name"
data-test="rel-name"
disabled={isDisabled}
title={relNameInputTitle}
value={name}
/>
</div>
Expand Down Expand Up @@ -180,17 +191,17 @@ const RelationshipEditor = ({
disabled={!name}
>
{// default unselected option
refSchema === '' && (
<option value={''} disabled>
{'-- reference schema --'}
</option>
)}
refSchema === '' && (
<option value={''} disabled>
{'-- reference schema --'}
</option>
)}
{// all reference schema options
orderedSchemaList.map((rs, j) => (
<option key={j} value={rs}>
{rs}
</option>
))}
orderedSchemaList.map((rs, j) => (
<option key={j} value={rs}>
{rs}
</option>
))}
</select>
</div>
);
Expand Down