Restore or configure default dashboard for RA user

book

Article ID: 142789

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

Due to change in the LDAP/AD configuration the user doesn't have a default dashboard anymore. Is there a way to restore the users old dashboard or create default automatically.

Environment

  • Release : 6.6
  • Database: Oracle
  • OS: RHEL 6.10

Component : CA RELEASE AUTOMATION RELEASE OPERATIONS CENTER

Resolution

For the dashboard related activities there are two important tables.

  1. dashboard_instances: having dashboard details of the user
  2. users: users info

We will now try to understand possibility of restore or configuring default dashboard for users.

  • If a user is removed from the RA the relative dashboard entries for the same is removed from the respective table in the DB and henceforth there is no way to get back the same dashboard.
  • In case if the user exist in the system but due to re-import of users or change in LDAP configuration a new user-id's have been generated for the user due to change in domain, the relative entries in the dashboard table will exist and updating customer-id to relative new customer id will be able to get the dashboard back.

    Please find relative table and query (in MS-SQL syntax)

    Query: 
    • To get the available dashboard for respective users

SELECT d.id,d.name, d.layout_type,d.content, d.order_num, u.username, u.id as 'user-id' FROM dashboard_instances AS d JOIN users AS u ON u.id=d.user_id;

    • To update the existing dashboard with new customer-id in case customer id changed due to re-import

UPDATE dashboard_instances
  SET user_id=<NEW_USER_ID>
  WHERE user_id=<OLD_USER_ID>

  • In case if we want to insert a default dashboard for may users, we have to do below.
    1. Dashboard Name
    2. Layout Configuration (i.e. rows/column split)
    3. Layout Content value
    4. User id

Please find relative table and query (in MS-SQL syntax)

Query

    • To select a layout-configuration and layout content value create a custom dashboard and capture the value of that dashboard via DB.
    •  
      • SELECT * FROM dashboard_instances WHERE user_id=<USER_ID>;  # we will be selecting Layout Configuration (i.e. rows/column split), Layout Content value
  •  
    • To create dashboard for the users, run the query for respective user id.

INSERT INTO dashboard_instances
  (name, layout_type,content,order_num,user_id) 
  VALUES(<DASHBOARD_NAME>,<LAYOUT_CONFIGURATION>,<LAYOUT_CONTENT>,0,<USER_ID_VALUE>)

Example:

INSERT INTO dashboard_instances
(name, layout_type,content,order_num,user_id)
VALUES
(

'test_dashboard',

'02.6-6/12',

'[{"columns":[{"styleClass":"col-md-6","widgets":[{"id":"widget-object-xxxx-xxx-xxx-xx-xx","type":"process_report","config":{}}]},{"styleClass":"col-md-6","widgets":[{"id":"widget-object-yyyyy-yyyyy-yyyy-yyyy","type":"deploymentsoverview","config":{},"title":"DASHBOARD.WIDGETS.deploymentsoverview.TITLE"}]}]},{"columns":[{"styleClass":"col-md-12","widgets":[]}]}]',

0,

1

)