Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/24/13 13:40:43 (11 years ago)
Author:
fschoepp
Message:

#1888:

  • Added visual extensions (dynamic JavaScript) which will be used to render additional result parameters specific to scenarios (e. g. create a graphical representation of a TSP).
  • Added relationship between jobs and experiments (otherwise, it's not possible to get the job's experiment).
  • Updated Admin page to allow removal/addition of visual extensions.
  • Added back-end logic to store/retrieve/delete visual extensions.
  • Added visual extension functionality to the JavaScript views/controllers (job.*.js).
  • Added tsp.js which is a visual extension for the "Genetic Algorithm - TSP" scenario. It adds a graphical representation of the TSP (just like the C# version does) to the results.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/job.controller.js

    r9324 r9395  
    11var OAAS_CONTROLLER = (function (my, Backbone, OAAS_VIEW, OAAS_MODEL, _, $) {
     2    my.JobVisualExtensionListener = function (model, element) {
     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));
     14            }
     15        }
     16        });
     17    },
    218    my.JobPageController = function () {
    319        this.create = function () {
     
    2339                    var div = $('<div/>').appendTo($('#jobDetails'));
    2440                    var rv = new OAAS_VIEW.ResultView({ model: runList, el: div });
     41                    listener.listenTo(rv, 'renderVisualExtension', my.JobVisualExtensionListener);
    2542                    rv.render();
    2643                    var av = new OAAS_VIEW.AccordionView({ el: div });
     
    3047            });
    3148
     49
     50
    3251            jobList.poll();
    3352        }
Note: See TracChangeset for help on using the changeset viewer.