war/src/main/webapp/scripts/hudson-behavior.js
// by using the contents fetched from the given URL.
by using the contents fetched from the given URL.
by using the contents fetched from the given URL .
function refreshPart(id,url) {
    var intervalID = null;
    var f = function() {
        if(isPageVisible()) {
            new Ajax.Request(url, {
                onSuccess: function(rsp) {
                    var hist = $(id);
                    if (hist == null) {
                        console.log("There's no element that has ID of " + id);
                        if (intervalID !== null)
                            window.clearInterval(intervalID);
                        return;
                    }
                    var p = hist.up();
                    var div = document.createElement('div');
                    div.innerHTML = rsp.responseText;
                    var node = $(div).firstDescendant();
                    p.replaceChild(node, hist);
                    Behaviour.applySubtree(node);
                    layoutUpdateCallback.call();
                }
            });
        }
    };
    if(isRunAsTest) f();
    else intervalID = window.setInterval(f, 5000);
}
function refreshPart ( id , url ) { var intervalID = null ; var f = function ( ) { if ( isPageVisible ( ) ) { new Ajax . Request ( url , { onSuccess : function ( rsp ) { var hist = $ ( id ) ; if ( hist == null ) { console . log ( "There's no element that has ID of " + id ) ; if ( intervalID !== null ) window . clearInterval ( intervalID ) ; return ; } var p = hist . up ( ) ; var div = document . createElement ( 'div' ) ; div . innerHTML = rsp . responseText ; var node = $ ( div ) . firstDescendant ( ) ; p . replaceChild ( node , hist ) ; Behaviour . applySubtree ( node ) ; layoutUpdateCallback . call ( ) ; } } ) ; } } ; if ( isRunAsTest ) f ( ) ; else intervalID = window . setInterval ( f , 5000 ) ; }
by using the contents fetched from the given URL.
by using the contents fetched from the given URL .
// if run as test, just do it once and do it now to make sure it's working, // but don't repeat.