- Timestamp:
- 05/22/13 15:29:15 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Web/Content
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.controller.js
r9335 r9508 36 36 loadingDialog.render(); 37 37 // send experiment to server 38 experimentModel.save({}, { success: function () { 39 loadingDialog.setLoading(false); 40 loadingDialog.text('Experiment successfully saved!'); 41 loadingDialog.render(); 42 if (availableExperiments) 43 availableExperiments.fetch({ cache: false, success: function (itm) { 44 selectableGroup.render(); 45 } 46 }); 47 } 38 experimentModel.save({}, { 39 success: function () { 40 loadingDialog.setLoading(false); 41 loadingDialog.text('Experiment successfully saved!'); 42 loadingDialog.render(); 43 if (availableExperiments) 44 availableExperiments.fetch({ cache: false, success: function (itm) { 45 selectableGroup.render(); 46 } 47 }); 48 }, 49 error: function (model, response, options) { 50 loadingDialog.setLoading(false); 51 loadingDialog.text('Failed to save Experiment - Please log off an and on and try again!'); 52 loadingDialog.render(); 53 } 48 54 }); 49 55 //loadingDialog.close(); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/experiment.view.js
r9350 r9508 816 816 }, 817 817 render: function () { 818 if (this.model.models.length == 0) 819 return; 820 818 821 var self = this; 819 822 var ele = $(_.template($('#runcollection_template').html(), {})); … … 1039 1042 } else { 1040 1043 var valueProvider = _.find(this.model.models[i].get('results'), function (itm) { return itm.Name == self.bubbleSelect.val(); }); 1041 if (!valueProvider) 1044 if (!valueProvider) 1042 1045 valueProvider = _.find(this.model.models[i].get('params'), function (itm) { return itm.Name == self.bubbleSelect.val(); }); 1043 1046 1044 if (!valueProvider) { 1047 if (!valueProvider) { 1045 1048 size = this.options.bubbleSize; 1046 1049 } else { -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/job.controller.js
r9395 r9508 2 2 my.JobVisualExtensionListener = function (model, element) { 3 3 var extension = new OAAS_MODEL.VisualExtension({ id: model.get('algorithmName') }); 4 extension.fetch({ cache: true, success: function () { 5 //eval extension.js -> execute addVisualExtension(model, element): 6 var js = extension.get('ScenarioJs'); 7 if (js != null) { 8 (function (model, element) { 9 addExtension = undefined; 10 eval(js); 11 if (addExtension) 12 addExtension(model, element); 13 } (model, element)); 4 extension.fetch({ cache: true, 5 success: function () { 6 //eval extension.js -> execute addVisualExtension(model, element): 7 var js = extension.get('ScenarioJs'); 8 if (js != null) { 9 (function (model, element) { 10 addExtension = undefined; 11 eval(js); 12 if (addExtension) 13 addExtension(model, element); 14 } (model, element)); 15 } 16 }, 17 error: function (model, response, options) { 18 14 19 } 15 }16 20 }); 17 21 }, … … 35 39 var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Loading results of job...' }); 36 40 lv.render(); 37 runList.fetch({ cache: false, success: function () { 38 $('#jobDetails').empty(); 39 var div = $('<div/>').appendTo($('#jobDetails')); 40 var rv = new OAAS_VIEW.ResultView({ model: runList, el: div }); 41 listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener); 42 rv.render(); 43 var av = new OAAS_VIEW.AccordionView({ el: div }); 44 av.render(); 45 } 41 runList.fetch({ cache: false, 42 success: function () { 43 $('#jobDetails').empty(); 44 var div = $('<div/>').appendTo($('#jobDetails')); 45 if (runList.models && runList.models.length == 0) { 46 $('<p/>').text('No job results available!').appendTo(div); 47 return; 48 } 49 // else draw the result view 50 var rv = new OAAS_VIEW.ResultView({ model: runList, el: div }); 51 listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener); 52 rv.render(); 53 var av = new OAAS_VIEW.AccordionView({ el: div }); 54 av.render(); 55 }, 56 error: function (model, response, options) { 57 $('#jobDetails').empty(); 58 var lv = new OAAS_VIEW.LoadingView({ el: $('#jobDetails'), model: 'Error during retrieval!' }); 59 lv.render(); 60 } 46 61 }); 47 62 });
Note: See TracChangeset
for help on using the changeset viewer.