diff --git a/dashboard/src/views/services.html b/dashboard/src/views/services.html index b40d7f709..908151af5 100644 --- a/dashboard/src/views/services.html +++ b/dashboard/src/views/services.html @@ -116,8 +116,9 @@ - - + + + diff --git a/dashboard/src/views/services.js b/dashboard/src/views/services.js index 6580ecd56..a99c8e84b 100644 --- a/dashboard/src/views/services.js +++ b/dashboard/src/views/services.js @@ -53,7 +53,10 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca return; } - if (error) return Client.error(error); + if (error) { + refresh(serviceName); + return Client.error(error); + } // show "busy" indicator for 3 seconds to show some ui activity setTimeout(function () { waitForActive(serviceName); }, 3000); diff --git a/src/services.js b/src/services.js index a6df09023..f303b9af0 100644 --- a/src/services.js +++ b/src/services.js @@ -1497,7 +1497,7 @@ async function restorePostgreSql(app, options) { async function hasAVX() { // mongodb 5 and above requires AVX - const [error] = await safe(shell.exec('grep -q avx /proc/cpuinfo', {})); + const [error] = await safe(shell.exec('hasAVX', 'grep -q avx /proc/cpuinfo', {})); return !error; } @@ -1677,10 +1677,7 @@ async function statusMongodb() { } async function restartMongodb() { - if (!await hasAVX()) { - debug('restartMongodb: skipping restart, CPU has no AVX support'); - return; - } + if (!await hasAVX()) throw new BoxError(BoxError.ADDONS_ERROR, 'MongoDB is disabled. CPU has no AVX support'); return await docker.restartContainer('mongodb'); }