Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: continuous monitoring support #67

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
84b1abb
add appconfig.POLLING_INTERVAL
breznak Jan 6, 2016
2dfdf36
Merge branch 'master' into online_polling
breznak Jan 6, 2016
af8ee14
unify the download/stream*File functions
breznak Jan 6, 2016
8b93e82
cleanup + loadFile() unifies getRemote/LocalFile
breznak Jan 6, 2016
3367438
document the remote file loading feature
breznak Jan 6, 2016
81636ef
function canDownload() extended to judge RangeHeader
breznak Jan 6, 2016
d478da6
new getFileSize function used
breznak Jan 6, 2016
64ba327
using common getFile function
breznak Jan 6, 2016
2f3843f
add FIXME
breznak Jan 6, 2016
facb3e5
fix getFileSize & canDownload, WIP getRemoteFile
breznak Jan 7, 2016
3dbf998
initial online monitoring/polling/streaming support
breznak Jan 7, 2016
9def3e2
add example/readme for the online monitoring mode
breznak Jan 7, 2016
428959f
monitoring: speedup consecutive pollings
breznak Jan 7, 2016
c0f0e63
record file.size
breznak Jan 7, 2016
21f6277
improve skipping for large file, till size reached
breznak Jan 7, 2016
9eea799
avoid parallel timers
breznak Jan 7, 2016
5f38c9c
fix file size updated as file grows during monitoring
breznak Jan 7, 2016
23f0597
increase local CHUNK_SIZE for Papa
breznak Jan 8, 2016
f86d7ab
Merge branch 'master' into online_polling
breznak Jan 13, 2016
201b580
use Angular's $interval
breznak Jan 13, 2016
6f10a95
merge functionality to loadFile (local, remote)
breznak Jan 13, 2016
b61b3e8
WIP chaining promises
breznak Jan 13, 2016
f34d2f4
Merge branch 'master' into online_polling
breznak Jan 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Join the chat at https://gitter.im/nupic-community/nupic.visualizations](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nupic-community/nupic.visualizations?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Work with NuPIC results interactively in a [nice web UI](https://nupic-visualizations.firebaseapp.com/). This app is designed to consume and render CSV files output by NuPIC, but it can read any CSV file with numerical data that has a timestamp as one of its fields.
Work with NuPIC results interactively in a [nice web UI](https://nupic-visualizations.firebaseapp.com/). This app is designed to consume and render CSV files output by NuPIC, but it can read any CSV file with numerical data that represent some time-series.

![NuPIC Visualizations screenshot](https://raw.githubusercontent.com/wiki/nupic-community/nupic.visualizations/images/nupic_visualizations.png)

Expand Down Expand Up @@ -56,6 +56,7 @@ There are demo files in `examples/` for NuPIC OPF, NAB and generic CSV files.

* Select a local file by clicking 'Browse...', this will start rendering a new graph.
* You may get warning/error labels, that can be closed.
* You can also enter a URL of a remote file for streaming (in supported by the server).
* To zoom in on the graph, click and drag with the cursor. To zoom out, double-click. To pan on a zoomed graph, hold the ALT key (on Linux, hold the SHIFT key), while dragging the cursor.
* The options to the right of the graph allow the user to:
- Set the visibility of certain series
Expand All @@ -67,7 +68,7 @@ There are demo files in `examples/` for NuPIC OPF, NAB and generic CSV files.
The goals of this project are:
* nice, convenient & easy to use interactive graph visualizations
* seamlessly runs everywhere (in web-browser, or [cloud](https://nupic-visualizations.firebaseapp.com/))
* plot as much as possible - generic CSV
* plot as much as possible - generic CSV (local or remote files)
* tries to parse timestamp/x-data from many formats
* no restrictions on the header format
* can plot even non-standart data - strings (planned)
Expand Down
2 changes: 1 addition & 1 deletion build/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<div class="input-group">
<input type="text" class="form-control file-name" ng-model="view.filePath">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-disabled="!canDownload()" ng-click="getRemoteFile()">Download</button>
<button class="btn btn-default" type="button" ng-disabled="!canDownload()" ng-click="loadFile(null)">Download</button>
</span>
</div>
<span class="btn btn-primary btn-file">
Browse&hellip; <input type="file" file-upload-change="getLocalFile">
Browse&hellip; <input type="file" file-upload-change="loadFile">
</span>
<div class="errors">
<div ng-repeat="error in view.errors track by $index" class="alert alert-{{error.type}} alert-dismissible" role="alert">
Expand Down
11 changes: 9 additions & 2 deletions client/src/app/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ angular.module('app').constant('appConfig', {
// -1 to disable the functionality (can cause performance problems on large files/online monitoring)
MAX_FILE_SIZE : 60*1024*1024,
// LOCAL_CHUNK_SIZE:
// in Bytes
// size in bytes of each chunk for the data stream, when reading local files
LOCAL_CHUNK_SIZE : 65536,
LOCAL_CHUNK_SIZE : 2*1024*1024,
// REMOTE_CHUNK_SIZE:
// size in bytes of each chunk for the data stream, when reading files over a network. Not currently used.
// in Bytes
// size in bytes of each chunk for the data stream, when reading files over a network.
REMOTE_CHUNK_SIZE : 65536,
// POLLING_INTERVAL:
// time interval (in ms) after which the source file is re-read to find possible updates.
// A value <= 0 means polling is disabled - nothing else happens after the end of the file is reached.
// Default: 0
POLLING_INTERVAL : 5000,
// HIGHLIGHT_RADIUS:
// radius of threshold highlight from point in time that reaches the threshold.
// modifies (together with color/opacity) how visible the highlight is.
Expand Down
Loading