Skip to content

Commit b539fd1

Browse files
authored
Merge pull request #1 from LexioJ/feature/dashboard
feat: Dual Dashboard System with Portal and Agent Views
2 parents 977a38e + c503c7c commit b539fd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+9594
-1641
lines changed

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,89 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
---
99

10+
## [1.2.0] - 2025-11-01
11+
12+
### ✨ Major New Feature: Dual Dashboard System
13+
14+
Version 1.2.0 introduces specialized dashboard widgets that adapt to user profiles, providing both end-user ticket tracking and comprehensive agent operational dashboards.
15+
16+
### Added
17+
18+
#### Dual Dashboard Widgets
19+
- **Portal Widget ("iTop")**: Personal ticket tracking for all users
20+
- Compact status overview with badge breakdown (open, escalated, pending, resolved)
21+
- Recent ticket feed showing 4 most recent tickets sorted by last update
22+
- Visual status indicators: State-specific SVG icons for new, escalated, deadline, and closed tickets
23+
- Inline metadata: Status emoji (🆕👥⏳⚠️✅☑️❌), priority emoji (🔴🟠🟡🟢), relative timestamps
24+
- Rich hover details: Comprehensive ticket information including reference, dates, sanitized description
25+
- One-click access to tickets in iTop
26+
- Quick actions: Refresh and create new tickets
27+
- Mobile-optimized responsive design
28+
29+
- **Agent Widget ("iTop - Agent Dashboard")**: Operational metrics for agents
30+
- **My Work Section**: Count of assigned incidents and requests
31+
- **Team Queue Section**: Team-wide ticket counts for incidents and requests
32+
- **SLA Tracking**: Warnings (TTO/TTR approaching) and breaches (TTO/TTR exceeded)
33+
- **Change Management**: Upcoming changes with time windows (emergency/normal/routine)
34+
- Quick navigation links to filtered iTop views
35+
- Real-time ticket counts with visual indicators (info/warning/error)
36+
- Responsive 2x2 metrics grid layout
37+
38+
#### Widget Visibility Control
39+
- **Profile-Based Display**: Portal users see only Portal Widget; agents see both widgets
40+
- **Automatic Detection**: Widget availability controlled by `is_portal_only` flag from iTop profiles
41+
- **Seamless User Experience**: No manual configuration required
42+
43+
#### Dashboard Backend
44+
- **ItopWidget.php**: Main widget class with profile-aware widget loading
45+
- **ItopAgentWidget.php**: Dedicated agent dashboard widget class
46+
- **Dashboard API**: New endpoints for SLA tracking, change management, and team metrics
47+
- **Efficient Queries**: Optimized OQL queries for dashboard data with minimal API calls
48+
49+
### Changed
50+
51+
#### Dashboard Improvements
52+
- **Enhanced Ticket Display**: Improved visual hierarchy with better status differentiation
53+
- **Better Error Handling**: Graceful fallback when API unavailable or user not configured
54+
- **Performance**: Dashboard data cached separately from search results
55+
- **Responsive Layout**: Mobile-first design with adaptive layouts for all screen sizes
56+
57+
#### API Enhancements
58+
- **New ItopAPIService Methods**:
59+
- `getAgentDashboardMetrics()`: Fetch agent-specific operational data
60+
- `getSLAWarnings()`: Retrieve tickets approaching SLA thresholds
61+
- `getUpcomingChanges()`: Get planned changes with time windows
62+
- `getTeamQueue()`: Team-wide ticket statistics
63+
- **Person ID Filtering**: All dashboard queries filtered by user's Person ID for data isolation
64+
65+
### Fixed
66+
- **Ticket Timestamp Display**: Corrected timezone handling in dashboard relative timestamps
67+
- **SVG Icon Rendering**: Fixed state icon display in dashboard ticket list
68+
- **Dashboard Refresh**: Resolved cache invalidation issue causing stale data after updates
69+
- **Mobile Layout**: Fixed overflow issues on small screens in dashboard widgets
70+
71+
### Technical Details
72+
73+
#### New Configuration Keys
74+
- `dashboard_cache_ttl`: Dashboard data cache TTL (default: 120s / 2min)
75+
- `agent_dashboard_enabled`: Global toggle for agent dashboard (default: true)
76+
77+
#### New Dashboard Files
78+
- `lib/Dashboard/ItopWidget.php`: Portal widget (enhanced)
79+
- `lib/Dashboard/ItopAgentWidget.php`: Agent dashboard widget (new)
80+
- `lib/Service/DashboardService.php`: Dashboard data aggregation service (new)
81+
82+
#### Translation Updates
83+
- Added 45 new translatable strings for dashboard widgets
84+
- Updated en.json, de.json, de_DE.json, fr.json with dashboard translations
85+
86+
#### Migration Notes
87+
- **No user action required**: Existing users see Portal Widget immediately
88+
- **Automatic agent detection**: Agents automatically gain access to Agent Widget
89+
- **Cache warmup**: First dashboard load may be slower as metrics cache populates
90+
91+
---
92+
1093
## [1.1.0] - 2025-10-28
1194

