function printEventStateTimeoutsRow()

in serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/META-INF/resources/app.js [135:154]


function printEventStateTimeoutsRow(tableBody, instance) {
    const tableRow = $('<tr class="d-flex">').appendTo(tableBody);
    tableRow.append($(`<th scope="row" class="col-4">${instance.id}</th>`));

    const sendEvent1Btn = $(`<button id="sendEvent1Btn_${instance.id}" type="button" class="btn btn-primary btn-sm">Send event1</button>`);
    const sendEvent1ButtonTd = $(`<td class="col-2"></td>`);
    sendEvent1ButtonTd.append(sendEvent1Btn);
    tableRow.append(sendEvent1ButtonTd);
    sendEvent1Btn.click(function () {
        sendEvent1(instance.id);
    });

    const sendEvent2Btn = $(`<button id="sendEvent2Btn_${instance.id}" type="button" class="btn btn-primary btn-sm">Send event2</button>`);
    const sendEvent2ButtonTd = $(`<td class="col-2"></td>`);
    sendEvent2ButtonTd.append(sendEvent2Btn);
    tableRow.append(sendEvent2ButtonTd);
    sendEvent2Btn.click(function () {
        sendEvent2(instance.id);
    });
}