@covalent/data
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
45111
35
178