| Styling > Customizing Object States > Customizing Alarm Severities |
Customizing Alarm Severities |
INDEX
PREVIOUS
NEXT
|
JViews TGO provides the concept of alarm to represent specific conditions in a managed object. Alarms are represented graphically using alarm balloon and alarm count decorations. JViews TGO distinguishes raw alarms (generated and carried by an object) from impact alarms (propagated to an object). A telecom object can have raw and impact alarms at the same time, which introduces the concepts of primary and secondary alarm states. The primary alarm state has a more detailed representation than the secondary alarm state. By default, the primary alarm state is the raw alarm state. The choice of the primary alarm state can be customized by the CSS properties listed in the following table:
Refer to section Alarms and Alarm States in the Business Objects and Data Sources documentation for more information.
In the following example, a new raw alarm severity named "Informational" is created with the following properties:
The new alarm severity is positioned before the Unknown severity in the IltAlarm.Severity enumeration.
IltAlarm.Severity infoSeverity =
new IltAlarm.Severity("Informational",
IltAlarm.Severity.Unknown.getSeverity()/2);
To create a new impact alarm severity use the IltAlarm.ImpactSeverity enumeration instead of IltAlarm.Severity.
You can also create new raw and impact alarm severities by using global CSS settings:
Settings {
alarm: true;
}
Alarm {
severities[0]: @+severity0;
impactSeverities[0]: @+impactSeverity0;
}
Subobject#severity0 {
class: 'ilog.tgo.model.IltAlarm.Severity';
name: "Informational";
severity: 210;
}
Subobject#impactSeverity0 {
class: 'ilog.tgo.model.IltAlarm.ImpactSeverity';
name: "InformationalLow";
severity: 220;
}
Alarms are represented in the business objects using the following graphical cues:
Refer to Alarm States in the Business Objects and Data Sources documentation for information on how these graphical cues are used in JViews TGO.
When a new alarm severity is created, the properties used to customize the graphical cues need to be defined. These properties are:
alarmBalloonCollapsed is false.
These properties are set as part of the JViews TGO look and feel, which can be customized using IltSettings.SetValue or global CSS settings.
The properties that affect the alarm severities are:
<severity category>.<severity name>.Color
<severity category>.<severity name>.BrightColor
<severity category>.<severity name>.DarkColor
<severity category>.<severity name>.Abbreviation
<severity category>.<severity name>.Description
<severity category>.<severity name>.Icon
For the raw alarm severity created in How to Create New Alarm Severities (using the API), the following properties will have to be defined:
Alarm.Raw.Informational.Color
Alarm.Raw.Informational.BrightColor
Alarm.Raw.Informational.DarkColor
Alarm.Raw.Informational.Abbreviation
Alarm.Raw.Informational.Description
Alarm.Raw.Informational.Icon (This property is optional.)
The following example shows how you should customize the new alarm severity using the API:
// Define the colors
Color myAlarmColor = new Color(127, 255, 212);
// aquamarine
Color myAlarmBrightColor = myAlarmColor.brighter();
Color myAlarmDarkColor = myAlarmColor.darker();
IltSettings.SetValue("Alarm.Raw.Informational.Color", myAlarmColor);
IltSettings.SetValue("Alarm.Raw.Informational.BrightColor", myAlarmBrightColor);
IltSettings.SetValue("Alarm.Raw.Informational.DarkColor", myAlarmDarkColor);
IltSettings.SetValue("Alarm.Raw.Informational.Abbreviation", "i");
IltSettings.SetValue("Alarm.Raw.Informational.Description", "Informational");
You can then retrieve these values using IltSettings.GetValue.
The following example shows how to customize the new alarm severity using global CSS settings (you must specify the full alarm name, for example "Alarm.Raw.Informational" or "Alarm.Impact.InformationalLow" when matching the "name" attribute. The CSS properties to be customized are color, darkColor, brightColor, abbreviation, description, icon):
setting."ilog.tgo.model.IltAlarm.Severity"[name="Alarm.Raw.Informational"] {
color: orange;
darkColor: blue;
brightColor: yellow;
abbreviation: "i";
description: "Informational";
icon: '@|image("icon1.png")';
}
setting."ilog.tgo.model.IltAlarm.ImpactSeverity"[name="Alarm.Impact.InformationalLow"] {
color: orange;
darkColor: blue;
brightColor: yellow;
abbreviation: "IL";
description: "InformationalLow";
icon: '@|image("icon1.png")';
}
You can also customize the representation of the existing alarm severities, for example, Raw.Critical or Impact.CriticalHigh.
To do so, you use the same properties as listed in How to Customize Alarm Severities:
<severity category>.<severity name>.Color
<severity category>.<severity name>.BrightColor
<severity category>.<severity name>.DarkColor
<severity category>.<severity name>.Abbreviation
<severity category>.<severity name>.Description
<severity category>.<severity name>.Icon (This property is optional.)
The following example shows how to customize the severity Impact.CriticalHigh using the API:
// Define the colors
Color myAlarmColor = Color.magenta;
Color myAlarmBrightColor = myAlarmColor.brighter();
Color myAlarmDarkColor = myAlarmColor.darker();
IltSettings.SetValue("Alarm.Impact.CriticalHigh.Color", myAlarmColor);
IltSettings.SetValue("Alarm.Impact.CriticalHigh.BrightColor", myAlarmBrightColor);
IltSettings.SetValue("Alarm.Impact.CriticalHigh.DarkColor", myAlarmDarkColor);
IltSettings.SetValue("Alarm.Impact.CriticalHigh.Abbreviation", "CH");
IltSettings.SetValue("Alarm.Impact.CriticalHigh.Description", "Critical High");
The following example shows how to customize the severity Impact.CriticalHigh using global CSS settings (you must specify the full alarm name, for example "Alarm.Raw.Critical" or "Alarm.Impact.CriticalHigh" when matching the "name" attribute. The CSS properties to be customized are color, darkColor, brightColor, abbreviation, description, icon):
setting."ilog.tgo.model.IltAlarm.Severity"[name="Alarm.Raw.Critical"] {
color: orange;
darkColor: blue;
brightColor: yellow;
abbreviation: "c";
description: "Critical";
icon: '@|image("icon1.png")';
}
setting."ilog.tgo.model.IltAlarm.ImpactSeverity"[name="Alarm.Impact.CriticalHigh"] {
color: orange;
darkColor: blue;
brightColor: yellow;
abbreviation: "CH";
description: "CriticalHigh";
icon: '@|image("icon1.png")';
}
You can define the following settings to customize the representation of objects that have the state Loss of Connectivity set.
Alarm.LossOfConnectivity.Color
Alarm.LossOfConnectivity.BrighColor
Alarm.LossOfConnectivity.DarkColor
Alarm.LossOfConnectivity.Abbreviation
The following code extract shows you how to proceed using the API:
IltSettings.SetValue("Alarm.LossOfConnectivity.Color", Color.blue);
IltSettings.SetValue("Alarm.LossOfConnectivity.Abbreviation", "??");
The following example shows how to proceed using global CSS settings (you must specify the full alarm loss of connectivity name, for example "Alarm.LossOfConnectivity" when matching the "name" attribute. The CSS properties to be customized are color, darkColor, brightColor, abbreviation):
setting."ilog.tgo.model.IltState"[name="Alarm.LossOfConnectivity"] {
color: orange;
darkColor: green;
brightColor: yellow;
abbreviation: "LOC1";
}
By default, objects in the Not Reporting state do not show any alarm information. They display the value "NR" instead of the current alarm count.
You can customize this representation using the setting Alarm.NotReporting.Abbreviation.
The following code extract shows you how to proceed using the API:
IltSettings.SetValue("Alarm.NotReporting.Abbreviation", "NR?");
The following example shows how to proceed using global CSS settings (you must specify the full alarm Not Reporting name, "Alarm.NotReporting" when matching the "name" attribute. The CSS property to be customized is abbreviation):
setting."ilog.tgo.model.IltState"[name="Alarm.NotReporting"] {
abbreviation: "NR1";
}
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |