in use-cases/call-center/src/main/resources/META-INF/resources/app.js [269:303]
$(document).ready(function () {
$('#solveButton').click(solve);
$('#stopSolvingButton').click(function () {
stopSolving();
});
const callFrequencyRange = $('#callFrequencyRange');
const callFrequencyValue = $('#callFrequencyValue');
const callLengthRange = $('#callLengthRange');
const callLengthValue = $('#callLengthValue');
callFrequencyRange.on('change', function () {
callFrequencyValue.html(callFrequencyRange.val());
restartSimulation(callFrequencyRange.val(), callLengthRange.val());
});
callFrequencyRange.on('input', function () {
callFrequencyValue.html(callFrequencyRange.val());
});
callFrequencyValue.html(callFrequencyRange.val());
callLengthRange.on('change', function () {
callLengthValue.html(callLengthRange.val());
restartSimulation(callFrequencyRange.val(), callLengthRange.val());
});
callLengthRange.on('input', function () {
callLengthValue.html(callLengthRange.val());
});
callLengthValue.html(callLengthRange.val());
// Make sure the values are propagated to the server.
restartSimulation(callFrequencyRange.val(), callLengthRange.val());
refresh();
});