From ae56309db959f5ee892448da6981fc191cb97dbf Mon Sep 17 00:00:00 2001
From: Nicolas Wavrant <nicolas.wavrant@tiolive.com>
Date: Wed, 16 Jul 2014 05:14:33 +0200
Subject: [PATCH] runner: update js to correctly display new /slapgridResult
 structure

---
 slapos/runner/static/js/scripts/process.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/slapos/runner/static/js/scripts/process.js b/slapos/runner/static/js/scripts/process.js
index 584df63..8957dae 100644
--- a/slapos/runner/static/js/scripts/process.js
+++ b/slapos/runner/static/js/scripts/process.js
@@ -186,7 +186,7 @@ function setRunningState(data) {
             $("#running").show();
             running = true;
             //change run menu title and style
-            if (data.software) {
+            if (data.software.state) {
                 if ( $("#running").children('span').length === 0 ) {
                   $("#softrun").removeClass('slapos_run');
                   $("#softrun").addClass('slapos_stop');
@@ -194,7 +194,7 @@ function setRunningState(data) {
                 }
                 processType = "Software";
             }
-            if (data.instance) {
+            if (data.instance.state) {
               ///Draft!!
                 if ( $("#running").children('span').length === 0 ) {
                   $("#softrun").removeClass('slapos_run');
-- 
2.30.9