Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/14/16 17:08:33 (9 years ago)
Author:
jlodewyc
Message:

#2582 Recursive views for Experiments and batch runs. Distribute child tasks start

Location:
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRun.cshtml

    r13689 r13696  
    11@model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel
    2 
     2@{System.Random randomizer = new Random();
     3    int randy = randomizer.Next(2000); }
    34<div style="margin-left:20px;margin-right:20px">
    45    <div class="row" style="text-align:center">
     
    89        <h1 data-toggle="tooltip" title="@Model.SelectedTask.ItemTask.ItemName
    910            @Model.SelectedTask.ItemTask.Description ">
    10             <span class="label label-primary">Batch Run: @Model.SelectedTask.ItemTask.Name</span>
     11            <span class="label label-warning ">Batch: @Model.SelectedBatchRun.Name</span>
    1112        </h1>
    1213        <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
     
    2223        </div>
    2324    </div>
     25    <h4>
     26        Repeats: @Model.SelectedBatchRun.Repetitions x
     27        <label>
     28            <input type="checkbox" checked data-toggle="toggle" data-onstyle="warning"
     29                   onchange="toggleChild([], @randy)" />
     30            Distribute child tasks
     31        </label>
     32    </h4>
     33    <div id="childs@(randy)">
     34        @for (var k = 0; k < Model.SelectedBatchRun.Repetitions; k++)
     35        {
     36            @if (Model.SelectedBatchRun.Optimizer is HeuristicLab.Optimization.IAlgorithm)
     37            {
     38                @Html.Partial("OpenFilePartials/_AlgorithmSmall",
     39                new HeuristicLab.Clients.Hive.WebJobManager.Models.AlgorithmContainer(
     40                    ((HeuristicLab.Optimization.IAlgorithm)Model.SelectedBatchRun.Optimizer),
     41                    randomizer));
     42
     43            }
     44            else if (Model.SelectedBatchRun.Optimizer is HeuristicLab.Optimization.BatchRun)
     45            {
     46                @Html.Partial("OpenFilePartials/_BatchRunSmall",
     47                new HeuristicLab.Clients.Hive.WebJobManager.Models.BatchRunContainer(
     48                    ((HeuristicLab.Optimization.BatchRun)Model.SelectedBatchRun.Optimizer),
     49                    new List<int[]>(),
     50                    new int[] { 0, k },
     51                    randomizer));
     52
     53            }
     54            else if (Model.SelectedBatchRun.Optimizer is HeuristicLab.Optimization.Experiment)
     55            {
     56                @Html.Partial("OpenFilePartials/_ExperimentSmall",
     57                new HeuristicLab.Clients.Hive.WebJobManager.Models.ExperimentContainer(
     58                    ((HeuristicLab.Optimization.Experiment)Model.SelectedBatchRun.Optimizer),
     59                    new List<int[]>(),
     60                    new int[] { 0, k },
     61                    randomizer));
     62
     63            }
     64        }
     65    </div>
    2466
    2567    <script type="text/javascript">
    26         function addtoHive() {
    27             document.getElementById("fakehiveadd").style.display = "none";
    28             document.getElementById("progdiv").style.display = "";
    29             document.getElementById("result").style.display = "";
    30             document.getElementById("realhiveadd").click();
    3168
    32         }
    33         function setProb() {
    34             resetAll();
    35             document.getElementById("problem").style.display = "";
    36             document.getElementById("btnprob").className += " active";
    37 
    38         }
    39         function setAlgo() {
    40             resetAll();
    41             document.getElementById("algorithm").style.display = "";
    42             document.getElementById("btnalg").className += " active";
    43         }
    44         function setResults() {
    45             resetAll();
    46             document.getElementById("results").style.display = "";
    47             document.getElementById("btnresults").className += " active";
    48         }
    49         function setRuns() {
    50             resetAll();
    51             document.getElementById("runs").style.display = "";
    52             document.getElementById("btnruns").className += " active";
    53         }
    54         function setEngine() {
    55             resetAll();
    56             document.getElementById("engine").style.display = "";
    57             document.getElementById("btnengine").className += " active";
    58         }
    59         function resetAll() {
    60             document.getElementById("problem").style.display = "none";
    61             document.getElementById("algorithm").style.display = "none";
    62             document.getElementById("results").style.display = "none";
    63             document.getElementById("runs").style.display = "none";
    64             document.getElementById("engine").style.display = "none";
    65             document.getElementById("btnprob").className = document.getElementById("btnprob").className.replace(/(?:^|\s)active(?!\S)/g, '');
    66             document.getElementById("btnalg").className = document.getElementById("btnalg").className.replace(/(?:^|\s)active(?!\S)/g, '');
    67             document.getElementById("btnresults").className = document.getElementById("btnresults").className.replace(/(?:^|\s)active(?!\S)/g, '');
    68             document.getElementById("btnruns").className = document.getElementById("btnruns").className.replace(/(?:^|\s)active(?!\S)/g, '');
    69             document.getElementById("btnengine").className = document.getElementById("btnengine").className.replace(/(?:^|\s)active(?!\S)/g, '');
    70         }
    7169        $(document).ready(function () {
    7270            $('[data-toggle="tooltip"]').tooltip();
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Experiment.cshtml

    r13689 r13696  
    11@model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel
    2 
     2@{System.Random randomizer = new Random(); }
    33<div style="margin-left:20px;margin-right:20px">
    44    <div class="row" style="text-align:center">
     
    88        <h1 data-toggle="tooltip" title=" @Model.SelectedTask.ItemTask.ItemName
    99            @Model.SelectedTask.ItemTask.Description ">
    10             <span class="label label-primary">Experiment: @Model.SelectedTask.ItemTask.Name</span>
     10            <span class="label label-danger">Experiment: @Model.SelectedTask.ItemTask.Name</span>
    1111        </h1>
    1212        <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
     
    1818                 id="progress"
    1919                 aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%">
    20                
     20
    2121            </div>
    2222        </div>
    2323    </div>
     24    <h4>
     25        Children: @Model.SelectedExperiment.Optimizers.Count
     26    </h4>
     27    @for (var i = 0; i < Model.SelectedExperiment.Optimizers.Count; i++)
     28    {
     29        @if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.IAlgorithm)
     30        {
     31            @Html.Partial("OpenFilePartials/_AlgorithmSmall",
     32new HeuristicLab.Clients.Hive.WebJobManager.Models.AlgorithmContainer(
     33 ((HeuristicLab.Optimization.IAlgorithm)Model.SelectedExperiment.Optimizers[i]),
     34 randomizer));
     35
     36        }
     37        else if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.BatchRun)
     38        {
     39            @Html.Partial("OpenFilePartials/_BatchRunSmall",
     40new HeuristicLab.Clients.Hive.WebJobManager.Models.BatchRunContainer(
     41    ((HeuristicLab.Optimization.BatchRun)Model.SelectedExperiment.Optimizers[i]),
     42    new List<int[]>(),
     43    new int[] { i, 0 },
     44    randomizer)) ;
     45
     46        }
     47        else if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.Experiment)
     48        {
     49            @Html.Partial("OpenFilePartials/_ExperimentSmall",
     50new HeuristicLab.Clients.Hive.WebJobManager.Models.ExperimentContainer(
     51    ((HeuristicLab.Optimization.Experiment)Model.SelectedExperiment.Optimizers[i]),
     52    new List<int[]>(),
     53    new int[] { i, 0 },
     54           randomizer)) ;
     55
     56        }
     57
     58    }
    2459
    2560    <script type="text/javascript">
    26        
    27         function setProb() {
    28             resetAll();
    29             document.getElementById("problem").style.display = "";
    30             document.getElementById("btnprob").className += " active";
    3161
    32         }
    33         function setAlgo() {
    34             resetAll();
    35             document.getElementById("algorithm").style.display = "";
    36             document.getElementById("btnalg").className += " active";
    37         }
    38         function setResults() {
    39             resetAll();
    40             document.getElementById("results").style.display = "";
    41             document.getElementById("btnresults").className += " active";
    42         }
    43         function setRuns() {
    44             resetAll();
    45             document.getElementById("runs").style.display = "";
    46             document.getElementById("btnruns").className += " active";
    47         }
    48         function setEngine() {
    49             resetAll();
    50             document.getElementById("engine").style.display = "";
    51             document.getElementById("btnengine").className += " active";
    52         }
    53         function resetAll() {
    54             document.getElementById("problem").style.display = "none";
    55             document.getElementById("algorithm").style.display = "none";
    56             document.getElementById("results").style.display = "none";
    57             document.getElementById("runs").style.display = "none";
    58             document.getElementById("engine").style.display = "none";
    59             document.getElementById("btnprob").className = document.getElementById("btnprob").className.replace(/(?:^|\s)active(?!\S)/g, '');
    60             document.getElementById("btnalg").className = document.getElementById("btnalg").className.replace(/(?:^|\s)active(?!\S)/g, '');
    61             document.getElementById("btnresults").className = document.getElementById("btnresults").className.replace(/(?:^|\s)active(?!\S)/g, '');
    62             document.getElementById("btnruns").className = document.getElementById("btnruns").className.replace(/(?:^|\s)active(?!\S)/g, '');
    63             document.getElementById("btnengine").className = document.getElementById("btnengine").className.replace(/(?:^|\s)active(?!\S)/g, '');
    64         }
    6562        $(document).ready(function () {
    6663            $('[data-toggle="tooltip"]').tooltip();
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Shared/_Layout.cshtml

    r13689 r13696  
    1111        <link href="~/css/min/site.min.css" rel="stylesheet" />
    1212    </environment>
     13    <link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet">
     14   
    1315</head>
    1416<body>
     
    2325        <script src="~/js/jquery-2.1.1.js"></script>
    2426        <script src="~/js/bootstrap.js"></script>
    25      
     27        <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.0/js/bootstrap-toggle.min.js"></script>
    2628        <script src="~/js/jquery.signalr-2.1.2.js"></script>
    2729        <script src='~/signalr/js'></script>
Note: See TracChangeset for help on using the changeset viewer.