Skip to content

[merged-PR-mirror] feat(dashboard-settings): add vault dashboard KPIs, admin settings, and user preferences #412

Description

@rubenvdlinde

Originally by @algorithm-conduction on 2026-04-01 — source on github.com.

Summary

Implements the dashboard-settings feature (#7 (GH ref, not yet mapped)): adds an at-a-glance vault dashboard with KPI cards, a migration status banner, admin-only CA health and pending-app cards, a full admin settings page (password policy, CA health, application approval queue), and per-user preferences (session timeout, notification toggles) wired into NcAppSettingsDialog. All items are read-only aggregations or IAppConfig/IConfig CRUD with no new database migrations.

Spec Reference

https://github.com/algorithm-conduction/doriath/blob/hydra/doriath-dashboard-settings/spec/design.md (spec lives in build context; see /spec/design.md and /spec/tasks.md)

Changes

  • lib/Service/DashboardService.php — new service; fetchSummary(userId, isAdmin) aggregates vault KPIs from existing mappers (zero-defaults until [OpenSpec] [doriath] implement-encryption-suites #1 (GH ref, not yet mapped)/[OpenSpec] [doriath] implement-secrets #2/[OpenSpec] [doriath] implement-user-sharing #3/[OpenSpec] [doriath] implement-secret-requests #5 land)
  • lib/Service/SettingsService.php — new service; admin config constants + getAdminSettings/updateAdminSettings (range-validated 12-20 / 3-4) + getUserPreferences/updateUserPreferences (whitelist-filtered IConfig writes)
  • lib/Controller/DashboardController.php — updated; adds summary() endpoint with OAS 3.0 annotations
  • lib/Controller/SettingsController.php — new controller; getAdminSettings/updateAdminSettings (admin-only) and getUserSettings/updateUserSettings (@NoAdminRequired)
  • appinfo/routes.php — updated; adds /api/dashboard/summary, /api/settings/admin, /api/settings/user
  • src/components/dashboard/DashboardKpiCard.vue — new; custom KPI card with icon slot and default/warning/error variants
  • src/components/dashboard/MigrationBanner.vue — new; NcNoteCard-based warning/error banner for migration counts
  • src/components/dashboard/PendingAppsCard.vue — new; admin-only pending-approvals count + link to queue
  • src/components/dashboard/CaHealthCard.vue — new V1 stub; CA status with colour-coded indicator dot
  • src/components/dashboard/RecentSecretsWidget.vue — new V1 stub; recently-accessed list with empty state
  • src/store/modules/dashboard.js — new Pinia store; fetchSummary action, isEmpty + hasMigrationIssues getters
  • src/views/Dashboard.vue — updated; replaces placeholder with KPI grid, migration banner, admin row, recent-secrets widget
  • src/components/settings/PasswordPolicySection.vue — new; length slider (12-20) + score selector (3-4)
  • src/components/settings/CaHealthSection.vue — new V1 stub; status display, management actions deferred to V1
  • src/components/settings/ApplicationQueueSection.vue — new; approve/reject queue with empty state
  • src/store/modules/adminSettings.js — new Pinia store; fetchSettings/updateSettings + approve/rejectApplication stubs
  • src/views/settings/Settings.vue — updated; replaces old register form with three admin sections
  • src/components/settings/UserPreferencesSection.vue — new; session-timeout slider + notification toggles (V1 group-share/security scaffolded but disabled)
  • src/store/modules/userSettings.js — new Pinia store; fetchPreferences/updatePreferences
  • src/views/UserSettingsDialog.vue — new; NcAppSettingsDialog wrapper for user preferences
  • src/App.vue — updated; nav footer settings item opens UserSettingsDialog
  • src/store/store.js — updated; exports new stores
  • .eslintrc.js — new; adds missing ESLint configuration (extends @nextcloud/eslint-config)

Test Coverage

  • PHP syntax: all 7 lib/**/*.php files pass php -l
  • JS lint: npm run lint passes with zero errors/warnings
  • Unit tests for DashboardService and SettingsService are deferred pending Nextcloud environment availability (composer install requires network — mocked in CI via existing PHPUnit bootstrap)

Gemigreerd van Codeberg — oorspronkelijk Conduction/doriath#1, geopend door rubenvdlinde op 2026-05-29.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions