Skip to content

Commit

Permalink
Merge pull request #73 from alancutter/monorailName
Browse files Browse the repository at this point in the history
Consistently refer to Crbug as Crbug
  • Loading branch information
shans committed Oct 18, 2016
2 parents 15b6480 + 7c6a31f commit 17fd107
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions client/crbug-lib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

if (window.CrBug) {
if (window.Crbug) {
return;
}

Expand All @@ -12,7 +12,7 @@ function queryURL(query) {
return 'https://bugs.chromium.org/p/chromium/issues/list?can=2&q=' + encodeURIComponent(queryString(query));
}

window.CrBug = {
window.Crbug = {
queryString,
queryURL,
};
Expand Down
4 changes: 2 additions & 2 deletions client/cz-component-dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
},

updateComponentIssues: function(component) {
registerSource('cz-issues', {component: component.name}, function(data) {
registerSource('cz-crbug-issues', {component: component.name}, function(data) {
var teamsIssueList = new IssueList();
var othersIssueList = new IssueList();
var unownedIssueList = new IssueList();
Expand All @@ -155,7 +155,7 @@
crbugLink: function(component, query) {
var componentQuery = clone(query || {});
componentQuery.component = component;
return CrBug.queryURL(componentQuery);
return Crbug.queryURL(componentQuery);
},
});
</script>
Expand Down
7 changes: 3 additions & 4 deletions client/cz-issues.html → client/cz-crbug-issues.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<link rel="import" href="../bower_components/iron-ajax/iron-ajax.html">
<script src="../bower_components/papaparse/papaparse.min.js"></script>
<script src="chromez-behaviors.js"></script>
<script src="crbug-lib.js"></script>

<dom-module id="cz-issues">
<dom-module id="cz-crbug-issues">

<template>
<template is="dom-repeat" items="{{searchQueries}}">
Expand All @@ -21,7 +20,7 @@

<script>
Polymer({
is: "cz-issues",
is: "cz-crbug-issues",
behaviors: [ChromeZBehaviors.AJAXBehavior],

onResponse: function(data) {
Expand All @@ -34,7 +33,7 @@
registerQuery: function(query, callback) {
var params = {
site: 'issues',
q: CrBug.queryString(query),
q: Crbug.queryString(query),
};
this.addCallbackToQuery(query, callback, params);
}
Expand Down
4 changes: 2 additions & 2 deletions client/cz-issue-priority-dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@
crbugLink: function(email, query) {
var userQuery = clone(query);
userQuery.owner = email;
return CrBug.queryURL(userQuery);
return Crbug.queryURL(userQuery);
},

usersChanged: function(users) {
// TODO: this probably only works for all-or-nothing changes to users right now.
users.forEach(function(user, idx) {
registerSource('cz-issues', {owner: user.email}, function(data) {
registerSource('cz-crbug-issues', {owner: user.email}, function(data) {
var issueList = new IssueList();
for (var i = 0; i < data.length; i++) {
issueList.append(new Issue(data[i]));
Expand Down
2 changes: 1 addition & 1 deletion client/cz-milestones-dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
usersChanged: function(users) {
// TODO: this probably only works for all-or-nothing changes to users right now.
users.forEach(function(user, idx) {
registerSource('cz-issues', {owner: user.email}, function(data) {
registerSource('cz-crbug-issues', {owner: user.email}, function(data) {
for (var i = 0; i < data.length; i++) {
for (var j = 0; j < data[i].labels.length; j++) {
var label = data[i].labels[j];
Expand Down
4 changes: 2 additions & 2 deletions client/cz-regression-dash.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
if (this.components.length == 0) {
return;
}
registerSource('cz-issues', {type: 'Bug-Regression', component: this.components}, function(issues) {
registerSource('cz-crbug-issues', {type: 'Bug-Regression', component: this.components}, function(issues) {
var regressionVersions = [];
for (var issue of issues) {
var version = null;
Expand All @@ -124,7 +124,7 @@
},

crbugLink: function(components) {
return CrBug.queryURL({type: 'Bug-Regression', component: components});
return Crbug.queryURL({type: 'Bug-Regression', component: components});
},

joinSpace: list => list.join(' '),
Expand Down
18 changes: 9 additions & 9 deletions client/issues-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ var _defaultReviewLevel = 'none';
var _inSLOColor = '#4CAF50'; // Green 500
var _noSLOColor = '#757575'; // Grey 600

var Issue = function(monorailIssue) {
this._rawData = monorailIssue;
var Issue = function(crbugIssue) {
this._rawData = crbugIssue;

this.id = monorailIssue.id;
if (monorailIssue.owner) {
this.owner = monorailIssue.owner.name;
this.id = crbugIssue.id;
if (crbugIssue.owner) {
this.owner = crbugIssue.owner.name;
} else {
this.owner = null;
}
this.summary = monorailIssue.summary;
this.summary = crbugIssue.summary;
this.priority = undefined;
this._reviewLevel = _defaultReviewLevel;

this._lastUpdatedString = monorailIssue.updated;
this._lastUpdatedString = crbugIssue.updated;
this._lastUpdatedMS = Date.parse(this._lastUpdatedString);

for (var i = 0; i < monorailIssue.labels.length; i++) {
var label = monorailIssue.labels[i];
for (var i = 0; i < crbugIssue.labels.length; i++) {
var label = crbugIssue.labels[i];
if (label.substring(0, 4) == 'Pri-') {
this.priority = Number(label.substring(4));
}
Expand Down

0 comments on commit 17fd107

Please sign in to comment.