Changeset 0.25.0 (#160)
This commit is contained in:
@@ -264,6 +264,9 @@
|
||||
'</div>' +
|
||||
'<div id="adminArchivedList" class="admin-list"><div class="loading">Loading...</div></div>';
|
||||
|
||||
SCAFFOLDING.surfaces =
|
||||
'<div id="adminSurfacesContent"></div>';
|
||||
|
||||
|
||||
// === Add button actions ==============================================
|
||||
|
||||
@@ -312,21 +315,23 @@
|
||||
if (!section) return;
|
||||
|
||||
// -- Category / nav resolution -----------
|
||||
var catMap = {
|
||||
users:'people', teams:'people', groups:'people',
|
||||
providers:'ai', models:'ai', personas:'ai', roles:'ai', knowledgeBases:'ai', memory:'ai',
|
||||
health:'routing', routing:'routing', capabilities:'routing',
|
||||
settings:'system', storage:'system', extensions:'system', channels:'system',
|
||||
usage:'monitoring', audit:'monitoring', stats:'monitoring',
|
||||
};
|
||||
var cat = catMap[section] || 'people';
|
||||
var secMap = {
|
||||
people: [{id:'users',l:'Users'},{id:'teams',l:'Teams'},{id:'groups',l:'Groups'}],
|
||||
ai: [{id:'providers',l:'Providers'},{id:'models',l:'Models'},{id:'personas',l:'Personas'},{id:'roles',l:'Roles'},{id:'knowledgeBases',l:'Knowledge'},{id:'memory',l:'Memory'}],
|
||||
routing: [{id:'health',l:'Health'},{id:'routing',l:'Routing'},{id:'capabilities',l:'Capabilities'}],
|
||||
system: [{id:'settings',l:'Settings'},{id:'storage',l:'Storage'},{id:'extensions',l:'Extensions'},{id:'channels',l:'Channels'}],
|
||||
monitoring: [{id:'usage',l:'Usage'},{id:'audit',l:'Audit'},{id:'stats',l:'Stats'}],
|
||||
};
|
||||
// Derive from ADMIN_SECTIONS + ADMIN_LABELS (ui-admin.js) — single source of truth.
|
||||
// admin-scaffold.js previously had its own duplicate catMap/secMap.
|
||||
var cat = 'people';
|
||||
if (typeof ADMIN_SECTIONS !== 'undefined') {
|
||||
for (var c in ADMIN_SECTIONS) {
|
||||
if (ADMIN_SECTIONS[c].indexOf(section) !== -1) { cat = c; break; }
|
||||
}
|
||||
}
|
||||
var secMap;
|
||||
if (typeof ADMIN_SECTIONS !== 'undefined' && typeof ADMIN_LABELS !== 'undefined') {
|
||||
secMap = {};
|
||||
for (var c in ADMIN_SECTIONS) {
|
||||
secMap[c] = ADMIN_SECTIONS[c].map(function(id) {
|
||||
return { id: id, l: ADMIN_LABELS[id] || id };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild left nav for current category
|
||||
var navEl = document.getElementById('adminNav');
|
||||
|
||||
Reference in New Issue
Block a user