Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
211 lines (189 sloc) 9.07 KB
<!doctype html>
<!--
~ Copyright 2016 Streamdata.io
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<title>Streamdata.io Stock-Market</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="styles/main.css">
<!-- Bootstrap style sheet -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- Angular Material style sheet -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
</head>
<body ng-app="app">
<!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
your browser</a> to improve your experience.
</p>
<![endif]-->
<a href="https://github.com/streamdataio/streamdataio-js"><img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<div class="container" ng-controller="AppController as appCtrl">
<div class="header">
<img src="img/logo.png" />
<h3 class="text-muted">Stock-Market demo with <img src="img/angular.png" style="width: 130px;" /></h3>
</div>
<div class="row" ng-cloak>
<div id="error" class="alert alert-danger text-center" ng-show="appCtrl.errorMsg != null" role="alert">
{{appCtrl.errorMsg}}
</div>
</div>
<md-content class="content" class="md-inline-form" layout-padding>
<h4>An application token is required for authentication. <a href="https://portal.streamdata.io/#/register"
target="_blank">Sign Up</a> to get yours.</h4>
<form class="form" name="streamdataForm">
<md-input-container class="md-block" flex-gt-sm>
<label>URL</label>
<input id="inputUrl"
placeholder="Your JSON API Url"
type="url"
ng-model="appCtrl.url"
required
ng-disabled="appCtrl.isConnected">
</md-input-container>
<md-input-container class="md-block" flex-gt-sm>
<div class="input-help-container">
<label>Application token</label>
<img src="img/info.png"
ng-model="appCtrl.popupPk.content" popup="appCtrl.popupPk.options" />
</div>
<input id="inputPublicKey" placeholder="Your App Token" type="text"
ng-model="appCtrl.token" required ng-disabled="appCtrl.isConnected">
</md-input-container>
<md-input-container class="md-block" flex-gt-sm>
<div class="switch-help-container">
<img src="img/info.png"
ng-model="appCtrl.popupSignature.content" popup="appCtrl.popupSignature.options" />
<md-switch class="md-primary" name="special" ng-model="appCtrl.signature">
Authenticate with signature (HMAC)
</md-switch>
</div>
</md-input-container>
<md-input-container class="md-block" flex-gt-sm ng-show="appCtrl.signature">
<label>Private key for signature</label>
<input id="inputPrivateKey" placeholder="Your private key" type="text"
ng-model="appCtrl.pk" ng-required="appCtrl.signature">
</md-input-container>
<md-input-container class="md-block" flex-gt-sm>
<div class="link-help-container">
<label>Specific headers</label>
<img src="img/info.png"
ng-model="appCtrl.popupHeaders.content" popup="appCtrl.popupHeaders.options" />
</div>
<a href="#" ng-click="appCtrl.addHeader()">Add header</a>
</md-input-container>
<div class="form-group row" ng-repeat="(index, header) in appCtrl.headers">
<div class="col-sm-3"></div>
<div class="col-sm-4">
<input class="form-control" ng-model="header.name" placeholder="Key">
</input>
</div>
<div class="col-sm-4">
<input class="form-control" ng-model="header.value" placeholder="Value">
</input>
</div>
<div class="col-sm-1" style="margin-top: 6px; padding-left: 0px;">
<button style="padding: 0px;width: 23px; border-radius: 20px;" class="btn btn-danger"
ng-click="appCtrl.removeHeader(index)">✕
</button>
</div>
</div>
<div class="actions">
<md-button class="md-fab" ng-click="appCtrl.connect()"
ng-show="!appCtrl.isConnected" ng-disabled="streamdataForm.$invalid">
<md-icon>play_arrow</md-icon>
</md-button>
<md-button class="md-fab" ng-click="appCtrl.disconnect()"
ng-show="appCtrl.isConnected"">
<md-icon>stop</md-icon>
</md-button>
<div style="background-repeat: no-repeat; height: 27px; width: 15px; margin-top: 10px; float: right;">
<img src="img/spinner.gif" ng-show="appCtrl.isPatching" />
</div>
</div>
</form>
</md-content>
<div class="table" ng-show="appCtrl.isConnected">
<div ng-if="appCtrl.datas.length>0">
<md-progress-linear md-mode="indeterminate"></md-progress-linear>
<table class="table table-striped table-bordered">
<tr>
<th ng-repeat="(key, value) in appCtrl.datas[0]"
ng-bind="key"></th>
</tr>
<tr ng-repeat="(lineKey, lineValue) in appCtrl.datas">
<td ng-repeat="(cellKey, cellValue) in lineValue" ng-appCtrl="ItemController"
ng-class="{'success' : isActive}"
ng-bind="cellValue">
</td>
</tr>
</table>
</div>
</div>
<div class="footer">
<p>♥ from the <a href="http://streamdata.io/" target="_blank">streamdata.io</a> team</p>
<div style="font-size: 0.8em; float: right;">
Icons made by <a href="http://www.flaticon.com/authors/google" title="Google">Google</a> from <a
href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a
href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a>
</div>
</div>
</div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function (b, o, i, l, e, r)
{
b.GoogleAnalyticsObject = l;
b[l] || (b[l] =
function ()
{
(b[l].q = b[l].q || []).push(arguments)
});
b[l].l = +new Date;
e = o.createElement(i);
r = o.getElementsByTagName(i)[0];
e.src = 'http://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e, r)
}(window, document, 'script', 'ga'));
ga('create', 'UA-XXXXX-X');
ga('send', 'pageview');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.11/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.11/angular-sanitize.min.js"></script>
<!-- AngularJS Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.11/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.11/angular-aria.min.js"></script>
<!-- Angular Material Library -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.4/angular-material.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="node_modules/fast-json-patch/dist/fast-json-patch.js"></script>
<script src="node_modules/streamdataio-js-sdk/dist/bundles/streamdataio.min.js"></script>
<script src="node_modules/streamdataio-js-sdk-auth/dist/bundles/streamdataio-auth.min.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>