Home
  • RapidOSS
  • Support
  • About Us
Home » Blogs » Sezgin's blog

RapidOSS SIMILE Timeline Integration

Posted September 11th, 2007 by Sezgin
in
  • EMC Smarts
  • Mashups
  • Netcool
  • RapidInsight
  • RapidOSS
  • Simile Timeline
  • Smarts

RapidOSS is designed to integrate disparate management systems, databases etc. with its flexible scripting support in the server side, and AJAX UI in the client side. We have demonstrated with Google Maps integration, how it supports mashups in a previous post. Recently, we have added a timeline component, a DHTML-AJAX based widget for visualizing time based events, which makes use of SIMILE Timeline widget. Now we will go through a scenario how you can use this new UI component in the RapidOSS context.

RapidOSS object database actually stores real time data, but it listens all changes in the repository and provides a hook mechanism with its listening scripts. To display a time based data, we must have a historical data information, and we can obtain this with listening the removal of the objects from the RapidOSS repository and save them to an appropriate data inventory. Suppose we have a UI configuration where topology is presented in a tree and events are shown using the grid components.

Now we want to display the event history for each device using our Timeline component. I'll briefly explain how you can implement the scenario using RapidOSS features.

Step1:Event History Database

RapidOSS includes an embedded Derby database instance, and provides database access mechanisms in its scripting framework. Before repository is populated with data, we can configure a periodic script with a long execution interval to create a table, which will store the old events. You can create as many fields as necessary, to store event fields you'd like to keep and display them later on. Here is the code snippet that executes this task:

-
conn = ExtProxy.getDatabaseDatasource("rasDB").getConnection();
stmt = conn.createStatement();
def query = "CREATE TABLE EVENTHISTORY (IDENTIFIER varchar(255), ....)";
stmt.execute(query);

Step2: Storing Removed Events

Now we will configure a listening script which listens the removed events from the RapidOSS repository and stores them at the database. Here is how you can implement this task:

-
if(eventType == "REMOVE_CHILD")
{
    def childObject = childNode.getObject();
    if(childObject.getProperty(RI_TYPE) == "Event"){
         conn = ExtProxy.getDatabaseDatasource("rasDB").getConnection();
        stmt = conn.createStatement();
         .....
         def query = "insert into EVENTHISTORY values(.....)";
          stmt.execute(query);
    }
}

You can reach the whole script here.

Step3: Timeline Component Script

As you remember from the previous post, RapidOSS UI components needs a server side script to consume their data. As we want to display event history of any device, we pass the device name as parameter to the script, fetch the related data from the database and return it to the client in a special xml format.

-
<data>
        <event title="IBDatabasePri Unstable" start="Sep 10 2007 13:39:12 GMT" end="Sep 10 2007 14:05:43 GMT" isDuration="true">
                Indicates that the system has repeatedly restarted over a short
                period of time and is considered unstable.
        </event>
        ....
</data>

As you can see event information (we've chosen) consists of event title, start and end dates which shows how long the event had been active and an event text to be displayed on a tooltip. Extra attributes can be populated to exchange data between RapidOSS UI components. You can read more on this, in SIMILE Project site. Also you can reach the whole script here.

Step4: UI Configuration

As you remember, RapidOSS UI components are configured in a server side xml file. Here is how you can configure our Timeline component.

-
.......
<Timeline Url="getEventHistory" Title="Timeline" Id="eventHistory" RefreshRate="0" DynamicTitle="true" TitlePrefix="Event History Of ">
        <Bands>
                <Band Width="70%" IntervalUnit="Hour" IntervalPixels="100"></Band>
                <Band Width="30%" IntervalUnit="Day" IntervalPixels="200" SyncWith="0" Highlight="true" ShowText="false" TrackHeight="0.5"></Band>
        </Bands>
        <Tools>
                <ErrorTool/>
        </Tools>
</Timeline>
......

As can be seen, I've defined two bands which will show events in hourly and daily basis. We will configure the component as popup dialog window which will be displayed with a right click context menu action from the tree.

You can see the timeline component in action, as described in this post, by watching this screencast or try the live demo implementation of RapidOSS available on our website.

  • Login or register to post comments

 Social Bookmark

  • Mashup comes to IT management: RapidOSS Google Maps integration
  • Simple consistent interfaces to external systems
  • RapidOSS: what is it good for? - The broken client
  • RapidOSS as the web interface for Netcool
  • Managing Planned and Unplanned Maintenance with RapidOSS

  • Create new account
  • Request new password