|
@@ -209,6 +209,8 @@
|
|
|
<div class="cb-group" id="wf-closed-checks"></div>
|
|
<div class="cb-group" id="wf-closed-checks"></div>
|
|
|
<button onclick="doWfSetClosed()">POST /closed</button>
|
|
<button onclick="doWfSetClosed()">POST /closed</button>
|
|
|
<button class="del" onclick="doWfDeleteClosed()">DELETE /closed</button>
|
|
<button class="del" onclick="doWfDeleteClosed()">DELETE /closed</button>
|
|
|
|
|
+ <button onclick="doWfSetClosedRange()">POST /closed range</button>
|
|
|
|
|
+ <span class="section-note">range uses both dates</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<label class="lbl">sync range</label>
|
|
<label class="lbl">sync range</label>
|
|
@@ -275,13 +277,7 @@
|
|
|
<label class="lbl">code</label>
|
|
<label class="lbl">code</label>
|
|
|
<input id="sms-code" type="text" placeholder="e.g. 123456" style="width:120px">
|
|
<input id="sms-code" type="text" placeholder="e.g. 123456" style="width:120px">
|
|
|
<button onclick="doSmsPost()">POST /sms/code</button>
|
|
<button onclick="doSmsPost()">POST /sms/code</button>
|
|
|
- <span class="section-note">deliver a code to whoever is polling</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <label class="lbl">timeout (s)</label>
|
|
|
|
|
- <input id="sms-timeout" type="number" value="30" style="width:60px">
|
|
|
|
|
- <button onclick="doSmsPoll()">GET /sms/code</button>
|
|
|
|
|
- <span class="section-note">long-poll — waits for a code to arrive</span>
|
|
|
|
|
|
|
+ <span class="section-note">deliver a code to whoever is polling sms_code.txt</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="result" id="res-sms"></div>
|
|
<div class="result" id="res-sms"></div>
|
|
|
|
|
|
|
@@ -591,6 +587,13 @@
|
|
|
show('res-workflows', await api('DELETE', `/workflow/closed/${d}`));
|
|
show('res-workflows', await api('DELETE', `/workflow/closed/${d}`));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ async function doWfSetClosedRange() {
|
|
|
|
|
+ const r = wfRange();
|
|
|
|
|
+ if (!r) return;
|
|
|
|
|
+ pending('res-workflows');
|
|
|
|
|
+ show('res-workflows', await api('POST', `/workflow/closed/${r.d1}/${r.d2}`, { services: getWfCheckedServices() }));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function wfRange() {
|
|
function wfRange() {
|
|
|
const d1 = document.getElementById('wf-d1').value;
|
|
const d1 = document.getElementById('wf-d1').value;
|
|
|
const d2 = document.getElementById('wf-d2').value || d1;
|
|
const d2 = document.getElementById('wf-d2').value || d1;
|
|
@@ -678,12 +681,6 @@
|
|
|
show('res-sms', await api('POST', '/sms/code', { code }));
|
|
show('res-sms', await api('POST', '/sms/code', { code }));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- async function doSmsPoll() {
|
|
|
|
|
- const timeout = document.getElementById('sms-timeout').value || 30;
|
|
|
|
|
- pending('res-sms');
|
|
|
|
|
- show('res-sms', await api('GET', `/sms/code?timeout=${timeout}`));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// ── credentials ──
|
|
// ── credentials ──
|
|
|
async function doCredRefreshAll() {
|
|
async function doCredRefreshAll() {
|
|
|
pending('res-cred-refresh');
|
|
pending('res-cred-refresh');
|