This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
forked from rhelmer/graphs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug 719928 - extract config.js from common/dashboard, patch by Ryosuk…
…e Niwa
- Loading branch information
Showing
6 changed files
with
118 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
var USE_GENERATED_IMAGES_IN_DASHBOARD = true; | ||
var MAX_GRAPHS = 6; | ||
var MAX_CSETS = 100; | ||
var DAY = 86400000; | ||
|
||
var COLORS = ['#e7454c', '#6dba4b', '#4986cf', '#f5983d', '#884e9f', | ||
'#bf5c41']; | ||
|
||
var SERVER = 'http://graphs-new.mozilla.org'; | ||
//var SERVER = 'http://localhost'; | ||
|
||
var LIGHT_COLORS = $.map(COLORS, function(color) { | ||
return $.color.parse(color).add('a', -.5).toString(); | ||
}); | ||
|
||
var PLOT_OPTIONS = { | ||
xaxis: { mode: 'time' }, | ||
yaxis: { min: 0 }, | ||
selection: { mode: 'x', color: '#97c6e5' }, | ||
/* crosshair: { mode: 'xy', color: '#cdd6df', lineWidth: 1 }, */ | ||
series: { shadowSize: 0 }, | ||
lines: { show: false }, | ||
points: { show: true }, | ||
grid: { | ||
color: '#cdd6df', | ||
borderWidth: 2, | ||
backgroundColor: '#fff', | ||
hoverable: true, | ||
clickable: true, | ||
autoHighlight: false | ||
} | ||
}; | ||
|
||
var OVERVIEW_OPTIONS = { | ||
xaxis: { mode: 'time' }, | ||
yaxis: { min: 0 }, | ||
selection: { mode: 'x', color: '#97c6e5' }, | ||
series: { | ||
lines: { show: true, lineWidth: 1 }, | ||
shadowSize: 0 | ||
}, | ||
grid: { | ||
color: '#cdd6df', | ||
borderWidth: 2, | ||
backgroundColor: '#fff', | ||
tickColor: 'rgba(0,0,0,0)' | ||
} | ||
}; | ||
|
||
// FIXME get this from the server instead of hardcoding | ||
var HGWEB = 'http://hg.mozilla.org'; | ||
function repoMap(branch) | ||
{ | ||
branch = branch.toLowerCase(); | ||
|
||
var map = { | ||
'firefox': 'mozilla-central', | ||
'tracemonkey': 'tracemonkey', | ||
'seamonkey': 'comm-central', | ||
'thunderbird': 'comm-central', | ||
'mozilla-inbound': 'integration/mozilla-inbound', | ||
'try': 'try', | ||
'mobile': 'mozilla-central' | ||
}; | ||
|
||
if (branch.indexOf('-non-pgo') != -1) { | ||
branch = branch.split('-non-pgo')[0]; | ||
} | ||
|
||
if (branch in map) { | ||
return HGWEB + '/' + map[branch]; | ||
} else { | ||
return HGWEB + '/projects/' + branch; | ||
} | ||
} | ||
|
||
function urlForChangeset(branch, changeset) | ||
{ | ||
return repoMap(branch) + '/rev/' + changeset; | ||
} | ||
|
||
function urlForChangesetList(branch, csets) | ||
{ | ||
return repoMap(branch) + '/pushloghtml?changeset=' + | ||
csets.join('&changeset='); | ||
} | ||
|
||
// FIXME move this back to dashboard.js once the bug 718925 is fixed | ||
function fetchDashboardManifest() | ||
{ | ||
return { | ||
'defaultBranch': 'Firefox', | ||
'branchToId': {'Firefox': 1}, | ||
'platformToId': { | ||
'Windows 7': 12, | ||
'Windows XP': 1, | ||
'Mac OS X': 13, | ||
'Linux': 14 | ||
}, | ||
'testToId': { | ||
'Ts': 83, | ||
'Tp': 115, | ||
'SunSpider': 104 | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters