All Downloads are FREE. Search and download functionalities are using the official Maven repository.

playground.server.pages.js.circuitbreaker.js Maven / Gradle / Ivy

Go to download

Middleware library based on Vert.x to build advanced JSON/REST communication servers

There is a newer version: 2.1.15
Show newest version
$(function(){
    var baseURL = "";

    $("#getAllBtn").click(getAllCircuits);
    $("#closeAllBtn").click(closeAllCircuits);

    getAllCircuits();

    function showError(message){
        $("#circuitsErrorLabel").show();
        $("#circuitsErrorLabel").html(message);
    }

    function hideError(){
        $("#circuitsErrorLabel").hide();
    }

    function getAllCircuits(){
        hideError();
        $("#circuitsTable > tbody").html("");

        $.ajax({url: baseURL+"/playground/server/queuecircuitbreaker/circuit/", dataType:"json"}).done(function(data) {
            if (data) {
                $.each(data, function(circuitHash, circuit) {
                    var $tableRow = $('')
                        .data("circuitHash", circuitHash)
                        .appendTo($('table#circuitsTable #circuitsTableBody'))
                        .append($('').text(circuit.infos.circuit))
                        .append($('').html(buildStatusLabel(circuit.status)))
                        .append($('').text(circuit.infos.failRatio));

                    if(circuit.status != 'closed'){
                        $tableRow.append($('')
                            .append($('




© 2015 - 2025 Weber Informatics LLC | Privacy Policy