.. include:: ../variables.rst .. _auditingdevices: Auditing Devices ================ Every phone, tablet, or PC that runs |AUDITSOFTWARE| registers itself with |APPNAME| as an *audit device*. The Auditing Devices page is where you see at a glance which devices are connected, who is using them, how recently they synced, and where they last phoned home from. It is also where you approve a new device the first time it connects. To open the list, go to :blue:`Account` | :blue:`Advanced` | :blue:`Audit Devices`. .. _auditingdevices.list: Device List ----------- .. figure:: /images/lightmode/auditing-devices-list.png :align: center |br| Stat Chips ^^^^^^^^^^ Cards across the top give you an immediate rollup: * ``Total Devices`` --- every registered device. * ``Online`` --- devices that have synced within the last hour. * ``Offline`` --- devices that have not synced recently. * ``Public IP`` --- devices connecting from a public IP address. * ``Private IP`` --- devices on a private network (inside a firewall or NAT). Page Header Actions ^^^^^^^^^^^^^^^^^^^ * ``Map`` --- opens the :ref:`auditingdevices.map` view of every device plotted by IP location. * ``Export`` --- saves the current (filtered) list to HTML, CSV, or Excel. Filtering ^^^^^^^^^ The toolbar scopes the list without reloading the page: * ``Search devices…`` --- matches text anywhere in the device name, auditor, or unit. * ``All Statuses`` --- show ``Online``, ``Offline``, or all devices. A device is *online* when it has synced within the last hour. * ``All Auth`` --- show ``Pending Approval``, ``Approved``, or ``Revoked`` devices. Use this to find new devices that are waiting to be let in. * Refresh --- reload the list without losing your filter selections. Row Columns ^^^^^^^^^^^ Each row is one device: * ``Status`` --- green dot when the device is online, grey when it is offline. * ``Device Name`` --- the identifier |AUDITSOFTWARE| registers with when it first connects. By default this encodes the platform and device id (for example ``ca.cp2go.ios.arm.64.0.tablet.ipad.auditor.0``); you can rename it from the edit dialog. * ``Last Sync`` --- when the device last uploaded observations. * ``Last Seen`` --- when the device last checked in (even without uploading). * ``Audits`` --- how many audit sessions have been recorded on this device. * ``Auditor`` --- the user currently signed in on the device. * ``Unit`` --- the patient care area the device is assigned to, if any. * ``Auth`` --- ``Approved`` / ``Pending`` / ``Revoked``. * ``IP Address`` --- click the icon to pop up an IP location map showing where the device last connected from. The ``Status`` and ``Auth`` pills on each row are labels only. To change a device's assigned account or status, use the row action menu below. Row Action Menu ^^^^^^^^^^^^^^^ Click the three-dot icon at the end of any row: * ``Edit`` --- opens :ref:`auditingdevices.edit` so you can rename the device or update its auditor, unit, or status. * ``Approve Device`` --- *only shown when* ``Auth`` *is* ``Pending``. Opens the account picker so you can scope the device to one account and let it sync. * ``Re-approve Device`` --- *only shown when* ``Auth`` *is* ``Revoked`` *or* ``Expired``. Brings a previously revoked device back online after picking the account to scope it to. * ``Revoke Access`` --- *only shown when* ``Auth`` *is* ``Approved``. Stops the device from syncing without deleting it; past observations stay in place. * ``Delete`` --- permanently removes the device record after a confirmation prompt. Bulk Selection ^^^^^^^^^^^^^^ Tick one or more checkboxes to reveal the bulk-selection bar, then ``Delete Selected`` to remove several devices at once. Click the ``x`` to clear the selection. .. _auditingdevices.edit: Editing a Device ---------------- Open the three-dot action menu at the end of any row and choose ``Edit`` to rename the device or change how it's assigned. .. figure:: /images/lightmode/auditing-devices-edit.png :align: center |br| * ``Device ID`` --- the permanent id |APPNAME| assigned to the device. Read-only. * ``Device Name`` --- a friendly name that replaces the auto-generated identifier in lists, reports, and dashboards. * ``Auditor`` --- the default auditor signed in on the device. * ``Unit`` --- the patient care area the device normally audits. * ``Status`` --- mark the device ``Online`` or ``Offline`` manually. Useful when you need to retire a device without deleting it. Click ``Save Changes`` to keep your edits or ``Cancel`` to discard them. .. _auditingdevices.approval: Approving a New Device ---------------------- The first time a device connects to |APPNAME| it arrives with its auth status set to ``Pending``. It can log in and start collecting observations, but its data is held back until an administrator approves it. Filter the list by ``Auth`` → ``Pending Approval`` to find new arrivals quickly. From the three-dot action menu on a pending device, choose ``Approve Device``. You are prompted to pick the account the device should be scoped to --- the device can only see and upload data for that account afterwards. If a device is later lost, stolen, or decommissioned, choose ``Revoke Access`` from the same menu. A revoked device can no longer sync; its past observations stay in place. A previously revoked device can be brought back online with ``Re-approve Device``. .. _auditingdevices.map: Audit Device Map ---------------- The Map view plots every device at the rough geographic location of its most recent public IP address. It is reached from the ``Map`` button on the device list. .. figure:: /images/lightmode/auditing-devices-map.png :align: center |br| The chips at the top of the map show the split between online / offline devices and between public / private IPs, and how many devices could be located on the map. Use the ``All Statuses`` dropdown to show only online or only offline devices. Click a marker to see the device name, last-sync time, and the IP address it reported from. .. note:: Devices on a private network (for example on-premise Wi-Fi behind a NAT) cannot be located by IP — they are counted in the ``Private`` chip but do not appear as pins on the map. IP Location Popup ----------------- From the device list, click the IP address icon on any row to open the IP Location popup without leaving the list view. The popup shows the ISP, rough city, and a small Leaflet map centered on that location. This is the quick way to verify a new device is connecting from where you expect before approving it.