Skip to content

Commit

Permalink
Moving variables around
Browse files Browse the repository at this point in the history
  • Loading branch information
york-stsci committed Aug 28, 2024
1 parent 4bcf351 commit c75465e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions jwql/website/apps/jwql/templates/log_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ <h4>Select JWQL Monitoring Log</h4>
<input id="log_level" type="text" list="log_filters" placeholder="Log Level" class="form-control">
<datalist id="log_levels">
<option id="all_logs" value="All Logs"></option>
<option id="info_logs" value="Info or higher"></option>
<option id="warning_logs" value="Warning or higher"></option>
<option id="error_logs" value="Error or higher"></option>
<option id="critical_logs" value="Critical or higher"></option>
<option id="INFO" value="Info or higher"></option>
<option id="WARNING" value="Warning or higher"></option>
<option id="ERROR" value="Error or higher"></option>
<option id="CRITICAL" value="Critical"></option>
</datalist>
</div>

Expand Down Expand Up @@ -83,15 +83,16 @@ <h4> {{ log_name|safe }} </h4><hr>

<script type="text/javascript">
var allLogFiles = {{ all_logs['all']|safe }};
var listOfFolders = document.getElementById("log_folders");
var logFoldersList = document.getElementById("log_folders");
var listOfLogNamesByFolder = {{ all_logs['all']|safe }};
var logsByFolder = {{ all_logs['log_folders']|safe }};
var listOfDates = document.getElementById("log_dates");
var logDatesList = document.getElementById("log_dates");
var listOfLogNamesByDate = {{ all_logs['all']|safe }};
var logsByDate = {{ all_logs['log_dates']|safe }};
var listOfLevels = document.getElementById("log_levels");
var logLevelsList = document.getElementById('log_levels');
var listOfLogNamesByLevel = {{ all_logs['all']|safe }};
var logsByLevel = {{ all_logs['log_levels']|safe }};
var logsList = document.getElementById("logs");

function GetSelectedTextValue() {
var log_value = document.getElementById("log_select").value;
Expand Down Expand Up @@ -119,7 +120,6 @@ <h4> {{ log_name|safe }} </h4><hr>
}

const idInputField = document.getElementById('log_select');
var logsList = document.getElementById("logs");
idInputField.addEventListener('input', function () {
if (logsList.options.namedItem(this.value) !== null) {
document.getElementById("log_submit").disabled = false;
Expand All @@ -129,7 +129,6 @@ <h4> {{ log_name|safe }} </h4><hr>
});

const folderInputField = document.getElementById('log_folder');
var logFoldersList = document.getElementById("log_folders");
folderInputField.addEventListener('input', function () {
var currentFolder = logFoldersList.options.namedItem(this.value).value;
console.log("Current folder is "+currentFolder);
Expand All @@ -143,7 +142,6 @@ <h4> {{ log_name|safe }} </h4><hr>
});

const dateInputField = document.getElementById('log_date');
var logDatesList = document.getElementById("log_dates");
dateInputField.addEventListener('input', function () {
var currentDate = logDatesList.options.namedItem(this.value).value;
console.log("Current date is "+currentDate);
Expand All @@ -157,7 +155,6 @@ <h4> {{ log_name|safe }} </h4><hr>
});

const levelInputField = document.getElementById('log_level');
var logLevelsList = document.getElementById('log_levels');
levelInputField.addEventListener('input', function () {
var currentLevel = logLevelsList.options.namedItem(this.value).value;
console.log("Current level is "+currentLevel);
Expand Down

0 comments on commit c75465e

Please sign in to comment.