Skip to content

Commit

Permalink
Fixing linting
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-uk committed Oct 18, 2024
1 parent 20dfa8f commit f66b48c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
17 changes: 6 additions & 11 deletions frontend/views/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
<h1 class="modal-title fs-5" id="importModalLabel">Confirm Import</h1>
</div>
<div class="modal-body">
<p>Importing monitors will replace all existing configuration and monitors! Are you sure you want to continue?
</p>
<p>Importing monitors will replace all existing configuration and monitors! Are you sure you want to continue?</p>
</div>
<div class="modal-footer">
<button class="btn btn-info wider" @click="$refs.importBtn.value = null; $refs.importBtn.click();"
data-bs-dismiss="modal">
<button class="btn btn-info wider" @click="$refs.importBtn.value = null; $refs.importBtn.click();" data-bs-dismiss="modal">
Import JSON
</button>
<button type="button" class="btn btn-secondary wider" data-bs-dismiss="modal">Yikes no!</button>
Expand Down Expand Up @@ -57,9 +55,7 @@ <h1 class="modal-title fs-5" id="nukeResultsModalLabel">Confirm Results Wipe</h1
<div class="card-header fs-3 bg-info text-light"><i class="fas fa-wrench fa-fw"></i> Data Import & Export</div>
<div class="card-body">
<h3>Import & Export</h3>
<button class="btn btn-success btn-larger mb-3 wide-button" @click="exportMonitors">
<i class="fas fa-download fa-fw"></i> EXPORT CONFIG
</button>
<button class="btn btn-success btn-larger mb-3 wide-button" @click="exportMonitors"><i class="fas fa-download fa-fw"></i> EXPORT CONFIG</button>

<form>
<!-- Hidden form and button for file picking -->
Expand All @@ -75,13 +71,12 @@ <h3 class="mt-3">Data Removal</h3>
<i class="fas fa-bomb fa-fw"></i> DELETE CONFIG
</button>

<br>
<button class="btn btn-danger btn-larger mb-3 wide-button" data-bs-toggle="modal"
data-bs-target="#nukeResultsModal">
<br />
<button class="btn btn-danger btn-larger mb-3 wide-button" data-bs-toggle="modal" data-bs-target="#nukeResultsModal">
<i class="fas fa-trash-can fa-fw"></i> DELETE RESULTS
</button>

<div class="alert alert-success" role="alert" x-show="message" x-text="message"></div>
<div class="alert alert-danger" role="alert" x-show="error" x-text="error"></div>
</div>
</div>
</div>
27 changes: 13 additions & 14 deletions frontend/views/monitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
<p>Are you sure you want to delete this monitor?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success wider" @click="deleteMonitor" data-bs-dismiss="modal">Sure
thing!</button>
<button type="button" class="btn btn-success wider" @click="deleteMonitor" data-bs-dismiss="modal">Sure thing!</button>
<button type="button" class="btn btn-secondary wider" data-bs-dismiss="modal">Yikes no!</button>
</div>
</div>
Expand All @@ -22,11 +21,9 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
<div class="card shadow mb-4">
<div class="card-header fs-3 d-flex justify-content-between" :class="status?.class || 'bg-secondary'">
<div x-html="`${icon} ${monitor.name}`"></div>
<button class="btn btn-light btn-sm" @click="loadMonitor(monitor.id)"><i class="fas fa-refresh fa-fw"></i>
REFRESH</button>
<button class="btn btn-light btn-sm" @click="loadMonitor(monitor.id)"><i class="fas fa-refresh fa-fw"></i> REFRESH</button>
</div>
<div class="card-body">

<table class="table-sm">
<tbody>
<tr>
Expand Down Expand Up @@ -54,9 +51,7 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
</tr>
<tr>
<td>Enabled:</td>
<td
x-html="monitor.enabled ? `<i class='fa fa-check-circle text-success'>` : `<i class='fa fa-circle-xmark text-danger'>`">
</td>
<td x-html="monitor.enabled ? `<i class='fa fa-check-circle text-success'>` : `<i class='fa fa-circle-xmark text-danger'>`"></td>
</tr>
<tr x-show="monitor.rule">
<td>Rule(s):</td>
Expand All @@ -80,7 +75,7 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
</tr>
<template x-for="[key, value] of Object.entries(results[0]?.outputs || {})">
<tr>
<td x-text="`${key}:`">
<td x-text="`${key}:`"></td>
<td x-html="value"></td>
</tr>
</template>
Expand Down Expand Up @@ -109,8 +104,7 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
<div x-show="userAccount">
<hr />
<a class="btn btn-info wide" :href="`#edit/${monitor.id}`"><i class="fas fa-edit fa-fw"></i> MODIFY</a>
<button class="btn btn-warning wide" data-bs-toggle="modal" data-bs-target="#deleteModal"><i
class="fas fa-trash fa-fw"></i> DELETE</button>
<button class="btn btn-warning wide" data-bs-toggle="modal" data-bs-target="#deleteModal"><i class="fas fa-trash fa-fw"></i> DELETE</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -140,8 +134,13 @@ <h1 class="modal-title fs-5" id="deleteModalLabel">Confirm Deletion</h1>
<td x-text="r.value" :class="r.statusDetails.class"></td>
<td x-text="r.message" :class="`${r.statusDetails.class} smallfont`"></td>
<td :class="r.statusDetails.class">
<button x-show="r.outputs" class="btn btn-sm btn-secondary" @click="output = r.outputs"
data-bs-toggle="modal" data-bs-target="#outModalMonitor">
<button
x-show="r.outputs"
class="btn btn-sm btn-secondary"
@click="output = r.outputs"
data-bs-toggle="modal"
data-bs-target="#outModalMonitor"
>
More
</button>
</td>
Expand Down Expand Up @@ -178,4 +177,4 @@ <h1 class="modal-title fs-5" id="outputModalLabelMon">Output Details</h1>
</div>
</div>
</div>
</div>
</div>

0 comments on commit f66b48c

Please sign in to comment.