Skip to content

Commit

Permalink
add http report when game mode is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-sideburn committed Aug 12, 2024
1 parent e6df6d6 commit 8030665
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</div>
<div class="modal-footer">
<button type="button" id="savePresetButton" class="btn btn-light" onclick="saveChaosReport()">Save</button>
<button type="button" id="closeButton4" class="btn btn-dark" data-dismiss="modal" onclick="closePrepareChaosReportModalAndUncheck()">Close</button>
<button type="button" id="closeButtonReport" class="btn btn-dark" data-dismiss="modal" onclick="closePrepareChaosReportModalAndUncheck()">Close</button>
</div>
</form>
</div>
Expand Down Expand Up @@ -357,7 +357,7 @@ <h2 class="accordion-header" id="guide-headingThree">
</div>
<div class="row" style="margin-bottom: 2%;">
<div class="col text-center" style="margin-bottom: 0%;">
<input class="form-check-input" type="checkbox" value="" id="flagChaosReport" onclick="showPrepareChaosReportModal(this)">
<input class="form-check-input" type="checkbox" value="" id="flagChaosReport" onclick="wrapShowPrepareChaosReportModal(this)">
<label class="form-check-label text-kinv" for="flexCheckDefault">
Add HTTP check & Chaos Report
</label>
Expand Down
6 changes: 6 additions & 0 deletions html5/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function closeSetLoadTestModal() {
setModalState(false);
}

function wrapShowPrepareChaosReportModal(checkbox) {
let close_button = document.getElementById("closeButtonReport");
close_button.innerHTML = "Close";
showPrepareChaosReportModal(checkbox)
}

function showPrepareChaosReportModal(checkbox) {
if(checkbox.checked){
$('#prepareChaosReportModal').modal('show');
Expand Down
8 changes: 8 additions & 0 deletions html5/mode_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ function startGameMode() {
chaos_program_screen.style.display = "none";
programming_mode_buttons.style.display = "none";
resizeCharts();

/* TO DO: DO BETTER :D */
let checkbox = {
checked: true,
};
let close_button = document.getElementById("closeButtonReport");
close_button.innerHTML = "Skip";
showPrepareChaosReportModal(checkbox);
}

function startProgrammingMode() {
Expand Down

0 comments on commit 8030665

Please sign in to comment.