Commit 106d9e3f authored by ojan@chromium.org's avatar ojan@chromium.org

Move commit list and builder latest revisions up to ct-unexpected-failures

Create a model directory for model classes. We should never be using
dumb objects as our model (even in tests!). Having explicit classes makes
more clear the types of the objects a component takes in. Also,
it gives a clear location for putting logic related to that bit of the
model.

Moving the commit list and the builder revisions up is a step in the
direction of enabling https://codereview.chromium.org/402603007. 

NOTRY=true

Review URL: https://codereview.chromium.org/404463003

git-svn-id: svn://svn.chromium.org/blink/trunk@178582 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 80e32d25
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel='import' href='ct-commit-log.html'>
<link rel='import' href='ct-commit-mock.html'>
<script>
(function () {
window.CTCommitLogMock = function() {
var log = new CTCommitLog();
var commit = new CTCommitMock();
log[commit.revision] = commit;
return log;
};
})();
</script>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="ct-commit-log.html">
<link rel='import' href='ct-commit-mock.html'>
<script>
(function () {
module("ct-commit-log");
test("basic", 1, function() {
var commit = new CTCommitMock();
var kExampleCommitDataXML =
"<feed xmlns='http://www.w3.org/2005/Atom'>\n" +
"<title>blink, branch master</title>\n" +
"<subtitle>Mirror of the Chromium Blink repository.</subtitle>\n" +
"<link rel='alternate' type='text/html' href='http://blink.lc/blink/'/>\n" +
"<entry>\n" +
"<title>Throw SecurityError when setting 'Replaceable' properties cross-origin.</title>\n" +
"<updated>2013-09-30T20:22:01Z</updated>\n" +
"<author>\n" +
"<name>" + commit.author + "</name>\n" +
"</author>\n" +
"<published>2013-09-30T20:22:01Z</published>\n" +
"<link rel='alternate' type='text/html' href='http://blink.lc/blink/commit/?id=723e62a4a4e093435b4772b4839aa3fd7cf6b991'/>\n" +
"<id>723e62a4a4e093435b4772b4839aa3fd7cf6b991</id>\n" +
"<content type='text'>\n" + commit.message + "</content>\n";
var xml = new DOMParser().parseFromString(kExampleCommitDataXML, "text/xml");
var log = new CTCommitLog();
log._processXml(xml);
var expectedCommits = {};
expectedCommits[commit.revision] = commit;
deepEqual(log.commits, expectedCommits);
});
})();
</script>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel='import' href='ct-commit.html'>
<script>
function CTCommitLog() {
// FIXME: This should be a map of repo-name to revision log using the same
// repo names that auto-sheriff.appspot's json uses.
// FIXME: Use better feeds.
// https://chromium.googlesource.com/chromium/blink/+log/master?format=json
// https://chromium.googlesource.com/chromium/chromium/+log/master?format=json
// https://code.google.com/feeds/p/skia/svnchanges/basic
// https://code.google.com/feeds/p/v8/svnchanges/basic
// https://code.google.com/feeds/p/nativeclient/svnchanges/basic
this.commits = {};
}
CTCommitLog.prototype.update = function() {
// FIXME: Turn net.js into net.html and import it at the top of this file.
return net.xml('http://blink.lc/blink/atom').then(this._processXml.bind(this));
}
CTCommitLog.prototype._processXml = function(xml) {
Array.prototype.forEach.call(xml.getElementsByTagName('entry'), function(logentry) {
var author = logentry.getElementsByTagName('author')[0].textContent.trim();
var message = logentry.getElementsByTagName('content')[0].textContent.trim();
var commit = new CTCommit(author, message);
this.commits[commit.revision] = commit;
}.bind(this));
}
</script>
\ No newline at end of file
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel='import' href='ct-commit.html'>
<script>
(function () {
var kExampleCommitMessage =
"This matches Gecko's behavior for these types of properties.\n" +
"\n" +
"BUG=17325\n" +
"R=jochen@chromium.org\n" +
"CC=abarth@chromium.org\n" +
"\n" +
"Review URL: https://chromiumcodereview.appspot.com/25022002\n" +
"\n" +
"git-svn-id: svn://svn.chromium.org/blink/trunk@158545 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n";
window.CTCommitMock = function() {
return new CTCommit("mkwst@chromium.org", kExampleCommitMessage);
};
})();
</script>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<script>
function CTCommit(author, message) {
this.author = author;
this.message = message;
this.revision = this._findRevision();
// FIXME: This is a needlessly expensive way to grab the first line.
this.summary = this.message.split('\n')[0];
}
CTCommit.prototype._findRevision = function() {
// FIXME: Make this regexp more general.
var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/;
var match = regexp.exec(this.message);
if (match)
return parseInt(match[1], 10);
return null;
}
</script>
\ No newline at end of file
...@@ -62,10 +62,11 @@ THE POSSIBILITY OF SUCH DAMAGE. ...@@ -62,10 +62,11 @@ THE POSSIBILITY OF SUCH DAMAGE.
<script src="bower_components/platform/platform.js"></script> <script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/polymer/polymer.html"> <link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="polymer-load-warning.html"> <link rel="import" href="polymer-load-warning.html">
<link rel="import" href="model/ct-commit-log-tests.html">
<link rel="import" href="ui/ct-builder-grid-tests.html"> <link rel="import" href="ui/ct-builder-grid-tests.html">
<link rel="import" href="ui/ct-builder-tests.html"> <link rel="import" href="ui/ct-builder-tests.html">
<link rel="import" href="ui/ct-commit-data-tests.html">
<link rel="import" href="ui/ct-commit-tests.html"> <link rel="import" href="ui/ct-commit-tests.html">
<link rel="import" href="ui/ct-commit-list-tests.html">
<link rel="import" href="ui/ct-embedded-flakiness-dashboard-tests.html"> <link rel="import" href="ui/ct-embedded-flakiness-dashboard-tests.html">
<link rel="import" href="ui/ct-failing-builders-tests.html"> <link rel="import" href="ui/ct-failing-builders-tests.html">
<link rel="import" href="ui/ct-failure-card-tests.html"> <link rel="import" href="ui/ct-failure-card-tests.html">
......
...@@ -56,46 +56,46 @@ var kExampleFailures = [{ ...@@ -56,46 +56,46 @@ var kExampleFailures = [{
"newestPassingRevision": 177165 "newestPassingRevision": 177165
}]; }];
var kExampleBuilderLatestRevisions = {
'WebKit Mac10.7': {
blink: 177164,
},
'WebKit Mac10.6 (dbg)': {
blink: 177166,
},
'WebKit Win7 (dbg)': {
blink: 177166,
},
};
module("ct-builder-grid"); module("ct-builder-grid");
asyncTest("basic", 11, function() { asyncTest("basic", 11, function() {
var oldBuildersInFlightForRevision = model.buildersInFlightForRevision; var grid = document.createElement('ct-builder-grid');
var reset = function() { grid.failures = kExampleFailures;
model.buildersInFlightForRevision = oldBuildersInFlightForRevision; grid.builderLatestRevisions = kExampleBuilderLatestRevisions;
}
try {
model.buildersInFlightForRevision = function(revision) {
return {'WebKit Mac10.7': {}};
};
var grid = document.createElement('ct-builder-grid'); requestAnimationFrame(function() {
grid.failures = kExampleFailures; var rows = grid.shadowRoot.querySelectorAll('tbody tr');
requestAnimationFrame(function() { equal(rows.length, 3);
reset();
var rows = grid.shadowRoot.querySelectorAll('tbody tr');
equal(rows.length, 3);
var row1 = grid.shadowRoot.querySelector('tbody td.CRASH').parentNode; var row1 = grid.shadowRoot.querySelector('tbody td.CRASH').parentNode;
equal(row1.children.length, 3); equal(row1.children.length, 3);
equal(row1.children[1].querySelectorAll('ct-builder').length, 1); equal(row1.children[1].querySelectorAll('ct-builder').length, 1);
equal(row1.children[1].querySelectorAll('ct-builder')[0].builderName, 'WebKit Mac10.7'); equal(row1.children[1].querySelectorAll('ct-builder')[0].builderName, 'WebKit Mac10.7');
equal(row1.children[2].querySelectorAll('ct-builder').length, 2); equal(row1.children[2].querySelectorAll('ct-builder').length, 2);
equal(row1.children[2].querySelectorAll('ct-builder')[0].builderName, 'WebKit Mac10.6 (dbg)'); equal(row1.children[2].querySelectorAll('ct-builder')[0].builderName, 'WebKit Mac10.6 (dbg)');
equal(row1.children[2].querySelectorAll('ct-builder')[1].builderName, 'WebKit Win7 (dbg)'); equal(row1.children[2].querySelectorAll('ct-builder')[1].builderName, 'WebKit Win7 (dbg)');
var row2 = grid.shadowRoot.querySelector('tbody td.TEXT').parentNode; var row2 = grid.shadowRoot.querySelector('tbody td.TEXT').parentNode;
equal(row2.children.length, 3); equal(row2.children.length, 3);
equal(row2.children[1].querySelectorAll('ct-builder').length, 1); equal(row2.children[1].querySelectorAll('ct-builder').length, 1);
equal(row2.children[2].querySelectorAll('ct-builder').length, 1); equal(row2.children[2].querySelectorAll('ct-builder').length, 1);
notEqual(rows[2].children[0].className.indexOf('BUILDING'), -1); notEqual(rows[2].children[0].className.indexOf('BUILDING'), -1);
start(); start();
}); });
} catch(e) {
reset();
}
}); });
})() })()
......
...@@ -7,7 +7,7 @@ found in the LICENSE file. ...@@ -7,7 +7,7 @@ found in the LICENSE file.
<link rel="import" href="ct-builder.html"> <link rel="import" href="ct-builder.html">
<!-- Table of failure types, listing the failing builders for each type. --> <!-- Table of failure types, listing the failing builders for each type. -->
<polymer-element name="ct-builder-grid" attributes="failures"> <polymer-element name="ct-builder-grid" attributes="failures builderLatestRevisions">
<template> <template>
<style> <style>
table { table {
...@@ -99,6 +99,7 @@ found in the LICENSE file. ...@@ -99,6 +99,7 @@ found in the LICENSE file.
<script> <script>
Polymer({ Polymer({
failures: [], failures: [],
builderLatestRevisions: {},
resultTypes: {}, resultTypes: {},
keys: function(obj) { keys: function(obj) {
...@@ -123,15 +124,15 @@ found in the LICENSE file. ...@@ -123,15 +124,15 @@ found in the LICENSE file.
this.failures.forEach(function(failure) { this.failures.forEach(function(failure) {
passingRevisions.push(failure.newestPassingRevision); passingRevisions.push(failure.newestPassingRevision);
var results = failure.resultNodesByBuilder; var results = failure.resultNodesByBuilder;
Object.keys(results, (function(builderName) { Object.keys(results, (function(builder) {
var result = results[builderName]; var result = results[builder];
if (!result.is_unexpected) if (!result.is_unexpected)
return; return;
if (!Object.has(this.resultTypes, result.actual)) if (!Object.has(this.resultTypes, result.actual))
this.resultTypes[result.actual] = {}; this.resultTypes[result.actual] = {};
this.resultTypes[result.actual][builderName] = this.resultTypes[result.actual][builder] =
config.builders[builderName]; config.builders[builder];
}).bind(this)); }).bind(this));
}, this); }, this);
...@@ -140,19 +141,27 @@ found in the LICENSE file. ...@@ -140,19 +141,27 @@ found in the LICENSE file.
this.resultTypes['BUILDING'] = buildingType; this.resultTypes['BUILDING'] = buildingType;
}, },
_buildersInFlightForRevision: function(revision) {
return Object.keys(this.builderLatestRevisions).filter(function(builder) {
// FIXME: This should look at all chromium/v8/etc revisions as well.
// Is this concept of "building" builders even useful as is?
return parseInt(this.builderLatestRevisions[builder].blink, 10) < revision;
}.bind(this));
},
_getBuilding: function(revisions) { _getBuilding: function(revisions) {
var building = {}; var building = {};
var builderNames = []; var builders = [];
revisions.unique().forEach(function(revision) { revisions.unique().forEach(function(revision) {
builderNames.push.apply(builderNames, builders.push.apply(builders, this._buildersInFlightForRevision(revision + 1));
Object.keys(model.buildersInFlightForRevision(revision + 1))); }.bind(this));
});
builderNames.unique().forEach(function(builderName) { builders.unique().forEach(function(builder) {
if (!config.builders[builderName]) if (!config.builders[builder])
return; return;
building[builderName] = building[builder] = {'debug': config.builders[builder].debug};
{'debug': config.builders[builderName].debug};
}); });
return building; return building;
}, },
}); });
......
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="ct-commit-data.html">
<script>
(function () {
module("ct-commit-data");
asyncTest("basic", 2, function() {
// FIXME: ct-commit-data should be self-contained instead of depending on this static function.
var oldCommitDataListForRevisionRange = model.commitDataListForRevisionRange;
var reset = function() {
model.commitDataListForRevisionRange = oldCommitDataListForRevisionRange;
}
try {
model.commitDataListForRevisionRange = function(first, last) { return [first + ':' + last]; };
var commitData = document.createElement('ct-commit-data');
commitData.first = 1;
commitData.last = 2;
commitData.async(function() {
reset();
equal(commitData.data.length, 1);
equal(commitData.data[0], '1:2');
start();
});
} catch(e) {
reset();
}
});
})()
</script>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<polymer-element name="ct-commit-data" attributes="first last data">
<script>
Polymer({
data: [],
first: 0,
last: 0,
firstChanged: function() {
this._update();
},
lastChanged: function() {
this._update();
},
_update: function() {
this.data = model.commitDataListForRevisionRange(this.first, this.last);
},
});
</script>
</polymer-element>
<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="ct-commit-list.html">
<link rel="import" href="../model/ct-commit-log-mock.html">
<script>
(function () {
module("ct-commit-list");
asyncTest("basic", 2, function() {
var list = document.createElement('ct-commit-list');
list.first = 158545;
list.last = 158547;
list.commits = new CTCommitLogMock();
Platform.endOfMicrotask(function() {
var commits = list.shadowRoot.querySelectorAll('ct-commit');
equal(commits.length, 1);
deepEqual(list._revisions, [158545, 158546, 158547])
start();
});
});
})()
</script>
...@@ -5,18 +5,40 @@ found in the LICENSE file. ...@@ -5,18 +5,40 @@ found in the LICENSE file.
--> -->
<link rel="import" href="ct-commit.html"> <link rel="import" href="ct-commit.html">
<link rel="import" href="ct-commit-data.html">
<polymer-element name="ct-commit-list" attributes="first last" noscript> <polymer-element name="ct-commit-list" attributes="first last commits" noscript>
<template> <template>
<style> <style>
:host { :host {
display: block; display: block;
} }
</style> </style>
<ct-commit-data first="{{first}}" last="{{last}}" data="{{commitData}}"></ct-commit-data> <template repeat="{{revision in _revisions}}">
<template repeat="{{commit in commitData}}"> <template if="{{commits[revision]}}">
<ct-commit data="{{commit}}"></ct-commit> <ct-commit data="{{commits[revision]}}"></ct-commit>
</template>
</template> </template>
</template> </template>
<script>
Polymer({
commits: {},
first: 0,
last: 0,
_revisions: [],
observe: {
first: '_update',
last: '_update',
},
_update: function() {
if (!this.first || !this.last)
return;
this._revisions = [];
for (var i = this.first; i <= this.last; i++)
this._revisions.push(i);
},
});
</script>
</polymer-element> </polymer-element>
...@@ -6,32 +6,23 @@ found in the LICENSE file. ...@@ -6,32 +6,23 @@ found in the LICENSE file.
<link rel="import" href="ct-commit.html"> <link rel="import" href="ct-commit.html">
<link rel="import" href="model/ct-commit-mock.html">
<script> <script>
(function () { (function () {
var kExampleCommitData = {
"revision": 2,
"title": "Fix one more layering violation caught by check-blink-deps",
"time": "2013-09-30T19:36:21Z",
"summary": "core/platform may not depend on core/ even for testing.",
"author": "eseidel@chromium.org",
"reviewer": "abarth@chromium.org, abarth",
"bugID": [12],
"revertedRevision": undefined
}
module("ct-commit"); module("ct-commit");
asyncTest("basic", 2, function() { asyncTest("basic", 2, function() {
var grouper = document.createElement('ct-commit'); var grouper = document.createElement('ct-commit');
grouper.data = kExampleCommitData; grouper.data = new CTCommitMock();
Platform.endOfMicrotask(function() { Platform.endOfMicrotask(function() {
var html = grouper.shadowRoot.innerHTML; var html = grouper.shadowRoot.innerHTML;
equal(html.indexOf('eseidel') != -1, true) equal(html.indexOf('mkwst') != -1, true)
equal(html.indexOf('may not depend on') != -1, true) equal(html.indexOf('behavior for these types') != -1, true)
start(); start();
}); });
......
...@@ -37,6 +37,7 @@ found in the LICENSE file. ...@@ -37,6 +37,7 @@ found in the LICENSE file.
<script> <script>
Polymer({ Polymer({
changesetURL: function(revision) { changesetURL: function(revision) {
// FIXME: This is the last caller of trac.*. Find a better home for this.
return trac.changesetURL(revision); return trac.changesetURL(revision);
}, },
}); });
......
...@@ -4,11 +4,12 @@ Use of this source code is governed by a BSD-style license that can be ...@@ -4,11 +4,12 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. found in the LICENSE file.
--> -->
<polymer-element name="ct-failure-analyzer" attributes="failures status"> <polymer-element name="ct-failure-analyzer" attributes="failures status builderLatestRevisions">
<script> <script>
Polymer({ Polymer({
failures: {}, failures: {},
pendingUnexpectedFailures: [], pendingUnexpectedFailures: [],
builderLatestRevisions: {},
update: function() { update: function() {
this._updateFailingBuilders(); this._updateFailingBuilders();
...@@ -21,6 +22,15 @@ found in the LICENSE file. ...@@ -21,6 +22,15 @@ found in the LICENSE file.
}).bind(this)); }).bind(this));
}, },
_updateBuilderLatestRevisions: function() {
this.builderLatestRevisions = {};
Object.keys(config.builders, function(builder) {
this.builderLatestRevisions[builder] = {
blink: model.state.resultsByBuilder[builder].blink_revision,
};
}.bind(this));
},
_updateUnexpectedFailures: function() { _updateUnexpectedFailures: function() {
this.pendingUnexpectedFailures = []; this.pendingUnexpectedFailures = [];
var numberOfTestsAnalyzed = 0; var numberOfTestsAnalyzed = 0;
...@@ -33,6 +43,7 @@ found in the LICENSE file. ...@@ -33,6 +43,7 @@ found in the LICENSE file.
}.bind(this)).then(function() { }.bind(this)).then(function() {
this.status = 'Done'; this.status = 'Done';
this.failures.unexpected = this.pendingUnexpectedFailures; this.failures.unexpected = this.pendingUnexpectedFailures;
this._updateBuilderLatestRevisions();
}.bind(this)); }.bind(this));
}.bind(this)); }.bind(this));
}, },
......
...@@ -8,7 +8,7 @@ found in the LICENSE file. ...@@ -8,7 +8,7 @@ found in the LICENSE file.
<link rel="import" href="ct-commit-list.html"> <link rel="import" href="ct-commit-list.html">
<link rel="import" href="ct-test-list.html"> <link rel="import" href="ct-test-list.html">
<polymer-element name="ct-failure-card" attributes="failures"> <polymer-element name="ct-failure-card" attributes="failures builderLatestRevisions commits">
<template> <template>
<style> <style>
:host { :host {
...@@ -55,17 +55,20 @@ found in the LICENSE file. ...@@ -55,17 +55,20 @@ found in the LICENSE file.
align-self: flex-start; align-self: flex-start;
} }
</style> </style>
<ct-builder-grid failures="{{failures}}"></ct-builder-grid> <ct-builder-grid failures="{{failures}}" builderLatestRevisions="{{builderLatestRevisions}}"></ct-builder-grid>
<div class="failure"> <div class="failure">
<ct-test-list tests="{{failures|testNames}}"></ct-test-list> <ct-test-list tests="{{failures|testNames}}"></ct-test-list>
<ct-commit-list first="{{failures[0].newestPassingRevision + 1}}" <ct-commit-list first="{{failures[0].newestPassingRevision + 1}}"
last="{{failures[0].oldestFailingRevision}}"></ct-commit-list> last="{{failures[0].oldestFailingRevision}}"
commits="{{commits}}"></ct-commit-list>
</div> </div>
<paper-button id="examine" on-tap="{{examine}}">Examine</paper-button> <paper-button id="examine" on-tap="{{examine}}">Examine</paper-button>
</template> </template>
<script> <script>
Polymer({ Polymer({
failures: [], failures: [],
builderLatestRevisions: {},
commits: {},
testNames: function(failures) { testNames: function(failures) {
return failures.map(function(failureAnalysis) { return failureAnalysis.testName }).sort(); return failures.map(function(failureAnalysis) { return failureAnalysis.testName }).sort();
......
...@@ -6,7 +6,7 @@ found in the LICENSE file. ...@@ -6,7 +6,7 @@ found in the LICENSE file.
<link rel="import" href="ct-failure-card.html"> <link rel="import" href="ct-failure-card.html">
<polymer-element name="ct-failure-stream" attributes="groups" noscript> <polymer-element name="ct-failure-stream" attributes="groups builderLatestRevisions commits" noscript>
<template> <template>
<style> <style>
:host { :host {
...@@ -20,7 +20,7 @@ found in the LICENSE file. ...@@ -20,7 +20,7 @@ found in the LICENSE file.
} }
</style> </style>
<template repeat="{{failures in groups}}"> <template repeat="{{failures in groups}}">
<ct-failure-card failures="{{failures}}"></ct-failure-card> <ct-failure-card failures="{{failures}}" builderLatestRevisions="{{builderLatestRevisions}}" commits="{{commits}}"></ct-failure-card>
</template> </template>
</template> </template>
</polymer-element> </polymer-element>
...@@ -6,6 +6,7 @@ found in the LICENSE file. ...@@ -6,6 +6,7 @@ found in the LICENSE file.
<link rel="import" href="../bower_components/paper-button/paper-button.html"> <link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/paper-toast/paper-toast.html"> <link rel="import" href="../bower_components/paper-toast/paper-toast.html">
<link rel="import" href="../model/ct-commit-log.html">
<link rel="import" href="ct-failing-builders.html"> <link rel="import" href="ct-failing-builders.html">
<link rel="import" href="ct-failure-analyzer.html"> <link rel="import" href="ct-failure-analyzer.html">
<link rel="import" href="ct-failure-grouper.html"> <link rel="import" href="ct-failure-grouper.html">
...@@ -37,22 +38,26 @@ found in the LICENSE file. ...@@ -37,22 +38,26 @@ found in the LICENSE file.
padding: 0; padding: 0;
} }
</style> </style>
<ct-failure-analyzer id="analyzer" status="{{ analyzerStatus }}" failures="{{ failures }}"></ct-failure-analyzer> <ct-failure-analyzer id="analyzer" status="{{ analyzerStatus }}" failures="{{ failures }}" builderLatestRevisions="{{ builderLatestRevisions }}"></ct-failure-analyzer>
<ct-failure-grouper failures="{{ failures.unexpected }}" groups="{{ failureGroups }}"></ct-failure-grouper> <ct-failure-grouper failures="{{ failures.unexpected }}" groups="{{ failureGroups }}"></ct-failure-grouper>
<ct-tree-status project="chromium"></ct-tree-status> <ct-tree-status project="chromium"></ct-tree-status>
<ct-tree-status project="blink"></ct-tree-status> <ct-tree-status project="blink"></ct-tree-status>
<ct-failing-builders builders="{{ failures.builders }}"></ct-failing-builders> <ct-failing-builders builders="{{ failures.builders }}"></ct-failing-builders>
<ct-failure-stream groups="{{ failureGroups }}"></ct-failure-stream> <ct-failure-stream groups="{{ failureGroups }}" builderLatestRevisions="{{ builderLatestRevisions }}" commits="{{ revisionLog.commits }}"></ct-failure-stream>
<paper-toast id="toast" text="{{ analyzerStatus }}"></paper-toast> <paper-toast id="toast" text="{{ analyzerStatus }}"></paper-toast>
</template> </template>
<script> <script>
Polymer({ Polymer({
revisionLog: new CTCommitLog(),
attached: function() { attached: function() {
this.update(); this.update();
setInterval(this.update.bind(this), config.kUpdateFrequency); setInterval(this.update.bind(this), config.kUpdateFrequency);
}, },
update: function() { update: function() {
// FIXME: These shouldn't update if there's already an update in progress.
this.revisionLog.update();
this.$.analyzer.update(); this.$.analyzer.update();
var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status"); var treeStatuses = this.shadowRoot.querySelectorAll("ct-tree-status");
for (var i = 0; i < treeStatuses.length; i++) for (var i = 0; i < treeStatuses.length; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment