Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently refer to Crbug as Crbug #73

Merged
merged 3 commits into from
Oct 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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