cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
brianraley
Engaged Sweeper III
How can I create a copy of the existing Windows OS/SP Overview widget and modify it so that I can show the same report only by location?
1 REPLY 1
Daniel_B
Lansweeper Alumni
This reply is a bit late, but for the interest of all:

To create a copy of an existing widget:
  • Open Configuration\Widgets and look up the name of the widget you would like to copy.
  • On your Lansweeper server, open the folder Program files (x86)\Lansweeper\Website\Widgets
  • Copy the widget (ASPX file) and paste it under a new name into the folder Program files (x86)\Lansweeper\Website\WidgetsCustom
  • On your web console under Configuration\Widgets, hit Add Custom Widget
  • Enter the name of the new Widget and its file name as you defined it before
  • Now you can add this custom widget to your dashboard


Regarding the modification in this case:

You need to go through the code of the widget and modify it according to your requirement. In this case it is more easy. Add a new database query which will read the IP locations you defined under Configuration\Asset groups, section IP Address Range locations. They are saved in tsysIPLocations.
Loop through the result of this query and add a Join to tsysIPLocations to the query which is already in the Windows OS/SP Overview Widget.

Please find the resulting custom widget attached. Save it in your WidgetCustom folder and change it to an ASPX file.

For information on how to create/modify widgets, please also read this KB article.