Browse Source

HPCC-9236 WU Lists calling the server for each row

WUQueryWidget and GetDFUWorkunitsWidget were making an extra call for each row item to the server.

Fixes HPCC-9236

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Gordon Smith 12 years ago
parent
commit
1433b28289

+ 1 - 4
esp/files/scripts/DFUWUDetailsWidget.js

@@ -135,14 +135,11 @@ define([
 
                 this.clearInput();
                 this.wu = ESPDFUWorkunit.Get(params.Wuid);
-                var data = this.wu.getData();
-                for (key in data) {
-                    this.updateInput(key, null, data[key]);
-                }
                 var context = this;
                 this.wu.watch(function (name, oldValue, newValue) {
                     context.updateInput(name, oldValue, newValue);
                 });
+                this.wu.refresh();
             }
             this.selectChild(this.summaryWidget, true);
         },

+ 0 - 1
esp/files/scripts/ESPDFUWorkunit.js

@@ -48,7 +48,6 @@ define([
                 _workunits[id] = new Workunit({
                     Wuid: id
                 });
-                _workunits[id].refresh();
             }
             return _workunits[id];
         },

+ 0 - 1
esp/files/scripts/ESPWorkunit.js

@@ -48,7 +48,6 @@ define([
                 _workunits[id] = new Workunit({
                     Wuid: id
                 });
-                _workunits[id].refresh();
             }
             return _workunits[id];
         },

+ 0 - 6
esp/files/scripts/LFDetailsWidget.js

@@ -144,13 +144,7 @@ define([
 
             var context = this;
             if (params.Name) {
-                //dom.byId(this.id + "Name").innerHTML = params.Name;
-                //dom.byId(this.id + "LogicalFileName2").value = params.Name;
                 this.logicalFile = ESPLogicalFile.Get(params.Name);
-                var data = this.logicalFile.getData();
-                for (key in data) {
-                    this.updateInput(key, null, data[key]);
-                }
                 this.logicalFile.watch(function (name, oldValue, newValue) {
                     context.updateInput(name, oldValue, newValue);
                 });

+ 0 - 6
esp/files/scripts/SFDetailsWidget.js

@@ -137,13 +137,7 @@ define([
 
             var context = this;
             if (params.Name) {
-                //dom.byId(this.id + "Name").innerHTML = params.Name;
-                //dom.byId(this.id + "LogicalFileName2").value = params.Name;
                 this.logicalFile = ESPLogicalFile.Get(params.Name);
-                var data = this.logicalFile.getData();
-                for (key in data) {
-                    this.updateInput(key, null, data[key]);
-                }
                 this.logicalFile.watch(function (name, oldValue, newValue) {
                     context.updateInput(name, oldValue, newValue);
                 });

+ 1 - 4
esp/files/scripts/WUDetailsWidget.js

@@ -139,14 +139,11 @@ define([
 
                 dom.byId(this.id + "Wuid").innerHTML = params.Wuid;
                 this.wu = ESPWorkunit.Get(params.Wuid);
-                var data = this.wu.getData();
-                for (key in data) {
-                    this.updateInput(key, null, data[key]);
-                }
                 var context = this;
                 this.wu.watch(function (name, oldValue, newValue) {
                     context.updateInput(name, oldValue, newValue);
                 });
+                this.wu.refresh();
             }
             this.infoGridWidget.init(params);
             this.selectChild(this.summaryWidget, true);