LANDESK Service Desk 7.7 release included a new ability to have the location of a device recorded at the time a User submits a record. For example, an End User, using Mobile Self Service on their phone might submit an Incident. The location information captured at the time is then used by the IT Service Desk to assign the Incident to the local team. To make it easy for the Service Desk to determine which is the local team, a map showing the location of newly logged Incidents can be generated on Web Access dashboards using a Web Page gadget.
There are several ways to display data, depending on requirements. Therefore, below are described 3 different ways to implement this web page gadget. Please note, some knowledge of HTML and JavaScript is required to implement this solution.
Creating a single gadget that just shows Incident logging data
These instructions are for the simplest application of the new location awareness data, showing the location of all Incidents that have been logged. It assumes that the Incident object has already been set to have its location captured on record creation. For instructions on how to do this, please see the documentation.
1. Copy the attached file geolocationdemo.html to the root of the Web Access directory on the server. By default this is:
C:\Program Files (x86)\LANDesk\Service Desk\WebApp\WebAccess\
2. In Web Access, add a new Web Page type gadget setting the URL to the file you just copied :–
http://servername/ServiceDesk.WebAcces/geolocationdemo.html
3. The gadget should populate with pins showing the geolocation data captured from logged Incidents
Creating a single gadget that shows data from logged Incidents and User Session logins
These instructions show how to add a gadget that shows data from 2 location-enabled objects from a single gadget, their pins show as different colours. These instructions assume that both the Incident and User Session objects have the location aware behaviour enabled.
1. Copy the attached file geolocationdemo.html to the root of the Web Access directory on the server. By default this is:
C:\Program Files (x86)\LANDesk\Service Desk\WebApp\WebAccess\
2. Edit the document and locate the lines
//User Sessions
//moduleName = "System";
//className = "UserSession";
//colour = '|CCFFCC|000000';
//handleLocationClass(moduleName, className, colour);
Remove the comments from this section by deleting the // at the beginning of each line
3. In Web Access, add a new Web Page type gadget setting the URL to the file you just copied :–
http://servername/ServiceDesk.WebAcces/geolocationdemo.html
4. The gadget should populate with pins showing the location data captured from logged Incidents
Creating multiple gadgets
If there are multiple objects that are location aware enabled it might be useful to have them display in separate gadgets. In which case, several web pages should be used. In the example below, the Incident locations will show in 1 gadget while user session locations will appear in another. The instructions assume that both the Incident and User Session objects have the location aware behaviour enabled.
1. Copy the attached file geolocationdemo.html to the root of the Web Access directory on the server. By default this is:
C:\Program Files (x86)\LANDesk\Service Desk\WebApp\WebAccess\
2. Rename the file to geolocationIncdient.html
3. Copy the file to the Web Access root directory again, this time rename it geolocationUserSession.html.
4. Edit the document geolocationUerSession.html and locate the lines
//User Sessions
//moduleName = "System";
//className = "UserSession";
//colour = '|CCFFCC|000000';
//handleLocationClass(moduleName, className, colour);
Remove the comments from this section by deleting the // at the beginning of each line
5. Find the lines
//Incidents
moduleName ="IncidentManagement";
className ="Incident";
var colour ='|00FF00|000000';
handleLocationClass(moduleName, className, colour);
Comment these lines out by adding // at the beginning of each line.
6. In Web Access, add a new Web Page type gadget setting the URL to one of the files.
7. Add a second Web Page gadget, setting the URL to the other file.
Further alterations
Extending the instructions above, it is possible to add gadgets that show data from many location aware enabled objects or many gadgets that show data individually from each object. The key changes to make to the file are to the following lines:
moduleName ="IncidentManagement";
className ="Incident";
var colour ='|00FF00|000000';
handleLocationClass(moduleName, className, colour);
The moduleName variable is the name of each module stored in the database, you can identify this by looking at md_module.md_name. The className variable is the name of the object. This can be identified by looking at md_class_type.md_name.The colour variable is the HEX code for the colour that you wish the pins for this object to appear in. The final line is what calls the Javascript to display the map so should be present for every object you want to configure.