lupine.api 1.1.57 → 1.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/admin-release.tsx +24 -2
- package/package.json +1 -1
package/admin/admin-release.tsx
CHANGED
|
@@ -309,6 +309,28 @@ export const AdminReleasePage = () => {
|
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
+
|
|
313
|
+
const index = await ActionSheetSelectPromise({
|
|
314
|
+
title: 'Restart App (users may get disconnected errors) ?',
|
|
315
|
+
options: ['OK'],
|
|
316
|
+
cancelButtonText: 'Cancel',
|
|
317
|
+
});
|
|
318
|
+
if (index !== 0) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const response = await getRenderPageProps().renderPageFunctions.fetchData('/api/admin/release/restart-app', {
|
|
323
|
+
...data,
|
|
324
|
+
isLocal,
|
|
325
|
+
});
|
|
326
|
+
const dataResponse = await response.json;
|
|
327
|
+
console.log('restart-app', dataResponse);
|
|
328
|
+
if (!dataResponse || dataResponse.status !== 'ok') {
|
|
329
|
+
NotificationMessage.sendMessage(dataResponse.message || 'Failed to Restart App', NotificationColor.Error);
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
domLog.value = <pre>{JSON.stringify(dataResponse, null, 2)}</pre>;
|
|
333
|
+
NotificationMessage.sendMessage('Restart App successfully', NotificationColor.Success);
|
|
312
334
|
};
|
|
313
335
|
|
|
314
336
|
const onShellLocal = async () => {
|
|
@@ -389,8 +411,8 @@ export const AdminReleasePage = () => {
|
|
|
389
411
|
</button>
|
|
390
412
|
</div>
|
|
391
413
|
<div class='row-box mt-m mb-m'>
|
|
392
|
-
<input type='text' class='input-base w-50p release-cmd' placeholder='Command' />
|
|
393
|
-
<button onClick={onShellRemote} class='button-base color-red'>
|
|
414
|
+
<input type='text' class='input-base w-50p release-cmd mr-m' placeholder='Command' />
|
|
415
|
+
<button onClick={onShellRemote} class='button-base color-red mr-m'>
|
|
394
416
|
Run Cmd (Remote)
|
|
395
417
|
</button>
|
|
396
418
|
<button onClick={onShellLocal} class='button-base'>
|