Skip to content

Commit

Permalink
Merge pull request #141 from paralus/nsadmin-cluster-delete-message-fix
Browse files Browse the repository at this point in the history
Fix wrong cluster delete success message for non-priviledged users
  • Loading branch information
niravparikh05 authored Nov 4, 2022
2 parents 80a4f1d + 3a5048a commit 270e23c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.

### Fixed
- Fix for IdP users unable to login from [niravparikh05](https://github.com/niravparikh05)
- Fix wrong cluster delete success message for non-priviledged users from [niravparikh05](https://github.com/niravparikh05)

## [0.1.4]- 2022-10-14
### Changed
Expand Down
12 changes: 6 additions & 6 deletions src/app/routes/edges/routes/PrivateEdgeList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,15 +508,13 @@ class PrivateEdgeList extends React.Component {
this.handleAddEdge();
};

handleRemoveEdge = (edge, forceDelete) => {
this.state.removeEdgeObj = edge;
deleteEdge = (edge, forceDelete) => {
this.props.removeCluster(
edge.metadata.name,
this.props.currentProject.metadata.name,
forceDelete
);
this.state.isResponseSuccess = true;
this.setState({ ...this.state });
this.props.history.push("/app/edges");
};

handleKubectlSettings = (event, edge) => {
Expand Down Expand Up @@ -581,7 +579,9 @@ class PrivateEdgeList extends React.Component {
) {
return <T.span id="message-id" text="unauthorized" />;
}
return <span id="message-id">{capitalizeFirstLetter(error)}</span>;
return (
<span id="message-id">{capitalizeFirstLetter(error.message)}</span>
);
}
if (errorMessage !== "") {
return <span id="message-id">{capitalizeFirstLetter(errorMessage)}</span>;
Expand Down Expand Up @@ -1375,7 +1375,7 @@ class PrivateEdgeList extends React.Component {
</span>
),
handleClick: () => {
this.handleRemoveEdge(n, true);
this.deleteEdge(n, true);
},
}}
/>
Expand Down

0 comments on commit 270e23c

Please sign in to comment.