搜索

此内容没有您所选择的语言版本。

Chapter 5. Practical tutorial: Connecting to a data source

download PDF

This next exercise is optional and relies on you having an external data source available to use. In the exercise, we are going to connect to an external data source via the Dashboard Builder. We are going to be largely covering the same ground as in the exercise above but we will be going into a little more detail to make you really familiar and comfortable with the technology.

You can connect either to a JNDI data source, that is, a data source set up and accessible from the application container, or directly to the data source as a custom data source, if the application container has the correct JDBC driver deployed.

Here is how you connect to an external data source:

5.1. Prerequisites

Name

Description

Red Hat JBoss Data Virtualization

Red Hat JBoss Data Virtualization must be installed and running. (Please refer back to the Getting Started Guide if you need a refresher on this.)

Dashboard Builder Account and Password

You must have a valid account and password. (You would have set this up during installation.)

A data source

You must have a data source to which you can connect.

  1. Make sure the data source is up and running and that the application server has access to the data source. (Check the driver, the log-in credentials,and so forth. In Red Hat JBoss EAP 6, you can do so in the Management Console under Subsystems Connector Datasources.)
  2. In Dashboard Builder, on the Tree Menu (by default located on the Showcase perspective), go to Administration External connections.
  3. On the displayed External Connection panel, click the New DataSource button.
  4. Select the data source type (JNDI or Custom DataSource) and provide the respective data source parameters.

You must now create a new data source:

