Commit 86ff568a authored by Claes Sjofors's avatar Claes Sjofors

Xtt, menu item System-History added, and command 'show history'

parent 55bf351e
......@@ -110,6 +110,7 @@ xnav_sStartMenu Xtt::system_menu[] = {
{ "System Status", xnav_eItemType_Command, menu_ePixmap_Map, (void *) "show nodeinfo"},
{ "Nodes", xnav_eItemType_Command, menu_ePixmap_Map, (void *) "show nodeobjects"},
{ "Volumes", xnav_eItemType_Command, menu_ePixmap_Map, (void *) "show volumes"},
{ "History", xnav_eItemType_Command, menu_ePixmap_Map, (void *) "show history"},
{ "", 0, 0, NULL}};
xnav_sStartMenu Xtt::root_menu[] = {
{ "Database", xnav_eItemType_Command, menu_ePixmap_Map, (void *) "show database"},
......
......@@ -2892,6 +2892,44 @@ static int xnav_show_func( void *client_data,
return XNAV__HOLDCOMMAND;
}
}
else if ( cdh_NoCaseStrncmp( arg1_str, "HISTORY", strlen( arg1_str)) == 0)
{
int sts;
pwr_tOid root;
pwr_tOid child;
Item *item;
int cnt;
// Get the toplevel objects
sts = gdh_NameToObjid( "pwrNode-sev", &root);
if ( EVEN(sts)) {
xnav->message( 'E', "No storage server on this node");
return XNAV__SUCCESS;
}
// Loop through all root objects and see if they are valid at toplevel
cnt = 0;
for ( sts = gdh_GetChild( root, &child);
ODD(sts);
sts = gdh_GetNextSibling( child, &child)) {
if ( cnt == 0) {
xnav->brow_pop();
brow_SetNodraw( xnav->brow->ctx);
}
sts = xnav->create_object_item( child, NULL, flow_eDest_IntoLast,
(void **)&item, 0);
cnt++;
}
if ( !cnt) {
xnav->message('E', "No history objects found");
return XNAV__SUCCESS;
}
brow_ResetNodraw( xnav->brow->ctx);
brow_Redraw( xnav->brow->ctx, 0);
}
else
{
/* This might be a system picture */
......
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