Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/hubber.js @ 13696

Last change on this file since 13696 was 13696, checked in by jlodewyc, 8 years ago

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

File size: 1.7 KB
Line 
1var hubber = $.connection.progressHub;
2
3$(function () {
4    $.connection.hub.logging = true;
5    $.connection.hub.start().done(function () {
6        $("#progress").css("width", 0 + '%');
7        $('#progress').attr('aria-valuenow', 0);
8        hubber.server.handleMessage("Looking for connection...");
9
10    });
11    hubber.client.processMessage = function (message, value) {
12        /* if(value > 0){
13             $("#progress").css("width", value + '%');
14             $('#progress').attr('aria-valuenow', value);
15         }
16         else {
17             var v = $('#progress').attr('aria-valuenow') + (-value);
18             $("#progress").css("width", v + '%');
19             $('#progress').attr('aria-valuenow', v);
20         }*/
21        if (value > $('#progress').attr('aria-valuenow')) {
22            $("#progress").css("width", value + '%');
23            $('#progress').attr('aria-valuenow', value);
24            $("#progress").html(value + '%');
25            $("#result").html(message);
26        }
27    };
28});
29
30function addtoHive() {
31
32    var jobname = prompt("Please enter a job name", "Job");
33    if (jobname != "") {
34        hubber.server.changeName(jobname);
35        document.getElementById("fakehiveadd").style.display = "none";
36        document.getElementById("progdiv").style.display = "";
37        document.getElementById("result").style.display = "";
38        document.getElementById("realhiveadd").click();
39    }
40}
41function toggleChild(arr, idchilds) {
42    console.log(arr);
43    hubber.server.toggleChild(arr);
44    if ($("#childs" + idchilds).css("display") == "none")
45        $("#childs" + idchilds).css("display", "");
46    else
47        $("#childs" + idchilds).css("display", "none");
48}
Note: See TracBrowser for help on using the repository browser.