Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/progresshubber.js @ 13841

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

#2582 More parameter datatypes, splitting fileopening service, approving users, reopen last file, change name tasks and repetitions

File size: 2.7 KB
Line 
1function addtoHive(){var a=document.getElementById("jname").value,b=document.getElementById("jresource").value;a&&""!=a&&null!=a?(hubber.server.changeNameResource(a,b),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!")}function toggleChild(a,b){console.log(a+" toggled"),hubber.server.toggleChild(a),"none"==$("#childs"+b).css("display")?$("#childs"+b).css("display",""):$("#childs"+b).css("display","none"),$("body").click()}function changePriority(a,b,c){switch(hubber.server.changePriority(a,b),resetPrior(c),b){case 0:document.getElementById("prior"+c).className+="btn-default",document.getElementById("prior"+c).innerHTML="Low";break;case 1:document.getElementById("prior"+c).className+="btn-info",document.getElementById("prior"+c).innerHTML="Normal";break;case 2:document.getElementById("prior"+c).className+="btn-warning",document.getElementById("prior"+c).innerHTML="Urgent";break;case 3:document.getElementById("prior"+c).className+="btn-danger",document.getElementById("prior"+c).innerHTML="Critical"}document.getElementById("prior"+c).innerHTML+="<span class='caret'></span>"}function resetPrior(a){document.getElementById("prior"+a).className="btn dropdown-toggle "}function changeName(a,b,c){hubber.server.changeName(a,b,c)}function changeRepit(a,b){hubber.server.changeRepit(a,b)}function paraEdit(a,b,c,d,e){hubber.server.paraEdit(a,b,c,d,e)}var hubber=$.connection.progressHub;$(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))},hubber.client.processName=function(a,b){$("#nameCarrier"+b).html(a)},hubber.client.processRepit=function(a,b){"failed"===a?window.alert("Something went wrong while changing the repititions, please try again"):window.alert("Repititions for "+a+" has been changed to "+b+". These changes are not shown in the interface but happen directly after uploading or saving.")},hubber.client.dataNotSupported=function(a){window.alert("Parameter "+a+" could not be changed for it is a fixed parameter. All changes done in this view are not saved to Hive.")},hubber.client.formatWrong=function(a,b){window.alert("Parameter "+a+" could not be changed, the format for "+b+" was wrong. Make sure you follow the example exactly. No changes made on Hive")}});
Note: See TracBrowser for help on using the repository browser.