Commit 2882f1c5 authored by Claes Sjofors's avatar Claes Sjofors

Event log method for asup and dsup displays events for attribute, and...

Event log method for asup and dsup displays events for attribute, and HistEvent changed to EventLog (refs #156)
parent e637ae8a
......@@ -1036,7 +1036,7 @@ SObject pwrs:Class
EndObject
Object HistEvent $MenuButton
Body SysBody
Attr ButtonName = "Hist Event..."
Attr ButtonName = "Event Log..."
Attr MethodName = "$Object-HistEvent"
Attr FilterName = "$Object-HistEventFilter"
EndBody
......@@ -1173,7 +1173,7 @@ SObject pwrs:Class
EndObject
Object HistEvent $MenuButton
Body SysBody
Attr ButtonName = "Hist Event..."
Attr ButtonName = "Event Log..."
Attr MethodName = "$Object-HistEvent"
Attr FilterName = "$Object-HistEventFilter"
EndBody
......
......@@ -128,20 +128,42 @@ static pwr_tStatus OpenCrossrefFilter( xmenu_sMenuCall *ip)
}
//
// Hist event
// Event history
//
static pwr_tStatus HistEvent( xmenu_sMenuCall *ip)
{
char cmd[420];
pwr_tAName name;
int sts;
pwr_sAttrRef *objar;
pwr_tAttrRef *objar;
pwr_tCid cid;
pwr_tAttrRef aref;
if (!ip->ItemList || cdh_ObjidIsNull( ip->ItemList[ip->ChosenItem].CurrentObject.Objid))
objar = &ip->Pointed;
else
objar = &ip->ItemList[ip->ChosenItem].CurrentObject;
sts = gdh_GetAttrRefTid( objar, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_DSup:
case pwr_cClass_ASup: {
// Show events for Attribute instead
sts = gdh_ArefANameToAref( objar, "Attribute", &aref);
if ( EVEN(sts)) return sts;
sts = gdh_GetObjectInfoAttrref( &aref, &aref, sizeof(aref));
if ( EVEN(sts)) return sts;
objar = &aref;
break;
}
default: ;
}
sts = gdh_AttrrefToName( objar, name, sizeof(name),
cdh_mName_volumeStrict);
if ( EVEN(sts)) return sts;
......@@ -153,7 +175,7 @@ static pwr_tStatus HistEvent( xmenu_sMenuCall *ip)
}
//
// Open crossref filter
// Event history filter
//
static pwr_tStatus HistEventFilter( xmenu_sMenuCall *ip)
{
......
......@@ -54,7 +54,7 @@ xtt_sMethodButton XttMethodToolbar::m_data[XttMethodToolbar::m_size] =
{"Object Graph", "$Object-OpenObjectGraph","$Object-OpenObjectGraphFilter", "$pwr_exe/xtt_meth_classgraph.png", "Object Graph"},
{"Open Plc", "$Object-OpenTrace", "$Object-OpenTraceFilter", "$pwr_exe/xtt_meth_trace.png", "Open Plc"},
{"DataSheet", "$Object-DataSheet", "$Object-DataSheetFilter", "$pwr_exe/xtt_meth_datasheet.png", "DataSheet"},
{"Hist Event...", "$Object-HistEvent", "$Object-HistEventFilter", "$pwr_exe/xtt_meth_histevent.png", "Hist Event..."},
{"Event Log...", "$Object-HistEvent", "$Object-HistEventFilter", "$pwr_exe/xtt_meth_histevent.png", "Event Log..."},
{"Block Events...", "$Object-BlockEvents", "$Object-BlockEventsFilter", "$pwr_exe/xtt_meth_block.png", "Block Events..."},
{"Open Object", "$Object-OpenObject", "$Object-OpenObjectFilter", "$pwr_exe/xtt_meth_openobject.png", "Open Object"},
{"Crossreferences", "$Object-OpenCrossref", "$Object-OpenCrossrefFilter", "$pwr_exe/xtt_meth_crossref.png", "Crossreferences"},
......
......@@ -1946,7 +1946,7 @@ static int xnav_show_func( void *client_data,
arp = &aref;
}
strcpy( hist_title, Lng::translate( "Hist list"));
strcpy( hist_title, Lng::translate( "Event Log"));
Hist *hist;
hist = xnav->hist_new( hist_title, arp, &sts);
if ( EVEN(sts))
......
......@@ -23,7 +23,7 @@ E 1.1.17 "Fast"
E 1.1.18 "Trend"
E 1.1.19 "CircuitDiagram"
E 1.1.20 "Block Events..."
E 1.1.21 "Hist Event..."
E 1.1.21 "Event Log..."
E 1.1.22 "Alarm List"
E 1.1.23 "Event List"
E 1.1.24 "Historical List"
......@@ -105,6 +105,7 @@ E 1.1.99 "History"
E 1.1.100 " List"
E 1.1.101 "_Login"
E 1.1.102 "Log_out"
E 1.1.103 "Event Log"
#
# Logging entry
E 1.2.1 "Active"
......
......@@ -22,11 +22,11 @@ E 1.1.16 "Foto"
E 1.1.17 "Snabbkurva"
E 1.1.18 "Trendkurva"
E 1.1.19 "KopplingsSchema"
E 1.1.20 "Blockera Hndelser..."
E 1.1.21 "Historisk lista..."
E 1.1.20 "Blockera hndelser..."
E 1.1.21 "Hndelselogg..."
E 1.1.22 "Larmlista"
E 1.1.23 "Hndelselista"
E 1.1.24 "Historisk lista"
E 1.1.24 "Hndelselogg"
E 1.1.25 "Lnkar"
E 1.1.26 "Prenumerationer Klient"
E 1.1.27 "Prenumerationer Server"
......@@ -103,6 +103,9 @@ E 1.1.97 "Verifiera"
E 1.1.98 "Skstrng"
E 1.1.99 "Historik"
E 1.1.100 " Lista"
E 1.1.101 "_Logga in"
E 1.1.102 "Logga _ut"
E 1.1.103 "Hndelselogg"
#
# Logging entry
E 1.2.1 "Aktiv"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment