forked from barak/tarpoon
Add glide.yaml and vendor deps
This commit is contained in:
parent
db918f12ad
commit
5b3d5e81bd
18880 changed files with 5166045 additions and 1 deletions
39
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/histogram.js
generated
vendored
Normal file
39
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/histogram.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
//var data = [4, 8, 15, 16, 23, 42];
|
||||
|
||||
function defaults(){
|
||||
|
||||
Chart.defaults.global.animation = false;
|
||||
|
||||
}
|
||||
|
||||
function f(data2) {
|
||||
|
||||
defaults();
|
||||
|
||||
// Get context with jQuery - using jQuery's .get() method.
|
||||
var ctx = $("#myChart").get(0).getContext("2d");
|
||||
ctx.width = $(window).width()*1.5;
|
||||
ctx.width = $(window).height *.5;
|
||||
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var myNewChart = new Chart(ctx);
|
||||
|
||||
var data = {
|
||||
labels: Array.apply(null, Array(data2.length)).map(function (_, i) {return i;}),
|
||||
datasets: [
|
||||
{
|
||||
label: "My First dataset",
|
||||
fillColor: "rgba(220,220,220,0.2)",
|
||||
strokeColor: "rgba(220,220,220,1)",
|
||||
pointColor: "rgba(220,220,220,1)",
|
||||
pointStrokeColor: "#fff",
|
||||
pointHighlightFill: "#fff",
|
||||
pointHighlightStroke: "rgba(220,220,220,1)",
|
||||
data: data2
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx).Line(data);
|
||||
}
|
||||
|
||||
47
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/index.html
generated
vendored
Normal file
47
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/index.html
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
<!-- d3 is used by histogram.js
|
||||
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
||||
-->
|
||||
<script src="https://raw.githubusercontent.com/nnnick/Chart.js/master/Chart.js"></script>
|
||||
<script src="script.js"></script>
|
||||
<script src="histogram.js"></script>
|
||||
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width" name="viewport">
|
||||
<link href="/style.css" rel="stylesheet">
|
||||
<title>((( - PRODUCTION -))) Guestbook</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<div id="k8petstore-entries">
|
||||
<p>Waiting for database connection...This will get overwritten...</p>
|
||||
</div>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<div id="header">
|
||||
<h1>k8-bps.</h1>
|
||||
</div><br>
|
||||
<div>
|
||||
<p><h2 id="k8petstore-host-address"></h2></p>
|
||||
<p><a href="/env">/env</a>
|
||||
<a href="/info">/info</a></p>
|
||||
</div>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR >
|
||||
<TD colspan="2">
|
||||
<canvas id="myChart" width="2000" height="600"></canvas>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
72
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/script.js
generated
vendored
Normal file
72
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/script.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
var max_trials=1000
|
||||
|
||||
var headerTitleElement = $("#header h1");
|
||||
var entriesElement = $("#k8petstore-entries");
|
||||
var hostAddressElement = $("#k8petstore-host-address");
|
||||
var currentEntries = []
|
||||
|
||||
var updateEntryCount = function(data, trial) {
|
||||
if(currentEntries.length > 1000)
|
||||
currentEntries.splice(0,100);
|
||||
//console.info("entry count " + data) ;
|
||||
currentEntries[trial]=data ;
|
||||
}
|
||||
|
||||
var updateEntries = function(data) {
|
||||
entriesElement.empty();
|
||||
//console.info("data - > " + Math.random())
|
||||
//uncommend for debugging...
|
||||
//entriesElement.append("<br><br> CURRENT TIME : "+ $.now() +"<br><br>TOTAL entries : "+ JSON.stringify(currentEntries)+"<br><br>")
|
||||
var c1 = currentEntries[currentEntries.length-1]
|
||||
var c2 = currentEntries[currentEntries.length-2]
|
||||
entriesElement.append("<br><br> CURRENT TIME : "+ $.now() +"<br><br>TOTAL entries : "+ c1 +"<BR>transaction delta " + (c1-c2) +"<br><br>")
|
||||
f(currentEntries);
|
||||
$.each(data, function(key, val) {
|
||||
//console.info(key + " -> " +val);
|
||||
entriesElement.append("<p>" + key + " " + val.substr(0,50) + val.substr(100,150) + "</p>");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// colors = purple, blue, red, green, yellow
|
||||
var colors = ["#549", "#18d", "#d31", "#2a4", "#db1"];
|
||||
var randomColor = colors[Math.floor(5 * Math.random())];
|
||||
(
|
||||
function setElementsColor(color) {
|
||||
headerTitleElement.css("color", color);
|
||||
})
|
||||
|
||||
(randomColor);
|
||||
|
||||
hostAddressElement.append(document.URL);
|
||||
|
||||
// Poll every second.
|
||||
(function fetchGuestbook() {
|
||||
|
||||
// Get JSON by running the query, and append
|
||||
$.getJSON("lrange/k8petstore").done(updateEntries).always(
|
||||
function() {
|
||||
setTimeout(fetchGuestbook, 2000);
|
||||
});
|
||||
})();
|
||||
|
||||
(function fetchLength(trial) {
|
||||
$.getJSON("llen").done(
|
||||
function a(llen1){
|
||||
updateEntryCount(llen1, trial)
|
||||
}).always(
|
||||
function() {
|
||||
// This function is run every 2 seconds.
|
||||
setTimeout(
|
||||
function(){
|
||||
trial+=1 ;
|
||||
fetchLength(trial);
|
||||
f();
|
||||
}, 5000);
|
||||
}
|
||||
)
|
||||
})(0);
|
||||
});
|
||||
|
||||
69
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/style.css
generated
vendored
Normal file
69
vendor/k8s.io/kubernetes/examples/k8petstore/web-server/static/style.css
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
body, input {
|
||||
color: #123;
|
||||
font-family: "Gill Sans", sans-serif;
|
||||
}
|
||||
|
||||
div {
|
||||
overflow: hidden;
|
||||
padding: 1em 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h1, h2, p, input, a {
|
||||
font-weight: 300;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #BDB76B;
|
||||
font-size: 3.5em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 0 auto;
|
||||
max-width: 50em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 0;
|
||||
border-radius: 1000px;
|
||||
box-shadow: inset 0 0 0 2px #BDB76B;
|
||||
display: inline;
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
outline: none;
|
||||
padding: .5em 5%;
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
form a {
|
||||
background: #BDB76B;
|
||||
border: 0;
|
||||
border-radius: 1000px;
|
||||
color: #FFF;
|
||||
font-size: 1.25em;
|
||||
font-weight: 400;
|
||||
padding: .75em 2em;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.5em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.chart div {
|
||||
font: 10px sans-serif;
|
||||
background-color: steelblue;
|
||||
text-align: right;
|
||||
padding: 3px;
|
||||
margin: 1px;
|
||||
color: white;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue