Giter Site home page Giter Site logo

sassoftware / visual-analytics-sdk Goto Github PK

View Code? Open in Web Editor NEW
17.0 15.0 10.0 876 KB

The SAS Visual Analytics SDK is a set of JavaScript APIs and web components that allow you to embed SAS Visual Analytics report content into a third-party application or web page.

Home Page: https://developer.sas.com/sdk/va/

License: Other

HTML 100.00%

visual-analytics-sdk's Introduction

SAS Visual Analytics SDK -- Archived repository

Notice: The Visual Analytics SDK has moved and is now part of the SAS Viya SDK for JavaScript. See sas-viya-sdk-js for documentation, examples and to enter new GitHub issues.

Overview

The SAS Visual Analytics SDK is a set of JavaScript APIs and web components that enable SAS Visual Analytics report content to be easily embedded in a third-party application or web page. Entire reports or individual report objects can be embedded, and the content is fully interactive. This functionality is delivered as the va-report-components JavaScript library.

Prerequisites

Access to a deployment of SAS Visual Analytics 8.4 (or later) is necessary in order to use the SDK. For more information about server set up, see SAS Viya setup.

Installation

NPM

The @sassoftware/va-report-components library is published to NPM and can be installed by running the npm install command as shown below. va-report-components does not support ES6 imports. Therefore, the contents of the va-report-components/dist folder must be deployed with your page, and then loaded using a script tag.

# From the root directory of your project
npm install @sassoftware/va-report-components

# Copy the contents of the package to an asset folder for deployment
cp -r ./node_modules/@sassoftware/va-report-components ./sdk-assets

The library can then be loaded out of the deployed assets folder using a script tag.

<script async src="./sdk-assets/dist/umd/va-report-components.js"></script>

CDN (Content Delivery Network)

Accessing the va-report-components library from the SAS Developer CDN is easy. It does not require installation or hosting of the library code and assets. Here is an example of loading the latest version of va-report-components from the CDN using an HTML script tag.

<script async src="https://cdn.developer.sas.com/packages/va-report-components/latest/dist/umd/va-report-components.js"></script>

When the library is used in production, consider pinning it to an explicit version. This is done with a URL like https://cdn.developer.sas.com/packages/va-report-components/${VERSION}/dist/umd/va-report-components.js, where ${VERSION} is the full major.minor.patch semantic version.

Getting Started

For guides and an API reference, see developer.sas.com.

Examples

Full examples are located in the examples folder of this repository.

Contributing

The SAS Visual Analytics SDK is not open for external contributions.

License

This project is licensed under this commercial license.

Additional Resources

visual-analytics-sdk's People

Contributors

brmorr avatar ckedwards avatar cojhal avatar eheckel avatar jbrown1618 avatar jefurbee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

visual-analytics-sdk's Issues

Report no response when updating parameters and change the page

Hi there

We found that if we call the updateReportParameters method and then change the page, the whole web page would be no reponse.
Here are some debug information from Chrome Dev tool.
Skärmklipp
Skärmklipp2

SAS Viya V.03.05
SAS Visual Analytics 8.5.1
SAS VA SDK 0.10.0

Thank you in advance,

"Unauthorized" (status 401) error when loading the report through sas-va-sdk

Hej there

