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
8 changes: 5 additions & 3 deletions ui/perfherder/alerts/FileBugModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default class FileBugModal extends React.Component {
inputValue: '',
invalidInput: false,
validated: false,
disableButton: false,
};
}

Expand Down Expand Up @@ -52,9 +53,10 @@ export default class FileBugModal extends React.Component {
};

handleSubmit = async (event, inputValue) => {
this.setState({ disableButton: true });
const { updateAndClose } = this.props;
await updateAndClose(event, inputValue);
this.setState({ inputValue: '' });
this.setState({ inputValue: '', disableButton: false });
};

render() {
Expand All @@ -68,7 +70,7 @@ export default class FileBugModal extends React.Component {
errorMessage,
} = this.props;

const { inputValue, invalidInput, validated } = this.state;
const { inputValue, invalidInput, validated, disableButton } = this.state;

const infoText =
'Leaving the input empty will open an enter bug screen prefilled with the default values.\n' +
Expand Down Expand Up @@ -122,7 +124,7 @@ export default class FileBugModal extends React.Component {
<Button
className="btn-outline-darker-info active"
onClick={(event) => this.handleSubmit(event, inputValue)}
disabled={invalidInput && !validated}
disabled={(invalidInput && !validated) || disableButton}
type="submit"
>
{(inputValue.length &&
Expand Down
7 changes: 7 additions & 0 deletions ui/perfherder/alerts/StatusDropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ export default class StatusDropdown extends React.Component {
};
}
window.open(`${bzBaseUrl}show_bug.cgi?id=${createResult.data.id}`);

// Link to bug
const params = {
bug_number: parseInt(createResult.data.id, 10),
};
this.changeAlertSummary(params);

return {
failureStatus: null,
};
Expand Down