To create a new data provider, do the following:

  1. In the Tree Menu (the panel in the lateral menu of the Showcase workspace), click Administration Data providers.
  2. In the Data Providers panel, click the Create new data provider button.
  3. In the updated Data Providers panel, select the type of the data provider (depending on the source you want the data provider to operate on) from the Type menu.
  4. Define the data provider parameters:

    1. Data provider over a CSV file

      1. Name: user-friendly name and its locale
      2. CSV file URL: the url of the file (for example, file:///home/me/example.csv)
      3. Data separator: the symbol used as separator in the CSV file (the default value is semicolon; if using comma as the separator sign, make sure to adapt the number format if applicable)
      4. Quoting symbol: the symbol used for quotes (the default value is the double-quotes symbol; note that the symbol may vary depending on the locale)
      5. Escaping symbol: the symbol used for escaping the following symbol in order to keep its literal value
      6. Date format: date and time format
      7. Number format: the format of numbers as resolved to thousands and decimals
    2. Data provider over a database (SQL query)

      1. Name: user-friendly name and its locale
      2. Data source: the data source to query (the default value is local, which allows you to query the Dashboard Builder database)
      3. Query: query that returns the required data
  5. Click Attempt data load to verify the parameters are correct.
  6. Click Save.
  7. In the table with the detected data, define the data type and if necessary provide a user-friendly name for the data. Click Save.

The data provider can now be visualized in an indicator on a page of your choice.

Next, you must create a workspace again:

  1. Click the Create workspace button on the top menu.
  2. In the Create workspace table on the right, set the workspace parameters:

    1. Name: workspace name and its locale
    2. Title: workspace title and its locale
    3. Skin: skin to be applied on the workspace resources
    4. Envelope: envelope to be applied on the workspace resources
  3. Click Create workspace.
  4. Optionally, click the workspace name in the tree menu on the left and in the area with workspace properties on the right define additional workspace parameters:

    1. URL: the workspace URL
    2. User home search: the home page setting
    3. If set to Role assigned page, the home page as as in the page permissions is applied; that is, every role can have a different page displayed as its home page. If set to Current page, all users will use the current home page as their home page.

To create a new page, do the following:

  1. Make sure you are in the correct workspace.
  2. Next to the Page dropdown box in the top menu, click the Create new page button.
  3. In the Create new page table on the right, set the page parameters:

    1. Name: page name and its locale
    2. Parent page: parent page of the new page
    3. Skin: skin to be applied on the page
    4. Envelope: envelope to be applied on the page
    5. Page layout: layout of the page
  4. Click Create new page.
  5. Optionally, click the page name in the tree menu on the left and in the area with workspace properties on the right define additional page parameters:

    1. URL: the page URL
    2. Visible page: visibility of the page
    3. Spacing between regions and panels

Although users are usually authorized using the authorization method setup for the underlying application container (on Red Hat JBoss EAP, the other security domain by default), the Red Hat JBoss Dashboard Builder has its own role-based access control (RBAC) management tool to facilitate permission management on an individual page or multiple pages.

To define permissions on a page or all workspace pages for a role, follow these steps:

  1. On the top menu, click the General configuration button.
  2. Under the Workspace node on the left, locate the Page or the Pages node.
  3. Under the Page or Pages node, click the Page permissions node.
  4. In the Page permissions area on the right, delete previously defined permission definition if applicable and define the rights for the required role:

    1. In the Permission assignation table, locate the Select role drop-down menu and pick the respective role.
    2. In the Actions column of the table, enable or disable individual permissions.
  5. Click Save. Although users are usually authorized using the authorization method setup for the underlying application container (on Red Hat JBoss EAP, the other security domain by default), the Red Hat JBoss Dashboard Builder has its own role-based access control (RBAC) management tool to facilitate permission management on an individual page or multiple pages.

A panel is a GUI widget which can be placed on a page. There are three main types of panels:

  1. Dashboard panels are the primary business activity management panels and include the following:

    1. Data provider manager: a panel with a list of available data providers and data provider management options
    2. Filter and Drill-down: a panel that displays all KPIs and their values to facilitate filtering in indicators on the given page defined over a data provider
    3. HTML Editor panel: a panel with static content
    4. Key Performance Indicator (indicator): a panel that visualizes the data of a data provider
  2. Navigation panels are panels that provide navigation functions and include the following:

    1. Breadcrumb: a panel with the full page hierarchy pointing to the current page
    2. Language menu: a panel with available locales (by default in the top center)
    3. Logout panel: a panel with the name of the currently logged-in user and the logout button
    4. Page menu custom: a panel with vertically arranged links to all pages in the workspace (the list of pages can be adjusted) and general controls for the HTML source of the page
    5. Page menu vertical: a panel with vertically arranged links to all pages in the workspace (the list of pages can be adjusted)
    6. Page menu horizontal: a panel with horizontally arranged links to all pages in the workspace (the list of pages can be adjusted)
    7. Tree menu: a panel with the links to essential features such as Administration, Home (on the Home page of the Showcase workspace displayed on the left, in the lateral menu)
    8. Workspace menu custom: a panel with links to available workspaces (the list of workspaces can be adjusted) and general controls for the HTML source of the workspace
    9. Workspace menu horizontal: a horizontal panel with links to available workspaces (the list of workspaces can be adjusted)
    10. Workspace menu vertical: a vertical panel with links to available workspaces (the list of workspaces can be adjusted)
  3. System panels are panels that provide access to system setting and administration facilities and include the following:

    1. Data source manager: a panel for management of external data sources
    2. Export dashboards: a panel export of dashboards
    3. Export/Import workspaces: a panel for exporting and importing of workspaces

We are now going to add a panel:

  1. Make sure the respective page is open (in the Page drop-down menu of the top menu select the page).
  2. In the top menu, click the Create a new panel in current page button.
  3. In the displayed dialog box, expand the panel type you want to add (Dashboard, Navigation, or System) and click the panel you wish to add.
  4. From the Components menu on the left, drag and drop the name of an existing panel instance or the Create panel item into the required location on the page.
  5. If inserting a new indicator, the Panel view with the graph settings will appear. Define the graph details and close the dialog.
  6. If adding an instance of an already existing indicator, you might not be able to use it, if it is linked to the KPIs on the particular original page. In such a case, create a new panel.
  7. If you need to, edit the content of the newly-added panel.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.