Skip to content

dioscouri/slamdata

 
 

Repository files navigation

Latest release Travis build status Coverage Status Join the chat at https://gitter.im/slamdata/slamdata

SlamData

Web-based visual analytics for NoSQL data, powered by Quasar.

See the Use with Quasar section for next steps.

Building from source

Building SlamData requires PureScript 0.8.5 or newer and Node.js v4.1.0 or newer.

Prerequisites

This can be skipped if Bower is already installed globally.

npm install bower -g

Checkout

git clone [email protected]:slamdata/slamdata.git

Fetch dependencies

Inside the slamdata repository directory:

bower install
npm install

Build

npm run build

After this task finishes the public directory will contain the complete SlamData front-end app.

Use with Quasar

Quasar can host the SlamData front-end app on the same port as the API. To do this, use the --content-path command-line argument when starting the engine:

java -jar [<path to quasar jar>] --content-path [<path to slamdata app>]

Where [<path to slamdata app>] is the location of the source-built public folder, or the extracted contents of a pre-built archive.

Custom styling

Users can add custom styles to notebooks by adding a query parameter to the URI. For example, to add a stylesheet located in css/foo.css to

http://slamdata.instance.com/notebook.html#/db/Folder/Notebook.slam/view

one should modify the route to

http://slamdata.instance.com/notebook.html?stylesheets=css/foo.css#/db/Folder/Notebook.slam/view

The values of stylesheets are decoded and then split by ,, so to add two stylesheets one could use

  • stylesheets=css/foo.css,http%3A%2F%2Ffoo.com%2Fstyles.css
  • stylesheets=css%2Ffoo.css,http%3A%2F%2Ffoo.com%2Fstyles.css
  • stylesheets=css%2Ffoo.css%2Chttp%3A%2F%2Ffoo.com%2Fstyles.css

These URIs are checked and, if they are valid, corresponding link elements are added to the head

Here it would be

<link type="text/css" rel="stylesheet" href="css/foo.css">
<link type="text/css" rel="stylesheet" href="http://foo.com/style.css">

Additional permissions

Working with Quasar Advanced, the user can add permission tokens to the URI, which will be sent with every ajax request.

For example to add permission tokens ABCD and 1234 to

http://slamdata.instance.com/notebook.html#/db/Folder/Notebook.slam/view

one should modify the route to

http://slamdata.instance.com/notebook.html?permissionsToken=ABCD,1234#/db/Folder/Notebook.slam/view

These tokens then will be added to X-Extra-Permissions header.

The value of permissionsToken can be url-encoded: ABCD,1234 is equal with ABCD%2C1234.

About

The web-based front-end for SlamData.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PureScript 91.5%
  • CSS 4.6%
  • JavaScript 3.8%
  • HTML 0.1%