blob: 91cce5378db53d6707c84c02524e489f78566b95 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>commits-table-sk demo</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="/res/js/status_utils.js"></script>
<script src="/res/common/js/common.js"></script>
<script src="/res/imp/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="/res/imp/sinon-1.17.2.js"></script>
<!-- Makes a var called data-->
<script type="text/javascript" src="commits-table-demo.json"></script>
<script type="text/javascript" charset="utf-8">
sinon.format = function(object) {return JSON.stringify(object);}
sinon.log = function(message) {/*console.log(message);*/};
var server = sinon.fakeServer.create();
server.autoRespond = true;
server.respondWith("GET", "/json/skia/commits/?n=16",JSON.stringify(data));
// Mock out login to fake that a user is logged in
sk.Login = {
then: function(f){
f({
"Email":"test@google.com",
});
}
};
</script>
<link rel="import" href="commits-table-sk.html">
<link rel="import" href="commits-data-sk.html">
<link rel="import" href="/res/common/imp/url-params-sk.html">
</head>
<body>
<h1>commits-table-sk demo (with commits-data providing data [n=16])</h1>
<template is="dom-bind">
<h2>With login faked</h2>
<a href="/commits-table-sk-demo.html?commit=48cf268defad66f58f1aa03b4835e5583be96b2f&commit=d97f07dc43ed07536921ec4e87a8785ae2da8e6a&commit_label=subject&filter=failures">Click for more complicated example.</a>
<!-- these must go above the points at which their bound values are used. Otherwise,
the bound values get set to "" and it clobbers the stored values -->
<url-param-sk name="commit_label" value="{{label}}" default="author"></url-param-sk>
<url-param-sk name="filter" value="{{filter}}" default="interesting"></url-param-sk>
<url-param-sk name="search_value" value="{{search}}"></url-param-sk>
<url-param-sk name="commit" value="{{highlighted_commit_hashes}}" multi></url-param-sk>
<commits-table-sk id="table"
builders="[[builders]]"
builds="[[builds]]"
categories="[[categories]]"
category_list="[[category_list]]"
build_details="[[build_details]]"
commits="[[commits]]"
commits_map="[[commits_map]]"
highlighted_commit_hashes="[[highlighted_commit_hashes]]"
num_builders="[[num_builders]]"
relanded_map="[[relanded_map]]"
repo="skia"
reverted_map="[[reverted_map]]"
commit_label="{{label}}"
filter="{{filter}}"
search="{{search}}">
</commits-table-sk>
<commits-data-sk id="data"
commits_to_load="16"
repo="skia"
filter="[[filter]]"
search="[[search]]"
build_details="{{build_details}}"
builders="{{builders}}"
builds="{{builds}}"
categories="{{categories}}"
category_list="{{category_list}}"
commits="{{commits}}"
commits_map="{{commits_map}}"
num_builders="{{num_builders}}"
relanded_map="{{relanded_map}}"
reverted_map="{{reverted_map}}">
</commits-data-sk>
</template>
</body>
</html>