Best practices for creating custom dashboard widgets

Datto RMM provides a library of prebuilt widgets you can add to a dashboard. Refer to Widget Library. On occasion, you may discover the need to create a custom widget for a specific purpose. This article explains how to use a combination of components, user-defined fields, and filters to create a custom dashboard widget.

Consider the following scenario:

EXAMPLE  “I need to show all the Windows devices that have a copy of Microsoft Windows that hasn’t been activated.”

First, you will need to collect the activation status of the Windows devices. You can use a prebuilt component from the ComStore to do so. Search for Get Windows Activation Status to User-Defined Field [WIN] in the ComStore and add it to your Component Library. Refer to ComStore and Component Library.

You will need to run this component on Windows devices to extract the activation status of the operating system. You can run the component either as a quick job against one or more devices or schedule it to run on a regular basis. Refer to Quick jobs and Scheduled jobs.

NOTE   Desktops, in this context, refer to operating system class rather than chassis type.

Once the job has executed against the target devices, you should see the current operating system activation status information in the user-defined field you specified when you created the job. Refer to User-defined fields.

Now, the data in the user-defined field can be included in a custom filter, as shown in the following example. For more information about filters, refer to Device filters.

Once a filter is collecting all the devices together, you can use it as a data source for a dashboard widget.

In a dashboard, you can add a new device filter widget from the Widget Library. Refer to Device Filter in Widget Library.

You now have a dashboard widget showing the number of Windows devices that have not been activated.

Other examples of uses cases include custom dashboard widgets for devices that do not have BitLocker enabled, devices with the wrong antivirus product installed, and so forth.