Browse Source

shepherd api update, loading screen scroll bar hidden

ca333-dev
Satinder Grewal 8 years ago
parent
commit
140183eb55
  1. 5
      gui/index.html
  2. 8
      routes/shepherd.js

5
gui/index.html

@ -11,13 +11,14 @@
<script type="text/javascript" src="jRoll.min.js"></script>
<script>if (window.module) module = window.module;</script>
</head>
<body>
<body style="overflow:hidden;">
<div style="text-align: center;">
<div style="/*background-image: url('loading.gif'); background-repeat: no-repeat; background-position: center;*/ height: 240px; width: 400px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto;">
<span id="loading_status_text">Starting Wallet. Please wait...</span><br>
<span id="loading_sub_status_text"></span><br>
<span id="loading_sub_status_output_text"></span>
<div id="pulse"></div></div>
</div>
<div id="pulse" style="margin: 80px 50px"></div>
</div>
<script type="text/javascript">
$(document).ready( function() {

8
routes/shepherd.js

@ -81,20 +81,20 @@ shepherd.post('/herdlist', function(req, res) {
//console.log('======= req.body =======');
//console.log(req);
//console.log(req.body);
//console.log(req.body.herd);
console.log(req.body.herdname);
//console.log(req.body.options);
pm2.connect(true, function(err) {
if (err) throw err; //todo: proper error handling
pm2.describe("IGUANA", function(err, list) {
pm2.describe(req.body.herdname, function(err, list) {
pm2.disconnect(); //disconnect after getting proc info list
if (err) throw err //todo: proper error handling
console.log(list[0].pm2_env.status) //print status of IGUANA proc
console.log(list[0].pid) //print pid of IGUANA proc
res.end('{"herdname": '+req.body.herdname+',"status": '+list[0].pm2_env.status+',"pid":'+list[0].pid+'}');
});
});
res.end('{"msg": "success","result": "result"}');
});

Loading…
Cancel
Save