display helper text when server stopped

This commit is contained in:
Stephen Birarda 2015-12-22 15:46:44 -07:00
parent a30d7ee697
commit 919305e759
3 changed files with 17 additions and 0 deletions

View file

@ -203,6 +203,7 @@ header {
margin-left: @title-margin-left; margin-left: @title-margin-left;
#go-server-button { #go-server-button {
float: left;
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5); box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5);
cursor: pointer; cursor: pointer;
border: none; border: none;
@ -220,6 +221,12 @@ header {
width: 50px; width: 50px;
} }
} }
#server-stopped-text {
float: left;
margin: 20px 0px 0px 20px;
color: red;
}
} }
} }
} }

View file

@ -76,6 +76,9 @@
<button id="go-server-button"> <button id="go-server-button">
<img src="images/go-hmd.svg" /> <img src="images/go-hmd.svg" />
</button> </button>
<div id="server-stopped-text">
<span>Server stopped<br>Click "Restart"</span>
</div>
</div> </div>
</div> </div>
<div id="manage-server"> <div id="manage-server">

View file

@ -56,6 +56,7 @@ $(function() {
var sendingGroup = arg; var sendingGroup = arg;
var stopButton = $('#manage-server #stop'); var stopButton = $('#manage-server #stop');
var goButton = $('#go-server-button'); var goButton = $('#go-server-button');
var serverStopped = $('#server-stopped-text');
switch (sendingGroup.state) { switch (sendingGroup.state) {
case HFProcess.ProcessGroupStates.STOPPED: case HFProcess.ProcessGroupStates.STOPPED:
@ -66,6 +67,9 @@ $(function() {
// disable the go button // disable the go button
goButton.addClass('disabled'); goButton.addClass('disabled');
// show the server stopped text
serverStopped.show();
break; break;
case HFProcess.ProcessGroupStates.STARTED: case HFProcess.ProcessGroupStates.STARTED:
// if the process group is going, the stop button should be active // if the process group is going, the stop button should be active
@ -74,6 +78,9 @@ $(function() {
// enable the go button // enable the go button
goButton.removeClass('disabled'); goButton.removeClass('disabled');
// hide the server stopped text
serverStopped.hide();
break; break;
} }
} }