Browse Source

HPCC-9113 Running workunit not refreshing tabs

Initial "monitor" callback does not happen until next change.

Fixes HPCC-9113

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Gordon Smith 12 years ago
parent
commit
9329490a62
2 changed files with 5 additions and 6 deletions
  1. 4 5
      esp/files/scripts/ESPWorkunit.js
  2. 1 1
      esp/files/scripts/ResultsWidget.js

+ 4 - 5
esp/files/scripts/ESPWorkunit.js

@@ -186,11 +186,10 @@ define([
             return this.hasCompleted;
         },
         monitor: function (callback) {
-            if (this.hasCompleted) {
-                if (callback) {
-                    callback(this);
-                }
-            } else {
+            if (callback) {
+                callback(this);
+            }
+            if (!this.hasCompleted) {
                 var context = this;
                 this.watch("changedCount", function (name, oldValue, newValue) {
                     if (oldValue !== newValue && newValue) {

+ 1 - 1
esp/files/scripts/ResultsWidget.js

@@ -131,7 +131,7 @@ define([
                             }
                         });
                         var currSel = context.getSelectedChild();
-                        if (currSel) {
+                        if (currSel && currSel.refresh) {
                             currSel.refresh();
                         }
                     }