Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/13 15:50:53 (11 years ago)
Author:
fschoepp
Message:

#1888:

  • Model: OptimizationScenario may be a tree of algorithms (and problems)
  • Model: Renamed InputParameters to ProblemParameters (as they are the parameters of a problem)
  • Model: Added JobExecutionDetails which contain Repetitions + Group (resource to use)
  • ScenarioParser parses the new XML scenario files
  • Website + Model: You are now able to add/remove rows from a table (no JavaScript involved yet)
  • Website + Controller: Added repetitions (enables batch jobs) and group (resource to use) to OaaS which will be used by the controller to schedule the job
  • Website: Updated templates to use new model structure
  • Website + Scenarios: Added the new algorithm Benchmark Algorithm
  • Controller: Added a singleton to make the (Azure/Mockup)-DAL exchangeable
  • Controller: Added mockup classes for DAL + IScenarioManager
  • Website/Result Page: Line Diagrams will be added via JavaScript, crawling their data using AJAX
  • Website: Most configuration parameters can be set in the ServiceDefinition directly
  • Added a mockup for the Membership classes: These can be used if no network connection is available or if other parts of the app shall be tested
  • Scenarios: Updated TSP mappings to new xsd
File:
1 edited

Legend:

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

    r9062 r9166  
    3333            show: true,
    3434            placement: 'outsideGrid'
     35        },
     36        highlighter: {
     37            show: true,
     38            sizeAdjust: 7.5
    3539        }
    3640    });
     41}
     42
     43function handleDatatableSelectionChanged(datatable, datarow) {
     44    $.ajax({
     45        url: '/chart/GetDatatableContent?datatable=' + datatable + '&datarow=' + datarow,
     46
     47        success: function (result) {
     48            var plot = generatePlot('dataTableGraph', result)
     49            plot.replot({ resetAxes: true });
     50
     51            var resizer = $("#dataTableGraph").closest('.resizable');
     52            $(resizer).unbind('resizestop');
     53            $(resizer).bind('resizestop', function (event, ui) {
     54                var id = $(this).children('div').get(0).id;
     55                $("#dataTableGraph").height($(this).height() * 0.96);
     56                $("#dataTableGraph").width($(this).width() * 0.96);
     57                plot.replot({ resetAxes: true });
     58            });
     59        },
     60        error: function (jqXHR, textStatus, errorThrown) {
     61            alert(textStatus);
     62        }
     63    });
     64}
     65
     66function redrawAccordions() {
     67    $(".collapsible").accordion("refresh");
     68}
     69
     70function injectDatatableAnalyzer() {
     71    var datatable = null;
     72    var row = null;
     73
     74    // crawl datatables for current run results
     75    if ($("#dataTable").length > 0) {
     76        $.ajax({
     77            url: '/chart/GetDatatables',
     78
     79            success: function (result) {
     80                $("#dataTable").empty();
     81                $.each(result.Datatables, function (index, tableName) {
     82                    // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
     83                    $("#dataTable").append($("<option></option>").attr("value", tableName).text(tableName));
     84                });
     85
     86                // select first row
     87                // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
     88                $("#dataTable").val($("#dataTable option:first").val());
     89                // fire selection changed event
     90                $("#dataTable").change();
     91            },
     92            error: function (jqXHR, textStatus, errorThrown) {
     93                alert(textStatus);
     94            }
     95        });
     96
     97        $("#dataTable option:selected").each(function () {
     98            datatable = $(this).text();
     99        });
     100
     101        $("#dataTable").change(function () {
     102            $("#dataTable option:selected").each(function () {
     103                datatable = $(this).text();
     104                $.ajax({
     105                    url: '/chart/GetRowNames?datatable=' + datatable,
     106
     107                    success: function (result) {
     108                        $("#dataRow").empty();
     109                        $.each(result.RowNames, function (index, rowName) {
     110                            // http://stackoverflow.com/questions/1801499/how-to-change-options-of-select-with-jquery
     111                            $("#dataRow").append($("<option></option>").attr("value", rowName).text(rowName));
     112                        });
     113
     114                        // select first row
     115                        // http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery
     116                        $("#dataRow").val($("#dataRow option:first").val());
     117                        // fire selection changed event
     118                        //$("#dataRow").change();
     119                    },
     120                    error: function (jqXHR, textStatus, errorThrown) {
     121                        alert(textStatus);
     122                    }
     123                });
     124            });
     125        });
     126
     127        $("#dataRow").change(function () {
     128            $("#dataRow option:selected").each(function () {
     129                row = $(this).text();
     130                handleDatatableSelectionChanged(datatable, row);
     131            });
     132        });
     133    }
     134}
     135
     136function injectMatrixGraph() {
     137    $(".matrix-graph").each(function (i) {
     138        var tabable = $(this).closest(".tabable");
     139        var id = this.id;
     140        var resizerId = $(this).parent().get(0).id;
     141        var indices = retrieveMatrix(id);
     142        var graphCreated = false;
     143
     144        $(tabable).bind('tabsactivate', function (event, ui) {
     145            if ($(ui.newPanel[0]).hasClass("resizable") && !graphCreated) {
     146                graphCreated = true;
     147                var id = $(ui.newPanel[0]).children("div")[0].id;
     148                var resizerId = $("#" + id).parent().get(0).id;
     149                var indices = retrieveMatrix(id);
     150
     151                $.ajax({
     152                    url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
     153
     154                    success: function (result) {
     155                        var plot = generatePlot(id, result);
     156                        tabable.bind('tabsshow', function (event, ui) {
     157                            if (ui.index == 1 && plot._drawCount == 0) {
     158                                plot.replot();
     159                            }
     160                            redrawAccordions();
     161                        });
     162                        var resizer = $("#" + id).closest('.resizable');
     163                        $(resizer).bind('resizestop', function (event, ui) {
     164                            var id = $(this).children('div').get(0).id;
     165                            $("#" + id).height($(this).height() * 0.96);
     166                            $("#" + id).width($(this).width() * 0.96);
     167                            plot.replot({ resetAxes: true });
     168                        });
     169                    },
     170                    error: function (jqXHR, textStatus, errorThrown) {
     171                        alert(textStatus);
     172                        alert(errorThrown);
     173                    }
     174                });
     175            }
     176        });
     177    });
     178}
     179
     180function injectTableModifiers() {
     181    // TODO: Make row add / delete via javascript
     182    var i = 10 + 20;
     183    return i;
    37184}
    38185
     
    108255
    109256    try {
    110         $(".collapsible").accordion("resize",
    111         {
     257        $(".collapsible").accordion({
     258            heightStyle: "content",
    112259            collapsible: true,
    113260            active: false
     
    131278            $(this).resizable();
    132279        });
    133 
    134         $(".matrix-graph").each(function (i) {
    135             var tabable = $(this).closest(".tabable");
    136             var id = this.id;
    137             var resizerId = $(this).parent().get(0).id;
    138             var indices = retrieveMatrix(id);
    139 
    140             $.ajax({
    141                 url: '/Chart/GetMatrixContentForGraph?run=' + indices.runId + '&parameterOffset=' + indices.parameterOffset + "&showMarker=false",
    142 
    143                 success: function (result) {
    144                     var plot = generatePlot(id, result);
    145                     tabable.bind('tabsshow', function (event, ui) {
    146                         if (ui.index == 1 && plot._drawCount == 0) {
    147                             plot.replot();
    148                         }
    149                     });
    150                     var resizer = $("#"+id).closest('.resizable');
    151                     $(resizer).bind('resizestop', function (event, ui) {
    152                         var id = $(this).children('div').get(0).id;
    153                         $("#"+id).height($(this).height() * 0.96);
    154                         $("#" + id).width($(this).width() * 0.96);
    155                         plot.replot({ resetAxes: true });
    156                     });
    157                 },
    158                 error: function (jqXHR, textStatus, errorThrown) {
    159                     alert(textStatus);
    160                     alert(errorThrown);
    161                 }
    162             });
    163         });
    164     } catch (e) {
    165     }
     280    } catch (e) {
     281    }
     282
     283    injectMatrixGraph();
     284    injectDatatableAnalyzer();
     285    //injectTableModifiers();
    166286}
    167287);
Note: See TracChangeset for help on using the changeset viewer.