Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@covalent/data

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalent/data - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

charts/charts.go

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# [0.2.0](https://github.com/Teradata/covalent/tree/0.2.0) (2016-09-28)
## Features
* Mock chart data
# [0.1.1](https://github.com/Teradata/covalent/tree/0.1.1) (2016-09-23)

@@ -2,0 +7,0 @@

6

package.json
{
"name": "@covalent/data",
"version": "0.1.0",
"version": "0.2.0",
"description": "A golang based mock data server CLI, for use with Teradata Covalent Quickstart",

@@ -12,3 +12,3 @@ "author": "Ilsun Park <ilsun.park@gmail.com>",

"scripts": {
"preinstall": "node node/install.js 0.1.0"
"preinstall": "node node/install.js 0.2.0"
},

@@ -25,2 +25,2 @@ "repository": {

}
}
}

@@ -24,2 +24,11 @@ # covalent-data

#### docker
To run from docker:
1. Install [Docker Engine](https://docs.docker.com/engine/installation/).
2. Pull down this repo and `cd` into it.
3. `docker build -t covalent-data .`
4. `docker run -p 8080:8080 --name covalent-data covalent-data`
5. To stop- `docker stop covalent-data`
#### covalent-quickstart

@@ -88,2 +97,77 @@ covalent-data is included in the [covalent-quickstart](https://github.com/Teradata/covalent-quickstart) repo.

#### Charts
Covalent-data will create realistic chart data that you can use right away in your charts.
##### Step one (create a new mock chart)
Send a `POST http://localhost:8080/charts` with a body that's formatted as such:
``` json
{
"name": "my new chart",
"key": "MyChartKey"
"num_data_points": 60,
"interval_seconds": 90,
"y_axes": [
{
"name": "cpu",
"function_type": "black_friday"
},
{
"name": "hits",
"function_type": "sawtooth"
}
]
}
```
This will create *60* points, spaced *90 seconds* apart, with two y-axes- `cpu` and `hits`.
The following `function_types` for Y axes are available:
- `black_friday`
- `sawtooth`
- `sine`
- `slow_rise`
- `slow_decline`
- `square`
- `triangle`
The value you set for `key` is how you will access your mock chart data. This is an optional value, and if you dont set this, the API will assign a unique key for your mock chart data.
##### Step two (consume chart data)
Send a `GET http://localhost:8080/charts/MyChartKey` and you will get a JSON array back that looks similar to this:
```json
[
{
"cpu": 3.4086436391430617,
"hits": 0,
"timestamp": 1474998463
},
{
"cpu": 3.436764648923683,
"hits": 1,
"timestamp": 1474998523
},
{
"cpu": 4.839440493047819,
"hits": 2,
"timestamp": 1474998583
},
{
"cpu": 3.871987273635802,
"hits": 3,
"timestamp": 1474998643
},
{
"cpu": 3.3517529842176668,
"hits": 4,
"timestamp": 1474998703
},
{
"cpu": 4.161895630999336,
"hits": 5,
"timestamp": 1474998763
}
]
```
### Upcoming and To-Dos

@@ -90,0 +174,0 @@ - [ ] Add a dockerfile and add to docker hub

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc