Bug 1391658 - Enable `curly`, `object-curly-spacing`, `quote-props` and `key-spacing`rules as per airbnb recommendations (#2724)

Bug 1391658 - Enable `curly`, `object-curly-spacing`, `quote-props`, `key-spacing` rules as per airbnb recommendation
This commit is contained in:
Shruti Jasoria 2017-08-23 20:13:53 +05:30 коммит произвёл William Lachance
Родитель 420df42b92
Коммит e8fb2cefb5
45 изменённых файлов: 290 добавлений и 279 удалений

Просмотреть файл

@ -38,12 +38,17 @@ module.exports = neutrino => {
'block-spacing': ['error', 'always'],
'comma-spacing': 'error',
'comma-style': 'error',
'curly': ['error', 'multi-line', 'consistent'],
'eol-last': 'error',
'eqeqeq': 'error',
'guard-for-in': 'error',
'indent': ['error', 4, {
'SwitchCase': 1
}],
'key-spacing': ['error', {
beforeColon: false,
afterColon: true
}],
'keyword-spacing': 'error',
'linebreak-style': 'error',
'new-cap': 'error',
@ -89,6 +94,7 @@ module.exports = neutrino => {
'no-useless-call': 'error',
'no-void': 'error',
'no-with': 'error',
'object-curly-spacing': ['error', 'always'],
'semi': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', {
@ -97,6 +103,11 @@ module.exports = neutrino => {
asyncArrow: 'always'
}],
'strict': ['error', 'global'],
'quote-props': ['error', 'as-needed', {
keywords: false,
unnecessary: true,
numbers: false
}],
'yoda': 'error'
},
globals: ['angular', '$', '_', 'treeherder', 'perf',
@ -108,4 +119,3 @@ module.exports = neutrino => {
}
}));
};

Просмотреть файл

