Merge origin/main (shell 1.13.0): version fix lands as 1.13.1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2343,8 +2343,17 @@ function handleRequest(req, res) {
|
||||
|
||||
/* — shell API — */
|
||||
if (urlPath === '/api/modules' && req.method === 'GET') {
|
||||
// Beside what dashboards may load: the installed modules that are not
|
||||
// running, by id and name only, so a tile one of them left in a layout
|
||||
// can say why it is not drawn ("module disabled") instead of guessing at
|
||||
// "not installed". Nothing of their config travels with it.
|
||||
const inactive = [...manifests.keys()].filter((id) => !isActive(id)).map((id) => ({
|
||||
id,
|
||||
name: String(manifests.get(id).name || id),
|
||||
reason: isEnabled(id) ? 'incompatible' : 'disabled',
|
||||
}));
|
||||
Promise.all([...manifests.keys()].filter(isActive).map(clientManifest))
|
||||
.then((list) => sendJson(res, 200, { modules: list }))
|
||||
.then((list) => sendJson(res, 200, { modules: list, inactive }))
|
||||
.catch((err) => {
|
||||
console.error('[proddash] /api/modules failed:', err);
|
||||
if (!res.headersSent) sendJson(res, 500, { error: 'Server error.' });
|
||||
|
||||
Reference in New Issue
Block a user