Management UI Spec
1. Introduction
The CommandIT platform utilizes agents across managed endpoints. Keeping these agents (Service, UI, Probe, Updater) up-to-date is critical for security and functionality. This document outlines the requirements for a Management User Interface (UI) within the CommandIT platform's "Platform Administration" section. This UI will enable administrators to manage update packages, define update policies (building on AgentUpdatePolicies), monitor deployment status across the fleet, and configure core aspects of the auto-update service.
2. Goals & Objectives
- Centralized Management: Provide a single interface within the CommandIT platform to manage all aspects of agent updates.
- Visibility & Monitoring: Offer clear insights into the current versions of agents across devices, the status of ongoing updates, and historical update logs.
- Controlled Rollouts: Enable administrators to manage update packages across different release channels (Stable, Beta, Alpha).
- Policy Configuration: Allow administrators to define and manage agent update policies (AgentUpdatePolicies) dictating target versions and update schedules.
- Actionable Insights: Facilitate troubleshooting by providing access to detailed update logs and allow administrators to trigger immediate updates when necessary.
- Ease of Use: Ensure the UI is intuitive and efficient for administrators performing update management tasks.
3. Target Audience
- CommandIT Platform Administrators
- Managed Service Provider (MSP) Technicians responsible for platform maintenance and agent deployment.
4. Scope
4.1. In Scope
- UI Location: Reside within the "Platform Administration" section of the main CommandIT web application.
- Navigation: Provide a single entry point in the left navigation leading to a page with tabbed sections for managing agent updates.
- Overview Dashboard Tab: Display key summary statistics about agent versions and update status.
- Package Management Tab:
- View list of available update packages.
- View details of individual packages.
- Upload new pre-built and pre-signed agent update packages.
- Assign/Move packages between release channels (Stable, Beta, Alpha).
- Mark packages as active/inactive.
- Update Policy Management Tab:
- View, Create, Edit, Delete Agent Update Policies.
- Configure policy details: Name, description, target versions, update schedule, staggering options.
- View where policies are assigned.
- Deployment Status Monitoring Tab:
- View a list of managed devices with filtering/searching capabilities.
- Display current installed agent component versions.
- Display the assigned update policy and release channel for devices.
- View recent update history/logs for selected devices.
- Trigger an immediate update check ("Update Now") for selected devices or groups.
- Configuration/Settings Tab:
- Display the configured Update Server URL.
- Display default check interval.
- Display public key(s) used for signature verification (potentially allow uploading new public keys securely).
4.2. Out of Scope
- Package Building/Signing: The UI facilitates uploading existing signed packages; it does not include tools for building or signing them.
- Agent Installation: The UI monitors updates for existing agents; it is not the primary interface for initial agent deployment.
- Detailed Device Management: Full device inventory, remote control, or configuration management outside of agent versions and update status.
- Policy Assignment Mechanism: While the UI shows where policies are applied, the primary mechanism for assigning policies might reside in other platform sections.
- Server Infrastructure Management: Managing the update server (updates.commandit.com) infrastructure itself.
- Client-Side Updater Logic: This PRD defines the management UI, not the behavior of the commandit-updater client on the endpoint.
- Backend API Implementation: This document focuses on the UI; backend API development is assumed to be handled separately based on the data needs outlined here.
5. Functional Requirements
5.1. Navigation & Layout
- FR-UI-NAV-001: Provide a single navigation link in the "Platform Administration" section, labeled "Agent updates".
- FR-UI-LAY-001: Clicking "Agent updates" navigates to a single page with the title "Agent updates".
- FR-UI-LAY-002: This page will contain the following primary tabs, implemented using the CommonTabs reusable component:
- Dashboard
- Deployments
- Packages
- Policies
- Settings
- FR-UI-LAY-003: Employ a consistent layout across tabs, using standard UI components (tables, forms, buttons, modals) consistent with the CommandIT platform design system. Use the PageHeader component for the main page title ("Agent updates"). Use clear section titles within tabs.
5.2. Dashboard Tab
- Tab Label: Dashboard
- Content & Functionality:
- Summary Statistics Widgets (FR-UI-OVR-001): Implement using the DashboardContainer and appropriate modules (NumberModule, ChartModule, ListModule - see dashboard-usage.md). Widgets require data fetched from backend APIs providing aggregated counts/statuses.
- Widget: "Total managed devices" (NumberModule). Link navigates to Deployments tab.
- Widget: "Component versions (Stable)" (ChartModule). Link navigates to filtered Deployments tab.
- Widget: "Devices pending update" (NumberModule). Link navigates to filtered Deployments tab.
- Widget: "Recent update failures (24h)" (NumberModule). Link navigates to filtered Deployments tab.
- Widget: "Available packages" (NumberModule or ListModule). Link navigates to Packages tab.
- Recent Events Feed (Optional) (FR-UI-OVR-003): Implement using ListModule. Requires data fetched from a backend API providing recent relevant events.
5.3. Deployments Tab
- Tab Label: Deployments
- Content & Functionality:
- Filter Controls (FR-UI-DEP-002): Implement using standard Carbon components (Dropdown, Select, TextInput) integrated with CommonDataTable's filtering capabilities or managed state. Filters should trigger API requests for updated table data.
- Devices Table (FR-UI-DEP-001): Implement using the CommonDataTable reusable component.
- Data source: Fetch data from a backend API supporting pagination, sorting, and filtering based on the filter controls. The API should return device data including Org name, Location name, OS, Arch, agent component versions, assigned policy name, release channel, last update status, and last update time.
- Columns: Define CommonTableHeader array matching specified columns (Device Name, Org Name, Location, OS, Arch, Service Ver, UI Ver, Probe Ver, Updater Ver, Assigned Policy, Channel, Last Update Status [use Badge component], Last Update Time).
- Visual Indicators (FR-UI-DEP-005): Apply conditional styling within CommonDataTable cell renderers based on comparison between device version and latest applicable version (data likely needed from API response or separate fetch) or last update status.
- Table Actions (Applied to selected rows - FR-UI-DEP-003, FR-UI-DEP-004): Implement using CommonDataTable's batch action capabilities or custom toolbar actions.
- Action: "View update history". Trigger: Opens a CommonModal. Modal content: Fetches data from a backend API (filtered by selected device IDs) providing update log history and displays it using CommonDataTable. Columns: Timestamp, Component, Requested Version, Status, Error Message.
- Action: "Trigger update now". Trigger: Opens a confirmation CommonModal. On confirm: Calls a backend API endpoint for each selected device ID to initiate an immediate update check. Display success/failure toast notification based on API response.
5.4. Packages Tab
- Tab Label: Packages
- Content & Functionality:
- Action Bar: Implement using standard Carbon Button.
- Button: "Upload package" (FR-UI-PKG-003). Trigger: Opens a CommonModal. Modal content: Use DataEntryForm reusable component.
- Form Fields (FormFieldDefinition array): Component (type: dropdown), Version (type: text, validation: SemVer pattern), Target OS (type: dropdown), Target Arch (type: dropdown), Package file (type: file), Release notes URL (type: url, optional), Dependencies (type: textarea, optional, validation: JSON format).
- Form Submit: Calls a backend API to handle the upload, validation (including signature check), storage, and metadata creation. Handle API response (success/error) and refresh the table.
- Filter Controls (FR-UI-PKG-002): Implement using standard Carbon components integrated with CommonDataTable. Filters trigger API requests.
- Packages Table (FR-UI-PKG-001): Implement using CommonDataTable.
- Data source: Fetch data from a backend API supporting pagination, sorting, and filtering. API should return package data including Component, Version, Channel, OS, Arch, Published Date, Status (Active/Inactive), Publisher Name.
- Columns: Define CommonTableHeader array matching specified columns (Component, Version, Channel, OS, Arch, Published Date, Status [use Badge], Publisher).
- Table Actions (Applied to selected rows via checkboxes - FR-UI-PKG-004, FR-UI-PKG-005): Implement using CommonDataTable's batch action capabilities.
- Action: "Assign channel". Trigger: Opens CommonModal with a Dropdown (Stable/Beta/Alpha). Submit calls backend API to update the channel for selected package IDs. Refresh table.
- Action: "Set active". Trigger: Calls backend API to set is_active = true for selected package IDs. Refresh table.
- Action: "Set inactive". Trigger: Calls backend API to set is_active = false for selected package IDs. Refresh table.
- Action: "View details". Trigger: Opens CommonModal or side panel. Fetches full package details (including hash, signature) via API using package ID and displays read-only.
- Action: "Delete". Trigger: Opens danger-styled CommonModal for confirmation. On confirm: Calls backend API to delete or mark inactive the selected package record. Refresh table.
5.5. Policies Tab
- Tab Label: Policies
- Content & Functionality:
- Action Bar: Implement using standard Carbon Button.
- Button: "Create policy" (FR-UI-POL-002). Trigger: Opens a CommonModal or navigates to a dedicated create page. Use DataEntryForm.
- Form Fields (FormFieldDefinition array): Policy name (type: text, required), Description (type: textarea), Target Versions (group per component: Service, UI, Probe, Updater; each with type: dropdown ['latest_stable', 'latest_beta', 'latest_alpha', 'Specific Version'] and conditional type: text for specific version), Update Schedule (complex field - potentially custom component or JSON input for Start Time, End Time, Timezone/UTC, Days of Week), Staggering (type: number for delay minutes/hours), Enable/Disable (type: toggle).
- Form Submit: Calls backend API to create a new policy record. Handle API response.
- Filter Controls: Implement using standard Carbon components integrated with CommonDataTable. Filters trigger API requests.
- Policies Table (FR-UI-POL-001): Implement using CommonDataTable.
- Data source: Fetch data from a backend API supporting pagination, sorting, and filtering. API should return policy data including Name, Description, Target Version Summary, Schedule Summary, Status.
- Columns: Define CommonTableHeader array matching specified columns (Checkbox, Name, Description, Target Versions Summary, Schedule Summary, Status [use Badge]).
- Table Actions (Applied to selected row - FR-UI-POL-003, FR-UI-POL-004): Implement using CommonDataTable's row actions or inline buttons.
- Action: "Edit". Trigger: Opens modal/page with DataEntryForm pre-filled with data fetched via API for the selected policy ID. Submit calls backend API to update the policy.
- Action: "Delete". Trigger: Opens danger-styled CommonModal for confirmation. On confirm: Calls backend API to delete the policy record (backend checks assignments).
- Action: "View assignments". Trigger: Opens CommonModal or side panel. Fetches and displays a read-only list (potentially using CommonDataTable) of Orgs/Tags assigned this policy (requires backend endpoint to query assignment source). Refresh table on success for Edit/Delete.
5.6. Settings Tab
- Tab Label: Settings
- Content & Functionality:
- Display Fields (Read-Only): Use simple text display or read-only TextInput components. Fetch values from a backend configuration API.
- Field Label: Update server URL, Value: (e.g., https://updates.commandit.com) (FR-UI-CFG-001).
- Field Label: Default agent check interval, Value: (e.g., "4 hours") (FR-UI-CFG-002).
- Public Key Management:
- Section Title: Package signing public keys
- Display: Use CommonDataTable to list keys. Fetch data from a backend API returning stored public keys (Fingerprint, Added Date, Status). (FR-UI-CFG-003).
- Button: "Add public key" (FR-UI-CFG-004). Trigger: Opens CommonModal.
- Form (use DataEntryForm): Field for pasting PEM key (type: textarea, required).
- Form Submit: Calls backend API to validate and store the new key. Refresh key list on success.
- Row Action (per key): "Set inactive". Trigger: Opens confirmation CommonModal. On confirm: Calls backend API to mark the selected key as inactive. Refresh key list.
6. Non-Functional Requirements
- NFR-UI-PERF-001: UI pages and tabs, especially tables with potentially large datasets (Devices, Packages, Logs), must load and respond quickly. Employ pagination, server-side filtering/sorting, and potentially lazy-loading for tab content. Use CommonDataTable's server-side capabilities.
- NFR-UI-USE-001: The interface should be intuitive for administrators familiar with IT management concepts. Use clear, concise language (per Carbon guidelines). Provide helpful tooltips for less common actions or settings. Leverage standard patterns established by reusable components.
- NFR-UI-SEC-001: Access to this UI section must be controlled by appropriate role-based access control (RBAC) within the CommandIT platform (e.g., 'PlatformAdmin' role). Backend APIs must enforce permissions for all actions (view, create, edit, delete, upload, trigger update).
- NFR-UI-SEC-002: Sensitive data (like signatures) should be displayed appropriately (e.g., truncated or via view-detail action). Upload mechanisms must validate file types and potentially size on the client-side before submitting to the backend for secure processing.
- NFR-UI-ACC-001: UI should adhere to accessibility standards (WCAG 2.1 AA where feasible). Ensure reusable components (CommonTabs, CommonDataTable, CommonModal, DataEntryForm) follow accessibility best practices.
7. UI/UX Considerations
- Data Presentation: Use CommonDataTable for tabular data. Use DashboardContainer with standard modules for the dashboard. Use CommonModal for dialogs. Use DataEntryForm for consistent form layouts.
- Feedback: Use Carbon ToastNotification for feedback on asynchronous actions (uploads, triggers, saves). Use Carbon InlineLoading or skeleton states within components (CommonDataTable, dashboard modules) during data fetching.
- Consistency: Maintain consistency with the overall CommandIT platform's design language, components, and interaction patterns. Adhere to Carbon Design System principles.
- Error Handling: Display user-friendly error messages from API responses within Modals, Forms, or via Toast Notifications.
8. Open Issues / Future Considerations
- Detailed RBAC: Define the specific permissions required for each action within the UI (View Packages vs. Upload Packages vs. Assign Channels).
- Policy Assignment UI: Determine where policies are assigned (here or elsewhere) and ensure visibility.
- Dashboard Customization: Allow users to customize the Overview Dashboard?
- Reporting: Add dedicated reporting features (e.g., export deployment status, compliance reports).
- Signing Key Management: More robust UI for managing signing keys (rotation, revocation).
- Package Dependency Visualization: Graphically display dependencies between packages.
9. Development Task Breakdown (Detailed - UI Focus)
This section outlines the detailed tasks required to implement the Agent Updates Management UI, referencing the functional requirements (FR) and reusable components. It assumes backend APIs providing the necessary data and handling actions are available.
Phase 1: Basic Structure & Navigation
- Task UI-1.1: Create Agent Updates Page Component
- Goal: Establish the main React component for the Agent Updates page.
- Details: Create src/pages/PlatformAdmin/AgentUpdatesPage.tsx. Manage tab state here. Ensure routing within Platform Admin.
- Task UI-1.2: Implement Page Header
- Goal: Display the main title.
- Details: Use PageHeader component in AgentUpdatesPage.tsx. Set title="Agent updates". (Ref: FR-UI-LAY-003, PageHeader)
- Task UI-1.3: Implement Tab Structure
- Goal: Set up tab navigation.
- Details: Use CommonTabs component below PageHeader. Define CommonTab[] for Dashboard, Deployments, Packages, Policies, Settings, providing labels and placeholder content. Implement state management for selected tab. (Ref: FR-UI-LAY-002, CommonTabs)
- Task UI-1.4: Add Navigation Link
- Goal: Make page accessible.
- Details: Update Platform Admin left nav config to link "Agent updates" to the new page route. (Ref: FR-UI-NAV-001)
Phase 2: Dashboard Tab Implementation
- Task UI-2.1: Implement Dashboard Container
- Goal: Set up widget container.
- Details: Place DashboardContainer in the Dashboard tab content area. Provide dashboardId. (Ref: DashboardContainer, dashboard-usage.md)
- Task UI-2.2: Fetch Dashboard Data
- Goal: Retrieve aggregated data for widgets.
- Details: Implement data fetching hook(s) to call backend API(s) providing counts/stats for: total devices, stable versions, pending updates, recent failures, available packages. Handle loading and error states.
- Task UI-2.3: Implement Dashboard Widgets
- Goal: Display summary statistics.
- Details: Create TileConfig[] array. Define configurations using NumberModule, ChartModule, ListModule. Pass fetched data and loading state to modules. (Ref: FR-UI-OVR-001)
- Task UI-2.4: Implement Dashboard Widget Links
- Goal: Navigate from widgets to relevant tabs.
- Details: Add onClick handlers or link components to navigate to Deployments/Packages tabs, potentially passing filter state. Update parent component's active tab state. (Ref: FR-UI-OVR-002)
- Task UI-2.5 (Optional): Implement Recent Events Feed
- Goal: Show recent activity.
- Details: Define TileConfig using ListModule. Fetch data from backend API for recent events. Format data for ListModule.
Phase 3: Deployments Tab Implementation
- Task UI-3.1: Implement Deployment Filter Controls
- Goal: Allow device list filtering.
- Details: Add Carbon components (Dropdown, Select, TextInput) for filters. Manage filter state. Trigger data refetch on filter change.
- Task UI-3.2: Implement Deployments Table
- Goal: Display device list and update status.
- Details: Use CommonDataTable. Define CommonTableHeader for columns (FR-UI-DEP-001). Configure for server-side data fetching (pagination, sorting, filtering) by calling the backend API with current state.
- Task UI-3.3: Implement Visual Indicators
- Goal: Highlight out-of-date/failed devices.
- Details: Use CommonDataTable formatter functions for version/status columns. Compare row data (versions) with latest applicable version data (fetched from API) and apply conditional styling/icons.
- Task UI-3.4: Implement "View update history" Action
- Goal: Show detailed logs.
- Details: Add batch/row action. On trigger: Open CommonModal. Fetch data from backend API (filtered by device IDs) providing update logs. Display using CommonDataTable inside modal.
- Task UI-3.5: Implement "Trigger update now" Action
- Goal: Allow manual update initiation.
- Details: Add batch action. On trigger: Open confirmation CommonModal. On confirm: Call backend API for selected devices. Display ToastNotification.
Phase 4: Packages Tab Implementation
- Task UI-4.1: Implement "Upload package" Action & Form
- Goal: Allow uploading new packages.
- Details: Add "Upload package" Button. On click: Open CommonModal. Use DataEntryForm. Define FormFieldDefinition array for upload fields (Component, Version, OS, Arch, File, URL, Dependencies) with types and validation. On submit: Call backend upload/validation API. Handle response, refresh table. (Ref: FR-UI-PKG-003)
- Task UI-4.2: Implement Package Filter Controls
- Goal: Allow package list filtering.
- Details: Add Carbon components for filters (Component, Channel, OS, Arch, Status, Search). Manage state and trigger API refetch.
- Task UI-4.3: Implement Packages Table
- Goal: Display available packages.
- Details: Use CommonDataTable. Define CommonTableHeader (Component, Version, Channel, OS, Arch, Published Date, Status [Badge], Publisher). Configure for server-side data fetching from backend API. (Ref: FR-UI-PKG-001)
- Task UI-4.4: Implement Package Table Actions
- Goal: Allow package lifecycle management.
- Details: Configure CommonDataTable batch actions:
- "Assign channel": Opens CommonModal with Dropdown. Submit calls backend API.
- "Set active"/"Set inactive": Calls backend API.
- "View details": Opens CommonModal/panel. Fetches full details via API and displays read-only.
- "Delete": Opens danger CommonModal. On confirm, calls backend API. Refresh table on success for all actions. (Ref: FR-UI-PKG-005)
Phase 5: Policies Tab Implementation
- Task UI-5.1: Implement "Create policy" Action & Form
- Goal: Allow creation of new update policies.
- Details: Add "Create policy" Button. On click: Opens CommonModal/page. Use DataEntryForm. Define FormFieldDefinition array (Name, Description, Target Versions [grouped dropdowns/text], Schedule UI, Staggering, Enable/Disable toggle). On submit: Call backend create API. Handle response. (Ref: FR-UI-POL-002)
- Task UI-5.2: Implement Policy Filter Controls
- Goal: Allow policy list filtering.
- Details: Add Carbon TextInput (Search) and Dropdown (Status). Manage state and trigger API refetch.
- Task UI-5.3: Implement Policies Table
- Goal: Display defined policies.
- Details: Use CommonDataTable. Define CommonTableHeader (Checkbox, Name, Description, Target Versions Summary, Schedule Summary, Status [Badge]). Configure for server-side data fetching from backend API. (Ref: FR-UI-POL-001)
- Task UI-5.4: Implement Policy Table Actions
- Goal: Allow editing, deletion, viewing assignments.
- Details: Implement CommonDataTable row actions:
- "Edit": Opens modal/page with DataEntryForm pre-filled via API fetch. Submit calls update API.
- "Delete": Opens danger CommonModal. On confirm, calls delete API.
- "View assignments": Opens CommonModal/panel. Fetches assignment data via API and displays (e.g., list). Refresh table on success for Edit/Delete. (Ref: FR-UI-POL-004)
Phase 6: Settings Tab Implementation
- Task UI-6.1: Implement Read-Only Settings Display
- Goal: Show configured server URL and interval.
- Details: Fetch data from backend config API. Display using read-only TextInput or text elements. (Ref: FR-UI-CFG-001, FR-UI-CFG-002)
- Task UI-6.2: Implement Public Key List Display
- Goal: Show verification keys.
- Details: Fetch key data (Fingerprint, Added Date, Status) from backend API. Use CommonDataTable to display. (Ref: FR-UI-CFG-003)
- Task UI-6.3: Implement "Add public key" Action & Form
- Goal: Allow adding new verification keys.
- Details: Add "Add public key" Button. On click: Open CommonModal. Use DataEntryForm with textarea for PEM key. On submit: Call backend API to validate/store key. Refresh list. (Ref: FR-UI-CFG-004)
- Task UI-6.4: Implement "Set inactive" Key Action
- Goal: Allow disabling old keys.
- Details: Add row action to keys table. On click: Open confirmation CommonModal. On confirm: Call backend API to mark key inactive. Refresh list.
Phase 7: Finalization & Testing
- Task UI-7.1: Implement Frontend RBAC
- Goal: Control UI elements based on user permissions.
- Details: Fetch user permissions. Wrap action buttons/elements in conditional rendering based on permissions.
- Task UI-7.2: Implement API Error Handling
- Goal: Provide user-friendly feedback on backend errors.
- Details: Wrap API calls in try/catch. Parse errors and display using ToastNotification or inline messages.
- Task UI-7.3: Review Copywriting
- Goal: Ensure clear and concise UI text.
- Details: Review all labels, buttons, tooltips, titles. Align with Carbon guidelines.
- Task UI-7.4: Perform Testing
- Goal: Verify functionality, accessibility, robustness.
- Details: Write unit/integration tests. Perform E2E tests for all workflows. Perform accessibility checks.
- Task UI-7.5: Verify Responsiveness
- Goal: Ensure UI adapts to different screen sizes.
- Details: Test page and tabs on desktop, tablet, mobile widths. Verify layouts and component behavior.