@ -166,7 +166,7 @@ treeherder.component("loginCallback", {
const results = $location.search();
if (results.certificate) {
results.certificate = JSON.parse(results.certificate);
payload.ext = hawk.utils.base64urlEncode(JSON.stringify({"certificate": results.certificate}));
payload.ext = hawk.utils.base64urlEncode(JSON.stringify({ certificate: results.certificate }));
}
const header = hawk.client.header(loginUrl, 'GET', payload);
@ -174,7 +174,7 @@ treeherder.component("loginCallback", {
// send a request from client side to TH server signed with TC
// creds from login.taskcluster.net
$http.get(loginUrl,
{headers: {"tcauth": header.field}})
{ headers: { tcauth: header.field } })
.then(function (resp) {
var user = resp.data;
user.loggedin = true;

Просмотреть файл

@ -2,8 +2,9 @@
treeherder.component('phCompareTable', {
templateUrl: ['$element', '$attrs', function ($element, $attrs) {
if ($attrs.type === 'trend')
if ($attrs.type === 'trend') {
return 'partials/perf/trendtable.html';
}
return 'partials/perf/comparetable.html';
}],
bindings: {
@ -51,8 +52,9 @@ treeherder.component('phCompareTable', {
return _.filter(results, function (result) {
var testCondition = `${key} ${($attrs.type === 'trend') ? result.trendResult.name : result.name}`;
return _.every(ctrl.filterOptions.filter.split(' '), function (matchText) {
if ($attrs.type === 'trend')
if ($attrs.type === 'trend') {
return filter(testCondition, matchText) && shouldBeShown(result.trendResult);
}
return filter(testCondition, matchText) && shouldBeShown(result);
});
});
@ -67,7 +69,7 @@ treeherder.component('phCompareTable', {
}
});
ctrl.filteredResultList = _.map(_.keys(ctrl.filteredResultList), function (testName) {
return {'testName': testName, 'results': ctrl.filteredResultList[testName]};
return { testName: testName, results: ctrl.filteredResultList[testName] };
});
};

Просмотреть файл

@ -227,8 +227,8 @@ treeherder.controller('BugFilerCtrl', [
$scope.searching = "DXR & Mercurial";
const dxrlink = `${dxrBaseUrl}mozilla-central/search?q=file:${$uibModalInstance.possibleFilename}&redirect=false&limit=5`;
// Bug 1358328 - We need to override headers here until DXR returns JSON with the default Accept header
$http.get(dxrlink, {"headers": {
"Accept": "application/json"
$http.get(dxrlink, { headers: {
Accept: "application/json"
} }).then((secondRequest) => {
const results = secondRequest.data.results;
var resultsCount = results.length;
@ -375,19 +375,19 @@ treeherder.controller('BugFilerCtrl', [
"Content-Type": "application/json; charset=utf-8"
},
data: {
"product": productString,
"component": componentString,
"summary": summarystring,
"keywords": keywords,
"version": version.name,
"blocks": blocks,
"depends_on": dependsOn,
"see_also": seeAlso,
"crash_signature": crashSignature,
"severity": severity,
"priority": priority,
"comment": descriptionStrings,
"comment_tags": "treeherder"
product: productString,
component: componentString,
summary: summarystring,
keywords: keywords,
version: version.name,
blocks: blocks,
depends_on: dependsOn,
see_also: seeAlso,
crash_signature: crashSignature,
severity: severity,
priority: priority,
comment: descriptionStrings,
comment_tags: "treeherder"
}
});
})

Просмотреть файл

@ -178,8 +178,7 @@ treeherderApp.controller('ResultSetCtrl', [
$scope.cancelAllJobs = function (revision) {
$scope.showConfirmCancelAll = false;
if (!$scope.canCancelJobs())
return;
if (!$scope.canCancelJobs()) return;
ThResultSetModel.cancelAll($scope.resultset.id, $scope.repoName).then(function () {
return thBuildApi.cancelAll($scope.repoName, revision);

Просмотреть файл

@ -677,7 +677,7 @@ treeherderApp.controller('MainCtrl', [
$scope.changeRepo = function (repo_name) {
// preserves filter params as the user changes repos and revisions
$location.search(_.extend({
"repo": repo_name
repo: repo_name
}, thJobFilters.getActiveFilters()));
};

Просмотреть файл

@ -368,7 +368,7 @@ perf.controller('AlertsCtrl', [
// We need to update not only the summary when resetting the alert,
// but other summaries affected by the change
var summariesToUpdate = [alertSummary].concat(_.flatten(_.map(
_.filter(alertSummary.alerts, {'selected': true}),
_.filter(alertSummary.alerts, { selected: true }),
function (alert) {
return _.find($scope.alertSummaries, function (alertSummary) {
return alertSummary.id === alert.related_summary_id;
@ -406,8 +406,7 @@ perf.controller('AlertsCtrl', [
[alertSummary.push_id, alertSummary.prev_push_id],
function (resultSetId) {
// skip nulls
if (resultSetId === null)
return;
if (resultSetId === null) return;
var repoMap = resultSetToSummaryMap[alertSummary.repository];
// initialize map for this result set, if not already
// initialized

Просмотреть файл

@ -18,10 +18,11 @@ perf.controller('CompareChooserCtrl', [
$scope.revisionComparison = false;
var getParameter = function (paramName, defaultValue) {
if ($stateParams[paramName])
if ($stateParams[paramName]) {
return $stateParams[paramName];
else if (localStorageService.get(paramName))
} else if (localStorageService.get(paramName)) {
return localStorageService.get(paramName);
}
return defaultValue;
};
@ -281,8 +282,9 @@ perf.controller('CompareResultsCtrl', [
}
cmap.name = platform;
if (Object.keys($scope.compareResults).indexOf(testName) < 0)
if (Object.keys($scope.compareResults).indexOf(testName) < 0) {
$scope.compareResults[testName] = [];
}
$scope.compareResults[testName].push(cmap);
});
});
@ -905,8 +907,8 @@ perf.controller('CompareSubtestDistributionCtrl', ['$scope', '$stateParams', '$q
);
//metrics-graphics doesn't accept "0" as x_accesor
replicateValues = replicateValues.map((value, index) => ({
"replicate": (index + 1).toString(),
"value": value
replicate: (index + 1).toString(),
value: value
}));
metricsgraphics.data_graphic({
title: `${target} replicates over ${numRuns} run${(numRuns > 1) ? 's' : ''}`,
@ -955,8 +957,6 @@ perf.controller('CompareSubtestDistributionCtrl', ['$scope', '$stateParams', '$q
}).then((result) => {
$scope.originalResultSet = result.resultSet;
$scope.originalReplicateError = result.replicateDataError;
if ($scope.originalReplicateError)
$scope.noResult = "base";
return fetchAndDrawReplicateGraph($scope.newProject.name,
$scope.newRevision,
$scope.newSubtestSignature,
@ -964,8 +964,6 @@ perf.controller('CompareSubtestDistributionCtrl', ['$scope', '$stateParams', '$q
}).then((result) => {
$scope.newResultSet = result.resultSet;
$scope.newReplicateError = result.replicateDataError;
if ($scope.newReplicateError)
$scope.noResult = "new";
window.document.title = `${$scope.platform}: ${$scope.testName}`;
$scope.dataLoading = false;
});

Просмотреть файл

@ -287,7 +287,7 @@ perf.controller('GraphsCtrl', [
opts.min = ranges.yaxis.from;
opts.max = ranges.yaxis.to;
});
$scope.zoom = {'x': [ranges.xaxis.from, ranges.xaxis.to], 'y': [ranges.yaxis.from, ranges.yaxis.to]};
$scope.zoom = { x: [ranges.xaxis.from, ranges.xaxis.to], y: [ranges.yaxis.from, ranges.yaxis.to] };
$scope.plot.setupGrid();
$scope.plot.draw();
@ -476,8 +476,7 @@ perf.controller('GraphsCtrl', [
$("#graph").on("plothover", function (event, pos, item) {
// if examining an item, disable this behaviour
if ($scope.selectedDataPoint)
return;
if ($scope.selectedDataPoint) return;
$('#graph').css({ cursor: item ? 'pointer' : '' });
@ -536,8 +535,9 @@ perf.controller('GraphsCtrl', [
$scope.seriesList[0].platform +
" (" + $scope.seriesList[0].projectName +
")");
if ($scope.seriesList.length > 1)
if ($scope.seriesList.length > 1) {
window.document.title += " and others";
}
} else {
window.document.title = $state.current.title;
}
@ -723,11 +723,11 @@ perf.controller('GraphsCtrl', [
ThRepositoryModel.load().then(function () {
if ($stateParams.timerange) {
var timeRange = _.find(phTimeRanges,
{'value': parseInt($stateParams.timerange)});
{ value: parseInt($stateParams.timerange) });
$scope.myTimerange = timeRange;
} else {
$scope.myTimerange = _.find(phTimeRanges,
{'value': phDefaultTimeRangeValue});
{ value: phDefaultTimeRangeValue });
}
$scope.timeRangeChanged = function () {
$scope.loadingGraphs = true;
@ -746,8 +746,8 @@ perf.controller('GraphsCtrl', [
var zoomString = decodeURIComponent($stateParams.zoom).replace(/[\[\{\}\]"]+/g, '');
var zoomArray = zoomString.split(",");
var zoomObject = {
"x": zoomArray.slice(0, 2),
"y": zoomArray.slice(2, 4)
x: zoomArray.slice(0, 2),
y: zoomArray.slice(2, 4)
};
$scope.zoom = (zoomString) ? zoomObject : [];
} else {

Просмотреть файл

@ -84,9 +84,9 @@ treeherder.directive('thSimilarJobs', [
});
scope.similar_jobs = [];
scope.similar_jobs_filters = {
"machine_id": true,
"job_type_id": true,
"build_platform_id": true
machine_id: true,
job_type_id: true,
build_platform_id: true
};
scope.update_similar_jobs = function (job) {
var options = { result_set_id__ne: job.result_set_id };

Просмотреть файл

@ -773,7 +773,7 @@ treeherder.directive('thCloneJobs', [
//Add platforms
platformTdEl = $(platformInterpolator(
{'name':platformName, 'option':option, 'id':platformId}
{ name: platformName, option: option, id: platformId }
));
rowEl.append(platformTdEl);
@ -982,8 +982,8 @@ treeherder.directive('thCloneJobs', [
//Add platforms
rowHtml += platformInterpolator(
{
'name':thPlatformName(platform.name), 'option':platform.option,
'id':thAggregateIds.getPlatformRowId(
name: thPlatformName(platform.name), option: platform.option,
id: thAggregateIds.getPlatformRowId(
resultset.id,
platform.name,
platform.option

Просмотреть файл

@ -20,7 +20,7 @@ treeherder.directive('thWatchedRepo', [
var $log = new ThLog("thWatchedRepo");
var statusInfo = {
"open": {
open: {
icon: "fa-circle-o",
color: "tree-open",
btnClass: "btn-view-nav"
@ -30,12 +30,12 @@ treeherder.directive('thWatchedRepo', [
color: "tree-approval",
btnClass: "btn-view-nav"
},
"closed": {
closed: {
icon: "fa-times-circle",
color: "tree-closed",
btnClass: "btn-view-nav-closed"
},
"unsupported": {
unsupported: {
icon: "fa-question",
color: "tree-unavailable",
btnClass: "btn-view-nav"
@ -46,7 +46,7 @@ treeherder.directive('thWatchedRepo', [
color: "tree-unavailable",
btnClass: "btn-view-nav"
},
"error": {
error: {
icon: "fa-question",
color: "tree-unavailable",
btnClass: "btn-view-nav"
@ -136,7 +136,7 @@ treeherder.directive('thCheckboxDropdownContainer', [
});
$('.checkbox-dropdown-menu').on({
"click": function (ev) {
click: function (ev) {
if ($(ev.target).hasClass("dropdown-link") ||
$(ev.target).parent().hasClass("dropdown-link")) {
scope.closeable = false;

Просмотреть файл

@ -204,7 +204,7 @@ treeherder.factory('PhAlerts', [
AlertSummary.prototype.modifySelectedAlerts = function (modification) {
this.allSelected = false;
return $q.all(_.filter(this.alerts, {'selected': true}).map(
return $q.all(_.filter(this.alerts, { selected: true }).map(
function (selectedAlert) {
selectedAlert.selected = false;
return selectedAlert.modify(modification);

Просмотреть файл

@ -274,8 +274,8 @@ treeherder.factory('ThResultSetModel', ['$rootScope', '$http', '$location',
return;
}
let bbdata = {
"requested_jobs": bbnames,
"decision_task_id": decisionTaskID
requested_jobs: bbnames,
decision_task_id: decisionTaskID
};
return $http.post(
thUrl.getProjectUrl("/resultset/", repoName) + resultset_id + '/trigger_runnable_jobs/',

Просмотреть файл

@ -338,7 +338,7 @@ treeherder.factory('ThResultSetStore', [
if (repoName !== "try") {
decisionTaskId = "";
}
return ThRunnableJobModel.get_list(repoName, {"decision_task_id": decisionTaskId}).then(function (jobList) {
return ThRunnableJobModel.get_list(repoName, { decision_task_id: decisionTaskId }).then(function (jobList) {
var id = resultSet.id;
_.each(jobList, function (job) {
job.result_set_id = id;
@ -934,13 +934,13 @@ treeherder.factory('ThResultSetStore', [
var getGeckoDecisionJob = function (repoName, resultsetId) {
let resultSet = getResultSet(repoName, resultsetId);
let platform = _.find(resultSet.platforms, {
"name": "gecko-decision",
"groups": [{"jobs": [{"state": "completed", "job_type_symbol": "D"}]}]});
name: "gecko-decision",
groups: [{ jobs: [{ state: "completed", job_type_symbol: "D" }] }] });
if (platform) {
// Gecko Decision Task has been completed.
// Let's fetch the URL of full-tasks-graph.json
// This extra search is important to avoid confusion with Action Tasks
return _.find(platform.groups[0].jobs, {"job_type_symbol": "D"});
return _.find(platform.groups[0].jobs, { job_type_symbol: "D" });
}
return undefined;

Просмотреть файл

@ -42,9 +42,9 @@ treeherder.provider('thResultStatus', function () {
treeherder.provider('thResultStatusObject', function () {
var getResultStatusObject = function () {
return {
'running':0,
'pending':0,
'completed':0
running: 0,
pending: 0,
completed: 0
};
};

Просмотреть файл

@ -23,8 +23,7 @@ treeherder.factory('thUrl', [
return "index.html#/jobs?" + _.reduce({
repo: repo, fromchange: fromChange, tochange: toChange
}, function (result, v, k) {
if (result.length)
result += '&';
if (result.length) result += '&';
return result + k + '=' + v;
}, "");
},

Просмотреть файл

@ -97,8 +97,9 @@ treeherder.factory('PhCompare', [
var hasOrig = originalData && originalData.values.length;
var hasNew = newData && newData.values.length;
if (!hasOrig && !hasNew)
if (!hasOrig && !hasNew) {
return cmap; // No data for either side
}
cmap.isEmpty = false;
@ -121,8 +122,9 @@ treeherder.factory('PhCompare', [
cmap.newRuns = [];
}
if (!hasOrig || !hasNew)
if (!hasOrig || !hasNew) {
return cmap; // No comparison, just display for one side.
}
// keep the framework id so we can filter by that later, if necessary
cmap.frameworkId = originalData.frameworkId;
@ -204,11 +206,13 @@ treeherder.factory('PhCompare', [
}
$http.get(thServiceDomain + '/api/repository/').then(function (response) {
if (!_.find(response.data, {'name': originalProject}))
if (!_.find(response.data, { name: originalProject })) {
errors.push("Invalid project, doesn't exist: " + originalProject);
}
if (!_.find(response.data, {'name': newProject}))
if (!_.find(response.data, { name: newProject })) {
errors.push("Invalid project, doesn't exist: " + newProject);
}
});
return errors;
},
@ -235,7 +239,7 @@ treeherder.factory('PhCompare', [
var values = data
.filter(datum => datum.push_id === resultSetId)
.map(datum => datum.value);
var seriesData = _.find(seriesList, {'signature': signature});
var seriesData = _.find(seriesList, { signature: signature });
if (seriesData) {
resultsMap[resultSetId][signature] = {
platform: seriesData.platform,
@ -324,8 +328,9 @@ treeherder.factory('PhCompare', [
var trendMap = { isEmpty: true };
// It's possible to get an object with empty values, so check for that too.
if (!baseData.delta && !newData.delta)
if (!baseData.delta && !newData.delta) {
return trendMap; // No data for either side
}
trendMap.isEmpty = false;
trendMap.name = baseData.name;

Просмотреть файл

@ -20,8 +20,7 @@ treeherder.factory('math', [
return undefined;
}
if (!avg)
avg = average(values);
if (!avg) avg = average(values);
return Math.sqrt(
values.map(function (v) { return Math.pow(v - avg, 2); })

Просмотреть файл

@ -1,11 +1,11 @@
'use strict';
treeherder.value("thPlatformMap", {
"linux32": "Linux",
linux32: "Linux",
"linux32-devedition": "Linux DevEdition",
"linux32-qr": "Linux QuantumRender",
"linux32-nightly": "Linux Nightly",
"linux64": "Linux x64",
linux64: "Linux x64",
"linux64-asan": "Linux x64 asan",
"linux64-add-on-devel": "Linux x64 addon",
"linux64-devedition": "Linux x64 DevEdition",
@ -36,7 +36,7 @@ treeherder.value("thPlatformMap", {
"macosx64-stylo": "OS X 10.10 Stylo",
"macosx64-devedition": "OS X 10.10 DevEdition",
"macosx64-nightly": "OS X 10.10 Nightly",
"windowsxp": "Windows XP",
windowsxp: "Windows XP",
"windowsxp-devedition": "Windows XP DevEdition",
"windows7-32": "Windows 7",
"windows7-32-vm": "Windows 7 VM",
@ -102,7 +102,7 @@ treeherder.value("thPlatformMap", {
"android-4-0-armv7-api15-partner1": "Android API15+ partner1",
"android-api-15-gradle": "Android API15+ Gradle",
"android-api-16-gradle": "Android API16+ Gradle",
"Android": "Android",
Android: "Android",
"b2g-linux32": "B2G Desktop Linux",
"b2g-linux64": "B2G Desktop Linux x64",
@ -127,19 +127,19 @@ treeherder.value("thPlatformMap", {
"horizon-win64": "Horizon Windows x64",
"gecko-decision": "Gecko Decision Task",
"lint": "Linting",
lint: "Linting",
"release-mozilla-release-": "Balrog Publishing",
"other": "Other"
other: "Other"
});
treeherder.value("thOptionOrder", {
"opt": 0,
"pgo": 1,
"asan": 2,
"tsan": 3,
"debug": 4,
"cc": 5,
"addon": 6
opt: 0,
pgo: 1,
asan: 2,
tsan: 3,
debug: 4,
cc: 5,
addon: 6
});
treeherder.value("thFailureResults", ["testfailed", "busted", "exception"]);
@ -147,20 +147,20 @@ treeherder.value("thFailureResults", ["testfailed", "busted", "exception"]);
treeherder.value("thTitleSuffixLimit", 70);
treeherder.value("thFavicons", {
"closed": "img/tree_closed.png",
"open": "img/tree_open.png",
closed: "img/tree_closed.png",
open: "img/tree_open.png",
"approval required": "img/tree_open.png",
"unavailable": "img/tree_open.png"
unavailable: "img/tree_open.png"
});
treeherder.value("thRepoGroupOrder", {
"development": 1,
development: 1,
"release-stabilization": 2,
"project repositories": 3,
"comm-repositories": 4,
"qa automation tests": 5,
"try": 6,
"taskcluster": 7
try: 6,
taskcluster: 7
});
treeherder.value("thDefaultRepo", "mozilla-inbound");
@ -172,14 +172,14 @@ treeherder.value("phCompareDefaultOriginalRepo", "mozilla-central");
treeherder.value("phCompareDefaultNewRepo", "try");
treeherder.value("phTimeRanges", [
{ "value":86400, "text": "Last day" },
{ "value":86400*2, "text": "Last 2 days" },
{ "value":604800, "text": "Last 7 days" },
{ "value":1209600, "text": "Last 14 days" },
{ "value":2592000, "text": "Last 30 days" },
{ "value":5184000, "text": "Last 60 days" },
{ "value":7776000, "text": "Last 90 days" },
{ "value":31536000, "text": "Last year" } ]);
{ value: 86400, text: "Last day" },
{ value: 86400*2, text: "Last 2 days" },
{ value: 604800, text: "Last 7 days" },
{ value: 1209600, text: "Last 14 days" },
{ value: 2592000, text: "Last 30 days" },
{ value: 5184000, text: "Last 60 days" },
{ value: 7776000, text: "Last 90 days" },
{ value: 31536000, text: "Last year" } ]);
treeherder.value("phDefaultTimeRangeValue", 1209600);
@ -188,11 +188,11 @@ treeherder.value("phTimeRangeValues", {
});
treeherder.value("phComparisonDate", [
{ "value":0, "text": "Today" },
{ "value":604800, "text": "1 week ago" },
{ "value":1209600, "text": "2 weeks ago" },
{ "value":2419200, "text": "4 weeks ago" },
{ "value":3628800, "text": "6 weeks ago" }
{ value: 0, text: "Today" },
{ value: 604800, text: "1 week ago" },
{ value: 1209600, text: "2 weeks ago" },
{ value: 2419200, text: "4 weeks ago" },
{ value: 3628800, text: "6 weeks ago" }
]);
treeherder.value("phBlockers", {
@ -202,8 +202,8 @@ treeherder.value("phBlockers", {
"dromaeo_dom summary": 2.0,
"glterrain summary": 5.0,
"kraken summary": 2.0,
"sessionrestore": 5.0,
"sessionrestore_no_auto_restore": 5.0,
sessionrestore: 5.0,
sessionrestore_no_auto_restore: 5.0,
"tart summary": 5.0,
"tcanvasmark summary": 5.0,
"tp5o % Processor Time": 2.0,
@ -214,11 +214,11 @@ treeherder.value("phBlockers", {
"tp5o responsiveness": 2.0,
"tp5o summary": 5.0,
"tp5o_scroll summary": 2.0,
"tpaint": 5.0,
tpaint: 5.0,
"tps summary": 5.0,
"tresize": 5.0,
"ts_paint": 2.0,
"tscrollx": 2.0,
tresize: 5.0,
ts_paint: 2.0,
tscrollx: 2.0,
"tsvgr_opacity summary": 5.0,
"tsvgx summary": 5.0
});
@ -246,30 +246,30 @@ treeherder.value("phAlertStatusMap", {
});
treeherder.value("phTalosDocumentationMap", {
"a11yr": "a11y",
"cart": "TART.2FCART",
"damp": "DAMP",
"dromaeo_css": "Dromaeo_Tests",
"dromaeo_dom": "Dromaeo_Tests",
"sessionrestore": "sessionrestore.2Fsessionrestore_no_auto_restore",
"sessionrestore_no_auto_restore": "sessionrestore.2Fsessionrestore_no_auto_restore",
"tart": "TART.2FCART",
"tcanvasmark": "CanvasMark",
"tp5n_main_normal_fileio": "xperf",
"tp5n_main_normal_netio": "xperf",
"tp5n_main_startup_fileio": "xperf",
"tp5n_main_startup_netio": "xperf",
"tp5n_nonmain_normal_fileio": "xperf",
"tp5n_nonmain_normal_netio": "xperf",
"tp5n_nonmain_startup_fileio": "xperf",
"tp5o": "tp5",
a11yr: "a11y",
cart: "TART.2FCART",
damp: "DAMP",
dromaeo_css: "Dromaeo_Tests",
dromaeo_dom: "Dromaeo_Tests",
sessionrestore: "sessionrestore.2Fsessionrestore_no_auto_restore",
sessionrestore_no_auto_restore: "sessionrestore.2Fsessionrestore_no_auto_restore",
tart: "TART.2FCART",
tcanvasmark: "CanvasMark",
tp5n_main_normal_fileio: "xperf",
tp5n_main_normal_netio: "xperf",
tp5n_main_startup_fileio: "xperf",
tp5n_main_startup_netio: "xperf",
tp5n_nonmain_normal_fileio: "xperf",
tp5n_nonmain_normal_netio: "xperf",
tp5n_nonmain_startup_fileio: "xperf",
tp5o: "tp5",
"tp5o_% processor time": ".25_CPU",
"tp5o_main_rss": "RSS_.28Resident_Set_Size.29",
tp5o_main_rss: "RSS_.28Resident_Set_Size.29",
"tp5o_modified page list bytes": "Modified_Page_List_Bytes",
"tp5o_private bytes": "Private_Bytes",
"tp5o_xres": "Xres_.28X_Resource_Monitoring.29",
"tsvgr_opacity": "tsvg-opacity",
"v8_7": "V8.2C_version_7"
tp5o_xres: "Xres_.28X_Resource_Monitoring.29",
tsvgr_opacity: "tsvg-opacity",
v8_7: "V8.2C_version_7"
});
treeherder.value("phTrySyntaxBuildPlatformMap", {
@ -277,7 +277,7 @@ treeherder.value("phTrySyntaxBuildPlatformMap", {
"osx-10-10": "macosx64",
"windows7-32": "win32",
"windows8-64": "win64",
"windowsxp": "win32"
windowsxp: "win32"
});
treeherder.value("phTrySyntaxTalosModifierMap", {
@ -285,7 +285,7 @@ treeherder.value("phTrySyntaxTalosModifierMap", {
"osx-10-10": "10.10",
"windows7-32": "Windows 7",
"windows8-64": "Windows 8",
"windowsxp": "Windows XP"
windowsxp: "Windows XP"
});
treeherder.value('mcTalosConfigUrl',

Просмотреть файл

@ -731,10 +731,10 @@ treeherder.controller('ThAutoclassifyErrorsController', ['$scope', '$element',
$scope.lineStatuses = new Map();
$scope.titles = {
'verified': "Verified Line",
verified: "Verified Line",
'unverified-ignore': "Unverified line, ignored",
'unverified-no-bug': "Unverified line missing a bug number",
'unverified': "Unverified line",
unverified: "Unverified line",
'classification-disabled': ""
};
@ -948,8 +948,8 @@ treeherder.controller('ThAutoclassifyPanelController', [
requestPromise = $q.defer();
return $q.all({
"matchers": ThMatcherModel.by_id(),
"error_lines": ThTextLogErrorsModel.getList(ctrl.thJob.id,
matchers: ThMatcherModel.by_id(),
error_lines: ThTextLogErrorsModel.getList(ctrl.thJob.id,
{ timeout: requestPromise })
});
}

Просмотреть файл

@ -212,7 +212,7 @@ treeherder.controller('PluginCtrl', [
_.forEach(seriesList, function (series) {
// skip series which are subtests of another series
if (series.parentSignature)
return;
{ return; }
var detail = {
url: thServiceDomain + '/perf.html#/graphs?series=[' + [
$scope.repoName, series.signature, 1,
@ -247,7 +247,7 @@ treeherder.controller('PluginCtrl', [
duration = "";
// fields that will show in the job detail panel
$scope.visibleFields = {
"Build": $scope.job.build_architecture + " " +
Build: $scope.job.build_architecture + " " +
$scope.job.build_platform + " " +
$scope.job.build_os || undef,
"Job name": $scope.job.job_type_name || undef
@ -351,9 +351,9 @@ treeherder.controller('PluginCtrl', [
ThJobModel.retrigger($scope.repoName, job_id_list).then(function () {
// XXX: Remove this after 1134929 is resolved.
return ThJobDetailModel.getJobDetails({
"title": "buildbot_request_id",
"repository": $scope.repoName,
"job_id__in": job_id_list.join(',')
title: "buildbot_request_id",
repository: $scope.repoName,
job_id__in: job_id_list.join(',')
}).then(function (data) {
var requestIdList = _.map(data, 'value');
requestIdList.forEach(function (requestId) {

Просмотреть файл

@ -90,9 +90,9 @@ treeherder.controller('SimilarJobsPluginCtrl', [
$scope.result_status_info = thResultStatusInfo;
$scope.similar_jobs_filters = {
"machine_id": false,
"build_platform_id": true,
"option_collection_hash": true
machine_id: false,
build_platform_id: true,
option_collection_hash: true
};
$scope.button_class = function (job) {
var resultState = job.result;

Просмотреть файл

@ -3,45 +3,45 @@
treeherder.factory('thTabs', [
function () {
var thTabs = {
"tabs": {
"jobDetails": {
tabs: {
jobDetails: {
title: "Job Details",
description: "additional job information",
content: "plugins/job_details/main.html",
enabled: true
},
"failureSummary": {
failureSummary: {
title: "Failure Summary",
description: "failure summary",
content: "plugins/failure_summary/main.html",
enabled: true
},
"autoClassification": {
autoClassification: {
title: "Failure Classification",
description: "intermittent classification interface",
content: "plugins/auto_classification/main.html",
enabled: false
},
"annotations": {
annotations: {
title: "Annotations",
description: "annotations",
content: "plugins/annotations/main.html",
enabled: true
},
"similarJobs": {
similarJobs: {
title: "Similar Jobs",
description: "similar jobs",
content: "plugins/similar_jobs/main.html",
enabled: true
},
"perfDetails": {
perfDetails: {
title: "Performance",
description: "performance details",
content: "plugins/perf_details/main.html",
enabled: false
}
},
"tabOrder": [
tabOrder: [
"jobDetails",
"failureSummary",
"autoClassification",
@ -49,8 +49,8 @@ treeherder.factory('thTabs', [
"similarJobs",
"perfDetails"
],
"selectedTab": "jobDetails",
"showTab" : function (tab, contentId) {
selectedTab: "jobDetails",
showTab: function (tab, contentId) {
thTabs.selectedTab = tab;
if (!thTabs.tabs[thTabs.selectedTab].enabled) {
thTabs.selectedTab = 'jobDetails';