Skip to main content

NightWatchman Enterprise 7.3

Additional tile settings

By default, Enterprise View tiles are set to not refresh. That is, in order to view any data that has changed in the database or local XML data must refresh or reload the page.

There is an auto-refresh parameter that can be set as part of the tile definition that makes the tile automatically re-run its query to get any new data at a specified interval.

To do this, add the RefreshFrequencyMins parameter to the DashboardTile element.

<?xml version="1.0" encoding="utf-16" ?>
<DashboardTile xmlns="http://www.1e.com/2009/DashboardTile.xsd"
               xmlns:table="http://www.1e.com/2009/StandardTable.xsd"
               xmlns:res="http://www.1e.com/2009/DashboardResources.xsd"
   Title="{Title}" 
   Description="{Description}" Type="Standard"
   Activator="StandardListViewActivator"
   ThumbnailSource="table.png"
   RefreshFrequencyMins="5">
Defining tile permissions

By default, there are no permissions defined. This means that all users have access to Enterprise View. Enterprise View handles tile permissions through definitions for roles and users. The roles are defined with the specific tiles they are able to view and users are then associated with these roles.

Tile access is configured by creating the following file in:

%programfiles%\1E\Dashboard\Dashboard.Web\Source\TileAuthorization.xml

An empty version of the file contains the following:

<?xml version="1.0" encoding="utf-8" ?> <Authorization xmlns="http://www.1e.com/2009/TileAuthorization.xsd"> </Authorization>
Defining Roles

Roles are defined within the <Role> element which has the following attributes:

Attributes

Default value

Notes

Name

The name for the role. Used when defining the users that have the role.

Description

A description for the role.

DefaultPermission

Allowed

Sets the default permission for the role. Values are:

  • Allowed

  • Denied

Adding an exception to the role definition counteracts the default permission for the role for a particular tile. You can either leave the default permission for the role as Allowed and define exceptions for tiles where access is denied, or you can set the default permission to Denied and define exceptions where access is allowed.

The following illustrates a definition where Developers have access to all tiles except FirstTile and SecondTile:

<Role 
   Name="Developers" 
   Description="Developers and Technicians Role" >
   <Exception TileIdentifier="FirstTile"/>
   <Exception TileIdentifier="SecondTile"/>
</Role>

The following illustrates a definition where Developers cannot access any tiles except FirstTile and SecondTile.

<Role 
   Name="Developers" 
   Description="Developers and Technicians Role" 
   DefaultPermission="Denied" >
   <Exception TileIdentifier="FirstTile"/>
   <Exception TileIdentifier="SecondTile"/>
</Role>
Defining Users

Having defined the roles, you associate them with specific users. This is done with <RoleAccountMapping> which has a single attribute that specifies the role being associated.

  • Role – set to the name of a previously defined Role name.

Next, you add account definitions for each user you want to associate with the named role. This is done with <Account> which has a single attribute that specifies the user account:

  • Name – set to the AD account name for the user.

For example, the following sets a user for the Developers role defined earlier:

<RoleAccountMapping Role="Developers">
   <Account Name = "ACME\Ned.Zeppelin" />
</RoleAccountMapping>
Globalization

To enable globalization and resources for a particular tile, add the following to the DashboardTile tag:

xmlns:res="http://www.1e.com/2009/DashboardResources.xsd"

The resource dictionary and setter definitions use the object name ref. The resources are defined in <Resources></Resources>. Each collection of language resources are defined in <res:ResourceDictionary></res:ResourceDictionary> which has a single attribute that defines the language code used.

  • Language – defines the language code. This is matched against the language code used in the browser where the tile is displayed. For example, the following illustrates a resource dictionary for US English:

    <res:ResourceDictionary Language="en-US">
       …US English setters go here…
    </res:ResourceDictionary>

The contents of a resource dictionary consist of <res:Setter> entries where you can set the following attributes:

  • Property – the name used to reference the resource

  • Value – the value to be substituted where the property name is referenced.

For example, the following illustrates a resource setter for a en-US resource dictionary:

<Resources>
<res:ResourceDictionary Language="en-US">
   <res:Setter Property="Title" Value="Aluminum" />
</res:ResourceDictionary>

and the following is the equivalent resource for an en-GB resource dictionary:

<Resources>
<res:ResourceDictionary Language="en-GB">
   <res:Setter Property="Title" Value="Aluminium" />
</res:ResourceDictionary></Resources>

This is referenced in the DashboardTile element for a tile definition as follows:

<DashboardTile xmlns="http://www.1e.com/2009/DashboardTile.xsd" 
               xmlns:res="http://www.1e.com/2009/DashboardResources.xsd" 
   Title="{Title}" 
   …rest of tag definition…>

When viewing the tile, it is displayed as Aluminum or Aluminium depending on the en-US or en-GB language set.

Setting default dashboard tiles

If you want users to see a default set of tiles when they first connect to the Enterprise View website, rather than having to go through the configuration stage, add a DefaultDashboard.xml definition to the Enterprise View\Dashboard.Web\Source\Dashboards directory. This file contains a list of named tiles to display.

The following shows an example DefaultDashboard.xml definition with eight of the NightWatchman tiles set as default.

<?xml version="1.0" encoding="utf-8" ?>
<Dashboard xmlns="http://www.1e.com/2009/Dashboard.xsd">
  <Tile Path="NWMPowerSchemeCompliance.xml"/>
  <Tile Path="NWMSavingsToDate.xml"/>
  <Tile Path="NWMDailyPowerCost.xml"/>
  <Tile Path="NWMInstalledOperatingSystems.xml"/>
  <Tile Path="NWMMonthlySavings.xml"/>
  <Tile Path="NWMEnergyCostPerCapita.xml"/>
  <Tile Path="NWMTopFiveHardwareTypes.xml"/>
  <Tile Path="NWMTopFiveWorstHardwareTypes.xml"/>
</Dashboard>