UI/UX improvements: structured conf page and rename plugin to agent

This commit is contained in:
2026-08-01 02:39:28 -04:00
parent aa17981c15
commit 622317b6da
7 changed files with 191 additions and 52 deletions
+10 -1
View File
@@ -23,7 +23,16 @@ router.get('/', async (req, res) => {
router.post('/', async (req, res, next) => {
try {
await confManager.setVaultConf(req.body);
const existing = await confManager.getVaultConf() || {};
// Deep merge req.body into existing
for (const key of Object.keys(req.body)) {
if (typeof req.body[key] === 'object' && req.body[key] !== null && !Array.isArray(req.body[key])) {
existing[key] = { ...(existing[key] || {}), ...req.body[key] };
} else {
existing[key] = req.body[key];
}
}
await confManager.setVaultConf(existing);
res.json({ success: true });
} catch(err) {
next(err);
+20
View File
@@ -0,0 +1,20 @@
const router = require('express').Router();
const permission = require('../utils/permission');
router.use(async (req, res, next) => {
try {
await permission.byGroup(req.user, ['app_sso_admin']);
next();
} catch(err) {
next(err);
}
});
router.get('/', (req, res) => {
res.render('conf', {
title: 'Configuration',
user: req.user
});
});
module.exports = router;
+1 -1
View File
@@ -34,7 +34,7 @@ const DOCS = {
'oauth-apps': {title: 'Connecting Apps (SSO)', file: path.join(__dirname, '../../docs/concepts-oauth-apps.md')},
'api-tokens': {title: 'API Tokens', file: path.join(__dirname, '../../docs/concepts-api-tokens.md')},
directory: {title: 'Directory & Inventory', file: path.join(__dirname, '../../docs/directory.md')},
plugins: {title: 'Plugins & Scheduler', file: path.join(__dirname, '../../docs/plugins.md')},
agents: {title: 'Agents & Scheduler', file: path.join(__dirname, '../../docs/agents.md')},
vault: {title: 'Vault Secrets', file: path.join(__dirname, '../../docs/vault.md')},
overview: {title: 'Overview', file: path.join(__dirname, '../../README.md')},
+10
View File
@@ -64,6 +64,16 @@ router.get('/notifications', (req, res) => res.redirect(301, '/overview'));
router.get('/dashboard', (req, res) => res.redirect(301, '/overview'));
router.get('/executive', (req, res) => res.redirect(301, '/overview'));
router.get('/conf', async function(req, res, next) {
const permission = require('../utils/permission');
try {
await permission.byGroup(req.user, ['app_sso_admin']);
res.render('conf', {...values});
} catch(err) {
next(err);
}
});
router.get('/directory', function(req, res) {
res.render('directory', {...values});
});