Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2582 Job Manager done. Start user management

File size: 2.1 KB
Line 
1var hubber = $.connection.progressHub;
2$(function () { var a = document.getElementById("userId").innerHTML; console.log(a); $.connection.hub.qs = { userid: a }; $.connection.hub.start().done(function () { $("#progress").css("width", "0%"); $("#progress").attr("aria-valuenow", 0); hubber.server.handleMessage("Looking for connection...") }); hubber.client.processMessage = function (a, b) { b > $("#progress").attr("aria-valuenow") && ($("#progress").css("width", b + "%"), $("#progress").attr("aria-valuenow", b), $("#progress").html(b + "%"), $("#result").html(a)) } });
3function addtoHive() { var a = document.getElementById("jname").value, c = document.getElementById("jresource").value; a && "" != a && null != a ? (hubber.server.changeNameResource(a, c), document.getElementById("fakehiveadd").style.display = "none", document.getElementById("progdiv").style.display = "", document.getElementById("result").style.display = "", document.getElementById("realhiveadd").click()) : alert("Job name not set!") }
4function toggleChild(a, c) { console.log(a + " toggled"); hubber.server.toggleChild(a); "none" == $("#childs" + c).css("display") ? $("#childs" + c).css("display", "") : $("#childs" + c).css("display", "none"); $("body").click() }
5function changePriority(a, c, b) {
6    console.log(a + " to priority " + c); hubber.server.changePriority(a, c); resetPrior(b); switch (c) {
7        case 0: document.getElementById("prior" + b).className += "btn-default"; document.getElementById("prior" + b).innerHTML = "Low"; break; case 1: document.getElementById("prior" + b).className += "btn-info"; document.getElementById("prior" + b).innerHTML = "Normal"; break; case 2: document.getElementById("prior" + b).className += "btn-warning"; document.getElementById("prior" + b).innerHTML = "Urgent"; break; case 3: document.getElementById("prior" +
8        b).className += "btn-danger", document.getElementById("prior" + b).innerHTML = "Critical"
9    } document.getElementById("prior" + b).innerHTML += "<span class='caret'></span>"
10} function resetPrior(a) { document.getElementById("prior" + a).className = "btn dropdown-toggle " };
Note: See TracBrowser for help on using the repository browser.