1295
### ✨ Major New Feature: Configuration Item (CI) Browsing

README.md

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🎟️ **Complete iTop ITSM & CMDB Integration** - Seamlessly access tickets, incidents, and Configuration Items from your Nextcloud environment
44

5-
[![Version](https://img.shields.io/badge/version-1.1.0-blue)](https://github.com/lexioj/integration_itop/releases)
5+
[![Version](https://img.shields.io/badge/version-1.2.0-blue)](https://github.com/lexioj/integration_itop/releases)
66
[![License](https://img.shields.io/badge/license-AGPL--3.0-green)](LICENSE)
77
[![Nextcloud](https://img.shields.io/badge/Nextcloud-30+-blue)](https://nextcloud.com)
88

@@ -16,7 +16,7 @@ A comprehensive Nextcloud integration that brings iTop IT Service Management and
1616
- 🔍 **Instant Search** - Find tickets and CIs from Nextcloud's search bar
1717
- 🔗 **Rich Previews** - Paste iTop links anywhere for interactive previews
1818
- 💬 **Smart Suggestions** - Get CI/ticket recommendations while typing in Talk or Text
19-
- 📊 **Dashboard Widget** - See your ticket queue at a glance
19+
- 📊 **Dashboard Widgets** - Portal widget for personal tickets + Agent widget for operational metrics
2020
- 🔔 **Notifications** - Get alerted when tickets are assigned to you
2121

2222
### **For IT Teams**
@@ -36,6 +36,52 @@ A comprehensive Nextcloud integration that brings iTop IT Service Management and
3636

3737
## 🚀 Key Features
3838

39+
### 📊 Interactive Dashboard Widgets
40+
41+
Get comprehensive overviews of your ticket queue directly on your Nextcloud dashboard. The integration provides **two specialized widgets** that adapt to your user profile:
42+
43+
![Dashboard Widget](docs/images/dashboard1.png)
44+
45+
#### 🎫 Portal Widget - "iTop"
46+
**For All Users** - Track your personal tickets at a glance
47+
48+
**Features:**
49+
- **Compact Status Overview**: See total tickets with badge breakdown (open, escalated, pending, resolved)
50+
- **Recent Ticket Feed**: Display 4 most recent tickets sorted by last update
51+
- **Visual Status Indicators**: State-specific SVG icons (new, escalated, deadline, closed) for both Incidents and UserRequests
52+
- **Inline Metadata**: Status emoji (🆕👥⏳⚠️✅☑️❌), priority emoji (🔴🟠🟡🟢), and relative timestamps with tooltips
53+
- **Rich Hover Details**: Comprehensive ticket information on hover including reference, dates, and sanitized description
54+
- **One-Click Access**: Click any ticket to open directly in iTop
55+
- **Quick Actions**: Refresh dashboard and create new tickets without leaving Nextcloud
56+
- **Responsive Design**: Mobile-optimized layout adapts to all screen sizes
57+
58+
#### 👨‍💼 Agent Widget - "iTop - Agent Dashboard"
59+
**For Agent Users Only** - Comprehensive operational dashboard
60+
61+
**Features:**
62+
- **My Work**: Count of assigned incidents and requests
63+
- **Team Queue**: Team-wide ticket counts (incidents and requests)
64+
- **SLA Tracking**:
65+
- SLA Warnings (TTO/TTR approaching)
66+
- SLA Breaches (TTO/TTR exceeded)
67+
- **Change Management**:
68+
- Upcoming changes with time windows
69+
- Emergency/Normal/Routine change types
70+
- Current and planned change status
71+
- **Quick Navigation**: Click metrics to jump to filtered iTop views
72+
- **Real-Time Counts**: Live ticket counts with visual indicators (info, warning, error)
73+
- **Responsive Grid**: 2x2 metrics layout adapting to screen size
74+
75+
**Widget Visibility:**
76+
- **Portal Users** (is_portal_only = true): See only Portal Widget
77+
- **Agent Users** (is_portal_only = false): See both Portal Widget and Agent Widget
78+
- Automatically controlled by iTop user profiles
79+
80+
**Perfect for:**
81+
- **Portal Widget**: End users tracking their personal requests
82+
- **Agent Widget**: IT agents managing workload, SLA compliance, and team coordination
83+
- **Both**: Managers needing both personal and operational views
84+
3985
### 🔗 Dynamic Reference Provider
4086
Transform iTop links into rich, interactive previews across Nextcloud apps (Talk, Deck, Text, Collectives).
4187

@@ -337,36 +383,33 @@ Adjust cache TTLs in **Admin Settings → Cache & Performance**:
337383

338384
---
339385

340-
## 📋 What's New in v1.1.0
386+
## 📋 What's New in v1.2.0
341387

342-
**Major New Feature: Configuration Item (CI) Browsing** 🎉
388+
**Major New Feature: Dual Dashboard System** 🎉
343389

344390
### Added
345-
- **CI Support in Search**: Search 11 CI classes from unified search bar
346-
- **CI Support in Smart Picker**: Insert CI references in Talk, Text, and comments
347-
- **CI Rich Previews**: Paste CI URLs for detailed hardware/software previews
348-
- **Profile Service**: Automatic Portal vs Power user detection with 30min caching
349-
- **Preview Mapper**: Dedicated service for efficient CI data transformation
350-
- **Cache Service**: Distributed caching layer with configurable TTLs
351-
- **Admin CI Configuration**: Enable/disable CI classes with 3-state control
352-
- **Cache Management**: Admin UI with configurable TTLs and clear cache button
353-
- **11 CI Icons**: Class-specific icons (PC, Phone, Tablet, Printer, Software, etc.)
354-
- **French Translation**: Complete fr.json with all 280 strings (formal vous-form)
355-
- **German Translations**: Informal (du.json) and formal (de_DE.json) variants
391+
- **Portal Widget**: Personal ticket tracking for all users with status overview, recent ticket feed, and quick actions
392+
- **Agent Widget**: Comprehensive operational dashboard for IT agents with workload metrics, SLA tracking, and change management
393+
- **Profile-Based Display**: Automatic widget selection based on iTop user profiles (Portal vs Agent)
394+
- **Enhanced Ticket Display**: State-specific SVG icons, status/priority emojis, and rich hover details
395+
- **Dashboard Backend**: New API endpoints for SLA warnings, team queue, and change management
396+
- **Mobile Optimization**: Responsive design with adaptive layouts for all screen sizes
397+
- **Dashboard Caching**: Separate cache layer for dashboard data (default: 2min TTL)
356398

357399
### Changed
358-
- **Admin Settings**: Refactored to PHP-rendered HTML for better translation support
359-
- **Search Provider**: Enhanced with CI class ranking and profile-aware filtering
360-
- **Reference Provider**: Extended to detect and preview CI URLs
361-
- **API Service**: New methods for CI queries with Person ID filtering
362-
- **Performance**: Reduced API calls by 60-80% with multi-layer caching
363-
364-
### Technical Improvements
365-
- ProfileService with configurable cache (10s-1h, default 30min)
366-
- CacheService with 5 configurable TTL types
367-
- PreviewMapper with PhysicalDevice field alignment
368-
- CI class state management (disabled/forced/user_choice)
369-
- Improved mobile responsiveness for CI previews
400+
- **Dashboard Performance**: Optimized OQL queries for faster dashboard loading
401+
- **Visual Hierarchy**: Improved status differentiation and metric indicators
402+
- **Error Handling**: Graceful fallback when API unavailable
403+
- **Translation Coverage**: Added 45 new strings for dashboard widgets in all supported languages
404+
405+
### Previous Release: v1.1.0 - Configuration Item (CI) Browsing
406+
407+
**Highlights:**
408+
- CI Support in Search, Smart Picker, and Rich Previews (11 CI classes)
409+
- Profile Service with automatic Portal vs Power user detection
410+
- Admin CI Configuration with 3-state control
411+
- Multi-language support: French, German (Du/Sie)
412+
- 60-80% reduction in API calls with multi-layer caching
370413

371414
See [CHANGELOG.md](CHANGELOG.md) for complete details.
372415

@@ -425,10 +468,14 @@ curl -X POST https://itop.company.com/webservices/rest.php \
425468

426469
## 🗺️ Roadmap
427470

428-
### v1.2.0 (Next Release)
429-
- [ ] Enhanced Dashboard Widget with charts and filters
430-
- [ ] Ticket activity timeline in previews
471+
### v1.2.0 (Released 2025-11-01) ✅
472+
- [x] Enhanced Dashboard Widget with charts and filters
473+
- [x] Dual dashboard system (Portal + Agent widgets)
474+
- [x] SLA tracking and team metrics
475+
476+
### v1.3.0 (Next Release)
431477
- [ ] Advanced search filters (date ranges, custom fields)
478+
- [ ] Notification system
432479

433480
### Future
434481
- [ ] Ticket creation from Nextcloud

appinfo/info.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ Seamlessly connect your Nextcloud collaboration platform with iTop IT Service Ma
1515
1616
### ✨ Key Features
1717
18+
#### 📊 Dual Dashboard Widgets
19+
- **Portal Widget**: Personal ticket queue for all users with status breakdown (Open, Pending, Resolved)
20+
- View 4 most recent tickets (Incidents + User Requests)
21+
- Visual status indicators and priority badges
22+
- Quick actions: Refresh and Create New Ticket
23+
- Responsive design for mobile/desktop
24+
- **Agent Widget**: Comprehensive operational dashboard for IT agents only
25+
- **My Work**: Assigned incidents and requests with real-time counts
26+
- **Team Queue**: Team-wide ticket distribution and workload overview
27+
- **SLA Tracking**: TTO/TTR warnings and breaches for proactive management
28+
- **Change Management**: Upcoming changes with time windows and types
29+
- Automatic visibility control based on user profile (agents vs portal users)
30+
1831
#### 🔗 Dynamic Reference Provider
1932
- **Rich Link Previews**: Paste iTop ticket links in Talk, Deck, or Collectives for instant rich previews
2033
- **Detailed Information**: View ticket status, priority, assignee, and description at a glance
@@ -67,8 +80,8 @@ Seamlessly connect your Nextcloud collaboration platform with iTop IT Service Ma
6780
6881
#### Start streamlining your ITSM workflow - Connect iTop with Nextcloud and experience unified IT service management!]]></description>
6982

70-
<version>1.1.0</version>
71-
<licence>agpl</licence>
83+
<version>1.2.0</version>
84+
<licence>AGPL-3.0-or-later</licence>
7285

7386
<author>iTop Integration Team</author>
7487

@@ -83,7 +96,8 @@ Seamlessly connect your Nextcloud collaboration platform with iTop IT Service Ma
8396
<bugs>https://github.com/lexioj/integration_itop/issues</bugs>
8497
<repository>https://github.com/lexioj/integration_itop.git</repository>
8598

86-
<screenshot small-thumbnail="https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/dynamic-reference-provider-thumb.png">https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/dynamic-reference-provider.png</screenshot>
99+
<screenshot small-thumbnail="https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/dashboard1.png">https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/dashboard1.png</screenshot>
100+
<screenshot>https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/dynamic-reference-provider.png</screenshot>
87101
<screenshot>https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/unified-search.png</screenshot>
88102
<screenshot>https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/smart-picker.png</screenshot>
89103
<screenshot>https://raw.githubusercontent.com/lexioj/integration_itop/main/docs/images/personal-settings.png</screenshot>

appinfo/routes.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
['name' => 'itopAPI#getTicket', 'url' => '/tickets/{ticketId}', 'verb' => 'GET'],
2323
['name' => 'itopAPI#getAvatar', 'url' => '/avatar', 'verb' => 'GET'],
2424
['name' => 'itopAPI#getCIs', 'url' => '/cis', 'verb' => 'GET'],
25-
25+
['name' => 'itopAPI#getDashboardData', 'url' => '/dashboard', 'verb' => 'GET'],
26+
['name' => 'itopAPI#getAgentDashboardData', 'url' => '/agent-dashboard', 'verb' => 'GET'],
27+
2628
// Search routes
2729
['name' => 'itopAPI#search', 'url' => '/search', 'verb' => 'GET'],
2830
]

0 commit comments

Comments
 (0)