Skip to content

Commit

Permalink
Web Dashboard: contribution status selector for READING_DATA and LOAD…
Browse files Browse the repository at this point in the history
…ING_MYSQL
  • Loading branch information
iagaponenko committed Sep 6, 2024
1 parent 3876a9f commit 039030f
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions src/www/qserv/js/IngestContributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,27 +123,28 @@ function(CSSLoader,
<option value="1">ASYNC</option>
</select>
</div>
<div class="form-group col-md-1">
<div class="form-group col-md-2">
<label for="contrib-status">Status:</label>
<select id="contrib-status" class="form-control filter">
<option value="" selected></option>
<option value="IN_PROGRESS">IN_PROGRESS</option>
<option value=""></option>
<option value="IN_PROGRESS" selected>IN_PROGRESS</option>
<option value="CREATE_FAILED">CREATE_FAILED</option>
<option value="START_FAILED">START_FAILED</option>
<option value="READ_FAILED">READ_FAILED</option>
<option value="LOAD_FAILED">LOAD_FAILED</option>
<option value="CANCELLED">CANCELLED</option>
<option value="FINISHED">FINISHED</option>
<option value="!FINISHED">! FINISHED</option>
<option value="!FINISHED">!&nbsp;FINISHED</option>
</select>
</div>
<div class="form-group col-md-2">
<label for="contrib-stage">Stage (IN_PROGRESS):</label>
<label for="contrib-stage">IN_PROGRESS stage:</label>
<select id="contrib-stage" class="form-control filter">
<option value="" selected></option>
<option value="1:QUEUED">1:QUEUED</option>
<option value="2:READING_DATA">2:READING_DATA</option>
<option value="3:LOADING_MYSQL">3:LOADING_MYSQL</option>
<option value=""></option>
<option value="QUEUED">QUEUED</option>
<option value="!QUEUED" selected>!&nbsp;QUEUED</option>
<option value="READING_DATA">READING_DATA</option>
<option value="LOADING_MYSQL">LOADING_MYSQL</option>
</select>
</div>
<div class="form-group col-md-1">
Expand Down Expand Up @@ -330,8 +331,8 @@ function(CSSLoader,
this._form_control('input', 'contrib-chunk').val('');
this._form_control('select', 'contrib-overlap').val('');
this._form_control('select', 'contrib-async').val('');
this._form_control('select', 'contrib-status').val('');
this._form_control('select', 'contrib-stage').val('');
this._form_control('select', 'contrib-status').val('IN_PROGRESS');
this._form_control('select', 'contrib-stage').val('!QUEUED');
}
_disable_controls(disable) {
this.fwk_app_container.find(".form-control").prop('disabled', disable);
Expand Down Expand Up @@ -455,9 +456,9 @@ function(CSSLoader,
// Compute the 'stage' attribute of the IN_PROGRESS contribution requests
// based on the timestamps.
if (file.status === 'IN_PROGRESS') {
if (!file.start_time) file.stage = '1:QUEUED';
else if (!file.read_time) file.stage = '2:READING_DATA';
else if (!file.load_time) file.stage = '3:LOADING_MYSQL';
if (!file.start_time) file.stage = 'QUEUED';
else if (!file.read_time) file.stage = 'READING_DATA';
else if (!file.load_time) file.stage = 'LOADING_MYSQL';
} else {
file.stage = '';
}
Expand Down Expand Up @@ -552,7 +553,11 @@ function(CSSLoader,
if (file.status === 'FINISHED') continue;
} else if (file.status !== status) continue;
}
if (stageIsSet && (file.status === 'IN_PROGRESS') && (file.stage !== stage)) continue;
if (stageIsSet && (file.status === 'IN_PROGRESS')) {
if (stage === '!QUEUED') {
if ((file.stage !== 'READING_DATA') && (file.stage !== 'LOADING_MYSQL')) continue;
} else if (file.stage !== stage) continue;
}
numSelect++;
const overlapStr = file.overlap ? 1 : 0;
const asyncStr = file.async ? 'ASYNC' : 'SYNC';
Expand Down

0 comments on commit 039030f

Please sign in to comment.