function load_and_set_ir_fields() {
    var myURL = get_workflow_url(USERINPUT.user_input_url, USERINPUT.account_id);
    $.blockUI();
    var jqhxhr = $.ajax({
        type : "get",
        url : myURL,
        timeout: 12000,//in milliseconds
        success: function(data){
            if (typeof data["sampleRelationshipsTableInfo"] == 'undefined') {
                // failed to retrieve info
                $("#loading").hide();
                USERINPUT.is_ir_connected = false;
                $("#error").text("Cannot contact Ion Reporter Server!");
                $("input[name=irDown]").val('1');
                return;
            } else {
                USERINPUT.is_ir_connected = true;
            }
            $("#error").text("");
            $("input[name=irDown]").val('0');
            // parse data and fill in USERINPUT fields
            populate_userinput_from_response(data);
            // set application type hidden input from selected workflow
            var default_workflow = getWorkflowObj(USERINPUT.workflow, USERINPUT.tag_isFactoryProvidedWorkflow);
            if (default_workflow)
                $("input[name=applicationType]").val(default_workflow.ApplicationType);
            // make sure existing selections are valid
            check_selected_values();
            hide_summary_view();
            $("#loading").hide();
        },
        error: function(jqXHR, textStatus, errorThrown){
            if(textStatus==="timeout") {
                //The API Server timedout
                $("#loading").hide();
                $("#error").text('The IR Server connection has timed out');
                $("input[name=irDown]").val('1');
                return;
            } else {
                console.log("iru_get_user_input - textStatus=", textStatus);
            }
        }
    });
}
/**
 Main function to call IRU and process the response
**/
Main function to call IRU and process the response
Main function to call IRU and process the response
function load_and_set_ir_fields() {
    var myURL = get_workflow_url(USERINPUT.user_input_url, USERINPUT.account_id);
    $.blockUI();
    var jqhxhr = $.ajax({
        type : "get",
        url : myURL,
        timeout: 12000,
        success: function(data){
            if (typeof data["sampleRelationshipsTableInfo"] == 'undefined') {
                $("#loading").hide();
                USERINPUT.is_ir_connected = false;
                $("#error").text("Cannot contact Ion Reporter Server!");
                $("input[name=irDown]").val('1');
                return;
            } else {
                USERINPUT.is_ir_connected = true;
            }
            $("#error").text("");
            $("input[name=irDown]").val('0');
            populate_userinput_from_response(data);
            var default_workflow = getWorkflowObj(USERINPUT.workflow, USERINPUT.tag_isFactoryProvidedWorkflow);
            if (default_workflow)
                $("input[name=applicationType]").val(default_workflow.ApplicationType);
            check_selected_values();
            hide_summary_view();
            $("#loading").hide();
        },
        error: function(jqXHR, textStatus, errorThrown){
            if(textStatus==="timeout") {
                $("#loading").hide();
                $("#error").text('The IR Server connection has timed out');
                $("input[name=irDown]").val('1');
                return;
            } else {
                console.log("iru_get_user_input - textStatus=", textStatus);
            }
        }
    });
}
function load_and_set_ir_fields ( ) { var myURL = get_workflow_url ( USERINPUT . user_input_url , USERINPUT . account_id ) ; $ . blockUI ( ) ; var jqhxhr = $ . ajax ( { type : "get" , url : myURL , timeout : 12000 , success : function ( data ) { if ( typeof data [ "sampleRelationshipsTableInfo" ] == 'undefined' ) { $ ( "#loading" ) . hide ( ) ; USERINPUT . is_ir_connected = false ; $ ( "#error" ) . text ( "Cannot contact Ion Reporter Server!" ) ; $ ( "input[name=irDown]" ) . val ( '1' ) ; return ; } else { USERINPUT . is_ir_connected = true ; } $ ( "#error" ) . text ( "" ) ; $ ( "input[name=irDown]" ) . val ( '0' ) ; populate_userinput_from_response ( data ) ; var default_workflow = getWorkflowObj ( USERINPUT . workflow , USERINPUT . tag_isFactoryProvidedWorkflow ) ; if ( default_workflow ) $ ( "input[name=applicationType]" ) . val ( default_workflow . ApplicationType ) ; check_selected_values ( ) ; hide_summary_view ( ) ; $ ( "#loading" ) . hide ( ) ; } , error : function ( jqXHR , textStatus , errorThrown ) { if ( textStatus === "timeout" ) { $ ( "#loading" ) . hide ( ) ; $ ( "#error" ) . text ( 'The IR Server connection has timed out' ) ; $ ( "input[name=irDown]" ) . val ( '1' ) ; return ; } else { console . log ( "iru_get_user_input - textStatus=" , textStatus ) ; } } } ) ; }
Main function to call IRU and process the response
Main function to call IRU and process the response
//in milliseconds // failed to retrieve info // parse data and fill in USERINPUT fields // set application type hidden input from selected workflow // make sure existing selections are valid //The API Server timedout