Skip to content

Commit

Permalink
add retrieval after storage ux (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott authored Jul 1, 2021
1 parent 3f4af0d commit 477ff92
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions controller/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ window.setauth = (a) => {

$().ready(() => {
$('#newSchedule').cronPicker();
$('#newretafterstoreSchedule').cronPicker();

$("#addDone").hide();
if ($('#newSR').is(':checked')) {
Expand Down Expand Up @@ -37,6 +38,17 @@ $().ready(() => {
}
})

if (!$('#newRepeatRetAfterStore').is(':checked')) {
$("#retafterstoreschedule").hide();
}
$("#newRepeatRetAfterStore").on('change', () => {
if ($('#newRepeatRetAfterStore').is(':checked')) {
$("#retafterstoreschedule").show();
} else {
$("#retafterstoreschedule").hide();
}
})

$("#addtask button").on('click', doSubmit);
$("schedulesection form").on('submit', doSubmit);

Expand Down Expand Up @@ -125,6 +137,10 @@ function doSubmit(e) {
"CARExport": false,
"MaxPriceAttoFIL": 20000000000,
}
if ($('#newRepeatRetAfterStore').is(':checked')) {
data.RetrievalSchedule = $('#newretafterstoreSchedule').val()
data.RetrievalScheduleLimit = $('#newretafterstoreScheduleLimit').val()
}
} else {
data = {
"Miner": miner,
Expand Down
13 changes: 13 additions & 0 deletions controller/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ <h2 class="accordion-header" id="headingSchedule">
Fast Retrieval
</label>
</div>
<div id="retafterstoreschedule">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="newRepeatRetAfterStore" />
<label class="form-check-label" for="newRepeatRetAfterStore">Retrieve after Storage</label>
</div>
<div class="mb-3" id="setretafterstoreschedule">
<input type="text" id="newretafterstoreSchedule" value="5 14 * * *">
</div>
<div class="mb-3">
<input type="text" id="newretafterstoreScheduleLimit" value="30d">
<label class="form-label" for="newretafterstoreScheduleLimit">Duration in which retrieval schedule is valid</label>
</div>
</div>
</div>
<div id="newretrieval">
<div class="mb-3">
Expand Down

0 comments on commit 477ff92

Please sign in to comment.