We have been using sas va to test a report on a prep environment (https://prep.vardcentraler.sll.se/test-sas/).

We found that by using old version of Chome (78.0.3904.87 32 bit), the report can not be loaded.
SAS VA: 8.5.1
SAS VA SDK: 0.10.0

error

bug

Request URL: https://slso-atea.saasnow.com/SASLogon/oauth/authorize?client_id=sas.identities&redirect_uri=/identities/users/@currentUser&response_type=code&state=57c1ae6e
Request Method: GET
Status Code: 401

error: "Unauthorized"
message: "Full authentication is required to access this resource"
path: "/SASLogon/oauth/authorize"
status: 401
timestamp: 1604409032332

It's worth to be mentioned that this problem only occurred with 32 bit old Chrome version, not with the latest 64 bit Chrome or Edge.

Thank you for your assistance in advance.

Unauthorized error (401) when loading report with old 32-bit Chrome

Hej there

We have been using SAS VA to test a report on a prep environment (https://prep.vardcentraler.sll.se/test-sas/).

We found that by using the old version of Chome (78.0.3904.87 32 bit), the report can not be loaded.
SAS VA: 8.5.1
SAS VA SDK: 0.10.0

error

bug

Request URL: https://slso-atea.saasnow.com/SASLogon/oauth/authorize?client_id=sas.identities&redirect_uri=/identities/users/@currentUser&response_type=code&state=57c1ae6e
Request Method: GET
Status Code: 401

error: "Unauthorized"
message: "Full authentication is required to access this resource"
path: "/SASLogon/oauth/authorize"
status: 401
timestamp: 1604409032332

It's worth to be mentioned that this problem only occurred with 32-bit old Chrome version, not with the latest 64-bit Chrome or Edge.

Thank you for your assistance in advance.

Too many redirects resulting in guest user not able to authenticate

Hi there,
I'm using SAS VA SDK version 1.8.0 in order to embed VA report created on Viya 2021.2.5.
Reference to VA SDK is in page head:

<head>
    <meta charset="utf-8" />
    <link rel="icon" href="favicon.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content=""
    />
    <link rel="apple-touch-icon" href="touch-icon-iphone-precomposed.png" />
    <link rel="manifest" href="manifest.json" />
    <title>App</title>
    <script async src="https://cdn.developer.sas.com/packages/va-report-components/latest/dist/umd/va-report-components.js"></script>
  </head>

Report tag:

<sas-report
          authenticationType="guest"
          url="https://viya-url.com"
          reportUri="/reports/reports/a7d19a52-db06-4bef-a54c-8e5506b5db6e"
>
</sas-report>

Console screenshot:
console
Network screenshot:
network

Thank you in advance.

Third-party cookie issue

Hi, there,

Recently, we found a new issue when using Chrome to open our Folkhalsokollen.

In that computer, the security settings for cookie has been switched to 'Block all third-party cookie'. When opening the report, the error message on the screen says 'Unable to log on to the server' and in developer tools it says '401 Unauthorized error'. It seems like the Chroms is blocking the cookies for our sas viya server.

I am wondering if you have noticed this issue? Do you have any fixes for this?

Thank you for your help in advance

sdk with credentials samesite cookie

Hello,

We are running in an issue where on new versions of google chrome samesite cookie must be "None" and "Secure".
https://www.chromium.org/updates/same-site

error:
image
(lang: dutch)

problem:
image
image

So as you can see we can put the cookie in samesite=none but google also wants the cookie to be secure.
However I have not been able to find any solutions for this problem.

What we have on our server:
image
(lang: dutch)

Is there any work around this problem or a fix?

thank you for reading our problem, I hope you can help us!

Authentication Required button not visible in Edge

Version: 0.3
When testing the authenticationMode="credentials" with an unauthenticated browser session chrome shows a button that says Login...
When testing the same in Edge there is no login button or wording asking for authentication required

Edge Version 41.16299
image

There is an error in the console, maybe related?
image

Compilation fails with react app

I'm trying to import sas-va-report objects like so

import { registerDataDrivenContent } from '@sassoftware/va-report-components'

But the compilation fails with below error

Failed to compile.

./node_modules/@sassoftware/va-report-components/dist/esm/fonts/sas-icons-regular.ttf
Error: ENOENT: no such file or directory, open '/app/node_modules/@sassoftware/va-report-components/dist/esm/fonts/sas-icons-regular.ttf'

Sample Repo:
https://github.com/aswin-s/sas-report-demo

I couldn't find any examples which use the import format for loading SAS data driven content. Can someone shed some light here?

Bug- When you de-select the item in a required multi-selection list control, it would mistakely select all

Hi

I just noticed a bug which could be caused by VA SDK. I have uploaded a video to show this bug.

In our report, there is a list-control which are used to filter the areas in the line-plot (If you select one area, there would be one line. If you select two areas, there would be two lines). That list control is wrapped in a prompt container. Moreover, that list control is set to 'required', and 'allow multi selection'.

Now, when we have only one selected area in that list control and we further click on area one more time, the report would surprisingly select all the items although it is now shown in the list control. I have tried this directly inside SAS Visual Analytics and there is no such problem there. Thus, I am wondering this could be a bug with VA SDK.

I have tried this with version 0,16,0 and the problem is still the same.

Thank you!

fhk_bug_github.1.mp4

Using SASReportElement does not pick up the Report Name/Title as show in the SASVisualAnalyticsApp

Following the code examples a VA SDK set of resources have been created. When displaying the SASReportElement within HTML, the Report Name/Title does not appear in the browser. We have tried playing with the hidenavigaton option, but that only shows/hides the Report Pages (Tabs) and not the Title that appears above the Pages in the SASVisualAnalytics application. How can we display the Report Title in the SDK so that it matches what is seen in the application?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.