Skip to content

Commit

Permalink
Merge pull request #14 from 3191110276/master
Browse files Browse the repository at this point in the history
Added check for Destroy button
  • Loading branch information
vallard authored Nov 17, 2017
2 parents 7a055d0 + 010e86a commit 0265a6c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
19 changes: 17 additions & 2 deletions public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Feedback field
height: 30px;
line-height: 30px;
text-align: center;
position: absolute;
position: fixed;
bottom:0;
right: 0;
border-width: 1px;
Expand All @@ -85,6 +85,22 @@ Feedback field
border-bottom-style: off;
}

#destroyoverlay {
text-align: center;
font-size: 1.25em;
background-color: white;
width: 500px;
height: 220px;
box-shadow: 5px 5px 14px grey;
border-radius: 25px;
padding: 40px 50px 0px 50px;
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
display: none;
}


#feedbackoverlay{
width: 100%;
Expand Down Expand Up @@ -121,4 +137,3 @@ Feedback field
font-weight: bold;
font-size: 105%
}

13 changes: 12 additions & 1 deletion src/components/panels/deploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,24 @@ var DeployPanel = ({working, keys, kubam_ip, onChange, makeBootFunc, deployFunc,
<button onClick={(e) => destroyFunc(e)} className="btn btn-lg btn-danger" disabled>
<i className="fa fa-cog fa-spin"></i> Working</button>
:
<button onClick={(e) => destroyFunc(e)} className="btn btn-lg btn-danger">Destroy</button>
<button onClick={destroycheck} className="btn btn-lg btn-danger">Destroy</button>
}
</div>
</div>
</div>
<div id="destroyoverlay">
<span>Are you sure that you want to destroy the cluster?</span><br /><br />
<button className="btn btn-lg btn-danger" onClick={(e) => destroyFunc(e)}>Destroy</button> <button className="btn btn-lg btn-primary" onClick={closedestroy}>No, Abort!</button>
</div>
</div>
);

export default DeployPanel

function destroycheck() {
document.getElementById('destroyoverlay').style.display = 'inline'
}

function closedestroy() {
document.getElementById('destroyoverlay').style.display = 'none'
}

0 comments on commit 0265a6c

Please sign in to comment.