Skip to content

Commit

Permalink
show correct namespace and name when deleting job through dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
gbin10533 committed Jul 15, 2019
1 parent 67b5571 commit e410287
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dashboard/frontend/src/components/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class AppBar extends Component {
];

let rightMenu = null;
let ns = null;
let name = null;

if (this.props.location.pathname !== "/new") {
rightMenu = (
<div style={this.styles.rightMenu}>
Expand All @@ -49,6 +52,10 @@ class AppBar extends Component {
/>
</div>
);
let path = this.props.location.pathname.replace("/", "");
path = path.split("/");
ns = path[0];
name = path[1];
}
return (
<div>
Expand All @@ -63,7 +70,7 @@ class AppBar extends Component {
modal={true}
open={this.state.isModalVisible}
>
{'Are you sure you want to delete TFJob "test" in namespace "test"?'}
{'Are you sure you want to delete TFJob "' + name + '" in namespace "' + ns + '"?'}
</Dialog>
</div>
);
Expand Down

0 comments on commit e410287

Please sign in to comment.