Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Business Requirement

...

In order to enable different types of access, SB will support configurations that can make the datasets ‘PUBLIC’ or ‘PRIVATE’ - as the adopter may choose - this will determine whether a dataset can be accessed publicly using the API without any additional authorisation, or whether it needs additional approval from admins for access.

...

Current Implementation

  • Currently, Sunbird Observation supports Reports Service API to list and access all published reports. However, only metadata of a report is accessible through this API. There are associated data files that contain the detailed data of a given report. These are currently not accessible through API.

  • There is an internal endpoint at the portal backend layer which downloads the respective datasets from the azure reports container. This endpoint is accessible only by the logged in person(session based) having roles (REPORT_ADMIN , REPORT_VIEWER, ORG_ADMIN).

  • Moreover, there is a slug based validation so that they do not access other tenant’s data.

  • For parameterized reports, respective endpoints are injected based on the logged in user’s context.

  • As part of current implementation datasets cannot be accessed by non logged in person or any third party.

  • Supported parameters

    • $slug

    • $channel

    • $state

    • $board

Below Diagram explains the High Level Working flow on how the reports are rendered on the Portal Admin Dashboard.

...

Current Report Config Structure

Expand

titleCurrent Report Config
Code Blockreportid

  • Roles which exists in Admin Dashboard workflow

    • Report_Admin

    • Report_viewer

    • Super_Admin - REPORT_ADMIN

    • Org_admin

Pages

REPORT_ADMIN <SUPER_ADMIN>

State REPORT_ADMIN

REPORT_VIEWER

List Page

Image Added

  • Can see all Reports.

  • If report is parameterized, can see all the resolved parameterized versions of that report.

  • Can see all live, retired and draft versions for all reports.

  • Can see reports + parameterised reports from only the resolved parameter value.

  • For Example - if Report is parametersed by state. Then REPORT_ADMIN belonging to rajasthan can see only the rajasthan report version, not others.

  • Can see all live, retired and draft versions of all reports

  • Can see only live reports .

Report Detail Page

Image Added

  • Can Publish, Retire, Add Report/Chart Summaries for all the reports + their parameterized versions.

  • Switch b/w other parameter versions.

  • Can publish, Retire, Add Report/Chart Summaries for that report.

  • Cannot perform any other action.

...

Current Report Config Structure

Expand
titleCurrent Report Config
Code Block
reportid varchar(40) NOT NULL PRIMARY KEY,
title text NOT NULL,
description text NOT NULL,
authorizedroles jsonb NOT NULL,
status varchar(8) NOT NULL CHECK (status IN ('live', 'draft', 'retired')) DEFAULT 'draft',
type varchar(8) NOT NULL CHECK (type in ('public', 'private')) DEFAULT 'private',
reportaccessurl text NOT NULL UNIQUE,
createdon timestamptz NOT NULL DEFAULT now(),
updatedon timestamptz NOT NULL DEFAULT now(),
createdby varchar(50) NOT NULL,
reportconfig jsonb NOT NULL,
templateurl text,
slug varchar(10) NOT NULL,
reportgenerateddate timestamptz NOT NULL DEFAULT now(),
reportduration jsonb NOT NULL DEFAULT jsonb_build_object('startDate', now()::timestamptz, 'endDate', now()::timestamptz),
tags jsonb NOT NULL,
updatefrequency text NOT NULL
reportType varchar(8) NOT NULL DEFAULT 'report'

...

  • visibility

    • type - varchar(10)

    • enum - [public, private, protected, parent]

    • Details - Link

  • accessPath

    • type - jsonb

    • Details - Link

  • showOnDashboard

    • type- boolean

    • Description - Whether to show/hide the report on admin dashboard.

...

Current Api Structure

...