npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gooddata/data-source-management

v2.0.151

Published

GoodData Datasource management helps you to connect your cloud data to our platform.

Downloads

1,148

Readme

GoodData Datasource management

GoodData Datasource management helps you to connect your cloud data to our platform.

Getting Started

Prerequisites

nodejs
yarn (also will work with npm, but we strongly recommend yarn)

Usage

With yarn installed, go to your project directory and run

$> yarn install --frozen-lockfile

Local development

If you are developing on a Mac or Linux machine, add gd-developer-portal.local to the end of the line starting withc 127.0.0.1 in your /etc/hosts file (you may need administrator/root privileges for that). Here is an example of how the /etc/hosts file may look on a Mac:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

127.0.0.1   gdc-datasource-management.local

Create .env file according to the example and set up the REACT_APP_CUSTOM_DOMAIN variable to domain you are using for development. Make sure CORS are enabled on your dev domain for gdc-datasource-management.local.

For development, you can use hot reloading by separately command

$> yarn dev-tiger

Access

Access the app at https://gdc-datasource-management.local:3003/

Backend usage

The components in the package are supposed to be used as a plugin in another application. Therefore, they do not have their own SDK backend instance. The backend is expected to be provided from the app that uses the components. See the example in chapter below about how to do that.

When you make changes to the components, do not create new instances of the backend. Either use useBackend hook to get the backend or tigerSpecificFunctions instance or define service function or utility with parameter that can be used to provide backend to the function.

Every backend call must be done via either backend or tigerSpecificFunctions instance from @gooddata/sdk-backend-tiger. The direct usage of @gooddata/api-client-tiger (such as calling sdk.axios and making AJAX calls directly in the app) is not allowed! Such calls do not handle various errors states that application, or in this case pluggable components, must react.

How to use

Import the styles somewhere in your app.

@import '~@gooddata/data-source-management/build/styles/main';

Then, use a component called "CreateEditDataSource" to create a new data source or to edit an existing one.

The component must be wrapped in a context provider that provides component with SDK backend instances and tiger specific functions object that is created when IAnalyticalBackend is initialized.

import { CreateEditDataSource, BackendProvider, ITigerSpecificFunctions } from "@gooddata/data-source-management";

const backend: IAnalyticalBackend = { ... };
const tigerSpecificFunctions: ITigerSpecificFunctions = { ... }

<BackendProvider backend={backend} tigerSpecificFunctions={tigerSpecificFunctions}>
    <CreateEditDataSource
        dataSourceType={<dataSourceType>}
        dataSourceId={<dataSourceId>}
        canDelete={true}
        onDataSourceClosed={onDataSourceClosed}
        onDataSourceSaved={onDataSourceSaved}
        onDataSourceDeleted={onDataSourceDeleted}
    />
</BackendProvider>

License

(c) 2022 GoodData Corporation

This repository is under a BSD 3 license available in the LICENSE file.