Skip to content

Commit

Permalink
#175: updated delete slice details
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxue1123 committed May 25, 2022
1 parent 345b1bb commit 0d66465
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 191 deletions.
6 changes: 3 additions & 3 deletions src/components/Experiment/Slices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Slices extends React.Component {

if (!includeDeadSlices) {
filtered = filtered.filter((s) =>
s.slice_state !== "Dead"
s.slice_state !== "Dead" && s.slice_state !== "Closing"
)
}

Expand Down Expand Up @@ -163,7 +163,7 @@ class Slices extends React.Component {
<div className="alert alert-warning mt-4" role="alert">
<p className="mt-2">
We couldn't find your slice. Please create slices from&nbsp;
<Link to="/new-slice">Portal</Link> or&nbsp;
<Link to="/new-slice">Portal</Link> or &nbsp;
<a
href={this.jupyterLinkMap[checkPortalType(window.location.href)]}
target="_blank"
Expand Down Expand Up @@ -199,7 +199,7 @@ class Slices extends React.Component {
<div className="my-2 d-flex flex-row justify-content-between">
<span>Showing {totalCount} slices.</span>
<Checkbox
label={"Include Dead Slices"}
label={"Include Dead/ Closing Slices"}
id={"checkbox-include-dead-slices"}
isChecked={this.state.includeDeadSlices}
onCheck={this.handleIncludeDeadSlices}
Expand Down
5 changes: 2 additions & 3 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ class Header extends React.Component {
// revoke token generated by crendential manager.
// TODO: Enable the revoke token when logout after removing credential manager from portal.
// this.revokeToken();
// remove id_token and refresh_token stored in browser.
localStorage.removeItem("idToken");
localStorage.removeItem("refreshToken");
// remove stored user ID and bastion login got from UIS whoami.
localStorage.removeItem("userID");
localStorage.removeItem("bastionLogin");
// remove old user status stored in browser.
localStorage.removeItem("userStatus");
localStorage.removeItem("sshKeyType");
localStorage.removeItem("sliceDraft");
// nginx handle logout url.
window.location.href = "/logout";
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/SliceViewer/Graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export default class Graph extends Component {
refreshLayout();

// refresh layout when elements change.
this.cy.on('add remove', () => {
this.cy.on('add', 'node',() => {
refreshLayout();
});

this.cy.on('remove', 'node', () => {
refreshLayout();
});

Expand Down
Loading

0 comments on commit 0d66465

Please sign in to comment.