Add system settings, audit logging, user management, and dark mode fixes
System Settings: - Add SystemSettings.vue with Zabbix integration, SMTP/email config, SAML SSO settings - Add Setting model with key-value storage and typed values - Add settings API with caching Audit Logging: - Add AuditLog model tracking user, IP, action, entity changes - Add comprehensive audit logging to all CRUD operations: - Machines, Computers, Equipment, Network devices, VLANs, Subnets - Printers, USB devices (including checkout/checkin) - Applications, Settings, Users/Roles - Track old/new values for all field changes - Mask sensitive values (passwords, tokens) in logs User Management: - Add UsersList.vue with full user CRUD - Add Role management with granular permissions - Add 41 predefined permissions across 10 categories - Add users API with roles and permissions endpoints Reports: - Add TonerReport.vue for printer supply monitoring Dark Mode Fixes: - Fix map position section in PCForm, PrinterForm - Fix alert-warning in KnowledgeBaseDetail - All components now use CSS variables for theming CLI Commands: - Add flask seed permissions - Add flask seed settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -668,6 +668,75 @@ export const employeesApi = {
|
||||
// Alias for different casing
|
||||
export const businessUnitsApi = businessunitsApi
|
||||
|
||||
// System Settings API
|
||||
export const settingsApi = {
|
||||
list(params = {}) {
|
||||
return api.get('/settings', { params })
|
||||
},
|
||||
get(key) {
|
||||
return api.get(`/settings/${key}`)
|
||||
},
|
||||
update(key, value) {
|
||||
return api.put(`/settings/${key}`, { value })
|
||||
},
|
||||
create(data) {
|
||||
return api.post('/settings', data)
|
||||
}
|
||||
}
|
||||
|
||||
// Audit Logs API
|
||||
export const auditLogsApi = {
|
||||
list(params = {}) {
|
||||
return api.get('/auditlogs', { params })
|
||||
},
|
||||
getEntityHistory(entitytype, entityid) {
|
||||
return api.get(`/auditlogs/entity/${entitytype}/${entityid}`)
|
||||
},
|
||||
getStats() {
|
||||
return api.get('/auditlogs/stats')
|
||||
}
|
||||
}
|
||||
|
||||
// Users API
|
||||
export const usersApi = {
|
||||
list() {
|
||||
return api.get('/users')
|
||||
},
|
||||
get(id) {
|
||||
return api.get(`/users/${id}`)
|
||||
},
|
||||
create(data) {
|
||||
return api.post('/users', data)
|
||||
},
|
||||
update(id, data) {
|
||||
return api.put(`/users/${id}`, data)
|
||||
},
|
||||
delete(id) {
|
||||
return api.delete(`/users/${id}`)
|
||||
},
|
||||
// Permissions
|
||||
permissions: {
|
||||
list() {
|
||||
return api.get('/users/permissions')
|
||||
}
|
||||
},
|
||||
// Roles
|
||||
roles: {
|
||||
list() {
|
||||
return api.get('/users/roles')
|
||||
},
|
||||
create(data) {
|
||||
return api.post('/users/roles', data)
|
||||
},
|
||||
update(id, data) {
|
||||
return api.put(`/users/roles/${id}`, data)
|
||||
},
|
||||
delete(id) {
|
||||
return api.delete(`/users/roles/${id}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Network API (devices, subnets, and VLANs)
|
||||
export const networkApi = {
|
||||
// Network devices
|
||||
|
||||
Reference in New Issue
Block a user