Tagged with drilling-down - Visokio Forums http://forums.visokio.com/discussions/tagged/drilling-down/feed.rss Mon, 30 Oct 17 16:10:28 -0400 Tagged with drilling-down - Visokio Forums en-CA Parameters: On-demand parametric data set delivery http://forums.visokio.com/discussion/2783/parameters-on-demand-parametric-data-set-delivery Fri, 12 Dec 2014 06:55:27 -0500 Veaceslav 2783@/discussions Generate custom dashboards on demand

Scenario/Problem


You have an Omniscope server (2.9 or higher) installed and publicly available at your-omniscope.your-domain.com

In addition, you have another web server (Apache, Jetty, etc) providing services or any useful information to your customers/users. For the purpose of this post I'll consider that you have an apache web server at your-apache.your-domain.com, even though you can achieve this with most web servers.

On a particular page on your Apache web server you have a list of links that you want to open different dashboards based on some particular parameter (e.g. user id)
A link might look like this: http://your-apache.your-domain.com/users?userid=5

Clicking that link the user should see a dashboard page having data that concerns him/her, the dashboard would be generated on the fly.

You have a dashboard/IOK file configured to load data from a particular SQL database.

You want to load data that matches a parameter for a particular user. E.g.
SELECT * FROM [dbo].[bigtable] WHERE [somefield]={{Userid}}

Solution


IOK File

1. Open the IOK file, DataManager tab and add a parameter. E.g. Name: Userid, Type: Fixed value, Data type: Integer, Value: 3

2. Open database source block and add your custom SQL query. E.g.
SELECT * FROM [dbo].[bigtable] WHERE [Liq Cat]={{Userid}}

3. Save your file

image

Your apache web server

1. Implement a request handler to deal with your special GET requests http://your-apache.your-domain.com/users?userid=5 and read user id value. The server will not send a response unless all next steps finish executing (either successfully or not)

2. Generate an action file (e.g. Action.xml) that:
  • Sets data manager parameter value (for Userid parameter)
  • Refreshes from source, this sub-action will execute the SQL query again and load records matching the new user id
  • Save IOK file to a new unique location in mobile folder. E.g. mobile/custom-dashboards/12345.iok


<?xml version="1.0" encoding="UTF-8"?>
<schedulerFileAction source="/location-of-your-iok-file/file.iok" logTimings="false">
<subActions>
<schedulerFileActionSetDataManagerParameterValue parameterName="Userid">
<binding>
<manualparambinding type="INTEGER" publishedPublicly="false">
<values>
<e>
<v type="java.lang.Long" value="5" />
</e>
</values>
</manualparambinding>
</binding>
</schedulerFileActionSetDataManagerParameterValue>
<schedulerFileActionRefreshFromSource clearCacheBefore="true" clearCacheAfter="true" failOnError="false" />
<schedulerFileActionSaveIok location="/location-of-our-new-dashboard/12345.iok" />
</subActions>
</schedulerFileAction>


3. Execute the new action
E.g. On windows (same parameters on Linux -executeAction /some-path/Action.xml)
OmniscopeEnterprise.exe -executeAction "some-path\Action.xml"

4. Once the scheduler action is executed successfully, your Apache web server will return a redirect response to the client

The client/browser will be redirected to your-omniscope.your-domain.com/custom-dashboards/12345.iok

You may want to set up a proper back-end configuration, hardware load balancer + software load balancer, caching requests, etc. Also, you may want to make sure your paths are randomly generated, to prevent other users from viewing other dashboards.
]]>
Drill Though Pop-up Views? http://forums.visokio.com/discussion/443/drill-though-pop-up-viewss Mon, 11 Oct 2010 13:59:50 -0400 Jon 443@/discussions