remove previous interface styling/logic

This commit is contained in:
Stephen Birarda 2015-12-21 10:35:05 -07:00
parent d4b7afbc25
commit 4763776901
2 changed files with 13 additions and 33 deletions

View file

@ -92,27 +92,5 @@
</div>
</div>
</div>
<!-- <h1>Console</h1>
<h2>Interface</h2>
<div id="process-status">
<div id="process-interface">
<span class="name">Interface</span>
<span class="status">unknown</span>
<button class="power-on">Turn On</button>
<button class="power-off">Turn Off</button>
</div>
</div>
<h2>Home</h2>
<div id="server">
</div>
<div>
Node Version: <script>document.write(process.versions.node)</script>
</div> -->
</body>
</html>

View file

@ -2,18 +2,20 @@ $(function() {
const ipcRenderer = require('electron').ipcRenderer;
function onProcessUpdate(event, arg) {
// Update interface
console.log("update", event, arg);
var state = arg.interface.state;
$('#process-interface .status').text(state);
var on = state != 'stopped';
if (on) {
$('#process-interface .power-on').hide();
$('#process-interface .power-off').show();
} else {
$('#process-interface .power-on').show();
$('#process-interface .power-off').hide();
}
// Update interface
// var state = arg.interface.state;
// $('#process-interface .status').text(state);
// var on = state != 'stopped';
// if (on) {
// $('#process-interface .power-on').hide();
// $('#process-interface .power-off').show();
// } else {
// $('#process-interface .power-on').show();
// $('#process-interface .power-off').hide();
// }
}
$('#process-interface .power-on').click(function() {