|
@@ -274,6 +274,17 @@
|
|
|
<span class="section-note">probe single service</span>
|
|
<span class="section-note">probe single service</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="result" id="res-cred-probe"></div>
|
|
<div class="result" id="res-cred-probe"></div>
|
|
|
|
|
+ <div class="row" style="margin-top:8px">
|
|
|
|
|
+ <button onclick="doCredRefreshAll()">POST /credentials</button>
|
|
|
|
|
+ <span class="section-note">trigger automatic refresh for all services (may take minutes)</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row" style="margin-top:4px">
|
|
|
|
|
+ <label class="lbl">service</label>
|
|
|
|
|
+ <select id="cred-refresh-service"></select>
|
|
|
|
|
+ <button onclick="doCredRefresh()">POST refresh</button>
|
|
|
|
|
+ <span class="section-note">trigger refresh for one service</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="result" id="res-cred-refresh"></div>
|
|
|
<div id="cred-fields" style="margin-top:8px">
|
|
<div id="cred-fields" style="margin-top:8px">
|
|
|
<div class="row cred-row">
|
|
<div class="row cred-row">
|
|
|
<label class="lbl" style="width:60px">key</label>
|
|
<label class="lbl" style="width:60px">key</label>
|
|
@@ -374,7 +385,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function populateDropdowns() {
|
|
function populateDropdowns() {
|
|
|
- ['calc-service', 'cred-service', 'chat-service'].forEach(id => {
|
|
|
|
|
|
|
+ ['calc-service', 'cred-service', 'cred-refresh-service', 'chat-service'].forEach(id => {
|
|
|
const el = document.getElementById(id);
|
|
const el = document.getElementById(id);
|
|
|
const prev = el.value;
|
|
const prev = el.value;
|
|
|
el.innerHTML = servicesList.map(s =>
|
|
el.innerHTML = servicesList.map(s =>
|
|
@@ -633,6 +644,18 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ── credentials ──
|
|
// ── credentials ──
|
|
|
|
|
+ async function doCredRefreshAll() {
|
|
|
|
|
+ pending('res-cred-refresh');
|
|
|
|
|
+ show('res-cred-refresh', await api('POST', '/credentials', {}));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ async function doCredRefresh() {
|
|
|
|
|
+ const service = document.getElementById('cred-refresh-service').value;
|
|
|
|
|
+ if (!service) return;
|
|
|
|
|
+ pending('res-cred-refresh');
|
|
|
|
|
+ show('res-cred-refresh', await api('POST', '/credentials', { service }));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
async function doCredProbeAll() {
|
|
async function doCredProbeAll() {
|
|
|
pending('res-cred-probe-all');
|
|
pending('res-cred-probe-all');
|
|
|
show('res-cred-probe-all', await api('GET', '/credentials'));
|
|
show('res-cred-probe-all', await api('GET', '/credentials'));
|